Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite while loop for non-linear case #28

Open
SNMS95 opened this issue Sep 7, 2023 · 0 comments
Open

Infinite while loop for non-linear case #28

SNMS95 opened this issue Sep 7, 2023 · 0 comments

Comments

@SNMS95
Copy link
Collaborator

SNMS95 commented Sep 7, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant