[petsc-users] SNES question

Eduardo erocha.ssa at gmail.com
Thu Jan 9 10:38:19 CST 2014


Jed Brown:

Thanks for your answer. Some of my state variables must only be accumulated
at the end of each Newton iteration. So is SNESLineSearchSetPostCheck only
called in that occasion for any non-linear solver?

Best regards,
Eduardo

On Thu, Jan 9, 2014 at 1:31 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140109/41fdb947/attachment.html>


More information about the petsc-users mailing list