Loading...
Searching...
No Matches
gridfire::engine::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::engine::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::engine::DynamicEngine
Abstract class for engines supporting Jacobian and stoichiometry operations.
Definition engine_abstract.h:175

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

## Constructor & Destructor Documentation

## ~EngineView()

template<EngineType EngineT>

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

virtualdefault

Virtual destructor.

## Member Function Documentation

## getBaseEngine()

template<EngineType EngineT>

virtual const EngineT & gridfire::engine::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::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, PyEngineView, and PyDynamicEngineView.

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

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