<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBannertl9757u { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtontl9757u:hover, .pfptPrimaryButtontl9757u:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButtontl9757u:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
On Sun, Mar 3, 2024 at 11: 42 AM Zou, Ling via petsc-users <petsc-users@ mcs. anl. gov> wrote: Original email may have been sent to the incorrect place. See below. -Ling From: Zou, Ling <lzou@ anl. gov> Date: Sunday, March 3, 2024 at
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBannertl9757u" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBannertl9757u" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBannertl9757u" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBannertl9757u" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 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:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8758591807438366090">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_2523648098818081143WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">Original email may have been sent to the incorrect place.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">See below.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">-Ling<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div id="m_2523648098818081143mail-editor-reference-message-container">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;font-family:Aptos,sans-serif;color:black">From:
</span></b><span style="font-size:12pt;font-family:Aptos,sans-serif;color:black">Zou, Ling <<a href="mailto:lzou@anl.gov" target="_blank">lzou@anl.gov</a>><br>
<b>Date: </b>Sunday, March 3, 2024 at 10:34 AM<br>
<b>To: </b>petsc-users <<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>><br>
<b>Subject: </b>'Preconditioning' with lower-order method<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11pt">Hi all,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">I am solving a PDE system over a spatial domain. Numerical methods are:<u></u><u></u></span></p>
<ul style="margin-top:0in" type="disc">
<li class="m_2523648098818081143MsoListParagraph" style="margin-left:0in"><span style="font-size:11pt">Finite volume method (both 1<sup>st</sup> and 2<sup>nd</sup> order implemented)<u></u><u></u></span></li><li class="m_2523648098818081143MsoListParagraph" style="margin-left:0in"><span style="font-size:11pt">BDF1 and BDF2 for time integration.<u></u><u></u></span></li></ul>
<p class="MsoNormal"><span style="font-size:11pt">What I have noticed is that 1<sup>st</sup> order FVM converges much faster than 2<sup>nd</sup> order FVM, regardless the time integration scheme. Well, not surprising since 2<sup>nd</sup> order FVM introduces
additional non-linearity.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">I’m thinking about two possible ways to speed up 2<sup>nd</sup> order FVM, and would like to get some thoughts or community knowledge before jumping into code implementation.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Say, let the 2<sup>nd</sup> order FVM residual function be
<b><i>F</i></b><sub>2</sub>(<b><i>x</i></b>) = 0; and the 1<sup>st</sup> order FVM residual function be
<b><i>F</i></b><sub>1</sub>(<b><i>x</i></b>) = 0.<u></u><u></u></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="m_2523648098818081143MsoListParagraph" style="margin-left:0in"><span style="font-size:11pt">Option – 1, multi-step for each time step<u></u><u></u></span></li></ol>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:11pt">Step 1: solving
<b><i>F</i></b><sub>1</sub>(<b><i>x</i></b>) = 0 to obtain a temporary solution <b>
<i>x</i></b><sub>1</sub><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:11pt">Step 2: feed
<b><i>x</i></b><sub>1</sub> as an initial guess to solve <b><i>F</i></b><sub>2</sub>(<b><i>x</i></b>) = 0 to obtain the final solution.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:11pt">[Not sure if gain any saving at all]<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:11pt"> </span> </p></div></div></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8758591807438366090"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_2523648098818081143WordSection1"><div id="m_2523648098818081143mail-editor-reference-message-container"><div><div><p class="MsoNormal" style="margin-left:0.5in"><span style="font-size:11pt"><u></u><u></u></span></p>
<ol style="margin-top:0in" start="2" type="1">
<li class="m_2523648098818081143MsoListParagraph" style="margin-left:0in"><span style="font-size:11pt">Option -2, dynamically changing residual function F(x)<u></u><u></u></span></li></ol>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-size:11pt">In pseudo code, would be something like.<u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-size:11pt"> </span></p></div></div></div></div></div></div></blockquote><div>You can try it. I would doubt the linear version (1) would help. This is similar to "defect correction" but not the same.</div><div><br></div><div>The nonlinear version (2) is something you could try. <br></div><div>I've seen people switch nonlinear solvers like this but not operators.</div><div>You could try it.</div><div><br></div><div>Mark</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8758591807438366090"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_2523648098818081143WordSection1"><div id="m_2523648098818081143mail-editor-reference-message-container"><div><div><p class="m_2523648098818081143MsoListParagraph"><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco">snesFormFunction(SNES snes, Vec u, Vec f, void *)</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco">{</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco"> if (snes.nl_it_no < 4) // 4 being arbitrary here</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco"> f = F1(u);</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco"> else</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco"> f = F2(u);</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco">}</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-family:Monaco"> </span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="m_2523648098818081143MsoListParagraph"><span style="font-size:11pt">I know this might be a bit crazy since it may crash after switching residual function, still, any thoughts?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Monaco"> </span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Monaco">Best,</span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Monaco"> </span><span style="font-size:11pt"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Monaco">-Ling</span><span style="font-size:11pt"><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div></blockquote></div></div>