<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;"><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 6 Sep 2024, at 6:56 PM, Matthew Knepley <knepley@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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 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-width: 1px; border-left-style: solid; border-left-color: 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<span class="Apple-converted-space"> </span><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;"> <span class="Apple-converted-space"> </span>// Set vertex coordinates<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt;"> <span class="Apple-converted-space"> </span>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-width: 1px; border-left-style: solid; border-left-color: 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-width: 1px; border-left-style: solid; border-left-color: 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></div></div></blockquote><div><br></div><div>-pc_hypre_type ams or PetscCall(PCHYPRESetType(pc, "ams"))</div><div><br></div><div>Thanks,</div><div>Pierre</div><br><blockquote type="cite"><div><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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 class="gmail_quote"><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-width: 1px; border-left-style: solid; border-left-color: 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;">Senior Research Software Engineer</span><span style="font-size: 10.5pt; font-family: Calibri, sans-serif;"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Arial, sans-serif;">High Performance Systems Engineering Group</span><span style="font-size: 10.5pt; font-family: Calibri, sans-serif;"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Arial, sans-serif;">Hartree Centre | Science and Technology Facilities Council</span><span style="font-size: 10.5pt; font-family: Calibri, sans-serif;"><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;"> </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);"><span id="cid:ii_191c843d0a64cff311"><image001.png></span></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 class="Apple-converted-space"> </span></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></div></div></div></div></div></div></div></div></div></blockquote></div><br></body></html>