|
GridFire v0.7.6rc4.0
General Purpose Nuclear Network
|
Scratchpad for multiscale partitioning engine computations with QSE groups. More...
#include <engine_multiscale_scratchpad.h>
Public Types | |
| using | QSEGroup = MultiscalePartitioningEngineView::QSEGroup |
| Type alias for QSE group from the multiscale engine view. | |
| using | QSESolver = MultiscalePartitioningEngineView::QSESolver |
| Type alias for QSE solver from the multiscale engine view. | |
| using | Species = fourdst::atomic::Species |
| Type alias for atomic species. | |
Public Member Functions | |
| bool | is_initialized () const override |
| Check whether the scratchpad has been initialized. | |
| void | initialize () |
| Initialize the scratchpad by creating a SUNDIALS context. | |
| ~MultiscalePartitioningEngineViewScratchPad () override | |
| Destructor that properly releases SUNDIALS resources. | |
| std::unique_ptr< AbstractScratchPad > | clone () const override |
| Create a partial 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 = false |
| Flag indicating whether the scratchpad has been initialized. | |
| double | flux_coupling_threshold = 5.0 |
| @breif User configurable parameter to control flux coupling threshold used | |
| std::vector< QSEGroup > | qse_groups |
| Vector of QSE groups representing equilibrium clusters. | |
| std::vector< std::unique_ptr< QSESolver > > | qse_solvers |
| Vector of QSE solvers, one per QSE group. | |
| std::vector< Species > | dynamic_species |
| Species that evolve on the dynamic (slow) timescale. | |
| std::vector< Species > | algebraic_species |
| Species that are solved algebraically (fast timescale/QSE). | |
| std::unordered_map< uint64_t, fourdst::composition::Composition > | composition_cache |
| Cache of computed compositions indexed by a hash key. | |
| SUNContext | sun_ctx = nullptr |
| SUNDIALS context for solver operations. | |
Static Public Attributes | |
| static constexpr auto | ID = ScratchPadType::MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD |
| Unique identifier for this scratchpad type. | |
Scratchpad for multiscale partitioning engine computations with QSE groups.
MultiscalePartitioningEngineViewScratchPad provides thread-local storage for the multiscale partitioning algorithm, which separates species into fast (algebraic/QSE) and slow (dynamic) timescale groups. This enables efficient integration of stiff reaction networks by solving QSE subsystems separately.
| using gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::QSEGroup = MultiscalePartitioningEngineView::QSEGroup |
Type alias for QSE group from the multiscale engine view.
| using gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::QSESolver = MultiscalePartitioningEngineView::QSESolver |
Type alias for QSE solver from the multiscale engine view.
| using gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::Species = fourdst::atomic::Species |
Type alias for atomic species.
|
inlineoverride |
Destructor that properly releases SUNDIALS resources.
Clears all QSE solvers before freeing the SUNContext to ensure proper cleanup order and avoid dangling references.
|
inlinenodiscardoverridevirtual |
Create a partial copy of this scratchpad.
Creates a copy with the QSE groups, species classifications, and composition cache.
Implements gridfire::engine::scratch::AbstractScratchPad.
|
inline |
Initialize the scratchpad by creating a SUNDIALS context.
Creates a new SUNContext for use with SUNDIALS solvers. This method is idempotent; calling it multiple times has no effect after the first successful initialization.
| std::runtime_error | if SUNContext creation fails. |
|
inlinenodiscardoverridevirtual |
Check whether the scratchpad has been initialized.
Implements gridfire::engine::scratch::AbstractScratchPad.
| std::vector<Species> gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::algebraic_species |
Species that are solved algebraically (fast timescale/QSE).
| std::unordered_map<uint64_t, fourdst::composition::Composition> gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::composition_cache |
Cache of computed compositions indexed by a hash key.
| std::vector<Species> gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::dynamic_species |
Species that evolve on the dynamic (slow) timescale.
| double gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::flux_coupling_threshold = 5.0 |
@breif User configurable parameter to control flux coupling threshold used
| bool gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::has_initialized = false |
Flag indicating whether the scratchpad has been initialized.
|
staticconstexpr |
Unique identifier for this scratchpad type.
| std::vector<QSEGroup> gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::qse_groups |
Vector of QSE groups representing equilibrium clusters.
| std::vector<std::unique_ptr<QSESolver> > gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::qse_solvers |
Vector of QSE solvers, one per QSE group.
| SUNContext gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::sun_ctx = nullptr |
SUNDIALS context for solver operations.