[petsc-users] Using SNES in a legacy code

Karin&NiKo niko.karin at gmail.com
Fri May 5 11:14:03 CDT 2017


Dear PETSc team,

I am part of the development team of legacy fortran code with a tailored
Newton's method. The software is already using PETSc's linear solvers and
we enjoy it. Now I would like to evaluate the SNES solver.
I have already extracted a function in order to compute the Jacobian and
another one to compute the residual.
But there is something I cannot figure out : at each Newton's iteration,
our solver needs to know the unknowns value in order to compute the
Jacobian. But the increment vector is computed within the SNES.
How can I synchronize PETSc's vector of unknowns  and mine? Is there some
kind of SNESSetPostSolveShell ?

Thanks for developping PETSc,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170505/5eb24468/attachment.html>


More information about the petsc-users mailing list