feat(trigger): min convergence failure bound
Added a minimum value for the mean convergence failure which will never trigger. This prevents situations where one or two failures begine a trigger avalanche
This commit is contained in:
@@ -359,6 +359,9 @@ namespace gridfire::trigger::solver::CVODE {
|
||||
const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx
|
||||
) const {
|
||||
const float mean = current_mean();
|
||||
if (mean < 10) {
|
||||
return false; // Avoid triggering on small means
|
||||
}
|
||||
if (static_cast<float>(ctx.currentConvergenceFailures) - mean > m_relativeFailureRate * mean) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user