GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | List of all members
gridfire::Engine Class Referenceabstract

Abstract base class for a reaction network engine. More...

`#include <engine_abstract.h>`

Inheritance diagram for gridfire::Engine:

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

## Detailed Description

Abstract base class for a reaction network engine.

This class defines the minimal interface for a reaction network engine, which is responsible for evaluating the right-hand side (dY/dt) and energy generation for a given set of abundances, temperature, and density.

Intended usage: Derive from this class to implement a concrete engine for a specific network or integration method.

Example:

class MyEngine : public gridfire::Engine {
// Implement required methods...
};
gridfire::Engine
Abstract base class for a reaction network engine.
Definition engine_abstract.h:84

Definition at line 84 of file engine_abstract.h.

## Constructor & Destructor Documentation

## ◆ ~Engine()

virtual gridfire::Engine::~Engine | ( |  | ) |
| virtual default

Virtual destructor.

## Member Function Documentation

## ◆ calculateRHSAndEnergy()

virtual std::expected< StepDerivatives< double >, expectations::StaleEngineError > gridfire::Engine::calculateRHSAndEnergy | ( | const std::vector< double > & | Y,
|  | double | T9,
|  | double | rho ) const
| nodiscard pure virtual

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

Parameters

  Y | Vector of current abundances for all species.
  T9 | Temperature in units of 10^9 K.
  rho | Density 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.

Implemented in gridfire::AdaptiveEngineView, gridfire::DefinedEngineView, gridfire::GraphEngine, gridfire::MultiscalePartitioningEngineView, PyDynamicEngine, and PyEngine.

## ◆ getNetworkSpecies()

virtual const std::vector< fourdst::atomic::Species > & gridfire::Engine::getNetworkSpecies | ( |  | ) | const
| nodiscard pure virtual

Get the list of species in the network.

Returns
  Vector of Species objects representing all network species.

Implemented in gridfire::AdaptiveEngineView, gridfire::DefinedEngineView, gridfire::GraphEngine, gridfire::MultiscalePartitioningEngineView, PyDynamicEngine, and PyEngine.

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

- src/include/gridfire/engine/engine_abstract.h