feat(triggers): added ConvergenceFailureTrigger

added new trigger which throws on convergence failures. This also required adding a new "step" method for other triggers which gets called every step instead of every trigger throw. The ConvergenceFailureTrigger has sucsessgully let teh engine evolve to 10Gyr without any meaningful growth of convergence failures.
This commit is contained in:
2025-11-04 13:22:57 -05:00
parent 7f19143ff6
commit 72a3f5bf4c
6 changed files with 285 additions and 21 deletions

View File

@@ -42,6 +42,12 @@ namespace gridfire::trigger {
* @param ctx Context snapshot used to update state.
*/
virtual void update(const TriggerContextStruct& ctx) = 0;
/**
* @brief similar to update but intended to be run on every step not just those where the trigger triggered
* @param ctx Context snapshot used to update state.
*/
virtual void step(const TriggerContextStruct& ctx) = 0;
/**
* @brief Reset internal state and diagnostics counters.
*/