On 7/14/26 09:46, Victor Eijkhout wrote:
>
> olverControl::State
> IterationPrintControl::check(const unsigned int step, const double check_value)
> {
> // check whether the given number of iterations was reached, and return
> // success in that case. Otherwise, go on to the check of the base class.
> std::println( "At iteration={}/{}, error={}",step,this->maxsteps,check_value );
> if (step >= this->maxsteps)
> {
> std::println( "stop iteration at {}",step );
> if (m_log_result)
> deallog << "Convergence step " << step << " value " << check_value
> << std::endl;
> lstep = step;
> lvalue = check_value;
>
> lcheck = success;
> return success;
> }
> else {
> std::println( "base check in step {}",step );
> return SolverControl::check(step, check_value);
> }
> }
>
>
> Now strangely enough the very first println is not printed until maxits is
> reached. It's like this check is not executed before the base case, but after.
Victor,
you are asking us to speculate what happens in your program without either
giving us a complete program or at least showing us the output. None of us
here can know what is going on. We can all guess what the output *should* be,
but that's not helpful to either you or us. It's probably fair to point out
that that is a fairly common case with your questions.
You will either have to use a debugger, or better describe what it is you see
if you want us to help.
Best
W.