[petsc-users] A question on finite difference Jacobian

Zou (Non-US), Ling ling.zou at inl.gov
Tue Oct 6 15:43:58 CDT 2015


Ah! That's correct. I forgot that the base vector always keeps the same.
Thanks.

Ling

On Tue, Oct 6, 2015 at 2:33 PM, Jed Brown <jed at jedbrown.org> wrote:

> "Zou (Non-US), Ling" <ling.zou at inl.gov> writes:
>
> > Hi All,
> >
> > If the non-zero pattern of a finite difference Jacobian needs 20 colors
> to
> > color it (20 comes from MatFDColoringView, the non-zero pattern is
> > pre-determined from mesh connectivity), is it true that PETSc needs 40
> > functions evaluation to get the full Jacobian matrix filled? This is
> > because that a perturbation per color needs two function evaluation
> > according to PETSc manual (ver 3.6, page 123, equations shown in the
> middle
> > of the page).
>
> Note that F(u) has already been evaluated and is the same for all the
> perturbation directions.  A centered difference would require two
> evaluations per direction, as you say.
>
> > But I only see 20 function evaluations. I probably have some
> > misunderstanding somewhere. Any suggestions?
> >
> > Ling
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151006/4440ac3c/attachment.html>


More information about the petsc-users mailing list