-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Remove vestigial onedim Python functions and methods #1464
Conversation
29ff2a0
to
9c015b6
Compare
9c015b6
to
de2bb92
Compare
ae9562d
to
5e1a630
Compare
Codecov Report
@@ Coverage Diff @@
## main #1464 +/- ##
==========================================
+ Coverage 69.86% 69.89% +0.02%
==========================================
Files 377 377
Lines 57298 57350 +52
Branches 19164 19203 +39
==========================================
+ Hits 40033 40085 +52
- Misses 14712 14715 +3
+ Partials 2553 2550 -3
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
5e1a630
to
2d1621f
Compare
Prevent automatic alphabetic ordering of states in SolutionArray::componentNames
f651e49
to
1a931a6
Compare
Rename Domain1D::restore to Domain1D::fromArray Introduce alternative Domain1D::asArray/fromArray versions
Deprecate obsolete Python route and associated helper functions.
As of Python 3.7, dictionaries preserve order of insertion
1a931a6
to
e03b8ee
Compare
1d040f4
to
572ea0e
Compare
I added commits that replace hardcoded indices in While the |
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, I think this is generally fine. I just had some minor suggestions/comments.
include/cantera/oneD/Domain1D.h
Outdated
shared_ptr<vector<double>> m_data; //!< data pointer shared from OneDim | ||
|
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.
I'd like to find a more descriptive name for this array than just "data" (and likewise the setData
method). Perhaps m_state
, given that it's replacing m_x
at the Sim1D
level?
Also, we normally use the vector_fp
typedef instead of writing vector<double>
. This shows up several times in this PR. Unless you're suggesting preferring this name more broadly?
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.
I renamed m_data
to m_state
as suggested.
Regarding vector_fp
vs vector<double>
, I do indeed have a preference for the latter, as it is self-documenting while the former is somewhat hidden in ct_defs.h
. I believe the extra 5 characters are worthwhile, especially now that we no longer require std::
.
572ea0e
to
a412b61
Compare
@speth ... thanks for the review! I believe I addressed most of the comments, with a remaining comment about |
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.
Looks good to me!
Changes proposed in this pull request
After moving
SolutionArray
support to C++ in #1426 and updating HDF support in #1385, remaining Python versions are replaced, vestigial functions are deprecated, and code is removed where appropriate. Some minor glitches are fixed.Sim1D
data vector accessible toDomain1D
SolutionArray::normalize
to normalize mass/mole fractionsThermoPhase::nativeMode
to produce acronym describing storage modeSolutionArray
interfaceSolutionArray
methods for the interface between PythonSim1D
andSolutionArray
h5py
for Cantera 3.0, but deprecate all associated methodsOrderedDict
, which is no longer necessaryFutureWarning
s toDeprecationWarning
sh5py
supportIf applicable, fill in the issue number this pull request is fixing
Resolves Cantera/enhancements#166
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build
&scons test
) and unit tests address code coverage