-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce cantera/core.h for C++ Examples #1238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per my comments below, IMO the preferred method to make newSolution
more accessible to users would be to add a new header, say, solution.h
.
43ad8c8
to
5cf79bd
Compare
@bryanwweber / @speth ... thank you for the feedback.
I had already eyed that idea (see comments on top). Ultimately, I believe #include "cantera/core.h" is the most intuitive nomenclature - which is now implemented (it combines all commonly used features of what I consider the core - |
32bf024
to
c01eaed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ischoegl, this seems pretty non-controversial, and really cleans up the include headers in some of the examples!
Naive question: You have added core.h
to the zerodim
and onedim
headers, but I noticed that there are no lines that get taken out (i.e. these files did not previously include any of the include files listed in core.h
. Am I understanding that correctly? And if so, why is it necessary to include core.h
now? (note: this is not criticism, more just me trying to understand).
Edit: Never mind, I think I figured it out. Including it here cleans up header statements for things like Combustor.cpp
and kinetics1.cpp
, which already include zerodim
, et al. Is that correct?
c01eaed
to
cafda42
Compare
@decaluwe ... glad you like it!
Correct. I view |
Per discussion elsewhere, it may make sense to postpone this feature until after the 2.6 release. I will nevertheless keep the PR open as I think the feature is worthwhile. |
cafda42
to
fefd097
Compare
Codecov Report
@@ Coverage Diff @@
## main #1238 +/- ##
==========================================
- Coverage 67.26% 67.19% -0.08%
==========================================
Files 314 314
Lines 41887 41905 +18
Branches 16852 16862 +10
==========================================
- Hits 28174 28156 -18
- Misses 11483 11518 +35
- Partials 2230 2231 +1
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
fefd097
to
7a9403e
Compare
This should be one of the easier PR's left over from ongoing work prior to 2.6. Now that we're on our way to 3.0, this should be good for a review. I ended up adding
|
7a9403e
to
2aca6e7
Compare
2aca6e7
to
e018150
Compare
e018150
to
2acc046
Compare
@speth / @bryanwweber … rebased and ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ischoegl. Overall, I think this looks good. In a way, this is a better thought out version of the Cantera.h
header that used to exist before around Cantera 2.2.
0eb1827
to
8ad8f51
Compare
Co-authored-by: Ray Speth <speth@mit.edu>
8ad8f51
to
31ab3d7
Compare
@speth ... thanks for the review! I think this is ready ... |
@bryanwweber ... do you approve? |
Changes proposed in this pull request
Add relevant headers toSolution.h
cantera/core.h
Also:
Solution::setTransport(const std::string&)
If applicable, provide an example illustrating new features this pull request is introducing
In many instances where
newSolution
handles the creation of aCantera::Solution
object, the main include needed in C++ would beAn alternative would be to introduce a new... Edit: this was adopted as an alternative to include common headers incore.h
header at the same level asthermo.h
etc. (I.e.#include "cantera/core.h"
)Solution.h
Checklist
scons build
&scons test
) and unit tests address code coverage