Loading...
Searching...
No Matches
gridfire::trigger::solver::CVODE::OffDiagonalTrigger Class Referencefinal

Triggers when any off-diagonal Jacobian entry magnitude exceeds a threshold. More...

`#include <engine_partitioning_trigger.h>`

Inheritance diagram for gridfire::trigger::solver::CVODE::OffDiagonalTrigger:
[legend]
Collaboration diagram for gridfire::trigger::solver::CVODE::OffDiagonalTrigger:
[legend]

## Public Member Functions

| OffDiagonalTrigger (double threshold)
| Construct with a non-negative magnitude threshold.
bool | check (const gridfire::solver::PointSolverTimestepContext &ctx) const override
| Check if any off-diagonal Jacobian entry exceeds the threshold.
void | update (const gridfire::solver::PointSolverTimestepContext &ctx) override
| Record an update; does not mutate any Jacobian-related state.
void | step (const gridfire::solver::PointSolverTimestepContext &ctx) override
| similar to update but intended to be run on every step not just those where the trigger triggered
void | reset () override
| Reset counters to zero.
std::string | name () const override
| Stable human-readable name.
TriggerResult | why (const gridfire::solver::PointSolverTimestepContext &ctx) const override
| Structured explanation of the evaluation outcome.
std::string | describe () const override
| Textual description including configured threshold.
size_t | numTriggers () const override
| Number of true evaluations since last reset.
size_t | numMisses () const override
| Number of false evaluations since last reset.
Public Member Functions inherited from gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >
virtual | ~Trigger ()=default
| Virtual destructor for polymorphic use.

## Private Attributes

quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log")
| Logger used for trace/error diagnostics.
double | m_threshold
| Off-diagonal magnitude threshold (>= 0).
Diagnostics counters
size_t | m_hits = 0
size_t | m_misses = 0
size_t | m_updates = 0
size_t | m_resets = 0

## Detailed Description

Triggers when any off-diagonal Jacobian entry magnitude exceeds a threshold.

Semantics:

- Iterates over all species pairs (row != col) and queries the engine's Jacobian via ctx.engine.getJacobianMatrixEntry(row, col). If any |entry| > threshold, check(ctx) returns true (short-circuits on first exceedance).
- update(ctx) only records an update counter; it does not cache Jacobian values.

Note
  Complexity: O(S^2) per check for S species (due to dense scan).

Constraints/Errors:
  - Constructing with threshold < 0 throws std::invalid_argument.

See also
  - engine_partitioning_trigger.cpp for concrete logic and trace logging.

## Constructor & Destructor Documentation

## OffDiagonalTrigger()

gridfire::trigger::solver::CVODE::OffDiagonalTrigger::OffDiagonalTrigger | ( | double | threshold | ) |

explicit

Construct with a non-negative magnitude threshold.

Parameters

  threshold | Off-diagonal Jacobian magnitude threshold (>= 0).

Exceptions

  std::invalid_argument | if threshold < 0.

## Member Function Documentation

## check()

bool gridfire::trigger::solver::CVODE::OffDiagonalTrigger::check | ( | const gridfire::solver::PointSolverTimestepContext & | ctx | ) | const

overridevirtual

Check if any off-diagonal Jacobian entry exceeds the threshold.

Parameters

  ctx | CVODE timestep context providing access to engine species and Jacobian.

Returns
  true if max_{i!=j} |J(i,j)| > threshold; false otherwise.

Postcondition
  increments hit/miss counters and may emit trace logs.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## describe()

std::string gridfire::trigger::solver::CVODE::OffDiagonalTrigger::describe | ( |  | ) | const

overridevirtual

Textual description including configured threshold.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## name()

std::string gridfire::trigger::solver::CVODE::OffDiagonalTrigger::name | ( |  | ) | const

overridevirtual

Stable human-readable name.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## numMisses()

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::numMisses | ( |  | ) | const

overridevirtual

Number of false evaluations since last reset.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## numTriggers()

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::numTriggers | ( |  | ) | const

overridevirtual

Number of true evaluations since last reset.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## reset()

void gridfire::trigger::solver::CVODE::OffDiagonalTrigger::reset | ( |  | ) |

overridevirtual

Reset counters to zero.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## step()

void gridfire::trigger::solver::CVODE::OffDiagonalTrigger::step | ( | const gridfire::solver::PointSolverTimestepContext & | ctx | ) |

overridevirtual

similar to update but intended to be run on every step not just those where the trigger triggered

Parameters

  ctx | Context snapshot used to update state.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## update()

void gridfire::trigger::solver::CVODE::OffDiagonalTrigger::update | ( | const gridfire::solver::PointSolverTimestepContext & | ctx | ) |

overridevirtual

Record an update; does not mutate any Jacobian-related state.

Parameters

  ctx | CVODE timestep context (unused except for symmetry with interface).

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## why()

TriggerResult gridfire::trigger::solver::CVODE::OffDiagonalTrigger::why | ( | const gridfire::solver::PointSolverTimestepContext & | ctx | ) | const

overridevirtual

Structured explanation of the evaluation outcome.

Parameters

  ctx | CVODE timestep context.

Implements gridfire::trigger::Trigger< gridfire::solver::PointSolverTimestepContext >.

## Member Data Documentation

## m_hits

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_hits = 0

mutableprivate

## m_logger

quill::Logger* gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_logger = fourdst::logging::LogManager::getInstance().getLogger("log")

private

Logger used for trace/error diagnostics.

## m_misses

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_misses = 0

mutableprivate

## m_resets

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_resets = 0

mutableprivate

## m_threshold

double gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_threshold

private

Off-diagonal magnitude threshold (>= 0).

## m_updates

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_updates = 0

mutableprivate

The documentation for this class was generated from the following files:

- src/include/gridfire/solver/strategies/triggers/engine_partitioning_trigger.h
- src/lib/solver/strategies/triggers/engine_partitioning_trigger.cpp