[petsc-users] Solving with SNES

Jed Brown jedbrown at mcs.anl.gov
Sat Nov 12 12:14:52 CST 2011


On Sat, Nov 12, 2011 at 12:10, behzad baghapour
<behzad.baghapour at gmail.com>wrote:

> Yes.The Roe average is a common method in this area.
> I couldn't understand well what you said about stashing the quantities.
> Each residual evaluation is proceeded by a Jacobian one if I choose an
> Inexact Newton method and freeze Jacobian matrix for some Newton
> iterations. Please make it for me more clear.
>

As the FAQ discusses, the residual may be called multiple times before a
Jacobian is needed, for example, in a line search. Also, some time
integration methods (e.g. Rosenbrocks) will evaluate the residual several
times before getting a new Jacobian. If it's free for you to stash these
intermediate quantities during residual evaluation, then go ahead and do it
(but don't forget that even if it's all computed, just putting it in memory
costs something too). But make residual evaluation, not the monitor, the
place where these intermediate quantities are computed and stored. The
monitor is not called in the semantically correct place for this purpose.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111112/6ba1ed5d/attachment.htm>


More information about the petsc-users mailing list