-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Enable use of different Jacobian implementations with 1D solver #1836
Conversation
bb71f0a
to
9eeb7cf
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1836 +/- ##
==========================================
+ Coverage 74.39% 74.41% +0.02%
==========================================
Files 382 386 +4
Lines 53354 53622 +268
Branches 9031 9062 +31
==========================================
+ Hits 39691 39904 +213
- Misses 10608 10648 +40
- Partials 3055 3070 +15 ☔ View full report in Codecov by Sentry. |
2ceb303
to
eb3c836
Compare
eb3c836
to
9eeb7cf
Compare
First step toward allowing Jacobians implemented using different matrix storage and factorization methods.
One step toward allowing alternative Jacobian implementations
Formulas for perturbation size are based roughly on those used in CVODES.
9eeb7cf
to
9ba5f8d
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.
@speth ... thanks for taking this on! Overall, this looks great, and I look forward to the follow-up work. As this is part of a larger project, could you create a tracking issue over at Cantera/enhancements?
Beyond, all of my requests are nitpicks and are more about making sure that we start new files fully documented.
Changes proposed in this pull request
PreconditionerBase
(now renamedSystemJacobian
) to be able represent both preconditioners (Sim1D
(MultiJac
to be a derived class ofPreconditionerBase
and avoid direct inheritance fromBandMatrix
OneDim
to allow setting the implementation ofSystemJacobian
to useSystemJacobian
implementation that uses Eigen's sparse direct LU factorizationOneDim
more flexible. In some cases, different perturbations can reduce the number of residual and Jacobian evaluations required to converge. However, this is not universal so the default values are mostly unchanged.If applicable, fill in the issue number this pull request is fixing
This is preliminary work toward several planned improvements:
Note: some of the earlier performance gains that I saw turned out to require Jacobian settings that were not as robust as I'd hoped. I think getting reliably better Jacobians and cutting down the Jacobian evaluation time will be best addressed by work towards semi-analytical evaluation, as we've done in the 0D solver.
Checklist
scons build
&scons test
) and unit tests address code coverage