jax-am
jax-am copied to clipboard
Infinite while loop for non-linear case
In solver.py
, the following lines
tol = 1e-6
while res_val > tol:
dofs = linear_incremental_solver(problem, res_vec, A_fn, dofs,
precond, use_petsc)
res_vec, A_fn = newton_update_helper(dofs)
# test_jacobi_precond(problem, jacobi_preconditioner(problem, dofs), A_fn)
res_val = np.linalg.norm(res_vec)
logger.debug(f"res l_2 = {res_val}")
can result in an infinite loop if there are convergence issues. This should be recified so that we break out of the loop after set number of iterations!