<div dir="ltr"><div dir="ltr">On Fri, Sep 6, 2024 at 11:37 AM Karthikeyan Chockalingam - STFC UKRI via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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 class="msg-9159410701733724734">





<div lang="EN-GB" style="overflow-wrap: break-word;">
<div class="m_-9159410701733724734WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">Hello,<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 trying to use the Hypre AMS preconditioner for the first time.
<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 following the example problem from Hypre<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><a href="https://urldefense.us/v3/__https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27cf6d07b50f6e/src/examples/ex15.c*L954__;Iw!!G_uCfscf7eWS!biuCOXkV-qD-e8iTXiwaD9XJ0EWuqr2PidZJdPqbnFzCshQFo-mclGSvGBOPuGSTkjPvMKnIfJzWos7QShcSitpwyrhL5ySgA0XM$" target="_blank">https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27cf6d07b50f6e/src/examples/ex15.c#L954</a><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 have so far successfully set the discrete gradient operator and vertex co-ordinates,<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">// Set discrete gradient <u></u>
<u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">  petscErr = PCHYPRESetDiscreteGradient(pc, par_G);<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">  // Set vertex coordinates<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">  petscErr = PCHYPRESetEdgeConstantVectors(pc, par_xvec, par_yvec, par_zvec);<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">Do I need to set the following smoothing options?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><a href="https://urldefense.us/v3/__https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27cf6d07b50f6e/src/examples/ex15.c*L965__;Iw!!G_uCfscf7eWS!biuCOXkV-qD-e8iTXiwaD9XJ0EWuqr2PidZJdPqbnFzCshQFo-mclGSvGBOPuGSTkjPvMKnIfJzWos7QShcSitpwyrhL55yOMB-v$" target="_blank">https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27cf6d07b50f6e/src/examples/ex15.c#L965</a></span></p></div></div></div></blockquote><div><br></div><div>It cannot hurt. I would set them to begin with.</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 class="msg-9159410701733724734"><div lang="EN-GB" style="overflow-wrap: break-word;"><div class="m_-9159410701733724734WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">Also, do I need to convert from MATMPIAIJ to CSR?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><a href="https://urldefense.us/v3/__https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27cf6d07b50f6e/src/examples/ex15.c*L984__;Iw!!G_uCfscf7eWS!biuCOXkV-qD-e8iTXiwaD9XJ0EWuqr2PidZJdPqbnFzCshQFo-mclGSvGBOPuGSTkjPvMKnIfJzWos7QShcSitpwyrhL53Trv1si$" target="_blank">https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27cf6d07b50f6e/src/examples/ex15.c#L984</a></span></p></div></div></div></blockquote><div><br></div><div>No.</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 class="msg-9159410701733724734"><div lang="EN-GB" style="overflow-wrap: break-word;"><div class="m_-9159410701733724734WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">What are the other PETSc calls to invoke AMS? Is there an example problem I can look at?</span></p></div></div></div></blockquote><div><br></div><div>I do not know. I don't think we have an example.</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 class="msg-9159410701733724734"><div lang="EN-GB" style="overflow-wrap: break-word;"><div class="m_-9159410701733724734WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">Thank you.<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">Karthik.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">-- <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:Arial,sans-serif;color:rgb(45,45,98)">Karthik Chockalingam, Ph.D.<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif;color:black">Senior Research Software Engineer</span><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif;color:black">High Performance Systems Engineering Group</span><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif;color:black">Hartree Centre | Science and Technology Facilities Council</span><span style="font-size:10.5pt;font-family:Calibri,sans-serif;color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif;color:rgb(33,33,33)"><a href="mailto:karthikeyan.chockalingam@stfc.ac.uk" target="_blank"><span style="color:rgb(5,99,193)">karthikeyan.chockalingam@stfc.ac.uk</span></a></span><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif;color:black"> </span><span style="font-size:10.5pt;font-family:Arial,sans-serif;color:rgb(65,65,65)"> </span><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:Arial,sans-serif;color:rgb(65,65,65)"> </span></b><span style="font-family:"Times New Roman",serif;color:rgb(31,73,125)"><img border="0" width="254" height="116" style="width: 2.6458in; height: 1.2083in;" id="m_-9159410701733724734Picture_x0020_1" src="cid:ii_191c843d0a64cff311" alt="signature_3970890138"></span><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(33,33,33)"><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Z1YtcjIl3JraPfN9GbBHhno-LcLOXJurvRZ3MKzzbqSMDLtq5x7_DICKdBj5idJnKPOPq7kmcpCvA1RwP5cb$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>