<div dir="ltr">Awesome! thanks to all.<div><br></div><div>Anthony</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 4, 2020 at 7:28 PM Zhang, Hong <<a href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><p style="text-align:center"><font color="red"><strong>External Email</strong><br></font></p>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
See case '"-num_rhs" in petsc/src/ksp/ksp/tests/ex30.c</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hong</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="gmail-m_6884352882396726102appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_6884352882396726102divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> petsc-users <<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>> on behalf of Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Tuesday, August 4, 2020 7:29 PM<br>
<b>To:</b> Anthony Paul Haas <<a href="mailto:aph@email.arizona.edu" target="_blank">aph@email.arizona.edu</a>><br>
<b>Cc:</b> petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:</b> Re: [petsc-users] reuse Mumps factorization for multiple RHS</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">On Tue, Aug 4, 2020 at 7:57 PM Anthony Paul Haas <<a href="mailto:aph@email.arizona.edu" target="_blank">aph@email.arizona.edu</a>> wrote:<br>
</div>
<div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hello,
<div><br>
</div>
<div>When using Mumps to solve a linear system of equations (see below), can I reuse the factorization to solve for multiple RHS, ie, can I use <span style="color:rgb(74,0,255);font-family:Menlo;font-size:11px">KSPSolve</span> multiple times while only building
a different RHS in between the calls to <span style="color:rgb(74,0,255);font-family:Menlo;font-size:11px">KSPSolve</span>?</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Yes. It should detect that you have not changed the operator for the KSP and thus not refactor the matrix.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Thanks,</div>
<div><br>
</div>
<div>Anthony</div>
<div><br>
</div>
<div><span style="font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">call</span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">
</span><span style="font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures;color:rgb(74,0,255)">KSPSetType</span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">(self%ksp,KSPPREONLY,self%ierr_ps)</span><br>
</div>
<div>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">call</span><span style="font-variant-ligatures:no-common-ligatures">
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(74,0,255)">KSPGetPC</span><span style="font-variant-ligatures:no-common-ligatures">(self%ksp,pc,self%ierr_ps)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(203,36,24)">
<br>
</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">call</span><span style="font-variant-ligatures:no-common-ligatures">
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(74,0,255)">PCSetType</span><span style="font-variant-ligatures:no-common-ligatures">(pc,PCLU,self%ierr_ps)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(203,36,24)">
<br>
</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">call</span><span style="font-variant-ligatures:no-common-ligatures">
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(74,0,255)">PCFactorSetMatSolverPackage</span><span style="font-variant-ligatures:no-common-ligatures">(pc,MATSOLVERMUMPS,self%ierr_ps)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(74,0,255)">
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">call</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">
</span><span style="font-variant-ligatures:no-common-ligatures">PCFactorSetUpMatSolverPackage</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(pc,self%ierr_ps)</span></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<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="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div>