|
| using | SparsityPattern = std::vector<std::pair<size_t, size_t>> |
| | Type alias for sparsity pattern representation.
|
| |
| typedef CppAD::AD< double > | ADDouble |
| | Alias for CppAD AD type for double precision.
|
| |
| using | BuildDepthType = std::variant<NetworkBuildDepth, int> |
| | Variant specifying either a predefined NetworkBuildDepth or a custom integer depth.
|
| |
| using | JacobianEntry = std::pair<std::pair<fourdst::atomic::Species, fourdst::atomic::Species>, double> |
| | Represents an entry in the Jacobian matrix.
|
| |
|
| enum class | EngineStatus { OKAY
, STALE
, ERROR
, COUNT
} |
| | Enumeration of possible engine statuses. More...
|
| |
| enum class | NetworkConstructionFlags : uint32_t {
NONE = 0
, REACLIB_STRONG = 1 << 0
, WRL_BETA_MINUS = 1 << 1
, WRL_BETA_PLUS = 1 << 2
,
WRL_ELECTRON_CAPTURE = 1 << 3
, WRL_POSITRON_CAPTURE = 1 << 4
, REACLIB_WEAK = 1 << 5
, WRL_WEAK = WRL_BETA_MINUS | WRL_BETA_PLUS | WRL_ELECTRON_CAPTURE | WRL_POSITRON_CAPTURE
,
REACLIB = REACLIB_STRONG | REACLIB_WEAK
, DEFAULT = REACLIB
} |
| | Flags to specify which types of nuclear reactions to include when constructing a reaction network. More...
|
| |
| enum class | NetworkBuildDepth {
Full = -1
, Shallow = 1
, SecondOrder = 2
, ThirdOrder = 3
,
FourthOrder = 4
, FifthOrder = 5
} |
| | Specifies supported depths for building the reaction network. More...
|
| |
| enum class | EngineTypes {
GRAPH_ENGINE
, ADAPTIVE_ENGINE_VIEW
, MULTISCALE_PARTITIONING_ENGINE_VIEW
, PRIMING_ENGINE_VIEW
,
DEFINED_ENGINE_VIEW
, FILE_DEFINED_ENGINE_VIEW
} |
| | Enumeration of different engine types available in GridFire. More...
|
| |
| enum class | PrimingReportStatus { SUCCESS
, ALREADY_PRIMED
, SOLVER_FAILURE
} |
| | Enumerates outcome codes for a network priming operation. More...
|
| |
| enum class | SpeciesStatus { ACTIVE
, EQUILIBRIUM
, INACTIVE_FLOW
, NOT_PRESENT
} |
| | Enumerates the status of a species in the simulation. More...
|
| |
|
| constexpr std::string_view | EngineStatus_to_string (const EngineStatus status) |
| | Convert EngineStatus enum to string representation.
|
| |
| constexpr auto | to_underlying (NetworkConstructionFlags f) noexcept |
| | Helper function to convert NetworkConstructionFlags to their underlying integer type.
|
| |
| NetworkConstructionFlags | operator| (const NetworkConstructionFlags lhs, const NetworkConstructionFlags rhs) |
| | Bitwise OR operator for NetworkConstructionFlags.
|
| |
| NetworkConstructionFlags | operator& (const NetworkConstructionFlags lhs, const NetworkConstructionFlags rhs) |
| | Bitwise AND operator for NetworkConstructionFlags.
|
| |
| bool | has_flag (const NetworkConstructionFlags flags, const NetworkConstructionFlags flag_to_check) |
| | Checks if a specific flag is set within a NetworkConstructionFlags value.
|
| |
| std::string | NetworkConstructionFlagsToString (NetworkConstructionFlags flags) |
| | Converts NetworkConstructionFlags to a human-readable string.
|
| |
| reaction::ReactionSet | 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.
|
| |
| EnergyChannels | classify_energy_channels (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &fuels, bool splitHydrogenPPCNO) |
| | Classify reactions into energy channels from an ordered list of fuels.
|
| |
| PrimingReport | primeNetwork (scratch::StateBlob &ctx, const NetIn &netIn, const GraphEngine &engine, const std::optional< std::vector< reaction::ReactionType > > &ignoredReactionTypes) |
| | Primes absent species in the network to their equilibrium abundances.
|
| |
| constexpr std::string_view | engine_type_to_string (const EngineTypes type) |
| | Converts an EngineTypes enum value to its corresponding string representation.
|
| |
| NetworkJacobian | regularize_jacobian (const NetworkJacobian &jacobian, const fourdst::composition::CompositionAbstract &comp, std::optional< quill::Logger * > logger=std::nullopt) |
| | Regularizes the given Jacobian matrix based on the provided composition.
|
| |
| std::string | SpeciesStatus_to_string (const SpeciesStatus status) |
| | Convert a SpeciesStatus enum value to its string representation.
|
| |
| NetworkJacobian | regularize_jacobian (const NetworkJacobian &jacobian, const fourdst::composition::CompositionAbstract &comp, const std::optional< quill::Logger * > logger) |
| |
Builds a nuclear reaction network from the Reaclib library based on an initial composition.
Constructs a layered reaction network by collecting reactions up to the specified depth from the Reaclib dataset. Starting species are those with non-zero mass fractions in the input composition. Layers expand by including products of collected reactions until the depth limit. Optionally selects reverse reactions instead of forward.
See implementation in construction.cpp for details on the layering algorithm, logging, and performance.
- Parameters
-
| composition | Mapping of isotopic species to their mass fractions; species with positive mass fraction seed the network. |
| weakInterpolator | Interpolator to build weak rates from. Must be constructed and owned by the caller. |
| maxLayers | Variant specifying either a predefined NetworkBuildDepth or a custom integer depth; negative depth (Full) collects all reactions, zero is invalid. |
| ReactionTypes | |
- Precondition
- composition must have at least one species with positive mass fraction.
-
Resolved integer depth from maxLayers must not be zero.
- Postcondition
- Returned network includes only reactions satisfying the depth and reverse criteria.
- Returns
- A LogicalReactionSet encapsulating the collected reactions for graph-based engines.
- Exceptions
-
| std::logic_error | If the resolved network depth is zero (no reactions can be collected). |
| EnergyChannels gridfire::engine::classify_energy_channels |
( |
const reaction::ReactionSet & | reactions, |
|
|
const std::vector< fourdst::atomic::Species > & | fuels, |
|
|
bool | splitHydrogenPPCNO ) |
Classify reactions into energy channels from an ordered list of fuels.
The user supplies fuels (e.g. H-1, He-4, C-12, Ne-20, O-16, Si-28), ordered by burning stage; no reactions are listed by hand. The classification is purely topological and runs once per network:
- Each fuel is labelled with its own stage. Every other species inherits the lowest stage of the reactions that produce it (a fixed point over the reaction graph), so intermediates such as He-3, Be-7, or N-13 are labelled as hydrogen burning products.
- Each reaction takes the label of its lightest reactant (the "projectile"). This places He-3 + He-4 in the pp chain while placing N-14 + He-4 in helium burning.
- Optionally, hydrogen burning is split into pp and CNO: a hydrogen-stage reaction involving any nucleus with Z >= 6 is CNO (this also captures the NeNa and MgAl cycles).
Reactions whose lightest reactant has no label (no fuel lineage) are placed in "other".
- Note
- During advanced burning, alpha captures are labelled as helium burning even when the alphas come from photodisintegration (e.g. Ne-20(a,g)Mg-24 during neon burning).
- Parameters
-
| reactions | Reactions to classify. |
| fuels | Fuel species ordered by burning stage. |
| splitHydrogenPPCNO | Split the H-1 stage into "H_pp" and "H_CNO". |
Primes absent species in the network to their equilibrium abundances.
Executes a network priming algorithm that iteratively rebuilds the reaction network, calculates equilibrium mass fractions for species with zero initial abundance, and applies mass transfers based on reaction flows.
Refer to priming.cpp for implementation details on logging, algorithmic steps, and error handling.
- Parameters
-
| ctx | |
| netIn | Input network data containing initial composition, temperature, and density. |
| engine | DynamicEngine used to build and evaluate the reaction network. |
| ignoredReactionTypes | Types of reactions to ignore during priming (e.g., weak reactions). |
- Precondition
- netIn.composition defines species and their mass fractions; engine is constructed with a valid network.
- Postcondition
- engine.networkReactions restored to its initial state; returned report contains primedComposition, massFractionChanges for each species, success flag, and status code.
- Returns
- PrimingReport encapsulating the results of the priming operation.