<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div>Ling,</div>
<div><br>
</div>
Are you using PETSc TS? If so, it may worth trying Crank-Nicolson first to see if the nonlinear solve becomes faster.
<div><br>
</div>
<div>
<div>In addition, you can try to improve the performance by pruning the Jacobian matrix.</div>
<div><br>
</div>
<div><a href="https://urldefense.us/v3/__https://petsc.org/main/manualpages/TS/TSPruneIJacobianColor/__;!!G_uCfscf7eWS!aAgMOjDD6ZgyEaxqc_vH-Yl5P1uNvFWa8_Lc5TWgoXfSz9x7kNgCi4jr10b2PmgzFwIyeCZGCGLUYU6hNJdYW8zcNQ$">TSPruneIJacobianColor()</a> sometimes can reduce the number of colors especially for high-order methods and make your Jacobian matrix more compact. An example of usage can be found <a href="https://urldefense.us/v3/__https://petsc.org/release/src/ts/tests/ex5.c.html__;!!G_uCfscf7eWS!aAgMOjDD6ZgyEaxqc_vH-Yl5P1uNvFWa8_Lc5TWgoXfSz9x7kNgCi4jr10b2PmgzFwIyeCZGCGLUYU6hNJd4iC6hZw$">here</a>.
If you are not using TS, there is a SNES version <a href="https://urldefense.us/v3/__https://petsc.org/main/manualpages/SNES/SNESPruneJacobianColor/__;!!G_uCfscf7eWS!aAgMOjDD6ZgyEaxqc_vH-Yl5P1uNvFWa8_Lc5TWgoXfSz9x7kNgCi4jr10b2PmgzFwIyeCZGCGLUYU6hNJfq48Io5Q$">SNESPruneJacobianColor()</a> for the same functionality.</div>
<div><br>
</div>
<div>Hong (Mr.)</div>
<div>
<div><br>
<blockquote type="cite">
<div>On Mar 3, 2024, at 11:48 PM, Zou, Ling via petsc-users <petsc-users@mcs.anl.gov> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Verdana; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div>
<div id="mail-editor-reference-message-container">
<div>
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;">
<p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<b><span style="font-size: 12pt; font-family: Aptos, sans-serif;">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt; font-family: Aptos, sans-serif;">Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>><br>
<b>Date:<span class="Apple-converted-space"> </span></b>Sunday, March 3, 2024 at 11:35 PM<br>
<b>To:<span class="Apple-converted-space"> </span></b>Zou, Ling <<a href="mailto:lzou@anl.gov">lzou@anl.gov</a>>, Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br>
<b>Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:<span class="Apple-converted-space"> </span></b>Re: [petsc-users] 'Preconditioning' with lower-order method<o:p></o:p></span></p>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 1pt; color: white;">If you're having PETSc use coloring and have confirmed that the stencil is sufficient, then it would be nonsmoothness (again, consider the
limiter you've chosen) preventing quadratic convergence (assuming that doesn't kick in eventually). Note<o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 1pt; color: white;">ZjQcmQRYFpfptBannerStart<o:p></o:p></span></div>
</div>
<div id="pfptBannerdove87h" style="border-right-style: none; border-bottom-style: none; border-left-style: none; display: block !important; text-align: left !important; margin: 0px !important; padding: 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: rgb(208, 216, 220) !important; border-top-color: rgb(144, 164, 174) !important;">
<div id="pfptBannerdove87h">
<div id="pfptBannerdove87h">
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 13.5pt; background-color: rgb(208, 216, 220);">
<b><span style="font-family: Arial, sans-serif;">This Message Is From an External Sender<o:p></o:p></span></b></div>
</div>
<div id="pfptBannerdove87h">
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 13.5pt; background-color: rgb(208, 216, 220);">
<span style="font-family: Arial, sans-serif;">This message came from outside your organization.<o:p></o:p></span></div>
</div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(208, 216, 220);">
<span style=""> </span><o:p></o:p></div>
</div>
</div>
<div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 1pt; color: white;">ZjQcmQRYFpfptBannerEnd<o:p></o:p></span></div>
</div>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New"; white-space: pre-wrap;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">If you're having PETSc use coloring and have confirmed that the stencil is sufficient, then it would be nonsmoothness (again, consider the limiter you've chosen) preventing quadratic convergence (assuming that doesn't kick in eventually).<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt 0.5in; font-size: 10pt; font-family: "Courier New"; text-indent: -0.25in;"><span style="font-size: 11pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif;">Yes, I do use coloring, and I do provide sufficient stencil, i.e., neighbor’s neighbor. The sufficiency is confirmed by PETSc’s <b><i>-snes_test_jacobian</i> </b>and <b><i>-snes_test_jacobian_view</i></b> options.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">Note that assembling a Jacobian of a second order TVD operator requires at least second neighbors while the first order needs only first neighbors, thus is much sparser and needs fewer colors to compute. <o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt 0.5in; font-size: 10pt; font-family: "Courier New"; text-indent: -0.25in;"><span style="font-size: 11pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif;">In my code implementation, when marking the Jacobian nonzero pattern, I don’t differentiate FV1 or FV2, I always use the FV2 stencil, so it’s a bit ‘fat’ for the FV1 method, but worked just fine.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">I expect you're either not exploiting that in the timings or something else is amiss. You can run with `-log_view -snes_view -ksp_converged_reason` to get a bit more information about what's happening. <o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt 0.5in; font-size: 10pt; font-family: "Courier New"; text-indent: -0.25in;"><span style="font-size: 11pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif;">The attached is screen output as you suggest. The linear and nonlinear performance of FV2 is both worse from the output.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">FV2:<o:p></o:p></span></pre>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="s1">Time Step 149, time = 13229.7, dt = 100</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">0, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">7.80968E-03</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 26</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">1, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">7.65731E-03</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 24</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">2, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">6.85034E-03</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 27</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">3, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">6.11873E-03</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 25</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">4, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">1.57347E-03</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 27</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">5, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">9.03536E-04</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="s1">SNES Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: newtonls</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maximum iterations=20, maximum function evaluations=10000</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerances: relative=1e-08, absolute=1e-06, solution=1e-08</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"><span style="color: yellow;"> <span class="Apple-converted-space"> </span></span></span><span class="s1"><span style="color: yellow;">total number of linear solver iterations=129</span></span><span style="color: yellow;"><o:p></o:p></span></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"><span style="color: yellow;"> <span class="Apple-converted-space"> </span></span></span><span class="s1"><span style="color: yellow;">total number of function evaluations=144</span></span><span style="color: yellow;"><o:p></o:p></span></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">norm schedule ALWAYS</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Jacobian is applied matrix-free with differencing</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Preconditioning Jacobian is built using finite differences with coloring</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">SNESLineSearch Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: bt</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">interpolation: cubic</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">alpha=1.000000e-04</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maxstep=1.000000e+08, minlambda=1.000000e-12</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maximum iterations=40</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">KSP Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: gmres</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">restart=100, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">happy breakdown tolerance 1e-30</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maximum iterations=100, initial guess is zero</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerances:</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">relative=0.0001, absolute=1e-50,
divergence=10000.</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">left preconditioning</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">using PRECONDITIONED norm type for convergence test</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">PC Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: ilu</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">out-of-place factorization</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">0 levels of fill</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerance for zero pivot 2.22045e-14</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">using diagonal shift to prevent zero pivot [NONZERO]</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">matrix ordering: rcm</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">factor fill ratio given 1., needed 1.</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Factored matrix follows:</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Mat Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: seqaij</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">rows=8715, cols=8715</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">package used to perform factorization: petsc</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">total: nonzeros=38485, allocated nonzeros=38485</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">not using I-node routines</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">linear system matrix followed by preconditioner matrix:</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Mat Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: mffd</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">rows=8715, cols=8715</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Matrix-free approximation:</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">err=1.49012e-08 (relative error in function evaluation)</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Using wp compute h routine</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Does not compute normU</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Mat Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: seqaij</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">rows=8715, cols=8715</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">total: nonzeros=38485, allocated nonzeros=38485</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">total number of mallocs used during MatSetValues calls=0</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">not using I-node routines</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: rgb(47, 180, 29);">
<span class="apple-converted-space"> </span><span class="s1">Solve Converged!</span><o:p></o:p></div>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">FV1:<o:p></o:p></span></pre>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="s1">Time Step 149, time = 13229.7, dt = 100</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">0, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">7.90072E-03</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 12</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">1, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">2.01919E-04</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 17</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">2, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">1.06960E-05</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Linear solve converged due to CONVERGED_RTOL iterations 15</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">NL Step =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">3, fnorm =</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">2.41683E-09</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="s1">SNES Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: newtonls</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maximum iterations=20, maximum function evaluations=10000</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerances: relative=1e-08, absolute=1e-06, solution=1e-08</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"><span style="color: yellow;"> <span class="Apple-converted-space"> </span></span></span><span class="s1"><span style="color: yellow;">total number of linear solver iterations=44</span></span><span style="color: yellow;"><o:p></o:p></span></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"><span style="color: yellow;"> <span class="Apple-converted-space"> </span></span></span><span class="s1"><span style="color: yellow;">total number of function evaluations=51</span></span><span style="color: yellow;"><o:p></o:p></span></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">norm schedule ALWAYS</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Jacobian is applied matrix-free with differencing</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Preconditioning Jacobian is built using finite differences with coloring</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">SNESLineSearch Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: bt</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">interpolation: cubic</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">alpha=1.000000e-04</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maxstep=1.000000e+08, minlambda=1.000000e-12</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maximum iterations=40</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">KSP Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: gmres</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">restart=100, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">happy breakdown tolerance 1e-30</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">maximum iterations=100, initial guess is zero</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerances:</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">relative=0.0001, absolute=1e-50,
divergence=10000.</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">left preconditioning</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">using PRECONDITIONED norm type for convergence test</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">PC Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: ilu</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">out-of-place factorization</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">0 levels of fill</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">tolerance for zero pivot 2.22045e-14</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">using diagonal shift to prevent zero pivot [NONZERO]</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">matrix ordering: rcm</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">factor fill ratio given 1., needed 1.</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Factored matrix follows:</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Mat Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: seqaij</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">rows=8715, cols=8715</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">package used to perform factorization: petsc</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">total: nonzeros=38485, allocated nonzeros=38485</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">not using I-node routines</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">linear system matrix followed by preconditioner matrix:</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Mat Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: mffd</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">rows=8715, cols=8715</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Matrix-free approximation:</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">err=1.49012e-08 (relative error in function evaluation)</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Using wp compute h routine</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Does not compute normU</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">Mat Object: 1 MPI process</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">type: seqaij</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">rows=8715, cols=8715</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">total: nonzeros=38485, allocated nonzeros=38485</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">total number of mallocs used during MatSetValues calls=0</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: white;">
<span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">not using I-node routines</span><o:p></o:p></div>
<div style="margin: 0in; background-color: black; font-size: 9pt; font-family: "Andale Mono"; color: rgb(47, 180, 29);">
<span class="apple-converted-space"> </span><span class="s1">Solve Converged!</span><o:p></o:p></div>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">"Zou, Ling via petsc-users" <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> writes:<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;"><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Barry, thank you.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> I am not sure if I exactly follow you on this:<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> “Are you forming the Jacobian for the first and second order cases inside of Newton?”<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> The problem that we deal with, heat/mass transfer in heterogeneous systems (reactor system), is generally small in terms of size, i.e., # of DOFs (several k to maybe 100k level), so for now, I completely rely on PETSc to compute Jacobian, i.e., finite-differencing.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> That’s a good suggestion to see the time spent during various events.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> What motivated me to try the options are the following observations.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> 2nd order FVM:<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Time Step 149, time = 13229.7, dt = 100<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 0, fnorm = 7.80968E-03<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 1, fnorm = 7.65731E-03<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 2, fnorm = 6.85034E-03<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 3, fnorm = 6.11873E-03<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 4, fnorm = 1.57347E-03<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 5, fnorm = 9.03536E-04<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Solve Converged!<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> 1st order FVM:<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Time Step 149, time = 13229.7, dt = 100<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 0, fnorm = 7.90072E-03<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 1, fnorm = 2.01919E-04<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 2, fnorm = 1.06960E-05<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> NL Step = 3, fnorm = 2.41683E-09<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Solve Converged!<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Notice the obvious ‘stagnant’ in residual for the 2nd order method while not in the 1st order.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> For the same problem, the wall time is 10 sec vs 6 sec. I would be happy if I can reduce 2 sec for the 2nd order method.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> -Ling<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> From: Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Date: Sunday, March 3, 2024 at 12:06 PM<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> To: Zou, Ling <<a href="mailto:lzou@anl.gov">lzou@anl.gov</a>><o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Cc: <a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a> <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Subject: Re: [petsc-users] 'Preconditioning' with lower-order method<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Are you forming the Jacobian for the first and second order cases inside of Newton? You can run both with -log_view to see how much time is spent in the various events (compute function, compute Jacobian, linear solve, .. . ) for the two cases<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> ZjQcmQRYFpfptBannerStart<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> This Message Is From an External Sender<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> This message came from outside your organization.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> ZjQcmQRYFpfptBannerEnd<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Are you forming the Jacobian for the first and second order cases inside of Newton?<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> You can run both with -log_view to see how much time is spent in the various events (compute function, compute Jacobian, linear solve, ...) for the two cases and compare them.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> On Mar 3, 2024, at 11:42 AM, Zou, Ling via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Original email may have been sent to the incorrect place.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> See below.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> -Ling<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> From: Zou, Ling <<a href="mailto:lzou@anl.gov">lzou@anl.gov</a><<a href="mailto:lzou@anl.gov">mailto:lzou@anl.gov</a>>><o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Date: Sunday, March 3, 2024 at 10:34 AM<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> To: petsc-users <<a href="mailto:petsc-users-bounces@mcs.anl.gov">petsc-users-bounces@mcs.anl.gov</a><<a href="mailto:petsc-users-bounces@mcs.anl.gov">mailto:petsc-users-bounces@mcs.anl.gov</a>>><o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Subject: 'Preconditioning' with lower-order method<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Hi all,<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> I am solving a PDE system over a spatial domain. Numerical methods are:<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> * Finite volume method (both 1st and 2nd order implemented)<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> * BDF1 and BDF2 for time integration.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> What I have noticed is that 1st order FVM converges much faster than 2nd order FVM, regardless the time integration scheme. Well, not surprising since 2nd order FVM introduces additional non-linearity.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> I’m thinking about two possible ways to speed up 2nd order FVM, and would like to get some thoughts or community knowledge before jumping into code implementation.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Say, let the 2nd order FVM residual function be F2(x) = 0; and the 1st order FVM residual function be F1(x) = 0.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> 1. Option – 1, multi-step for each time step<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Step 1: solving F1(x) = 0 to obtain a temporary solution x1<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Step 2: feed x1 as an initial guess to solve F2(x) = 0 to obtain the final solution.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> [Not sure if gain any saving at all]<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> 1. Option -2, dynamically changing residual function F(x)<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> In pseudo code, would be something like.<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> snesFormFunction(SNES snes, Vec u, Vec f, void *)<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> {<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> if (snes.nl_it_no < 4) // 4 being arbitrary here<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> f = F1(u);<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> else<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> f = F2(u);<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> }<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> I know this might be a bit crazy since it may crash after switching residual function, still, any thoughts?<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> Best,<o:p></o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">><o:p> </o:p></span></pre>
<pre style="margin: 0in 0in 0.0001pt; font-size: 10pt; font-family: "Courier New";"><span style="font-size: 11pt; font-family: Arial, sans-serif;">> -Ling<o:p></o:p></span></pre>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>