Repository navigation
Add interface to partitioned DAE integrator - #614
Steven-Roberts wants to merge 4 commits into
Conversation
* Add gridkit@v0.2 and sundials@partitioned-dae * Add CMake guards for PARTITIONED_DAE. * Add ^sundials@partitioned-dae CI jobs. * Patch out missing partitioned-dae example in SUNDIALS spack package.
|
The Here is the backtrace: |
pelesh
left a comment
There was a problem hiding this comment.
This looks very good and the test passes.
I suggest to start separating interface to partitioned solver from the solver implementation as suggested below. That will help make it more clear what should API for partitioned solvers look like.
| success *= std::abs(y[0] - 0.8181325137273604) < tol; | ||
| success *= std::abs(y[1] - 1.2467607076859357) < tol; | ||
| success *= std::abs(y[2] - 0.2350113335864333) < tol; | ||
| success *= std::abs(y[3] - 1.4725904879949860) < tol; | ||
| success *= std::abs(y[4] - 1.6662073483671279) < tol; | ||
| success *= callbacks == 4; | ||
| success *= solver.getStats().num_steps_ == 1000; |
There was a problem hiding this comment.
I would use GridKit's isEqual helper function.
| struct PartitionedStats | ||
| { |
There was a problem hiding this comment.
I suggest Implementing helper classes and structs in separate files. Files Partitioned*pp should contain interface to the solver. The solver itself should be implemented in files located in Partitioned subdirectory.
nkoukpaizan
left a comment
There was a problem hiding this comment.
I recommend adding some minimal documentation of the methods. We'll likely iterate on the function signatures, so just a high-level description of that they do.
Good to merge after the minor comments have been addressed.
Description
This is a draft of a partitioned DAE integrator interface. It currently uses masking of the residual and Jacobian, with many TODO statement indicating where things will need to be updated when GridKit partitioning functionality is in place.
It requires this branch of SUNDIALS: https://github.com/llnl/sundials/tree/feature/partitioned-dae-stepper
Proposed changes
Adds a new
DynamicSolverand a unit test on a simple 5 variable DAE.Checklist
-Wall -Wpedantic -Wconversion -Wextra.