GridFire 0.0.1a
General Purpose Nuclear Network
Loading...
Searching...
No Matches
gridfire::Engine Class Referenceabstract

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

#include <engine_abstract.h>

Inheritance diagram for gridfire::Engine:
gridfire::DynamicEngine gridfire::AdaptiveEngineView gridfire::FileDefinedEngineView gridfire::GraphEngine

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 StepDerivatives< double > 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...
};
Abstract base class for a reaction network engine.

Definition at line 75 of file engine_abstract.h.

Constructor & Destructor Documentation

◆ ~Engine()

virtual gridfire::Engine::~Engine ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ calculateRHSAndEnergy()

virtual StepDerivatives< double > gridfire::Engine::calculateRHSAndEnergy ( const std::vector< double > & Y,
double T9,
double rho ) const
nodiscardpure virtual

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.

Implemented in gridfire::AdaptiveEngineView, gridfire::FileDefinedEngineView, and gridfire::GraphEngine.

◆ getNetworkSpecies()

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

Get the list of species in the network.

Returns
Vector of Species objects representing all network species.

Implemented in gridfire::AdaptiveEngineView, gridfire::FileDefinedEngineView, and gridfire::GraphEngine.


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