Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1863 +/- ##
=========================================
Coverage 74.33% 74.34%
=========================================
Files 387 443 +56
Lines 53652 55420 +1768
Branches 9074 9106 +32
=========================================
+ Hits 39884 41203 +1319
- Misses 10696 11118 +422
- Partials 3072 3099 +27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
348e861 to
6cb8a86
Compare
ad27841 to
41f6383
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
|
||
| //! Set up initial grid. | ||
| //! @since New in %Cantera 3.2. | ||
| void setupGrid(const vector<double>& grid); |
There was a problem hiding this comment.
Can we avoid introducing this overload for setupGrid? If we did this for every method that took double*, we'd have a lot of extra boilerplate code, and I don't want to force users to use std::vector.
There was a problem hiding this comment.
This is a little more than meets the eye. The current setupGrid(size_t n, const double* z) is an outlier as it takes the array size as an additional argument rather than just the pointer. I currently don't have a rule to handle that outlier in the logic of CLibSourceGenerator and am hesitant to add it as it's different from what we do elsewhere. We have the alternative of introducing a (Edit: that won't work as different to other cases the size of the array isn't known a priori). I opted for the inherently safer version of a setupGrid(const double* z) and deprecate the current version to be consistent with the remainder of our API.std::vector.
PPS: Fwiw, the signature setupGrid(size_t n, const double* z) with size followed by array pointer is consistent with how we handle things in CLib. This is about the decision whether we allow for an overload that can be handled by standard logic or we add an edge case.
Changes proposed in this pull request
Implement oneD API in the experimental CLib. Further:
If applicable, fill in the issue number this pull request is fixing
Addresses Cantera/enhancements#220
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build&scons test) and unit tests address code coverage