docs(stubs): updated stubs

This commit is contained in:
2026-04-13 07:18:41 -04:00
parent c311e4afbd
commit d1872cb65a
4 changed files with 123 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@ GridFire configuration bindings
""" """
from __future__ import annotations from __future__ import annotations
import typing import typing
__all__: list[str] = ['AdaptiveEngineViewConfig', 'CVODESolverConfig', 'EngineConfig', 'EngineViewConfig', 'GridFireConfig', 'SolverConfig'] __all__: list[str] = ['AdaptiveEngineViewConfig', 'BoundaryFluxConfig', 'EngineConfig', 'EngineViewConfig', 'GridFireConfig', 'PointSolverConfig', 'SolverConfig', 'TriggerConfig']
class AdaptiveEngineViewConfig: class AdaptiveEngineViewConfig:
def __init__(self) -> None: def __init__(self) -> None:
... ...
@@ -13,20 +13,20 @@ class AdaptiveEngineViewConfig:
@relativeCullingThreshold.setter @relativeCullingThreshold.setter
def relativeCullingThreshold(self, arg0: typing.SupportsFloat) -> None: def relativeCullingThreshold(self, arg0: typing.SupportsFloat) -> None:
... ...
class CVODESolverConfig: class BoundaryFluxConfig:
def __init__(self) -> None: def __init__(self) -> None:
... ...
@property @property
def absTol(self) -> float: def absoluteThreshold(self) -> float:
... ...
@absTol.setter @absoluteThreshold.setter
def absTol(self, arg0: typing.SupportsFloat) -> None: def absoluteThreshold(self, arg0: typing.SupportsFloat) -> None:
... ...
@property @property
def relTol(self) -> float: def relativeThreshold(self) -> float:
... ...
@relTol.setter @relativeThreshold.setter
def relTol(self, arg0: typing.SupportsFloat) -> None: def relativeThreshold(self, arg0: typing.SupportsFloat) -> None:
... ...
class EngineConfig: class EngineConfig:
views: EngineViewConfig views: EngineViewConfig
@@ -41,7 +41,45 @@ class GridFireConfig:
solver: SolverConfig solver: SolverConfig
def __init__(self) -> None: def __init__(self) -> None:
... ...
class SolverConfig: class PointSolverConfig:
cvode: CVODESolverConfig trigger: TriggerConfig
def __init__(self) -> None: 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 SolverConfig:
pointSolver: PointSolverConfig
def __init__(self) -> None:
...
class TriggerConfig:
boundaryFlux: BoundaryFluxConfig
def __init__(self) -> None:
...
@property
def maxConvergenceFailures(self) -> float:
...
@maxConvergenceFailures.setter
def maxConvergenceFailures(self, arg0: typing.SupportsFloat) -> None:
...
@property
def offDiagonalThreshold(self) -> float:
...
@offDiagonalThreshold.setter
def offDiagonalThreshold(self, arg0: typing.SupportsFloat) -> None:
...
@property
def timestepCollapseRatio(self) -> float:
...
@timestepCollapseRatio.setter
def timestepCollapseRatio(self, arg0: typing.SupportsFloat) -> None:
...

View File

