GridFire v0.7.1_rc2
General Purpose Nuclear Network
Loading...
Searching...
No Matches
gridfire::trigger::solver::CVODE Namespace Reference

Classes

class  ConvergenceFailureTrigger
 
class  OffDiagonalTrigger
 Triggers when any off-diagonal Jacobian entry magnitude exceeds a threshold. More...
 
class  SimulationTimeTrigger
 Triggers when the current simulation time advances by at least a fixed interval. More...
 
class  TimestepCollapseTrigger
 Triggers when the timestep deviates from its recent average beyond a threshold. More...
 

Functions

std::unique_ptr< Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext > > makeEnginePartitioningTrigger (const double simulationTimeInterval, const double offDiagonalThreshold, const double timestepCollapseRatio, const size_t maxConvergenceFailures)
 Compose a trigger suitable for deciding engine re-partitioning during CVODE solves.
 

Function Documentation

◆ makeEnginePartitioningTrigger()

std::unique_ptr< Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext > > gridfire::trigger::solver::CVODE::makeEnginePartitioningTrigger ( const double  simulationTimeInterval,
const double  offDiagonalThreshold,
const double  timestepCollapseRatio,
const size_t  maxConvergenceFailures 
)

Compose a trigger suitable for deciding engine re-partitioning during CVODE solves.

Policy (as of implementation):

  • OR of the following three conditions: 1) Every 1000th firing of SimulationTimeTrigger(simulationTimeInterval) 2) OffDiagonalTrigger(offDiagonalThreshold) 3) Every 10th firing of TimestepCollapseTrigger(timestepGrowthThreshold, timestepGrowthRelative, timestepGrowthWindowSize)

See engine_partitioning_trigger.cpp for construction details using OrTrigger and EveryNthTrigger from trigger_logical.h.

Parameters
simulationTimeIntervalInterval used by SimulationTimeTrigger (> 0).
offDiagonalThresholdOff-diagonal Jacobian magnitude threshold (>= 0).
timestepCollapseRatioThreshold for timestep deviation (>= 0, and <= 1 when relative).
maxConvergenceFailuresWindow size for timestep averaging (>= 1 recommended).
Returns
A unique_ptr to a composed Trigger<TimestepContext> implementing the policy above.
Note
The exact policy is subject to change; this function centralizes that decision.