GridFire 0.6.0 General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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:

## Public Member Functions
| OffDiagonalTrigger (double threshold)
| Construct with a non-negative magnitude threshold.
bool | check (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) const override
| Check if any off-diagonal Jacobian entry exceeds the threshold.
void | update (const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx) override
| Record an update; does not mutate any Jacobian-related state.
void | reset () override
| Reset counters to zero.
std::string | name () const override
| Stable human-readable name.
TriggerResult | why (const gridfire::solver::CVODESolverStrategy::TimestepContext &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::CVODESolverStrategy::TimestepContext >
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::CVODESolverStrategy::TimestepContext & | ctx | ) | const
| override virtual

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::CVODESolverStrategy::TimestepContext >.

## ◆ describe()

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

Textual description including configured threshold.

Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.

## ◆ name()

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

Stable human-readable name.

Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.

## ◆ numMisses()

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

Number of false evaluations since last reset.

Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.

## ◆ numTriggers()

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

Number of true evaluations since last reset.

Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.

## ◆ reset()

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

Reset counters to zero.

Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.

## ◆ update()

void gridfire::trigger::solver::CVODE::OffDiagonalTrigger::update | ( | const gridfire::solver::CVODESolverStrategy::TimestepContext & | ctx | ) |
| override virtual

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::CVODESolverStrategy::TimestepContext >.

## ◆ why()

TriggerResult gridfire::trigger::solver::CVODE::OffDiagonalTrigger::why | ( | const gridfire::solver::CVODESolverStrategy::TimestepContext & | ctx | ) | const
| override virtual

Structured explanation of the evaluation outcome.

Parameters

  ctx | CVODE timestep context.

Implements gridfire::trigger::Trigger< gridfire::solver::CVODESolverStrategy::TimestepContext >.

## Member Data Documentation

## ◆ m_hits

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_hits = 0
| mutable private

## ◆ 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
| mutable private

## ◆ m_resets

size_t gridfire::trigger::solver::CVODE::OffDiagonalTrigger::m_resets = 0
| mutable private

## ◆ 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
| mutable private

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