[petsc-users] Flagging the solver to restart

Mohammed Ashour ashour.msc at gmail.com
Sun Feb 2 11:24:42 CST 2020


Dear All,
I'm solving a constraint phase-field problem using PetIGA. This question
i'm having is more relevant to PETSc, so I'm posting here.

I have an algorithm involving iterating on the solution vector until
certain criteria are met before moving forward for the next time step. The
sequence inside the TSSolve is to call TSMonitor first, to print a
user-defined set of values and the move to solve at TSStep and then call
TSPostEvaluate.

So I'm using the TSMonitor to update some variables at time n , those
variables are used the in the residual and jacobian calculations at time
n+1, and then solving and then check if those criteria are met or not in a
function assigned to TS via TSSetPostEvaluate, if the criteria are met,
it'll move forward, if not, it'll engaged the routine TSRollBack(), which
based on my understanding is the proper way yo flag the solver to
recalculate n+1. My question is, is this the proper way to do it? what is
the difference between TSRollBack and TSRestart?
Thanks a lot

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200202/d5e5ca19/attachment.html>


More information about the petsc-users mailing list