<div dir="ltr">Ah! That's correct. I forgot that the base vector always keeps the same.<div>Thanks.</div><div><br></div><div>Ling</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 2:33 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">"Zou (Non-US), Ling" <<a href="mailto:ling.zou@inl.gov">ling.zou@inl.gov</a>> writes:<br>
<br>
> Hi All,<br>
><br>
> If the non-zero pattern of a finite difference Jacobian needs 20 colors to<br>
> color it (20 comes from MatFDColoringView, the non-zero pattern is<br>
> pre-determined from mesh connectivity), is it true that PETSc needs 40<br>
> functions evaluation to get the full Jacobian matrix filled? This is<br>
> because that a perturbation per color needs two function evaluation<br>
> according to PETSc manual (ver 3.6, page 123, equations shown in the middle<br>
> of the page).<br>
<br>
</span>Note that F(u) has already been evaluated and is the same for all the<br>
perturbation directions.  A centered difference would require two<br>
evaluations per direction, as you say.<br>
<div class="HOEnZb"><div class="h5"><br>
> But I only see 20 function evaluations. I probably have some<br>
> misunderstanding somewhere. Any suggestions?<br>
><br>
> Ling<br>
</div></div></blockquote></div><br></div>