GridFire 0.6.0
General Purpose Nuclear Network
|
A network solver that directly integrates the reaction network ODEs. More...
#include <solver.h>
Classes | |
struct | JacobianFunctor |
Functor for calculating the Jacobian matrix. More... | |
struct | RHSManager |
Functor for calculating the right-hand side of the ODEs. More... | |
struct | TimestepContext |
Context for the timestep callback function for the DirectNetworkSolver. More... | |
Public Types | |
using | TimestepCallback = std::function<void(const TimestepContext& context)> |
Type alias for a timestep callback function. | |
Public Member Functions | |
NetOut | evaluate (const NetIn &netIn) override |
Evaluates the network for a given timestep using direct integration. | |
void | set_callback (const std::any &callback) override |
Sets the callback function to be called at the end of each timestep. | |
std::vector< std::tuple< std::string, std::string > > | describe_callback_context () const override |
Describe the context that will be passed to the callback function. | |
![]() | |
NetworkSolverStrategy (DynamicEngine &engine) | |
Constructor for the NetworkSolverStrategy. | |
virtual | ~NetworkSolverStrategy ()=default |
Virtual destructor. | |
NetworkSolverStrategy (DynamicEngine &engine) | |
Constructor for the NetworkSolverStrategy. | |
virtual | ~NetworkSolverStrategy ()=default |
Virtual destructor. | |
Private Attributes | |
quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
Logger instance. | |
Config & | m_config = Config::getInstance() |
Configuration instance. | |
TimestepCallback | m_callback |
Additional Inherited Members | |
![]() | |
DynamicEngine & | m_engine |
The engine used by this solver strategy. | |
DynamicEngine & | m_engine |
The engine used by this solver strategy. | |
A network solver that directly integrates the reaction network ODEs.
This solver uses a Runge-Kutta method to directly integrate the reaction network ODEs. It is simpler than the QSENetworkSolver, but it can be less efficient for stiff networks with disparate timescales.
using gridfire::solver::DirectNetworkSolver::TimestepCallback = std::function<void(const TimestepContext& context)> |
Type alias for a timestep callback function.
The type alias for the callback function that will be called at the end of each timestep. Type alias for a timestep callback function.
|
overridevirtual |
Describe the context that will be passed to the callback function.
This method provides a description of the context that will be passed to the callback function. The intent is that an end user can investigate the context and use this information to craft their own callback function.
Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.
Evaluates the network for a given timestep using direct integration.
netIn | The input conditions for the network. |
Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.
|
overridevirtual |
Sets the callback function to be called at the end of each timestep.
callback | 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::DirectNetworkSolver::TimestepContext object.
Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.
|
private |
|
private |
Configuration instance.
|
private |
Logger instance.