pmgbergen / porepy

Python Simulation Tool for Fractured and Deformable Porous Media
GNU General Public License v3.0
251 stars 88 forks source link

Lagging information about the number of Newton iterations #1200

Closed Yuriyzabegaev closed 4 months ago

Yuriyzabegaev commented 4 months ago

The information about how many Newton iterations were made is lagging one iteration behind. Consider this line, we do the following:

  1. newton_step
  2. after_nonlinear_convergence, which inside updates the next time step value based on the number of iterations
  3. iteration_counter += 1

If Newton converges after 1 linear system solved, the time manager will get the information that Newton did 0 iterations. It is easy to fix this by swapping the steps 2 and 3.