Closed KnutAM closed 6 months ago
Side note For the time stepping, it could also make sense that the time steppers should keep track of the time and step number, and then the following simplifications could be made
is_finished
while !(is_converged(nlsolver) && islaststep(timestepper, t, step))
-> while !(is_finished(solver))
is_finished(solver) = is_converged(solver.nlsolver) && islaststep(solver.timestepper)
t, step = update_time(solver, t, step)
-> step!(solver)
update_to_next_step!(problem, t)
-> update_to_next_step!(problem, get_time(solver))
postprocess!(problem, step, solver)
-> postprocess!(problem, solver)
step = get_step(solver)
Currently, the non-convergence is just a bool returned from
solve_nonlinear!
, however, it might make sense to allow more custom behavior if, for example, the linear solve doesn't converge. One solution could be that the nonlinear solvers should keep track of their status, and the outer time stepping loop could change fromto