[petsc-users] SNES question
Jed Brown
jedbrown at mcs.anl.gov
Thu Jan 9 09:31:05 CST 2014
Eduardo <erocha.ssa at gmail.com> writes:
> I need to update some state variables in my application at the end of each
> Newton method iteration. Can I do that inside the routine to compute the
> nonlinear function or the routine to compute the Jacobian? Can I assume
> that one (or both) these routines are called only once per Newton iteration?
The function can be called several times during a line search, but you
probably should be updating the state variables there too. If you
really only want to update after the line search completes (so the
solution could be incompatible with the state variables), you can use
SNESLineSearchSetPostCheck.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140109/f38be2e6/attachment.pgp>
More information about the petsc-users
mailing list