template<typename EngineT>
class gridfire::solver::NetworkSolverStrategy< EngineT >
Abstract base class for network solver strategies.
This class defines the interface for network solver strategies, which are responsible for integrating the reaction network ODEs over a given timestep. It is templated on the engine type to allow for different engine implementations to be used with the same solver.
- Template Parameters
-
EngineT | The type of engine to use with this solver strategy. Must inherit from Engine. |
template<typename EngineT>
Describe the context that will be passed to the callback function.
- Returns
- A vector of tuples, each containing a string for the parameter's name and a string for its type.
This method should be overridden by derived classes to provide a description of the context that will be passed to the callback function. The intent of this method is that an end user can investigate the context that will be passed to the callback function, and use this information to craft their own callback function.
Implemented in gridfire::solver::DirectNetworkSolver, and PyDynamicNetworkSolverStrategy.
template<typename EngineT>
set the callback function to be called at the end of each timestep.
This function allows the user to set a callback function that will be called at the end of each timestep. The callback function will receive a gridfire::solver::<SOMESOLVER>::TimestepContext object. Note that depending on the solver, this context may contain different information. Further, the exact signature of the callback function is left up to each solver. Every solver should provide a type or type alias TimestepCallback that defines the signature of the callback function so that the user can easily get that type information.
- Parameters
-
callback | The callback function to be called at the end of each timestep. |
Implemented in gridfire::solver::DirectNetworkSolver, and PyDynamicNetworkSolverStrategy.