If the current time exceeds the TD-ADGA check time (t check ) a TD-ADGA iteration is carried out in line 28. This iteration checks the convergence of the TD-ADGA grid and if the grid is not converged additional SP calculations are requested and the boolean reset_dynamics is set to true. When the TD-ADGA grid is again converged, the algorithm continues to the next iteration in the while loop. If instead the grid is still converged after the TD-ADGA iteration, the reset_dynamics boolean remains false and t check is updated to the next check time.