GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | List of all members
gridfire::EngineView< EngineT > Class Template Referenceabstract

Abstract base class for a "view" of a reaction network engine. More...

`#include <engine_view_abstract.h>`

## Public Member Functions
virtual | ~EngineView ()=default
| Virtual destructor.
virtual const EngineT & | getBaseEngine () const =0
| Access the underlying engine instance.

## Detailed Description

template<EngineType EngineT>
class gridfire::EngineView< EngineT >

Abstract base class for a "view" of a reaction network engine.

Template Parameters

  EngineT | The engine type being viewed (must satisfy EngineType).

EngineView provides an interface for accessing an underlying engine instance, while presenting a potentially modified or reduced network structure to the user. This enables dynamic or adaptive network topologies (e.g., culling, masking, or remapping of species and reactions) without altering the core physics engine.

Intended usage: Derive from this class to implement a custom view or wrapper that manages a dynamic or adaptive network structure, delegating core calculations to the base engine. The contract is that getBaseEngine() must return a reference to the underlying engine instance, which remains responsible for the full physics.

Example (see also AdaptiveEngineView):

class MyAdaptiveView : public gridfire::EngineView<DynamicEngine> {
public:
MyAdaptiveView(DynamicEngine& engine) : engine_(engine) {}
const DynamicEngine& getBaseEngine() const override { return engine_; }
// Implement dynamic masking/culling logic...
private:
DynamicEngine& engine_;
};
gridfire::DynamicEngine
Abstract class for engines supporting Jacobian and stoichiometry operations.
Definition engine_abstract.h:130
gridfire::EngineView
Abstract base class for a "view" of a reaction network engine.
Definition engine_view_abstract.h:74
gridfire::EngineView::getBaseEngine
virtual const EngineT & getBaseEngine() const =0
Access the underlying engine instance.

See also
  gridfire::AdaptiveEngineView for a concrete example of dynamic culling.

Definition at line 74 of file engine_view_abstract.h.

## Constructor & Destructor Documentation

## ◆ ~EngineView()

template<EngineType EngineT>

virtual gridfire::EngineView< EngineT >::~EngineView | ( |  | ) |
| virtual default

Virtual destructor.

## Member Function Documentation

## ◆ getBaseEngine()

template<EngineType EngineT>

virtual const EngineT & gridfire::EngineView< EngineT >::getBaseEngine | ( |  | ) | const
| pure virtual

Access the underlying engine instance.

Returns
  Const reference to the underlying engine.

This method must be implemented by derived classes to provide access to the base engine. The returned reference should remain valid for the lifetime of the EngineView.

Example:

const DynamicEngine& engine = myView.getBaseEngine();

Implemented in gridfire::AdaptiveEngineView, gridfire::DefinedEngineView, gridfire::MultiscalePartitioningEngineView, PyDynamicEngineView, and PyEngineView.

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

- src/include/gridfire/engine/views/engine_view_abstract.h