Open mariusnevland opened 2 weeks ago
On second thought, I suppose the iteration_counter variable is now redundant, since this is now handled by SolverStatistics (which updates the iteration counter before the convergence check). Hence, we should probably remove iteration_counter and replace its usage everywhere by the num_iteration attribute of SolverStatistics.
At the moment, when performing Newton iterations, the iteration counter is updated after the convergence check. This leads to the final iteration not being counted, as you exit the Newton loop before the counter is updated.
Is there a specific reason for the iteration counter being after the convergence check? If not, I would suggest to have the counter before the check.