[petsc-users] Aborting outer iterations when inner iterations reach maxits fieldsplit

Barry Smith bsmith at mcs.anl.gov
Mon Feb 3 13:51:54 CST 2014


On Feb 3, 2014, at 12:58 PM, James MBewu <james.mbewu at gmail.com> wrote:

> Hi all petsc gurus,
> 
> I am solving Navier Stokes equations using Q2-Q1 elements via libmesh and using petsc fieldsplit schur complement etc for the solving I was wondering whether it was possible to abort the outer iterations of the solver if the inner solver reached a set maximum iterations. At the moment if I set the maximum iterations of the inner solver, then once that is reached, the outer iterations continue and another inner solve is performed. Essentially I would like to say "I can't solve the inner problem so let's just give up on the whole thing". Is there any (easy) way to do this?

   When the outer and inner iterations are linear we don’t currently have any way of handling. We call KSPSolve() on any inner solve (from the outer solve) and then blindly continue after that solve is “complete” regardless of the “quality” of the “inner” solver. 

   One way we could handle this is to always call KSPGetConvergedReason() after the “inner” solver and based on that value decide if the “outer” solve should be short circuited and marked as “did not converge”.   What makes this nontrivial is that depending on the circumstances one may which to continue the “outer” solver or not and we need to leave flexibility of what to do in this situation and also propagate (or not depending on the circumstance) this “short circuit” business through several layers of “inner solvers”.

   This is a great question, PETSc gurus what do you think?

   Barry



> 
> Please advise, thanks,
> James



More information about the petsc-users mailing list