@@ -37,6 +37,10 @@ class AdaptiveEngineView(DynamicEngine):
""" """
Recursively collect composition from current engine and any sub engines if they exist. Recursively collect composition from current engine and any sub engines if they exist.
""" """
def constructStateBlob(self, blob: scratchpads.StateBlob = None) -> scratchpads.StateBlob:
"""
Construct the state blob for this engine. Generally base engines (GraphEngine) can call this with no arguments whereas views should take an argument to an already constructed state blob which will be cloned and then the clone will be modified
"""
@typing.overload @typing.overload
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, 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:
""" """
@@ -56,6 +60,10 @@ class AdaptiveEngineView(DynamicEngine):
""" """
Get the base engine associated with this adaptive engine view. Get the base engine associated with this adaptive engine view.
""" """
def getMostRecentRHSCalculation(self, ctx: scratchpads.StateBlob) -> gridfire._gridfire.engine.StepDerivatives | None:
"""
Retrieve the most recent RHS calculation from the engine
"""
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet: def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
""" """
Get the set of logical reactions in the network. Get the set of logical reactions in the network.
@@ -115,6 +123,10 @@ class DefinedEngineView(DynamicEngine):
""" """
Recursively collect composition from current engine and any sub engines if they exist. Recursively collect composition from current engine and any sub engines if they exist.
""" """
def constructStateBlob(self, blob: scratchpads.StateBlob = None) -> scratchpads.StateBlob:
"""
Construct the state blob for this engine. Generally base engines (GraphEngine) can call this with no arguments whereas views should take an argument to an already constructed state blob which will be cloned and then the clone will be modified
"""
@typing.overload @typing.overload
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, 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:
""" """
@@ -134,6 +146,10 @@ class DefinedEngineView(DynamicEngine):
""" """
Get the base engine associated with this defined engine view. Get the base engine associated with this defined engine view.
""" """
def getMostRecentRHSCalculation(self, ctx: scratchpads.StateBlob) -> gridfire._gridfire.engine.StepDerivatives | None:
"""
Retrieve the most recent RHS calculation from the engine
"""
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet: def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
""" """
Get the set of logical reactions in the network. Get the set of logical reactions in the network.
@@ -250,6 +266,10 @@ class FileDefinedEngineView(DefinedEngineView):
""" """
Recursively collect composition from current engine and any sub engines if they exist. Recursively collect composition from current engine and any sub engines if they exist.
""" """
def constructStateBlob(self, blob: scratchpads.StateBlob = None) -> scratchpads.StateBlob:
"""
Construct the state blob for this engine. Generally base engines (GraphEngine) can call this with no arguments whereas views should take an argument to an already constructed state blob which will be cloned and then the clone will be modified
"""
@typing.overload @typing.overload
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, 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:
""" """
@@ -269,6 +289,10 @@ class FileDefinedEngineView(DefinedEngineView):
""" """
Get the base engine associated with this file defined engine view. Get the base engine associated with this file defined engine view.
""" """
def getMostRecentRHSCalculation(self, ctx: scratchpads.StateBlob) -> gridfire._gridfire.engine.StepDerivatives | None:
"""
Retrieve the most recent RHS calculation from the engine
"""
def getNetworkFile(self) -> str: def getNetworkFile(self) -> str:
""" """
Get the network file associated with this defined engine view. Get the network file associated with this defined engine view.
@@ -329,6 +353,16 @@ class GraphEngine(DynamicEngine):
""" """
Initialize GraphEngine with a set of reactions. Initialize GraphEngine with a set of reactions.
""" """
@typing.overload
def addReaction(self, reaction: ...) -> None:
"""
Add a reaction to the engine's network manually.
"""
@typing.overload
def addReaction(self, reaction_id: str) -> None:
"""
Add a reaction to the engine's network manually using a reaction identifier string.
"""
def calculateEpsDerivatives(self, ctx: scratchpads.StateBlob, 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 Calculate deps/dT and deps/drho
@@ -357,6 +391,10 @@ class GraphEngine(DynamicEngine):
""" """
Recursively collect composition from current engine and any sub engines if they exist. Recursively collect composition from current engine and any sub engines if they exist.
""" """
def constructStateBlob(self, blob: scratchpads.StateBlob = None) -> scratchpads.StateBlob:
"""
Construct the state blob for this engine. Generally base engines (GraphEngine) can call this with no arguments whereas views should take an argument to an already constructed state blob which will be cloned and then the clone will be modified
"""
def exportToCSV(self, ctx: scratchpads.StateBlob, filename: str) -> None: def exportToCSV(self, ctx: scratchpads.StateBlob, filename: str) -> None:
""" """
Export the network to a CSV file for analysis. Export the network to a CSV file for analysis.
@@ -380,6 +418,10 @@ class GraphEngine(DynamicEngine):
""" """
Generate the jacobian matrix for the given sparsity pattern Generate the jacobian matrix for the given sparsity pattern
""" """
def getMostRecentRHSCalculation(self, ctx: scratchpads.StateBlob) -> gridfire._gridfire.engine.StepDerivatives | None:
"""
Retrieve the most recent RHS calculation from the engine
"""
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet: def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
""" """
Get the set of logical reactions in the network. Get the set of logical reactions in the network.
@@ -461,6 +503,10 @@ class MultiscalePartitioningEngineView(DynamicEngine):
""" """
Recursively collect composition from current engine and any sub engines if they exist. Recursively collect composition from current engine and any sub engines if they exist.
""" """
def constructStateBlob(self, blob: scratchpads.StateBlob = None) -> scratchpads.StateBlob:
"""
Construct the state blob for this engine. Generally base engines (GraphEngine) can call this with no arguments whereas views should take an argument to an already constructed state blob which will be cloned and then the clone will be modified
"""
def exportToDot(self, ctx: scratchpads.StateBlob, 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. Export the network to a DOT file for visualization.
@@ -492,6 +538,10 @@ class MultiscalePartitioningEngineView(DynamicEngine):
""" """
Get the list of fast species in the network. Get the list of fast species in the network.
""" """
def getMostRecentRHSCalculation(self, ctx: scratchpads.StateBlob) -> gridfire._gridfire.engine.StepDerivatives | None:
"""
Retrieve the most recent RHS calculation from the engine
"""
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet: def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
""" """
Get the set of logical reactions in the network. Get the set of logical reactions in the network.
@@ -750,6 +800,10 @@ class NetworkPrimingEngineView(DefinedEngineView):
""" """
Recursively collect composition from current engine and any sub engines if they exist. Recursively collect composition from current engine and any sub engines if they exist.
""" """
def constructStateBlob(self, blob: scratchpads.StateBlob = None) -> scratchpads.StateBlob:
"""
Construct the state blob for this engine. Generally base engines (GraphEngine) can call this with no arguments whereas views should take an argument to an already constructed state blob which will be cloned and then the clone will be modified
"""
@typing.overload @typing.overload
def generateJacobianMatrix(self: DynamicEngine, ctx: scratchpads.StateBlob, 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:
""" """
@@ -769,6 +823,10 @@ class NetworkPrimingEngineView(DefinedEngineView):
""" """
Get the base engine associated with this priming engine view. Get the base engine associated with this priming engine view.
""" """
def getMostRecentRHSCalculation(self, ctx: scratchpads.StateBlob) -> gridfire._gridfire.engine.StepDerivatives | None:
"""
Retrieve the most recent RHS calculation from the engine
"""
def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet: def getNetworkReactions(self, arg0: scratchpads.StateBlob) -> gridfire._gridfire.reaction.ReactionSet:
""" """
Get the set of logical reactions in the network. Get the set of logical reactions in the network.

View File

@@ -4,6 +4,8 @@ GridFire numerical solver bindings
from __future__ import annotations from __future__ import annotations
import collections.abc import collections.abc
import fourdst._phys.atomic import fourdst._phys.atomic
import fourdst._phys.composition
import gridfire._gridfire.config
import gridfire._gridfire.engine import gridfire._gridfire.engine
import gridfire._gridfire.engine.scratchpads import gridfire._gridfire.engine.scratchpads
import gridfire._gridfire.type import gridfire._gridfire.type
@@ -47,15 +49,25 @@ class MultiZoneDynamicNetworkSolver:
evaluate the dynamic engine using the dynamic engine class for multiple zones (using openmp if available) evaluate the dynamic engine using the dynamic engine class for multiple zones (using openmp if available)
""" """
class PointSolver(SingleZoneDynamicNetworkSolver): class PointSolver(SingleZoneDynamicNetworkSolver):
@typing.overload
def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine) -> None: def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine) -> None:
""" """
Initialize the PointSolver object. Initialize the PointSolver object.
""" """
@typing.overload
def __init__(self, engine: gridfire._gridfire.engine.DynamicEngine, config: gridfire._gridfire.config.GridFireConfig) -> None:
"""
Initialize the PointSolver object with a configuration set.
"""
def evaluate(self, solver_ctx: SolverContextBase, netIn: gridfire._gridfire.type.NetIn, display_trigger: bool = False, force_reinitialization: bool = False) -> gridfire._gridfire.type.NetOut: 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 evaluate the dynamic engine using the dynamic engine class
""" """
class PointSolverContext: def getConfig(self) -> gridfire._gridfire.config.GridFireConfig:
"""
Get a copy of the config object
"""
class PointSolverContext(SolverContextBase):
callback: collections.abc.Callable[[PointSolverTimestepContext], None] | None callback: collections.abc.Callable[[PointSolverTimestepContext], None] | None
detailed_logging: bool detailed_logging: bool
stdout_logging: bool stdout_logging: bool
@@ -116,6 +128,9 @@ class PointSolverTimestepContext:
def T9(self) -> float: def T9(self) -> float:
... ...
@property @property
def composition(self) -> fourdst._phys.composition.Composition:
...
@property
def currentConvergenceFailures(self) -> int: def currentConvergenceFailures(self) -> int:
... ...
@property @property