GridFire 0.6.0 General Purpose Nuclear Network

Loading...
Searching...
No Matches
Classes | Functions
gridfire::trigger::solver::CVODE Namespace Reference

## Classes
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 timestepGrowthThreshold, const bool timestepGrowthRelative, const size_t timestepGrowthWindowSize)
| 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 | timestepGrowthThreshold,
|  | const bool | timestepGrowthRelative,
|  | const size_t | timestepGrowthWindowSize )

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

  simulationTimeInterval | Interval used by SimulationTimeTrigger (> 0).
  offDiagonalThreshold | Off-diagonal Jacobian magnitude threshold (>= 0).
  timestepGrowthThreshold | Threshold for timestep deviation (>= 0, and <= 1 when relative).
  timestepGrowthRelative | Whether deviation is measured relatively.
  timestepGrowthWindowSize | Window 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.