Loading...
Searching...
No Matches
PyEngine Class Referencefinal

`#include <py_engine.h>`

Inheritance diagram for PyEngine:
[legend]
Collaboration diagram for PyEngine:
[legend]

## Public Member Functions

const std::vector< fourdst::atomic::Species > & | getNetworkSpecies (gridfire::engine::scratch::StateBlob &ctx) const override
| Get the list of species in the network.
std::expected< gridfire::engine::StepDerivatives< double >, gridfire::engine::EngineStatus > | calculateRHSAndEnergy (gridfire::engine::scratch::StateBlob &ctx, const fourdst::composition::CompositionAbstract &comp, double T9, double rho, bool trust) const override
| Calculate the right-hand side (dY/dt) and energy generation.
Public Member Functions inherited from gridfire::engine::Engine
virtual | ~Engine ()=default
| Virtual destructor.

## Private Attributes

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

## Member Function Documentation

## calculateRHSAndEnergy()

std::expected< gridfire::engine::StepDerivatives< double >, gridfire::engine::EngineStatus > PyEngine::calculateRHSAndEnergy | ( | gridfire::engine::scratch::StateBlob & | ,
|  | const fourdst::composition::CompositionAbstract & | comp,
|  | double | T9,
|  | double | rho,
|  | bool | trust ) const

overridevirtual

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

Parameters

  comp | Composition object containing current abundances.
  T9 | Temperature in units of 10^9 K.
  rho | Density in g/cm^3.
  trust | If true, indicates that the engine should trust the passed composition has already been collected.

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::Engine.

## getNetworkSpecies()

const std::vector< fourdst::atomic::Species > & PyEngine::getNetworkSpecies | ( | gridfire::engine::scratch::StateBlob & | ctx | ) | const

overridevirtual

Get the list of species in the network.

Returns
  Vector of Species objects representing all network species.

Implements gridfire::engine::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:

- src/python/engine/trampoline/py_engine.h
- src/python/engine/trampoline/py_engine.cpp