|
GridFire 0.6.0
General Purpose Nuclear Network
|
Context for the timestep callback function for the DirectNetworkSolver. More...
#include <solver.h>
Public Member Functions | |
| TimestepContext (const double t, const boost::numeric::ublas::vector< double > &state, const double dt, const double cached_time, const double last_observed_time, const double last_step_time, const double t9, const double rho, const std::optional< StepDerivatives< double > > &cached_result, const int num_steps, const DynamicEngine &engine, const std::vector< fourdst::atomic::Species > &networkSpecies) | |
| std::vector< std::tuple< std::string, std::string > > | describe () const override |
| Describe the context for callback functions. | |
Public Member Functions inherited from gridfire::solver::SolverContextBase | |
| virtual | ~SolverContextBase ()=default |
Public Attributes | |
| const double | t |
| Current time. | |
| const boost::numeric::ublas::vector< double > & | state |
| Current state of the system. | |
| const double | dt |
| Time step size. | |
| const double | cached_time |
| Cached time for the last observed state. | |
| const double | last_observed_time |
| Last time the state was observed. | |
| const double | last_step_time |
| Last step time. | |
| const double | T9 |
| Temperature in units of 10^9 K. | |
| const double | rho |
| Density in g/cm^3. | |
| const std::optional< StepDerivatives< double > > & | cached_result |
| Cached result of the step derivatives. | |
| const int | num_steps |
| Total number of steps taken. | |
| const DynamicEngine & | engine |
| Reference to the dynamic engine. | |
| const std::vector< fourdst::atomic::Species > & | networkSpecies |
Context for the timestep callback function for the DirectNetworkSolver.
This struct contains the context that will be passed to the callback function at the end of each timestep. It includes the current time, state, timestep size, cached results, and other relevant information.
This type should be used when defining a callback function
Example:
| gridfire::solver::DirectNetworkSolver::TimestepContext::TimestepContext | ( | const double | t, |
| const boost::numeric::ublas::vector< double > & | state, | ||
| const double | dt, | ||
| const double | cached_time, | ||
| const double | last_observed_time, | ||
| const double | last_step_time, | ||
| const double | t9, | ||
| const double | rho, | ||
| const std::optional< StepDerivatives< double > > & | cached_result, | ||
| const int | num_steps, | ||
| const DynamicEngine & | engine, | ||
| const std::vector< fourdst::atomic::Species > & | networkSpecies ) |
|
overridevirtual |
Describe the context for callback functions.
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::SolverContextBase.
| const std::optional<StepDerivatives<double> >& gridfire::solver::DirectNetworkSolver::TimestepContext::cached_result |
Cached result of the step derivatives.
| const double gridfire::solver::DirectNetworkSolver::TimestepContext::cached_time |
Cached time for the last observed state.
| const double gridfire::solver::DirectNetworkSolver::TimestepContext::dt |
Time step size.
| const DynamicEngine& gridfire::solver::DirectNetworkSolver::TimestepContext::engine |
Reference to the dynamic engine.
| const double gridfire::solver::DirectNetworkSolver::TimestepContext::last_observed_time |
Last time the state was observed.
| const double gridfire::solver::DirectNetworkSolver::TimestepContext::last_step_time |
Last step time.
| const std::vector<fourdst::atomic::Species>& gridfire::solver::DirectNetworkSolver::TimestepContext::networkSpecies |
| const int gridfire::solver::DirectNetworkSolver::TimestepContext::num_steps |
Total number of steps taken.
| const double gridfire::solver::DirectNetworkSolver::TimestepContext::rho |
Density in g/cm^3.
| const boost::numeric::ublas::vector<double>& gridfire::solver::DirectNetworkSolver::TimestepContext::state |
Current state of the system.
| const double gridfire::solver::DirectNetworkSolver::TimestepContext::t |
Current time.
| const double gridfire::solver::DirectNetworkSolver::TimestepContext::T9 |
Temperature in units of 10^9 K.