feat(python): Python Bindings
Python Bindings are working again
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2,6 +2,7 @@
|
||||
Python bindings for the fourdst utility modules which are a part of the 4D-STAR project.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
from . import config
|
||||
from . import engine
|
||||
from . import exceptions
|
||||
from . import io
|
||||
@@ -12,4 +13,4 @@ from . import screening
|
||||
from . import solver
|
||||
from . import type
|
||||
from . import utils
|
||||
__all__: list[str] = ['engine', 'exceptions', 'io', 'partition', 'policy', 'reaction', 'screening', 'solver', 'type', 'utils']
|
||||
__all__: list[str] = ['config', 'engine', 'exceptions', 'io', 'partition', 'policy', 'reaction', 'screening', 'solver', 'type', 'utils']
|
||||
|
||||
47
stubs/gridfire/_gridfire/config.pyi
Normal file
47
stubs/gridfire/_gridfire/config.pyi
Normal file
@@ -0,0 +1,47 @@
|
||||
"""
|
||||
GridFire configuration bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import typing
|
||||
__all__: list[str] = ['AdaptiveEngineViewConfig', 'CVODESolverConfig', 'EngineConfig', 'EngineViewConfig', 'GridFireConfig', 'SolverConfig']
|
||||
class AdaptiveEngineViewConfig:
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
@property
|
||||
def relativeCullingThreshold(self) -> float:
|
||||
...
|
||||
@relativeCullingThreshold.setter
|
||||
def relativeCullingThreshold(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
class CVODESolverConfig:
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
@property
|
||||
def absTol(self) -> float:
|
||||
...
|
||||
@absTol.setter
|
||||
def absTol(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def relTol(self) -> float:
|
||||
...
|
||||
@relTol.setter
|
||||
def relTol(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
class EngineConfig:
|
||||
views: EngineViewConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
class EngineViewConfig:
|
||||
adaptiveEngineView: AdaptiveEngineViewConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
class GridFireConfig:
|
||||
engine: EngineConfig
|
||||
solver: SolverConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
class SolverConfig:
|
||||
cvode: CVODESolverConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
@@ -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
|
||||
"""
|
||||
|
||||
@@ -5,11 +5,12 @@ from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import typing
|
||||
__all__: list[str] = ['inspect_jacobian_stiffness', 'inspect_species_balance', 'report_limiting_species']
|
||||
def inspect_jacobian_stiffness(engine: gridfire._gridfire.engine.DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, json: bool) -> ... | None:
|
||||
def inspect_jacobian_stiffness(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, json: bool) -> ... | None:
|
||||
...
|
||||
def inspect_species_balance(engine: gridfire._gridfire.engine.DynamicEngine, species_name: str, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, json: bool) -> ... | None:
|
||||
def inspect_species_balance(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, species_name: str, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, json: bool) -> ... | None:
|
||||
...
|
||||
def report_limiting_species(engine: gridfire._gridfire.engine.DynamicEngine, Y_full: collections.abc.Sequence[typing.SupportsFloat], E_full: collections.abc.Sequence[typing.SupportsFloat], relTol: typing.SupportsFloat, absTol: typing.SupportsFloat, top_n: typing.SupportsInt, json: bool) -> ... | None:
|
||||
def report_limiting_species(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, Y_full: collections.abc.Sequence[typing.SupportsFloat], E_full: collections.abc.Sequence[typing.SupportsFloat], relTol: typing.SupportsFloat, absTol: typing.SupportsFloat, top_n: typing.SupportsInt, json: bool) -> ... | None:
|
||||
...
|
||||
|
||||
267
stubs/gridfire/_gridfire/engine/scratchpads.pyi
Normal file
267
stubs/gridfire/_gridfire/engine/scratchpads.pyi
Normal file
@@ -0,0 +1,267 @@
|
||||
"""
|
||||
Engine ScratchPad bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import fourdst._phys.atomic
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.reaction
|
||||
import typing
|
||||
__all__: list[str] = ['ADAPTIVE_ENGINE_VIEW_SCRATCHPAD', 'ADFunRegistrationResult', 'ALREADY_REGISTERED', 'AdaptiveEngineViewScratchPad', 'DEFINED_ENGINE_VIEW_SCRATCHPAD', 'DefinedEngineViewScratchPad', 'GRAPH_ENGINE_SCRATCHPAD', 'GraphEngineScratchPad', 'MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD', 'MultiscalePartitioningEngineViewScratchPad', 'SCRATCHPAD_BAD_CAST', 'SCRATCHPAD_NOT_FOUND', 'SCRATCHPAD_NOT_INITIALIZED', 'SCRATCHPAD_OUT_OF_BOUNDS', 'SCRATCHPAD_TYPE_COLLISION', 'SCRATCHPAD_UNKNOWN_ERROR', 'SUCCESS', 'ScratchPadType', 'StateBlob', 'StateBlobError']
|
||||
class ADFunRegistrationResult:
|
||||
"""
|
||||
Members:
|
||||
|
||||
SUCCESS
|
||||
|
||||
ALREADY_REGISTERED
|
||||
"""
|
||||
ALREADY_REGISTERED: typing.ClassVar[ADFunRegistrationResult] # value = <ADFunRegistrationResult.ALREADY_REGISTERED: 1>
|
||||
SUCCESS: typing.ClassVar[ADFunRegistrationResult] # value = <ADFunRegistrationResult.SUCCESS: 0>
|
||||
__members__: typing.ClassVar[dict[str, ADFunRegistrationResult]] # value = {'SUCCESS': <ADFunRegistrationResult.SUCCESS: 0>, 'ALREADY_REGISTERED': <ADFunRegistrationResult.ALREADY_REGISTERED: 1>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class AdaptiveEngineViewScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def initialize(self, arg0: ...) -> None:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def active_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
...
|
||||
@property
|
||||
def active_species(self) -> list[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
class DefinedEngineViewScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def active_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
...
|
||||
@property
|
||||
def active_species(self) -> set[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def reaction_index_map(self) -> list[int]:
|
||||
...
|
||||
@property
|
||||
def species_index_map(self) -> list[int]:
|
||||
...
|
||||
class GraphEngineScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def initialize(self, engine: ...) -> None:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def local_abundance_cache(self) -> list[float]:
|
||||
...
|
||||
@property
|
||||
def most_recent_rhs_calculation(self) -> ... | None:
|
||||
...
|
||||
@property
|
||||
def stepDerivativesCache(self) -> dict[int, ...]:
|
||||
...
|
||||
class MultiscalePartitioningEngineViewScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def initialize(self) -> None:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def algebraic_species(self) -> list[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def composition_cache(self) -> dict[int, fourdst._phys.composition.Composition]:
|
||||
...
|
||||
@property
|
||||
def dynamic_species(self) -> list[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def qse_groups(self) -> list[...]:
|
||||
...
|
||||
class ScratchPadType:
|
||||
"""
|
||||
Members:
|
||||
|
||||
GRAPH_ENGINE_SCRATCHPAD
|
||||
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD
|
||||
|
||||
ADAPTIVE_ENGINE_VIEW_SCRATCHPAD
|
||||
|
||||
DEFINED_ENGINE_VIEW_SCRATCHPAD
|
||||
"""
|
||||
ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>
|
||||
DEFINED_ENGINE_VIEW_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>
|
||||
GRAPH_ENGINE_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>
|
||||
__members__: typing.ClassVar[dict[str, ScratchPadType]] # value = {'GRAPH_ENGINE_SCRATCHPAD': <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>, 'MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD': <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>, 'ADAPTIVE_ENGINE_VIEW_SCRATCHPAD': <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>, 'DEFINED_ENGINE_VIEW_SCRATCHPAD': <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class StateBlob:
|
||||
@staticmethod
|
||||
def error_to_string(arg0: StateBlobError) -> str:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone_structure(self) -> StateBlob:
|
||||
...
|
||||
def enroll(self, arg0: ScratchPadType) -> None:
|
||||
...
|
||||
def get(self, arg0: ScratchPadType) -> ...:
|
||||
...
|
||||
def get_registered_scratchpads(self) -> set[ScratchPadType]:
|
||||
...
|
||||
def get_status(self, arg0: ScratchPadType) -> ...:
|
||||
...
|
||||
def get_status_map(self) -> dict[ScratchPadType, ...]:
|
||||
...
|
||||
class StateBlobError:
|
||||
"""
|
||||
Members:
|
||||
|
||||
SCRATCHPAD_OUT_OF_BOUNDS
|
||||
|
||||
SCRATCHPAD_NOT_FOUND
|
||||
|
||||
SCRATCHPAD_BAD_CAST
|
||||
|
||||
SCRATCHPAD_NOT_INITIALIZED
|
||||
|
||||
SCRATCHPAD_TYPE_COLLISION
|
||||
|
||||
SCRATCHPAD_UNKNOWN_ERROR
|
||||
"""
|
||||
SCRATCHPAD_BAD_CAST: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_BAD_CAST: 1>
|
||||
SCRATCHPAD_NOT_FOUND: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_NOT_FOUND: 0>
|
||||
SCRATCHPAD_NOT_INITIALIZED: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_NOT_INITIALIZED: 2>
|
||||
SCRATCHPAD_OUT_OF_BOUNDS: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_OUT_OF_BOUNDS: 4>
|
||||
SCRATCHPAD_TYPE_COLLISION: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_TYPE_COLLISION: 3>
|
||||
SCRATCHPAD_UNKNOWN_ERROR: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_UNKNOWN_ERROR: 5>
|
||||
__members__: typing.ClassVar[dict[str, StateBlobError]] # value = {'SCRATCHPAD_OUT_OF_BOUNDS': <StateBlobError.SCRATCHPAD_OUT_OF_BOUNDS: 4>, 'SCRATCHPAD_NOT_FOUND': <StateBlobError.SCRATCHPAD_NOT_FOUND: 0>, 'SCRATCHPAD_BAD_CAST': <StateBlobError.SCRATCHPAD_BAD_CAST: 1>, 'SCRATCHPAD_NOT_INITIALIZED': <StateBlobError.SCRATCHPAD_NOT_INITIALIZED: 2>, 'SCRATCHPAD_TYPE_COLLISION': <StateBlobError.SCRATCHPAD_TYPE_COLLISION: 3>, 'SCRATCHPAD_UNKNOWN_ERROR': <StateBlobError.SCRATCHPAD_UNKNOWN_ERROR: 5>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>
|
||||
ALREADY_REGISTERED: ADFunRegistrationResult # value = <ADFunRegistrationResult.ALREADY_REGISTERED: 1>
|
||||
DEFINED_ENGINE_VIEW_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>
|
||||
GRAPH_ENGINE_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>
|
||||
SCRATCHPAD_BAD_CAST: StateBlobError # value = <StateBlobError.SCRATCHPAD_BAD_CAST: 1>
|
||||
SCRATCHPAD_NOT_FOUND: StateBlobError # value = <StateBlobError.SCRATCHPAD_NOT_FOUND: 0>
|
||||
SCRATCHPAD_NOT_INITIALIZED: StateBlobError # value = <StateBlobError.SCRATCHPAD_NOT_INITIALIZED: 2>
|
||||
SCRATCHPAD_OUT_OF_BOUNDS: StateBlobError # value = <StateBlobError.SCRATCHPAD_OUT_OF_BOUNDS: 4>
|
||||
SCRATCHPAD_TYPE_COLLISION: StateBlobError # value = <StateBlobError.SCRATCHPAD_TYPE_COLLISION: 3>
|
||||
SCRATCHPAD_UNKNOWN_ERROR: StateBlobError # value = <StateBlobError.SCRATCHPAD_UNKNOWN_ERROR: 5>
|
||||
SUCCESS: ADFunRegistrationResult # value = <ADFunRegistrationResult.SUCCESS: 0>
|
||||
@@ -2,7 +2,7 @@
|
||||
GridFire exceptions bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
__all__: list[str] = ['BadCollectionError', 'BadRHSEngineError', 'CVODESolverFailureError', 'DebugException', 'EngineError', 'FailedToPartitionEngineError', 'GridFireError', 'HashingError', 'IllConditionedJacobianError', 'InvalidQSESolutionError', 'JacobianError', 'KINSolSolverFailureError', 'MissingBaseReactionError', 'MissingKeyReactionError', 'MissingSeedSpeciesError', 'NetworkResizedError', 'PolicyError', 'ReactionError', 'ReactionParsingError', 'SUNDIALSError', 'SingularJacobianError', 'SolverError', 'StaleJacobianError', 'UnableToSetNetworkReactionsError', 'UninitializedJacobianError', 'UnknownJacobianError', 'UtilityError']
|
||||
__all__: list[str] = ['BadCollectionError', 'BadRHSEngineError', 'CVODESolverFailureError', 'DebugException', 'EngineError', 'FailedToPartitionEngineError', 'GridFireError', 'HashingError', 'IllConditionedJacobianError', 'InvalidQSESolutionError', 'JacobianError', 'KINSolSolverFailureError', 'MissingBaseReactionError', 'MissingKeyReactionError', 'MissingSeedSpeciesError', 'NetworkResizedError', 'PolicyError', 'ReactionError', 'ReactionParsingError', 'SUNDIALSError', 'ScratchPadError', 'SingularJacobianError', 'SolverError', 'StaleJacobianError', 'UnableToSetNetworkReactionsError', 'UninitializedJacobianError', 'UnknownJacobianError', 'UtilityError']
|
||||
class BadCollectionError(EngineError):
|
||||
pass
|
||||
class BadRHSEngineError(EngineError):
|
||||
@@ -43,6 +43,8 @@ class ReactionParsingError(ReactionError):
|
||||
pass
|
||||
class SUNDIALSError(SolverError):
|
||||
pass
|
||||
class ScratchPadError(GridFireError):
|
||||
pass
|
||||
class SingularJacobianError(SolverError):
|
||||
pass
|
||||
class SolverError(GridFireError):
|
||||
|
||||
@@ -6,9 +6,11 @@ import collections.abc
|
||||
import fourdst._phys.atomic
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import gridfire._gridfire.partition
|
||||
import gridfire._gridfire.reaction
|
||||
import typing
|
||||
__all__: list[str] = ['CNOChainPolicy', 'CNOIChainPolicy', 'CNOIIChainPolicy', 'CNOIIIChainPolicy', 'CNOIVChainPolicy', 'HotCNOChainPolicy', 'HotCNOIChainPolicy', 'HotCNOIIChainPolicy', 'HotCNOIIIChainPolicy', 'INITIALIZED_UNVERIFIED', 'INITIALIZED_VERIFIED', 'MISSING_KEY_REACTION', 'MISSING_KEY_SPECIES', 'MainSequencePolicy', 'MainSequenceReactionChainPolicy', 'MultiReactionChainPolicy', 'NetworkPolicy', 'NetworkPolicyStatus', 'ProtonProtonChainPolicy', 'ProtonProtonIChainPolicy', 'ProtonProtonIIChainPolicy', 'ProtonProtonIIIChainPolicy', 'ReactionChainPolicy', 'TemperatureDependentChainPolicy', 'TripleAlphaChainPolicy', 'UNINITIALIZED']
|
||||
__all__: list[str] = ['CNOChainPolicy', 'CNOIChainPolicy', 'CNOIIChainPolicy', 'CNOIIIChainPolicy', 'CNOIVChainPolicy', 'ConstructionResults', 'HotCNOChainPolicy', 'HotCNOIChainPolicy', 'HotCNOIIChainPolicy', 'HotCNOIIIChainPolicy', 'INITIALIZED_UNVERIFIED', 'INITIALIZED_VERIFIED', 'MISSING_KEY_REACTION', 'MISSING_KEY_SPECIES', 'MainSequencePolicy', 'MainSequenceReactionChainPolicy', 'MultiReactionChainPolicy', 'NetworkPolicy', 'NetworkPolicyStatus', 'ProtonProtonChainPolicy', 'ProtonProtonIChainPolicy', 'ProtonProtonIIChainPolicy', 'ProtonProtonIIIChainPolicy', 'ReactionChainPolicy', 'TemperatureDependentChainPolicy', 'TripleAlphaChainPolicy', 'UNINITIALIZED', 'network_policy_status_to_string']
|
||||
class CNOChainPolicy(MultiReactionChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
@@ -224,6 +226,13 @@ class CNOIVChainPolicy(TemperatureDependentChainPolicy):
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class ConstructionResults:
|
||||
@property
|
||||
def engine(self) -> gridfire._gridfire.engine.DynamicEngine:
|
||||
...
|
||||
@property
|
||||
def scratch_blob(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
class HotCNOChainPolicy(MultiReactionChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
@@ -407,14 +416,18 @@ class MainSequencePolicy(NetworkPolicy):
|
||||
"""
|
||||
Construct MainSequencePolicy from seed species and mass fractions.
|
||||
"""
|
||||
def construct(self) -> gridfire._gridfire.engine.DynamicEngine:
|
||||
def construct(self) -> ConstructionResults:
|
||||
"""
|
||||
Construct the network according to the policy.
|
||||
"""
|
||||
def get_engine_stack(self) -> list[gridfire._gridfire.engine.DynamicEngine]:
|
||||
...
|
||||
def get_engine_types_stack(self) -> list[gridfire._gridfire.engine.EngineTypes]:
|
||||
"""
|
||||
Get the types of engines in the stack constructed by the network policy.
|
||||
"""
|
||||
def get_partition_function(self) -> gridfire._gridfire.partition.PartitionFunction:
|
||||
...
|
||||
def get_seed_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of seed reactions required by the network policy.
|
||||
@@ -423,6 +436,8 @@ class MainSequencePolicy(NetworkPolicy):
|
||||
"""
|
||||
Get the set of seed species required by the network policy.
|
||||
"""
|
||||
def get_stack_scratch_blob(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
def get_status(self) -> NetworkPolicyStatus:
|
||||
"""
|
||||
Get the current status of the network policy.
|
||||
@@ -743,6 +758,10 @@ class TripleAlphaChainPolicy(TemperatureDependentChainPolicy):
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
def network_policy_status_to_string(status: NetworkPolicyStatus) -> str:
|
||||
"""
|
||||
Convert a NetworkPolicyStatus enum value to its string representation.
|
||||
"""
|
||||
INITIALIZED_UNVERIFIED: NetworkPolicyStatus # value = <NetworkPolicyStatus.INITIALIZED_UNVERIFIED: 1>
|
||||
INITIALIZED_VERIFIED: NetworkPolicyStatus # value = <NetworkPolicyStatus.INITIALIZED_VERIFIED: 4>
|
||||
MISSING_KEY_REACTION: NetworkPolicyStatus # value = <NetworkPolicyStatus.MISSING_KEY_REACTION: 2>
|
||||
|
||||
@@ -5,47 +5,113 @@ from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.atomic
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import gridfire._gridfire.type
|
||||
import types
|
||||
import typing
|
||||
__all__: list[str] = ['CVODESolverStrategy', 'CVODETimestepContext', 'DynamicNetworkSolverStrategy', 'SolverContextBase']
|
||||
class CVODESolverStrategy(DynamicNetworkSolverStrategy):
|
||||
def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine) -> None:
|
||||
__all__: list[str] = ['GridSolver', 'GridSolverContext', 'MultiZoneDynamicNetworkSolver', 'PointSolver', 'PointSolverContext', 'PointSolverTimestepContext', 'SingleZoneDynamicNetworkSolver', 'SolverContextBase']
|
||||
class GridSolver(MultiZoneDynamicNetworkSolver):
|
||||
def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine, solver: SingleZoneDynamicNetworkSolver) -> None:
|
||||
"""
|
||||
Initialize the CVODESolverStrategy object.
|
||||
Initialize the GridSolver object.
|
||||
"""
|
||||
def evaluate(self, netIn: gridfire._gridfire.type.NetIn, display_trigger: bool = False) -> gridfire._gridfire.type.NetOut:
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIns: collections.abc.Sequence[gridfire._gridfire.type.NetIn]) -> list[gridfire._gridfire.type.NetOut]:
|
||||
"""
|
||||
evaluate the dynamic engine using the dynamic engine class
|
||||
"""
|
||||
def get_absTol(self) -> float:
|
||||
class GridSolverContext(SolverContextBase):
|
||||
detailed_logging: bool
|
||||
stdout_logging: bool
|
||||
zone_completion_logging: bool
|
||||
def __init__(self, ctx_template: gridfire._gridfire.engine.scratchpads.StateBlob) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def clear_callback(self) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def clear_callback(self, zone_idx: typing.SupportsInt) -> None:
|
||||
...
|
||||
def init(self) -> None:
|
||||
...
|
||||
def reset(self) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def set_callback(self, callback: collections.abc.Callable[[...], None]) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def set_callback(self, callback: collections.abc.Callable[[...], None], zone_idx: typing.SupportsInt) -> None:
|
||||
...
|
||||
class MultiZoneDynamicNetworkSolver:
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIns: collections.abc.Sequence[gridfire._gridfire.type.NetIn]) -> list[gridfire._gridfire.type.NetOut]:
|
||||
"""
|
||||
Get the absolute tolerance for the CVODE solver.
|
||||
evaluate the dynamic engine using the dynamic engine class for multiple zones (using openmp if available)
|
||||
"""
|
||||
def get_relTol(self) -> float:
|
||||
class PointSolver(SingleZoneDynamicNetworkSolver):
|
||||
def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine) -> None:
|
||||
"""
|
||||
Get the relative tolerance for the CVODE solver.
|
||||
Initialize the PointSolver object.
|
||||
"""
|
||||
def get_stdout_logging_enabled(self) -> bool:
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIn: gridfire._gridfire.type.NetIn, display_trigger: bool = False, force_reinitialization: bool = False) -> gridfire._gridfire.type.NetOut:
|
||||
"""
|
||||
Check if solver logging to standard output is enabled.
|
||||
evaluate the dynamic engine using the dynamic engine class
|
||||
"""
|
||||
def set_absTol(self, absTol: typing.SupportsFloat) -> None:
|
||||
"""
|
||||
Set the absolute tolerance for the CVODE solver.
|
||||
"""
|
||||
def set_callback(self, cb: collections.abc.Callable[[CVODETimestepContext], None]) -> None:
|
||||
"""
|
||||
Set a callback function which will run at the end of every successful timestep
|
||||
"""
|
||||
def set_relTol(self, relTol: typing.SupportsFloat) -> None:
|
||||
"""
|
||||
Set the relative tolerance for the CVODE solver.
|
||||
"""
|
||||
def set_stdout_logging_enabled(self, logging_enabled: bool) -> None:
|
||||
"""
|
||||
Enable logging to standard output.
|
||||
"""
|
||||
class CVODETimestepContext(SolverContextBase):
|
||||
class PointSolverContext:
|
||||
callback: collections.abc.Callable[[PointSolverTimestepContext], None] | None
|
||||
detailed_logging: bool
|
||||
stdout_logging: bool
|
||||
def __init__(self, engine_ctx: gridfire._gridfire.engine.scratchpads.StateBlob) -> None:
|
||||
...
|
||||
def clear_context(self) -> None:
|
||||
...
|
||||
def has_context(self) -> bool:
|
||||
...
|
||||
def init(self) -> None:
|
||||
...
|
||||
def init_context(self) -> None:
|
||||
...
|
||||
def reset_all(self) -> None:
|
||||
...
|
||||
def reset_cvode(self) -> None:
|
||||
...
|
||||
def reset_user(self) -> None:
|
||||
...
|
||||
@property
|
||||
def J(self) -> _generic_SUNMatrix:
|
||||
...
|
||||
@property
|
||||
def LS(self) -> _generic_SUNLinearSolver:
|
||||
...
|
||||
@property
|
||||
def Y(self) -> _generic_N_Vector:
|
||||
...
|
||||
@property
|
||||
def YErr(self) -> _generic_N_Vector:
|
||||
...
|
||||
@property
|
||||
def abs_tol(self) -> float:
|
||||
...
|
||||
@abs_tol.setter
|
||||
def abs_tol(self, arg1: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def cvode_mem(self) -> types.CapsuleType:
|
||||
...
|
||||
@property
|
||||
def engine_ctx(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
@property
|
||||
def num_steps(self) -> int:
|
||||
...
|
||||
@property
|
||||
def rel_tol(self) -> float:
|
||||
...
|
||||
@rel_tol.setter
|
||||
def rel_tol(self, arg1: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def sun_ctx(self) -> SUNContext_:
|
||||
...
|
||||
class PointSolverTimestepContext:
|
||||
@property
|
||||
def T9(self) -> float:
|
||||
...
|
||||
@@ -77,16 +143,15 @@ class CVODETimestepContext(SolverContextBase):
|
||||
def state(self) -> list[float]:
|
||||
...
|
||||
@property
|
||||
def state_ctx(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
@property
|
||||
def t(self) -> float:
|
||||
...
|
||||
class DynamicNetworkSolverStrategy:
|
||||
def describe_callback_context(self) -> list[tuple[str, str]]:
|
||||
class SingleZoneDynamicNetworkSolver:
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIn: gridfire._gridfire.type.NetIn) -> gridfire._gridfire.type.NetOut:
|
||||
"""
|
||||
Get a structure representing what data is in the callback context in a human readable format
|
||||
"""
|
||||
def evaluate(self, netIn: gridfire._gridfire.type.NetIn) -> gridfire._gridfire.type.NetOut:
|
||||
"""
|
||||
evaluate the dynamic engine using the dynamic engine class
|
||||
evaluate the dynamic engine using the dynamic engine class for a single zone
|
||||
"""
|
||||
class SolverContextBase:
|
||||
pass
|
||||
|
||||
@@ -59,3 +59,9 @@ class NetOut:
|
||||
@property
|
||||
def num_steps(self) -> int:
|
||||
...
|
||||
@property
|
||||
def specific_neutrino_energy_loss(self) -> float:
|
||||
...
|
||||
@property
|
||||
def specific_neutrino_flux(self) -> float:
|
||||
...
|
||||
|
||||
@@ -4,10 +4,11 @@ GridFire utility method bindings
|
||||
from __future__ import annotations
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import typing
|
||||
from . import hashing
|
||||
__all__: list[str] = ['formatNuclearTimescaleLogString', 'hash_atomic', 'hash_reaction', 'hashing']
|
||||
def formatNuclearTimescaleLogString(engine: gridfire._gridfire.engine.DynamicEngine, Y: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> str:
|
||||
def formatNuclearTimescaleLogString(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, Y: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> str:
|
||||
"""
|
||||
Format a string for logging nuclear timescales based on temperature, density, and energy generation rate.
|
||||
"""
|
||||
|
||||
42
stubs/gridfiregridfire/__init__.pyi
Normal file
42
stubs/gridfiregridfire/__init__.pyi
Normal file
File diff suppressed because one or more lines are too long
16
stubs/gridfiregridfire/_gridfire/__init__.pyi
Normal file
16
stubs/gridfiregridfire/_gridfire/__init__.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Python bindings for the fourdst utility modules which are a part of the 4D-STAR project.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
from . import config
|
||||
from . import engine
|
||||
from . import exceptions
|
||||
from . import io
|
||||
from . import partition
|
||||
from . import policy
|
||||
from . import reaction
|
||||
from . import screening
|
||||
from . import solver
|
||||
from . import type
|
||||
from . import utils
|
||||
__all__: list[str] = ['config', 'engine', 'exceptions', 'io', 'partition', 'policy', 'reaction', 'screening', 'solver', 'type', 'utils']
|
||||
47
stubs/gridfiregridfire/_gridfire/config.pyi
Normal file
47
stubs/gridfiregridfire/_gridfire/config.pyi
Normal file
@@ -0,0 +1,47 @@
|
||||
"""
|
||||
GridFire configuration bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import typing
|
||||
__all__: list[str] = ['AdaptiveEngineViewConfig', 'CVODESolverConfig', 'EngineConfig', 'EngineViewConfig', 'GridFireConfig', 'SolverConfig']
|
||||
class AdaptiveEngineViewConfig:
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
@property
|
||||
def relativeCullingThreshold(self) -> float:
|
||||
...
|
||||
@relativeCullingThreshold.setter
|
||||
def relativeCullingThreshold(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
class CVODESolverConfig:
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
@property
|
||||
def absTol(self) -> float:
|
||||
...
|
||||
@absTol.setter
|
||||
def absTol(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def relTol(self) -> float:
|
||||
...
|
||||
@relTol.setter
|
||||
def relTol(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
class EngineConfig:
|
||||
views: EngineViewConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
class EngineViewConfig:
|
||||
adaptiveEngineView: AdaptiveEngineViewConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
class GridFireConfig:
|
||||
engine: EngineConfig
|
||||
solver: SolverConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
class SolverConfig:
|
||||
cvode: CVODESolverConfig
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
972
stubs/gridfiregridfire/_gridfire/engine/__init__.pyi
Normal file
972
stubs/gridfiregridfire/_gridfire/engine/__init__.pyi
Normal file
@@ -0,0 +1,972 @@
|
||||
"""
|
||||
Engine and Engine View bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.atomic
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.io
|
||||
import gridfire._gridfire.partition
|
||||
import gridfire._gridfire.reaction
|
||||
import gridfire._gridfire.screening
|
||||
import gridfire._gridfire.type
|
||||
import numpy
|
||||
import numpy.typing
|
||||
import typing
|
||||
from . import diagnostics
|
||||
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, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
||||
"""
|
||||
Calculate deps/dT and deps/drho
|
||||
"""
|
||||
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, 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, 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, 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, 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, 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 getBaseEngine(self) -> DynamicEngine:
|
||||
"""
|
||||
Get the base engine associated with this adaptive engine view.
|
||||
"""
|
||||
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of logical reactions in the network.
|
||||
"""
|
||||
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of species in the network.
|
||||
"""
|
||||
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
||||
"""
|
||||
Get the current screening model of the engine.
|
||||
"""
|
||||
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, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
||||
"""
|
||||
Get the index of a species in the network.
|
||||
"""
|
||||
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, 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 primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
||||
"""
|
||||
Prime the engine with a NetIn object to prepare for calculations.
|
||||
"""
|
||||
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 BuildDepthType:
|
||||
pass
|
||||
class DefinedEngineView(DynamicEngine):
|
||||
def __init__(self, peNames: collections.abc.Sequence[str], baseEngine: GraphEngine) -> None:
|
||||
"""
|
||||
Construct a defined engine view with a list of tracked reactions and a base engine.
|
||||
"""
|
||||
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
||||
"""
|
||||
Calculate deps/dT and deps/drho
|
||||
"""
|
||||
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, 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, 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, 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, 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, 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 getBaseEngine(self) -> DynamicEngine:
|
||||
"""
|
||||
Get the base engine associated with this defined engine view.
|
||||
"""
|
||||
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of logical reactions in the network.
|
||||
"""
|
||||
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of species in the network.
|
||||
"""
|
||||
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
||||
"""
|
||||
Get the current screening model of the engine.
|
||||
"""
|
||||
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, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
||||
"""
|
||||
Get the index of a species in the network.
|
||||
"""
|
||||
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, 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 primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
||||
"""
|
||||
Prime the engine with a NetIn object to prepare for calculations.
|
||||
"""
|
||||
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 DynamicEngine:
|
||||
pass
|
||||
class Engine:
|
||||
pass
|
||||
class EngineTypes:
|
||||
"""
|
||||
Members:
|
||||
|
||||
GRAPH_ENGINE : The standard graph-based engine.
|
||||
|
||||
ADAPTIVE_ENGINE_VIEW : An engine that adapts based on certain criteria.
|
||||
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW : An engine that partitions the system at multiple scales.
|
||||
|
||||
PRIMING_ENGINE_VIEW : An engine that uses a priming strategy for simulations.
|
||||
|
||||
DEFINED_ENGINE_VIEW : An engine defined by user specifications.
|
||||
|
||||
FILE_DEFINED_ENGINE_VIEW : An engine defined through external files.
|
||||
"""
|
||||
ADAPTIVE_ENGINE_VIEW: typing.ClassVar[EngineTypes] # value = <EngineTypes.ADAPTIVE_ENGINE_VIEW: 1>
|
||||
DEFINED_ENGINE_VIEW: typing.ClassVar[EngineTypes] # value = <EngineTypes.DEFINED_ENGINE_VIEW: 4>
|
||||
FILE_DEFINED_ENGINE_VIEW: typing.ClassVar[EngineTypes] # value = <EngineTypes.FILE_DEFINED_ENGINE_VIEW: 5>
|
||||
GRAPH_ENGINE: typing.ClassVar[EngineTypes] # value = <EngineTypes.GRAPH_ENGINE: 0>
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW: typing.ClassVar[EngineTypes] # value = <EngineTypes.MULTISCALE_PARTITIONING_ENGINE_VIEW: 2>
|
||||
PRIMING_ENGINE_VIEW: typing.ClassVar[EngineTypes] # value = <EngineTypes.PRIMING_ENGINE_VIEW: 3>
|
||||
__members__: typing.ClassVar[dict[str, EngineTypes]] # value = {'GRAPH_ENGINE': <EngineTypes.GRAPH_ENGINE: 0>, 'ADAPTIVE_ENGINE_VIEW': <EngineTypes.ADAPTIVE_ENGINE_VIEW: 1>, 'MULTISCALE_PARTITIONING_ENGINE_VIEW': <EngineTypes.MULTISCALE_PARTITIONING_ENGINE_VIEW: 2>, 'PRIMING_ENGINE_VIEW': <EngineTypes.PRIMING_ENGINE_VIEW: 3>, 'DEFINED_ENGINE_VIEW': <EngineTypes.DEFINED_ENGINE_VIEW: 4>, 'FILE_DEFINED_ENGINE_VIEW': <EngineTypes.FILE_DEFINED_ENGINE_VIEW: 5>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
"""
|
||||
String representation of the EngineTypes.
|
||||
"""
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class FileDefinedEngineView(DefinedEngineView):
|
||||
def __init__(self, baseEngine: GraphEngine, fileName: str, parser: gridfire._gridfire.io.NetworkFileParser) -> None:
|
||||
"""
|
||||
Construct a defined engine view from a file and a base engine.
|
||||
"""
|
||||
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
||||
"""
|
||||
Calculate deps/dT and deps/drho
|
||||
"""
|
||||
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, 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, 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, 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, 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, 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 getBaseEngine(self) -> DynamicEngine:
|
||||
"""
|
||||
Get the base engine associated with this file defined engine view.
|
||||
"""
|
||||
def getNetworkFile(self) -> str:
|
||||
"""
|
||||
Get the network file associated with this defined engine view.
|
||||
"""
|
||||
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of logical reactions in the network.
|
||||
"""
|
||||
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of species in the network.
|
||||
"""
|
||||
def getParser(self) -> gridfire._gridfire.io.NetworkFileParser:
|
||||
"""
|
||||
Get the parser used for this defined engine view.
|
||||
"""
|
||||
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
||||
"""
|
||||
Get the current screening model of the engine.
|
||||
"""
|
||||
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, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
||||
"""
|
||||
Get the index of a species in the network.
|
||||
"""
|
||||
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, 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 primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
||||
"""
|
||||
Prime the engine with a NetIn object to prepare for calculations.
|
||||
"""
|
||||
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):
|
||||
@typing.overload
|
||||
def __init__(self, composition: fourdst._phys.composition.Composition, depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
||||
"""
|
||||
Initialize GraphEngine with a composition and build depth.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self, composition: fourdst._phys.composition.Composition, partitionFunction: gridfire._gridfire.partition.PartitionFunction, depth: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ...) -> None:
|
||||
"""
|
||||
Initialize GraphEngine with a composition, partition function and build depth.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self, reactions: gridfire._gridfire.reaction.ReactionSet) -> None:
|
||||
"""
|
||||
Initialize GraphEngine with a set of reactions.
|
||||
"""
|
||||
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
||||
"""
|
||||
Calculate deps/dT and deps/drho
|
||||
"""
|
||||
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, 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 calculateReverseRate(self, reaction: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat, composition: ...) -> float:
|
||||
"""
|
||||
Calculate the reverse rate for a given reaction at a specific temperature, density, and composition.
|
||||
"""
|
||||
def calculateReverseRateTwoBody(self, reaction: ..., T9: typing.SupportsFloat, forwardRate: typing.SupportsFloat, expFactor: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Calculate the reverse rate for a two-body reaction at a specific temperature.
|
||||
"""
|
||||
def calculateReverseRateTwoBodyDerivative(self, reaction: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat, composition: fourdst._phys.composition.Composition, reverseRate: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Calculate the derivative of the reverse rate for a two-body reaction at a specific temperature.
|
||||
"""
|
||||
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, ctx: scratchpads.StateBlob, filename: str) -> None:
|
||||
"""
|
||||
Export the network to a CSV file for analysis.
|
||||
"""
|
||||
def exportToDot(self, ctx: scratchpads.StateBlob, filename: str) -> None:
|
||||
"""
|
||||
Export the network to a DOT file for visualization.
|
||||
"""
|
||||
@typing.overload
|
||||
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, 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, 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 getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of logical reactions in the network.
|
||||
"""
|
||||
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of species in the network.
|
||||
"""
|
||||
def getPartitionFunction(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.partition.PartitionFunction:
|
||||
"""
|
||||
Get the partition function used by the engine.
|
||||
"""
|
||||
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
||||
"""
|
||||
Get the current screening model of the engine.
|
||||
"""
|
||||
@typing.overload
|
||||
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, 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, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
||||
"""
|
||||
Get the index of a species in the network.
|
||||
"""
|
||||
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, 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, 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 involvesSpecies(self, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if a given species is involved in the network.
|
||||
"""
|
||||
def isPrecomputationEnabled(self, arg0: scratchpads.StateBlob) -> bool:
|
||||
"""
|
||||
Check if precomputation is enabled for the engine.
|
||||
"""
|
||||
def isUsingReverseReactions(self, arg0: scratchpads.StateBlob) -> bool:
|
||||
"""
|
||||
Check if the engine is using reverse reactions.
|
||||
"""
|
||||
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
||||
"""
|
||||
Prime the engine with a NetIn object to prepare for calculations.
|
||||
"""
|
||||
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 MultiscalePartitioningEngineView(DynamicEngine):
|
||||
def __init__(self, baseEngine: GraphEngine) -> None:
|
||||
"""
|
||||
Construct a multiscale partitioning engine view with a base engine.
|
||||
"""
|
||||
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
||||
"""
|
||||
Calculate deps/dT and deps/drho
|
||||
"""
|
||||
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, 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, 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, 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, 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, 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, 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 getBaseEngine(self) -> DynamicEngine:
|
||||
"""
|
||||
Get the base engine associated with this multiscale partitioning engine view.
|
||||
"""
|
||||
def getDynamicSpecies(self: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of dynamic species in the network.
|
||||
"""
|
||||
def getFastSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of fast species in the network.
|
||||
"""
|
||||
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of logical reactions in the network.
|
||||
"""
|
||||
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of species in the network.
|
||||
"""
|
||||
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, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
||||
"""
|
||||
Get the current screening model of the engine.
|
||||
"""
|
||||
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, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
||||
"""
|
||||
Get the index of a species in the network.
|
||||
"""
|
||||
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, 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 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: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if a given species is involved in the network's dynamic set.
|
||||
"""
|
||||
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 partitionNetwork(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> fourdst._phys.composition.Composition:
|
||||
"""
|
||||
Partition the network based on species timescales and connectivity.
|
||||
"""
|
||||
def primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
||||
"""
|
||||
Prime the engine with a NetIn object to prepare for calculations.
|
||||
"""
|
||||
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 NetworkBuildDepth:
|
||||
"""
|
||||
Members:
|
||||
|
||||
Full : Full network build depth
|
||||
|
||||
Shallow : Shallow network build depth
|
||||
|
||||
SecondOrder : Second order network build depth
|
||||
|
||||
ThirdOrder : Third order network build depth
|
||||
|
||||
FourthOrder : Fourth order network build depth
|
||||
|
||||
FifthOrder : Fifth order network build depth
|
||||
"""
|
||||
FifthOrder: typing.ClassVar[NetworkBuildDepth] # value = <NetworkBuildDepth.FifthOrder: 5>
|
||||
FourthOrder: typing.ClassVar[NetworkBuildDepth] # value = <NetworkBuildDepth.FourthOrder: 4>
|
||||
Full: typing.ClassVar[NetworkBuildDepth] # value = <NetworkBuildDepth.Full: -1>
|
||||
SecondOrder: typing.ClassVar[NetworkBuildDepth] # value = <NetworkBuildDepth.SecondOrder: 2>
|
||||
Shallow: typing.ClassVar[NetworkBuildDepth] # value = <NetworkBuildDepth.Shallow: 1>
|
||||
ThirdOrder: typing.ClassVar[NetworkBuildDepth] # value = <NetworkBuildDepth.ThirdOrder: 3>
|
||||
__members__: typing.ClassVar[dict[str, NetworkBuildDepth]] # value = {'Full': <NetworkBuildDepth.Full: -1>, 'Shallow': <NetworkBuildDepth.Shallow: 1>, 'SecondOrder': <NetworkBuildDepth.SecondOrder: 2>, 'ThirdOrder': <NetworkBuildDepth.ThirdOrder: 3>, 'FourthOrder': <NetworkBuildDepth.FourthOrder: 4>, 'FifthOrder': <NetworkBuildDepth.FifthOrder: 5>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class NetworkConstructionFlags:
|
||||
"""
|
||||
Members:
|
||||
|
||||
NONE : No special construction flags.
|
||||
|
||||
REACLIB_STRONG : Include strong reactions from reaclib.
|
||||
|
||||
WRL_BETA_MINUS : Include beta-minus decay reactions from weak rate library.
|
||||
|
||||
WRL_BETA_PLUS : Include beta-plus decay reactions from weak rate library.
|
||||
|
||||
WRL_ELECTRON_CAPTURE : Include electron capture reactions from weak rate library.
|
||||
|
||||
WRL_POSITRON_CAPTURE : Include positron capture reactions from weak rate library.
|
||||
|
||||
REACLIB_WEAK : Include weak reactions from reaclib.
|
||||
|
||||
WRL_WEAK : Include all weak reactions from weak rate library.
|
||||
|
||||
REACLIB : Include all reactions from reaclib.
|
||||
|
||||
DEFAULT : Default construction flags (Reaclib strong and weak).
|
||||
"""
|
||||
DEFAULT: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.REACLIB: 33>
|
||||
NONE: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.NONE: 0>
|
||||
REACLIB: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.REACLIB: 33>
|
||||
REACLIB_STRONG: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.REACLIB_STRONG: 1>
|
||||
REACLIB_WEAK: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.REACLIB_WEAK: 32>
|
||||
WRL_BETA_MINUS: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.WRL_BETA_MINUS: 2>
|
||||
WRL_BETA_PLUS: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.WRL_BETA_PLUS: 4>
|
||||
WRL_ELECTRON_CAPTURE: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.WRL_ELECTRON_CAPTURE: 8>
|
||||
WRL_POSITRON_CAPTURE: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.WRL_POSITRON_CAPTURE: 16>
|
||||
WRL_WEAK: typing.ClassVar[NetworkConstructionFlags] # value = <NetworkConstructionFlags.WRL_WEAK: 30>
|
||||
__members__: typing.ClassVar[dict[str, NetworkConstructionFlags]] # value = {'NONE': <NetworkConstructionFlags.NONE: 0>, 'REACLIB_STRONG': <NetworkConstructionFlags.REACLIB_STRONG: 1>, 'WRL_BETA_MINUS': <NetworkConstructionFlags.WRL_BETA_MINUS: 2>, 'WRL_BETA_PLUS': <NetworkConstructionFlags.WRL_BETA_PLUS: 4>, 'WRL_ELECTRON_CAPTURE': <NetworkConstructionFlags.WRL_ELECTRON_CAPTURE: 8>, 'WRL_POSITRON_CAPTURE': <NetworkConstructionFlags.WRL_POSITRON_CAPTURE: 16>, 'REACLIB_WEAK': <NetworkConstructionFlags.REACLIB_WEAK: 32>, 'WRL_WEAK': <NetworkConstructionFlags.WRL_WEAK: 30>, 'REACLIB': <NetworkConstructionFlags.REACLIB: 33>, 'DEFAULT': <NetworkConstructionFlags.REACLIB: 33>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class NetworkJacobian:
|
||||
@typing.overload
|
||||
def __getitem__(self, key: tuple[fourdst._phys.atomic.Species, fourdst._phys.atomic.Species]) -> float:
|
||||
"""
|
||||
Get an entry from the Jacobian matrix using species identifiers.
|
||||
"""
|
||||
@typing.overload
|
||||
def __getitem__(self, key: tuple[typing.SupportsInt, typing.SupportsInt]) -> float:
|
||||
"""
|
||||
Get an entry from the Jacobian matrix using indices.
|
||||
"""
|
||||
@typing.overload
|
||||
def __setitem__(self, key: tuple[fourdst._phys.atomic.Species, fourdst._phys.atomic.Species], value: typing.SupportsFloat) -> None:
|
||||
"""
|
||||
Set an entry in the Jacobian matrix using species identifiers.
|
||||
"""
|
||||
@typing.overload
|
||||
def __setitem__(self, key: tuple[typing.SupportsInt, typing.SupportsInt], value: typing.SupportsFloat) -> None:
|
||||
"""
|
||||
Set an entry in the Jacobian matrix using indices.
|
||||
"""
|
||||
def data(self) -> ...:
|
||||
"""
|
||||
Get the underlying sparse matrix data.
|
||||
"""
|
||||
def infs(self) -> list[tuple[tuple[fourdst._phys.atomic.Species, fourdst._phys.atomic.Species], float]]:
|
||||
"""
|
||||
Get all infinite entries in the Jacobian matrix.
|
||||
"""
|
||||
def mapping(self) -> dict[fourdst._phys.atomic.Species, int]:
|
||||
"""
|
||||
Get the species-to-index mapping.
|
||||
"""
|
||||
def nans(self) -> list[tuple[tuple[fourdst._phys.atomic.Species, fourdst._phys.atomic.Species], float]]:
|
||||
"""
|
||||
Get all NaN entries in the Jacobian matrix.
|
||||
"""
|
||||
def nnz(self) -> int:
|
||||
"""
|
||||
Get the number of non-zero entries in the Jacobian matrix.
|
||||
"""
|
||||
def rank(self) -> int:
|
||||
"""
|
||||
Get the rank of the Jacobian matrix.
|
||||
"""
|
||||
def shape(self) -> tuple[int, int]:
|
||||
"""
|
||||
Get the shape of the Jacobian matrix as (rows, columns).
|
||||
"""
|
||||
def singular(self) -> bool:
|
||||
"""
|
||||
Check if the Jacobian matrix is singular.
|
||||
"""
|
||||
def to_csv(self, filename: str) -> None:
|
||||
"""
|
||||
Export the Jacobian matrix to a CSV file.
|
||||
"""
|
||||
def to_numpy(self) -> numpy.typing.NDArray[numpy.float64]:
|
||||
"""
|
||||
Convert the Jacobian matrix to a NumPy array.
|
||||
"""
|
||||
class NetworkPrimingEngineView(DefinedEngineView):
|
||||
@typing.overload
|
||||
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, 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, ctx: scratchpads.StateBlob, comp: ..., T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> ...:
|
||||
"""
|
||||
Calculate deps/dT and deps/drho
|
||||
"""
|
||||
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, 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, 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, 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, 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, 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 getBaseEngine(self) -> DynamicEngine:
|
||||
"""
|
||||
Get the base engine associated with this priming engine view.
|
||||
"""
|
||||
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of logical reactions in the network.
|
||||
"""
|
||||
def getNetworkSpecies(self, arg0: scratchpads.StateBlob) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the list of species in the network.
|
||||
"""
|
||||
def getScreeningModel(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.screening.ScreeningType:
|
||||
"""
|
||||
Get the current screening model of the engine.
|
||||
"""
|
||||
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, ctx: scratchpads.StateBlob, species: fourdst._phys.atomic.Species) -> int:
|
||||
"""
|
||||
Get the index of a species in the network.
|
||||
"""
|
||||
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, 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 primeEngine(self, ctx: scratchpads.StateBlob, netIn: gridfire._gridfire.type.NetIn) -> PrimingReport:
|
||||
"""
|
||||
Prime the engine with a NetIn object to prepare for calculations.
|
||||
"""
|
||||
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 PrimingReport:
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def primedComposition(self) -> fourdst._phys.composition.Composition:
|
||||
"""
|
||||
The composition after priming.
|
||||
"""
|
||||
@property
|
||||
def status(self) -> PrimingReportStatus:
|
||||
"""
|
||||
Status message from the priming process.
|
||||
"""
|
||||
@property
|
||||
def success(self) -> bool:
|
||||
"""
|
||||
Indicates if the priming was successful.
|
||||
"""
|
||||
class PrimingReportStatus:
|
||||
"""
|
||||
Members:
|
||||
|
||||
FULL_SUCCESS : Priming was full successful.
|
||||
|
||||
NO_SPECIES_TO_PRIME : Solver Failed to converge during priming.
|
||||
|
||||
MAX_ITERATIONS_REACHED : Engine has already been primed.
|
||||
"""
|
||||
FULL_SUCCESS: typing.ClassVar[PrimingReportStatus] # value = <PrimingReportStatus.FULL_SUCCESS: 0>
|
||||
MAX_ITERATIONS_REACHED: typing.ClassVar[PrimingReportStatus] # value = <PrimingReportStatus.MAX_ITERATIONS_REACHED: 1>
|
||||
NO_SPECIES_TO_PRIME: typing.ClassVar[PrimingReportStatus] # value = <PrimingReportStatus.NO_SPECIES_TO_PRIME: 2>
|
||||
__members__: typing.ClassVar[dict[str, PrimingReportStatus]] # value = {'FULL_SUCCESS': <PrimingReportStatus.FULL_SUCCESS: 0>, 'NO_SPECIES_TO_PRIME': <PrimingReportStatus.NO_SPECIES_TO_PRIME: 2>, 'MAX_ITERATIONS_REACHED': <PrimingReportStatus.MAX_ITERATIONS_REACHED: 1>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
"""
|
||||
String representation of the PrimingReport.
|
||||
"""
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class SparsityPattern:
|
||||
pass
|
||||
class SpeciesStatus:
|
||||
"""
|
||||
Members:
|
||||
|
||||
ACTIVE : Species is active in the network.
|
||||
|
||||
EQUILIBRIUM : Species is in equilibrium.
|
||||
|
||||
INACTIVE_FLOW : Species is inactive due to flow.
|
||||
|
||||
NOT_PRESENT : Species is not present in the network.
|
||||
"""
|
||||
ACTIVE: typing.ClassVar[SpeciesStatus] # value = <SpeciesStatus.ACTIVE: 0>
|
||||
EQUILIBRIUM: typing.ClassVar[SpeciesStatus] # value = <SpeciesStatus.EQUILIBRIUM: 1>
|
||||
INACTIVE_FLOW: typing.ClassVar[SpeciesStatus] # value = <SpeciesStatus.INACTIVE_FLOW: 2>
|
||||
NOT_PRESENT: typing.ClassVar[SpeciesStatus] # value = <SpeciesStatus.NOT_PRESENT: 3>
|
||||
__members__: typing.ClassVar[dict[str, SpeciesStatus]] # value = {'ACTIVE': <SpeciesStatus.ACTIVE: 0>, 'EQUILIBRIUM': <SpeciesStatus.EQUILIBRIUM: 1>, 'INACTIVE_FLOW': <SpeciesStatus.INACTIVE_FLOW: 2>, 'NOT_PRESENT': <SpeciesStatus.NOT_PRESENT: 3>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class StepDerivatives:
|
||||
@property
|
||||
def dYdt(self) -> dict[fourdst._phys.atomic.Species, float]:
|
||||
"""
|
||||
The right-hand side (dY/dt) of the ODE system.
|
||||
"""
|
||||
@property
|
||||
def energy(self) -> float:
|
||||
"""
|
||||
The energy generation rate.
|
||||
"""
|
||||
def build_nuclear_network(composition: ..., weakInterpolator: ..., maxLayers: gridfire._gridfire.engine.NetworkBuildDepth | typing.SupportsInt = ..., ReactionTypes: NetworkConstructionFlags = ...) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Build a nuclear network from a composition using all archived reaction data.
|
||||
"""
|
||||
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
|
||||
"""
|
||||
def regularize_jacobian(jacobian: NetworkJacobian, composition: fourdst._phys.composition.Composition) -> NetworkJacobian:
|
||||
"""
|
||||
regularize_jacobian
|
||||
"""
|
||||
ACTIVE: SpeciesStatus # value = <SpeciesStatus.ACTIVE: 0>
|
||||
ADAPTIVE_ENGINE_VIEW: EngineTypes # value = <EngineTypes.ADAPTIVE_ENGINE_VIEW: 1>
|
||||
DEFAULT: NetworkConstructionFlags # value = <NetworkConstructionFlags.REACLIB: 33>
|
||||
DEFINED_ENGINE_VIEW: EngineTypes # value = <EngineTypes.DEFINED_ENGINE_VIEW: 4>
|
||||
EQUILIBRIUM: SpeciesStatus # value = <SpeciesStatus.EQUILIBRIUM: 1>
|
||||
FILE_DEFINED_ENGINE_VIEW: EngineTypes # value = <EngineTypes.FILE_DEFINED_ENGINE_VIEW: 5>
|
||||
FULL_SUCCESS: PrimingReportStatus # value = <PrimingReportStatus.FULL_SUCCESS: 0>
|
||||
FifthOrder: NetworkBuildDepth # value = <NetworkBuildDepth.FifthOrder: 5>
|
||||
FourthOrder: NetworkBuildDepth # value = <NetworkBuildDepth.FourthOrder: 4>
|
||||
Full: NetworkBuildDepth # value = <NetworkBuildDepth.Full: -1>
|
||||
GRAPH_ENGINE: EngineTypes # value = <EngineTypes.GRAPH_ENGINE: 0>
|
||||
INACTIVE_FLOW: SpeciesStatus # value = <SpeciesStatus.INACTIVE_FLOW: 2>
|
||||
MAX_ITERATIONS_REACHED: PrimingReportStatus # value = <PrimingReportStatus.MAX_ITERATIONS_REACHED: 1>
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW: EngineTypes # value = <EngineTypes.MULTISCALE_PARTITIONING_ENGINE_VIEW: 2>
|
||||
NONE: NetworkConstructionFlags # value = <NetworkConstructionFlags.NONE: 0>
|
||||
NOT_PRESENT: SpeciesStatus # value = <SpeciesStatus.NOT_PRESENT: 3>
|
||||
NO_SPECIES_TO_PRIME: PrimingReportStatus # value = <PrimingReportStatus.NO_SPECIES_TO_PRIME: 2>
|
||||
PRIMING_ENGINE_VIEW: EngineTypes # value = <EngineTypes.PRIMING_ENGINE_VIEW: 3>
|
||||
REACLIB: NetworkConstructionFlags # value = <NetworkConstructionFlags.REACLIB: 33>
|
||||
REACLIB_STRONG: NetworkConstructionFlags # value = <NetworkConstructionFlags.REACLIB_STRONG: 1>
|
||||
REACLIB_WEAK: NetworkConstructionFlags # value = <NetworkConstructionFlags.REACLIB_WEAK: 32>
|
||||
SecondOrder: NetworkBuildDepth # value = <NetworkBuildDepth.SecondOrder: 2>
|
||||
Shallow: NetworkBuildDepth # value = <NetworkBuildDepth.Shallow: 1>
|
||||
ThirdOrder: NetworkBuildDepth # value = <NetworkBuildDepth.ThirdOrder: 3>
|
||||
WRL_BETA_MINUS: NetworkConstructionFlags # value = <NetworkConstructionFlags.WRL_BETA_MINUS: 2>
|
||||
WRL_BETA_PLUS: NetworkConstructionFlags # value = <NetworkConstructionFlags.WRL_BETA_PLUS: 4>
|
||||
WRL_ELECTRON_CAPTURE: NetworkConstructionFlags # value = <NetworkConstructionFlags.WRL_ELECTRON_CAPTURE: 8>
|
||||
WRL_POSITRON_CAPTURE: NetworkConstructionFlags # value = <NetworkConstructionFlags.WRL_POSITRON_CAPTURE: 16>
|
||||
WRL_WEAK: NetworkConstructionFlags # value = <NetworkConstructionFlags.WRL_WEAK: 30>
|
||||
16
stubs/gridfiregridfire/_gridfire/engine/diagnostics.pyi
Normal file
16
stubs/gridfiregridfire/_gridfire/engine/diagnostics.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
A submodule for engine diagnostics
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import typing
|
||||
__all__: list[str] = ['inspect_jacobian_stiffness', 'inspect_species_balance', 'report_limiting_species']
|
||||
def inspect_jacobian_stiffness(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, json: bool) -> ... | None:
|
||||
...
|
||||
def inspect_species_balance(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, species_name: str, comp: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat, json: bool) -> ... | None:
|
||||
...
|
||||
def report_limiting_species(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, Y_full: collections.abc.Sequence[typing.SupportsFloat], E_full: collections.abc.Sequence[typing.SupportsFloat], relTol: typing.SupportsFloat, absTol: typing.SupportsFloat, top_n: typing.SupportsInt, json: bool) -> ... | None:
|
||||
...
|
||||
267
stubs/gridfiregridfire/_gridfire/engine/scratchpads.pyi
Normal file
267
stubs/gridfiregridfire/_gridfire/engine/scratchpads.pyi
Normal file
@@ -0,0 +1,267 @@
|
||||
"""
|
||||
Engine ScratchPad bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import fourdst._phys.atomic
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.reaction
|
||||
import typing
|
||||
__all__: list[str] = ['ADAPTIVE_ENGINE_VIEW_SCRATCHPAD', 'ADFunRegistrationResult', 'ALREADY_REGISTERED', 'AdaptiveEngineViewScratchPad', 'DEFINED_ENGINE_VIEW_SCRATCHPAD', 'DefinedEngineViewScratchPad', 'GRAPH_ENGINE_SCRATCHPAD', 'GraphEngineScratchPad', 'MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD', 'MultiscalePartitioningEngineViewScratchPad', 'SCRATCHPAD_BAD_CAST', 'SCRATCHPAD_NOT_FOUND', 'SCRATCHPAD_NOT_INITIALIZED', 'SCRATCHPAD_OUT_OF_BOUNDS', 'SCRATCHPAD_TYPE_COLLISION', 'SCRATCHPAD_UNKNOWN_ERROR', 'SUCCESS', 'ScratchPadType', 'StateBlob', 'StateBlobError']
|
||||
class ADFunRegistrationResult:
|
||||
"""
|
||||
Members:
|
||||
|
||||
SUCCESS
|
||||
|
||||
ALREADY_REGISTERED
|
||||
"""
|
||||
ALREADY_REGISTERED: typing.ClassVar[ADFunRegistrationResult] # value = <ADFunRegistrationResult.ALREADY_REGISTERED: 1>
|
||||
SUCCESS: typing.ClassVar[ADFunRegistrationResult] # value = <ADFunRegistrationResult.SUCCESS: 0>
|
||||
__members__: typing.ClassVar[dict[str, ADFunRegistrationResult]] # value = {'SUCCESS': <ADFunRegistrationResult.SUCCESS: 0>, 'ALREADY_REGISTERED': <ADFunRegistrationResult.ALREADY_REGISTERED: 1>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class AdaptiveEngineViewScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def initialize(self, arg0: ...) -> None:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def active_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
...
|
||||
@property
|
||||
def active_species(self) -> list[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
class DefinedEngineViewScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def active_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
...
|
||||
@property
|
||||
def active_species(self) -> set[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def reaction_index_map(self) -> list[int]:
|
||||
...
|
||||
@property
|
||||
def species_index_map(self) -> list[int]:
|
||||
...
|
||||
class GraphEngineScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def initialize(self, engine: ...) -> None:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def local_abundance_cache(self) -> list[float]:
|
||||
...
|
||||
@property
|
||||
def most_recent_rhs_calculation(self) -> ... | None:
|
||||
...
|
||||
@property
|
||||
def stepDerivativesCache(self) -> dict[int, ...]:
|
||||
...
|
||||
class MultiscalePartitioningEngineViewScratchPad:
|
||||
ID: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone(self) -> ...:
|
||||
...
|
||||
def initialize(self) -> None:
|
||||
...
|
||||
def is_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def algebraic_species(self) -> list[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def composition_cache(self) -> dict[int, fourdst._phys.composition.Composition]:
|
||||
...
|
||||
@property
|
||||
def dynamic_species(self) -> list[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def has_initialized(self) -> bool:
|
||||
...
|
||||
@property
|
||||
def qse_groups(self) -> list[...]:
|
||||
...
|
||||
class ScratchPadType:
|
||||
"""
|
||||
Members:
|
||||
|
||||
GRAPH_ENGINE_SCRATCHPAD
|
||||
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD
|
||||
|
||||
ADAPTIVE_ENGINE_VIEW_SCRATCHPAD
|
||||
|
||||
DEFINED_ENGINE_VIEW_SCRATCHPAD
|
||||
"""
|
||||
ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>
|
||||
DEFINED_ENGINE_VIEW_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>
|
||||
GRAPH_ENGINE_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: typing.ClassVar[ScratchPadType] # value = <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>
|
||||
__members__: typing.ClassVar[dict[str, ScratchPadType]] # value = {'GRAPH_ENGINE_SCRATCHPAD': <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>, 'MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD': <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>, 'ADAPTIVE_ENGINE_VIEW_SCRATCHPAD': <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>, 'DEFINED_ENGINE_VIEW_SCRATCHPAD': <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class StateBlob:
|
||||
@staticmethod
|
||||
def error_to_string(arg0: StateBlobError) -> str:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def clone_structure(self) -> StateBlob:
|
||||
...
|
||||
def enroll(self, arg0: ScratchPadType) -> None:
|
||||
...
|
||||
def get(self, arg0: ScratchPadType) -> ...:
|
||||
...
|
||||
def get_registered_scratchpads(self) -> set[ScratchPadType]:
|
||||
...
|
||||
def get_status(self, arg0: ScratchPadType) -> ...:
|
||||
...
|
||||
def get_status_map(self) -> dict[ScratchPadType, ...]:
|
||||
...
|
||||
class StateBlobError:
|
||||
"""
|
||||
Members:
|
||||
|
||||
SCRATCHPAD_OUT_OF_BOUNDS
|
||||
|
||||
SCRATCHPAD_NOT_FOUND
|
||||
|
||||
SCRATCHPAD_BAD_CAST
|
||||
|
||||
SCRATCHPAD_NOT_INITIALIZED
|
||||
|
||||
SCRATCHPAD_TYPE_COLLISION
|
||||
|
||||
SCRATCHPAD_UNKNOWN_ERROR
|
||||
"""
|
||||
SCRATCHPAD_BAD_CAST: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_BAD_CAST: 1>
|
||||
SCRATCHPAD_NOT_FOUND: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_NOT_FOUND: 0>
|
||||
SCRATCHPAD_NOT_INITIALIZED: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_NOT_INITIALIZED: 2>
|
||||
SCRATCHPAD_OUT_OF_BOUNDS: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_OUT_OF_BOUNDS: 4>
|
||||
SCRATCHPAD_TYPE_COLLISION: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_TYPE_COLLISION: 3>
|
||||
SCRATCHPAD_UNKNOWN_ERROR: typing.ClassVar[StateBlobError] # value = <StateBlobError.SCRATCHPAD_UNKNOWN_ERROR: 5>
|
||||
__members__: typing.ClassVar[dict[str, StateBlobError]] # value = {'SCRATCHPAD_OUT_OF_BOUNDS': <StateBlobError.SCRATCHPAD_OUT_OF_BOUNDS: 4>, 'SCRATCHPAD_NOT_FOUND': <StateBlobError.SCRATCHPAD_NOT_FOUND: 0>, 'SCRATCHPAD_BAD_CAST': <StateBlobError.SCRATCHPAD_BAD_CAST: 1>, 'SCRATCHPAD_NOT_INITIALIZED': <StateBlobError.SCRATCHPAD_NOT_INITIALIZED: 2>, 'SCRATCHPAD_TYPE_COLLISION': <StateBlobError.SCRATCHPAD_TYPE_COLLISION: 3>, 'SCRATCHPAD_UNKNOWN_ERROR': <StateBlobError.SCRATCHPAD_UNKNOWN_ERROR: 5>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.ADAPTIVE_ENGINE_VIEW_SCRATCHPAD: 2>
|
||||
ALREADY_REGISTERED: ADFunRegistrationResult # value = <ADFunRegistrationResult.ALREADY_REGISTERED: 1>
|
||||
DEFINED_ENGINE_VIEW_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.DEFINED_ENGINE_VIEW_SCRATCHPAD: 3>
|
||||
GRAPH_ENGINE_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.GRAPH_ENGINE_SCRATCHPAD: 0>
|
||||
MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: ScratchPadType # value = <ScratchPadType.MULTISCALE_PARTITIONING_ENGINE_VIEW_SCRATCHPAD: 1>
|
||||
SCRATCHPAD_BAD_CAST: StateBlobError # value = <StateBlobError.SCRATCHPAD_BAD_CAST: 1>
|
||||
SCRATCHPAD_NOT_FOUND: StateBlobError # value = <StateBlobError.SCRATCHPAD_NOT_FOUND: 0>
|
||||
SCRATCHPAD_NOT_INITIALIZED: StateBlobError # value = <StateBlobError.SCRATCHPAD_NOT_INITIALIZED: 2>
|
||||
SCRATCHPAD_OUT_OF_BOUNDS: StateBlobError # value = <StateBlobError.SCRATCHPAD_OUT_OF_BOUNDS: 4>
|
||||
SCRATCHPAD_TYPE_COLLISION: StateBlobError # value = <StateBlobError.SCRATCHPAD_TYPE_COLLISION: 3>
|
||||
SCRATCHPAD_UNKNOWN_ERROR: StateBlobError # value = <StateBlobError.SCRATCHPAD_UNKNOWN_ERROR: 5>
|
||||
SUCCESS: ADFunRegistrationResult # value = <ADFunRegistrationResult.SUCCESS: 0>
|
||||
61
stubs/gridfiregridfire/_gridfire/exceptions.pyi
Normal file
61
stubs/gridfiregridfire/_gridfire/exceptions.pyi
Normal file
@@ -0,0 +1,61 @@
|
||||
"""
|
||||
GridFire exceptions bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
__all__: list[str] = ['BadCollectionError', 'BadRHSEngineError', 'CVODESolverFailureError', 'DebugException', 'EngineError', 'FailedToPartitionEngineError', 'GridFireError', 'HashingError', 'IllConditionedJacobianError', 'InvalidQSESolutionError', 'JacobianError', 'KINSolSolverFailureError', 'MissingBaseReactionError', 'MissingKeyReactionError', 'MissingSeedSpeciesError', 'NetworkResizedError', 'PolicyError', 'ReactionError', 'ReactionParsingError', 'SUNDIALSError', 'ScratchPadError', 'SingularJacobianError', 'SolverError', 'StaleJacobianError', 'UnableToSetNetworkReactionsError', 'UninitializedJacobianError', 'UnknownJacobianError', 'UtilityError']
|
||||
class BadCollectionError(EngineError):
|
||||
pass
|
||||
class BadRHSEngineError(EngineError):
|
||||
pass
|
||||
class CVODESolverFailureError(SUNDIALSError):
|
||||
pass
|
||||
class DebugException(GridFireError):
|
||||
pass
|
||||
class EngineError(GridFireError):
|
||||
pass
|
||||
class FailedToPartitionEngineError(EngineError):
|
||||
pass
|
||||
class GridFireError(Exception):
|
||||
pass
|
||||
class HashingError(UtilityError):
|
||||
pass
|
||||
class IllConditionedJacobianError(SolverError):
|
||||
pass
|
||||
class InvalidQSESolutionError(EngineError):
|
||||
pass
|
||||
class JacobianError(EngineError):
|
||||
pass
|
||||
class KINSolSolverFailureError(SUNDIALSError):
|
||||
pass
|
||||
class MissingBaseReactionError(PolicyError):
|
||||
pass
|
||||
class MissingKeyReactionError(PolicyError):
|
||||
pass
|
||||
class MissingSeedSpeciesError(PolicyError):
|
||||
pass
|
||||
class NetworkResizedError(EngineError):
|
||||
pass
|
||||
class PolicyError(GridFireError):
|
||||
pass
|
||||
class ReactionError(GridFireError):
|
||||
pass
|
||||
class ReactionParsingError(ReactionError):
|
||||
pass
|
||||
class SUNDIALSError(SolverError):
|
||||
pass
|
||||
class ScratchPadError(GridFireError):
|
||||
pass
|
||||
class SingularJacobianError(SolverError):
|
||||
pass
|
||||
class SolverError(GridFireError):
|
||||
pass
|
||||
class StaleJacobianError(JacobianError):
|
||||
pass
|
||||
class UnableToSetNetworkReactionsError(EngineError):
|
||||
pass
|
||||
class UninitializedJacobianError(JacobianError):
|
||||
pass
|
||||
class UnknownJacobianError(JacobianError):
|
||||
pass
|
||||
class UtilityError(GridFireError):
|
||||
pass
|
||||
14
stubs/gridfiregridfire/_gridfire/io.pyi
Normal file
14
stubs/gridfiregridfire/_gridfire/io.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
"""
|
||||
GridFire io bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
__all__: list[str] = ['NetworkFileParser', 'ParsedNetworkData', 'SimpleReactionListFileParser']
|
||||
class NetworkFileParser:
|
||||
pass
|
||||
class ParsedNetworkData:
|
||||
pass
|
||||
class SimpleReactionListFileParser(NetworkFileParser):
|
||||
def parse(self, filename: str) -> ParsedNetworkData:
|
||||
"""
|
||||
Parse a simple reaction list file and return a ParsedNetworkData object.
|
||||
"""
|
||||
142
stubs/gridfiregridfire/_gridfire/partition.pyi
Normal file
142
stubs/gridfiregridfire/_gridfire/partition.pyi
Normal file
@@ -0,0 +1,142 @@
|
||||
"""
|
||||
GridFire partition function bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import collections.abc
|
||||
import typing
|
||||
__all__: list[str] = ['BasePartitionType', 'CompositePartitionFunction', 'GroundState', 'GroundStatePartitionFunction', 'PartitionFunction', 'RauscherThielemann', 'RauscherThielemannPartitionDataRecord', 'RauscherThielemannPartitionFunction', 'basePartitionTypeToString', 'stringToBasePartitionType']
|
||||
class BasePartitionType:
|
||||
"""
|
||||
Members:
|
||||
|
||||
RauscherThielemann
|
||||
|
||||
GroundState
|
||||
"""
|
||||
GroundState: typing.ClassVar[BasePartitionType] # value = <BasePartitionType.GroundState: 1>
|
||||
RauscherThielemann: typing.ClassVar[BasePartitionType] # value = <BasePartitionType.RauscherThielemann: 0>
|
||||
__members__: typing.ClassVar[dict[str, BasePartitionType]] # value = {'RauscherThielemann': <BasePartitionType.RauscherThielemann: 0>, 'GroundState': <BasePartitionType.GroundState: 1>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class CompositePartitionFunction:
|
||||
@typing.overload
|
||||
def __init__(self, partitionFunctions: collections.abc.Sequence[BasePartitionType]) -> None:
|
||||
"""
|
||||
Create a composite partition function from a list of base partition types.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self, arg0: CompositePartitionFunction) -> None:
|
||||
"""
|
||||
Copy constructor for CompositePartitionFunction.
|
||||
"""
|
||||
def evaluate(self, z: typing.SupportsInt, a: typing.SupportsInt, T9: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Evaluate the composite partition function for given Z, A, and T9.
|
||||
"""
|
||||
def evaluateDerivative(self, z: typing.SupportsInt, a: typing.SupportsInt, T9: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Evaluate the derivative of the composite partition function for given Z, A, and T9.
|
||||
"""
|
||||
def get_type(self) -> str:
|
||||
"""
|
||||
Get the type of the partition function (should return 'Composite').
|
||||
"""
|
||||
def supports(self, z: typing.SupportsInt, a: typing.SupportsInt) -> bool:
|
||||
"""
|
||||
Check if the composite partition function supports given Z and A.
|
||||
"""
|
||||
class GroundStatePartitionFunction(PartitionFunction):
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def evaluate(self, z: typing.SupportsInt, a: typing.SupportsInt, T9: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Evaluate the ground state partition function for given Z, A, and T9.
|
||||
"""
|
||||
def evaluateDerivative(self, z: typing.SupportsInt, a: typing.SupportsInt, T9: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Evaluate the derivative of the ground state partition function for given Z, A, and T9.
|
||||
"""
|
||||
def get_type(self) -> str:
|
||||
"""
|
||||
Get the type of the partition function (should return 'GroundState').
|
||||
"""
|
||||
def supports(self, z: typing.SupportsInt, a: typing.SupportsInt) -> bool:
|
||||
"""
|
||||
Check if the ground state partition function supports given Z and A.
|
||||
"""
|
||||
class PartitionFunction:
|
||||
pass
|
||||
class RauscherThielemannPartitionDataRecord:
|
||||
@property
|
||||
def a(self) -> int:
|
||||
"""
|
||||
Mass number
|
||||
"""
|
||||
@property
|
||||
def ground_state_spin(self) -> float:
|
||||
"""
|
||||
Ground state spin
|
||||
"""
|
||||
@property
|
||||
def normalized_g_values(self) -> float:
|
||||
"""
|
||||
Normalized g-values for the first 24 energy levels
|
||||
"""
|
||||
@property
|
||||
def z(self) -> int:
|
||||
"""
|
||||
Atomic number
|
||||
"""
|
||||
class RauscherThielemannPartitionFunction(PartitionFunction):
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def evaluate(self, z: typing.SupportsInt, a: typing.SupportsInt, T9: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Evaluate the Rauscher-Thielemann partition function for given Z, A, and T9.
|
||||
"""
|
||||
def evaluateDerivative(self, z: typing.SupportsInt, a: typing.SupportsInt, T9: typing.SupportsFloat) -> float:
|
||||
"""
|
||||
Evaluate the derivative of the Rauscher-Thielemann partition function for given Z, A, and T9.
|
||||
"""
|
||||
def get_type(self) -> str:
|
||||
"""
|
||||
Get the type of the partition function (should return 'RauscherThielemann').
|
||||
"""
|
||||
def supports(self, z: typing.SupportsInt, a: typing.SupportsInt) -> bool:
|
||||
"""
|
||||
Check if the Rauscher-Thielemann partition function supports given Z and A.
|
||||
"""
|
||||
def basePartitionTypeToString(type: BasePartitionType) -> str:
|
||||
"""
|
||||
Convert BasePartitionType to string.
|
||||
"""
|
||||
def stringToBasePartitionType(typeStr: str) -> BasePartitionType:
|
||||
"""
|
||||
Convert string to BasePartitionType.
|
||||
"""
|
||||
GroundState: BasePartitionType # value = <BasePartitionType.GroundState: 1>
|
||||
RauscherThielemann: BasePartitionType # value = <BasePartitionType.RauscherThielemann: 0>
|
||||
769
stubs/gridfiregridfire/_gridfire/policy.pyi
Normal file
769
stubs/gridfiregridfire/_gridfire/policy.pyi
Normal file
@@ -0,0 +1,769 @@
|
||||
"""
|
||||
GridFire network policy bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.atomic
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import gridfire._gridfire.partition
|
||||
import gridfire._gridfire.reaction
|
||||
import typing
|
||||
__all__: list[str] = ['CNOChainPolicy', 'CNOIChainPolicy', 'CNOIIChainPolicy', 'CNOIIIChainPolicy', 'CNOIVChainPolicy', 'ConstructionResults', 'HotCNOChainPolicy', 'HotCNOIChainPolicy', 'HotCNOIIChainPolicy', 'HotCNOIIIChainPolicy', 'INITIALIZED_UNVERIFIED', 'INITIALIZED_VERIFIED', 'MISSING_KEY_REACTION', 'MISSING_KEY_SPECIES', 'MainSequencePolicy', 'MainSequenceReactionChainPolicy', 'MultiReactionChainPolicy', 'NetworkPolicy', 'NetworkPolicyStatus', 'ProtonProtonChainPolicy', 'ProtonProtonIChainPolicy', 'ProtonProtonIIChainPolicy', 'ProtonProtonIIIChainPolicy', 'ReactionChainPolicy', 'TemperatureDependentChainPolicy', 'TripleAlphaChainPolicy', 'UNINITIALIZED', 'network_policy_status_to_string']
|
||||
class CNOChainPolicy(MultiReactionChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class CNOIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class CNOIIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class CNOIIIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class CNOIVChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class ConstructionResults:
|
||||
@property
|
||||
def engine(self) -> gridfire._gridfire.engine.DynamicEngine:
|
||||
...
|
||||
@property
|
||||
def scratch_blob(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
class HotCNOChainPolicy(MultiReactionChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class HotCNOIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class HotCNOIIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class HotCNOIIIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class MainSequencePolicy(NetworkPolicy):
|
||||
@typing.overload
|
||||
def __init__(self, composition: fourdst._phys.composition.Composition) -> None:
|
||||
"""
|
||||
Construct MainSequencePolicy from an existing composition.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self, seed_species: collections.abc.Sequence[fourdst._phys.atomic.Species], mass_fractions: collections.abc.Sequence[typing.SupportsFloat]) -> None:
|
||||
"""
|
||||
Construct MainSequencePolicy from seed species and mass fractions.
|
||||
"""
|
||||
def construct(self) -> ConstructionResults:
|
||||
"""
|
||||
Construct the network according to the policy.
|
||||
"""
|
||||
def get_engine_stack(self) -> list[gridfire._gridfire.engine.DynamicEngine]:
|
||||
...
|
||||
def get_engine_types_stack(self) -> list[gridfire._gridfire.engine.EngineTypes]:
|
||||
"""
|
||||
Get the types of engines in the stack constructed by the network policy.
|
||||
"""
|
||||
def get_partition_function(self) -> gridfire._gridfire.partition.PartitionFunction:
|
||||
...
|
||||
def get_seed_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the set of seed reactions required by the network policy.
|
||||
"""
|
||||
def get_seed_species(self) -> set[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the set of seed species required by the network policy.
|
||||
"""
|
||||
def get_stack_scratch_blob(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
def get_status(self) -> NetworkPolicyStatus:
|
||||
"""
|
||||
Get the current status of the network policy.
|
||||
"""
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the network policy.
|
||||
"""
|
||||
class MainSequenceReactionChainPolicy(MultiReactionChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class MultiReactionChainPolicy(ReactionChainPolicy):
|
||||
pass
|
||||
class NetworkPolicy:
|
||||
pass
|
||||
class NetworkPolicyStatus:
|
||||
"""
|
||||
Members:
|
||||
|
||||
UNINITIALIZED
|
||||
|
||||
INITIALIZED_UNVERIFIED
|
||||
|
||||
MISSING_KEY_REACTION
|
||||
|
||||
MISSING_KEY_SPECIES
|
||||
|
||||
INITIALIZED_VERIFIED
|
||||
"""
|
||||
INITIALIZED_UNVERIFIED: typing.ClassVar[NetworkPolicyStatus] # value = <NetworkPolicyStatus.INITIALIZED_UNVERIFIED: 1>
|
||||
INITIALIZED_VERIFIED: typing.ClassVar[NetworkPolicyStatus] # value = <NetworkPolicyStatus.INITIALIZED_VERIFIED: 4>
|
||||
MISSING_KEY_REACTION: typing.ClassVar[NetworkPolicyStatus] # value = <NetworkPolicyStatus.MISSING_KEY_REACTION: 2>
|
||||
MISSING_KEY_SPECIES: typing.ClassVar[NetworkPolicyStatus] # value = <NetworkPolicyStatus.MISSING_KEY_SPECIES: 3>
|
||||
UNINITIALIZED: typing.ClassVar[NetworkPolicyStatus] # value = <NetworkPolicyStatus.UNINITIALIZED: 0>
|
||||
__members__: typing.ClassVar[dict[str, NetworkPolicyStatus]] # value = {'UNINITIALIZED': <NetworkPolicyStatus.UNINITIALIZED: 0>, 'INITIALIZED_UNVERIFIED': <NetworkPolicyStatus.INITIALIZED_UNVERIFIED: 1>, 'MISSING_KEY_REACTION': <NetworkPolicyStatus.MISSING_KEY_REACTION: 2>, 'MISSING_KEY_SPECIES': <NetworkPolicyStatus.MISSING_KEY_SPECIES: 3>, 'INITIALIZED_VERIFIED': <NetworkPolicyStatus.INITIALIZED_VERIFIED: 4>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class ProtonProtonChainPolicy(MultiReactionChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class ProtonProtonIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class ProtonProtonIIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class ProtonProtonIIIChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
class ReactionChainPolicy:
|
||||
pass
|
||||
class TemperatureDependentChainPolicy(ReactionChainPolicy):
|
||||
pass
|
||||
class TripleAlphaChainPolicy(TemperatureDependentChainPolicy):
|
||||
def __eq__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check equality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __ne__(self, other: ReactionChainPolicy) -> bool:
|
||||
"""
|
||||
Check inequality with another ReactionChainPolicy.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains a reaction with the given ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the reaction chain contains the given reaction.
|
||||
"""
|
||||
def get_reactions(self) -> gridfire._gridfire.reaction.ReactionSet:
|
||||
"""
|
||||
Get the ReactionSet representing this reaction chain.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt) -> int:
|
||||
"""
|
||||
Compute a hash value for the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
@typing.overload
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Get the name of the reaction chain policy.
|
||||
"""
|
||||
def network_policy_status_to_string(status: NetworkPolicyStatus) -> str:
|
||||
"""
|
||||
Convert a NetworkPolicyStatus enum value to its string representation.
|
||||
"""
|
||||
INITIALIZED_UNVERIFIED: NetworkPolicyStatus # value = <NetworkPolicyStatus.INITIALIZED_UNVERIFIED: 1>
|
||||
INITIALIZED_VERIFIED: NetworkPolicyStatus # value = <NetworkPolicyStatus.INITIALIZED_VERIFIED: 4>
|
||||
MISSING_KEY_REACTION: NetworkPolicyStatus # value = <NetworkPolicyStatus.MISSING_KEY_REACTION: 2>
|
||||
MISSING_KEY_SPECIES: NetworkPolicyStatus # value = <NetworkPolicyStatus.MISSING_KEY_SPECIES: 3>
|
||||
UNINITIALIZED: NetworkPolicyStatus # value = <NetworkPolicyStatus.UNINITIALIZED: 0>
|
||||
249
stubs/gridfiregridfire/_gridfire/reaction.pyi
Normal file
249
stubs/gridfiregridfire/_gridfire/reaction.pyi
Normal file
@@ -0,0 +1,249 @@
|
||||
"""
|
||||
GridFire reaction bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.atomic
|
||||
import fourdst._phys.composition
|
||||
import typing
|
||||
__all__: list[str] = ['LogicalReaclibReaction', 'RateCoefficientSet', 'ReaclibReaction', 'ReactionSet', 'get_all_reactions', 'packReactionSet']
|
||||
class LogicalReaclibReaction(ReaclibReaction):
|
||||
@typing.overload
|
||||
def __init__(self, reactions: collections.abc.Sequence[ReaclibReaction]) -> None:
|
||||
"""
|
||||
Construct a LogicalReaclibReaction from a vector of ReaclibReaction objects.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self, reactions: collections.abc.Sequence[ReaclibReaction], is_reverse: bool) -> None:
|
||||
"""
|
||||
Construct a LogicalReaclibReaction from a vector of ReaclibReaction objects.
|
||||
"""
|
||||
def __len__(self) -> int:
|
||||
"""
|
||||
Overload len() to return the number of source rates.
|
||||
"""
|
||||
def add_reaction(self, reaction: ReaclibReaction) -> None:
|
||||
"""
|
||||
Add another Reaction source to this logical reaction.
|
||||
"""
|
||||
def calculate_forward_rate_log_derivative(self, T9: typing.SupportsFloat, rho: typing.SupportsFloat, Ye: typing.SupportsFloat, mue: typing.SupportsFloat, Composition: fourdst._phys.composition.Composition) -> float:
|
||||
"""
|
||||
Calculate the forward rate log derivative at a given temperature T9 (in units of 10^9 K).
|
||||
"""
|
||||
def calculate_rate(self, T9: typing.SupportsFloat, rho: typing.SupportsFloat, Ye: typing.SupportsFloat, mue: typing.SupportsFloat, Y: collections.abc.Sequence[typing.SupportsFloat], index_to_species_map: collections.abc.Mapping[typing.SupportsInt, fourdst._phys.atomic.Species]) -> float:
|
||||
"""
|
||||
Calculate the reaction rate at a given temperature T9 (in units of 10^9 K). Note that for a reaclib reaction only T9 is actually used, all other parameters are there for interface compatibility.
|
||||
"""
|
||||
def size(self) -> int:
|
||||
"""
|
||||
Get the number of source rates contributing to this logical reaction.
|
||||
"""
|
||||
def sources(self) -> list[str]:
|
||||
"""
|
||||
Get the list of source labels for the aggregated rates.
|
||||
"""
|
||||
class RateCoefficientSet:
|
||||
def __init__(self, a0: typing.SupportsFloat, a1: typing.SupportsFloat, a2: typing.SupportsFloat, a3: typing.SupportsFloat, a4: typing.SupportsFloat, a5: typing.SupportsFloat, a6: typing.SupportsFloat) -> None:
|
||||
"""
|
||||
Construct a RateCoefficientSet with the given parameters.
|
||||
"""
|
||||
class ReaclibReaction:
|
||||
__hash__: typing.ClassVar[None] = None
|
||||
def __eq__(self, arg0: ReaclibReaction) -> bool:
|
||||
"""
|
||||
Equality operator for reactions based on their IDs.
|
||||
"""
|
||||
def __init__(self, id: str, peName: str, chapter: typing.SupportsInt, reactants: collections.abc.Sequence[fourdst._phys.atomic.Species], products: collections.abc.Sequence[fourdst._phys.atomic.Species], qValue: typing.SupportsFloat, label: str, sets: RateCoefficientSet, reverse: bool = False) -> None:
|
||||
"""
|
||||
Construct a Reaction with the given parameters.
|
||||
"""
|
||||
def __neq__(self, arg0: ReaclibReaction) -> bool:
|
||||
"""
|
||||
Inequality operator for reactions based on their IDs.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def all_species(self) -> set[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get all species involved in the reaction (both reactants and products) as a set.
|
||||
"""
|
||||
def calculate_rate(self, T9: typing.SupportsFloat, rho: typing.SupportsFloat, Y: collections.abc.Sequence[typing.SupportsFloat]) -> float:
|
||||
"""
|
||||
Calculate the reaction rate at a given temperature T9 (in units of 10^9 K).
|
||||
"""
|
||||
def chapter(self) -> int:
|
||||
"""
|
||||
Get the REACLIB chapter number defining the reaction structure.
|
||||
"""
|
||||
def contains(self, species: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if the reaction contains a specific species.
|
||||
"""
|
||||
def contains_product(self, arg0: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if the reaction contains a specific product species.
|
||||
"""
|
||||
def contains_reactant(self, arg0: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if the reaction contains a specific reactant species.
|
||||
"""
|
||||
def excess_energy(self) -> float:
|
||||
"""
|
||||
Calculate the excess energy from the mass difference of reactants and products.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt = 0) -> int:
|
||||
"""
|
||||
Compute a hash for the reaction based on its ID.
|
||||
"""
|
||||
def id(self) -> str:
|
||||
"""
|
||||
Get the unique identifier of the reaction.
|
||||
"""
|
||||
def is_reverse(self) -> bool:
|
||||
"""
|
||||
Check if this is a reverse reaction rate.
|
||||
"""
|
||||
def num_species(self) -> int:
|
||||
"""
|
||||
Count the number of species in the reaction.
|
||||
"""
|
||||
def peName(self) -> str:
|
||||
"""
|
||||
Get the reaction name in (projectile, ejectile) notation (e.g., 'p(p,g)d').
|
||||
"""
|
||||
def product_species(self) -> set[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the product species of the reaction as a set.
|
||||
"""
|
||||
def products(self) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get a list of product species in the reaction.
|
||||
"""
|
||||
def qValue(self) -> float:
|
||||
"""
|
||||
Get the Q-value of the reaction in MeV.
|
||||
"""
|
||||
def rateCoefficients(self) -> RateCoefficientSet:
|
||||
"""
|
||||
get the set of rate coefficients.
|
||||
"""
|
||||
def reactant_species(self) -> set[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get the reactant species of the reaction as a set.
|
||||
"""
|
||||
def reactants(self) -> list[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get a list of reactant species in the reaction.
|
||||
"""
|
||||
def sourceLabel(self) -> str:
|
||||
"""
|
||||
Get the source label for the rate data (e.g., 'wc12w', 'st08').
|
||||
"""
|
||||
@typing.overload
|
||||
def stoichiometry(self, species: fourdst._phys.atomic.Species) -> int:
|
||||
"""
|
||||
Get the stoichiometry of the reaction as a map from species to their coefficients.
|
||||
"""
|
||||
@typing.overload
|
||||
def stoichiometry(self) -> dict[fourdst._phys.atomic.Species, int]:
|
||||
"""
|
||||
Get the stoichiometry of the reaction as a map from species to their coefficients.
|
||||
"""
|
||||
class ReactionSet:
|
||||
__hash__: typing.ClassVar[None] = None
|
||||
@staticmethod
|
||||
def from_clones(reactions: collections.abc.Sequence[...]) -> ReactionSet:
|
||||
"""
|
||||
Create a ReactionSet that takes ownership of the reactions by cloning the input reactions.
|
||||
"""
|
||||
def __eq__(self, LogicalReactionSet: ReactionSet) -> bool:
|
||||
"""
|
||||
Equality operator for LogicalReactionSets based on their contents.
|
||||
"""
|
||||
def __getitem__(self, index: typing.SupportsInt) -> ...:
|
||||
"""
|
||||
Get a LogicalReaclibReaction by index.
|
||||
"""
|
||||
def __getitem___(self, id: str) -> ...:
|
||||
"""
|
||||
Get a LogicalReaclibReaction by its ID.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self, reactions: collections.abc.Sequence[...]) -> None:
|
||||
"""
|
||||
Construct a LogicalReactionSet from a vector of LogicalReaclibReaction objects.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
Default constructor for an empty LogicalReactionSet.
|
||||
"""
|
||||
@typing.overload
|
||||
def __init__(self, other: ReactionSet) -> None:
|
||||
"""
|
||||
Copy constructor for LogicalReactionSet.
|
||||
"""
|
||||
def __len__(self) -> int:
|
||||
"""
|
||||
Overload len() to return the number of LogicalReactions.
|
||||
"""
|
||||
def __ne__(self, LogicalReactionSet: ReactionSet) -> bool:
|
||||
"""
|
||||
Inequality operator for LogicalReactionSets based on their contents.
|
||||
"""
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def add_reaction(self, reaction: ...) -> None:
|
||||
"""
|
||||
Add a LogicalReaclibReaction to the set.
|
||||
"""
|
||||
def clear(self) -> None:
|
||||
"""
|
||||
Remove all LogicalReactions from the set.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, id: str) -> bool:
|
||||
"""
|
||||
Check if the set contains a specific LogicalReaclibReaction.
|
||||
"""
|
||||
@typing.overload
|
||||
def contains(self, reaction: ...) -> bool:
|
||||
"""
|
||||
Check if the set contains a specific Reaction.
|
||||
"""
|
||||
def contains_product(self, species: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if any reaction in the set has the species as a product.
|
||||
"""
|
||||
def contains_reactant(self, species: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if any reaction in the set has the species as a reactant.
|
||||
"""
|
||||
def contains_species(self, species: fourdst._phys.atomic.Species) -> bool:
|
||||
"""
|
||||
Check if any reaction in the set involves the given species.
|
||||
"""
|
||||
def getReactionSetSpecies(self) -> set[fourdst._phys.atomic.Species]:
|
||||
"""
|
||||
Get all species involved in the reactions of the set as a set of Species objects.
|
||||
"""
|
||||
def hash(self, seed: typing.SupportsInt = 0) -> int:
|
||||
"""
|
||||
Compute a hash for the LogicalReactionSet based on its contents.
|
||||
"""
|
||||
def remove_reaction(self, reaction: ...) -> None:
|
||||
"""
|
||||
Remove a LogicalReaclibReaction from the set.
|
||||
"""
|
||||
def size(self) -> int:
|
||||
"""
|
||||
Get the number of LogicalReactions in the set.
|
||||
"""
|
||||
def get_all_reactions() -> ReactionSet:
|
||||
"""
|
||||
Get all reactions from the REACLIB database.
|
||||
"""
|
||||
def packReactionSet(reactionSet: ReactionSet) -> ReactionSet:
|
||||
"""
|
||||
Convert a ReactionSet to a LogicalReactionSet by aggregating reactions with the same peName.
|
||||
"""
|
||||
68
stubs/gridfiregridfire/_gridfire/screening.pyi
Normal file
68
stubs/gridfiregridfire/_gridfire/screening.pyi
Normal file
@@ -0,0 +1,68 @@
|
||||
"""
|
||||
GridFire plasma screening bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.atomic
|
||||
import gridfire._gridfire.reaction
|
||||
import typing
|
||||
__all__: list[str] = ['BARE', 'BareScreeningModel', 'ScreeningModel', 'ScreeningType', 'WEAK', 'WeakScreeningModel', 'selectScreeningModel']
|
||||
class BareScreeningModel:
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def calculateScreeningFactors(self, reactions: gridfire._gridfire.reaction.ReactionSet, species: collections.abc.Sequence[fourdst._phys.atomic.Species], Y: collections.abc.Sequence[typing.SupportsFloat], T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> list[float]:
|
||||
"""
|
||||
Calculate the bare plasma screening factors. This always returns 1.0 (bare)
|
||||
"""
|
||||
class ScreeningModel:
|
||||
pass
|
||||
class ScreeningType:
|
||||
"""
|
||||
Members:
|
||||
|
||||
BARE
|
||||
|
||||
WEAK
|
||||
"""
|
||||
BARE: typing.ClassVar[ScreeningType] # value = <ScreeningType.BARE: 0>
|
||||
WEAK: typing.ClassVar[ScreeningType] # value = <ScreeningType.WEAK: 1>
|
||||
__members__: typing.ClassVar[dict[str, ScreeningType]] # value = {'BARE': <ScreeningType.BARE: 0>, 'WEAK': <ScreeningType.WEAK: 1>}
|
||||
def __eq__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __getstate__(self) -> int:
|
||||
...
|
||||
def __hash__(self) -> int:
|
||||
...
|
||||
def __index__(self) -> int:
|
||||
...
|
||||
def __init__(self, value: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __int__(self) -> int:
|
||||
...
|
||||
def __ne__(self, other: typing.Any) -> bool:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
def __setstate__(self, state: typing.SupportsInt) -> None:
|
||||
...
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def name(self) -> str:
|
||||
...
|
||||
@property
|
||||
def value(self) -> int:
|
||||
...
|
||||
class WeakScreeningModel:
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def calculateScreeningFactors(self, reactions: gridfire._gridfire.reaction.ReactionSet, species: collections.abc.Sequence[fourdst._phys.atomic.Species], Y: collections.abc.Sequence[typing.SupportsFloat], T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> list[float]:
|
||||
"""
|
||||
Calculate the weak plasma screening factors using the Salpeter (1954) model.
|
||||
"""
|
||||
def selectScreeningModel(type: ScreeningType) -> ScreeningModel:
|
||||
"""
|
||||
Select a screening model based on the specified type. Returns a pointer to the selected model.
|
||||
"""
|
||||
BARE: ScreeningType # value = <ScreeningType.BARE: 0>
|
||||
WEAK: ScreeningType # value = <ScreeningType.WEAK: 1>
|
||||
157
stubs/gridfiregridfire/_gridfire/solver.pyi
Normal file
157
stubs/gridfiregridfire/_gridfire/solver.pyi
Normal file
@@ -0,0 +1,157 @@
|
||||
"""
|
||||
GridFire numerical solver bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import collections.abc
|
||||
import fourdst._phys.atomic
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import gridfire._gridfire.type
|
||||
import types
|
||||
import typing
|
||||
__all__: list[str] = ['GridSolver', 'GridSolverContext', 'MultiZoneDynamicNetworkSolver', 'PointSolver', 'PointSolverContext', 'PointSolverTimestepContext', 'SingleZoneDynamicNetworkSolver', 'SolverContextBase']
|
||||
class GridSolver(MultiZoneDynamicNetworkSolver):
|
||||
def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine, solver: SingleZoneDynamicNetworkSolver) -> None:
|
||||
"""
|
||||
Initialize the GridSolver object.
|
||||
"""
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIns: collections.abc.Sequence[gridfire._gridfire.type.NetIn]) -> list[gridfire._gridfire.type.NetOut]:
|
||||
"""
|
||||
evaluate the dynamic engine using the dynamic engine class
|
||||
"""
|
||||
class GridSolverContext(SolverContextBase):
|
||||
detailed_logging: bool
|
||||
stdout_logging: bool
|
||||
zone_completion_logging: bool
|
||||
def __init__(self, ctx_template: gridfire._gridfire.engine.scratchpads.StateBlob) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def clear_callback(self) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def clear_callback(self, zone_idx: typing.SupportsInt) -> None:
|
||||
...
|
||||
def init(self) -> None:
|
||||
...
|
||||
def reset(self) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def set_callback(self, callback: collections.abc.Callable[[...], None]) -> None:
|
||||
...
|
||||
@typing.overload
|
||||
def set_callback(self, callback: collections.abc.Callable[[...], None], zone_idx: typing.SupportsInt) -> None:
|
||||
...
|
||||
class MultiZoneDynamicNetworkSolver:
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIns: collections.abc.Sequence[gridfire._gridfire.type.NetIn]) -> list[gridfire._gridfire.type.NetOut]:
|
||||
"""
|
||||
evaluate the dynamic engine using the dynamic engine class for multiple zones (using openmp if available)
|
||||
"""
|
||||
class PointSolver(SingleZoneDynamicNetworkSolver):
|
||||
def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine) -> None:
|
||||
"""
|
||||
Initialize the PointSolver object.
|
||||
"""
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIn: gridfire._gridfire.type.NetIn, display_trigger: bool = False, force_reinitialization: bool = False) -> gridfire._gridfire.type.NetOut:
|
||||
"""
|
||||
evaluate the dynamic engine using the dynamic engine class
|
||||
"""
|
||||
class PointSolverContext:
|
||||
callback: collections.abc.Callable[[PointSolverTimestepContext], None] | None
|
||||
detailed_logging: bool
|
||||
stdout_logging: bool
|
||||
def __init__(self, engine_ctx: gridfire._gridfire.engine.scratchpads.StateBlob) -> None:
|
||||
...
|
||||
def clear_context(self) -> None:
|
||||
...
|
||||
def has_context(self) -> bool:
|
||||
...
|
||||
def init(self) -> None:
|
||||
...
|
||||
def init_context(self) -> None:
|
||||
...
|
||||
def reset_all(self) -> None:
|
||||
...
|
||||
def reset_cvode(self) -> None:
|
||||
...
|
||||
def reset_user(self) -> None:
|
||||
...
|
||||
@property
|
||||
def J(self) -> _generic_SUNMatrix:
|
||||
...
|
||||
@property
|
||||
def LS(self) -> _generic_SUNLinearSolver:
|
||||
...
|
||||
@property
|
||||
def Y(self) -> _generic_N_Vector:
|
||||
...
|
||||
@property
|
||||
def YErr(self) -> _generic_N_Vector:
|
||||
...
|
||||
@property
|
||||
def abs_tol(self) -> float:
|
||||
...
|
||||
@abs_tol.setter
|
||||
def abs_tol(self, arg1: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def cvode_mem(self) -> types.CapsuleType:
|
||||
...
|
||||
@property
|
||||
def engine_ctx(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
@property
|
||||
def num_steps(self) -> int:
|
||||
...
|
||||
@property
|
||||
def rel_tol(self) -> float:
|
||||
...
|
||||
@rel_tol.setter
|
||||
def rel_tol(self, arg1: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def sun_ctx(self) -> SUNContext_:
|
||||
...
|
||||
class PointSolverTimestepContext:
|
||||
@property
|
||||
def T9(self) -> float:
|
||||
...
|
||||
@property
|
||||
def currentConvergenceFailures(self) -> int:
|
||||
...
|
||||
@property
|
||||
def currentNonlinearIterations(self) -> int:
|
||||
...
|
||||
@property
|
||||
def dt(self) -> float:
|
||||
...
|
||||
@property
|
||||
def engine(self) -> gridfire._gridfire.engine.DynamicEngine:
|
||||
...
|
||||
@property
|
||||
def last_step_time(self) -> float:
|
||||
...
|
||||
@property
|
||||
def networkSpecies(self) -> list[fourdst._phys.atomic.Species]:
|
||||
...
|
||||
@property
|
||||
def num_steps(self) -> int:
|
||||
...
|
||||
@property
|
||||
def rho(self) -> float:
|
||||
...
|
||||
@property
|
||||
def state(self) -> list[float]:
|
||||
...
|
||||
@property
|
||||
def state_ctx(self) -> gridfire._gridfire.engine.scratchpads.StateBlob:
|
||||
...
|
||||
@property
|
||||
def t(self) -> float:
|
||||
...
|
||||
class SingleZoneDynamicNetworkSolver:
|
||||
def evaluate(self, solver_ctx: SolverContextBase, netIn: gridfire._gridfire.type.NetIn) -> gridfire._gridfire.type.NetOut:
|
||||
"""
|
||||
evaluate the dynamic engine using the dynamic engine class for a single zone
|
||||
"""
|
||||
class SolverContextBase:
|
||||
pass
|
||||
67
stubs/gridfiregridfire/_gridfire/type.pyi
Normal file
67
stubs/gridfiregridfire/_gridfire/type.pyi
Normal file
@@ -0,0 +1,67 @@
|
||||
"""
|
||||
GridFire type bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import fourdst._phys.composition
|
||||
import typing
|
||||
__all__: list[str] = ['NetIn', 'NetOut']
|
||||
class NetIn:
|
||||
composition: fourdst._phys.composition.Composition
|
||||
def __init__(self) -> None:
|
||||
...
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def density(self) -> float:
|
||||
...
|
||||
@density.setter
|
||||
def density(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def dt0(self) -> float:
|
||||
...
|
||||
@dt0.setter
|
||||
def dt0(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def energy(self) -> float:
|
||||
...
|
||||
@energy.setter
|
||||
def energy(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def tMax(self) -> float:
|
||||
...
|
||||
@tMax.setter
|
||||
def tMax(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
@property
|
||||
def temperature(self) -> float:
|
||||
...
|
||||
@temperature.setter
|
||||
def temperature(self, arg0: typing.SupportsFloat) -> None:
|
||||
...
|
||||
class NetOut:
|
||||
def __repr__(self) -> str:
|
||||
...
|
||||
@property
|
||||
def composition(self) -> fourdst._phys.composition.Composition:
|
||||
...
|
||||
@property
|
||||
def dEps_dRho(self) -> float:
|
||||
...
|
||||
@property
|
||||
def dEps_dT(self) -> float:
|
||||
...
|
||||
@property
|
||||
def energy(self) -> float:
|
||||
...
|
||||
@property
|
||||
def num_steps(self) -> int:
|
||||
...
|
||||
@property
|
||||
def specific_neutrino_energy_loss(self) -> float:
|
||||
...
|
||||
@property
|
||||
def specific_neutrino_flux(self) -> float:
|
||||
...
|
||||
18
stubs/gridfiregridfire/_gridfire/utils/__init__.pyi
Normal file
18
stubs/gridfiregridfire/_gridfire/utils/__init__.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
"""
|
||||
GridFire utility method bindings
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import fourdst._phys.composition
|
||||
import gridfire._gridfire.engine
|
||||
import gridfire._gridfire.engine.scratchpads
|
||||
import typing
|
||||
from . import hashing
|
||||
__all__: list[str] = ['formatNuclearTimescaleLogString', 'hash_atomic', 'hash_reaction', 'hashing']
|
||||
def formatNuclearTimescaleLogString(ctx: gridfire._gridfire.engine.scratchpads.StateBlob, engine: gridfire._gridfire.engine.DynamicEngine, Y: fourdst._phys.composition.Composition, T9: typing.SupportsFloat, rho: typing.SupportsFloat) -> str:
|
||||
"""
|
||||
Format a string for logging nuclear timescales based on temperature, density, and energy generation rate.
|
||||
"""
|
||||
def hash_atomic(a: typing.SupportsInt, z: typing.SupportsInt) -> int:
|
||||
...
|
||||
def hash_reaction(reaction: ...) -> int:
|
||||
...
|
||||
@@ -0,0 +1,6 @@
|
||||
"""
|
||||
module for gridfire hashing functions
|
||||
"""
|
||||
from __future__ import annotations
|
||||
from . import reaction
|
||||
__all__: list[str] = ['reaction']
|
||||
12
stubs/gridfiregridfire/_gridfire/utils/hashing/reaction.pyi
Normal file
12
stubs/gridfiregridfire/_gridfire/utils/hashing/reaction.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
utility module for hashing gridfire reaction functions
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import typing
|
||||
__all__: list[str] = ['mix_species', 'multiset_combine', 'splitmix64']
|
||||
def mix_species(a: typing.SupportsInt, z: typing.SupportsInt) -> int:
|
||||
...
|
||||
def multiset_combine(acc: typing.SupportsInt, x: typing.SupportsInt) -> int:
|
||||
...
|
||||
def splitmix64(x: typing.SupportsInt) -> int:
|
||||
...
|
||||
Reference in New Issue
Block a user