-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add forcing function to general Rosenbrock solver #74
Conversation
include/micm/process/process_set.hpp
Outdated
|
||
inline ProcessSet::ProcessSet(const std::vector<Process>& processes, const State& state) | ||
: number_of_reactants_( | ||
[&]() -> std::vector<std::size_t> |
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.
Since the data member are not const, it might be more readable to move these into the body of the constructor. We would no longer need the lambda functions.
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.
moved to constructor body
include/micm/solver/state.hpp
Outdated
concentrations_(parameters.number_of_grid_cells_, parameters.number_of_state_variables_, 0.0 ), | ||
custom_rate_parameters_(parameters.number_of_grid_cells_, parameters.number_of_custom_parameters_, 0.0 ), | ||
rate_constants_(parameters.number_of_grid_cells_, parameters.number_of_rate_constants_, 0.0 ) | ||
variable_map_( |
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.
Here too, I think we should move the contents of the lambda function into the body of the constructor so that it's a little easier to read
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.
moved to constructor body
Co-authored-by: Kyle Shores <kyle.shores44@gmail.com>
…o develop-63-forcing
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
===========================================
+ Coverage 75.49% 91.22% +15.72%
===========================================
Files 15 16 +1
Lines 755 832 +77
===========================================
+ Hits 570 759 +189
+ Misses 185 73 -112
☔ View full report in Codecov by Sentry. |
Adds a general forcing function to the Rosenbrock solver.
The forcing calculations were added to a new
ProcessSet
class because they are specific to gas-phase chemical systems and not really to general ODE solvers, but I'm not sure if this is the best solution.Minor changes:
Solve()
function on the Rosenbrock solver to only take the time step info and aState
object.const Matrix
functionscloses #63