GridFire v0.7.0-alpha
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 fourdst::composition::Composition &comp, 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 fourdst::composition::Composition & comp,
double T9,
double rho ) const
overridevirtual

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

Parameters
compComposition object containing current abundances.
T9Temperature in units of 10^9 K.
rhoDensity in g/cm^3.
Returns
expected<StepDerivatives<double>> containing either dY/dt and energy generation rate or a stale engine error indicating that the engine must be updated

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: