<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">aph@email.arizona.edu</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"><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 class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid 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" 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="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>