GridFire 0.6.0
General Purpose Nuclear Network
Loading...
Searching...
No Matches
PyDynamicNetworkSolverStrategy Class Referencefinal

#include <py_solver.h>

Inheritance diagram for PyDynamicNetworkSolverStrategy:
gridfire::solver::NetworkSolverStrategy< DynamicEngine >

Private Member Functions

 PyDynamicNetworkSolverStrategy (gridfire::DynamicEngine &engine)
 
gridfire::NetOut evaluate (const gridfire::NetIn &netIn) override
 Evaluates the network for a given timestep.
 
void set_callback (const std::any &callback) override
 set 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.
 

Additional Inherited Members

- Public Member Functions inherited from gridfire::solver::NetworkSolverStrategy< DynamicEngine >
 NetworkSolverStrategy (DynamicEngine &engine)
 Constructor for the NetworkSolverStrategy.
 
virtual ~NetworkSolverStrategy ()=default
 Virtual destructor.
 
 NetworkSolverStrategy (DynamicEngine &engine)
 Constructor for the NetworkSolverStrategy.
 
virtual ~NetworkSolverStrategy ()=default
 Virtual destructor.
 
- Protected Attributes inherited from gridfire::solver::NetworkSolverStrategy< DynamicEngine >
DynamicEnginem_engine
 The engine used by this solver strategy.
 
DynamicEnginem_engine
 The engine used by this solver strategy.
 

Constructor & Destructor Documentation

◆ PyDynamicNetworkSolverStrategy()

PyDynamicNetworkSolverStrategy::PyDynamicNetworkSolverStrategy ( gridfire::DynamicEngine & engine)
inlineexplicitprivate

Member Function Documentation

◆ describe_callback_context()

std::vector< std::tuple< std::string, std::string > > PyDynamicNetworkSolverStrategy::describe_callback_context ( ) const
overrideprivatevirtual

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.

Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.

◆ evaluate()

gridfire::NetOut PyDynamicNetworkSolverStrategy::evaluate ( const gridfire::NetIn & netIn)
overrideprivatevirtual

Evaluates the network for a given timestep.

Parameters
netInThe input conditions for the network.
Returns
The output conditions after the timestep.

Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.

◆ set_callback()

void PyDynamicNetworkSolverStrategy::set_callback ( const std::any & callback)
overrideprivatevirtual

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
callbackThe callback function to be called at the end of each timestep.

Implements gridfire::solver::NetworkSolverStrategy< DynamicEngine >.


The documentation for this class was generated from the following files: