|
|
|
|
@@ -14,110 +14,81 @@ import numpy
|
|
|
|
|
import numpy.typing
|
|
|
|
|
import typing
|
|
|
|
|
from . import diagnostics
|
|
|
|
|
__all__: list[str] = ['ACTIVE', 'ADAPTIVE_ENGINE_VIEW', 'AdaptiveEngineView', 'BuildDepthType', 'DEFAULT', 'DEFINED_ENGINE_VIEW', 'DefinedEngineView', 'DynamicEngine', 'EQUILIBRIUM', 'Engine', 'EngineTypes', 'FILE_DEFINED_ENGINE_VIEW', 'FULL_SUCCESS', 'FifthOrder', 'FileDefinedEngineView', 'FourthOrder', 'Full', 'GRAPH_ENGINE', 'GraphEngine', 'INACTIVE_FLOW', 'MAX_ITERATIONS_REACHED', 'MULTISCALE_PARTITIONING_ENGINE_VIEW', 'MultiscalePartitioningEngineView', 'NONE', 'NOT_PRESENT', 'NO_SPECIES_TO_PRIME', 'NetworkBuildDepth', 'NetworkConstructionFlags', 'NetworkJacobian', 'NetworkPrimingEngineView', 'PRIMING_ENGINE_VIEW', 'PrimingReport', 'PrimingReportStatus', 'REACLIB', 'REACLIB_STRONG', 'REACLIB_WEAK', 'SecondOrder', 'Shallow', 'SparsityPattern', 'SpeciesStatus', 'StepDerivatives', 'ThirdOrder', 'WRL_BETA_MINUS', 'WRL_BETA_PLUS', 'WRL_ELECTRON_CAPTURE', 'WRL_POSITRON_CAPTURE', 'WRL_WEAK', 'build_nuclear_network', 'diagnostics', 'primeNetwork', 'regularize_jacobian']
|
|
|
|
|
from . import scratchpads
|
|
|
|
|
__all__: list[str] = ['ACTIVE', 'ADAPTIVE_ENGINE_VIEW', 'AdaptiveEngineView', 'BuildDepthType', 'DEFAULT', 'DEFINED_ENGINE_VIEW', 'DefinedEngineView', 'DynamicEngine', 'EQUILIBRIUM', 'Engine', 'EngineTypes', 'FILE_DEFINED_ENGINE_VIEW', 'FULL_SUCCESS', 'FifthOrder', 'FileDefinedEngineView', 'FourthOrder', 'Full', 'GRAPH_ENGINE', 'GraphEngine', 'INACTIVE_FLOW', 'MAX_ITERATIONS_REACHED', 'MULTISCALE_PARTITIONING_ENGINE_VIEW', 'MultiscalePartitioningEngineView', 'NONE', 'NOT_PRESENT', 'NO_SPECIES_TO_PRIME', 'NetworkBuildDepth', 'NetworkConstructionFlags', 'NetworkJacobian', 'NetworkPrimingEngineView', 'PRIMING_ENGINE_VIEW', 'PrimingReport', 'PrimingReportStatus', 'REACLIB', 'REACLIB_STRONG', 'REACLIB_WEAK', 'SecondOrder', 'Shallow', 'SparsityPattern', 'SpeciesStatus', 'StepDerivatives', 'ThirdOrder', 'WRL_BETA_MINUS', 'WRL_BETA_PLUS', 'WRL_ELECTRON_CAPTURE', 'WRL_POSITRON_CAPTURE', 'WRL_WEAK', 'build_nuclear_network', 'diagnostics', 'primeNetwork', 'regularize_jacobian', 'scratchpads']
|
|
|
|
|
class AdaptiveEngineView(DynamicEngine):
|
|
|
|
|
def __init__(self, baseEngine: DynamicEngine) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Construct an adaptive engine view with a base engine.
|
|
|
|
|
"""
|
|
|
|
|
def calculateEpsDerivatives(self, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
"""
|
|
|
|
|
Calculate deps/dT and deps/drho
|
|
|
|
|
"""
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, ctx: scratchpads.StateBlob, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the molar reaction flow for a given reaction.
|
|
|
|
|
"""
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the right-hand side (dY/dt) and energy generation rate.
|
|
|
|
|
"""
|
|
|
|
|
def collectComposition(self, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def collectComposition(self, ctx: scratchpads.StateBlob, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Recursively collect composition from current engine and any sub engines if they exist.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the Jacobian matrix for the current state.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix only for the subset of the matrix representing the active species.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix for the given sparsity pattern
|
|
|
|
|
"""
|
|
|
|
|
def generateStoichiometryMatrix(self) -> None:
|
|
|
|
|
...
|
|
|
|
|
def getBaseEngine(self) -> DynamicEngine:
|
|
|
|
|
"""
|
|
|
|
|
Get the base engine associated with this adaptive engine view.
|
|
|
|
|
"""
|
|
|
|
|
def getDepth(self) -> gridfire._gridfire.engine.NetworkBuildDepth | int:
|
|
|
|
|
"""
|
|
|
|
|
Get the current build depth of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkReactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
"""
|
|
|
|
|
Get the set of logical reactions in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getScreeningModel(self) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
"""
|
|
|
|
|
Get the current screening model of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the destruction timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesIndex(self, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
def getSpeciesIndex(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get the index of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesStatus(self, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
def getSpeciesStatus(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
"""
|
|
|
|
|
Get the status of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getStoichiometryMatrixEntry(self, species: fourdst._phys.atomic.Species, reaction: ...) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get an entry from the stoichiometry matrix.
|
|
|
|
|
"""
|
|
|
|
|
def isStale(self, netIn: gridfire._gridfire.type.NetIn) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if the engine is stale based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
def mapNetInToMolarAbundanceVector(self, netIn: gridfire._gridfire.type.NetIn) -> list[float]:
|
|
|
|
|
"""
|
|
|
|
|
Map a NetIn object to a vector of molar abundances.
|
|
|
|
|
"""
|
|
|
|
|
def primeEngine(self, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
"""
|
|
|
|
|
Prime the engine with a NetIn object to prepare for calculations.
|
|
|
|
|
"""
|
|
|
|
|
def rebuild(self, composition: ..., depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Rebuild the engine with a new composition and build depth.
|
|
|
|
|
"""
|
|
|
|
|
def setNetworkReactions(self, reactions: gridfire._gridfire.reaction.ReactionSet) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the network reactions to a new set of reactions.
|
|
|
|
|
"""
|
|
|
|
|
def setScreeningModel(self, screeningModel: gridfire._gridfire.screening.ScreeningType) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the screening model for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def update(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def project(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Update the engine state based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
@@ -128,104 +99,74 @@ class DefinedEngineView(DynamicEngine):
|
|
|
|
|
"""
|
|
|
|
|
Construct a defined engine view with a list of tracked reactions and a base engine.
|
|
|
|
|
"""
|
|
|
|
|
def calculateEpsDerivatives(self, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
"""
|
|
|
|
|
Calculate deps/dT and deps/drho
|
|
|
|
|
"""
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, ctx: scratchpads.StateBlob, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the molar reaction flow for a given reaction.
|
|
|
|
|
"""
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the right-hand side (dY/dt) and energy generation rate.
|
|
|
|
|
"""
|
|
|
|
|
def collectComposition(self, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def collectComposition(self, ctx: scratchpads.StateBlob, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Recursively collect composition from current engine and any sub engines if they exist.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the Jacobian matrix for the current state.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix only for the subset of the matrix representing the active species.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix for the given sparsity pattern
|
|
|
|
|
"""
|
|
|
|
|
def generateStoichiometryMatrix(self) -> None:
|
|
|
|
|
...
|
|
|
|
|
def getBaseEngine(self) -> DynamicEngine:
|
|
|
|
|
"""
|
|
|
|
|
Get the base engine associated with this defined engine view.
|
|
|
|
|
"""
|
|
|
|
|
def getDepth(self) -> gridfire._gridfire.engine.NetworkBuildDepth | int:
|
|
|
|
|
"""
|
|
|
|
|
Get the current build depth of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkReactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
"""
|
|
|
|
|
Get the set of logical reactions in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getScreeningModel(self) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
"""
|
|
|
|
|
Get the current screening model of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the destruction timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesIndex(self, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
def getSpeciesIndex(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get the index of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesStatus(self, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
def getSpeciesStatus(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
"""
|
|
|
|
|
Get the status of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getStoichiometryMatrixEntry(self, species: fourdst._phys.atomic.Species, reaction: ...) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get an entry from the stoichiometry matrix.
|
|
|
|
|
"""
|
|
|
|
|
def isStale(self, netIn: gridfire._gridfire.type.NetIn) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if the engine is stale based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
def mapNetInToMolarAbundanceVector(self, netIn: gridfire._gridfire.type.NetIn) -> list[float]:
|
|
|
|
|
"""
|
|
|
|
|
Map a NetIn object to a vector of molar abundances.
|
|
|
|
|
"""
|
|
|
|
|
def primeEngine(self, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
"""
|
|
|
|
|
Prime the engine with a NetIn object to prepare for calculations.
|
|
|
|
|
"""
|
|
|
|
|
def rebuild(self, composition: ..., depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Rebuild the engine with a new composition and build depth.
|
|
|
|
|
"""
|
|
|
|
|
def setNetworkReactions(self, reactions: gridfire._gridfire.reaction.ReactionSet) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the network reactions to a new set of reactions.
|
|
|
|
|
"""
|
|
|
|
|
def setScreeningModel(self, screeningModel: gridfire._gridfire.screening.ScreeningType) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the screening model for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def update(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def project(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Update the engine state based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
@@ -293,56 +234,50 @@ class FileDefinedEngineView(DefinedEngineView):
|
|
|
|
|
"""
|
|
|
|
|
Construct a defined engine view from a file and a base engine.
|
|
|
|
|
"""
|
|
|
|
|
def calculateEpsDerivatives(self, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
"""
|
|
|
|
|
Calculate deps/dT and deps/drho
|
|
|
|
|
"""
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, ctx: scratchpads.StateBlob, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the molar reaction flow for a given reaction.
|
|
|
|
|
"""
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the right-hand side (dY/dt) and energy generation rate.
|
|
|
|
|
"""
|
|
|
|
|
def collectComposition(self, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def collectComposition(self, ctx: scratchpads.StateBlob, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Recursively collect composition from current engine and any sub engines if they exist.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the Jacobian matrix for the current state.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix only for the subset of the matrix representing the active species.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix for the given sparsity pattern
|
|
|
|
|
"""
|
|
|
|
|
def generateStoichiometryMatrix(self) -> None:
|
|
|
|
|
...
|
|
|
|
|
def getBaseEngine(self) -> DynamicEngine:
|
|
|
|
|
"""
|
|
|
|
|
Get the base engine associated with this file defined engine view.
|
|
|
|
|
"""
|
|
|
|
|
def getDepth(self) -> gridfire._gridfire.engine.NetworkBuildDepth | int:
|
|
|
|
|
"""
|
|
|
|
|
Get the current build depth of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkFile(self) -> str:
|
|
|
|
|
"""
|
|
|
|
|
Get the network file associated with this defined engine view.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkReactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
"""
|
|
|
|
|
Get the set of logical reactions in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of species in the network.
|
|
|
|
|
"""
|
|
|
|
|
@@ -350,64 +285,35 @@ class FileDefinedEngineView(DefinedEngineView):
|
|
|
|
|
"""
|
|
|
|
|
Get the parser used for this defined engine view.
|
|
|
|
|
"""
|
|
|
|
|
def getScreeningModel(self) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
"""
|
|
|
|
|
Get the current screening model of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the destruction timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesIndex(self, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
def getSpeciesIndex(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get the index of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesStatus(self, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
def getSpeciesStatus(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
"""
|
|
|
|
|
Get the status of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getStoichiometryMatrixEntry(self, species: fourdst._phys.atomic.Species, reaction: ...) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get an entry from the stoichiometry matrix.
|
|
|
|
|
"""
|
|
|
|
|
def isStale(self, netIn: gridfire._gridfire.type.NetIn) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if the engine is stale based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
def mapNetInToMolarAbundanceVector(self, netIn: gridfire._gridfire.type.NetIn) -> list[float]:
|
|
|
|
|
"""
|
|
|
|
|
Map a NetIn object to a vector of molar abundances.
|
|
|
|
|
"""
|
|
|
|
|
def primeEngine(self, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
"""
|
|
|
|
|
Prime the engine with a NetIn object to prepare for calculations.
|
|
|
|
|
"""
|
|
|
|
|
def rebuild(self, composition: ..., depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Rebuild the engine with a new composition and build depth.
|
|
|
|
|
"""
|
|
|
|
|
def setNetworkReactions(self, reactions: gridfire._gridfire.reaction.ReactionSet) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the network reactions to a new set of reactions.
|
|
|
|
|
"""
|
|
|
|
|
def setScreeningModel(self, screeningModel: gridfire._gridfire.screening.ScreeningType) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the screening model for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def update(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def project(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Update the engine state based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
class GraphEngine(DynamicEngine):
|
|
|
|
|
@staticmethod
|
|
|
|
|
def getNetReactionStoichiometry(reaction: ...) -> dict[fourdst._phys.atomic.Species, int]:
|
|
|
|
|
"""
|
|
|
|
|
Get the net stoichiometry for a given reaction.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def __init__(self, composition: fourdst._phys.composition.Composition, depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
|
|
|
|
"""
|
|
|
|
|
@@ -423,15 +329,15 @@ class GraphEngine(DynamicEngine):
|
|
|
|
|
"""
|
|
|
|
|
Initialize GraphEngine with a set of reactions.
|
|
|
|
|
"""
|
|
|
|
|
def calculateEpsDerivatives(self, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
"""
|
|
|
|
|
Calculate deps/dT and deps/drho
|
|
|
|
|
"""
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, ctx: scratchpads.StateBlob, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the molar reaction flow for a given reaction.
|
|
|
|
|
"""
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the right-hand side (dY/dt) and energy generation rate.
|
|
|
|
|
"""
|
|
|
|
|
@@ -447,128 +353,90 @@ class GraphEngine(DynamicEngine):
|
|
|
|
|
"""
|
|
|
|
|
Calculate the derivative of the reverse rate for a two-body reaction at a specific temperature.
|
|
|
|
|
"""
|
|
|
|
|
def collectComposition(self, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def collectComposition(self, ctx: scratchpads.StateBlob, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Recursively collect composition from current engine and any sub engines if they exist.
|
|
|
|
|
"""
|
|
|
|
|
def exportToCSV(self, filename: str) -> None:
|
|
|
|
|
def exportToCSV(self, ctx: scratchpads.StateBlob, filename: str) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Export the network to a CSV file for analysis.
|
|
|
|
|
"""
|
|
|
|
|
def exportToDot(self, filename: str) -> None:
|
|
|
|
|
def exportToDot(self, ctx: scratchpads.StateBlob, filename: str) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Export the network to a DOT file for visualization.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the Jacobian matrix for the current state.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix only for the subset of the matrix representing the active species.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix for the given sparsity pattern
|
|
|
|
|
"""
|
|
|
|
|
def generateStoichiometryMatrix(self) -> None:
|
|
|
|
|
...
|
|
|
|
|
def getDepth(self) -> gridfire._gridfire.engine.NetworkBuildDepth | int:
|
|
|
|
|
"""
|
|
|
|
|
Get the current build depth of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkReactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
"""
|
|
|
|
|
Get the set of logical reactions in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getPartitionFunction(self) -> gridfire._gridfire.partition.PartitionFunction:
|
|
|
|
|
def getPartitionFunction(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.partition.PartitionFunction:
|
|
|
|
|
"""
|
|
|
|
|
Get the partition function used by the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getScreeningModel(self) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
"""
|
|
|
|
|
Get the current screening model of the engine.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def getSpeciesDestructionTimescales(self, composition: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeReactions: gridfire._gridfire.reaction.ReactionSet) -> ...:
|
|
|
|
|
def getSpeciesDestructionTimescales(self, ctx: scratchpads.StateBlob, composition: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeReactions: gridfire._gridfire.reaction.ReactionSet) -> ...:
|
|
|
|
|
...
|
|
|
|
|
@typing.overload
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the destruction timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesIndex(self, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
def getSpeciesIndex(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get the index of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesStatus(self, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
def getSpeciesStatus(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
"""
|
|
|
|
|
Get the status of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def getSpeciesTimescales(self, composition: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeReactions: gridfire._gridfire.reaction.ReactionSet) -> ...:
|
|
|
|
|
def getSpeciesTimescales(self, ctx: scratchpads.StateBlob, composition: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeReactions: gridfire._gridfire.reaction.ReactionSet) -> ...:
|
|
|
|
|
...
|
|
|
|
|
@typing.overload
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getStoichiometryMatrixEntry(self, species: fourdst._phys.atomic.Species, reaction: ...) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get an entry from the stoichiometry matrix.
|
|
|
|
|
"""
|
|
|
|
|
def involvesSpecies(self, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
def involvesSpecies(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if a given species is involved in the network.
|
|
|
|
|
"""
|
|
|
|
|
def isPrecomputationEnabled(self) -> bool:
|
|
|
|
|
def isPrecomputationEnabled(self, arg0: scratchpads.StateBlob) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if precomputation is enabled for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def isStale(self, netIn: gridfire._gridfire.type.NetIn) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if the engine is stale based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
def isUsingReverseReactions(self) -> bool:
|
|
|
|
|
def isUsingReverseReactions(self, arg0: scratchpads.StateBlob) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if the engine is using reverse reactions.
|
|
|
|
|
"""
|
|
|
|
|
def mapNetInToMolarAbundanceVector(self, netIn: gridfire._gridfire.type.NetIn) -> list[float]:
|
|
|
|
|
"""
|
|
|
|
|
Map a NetIn object to a vector of molar abundances.
|
|
|
|
|
"""
|
|
|
|
|
def primeEngine(self, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
"""
|
|
|
|
|
Prime the engine with a NetIn object to prepare for calculations.
|
|
|
|
|
"""
|
|
|
|
|
def rebuild(self, composition: ..., depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Rebuild the engine with a new composition and build depth.
|
|
|
|
|
"""
|
|
|
|
|
def setNetworkReactions(self, reactions: gridfire._gridfire.reaction.ReactionSet) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the network reactions to a new set of reactions.
|
|
|
|
|
"""
|
|
|
|
|
def setPrecomputation(self, precompute: bool) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Enable or disable precomputation for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def setScreeningModel(self, screeningModel: gridfire._gridfire.screening.ScreeningType) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the screening model for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def setUseReverseReactions(self, useReverse: bool) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Enable or disable the use of reverse reactions in the engine.
|
|
|
|
|
"""
|
|
|
|
|
def update(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def project(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Update the engine state based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
@@ -577,142 +445,106 @@ class MultiscalePartitioningEngineView(DynamicEngine):
|
|
|
|
|
"""
|
|
|
|
|
Construct a multiscale partitioning engine view with a base engine.
|
|
|
|
|
"""
|
|
|
|
|
def calculateEpsDerivatives(self, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
"""
|
|
|
|
|
Calculate deps/dT and deps/drho
|
|
|
|
|
"""
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, ctx: scratchpads.StateBlob, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the molar reaction flow for a given reaction.
|
|
|
|
|
"""
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the right-hand side (dY/dt) and energy generation rate.
|
|
|
|
|
"""
|
|
|
|
|
def collectComposition(self, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def collectComposition(self, ctx: scratchpads.StateBlob, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Recursively collect composition from current engine and any sub engines if they exist.
|
|
|
|
|
"""
|
|
|
|
|
def exportToDot(self, filename: str, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> None:
|
|
|
|
|
def exportToDot(self, ctx: scratchpads.StateBlob, filename: str, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Export the network to a DOT file for visualization.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the Jacobian matrix for the current state.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix only for the subset of the matrix representing the active species.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix for the given sparsity pattern
|
|
|
|
|
"""
|
|
|
|
|
def generateStoichiometryMatrix(self) -> None:
|
|
|
|
|
...
|
|
|
|
|
def getBaseEngine(self) -> DynamicEngine:
|
|
|
|
|
"""
|
|
|
|
|
Get the base engine associated with this multiscale partitioning engine view.
|
|
|
|
|
"""
|
|
|
|
|
def getDepth(self) -> gridfire._gridfire.engine.NetworkBuildDepth | int:
|
|
|
|
|
"""
|
|
|
|
|
Get the current build depth of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getDynamicSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getDynamicSpecies(self: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of dynamic species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getFastSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getFastSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of fast species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkReactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
"""
|
|
|
|
|
Get the set of logical reactions in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNormalizedEquilibratedComposition(self, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def getNormalizedEquilibratedComposition(self, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Get the normalized equilibrated composition for the algebraic species.
|
|
|
|
|
"""
|
|
|
|
|
def getScreeningModel(self) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
"""
|
|
|
|
|
Get the current screening model of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the destruction timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesIndex(self, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
def getSpeciesIndex(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get the index of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesStatus(self, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
def getSpeciesStatus(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
"""
|
|
|
|
|
Get the status of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getStoichiometryMatrixEntry(self, species: fourdst._phys.atomic.Species, reaction: ...) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get an entry from the stoichiometry matrix.
|
|
|
|
|
"""
|
|
|
|
|
def involvesSpecies(self, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
def involvesSpecies(self: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if a given species is involved in the network (in either the algebraic or dynamic set).
|
|
|
|
|
"""
|
|
|
|
|
def involvesSpeciesInDynamic(self, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
def involvesSpeciesInDynamic(self: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if a given species is involved in the network's dynamic set.
|
|
|
|
|
"""
|
|
|
|
|
def involvesSpeciesInQSE(self, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
def involvesSpeciesInQSE(self: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if a given species is involved in the network's algebraic set.
|
|
|
|
|
"""
|
|
|
|
|
def isStale(self, netIn: gridfire._gridfire.type.NetIn) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if the engine is stale based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
def mapNetInToMolarAbundanceVector(self, netIn: gridfire._gridfire.type.NetIn) -> list[float]:
|
|
|
|
|
"""
|
|
|
|
|
Map a NetIn object to a vector of molar abundances.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def partitionNetwork(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def partitionNetwork(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Partition the network based on species timescales and connectivity.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def partitionNetwork(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Partition the network based on a NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
def primeEngine(self, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
"""
|
|
|
|
|
Prime the engine with a NetIn object to prepare for calculations.
|
|
|
|
|
"""
|
|
|
|
|
def rebuild(self, composition: ..., depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Rebuild the engine with a new composition and build depth.
|
|
|
|
|
"""
|
|
|
|
|
def setNetworkReactions(self, reactions: gridfire._gridfire.reaction.ReactionSet) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the network reactions to a new set of reactions.
|
|
|
|
|
"""
|
|
|
|
|
def setScreeningModel(self, screeningModel: gridfire._gridfire.screening.ScreeningType) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the screening model for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def update(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def project(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Update the engine state based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
@@ -893,113 +725,83 @@ class NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
class NetworkPrimingEngineView(DefinedEngineView):
|
|
|
|
|
@typing.overload
|
|
|
|
|
def __init__(self, primingSymbol: str, baseEngine: GraphEngine) -> None:
|
|
|
|
|
def __init__(self, ctx: scratchpads.StateBlob, primingSymbol: str, baseEngine: GraphEngine) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Construct a priming engine view with a priming symbol and a base engine.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def __init__(self, primingSpecies: fourdst._phys.atomic.Species, baseEngine: GraphEngine) -> None:
|
|
|
|
|
def __init__(self, ctx: scratchpads.StateBlob, primingSpecies: fourdst._phys.atomic.Species, baseEngine: GraphEngine) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Construct a priming engine view with a priming species and a base engine.
|
|
|
|
|
"""
|
|
|
|
|
def calculateEpsDerivatives(self, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
|
|
|
|
"""
|
|
|
|
|
Calculate deps/dT and deps/drho
|
|
|
|
|
"""
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
def calculateMolarReactionFlow(self: DynamicEngine, ctx: scratchpads.StateBlob, reaction: ..., comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> float:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the molar reaction flow for a given reaction.
|
|
|
|
|
"""
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
def calculateRHSAndEnergy(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> StepDerivatives:
|
|
|
|
|
"""
|
|
|
|
|
Calculate the right-hand side (dY/dt) and energy generation rate.
|
|
|
|
|
"""
|
|
|
|
|
def collectComposition(self, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def collectComposition(self, ctx: scratchpads.StateBlob, composition: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Recursively collect composition from current engine and any sub engines if they exist.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the Jacobian matrix for the current state.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, activeSpecies: collections.abc.Sequence[fourdst._phys.atomic.Species]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix only for the subset of the matrix representing the active species.
|
|
|
|
|
"""
|
|
|
|
|
@typing.overload
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, sparsityPattern: collections.abc.Sequence[tuple[typing.SupportsInt, typing.SupportsInt]]) -> NetworkJacobian:
|
|
|
|
|
"""
|
|
|
|
|
Generate the jacobian matrix for the given sparsity pattern
|
|
|
|
|
"""
|
|
|
|
|
def generateStoichiometryMatrix(self) -> None:
|
|
|
|
|
...
|
|
|
|
|
def getBaseEngine(self) -> DynamicEngine:
|
|
|
|
|
"""
|
|
|
|
|
Get the base engine associated with this priming engine view.
|
|
|
|
|
"""
|
|
|
|
|
def getDepth(self) -> gridfire._gridfire.engine.NetworkBuildDepth | int:
|
|
|
|
|
"""
|
|
|
|
|
Get the current build depth of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkReactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
|
|
|
|
"""
|
|
|
|
|
Get the set of logical reactions in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getNetworkSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
|
|
|
|
"""
|
|
|
|
|
Get the list of species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getScreeningModel(self) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
|
|
|
|
"""
|
|
|
|
|
Get the current screening model of the engine.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesDestructionTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the destruction timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesIndex(self, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
def getSpeciesIndex(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get the index of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesStatus(self, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
def getSpeciesStatus(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> SpeciesStatus:
|
|
|
|
|
"""
|
|
|
|
|
Get the status of a species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
def getSpeciesTimescales(self: DynamicEngine, ctx: scratchpads.StateBlob, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> dict[fourdst._phys.atomic.Species, float]:
|
|
|
|
|
"""
|
|
|
|
|
Get the timescales for each species in the network.
|
|
|
|
|
"""
|
|
|
|
|
def getStoichiometryMatrixEntry(self, species: fourdst._phys.atomic.Species, reaction: ...) -> int:
|
|
|
|
|
"""
|
|
|
|
|
Get an entry from the stoichiometry matrix.
|
|
|
|
|
"""
|
|
|
|
|
def isStale(self, netIn: gridfire._gridfire.type.NetIn) -> bool:
|
|
|
|
|
"""
|
|
|
|
|
Check if the engine is stale based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
def mapNetInToMolarAbundanceVector(self, netIn: gridfire._gridfire.type.NetIn) -> list[float]:
|
|
|
|
|
"""
|
|
|
|
|
Map a NetIn object to a vector of molar abundances.
|
|
|
|
|
"""
|
|
|
|
|
def primeEngine(self, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
|
|
|
|
"""
|
|
|
|
|
Prime the engine with a NetIn object to prepare for calculations.
|
|
|
|
|
"""
|
|
|
|
|
def rebuild(self, composition: ..., depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Rebuild the engine with a new composition and build depth.
|
|
|
|
|
"""
|
|
|
|
|
def setNetworkReactions(self, reactions: gridfire._gridfire.reaction.ReactionSet) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the network reactions to a new set of reactions.
|
|
|
|
|
"""
|
|
|
|
|
def setScreeningModel(self, screeningModel: gridfire._gridfire.screening.ScreeningType) -> None:
|
|
|
|
|
"""
|
|
|
|
|
Set the screening model for the engine.
|
|
|
|
|
"""
|
|
|
|
|
def update(self, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
def project(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
|
|
|
|
"""
|
|
|
|
|
Update the engine state based on the provided NetIn object.
|
|
|
|
|
"""
|
|
|
|
|
@@ -1131,7 +933,7 @@ def build_nuclear_network(composition: ..., weakInterpolator: ..., maxLayers: gr
|
|
|
|
|
"""
|
|
|
|
|
Build a nuclear network from a composition using all archived reaction data.
|
|
|
|
|
"""
|
|
|
|
|
def primeNetwork(netIn: gridfire._gridfire.type.NetIn, engine: ..., ignoredReactionTypes: collections.abc.Sequence[...] | None = None) -> PrimingReport:
|
|
|
|
|
def primeNetwork(ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn, engine: ..., ignoredReactionTypes: collections.abc.Sequence[...] | None = None) -> PrimingReport:
|
|
|
|
|
"""
|
|
|
|
|
Prime a network with a short timescale ignition
|
|
|
|
|
"""
|
|
|
|
|
|