<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Pierre and Matt,
<div><br>
</div>
<div>Thanks a lot for the suggestion. It looks like lag Jacobian is exactly what I need. We will try that.</div>
<div><br>
</div>
<div>I always thought ngmres is a fancy version of Anderson. Is there any reference or example related to what you said in which one actually implemented an approximated Jacobian through ngmres? This sounds very interesting.</div>
<div><br>
</div>
<div>Qi<br>
<br>
<div dir="ltr">
<blockquote type="cite"><br>
On May 3, 2022, at 4:51 AM, Matthew Knepley <knepley@gmail.com> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">On Tue, May 3, 2022 at 2:58 AM Pierre Seize <<a href="mailto:pierre.seize@onera.fr">pierre.seize@onera.fr</a>> wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi,<br>
<br>
If I may, is this what you want ?<br>
<br>
<a href="https://urldefense.com/v3/__https://petsc.org/main/docs/manualpages/SNES/SNESSetLagJacobian.html__;!!HXCxUKc!zIB-QYseFS9GsRBrb4wzwezVTB9DKqY_PBYGWYql4tLtLTBwX552ukXeZk_z0ZASYNl5x6QlBwDt6Q$" rel="noreferrer" target="_blank">https://petsc.org/main/docs/manualpages/SNES/SNESSetLagJacobian.html</a></blockquote>
<div><br>
</div>
<div>Yes, this is a good suggestion.</div>
<div><br>
</div>
<div>Also, you could implement an approximation to the Jacobian.</div>
<div><br>
</div>
<div>You could then improve it at each iteration using a secant update. This is what the Generalized Broyden methods do. We call them NGMRES.</div>
<div><br>
</div>
<div>  Thanks,</div>
<div><br>
</div>
<div>    Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Pierre<br>
<br>
On 03/05/2022 06:21, Tang, Qi wrote:<br>
> Hi,<br>
> Our code uses FDcoloring to compute Jacobian. The log file indicates most of time is spent in evaluating residual (2600 times in one Newton solve) while it only needs 3 nonlinear iterations and 6 total linear iterations thanks to the fieldsplit pc.<br>
><br>
> As a temporary solution, is it possible to evaluate Jacobian only once in one Newton solve? This should work well based on my other experience if pc is very efficient. But I cannot find such a flag.<br>
><br>
> Is there any other solution, other than implementing the analytical Jacobian?<br>
><br>
> Thanks,<br>
> Qi<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!HXCxUKc!zIB-QYseFS9GsRBrb4wzwezVTB9DKqY_PBYGWYql4tLtLTBwX552ukXeZk_z0ZASYNl5x6RvtZtRBQ$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</body>
</html>