[petsc-users] SNES: approximating the Jacobian with computed residuals?

Peter Brune prbrune at gmail.com
Tue Apr 22 09:16:29 CDT 2014


On Tue, Apr 22, 2014 at 8:48 AM, Fischer, Greg A. <fischega at westinghouse.com
> wrote:

> Hello PETSc-users,
>
> I'm using the SNES component with the NGMRES method in my application. I'm
> using a matrix-free context for the Jacobian and the
> MatMFFDComputeJacobian() function in my FormJacobian routine. My
> understanding is that this effectively approximates the Jacobian using the
> equation at the bottom of Page 103 in the PETSc User's Manual. This works,
> but the expense of computing two function evaluations in each SNES
> iteration nearly wipes out the performance improvements over Picard
> iteration.
>

Try -snes_type anderson.  It's less stable than NGMRES, but requires one
function evaluation per iteration.  The manual is out of date.  I guess
it's time to fix that.  It's interesting that the cost of matrix assembly
and a linear solve is around the same as that of a function evaluation.
 Output from -log_summary would help in the diagnosis.


>
> Based on my (limited) understanding of the Oosterlee/Washio SIAM paper
> ("Krylov Subspace Acceleration of Nonlinear Multigrid..."), they seem to
> suggest that it's possible to approximate the Jacobian with a series of
> previously-computed residuals (eq 2.14), rather than additional function
> evaluations in each iteration. Is this correct? If so, could someone point
> me to a reference that demonstrates how to do this with PETSc?
>

What indication do you have that the Jacobian is calculated at all in the
NGMRES method?  The two function evaluations are related to computing the
quantities labeled F(u_M) and F(u_A) in O/W.  We already use the Jacobian
approximation for the minimization problem (2.14).

- Peter


> Or, perhaps a better question to ask is: are there other ways of reducing
> the computing burden associated with estimating the Jacobian?
>
> Thanks,
> Greg
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140422/d79b6861/attachment.html>


More information about the petsc-users mailing list