-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
1D solver API docs #1803
1D solver API docs #1803
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1803 +/- ##
==========================================
- Coverage 73.10% 73.09% -0.02%
==========================================
Files 383 383
Lines 54632 54617 -15
Branches 9106 9101 -5
==========================================
- Hits 39940 39921 -19
- Misses 11692 11698 +6
+ Partials 3000 2998 -2 ☔ View full report in Codecov by Sentry. |
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, @speth. I have a couple of minor comments.
src/oneD/OneDim.cpp
Outdated
@@ -220,13 +216,13 @@ int OneDim::solve(double* x, double* xnew, int loglevel) | |||
return m_newt->solve(x, xnew, *this, *m_jac, loglevel); | |||
} | |||
|
|||
void OneDim::evalSSJacobian(double* x, double* xnew) | |||
void OneDim::evalSSJacobian(double* x, double* r) |
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’m generally not convinced that single-letter variables or functions are a good idea.
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 it rsd
, which is what's used a few other places, but just r
is used in other places in the 1D solver for the residual. Here, r
is strictly an improvement, as the old name was misleading -- this definitely does not contain a "new" value for x
.
ThermoBasis m_fluxGradientBasis = ThermoBasis::molar; | ||
vector<bool> m_do_species; |
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.
It would be good if you could comment on the rationale for removing this feature.
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.
This was just a variable that had no methods for being set except when being restored from a saved data file, and was not being used to control the logic for evaluating the governing equations.
Digging through the Git history a bit jogged my memory. The idea of solving with a fixed species profile was a feature that was removed in Cantera 2.3, but I'm not sure it ever made sense from a consistency standpoint.
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, @speth!
Changes proposed in this pull request
If applicable, fill in the issue number this pull request is fixing
This is the last step needed to complete Cantera/enhancements#25.
Checklist
scons build
&scons test
) and unit tests address code coverage