(Deleted) Zero residual norm on zeroth iteration - what to do about it?
6 months ago by
q2problem = LinearVariationalProblem(q2LHS, q2RHS, q2, bcs = None)
q2solver = LinearVariationalSolver(q2problem)
Where q2LHS is a bilinear form, q2RHS is a linear form and q2 is the function I am solving for.
I then call the following as I step forward in time.
I get the following error when I get close to the steady state. This causes the simulation to stop.
*** Error: Unable to solve linear system using PETSc Krylov solver.
*** Reason: Solution failed to converge in 0 iterations (PETSc reason DIVERGED_PCSETUP_FAILED, residual norm ||r|| = 0.000000e+00).
*** Where: This error was encountered inside PETScKrylovSolver.cpp.
*** Process: 0
*** DOLFIN version: 2017.1.0
The residual norm is zero after 0 iterations (near the steady state). I would expect this as near the steady state quantities won't change from one time step to the next. Am I correct in assuming I have the correct answer and do not need to run the solver? If so, what is a good way to get around the fact that this error prevents the simulation from running? Could I check if the residual is zero and skip the solver? How would I do that?
Changing the solver parameters with the following line before running the solver does not appear to fix the issue. The simulation still stops. Does the following only work if the solver has taken a few steps?
q2solver.parameters['krylov_solver']['error_on_nonconvergence'] = False
Community: FEniCS Project
Please login to add an answer/comment or follow this question.
The thread is closed. No new answer/comment may be added.