GridFire v0.7.6rc4.0 General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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
| override virtual

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
| override virtual

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
| mutable private

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