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

#include <py_engine.h>

Inheritance diagram for PyEngine:
gridfire::Engine

Public Member Functions

const std::vector< fourdst::atomic::Species > & getNetworkSpecies () const override
 Get the list of species in the network.
 
std::expected< gridfire::StepDerivatives< double >, gridfire::expectations::StaleEngineErrorcalculateRHSAndEnergy (const std::vector< double > &Y, double T9, double rho) const override
 Calculate the right-hand side (dY/dt) and energy generation.
 
- Public Member Functions inherited from gridfire::Engine
virtual ~Engine ()=default
 Virtual destructor.
 

Private Attributes

std::vector< fourdst::atomic::Species > m_species_cache
 

Member Function Documentation

◆ calculateRHSAndEnergy()

std::expected< gridfire::StepDerivatives< double >, gridfire::expectations::StaleEngineError > PyEngine::calculateRHSAndEnergy ( const std::vector< double > & Y,
double T9,
double rho ) const
overridevirtual

Calculate the right-hand side (dY/dt) and energy generation.

Parameters
YVector of current abundances for all species.
T9Temperature in units of 10^9 K.
rhoDensity in g/cm^3.
Returns
StepDerivatives<double> containing dY/dt and energy generation rate.

This function must be implemented by derived classes to compute the time derivatives of all species and the specific nuclear energy generation rate for the current state.

Implements gridfire::Engine.

◆ getNetworkSpecies()

const std::vector< fourdst::atomic::Species > & PyEngine::getNetworkSpecies ( ) const
overridevirtual

Get the list of species in the network.

Returns
Vector of Species objects representing all network species.

Implements gridfire::Engine.

Member Data Documentation

◆ m_species_cache

std::vector<fourdst::atomic::Species> PyEngine::m_species_cache
mutableprivate

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