|
GridFire v0.7.6rc4.0
General Purpose Nuclear Network
|
Scratchpad for storing working memory used by defined reaction network engines. More...
#include <engine_defined_scratchpad.h>
Public Member Functions | |
| bool | is_initialized () const override |
| Check whether the scratchpad has been initialized. | |
| std::unique_ptr< AbstractScratchPad > | clone () const override |
| Create a deep copy of this scratchpad. | |
Public Member Functions inherited from gridfire::engine::scratch::AbstractScratchPad | |
| virtual | ~AbstractScratchPad ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Public Attributes | |
| bool | has_initialized = true |
| Flag indicating whether the scratchpad is initialized (default: true). | |
| std::set< fourdst::atomic::Species > | active_species |
| Set of species active in the defined network. | |
| reaction::ReactionSet | active_reactions |
| Set of reactions active in the defined network. | |
| std::vector< size_t > | species_index_map |
| Mapping from local indices to global species indices. | |
| std::vector< size_t > | reaction_index_map |
| Mapping from local indices to global reaction indices. | |
| std::optional< std::vector< fourdst::atomic::Species > > | active_species_vector_cache = std::nullopt |
| Cached vector of active species for performance optimization. | |
Static Public Attributes | |
| static constexpr auto | ID = ScratchPadType::DEFINED_ENGINE_VIEW_SCRATCHPAD |
| Unique identifier for this scratchpad type. | |
Scratchpad for storing working memory used by defined reaction network engines.
DefinedEngineViewScratchPad provides storage for species and reaction data in engines with statically defined reaction networks. It includes index mappings for efficient lookups and an optional cache for the active species vector.
Unlike adaptive scratchpads, the defined scratchpad is considered initialized by default (has_initialized = true), as the network structure is known at construction time.
|
inlineoverridevirtual |
Create a deep copy of this scratchpad.
Creates an independent copy of all internal state, including active species, reactions, index mappings, and the species vector cache. The clone can be modified without affecting the original.
Implements gridfire::engine::scratch::AbstractScratchPad.
|
inlineoverridevirtual |
Check whether the scratchpad has been initialized.
Implements gridfire::engine::scratch::AbstractScratchPad.
| reaction::ReactionSet gridfire::engine::scratch::DefinedEngineViewScratchPad::active_reactions |
Set of reactions active in the defined network.
| std::set<fourdst::atomic::Species> gridfire::engine::scratch::DefinedEngineViewScratchPad::active_species |
Set of species active in the defined network.
| std::optional<std::vector<fourdst::atomic::Species> > gridfire::engine::scratch::DefinedEngineViewScratchPad::active_species_vector_cache = std::nullopt |
Cached vector of active species for performance optimization.
This optional cache avoids repeated conversion from set to vector.
| bool gridfire::engine::scratch::DefinedEngineViewScratchPad::has_initialized = true |
Flag indicating whether the scratchpad is initialized (default: true).
|
staticconstexpr |
Unique identifier for this scratchpad type.
| std::vector<size_t> gridfire::engine::scratch::DefinedEngineViewScratchPad::reaction_index_map |
Mapping from local indices to global reaction indices.
| std::vector<size_t> gridfire::engine::scratch::DefinedEngineViewScratchPad::species_index_map |
Mapping from local indices to global species indices.