Skip to content

Commit

Permalink
Fix typo for step count stopping condition
Browse files Browse the repository at this point in the history
If the requested number of steps is above the stopping condition, it will always fail after one step
  • Loading branch information
ianhbell committed Dec 31, 2024
1 parent f45d481 commit d54b803
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/teqp/algorithms/iteration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d54b803

Please sign in to comment.