[petsc-dev] SNESSolve and changing dimensions

Mark Adams mfadams at lbl.gov
Wed Apr 3 15:41:30 CDT 2019


 I agree that you want to adapt around a  converged  solution. I have code
that runs time step(s), adapts, Transfers solutions and state,  creates a
new TS & SNES, if you want to  clone  that.  It works with PForest, but
Toby and Matt are working on  these abstractions so it might not be the
most up to date. If there are more up-to-date examples I would like to know
about it also.

On Wed, Apr 3, 2019 at 3:47 PM Jed Brown via petsc-dev <
petsc-dev at mcs.anl.gov> wrote:

> Pierre Jolivet via petsc-dev <petsc-dev at mcs.anl.gov> writes:
>
> > I am just adapting the mesh depending on the solution from the previous
> SNESSolve.
> > At first, I wanted to avoid writing an outer loop around the SNESSolve,
> so I thought, let’s put the adaptation in the SNESSetJacobian.
> > It would have been preferable because it would have required fewer lines
> of code (as I had imagined this to work), that’s the main reason. I
> understand this is too much to ask of PETSc to continue working without any
> further information from the application.
>
> SNES wants to be able to connect norms and differences between vectors
> at different iterations (e.g., rtol and stol).  I would just loop around
> SNESSolve for what you want.  Note that it may be fragile to adapt in
> early Newton iterations if globalization is a challenge for your
> problem.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190403/24f571e0/attachment.html>


More information about the petsc-dev mailing list