diff --git a/docs/html/CVODE__solver__strategy_8cpp.html b/docs/html/CVODE__solver__strategy_8cpp.html new file mode 100644 index 00000000..fbed9d72 --- /dev/null +++ b/docs/html/CVODE__solver__strategy_8cpp.html @@ -0,0 +1,143 @@ + + +
+ + + + +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include "gridfire/solver/strategies/CVODE_solver_strategy.h"#include "gridfire/types/types.h"#include "gridfire/utils/table_format.h"#include "gridfire/engine/diagnostics/dynamic_engine_diagnostics.h"#include "quill/LogMacros.h"#include "fourdst/composition/composition.h"#include <cstdint>#include <limits>#include <string>#include <unordered_map>#include <stdexcept>#include <algorithm>#include "fourdst/atomic/species.h"#include "fourdst/composition/exceptions/exceptions_composition.h"#include "gridfire/engine/engine_graph.h"#include "gridfire/engine/types/engine_types.h"#include "gridfire/solver/strategies/triggers/engine_partitioning_trigger.h"#include "gridfire/trigger/procedures/trigger_pprint.h"#include "gridfire/exceptions/error_solver.h"#include "gridfire/utils/sundials.h"+Namespaces | |
| namespace | gridfire |
| namespace | gridfire::solver |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include "gridfire/solver/strategies/strategy_abstract.h"#include "gridfire/engine/engine_abstract.h"#include "gridfire/types/types.h"#include "gridfire/exceptions/exceptions.h"#include "fourdst/atomic/atomicSpecies.h"#include "fourdst/config/config.h"#include <functional>#include <any>#include <string>#include <vector>#include <tuple>#include <cvode/cvode.h>#include <sundials/sundials_types.h>#include <sundials/sundials_context.h>#include <sunmatrix/sunmatrix_dense.h>#include <sunlinsol/sunlinsol_dense.h>#include <nvector/nvector_serial.h>+Classes | |
| class | gridfire::solver::CVODESolverStrategy |
| Stiff ODE integrator backed by SUNDIALS CVODE (BDF) for network + energy. More... | |
| struct | gridfire::solver::CVODESolverStrategy::TimestepContext |
| Immutable view of the current integration state passed to callbacks. More... | |
| struct | gridfire::solver::CVODESolverStrategy::CVODEUserData |
| A helper struct to pass C++ context to C-style CVODE callbacks. More... | |
| struct | gridfire::solver::CVODESolverStrategy::CVODERHSOutputData |
+Namespaces | |
| namespace | gridfire |
| namespace | gridfire::solver |
Namespaces | |
| namespace | gridfire |
| namespace | gridfire |
Variables | |
| list | gridfire.__all__ = ['type', 'utils', 'engine', 'solver', 'exceptions', 'partition', 'reaction', 'screening', 'io', 'policy'] |
| str | gridfire.__version__ = "v0.7.0_rc1" |
| str | gridfire.__version__ = "v0.7.1_rc2" |
| ▼Ngridfire | |
| ►Nengine | |
| ►Nexceptions | Namespace for GridFire exception classes. All custom exceptions defined in GridFire inherit from std::exception and are organized within this namespace for clarity and modularity |
| ►Nio | |
| ►Npartition | |
| ►Npolicy | |
| ►Nrates | |
| ►Nreaclib | |
| ►Nreaction | |
| ►Nscreening | |
| ►Nsolver | |
| ►Ntrigger | |
| ►Nutils | |
| CNetIn | |
| CNetOut | |
| ▼Mgridfire_mod | |
|
- GridFire v0.7.0_rc2
+ GridFire v0.7.1_rc2
General Purpose Nuclear Network
|
@@ -38,24 +36,19 @@
Functions | |
| PYBIND11_MODULE (_gridfire, m) | |
| PYBIND11_MODULE (_gridfire, m) | |
Namespaces | |
| namespace | gridfire |
| namespace | gridfire |
| namespace | gridfire::engine |
| namespace | gridfire::engine |
Typedefs | |
| using | gridfire::engine::BuildDepthType = std::variant<NetworkBuildDepth, int> |
| Variant specifying either a predefined NetworkBuildDepth or a custom integer depth. | |
| using | gridfire::engine::BuildDepthType = std::variant< NetworkBuildDepth, int > |
| Variant specifying either a predefined NetworkBuildDepth or a custom integer depth. | |
Enumerations | |||||||||||||||||||||||||
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyDynamicNetworkSolverStrategy, including all inherited members.
+| describe_callback_context() const override | PyDynamicNetworkSolverStrategy | privatevirtual |
| evaluate(const gridfire::NetIn &netIn) override | PyDynamicNetworkSolverStrategy | privatevirtual |
| m_engine | gridfire::solver::NetworkSolverStrategy< EngineT > | protected |
| NetworkSolverStrategy(EngineT &engine) | gridfire::solver::NetworkSolverStrategy< EngineT > | inlineexplicit |
| PyDynamicNetworkSolverStrategy(gridfire::engine::DynamicEngine &engine) | PyDynamicNetworkSolverStrategy | inlineexplicitprivate |
| set_callback(const std::any &callback) override | PyDynamicNetworkSolverStrategy | privatevirtual |
| ~NetworkSolverStrategy()=default | gridfire::solver::NetworkSolverStrategy< EngineT > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_solver.h>
+Private Member Functions | |
| PyDynamicNetworkSolverStrategy (gridfire::engine::DynamicEngine &engine) | |
| gridfire::NetOut | evaluate (const gridfire::NetIn &netIn) override |
| Evaluates the network for a given timestep. | |
| void | set_callback (const std::any &callback) override |
| set the callback function to be called at the end of each timestep. | |
| std::vector< std::tuple< std::string, std::string > > | describe_callback_context () const override |
| Describe the context that will be passed to the callback function. | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::solver::NetworkSolverStrategy< EngineT > | |
| NetworkSolverStrategy (EngineT &engine) | |
| Constructor for the NetworkSolverStrategy. | |
| virtual | ~NetworkSolverStrategy ()=default |
| Virtual destructor. | |
Protected Attributes inherited from gridfire::solver::NetworkSolverStrategy< EngineT > | |
| EngineT & | m_engine |
| The engine used by this solver strategy. | |
+
|
+ +inlineexplicitprivate | +
+
|
+ +overrideprivatevirtual | +
Describe the context that will be passed to the callback function.
+This method should be overridden by derived classes to provide a description of the context that will be passed to the callback function. The intent of this method is that an end user can investigate the context that will be passed to the callback function, and use this information to craft their own callback function.
+ +Implements gridfire::solver::NetworkSolverStrategy< EngineT >.
+ +
+
|
+ +overrideprivatevirtual | +
Evaluates the network for a given timestep.
+| netIn | The input conditions for the network. |
Implements gridfire::solver::NetworkSolverStrategy< EngineT >.
+ +
+
|
+ +overrideprivatevirtual | +
set the callback function to be called at the end of each timestep.
+This function allows the user to set a callback function that will be called at the end of each timestep. The callback function will receive a gridfire::solver::<SOMESOLVER>::TimestepContext object. Note that depending on the solver, this context may contain different information. Further, the exact signature of the callback function is left up to each solver. Every solver should provide a type or type alias TimestepCallback that defines the signature of the callback function so that the user can easily get that type information.
+| callback | The callback function to be called at the end of each timestep. |
Implements gridfire::solver::NetworkSolverStrategy< EngineT >.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyEngine, including all inherited members.
+| calculateRHSAndEnergy(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | PyEngine | virtual |
| getNetworkSpecies() const override | PyEngine | virtual |
| m_species_cache | PyEngine | mutableprivate |
| ~Engine()=default | gridfire::engine::Engine | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_engine.h>
+Public Member Functions | |
| const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const override |
| Get the list of species in the network. | |
| std::expected< gridfire::engine::StepDerivatives< double >, gridfire::engine::EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculate the right-hand side (dY/dt) and energy generation. | |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
+Private Attributes | |
| std::vector< fourdst::atomic::Species > | m_species_cache |
+
|
+ +overridevirtual | +
Calculate the right-hand side (dY/dt) and energy generation.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
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.
+ +Implements gridfire::engine::Engine.
+ +
+
|
+ +overridevirtual | +
Get the list of species in the network.
+Implements gridfire::engine::Engine.
+ +
+
|
+ +mutableprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyEngineView, including all inherited members.
+| getBaseEngine() const override | PyEngineView | privatevirtual |
| ~EngineView()=default | gridfire::engine::EngineView< gridfire::engine::Engine > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_engine.h>
+Private Member Functions | |
| const gridfire::engine::Engine & | getBaseEngine () const override |
| Access the underlying engine instance. | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::engine::EngineView< gridfire::engine::Engine > | |
| virtual | ~EngineView ()=default |
| Virtual destructor. | |
+
|
+ +overrideprivatevirtual | +
Access the underlying engine instance.
+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:
Implements gridfire::engine::EngineView< gridfire::engine::Engine >.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyNetworkFileParser, including all inherited members.
+| parse(const std::string &filename) const override | PyNetworkFileParser | privatevirtual |
| ~NetworkFileParser()=default | gridfire::io::NetworkFileParser | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_io.h>
+Private Member Functions | |
| gridfire::io::ParsedNetworkData | parse (const std::string &filename) const override |
| Parses a network file and returns the parsed data. | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::io::NetworkFileParser | |
| virtual | ~NetworkFileParser ()=default |
| Virtual destructor for the base class. | |
+
|
+ +overrideprivatevirtual | +
Parses a network file and returns the parsed data.
+This is a pure virtual function that must be implemented by derived classes. It takes a filename as input and returns a ParsedNetworkData struct containing the information extracted from the file.
| filename | The path to the network file to parse. |
ParsedNetworkData struct containing the parsed reaction data.| std::runtime_error | If the file cannot be opened or a parsing error occurs. |
Usage
Implements gridfire::io::NetworkFileParser.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyNetworkPolicy, including all inherited members.
+| construct() override | PyNetworkPolicy | virtual |
| get_engine_stack() const override | PyNetworkPolicy | virtual |
| get_engine_types_stack() const override | PyNetworkPolicy | virtual |
| get_partition_function() const override | PyNetworkPolicy | virtual |
| get_seed_reactions() const override | PyNetworkPolicy | virtual |
| get_seed_species() const override | PyNetworkPolicy | virtual |
| get_status() const override | PyNetworkPolicy | virtual |
| name() const override | PyNetworkPolicy | virtual |
| ~NetworkPolicy()=default | gridfire::policy::NetworkPolicy | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_policy.h>
+Public Member Functions | |
| std::string | name () const override |
| Human-readable name for the policy. | |
| const std::set< fourdst::atomic::Species > & | get_seed_species () const override |
| Returns the seed species the policy requires to initialize the network. | |
| const gridfire::reaction::ReactionSet & | get_seed_reactions () const override |
| Returns the set of seed reactions the policy requires. | |
| gridfire::engine::DynamicEngine & | construct () override |
| Construct and return a DynamicEngine instance (or engine view stack) satisfying the policy. | |
| gridfire::policy::NetworkPolicyStatus | get_status () const override |
| Returns the current verification/construction status of the policy. | |
| const std::vector< std::unique_ptr< gridfire::engine::DynamicEngine > > & | get_engine_stack () const override |
| std::vector< gridfire::engine::EngineTypes > | get_engine_types_stack () const override |
| const std::unique_ptr< gridfire::partition::PartitionFunction > & | get_partition_function () const override |
Public Member Functions inherited from gridfire::policy::NetworkPolicy | |
| virtual | ~NetworkPolicy ()=default |
+
|
+ +overridevirtual | +
Construct and return a DynamicEngine instance (or engine view stack) satisfying the policy.
+Implementations typically build one or more engine layers (GraphEngine, MultiscalePartitioningEngineView, AdaptiveEngineView, etc.) and return a reference to the top-most DynamicEngine. The storage lifetime of the returned reference is implementation-defined (usually owned by the policy instance).
+| gridfire::exceptions::MissingKeyReactionError | if required reactions are not present in the constructed network (see gridfire/exceptions/error_policy.h). |
| gridfire::exceptions::MissingSeedSpeciesError | if required seed species are missing from the initializing composition. |
| gridfire::exceptions::PolicyError | for other construction/verification failures. |
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Returns the set of seed reactions the policy requires.
+The ReactionSet describes reactions that must be present in the constructed network for the policy to be considered satisfied. Concrete policies often implement their reaction requirements by composing one or more ReactionChainPolicy instances (see chains.h).
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Returns the seed species the policy requires to initialize the network.
+The returned set contains atomic species identifiers (fourdst::atomic::Species) which the policy expects to be present in the initial composition used to build the network.
+Implementations should return a copy or an immutable reference to their internal set of required seed species.
+Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Returns the current verification/construction status of the policy.
+The status reports whether the policy has been initialized and whether the constructed network satisfies the policy's key requirements.
+Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Human-readable name for the policy.
+Implements gridfire::policy::NetworkPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyPartitionFunction, including all inherited members.
+| clone() const override | PyPartitionFunction | privatevirtual |
| evaluate(int z, int a, double T9) const override | PyPartitionFunction | privatevirtual |
| evaluateDerivative(int z, int a, double T9) const override | PyPartitionFunction | privatevirtual |
| supports(int z, int a) const override | PyPartitionFunction | privatevirtual |
| type() const override | PyPartitionFunction | privatevirtual |
| ~PartitionFunction()=default | gridfire::partition::PartitionFunction | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_partition.h>
+Private Member Functions | |
| double | evaluate (int z, int a, double T9) const override |
| Evaluate the partition function for a given isotope. | |
| double | evaluateDerivative (int z, int a, double T9) const override |
| Evaluate the temperature derivative of the partition function. | |
| bool | supports (int z, int a) const override |
| Check if this partition function supports an isotope. | |
| std::string | type () const override |
| Get the human-readable type of this partition function. | |
| std::unique_ptr< PartitionFunction > | clone () const override |
| Create a deep copy of this PartitionFunction. | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::partition::PartitionFunction | |
| virtual | ~PartitionFunction ()=default |
| Virtual destructor. | |
+
|
+ +overrideprivatevirtual | +
Create a deep copy of this PartitionFunction.
+Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overrideprivatevirtual | +
Evaluate the partition function for a given isotope.
+| z | Proton number (atomic number) of the isotope; must be >= 1. |
| a | Mass number of the isotope; must be >= z. |
| T9 | Temperature in units of 10^9 K; must be > 0. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overrideprivatevirtual | +
Evaluate the temperature derivative of the partition function.
+Computes d/dT (partition function) at the given parameters.
+| z | Proton number (atomic number) of the isotope; must be >= 1. |
| a | Mass number of the isotope; must be >= z. |
| T9 | Temperature in units of 10^9 K; must be > 0. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overrideprivatevirtual | +
Check if this partition function supports an isotope.
+| z | Proton number of the isotope. |
| a | Mass number of the isotope. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overrideprivatevirtual | +
Get the human-readable type of this partition function.
+Implements gridfire::partition::PartitionFunction.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyReactionChainPolicy, including all inherited members.
+| clone() const override | PyReactionChainPolicy | virtual |
| contains(const std::string &id) const override | PyReactionChainPolicy | virtual |
| contains(const gridfire::reaction::Reaction &reaction) const override | PyReactionChainPolicy | virtual |
| get_reactions() const override | PyReactionChainPolicy | virtual |
| hash(uint64_t seed) const override | PyReactionChainPolicy | virtual |
| name() const override | PyReactionChainPolicy | virtual |
| operator!=(const ReactionChainPolicy &other) const override | PyReactionChainPolicy | |
| gridfire::policy::ReactionChainPolicy::operator!=(const ReactionChainPolicy &other) const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| operator==(const ReactionChainPolicy &other) const override | PyReactionChainPolicy | |
| gridfire::policy::ReactionChainPolicy::operator==(const ReactionChainPolicy &other) const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| ~ReactionChainPolicy()=default | gridfire::policy::ReactionChainPolicy | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_policy.h>
+Public Member Functions | |
| const gridfire::reaction::ReactionSet & | get_reactions () const override |
| Returns the ReactionSet describing this chain. | |
| bool | contains (const std::string &id) const override |
| bool | contains (const gridfire::reaction::Reaction &reaction) const override |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
| uint64_t | hash (uint64_t seed) const override |
| bool | operator== (const ReactionChainPolicy &other) const override |
| bool | operator!= (const ReactionChainPolicy &other) const override |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
| virtual bool | operator== (const ReactionChainPolicy &other) const =0 |
| virtual bool | operator!= (const ReactionChainPolicy &other) const =0 |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Returns the ReactionSet describing this chain.
+| gridfire::exceptions::MissingBaseReactionError | may be thrown by concrete implementations at construction time if the required reactions cannot be found in the base reaction set. |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +override | +
+
|
+ +override | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PyScreening, including all inherited members.
+| ADDouble typedef | gridfire::screening::ScreeningModel | |
| calculateScreeningFactors(const gridfire::reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override | PyScreening | privatevirtual |
| calculateScreeningFactors(const gridfire::reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< ADDouble > &Y, ADDouble T9, ADDouble rho) const override | PyScreening | privatevirtual |
| ~ScreeningModel()=default | gridfire::screening::ScreeningModel | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_screening.h>
+Private Member Functions | |
| std::vector< double > | calculateScreeningFactors (const gridfire::reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override |
| Calculates screening factors for a set of reactions. | |
| std::vector< ADDouble > | calculateScreeningFactors (const gridfire::reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< ADDouble > &Y, ADDouble T9, ADDouble rho) const override |
| Calculates screening factors using CppAD types for automatic differentiation. | |
+Additional Inherited Members | |
Public Types inherited from gridfire::screening::ScreeningModel | |
| using | ADDouble = CppAD::AD< double > |
| Alias for CppAD Automatic Differentiation type for double precision. | |
Public Member Functions inherited from gridfire::screening::ScreeningModel | |
| virtual | ~ScreeningModel ()=default |
| Virtual destructor. | |
+
|
+ +overrideprivatevirtual | +
Calculates screening factors using CppAD types for automatic differentiation.
+This is a pure virtual function that provides an overload of calculateScreeningFactors for use with CppAD. It allows the derivatives of the screening factors with respect to abundances, temperature, and density to be computed automatically.
| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The current composition, providing molar abundances (mol/g) for each species. |
| T9 | The temperature in units of 10^9 K, as an AD type. |
| rho | The plasma density in g/cm^3, as an AD type. |
Note This method is essential for including the effects of screening in the Jacobian matrix of the reaction network.
+ +Implements gridfire::screening::ScreeningModel.
+ +
+
|
+ +overrideprivatevirtual | +
Calculates screening factors for a set of reactions.
+This is a pure virtual function that must be implemented by derived classes. It computes the screening enhancement factor for each reaction in the provided set based on the given plasma conditions.
+| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The current composition, providing molar abundances (mol/g) for each species. |
| T9 | The temperature in units of 10^9 K. |
| rho | The plasma density in g/cm^3. |
reactions set, in the same order.Pre-conditions
Y vector must match the size of the species vector.T9 and rho must be positive.Post-conditions
reactions set.Usage
Implements gridfire::screening::ScreeningModel.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for PySolverContextBase, including all inherited members.
+| describe() const override | PySolverContextBase | virtual |
| ~SolverContextBase()=default | gridfire::solver::SolverContextBase | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <py_solver.h>
+Public Member Functions | |
| std::vector< std::tuple< std::string, std::string > > | describe () const override |
| Describe the context for callback functions. | |
Public Member Functions inherited from gridfire::solver::SolverContextBase | |
| virtual | ~SolverContextBase ()=default |
+
|
+ +overridevirtual | +
Describe the context for callback functions.
+This method should be overridden by derived classes to provide a description of the context that will be passed to the callback function. The intent of this method is that an end user can investigate the context that will be passed to the callback function, and use this information to craft their own callback function.
+ +Implements gridfire::solver::SolverContextBase.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for SolverPluginInterface, including all inherited members.
+| log_time(double t, double dt)=0 | SolverPluginInterface | pure virtual |
| ~SolverPluginInterface() override=default | SolverPluginInterface |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <solver_interfaces.h>
+Public Member Functions | |
| ~SolverPluginInterface () override=default | |
| virtual void | log_time (double t, double dt)=0 |
+
|
+ +overridedefault | +
+
|
+ +pure virtual | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::AdaptiveEngineView, including all inherited members.
+| AdaptiveEngineView(DynamicEngine &baseEngine) | gridfire::engine::AdaptiveEngineView | explicit |
| calculateAllReactionFlows(const NetIn &netIn) const | gridfire::engine::AdaptiveEngineView | private |
| calculateEpsDerivatives(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::AdaptiveEngineView | virtual |
| calculateMolarReactionFlow(const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::AdaptiveEngineView | virtual |
| calculateRHSAndEnergy(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::AdaptiveEngineView | virtual |
| collectComposition(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::AdaptiveEngineView | virtual |
| Config typedef | gridfire::engine::AdaptiveEngineView | private |
| cullReactionsByFlow(const std::vector< ReactionFlow > &allFlows, const std::unordered_set< fourdst::atomic::Species > &reachableSpecies, const fourdst::composition::Composition &comp, double maxFlow) const | gridfire::engine::AdaptiveEngineView | private |
| finalizeActiveSet(const std::vector< const reaction::Reaction * > &finalReactions) | gridfire::engine::AdaptiveEngineView | private |
| findReachableSpecies(const NetIn &netIn) const | gridfire::engine::AdaptiveEngineView | private |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::AdaptiveEngineView | virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override | gridfire::engine::AdaptiveEngineView | virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override | gridfire::engine::AdaptiveEngineView | virtual |
| generateStoichiometryMatrix() override | gridfire::engine::AdaptiveEngineView | virtual |
| getBaseEngine() const override | gridfire::engine::AdaptiveEngineView | inlinevirtual |
| getDepth() const | gridfire::engine::DynamicEngine | inlinevirtual |
| getNetworkReactions() const override | gridfire::engine::AdaptiveEngineView | virtual |
| getNetworkSpecies() const override | gridfire::engine::AdaptiveEngineView | virtual |
| getScreeningModel() const override | gridfire::engine::AdaptiveEngineView | virtual |
| getSpeciesDestructionTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::AdaptiveEngineView | virtual |
| getSpeciesIndex(const fourdst::atomic::Species &species) const override | gridfire::engine::AdaptiveEngineView | virtual |
| getSpeciesStatus(const fourdst::atomic::Species &species) const override | gridfire::engine::AdaptiveEngineView | virtual |
| getSpeciesTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::AdaptiveEngineView | virtual |
| getStoichiometryMatrixEntry(const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override | gridfire::engine::AdaptiveEngineView | virtual |
| isStale(const NetIn &netIn) override | gridfire::engine::AdaptiveEngineView | virtual |
| LogManager typedef | gridfire::engine::AdaptiveEngineView | private |
| m_activeReactions | gridfire::engine::AdaptiveEngineView | private |
| m_activeSpecies | gridfire::engine::AdaptiveEngineView | private |
| m_baseEngine | gridfire::engine::AdaptiveEngineView | private |
| m_config | gridfire::engine::AdaptiveEngineView | private |
| m_isStale | gridfire::engine::AdaptiveEngineView | private |
| m_logger | gridfire::engine::AdaptiveEngineView | private |
| mapNetInToMolarAbundanceVector(const NetIn &netIn) const override | gridfire::engine::AdaptiveEngineView | virtual |
| primeEngine(const NetIn &netIn) override | gridfire::engine::AdaptiveEngineView | virtual |
| rebuild(const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) | gridfire::engine::DynamicEngine | inlinevirtual |
| rescueEdgeSpeciesDestructionChannel(const fourdst::composition::Composition &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies, const reaction::ReactionSet &activeReactions) const | gridfire::engine::AdaptiveEngineView | private |
| RescueSet typedef | gridfire::engine::AdaptiveEngineView | private |
| setNetworkReactions(const reaction::ReactionSet &reactions) override | gridfire::engine::AdaptiveEngineView | virtual |
| setScreeningModel(screening::ScreeningType model) override | gridfire::engine::AdaptiveEngineView | virtual |
| update(const NetIn &netIn) override | gridfire::engine::AdaptiveEngineView | virtual |
| validateState() const | gridfire::engine::AdaptiveEngineView | private |
| ~Engine()=default | gridfire::engine::Engine | virtual |
| ~EngineView()=default | gridfire::engine::EngineView< DynamicEngine > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
An engine view that dynamically adapts the reaction network based on runtime conditions. + More...
+ +#include <engine_adaptive.h>
+Classes | |
| struct | ReactionFlow |
| A struct to hold a reaction and its flow rate. More... | |
+Public Member Functions | |
| AdaptiveEngineView (DynamicEngine &baseEngine) | |
| Constructs an AdaptiveEngineView. | |
| fourdst::composition::Composition | update (const NetIn &netIn) override |
| Updates the active species and reactions based on the current conditions. | |
| bool | isStale (const NetIn &netIn) override |
| Check if the engine's internal state is stale. | |
| const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const override |
| Gets the list of active species in the network. | |
| std::expected< StepDerivatives< double >, engine::EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the right-hand side (dY/dt) and energy generation for the active species. | |
| EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Generates the Jacobian matrix for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override |
| Generates the Jacobian matrix for some set of active species such that that set is a subset of the active species in the view. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override |
| Generates the Jacobian matrix for the active species with a given sparsity pattern. | |
| void | generateStoichiometryMatrix () override |
| Generates the stoichiometry matrix for the active reactions and species. | |
| int | getStoichiometryMatrixEntry (const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override |
| Gets an entry from the stoichiometry matrix for the active species and reactions. | |
| double | calculateMolarReactionFlow (const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the molar reaction flow for a given reaction in the active network. | |
| const reaction::ReactionSet & | getNetworkReactions () const override |
| Gets the set of active logical reactions in the network. | |
| void | setNetworkReactions (const reaction::ReactionSet &reactions) override |
| Sets the reaction set for the base engine. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes timescales for all active species in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes destruction timescales for all active species in the network. | |
| const DynamicEngine & | getBaseEngine () const override |
| Gets the base engine. | |
| void | setScreeningModel (screening::ScreeningType model) override |
| Sets the screening model for the base engine. | |
| screening::ScreeningType | getScreeningModel () const override |
| Gets the screening model from the base engine. | |
| size_t | getSpeciesIndex (const fourdst::atomic::Species &species) const override |
| Gets the index of a species in the active species list. | |
| std::vector< double > | mapNetInToMolarAbundanceVector (const NetIn &netIn) const override |
| Maps the molar abundance vector from the active species to the full network species. | |
| PrimingReport | primeEngine (const NetIn &netIn) override |
| Primes the engine with the given network input. | |
| fourdst::composition::Composition | collectComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Collect the composition of the base engine, ensure all active species are registered, and pass the composition back to the caller. | |
| SpeciesStatus | getSpeciesStatus (const fourdst::atomic::Species &species) const override |
| Gets the status of a species in the network. | |
Public Member Functions inherited from gridfire::engine::DynamicEngine | |
| virtual BuildDepthType | getDepth () const |
| Get the depth of the network. | |
| virtual void | rebuild (const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) |
| Rebuild the network with a specified depth. | |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
Public Member Functions inherited from gridfire::engine::EngineView< DynamicEngine > | |
| virtual | ~EngineView ()=default |
| Virtual destructor. | |
+Private Types | |
| using | Config = fourdst::config::Config |
| using | LogManager = fourdst::logging::LogManager |
| typedef std::pair< std::unordered_set< const reaction::Reaction * >, std::unordered_set< fourdst::atomic::Species > > | RescueSet |
+Private Member Functions | |
| void | validateState () const |
| Validates that the AdaptiveEngineView is not stale. | |
| std::pair< std::vector< ReactionFlow >, fourdst::composition::Composition > | calculateAllReactionFlows (const NetIn &netIn) const |
| Calculates the molar reaction flow rate for all reactions in the full network. | |
| std::unordered_set< fourdst::atomic::Species > | findReachableSpecies (const NetIn &netIn) const |
| Finds all species that are reachable from the initial fuel through the reaction network. | |
| std::vector< const reaction::Reaction * > | cullReactionsByFlow (const std::vector< ReactionFlow > &allFlows, const std::unordered_set< fourdst::atomic::Species > &reachableSpecies, const fourdst::composition::Composition &comp, double maxFlow) const |
| Culls reactions from the network based on their flow rates. | |
| RescueSet | rescueEdgeSpeciesDestructionChannel (const fourdst::composition::Composition &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies, const reaction::ReactionSet &activeReactions) const |
| void | finalizeActiveSet (const std::vector< const reaction::Reaction * > &finalReactions) |
| Finalizes the set of active species and reactions. | |
+Private Attributes | |
| Config & | m_config = Config::getInstance() |
| A reference to the singleton Config instance, used for retrieving configuration parameters. | |
| quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
| A pointer to the logger instance, used for logging messages. | |
| DynamicEngine & | m_baseEngine |
| The underlying engine to which this view delegates calculations. | |
| std::vector< fourdst::atomic::Species > | m_activeSpecies |
| The set of species that are currently active in the network. | |
| reaction::ReactionSet | m_activeReactions |
| The set of reactions that are currently active in the network. | |
| bool | m_isStale = true |
| A flag indicating whether the view is stale and needs to be updated. | |
An engine view that dynamically adapts the reaction network based on runtime conditions.
+This class implements an EngineView that dynamically culls species and reactions from the full reaction network based on their reaction flow rates and connectivity. This allows for efficient simulation of reaction networks by focusing computational effort on the most important species and reactions.
+The AdaptiveEngineView maintains a subset of "active" species and reactions, and maps between the full network indices and the active subset indices. This allows the base engine to operate on the full network data, while the AdaptiveEngineView provides a reduced view for external clients.
+The adaptation process is driven by the update() method, which performs the following steps:
<DynamicEngine>
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +explicit | +
Constructs an AdaptiveEngineView.
+| baseEngine | The underlying DynamicEngine to which this view delegates calculations. |
Initializes the active species and reactions to the full network, and constructs the initial index maps.
+ +
+
|
+ +private | +
Calculates the molar reaction flow rate for all reactions in the full network.
+This method iterates through all reactions in the base engine's network and calculates their molar flow rates based on the provided network input conditions (temperature, density, and composition). It also constructs a vector of molar abundances for all species in the full network.
+| netIn | The current network input, containing temperature, density, and composition. |
netIn.composition. If the species is not found, its abundance is set to 0.0.calculateMolarReactionFlow to get the flow rate.ReactionFlow struct and adds it to the returned vector.
+
|
+ +overridevirtual | +
| comp | The current composition of the system. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Calculates the molar reaction flow for a given reaction in the active network.
+| reaction | The reaction for which to calculate the flow. |
| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method maps the culled abundances to the full network abundances and calls the base engine to calculate the molar reaction flow.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
| std::runtime_error | If the reaction is not part of the active reactions in the adaptive engine view. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Calculates the right-hand side (dY/dt) and energy generation for the active species.
+| comp | The current composition of the system. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
This method maps the culled abundances to the full network abundances, calls the base engine to calculate the RHS and energy generation, and then maps the full network derivatives back to the culled derivatives.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::Engine.
+ +
+
|
+ +overridevirtual | +
Collect the composition of the base engine, ensure all active species are registered, and pass the composition back to the caller.
+| comp | The current composition of the system. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Culls reactions from the network based on their flow rates.
+This method filters the list of all reactions, keeping only those with a flow rate above an absolute culling threshold. The threshold is calculated by multiplying the maximum flow rate by a relative culling threshold read from the configuration.
+| allFlows | A vector of all reactions and their flow rates. |
| reachableSpecies | A set of all species reachable from the initial fuel. |
| comp | The current composition of the system. |
| maxFlow | The maximum reaction flow rate in the network. |
RelativeCullingThreshold from the configuration.absoluteCullingThreshold by multiplying maxFlow with the relative threshold.allFlows.flowRate is greater than the absoluteCullingThreshold.
+
|
+ +private | +
Finalizes the set of active species and reactions.
+This method takes the final list of culled reactions and populates the m_activeReactions and m_activeSpecies members. The active species are determined by collecting all reactants and products from the final reactions. The active species list is then sorted by mass.
| finalReactions | A vector of pointers to the reactions to be included in the active set. |
m_activeReactions is cleared and populated with the reactions from finalReactions.m_activeSpecies is cleared and populated with all unique species present in finalReactions.m_activeSpecies is sorted by atomic mass.
+
|
+ +private | +
Finds all species that are reachable from the initial fuel through the reaction network.
+This method performs a connectivity analysis to identify all species that can be produced starting from the initial fuel species. A species is considered part of the initial fuel if its mass fraction is above a certain threshold (ABUNDANCE_FLOOR).
| netIn | The current network input, containing the initial composition. |
reachable and a queue to_visit with the initial fuel species.reachable set, all products of that reaction are added to the reachable set.reachable set.
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the active species.
+| comp | The current composition of the system. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
This method maps the culled abundances to the full network abundances and calls the base engine to generate the Jacobian matrix.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the active species with a given sparsity pattern.
+| comp | The current composition of the system. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
| sparsityPattern | The sparsity pattern to use for the Jacobian matrix. |
This method maps the culled abundances to the full network abundances and calls the base engine to generate the Jacobian matrix.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for some set of active species such that that set is a subset of the active species in the view.
+| comp | The current composition of the system. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
| activeSpecies | The list of active species for which to generate the Jacobian. |
This method maps the culled abundances to the full network abundances and calls the base engine to generate the Jacobian matrix.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the stoichiometry matrix for the active reactions and species.
+This method calls the base engine to generate the stoichiometry matrix.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +inlineoverridevirtual | +
Gets the base engine.
+Implements gridfire::engine::EngineView< DynamicEngine >.
+ +
+
|
+ +overridevirtual | +
Gets the set of active logical reactions in the network.
+Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the list of active species in the network.
+Implements gridfire::engine::Engine.
+ +
+
|
+ +overridevirtual | +
Gets the screening model from the base engine.
+This method delegates the call to the base engine to get the screening model.
+Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes destruction timescales for all active species in the network.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method maps the culled abundances to the full network abundances and calls the base engine to compute the species destruction timescales.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the index of a species in the active species list.
+| species | The species for which to get the index. |
| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
| std::out_of_range | If the species is not part of the active species in the adaptive engine view. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the status of a species in the network.
+| species | The species for which to get the status. |
This method delegates the call to the base engine to get the species status. If the base engine says that the species is active but it is not in the active species list of this view, the status is returned as INACTIVE_FLOW.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes timescales for all active species in the network.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method maps the culled abundances to the full network abundances and calls the base engine to compute the species timescales.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets an entry from the stoichiometry matrix for the active species and reactions.
+| species | The species for which to get the stoichiometric coefficient. |
| reaction | The reaction for which to get the stoichiometric coefficient. |
This method maps the culled indices to the full network indices and calls the base engine to get the stoichiometry matrix entry.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
| std::out_of_range | If the culled index is out of bounds for the species or reaction index map. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Check if the engine's internal state is stale.
+| netIn | A struct containing the current network input, such as temperature, density, and composition. |
This method allows derived classes to determine if their internal state is out-of-date with respect to the provided network conditions. If the engine is stale, it may require a call to update() before performing calculations.
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Maps the molar abundance vector from the active species to the full network species.
+| netIn | The current network input, containing temperature, density, and composition. |
This method constructs a molar abundance vector for the full network by mapping the abundances from the active species in netIn to their corresponding indices in the full network. Species not present in netIn are assigned an abundance of zero.
| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Primes the engine with the given network input.
+| netIn | The current network input, containing temperature, density, and composition. |
This method delegates the priming operation to the base engine.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Sets the reaction set for the base engine.
+This method delegates the call to the base engine to set the reaction set.
+| reactions | The ReactionSet to set in the base engine. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Sets the screening model for the base engine.
+This method delegates the call to the base engine to set the electron screening model.
+| model | The electron screening model to set. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Updates the active species and reactions based on the current conditions.
+| netIn | The current network input, containing temperature, density, and composition. |
This method performs the reaction flow calculation, reaction culling, connectivity analysis, and index map construction steps described above.
+The culling thresholds are read from the configuration using the following keys:
gridfire:AdaptiveEngineView:RelativeCullingThreshold (default: 1e-75)| std::runtime_error | If there is a mismatch between the active reactions and the base engine. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Validates that the AdaptiveEngineView is not stale.
+| std::runtime_error | If the AdaptiveEngineView is stale (i.e., update() has not been called). |
+
|
+ +private | +
The set of reactions that are currently active in the network.
+ +
+
|
+ +private | +
The set of species that are currently active in the network.
+ +
+
|
+ +private | +
The underlying engine to which this view delegates calculations.
+ +
+
|
+ +private | +
A reference to the singleton Config instance, used for retrieving configuration parameters.
+ +
+
|
+ +private | +
A flag indicating whether the view is stale and needs to be updated.
+ +
+
|
+ +private | +
A pointer to the logger instance, used for logging messages.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::DefinedEngineView, including all inherited members.
+| calculateEpsDerivatives(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::DefinedEngineView | virtual |
| calculateMolarReactionFlow(const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::DefinedEngineView | virtual |
| calculateRHSAndEnergy(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::DefinedEngineView | virtual |
| collect(const std::vector< std::string > &peNames) | gridfire::engine::DefinedEngineView | private |
| collectComposition(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::DefinedEngineView | virtual |
| constructReactionIndexMap() const | gridfire::engine::DefinedEngineView | private |
| constructSpeciesIndexMap() const | gridfire::engine::DefinedEngineView | private |
| DefinedEngineView(const std::vector< std::string > &peNames, GraphEngine &baseEngine) | gridfire::engine::DefinedEngineView | |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::DefinedEngineView | virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override | gridfire::engine::DefinedEngineView | virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override | gridfire::engine::DefinedEngineView | virtual |
| generateStoichiometryMatrix() override | gridfire::engine::DefinedEngineView | virtual |
| getBaseEngine() const override | gridfire::engine::DefinedEngineView | virtual |
| getDepth() const | gridfire::engine::DynamicEngine | inlinevirtual |
| getNetworkReactions() const override | gridfire::engine::DefinedEngineView | virtual |
| getNetworkSpecies() const override | gridfire::engine::DefinedEngineView | virtual |
| getScreeningModel() const override | gridfire::engine::DefinedEngineView | virtual |
| getSpeciesDestructionTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::DefinedEngineView | virtual |
| getSpeciesIndex(const fourdst::atomic::Species &species) const override | gridfire::engine::DefinedEngineView | virtual |
| getSpeciesStatus(const fourdst::atomic::Species &species) const override | gridfire::engine::DefinedEngineView | virtual |
| getSpeciesTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::DefinedEngineView | virtual |
| getStoichiometryMatrixEntry(const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override | gridfire::engine::DefinedEngineView | virtual |
| isStale(const NetIn &netIn) override | gridfire::engine::DefinedEngineView | virtual |
| m_activeReactions | gridfire::engine::DefinedEngineView | private |
| m_activeSpecies | gridfire::engine::DefinedEngineView | private |
| m_activeSpeciesVectorCache | gridfire::engine::DefinedEngineView | mutableprivate |
| m_baseEngine | gridfire::engine::DefinedEngineView | protected |
| m_isStale | gridfire::engine::DefinedEngineView | protected |
| m_logger | gridfire::engine::DefinedEngineView | private |
| m_reactionIndexMap | gridfire::engine::DefinedEngineView | private |
| m_speciesIndexMap | gridfire::engine::DefinedEngineView | private |
| mapFullToView(const std::vector< double > &full) const | gridfire::engine::DefinedEngineView | private |
| mapNetInToMolarAbundanceVector(const NetIn &netIn) const override | gridfire::engine::DefinedEngineView | virtual |
| mapViewToFull(const std::vector< double > &defined) const | gridfire::engine::DefinedEngineView | private |
| mapViewToFullReactionIndex(size_t definedReactionIndex) const | gridfire::engine::DefinedEngineView | private |
| mapViewToFullSpeciesIndex(size_t definedSpeciesIndex) const | gridfire::engine::DefinedEngineView | private |
| primeEngine(const NetIn &netIn) override | gridfire::engine::DefinedEngineView | virtual |
| rebuild(const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) | gridfire::engine::DynamicEngine | inlinevirtual |
| setNetworkReactions(const reaction::ReactionSet &reactions) override | gridfire::engine::DefinedEngineView | virtual |
| setScreeningModel(screening::ScreeningType model) override | gridfire::engine::DefinedEngineView | virtual |
| update(const NetIn &netIn) override | gridfire::engine::DefinedEngineView | virtual |
| validateNetworkState() const | gridfire::engine::DefinedEngineView | private |
| ~Engine()=default | gridfire::engine::Engine | virtual |
| ~EngineView()=default | gridfire::engine::EngineView< DynamicEngine > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <engine_defined.h>
+Public Member Functions | |
| DefinedEngineView (const std::vector< std::string > &peNames, GraphEngine &baseEngine) | |
| const DynamicEngine & | getBaseEngine () const override |
| Get the base engine associated with this defined engine view. | |
| const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const override |
| Gets the list of active species in the network defined by the file. | |
| std::expected< StepDerivatives< double >, engine::EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the right-hand side (dY/dt) and energy generation for the active species. | |
| EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculate the derivatives of the energy generation rate with respect to T and rho. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Generates the Jacobian matrix for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override |
| Generates the Jacobian matrix for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override |
| Generates the Jacobian matrix for a given sparsity pattern. | |
| void | generateStoichiometryMatrix () override |
| Generates the stoichiometry matrix for the active reactions and species. | |
| int | getStoichiometryMatrixEntry (const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override |
| Gets an entry from the stoichiometry matrix for the active species and reactions. | |
| double | calculateMolarReactionFlow (const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the molar reaction flow for a given reaction in the active network. | |
| const reaction::ReactionSet & | getNetworkReactions () const override |
| Gets the set of active logical reactions in the network. | |
| void | setNetworkReactions (const reaction::ReactionSet &reactions) override |
| Sets the active reactions in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes timescales for all active species in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes destruction timescales for all active species in the network. | |
| fourdst::composition::Composition | update (const NetIn &netIn) override |
| Updates the engine view if it is marked as stale. | |
| bool | isStale (const NetIn &netIn) override |
| Checks if the engine view is stale. | |
| void | setScreeningModel (screening::ScreeningType model) override |
| Sets the screening model for the base engine. | |
| screening::ScreeningType | getScreeningModel () const override |
| Gets the screening model from the base engine. | |
| size_t | getSpeciesIndex (const fourdst::atomic::Species &species) const override |
| Maps a species from the full network to its index in the defined active network. | |
| std::vector< double > | mapNetInToMolarAbundanceVector (const NetIn &netIn) const override |
| Map from a NetIn object to a vector of molar abundances for the active species. | |
| PrimingReport | primeEngine (const NetIn &netIn) override |
| Prime the engine view for calculations. This will delegate to the base engine. | |
| fourdst::composition::Composition | collectComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Collects a Composition object from the base engine. | |
| SpeciesStatus | getSpeciesStatus (const fourdst::atomic::Species &species) const override |
| Gets the status of a species in the active network. | |
Public Member Functions inherited from gridfire::engine::DynamicEngine | |
| virtual BuildDepthType | getDepth () const |
| Get the depth of the network. | |
| virtual void | rebuild (const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) |
| Rebuild the network with a specified depth. | |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
Public Member Functions inherited from gridfire::engine::EngineView< DynamicEngine > | |
| virtual | ~EngineView ()=default |
| Virtual destructor. | |
+Protected Attributes | |
| bool | m_isStale = true |
| GraphEngine & | m_baseEngine |
+Private Member Functions | |
| std::vector< size_t > | constructSpeciesIndexMap () const |
| Constructs the species index map. | |
| std::vector< size_t > | constructReactionIndexMap () const |
| Constructs the reaction index map. | |
| std::vector< double > | mapViewToFull (const std::vector< double > &defined) const |
| Maps a vector of culled abundances to a vector of full abundances. | |
| std::vector< double > | mapFullToView (const std::vector< double > &full) const |
| Maps a vector of full abundances to a vector of culled abundances. | |
| size_t | mapViewToFullSpeciesIndex (size_t definedSpeciesIndex) const |
| Maps a culled species index to a full species index. | |
| size_t | mapViewToFullReactionIndex (size_t definedReactionIndex) const |
| Maps a culled reaction index to a full reaction index. | |
| void | validateNetworkState () const |
| void | collect (const std::vector< std::string > &peNames) |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| Active species in the defined engine. | |
| std::set< fourdst::atomic::Species > | m_activeSpecies |
| Cache for the active species vector to avoid dangling references. | |
| std::optional< std::vector< fourdst::atomic::Species > > | m_activeSpeciesVectorCache = std::nullopt |
| Active reactions in the defined engine. | |
| reaction::ReactionSet | m_activeReactions |
| Maps indices of active species to indices in the full network. | |
| std::vector< size_t > | m_speciesIndexMap |
| Maps indices of active reactions to indices in the full network. | |
| std::vector< size_t > | m_reactionIndexMap |
| gridfire::engine::DefinedEngineView::DefinedEngineView | +( | +const std::vector< std::string > & | +peNames, | +
| + | + | GraphEngine & | +baseEngine | +
| + | ) | ++ |
+
|
+ +overridevirtual | +
Calculate the derivatives of the energy generation rate with respect to T and rho.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method computes the partial derivatives of the specific nuclear energy generation rate with respect to temperature and density for the current state.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Calculates the molar reaction flow for a given reaction in the active network.
+| reaction | The reaction for which to calculate the flow. |
| comp | A Composition object containing the current composition of the system |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| std::runtime_error | If the view is stale or if the reaction is not in the active set. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Calculates the right-hand side (dY/dt) and energy generation for the active species.
+| comp | A Composition object containing the current composition of the system |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
| std::runtime_error | If the view is stale (i.e., update() has not been called after setNetworkFile()). |
Implements gridfire::engine::Engine.
+ +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Collects a Composition object from the base engine.
+| comp | The full Composition object. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Constructs the reaction index map.
+This method creates a map from the indices of the active reactions to the indices of the corresponding reactions in the full network.
+| std::runtime_error | If an active reaction is not found in the base engine's reaction list. |
+
|
+ +private | +
Constructs the species index map.
+This method creates a map from the indices of the active species to the indices of the corresponding species in the full network.
+| std::runtime_error | If an active species is not found in the base engine's species list. |
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the active species.
+| comp | A Composition object containing the current composition of the system |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
| std::runtime_error | If the view is stale. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for a given sparsity pattern.
+| comp | A Composition object containing the current composition of the system |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
| sparsityPattern | The sparsity pattern to use for the Jacobian matrix. |
| std::runtime_error | If the view is stale. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the active species.
+| comp | A Composition object containing the current composition of the system |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
| activeSpecies | The vector of active species to include in the Jacobian. |
| std::runtime_error | If the view is stale. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the stoichiometry matrix for the active reactions and species.
+| std::runtime_error | If the view is stale. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Get the base engine associated with this defined engine view.
+Implements gridfire::engine::EngineView< DynamicEngine >.
+ +
+
|
+ +overridevirtual | +
Gets the set of active logical reactions in the network.
+| std::runtime_error | If the view is stale. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the list of active species in the network defined by the file.
+Implements gridfire::engine::Engine.
+ +
+
|
+ +overridevirtual | +
Gets the screening model from the base engine.
+Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes destruction timescales for all active species in the network.
+| comp | A Composition object containing the current composition of the system |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| std::runtime_error | If the view is stale. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Maps a species from the full network to its index in the defined active network.
+| species | The species to map. |
| std::runtime_error | If the species is not in the active set. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the status of a species in the active network.
+| species | The species for which to get the status. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes timescales for all active species in the network.
+| comp | A Composition object containing the current composition of the system |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| std::runtime_error | If the view is stale. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets an entry from the stoichiometry matrix for the active species and reactions.
+| species | The species for which to get the stoichiometric coefficient. |
| reaction | The reaction for which to get the stoichiometric coefficient. |
| std::runtime_error | If the view is stale. |
| std::out_of_range | If an index is out of bounds. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Checks if the engine view is stale.
+| netIn | The current network input (unused). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Maps a vector of full abundances to a vector of culled abundances.
+| full | A vector of abundances for the full network. |
+
|
+ +overridevirtual | +
Map from a NetIn object to a vector of molar abundances for the active species.
+| netIn | The NetIn object containing the full network abundances. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Maps a vector of culled abundances to a vector of full abundances.
+| defined | A vector of abundances for the active species. |
+
|
+ +private | +
Maps a culled reaction index to a full reaction index.
+| definedReactionIndex | The index of the reaction in the defined reaction list. |
| std::out_of_range | If the defined index is out of bounds for the reaction index map. |
+
|
+ +private | +
Maps a culled species index to a full species index.
+| definedSpeciesIndex | The index of the species in the defined species list. |
| std::out_of_range | If the defined index is out of bounds for the species index map. |
+
|
+ +overridevirtual | +
Prime the engine view for calculations. This will delegate to the base engine.
+| netIn | The current network input. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Sets the active reactions in the network.
+| reactions | The ReactionSet containing the reactions to set as active. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Sets the screening model for the base engine.
+| model | The screening model to set. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Updates the engine view if it is marked as stale.
+This method checks if the view is stale (e.g., after setNetworkFile was called). If it is, it rebuilds the active network from the currently set file. The netIn parameter is not used by this implementation but is required by the interface.
| netIn | The current network input (unused). |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
+
|
+ +private | +
Maps indices of active species to indices in the full network.
+ +
+
|
+ +private | +
Cache for the active species vector to avoid dangling references.
+ +
+
|
+ +mutableprivate | +
Active reactions in the defined engine.
+ +
+
|
+ +protected | +
+
|
+ +protected | +
+
|
+ +private | +
Active species in the defined engine.
+Logger instance for trace and debug information.
+ +
+
|
+ +private | +
+
|
+ +private | +
Maps indices of active reactions to indices in the full network.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::DynamicEngine, including all inherited members.
+| calculateEpsDerivatives(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| calculateMolarReactionFlow(const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| calculateRHSAndEnergy(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::Engine | pure virtual |
| collectComposition(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| generateStoichiometryMatrix()=0 | gridfire::engine::DynamicEngine | pure virtual |
| getDepth() const | gridfire::engine::DynamicEngine | inlinevirtual |
| getNetworkReactions() const =0 | gridfire::engine::DynamicEngine | pure virtual |
| getNetworkSpecies() const =0 | gridfire::engine::Engine | pure virtual |
| getScreeningModel() const =0 | gridfire::engine::DynamicEngine | pure virtual |
| getSpeciesDestructionTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| getSpeciesIndex(const fourdst::atomic::Species &species) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| getSpeciesStatus(const fourdst::atomic::Species &species) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| getSpeciesTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| getStoichiometryMatrixEntry(const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| isStale(const NetIn &netIn)=0 | gridfire::engine::DynamicEngine | pure virtual |
| mapNetInToMolarAbundanceVector(const NetIn &netIn) const =0 | gridfire::engine::DynamicEngine | pure virtual |
| primeEngine(const NetIn &netIn)=0 | gridfire::engine::DynamicEngine | pure virtual |
| rebuild(const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) | gridfire::engine::DynamicEngine | inlinevirtual |
| setNetworkReactions(const reaction::ReactionSet &reactions)=0 | gridfire::engine::DynamicEngine | pure virtual |
| setScreeningModel(screening::ScreeningType model)=0 | gridfire::engine::DynamicEngine | pure virtual |
| update(const NetIn &netIn)=0 | gridfire::engine::DynamicEngine | pure virtual |
| ~Engine()=default | gridfire::engine::Engine | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Abstract class for engines supporting Jacobian and stoichiometry operations. + More...
+ +#include <engine_abstract.h>
+Public Member Functions | |
| virtual NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Generate the Jacobian matrix for the current state. | |
| virtual NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const =0 |
| Generate the Jacobian matrix for the current state using a subset of active species. | |
| virtual NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const =0 |
| Generate the Jacobian matrix for the current state with a specified sparsity pattern. | |
| virtual void | generateStoichiometryMatrix ()=0 |
| Generate the stoichiometry matrix for the network. | |
| virtual int | getStoichiometryMatrixEntry (const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const =0 |
| Get an entry from the stoichiometry matrix. | |
| virtual double | calculateMolarReactionFlow (const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Calculate the molar reaction flow for a given reaction. | |
| virtual EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Calculate the derivatives of the energy generation rate with respect to T and rho. | |
| virtual const reaction::ReactionSet & | getNetworkReactions () const =0 |
| Get the set of logical reactions in the network. | |
| virtual void | setNetworkReactions (const reaction::ReactionSet &reactions)=0 |
| Set the reactions for the network. | |
| virtual std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Compute timescales for all species in the network. | |
| virtual std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Compute destruction timescales for all species in the network. | |
| virtual fourdst::composition::Composition | update (const NetIn &netIn)=0 |
| Update the internal state of the engine. | |
| virtual bool | isStale (const NetIn &netIn)=0 |
| Check if the engine's internal state is stale. | |
| virtual void | setScreeningModel (screening::ScreeningType model)=0 |
| Set the electron screening model. | |
| virtual screening::ScreeningType | getScreeningModel () const =0 |
| Get the current electron screening model. | |
| virtual size_t | getSpeciesIndex (const fourdst::atomic::Species &species) const =0 |
| Get the index of a species in the network. | |
| virtual std::vector< double > | mapNetInToMolarAbundanceVector (const NetIn &netIn) const =0 |
| Map a NetIn object to a vector of molar abundances. | |
| virtual PrimingReport | primeEngine (const NetIn &netIn)=0 |
| Prime the engine with initial conditions. | |
| virtual BuildDepthType | getDepth () const |
| Get the depth of the network. | |
| virtual void | rebuild (const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) |
| Rebuild the network with a specified depth. | |
| virtual fourdst::composition::Composition | collectComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Recursively collect composition from current engine and any sub engines if they exist. | |
| virtual SpeciesStatus | getSpeciesStatus (const fourdst::atomic::Species &species) const =0 |
| Get the status of a species in the network. | |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
| virtual const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const =0 |
| Get the list of species in the network. | |
| virtual std::expected< StepDerivatives< double >, EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Calculate the right-hand side (dY/dt) and energy generation. | |
Abstract class for engines supporting Jacobian and stoichiometry operations.
+Extends Engine with additional methods for:
Intended usage: Derive from this class to implement engines that support advanced solver features such as implicit integration, sensitivity analysis, QSE (Quasi-Steady-State Equilibrium) handling, and more. Generally this will be the main engine type
+
+
|
+ +pure virtual | +
Calculate the derivatives of the energy generation rate with respect to T and rho.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method computes the partial derivatives of the specific nuclear energy generation rate with respect to temperature and density for the current state.
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Calculate the molar reaction flow for a given reaction.
+| reaction | The reaction for which to calculate the flow. |
| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method computes the net rate at which the given reaction proceeds under the current state.
+ +Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +pure virtual | +
Recursively collect composition from current engine and any sub engines if they exist.
+If species i is defined in comp and in any sub engine or self composition then the molar abundance of species i in the returned composition will be that defined in comp. If there are species defined in sub engine compositions which are not defined in comp then their molar abundances will be based on the reported values from each sub engine.
| comp | Input composition to "normalize". |
| T9 | |
| rho |
Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Generate the Jacobian matrix for the current state.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method must compute and store the Jacobian matrix (∂(dY/dt)_i/∂Y_j) for the current state. The matrix can then be accessed via getJacobianMatrixEntry().
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Generate the Jacobian matrix for the current state with a specified sparsity pattern.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| sparsityPattern | The sparsity pattern to use for the Jacobian matrix. |
This method must compute and store the Jacobian matrix (∂(dY/dt)_i/∂Y_j) for the current state using automatic differentiation, taking into account the provided sparsity pattern. The matrix can then be accessed via getJacobianMatrixEntry().
Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +pure virtual | +
Generate the Jacobian matrix for the current state using a subset of active species.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| activeSpecies | The set of species to include in the Jacobian calculation. |
This method must compute and store the Jacobian matrix (∂(dY/dt)_i/∂Y_j) for the current state, considering only the specified subset of active species. The matrix can then be accessed via getJacobianMatrixEntry().
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Generate the stoichiometry matrix for the network.
+This method must compute and store the stoichiometry matrix, which encodes the net change of each species in each reaction.
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +inlinevirtual | +
Get the depth of the network.
+This method is intended to provide information about the network's structure, such as how many layers of reactions or species are present. It can be useful for diagnostics and understanding the network's complexity.
+ +Reimplemented in gridfire::engine::GraphEngine, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Get the set of logical reactions in the network.
+Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Get the current electron screening model.
+Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Compute destruction timescales for all species in the network.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method estimates the destruction timescale for each species, which can be useful for understanding reaction flows and equilibrium states.
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Get the index of a species in the network.
+| species | The species to look up. |
This method allows querying the index of a specific species in the engine's internal representation. It is useful for accessing species data efficiently.
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Get the status of a species in the network.
+| species | The species to check. |
This method allows querying the current status of a specific species within the engine's network.
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Compute timescales for all species in the network.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method estimates the timescale for abundance change of each species, which can be used for timestep control, diagnostics, and reaction network culling.
+ +Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Get an entry from the stoichiometry matrix.
+| species | species to look up stoichiometry for. |
| reaction | reaction to find |
The stoichiometry matrix must have been generated by generateStoichiometryMatrix().
+ +Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +pure virtual | +
Check if the engine's internal state is stale.
+| netIn | A struct containing the current network input, such as temperature, density, and composition. |
This method allows derived classes to determine if their internal state is out-of-date with respect to the provided network conditions. If the engine is stale, it may require a call to update() before performing calculations.
Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +pure virtual | +
Map a NetIn object to a vector of molar abundances.
+| netIn | The input conditions for the network. |
This method converts the input conditions into a vector of molar abundances, which can be used for further calculations or diagnostics.
+ +Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +pure virtual | +
Prime the engine with initial conditions.
+| netIn | The input conditions for the network. |
This method is used to prepare the engine for calculations by setting up initial conditions, reactions, and species. It may involve compiling reaction rates, initializing internal data structures, and performing any necessary pre-computation.
+ +Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +inlinevirtual | +
Rebuild the network with a specified depth.
+| comp | The composition to rebuild the network with. |
| depth | The desired depth of the network. |
This method is intended to allow dynamic adjustment of the network's depth, which may involve adding or removing species and reactions based on the specified depth. However, not all engines support this operation.
+ +Reimplemented in gridfire::engine::GraphEngine, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Set the reactions for the network.
+| reactions | The set of reactions to use in the network. |
This method replaces the current set of reactions in the network with the provided set. It marks the engine as stale, requiring regeneration of matrices and recalculation of rates.
+ +Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +pure virtual | +
Set the electron screening model.
+| model | The type of screening model to use for reaction rate calculations. |
This method allows changing the screening model at runtime. Screening corrections account for the electrostatic shielding of nuclei by electrons, which affects reaction rates in dense stellar plasmas.
+Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +
+
|
+ +pure virtual | +
Update the internal state of the engine.
+| netIn | A struct containing the current network input, such as temperature, density, and composition. |
This method is intended to be implemented by derived classes to update their internal state based on the provided network conditions. For example, an adaptive engine might use this to re-evaluate which reactions and species are active. For other engines that do not support manually updating, this method might do nothing.
+Implemented in PyDynamicEngine, gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, and gridfire::engine::MultiscalePartitioningEngineView.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::Engine, including all inherited members.
+| calculateRHSAndEnergy(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 | gridfire::engine::Engine | pure virtual |
| getNetworkSpecies() const =0 | gridfire::engine::Engine | pure virtual |
| ~Engine()=default | gridfire::engine::Engine | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Abstract base class for a reaction network engine. + More...
+ +#include <engine_abstract.h>
+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 std::expected< StepDerivatives< double >, EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const =0 |
| Calculate the right-hand side (dY/dt) and energy generation. | |
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:
+
|
+ +virtualdefault | +
Virtual destructor.
+ +
+
|
+ +pure virtual | +
Calculate the right-hand side (dY/dt) and energy generation.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
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::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, PyEngine, and PyDynamicEngine.
+ +
+
|
+ +pure virtual | +
Get the list of species in the network.
+Implemented in gridfire::engine::GraphEngine, gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, PyEngine, and PyDynamicEngine.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::EngineView< EngineT >, including all inherited members.
+| getBaseEngine() const =0 | gridfire::engine::EngineView< EngineT > | pure virtual |
| ~EngineView()=default | gridfire::engine::EngineView< EngineT > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
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. | |
Abstract base class for a "view" of a reaction network engine.
+| 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):
+
|
+ +virtualdefault | +
Virtual destructor.
+ +
+
|
+ +pure virtual | +
Access the underlying engine instance.
+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:
Implemented in gridfire::engine::AdaptiveEngineView, gridfire::engine::DefinedEngineView, gridfire::engine::MultiscalePartitioningEngineView, PyEngineView, and PyDynamicEngineView.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::FileDefinedEngineView, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <engine_defined.h>
+Public Member Functions | |
| FileDefinedEngineView (GraphEngine &baseEngine, const std::string &fileName, const io::NetworkFileParser &parser) | |
| FileDefinedEngineView Implementation ///. | |
| std::string | getNetworkFile () const |
| const io::NetworkFileParser & | getParser () const |
Public Member Functions inherited from gridfire::engine::DefinedEngineView | |
| DefinedEngineView (const std::vector< std::string > &peNames, GraphEngine &baseEngine) | |
| const DynamicEngine & | getBaseEngine () const override |
| Get the base engine associated with this defined engine view. | |
| const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const override |
| Gets the list of active species in the network defined by the file. | |
| std::expected< StepDerivatives< double >, engine::EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the right-hand side (dY/dt) and energy generation for the active species. | |
| EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculate the derivatives of the energy generation rate with respect to T and rho. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Generates the Jacobian matrix for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override |
| Generates the Jacobian matrix for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override |
| Generates the Jacobian matrix for a given sparsity pattern. | |
| void | generateStoichiometryMatrix () override |
| Generates the stoichiometry matrix for the active reactions and species. | |
| int | getStoichiometryMatrixEntry (const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override |
| Gets an entry from the stoichiometry matrix for the active species and reactions. | |
| double | calculateMolarReactionFlow (const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the molar reaction flow for a given reaction in the active network. | |
| const reaction::ReactionSet & | getNetworkReactions () const override |
| Gets the set of active logical reactions in the network. | |
| void | setNetworkReactions (const reaction::ReactionSet &reactions) override |
| Sets the active reactions in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes timescales for all active species in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes destruction timescales for all active species in the network. | |
| fourdst::composition::Composition | update (const NetIn &netIn) override |
| Updates the engine view if it is marked as stale. | |
| bool | isStale (const NetIn &netIn) override |
| Checks if the engine view is stale. | |
| void | setScreeningModel (screening::ScreeningType model) override |
| Sets the screening model for the base engine. | |
| screening::ScreeningType | getScreeningModel () const override |
| Gets the screening model from the base engine. | |
| size_t | getSpeciesIndex (const fourdst::atomic::Species &species) const override |
| Maps a species from the full network to its index in the defined active network. | |
| std::vector< double > | mapNetInToMolarAbundanceVector (const NetIn &netIn) const override |
| Map from a NetIn object to a vector of molar abundances for the active species. | |
| PrimingReport | primeEngine (const NetIn &netIn) override |
| Prime the engine view for calculations. This will delegate to the base engine. | |
| fourdst::composition::Composition | collectComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Collects a Composition object from the base engine. | |
| SpeciesStatus | getSpeciesStatus (const fourdst::atomic::Species &species) const override |
| Gets the status of a species in the active network. | |
Public Member Functions inherited from gridfire::engine::DynamicEngine | |
| virtual BuildDepthType | getDepth () const |
| Get the depth of the network. | |
| virtual void | rebuild (const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) |
| Rebuild the network with a specified depth. | |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
Public Member Functions inherited from gridfire::engine::EngineView< DynamicEngine > | |
| virtual | ~EngineView ()=default |
| Virtual destructor. | |
+Private Types | |
| using | Config = fourdst::config::Config |
| using | LogManager = fourdst::logging::LogManager |
+Private Attributes | |
| Config & | m_config = Config::getInstance() |
| quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
| std::string | m_fileName |
| Parser for the network file. | |
| const io::NetworkFileParser & | m_parser |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::engine::DefinedEngineView | |
| bool | m_isStale = true |
| GraphEngine & | m_baseEngine |
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +explicit | +
FileDefinedEngineView Implementation ///.
+ +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +private | +
+
|
+ +private | +
Parser for the network file.
+ +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::GraphEngine, including all inherited members.
+| calculateAllDerivatives(const std::vector< T > &Y_in, T T9, T rho, T Ye, T mue, std::function< std::optional< size_t >(const fourdst::atomic::Species &)> speciesLookup, const std::function< bool(const reaction::Reaction &)> &reactionLookup) const | gridfire::engine::GraphEngine | private |
| calculateAllDerivatives(const std::vector< T > &Y_in, const T T9, const T rho, const T Ye, const T mue, const std::function< std::optional< size_t >(const fourdst::atomic::Species &)> speciesLookup, const std::function< bool(const reaction::Reaction &)> &reactionLookup) const | gridfire::engine::GraphEngine | |
| calculateAllDerivativesUsingPrecomputation(const fourdst::composition::CompositionAbstract &comp, const std::vector< double > &bare_rates, const std::vector< double > &bare_reverse_rates, double T9, double rho, const reaction::ReactionSet &activeReactions) const | gridfire::engine::GraphEngine | private |
| calculateEpsDerivatives(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::GraphEngine | virtual |
| calculateEpsDerivatives(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const | gridfire::engine::GraphEngine | |
| calculateMolarReactionFlow(const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::GraphEngine | virtual |
| calculateMolarReactionFlow(const reaction::Reaction &reaction, const std::vector< T > &Y, T T9, T rho, T Ye, T mue, const std::function< std::optional< size_t >(const fourdst::atomic::Species &)> &speciesIDLookup) const | gridfire::engine::GraphEngine | private |
| calculateReverseMolarReactionFlow(T T9, T rho, std::vector< T > screeningFactors, const std::vector< T > &Y, size_t reactionIndex, const reaction::Reaction &reaction) const | gridfire::engine::GraphEngine | private |
| calculateReverseRate(const reaction::Reaction &reaction, double T9, double rho, const fourdst::composition::CompositionAbstract &comp) const | gridfire::engine::GraphEngine | |
| calculateReverseRateTwoBody(const reaction::Reaction &reaction, double T9, double forwardRate, double expFactor) const | gridfire::engine::GraphEngine | |
| calculateReverseRateTwoBodyDerivative(const reaction::Reaction &reaction, double T9, double rho, const fourdst::composition::Composition &comp, double reverseRate) const | gridfire::engine::GraphEngine | |
| calculateRHSAndEnergy(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::GraphEngine | virtual |
| calculateRHSAndEnergy(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const | gridfire::engine::GraphEngine | |
| collectAtomicReverseRateAtomicBases() | gridfire::engine::GraphEngine | private |
| collectComposition(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::GraphEngine | virtual |
| collectNetworkSpecies() | gridfire::engine::GraphEngine | private |
| exportToCSV(const std::string &filename) const | gridfire::engine::GraphEngine | |
| exportToDot(const std::string &filename) const | gridfire::engine::GraphEngine | |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::GraphEngine | virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override | gridfire::engine::GraphEngine | virtual |
| generateJacobianMatrix(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override | gridfire::engine::GraphEngine | virtual |
| generateStoichiometryMatrix() override | gridfire::engine::GraphEngine | virtual |
| getDepth() const override | gridfire::engine::GraphEngine | virtual |
| getNetReactionStoichiometry(const reaction::Reaction &reaction) | gridfire::engine::GraphEngine | static |
| getNetworkReactions() const override | gridfire::engine::GraphEngine | virtual |
| getNetworkSpecies() const override | gridfire::engine::GraphEngine | virtual |
| getPartitionFunction() const | gridfire::engine::GraphEngine | |
| getScreeningModel() const override | gridfire::engine::GraphEngine | virtual |
| getSpeciesDestructionTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::GraphEngine | virtual |
| getSpeciesDestructionTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const | gridfire::engine::GraphEngine | |
| getSpeciesIndex(const fourdst::atomic::Species &species) const override | gridfire::engine::GraphEngine | virtual |
| getSpeciesStatus(const fourdst::atomic::Species &species) const override | gridfire::engine::GraphEngine | virtual |
| getSpeciesTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override | gridfire::engine::GraphEngine | virtual |
| getSpeciesTimescales(const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const | gridfire::engine::GraphEngine | |
| getStoichiometryMatrixEntry(const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override | gridfire::engine::GraphEngine | virtual |
| GraphEngine(const fourdst::composition::Composition &composition, BuildDepthType=NetworkBuildDepth::Full) | gridfire::engine::GraphEngine | explicit |
| GraphEngine(const fourdst::composition::Composition &composition, const partition::PartitionFunction &partitionFunction, BuildDepthType buildDepth=NetworkBuildDepth::Full) | gridfire::engine::GraphEngine | explicit |
| GraphEngine(const fourdst::composition::Composition &composition, const partition::PartitionFunction &partitionFunction, BuildDepthType buildDepth, NetworkConstructionFlags reactionTypes) | gridfire::engine::GraphEngine | explicit |
| GraphEngine(const reaction::ReactionSet &reactions) | gridfire::engine::GraphEngine | explicit |
| involvesSpecies(const fourdst::atomic::Species &species) const | gridfire::engine::GraphEngine | |
| isPrecomputationEnabled() const | gridfire::engine::GraphEngine | |
| isStale(const NetIn &netIn) override | gridfire::engine::GraphEngine | virtual |
| isUsingReverseReactions() const | gridfire::engine::GraphEngine | |
| JacobianMatrixState enum name | gridfire::engine::GraphEngine | private |
| m_atomicReverseRates | gridfire::engine::GraphEngine | private |
| m_config | gridfire::engine::GraphEngine | private |
| m_constants | gridfire::engine::GraphEngine | private |
| m_depth | gridfire::engine::GraphEngine | private |
| m_epsADFun | gridfire::engine::GraphEngine | mutableprivate |
| m_full_jacobian_sparsity_pattern | gridfire::engine::GraphEngine | private |
| m_full_sparsity_set | gridfire::engine::GraphEngine | private |
| m_has_been_primed | gridfire::engine::GraphEngine | private |
| m_indexToSpeciesMap | gridfire::engine::GraphEngine | private |
| m_jac_work | gridfire::engine::GraphEngine | mutableprivate |
| m_jacobianMatrixStateNameMap | gridfire::engine::GraphEngine | private |
| m_logger | gridfire::engine::GraphEngine | private |
| m_networkSpecies | gridfire::engine::GraphEngine | private |
| m_networkSpeciesMap | gridfire::engine::GraphEngine | private |
| m_partitionFunction | gridfire::engine::GraphEngine | private |
| m_precomputedReactionIndexMap | gridfire::engine::GraphEngine | private |
| m_precomputedReactions | gridfire::engine::GraphEngine | private |
| m_reactionIDMap | gridfire::engine::GraphEngine | private |
| m_reactions | gridfire::engine::GraphEngine | private |
| m_rhsADFun | gridfire::engine::GraphEngine | mutableprivate |
| m_screeningModel | gridfire::engine::GraphEngine | private |
| m_screeningType | gridfire::engine::GraphEngine | private |
| m_speciesToIndexMap | gridfire::engine::GraphEngine | private |
| m_usePrecomputation | gridfire::engine::GraphEngine | private |
| m_useReverseReactions | gridfire::engine::GraphEngine | private |
| m_weakRateInterpolator | gridfire::engine::GraphEngine | private |
| mapNetInToMolarAbundanceVector(const NetIn &netIn) const override | gridfire::engine::GraphEngine | virtual |
| populateReactionIDMap() | gridfire::engine::GraphEngine | private |
| populateSpeciesToIndexMap() | gridfire::engine::GraphEngine | private |
| precomputeNetwork() | gridfire::engine::GraphEngine | private |
| primeEngine(const NetIn &netIn) override | gridfire::engine::GraphEngine | virtual |
| rebuild(const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) override | gridfire::engine::GraphEngine | virtual |
| recordADTape() const | gridfire::engine::GraphEngine | private |
| setNetworkReactions(const reaction::ReactionSet &reactions) override | gridfire::engine::GraphEngine | virtual |
| setPrecomputation(bool precompute) | gridfire::engine::GraphEngine | |
| setScreeningModel(screening::ScreeningType model) override | gridfire::engine::GraphEngine | virtual |
| setUseReverseReactions(bool useReverse) | gridfire::engine::GraphEngine | |
| syncInternalMaps() | gridfire::engine::GraphEngine | private |
| update(const NetIn &netIn) override | gridfire::engine::GraphEngine | virtual |
| validateConservation() const | gridfire::engine::GraphEngine | private |
| ~Engine()=default | gridfire::engine::Engine | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
A reaction network engine that uses a graph-based representation. + More...
+ +#include <engine_graph.h>
+Classes | |
| class | AtomicReverseRate |
| struct | constants |
| struct | PrecomputedReaction |
+Public Member Functions | |
| GraphEngine (const fourdst::composition::Composition &composition, BuildDepthType=NetworkBuildDepth::Full) | |
| Constructs a GraphEngine from a composition. | |
| GraphEngine (const fourdst::composition::Composition &composition, const partition::PartitionFunction &partitionFunction, BuildDepthType buildDepth=NetworkBuildDepth::Full) | |
| GraphEngine (const fourdst::composition::Composition &composition, const partition::PartitionFunction &partitionFunction, BuildDepthType buildDepth, NetworkConstructionFlags reactionTypes) | |
| GraphEngine (const reaction::ReactionSet &reactions) | |
| Constructs a GraphEngine from a set of reactions. | |
| std::expected< StepDerivatives< double >, engine::EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the right-hand side (dY/dt) and energy generation rate. | |
| std::expected< StepDerivatives< double >, EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const |
| Calculates the right-hand side (dY/dt) and energy generation rate for a subset of reactions. | |
| EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the derivatives of the energy generation rate with respect to temperature and density. | |
| EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const |
| Calculates the derivatives of the energy generation rate with respect to temperature and density for a subset of reactions. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Generates the Jacobian matrix for the current state. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override |
| Generates the Jacobian matrix for the current state with a specified set of active species. generally this will be much faster than the full matrix generation. Here we use forward mode to generate the Jacobian only for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override |
| Generates the Jacobian matrix for the current state with a specified sparsity pattern. | |
| void | generateStoichiometryMatrix () override |
| Generates the stoichiometry matrix for the network. | |
| double | calculateMolarReactionFlow (const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the molar reaction flow for a given reaction. | |
| const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const override |
| Gets the list of species in the network. | |
| const reaction::ReactionSet & | getNetworkReactions () const override |
| Gets the set of logical reactions in the network. | |
| void | setNetworkReactions (const reaction::ReactionSet &reactions) override |
| Sets the reactions for the network. | |
| int | getStoichiometryMatrixEntry (const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override |
| Gets an entry from the stoichiometry matrix. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes timescales for all species in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const |
| Computes timescales for all species in the network considering a subset of reactions. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes destruction timescales for all species in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const reaction::ReactionSet &activeReactions) const |
| Computes destruction timescales for all species in the network considering a subset of reactions. | |
| fourdst::composition::Composition | update (const NetIn &netIn) override |
| Updates the state of the network and the composition to be usable for the current network. | |
| bool | isStale (const NetIn &netIn) override |
| Checks if the engine view is stale and needs to be updated. | |
| bool | involvesSpecies (const fourdst::atomic::Species &species) const |
| Checks if a given species is involved in the network. | |
| void | exportToDot (const std::string &filename) const |
| Exports the network to a DOT file for visualization. | |
| void | exportToCSV (const std::string &filename) const |
| Exports the network to a CSV file for analysis. | |
| void | setScreeningModel (screening::ScreeningType model) override |
| Sets the electron screening model for reaction rate calculations. | |
| screening::ScreeningType | getScreeningModel () const override |
| Gets the current electron screening model. | |
| void | setPrecomputation (bool precompute) |
| Sets whether to precompute reaction rates. | |
| bool | isPrecomputationEnabled () const |
| Checks if precomputation of reaction rates is enabled. | |
| const partition::PartitionFunction & | getPartitionFunction () const |
| Gets the partition function used for reaction rate calculations. | |
| double | calculateReverseRate (const reaction::Reaction &reaction, double T9, double rho, const fourdst::composition::CompositionAbstract &comp) const |
| Calculates the reverse rate for a given reaction. | |
| double | calculateReverseRateTwoBody (const reaction::Reaction &reaction, double T9, double forwardRate, double expFactor) const |
| Calculates the reverse rate for a two-body reaction. | |
| double | calculateReverseRateTwoBodyDerivative (const reaction::Reaction &reaction, double T9, double rho, const fourdst::composition::Composition &comp, double reverseRate) const |
| Calculates the derivative of the reverse rate for a two-body reaction with respect to temperature. | |
| bool | isUsingReverseReactions () const |
| Checks if reverse reactions are enabled. | |
| void | setUseReverseReactions (bool useReverse) |
| Sets whether to use reverse reactions in the engine. | |
| size_t | getSpeciesIndex (const fourdst::atomic::Species &species) const override |
| Gets the index of a species in the network. | |
| std::vector< double > | mapNetInToMolarAbundanceVector (const NetIn &netIn) const override |
| Maps the NetIn object to a vector of molar abundances. | |
| PrimingReport | primeEngine (const NetIn &netIn) override |
| Prepares the engine for calculations with initial conditions. | |
| BuildDepthType | getDepth () const override |
| Gets the depth of the network. | |
| void | rebuild (const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) override |
| Rebuilds the reaction network based on a new composition. | |
| fourdst::composition::Composition | collectComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| This will return the input comp with the molar abundances of any species not registered in that but registered in the engine active species set to 0.0. | |
| SpeciesStatus | getSpeciesStatus (const fourdst::atomic::Species &species) const override |
| Gets the status of a species in the network. | |
| template<IsArithmeticOrAD T> | |
| StepDerivatives< T > | calculateAllDerivatives (const std::vector< T > &Y_in, const T T9, const T rho, const T Ye, const T mue, const std::function< std::optional< size_t >(const fourdst::atomic::Species &)> speciesLookup, const std::function< bool(const reaction::Reaction &)> &reactionLookup) const |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
+Static Public Member Functions | |
| static std::unordered_map< fourdst::atomic::Species, int > | getNetReactionStoichiometry (const reaction::Reaction &reaction) |
| Gets the net stoichiometry for a given reaction. | |
+Private Types | |
| enum class | JacobianMatrixState { UNINITIALIZED +, STALE +, READY_DENSE +, READY_SPARSE + } |
+Private Member Functions | |
| void | syncInternalMaps () |
| Synchronizes the internal maps. | |
| void | collectNetworkSpecies () |
| Collects the unique species in the network. | |
| void | populateReactionIDMap () |
| Populates the reaction ID map. | |
| void | populateSpeciesToIndexMap () |
| Populates the species-to-index map. | |
| void | recordADTape () const |
| Records the AD tape for the right-hand side of the ODE. | |
| void | collectAtomicReverseRateAtomicBases () |
| void | precomputeNetwork () |
| bool | validateConservation () const |
| Validates mass and charge conservation across all reactions. | |
| StepDerivatives< double > | calculateAllDerivativesUsingPrecomputation (const fourdst::composition::CompositionAbstract &comp, const std::vector< double > &bare_rates, const std::vector< double > &bare_reverse_rates, double T9, double rho, const reaction::ReactionSet &activeReactions) const |
| template<IsArithmeticOrAD T> | |
| T | calculateMolarReactionFlow (const reaction::Reaction &reaction, const std::vector< T > &Y, T T9, T rho, T Ye, T mue, const std::function< std::optional< size_t >(const fourdst::atomic::Species &)> &speciesIDLookup) const |
| Calculates the molar reaction flow for a given reaction. | |
| template<IsArithmeticOrAD T> | |
| T | calculateReverseMolarReactionFlow (T T9, T rho, std::vector< T > screeningFactors, const std::vector< T > &Y, size_t reactionIndex, const reaction::Reaction &reaction) const |
| template<IsArithmeticOrAD T> | |
| StepDerivatives< T > | calculateAllDerivatives (const std::vector< T > &Y_in, T T9, T rho, T Ye, T mue, std::function< std::optional< size_t >(const fourdst::atomic::Species &)> speciesLookup, const std::function< bool(const reaction::Reaction &)> &reactionLookup) const |
| Calculates all derivatives (dY/dt) and the energy generation rate. | |
+Private Attributes | |
| std::unordered_map< JacobianMatrixState, std::string > | m_jacobianMatrixStateNameMap |
| Config & | m_config = Config::getInstance() |
| quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
| constants | m_constants |
| rates::weak::WeakRateInterpolator | m_weakRateInterpolator |
| Interpolator for weak reaction rates. | |
| reaction::ReactionSet | m_reactions |
| Set of REACLIB reactions in the network. | |
| std::unordered_map< std::string_view, reaction::Reaction * > | m_reactionIDMap |
| Map from reaction ID to REACLIBReaction. //PERF: This makes copies of REACLIBReaction and could be a performance bottleneck. | |
| std::vector< fourdst::atomic::Species > | m_networkSpecies |
| Vector of unique species in the network. | |
| std::unordered_map< std::string_view, fourdst::atomic::Species > | m_networkSpeciesMap |
| Map from species name to Species object. | |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_speciesToIndexMap |
| Map from species to their index in the stoichiometry matrix. | |
| std::unordered_map< size_t, fourdst::atomic::Species > | m_indexToSpeciesMap |
| Map from index to species in the stoichiometry matrix. | |
| CppAD::ADFun< double > | m_rhsADFun |
| CppAD function for the right-hand side of the ODE. | |
| CppAD::ADFun< double > | m_epsADFun |
| CppAD function for the energy generation rate. | |
| CppAD::sparse_jac_work | m_jac_work |
| Work object for sparse Jacobian calculations. | |
| bool | m_has_been_primed = false |
| Flag indicating if the engine has been primed. | |
| CppAD::sparse_rc< std::vector< size_t > > | m_full_jacobian_sparsity_pattern |
| Full sparsity pattern for the Jacobian matrix. | |
| std::set< std::pair< size_t, size_t > > | m_full_sparsity_set |
| For quick lookups of the base sparsity pattern. | |
| std::vector< std::unique_ptr< AtomicReverseRate > > | m_atomicReverseRates |
| screening::ScreeningType | m_screeningType = screening::ScreeningType::BARE |
| Screening type for the reaction network. Default to no screening. | |
| std::unique_ptr< screening::ScreeningModel > | m_screeningModel = screening::selectScreeningModel(m_screeningType) |
| bool | m_usePrecomputation = true |
| Flag to enable or disable using precomputed reactions for efficiency. Mathematically, this should not change the results. Generally end users should not need to change this. | |
| bool | m_useReverseReactions = true |
| Flag to enable or disable reverse reactions. If false, only forward reactions are considered. | |
| BuildDepthType | m_depth |
| std::vector< PrecomputedReaction > | m_precomputedReactions |
| Precomputed reactions for efficiency. | |
| std::unordered_map< uint64_t, size_t > | m_precomputedReactionIndexMap |
| Set of hashed precomputed reactions for quick lookup. | |
| std::unique_ptr< partition::PartitionFunction > | m_partitionFunction |
| Partition function for the network. | |
A reaction network engine that uses a graph-based representation.
+The GraphEngine class implements the DynamicEngine interface using a graph-based representation of the reaction network. It uses sparse matrices for efficient storage and computation of the stoichiometry and Jacobian matrices. Automatic differentiation (AD) is used to calculate the Jacobian matrix.
+The engine supports:
+
|
+ +strongprivate | +
+
|
+ +explicit | +
Constructs a GraphEngine from a composition.
+| composition | The composition of the material. |
This constructor builds the reaction network from the given composition using the build_reaclib_nuclear_network function.
+
|
+ +explicit | +
+
|
+ +explicit | +
+
|
+ +explicit | +
Constructs a GraphEngine from a set of reactions.
+| reactions | The set of reactions to use in the network. |
This constructor uses the given set of reactions to construct the reaction network.
+ +| StepDerivatives< T > gridfire::engine::GraphEngine::calculateAllDerivatives | +( | +const std::vector< T > & | +Y_in, | +
| + | + | const T | +T9, | +
| + | + | const T | +rho, | +
| + | + | const T | +Ye, | +
| + | + | const T | +mue, | +
| + | + | const std::function< std::optional< size_t >(const fourdst::atomic::Species &)> | +speciesLookup, | +
| + | + | const std::function< bool(const reaction::Reaction &)> & | +reactionLookup | +
| + | ) | +const | +
+
|
+ +private | +
Calculates all derivatives (dY/dt) and the energy generation rate.
+| T | The numeric type to use for the calculation. |
| Y_in | Vector of molar abundances for all species in the network. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| Ye | |
| mue | |
| speciesLookup | |
| reactionLookup |
This method calculates the time derivatives of all species and the specific nuclear energy generation rate for the current state.
+ +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Calculates the derivatives of the energy generation rate with respect to temperature and density.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method computes the partial derivatives of the specific nuclear energy generation rate with respect to temperature (∂ε/∂T) and density (∂ε/∂ρ)
+Implements gridfire::engine::DynamicEngine.
+ +| EnergyDerivatives gridfire::engine::GraphEngine::calculateEpsDerivatives | +( | +const fourdst::composition::CompositionAbstract & | +comp, | +
| + | + | double | +T9, | +
| + | + | double | +rho, | +
| + | + | const reaction::ReactionSet & | +activeReactions | +
| + | ) | +const | +
Calculates the derivatives of the energy generation rate with respect to temperature and density for a subset of reactions.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| activeReactions | The set of reactions to include in the calculation. |
This method computes the partial derivatives of the specific nuclear energy generation rate with respect to temperature (∂ε/∂T) and density (∂ε/∂ρ) considering only the specified subset of reactions. This allows for flexible calculations with different reaction sets without modifying the engine's internal state.
+
+
|
+ +overridevirtual | +
Calculates the molar reaction flow for a given reaction.
+| reaction | The reaction for which to calculate the flow. |
| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method computes the net rate at which the given reaction proceeds under the current state.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Calculates the molar reaction flow for a given reaction.
+| T | The numeric type to use for the calculation. |
| reaction | The reaction for which to calculate the flow. |
| Y | Vector of molar abundances for all species in the network. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| Ye | |
| mue | |
| speciesIDLookup |
This method computes the net rate at which the given reaction proceeds under the current state.
+ +
+
|
+ +private | +
| double gridfire::engine::GraphEngine::calculateReverseRate | +( | +const reaction::Reaction & | +reaction, | +
| + | + | double | +T9, | +
| + | + | double | +rho, | +
| + | + | const fourdst::composition::CompositionAbstract & | +comp | +
| + | ) | +const | +
Calculates the reverse rate for a given reaction.
+| reaction | The reaction for which to calculate the reverse rate. |
| T9 | Temperature in units of 10^9 K. |
| rho | |
| comp | Composition object containing current abundances. |
This method computes the reverse rate based on the forward rate and thermodynamic properties of the reaction.
+ +| double gridfire::engine::GraphEngine::calculateReverseRateTwoBody | +( | +const reaction::Reaction & | +reaction, | +
| + | + | double | +T9, | +
| + | + | double | +forwardRate, | +
| + | + | double | +expFactor | +
| + | ) | +const | +
Calculates the reverse rate for a two-body reaction.
+| reaction | The reaction for which to calculate the reverse rate. |
| T9 | Temperature in units of 10^9 K. |
| forwardRate | The forward rate of the reaction. |
| expFactor | Exponential factor for the reaction. |
This method computes the reverse rate using the forward rate and thermodynamic properties of the reaction.
+ +| double gridfire::engine::GraphEngine::calculateReverseRateTwoBodyDerivative | +( | +const reaction::Reaction & | +reaction, | +
| + | + | double | +T9, | +
| + | + | double | +rho, | +
| + | + | const fourdst::composition::Composition & | +comp, | +
| + | + | double | +reverseRate | +
| + | ) | +const | +
Calculates the derivative of the reverse rate for a two-body reaction with respect to temperature.
+| reaction | The reaction for which to calculate the derivative. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| comp | Composition object containing current abundances. |
| reverseRate | The reverse rate of the reaction. |
This method computes the derivative of the reverse rate using automatic differentiation.
+ +
+
|
+ +overridevirtual | +
Calculates the right-hand side (dY/dt) and energy generation rate.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method calculates the time derivatives of all species and the specific nuclear energy generation rate for the current state.
+Implements gridfire::engine::Engine.
+ +| std::expected< StepDerivatives< double >, EngineStatus > gridfire::engine::GraphEngine::calculateRHSAndEnergy | +( | +const fourdst::composition::CompositionAbstract & | +comp, | +
| + | + | double | +T9, | +
| + | + | double | +rho, | +
| + | + | const reaction::ReactionSet & | +activeReactions | +
| + | ) | +const | +
Calculates the right-hand side (dY/dt) and energy generation rate for a subset of reactions.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| activeReactions | The set of reactions to include in the calculation. |
This method calculates the time derivatives of all species and the specific nuclear energy generation rate considering only the specified subset of reactions. This allows for flexible calculations with different reaction sets without modifying the engine's internal state.
+
+
|
+ +private | +
+
|
+ +overridevirtual | +
This will return the input comp with the molar abundances of any species not registered in that but registered in the engine active species set to 0.0.
+| comp | Input Composition |
| T9 | |
| rho | |
| T9 | |
| rho |
| BadCollectionError | If the input composition contains species not present in the network species set |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Collects the unique species in the network.
+This method collects the unique species in the network from the reactants and products of all reactions.
+ +| void gridfire::engine::GraphEngine::exportToCSV | +( | +const std::string & | +filename | ) | +const | +
Exports the network to a CSV file for analysis.
+| filename | The name of the CSV file to create. |
This method generates a CSV file containing information about the reactions in the network, including the reactants, products, Q-value, and reaction rate coefficients.
+| std::runtime_error | If the file cannot be opened for writing. |
Example usage:
| void gridfire::engine::GraphEngine::exportToDot | +( | +const std::string & | +filename | ) | +const | +
Exports the network to a DOT file for visualization.
+| filename | The name of the DOT file to create. |
This method generates a DOT file that can be used to visualize the reaction network as a graph. The DOT file can be converted to a graphical image using Graphviz.
+| std::runtime_error | If the file cannot be opened for writing. |
Example usage:
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the current state.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method computes and stores the Jacobian matrix (∂(dY/dt)_i/∂Y_j) for the current state using automatic differentiation. The matrix can then be accessed via getJacobianMatrixEntry().
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the current state with a specified sparsity pattern.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| sparsityPattern | The sparsity pattern to use for the Jacobian matrix. |
This method computes and stores the Jacobian matrix (∂(dY/dt)_i/∂Y_j) for the current state using automatic differentiation, taking into account the provided sparsity pattern. The matrix can then be accessed via getJacobianMatrixEntry().
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the current state with a specified set of active species. generally this will be much faster than the full matrix generation. Here we use forward mode to generate the Jacobian only for the active species.
+| comp | The Composition object containing current abundances. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
| activeSpecies | A vector of Species objects representing the active species. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the stoichiometry matrix for the network.
+This method computes and stores the stoichiometry matrix, which encodes the net change of each species in each reaction.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the depth of the network.
+This method returns the current build depth of the reaction network, which indicates how many levels of reactions are included in the network.
+ +Reimplemented from gridfire::engine::DynamicEngine.
+ +
+
|
+ +static | +
Gets the net stoichiometry for a given reaction.
+| reaction | The reaction for which to get the stoichiometry. |
+
|
+ +overridevirtual | +
Gets the set of logical reactions in the network.
+Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the list of species in the network.
+Implements gridfire::engine::Engine.
+ +| const partition::PartitionFunction & gridfire::engine::GraphEngine::getPartitionFunction | +( | +) | +const | +
Gets the partition function used for reaction rate calculations.
+This method provides access to the partition function used in the engine, which is essential for calculating thermodynamic properties and reaction rates.
+ +
+
|
+ +overridevirtual | +
Gets the current electron screening model.
+Example usage:
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes destruction timescales for all species in the network.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method estimates the destruction timescale for each species, which can be useful for understanding reaction flows and equilibrium states.
+ +Implements gridfire::engine::DynamicEngine.
+ +| std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > gridfire::engine::GraphEngine::getSpeciesDestructionTimescales | +( | +const fourdst::composition::CompositionAbstract & | +comp, | +
| + | + | double | +T9, | +
| + | + | double | +rho, | +
| + | + | const reaction::ReactionSet & | +activeReactions | +
| + | ) | +const | +
Computes destruction timescales for all species in the network considering a subset of reactions.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| activeReactions | The set of reactions to include in the calculation. |
This method estimates the destruction timescale for each species, considering only the specified subset of reactions. This allows for flexible calculations with different reaction sets without modifying the engine's internal state.
+ +
+
|
+ +overridevirtual | +
Gets the index of a species in the network.
+| species | The species for which to get the index. |
This method returns the index of the given species in the network's species vector. If the species is not found, it returns -1.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the status of a species in the network.
+| species | The species for which to get the status. |
This method checks if the given species is part of the network and returns its status (e.g., Active, Inactive, NotFound).
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes timescales for all species in the network.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
This method estimates the timescale for abundance change of each species, which can be used for timestep control or diagnostics.
+ +Implements gridfire::engine::DynamicEngine.
+ +| std::expected< std::unordered_map< fourdst::atomic::Species, double >, EngineStatus > gridfire::engine::GraphEngine::getSpeciesTimescales | +( | +const fourdst::composition::CompositionAbstract & | +comp, | +
| + | + | double | +T9, | +
| + | + | double | +rho, | +
| + | + | const reaction::ReactionSet & | +activeReactions | +
| + | ) | +const | +
Computes timescales for all species in the network considering a subset of reactions.
+| comp | Composition object containing current abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| activeReactions | The set of reactions to include in the calculation. |
This method estimates the timescale for abundance change of each species, considering only the specified subset of reactions. This allows for flexible calculations with different reaction sets without modifying the engine's internal state.
+ +
+
|
+ +overridevirtual | +
Gets an entry from the stoichiometry matrix.
+| species | Species to look up stoichiometry for. |
| reaction | Reaction to find. |
The stoichiometry matrix must have been generated by generateStoichiometryMatrix().
Implements gridfire::engine::DynamicEngine.
+ +| bool gridfire::engine::GraphEngine::involvesSpecies | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Checks if a given species is involved in the network.
+| species | The species to check. |
| bool gridfire::engine::GraphEngine::isPrecomputationEnabled | +( | +) | +const | +
Checks if precomputation of reaction rates is enabled.
+This method allows checking the current state of precomputation for reaction rates in the engine.
+ +
+
|
+ +overridevirtual | +
Checks if the engine view is stale and needs to be updated.
+| netIn | The current network input (unused). |
Implements gridfire::engine::DynamicEngine.
+ +| bool gridfire::engine::GraphEngine::isUsingReverseReactions | +( | +) | +const | +
Checks if reverse reactions are enabled.
+This method allows checking whether the engine is configured to use reverse reactions in its calculations.
+ +
+
|
+ +overridevirtual | +
Maps the NetIn object to a vector of molar abundances.
+| netIn | The NetIn object containing the input conditions. |
This method converts the NetIn object into a vector of molar abundances for each species in the network, which can be used for further calculations.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Populates the reaction ID map.
+This method populates the reaction ID map, which maps reaction IDs to REACLIBReaction objects.
+ +
+
|
+ +private | +
Populates the species-to-index map.
+This method populates the species-to-index map, which maps species to their index in the stoichiometry matrix.
+ +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Prepares the engine for calculations with initial conditions.
+| netIn | The input conditions for the network. |
This method initializes the engine with the provided input conditions, setting up reactions, species, and precomputing necessary data.
+ +Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Rebuilds the reaction network based on a new composition.
+| comp | The new composition to use for rebuilding the network. |
| depth | The build depth to use for the network. |
This method rebuilds the reaction network using the provided composition and build depth. It updates all internal data structures accordingly.
+ +Reimplemented from gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Records the AD tape for the right-hand side of the ODE.
+This method records the AD tape for the right-hand side of the ODE, which is used to calculate the Jacobian matrix using automatic differentiation.
+| std::runtime_error | If there are no species in the network. |
+
|
+ +overridevirtual | +
Sets the reactions for the network.
+| reactions | The set of reactions to use in the network. |
This method replaces the current set of reactions in the network with the provided set. It marks the engine as stale, requiring regeneration of matrices and recalculation of rates.
+ +Implements gridfire::engine::DynamicEngine.
+ +| void gridfire::engine::GraphEngine::setPrecomputation | +( | +bool | +precompute | ) | ++ |
Sets whether to precompute reaction rates.
+| precompute | True to enable precomputation, false to disable. |
This method allows enabling or disabling precomputation of reaction rates for performance optimization. When enabled, reaction rates are computed once and stored for later use.
+
+
|
+ +overridevirtual | +
Sets the electron screening model for reaction rate calculations.
+| model | The type of screening model to use. |
This method allows changing the screening model at runtime. Screening corrections account for the electrostatic shielding of nuclei by electrons, which affects reaction rates in dense stellar plasmas.
+ +Implements gridfire::engine::DynamicEngine.
+ +| void gridfire::engine::GraphEngine::setUseReverseReactions | +( | +bool | +useReverse | ) | ++ |
Sets whether to use reverse reactions in the engine.
+| useReverse | True to enable reverse reactions, false to disable. |
This method allows enabling or disabling reverse reactions in the engine. If disabled, only forward reactions will be considered in calculations.
+
+
|
+ +private | +
Synchronizes the internal maps.
+This method synchronizes the internal maps used by the engine, including the species map, reaction ID map, and species-to-index map. It also generates the stoichiometry matrix and records the AD tape.
+ +
+
|
+ +overridevirtual | +
Updates the state of the network and the composition to be usable for the current network.
+For graph engine all this does is ensure that the returned composition has all the species in the network registered. if a species was already in the composition is will keep its abundance, otherwise it will be added with zero abundance.
+| netIn | The input netIn to use, this includes the composition, temperature, and density |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Validates mass and charge conservation across all reactions.
+This method checks that all reactions in the network conserve mass and charge. If any reaction does not conserve mass or charge, an error message is logged and false is returned.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
CppAD function for the energy generation rate.
+ +
+
|
+ +private | +
Full sparsity pattern for the Jacobian matrix.
+ +
+
|
+ +private | +
For quick lookups of the base sparsity pattern.
+ +
+
|
+ +private | +
Flag indicating if the engine has been primed.
+ +
+
|
+ +private | +
Map from index to species in the stoichiometry matrix.
+ +
+
|
+ +mutableprivate | +
Work object for sparse Jacobian calculations.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Vector of unique species in the network.
+ +
+
|
+ +private | +
Map from species name to Species object.
+ +
+
|
+ +private | +
Partition function for the network.
+ +
+
|
+ +private | +
Set of hashed precomputed reactions for quick lookup.
+ +
+
|
+ +private | +
Precomputed reactions for efficiency.
+ +
+
|
+ +private | +
Map from reaction ID to REACLIBReaction. //PERF: This makes copies of REACLIBReaction and could be a performance bottleneck.
+ +
+
|
+ +private | +
Set of REACLIB reactions in the network.
+ +
+
|
+ +mutableprivate | +
CppAD function for the right-hand side of the ODE.
+ +
+
|
+ +private | +
+
|
+ +private | +
Screening type for the reaction network. Default to no screening.
+ +
+
|
+ +private | +
Map from species to their index in the stoichiometry matrix.
+ +
+
|
+ +private | +
Flag to enable or disable using precomputed reactions for efficiency. Mathematically, this should not change the results. Generally end users should not need to change this.
+ +
+
|
+ +private | +
Flag to enable or disable reverse reactions. If false, only forward reactions are considered.
+ +
+
|
+ +private | +
Interpolator for weak reaction rates.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::GraphEngine::AtomicReverseRate, including all inherited members.
+| AtomicReverseRate(const reaction::Reaction &reaction, const GraphEngine &engine) | gridfire::engine::GraphEngine::AtomicReverseRate | inline |
| for_sparse_jac(size_t q, const CppAD::vector< std::set< size_t > > &r, CppAD::vector< std::set< size_t > > &s) override | gridfire::engine::GraphEngine::AtomicReverseRate | |
| for_sparse_jac(size_t q, const CppAD::vector< bool > &r, CppAD::vector< bool > &s, const CppAD::vector< double > &x) override | gridfire::engine::GraphEngine::AtomicReverseRate | |
| forward(size_t p, size_t q, const CppAD::vector< bool > &vx, CppAD::vector< bool > &vy, const CppAD::vector< double > &tx, CppAD::vector< double > &ty) override | gridfire::engine::GraphEngine::AtomicReverseRate | |
| m_engine | gridfire::engine::GraphEngine::AtomicReverseRate | private |
| m_reaction | gridfire::engine::GraphEngine::AtomicReverseRate | private |
| rev_sparse_jac(size_t q, const CppAD::vector< std::set< size_t > > &rt, CppAD::vector< std::set< size_t > > &st) override | gridfire::engine::GraphEngine::AtomicReverseRate | |
| rev_sparse_jac(size_t q, const CppAD::vector< bool > &rt, CppAD::vector< bool > &st, const CppAD::vector< double > &x) override | gridfire::engine::GraphEngine::AtomicReverseRate | |
| reverse(size_t q, const CppAD::vector< double > &tx, const CppAD::vector< double > &ty, CppAD::vector< double > &px, const CppAD::vector< double > &py) override | gridfire::engine::GraphEngine::AtomicReverseRate |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
+Public Member Functions | |
| AtomicReverseRate (const reaction::Reaction &reaction, const GraphEngine &engine) | |
| bool | forward (size_t p, size_t q, const CppAD::vector< bool > &vx, CppAD::vector< bool > &vy, const CppAD::vector< double > &tx, CppAD::vector< double > &ty) override |
| bool | reverse (size_t q, const CppAD::vector< double > &tx, const CppAD::vector< double > &ty, CppAD::vector< double > &px, const CppAD::vector< double > &py) override |
| bool | for_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &r, CppAD::vector< std::set< size_t > > &s) override |
| bool | rev_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &rt, CppAD::vector< std::set< size_t > > &st) override |
| bool | for_sparse_jac (size_t q, const CppAD::vector< bool > &r, CppAD::vector< bool > &s, const CppAD::vector< double > &x) override |
| bool | rev_sparse_jac (size_t q, const CppAD::vector< bool > &rt, CppAD::vector< bool > &st, const CppAD::vector< double > &x) override |
+Private Attributes | |
| const reaction::Reaction & | m_reaction |
| const GraphEngine & | m_engine |
+
|
+ +inline | +
+
|
+ +override | +
+
|
+ +override | +
+
|
+ +override | +
+
|
+ +override | +
+
|
+ +override | +
+
|
+ +override | +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::MultiscalePartitioningEngineView, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
An engine view that partitions the reaction network into multiple groups based on timescales. + More...
+ +#include <engine_multiscale.h>
+Classes | |
| struct | FluxValidationResult |
| struct | QSEGroup |
| Struct representing a QSE group. More... | |
| class | QSESolver |
+Public Member Functions | |
| MultiscalePartitioningEngineView (DynamicEngine &baseEngine) | |
| Constructs a MultiscalePartitioningEngineView. | |
| ~MultiscalePartitioningEngineView () override | |
| const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const override |
| Gets the list of species in the network. | |
| std::expected< StepDerivatives< double >, engine::EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the right-hand side (dY/dt) and energy generation. | |
| EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the energy generation rate derivatives with respect to abundances. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Generates the Jacobian matrix for the current state. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override |
| Generates the Jacobian matrix for a subset of active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override |
| Generates the Jacobian matrix using a sparsity pattern. | |
| void | generateStoichiometryMatrix () override |
| Generates the stoichiometry matrix for the network. | |
| int | getStoichiometryMatrixEntry (const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override |
| Gets an entry from the stoichiometry matrix. | |
| double | calculateMolarReactionFlow (const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the molar reaction flow for a given reaction. | |
| const reaction::ReactionSet & | getNetworkReactions () const override |
| Gets the set of logical reactions in the network. | |
| void | setNetworkReactions (const reaction::ReactionSet &reactions) override |
| Sets the set of logical reactions in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes timescales for all species in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes destruction timescales for all species in the network. | |
| fourdst::composition::Composition | update (const NetIn &netIn) override |
| Updates the internal state of the engine, performing partitioning and QSE equilibration. | |
| bool | isStale (const NetIn &netIn) override |
| Checks if the engine's internal state is stale relative to the provided conditions. | |
| void | setScreeningModel (screening::ScreeningType model) override |
| Sets the electron screening model. | |
| screening::ScreeningType | getScreeningModel () const override |
| Gets the current electron screening model. | |
| const DynamicEngine & | getBaseEngine () const override |
| Gets the base engine. | |
| fourdst::composition::Composition | partitionNetwork (const NetIn &netIn) |
Partitions the network based on timescales from a NetIn struct. | |
| void | exportToDot (const std::string &filename, const fourdst::composition::Composition &comp, double T9, double rho) const |
| Exports the network to a DOT file for visualization. | |
| size_t | getSpeciesIndex (const fourdst::atomic::Species &species) const override |
| Gets the index of a species in the full network. | |
| std::vector< double > | mapNetInToMolarAbundanceVector (const NetIn &netIn) const override |
Maps a NetIn struct to a molar abundance vector for the full network. | |
| PrimingReport | primeEngine (const NetIn &netIn) override |
| Primes the engine with a specific species. | |
| std::vector< fourdst::atomic::Species > | getFastSpecies () const |
| Gets the fast species in the network. | |
| const std::vector< fourdst::atomic::Species > & | getDynamicSpecies () const |
| Gets the dynamic species in the network. | |
| bool | involvesSpecies (const fourdst::atomic::Species &species) const |
| Checks if a species is involved in the partitioned network. | |
| bool | involvesSpeciesInQSE (const fourdst::atomic::Species &species) const |
| Check if a species is involved in the QSE (algebraic) set. | |
| bool | involvesSpeciesInDynamic (const fourdst::atomic::Species &species) const |
| Check if a species is involved in the dynamic set. | |
| fourdst::composition::Composition | getNormalizedEquilibratedComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const |
| Gets a normalized composition with QSE species equilibrated. | |
| fourdst::composition::Composition | collectComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Collect the composition from this and sub engines. | |
| SpeciesStatus | getSpeciesStatus (const fourdst::atomic::Species &species) const override |
| Gets the status of a species in the network. | |
Public Member Functions inherited from gridfire::engine::DynamicEngine | |
| virtual BuildDepthType | getDepth () const |
| Get the depth of the network. | |
| virtual void | rebuild (const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) |
| Rebuild the network with a specified depth. | |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
Public Member Functions inherited from gridfire::engine::EngineView< DynamicEngine > | |
| virtual | ~EngineView ()=default |
| Virtual destructor. | |
+Private Types | |
| typedef std::tuple< std::vector< fourdst::atomic::Species >, std::vector< size_t >, std::vector< fourdst::atomic::Species >, std::vector< size_t > > | QSEPartition |
| Type alias for a QSE partition. | |
+Private Member Functions | |
| std::vector< std::vector< fourdst::atomic::Species > > | partitionByTimescale (const fourdst::composition::Composition &comp, double T9, double rho) const |
| Partitions the network by timescale. | |
| std::pair< bool, reaction::ReactionSet > | group_is_a_qse_cluster (const fourdst::composition::Composition &comp, double T9, double rho, const QSEGroup &group) const |
| bool | group_is_a_qse_pipeline (const fourdst::composition::Composition &comp, double T9, double rho, const QSEGroup &group) const |
| FluxValidationResult | validateGroupsWithFluxAnalysis (const std::vector< QSEGroup > &candidate_groups, const fourdst::composition::Composition &comp, double T9, double rho) const |
| Validates candidate QSE groups using flux analysis. | |
| fourdst::composition::Composition | solveQSEAbundances (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const |
| Solves for the QSE abundances of the algebraic species in a given state. | |
| size_t | identifyMeanSlowestPool (const std::vector< std::vector< fourdst::atomic::Species > > &pools, const fourdst::composition::Composition &comp, double T9, double rho) const |
| Identifies the pool with the slowest mean timescale. | |
| std::unordered_map< fourdst::atomic::Species, std::vector< fourdst::atomic::Species > > | buildConnectivityGraph (const std::vector< fourdst::atomic::Species > &species_pool, const fourdst::composition::Composition &comp, double T9, double rho) const |
| Builds a connectivity graph from a species pool. | |
| std::vector< QSEGroup > | constructCandidateGroups (const std::vector< std::vector< fourdst::atomic::Species > > &candidate_pools, const fourdst::composition::Composition &comp, double T9, double rho) const |
| Constructs candidate QSE groups from connected timescale pools. | |
| std::vector< std::vector< fourdst::atomic::Species > > | analyzeTimescalePoolConnectivity (const std::vector< std::vector< fourdst::atomic::Species > > ×cale_pools, const fourdst::composition::Composition &comp, double T9, double rho) const |
| Analyzes the connectivity of timescale pools. | |
| std::vector< QSEGroup > | pruneValidatedGroups (const std::vector< QSEGroup > &groups, const std::vector< reaction::ReactionSet > &groupReactions, const fourdst::composition::Composition &comp, double T9, double rho) const |
+Static Private Member Functions | |
| static std::vector< QSEGroup > | merge_coupled_groups (const std::vector< QSEGroup > &groups, const std::vector< reaction::ReactionSet > &groupReactions) |
+Private Attributes | |
| quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
| Logger instance for logging messages. | |
| DynamicEngine & | m_baseEngine |
| The base engine to which this view delegates calculations. | |
| std::vector< QSEGroup > | m_qse_groups |
| The list of identified equilibrium groups. | |
| std::vector< std::unique_ptr< QSESolver > > | m_qse_solvers |
| A set of solvers, one for each QSE group. | |
| std::vector< fourdst::atomic::Species > | m_dynamic_species |
| The simplified set of species presented to the solver (the "slow" species). | |
| std::vector< fourdst::atomic::Species > | m_algebraic_species |
| Species that are treated as algebraic (in QSE) in the QSE groups. | |
| std::unordered_map< fourdst::atomic::Species, double > | m_algebraic_abundances |
| Map from species to their calculated abundances in the QSE state. | |
| std::vector< size_t > | m_activeSpeciesIndices |
| Indices of all species considered active in the current partition (dynamic + algebraic). | |
| std::vector< size_t > | m_activeReactionIndices |
| Indices of all reactions involving only active species. | |
| std::unordered_map< uint64_t, fourdst::composition::Composition > | m_composition_cache |
| SUNContext | m_sun_ctx = nullptr |
An engine view that partitions the reaction network into multiple groups based on timescales.
+partitionNetwork() and equilibrateNetwork() methods. The partitioning process involves:getSpeciesDestructionTimescales from the base engine, all species are sorted by their characteristic timescales.solveQSEAbundances uses a Levenberg-Marquardt nonlinear solver (Eigen::LevenbergMarquardt) to find the equilibrium abundances of the "algebraic" species, holding the "seed" species constant.All calculations are cached using QSECacheKey to avoid re-partitioning and re-solving for similar thermodynamic conditions.
<DynamicEngine>
+
+
|
+ +private | +
Type alias for a QSE partition.
+A QSE partition is a tuple containing the fast species, their indices, the slow species, and their indices.
+ +
+
|
+ +explicit | +
Constructs a MultiscalePartitioningEngineView.
+| baseEngine | The underlying GraphEngine to which this view delegates calculations. It must be a GraphEngine and not a more general DynamicEngine because this view relies on its specific implementation details. |
+
|
+ +override | +
+
|
+ +private | +
Analyzes the connectivity of timescale pools.
+| timescale_pools | A vector of vectors of species indices, where each inner vector represents a timescale pool. |
| comp | |
| T9 | |
| rho |
buildConnectivityGraph. It then finds the connected components within that graph using a Breadth-First Search (BFS). The resulting components from all pools are collected and returned.
+
|
+ +private | +
Builds a connectivity graph from a species pool.
+| species_pool | A vector of species indices representing a species pool. |
| comp | |
| T9 | |
| rho |
species_pool (one as a reactant and one as a product), it adds edges between all reactants and products from that reaction that are also in the pool.
+
|
+ +overridevirtual | +
Calculates the energy generation rate derivatives with respect to abundances.
+| comp | The current composition. |
| T9 | The temperature in units of 10^9 K. |
| rho | The density in g/cm^3. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Calculates the molar reaction flow for a given reaction.
+| reaction | The reaction for which to calculate the flow. |
| comp | The current composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
Y_full, overwrites the algebraic species abundances with the cached equilibrium values, and then calls the base engine's calculateMolarReactionFlow with this modified abundance vector.| StaleEngineError | If the QSE cache misses. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Calculates the right-hand side (dY/dt) and energy generation.
+| comp | The current composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
std::expected containing StepDerivatives<double> on success, or a StaleEngineError if the engine's QSE cache does not contain a solution for the given state.m_qse_abundance_cache). If a cache hit occurs, it calls the base engine's calculateRHSAndEnergy. It then manually sets the time derivatives (dydt) of all identified algebraic species to zero, effectively removing their differential equations from the system being solved.update() or equilibrateNetwork() for the current thermodynamic conditions, so that a valid entry exists in the QSE cache. dydt=0 for all algebraic species.| StaleEngineError | If the QSE cache does not contain an entry for the given (T9, rho, Y_full). This indicates update() was not called recently enough. |
Implements gridfire::engine::Engine.
+ +
+
|
+ +overridevirtual | +
Collect the composition from this and sub engines.
+This method operates by injecting the current equilibrium abundances for algebraic species into the composition object so that they can be bubbled up to the caller.
| comp | Input Composition |
| T9 | |
| rho |
| BadCollectionError | if there is a species in the algebraic species set which does not show up in the reported composition from the base engine.:w |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Constructs candidate QSE groups from connected timescale pools.
+| candidate_pools | A vector of vectors of species indices, where each inner vector represents a connected pool of species with similar fast timescales. |
| comp | Vector of current molar abundances. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
QSEGroup structs, ready for flux validation.QSEGroup struct.candidate_pools should be connected components from analyzeTimescalePoolConnectivity. QSEGroup objects is returned. | void gridfire::engine::MultiscalePartitioningEngineView::exportToDot | +( | +const std::string & | +filename, | +
| + | + | const fourdst::composition::Composition & | +comp, | +
| + | + | double | +T9, | +
| + | + | double | +rho | +
| + | ) | +const | +
Exports the network to a DOT file for visualization.
+| filename | The name of the DOT file to create. |
| comp | Composition object |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for the current state.
+| comp | The current composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
dydt=0 from calculateRHSAndEnergy).| exceptions::StaleEngineError | If the QSE cache misses, as it cannot proceed without a valid partition. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix using a sparsity pattern.
+| comp | The current composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| sparsityPattern | The sparsity pattern to use for the Jacobian. |
generateJacobianMatrix method with the provided sparsity pattern.| exceptions::StaleEngineError | If the QSE cache misses. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the Jacobian matrix for a subset of active species.
+| comp | The current composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| activeSpecies | The subset of species to include in the Jacobian. |
generateJacobianMatrix with the specified active species. The returned Jacobian still reflects the full network, but only for the active species subset.| exceptions::StaleEngineError | If the QSE cache misses. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Generates the stoichiometry matrix for the network.
+generateStoichiometryMatrix(). The stoichiometry is based on the full, unpartitioned network. Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the base engine.
+Implements gridfire::engine::EngineView< DynamicEngine >.
+ +| const std::vector< Species > & gridfire::engine::MultiscalePartitioningEngineView::getDynamicSpecies | +( | +) | +const | +
Gets the dynamic species in the network.
+m_dynamic_species member vector.partitionNetwork() must have been called. | std::vector< Species > gridfire::engine::MultiscalePartitioningEngineView::getFastSpecies | +( | +) | +const | +
Gets the fast species in the network.
+m_algebraic_species member vector.partitionNetwork() must have been called.
+
|
+ +overridevirtual | +
Gets the set of logical reactions in the network.
+LogicalReactionSet from the base engine, containing all reactions in the full network. Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the list of species in the network.
+Species objects representing all species in the underlying base engine. This view does not alter the species list itself, only how their abundances are evolved. Implements gridfire::engine::Engine.
+ +| fourdst::composition::Composition gridfire::engine::MultiscalePartitioningEngineView::getNormalizedEquilibratedComposition | +( | +const fourdst::composition::CompositionAbstract & | +comp, | +
| + | + | double | +T9, | +
| + | + | double | +rho | +
| + | ) | +const | +
Gets a normalized composition with QSE species equilibrated.
+| comp | The input composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
Composition object with algebraic species set to their equilibrium values.solveQSEAbundances() to compute the equilibrium abundances for the algebraic species, then constructs a new Composition object reflecting these values.| StaleEngineError | If the QSE cache misses. |
+
|
+ +overridevirtual | +
Gets the current electron screening model.
+getScreeningModel(). Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes destruction timescales for all species in the network.
+| comp | The current composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
std::expected containing a map from Species to their characteristic destruction timescales (s) on success, or a StaleEngineError on failure.| StaleEngineError | If the QSE cache misses. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the index of a species in the full network.
+| species | The species to get the index of. |
getSpeciesIndex(). Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets the status of a species in the network.
+| species | The species to query. |
SpeciesStatus indicating if the species is dynamic, algebraic, or not involved.m_dynamic_species and m_algebraic_species to determine the appropriate status.partitionNetwork() must have been called. Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Computes timescales for all species in the network.
+| comp | The current composition. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
std::expected containing a map from Species to their characteristic timescales (s) on success, or a StaleEngineError on failure.Y / (dY/dt) for each species.| StaleEngineError | If the QSE cache misses. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Gets an entry from the stoichiometry matrix.
+| species | Species to look up stoichiometry for. |
| reaction | Reaction to find. |
getStoichiometryMatrixEntry().generateStoichiometryMatrix() must have been called. Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Identifies the pool with the slowest mean timescale.
+| pools | A vector of vectors of species indices, where each inner vector represents a timescale pool. |
| comp | Vector of current molar abundances for the full network. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| bool gridfire::engine::MultiscalePartitioningEngineView::involvesSpecies | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Checks if a species is involved in the partitioned network.
+| species | The species to check. |
true if the species is in either the dynamic or algebraic sets, false otherwise.m_dynamic_species and m_algebraic_species.partitionNetwork() must have been called. | bool gridfire::engine::MultiscalePartitioningEngineView::involvesSpeciesInDynamic | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Check if a species is involved in the dynamic set.
+| species | The species to check. |
| bool gridfire::engine::MultiscalePartitioningEngineView::involvesSpeciesInQSE | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Check if a species is involved in the QSE (algebraic) set.
+| species | The species to check. |
+
|
+ +overridevirtual | +
Checks if the engine's internal state is stale relative to the provided conditions.
+| netIn | A struct containing the current network input. |
true if the engine is stale, false otherwise.update() needs to be called.QSECacheKey from the netIn data and checks for its existence in the m_qse_abundance_cache. A cache miss indicates the engine is stale because it does not have a valid QSE partition for the current conditions. It also queries the base engine's isStale() method. Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Maps a NetIn struct to a molar abundance vector for the full network.
| netIn | A struct containing the current network input. |
mapNetInToMolarAbundanceVector(). Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +staticprivate | +
+
|
+ +private | +
Partitions the network by timescale.
+| comp | Vector of current molar abundances for all species. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
| fourdst::composition::Composition gridfire::engine::MultiscalePartitioningEngineView::partitionNetwork | +( | +const NetIn & | +netIn | ) | ++ |
Partitions the network based on timescales from a NetIn struct.
| netIn | A struct containing the current network input. |
partitionNetwork.netIn struct into Y, T9, and rho and then calls the primary partitionNetwork method.
+
|
+ +overridevirtual | +
Primes the engine with a specific species.
+| netIn | A struct containing the current network input. |
PrimingReport struct containing information about the priming process.primeEngine(). The multiscale view does not currently interact with the priming process. Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Sets the set of logical reactions in the network.
+| reactions | The set of logical reactions to use. |
MultiscalePartitioningEngineView as it would invalidate the partitioning logic. It logs a critical error and throws an exception. Network modifications should be done on the base engine before it is wrapped by this view.| exceptions::UnableToSetNetworkReactionsError | Always. |
Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +overridevirtual | +
Sets the electron screening model.
+| model | The type of screening model to use for reaction rate calculations. |
setScreeningModel(). Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Solves for the QSE abundances of the algebraic species in a given state.
+| comp | Vector of current molar abundances for all species in the base engine. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
LevenbergMarquardt class. The problem is defined by the EigenFunctor which computes the residuals and Jacobian for the QSE equations.
+
|
+ +overridevirtual | +
Updates the internal state of the engine, performing partitioning and QSE equilibration.
+| netIn | A struct containing the current network input: temperature, density, and composition. |
@how
equilibrateNetwork().equilibrateNetwork() in turn calls partitionNetwork() to define the dynamic and algebraic species sets.solveQSEAbundances() to compute the equilibrium abundances.m_qse_abundance_cache.fourdst::composition::Composition object reflecting the equilibrated state is created and returned.netIn struct should contain a valid physical state. m_dynamic_species, m_algebraic_species, etc. are populated). The m_qse_abundance_cache is populated with the QSE solution for the given state. The returned composition reflects the new equilibrium. Implements gridfire::engine::DynamicEngine.
+ +
+
|
+ +private | +
Validates candidate QSE groups using flux analysis.
+| candidate_groups | A vector of candidate QSE groups. |
| comp | Vector of current molar abundances for the full network. |
| T9 | Temperature in units of 10^9 K. |
| rho | Density in g/cm^3. |
+
|
+ +private | +
Indices of all reactions involving only active species.
+ +
+
|
+ +private | +
Indices of all species considered active in the current partition (dynamic + algebraic).
+ +
+
|
+ +private | +
Map from species to their calculated abundances in the QSE state.
+ +
+
|
+ +private | +
Species that are treated as algebraic (in QSE) in the QSE groups.
+ +
+
|
+ +private | +
The base engine to which this view delegates calculations.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
The simplified set of species presented to the solver (the "slow" species).
+ +
+
|
+ +private | +
Logger instance for logging messages.
+ +
+
|
+ +private | +
The list of identified equilibrium groups.
+ +
+
|
+ +private | +
A set of solvers, one for each QSE group.
+ +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::MultiscalePartitioningEngineView::QSESolver, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
+Classes | |
| struct | UserData |
+Public Member Functions | |
| QSESolver (const std::vector< fourdst::atomic::Species > &species, const DynamicEngine &engine, SUNContext sun_ctx) | |
| QSESolver (const QSESolver &other)=delete | |
| QSESolver & | operator= (const QSESolver &other)=delete |
| ~QSESolver () | |
| fourdst::composition::Composition | solve (const fourdst::composition::Composition &comp, double T9, double rho) const |
| size_t | solves () const |
| void | log_diagnostics (const QSEGroup &group, const fourdst::composition::Composition &comp) const |
+Static Private Member Functions | |
| static int | sys_func (N_Vector y, N_Vector f, void *user_data) |
| static int | sys_jac (N_Vector y, N_Vector fy, SUNMatrix J, void *user_data, N_Vector tmp1, N_Vector tmp2) |
| static quill::Logger * | getLogger () |
+Private Attributes | |
| size_t | m_solves = 0 |
| bool | m_has_jacobian = false |
| size_t | m_N |
| const DynamicEngine & | m_engine |
| std::vector< fourdst::atomic::Species > | m_species |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_speciesMap |
| SUNContext | m_sun_ctx = nullptr |
| void * | m_kinsol_mem = nullptr |
| N_Vector | m_Y = nullptr |
| N_Vector | m_scale = nullptr |
| N_Vector | m_f_scale = nullptr |
| N_Vector | m_constraints = nullptr |
| N_Vector | m_func_tmpl = nullptr |
| SUNMatrix | m_J = nullptr |
| SUNLinearSolver | m_LS = nullptr |
| gridfire::engine::MultiscalePartitioningEngineView::QSESolver::QSESolver | +( | +const std::vector< fourdst::atomic::Species > & | +species, | +
| + | + | const DynamicEngine & | +engine, | +
| + | + | SUNContext | +sun_ctx | +
| + | ) | ++ |
+
|
+ +delete | +
| gridfire::engine::MultiscalePartitioningEngineView::QSESolver::~QSESolver | +( | +) | ++ |
+
|
+ +inlinestaticprivate | +
| void gridfire::engine::MultiscalePartitioningEngineView::QSESolver::log_diagnostics | +( | +const QSEGroup & | +group, | +
| + | + | const fourdst::composition::Composition & | +comp | +
| + | ) | +const | +
+
|
+ +delete | +
| fourdst::composition::Composition gridfire::engine::MultiscalePartitioningEngineView::QSESolver::solve | +( | +const fourdst::composition::Composition & | +comp, | +
| + | + | double | +T9, | +
| + | + | double | +rho | +
| + | ) | +const | +
| size_t gridfire::engine::MultiscalePartitioningEngineView::QSESolver::solves | +( | +) | +const | +
+
|
+ +staticprivate | +
+
|
+ +staticprivate | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::NetworkJacobian, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
A wrapper class for handling the network Jacobian matrix. + More...
+ +#include <jacobian.h>
+Public Member Functions | |
| NetworkJacobian (const Eigen::SparseMatrix< double > &jacobianMatrix, const std::function< fourdst::atomic::Species(size_t)> &indexToSpeciesFunc) | |
| Constructs a NetworkJacobian with the given sparse matrix and species index mapping function. | |
| NetworkJacobian (const NetworkJacobian &jacobian) | |
| Copy constructor for NetworkJacobian. | |
| NetworkJacobian (NetworkJacobian &&jacobian) noexcept | |
| Copy assignment operator for NetworkJacobian. | |
| NetworkJacobian & | operator= (NetworkJacobian &&jacobian) noexcept |
| Move constructor for NetworkJacobian. | |
| double | operator() (const fourdst::atomic::Species &row, const fourdst::atomic::Species &col) const |
| Accesses the value at the specified row and column corresponding to the given species. | |
| double | operator() (size_t i, size_t j) const |
| Accesses the value at the specified row and column indices. | |
| void | set (const fourdst::atomic::Species &row, const fourdst::atomic::Species &col, double value) |
| Sets the value at the specified row and column corresponding to the given species. | |
| void | set (size_t i, size_t j, double value) |
| Sets the value at the specified row and column indices. | |
| void | set (const JacobianEntry &entry) |
| Sets the value in the Jacobian matrix based on a JacobianEntry. | |
| std::tuple< size_t, size_t > | shape () const |
| Retrieves the shape of the Jacobian matrix as a tuple (rows, columns). | |
| size_t | rank () const |
| Retrieves the rank of the Jacobian matrix. | |
| size_t | nnz () const |
| Get the number of non-zero entries in the Jacobian matrix. | |
| bool | singular () const |
| Checks if the Jacobian matrix is singular. | |
| std::vector< JacobianEntry > | infs () const |
| Retrieves all entries in the Jacobian matrix that are infinite. | |
| std::vector< JacobianEntry > | nans () const |
| Retrieves all entries in the Jacobian matrix that are NaN (Not a Number). | |
| Eigen::SparseMatrix< double > | data () const |
| Provides access to the underlying sparse matrix data. | |
| const std::unordered_map< fourdst::atomic::Species, size_t > & | mapping () const |
| Provides access to the species-to-index mapping. | |
| void | to_csv (const std::string &filename) const |
| Exports the Jacobian matrix to a CSV file. | |
+Private Attributes | |
| Eigen::SparseMatrix< double > | m_jacobianMatrix |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_speciesToIndexMap |
| std::optional< size_t > | m_rank = std::nullopt |
A wrapper class for handling the network Jacobian matrix.
+This class encapsulates an Eigen::SparseMatrix to represent the Jacobian matrix of a reaction network. It provides methods for accessing and modifying matrix entries using species identifiers, as well as utility functions for analyzing the matrix (e.g., checking for singularity, counting non-zero entries).
+
+
|
+ +explicit | +
Constructs a NetworkJacobian with the given sparse matrix and species index mapping function.
+| jacobianMatrix | The sparse matrix representing the Jacobian. |
| indexToSpeciesFunc | A function that maps matrix indices to species identifiers. |
| gridfire::engine::NetworkJacobian::NetworkJacobian | +( | +const NetworkJacobian & | +jacobian | ) | ++ |
Copy constructor for NetworkJacobian.
+| jacobian | The NetworkJacobian instance to copy from. |
+
|
+ +noexcept | +
Copy assignment operator for NetworkJacobian.
+| jacobian | The NetworkJacobian instance to copy from. |
| Eigen::SparseMatrix< double > gridfire::engine::NetworkJacobian::data | +( | +) | +const | +
Provides access to the underlying sparse matrix data.
+| std::vector< JacobianEntry > gridfire::engine::NetworkJacobian::infs | +( | +) | +const | +
Retrieves all entries in the Jacobian matrix that are infinite.
+| const std::unordered_map< fourdst::atomic::Species, size_t > & gridfire::engine::NetworkJacobian::mapping | +( | +) | +const | +
Provides access to the species-to-index mapping.
+| std::vector< JacobianEntry > gridfire::engine::NetworkJacobian::nans | +( | +) | +const | +
Retrieves all entries in the Jacobian matrix that are NaN (Not a Number).
+| size_t gridfire::engine::NetworkJacobian::nnz | +( | +) | +const | +
Get the number of non-zero entries in the Jacobian matrix.
+| double gridfire::engine::NetworkJacobian::operator() | +( | +const fourdst::atomic::Species & | +row, | +
| + | + | const fourdst::atomic::Species & | +col | +
| + | ) | +const | +
Accesses the value at the specified row and column corresponding to the given species.
+| row | Species for the row |
| col | Species for the column |
| double gridfire::engine::NetworkJacobian::operator() | +( | +size_t | +i, | +
| + | + | size_t | +j | +
| + | ) | +const | +
Accesses the value at the specified row and column indices.
+| i | Row index |
| j | Column index |
+
|
+ +noexcept | +
Move constructor for NetworkJacobian.
+| jacobian | The NetworkJacobian instance to move from. |
| size_t gridfire::engine::NetworkJacobian::rank | +( | +) | +const | +
Retrieves the rank of the Jacobian matrix.
+| void gridfire::engine::NetworkJacobian::set | +( | +const fourdst::atomic::Species & | +row, | +
| + | + | const fourdst::atomic::Species & | +col, | +
| + | + | double | +value | +
| + | ) | ++ |
Sets the value at the specified row and column corresponding to the given species.
+| row | Row species |
| col | Column species |
| value | Value to set |
| void gridfire::engine::NetworkJacobian::set | +( | +const JacobianEntry & | +entry | ) | ++ |
Sets the value in the Jacobian matrix based on a JacobianEntry.
+| entry | The JacobianEntry containing row species, column species, and value. |
| void gridfire::engine::NetworkJacobian::set | +( | +size_t | +i, | +
| + | + | size_t | +j, | +
| + | + | double | +value | +
| + | ) | ++ |
Sets the value at the specified row and column indices.
+| i | Row index |
| j | Column index |
| value | Value to set |
| std::tuple< size_t, size_t > gridfire::engine::NetworkJacobian::shape | +( | +) | +const | +
Retrieves the shape of the Jacobian matrix as a tuple (rows, columns).
+| bool gridfire::engine::NetworkJacobian::singular | +( | +) | +const | +
Checks if the Jacobian matrix is singular.
+| void gridfire::engine::NetworkJacobian::to_csv | +( | +const std::string & | +filename | ) | +const | +
Exports the Jacobian matrix to a CSV file.
+| filename | The name of the CSV file to export to. |
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::engine::NetworkPrimingEngineView, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Provides a view of a DynamicEngine filtered to reactions involving a specified priming species. + More...
+ +#include <engine_priming.h>
+Public Member Functions | |
| NetworkPrimingEngineView (const std::string &primingSymbol, GraphEngine &baseEngine) | |
| Constructs the view by looking up the priming species by symbol. | |
| NetworkPrimingEngineView (const fourdst::atomic::Species &primingSpecies, GraphEngine &baseEngine) | |
| Constructs the view using an existing Species object. | |
Public Member Functions inherited from gridfire::engine::DefinedEngineView | |
| DefinedEngineView (const std::vector< std::string > &peNames, GraphEngine &baseEngine) | |
| const DynamicEngine & | getBaseEngine () const override |
| Get the base engine associated with this defined engine view. | |
| const std::vector< fourdst::atomic::Species > & | getNetworkSpecies () const override |
| Gets the list of active species in the network defined by the file. | |
| std::expected< StepDerivatives< double >, engine::EngineStatus > | calculateRHSAndEnergy (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the right-hand side (dY/dt) and energy generation for the active species. | |
| EnergyDerivatives | calculateEpsDerivatives (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculate the derivatives of the energy generation rate with respect to T and rho. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Generates the Jacobian matrix for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const std::vector< fourdst::atomic::Species > &activeSpecies) const override |
| Generates the Jacobian matrix for the active species. | |
| NetworkJacobian | generateJacobianMatrix (const fourdst::composition::CompositionAbstract &comp, double T9, double rho, const SparsityPattern &sparsityPattern) const override |
| Generates the Jacobian matrix for a given sparsity pattern. | |
| void | generateStoichiometryMatrix () override |
| Generates the stoichiometry matrix for the active reactions and species. | |
| int | getStoichiometryMatrixEntry (const fourdst::atomic::Species &species, const reaction::Reaction &reaction) const override |
| Gets an entry from the stoichiometry matrix for the active species and reactions. | |
| double | calculateMolarReactionFlow (const reaction::Reaction &reaction, const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Calculates the molar reaction flow for a given reaction in the active network. | |
| const reaction::ReactionSet & | getNetworkReactions () const override |
| Gets the set of active logical reactions in the network. | |
| void | setNetworkReactions (const reaction::ReactionSet &reactions) override |
| Sets the active reactions in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes timescales for all active species in the network. | |
| std::expected< std::unordered_map< fourdst::atomic::Species, double >, engine::EngineStatus > | getSpeciesDestructionTimescales (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Computes destruction timescales for all active species in the network. | |
| fourdst::composition::Composition | update (const NetIn &netIn) override |
| Updates the engine view if it is marked as stale. | |
| bool | isStale (const NetIn &netIn) override |
| Checks if the engine view is stale. | |
| void | setScreeningModel (screening::ScreeningType model) override |
| Sets the screening model for the base engine. | |
| screening::ScreeningType | getScreeningModel () const override |
| Gets the screening model from the base engine. | |
| size_t | getSpeciesIndex (const fourdst::atomic::Species &species) const override |
| Maps a species from the full network to its index in the defined active network. | |
| std::vector< double > | mapNetInToMolarAbundanceVector (const NetIn &netIn) const override |
| Map from a NetIn object to a vector of molar abundances for the active species. | |
| PrimingReport | primeEngine (const NetIn &netIn) override |
| Prime the engine view for calculations. This will delegate to the base engine. | |
| fourdst::composition::Composition | collectComposition (const fourdst::composition::CompositionAbstract &comp, double T9, double rho) const override |
| Collects a Composition object from the base engine. | |
| SpeciesStatus | getSpeciesStatus (const fourdst::atomic::Species &species) const override |
| Gets the status of a species in the active network. | |
Public Member Functions inherited from gridfire::engine::DynamicEngine | |
| virtual BuildDepthType | getDepth () const |
| Get the depth of the network. | |
| virtual void | rebuild (const fourdst::composition::CompositionAbstract &comp, BuildDepthType depth) |
| Rebuild the network with a specified depth. | |
Public Member Functions inherited from gridfire::engine::Engine | |
| virtual | ~Engine ()=default |
| Virtual destructor. | |
Public Member Functions inherited from gridfire::engine::EngineView< DynamicEngine > | |
| virtual | ~EngineView ()=default |
| Virtual destructor. | |
+Private Member Functions | |
| std::vector< std::string > | constructPrimingReactionSet (const fourdst::atomic::Species &primingSpecies, const GraphEngine &baseEngine) const |
| Constructs the set of reaction names that involve the priming species. | |
+Private Attributes | |
| quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
| fourdst::atomic::Species | m_primingSpecies |
| The priming species, if specified. | |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::engine::DefinedEngineView | |
| bool | m_isStale = true |
| GraphEngine & | m_baseEngine |
Provides a view of a DynamicEngine filtered to reactions involving a specified priming species.
+This view constructs a subset of the network reactions from the base engine that contain the given priming species and delegates all engine operations to the underlying engine.
+See implementation in engine_priming.cpp for details on reaction set construction.
+| gridfire::engine::NetworkPrimingEngineView::NetworkPrimingEngineView | +( | +const std::string & | +primingSymbol, | +
| + | + | GraphEngine & | +baseEngine | +
| + | ) | ++ |
Constructs the view by looking up the priming species by symbol.
+| primingSymbol | Symbol string of the species to prime. |
| baseEngine | Reference to the base DynamicEngine to wrap. |
| std::out_of_range | If primingSymbol is not found in the species registry. |
| std::runtime_error | If no reactions contain the priming species. |
| gridfire::engine::NetworkPrimingEngineView::NetworkPrimingEngineView | +( | +const fourdst::atomic::Species & | +primingSpecies, | +
| + | + | GraphEngine & | +baseEngine | +
| + | ) | ++ |
Constructs the view using an existing Species object.
+| primingSpecies | The species object to prime. |
| baseEngine | Reference to the base DynamicEngine to wrap. |
| std::runtime_error | If no reactions contain the priming species. |
+
|
+ +private | +
Constructs the set of reaction names that involve the priming species.
+| primingSpecies | Species for which to collect priming reactions. |
| baseEngine | Base engine containing the full network of reactions. |
| std::runtime_error | If no reactions involve the priming species. |
+
|
+ +private | +
+
|
+ +private | +
The priming species, if specified.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::BadCollectionError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for invalid composition collection in the engine. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for invalid composition collection in the engine.
+This exception is thrown when the engine encounters an invalid state while trying to collect the composition from the entire engine stack
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::BadRHSEngineError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for errors in calculating the right-hand side (RHS). + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for errors in calculating the right-hand side (RHS).
+This exception is thrown when the engine encounters an error while calculating the right-hand side of the reaction network equations.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::CVODESolverFailureError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::SolverError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for failures in the CVODE solver. + More...
+ +#include <error_solver.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for failures in the CVODE solver.
+This exception is thrown when the CVODE solver from the SUNDIALS suite encounters a failure during its operation.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::DebugException, including all inherited members.
+| DebugException(const std::string_view message, const std::source_location loc=std::source_location::current()) | gridfire::exceptions::DebugException | inlineexplicit |
| format_error(std::string_view message, const std::source_location loc) | gridfire::exceptions::DebugException | inlineprivatestatic |
| GridFireError(std::string msg) | gridfire::exceptions::GridFireError | inlineexplicit |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception class for debug-only errors. + More...
+ +#include <error_debug.h>
+Public Member Functions | |
| DebugException (const std::string_view message, const std::source_location loc=std::source_location::current()) | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
+Static Private Member Functions | |
| static std::string | format_error (std::string_view message, const std::source_location loc) |
Exception class for debug-only errors.
+This exception is intended to be used for errors that should only occur during development and debugging. In release builds, attempts to throw this exception will result in a compilation error.
+Example usage:
+
|
+ +inlineexplicit | +
+
|
+ +inlinestaticprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::EngineError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for engine-related exceptions. + More...
+ +#include <error_engine.h>
+Private Member Functions | |
| GridFireError (std::string msg) | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Base class for engine-related exceptions.
+This class serves as the base for all exceptions specific to the reaction network engine in the GridFire library. It extends the GridFireError class and allows for custom error messages related to engine operations.
+
+
|
+ +inlineexplicitprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::FailedToPartitionEngineError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for failures in partitioning the engine. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for failures in partitioning the engine.
+This exception is thrown when the engine fails to partition the reaction network as required for certain calculations or optimizations.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::GridFireError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::GridFireError | inlineexplicit |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for GridFire exceptions. + More...
+ +#include <error_gridfire.h>
+Public Member Functions | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
+Private Attributes | |
| std::string | m_msg |
Base class for GridFire exceptions.
+This class serves as the base for all exceptions specific to the GridFire library. It extends the standard std::exception class and allows for custom error messages.
+
+
|
+ +inlineexplicit | +
+
|
+ +inlineoverridenoexcept | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::HashingError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::UtilityError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception class for hashing-related errors in GridFire. + More...
+ +#include <error_utils.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception class for hashing-related errors in GridFire.
+This class is used to represent errors that occur during hashing operations.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::IllConditionedJacobianError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::SolverError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception thrown when the Jacobian matrix is ill-conditioned. + More...
+ +#include <error_solver.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception thrown when the Jacobian matrix is ill-conditioned.
+This exception is thrown when the solver detects that the Jacobian matrix is ill-conditioned, which may lead to inaccurate or unstable solutions.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::InvalidQSESolutionError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for invalid QSE solution in the engine. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for invalid QSE solution in the engine.
+This exception is thrown when the engine computes an invalid solution while performing Quasi-Statistical Equilibrium (QSE) calculations.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::JacobianError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for Jacobian-related exceptions. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Base class for Jacobian-related exceptions.
+This class serves as the base for all exceptions specific to Jacobian matrix operations in the reaction network engine.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::KINSolSolverFailureError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::SolverError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for failures in the KINSOL solver. + More...
+ +#include <error_solver.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for failures in the KINSOL solver.
+This exception is thrown when the KINSOL solver from the SUNDIALS suite encounters a failure during its operation.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::MissingBaseReactionError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::PolicyError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception thrown when a required reaction is missing from the underlying database (e.g., REACLIB). + More...
+ +#include <error_policy.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception thrown when a required reaction is missing from the underlying database (e.g., REACLIB).
+This typically occurs during the construction of a ReactionChainPolicy if the reaction library used by GridFire does not contain a reaction specified by the policy.
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::MissingKeyReactionError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::PolicyError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception thrown when a constructed network fails to include a key reaction required by the policy. + More...
+ +#include <error_policy.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception thrown when a constructed network fails to include a key reaction required by the policy.
+This error is typically thrown from the construct() method of a NetworkPolicy after the network has been built but fails the final verification step.
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::MissingSeedSpeciesError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::PolicyError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception thrown when a required seed species is not found in the initial composition. + More...
+ +#include <error_policy.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception thrown when a required seed species is not found in the initial composition.
+This error occurs when a NetworkPolicy is initialized with a composition that lacks one or more of the essential species needed to construct the network.
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::NetworkResizedError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for errors during network resizing. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for errors during network resizing.
+This exception is thrown when the engine encounters an error while attempting to resize the reaction network, such as when adding or removing species or reactions.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::PolicyError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::PolicyError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for all exceptions related to network policy operations. + More...
+ +#include <error_policy.h>
+Private Member Functions | |
| GridFireError (std::string msg) | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Base class for all exceptions related to network policy operations.
+This exception is the parent for more specific policy-related errors. Catching this type will catch any exception originating from the policy system.
+
+
|
+ +inlineexplicitprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::ReactionError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::GridFireError | inlineexplicit |
| m_message | gridfire::exceptions::ReactionError | private |
| m_msg | gridfire::exceptions::GridFireError | private |
| m_reactionID | gridfire::exceptions::ReactionError | private |
| ReactionError(const std::string &msg, const std::string &reactionId) | gridfire::exceptions::ReactionError | inline |
| what() const noexcept override | gridfire::exceptions::ReactionError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for all exceptions related to reaction operations. + More...
+ +#include <error_reaction.h>
+Public Member Functions | |
| ReactionError (const std::string &msg, const std::string &reactionId) | |
| const char * | what () const noexcept override |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
+Private Attributes | |
| std::string | m_message |
| std::string | m_reactionID |
Base class for all exceptions related to reaction operations.
+This exception is the parent for more specific reaction-related errors. Catching this type will catch any exception originating from reaction handling.
+
+
|
+ +inline | +
+
|
+ +inlineoverridenoexcept | +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::ReactionParsingError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::GridFireError | inlineexplicit |
| m_message | gridfire::exceptions::ReactionError | private |
| m_msg | gridfire::exceptions::GridFireError | private |
| m_reactionID | gridfire::exceptions::ReactionError | private |
| ReactionError(const std::string &msg, const std::string &reactionId) | gridfire::exceptions::ReactionParsingError | inlineprivate |
| what() const noexcept override | gridfire::exceptions::ReactionError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <error_reaction.h>
+Private Member Functions | |
| ReactionError (const std::string &msg, const std::string &reactionId) | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::ReactionError | |
| ReactionError (const std::string &msg, const std::string &reactionId) | |
| const char * | what () const noexcept override |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
+
|
+ +inlineprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::SUNDIALSError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::SolverError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for exceptions related to SUNDIALS solver operations. + More...
+ +#include <error_solver.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Base class for exceptions related to SUNDIALS solver operations.
+This class serves as the base for all exceptions specific to SUNDIALS solver errors in the GridFire library.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::SingularJacobianError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::SolverError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception thrown when the Jacobian matrix is singular. + More...
+ +#include <error_solver.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception thrown when the Jacobian matrix is singular.
+This exception is thrown when the solver encounters a singular Jacobian matrix, which prevents it from proceeding with the solution of the system.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::SolverError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::SolverError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for all exceptions related to solver operations. + More...
+ +#include <error_solver.h>
+Private Member Functions | |
| GridFireError (std::string msg) | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Base class for all exceptions related to solver operations.
+This exception is the parent for more specific solver-related errors. Catching this type will catch any exception originating from the solver system.
+
+
|
+ +inlineexplicitprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::StaleJacobianError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for stale Jacobian matrix access. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for stale Jacobian matrix access.
+This exception is thrown when an attempt is made to access a Jacobian matrix that is stale and needs to be regenerated.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::UnableToSetNetworkReactionsError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for failures in setting network reactions. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for failures in setting network reactions.
+This exception is thrown when the engine fails to properly set or initialize the reactions in the reaction network.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::UninitializedJacobianError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for uninitialized Jacobian matrix access. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for uninitialized Jacobian matrix access.
+This exception is thrown when an attempt is made to access a Jacobian matrix that has not been initialized.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::UnknownJacobianError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::EngineError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Exception for unknown Jacobian matrix access. + More...
+ +#include <error_engine.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Exception for unknown Jacobian matrix access.
+This exception is thrown when an attempt is made to access a Jacobian matrix that is unknown or not recognized by the engine.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::exceptions::UtilityError, including all inherited members.
+| GridFireError(std::string msg) | gridfire::exceptions::UtilityError | inlineexplicitprivate |
| m_msg | gridfire::exceptions::GridFireError | private |
| what() const noexcept override | gridfire::exceptions::GridFireError | inline |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for utility-related errors in GridFire. + More...
+ +#include <error_utils.h>
+Private Member Functions | |
| GridFireError (std::string msg) | |
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::exceptions::GridFireError | |
| GridFireError (std::string msg) | |
| const char * | what () const noexcept override |
Base class for utility-related errors in GridFire.
+This class serves as a base for all exceptions related to utility functions
+
+
|
+ +inlineexplicitprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::io::MESANetworkFileParser, including all inherited members.
+| Config typedef | gridfire::io::MESANetworkFileParser | private |
| LogManager typedef | gridfire::io::MESANetworkFileParser | private |
| m_config | gridfire::io::MESANetworkFileParser | private |
| m_filename | gridfire::io::MESANetworkFileParser | private |
| m_logger | gridfire::io::MESANetworkFileParser | private |
| MESANetworkFileParser(const std::string &filename) | gridfire::io::MESANetworkFileParser | explicit |
| parse(const std::string &filename) const override | gridfire::io::MESANetworkFileParser | virtual |
| ~NetworkFileParser()=default | gridfire::io::NetworkFileParser | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
A parser for MESA-format network files. + More...
+ +#include <network_file.h>
+Public Member Functions | |
| MESANetworkFileParser (const std::string &filename) | |
| Constructs a MESANetworkFileParser. | |
| ParsedNetworkData | parse (const std::string &filename) const override |
| Parses a MESA-format network file. | |
Public Member Functions inherited from gridfire::io::NetworkFileParser | |
| virtual | ~NetworkFileParser ()=default |
| Virtual destructor for the base class. | |
+Private Types | |
| using | Config = fourdst::config::Config |
| using | LogManager = fourdst::logging::LogManager |
+Private Attributes | |
| Config & | m_config = Config::getInstance() |
| quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
| std::string | m_filename |
A parser for MESA-format network files.
+This class is designed to parse reaction network files that follow the format used by the MESA stellar evolution code.
+
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +explicit | +
Constructs a MESANetworkFileParser.
+| filename | The path to the MESA network file. This may be used to pre-configure the parser. |
+
|
+ +overridevirtual | +
Parses a MESA-format network file.
+This method will read and interpret the structure of a MESA network file to extract the list of reactions.
+| filename | The path to the MESA network file. |
ParsedNetworkData struct containing the list of reaction names.| std::runtime_error | If the file cannot be opened or if it contains formatting errors. |
Implements gridfire::io::NetworkFileParser.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::io::NetworkFileParser, including all inherited members.
+| parse(const std::string &filename) const =0 | gridfire::io::NetworkFileParser | pure virtual |
| ~NetworkFileParser()=default | gridfire::io::NetworkFileParser | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
An abstract base class for network file parsers. + More...
+ +#include <network_file.h>
+Public Member Functions | |
| virtual | ~NetworkFileParser ()=default |
| Virtual destructor for the base class. | |
| virtual ParsedNetworkData | parse (const std::string &filename) const =0 |
| Parses a network file and returns the parsed data. | |
An abstract base class for network file parsers.
+This class defines the interface for parsing files that contain reaction network definitions. Derived classes must implement the parse method to handle specific file formats.
+
|
+ +virtualdefault | +
Virtual destructor for the base class.
+ +
+
|
+ +pure virtual | +
Parses a network file and returns the parsed data.
+This is a pure virtual function that must be implemented by derived classes. It takes a filename as input and returns a ParsedNetworkData struct containing the information extracted from the file.
| filename | The path to the network file to parse. |
ParsedNetworkData struct containing the parsed reaction data.| std::runtime_error | If the file cannot be opened or a parsing error occurs. |
Usage
Implemented in gridfire::io::SimpleReactionListFileParser, gridfire::io::MESANetworkFileParser, and PyNetworkFileParser.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::io::SimpleReactionListFileParser, including all inherited members.
+| Config typedef | gridfire::io::SimpleReactionListFileParser | private |
| LogManager typedef | gridfire::io::SimpleReactionListFileParser | private |
| m_config | gridfire::io::SimpleReactionListFileParser | private |
| m_logger | gridfire::io::SimpleReactionListFileParser | private |
| parse(const std::string &filename) const override | gridfire::io::SimpleReactionListFileParser | virtual |
| SimpleReactionListFileParser() | gridfire::io::SimpleReactionListFileParser | explicit |
| ~NetworkFileParser()=default | gridfire::io::NetworkFileParser | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
A parser for simple text files containing a list of reactions. + More...
+ +#include <network_file.h>
+Public Member Functions | |
| SimpleReactionListFileParser () | |
| Constructs a SimpleReactionListFileParser. | |
| ParsedNetworkData | parse (const std::string &filename) const override |
| Parses a simple reaction list file. | |
Public Member Functions inherited from gridfire::io::NetworkFileParser | |
| virtual | ~NetworkFileParser ()=default |
| Virtual destructor for the base class. | |
+Private Types | |
| using | Config = fourdst::config::Config |
| using | LogManager = fourdst::logging::LogManager |
+Private Attributes | |
| Config & | m_config = Config::getInstance() |
| quill::Logger * | m_logger = LogManager::getInstance().getLogger("log") |
A parser for simple text files containing a list of reactions.
+This parser reads a file where each line contains a single reaction name. It supports comments (lines starting with '#') and ignores empty lines.
+
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +explicitdefault | +
Constructs a SimpleReactionListFileParser.
+
+
|
+ +overridevirtual | +
Parses a simple reaction list file.
+This method reads the specified file line by line. It trims whitespace from each line, ignores lines that are empty or start with a '#' comment character, and stores the remaining lines as reaction names.
+| filename | The path to the simple reaction list file. |
ParsedNetworkData struct containing the list of reaction names.| std::runtime_error | If the file cannot be opened for reading. |
Algorithm
ParsedNetworkData struct.Usage
Implements gridfire::io::NetworkFileParser.
+ +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::partition::CompositePartitionFunction, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Combines multiple PartitionFunction instances into a single composite strategy. + More...
+ +#include <partition_composite.h>
+Public Member Functions | |
| CompositePartitionFunction (const std::vector< BasePartitionType > &partitionFunctions) | |
| CompositePartitionFunction (const CompositePartitionFunction &other) | |
| double | evaluate (int z, int a, double T9) const override |
| double | evaluateDerivative (int z, int a, double T9) const override |
| bool | supports (int z, int a) const override |
| std::string | type () const override |
| std::unique_ptr< PartitionFunction > | clone () const override |
Public Member Functions inherited from gridfire::partition::PartitionFunction | |
| virtual | ~PartitionFunction ()=default |
| Virtual destructor. | |
+Private Member Functions | |
| std::unique_ptr< PartitionFunction > | selectPartitionFunction (BasePartitionType type) const |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::vector< std::unique_ptr< PartitionFunction > > | m_partitionFunctions |
| Set of partition functions to use in the composite partition function. | |
| std::unordered_map< uint_fast32_t, const PartitionFunction & > | m_supportCache |
| Cache mapping isotope keys to supporting partition functions for fast lookup. | |
Combines multiple PartitionFunction instances into a single composite strategy.
+Maintains an ordered list of sub-functions and delegates evaluation and derivative calls to the first function that supports the requested isotope.
+See partition_composite.cpp for details on sub-function selection and error logging.
+| std::runtime_error | If no sub-function supports a given (z,a,T9) in evaluate or evaluateDerivative. |
+
|
+ +explicit | +
@brief Construct a composite function from specified types. + + Instantiates sub-functions according to the order of types provided. + @param partitionFunctions List of BasePartitionType identifiers for sub-functions. + @pre partitionFunctions must not be empty. + @post m_partitionFunctions contains instances matching each type. +
| gridfire::partition::CompositePartitionFunction::CompositePartitionFunction | +( | +const CompositePartitionFunction & | +other | ) | ++ |
@brief Copy constructor. + + Creates deep clones of the sub-functions in another composite. + @param other Existing composite to copy from. + @post m_partitionFunctions contains clones of other's sub-functions. +
+
|
+ +inlineoverridevirtual | +
@brief Clone this composite partition function. + + @return Unique pointer to a deep copy of this object. +
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overridevirtual | +
@brief Evaluate the composite partition function. + + Calls evaluate on the first sub-function supporting the isotope. + @param z Atomic number (>=1). + @param a Mass number (>=z). + @param T9 Temperature in 10^9 K. + @return Partition function value from supporting sub-function. + @throws std::runtime_error If no sub-function supports (z,a,T9). +
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overridevirtual | +
@brief Evaluate temperature derivative of the composite function. + + Delegates to the first supporting sub-function's derivative. + @param z Atomic number. + @param a Mass number. + @param T9 Temperature in 10^9 K. + @return d/dT9 of the partition function. + @throws std::runtime_error If no sub-function supports (z,a,T9). +
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +private | +
@brief Instantiate a sub-function by its type. + + @param type Enumeration value selecting the desired function implementation. + @return Unique pointer to a new PartitionFunction instance of the given type. + @throws std::runtime_error If the given type is not recognized. +
+
|
+ +overridevirtual | +
@brief Check support across all sub-functions. + + @param z Atomic number. + @param a Mass number. + @return true if any sub-function supports (z,a); false otherwise. +
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overridevirtual | +
@brief Get composite type identifier. + + Concatenates the type() strings of all sub-functions. + @return A string like "CompositePartitionFunction(func1, func2, ...)". +
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +private | +
+
|
+ +private | +
Set of partition functions to use in the composite partition function.
+ +
+
|
+ +mutableprivate | +
Cache mapping isotope keys to supporting partition functions for fast lookup.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::partition::GroundStatePartitionFunction, including all inherited members.
+| clone() const override | gridfire::partition::GroundStatePartitionFunction | inlinevirtual |
| evaluate(const int z, const int a, const double T9) const override | gridfire::partition::GroundStatePartitionFunction | virtual |
| evaluateDerivative(const int z, const int a, const double T9) const override | gridfire::partition::GroundStatePartitionFunction | virtual |
| GroundStatePartitionFunction() | gridfire::partition::GroundStatePartitionFunction | |
| m_ground_state_spin | gridfire::partition::GroundStatePartitionFunction | private |
| m_logger | gridfire::partition::GroundStatePartitionFunction | private |
| make_key(int z, int a) | gridfire::partition::GroundStatePartitionFunction | privatestatic |
| supports(const int z, const int a) const override | gridfire::partition::GroundStatePartitionFunction | virtual |
| type() const override | gridfire::partition::GroundStatePartitionFunction | inlinevirtual |
| ~PartitionFunction()=default | gridfire::partition::PartitionFunction | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Partition function implementation for nuclear ground states. + More...
+ +#include <partition_ground.h>
+Public Member Functions | |
| GroundStatePartitionFunction () | |
| double | evaluate (const int z, const int a, const double T9) const override |
| double | evaluateDerivative (const int z, const int a, const double T9) const override |
| bool | supports (const int z, const int a) const override |
| std::string | type () const override |
| std::unique_ptr< PartitionFunction > | clone () const override |
Public Member Functions inherited from gridfire::partition::PartitionFunction | |
| virtual | ~PartitionFunction ()=default |
| Virtual destructor. | |
+Static Private Member Functions | |
| static constexpr int | make_key (int z, int a) |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::unordered_map< int, double > | m_ground_state_spin |
Partition function implementation for nuclear ground states.
+Computes the partition function as (2J + 1) based on the ground state spin J of each isotope. The temperature derivative is always zero. Ground state spins are loaded from the fourdst::atomic::species registry at construction.
| gridfire::partition::GroundStatePartitionFunction::GroundStatePartitionFunction | +( | +) | ++ |
@brief Construct and populate the ground state spin map. +
+
|
+ +inlineoverridevirtual | +
@brief Create a deep copy of this partition function. + @return Unique_ptr to a new GroundStatePartitionFunction cloned from this object. + @post Caller owns the returned instance. +
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overridevirtual | +
@brief Evaluate the ground state partition function. +
| z | Proton number (atomic number) of the isotope; must be >= 1. |
| a | Mass number of the isotope; must be >= z. |
| T9 | Temperature in units of 10^9 K; unused for ground state. |
| std::out_of_range | If the isotope key is not found in m_ground_state_spin. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overridevirtual | +
@brief Evaluate the temperature derivative of the ground state partition function. +
| z | Proton number of the isotope; must be supported. |
| a | Mass number of the isotope; must be supported. |
| T9 | Temperature in units of 10^9 K; unused. |
| std::out_of_range | If the isotope key is not found. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +staticconstexprprivate | +
@brief Generate a unique lookup key for an isotope. +
| z | Proton number of the isotope. |
| a | Mass number of the isotope; should be < 1000 to avoid collisions. |
+
|
+ +overridevirtual | +
@brief Check if ground state data exists for the given isotope. +
| z | Proton number of the isotope. |
| a | Mass number of the isotope. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +inlineoverridevirtual | +
@brief Get the type identifier of this partition function. + @return The string literal "GroundState". + @post No side effects. +
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::partition::PartitionFunction, including all inherited members.
+| clone() const =0 | gridfire::partition::PartitionFunction | pure virtual |
| evaluate(int z, int a, double T9) const =0 | gridfire::partition::PartitionFunction | pure virtual |
| evaluateDerivative(int z, int a, double T9) const =0 | gridfire::partition::PartitionFunction | pure virtual |
| supports(int z, int a) const =0 | gridfire::partition::PartitionFunction | pure virtual |
| type() const =0 | gridfire::partition::PartitionFunction | pure virtual |
| ~PartitionFunction()=default | gridfire::partition::PartitionFunction | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Abstract interface for evaluating nuclear partition functions. + More...
+ +#include <partition_abstract.h>
+Public Member Functions | |
| virtual | ~PartitionFunction ()=default |
| Virtual destructor. | |
| virtual double | evaluate (int z, int a, double T9) const =0 |
| Evaluate the partition function for a given isotope. | |
| virtual double | evaluateDerivative (int z, int a, double T9) const =0 |
| Evaluate the temperature derivative of the partition function. | |
| virtual bool | supports (int z, int a) const =0 |
| Check if this partition function supports an isotope. | |
| virtual std::string | type () const =0 |
| Get the human-readable type of this partition function. | |
| virtual std::unique_ptr< PartitionFunction > | clone () const =0 |
| Create a deep copy of this PartitionFunction. | |
Abstract interface for evaluating nuclear partition functions.
+Provides methods to compute the partition function and its temperature derivative for a given isotope, to query if the function supports that isotope, and to clone the function object. Concrete implementations must provide temperature- dependent statistical models.
+
+
|
+ +virtualdefault | +
Virtual destructor.
+Ensures proper cleanup in derived classes.
+ +
+
|
+ +pure virtual | +
Create a deep copy of this PartitionFunction.
+Implemented in gridfire::partition::CompositePartitionFunction, gridfire::partition::GroundStatePartitionFunction, gridfire::partition::RauscherThielemannPartitionFunction, and PyPartitionFunction.
+ +
+
|
+ +pure virtual | +
Evaluate the partition function for a given isotope.
+| z | Proton number (atomic number) of the isotope; must be >= 1. |
| a | Mass number of the isotope; must be >= z. |
| T9 | Temperature in units of 10^9 K; must be > 0. |
Implemented in gridfire::partition::GroundStatePartitionFunction, gridfire::partition::CompositePartitionFunction, gridfire::partition::RauscherThielemannPartitionFunction, and PyPartitionFunction.
+ +
+
|
+ +pure virtual | +
Evaluate the temperature derivative of the partition function.
+Computes d/dT (partition function) at the given parameters.
+| z | Proton number (atomic number) of the isotope; must be >= 1. |
| a | Mass number of the isotope; must be >= z. |
| T9 | Temperature in units of 10^9 K; must be > 0. |
Implemented in gridfire::partition::GroundStatePartitionFunction, gridfire::partition::CompositePartitionFunction, gridfire::partition::RauscherThielemannPartitionFunction, and PyPartitionFunction.
+ +
+
|
+ +pure virtual | +
Check if this partition function supports an isotope.
+| z | Proton number of the isotope. |
| a | Mass number of the isotope. |
Implemented in gridfire::partition::GroundStatePartitionFunction, gridfire::partition::CompositePartitionFunction, gridfire::partition::RauscherThielemannPartitionFunction, and PyPartitionFunction.
+ +
+
|
+ +pure virtual | +
Get the human-readable type of this partition function.
+Implemented in gridfire::partition::CompositePartitionFunction, gridfire::partition::GroundStatePartitionFunction, gridfire::partition::RauscherThielemannPartitionFunction, and PyPartitionFunction.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::partition::RauscherThielemannPartitionFunction, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Partition function using Rauscher-Thielemann tabulated normalized G-values. + More...
+ +#include <partition_rauscher_thielemann.h>
+Classes | |
| struct | IdentifiedIsotope |
| struct | InterpolationPoints |
| struct | IsotopeData |
+Public Member Functions | |
| RauscherThielemannPartitionFunction () | |
| Construct and populate partition data. | |
| double | evaluate (int z, int a, double T9) const override |
| Evaluate partition function for isotope at temperature. | |
| double | evaluateDerivative (int z, int a, double T9) const override |
| Evaluate temperature derivative of partition function. | |
| bool | supports (int z, int a) const override |
| Check if partition data exists for given isotope. | |
| std::string | type () const override |
| Get type identifier for this partition function. | |
| std::unique_ptr< PartitionFunction > | clone () const override |
| Clone this partition function instance. | |
Public Member Functions inherited from gridfire::partition::PartitionFunction | |
| virtual | ~PartitionFunction ()=default |
| Virtual destructor. | |
+Private Types | |
| enum | Bounds { FRONT +, BACK +, MIDDLE + } |
| Indicator for temperature grid bound position. More... | |
+Private Member Functions | |
| IdentifiedIsotope | find (int z, int a, double T9) const |
| Identify isotope entry and grid indices for given T9. | |
+Static Private Member Functions | |
| static InterpolationPoints | get_interpolation_points (const size_t upper_index, const size_t lower_index, const std::array< double, 24 > &normalized_g_values) |
| Get interpolation points from normalized G array. | |
| static constexpr int | make_key (int z, int a) |
| Generate integer key for isotope (z,a). | |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::unordered_map< int, IsotopeData > | m_partitionData |
| Map of isotope key to data. | |
Partition function using Rauscher-Thielemann tabulated normalized G-values.
+Loads isotope partition data from embedded records and computes values by selecting boundary data or interpolating between grid points on a fixed T9 grid. Implementation in partition_rauscher_thielemann.cpp.
+| std::out_of_range | If requested isotope data is missing. |
+
|
+ +private | +
| gridfire::partition::RauscherThielemannPartitionFunction::RauscherThielemannPartitionFunction | +( | +) | ++ |
Construct and populate partition data.
+Reads embedded RT partition data records and fills m_partitionData.
+
|
+ +inlineoverridevirtual | +
Clone this partition function instance.
+Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overridevirtual | +
Evaluate partition function for isotope at temperature.
+Retrieves boundary or interpolated normalized G-value and scales by (2J+1).
| z | Atomic number of the isotope (>=1). |
| a | Mass number of the isotope (>=z). |
| T9 | Temperature in units of 10^9 K. |
| std::out_of_range | If isotope key not found in m_partitionData. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +overridevirtual | +
Evaluate temperature derivative of partition function.
+Zero at grid extremes; otherwise derivative of linear interpolation.
| z | Atomic number (>=1). |
| a | Mass number (>=z). |
| T9 | Temperature in 10^9 K. |
| std::out_of_range | If isotope data is missing. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +private | +
Identify isotope entry and grid indices for given T9.
+| z | Atomic number of isotope. |
| a | Mass number of isotope. |
| T9 | Temperature in 10^9 K. |
| std::out_of_range | If isotope not found in m_partitionData. |
+
|
+ +staticprivate | +
Get interpolation points from normalized G array.
+| upper_index | Index of upper grid point. |
| lower_index | Index of lower grid point. |
| normalized_g_values | Array of normalized G values. |
+
|
+ +staticconstexprprivate | +
Generate integer key for isotope (z,a).
+| z | Atomic number. |
| a | Mass number (<1000). |
+
|
+ +overridevirtual | +
Check if partition data exists for given isotope.
+| z | Atomic number. |
| a | Mass number. |
Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +inlineoverridevirtual | +
Get type identifier for this partition function.
+Implements gridfire::partition::PartitionFunction.
+ +
+
|
+ +private | +
+
|
+ +private | +
Map of isotope key to data.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::CNOChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
CNO Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| CNOChainPolicy () | |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::MultiReactionChainPolicy | |
| MultiReactionChainPolicy (std::vector< std::unique_ptr< ReactionChainPolicy > > &&chain_policies) | |
| Constructs a MultiReactionChainPolicy from a vector of ReactionChainPolicy instances. | |
| const std::vector< std::unique_ptr< ReactionChainPolicy > > & | get_chain_policies () const |
| Returns the vector of child ReactionChainPolicy instances. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Returns the combined ReactionSet of all child chain policies. | |
| bool | contains (const std::string &id) const override |
| Checks if the MultiReactionChainPolicy contains a reaction by ID. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Checks if the MultiReactionChainPolicy contains a specific reaction. | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| Creates a deep copy of the MultiReactionChainPolicy. | |
| std::string | name () const override |
| Returns the name of the MultiReactionChainPolicy. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash value for the MultiReactionChainPolicy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality comparison operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality comparison operator. | |
| size_t | size () const |
| Returns the number of child ReactionChainPolicy instances. | |
| auto | begin () |
| Returns iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | begin () const |
| Returns const iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | end () |
| Returns iterator to the end of the child ReactionChainPolicy instances. | |
| auto | end () const |
| Returns const iterator to the end of the child ReactionChainPolicy instances. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::MultiReactionChainPolicy | |
| std::vector< std::unique_ptr< ReactionChainPolicy > > | m_chain_policies {} |
| Child chain policies. | |
| reaction::ReactionSet | m_reactions |
| Combined reactions from all child policies. | |
CNO Chain Policy.
+This class implements the overall CNO cycle of nuclear reactions, combining the CNO I, II, III, and IV chains. Enforcing this chain in the policy will ensure that all the CNO reactions are included in the network.
+| gridfire::policy::CNOChainPolicy::CNOChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::CNOIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
CNO I Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| CNOIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
CNO I Chain Policy.
+This class implements the CNO I cycle of nuclear reactions. This chain's minimum temperature is set to T9=0.001 (or 1e6K). This chain includes reactions:
| gridfire::policy::CNOIChainPolicy::CNOIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::CNOIIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
CNO II Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| CNOIIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
CNO II Chain Policy.
+This class implements the CNO II cycle of nuclear reactions. This chain's minimum temperature is set to T9=0.001 (or 1e6K). This chain includes reactions:
| gridfire::policy::CNOIIChainPolicy::CNOIIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::CNOIIIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
CNO III Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| CNOIIIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
CNO III Chain Policy.
+This class implements the CNO III cycle of nuclear reactions. This chain's minimum temperature is set to T9=0.001 (or 1e6K). This chain includes reactions:
| gridfire::policy::CNOIIIChainPolicy::CNOIIIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::CNOIVChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
CNO IV Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| CNOIVChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
CNO IV Chain Policy.
+This class implements the CNO IV cycle of nuclear reactions. This chain's minimum temperature is set to T9=0.001 (or 1e6K). This chain includes reactions:
| gridfire::policy::CNOIVChainPolicy::CNOIVChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::HotCNOChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Hot CNO Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| HotCNOChainPolicy () | |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::MultiReactionChainPolicy | |
| MultiReactionChainPolicy (std::vector< std::unique_ptr< ReactionChainPolicy > > &&chain_policies) | |
| Constructs a MultiReactionChainPolicy from a vector of ReactionChainPolicy instances. | |
| const std::vector< std::unique_ptr< ReactionChainPolicy > > & | get_chain_policies () const |
| Returns the vector of child ReactionChainPolicy instances. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Returns the combined ReactionSet of all child chain policies. | |
| bool | contains (const std::string &id) const override |
| Checks if the MultiReactionChainPolicy contains a reaction by ID. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Checks if the MultiReactionChainPolicy contains a specific reaction. | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| Creates a deep copy of the MultiReactionChainPolicy. | |
| std::string | name () const override |
| Returns the name of the MultiReactionChainPolicy. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash value for the MultiReactionChainPolicy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality comparison operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality comparison operator. | |
| size_t | size () const |
| Returns the number of child ReactionChainPolicy instances. | |
| auto | begin () |
| Returns iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | begin () const |
| Returns const iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | end () |
| Returns iterator to the end of the child ReactionChainPolicy instances. | |
| auto | end () const |
| Returns const iterator to the end of the child ReactionChainPolicy instances. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::MultiReactionChainPolicy | |
| std::vector< std::unique_ptr< ReactionChainPolicy > > | m_chain_policies {} |
| Child chain policies. | |
| reaction::ReactionSet | m_reactions |
| Combined reactions from all child policies. | |
Hot CNO Chain Policy.
+This class implements the overall Hot CNO cycle of nuclear reactions, combining the Hot CNO I, II, and III chains. Enforcing this chain in the policy will ensure that all the Hot CNO reactions are included in the network.
+| gridfire::policy::HotCNOChainPolicy::HotCNOChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::HotCNOIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Hot CNO I Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| HotCNOIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Hot CNO I Chain Policy.
+This class implements the Hot CNO I cycle of nuclear reactions. This chain's minimum temperature is set to T9=0.1 (or 1e8K). This chain includes reactions:
| gridfire::policy::HotCNOIChainPolicy::HotCNOIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::HotCNOIIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Hot CNO II Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| HotCNOIIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Hot CNO II Chain Policy.
+This class implements the Hot CNO II cycle of nuclear reactions. This chain's minimum temperature is set to T9=0.1 (or 1e8K). This chain includes reactions:
| gridfire::policy::HotCNOIIChainPolicy::HotCNOIIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::HotCNOIIIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Hot CNO III Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| HotCNOIIIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Hot CNO III Chain Policy.
+This class implements the Hot CNO III cycle of nuclear reactions. This chain's minimum temperature is set to T9=0.1 (or 1e8K). This chain includes reactions:
| gridfire::policy::HotCNOIIIChainPolicy::HotCNOIIIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::MainSequencePolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
A NetworkPolicy for building reaction networks suitable for low-mass main-sequence stars. + More...
+ +#include <stellar_policy.h>
+Public Member Functions | |
| MainSequencePolicy (const fourdst::composition::Composition &composition) | |
| Constructs the policy from an existing composition object. | |
| MainSequencePolicy (std::vector< fourdst::atomic::Species > seed_species, const std::vector< double > &mass_fractions) | |
| Constructs the policy from a list of species and their mass fractions. | |
| std::string | name () const override |
| Returns the name of the policy. | |
| const std::set< fourdst::atomic::Species > & | get_seed_species () const override |
| Returns the set of seed species required by this policy. | |
| const reaction::ReactionSet & | get_seed_reactions () const override |
| Returns the set of seed reactions required by this policy (from the PP and CNO chains). | |
| engine::DynamicEngine & | construct () override |
| Constructs and returns the complete, multi-layered dynamic engine. | |
| NetworkPolicyStatus | get_status () const override |
| Gets the current status of the policy. | |
| const std::vector< std::unique_ptr< engine::DynamicEngine > > & | get_engine_stack () const override |
| std::vector< engine::EngineTypes > | get_engine_types_stack () const override |
| const std::unique_ptr< partition::PartitionFunction > & | get_partition_function () const override |
Public Member Functions inherited from gridfire::policy::NetworkPolicy | |
| virtual | ~NetworkPolicy ()=default |
+Private Member Functions | |
| NetworkPolicyStatus | check_status () const |
+Static Private Member Functions | |
| static std::unique_ptr< partition::PartitionFunction > | build_partition_function () |
+Private Attributes | |
| std::set< fourdst::atomic::Species > | m_seed_species |
| The set of seed species required by this policy. These are H-1, He-3, He-4, C-12, N-14, O-16, Ne-20, Mg-24. | |
| std::unique_ptr< ReactionChainPolicy > | m_reaction_policy = std::make_unique<MainSequenceReactionChainPolicy>() |
| The composed reaction chain policy (PP-chain + CNO-cycle). | |
| fourdst::composition::Composition | m_initializing_composition |
| The initial composition used to build the network. | |
| std::unique_ptr< partition::PartitionFunction > | m_partition_function |
| The partition function used in network construction. | |
| std::vector< std::unique_ptr< engine::DynamicEngine > > | m_network_stack |
| The stack of dynamic engines constructed by the policy. | |
| NetworkPolicyStatus | m_status = NetworkPolicyStatus::UNINITIALIZED |
| The current status of the policy. | |
A NetworkPolicy for building reaction networks suitable for low-mass main-sequence stars.
+This policy ensures that a constructed network contains all necessary species and reactions for modeling the core hydrogen burning phase in low-mass stars, primarily the PP-chain and the CNO-cycle.
+The construct() method builds a stack of engine views (GraphEngine -> MultiscalePartitioningEngineView -> AdaptiveEngineView) to provide a dynamically adjusting, performance-optimized reaction network.
This policy requires the following seed species:
This policy composes the ProtonProtonChainPolicy and CNOChainPolicy to define the required reactions.
+
|
+ +explicit | +
Constructs the policy from an existing composition object.
+| composition | The initial composition, which must contain all seed species required by the policy. |
| exceptions::MissingSeedSpeciesError | if the provided composition is missing a required species. |
+
|
+ +explicit | +
Constructs the policy from a list of species and their mass fractions.
+| seed_species | A vector of atomic species. |
| mass_fractions | A vector of corresponding mass fractions. |
| exceptions::MissingSeedSpeciesError | if the provided species list is missing a required seed species. |
| fourdst::composition::exceptions::CompositionNotFinalizedError | if the internal composition fails to finalize. |
+
|
+ +inlinestaticprivate | +
+
|
+ +inlineprivate | +
+
|
+ +overridevirtual | +
Constructs and returns the complete, multi-layered dynamic engine.
+This method builds the full network engine stack:
GraphEngine is created with the initial composition. This is constructed three layers deep which is sufficient to capture all required reactions. Further a composite ground state and Rauscher Thielemann partition function is used.MultiscalePartitioningEngineView is layered on top for performance optimization. This will put some species into equilibrium groups based on their reaction timescales.AdaptiveEngineView is added as the final layer to dynamically cull reaction pathways based on molar reaction flows.After construction, it verifies that the resulting network meets the policy's requirements.
+AdaptiveEngineView.| exceptions::MissingKeyReactionError | if the final network is missing a required reaction. |
| exceptions::MissingSeedSpeciesError | if the final network is missing a required species. |
| exceptions::PolicyError | on other verification failures. |
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +inlineoverridevirtual | +
Returns the set of seed reactions required by this policy (from the PP and CNO chains).
+Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +inlineoverridevirtual | +
Returns the set of seed species required by this policy.
+Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +inlineoverridevirtual | +
Gets the current status of the policy.
+Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +inlineoverridevirtual | +
Returns the name of the policy.
+Implements gridfire::policy::NetworkPolicy.
+ +
+
|
+ +private | +
The initial composition used to build the network.
+ +
+
|
+ +private | +
The stack of dynamic engines constructed by the policy.
+ +
+
|
+ +private | +
The partition function used in network construction.
+ +
+
|
+ +private | +
The composed reaction chain policy (PP-chain + CNO-cycle).
+ +
+
|
+ +private | +
The set of seed species required by this policy. These are H-1, He-3, He-4, C-12, N-14, O-16, Ne-20, Mg-24.
+ +
+
|
+ +private | +
The current status of the policy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::MainSequenceReactionChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Main Sequence Reaction Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| MainSequenceReactionChainPolicy () | |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::MultiReactionChainPolicy | |
| MultiReactionChainPolicy (std::vector< std::unique_ptr< ReactionChainPolicy > > &&chain_policies) | |
| Constructs a MultiReactionChainPolicy from a vector of ReactionChainPolicy instances. | |
| const std::vector< std::unique_ptr< ReactionChainPolicy > > & | get_chain_policies () const |
| Returns the vector of child ReactionChainPolicy instances. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Returns the combined ReactionSet of all child chain policies. | |
| bool | contains (const std::string &id) const override |
| Checks if the MultiReactionChainPolicy contains a reaction by ID. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Checks if the MultiReactionChainPolicy contains a specific reaction. | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| Creates a deep copy of the MultiReactionChainPolicy. | |
| std::string | name () const override |
| Returns the name of the MultiReactionChainPolicy. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash value for the MultiReactionChainPolicy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality comparison operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality comparison operator. | |
| size_t | size () const |
| Returns the number of child ReactionChainPolicy instances. | |
| auto | begin () |
| Returns iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | begin () const |
| Returns const iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | end () |
| Returns iterator to the end of the child ReactionChainPolicy instances. | |
| auto | end () const |
| Returns const iterator to the end of the child ReactionChainPolicy instances. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::MultiReactionChainPolicy | |
| std::vector< std::unique_ptr< ReactionChainPolicy > > | m_chain_policies {} |
| Child chain policies. | |
| reaction::ReactionSet | m_reactions |
| Combined reactions from all child policies. | |
Main Sequence Reaction Chain Policy.
+This class implements the main sequence reaction chains, combining the Proton-Proton chain and the CNO cycle. Enforcing this chain in the policy will ensure that all the primary reactions for main sequence stars are included in the network.
+| gridfire::policy::MainSequenceReactionChainPolicy::MainSequenceReactionChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::MultiReactionChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
A ReactionChainPolicy composed of multiple child ReactionChainPolicy instances. + More...
+ +#include <policy_logical.h>
+Public Member Functions | |
| MultiReactionChainPolicy (std::vector< std::unique_ptr< ReactionChainPolicy > > &&chain_policies) | |
| Constructs a MultiReactionChainPolicy from a vector of ReactionChainPolicy instances. | |
| const std::vector< std::unique_ptr< ReactionChainPolicy > > & | get_chain_policies () const |
| Returns the vector of child ReactionChainPolicy instances. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Returns the combined ReactionSet of all child chain policies. | |
| bool | contains (const std::string &id) const override |
| Checks if the MultiReactionChainPolicy contains a reaction by ID. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Checks if the MultiReactionChainPolicy contains a specific reaction. | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| Creates a deep copy of the MultiReactionChainPolicy. | |
| std::string | name () const override |
| Returns the name of the MultiReactionChainPolicy. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash value for the MultiReactionChainPolicy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality comparison operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality comparison operator. | |
| size_t | size () const |
| Returns the number of child ReactionChainPolicy instances. | |
| auto | begin () |
| Returns iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | begin () const |
| Returns const iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | end () |
| Returns iterator to the end of the child ReactionChainPolicy instances. | |
| auto | end () const |
| Returns const iterator to the end of the child ReactionChainPolicy instances. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Protected Attributes | |
| std::vector< std::unique_ptr< ReactionChainPolicy > > | m_chain_policies {} |
| Child chain policies. | |
| reaction::ReactionSet | m_reactions |
| Combined reactions from all child policies. | |
A ReactionChainPolicy composed of multiple child ReactionChainPolicy instances.
+Useful for policies that represent a union of several reaction chains (for example the LowMassMainSequenceReactionChainPolicy composes the proton-proton and CNO chains).
+
|
+ +explicit | +
Constructs a MultiReactionChainPolicy from a vector of ReactionChainPolicy instances.
+The provided chain policies are moved into the new MultiReactionChainPolicy instance.
+| chain_policies | vector of unique_ptr to ReactionChainPolicy instances. |
+
|
+ +inline | +
Returns iterator to the beginning of the child ReactionChainPolicy instances.
+
+
|
+ +inline | +
Returns const iterator to the beginning of the child ReactionChainPolicy instances.
+
+
|
+ +overridevirtual | +
Creates a deep copy of the MultiReactionChainPolicy.
+Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Checks if the MultiReactionChainPolicy contains a specific reaction.
+| reaction | the Reaction to check for. |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Checks if the MultiReactionChainPolicy contains a reaction by ID.
+| id | the reaction ID to check for. |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +inline | +
Returns iterator to the end of the child ReactionChainPolicy instances.
+
+
|
+ +inline | +
Returns const iterator to the end of the child ReactionChainPolicy instances.
+| const std::vector< std::unique_ptr< ReactionChainPolicy > > & gridfire::policy::MultiReactionChainPolicy::get_chain_policies | +( | +) | +const | +
Returns the vector of child ReactionChainPolicy instances.
+
+
|
+ +overridevirtual | +
Returns the combined ReactionSet of all child chain policies.
+Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Computes a hash value for the MultiReactionChainPolicy.
+| seed | the seed value for the hash computation. |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Returns the name of the MultiReactionChainPolicy.
+Implements gridfire::policy::ReactionChainPolicy.
+ +Reimplemented in gridfire::policy::ProtonProtonChainPolicy.
+ +
+
|
+ +overridevirtual | +
Inequality comparison operator.
+| other | the other ReactionChainPolicy to compare against. |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Equality comparison operator.
+| other | the other ReactionChainPolicy to compare against. |
Implements gridfire::policy::ReactionChainPolicy.
+ +| size_t gridfire::policy::MultiReactionChainPolicy::size | +( | +) | +const | +
Returns the number of child ReactionChainPolicy instances.
+
+
|
+ +protected | +
Child chain policies.
+ +
+
|
+ +protected | +
Combined reactions from all child policies.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::NetworkPolicy, including all inherited members.
+| construct()=0 | gridfire::policy::NetworkPolicy | pure virtual |
| get_engine_stack() const =0 | gridfire::policy::NetworkPolicy | pure virtual |
| get_engine_types_stack() const =0 | gridfire::policy::NetworkPolicy | pure virtual |
| get_partition_function() const =0 | gridfire::policy::NetworkPolicy | pure virtual |
| get_seed_reactions() const =0 | gridfire::policy::NetworkPolicy | pure virtual |
| get_seed_species() const =0 | gridfire::policy::NetworkPolicy | pure virtual |
| get_status() const =0 | gridfire::policy::NetworkPolicy | pure virtual |
| name() const =0 | gridfire::policy::NetworkPolicy | pure virtual |
| ~NetworkPolicy()=default | gridfire::policy::NetworkPolicy | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Abstract interface for policies that construct DynamicEngine networks from a seed composition. + More...
+ +#include <policy_abstract.h>
+Public Member Functions | |
| virtual | ~NetworkPolicy ()=default |
| virtual std::string | name () const =0 |
| Human-readable name for the policy. | |
| virtual const std::set< fourdst::atomic::Species > & | get_seed_species () const =0 |
| Returns the seed species the policy requires to initialize the network. | |
| virtual const reaction::ReactionSet & | get_seed_reactions () const =0 |
| Returns the set of seed reactions the policy requires. | |
| virtual engine::DynamicEngine & | construct ()=0 |
| Construct and return a DynamicEngine instance (or engine view stack) satisfying the policy. | |
| virtual NetworkPolicyStatus | get_status () const =0 |
| Returns the current verification/construction status of the policy. | |
| virtual const std::vector< std::unique_ptr< engine::DynamicEngine > > & | get_engine_stack () const =0 |
| virtual std::vector< engine::EngineTypes > | get_engine_types_stack () const =0 |
| virtual const std::unique_ptr< partition::PartitionFunction > & | get_partition_function () const =0 |
Abstract interface for policies that construct DynamicEngine networks from a seed composition.
+A NetworkPolicy provides three main pieces of information:
Concrete implementations include MainSequencePolicy (see stellar_policy.h) and may throw policy-specific exceptions during construction (for example when required reactions or species are missing).
+
|
+ +virtualdefault | +
+
|
+ +pure virtual | +
Construct and return a DynamicEngine instance (or engine view stack) satisfying the policy.
+Implementations typically build one or more engine layers (GraphEngine, MultiscalePartitioningEngineView, AdaptiveEngineView, etc.) and return a reference to the top-most DynamicEngine. The storage lifetime of the returned reference is implementation-defined (usually owned by the policy instance).
+| gridfire::exceptions::MissingKeyReactionError | if required reactions are not present in the constructed network (see gridfire/exceptions/error_policy.h). |
| gridfire::exceptions::MissingSeedSpeciesError | if required seed species are missing from the initializing composition. |
| gridfire::exceptions::PolicyError | for other construction/verification failures. |
Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +
+
|
+ +pure virtual | +
Returns the set of seed reactions the policy requires.
+The ReactionSet describes reactions that must be present in the constructed network for the policy to be considered satisfied. Concrete policies often implement their reaction requirements by composing one or more ReactionChainPolicy instances (see chains.h).
Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +
+
|
+ +pure virtual | +
Returns the seed species the policy requires to initialize the network.
+The returned set contains atomic species identifiers (fourdst::atomic::Species) which the policy expects to be present in the initial composition used to build the network.
+Implementations should return a copy or an immutable reference to their internal set of required seed species.
+Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +
+
|
+ +pure virtual | +
Returns the current verification/construction status of the policy.
+The status reports whether the policy has been initialized and whether the constructed network satisfies the policy's key requirements.
+Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +
+
|
+ +pure virtual | +
Human-readable name for the policy.
+Implemented in gridfire::policy::MainSequencePolicy, and PyNetworkPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::ProtonProtonChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Proton-Proton Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| ProtonProtonChainPolicy () | |
| std::string | name () const override |
| Returns the name of the MultiReactionChainPolicy. | |
Public Member Functions inherited from gridfire::policy::MultiReactionChainPolicy | |
| MultiReactionChainPolicy (std::vector< std::unique_ptr< ReactionChainPolicy > > &&chain_policies) | |
| Constructs a MultiReactionChainPolicy from a vector of ReactionChainPolicy instances. | |
| const std::vector< std::unique_ptr< ReactionChainPolicy > > & | get_chain_policies () const |
| Returns the vector of child ReactionChainPolicy instances. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Returns the combined ReactionSet of all child chain policies. | |
| bool | contains (const std::string &id) const override |
| Checks if the MultiReactionChainPolicy contains a reaction by ID. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Checks if the MultiReactionChainPolicy contains a specific reaction. | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| Creates a deep copy of the MultiReactionChainPolicy. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash value for the MultiReactionChainPolicy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality comparison operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality comparison operator. | |
| size_t | size () const |
| Returns the number of child ReactionChainPolicy instances. | |
| auto | begin () |
| Returns iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | begin () const |
| Returns const iterator to the beginning of the child ReactionChainPolicy instances. | |
| auto | end () |
| Returns iterator to the end of the child ReactionChainPolicy instances. | |
| auto | end () const |
| Returns const iterator to the end of the child ReactionChainPolicy instances. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Private Attributes | |
| std::vector< std::unique_ptr< ReactionChainPolicy > > | m_chain_policies |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::MultiReactionChainPolicy | |
| std::vector< std::unique_ptr< ReactionChainPolicy > > | m_chain_policies {} |
| Child chain policies. | |
| reaction::ReactionSet | m_reactions |
| Combined reactions from all child policies. | |
Proton-Proton Chain Policy.
+This class implements the overall Proton-Proton chain of nuclear reactions, combining the Proton-Proton I, II, and III chains. Enforcing this chain in the policy will ensure that all the Proton-Proton reactions are included in the network.
+ +| gridfire::policy::ProtonProtonChainPolicy::ProtonProtonChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Returns the name of the MultiReactionChainPolicy.
+Reimplemented from gridfire::policy::MultiReactionChainPolicy.
+ +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::ProtonProtonIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Proton-Proton I Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| ProtonProtonIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Proton-Proton I Chain Policy.
+This class implements the Proton-Proton I chain of nuclear reactions. This chain's minimum temperature is set to T9=0.001 (or 1e6K). This chain includes reactions:
| gridfire::policy::ProtonProtonIChainPolicy::ProtonProtonIChainPolicy | +( | +) | ++ |
Specific Implementations *
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::ProtonProtonIIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Proton-Proton II Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| ProtonProtonIIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Proton-Proton II Chain Policy.
+This class implements the Proton-Proton II chain of nuclear reactions. This chain's minimum temperature is set to T9=0.001 (or 1e6K). This chain includes reactions:
| gridfire::policy::ProtonProtonIIChainPolicy::ProtonProtonIIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::ProtonProtonIIIChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Proton-Proton III Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| ProtonProtonIIIChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Proton-Proton III Chain Policy.
+This class implements the Proton-Proton III chain of nuclear reactions. This chain's minimum temperature is set to T9=0.001 (or 1e6K). This chain includes reactions:
| gridfire::policy::ProtonProtonIIIChainPolicy::ProtonProtonIIIChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::ReactionChainPolicy, including all inherited members.
+| clone() const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| contains(const std::string &id) const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| contains(const reaction::Reaction &reaction) const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| get_reactions() const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| hash(uint64_t seed) const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| name() const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| operator!=(const ReactionChainPolicy &other) const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| operator<< | gridfire::policy::ReactionChainPolicy | friend |
| operator==(const ReactionChainPolicy &other) const =0 | gridfire::policy::ReactionChainPolicy | pure virtual |
| ~ReactionChainPolicy()=default | gridfire::policy::ReactionChainPolicy | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Abstract interface encapsulating a set of reactions representing a single chain or pathway. + More...
+ +#include <policy_abstract.h>
+Public Member Functions | |
| virtual | ~ReactionChainPolicy ()=default |
| virtual const reaction::ReactionSet & | get_reactions () const =0 |
| Returns the ReactionSet describing this chain. | |
| virtual bool | contains (const std::string &id) const =0 |
| virtual bool | contains (const reaction::Reaction &reaction) const =0 |
| virtual std::unique_ptr< ReactionChainPolicy > | clone () const =0 |
| virtual std::string | name () const =0 |
| virtual uint64_t | hash (uint64_t seed) const =0 |
| virtual bool | operator== (const ReactionChainPolicy &other) const =0 |
| virtual bool | operator!= (const ReactionChainPolicy &other) const =0 |
+Friends | |
| std::ostream & | operator<< (std::ostream &os, const ReactionChainPolicy &rcp) |
Abstract interface encapsulating a set of reactions representing a single chain or pathway.
+ReactionChainPolicy implementations (see chains.h) supply a ReactionSet describing the reactions that comprise a nuclear reaction chain (for example the proton-proton chain, CNO cycle, etc.).
chains.h for details.
+
|
+ +virtualdefault | +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::ProtonProtonIChainPolicy, gridfire::policy::ProtonProtonIIChainPolicy, gridfire::policy::ProtonProtonIIIChainPolicy, gridfire::policy::CNOIChainPolicy, gridfire::policy::CNOIIChainPolicy, gridfire::policy::CNOIIIChainPolicy, gridfire::policy::CNOIVChainPolicy, gridfire::policy::HotCNOIChainPolicy, gridfire::policy::HotCNOIIChainPolicy, gridfire::policy::HotCNOIIIChainPolicy, gridfire::policy::TripleAlphaChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in PyReactionChainPolicy, gridfire::policy::TemperatureDependentChainPolicy, and gridfire::policy::MultiReactionChainPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::TemperatureDependentChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.
+ +
+
|
+ +pure virtual | +
Returns the ReactionSet describing this chain.
+| gridfire::exceptions::MissingBaseReactionError | may be thrown by concrete implementations at construction time if the required reactions cannot be found in the base reaction set. |
Implemented in gridfire::policy::TemperatureDependentChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::TemperatureDependentChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::ProtonProtonIChainPolicy, gridfire::policy::ProtonProtonIIChainPolicy, gridfire::policy::ProtonProtonIIIChainPolicy, gridfire::policy::ProtonProtonChainPolicy, gridfire::policy::CNOIChainPolicy, gridfire::policy::CNOIIChainPolicy, gridfire::policy::CNOIIIChainPolicy, gridfire::policy::CNOIVChainPolicy, gridfire::policy::CNOChainPolicy, gridfire::policy::HotCNOIChainPolicy, gridfire::policy::HotCNOIIChainPolicy, gridfire::policy::HotCNOIIIChainPolicy, gridfire::policy::HotCNOChainPolicy, gridfire::policy::TripleAlphaChainPolicy, gridfire::policy::MainSequenceReactionChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::TemperatureDependentChainPolicy, and gridfire::policy::MultiReactionChainPolicy.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::policy::TemperatureDependentChainPolicy, and gridfire::policy::MultiReactionChainPolicy.
+ +
+
|
+ +friend | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::TemperatureDependentChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for reaction chain policies that are active only within specific temperature ranges. + More...
+ +#include <chains.h>
+Classes | |
| struct | ActiveTempRange |
| Struct to hold the active temperature range for the reaction chain. More... | |
+Public Member Functions | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
| virtual std::unique_ptr< ReactionChainPolicy > | clone () const =0 |
| virtual std::string | name () const =0 |
+Protected Attributes | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Base class for reaction chain policies that are active only within specific temperature ranges.
+Such chains may only operate effectively within certain temperature regimes, reflecting the physical conditions required for the reactions to proceed. This class allows defining such temperature-dependent behavior. This is one of the locations where domain specific knowledge is allowed within GridFire.
+
+
|
+ +explicit | +
Construct a new Temperature Dependent Chain Policy object.
+| reactionIDs | Vector of reaction IDs that comprise the chain |
+
|
+ +explicit | +
Construct a new Temperature Dependent Chain Policy object.
+| reactionIDs | Vector of reaction IDs that comprise the chain |
| minT9 | Minimum temperature (in T9) for which the chain is active |
+
|
+ +explicit | +
Construct a new Temperature Dependent Chain Policy object.
+| reactionIDs | Vector of reaction IDs that comprise the chain |
| minT9 | Minimum temperature (in T9) for which the chain is active |
| maxT9 | Maximum temperature (in T9) for which the chain is active |
+
|
+ +overridedefault | +
Virtual destructor.
+ +
+
|
+ +overridevirtual | +
Check if a reaction is part of the chain.
+| reaction | The reaction to check |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Check if a reaction or reaction ID is part of the chain.
+| id | The reaction ID to check |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Get the reactions that comprise the chain.
+Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Generate the hash for the reaction chain policy.
+| seed | Seed value for the hash |
Implements gridfire::policy::ReactionChainPolicy.
+ +| bool gridfire::policy::TemperatureDependentChainPolicy::is_active | +( | +double | +T9 | ) | +const | +
Check if the reaction chain is active at a given temperature.
+| T9 | Temperature in billions of Kelvin (T9) |
+
|
+ +overridevirtual | +
Inequality operator.
+| other | The other ReactionChainPolicy to compare against |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Equality operator.
+| other | The other ReactionChainPolicy to compare against |
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +protected | +
Vector of reaction IDs that comprise the chain.
+ +
+
|
+ +protected | +
Set of reactions that comprise the chain.
+ +
+
|
+ +protected | +
Active temperature range for the reaction chain.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::policy::TripleAlphaChainPolicy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Triple-Alpha Chain Policy. + More...
+ +#include <chains.h>
+Public Member Functions | |
| TripleAlphaChainPolicy () | |
| std::unique_ptr< ReactionChainPolicy > | clone () const override |
| std::string | name () const override |
Public Member Functions inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9) | |
| Construct a new Temperature Dependent Chain Policy object. | |
| ~TemperatureDependentChainPolicy () override=default | |
| Virtual destructor. | |
| const reaction::ReactionSet & | get_reactions () const override |
| Get the reactions that comprise the chain. | |
| bool | contains (const std::string &id) const override |
| Check if a reaction or reaction ID is part of the chain. | |
| bool | contains (const reaction::Reaction &reaction) const override |
| Check if a reaction is part of the chain. | |
| uint64_t | hash (uint64_t seed) const override |
| Generate the hash for the reaction chain policy. | |
| bool | operator== (const ReactionChainPolicy &other) const override |
| Equality operator. | |
| bool | operator!= (const ReactionChainPolicy &other) const override |
| Inequality operator. | |
| bool | is_active (double T9) const |
| Check if the reaction chain is active at a given temperature. | |
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy | |
| virtual | ~ReactionChainPolicy ()=default |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::policy::TemperatureDependentChainPolicy | |
| ActiveTempRange | m_tempRange |
| Active temperature range for the reaction chain. | |
| std::vector< std::string > | m_reactionIDs |
| Vector of reaction IDs that comprise the chain. | |
| reaction::ReactionSet | m_reactions |
| Set of reactions that comprise the chain. | |
Triple-Alpha Chain Policy.
+This class implements the Triple-Alpha process of nuclear reactions. This chain's minimum temperature is set to T9=0.01 (or 1e7K). This chain includes reactions:
| gridfire::policy::TripleAlphaChainPolicy::TripleAlphaChainPolicy | +( | +) | ++ |
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::policy::ReactionChainPolicy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::rates::weak::WeakRateInterpolator, including all inherited members.
+| available_isotopes() const | gridfire::rates::weak::WeakRateInterpolator | |
| get_rate_derivatives(uint16_t A, uint8_t Z, double t9, double log_rhoYe) const | gridfire::rates::weak::WeakRateInterpolator | |
| get_rates(uint16_t A, uint8_t Z, double t9, double log_rhoYe) const | gridfire::rates::weak::WeakRateInterpolator | |
| m_logger | gridfire::rates::weak::WeakRateInterpolator | private |
| m_rate_table | gridfire::rates::weak::WeakRateInterpolator | private |
| RowDataTable typedef | gridfire::rates::weak::WeakRateInterpolator | |
| WeakRateInterpolator(const RowDataTable &raw_data) | gridfire::rates::weak::WeakRateInterpolator | explicit |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
3D table interpolator for tabulated weak reaction data by isotope. + More...
+ +#include <weak_interpolator.h>
+Public Types | |
| using | RowDataTable = std::array< RateDataRow, 77400 > |
| Raw weak-rate table type expected by the constructor. | |
+Public Member Functions | |
| WeakRateInterpolator (const RowDataTable &raw_data) | |
| Construct the interpolator from raw weak-rate rows. | |
| std::vector< fourdst::atomic::Species > | available_isotopes () const |
| List isotopes for which tables are available. | |
| std::expected< WeakRatePayload, InterpolationError > | get_rates (uint16_t A, uint8_t Z, double t9, double log_rhoYe) const |
| Trilinear interpolation of weak-rate payload at a state. | |
| std::expected< WeakRateDerivatives, InterpolationError > | get_rate_derivatives (uint16_t A, uint8_t Z, double t9, double log_rhoYe) const |
| Finite-difference partial derivatives of the log10() fields. | |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::unordered_map< uint32_t, IsotopeGrid > | m_rate_table |
| Per-isotope grids over (T9, log10(rho*Ye), mu_e) with payloads at lattice nodes. | |
3D table interpolator for tabulated weak reaction data by isotope.
+Builds per-isotope 3D grids over (T9, log10(rho*Ye), mu_e) and provides:
Implementation summary (constructor): rows are grouped by (A,Z), then each group's unique axis values are collected and sorted to form the three axes; the 3D payload array is populated at each lattice point with the 6 log10() fields from the raw table.
+| using gridfire::rates::weak::WeakRateInterpolator::RowDataTable = std::array<RateDataRow, 77400> | +
Raw weak-rate table type expected by the constructor.
+The size must match the number of rows compiled into the weak-rate library.
+ +
+
|
+ +explicit | +
Construct the interpolator from raw weak-rate rows.
+Groups rows by isotope (A,Z), extracts unique sorted axes for T9, log10(rho*Ye), and mu_e, and fills an internal regular grid with the log10(rate) and neutrino-loss payloads at each node. No interpolation occurs at construction time.
+ +| std::vector< fourdst::atomic::Species > gridfire::rates::weak::WeakRateInterpolator::available_isotopes | +( | +) | +const | +
List isotopes for which tables are available.
+| std::runtime_error | If any packed (A,Z) cannot be converted to Species. |
| std::expected< WeakRateDerivatives, InterpolationError > gridfire::rates::weak::WeakRateInterpolator::get_rate_derivatives | +( | +uint16_t | +A, | +
| + | + | uint8_t | +Z, | +
| + | + | double | +t9, | +
| + | + | double | +log_rhoYe | +
| + | ) | +const | +
Finite-difference partial derivatives of the log10() fields.
+Uses central differences with small fixed (1e-6) perturbations in each variable (T9, log10(rho*Ye), mu_e) and returns arrays of d(log10(field))/d(var) for all fields. If any perturbed state falls outside the table, returns a BOUNDS_ERROR with per-axis bounds; if the isotope is unknown, returns UNKNOWN_SPECIES_ERROR.
+| A | Mass number of the isotope. |
| Z | Proton number of the isotope. |
| t9 | Temperature in GK (10^9 K). |
| log_rhoYe | Log10 of rho*Ye (cgs density times electron fraction). |
| std::expected< WeakRatePayload, InterpolationError > gridfire::rates::weak::WeakRateInterpolator::get_rates | +( | +uint16_t | +A, | +
| + | + | uint8_t | +Z, | +
| + | + | double | +t9, | +
| + | + | double | +log_rhoYe | +
| + | ) | +const | +
Trilinear interpolation of weak-rate payload at a state.
+Interpolates the 6 log10() fields (rates and neutrino losses) at the given state for the requested isotope. If the isotope is unknown or the state lies outside the tabulated ranges, returns an error via std::expected with detailed bounds info.
+| A | Mass number of the isotope. |
| Z | Proton number of the isotope. |
| t9 | Temperature in GK (10^9 K). |
| log_rhoYe | Log10 of rho*Ye (cgs density times electron fraction). |
+
|
+ +private | +
+
|
+ +private | +
Per-isotope grids over (T9, log10(rho*Ye), mu_e) with payloads at lattice nodes.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::rates::weak::WeakReaction, including all inherited members.
+| all_species() const override | gridfire::rates::weak::WeakReaction | virtual |
| calculate_energy_generation_rate(double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::rates::weak::WeakReaction | virtual |
| calculate_energy_generation_rate(const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::rates::weak::WeakReaction | virtual |
| calculate_log_rate_partial_deriv_wrt_T9(double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &composition) const override | gridfire::rates::weak::WeakReaction | virtual |
| calculate_rate(double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::rates::weak::WeakReaction | virtual |
| calculate_rate(CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::rates::weak::WeakReaction | virtual |
| calculate_rate(T T9, T rho, T Ye, T mue, const std::vector< T > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const | gridfire::rates::weak::WeakReaction | private |
| clone() const override | gridfire::rates::weak::WeakReaction | virtual |
| contains(const fourdst::atomic::Species &species) const override | gridfire::rates::weak::WeakReaction | virtual |
| contains_product(const fourdst::atomic::Species &species) const override | gridfire::rates::weak::WeakReaction | virtual |
| contains_reactant(const fourdst::atomic::Species &species) const override | gridfire::rates::weak::WeakReaction | virtual |
| countProductOccurrences(const fourdst::atomic::Species &species) const override | gridfire::rates::weak::WeakReaction | virtual |
| countReactantOccurrences(const fourdst::atomic::Species &species) const override | gridfire::rates::weak::WeakReaction | virtual |
| get_log_neutrino_loss_from_payload(const WeakRatePayload &payload) const | gridfire::rates::weak::WeakReaction | private |
| get_log_rate_from_payload(const WeakRatePayload &payload) const | gridfire::rates::weak::WeakReaction | private |
| getRateCoefficients() const override | gridfire::rates::weak::WeakReaction | inlinevirtual |
| getWeakRateInterpolator() const | gridfire::rates::weak::WeakReaction | |
| hash(uint64_t seed) const override | gridfire::rates::weak::WeakReaction | virtual |
| id() const override | gridfire::rates::weak::WeakReaction | virtual |
| is_reverse() const override | gridfire::rates::weak::WeakReaction | virtual |
| m_atomic | gridfire::rates::weak::WeakReaction | mutableprivate |
| m_constants | gridfire::rates::weak::WeakReaction | private |
| m_id | gridfire::rates::weak::WeakReaction | private |
| m_interpolator | gridfire::rates::weak::WeakReaction | private |
| m_product | gridfire::rates::weak::WeakReaction | private |
| m_product_a | gridfire::rates::weak::WeakReaction | private |
| m_product_z | gridfire::rates::weak::WeakReaction | private |
| m_products | gridfire::rates::weak::WeakReaction | private |
| m_reactant | gridfire::rates::weak::WeakReaction | private |
| m_reactant_a | gridfire::rates::weak::WeakReaction | private |
| m_reactant_z | gridfire::rates::weak::WeakReaction | private |
| m_reactants | gridfire::rates::weak::WeakReaction | private |
| m_type | gridfire::rates::weak::WeakReaction | private |
| num_species() const override | gridfire::rates::weak::WeakReaction | virtual |
| product_species() const override | gridfire::rates::weak::WeakReaction | virtual |
| products() const override | gridfire::rates::weak::WeakReaction | virtual |
| qValue() const override | gridfire::rates::weak::WeakReaction | virtual |
| reactant_species() const override | gridfire::rates::weak::WeakReaction | virtual |
| reactants() const override | gridfire::rates::weak::WeakReaction | virtual |
| stoichiometry() const override | gridfire::rates::weak::WeakReaction | virtual |
| stoichiometry(const fourdst::atomic::Species &species) const override | gridfire::rates::weak::WeakReaction | virtual |
| type() const override | gridfire::rates::weak::WeakReaction | virtual |
| WeakReaction(const fourdst::atomic::Species &species, WeakReactionType type, const WeakRateInterpolator &interpolator) | gridfire::rates::weak::WeakReaction | explicit |
| ~Reaction()=default | gridfire::reaction::Reaction | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Concrete Reaction representing a single weak process (beta±, e−/e+ capture). + More...
+ +#include <weak.h>
+Classes | |
| class | AtomicWeakRate |
| CppAD atomic that wraps weak-rate interpolation for AD evaluation. More... | |
| struct | constants |
+Public Member Functions | |
| WeakReaction (const fourdst::atomic::Species &species, WeakReactionType type, const WeakRateInterpolator &interpolator) | |
| Construct a WeakReaction for a specific weak channel and parent species. | |
| double | calculate_rate (double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Scalar weak reaction rate λ(T9, rho, Ye, μe) in 1/s. | |
| CppAD::AD< double > | calculate_rate (CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| AD-enabled weak reaction rate λ(T9, rho, Ye, μe) in 1/s. | |
| std::string_view | id () const override |
| Unique identifier string for the weak channel. | |
| const std::vector< fourdst::atomic::Species > & | reactants () const override |
| Reactants list (parent nuclide only). | |
| const std::vector< fourdst::atomic::Species > & | products () const override |
| Products list (daughter nuclide only). | |
| bool | contains (const fourdst::atomic::Species &species) const override |
| Check if a species participates in this weak reaction. | |
| bool | contains_reactant (const fourdst::atomic::Species &species) const override |
| Check if a species is the reactant (parent). | |
| bool | contains_product (const fourdst::atomic::Species &species) const override |
| Check if a species is the product (daughter). | |
| std::unordered_set< fourdst::atomic::Species > | all_species () const override |
| Set of both parent and daughter species. | |
| std::unordered_set< fourdst::atomic::Species > | reactant_species () const override |
| Singleton set containing only the parent species. | |
| std::unordered_set< fourdst::atomic::Species > | product_species () const override |
| Singleton set containing only the daughter species. | |
| size_t | num_species () const override |
| Number of unique species involved (always 2 for weak reactions). | |
| std::unordered_map< fourdst::atomic::Species, int > | stoichiometry () const override |
| Full stoichiometry map: parent -1, daughter +1. | |
| int | stoichiometry (const fourdst::atomic::Species &species) const override |
| Stoichiometric coefficient for a species: -1 (parent), +1 (daughter), 0 otherwise. | |
| uint64_t | hash (uint64_t seed) const override |
| Content-based 64-bit hash for this reaction. | |
| double | qValue () const override |
| Q-value (MeV) based on nuclear mass differences and channel. | |
| double | calculate_energy_generation_rate (double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Net energy generation rate (MeV/s) for this weak reaction. | |
| CppAD::AD< double > | calculate_energy_generation_rate (const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| AD-enabled net energy generation rate (MeV/s). | |
| double | calculate_log_rate_partial_deriv_wrt_T9 (double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &composition) const override |
| Logarithmic temperature sensitivity of the rate at the given state. | |
| reaction::ReactionType | type () const override |
| Reaction type tag for runtime dispatch. | |
| std::unique_ptr< Reaction > | clone () const override |
| Polymorphic deep copy. | |
| bool | is_reverse () const override |
| Weak reactions are parameterized in the forward sense (never reverse). | |
| const WeakRateInterpolator & | getWeakRateInterpolator () const |
| Access the underlying rate interpolator used by this reaction. | |
| std::optional< std::vector< reaction::RateCoefficientSet > > | getRateCoefficients () const override |
| size_t | countReactantOccurrences (const fourdst::atomic::Species &species) const override |
| size_t | countProductOccurrences (const fourdst::atomic::Species &species) const override |
Public Member Functions inherited from gridfire::reaction::Reaction | |
| virtual | ~Reaction ()=default |
| Virtual destructor for correct polymorphic cleanup. | |
+Private Member Functions | |
| template<IsArithmeticOrAD T> | |
| T | calculate_rate (T T9, T rho, T Ye, T mue, const std::vector< T > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Internal unified implementation for scalar/AD rate evaluation. | |
| double | get_log_rate_from_payload (const WeakRatePayload &payload) const |
| Extract the channel-specific log10(rate) from an interpolated payload. Mapping: β−→log_beta_minus, β+→log_beta_plus, e− capture→log_electron_capture, e+ capture→log_positron_capture. | |
| double | get_log_neutrino_loss_from_payload (const WeakRatePayload &payload) const |
| Extract the channel-specific log10(neutrino loss) from a payload. Mapping: β−/e+ capture→log_antineutrino_loss_bd; β+/e− capture→log_neutrino_loss_ec. | |
+Private Attributes | |
| const constants | m_constants |
| fourdst::atomic::Species | m_reactant |
| fourdst::atomic::Species | m_product |
| std::vector< fourdst::atomic::Species > | m_reactants |
| std::vector< fourdst::atomic::Species > | m_products |
| size_t | m_reactant_a |
| size_t | m_reactant_z |
| size_t | m_product_a |
| size_t | m_product_z |
| std::string | m_id |
| WeakReactionType | m_type |
| const WeakRateInterpolator & | m_interpolator |
| AtomicWeakRate | m_atomic |
Concrete Reaction representing a single weak process (beta±, e−/e+ capture).
+Wraps interpolation logic for tabulated weak rates and provides both scalar and AD interfaces for rate and energy generation. The reactants/products are the parent/daughter nuclei of the weak process.
+the product nucleus is resolved from (A,Z) and channel via simple charge-changing rules (β−: Z+1; β+: Z−1; e− capture: Z−1; e+ capture: Z+1). The reaction ID is formatted like "Parent(channel)Product" with ν/ν̄ decorations, and an internal CppAD atomic (AtomicWeakRate) is prepared for AD energy calculations.
+
+
|
+ +explicit | +
Construct a WeakReaction for a specific weak channel and parent species.
+| species | Parent nuclide undergoing the weak process. |
| type | The weak reaction channel (beta−, beta+, e− capture, e+ capture). |
| interpolator | Reference to a WeakRateInterpolator providing tabulated data. |
| std::runtime_error | If the product species cannot be resolved for the channel (product resolution uses the charge-changing rules described above). |
+
|
+ +overridevirtual | +
Set of both parent and daughter species.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
AD-enabled net energy generation rate (MeV/s).
+Uses an internal CppAD atomic to compute two outputs at once: the rate λ and the neutrino loss ν_loss at (T9, log10(rho*Ye), μe). Returns λ · (Q − ν_loss). The atomic throws on interpolation failure.
+| std::runtime_error | If the atomic rate evaluation fails to interpolate. |
Reimplemented from gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Net energy generation rate (MeV/s) for this weak reaction.
+Interpolates once to obtain both the log10(rate) and the appropriate log10(neutrino-loss) for the channel, converts to linear values, computes E_deposited = Q − ν_loss, and returns λ · E_deposited. Throws on interpolation failure.
+Channel mapping for neutrino-loss column:
| T9 | Temperature in GK. |
| rho | Density in g cm^-3. |
| Ye | Electron fraction. |
| mue | Electron chemical potential (MeV). |
| Y | Composition vector (unused for weak channels). |
| index_to_species_map | Index-to-species map (unused for weak channels). |
| std::runtime_error | On interpolation failure. |
Reimplemented from gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Logarithmic temperature sensitivity of the rate at the given state.
+Implementation status: requests derivative tables from the interpolator and throws on failure; otherwise the function is not yet implemented and does not return a value. Avoid calling until implemented.
+| T9 | Temperature in GK. |
| rho | Density in g cm^-3. |
| Ye | Electron fraction. |
| mue | Electron chemical potential (MeV). |
| composition | Composition context (not used by weak channels presently). |
| std::runtime_error | On interpolation failure. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
AD-enabled weak reaction rate λ(T9, rho, Ye, μe) in 1/s.
+Current implementation returns 0.0. AD support is provided for the energy-generation overload below using an internal CppAD atomic that evaluates both the rate and neutrino loss consistently. A future implementation may mirror that atomic here and return the AD rate.
+| T9 | Temperature in GK (AD type). |
| rho | Mass density (g cm^-3, AD type). |
| Ye | Electron fraction (AD type). |
| mue | Electron chemical potential (MeV, AD type). |
| Y | Composition vector (unused for weak channels). |
| index_to_species_map | Index-to-species map (unused for weak channels). |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Scalar weak reaction rate λ(T9, rho, Ye, μe) in 1/s.
+Performs a single interpolation of the weak-rate tables at (T9, log10(rho*Ye), μe). If the selected log10(rate) is ≤ sentinel (-60), returns 0; otherwise returns 10^{log10(rate)}. On interpolation failure, throws with a message including (A,Z) and the state point.
+| T9 | Temperature in GK (1e9 K). |
| rho | Mass density (g cm^-3). |
| Ye | Electron fraction. |
| mue | Electron chemical potential (MeV). |
| Y | Composition vector (unused for weak channels). |
| index_to_species_map | Index-to-species map (unused for weak channels). |
| std::runtime_error | On interpolation failure. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +private | +
Internal unified implementation for scalar/AD rate evaluation.
+| T | double or CppAD::AD<double>. |
| T9,rho,Ye,mue | Thermodynamic state. |
| Y | Composition vector (unused for weak channels). |
| index_to_species_map | Index-to-species map (unused for weak channels). |
| std::runtime_error | If interpolation fails (double path) or the atomic fails (AD path). |
+
|
+ +overridevirtual | +
Polymorphic deep copy.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Check if a species participates in this weak reaction.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Check if a species is the product (daughter).
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Check if a species is the reactant (parent).
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +private | +
Extract the channel-specific log10(neutrino loss) from a payload. Mapping: β−/e+ capture→log_antineutrino_loss_bd; β+/e− capture→log_neutrino_loss_ec.
+ +
+
|
+ +private | +
Extract the channel-specific log10(rate) from an interpolated payload. Mapping: β−→log_beta_minus, β+→log_beta_plus, e− capture→log_electron_capture, e+ capture→log_positron_capture.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::reaction::Reaction.
+ +| const WeakRateInterpolator & gridfire::rates::weak::WeakReaction::getWeakRateInterpolator | +( | +) | +const | +
Access the underlying rate interpolator used by this reaction.
+ +
+
|
+ +overridevirtual | +
Content-based 64-bit hash for this reaction.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Unique identifier string for the weak channel.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Weak reactions are parameterized in the forward sense (never reverse).
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Number of unique species involved (always 2 for weak reactions).
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Singleton set containing only the daughter species.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Products list (daughter nuclide only).
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Q-value (MeV) based on nuclear mass differences and channel.
+Computes Q = (M_parent − M_daughter) c^2 converted to MeV. For β+ decay subtract 2 m_e c^2, for e+ capture add 2 m_e c^2; for β− and e− capture it is just the nuclear mass difference. Neutrino rest mass is ignored.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Singleton set containing only the parent species.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Reactants list (parent nuclide only).
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Full stoichiometry map: parent -1, daughter +1.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Stoichiometric coefficient for a species: -1 (parent), +1 (daughter), 0 otherwise.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Reaction type tag for runtime dispatch.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::rates::weak::WeakReactionMap, including all inherited members.
+| get_all_reactions() const | gridfire::rates::weak::WeakReactionMap | |
| get_species_reactions(const fourdst::atomic::Species &species) const | gridfire::rates::weak::WeakReactionMap | |
| get_species_reactions(const std::string &species_name) const | gridfire::rates::weak::WeakReactionMap | |
| m_weak_network | gridfire::rates::weak::WeakReactionMap | private |
| WeakReactionMap() | gridfire::rates::weak::WeakReactionMap | |
| ~WeakReactionMap()=default | gridfire::rates::weak::WeakReactionMap |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Index of available weak reactions keyed by species. + More...
+ +#include <weak.h>
+Public Member Functions | |
| WeakReactionMap () | |
| Construct the map by loading all weak reaction entries. | |
| ~WeakReactionMap ()=default | |
| std::vector< WeakReactionEntry > | get_all_reactions () const |
| Return a flat list of all weak reaction entries. | |
| std::expected< std::vector< WeakReactionEntry >, WeakMapError > | get_species_reactions (const fourdst::atomic::Species &species) const |
| Get all weak reaction entries for a given species. | |
| std::expected< std::vector< WeakReactionEntry >, WeakMapError > | get_species_reactions (const std::string &species_name) const |
| Get all weak reaction entries for a given species by name. | |
+Private Attributes | |
| std::unordered_map< fourdst::atomic::Species, std::vector< WeakReactionEntry > > | m_weak_network |
Index of available weak reactions keyed by species.
+Builds an in-memory map from the compiled weak-rate tables and provides simple query helpers to retrieve all weak reactions or those that involve a particular nuclide.
+Implementation summary: the constructor iterates over UNIFIED_WEAK_DATA and inserts entries keyed by the parent Species. For each channel (β−, β+, e−-capture, e+-capture), if the tabulated log10(rate) is above the sentinel (-60), a WeakReactionEntry is pushed containing the grids t9, log10(rho*Ye), mu_e, the log10(rate), and the corresponding log10(neutrino loss) column.
+| gridfire::rates::weak::WeakReactionMap::WeakReactionMap | +( | +) | ++ |
Construct the map by loading all weak reaction entries.
+
+
|
+ +default | +
| std::vector< WeakReactionEntry > gridfire::rates::weak::WeakReactionMap::get_all_reactions | +( | +) | +const | +
Return a flat list of all weak reaction entries.
+| std::expected< std::vector< WeakReactionEntry >, WeakMapError > gridfire::rates::weak::WeakReactionMap::get_species_reactions | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Get all weak reaction entries for a given species.
+| species | Nuclide to query (A,Z). |
| std::expected< std::vector< WeakReactionEntry >, WeakMapError > gridfire::rates::weak::WeakReactionMap::get_species_reactions | +( | +const std::string & | +species_name | ) | +const | +
Get all weak reaction entries for a given species by name.
+| species_name | Symbolic name (e.g., "Fe52"). |
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::rates::weak::WeakReaction::AtomicWeakRate, including all inherited members.
+| AtomicWeakRate(const WeakRateInterpolator &interpolator, const size_t a, const size_t z, const WeakReactionType type) | gridfire::rates::weak::WeakReaction::AtomicWeakRate | inline |
| for_sparse_jac(size_t q, const CppAD::vector< std::set< size_t > > &r, CppAD::vector< std::set< size_t > > &s) override | gridfire::rates::weak::WeakReaction::AtomicWeakRate | |
| for_sparse_jac(size_t q, const CppAD::vector< bool > &r, CppAD::vector< bool > &s, const CppAD::vector< double > &x) override | gridfire::rates::weak::WeakReaction::AtomicWeakRate | |
| forward(size_t p, size_t q, const CppAD::vector< bool > &vx, CppAD::vector< bool > &vy, const CppAD::vector< double > &tx, CppAD::vector< double > &ty) override | gridfire::rates::weak::WeakReaction::AtomicWeakRate | |
| m_a | gridfire::rates::weak::WeakReaction::AtomicWeakRate | private |
| m_interpolator | gridfire::rates::weak::WeakReaction::AtomicWeakRate | private |
| m_type | gridfire::rates::weak::WeakReaction::AtomicWeakRate | private |
| m_z | gridfire::rates::weak::WeakReaction::AtomicWeakRate | private |
| rev_sparse_jac(size_t q, const CppAD::vector< std::set< size_t > > &rt, CppAD::vector< std::set< size_t > > &st) override | gridfire::rates::weak::WeakReaction::AtomicWeakRate | |
| rev_sparse_jac(size_t q, const CppAD::vector< bool > &rt, CppAD::vector< bool > &st, const CppAD::vector< double > &x) override | gridfire::rates::weak::WeakReaction::AtomicWeakRate | |
| reverse(size_t q, const CppAD::vector< double > &tx, const CppAD::vector< double > &ty, CppAD::vector< double > &px, const CppAD::vector< double > &py) override | gridfire::rates::weak::WeakReaction::AtomicWeakRate |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
CppAD atomic that wraps weak-rate interpolation for AD evaluation. + More...
++Public Member Functions | |
| AtomicWeakRate (const WeakRateInterpolator &interpolator, const size_t a, const size_t z, const WeakReactionType type) | |
| Construct the atomic operation for a specific (A,Z) and channel. | |
| bool | forward (size_t p, size_t q, const CppAD::vector< bool > &vx, CppAD::vector< bool > &vy, const CppAD::vector< double > &tx, CppAD::vector< double > &ty) override |
| Forward pass: compute rate and neutrino-loss values for AD. On failure to interpolate, throws a std::runtime_error with details; sets output sparsity such that both outputs depend on all inputs when any input is variable. | |
| bool | reverse (size_t q, const CppAD::vector< double > &tx, const CppAD::vector< double > &ty, CppAD::vector< double > &px, const CppAD::vector< double > &py) override |
| Reverse pass: propagate adjoints using tabulated derivatives. Uses d log10 columns, converting to linear-scale derivatives via ln(10) scaling and chain rule with the forward-pass outputs. | |
| bool | for_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &r, CppAD::vector< std::set< size_t > > &s) override |
| Forward-mode sparsity for Jacobian. | |
| bool | rev_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &rt, CppAD::vector< std::set< size_t > > &st) override |
| Reverse-mode sparsity for Jacobian. | |
| bool | for_sparse_jac (size_t q, const CppAD::vector< bool > &r, CppAD::vector< bool > &s, const CppAD::vector< double > &x) override |
| bool | rev_sparse_jac (size_t q, const CppAD::vector< bool > &rt, CppAD::vector< bool > &st, const CppAD::vector< double > &x) override |
+Private Attributes | |
| const WeakRateInterpolator & | m_interpolator |
| const size_t | m_a |
| const size_t | m_z |
| const WeakReactionType | m_type |
CppAD atomic that wraps weak-rate interpolation for AD evaluation.
+Forward pass computes two outputs (λ, ν_loss) by interpolating the tables at the provided state; reverse pass uses derivative tables to backpropagate adjoints for all three inputs (T9, log10(rho*Ye), μe). Sparsity routines declare full dependence of both outputs on all inputs.
+
+
|
+ +inline | +
Construct the atomic operation for a specific (A,Z) and channel.
+| interpolator | Rate source. |
| a | Mass number A of the parent. |
| z | Proton number Z of the parent. |
| type | Weak channel. |
+
|
+ +override | +
+
|
+ +override | +
Forward-mode sparsity for Jacobian.
+ +
+
|
+ +override | +
Forward pass: compute rate and neutrino-loss values for AD. On failure to interpolate, throws a std::runtime_error with details; sets output sparsity such that both outputs depend on all inputs when any input is variable.
+ +
+
|
+ +override | +
+
|
+ +override | +
Reverse-mode sparsity for Jacobian.
+ +
+
|
+ +override | +
Reverse pass: propagate adjoints using tabulated derivatives. Uses d log10 columns, converting to linear-scale derivatives via ln(10) scaling and chain rule with the forward-pass outputs.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::reaction::LogicalReaclibReaction, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Represents a "logical" reaction that aggregates rates from multiple sources. + More...
+ +#include <reaction.h>
+Public Member Functions | |
| LogicalReaclibReaction (const std::vector< std::unique_ptr< ReaclibReaction > > &reactions) | |
Constructs a LogicalReaction from a vector of Reaction objects. Implicitly assumes that the logical reaction is for a forward (i.e. not reverse) reaction. | |
| LogicalReaclibReaction (const std::vector< std::unique_ptr< ReaclibReaction > > &reactions, bool reverse) | |
| void | add_reaction (const ReaclibReaction &reaction) |
Adds another Reaction source to this logical reaction. | |
| size_t | size () const |
| Gets the number of source rates contributing to this logical reaction. | |
| std::vector< std::string > | sources () const |
| Gets the list of source labels for the aggregated rates. | |
| double | calculate_rate (double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the total reaction rate by summing all source rates. | |
| double | calculate_log_rate_partial_deriv_wrt_T9 (double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const override |
| Logarithmic partial derivative of the rate with respect to temperature. | |
| ReactionType | type () const override |
| Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB). | |
| std::unique_ptr< Reaction > | clone () const override |
| Polymorphic deep copy. | |
| CppAD::AD< double > | calculate_rate (CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the total reaction rate using CppAD types. | |
| std::optional< std::vector< RateCoefficientSet > > | getRateCoefficients () const override |
Iterators | |
Provides iterators to loop over the rate coefficient sets. + | |
| auto | begin () |
| auto | begin () const |
| auto | end () |
| auto | end () const |
Public Member Functions inherited from gridfire::reaction::ReaclibReaction | |
| ~ReaclibReaction () override=default | |
| ReaclibReaction (std::string_view id, std::string_view peName, int chapter, const std::vector< fourdst::atomic::Species > &reactants, const std::vector< fourdst::atomic::Species > &products, double qValue, std::string_view label, const RateCoefficientSet &sets, bool reverse=false) | |
| Constructs a Reaction object. | |
| double | calculate_rate (double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the reaction rate for a given temperature. | |
| CppAD::AD< double > | calculate_rate (CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the reaction rate for a given temperature using CppAD types. | |
| double | calculate_log_rate_partial_deriv_wrt_T9 (double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const override |
| Logarithmic partial derivative of the rate with respect to temperature. | |
| virtual std::string_view | peName () const |
| Gets the reaction name in (projectile, ejectile) notation. | |
| int | chapter () const |
| Gets the REACLIB chapter number. | |
| std::string_view | sourceLabel () const |
| Gets the source label for the rate data. | |
| ReactionType | type () const override |
| Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB). | |
| const RateCoefficientSet & | rateCoefficients () const |
| Gets the set of rate coefficients. | |
| std::optional< std::vector< RateCoefficientSet > > | getRateCoefficients () const override |
| bool | contains (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a reactant or product. | |
| bool | contains_reactant (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a reactant. | |
| bool | contains_product (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a product. | |
| std::unordered_set< fourdst::atomic::Species > | all_species () const override |
| Gets a set of all unique species involved in the reaction. | |
| std::unordered_set< fourdst::atomic::Species > | reactant_species () const override |
| Gets a set of all unique reactant species. | |
| std::unordered_set< fourdst::atomic::Species > | product_species () const override |
| Gets a set of all unique product species. | |
| size_t | num_species () const override |
| Gets the number of unique species involved in the reaction. | |
| int | stoichiometry (const fourdst::atomic::Species &species) const override |
| Calculates the stoichiometric coefficient for a given species. | |
| std::unordered_map< fourdst::atomic::Species, int > | stoichiometry () const override |
| Gets a map of all species to their stoichiometric coefficients. | |
| std::string_view | id () const override |
| Gets the unique identifier of the reaction. | |
| double | qValue () const override |
| Gets the Q-value of the reaction. | |
| const std::vector< fourdst::atomic::Species > & | reactants () const override |
| Gets the vector of reactant species. | |
| const std::vector< fourdst::atomic::Species > & | products () const override |
| Gets the vector of product species. | |
| bool | is_reverse () const override |
| Checks if this is a reverse reaction rate. | |
| double | excess_energy () const |
| Calculates the excess energy from the mass difference of reactants and products. | |
| bool | operator== (const ReaclibReaction &other) const |
| Compares this reaction with another for equality based on their IDs. | |
| bool | operator!= (const ReaclibReaction &other) const |
| Compares this reaction with another for inequality. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash for the reaction based on its ID. | |
| std::unique_ptr< Reaction > | clone () const override |
| Polymorphic deep copy. | |
| size_t | countReactantOccurrences (const fourdst::atomic::Species &species) const override |
| size_t | countProductOccurrences (const fourdst::atomic::Species &species) const override |
Public Member Functions inherited from gridfire::reaction::Reaction | |
| virtual | ~Reaction ()=default |
| Virtual destructor for correct polymorphic cleanup. | |
| virtual double | calculate_energy_generation_rate (const double T9, const double rho, const double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: energy generation rate from this reaction (double version). | |
| virtual CppAD::AD< double > | calculate_energy_generation_rate (const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: AD-enabled energy generation rate (AD version). | |
+Private Member Functions | |
| template<typename T > | |
| T | calculate_rate (const T T9) const |
| Template implementation for calculating the total reaction rate. | |
+Private Attributes | |
| std::vector< std::string > | m_sources |
| List of source labels. | |
| std::vector< RateCoefficientSet > | m_rates |
| List of rate coefficient sets from each source. | |
| bool | m_weak = false |
+Friends | |
| std::ostream & | operator<< (std::ostream &os, const LogicalReaclibReaction &r) |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::reaction::ReaclibReaction | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::string | m_id |
| Unique identifier for the reaction (e.g., "h1+h1=>h2+e+nu"). | |
| std::string | m_peName |
| Name of the reaction in (projectile, ejectile) notation (e.g. "p(p,g)d"). | |
| int | m_chapter |
| Chapter number from the REACLIB database, defining the reaction structure. | |
| double | m_qValue = 0.0 |
| Q-value of the reaction in MeV. | |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_reactants |
| Reactants of the reaction. | |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_products |
| Products of the reaction. | |
| std::optional< std::vector< fourdst::atomic::Species > > | m_reactantsVec |
| std::optional< std::vector< fourdst::atomic::Species > > | m_productsVec |
| std::string | m_sourceLabel |
| Source label for the rate data (e.g., "wc12w", "st08"). | |
| RateCoefficientSet | m_rateCoefficients |
| The seven rate coefficients. | |
| bool | m_reverse = false |
| Flag indicating if this is a reverse reaction rate. | |
Represents a "logical" reaction that aggregates rates from multiple sources.
+A LogicalReaclibReaction shares the same reactants and products but combines rates from different evaluations (e.g., "wc12" and "st08" for the same physical reaction). The total rate is the sum of the individual rates. It inherits from Reaction, using the properties of the first provided reaction as its base properties (reactants, products, Q-value, etc.).
+
+
|
+ +explicit | +
Constructs a LogicalReaction from a vector of Reaction objects. Implicitly assumes that the logical reaction is for a forward (i.e. not reverse) reaction.
| reactions | A vector of reactions that represent the same logical process. |
| std::runtime_error | if the provided reactions have inconsistent Q-values. |
+
|
+ +explicit | +
@breif Constructs a LogicalReaction from a vector of Reaction objects and allows the user to specify if the logical set is for a reverse reaction explicitly
| reactions | A vector of reactions that represent the same logical process |
| reverse | A flag to control if this logical reaction is reverse or not |
| void gridfire::reaction::LogicalReaclibReaction::add_reaction | +( | +const ReaclibReaction & | +reaction | ) | ++ |
Adds another Reaction source to this logical reaction.
| reaction | The reaction to add. |
| std::runtime_error | if the reaction has a different peName, a duplicate source label, or an inconsistent Q-value. |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +overridevirtual | +
Logarithmic partial derivative of the rate with respect to temperature.
+Implementations return d(ln rate)/d(ln T9) or an equivalent measure (as documented by the concrete class), evaluated at the provided state.
+| T9 | Temperature in GK (10^9 K). |
| rho | Mass density (g cm^-3). |
| Ye | Electron fraction. |
| mue | Electron chemical potential. |
| comp | Composition object providing composition in a convenient form. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineprivate | +
Template implementation for calculating the total reaction rate.
+| T | The numeric type (double or CppAD::AD<double>). |
| T9 | The temperature in units of 10^9 K. |
This method iterates through all stored RateCoefficientSets, calculates the rate for each, and returns their sum.
+
|
+ +overridevirtual | +
Calculates the total reaction rate using CppAD types.
+| T9 | The temperature in units of 10^9 K, as a CppAD::AD<double>. |
| rho | |
| Ye | |
| mue | |
| Y | |
| index_to_species_map |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Calculates the total reaction rate by summing all source rates.
+| T9 | The temperature in units of 10^9 K. |
| rho | |
| Ye | |
| mue | |
| Y | |
| index_to_species_map |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Polymorphic deep copy.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +overridevirtual | +
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inline | +
Gets the number of source rates contributing to this logical reaction.
+
+
|
+ +inline | +
Gets the list of source labels for the aggregated rates.
+
+
|
+ +inlineoverridevirtual | +
Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB).
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +friend | +
+
|
+ +private | +
List of rate coefficient sets from each source.
+ +
+
|
+ +private | +
List of source labels.
+ +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::reaction::ReaclibReaction, including all inherited members.
+| all_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_energy_generation_rate(const double T9, const double rho, const double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const | gridfire::reaction::Reaction | inlinevirtual |
| calculate_energy_generation_rate(const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const | gridfire::reaction::Reaction | inlinevirtual |
| calculate_log_rate_partial_deriv_wrt_T9(double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_rate(double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_rate(CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_rate(const T T9) const | gridfire::reaction::ReaclibReaction | inlineprivate |
| chapter() const | gridfire::reaction::ReaclibReaction | inline |
| clone() const override | gridfire::reaction::ReaclibReaction | virtual |
| contains(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| contains_product(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| contains_reactant(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| countProductOccurrences(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| countReactantOccurrences(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| excess_energy() const | gridfire::reaction::ReaclibReaction | |
| getRateCoefficients() const override | gridfire::reaction::ReaclibReaction | virtual |
| hash(uint64_t seed) const override | gridfire::reaction::ReaclibReaction | virtual |
| id() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| is_reverse() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| m_chapter | gridfire::reaction::ReaclibReaction | protected |
| m_id | gridfire::reaction::ReaclibReaction | protected |
| m_logger | gridfire::reaction::ReaclibReaction | protected |
| m_peName | gridfire::reaction::ReaclibReaction | protected |
| m_products | gridfire::reaction::ReaclibReaction | protected |
| m_productsVec | gridfire::reaction::ReaclibReaction | mutableprotected |
| m_qValue | gridfire::reaction::ReaclibReaction | protected |
| m_rateCoefficients | gridfire::reaction::ReaclibReaction | protected |
| m_reactants | gridfire::reaction::ReaclibReaction | protected |
| m_reactantsVec | gridfire::reaction::ReaclibReaction | mutableprotected |
| m_reverse | gridfire::reaction::ReaclibReaction | protected |
| m_sourceLabel | gridfire::reaction::ReaclibReaction | protected |
| num_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| operator!=(const ReaclibReaction &other) const | gridfire::reaction::ReaclibReaction | inline |
| operator<< | gridfire::reaction::ReaclibReaction | friend |
| operator==(const ReaclibReaction &other) const | gridfire::reaction::ReaclibReaction | inline |
| peName() const | gridfire::reaction::ReaclibReaction | inlinevirtual |
| product_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| products() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| qValue() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| rateCoefficients() const | gridfire::reaction::ReaclibReaction | inline |
| ReaclibReaction(std::string_view id, std::string_view peName, int chapter, const std::vector< fourdst::atomic::Species > &reactants, const std::vector< fourdst::atomic::Species > &products, double qValue, std::string_view label, const RateCoefficientSet &sets, bool reverse=false) | gridfire::reaction::ReaclibReaction | |
| reactant_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| reactants() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| sourceLabel() const | gridfire::reaction::ReaclibReaction | inline |
| stoichiometry(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| stoichiometry() const override | gridfire::reaction::ReaclibReaction | virtual |
| type() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| ~ReaclibReaction() override=default | gridfire::reaction::ReaclibReaction | |
| ~Reaction()=default | gridfire::reaction::Reaction | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <reaction.h>
+Public Member Functions | |
| ~ReaclibReaction () override=default | |
| ReaclibReaction (std::string_view id, std::string_view peName, int chapter, const std::vector< fourdst::atomic::Species > &reactants, const std::vector< fourdst::atomic::Species > &products, double qValue, std::string_view label, const RateCoefficientSet &sets, bool reverse=false) | |
| Constructs a Reaction object. | |
| double | calculate_rate (double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the reaction rate for a given temperature. | |
| CppAD::AD< double > | calculate_rate (CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the reaction rate for a given temperature using CppAD types. | |
| double | calculate_log_rate_partial_deriv_wrt_T9 (double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const override |
| Logarithmic partial derivative of the rate with respect to temperature. | |
| virtual std::string_view | peName () const |
| Gets the reaction name in (projectile, ejectile) notation. | |
| int | chapter () const |
| Gets the REACLIB chapter number. | |
| std::string_view | sourceLabel () const |
| Gets the source label for the rate data. | |
| ReactionType | type () const override |
| Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB). | |
| const RateCoefficientSet & | rateCoefficients () const |
| Gets the set of rate coefficients. | |
| std::optional< std::vector< RateCoefficientSet > > | getRateCoefficients () const override |
| bool | contains (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a reactant or product. | |
| bool | contains_reactant (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a reactant. | |
| bool | contains_product (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a product. | |
| std::unordered_set< fourdst::atomic::Species > | all_species () const override |
| Gets a set of all unique species involved in the reaction. | |
| std::unordered_set< fourdst::atomic::Species > | reactant_species () const override |
| Gets a set of all unique reactant species. | |
| std::unordered_set< fourdst::atomic::Species > | product_species () const override |
| Gets a set of all unique product species. | |
| size_t | num_species () const override |
| Gets the number of unique species involved in the reaction. | |
| int | stoichiometry (const fourdst::atomic::Species &species) const override |
| Calculates the stoichiometric coefficient for a given species. | |
| std::unordered_map< fourdst::atomic::Species, int > | stoichiometry () const override |
| Gets a map of all species to their stoichiometric coefficients. | |
| std::string_view | id () const override |
| Gets the unique identifier of the reaction. | |
| double | qValue () const override |
| Gets the Q-value of the reaction. | |
| const std::vector< fourdst::atomic::Species > & | reactants () const override |
| Gets the vector of reactant species. | |
| const std::vector< fourdst::atomic::Species > & | products () const override |
| Gets the vector of product species. | |
| bool | is_reverse () const override |
| Checks if this is a reverse reaction rate. | |
| double | excess_energy () const |
| Calculates the excess energy from the mass difference of reactants and products. | |
| bool | operator== (const ReaclibReaction &other) const |
| Compares this reaction with another for equality based on their IDs. | |
| bool | operator!= (const ReaclibReaction &other) const |
| Compares this reaction with another for inequality. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash for the reaction based on its ID. | |
| std::unique_ptr< Reaction > | clone () const override |
| Polymorphic deep copy. | |
| size_t | countReactantOccurrences (const fourdst::atomic::Species &species) const override |
| size_t | countProductOccurrences (const fourdst::atomic::Species &species) const override |
Public Member Functions inherited from gridfire::reaction::Reaction | |
| virtual | ~Reaction ()=default |
| Virtual destructor for correct polymorphic cleanup. | |
| virtual double | calculate_energy_generation_rate (const double T9, const double rho, const double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: energy generation rate from this reaction (double version). | |
| virtual CppAD::AD< double > | calculate_energy_generation_rate (const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: AD-enabled energy generation rate (AD version). | |
+Protected Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::string | m_id |
| Unique identifier for the reaction (e.g., "h1+h1=>h2+e+nu"). | |
| std::string | m_peName |
| Name of the reaction in (projectile, ejectile) notation (e.g. "p(p,g)d"). | |
| int | m_chapter |
| Chapter number from the REACLIB database, defining the reaction structure. | |
| double | m_qValue = 0.0 |
| Q-value of the reaction in MeV. | |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_reactants |
| Reactants of the reaction. | |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_products |
| Products of the reaction. | |
| std::optional< std::vector< fourdst::atomic::Species > > | m_reactantsVec |
| std::optional< std::vector< fourdst::atomic::Species > > | m_productsVec |
| std::string | m_sourceLabel |
| Source label for the rate data (e.g., "wc12w", "st08"). | |
| RateCoefficientSet | m_rateCoefficients |
| The seven rate coefficients. | |
| bool | m_reverse = false |
| Flag indicating if this is a reverse reaction rate. | |
+Private Member Functions | |
| template<typename T > | |
| T | calculate_rate (const T T9) const |
| Template implementation for calculating the reaction rate. | |
+Friends | |
| std::ostream & | operator<< (std::ostream &os, const ReaclibReaction &r) |
+
|
+ +overridedefault | +
| gridfire::reaction::ReaclibReaction::ReaclibReaction | +( | +std::string_view | +id, | +
| + | + | std::string_view | +peName, | +
| + | + | int | +chapter, | +
| + | + | const std::vector< fourdst::atomic::Species > & | +reactants, | +
| + | + | const std::vector< fourdst::atomic::Species > & | +products, | +
| + | + | double | +qValue, | +
| + | + | std::string_view | +label, | +
| + | + | const RateCoefficientSet & | +sets, | +
| + | + | bool | +reverse = false |
+
| + | ) | ++ |
Constructs a Reaction object.
+| id | A unique identifier for the reaction. |
| peName | The name in (projectile, ejectile) notation (e.g., "p(p,g)d"). |
| chapter | The REACLIB chapter number, defining reaction structure. |
| reactants | A vector of reactant species. |
| products | A vector of product species. |
| qValue | The Q-value of the reaction in MeV. |
| label | The sources label for the rate data (e.g., "wc12", "st08"). |
| sets | The set of rate coefficients. |
| reverse | True if this is a reverse reaction rate. |
+
|
+ +overridevirtual | +
Gets a set of all unique species involved in the reaction.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Logarithmic partial derivative of the rate with respect to temperature.
+Implementations return d(ln rate)/d(ln T9) or an equivalent measure (as documented by the concrete class), evaluated at the provided state.
+| T9 | Temperature in GK (10^9 K). |
| rho | Mass density (g cm^-3). |
| Ye | Electron fraction. |
| mue | Electron chemical potential. |
| comp | Composition object providing composition in a convenient form. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineprivate | +
Template implementation for calculating the reaction rate.
+| T | The numeric type (double or CppAD::AD<double>). |
| T9 | The temperature in units of 10^9 K. |
The rate is calculated using the standard REACLIB formula: rate = exp(a0 + a1/T9 + a2/T9^(1/3) + a3*T9^(1/3) + a4*T9 + a5*T9^(5/3) + a6*ln(T9))
+
|
+ +overridevirtual | +
Calculates the reaction rate for a given temperature using CppAD types.
+| T9 | The temperature in units of 10^9 K, as a CppAD::AD<double>. |
| rho | Density, as a CppAD::AD<double> [Not used in this implementation]. |
| Ye | |
| mue | |
| Y | Molar abundances of species, as a vector of CppAD::AD<double> [Not used in this implementation]. |
| index_to_species_map |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Calculates the reaction rate for a given temperature.
+| T9 | The temperature in units of 10^9 K. |
| rho | Density [Not used in this implementation]. |
| Ye | |
| mue | |
| Y | |
| index_to_species_map |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inline | +
Gets the REACLIB chapter number.
+
+
|
+ +overridevirtual | +
Polymorphic deep copy.
+Implements gridfire::reaction::Reaction.
+ +Reimplemented in gridfire::reaction::WeakReaclibReaction.
+ +
+
|
+ +overridevirtual | +
Checks if the reaction involves a given species as a reactant or product.
+| species | The species to check for. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Checks if the reaction involves a given species as a product.
+| species | The species to check for. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Checks if the reaction involves a given species as a reactant.
+| species | The species to check for. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::reaction::Reaction.
+ +| double gridfire::reaction::ReaclibReaction::excess_energy | +( | +) | +const | +
Calculates the excess energy from the mass difference of reactants and products.
+
+
|
+ +overridevirtual | +
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Computes a hash for the reaction based on its ID.
+| seed | The seed for the hash function. |
Uses the XXHash64 algorithm on the reaction's ID string.
+ +Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Gets the unique identifier of the reaction.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Checks if this is a reverse reaction rate.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Gets the number of unique species involved in the reaction.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inline | +
Compares this reaction with another for inequality.
+| other | The other Reaction to compare with. |
+
|
+ +inline | +
Compares this reaction with another for equality based on their IDs.
+| other | The other Reaction to compare with. |
+
|
+ +inlinevirtual | +
Gets the reaction name in (projectile, ejectile) notation.
+
+
|
+ +overridevirtual | +
Gets a set of all unique product species.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Gets the vector of product species.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Gets the Q-value of the reaction.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inline | +
Gets the set of rate coefficients.
+
+
|
+ +overridevirtual | +
Gets a set of all unique reactant species.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Gets the vector of reactant species.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inline | +
Gets the source label for the rate data.
+
+
|
+ +overridevirtual | +
Gets a map of all species to their stoichiometric coefficients.
+Implements gridfire::reaction::Reaction.
+ +
+
|
+ +overridevirtual | +
Calculates the stoichiometric coefficient for a given species.
+| species | The species for which to find the coefficient. |
Implements gridfire::reaction::Reaction.
+ +
+
|
+ +inlineoverridevirtual | +
Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB).
+Implements gridfire::reaction::Reaction.
+ +Reimplemented in gridfire::reaction::WeakReaclibReaction.
+ +
+
|
+ +friend | +
+
|
+ +protected | +
Chapter number from the REACLIB database, defining the reaction structure.
+ +
+
|
+ +protected | +
Unique identifier for the reaction (e.g., "h1+h1=>h2+e+nu").
+ +
+
|
+ +protected | +
+
|
+ +protected | +
Name of the reaction in (projectile, ejectile) notation (e.g. "p(p,g)d").
+ +
+
|
+ +protected | +
Products of the reaction.
+ +
+
|
+ +mutableprotected | +
+
|
+ +protected | +
Q-value of the reaction in MeV.
+ +
+
|
+ +protected | +
The seven rate coefficients.
+ +
+
|
+ +protected | +
Reactants of the reaction.
+ +
+
|
+ +mutableprotected | +
+
|
+ +protected | +
Flag indicating if this is a reverse reaction rate.
+ +
+
|
+ +protected | +
Source label for the rate data (e.g., "wc12w", "st08").
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::reaction::Reaction, including all inherited members.
+| all_species() const =0 | gridfire::reaction::Reaction | pure virtual |
| calculate_energy_generation_rate(const double T9, const double rho, const double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const | gridfire::reaction::Reaction | inlinevirtual |
| calculate_energy_generation_rate(const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const | gridfire::reaction::Reaction | inlinevirtual |
| calculate_log_rate_partial_deriv_wrt_T9(double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const =0 | gridfire::reaction::Reaction | pure virtual |
| calculate_rate(double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const =0 | gridfire::reaction::Reaction | pure virtual |
| calculate_rate(CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const =0 | gridfire::reaction::Reaction | pure virtual |
| clone() const =0 | gridfire::reaction::Reaction | pure virtual |
| contains(const fourdst::atomic::Species &species) const =0 | gridfire::reaction::Reaction | pure virtual |
| contains_product(const fourdst::atomic::Species &species) const =0 | gridfire::reaction::Reaction | pure virtual |
| contains_reactant(const fourdst::atomic::Species &species) const =0 | gridfire::reaction::Reaction | pure virtual |
| countProductOccurrences(const fourdst::atomic::Species &species) const =0 | gridfire::reaction::Reaction | pure virtual |
| countReactantOccurrences(const fourdst::atomic::Species &species) const =0 | gridfire::reaction::Reaction | pure virtual |
| getRateCoefficients() const =0 | gridfire::reaction::Reaction | pure virtual |
| hash(uint64_t seed) const =0 | gridfire::reaction::Reaction | pure virtual |
| id() const =0 | gridfire::reaction::Reaction | pure virtual |
| is_reverse() const =0 | gridfire::reaction::Reaction | pure virtual |
| num_species() const =0 | gridfire::reaction::Reaction | pure virtual |
| operator<< | gridfire::reaction::Reaction | friend |
| product_species() const =0 | gridfire::reaction::Reaction | pure virtual |
| products() const =0 | gridfire::reaction::Reaction | pure virtual |
| qValue() const =0 | gridfire::reaction::Reaction | pure virtual |
| reactant_species() const =0 | gridfire::reaction::Reaction | pure virtual |
| reactants() const =0 | gridfire::reaction::Reaction | pure virtual |
| stoichiometry() const =0 | gridfire::reaction::Reaction | pure virtual |
| stoichiometry(const fourdst::atomic::Species &species) const =0 | gridfire::reaction::Reaction | pure virtual |
| type() const =0 | gridfire::reaction::Reaction | pure virtual |
| ~Reaction()=default | gridfire::reaction::Reaction | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Represents a single nuclear reaction from a specific data source. + More...
+ +#include <reaction.h>
+Public Member Functions | |
| virtual | ~Reaction ()=default |
| Virtual destructor for correct polymorphic cleanup. | |
| virtual double | calculate_rate (double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const =0 |
| Compute the temperature- and composition-dependent reaction rate. | |
| virtual CppAD::AD< double > | calculate_rate (CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const =0 |
| AD-enabled reaction rate for algorithmic differentiation. | |
| virtual std::string_view | id () const =0 |
| A stable, unique identifier for this reaction instance. | |
| virtual const std::vector< fourdst::atomic::Species > & | reactants () const =0 |
| Ordered list of reactant species. | |
| virtual const std::vector< fourdst::atomic::Species > & | products () const =0 |
| Ordered list of product species. | |
| virtual bool | contains (const fourdst::atomic::Species &species) const =0 |
| True if the species appears as a reactant or a product. | |
| virtual bool | contains_reactant (const fourdst::atomic::Species &species) const =0 |
| True if the species appears among the reactants. | |
| virtual bool | contains_product (const fourdst::atomic::Species &species) const =0 |
| True if the species appears among the products. | |
| virtual bool | is_reverse () const =0 |
| Whether this object represents a reverse (backward) rate. | |
| virtual std::unordered_set< fourdst::atomic::Species > | all_species () const =0 |
| Set of all unique species appearing in the reaction. | |
| virtual std::unordered_set< fourdst::atomic::Species > | reactant_species () const =0 |
| Set of unique reactant species. | |
| virtual std::unordered_set< fourdst::atomic::Species > | product_species () const =0 |
| Set of unique product species. | |
| virtual size_t | countReactantOccurrences (const fourdst::atomic::Species &species) const =0 |
| virtual size_t | countProductOccurrences (const fourdst::atomic::Species &species) const =0 |
| virtual size_t | num_species () const =0 |
| Number of unique species involved in the reaction. | |
| virtual std::unordered_map< fourdst::atomic::Species, int > | stoichiometry () const =0 |
| Full stoichiometry map for this reaction. | |
| virtual int | stoichiometry (const fourdst::atomic::Species &species) const =0 |
| Stoichiometric coefficient for a particular species. | |
| virtual uint64_t | hash (uint64_t seed) const =0 |
| Stable content-based hash for this reaction. | |
| virtual double | qValue () const =0 |
| Q-value of the reaction (typically MeV), positive if exothermic. | |
| virtual double | calculate_energy_generation_rate (const double T9, const double rho, const double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: energy generation rate from this reaction (double version). | |
| virtual CppAD::AD< double > | calculate_energy_generation_rate (const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: AD-enabled energy generation rate (AD version). | |
| virtual double | calculate_log_rate_partial_deriv_wrt_T9 (double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const =0 |
| Logarithmic partial derivative of the rate with respect to temperature. | |
| virtual ReactionType | type () const =0 |
| Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB). | |
| virtual std::unique_ptr< Reaction > | clone () const =0 |
| Polymorphic deep copy. | |
| virtual std::optional< std::vector< RateCoefficientSet > > | getRateCoefficients () const =0 |
+Friends | |
| std::ostream & | operator<< (std::ostream &os, const Reaction &r) |
Represents a single nuclear reaction from a specific data source.
+This class encapsulates all properties of a single nuclear reaction as defined in formats like REACLIB, including reactants, products, Q-value, and rate coefficients from a particular evaluation (source).
+Example:
+
|
+ +virtualdefault | +
Virtual destructor for correct polymorphic cleanup.
+ +
+
|
+ +pure virtual | +
Set of all unique species appearing in the reaction.
+Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +inlinevirtual | +
Convenience: AD-enabled energy generation rate (AD version).
+Default implementation multiplies the AD rate by the reaction Q-value. Electron quantities (Ye, mue) are ignored in this default, so override if they contribute.
+| T9 | Temperature in GK as CppAD::AD<double>. |
| rho | Mass density as CppAD::AD<double>. |
| Ye | Electron fraction as CppAD::AD<double> (ignored by default). |
| mue | Electron chemical potential as CppAD::AD<double> (ignored by default). |
| Y | Composition vector as CppAD::AD<double> values. |
| index_to_species_map | Mapping from state-vector index to Species. |
Reimplemented in gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +inlinevirtual | +
Convenience: energy generation rate from this reaction (double version).
+Default implementation multiplies the scalar rate by the reaction Q-value. Electron quantities (Ye, mue) are ignored in this default, so override in derived classes if needed. Sign convention follows qValue().
+| T9 | Temperature in GK (10^9 K). |
| rho | Mass density (g cm^-3). |
| Ye | Electron fraction (ignored by default implementation). |
| mue | Electron chemical potential (ignored by default implementation). |
| Y | Composition vector. |
| index_to_species_map | Mapping from state-vector index to Species. |
Reimplemented in gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Logarithmic partial derivative of the rate with respect to temperature.
+Implementations return d(ln rate)/d(ln T9) or an equivalent measure (as documented by the concrete class), evaluated at the provided state.
+| T9 | Temperature in GK (10^9 K). |
| rho | Mass density (g cm^-3). |
| Ye | Electron fraction. |
| mue | Electron chemical potential. |
| comp | Composition object providing composition in a convenient form. |
Implemented in gridfire::reaction::ReaclibReaction, gridfire::reaction::LogicalReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
AD-enabled reaction rate for algorithmic differentiation.
+This overload mirrors calculate_rate(double, ...) but operates on CppAD types to enable derivative calculations w.r.t. its inputs.
+| T9 | Temperature in GK as CppAD::AD<double>. |
| rho | Mass density as CppAD::AD<double>. |
| Ye | Electron fraction as CppAD::AD<double>. |
| mue | Electron chemical potential as CppAD::AD<double>. |
| Y | Composition vector as CppAD::AD<double> values. |
| index_to_species_map | Mapping from state-vector index to Species, used to interpret Y. |
Implemented in gridfire::reaction::ReaclibReaction, gridfire::reaction::LogicalReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Compute the temperature- and composition-dependent reaction rate.
+This is the primary interface used by the network to obtain the rate of a single reaction at the given thermodynamic state and composition. The exact units and normalization are defined by the concrete implementation (e.g., REACLIB typically provides NA<sigma v> with units depending on the reaction order). Implementations may use density/electron properties for weak processes or screening, and the composition vector for multi-body reactions.
+| T9 | Temperature in GK (10^9 K). |
| rho | Mass density (g cm^-3). May be unused for some reaction types. |
| Ye | Electron fraction. May be unused depending on the reaction type. |
| mue | Electron chemical potential. May be unused depending on the reaction type. |
| Y | Composition vector (molar abundances or number fractions) indexed consistently with index_to_species_map. |
| index_to_species_map | Mapping from state-vector index to Species, used to interpret Y. |
Implemented in gridfire::reaction::ReaclibReaction, gridfire::reaction::LogicalReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Polymorphic deep copy.
+Implemented in gridfire::reaction::ReaclibReaction, gridfire::reaction::WeakReaclibReaction, gridfire::reaction::LogicalReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
True if the species appears as a reactant or a product.
+| species | Species to test. |
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
True if the species appears among the products.
+| species | Species to test. |
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
True if the species appears among the reactants.
+| species | Species to test. |
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::reaction::ReaclibReaction, gridfire::reaction::LogicalReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Stable content-based hash for this reaction.
+Intended for use in caches, sets, and order-independent hashing of Reaction collections. Implementations should produce the same value across processes for the same content and seed.
| seed | Seed value to initialize/mix into the hash. |
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
A stable, unique identifier for this reaction instance.
+Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Whether this object represents a reverse (backward) rate.
+Implementations may pair forward/reverse rates for detailed balance. This flag indicates that the parameterization corresponds to the reverse direction.
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Number of unique species involved in the reaction.
+Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Set of unique product species.
+Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Ordered list of product species.
+Multiplicity is represented by duplicates if applicable.
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Q-value of the reaction (typically MeV), positive if exothermic.
+Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Set of unique reactant species.
+Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Ordered list of reactant species.
+Multiplicity is represented by duplicates, e.g., (p, p) would list H1 twice.
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Full stoichiometry map for this reaction.
+Coefficients are negative for reactants and positive for products; multiplicity is reflected in the magnitude (e.g., 2H -> He gives H: -2, He: +1).
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Stoichiometric coefficient for a particular species.
+| species | Species for which to query the coefficient. |
Implemented in gridfire::reaction::ReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +pure virtual | +
Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB).
+Implemented in gridfire::reaction::ReaclibReaction, gridfire::reaction::WeakReaclibReaction, gridfire::reaction::LogicalReaclibReaction, and gridfire::rates::weak::WeakReaction.
+ +
+
|
+ +friend | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::reaction::ReactionSet, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <reaction.h>
+Public Member Functions | |
| ReactionSet (std::vector< std::unique_ptr< Reaction > > &&reactions) | |
| Constructs a ReactionSet from a vector of reactions. | |
| ReactionSet (const std::vector< Reaction * > &reactions) | |
| ReactionSet () | |
| ReactionSet (const ReactionSet &other) | |
| Copy constructor. | |
| ReactionSet & | operator= (const ReactionSet &other) |
| Copy assignment operator. | |
| void | add_reaction (const Reaction &reaction) |
| Adds a reaction to the set. | |
| void | add_reaction (std::unique_ptr< Reaction > &&reaction) |
| void | extend (const ReactionSet &other) |
| std::optional< std::unique_ptr< Reaction > > | get (const std::string_view &id) const |
| void | remove_reaction (const Reaction &reaction) |
| Removes a reaction from the set. | |
| bool | contains (const std::string_view &id) const |
| Checks if the set contains a reaction with the given ID. | |
| bool | contains (const Reaction &reaction) const |
| Checks if the set contains the given reaction. | |
| size_t | size () const |
| Gets the number of reactions in the set. | |
| bool | empty () const |
| void | clear () |
| Removes all reactions from the set. | |
| bool | contains_species (const fourdst::atomic::Species &species) const |
| Checks if any reaction in the set involves the given species. | |
| bool | contains_reactant (const fourdst::atomic::Species &species) const |
| Checks if any reaction in the set contains the given species as a reactant. | |
| bool | contains_product (const fourdst::atomic::Species &species) const |
| Checks if any reaction in the set contains the given species as a product. | |
| const Reaction & | operator[] (size_t index) const |
| Accesses a reaction by its index. | |
| const Reaction & | operator[] (const std::string_view &id) const |
| Accesses a reaction by its ID. | |
| bool | operator== (const ReactionSet &other) const |
| Compares this set with another for equality. | |
| bool | operator!= (const ReactionSet &other) const |
| Compares this set with another for inequality. | |
| uint64_t | hash (uint64_t seed) const |
| Computes a hash for the entire set. | |
| std::unordered_set< fourdst::atomic::Species > | getReactionSetSpecies () const |
Iterators | |
Provides iterators to loop over the reactions in the set. + | |
| auto | begin () |
| auto | begin () const |
| auto | end () |
| auto | end () const |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::vector< std::unique_ptr< Reaction > > | m_reactions |
| std::string | m_id |
| std::unordered_map< std::string, size_t > | m_reactionNameMap |
| Maps reaction IDs to Reaction objects for quick lookup. | |
| std::unordered_set< size_t > | m_reactionHashes |
+Friends | |
| std::ostream & | operator<< (std::ostream &os, const ReactionSet &rs) |
+
|
+ +explicit | +
Constructs a ReactionSet from a vector of reactions.
+| reactions | The initial vector of Reaction objects. |
+
|
+ +explicit | +
+
|
+ +default | +
| gridfire::reaction::ReactionSet::ReactionSet | +( | +const ReactionSet & | +other | ) | ++ |
Copy constructor.
+| other | The ReactionSet to copy. |
| void gridfire::reaction::ReactionSet::add_reaction | +( | +const Reaction & | +reaction | ) | ++ |
Adds a reaction to the set.
+| reaction | The Reaction to add. |
| void gridfire::reaction::ReactionSet::add_reaction | +( | +std::unique_ptr< Reaction > && | +reaction | ) | ++ |
+
|
+ +inline | +
+
|
+ +inline | +
| void gridfire::reaction::ReactionSet::clear | +( | +) | ++ |
Removes all reactions from the set.
+ +| bool gridfire::reaction::ReactionSet::contains | +( | +const Reaction & | +reaction | ) | +const | +
Checks if the set contains the given reaction.
+| reaction | The Reaction to find. |
| bool gridfire::reaction::ReactionSet::contains | +( | +const std::string_view & | +id | ) | +const | +
Checks if the set contains a reaction with the given ID.
+| id | The ID of the reaction to find. |
| bool gridfire::reaction::ReactionSet::contains_product | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Checks if any reaction in the set contains the given species as a product.
+| species | The species to check for. |
| bool gridfire::reaction::ReactionSet::contains_reactant | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Checks if any reaction in the set contains the given species as a reactant.
+| species | The species to check for. |
| bool gridfire::reaction::ReactionSet::contains_species | +( | +const fourdst::atomic::Species & | +species | ) | +const | +
Checks if any reaction in the set involves the given species.
+| species | The species to check for. |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
| void gridfire::reaction::ReactionSet::extend | +( | +const ReactionSet & | +other | ) | ++ |
| std::optional< std::unique_ptr< Reaction > > gridfire::reaction::ReactionSet::get | +( | +const std::string_view & | +id | ) | +const | +
| std::unordered_set< Species > gridfire::reaction::ReactionSet::getReactionSetSpecies | +( | +) | +const | +
| uint64_t gridfire::reaction::ReactionSet::hash | +( | +uint64_t | +seed | ) | +const | +
Computes a hash for the entire set.
+| seed | The seed for the hash function. |
The algorithm computes the hash of each individual reaction, sorts the hashes, and then computes a final hash over the sorted list of hashes. This ensures the hash is order-independent.
+ +| bool gridfire::reaction::ReactionSet::operator!= | +( | +const ReactionSet & | +other | ) | +const | +
Compares this set with another for inequality.
+| other | The other ReactionSet to compare with. |
| ReactionSet & gridfire::reaction::ReactionSet::operator= | +( | +const ReactionSet & | +other | ) | ++ |
Copy assignment operator.
+| other | The ReactionSet to assign from. |
| bool gridfire::reaction::ReactionSet::operator== | +( | +const ReactionSet & | +other | ) | +const | +
Compares this set with another for equality.
+| other | The other ReactionSet to compare with. |
| const Reaction & gridfire::reaction::ReactionSet::operator[] | +( | +const std::string_view & | +id | ) | +const | +
Accesses a reaction by its ID.
+| id | The ID of the reaction to access. |
| std::out_of_range | if no reaction with the given ID exists. |
| const Reaction & gridfire::reaction::ReactionSet::operator[] | +( | +size_t | +index | ) | +const | +
Accesses a reaction by its index.
+| index | The index of the reaction to access. |
| std::out_of_range | if the index is out of bounds. |
| void gridfire::reaction::ReactionSet::remove_reaction | +( | +const Reaction & | +reaction | ) | ++ |
Removes a reaction from the set.
+| reaction | The Reaction to remove. |
+
|
+ +inline | +
Gets the number of reactions in the set.
+
+
|
+ +friend | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +private | +
Maps reaction IDs to Reaction objects for quick lookup.
+ +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::reaction::WeakReaclibReaction, including all inherited members.
+| all_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_energy_generation_rate(const double T9, const double rho, const double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const | gridfire::reaction::Reaction | inlinevirtual |
| calculate_energy_generation_rate(const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const | gridfire::reaction::Reaction | inlinevirtual |
| calculate_log_rate_partial_deriv_wrt_T9(double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_rate(double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_rate(CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override | gridfire::reaction::ReaclibReaction | virtual |
| calculate_rate(const T T9) const | gridfire::reaction::ReaclibReaction | inlineprivate |
| chapter() const | gridfire::reaction::ReaclibReaction | inline |
| clone() const override | gridfire::reaction::WeakReaclibReaction | inlinevirtual |
| contains(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| contains_product(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| contains_reactant(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| countProductOccurrences(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| countReactantOccurrences(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| excess_energy() const | gridfire::reaction::ReaclibReaction | |
| getRateCoefficients() const override | gridfire::reaction::ReaclibReaction | virtual |
| hash(uint64_t seed) const override | gridfire::reaction::ReaclibReaction | virtual |
| id() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| is_reverse() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| m_chapter | gridfire::reaction::ReaclibReaction | protected |
| m_id | gridfire::reaction::ReaclibReaction | protected |
| m_logger | gridfire::reaction::ReaclibReaction | protected |
| m_peName | gridfire::reaction::ReaclibReaction | protected |
| m_products | gridfire::reaction::ReaclibReaction | protected |
| m_productsVec | gridfire::reaction::ReaclibReaction | mutableprotected |
| m_qValue | gridfire::reaction::ReaclibReaction | protected |
| m_rateCoefficients | gridfire::reaction::ReaclibReaction | protected |
| m_reactants | gridfire::reaction::ReaclibReaction | protected |
| m_reactantsVec | gridfire::reaction::ReaclibReaction | mutableprotected |
| m_reverse | gridfire::reaction::ReaclibReaction | protected |
| m_sourceLabel | gridfire::reaction::ReaclibReaction | protected |
| num_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| operator!=(const ReaclibReaction &other) const | gridfire::reaction::ReaclibReaction | inline |
| operator==(const ReaclibReaction &other) const | gridfire::reaction::ReaclibReaction | inline |
| peName() const | gridfire::reaction::ReaclibReaction | inlinevirtual |
| product_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| products() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| qValue() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| rateCoefficients() const | gridfire::reaction::ReaclibReaction | inline |
| ReaclibReaction(std::string_view id, std::string_view peName, int chapter, const std::vector< fourdst::atomic::Species > &reactants, const std::vector< fourdst::atomic::Species > &products, double qValue, std::string_view label, const RateCoefficientSet &sets, bool reverse=false) | gridfire::reaction::WeakReaclibReaction | |
| reactant_species() const override | gridfire::reaction::ReaclibReaction | virtual |
| reactants() const override | gridfire::reaction::ReaclibReaction | inlinevirtual |
| sourceLabel() const | gridfire::reaction::ReaclibReaction | inline |
| stoichiometry(const fourdst::atomic::Species &species) const override | gridfire::reaction::ReaclibReaction | virtual |
| stoichiometry() const override | gridfire::reaction::ReaclibReaction | virtual |
| type() const override | gridfire::reaction::WeakReaclibReaction | inlinevirtual |
| ~ReaclibReaction() override=default | gridfire::reaction::ReaclibReaction | |
| ~Reaction()=default | gridfire::reaction::Reaction | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <reaction.h>
+Public Member Functions | |
| ReactionType | type () const override |
| Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB). | |
| std::unique_ptr< Reaction > | clone () const override |
| Polymorphic deep copy. | |
| ReaclibReaction (std::string_view id, std::string_view peName, int chapter, const std::vector< fourdst::atomic::Species > &reactants, const std::vector< fourdst::atomic::Species > &products, double qValue, std::string_view label, const RateCoefficientSet &sets, bool reverse=false) | |
| Constructs a Reaction object. | |
Public Member Functions inherited from gridfire::reaction::ReaclibReaction | |
| ~ReaclibReaction () override=default | |
| ReaclibReaction (std::string_view id, std::string_view peName, int chapter, const std::vector< fourdst::atomic::Species > &reactants, const std::vector< fourdst::atomic::Species > &products, double qValue, std::string_view label, const RateCoefficientSet &sets, bool reverse=false) | |
| Constructs a Reaction object. | |
| double | calculate_rate (double T9, double rho, double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the reaction rate for a given temperature. | |
| CppAD::AD< double > | calculate_rate (CppAD::AD< double > T9, CppAD::AD< double > rho, CppAD::AD< double > Ye, CppAD::AD< double > mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const override |
| Calculates the reaction rate for a given temperature using CppAD types. | |
| double | calculate_log_rate_partial_deriv_wrt_T9 (double T9, double rho, double Ye, double mue, const fourdst::composition::Composition &comp) const override |
| Logarithmic partial derivative of the rate with respect to temperature. | |
| virtual std::string_view | peName () const |
| Gets the reaction name in (projectile, ejectile) notation. | |
| int | chapter () const |
| Gets the REACLIB chapter number. | |
| std::string_view | sourceLabel () const |
| Gets the source label for the rate data. | |
| const RateCoefficientSet & | rateCoefficients () const |
| Gets the set of rate coefficients. | |
| std::optional< std::vector< RateCoefficientSet > > | getRateCoefficients () const override |
| bool | contains (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a reactant or product. | |
| bool | contains_reactant (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a reactant. | |
| bool | contains_product (const fourdst::atomic::Species &species) const override |
| Checks if the reaction involves a given species as a product. | |
| std::unordered_set< fourdst::atomic::Species > | all_species () const override |
| Gets a set of all unique species involved in the reaction. | |
| std::unordered_set< fourdst::atomic::Species > | reactant_species () const override |
| Gets a set of all unique reactant species. | |
| std::unordered_set< fourdst::atomic::Species > | product_species () const override |
| Gets a set of all unique product species. | |
| size_t | num_species () const override |
| Gets the number of unique species involved in the reaction. | |
| int | stoichiometry (const fourdst::atomic::Species &species) const override |
| Calculates the stoichiometric coefficient for a given species. | |
| std::unordered_map< fourdst::atomic::Species, int > | stoichiometry () const override |
| Gets a map of all species to their stoichiometric coefficients. | |
| std::string_view | id () const override |
| Gets the unique identifier of the reaction. | |
| double | qValue () const override |
| Gets the Q-value of the reaction. | |
| const std::vector< fourdst::atomic::Species > & | reactants () const override |
| Gets the vector of reactant species. | |
| const std::vector< fourdst::atomic::Species > & | products () const override |
| Gets the vector of product species. | |
| bool | is_reverse () const override |
| Checks if this is a reverse reaction rate. | |
| double | excess_energy () const |
| Calculates the excess energy from the mass difference of reactants and products. | |
| bool | operator== (const ReaclibReaction &other) const |
| Compares this reaction with another for equality based on their IDs. | |
| bool | operator!= (const ReaclibReaction &other) const |
| Compares this reaction with another for inequality. | |
| uint64_t | hash (uint64_t seed) const override |
| Computes a hash for the reaction based on its ID. | |
| size_t | countReactantOccurrences (const fourdst::atomic::Species &species) const override |
| size_t | countProductOccurrences (const fourdst::atomic::Species &species) const override |
Public Member Functions inherited from gridfire::reaction::Reaction | |
| virtual | ~Reaction ()=default |
| Virtual destructor for correct polymorphic cleanup. | |
| virtual double | calculate_energy_generation_rate (const double T9, const double rho, const double Ye, double mue, const std::vector< double > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: energy generation rate from this reaction (double version). | |
| virtual CppAD::AD< double > | calculate_energy_generation_rate (const CppAD::AD< double > &T9, const CppAD::AD< double > &rho, const CppAD::AD< double > &Ye, const CppAD::AD< double > &mue, const std::vector< CppAD::AD< double > > &Y, const std::unordered_map< size_t, fourdst::atomic::Species > &index_to_species_map) const |
| Convenience: AD-enabled energy generation rate (AD version). | |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::reaction::ReaclibReaction | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::string | m_id |
| Unique identifier for the reaction (e.g., "h1+h1=>h2+e+nu"). | |
| std::string | m_peName |
| Name of the reaction in (projectile, ejectile) notation (e.g. "p(p,g)d"). | |
| int | m_chapter |
| Chapter number from the REACLIB database, defining the reaction structure. | |
| double | m_qValue = 0.0 |
| Q-value of the reaction in MeV. | |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_reactants |
| Reactants of the reaction. | |
| std::unordered_map< fourdst::atomic::Species, size_t > | m_products |
| Products of the reaction. | |
| std::optional< std::vector< fourdst::atomic::Species > > | m_reactantsVec |
| std::optional< std::vector< fourdst::atomic::Species > > | m_productsVec |
| std::string | m_sourceLabel |
| Source label for the rate data (e.g., "wc12w", "st08"). | |
| RateCoefficientSet | m_rateCoefficients |
| The seven rate coefficients. | |
| bool | m_reverse = false |
| Flag indicating if this is a reverse reaction rate. | |
+
|
+ +inlineoverridevirtual | +
Polymorphic deep copy.
+Reimplemented from gridfire::reaction::ReaclibReaction.
+ +| gridfire::reaction::ReaclibReaction::ReaclibReaction | +( | +std::string_view | +id, | +
| + | + | std::string_view | +peName, | +
| + | + | int | +chapter, | +
| + | + | const std::vector< fourdst::atomic::Species > & | +reactants, | +
| + | + | const std::vector< fourdst::atomic::Species > & | +products, | +
| + | + | double | +qValue, | +
| + | + | std::string_view | +label, | +
| + | + | const RateCoefficientSet & | +sets, | +
| + | + | bool | +reverse = false |
+
| + | ) | ++ |
Constructs a Reaction object.
+| id | A unique identifier for the reaction. |
| peName | The name in (projectile, ejectile) notation (e.g., "p(p,g)d"). |
| chapter | The REACLIB chapter number, defining reaction structure. |
| reactants | A vector of reactant species. |
| products | A vector of product species. |
| qValue | The Q-value of the reaction in MeV. |
| label | The sources label for the rate data (e.g., "wc12", "st08"). |
| sets | The set of rate coefficients. |
| reverse | True if this is a reverse reaction rate. |
+
|
+ +inlineoverridevirtual | +
Category of this reaction (e.g., REACLIB, WEAK, LOGICAL_REACLIB).
+Reimplemented from gridfire::reaction::ReaclibReaction.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::screening::BareScreeningModel, including all inherited members.
+| ADDouble typedef | gridfire::screening::BareScreeningModel | private |
| calculateFactors_impl(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, const T &T9, const T &rho) const | gridfire::screening::BareScreeningModel | private |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override | gridfire::screening::BareScreeningModel | virtual |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, ADDouble T9, ADDouble rho) const override | gridfire::screening::BareScreeningModel | virtual |
| ~ScreeningModel()=default | gridfire::screening::ScreeningModel | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
A screening model that applies no screening effect. + More...
+ +#include <screening_bare.h>
+Public Member Functions | |
| std::vector< double > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override |
| Calculates screening factors, which are always 1.0. | |
| std::vector< ADDouble > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, ADDouble T9, ADDouble rho) const override |
| Calculates screening factors for AD types, which are always 1.0. | |
Public Member Functions inherited from gridfire::screening::ScreeningModel | |
| virtual | ~ScreeningModel ()=default |
| Virtual destructor. | |
+Private Types | |
| using | ADDouble = CppAD::AD< double > |
| Alias for CppAD Automatic Differentiation type for double precision. | |
+Private Member Functions | |
| template<typename T > | |
| std::vector< T > | calculateFactors_impl (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, const T &T9, const T &rho) const |
| Template implementation for calculating screening factors. | |
+Additional Inherited Members | |
Public Types inherited from gridfire::screening::ScreeningModel | |
| using | ADDouble = CppAD::AD< double > |
| Alias for CppAD Automatic Differentiation type for double precision. | |
A screening model that applies no screening effect.
+This class implements the ScreeningModel interface but returns a screening factor of 1.0 for all reactions, regardless of the plasma conditions. It represents the case of bare, unscreened nuclei and serves as a baseline or can be used when screening effects are negligible or intentionally ignored.
+
|
+ +private | +
Alias for CppAD Automatic Differentiation type for double precision.
+ +
+
|
+ +private | +
Template implementation for calculating screening factors.
+Template implementation for the bare screening model.
+This private helper function contains the core logic for both the double and ADDouble versions of calculateScreeningFactors. It is templated to handle both numeric types seamlessly.
| T | The numeric type, either double or CppAD::AD<double>. |
| reactions | The set of reactions for which to calculate factors. |
| species | A vector of all atomic species (unused). |
| Y | The current molar composition (unused). |
| T9 | The temperature (unused). |
| rho | The density (unused). |
T with all elements initialized to 1.0.This function provides the actual implementation for calculateFactors_impl. It creates a vector of the appropriate numeric type (T) and size, and initializes all its elements to 1.0, representing no screening.
| T | The numeric type, either double or CppAD::AD<double>. |
| reactions | The set of reactions, used to determine the size of the output vector. |
| species | Unused parameter. |
| Y | Unused parameter. @param T9 Unused parameter. @param rho Unused parameter. @return Astd::vector<T>of the same size asreactions`, with all elements set to 1.0. |
+
|
+ +overridevirtual | +
Calculates screening factors for AD types, which are always 1.0.
+This implementation returns a vector of AD-typed screening factors where every element is 1.0. This is the automatic differentiation-compatible version.
+| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species (unused). |
| Y | The current composition, providing molar abundances (mol/g) for each species (unused). |
| T9 | The temperature as an AD type (unused). |
| rho | The plasma density as an AD type (unused). |
reactions set. Implements gridfire::screening::ScreeningModel.
+ +
+
|
+ +overridevirtual | +
Calculates screening factors, which are always 1.0.
+This implementation returns a vector of screening factors where every element is 1.0, effectively applying no screening correction to the reaction rates.
+| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species (unused). |
| Y | A vector of the molar abundances. |
| T9 | The temperature (unused). |
| rho | The plasma density (unused). |
reactions set.Algorithm The function simply creates and returns a std::vector<double> of the same size as the input reactions set, with all elements initialized to 1.0.
Usage
Implements gridfire::screening::ScreeningModel.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::screening::IntermediateScreeningModel, including all inherited members.
+| ADDouble typedef | gridfire::screening::ScreeningModel | |
| calculateFactors_impl(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, T T9, T rho) const | gridfire::screening::IntermediateScreeningModel | private |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override | gridfire::screening::IntermediateScreeningModel | virtual |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< ADDouble > &Y, ADDouble T9, ADDouble rho) const override | gridfire::screening::IntermediateScreeningModel | virtual |
| ~ScreeningModel()=default | gridfire::screening::ScreeningModel | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <screening_intermediate.h>
+Public Member Functions | |
| std::vector< double > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override |
| Calculates screening factors for a set of reactions. | |
| std::vector< ADDouble > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< ADDouble > &Y, ADDouble T9, ADDouble rho) const override |
| Calculates screening factors using CppAD types for automatic differentiation. | |
Public Member Functions inherited from gridfire::screening::ScreeningModel | |
| virtual | ~ScreeningModel ()=default |
| Virtual destructor. | |
+Private Member Functions | |
| template<typename T > | |
| std::vector< T > | calculateFactors_impl (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, T T9, T rho) const |
+Additional Inherited Members | |
Public Types inherited from gridfire::screening::ScreeningModel | |
| using | ADDouble = CppAD::AD< double > |
| Alias for CppAD Automatic Differentiation type for double precision. | |
+
|
+ +private | +
+
|
+ +overridevirtual | +
Calculates screening factors using CppAD types for automatic differentiation.
+This is a pure virtual function that provides an overload of calculateScreeningFactors for use with CppAD. It allows the derivatives of the screening factors with respect to abundances, temperature, and density to be computed automatically.
| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The current composition, providing molar abundances (mol/g) for each species. |
| T9 | The temperature in units of 10^9 K, as an AD type. |
| rho | The plasma density in g/cm^3, as an AD type. |
Note This method is essential for including the effects of screening in the Jacobian matrix of the reaction network.
+ +Implements gridfire::screening::ScreeningModel.
+ +
+
|
+ +overridevirtual | +
Calculates screening factors for a set of reactions.
+This is a pure virtual function that must be implemented by derived classes. It computes the screening enhancement factor for each reaction in the provided set based on the given plasma conditions.
+| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The current composition, providing molar abundances (mol/g) for each species. |
| T9 | The temperature in units of 10^9 K. |
| rho | The plasma density in g/cm^3. |
reactions set, in the same order.Pre-conditions
Y vector must match the size of the species vector.T9 and rho must be positive.Post-conditions
reactions set.Usage
Implements gridfire::screening::ScreeningModel.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::screening::ScreeningModel, including all inherited members.
+| ADDouble typedef | gridfire::screening::ScreeningModel | |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const =0 | gridfire::screening::ScreeningModel | pure virtual |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, ADDouble T9, ADDouble rho) const =0 | gridfire::screening::ScreeningModel | pure virtual |
| ~ScreeningModel()=default | gridfire::screening::ScreeningModel | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
An abstract base class for plasma screening models. + More...
+ +#include <screening_abstract.h>
+Public Types | |
| using | ADDouble = CppAD::AD< double > |
| Alias for CppAD Automatic Differentiation type for double precision. | |
+Public Member Functions | |
| virtual | ~ScreeningModel ()=default |
| Virtual destructor. | |
| virtual std::vector< double > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const =0 |
| Calculates screening factors for a set of reactions. | |
| virtual std::vector< ADDouble > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, ADDouble T9, ADDouble rho) const =0 |
| Calculates screening factors using CppAD types for automatic differentiation. | |
An abstract base class for plasma screening models.
+This class defines the interface for models that calculate the enhancement factor for nuclear reaction rates due to the electrostatic screening of interacting nuclei by the surrounding plasma. Concrete implementations of this class will provide specific screening prescriptions (e.g., WEAK, BARE, STRONG, etc.).
+The interface provides methods for calculating screening factors for both standard double-precision inputs and for CppAD's automatic differentiation types, allowing the screening contributions to be included in Jacobian calculations.
+| using gridfire::screening::ScreeningModel::ADDouble = CppAD::AD<double> | +
Alias for CppAD Automatic Differentiation type for double precision.
+ +
+
|
+ +virtualdefault | +
Virtual destructor.
+Ensures that derived class destructors are called correctly.
+ +
+
|
+ +pure virtual | +
Calculates screening factors using CppAD types for automatic differentiation.
+This is a pure virtual function that provides an overload of calculateScreeningFactors for use with CppAD. It allows the derivatives of the screening factors with respect to abundances, temperature, and density to be computed automatically.
| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The current composition, providing molar abundances (mol/g) for each species. |
| T9 | The temperature in units of 10^9 K, as an AD type. |
| rho | The plasma density in g/cm^3, as an AD type. |
Note This method is essential for including the effects of screening in the Jacobian matrix of the reaction network.
+ +Implemented in PyScreening, gridfire::screening::IntermediateScreeningModel, gridfire::screening::BareScreeningModel, and gridfire::screening::WeakScreeningModel.
+ +
+
|
+ +pure virtual | +
Calculates screening factors for a set of reactions.
+This is a pure virtual function that must be implemented by derived classes. It computes the screening enhancement factor for each reaction in the provided set based on the given plasma conditions.
+| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The current composition, providing molar abundances (mol/g) for each species. |
| T9 | The temperature in units of 10^9 K. |
| rho | The plasma density in g/cm^3. |
reactions set, in the same order.Pre-conditions
Y vector must match the size of the species vector.T9 and rho must be positive.Post-conditions
reactions set.Usage
Implemented in PyScreening, gridfire::screening::BareScreeningModel, gridfire::screening::IntermediateScreeningModel, and gridfire::screening::WeakScreeningModel.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::screening::WeakScreeningModel, including all inherited members.
+| ADDouble typedef | gridfire::screening::ScreeningModel | |
| calculateFactors_impl(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, T T9, T rho) const | gridfire::screening::WeakScreeningModel | private |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override | gridfire::screening::WeakScreeningModel | virtual |
| calculateScreeningFactors(const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, CppAD::AD< double > T9, CppAD::AD< double > rho) const override | gridfire::screening::WeakScreeningModel | virtual |
| m_logger | gridfire::screening::WeakScreeningModel | private |
| ~ScreeningModel()=default | gridfire::screening::ScreeningModel | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Implements the weak screening model based on the Debye-Hückel approximation. + More...
+ +#include <screening_weak.h>
+Public Member Functions | |
| std::vector< double > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override |
| Calculates weak screening factors for a set of reactions. | |
| std::vector< CppAD::AD< double > > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, CppAD::AD< double > T9, CppAD::AD< double > rho) const override |
| Calculates weak screening factors using CppAD types. | |
Public Member Functions inherited from gridfire::screening::ScreeningModel | |
| virtual | ~ScreeningModel ()=default |
| Virtual destructor. | |
+Private Member Functions | |
| template<IsArithmeticOrAD T> | |
| std::vector< T > | calculateFactors_impl (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, T T9, T rho) const |
| Template implementation for calculating weak screening factors. | |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| Logger instance for recording trace and debug information. | |
+Additional Inherited Members | |
Public Types inherited from gridfire::screening::ScreeningModel | |
| using | ADDouble = CppAD::AD< double > |
| Alias for CppAD Automatic Differentiation type for double precision. | |
Implements the weak screening model based on the Debye-Hückel approximation.
+This class provides a concrete implementation of the ScreeningModel interface for the weak screening regime, following the formulation of Salpeter (1954). This approach applies the Debye-Hückel theory to model the electrostatic shielding of nuclei in a plasma. It is applicable to non-degenerate, non-relativistic plasmas where thermal energy dominates the electrostatic potential energy.
+
|
+ +private | +
Template implementation for calculating weak screening factors.
+Core implementation of the weak screening calculation (Debye-Hückel model).
+This private helper function contains the core logic for calculating weak screening factors. It is templated to handle both double and CppAD::AD<double> numeric types, avoiding code duplication.
| T | The numeric type, either double or CppAD::AD<double>. |
| reactions | The set of reactions. |
| species | A vector of all species in the network. |
| Y | The composition object with current molar abundances. |
| T9 | The temperature in 10^9 K. |
| rho | The density in g/cm^3. |
T.This function calculates the screening factor exp(H_12) for each reaction, based on the Debye-Hückel approximation as formulated by Salpeter (1954).
| T | The numeric type (double or CppAD::AD<double>). |
| reactions | The set of reactions to be screened. |
| species | The list of all species in the network. |
| Y | The composition object providing current molar abundances. |
| T9 | The temperature in 10^9 K. |
| rho | The density in g/cm^3. |
Algorithm
ζ = ∑(Z_i² + Z_i) * Y_i, where Z_i is the charge and Y_i is the molar abundance of species i.prefactor = 0.188 * sqrt(ρ / T₇³) * sqrt(ζ), where T₇ is the temperature in units of 10^7 K.H_12 = prefactor * Z₁ * Z₂.H_12 = 3 * (prefactor * Z_α * Z_α).exp(H_12).
+
|
+ +overridevirtual | +
Calculates weak screening factors using CppAD types.
+This is the automatic differentiation-compatible version of the method. It allows the derivatives of the screening factors to be computed with respect to plasma conditions.
+| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The composition object giving the current molar abundances. |
| T9 | The temperature as an AD type. |
| rho | The plasma density as an AD type. |
Implements gridfire::screening::ScreeningModel.
+ +
+
|
+ +overridevirtual | +
Calculates weak screening factors for a set of reactions.
+This method computes the screening enhancement factor for each reaction based on the Salpeter (1954) formula.
+| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species involved in the network. |
| Y | The composition object giving the current molar abundances. |
| T9 | The temperature in units of 10^9 K. |
| rho | The plasma density in g/cm^3. |
Usage
Implements gridfire::screening::ScreeningModel.
+ +
+
|
+ +private | +
Logger instance for recording trace and debug information.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::solver::CVODESolverStrategy, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Stiff ODE integrator backed by SUNDIALS CVODE (BDF) for network + energy. + More...
+ +#include <CVODE_solver_strategy.h>
+Classes | |
| struct | CVODERHSOutputData |
| struct | CVODEUserData |
| A helper struct to pass C++ context to C-style CVODE callbacks. More... | |
| struct | TimestepContext |
| Immutable view of the current integration state passed to callbacks. More... | |
+Public Types | |
| using | TimestepCallback = std::function< void(const TimestepContext &context)> |
| Type alias for a timestep callback function. | |
+Public Member Functions | |
| CVODESolverStrategy (engine::DynamicEngine &engine) | |
| Construct the CVODE strategy and create a SUNDIALS context. | |
| ~CVODESolverStrategy () override | |
| Destructor: cleans CVODE/SUNDIALS resources and frees SUNContext. | |
| CVODESolverStrategy (const CVODESolverStrategy &)=delete | |
| CVODESolverStrategy & | operator= (const CVODESolverStrategy &)=delete |
| CVODESolverStrategy (CVODESolverStrategy &&)=delete | |
| CVODESolverStrategy & | operator= (CVODESolverStrategy &&)=delete |
| NetOut | evaluate (const NetIn &netIn) override |
| Integrate from t=0 to netIn.tMax and return final composition and energy. | |
| NetOut | evaluate (const NetIn &netIn, bool displayTrigger) |
| Call to evaluate which will let the user control if the trigger reasoning is displayed. | |
| void | set_callback (const std::any &callback) override |
| Install a timestep callback. | |
| bool | get_stdout_logging_enabled () const |
| Whether per-step logs are printed to stdout and CVode is stepped with CV_ONE_STEP. | |
| void | set_stdout_logging_enabled (bool logging_enabled) |
| Enable/disable per-step stdout logging. | |
| void | set_absTol (double absTol) |
| void | set_relTol (double relTol) |
| double | get_absTol () const |
| double | get_relTol () const |
| std::vector< std::tuple< std::string, std::string > > | describe_callback_context () const override |
| Schema of fields exposed to the timestep callback context. | |
Public Member Functions inherited from gridfire::solver::NetworkSolverStrategy< EngineT > | |
| NetworkSolverStrategy (EngineT &engine) | |
| Constructor for the NetworkSolverStrategy. | |
| virtual | ~NetworkSolverStrategy ()=default |
| Virtual destructor. | |
+Private Member Functions | |
| CVODERHSOutputData | calculate_rhs (sunrealtype t, N_Vector y, N_Vector ydot, const CVODEUserData *data) const |
| Compute RHS into ydot at time t from the engine and current state y. | |
| void | initialize_cvode_integration_resources (uint64_t N, size_t numSpecies, double current_time, const fourdst::composition::Composition &composition, double absTol, double relTol, double accumulatedEnergy) |
| Allocate and initialize CVODE vectors, linear algebra, tolerances, and constraints. | |
| void | cleanup_cvode_resources (bool memFree) |
| Destroy CVODE vectors/linear algebra and optionally the CVODE memory block. | |
| void | set_detailed_step_logging (bool enabled) |
| void | log_step_diagnostics (const CVODEUserData &user_data, bool displayJacobianStiffness, bool displaySpeciesBalance, bool to_file, std::optional< std::string > filename) const |
| Compute and print per-component error ratios; run diagnostic helpers. | |
+Static Private Member Functions | |
| static int | cvode_rhs_wrapper (sunrealtype t, N_Vector y, N_Vector ydot, void *user_data) |
| CVODE RHS C-wrapper that delegates to calculate_rhs and captures exceptions. | |
| static int | cvode_jac_wrapper (sunrealtype t, N_Vector y, N_Vector ydot, SUNMatrix J, void *user_data, N_Vector tmp1, N_Vector tmp2, N_Vector tmp3) |
| CVODE dense Jacobian C-wrapper that fills SUNDenseMatrix using the engine. | |
+Private Attributes | |
| fourdst::config::Config & | m_config = fourdst::config::Config::getInstance() |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| SUNContext | m_sun_ctx = nullptr |
| SUNDIALS context (lifetime of the solver). | |
| void * | m_cvode_mem = nullptr |
| CVODE memory block. | |
| N_Vector | m_Y = nullptr |
| CVODE state vector (species + energy accumulator). | |
| N_Vector | m_YErr = nullptr |
| Estimated local errors. | |
| SUNMatrix | m_J = nullptr |
| Dense Jacobian matrix. | |
| SUNLinearSolver | m_LS = nullptr |
| Dense linear solver. | |
| std::optional< TimestepCallback > | m_callback |
| Optional per-step callback. | |
| int | m_num_steps = 0 |
| CVODE step counter (used for diagnostics and triggers). | |
| bool | m_stdout_logging_enabled = true |
| If true, print per-step logs and use CV_ONE_STEP. | |
| N_Vector | m_constraints = nullptr |
| CVODE constraints vector (>= 0 for species entries). | |
| std::optional< double > | m_absTol |
| User-specified absolute tolerance. | |
| std::optional< double > | m_relTol |
| User-specified relative tolerance. | |
| bool | m_detailed_step_logging = false |
| If true, log detailed step diagnostics (error ratios, Jacobian, species balance). | |
+Additional Inherited Members | |
Protected Attributes inherited from gridfire::solver::NetworkSolverStrategy< EngineT > | |
| EngineT & | m_engine |
| The engine used by this solver strategy. | |
Stiff ODE integrator backed by SUNDIALS CVODE (BDF) for network + energy.
+Integrates the nuclear network abundances along with a final accumulator entry for specific energy using CVODE's BDF method and a dense linear solver. The state vector layout is: [y_0, y_1, ..., y_{N-1}, eps], where eps is the accumulated specific energy (erg/g).
+Implementation summary:
| using gridfire::solver::CVODESolverStrategy::TimestepCallback = std::function<void(const TimestepContext& context)> | +
Type alias for a timestep callback function.
+ +
+
|
+ +explicit | +
Construct the CVODE strategy and create a SUNDIALS context.
+| engine | DynamicEngine used for RHS/Jacobian evaluation and network access. |
| std::runtime_error | If SUNContext_Create fails. |
+
|
+ +override | +
Destructor: cleans CVODE/SUNDIALS resources and frees SUNContext.
+ +
+
|
+ +delete | +
+
|
+ +delete | +
+
|
+ +private | +
Compute RHS into ydot at time t from the engine and current state y.
+Converts the CVODE state to a Composition (mass fractions) and calls engine.calculateRHSAndEnergy(T9, rho). Negative small abundances are clamped to zero before constructing Composition. On stale engine, throws exceptions::StaleEngineTrigger.
+ +
+
|
+ +private | +
Destroy CVODE vectors/linear algebra and optionally the CVODE memory block.
+| memFree | If true, also calls CVodeFree on m_cvode_mem. |
+
|
+ +staticprivate | +
CVODE dense Jacobian C-wrapper that fills SUNDenseMatrix using the engine.
+Assembles J(i,j) = d(f_i)/d(y_j) for all species using engine->getJacobianMatrixEntry, then zeros the last row and column corresponding to the energy variable.
+ +
+
|
+ +staticprivate | +
CVODE RHS C-wrapper that delegates to calculate_rhs and captures exceptions.
+
+
|
+ +overridevirtual | +
Schema of fields exposed to the timestep callback context.
+ +Implements gridfire::solver::NetworkSolverStrategy< EngineT >.
+ +
+
|
+ +overridevirtual | +
Integrate from t=0 to netIn.tMax and return final composition and energy.
+Implementation summary:
| netIn | Inputs: temperature [K], density [g cm^-3], tMax [s], composition. |
| std::runtime_error | If any CVODE or SUNDIALS call fails (negative return codes), or if internal consistency checks fail during engine updates. |
| exceptions::StaleEngineTrigger | Propagated if the engine signals a stale state during RHS evaluation (captured in the wrapper then rethrown here). |
Implements gridfire::solver::NetworkSolverStrategy< EngineT >.
+ +| NetOut gridfire::solver::CVODESolverStrategy::evaluate | +( | +const NetIn & | +netIn, | +
| + | + | bool | +displayTrigger | +
| + | ) | ++ |
Call to evaluate which will let the user control if the trigger reasoning is displayed.
+| netIn | Inputs: temperature [K], density [g cm^-3], tMax [s], composition. |
| displayTrigger | Boolean flag to control if trigger reasoning is displayed |
| std::runtime_error | If any CVODE or SUNDIALS call fails (negative return codes), or if internal consistency checks fail during engine updates. |
| exceptions::StaleEngineTrigger | Propagated if the engine signals a stale state during RHS evaluation (captured in the wrapper then rethrown here). |
| double gridfire::solver::CVODESolverStrategy::get_absTol | +( | +) | +const | +
| double gridfire::solver::CVODESolverStrategy::get_relTol | +( | +) | +const | +
| bool gridfire::solver::CVODESolverStrategy::get_stdout_logging_enabled | +( | +) | +const | +
Whether per-step logs are printed to stdout and CVode is stepped with CV_ONE_STEP.
+ +
+
|
+ +private | +
Allocate and initialize CVODE vectors, linear algebra, tolerances, and constraints.
+State vector m_Y is sized to N (numSpecies + 1). Species slots are initialized from Composition molar abundances when present, otherwise a tiny positive value; the last slot is set to accumulatedEnergy. Sets scalar tolerances, non-negativity constraints for species, maximum step size, creates a dense matrix and dense linear solver, and registers the Jacobian.
+ +
+
|
+ +private | +
Compute and print per-component error ratios; run diagnostic helpers.
+Gathers CVODE's estimated local errors, converts the state to a Composition, and prints a sorted table of species with the highest error ratios; then invokes diagnostic routines to inspect Jacobian stiffness and species balance.
+ +
+
|
+ +delete | +
+
|
+ +delete | +
| void gridfire::solver::CVODESolverStrategy::set_absTol | +( | +double | +absTol | ) | ++ |
+
|
+ +overridevirtual | +
Install a timestep callback.
+| callback | std::any containing TimestepCallback (std::function<void(const TimestepContext&)>). |
| std::bad_any_cast | If callback is not of the expected type. |
Implements gridfire::solver::NetworkSolverStrategy< EngineT >.
+ +
+
|
+ +private | +
| void gridfire::solver::CVODESolverStrategy::set_relTol | +( | +double | +relTol | ) | ++ |
| void gridfire::solver::CVODESolverStrategy::set_stdout_logging_enabled | +( | +bool | +logging_enabled | ) | ++ |
Enable/disable per-step stdout logging.
+| logging_enabled | Flag to control if a timestep summary is written to standard output or not |
+
|
+ +private | +
User-specified absolute tolerance.
+ +
+
|
+ +private | +
Optional per-step callback.
+ +
+
|
+ +private | +
+
|
+ +private | +
CVODE constraints vector (>= 0 for species entries).
+ +
+
|
+ +private | +
CVODE memory block.
+ +
+
|
+ +private | +
If true, log detailed step diagnostics (error ratios, Jacobian, species balance).
+ +
+
|
+ +private | +
Dense Jacobian matrix.
+ +
+
|
+ +private | +
+
|
+ +private | +
Dense linear solver.
+ +
+
|
+ +private | +
CVODE step counter (used for diagnostics and triggers).
+ +
+
|
+ +private | +
User-specified relative tolerance.
+ +
+
|
+ +private | +
If true, print per-step logs and use CV_ONE_STEP.
+ +
+
|
+ +private | +
SUNDIALS context (lifetime of the solver).
+ +
+
|
+ +private | +
CVODE state vector (species + energy accumulator).
+ +
+
|
+ +private | +
Estimated local errors.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::solver::NetworkSolverStrategy< EngineT >, including all inherited members.
+| describe_callback_context() const =0 | gridfire::solver::NetworkSolverStrategy< EngineT > | pure virtual |
| evaluate(const NetIn &netIn)=0 | gridfire::solver::NetworkSolverStrategy< EngineT > | pure virtual |
| m_engine | gridfire::solver::NetworkSolverStrategy< EngineT > | protected |
| NetworkSolverStrategy(EngineT &engine) | gridfire::solver::NetworkSolverStrategy< EngineT > | inlineexplicit |
| set_callback(const std::any &callback)=0 | gridfire::solver::NetworkSolverStrategy< EngineT > | pure virtual |
| ~NetworkSolverStrategy()=default | gridfire::solver::NetworkSolverStrategy< EngineT > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Abstract base class for network solver strategies. + More...
+ +#include <strategy_abstract.h>
+Public Member Functions | |
| NetworkSolverStrategy (EngineT &engine) | |
| Constructor for the NetworkSolverStrategy. | |
| virtual | ~NetworkSolverStrategy ()=default |
| Virtual destructor. | |
| virtual NetOut | evaluate (const NetIn &netIn)=0 |
| Evaluates the network for a given timestep. | |
| virtual void | set_callback (const std::any &callback)=0 |
| set the callback function to be called at the end of each timestep. | |
| virtual std::vector< std::tuple< std::string, std::string > > | describe_callback_context () const =0 |
| Describe the context that will be passed to the callback function. | |
+Protected Attributes | |
| EngineT & | m_engine |
| The engine used by this solver strategy. | |
Abstract base class for network solver strategies.
+This class defines the interface for network solver strategies, which are responsible for integrating the reaction network ODEs over a given timestep. It is templated on the engine type to allow for different engine implementations to be used with the same solver.
+| EngineT | The type of engine to use with this solver strategy. Must inherit from Engine. |
+
|
+ +inlineexplicit | +
Constructor for the NetworkSolverStrategy.
+| engine | The engine to use for evaluating the network. |
+
|
+ +virtualdefault | +
Virtual destructor.
+ +
+
|
+ +pure virtual | +
Describe the context that will be passed to the callback function.
+This method should be overridden by derived classes to provide a description of the context that will be passed to the callback function. The intent of this method is that an end user can investigate the context that will be passed to the callback function, and use this information to craft their own callback function.
+ +Implemented in gridfire::solver::CVODESolverStrategy, and PyDynamicNetworkSolverStrategy.
+ +
+
|
+ +pure virtual | +
Evaluates the network for a given timestep.
+| netIn | The input conditions for the network. |
Implemented in PyDynamicNetworkSolverStrategy, and gridfire::solver::CVODESolverStrategy.
+ +
+
|
+ +pure virtual | +
set the callback function to be called at the end of each timestep.
+This function allows the user to set a callback function that will be called at the end of each timestep. The callback function will receive a gridfire::solver::<SOMESOLVER>::TimestepContext object. Note that depending on the solver, this context may contain different information. Further, the exact signature of the callback function is left up to each solver. Every solver should provide a type or type alias TimestepCallback that defines the signature of the callback function so that the user can easily get that type information.
+| callback | The callback function to be called at the end of each timestep. |
Implemented in gridfire::solver::CVODESolverStrategy, and PyDynamicNetworkSolverStrategy.
+ +
+
|
+ +protected | +
The engine used by this solver strategy.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::solver::SolverContextBase, including all inherited members.
+| describe() const =0 | gridfire::solver::SolverContextBase | pure virtual |
| ~SolverContextBase()=default | gridfire::solver::SolverContextBase | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Base class for solver callback contexts. + More...
+ +#include <strategy_abstract.h>
+Public Member Functions | |
| virtual | ~SolverContextBase ()=default |
| virtual std::vector< std::tuple< std::string, std::string > > | describe () const =0 |
| Describe the context for callback functions. | |
Base class for solver callback contexts.
+This struct serves as a base class for contexts that can be passed to solver callbacks, it enforces that derived classes implement a describe method that returns a vector of tuples describing the context that a callback will receive when called.
+
|
+ +virtualdefault | +
+
|
+ +pure virtual | +
Describe the context for callback functions.
+This method should be overridden by derived classes to provide a description of the context that will be passed to the callback function. The intent of this method is that an end user can investigate the context that will be passed to the callback function, and use this information to craft their own callback function.
+ +Implemented in gridfire::solver::CVODESolverStrategy::TimestepContext, and PySolverContextBase.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::AndTrigger< TriggerContextStruct >, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Logical conjunction of two triggers with short-circuit evaluation. + More...
+ +#include <trigger_logical.h>
+Public Member Functions | |
| AndTrigger (std::unique_ptr< Trigger< TriggerContextStruct > > A, std::unique_ptr< Trigger< TriggerContextStruct > > B) | |
| Construct AND from two triggers (ownership transferred). | |
| ~AndTrigger () override=default | |
| bool | check (const TriggerContextStruct &ctx) const override |
| Evaluate A && B; increments hit/miss counters. | |
| void | update (const TriggerContextStruct &ctx) override |
| Update both sub-triggers and increment update counter. | |
| void | step (const TriggerContextStruct &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset both sub-triggers and local counters. | |
| std::string | name () const override |
| Human-readable name. | |
| TriggerResult | why (const TriggerContextStruct &ctx) const override |
| Structured explanation; short-circuits on A=false. | |
| std::string | describe () const override |
| Description expression e.g. "(A) AND (B)". | |
| size_t | numTriggers () const override |
| Number of true evaluations since last reset. | |
| size_t | numMisses () const override |
| Number of false evaluations since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< TriggerContextStruct > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| std::unique_ptr< Trigger< TriggerContextStruct > > | m_A |
| std::unique_ptr< Trigger< TriggerContextStruct > > | m_B |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
| size_t | m_steps = 0 |
Logical conjunction of two triggers with short-circuit evaluation.
+check(ctx) returns A.check(ctx) && B.check(ctx). The why(ctx) explanation short-circuits if A is false, avoiding evaluation of B. update(ctx) calls update() on both A and B.
+Counters (mutable) are incremented inside const check(): m_hits on true; m_misses on false; m_updates on each update(); m_resets on reset().
+| gridfire::trigger::AndTrigger< TriggerContextStruct >::AndTrigger | +( | +std::unique_ptr< Trigger< TriggerContextStruct > > | +A, | +
| + | + | std::unique_ptr< Trigger< TriggerContextStruct > > | +B | +
| + | ) | ++ |
Construct AND from two triggers (ownership transferred).
+ +
+
|
+ +overridedefault | +
+
|
+ +overridevirtual | +
Evaluate A && B; increments hit/miss counters.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Description expression e.g. "(A) AND (B)".
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Human-readable name.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Number of false evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Number of true evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Reset both sub-triggers and local counters.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Update both sub-triggers and increment update counter.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Structured explanation; short-circuits on A=false.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::EveryNthTrigger< TriggerContextStruct >, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Pass-through trigger that fires every Nth time its child trigger is true. + More...
+ +#include <trigger_logical.h>
+Public Member Functions | |
| EveryNthTrigger (std::unique_ptr< Trigger< TriggerContextStruct > > A, size_t N) | |
| ~EveryNthTrigger () override=default | |
| bool | check (const TriggerContextStruct &ctx) const override |
| Evaluate the trigger condition against the provided context. | |
| void | update (const TriggerContextStruct &ctx) override |
| Update any internal state with the given context (e.g., counters, windows). | |
| void | step (const TriggerContextStruct &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset internal state and diagnostics counters. | |
| std::string | name () const override |
| Short, stable name for this trigger (suitable for logs/UI). | |
| TriggerResult | why (const TriggerContextStruct &ctx) const override |
| Explain why the last evaluation would be true/false in a structured way. | |
| std::string | describe () const override |
| Human-readable description of this trigger's logic. | |
| size_t | numTriggers () const override |
| Total number of times this trigger evaluated to true since last reset. | |
| size_t | numMisses () const override |
| Total number of times this trigger evaluated to false since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< TriggerContextStruct > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| std::unique_ptr< Trigger< TriggerContextStruct > > | m_A |
| size_t | m_N |
| size_t | m_counter = 0 |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
| size_t | m_steps = 0 |
Pass-through trigger that fires every Nth time its child trigger is true.
+On update(ctx), increments an internal counter when A.check(ctx) is true. check(ctx) returns true only when A.check(ctx) is true and the internal counter is a multiple of N.
+| std::invalid_argument | When constructed with N==0. |
+
|
+ +explicit | +
+
|
+ +overridedefault | +
+
|
+ +overridevirtual | +
Evaluate the trigger condition against the provided context.
+| ctx | Context snapshot (immutable view) used to evaluate the condition. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Human-readable description of this trigger's logic.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Short, stable name for this trigger (suitable for logs/UI).
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to false since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to true since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Reset internal state and diagnostics counters.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Update any internal state with the given context (e.g., counters, windows).
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Explain why the last evaluation would be true/false in a structured way.
+| ctx | Context snapshot for the explanation. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::LogicalTrigger< TriggerContextStruct >, including all inherited members.
+| check(const TriggerContextStruct &ctx) const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| describe() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| name() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| numMisses() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| numTriggers() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| reset()=0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| step(const TriggerContextStruct &ctx)=0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| update(const TriggerContextStruct &ctx)=0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| why(const TriggerContextStruct &ctx) const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| ~Trigger()=default | gridfire::trigger::Trigger< TriggerContextStruct > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <trigger_logical.h>
+Additional Inherited Members | |
Public Member Functions inherited from gridfire::trigger::Trigger< TriggerContextStruct > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
| virtual bool | check (const TriggerContextStruct &ctx) const =0 |
| Evaluate the trigger condition against the provided context. | |
| virtual void | update (const TriggerContextStruct &ctx)=0 |
| Update any internal state with the given context (e.g., counters, windows). | |
| virtual void | step (const TriggerContextStruct &ctx)=0 |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| virtual void | reset ()=0 |
| Reset internal state and diagnostics counters. | |
| virtual std::string | name () const =0 |
| Short, stable name for this trigger (suitable for logs/UI). | |
| virtual std::string | describe () const =0 |
| Human-readable description of this trigger's logic. | |
| virtual TriggerResult | why (const TriggerContextStruct &ctx) const =0 |
| Explain why the last evaluation would be true/false in a structured way. | |
| virtual size_t | numTriggers () const =0 |
| Total number of times this trigger evaluated to true since last reset. | |
| virtual size_t | numMisses () const =0 |
| Total number of times this trigger evaluated to false since last reset. | |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::NotTrigger< TriggerContextStruct >, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Logical negation of a trigger. + More...
+ +#include <trigger_logical.h>
+Public Member Functions | |
| NotTrigger (std::unique_ptr< Trigger< TriggerContextStruct > > A) | |
| ~NotTrigger () override=default | |
| bool | check (const TriggerContextStruct &ctx) const override |
| Evaluate the trigger condition against the provided context. | |
| void | update (const TriggerContextStruct &ctx) override |
| Update any internal state with the given context (e.g., counters, windows). | |
| void | step (const TriggerContextStruct &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset internal state and diagnostics counters. | |
| std::string | name () const override |
| Short, stable name for this trigger (suitable for logs/UI). | |
| TriggerResult | why (const TriggerContextStruct &ctx) const override |
| Explain why the last evaluation would be true/false in a structured way. | |
| std::string | describe () const override |
| Human-readable description of this trigger's logic. | |
| size_t | numTriggers () const override |
| Total number of times this trigger evaluated to true since last reset. | |
| size_t | numMisses () const override |
| Total number of times this trigger evaluated to false since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< TriggerContextStruct > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| std::unique_ptr< Trigger< TriggerContextStruct > > | m_A |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
| size_t | m_steps = 0 |
Logical negation of a trigger.
+check(ctx) returns !A.check(ctx). why(ctx) explains the inverted condition. Counter semantics match the other logical triggers.
+
+
|
+ +explicit | +
+
|
+ +overridedefault | +
+
|
+ +overridevirtual | +
Evaluate the trigger condition against the provided context.
+| ctx | Context snapshot (immutable view) used to evaluate the condition. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Human-readable description of this trigger's logic.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Short, stable name for this trigger (suitable for logs/UI).
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to false since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to true since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Reset internal state and diagnostics counters.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Update any internal state with the given context (e.g., counters, windows).
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Explain why the last evaluation would be true/false in a structured way.
+| ctx | Context snapshot for the explanation. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::OrTrigger< TriggerContextStruct >, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Logical disjunction of two triggers with short-circuit evaluation. + More...
+ +#include <trigger_logical.h>
+Public Member Functions | |
| OrTrigger (std::unique_ptr< Trigger< TriggerContextStruct > > A, std::unique_ptr< Trigger< TriggerContextStruct > > B) | |
| ~OrTrigger () override=default | |
| bool | check (const TriggerContextStruct &ctx) const override |
| Evaluate the trigger condition against the provided context. | |
| void | update (const TriggerContextStruct &ctx) override |
| Update any internal state with the given context (e.g., counters, windows). | |
| void | step (const TriggerContextStruct &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset internal state and diagnostics counters. | |
| std::string | name () const override |
| Short, stable name for this trigger (suitable for logs/UI). | |
| TriggerResult | why (const TriggerContextStruct &ctx) const override |
| Explain why the last evaluation would be true/false in a structured way. | |
| std::string | describe () const override |
| Human-readable description of this trigger's logic. | |
| size_t | numTriggers () const override |
| Total number of times this trigger evaluated to true since last reset. | |
| size_t | numMisses () const override |
| Total number of times this trigger evaluated to false since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< TriggerContextStruct > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| std::unique_ptr< Trigger< TriggerContextStruct > > | m_A |
| std::unique_ptr< Trigger< TriggerContextStruct > > | m_B |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
| size_t | m_steps = 0 |
Logical disjunction of two triggers with short-circuit evaluation.
+check(ctx) returns A.check(ctx) || B.check(ctx). why(ctx) returns early when A is true. update(ctx) calls update() on both A and B. Counters behave as in AndTrigger.
+| gridfire::trigger::OrTrigger< TriggerContextStruct >::OrTrigger | +( | +std::unique_ptr< Trigger< TriggerContextStruct > > | +A, | +
| + | + | std::unique_ptr< Trigger< TriggerContextStruct > > | +B | +
| + | ) | ++ |
+
|
+ +overridedefault | +
+
|
+ +overridevirtual | +
Evaluate the trigger condition against the provided context.
+| ctx | Context snapshot (immutable view) used to evaluate the condition. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Human-readable description of this trigger's logic.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Short, stable name for this trigger (suitable for logs/UI).
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to false since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to true since last reset.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Reset internal state and diagnostics counters.
+ +Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Update any internal state with the given context (e.g., counters, windows).
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +overridevirtual | +
Explain why the last evaluation would be true/false in a structured way.
+| ctx | Context snapshot for the explanation. |
Implements gridfire::trigger::Trigger< TriggerContextStruct >.
+ +
+
|
+ +private | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::Trigger< TriggerContextStruct >, including all inherited members.
+| check(const TriggerContextStruct &ctx) const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| describe() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| name() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| numMisses() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| numTriggers() const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| reset()=0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| step(const TriggerContextStruct &ctx)=0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| update(const TriggerContextStruct &ctx)=0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| why(const TriggerContextStruct &ctx) const =0 | gridfire::trigger::Trigger< TriggerContextStruct > | pure virtual |
| ~Trigger()=default | gridfire::trigger::Trigger< TriggerContextStruct > | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Generic trigger interface for signaling events/conditions during integration. + More...
+ +#include <trigger_abstract.h>
+Public Member Functions | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
| virtual bool | check (const TriggerContextStruct &ctx) const =0 |
| Evaluate the trigger condition against the provided context. | |
| virtual void | update (const TriggerContextStruct &ctx)=0 |
| Update any internal state with the given context (e.g., counters, windows). | |
| virtual void | step (const TriggerContextStruct &ctx)=0 |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| virtual void | reset ()=0 |
| Reset internal state and diagnostics counters. | |
| virtual std::string | name () const =0 |
| Short, stable name for this trigger (suitable for logs/UI). | |
| virtual std::string | describe () const =0 |
| Human-readable description of this trigger's logic. | |
| virtual TriggerResult | why (const TriggerContextStruct &ctx) const =0 |
| Explain why the last evaluation would be true/false in a structured way. | |
| virtual size_t | numTriggers () const =0 |
| Total number of times this trigger evaluated to true since last reset. | |
| virtual size_t | numMisses () const =0 |
| Total number of times this trigger evaluated to false since last reset. | |
Generic trigger interface for signaling events/conditions during integration.
+A Trigger encapsulates a condition evaluated against a user-defined context struct (TriggerContextStruct). The interface supports:
Logical compositions (AND/OR/NOT/EveryNth) are provided in trigger_logical.h and implement this interface for any TriggerContextStruct.
+| TriggerContextStruct | User-defined context passed to triggers (e.g., timestep info). |
+
|
+ +virtualdefault | +
Virtual destructor for polymorphic use.
+ +
+
|
+ +pure virtual | +
Evaluate the trigger condition against the provided context.
+| ctx | Context snapshot (immutable view) used to evaluate the condition. |
Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
Human-readable description of this trigger's logic.
+ +Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
Short, stable name for this trigger (suitable for logs/UI).
+ +Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
Total number of times this trigger evaluated to false since last reset.
+ +Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
Total number of times this trigger evaluated to true since last reset.
+ +Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
Reset internal state and diagnostics counters.
+ +Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
Update any internal state with the given context (e.g., counters, windows).
+| ctx | Context snapshot used to update state. |
Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +
+
|
+ +pure virtual | +
Explain why the last evaluation would be true/false in a structured way.
+| ctx | Context snapshot for the explanation. |
Implemented in gridfire::trigger::solver::CVODE::SimulationTimeTrigger, gridfire::trigger::solver::CVODE::OffDiagonalTrigger, gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, gridfire::trigger::AndTrigger< TriggerContextStruct >, gridfire::trigger::OrTrigger< TriggerContextStruct >, gridfire::trigger::NotTrigger< TriggerContextStruct >, and gridfire::trigger::EveryNthTrigger< TriggerContextStruct >.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::solver::CVODE::ConvergenceFailureTrigger, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <engine_partitioning_trigger.h>
+Public Member Functions | |
| ConvergenceFailureTrigger (size_t totalFailures, float relativeFailureRate, size_t windowSize) | |
| bool | check (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Evaluate the trigger condition against the provided context. | |
| void | update (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| Update any internal state with the given context (e.g., counters, windows). | |
| void | step (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset internal state and diagnostics counters. | |
| std::string | name () const override |
| Short, stable name for this trigger (suitable for logs/UI). | |
| std::string | describe () const override |
| Human-readable description of this trigger's logic. | |
| TriggerResult | why (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Explain why the last evaluation would be true/false in a structured way. | |
| size_t | numTriggers () const override |
| Total number of times this trigger evaluated to true since last reset. | |
| size_t | numMisses () const override |
| Total number of times this trigger evaluated to false since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| Logger used for trace/error diagnostics. | |
Diagnostics counters | |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
| size_t | m_totalFailures |
| float | m_relativeFailureRate |
| size_t | m_windowSize |
| std::deque< size_t > | m_window |
| float | current_mean () const |
| bool | abs_failure (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const |
| bool | rel_failure (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const |
+
|
+ +explicit | +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Evaluate the trigger condition against the provided context.
+| ctx | Context snapshot (immutable view) used to evaluate the condition. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Human-readable description of this trigger's logic.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Short, stable name for this trigger (suitable for logs/UI).
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to false since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Total number of times this trigger evaluated to true since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +private | +
+
|
+ +overridevirtual | +
Reset internal state and diagnostics counters.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Update any internal state with the given context (e.g., counters, windows).
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Explain why the last evaluation would be true/false in a structured way.
+| ctx | Context snapshot for the explanation. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
Logger used for trace/error diagnostics.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +private | +
+
|
+ +mutableprivate | +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::solver::CVODE::OffDiagonalTrigger, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Triggers when any off-diagonal Jacobian entry magnitude exceeds a threshold. + More...
+ +#include <engine_partitioning_trigger.h>
+Public Member Functions | |
| OffDiagonalTrigger (double threshold) | |
| Construct with a non-negative magnitude threshold. | |
| bool | check (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Check if any off-diagonal Jacobian entry exceeds the threshold. | |
| void | update (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| Record an update; does not mutate any Jacobian-related state. | |
| void | step (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset counters to zero. | |
| std::string | name () const override |
| Stable human-readable name. | |
| TriggerResult | why (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Structured explanation of the evaluation outcome. | |
| std::string | describe () const override |
| Textual description including configured threshold. | |
| size_t | numTriggers () const override |
| Number of true evaluations since last reset. | |
| size_t | numMisses () const override |
| Number of false evaluations since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| Logger used for trace/error diagnostics. | |
| double | m_threshold |
| Off-diagonal magnitude threshold (>= 0). | |
Diagnostics counters | |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
Triggers when any off-diagonal Jacobian entry magnitude exceeds a threshold.
+Semantics:
+
|
+ +explicit | +
Construct with a non-negative magnitude threshold.
+| threshold | Off-diagonal Jacobian magnitude threshold (>= 0). |
| std::invalid_argument | if threshold < 0. |
+
|
+ +overridevirtual | +
Check if any off-diagonal Jacobian entry exceeds the threshold.
+| ctx | CVODE timestep context providing access to engine species and Jacobian. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Textual description including configured threshold.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Stable human-readable name.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Number of false evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Number of true evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Reset counters to zero.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Record an update; does not mutate any Jacobian-related state.
+| ctx | CVODE timestep context (unused except for symmetry with interface). |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Structured explanation of the evaluation outcome.
+| ctx | CVODE timestep context. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
Logger used for trace/error diagnostics.
+ +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +private | +
Off-diagonal magnitude threshold (>= 0).
+ +
+
|
+ +mutableprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::solver::CVODE::SimulationTimeTrigger, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Triggers when the current simulation time advances by at least a fixed interval. + More...
+ +#include <engine_partitioning_trigger.h>
+Public Member Functions | |
| SimulationTimeTrigger (double interval) | |
| Construct with a positive time interval between firings. | |
| bool | check (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Evaluate whether enough simulated time has elapsed since the last trigger. | |
| void | update (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| Update internal state; if check(ctx) is true, advance last_trigger_time. | |
| void | step (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset counters and last trigger bookkeeping (time and delta) to zero. | |
| std::string | name () const override |
| Stable human-readable name. | |
| TriggerResult | why (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Structured explanation of the evaluation outcome. | |
| std::string | describe () const override |
| Textual description including configured interval. | |
| size_t | numTriggers () const override |
| Number of true evaluations since last reset. | |
| size_t | numMisses () const override |
| Number of false evaluations since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| Logger used for trace/error diagnostics. | |
| double | m_interval |
| Required time interval between successive triggers. | |
| double | m_last_trigger_time = 0.0 |
| Time at which the trigger last fired; initialized to 0. | |
| double | m_last_trigger_time_delta = 0.0 |
| Overshoot relative to interval at the last firing; for diagnostics. | |
Diagnostics counters | |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
Triggers when the current simulation time advances by at least a fixed interval.
+See also: engine_partitioning_trigger.cpp for the concrete logic and logging.
+
+
|
+ +explicit | +
Construct with a positive time interval between firings.
+| interval | Strictly positive time interval (simulation units) between triggers. |
| std::invalid_argument | if interval <= 0. |
+
|
+ +overridevirtual | +
Evaluate whether enough simulated time has elapsed since the last trigger.
+| ctx | CVODE timestep context providing the current simulation time (ctx.t). |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Textual description including configured interval.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Stable human-readable name.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Number of false evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Number of true evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Reset counters and last trigger bookkeeping (time and delta) to zero.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Update internal state; if check(ctx) is true, advance last_trigger_time.
+| ctx | CVODE timestep context. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Structured explanation of the evaluation outcome.
+| ctx | CVODE timestep context. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
Required time interval between successive triggers.
+ +
+
|
+ +mutableprivate | +
Time at which the trigger last fired; initialized to 0.
+ +
+
|
+ +mutableprivate | +
Overshoot relative to interval at the last firing; for diagnostics.
+ +
+
|
+ +private | +
Logger used for trace/error diagnostics.
+ +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
+
|
+ +mutableprivate | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::trigger::solver::CVODE::TimestepCollapseTrigger, including all inherited members.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Triggers when the timestep deviates from its recent average beyond a threshold. + More...
+ +#include <engine_partitioning_trigger.h>
+Public Member Functions | |
| TimestepCollapseTrigger (double threshold, bool relative) | |
| Construct with threshold and relative/absolute mode; window size defaults to 1. | |
| TimestepCollapseTrigger (double threshold, bool relative, size_t windowSize) | |
| Construct with threshold, mode, and window size. | |
| bool | check (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Evaluate whether the current dt deviates sufficiently from recent average. | |
| void | update (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| Update sliding window with the most recent dt and increment update counter. | |
| void | step (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override |
| similar to update but intended to be run on every step not just those where the trigger triggered | |
| void | reset () override |
| Reset counters and clear the dt window. | |
| std::string | name () const override |
| Stable human-readable name. | |
| TriggerResult | why (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override |
| Structured explanation of the evaluation outcome. | |
| std::string | describe () const override |
| Textual description including threshold, mode, and window size. | |
| size_t | numTriggers () const override |
| Number of true evaluations since last reset. | |
| size_t | numMisses () const override |
| Number of false evaluations since last reset. | |
Public Member Functions inherited from gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext > | |
| virtual | ~Trigger ()=default |
| Virtual destructor for polymorphic use. | |
+Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| Logger used for trace/error diagnostics. | |
| double | m_threshold |
| Threshold for absolute or relative deviation. | |
| bool | m_relative |
| When true, use relative deviation; otherwise absolute deviation. | |
| size_t | m_windowSize |
| Number of dt samples to maintain in the moving window. | |
| std::deque< double > | m_timestep_window |
| Sliding window of recent timesteps (most recent at back). | |
Diagnostics counters | |
| size_t | m_hits = 0 |
| size_t | m_misses = 0 |
| size_t | m_updates = 0 |
| size_t | m_resets = 0 |
Triggers when the timestep deviates from its recent average beyond a threshold.
+See also: engine_partitioning_trigger.cpp for exact logic and logging.
+
+
|
+ +explicit | +
Construct with threshold and relative/absolute mode; window size defaults to 1.
+| threshold | Non-negative threshold; if relative, must be in [0, 1]. |
| relative | If true, use relative deviation; otherwise use absolute deviation. |
| std::invalid_argument | on invalid threshold constraints. |
+
|
+ +explicit | +
Construct with threshold, mode, and window size.
+| threshold | Non-negative threshold; if relative, must be in [0, 1]. |
| relative | If true, use relative deviation; otherwise use absolute deviation. |
| windowSize | Number of dt samples to average over (>= 1 recommended). |
| std::invalid_argument | on invalid threshold constraints. |
+
|
+ +overridevirtual | +
Evaluate whether the current dt deviates sufficiently from recent average.
+| ctx | CVODE timestep context providing current dt. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Textual description including threshold, mode, and window size.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Stable human-readable name.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Number of false evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Number of true evaluations since last reset.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Reset counters and clear the dt window.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
similar to update but intended to be run on every step not just those where the trigger triggered
+| ctx | Context snapshot used to update state. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Update sliding window with the most recent dt and increment update counter.
+| ctx | CVODE timestep context. |
Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +overridevirtual | +
Structured explanation of the evaluation outcome.
+ +Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
Logger used for trace/error diagnostics.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
When true, use relative deviation; otherwise absolute deviation.
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
Threshold for absolute or relative deviation.
+ +
+
|
+ +private | +
Sliding window of recent timesteps (most recent at back).
+ +
+
|
+ +mutableprivate | +
+
|
+ +private | +
Number of dt samples to maintain in the moving window.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::utils::Column< T >, including all inherited members.
+| Column(std::string header, const std::vector< T > &data) | gridfire::utils::Column< T > | inline |
| getCellData(size_t rowIndex) const override | gridfire::utils::Column< T > | inlinevirtual |
| getHeader() const override | gridfire::utils::Column< T > | inlinevirtual |
| getRowCount() const override | gridfire::utils::Column< T > | inlinevirtual |
| m_data | gridfire::utils::Column< T > | private |
| m_header | gridfire::utils::Column< T > | private |
| ~ColumnBase()=default | gridfire::utils::ColumnBase | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <table_format.h>
+Public Member Functions | |
| Column (std::string header, const std::vector< T > &data) | |
| std::string | getCellData (size_t rowIndex) const override |
| std::string | getHeader () const override |
| size_t | getRowCount () const override |
Public Member Functions inherited from gridfire::utils::ColumnBase | |
| virtual | ~ColumnBase ()=default |
+Private Attributes | |
| std::string | m_header |
| std::vector< T > | m_data |
+
|
+ +inline | +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::ColumnBase.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::ColumnBase.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::ColumnBase.
+ +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::utils::ColumnBase, including all inherited members.
+| getCellData(size_t rowIndex) const =0 | gridfire::utils::ColumnBase | pure virtual |
| getHeader() const =0 | gridfire::utils::ColumnBase | pure virtual |
| getRowCount() const =0 | gridfire::utils::ColumnBase | pure virtual |
| ~ColumnBase()=default | gridfire::utils::ColumnBase | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <table_format.h>
+Public Member Functions | |
| virtual | ~ColumnBase ()=default |
| virtual std::string | getCellData (size_t rowIndex) const =0 |
| virtual std::string | getHeader () const =0 |
| virtual size_t | getRowCount () const =0 |
+
|
+ +virtualdefault | +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Column< T >.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Column< T >.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Column< T >.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::utils::Table< T >, including all inherited members.
+| getColumns() const override | gridfire::utils::Table< T > | inlinevirtual |
| getName() const override | gridfire::utils::Table< T > | inlinevirtual |
| m_columns | gridfire::utils::Table< T > | private |
| m_name | gridfire::utils::Table< T > | private |
| ncols() const override | gridfire::utils::Table< T > | inlinevirtual |
| nrows() const override | gridfire::utils::Table< T > | inlinevirtual |
| operator[](size_t i) const override | gridfire::utils::Table< T > | inlinevirtual |
| Table(const std::string &name, const std::vector< Column< T > > &columns) | gridfire::utils::Table< T > | inline |
| Table(const std::string &name, const std::unordered_map< std::string, std::vector< T > > &columnData) | gridfire::utils::Table< T > | inline |
| Table(const std::string &name, const std::map< std::string, std::vector< T > > &columnData) | gridfire::utils::Table< T > | inline |
| Table(const std::string &name, const std::unordered_map< fourdst::atomic::Species, std::vector< T > > &columnData) | gridfire::utils::Table< T > | inline |
| Table(const std::string &name, const std::map< fourdst::atomic::Species, std::vector< T > > &columnData) | gridfire::utils::Table< T > | inline |
| toCSV(const std::string &filename) const override | gridfire::utils::Table< T > | inlinevirtual |
| ~TableBase()=default | gridfire::utils::TableBase | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <table_format.h>
+Public Member Functions | |
| Table (const std::string &name, const std::vector< Column< T > > &columns) | |
| Table (const std::string &name, const std::unordered_map< std::string, std::vector< T > > &columnData) | |
| Table (const std::string &name, const std::map< std::string, std::vector< T > > &columnData) | |
| Table (const std::string &name, const std::unordered_map< fourdst::atomic::Species, std::vector< T > > &columnData) | |
| Table (const std::string &name, const std::map< fourdst::atomic::Species, std::vector< T > > &columnData) | |
| size_t | ncols () const override |
| size_t | nrows () const override |
| const ColumnBase & | operator[] (size_t i) const override |
| const std::vector< std::unique_ptr< ColumnBase > > | getColumns () const override |
| std::string | getName () const override |
| void | toCSV (const std::string &filename) const override |
Public Member Functions inherited from gridfire::utils::TableBase | |
| virtual | ~TableBase ()=default |
+Private Attributes | |
| std::string | m_name |
| std::vector< std::unique_ptr< Column< T > > > | m_columns |
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inlineoverridevirtual | +
Reimplemented from gridfire::utils::TableBase.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::TableBase.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::TableBase.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::TableBase.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::TableBase.
+ +
+
|
+ +inlineoverridevirtual | +
Implements gridfire::utils::TableBase.
+ +
+
|
+ +private | +
+
|
+ +private | +
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
This is the complete list of members for gridfire::utils::TableBase, including all inherited members.
+| getColumns() const | gridfire::utils::TableBase | virtual |
| getName() const =0 | gridfire::utils::TableBase | pure virtual |
| ncols() const =0 | gridfire::utils::TableBase | pure virtual |
| nrows() const =0 | gridfire::utils::TableBase | pure virtual |
| operator[](size_t i) const =0 | gridfire::utils::TableBase | pure virtual |
| toCSV(const std::string &filename) const =0 | gridfire::utils::TableBase | pure virtual |
| ~TableBase()=default | gridfire::utils::TableBase | virtual |
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <table_format.h>
+Public Member Functions | |
| virtual | ~TableBase ()=default |
| virtual size_t | ncols () const =0 |
| virtual size_t | nrows () const =0 |
| virtual const ColumnBase & | operator[] (size_t i) const =0 |
| virtual const std::vector< std::unique_ptr< ColumnBase > > | getColumns () const |
| virtual std::string | getName () const =0 |
| virtual void | toCSV (const std::string &filename) const =0 |
+
|
+ +virtualdefault | +
+
|
+ +virtual | +
Reimplemented in gridfire::utils::Table< T >.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Table< T >.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Table< T >.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Table< T >.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Table< T >.
+ +
+
|
+ +pure virtual | +
Implemented in gridfire::utils::Table< T >.
+ +|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Concept for types allowed in engine calculations. +More...
+ +#include <types.h>
Concept for types allowed in engine calculations.
+This concept restricts template parameters to either double or CppAD::AD<double>, enabling both standard and automatic differentiation types.
+|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
Concept for types allowed as engine bases in EngineView. +More...
+ +#include <engine_view_abstract.h>
Concept for types allowed as engine bases in EngineView.
+This concept restricts template parameters to types derived from either gridfire::Engine or gridfire::DynamicEngine, as defined in engine_abstract.h.
+Example usage:
|
+ GridFire v0.7.1_rc2
+
+ General Purpose Nuclear Network
+ |
+
#include <logging.h>
| ▼Ngridfire | |
| ▼Nengine | |
| REngineType | Concept for types allowed as engine bases in EngineView |
| ▼Nutils | |
| RStreamable | |
| RIsArithmeticOrAD | Concept for types allowed in engine calculations |
| ▼Ngridfire | |
| ▼Nengine | |
| REngineType | Concept for types allowed as engine bases in EngineView |
| ▼Nutils | |
| RStreamable | |
| RIsArithmeticOrAD | Concept for types allowed in engine calculations |
-Classes | |
| class | gridfire::engine::ReactionSet |
| class | gridfire::engine::Reaction |
| Represents a single nuclear reaction from a specific data source. More... | |
Namespaces | |
| namespace | gridfire |
| namespace | gridfire |
| namespace | gridfire::engine |
| namespace | gridfire::engine |
Functions | |
| reaction::ReactionSet | gridfire::engine::build_nuclear_network (const fourdst::composition::CompositionAbstract &composition, const rates::weak::WeakRateInterpolator &weakInterpolator, BuildDepthType maxLayers=NetworkBuildDepth::Full, NetworkConstructionFlags ReactionTypes=NetworkConstructionFlags::DEFAULT) |
| reaction::ReactionSet | gridfire::engine::build_nuclear_network (const fourdst::composition::CompositionAbstract &composition, const rates::weak::WeakRateInterpolator &weakInterpolator, BuildDepthType maxLayers=NetworkBuildDepth::Full, NetworkConstructionFlags ReactionTypes=NetworkConstructionFlags::DEFAULT) |
| Builds a nuclear reaction network from the Reaclib library based on an initial composition. | |
Namespaces | |
| namespace | gridfire |
| namespace | gridfire |
| namespace | gridfire::engine |
| namespace | gridfire::engine |
@@ -155,21 +148,21 @@ Enumerations | |
Functions | |
| constexpr auto | gridfire::engine::to_underlying (NetworkConstructionFlags f) noexcept |
| Helper function to convert NetworkConstructionFlags to their underlying integer type. | |
| Helper function to convert NetworkConstructionFlags to their underlying integer type. | |
| NetworkConstructionFlags | gridfire::engine::operator| (const NetworkConstructionFlags lhs, const NetworkConstructionFlags rhs) |
| Bitwise OR operator for NetworkConstructionFlags. | |
| Bitwise OR operator for NetworkConstructionFlags. | |
| NetworkConstructionFlags | gridfire::engine::operator& (const NetworkConstructionFlags lhs, const NetworkConstructionFlags rhs) |
| Bitwise AND operator for NetworkConstructionFlags. | |
| Bitwise AND operator for NetworkConstructionFlags. | |
| bool | gridfire::engine::has_flag (const NetworkConstructionFlags flags, const NetworkConstructionFlags flag_to_check) |
| Checks if a specific flag is set within a NetworkConstructionFlags value. | |
| Checks if a specific flag is set within a NetworkConstructionFlags value. | |
| std::string | gridfire::engine::NetworkConstructionFlagsToString (NetworkConstructionFlags flags) |
| Converts NetworkConstructionFlags to a human-readable string. | |
| Converts NetworkConstructionFlags to a human-readable string. | |
| reaction::ReactionSet | gridfire::engine::build_nuclear_network (const fourdst::composition::CompositionAbstract &composition, const rates::weak::WeakRateInterpolator &weakInterpolator, BuildDepthType maxLayers=NetworkBuildDepth::Full, NetworkConstructionFlags ReactionTypes=NetworkConstructionFlags::DEFAULT) |
| reaction::ReactionSet | gridfire::engine::build_nuclear_network (const fourdst::composition::CompositionAbstract &composition, const rates::weak::WeakRateInterpolator &weakInterpolator, BuildDepthType maxLayers=NetworkBuildDepth::Full, NetworkConstructionFlags ReactionTypes=NetworkConstructionFlags::DEFAULT) |
| Builds a nuclear reaction network from the Reaclib library based on an initial composition. | |
@@ -136,7 +129,7 @@ Files | |
|
- GridFire v0.7.0_rc2
+ GridFire v0.7.1_rc2
General Purpose Nuclear Network
|
@@ -38,24 +36,19 @@
|
Files | |
| CVODE_solver_strategy.cpp | |
| CVODE_solver_strategy.cpp | |
@@ -124,7 +117,7 @@ Files | |
|
- GridFire v0.7.0_rc2
+ GridFire v0.7.1_rc2
General Purpose Nuclear Network
|
@@ -38,24 +36,19 @@
|
Namespaces | |
| namespace | gridfire |
| namespace | gridfire |
| namespace | gridfire::engine |
| namespace | gridfire::engine |
| namespace | gridfire::engine::diagnostics |
| namespace | gridfire::engine::diagnostics |
Functions | |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::report_limiting_species (const DynamicEngine &engine, const std::vector< double > &Y_full, const std::vector< double > &E_full, double relTol, double absTol, size_t top_n=10, bool json=false) |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::report_limiting_species (const DynamicEngine &engine, const std::vector< double > &Y_full, const std::vector< double > &E_full, double relTol, double absTol, size_t top_n=10, bool json=false) |
| Report the species that are limiting the accuracy of the integration. This is useful for identifying species that may be limiting the timestepping due to their high relative errors compared to the specified tolerances. | |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_species_balance (const DynamicEngine &engine, const std::string &species_name, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_species_balance (const DynamicEngine &engine, const std::string &species_name, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| Inspect the production and destruction balance of a specific species in the reaction network. This function analyzes the reactions that create and destroy the specified species, providing insights into potential imbalances that may affect the accuracy of the simulation. | |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_jacobian_stiffness (const DynamicEngine &engine, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_jacobian_stiffness (const DynamicEngine &engine, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| Inspect the stiffness of the Jacobian matrix for the reaction network at the given temperature and density. This function evaluates the diagonal and off-diagonal elements of the Jacobian to identify potential numerical issues related to stiffness. | |
Namespaces | |
| namespace | gridfire |
| namespace | gridfire |
| namespace | gridfire::engine |
| namespace | gridfire::engine |
| namespace | gridfire::engine::diagnostics |
| namespace | gridfire::engine::diagnostics |
Functions | |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::report_limiting_species (const DynamicEngine &engine, const std::vector< double > &Y_full, const std::vector< double > &E_full, double relTol, double absTol, size_t top_n=10, bool json=false) |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::report_limiting_species (const DynamicEngine &engine, const std::vector< double > &Y_full, const std::vector< double > &E_full, double relTol, double absTol, size_t top_n=10, bool json=false) |
| Report the species that are limiting the accuracy of the integration. This is useful for identifying species that may be limiting the timestepping due to their high relative errors compared to the specified tolerances. | |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_species_balance (const DynamicEngine &engine, const std::string &species_name, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_species_balance (const DynamicEngine &engine, const std::string &species_name, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| Inspect the production and destruction balance of a specific species in the reaction network. This function analyzes the reactions that create and destroy the specified species, providing insights into potential imbalances that may affect the accuracy of the simulation. | |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_jacobian_stiffness (const DynamicEngine &engine, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| std::optional< nlohmann::json > | gridfire::engine::diagnostics::inspect_jacobian_stiffness (const DynamicEngine &engine, const fourdst::composition::Composition &comp, double T9, double rho, bool json) |
| Inspect the stiffness of the Jacobian matrix for the reaction network at the given temperature and density. This function evaluates the diagonal and off-diagonal elements of the Jacobian to identify potential numerical issues related to stiffness. | |
| void | gridfire::engine::diagnostics::save_jacobian_to_file (const NetworkJacobian &jacobian, const std::string &filename) |
| void | gridfire::engine::diagnostics::save_jacobian_to_file (const NetworkJacobian &jacobian, const std::string &filename) |
| Save the Jacobian matrix to a file for external analysis. | |