From d54b803cc93fac26dbfecccb1c25a631579bbb48 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Tue, 31 Dec 2024 16:11:10 -0500 Subject: [PATCH] Fix typo for step count stopping condition If the requested number of steps is above the stopping condition, it will always fail after one step --- include/teqp/algorithms/iteration.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/teqp/algorithms/iteration.hpp b/include/teqp/algorithms/iteration.hpp index 2f4ffcd..6532fbe 100644 --- a/include/teqp/algorithms/iteration.hpp +++ b/include/teqp/algorithms/iteration.hpp @@ -344,7 +344,7 @@ class NRIterator{ // Check whether a stopping condition (either good[complete] or bad[error]) bool stop = false; - const StoppingData data{N, Trho, dTrho, r, nonconstant_indices}; + const StoppingData data{K, Trho, dTrho, r, nonconstant_indices}; for (auto& condition : stopping_conditions){ using s = StoppingConditionReason; auto this_reason = condition->stop(data); @@ -409,7 +409,7 @@ class NRIterator{ // Check whether a stopping condition (either good[complete] or bad[error]) bool stop = false; - const StoppingData data{N, Trho, dTrho, r, nonconstant_indices}; + const StoppingData data{K, Trho, dTrho, r, nonconstant_indices}; for (auto& condition : stopping_conditions){ using s = StoppingConditionReason; auto this_reason = condition->stop(data);