(Deleted) Zero residual norm on zeroth iteration - what to do about it?

9 months ago by
I am running a time dependent simulation and want to approach a steady state. There are multiple functions to solve for requiring multiple solvers. The solver that fails looks like this.

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
This question does not conform to the guide https://www.allanswered.com/post/emre/read-before-posting-how-do-i-get-by-my-question-answered/

DIVERGED_PCSETUP_FAILED indicates possibly singluar system.

Your system does not feature any BCs. Is it zero order operator?
written 9 months ago by Jan Blechta  
Well, with the negative vote and this comment should I just delete my question? I guess it's not a good one.
written 9 months ago by Alden Pack  
Please login to add an answer/comment or follow this question.
The thread is closed. No new answer/comment may be added.

Similar posts:
Search »
  • Nothing matches yet.