<div dir="ltr"><div dir="ltr">On Sun, May 14, 2023 at 12:06 PM Khaled Nabil Shar Abdelaziz <<a href="mailto:kabdelaz@purdue.edu">kabdelaz@purdue.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 class="msg-4686939616904422650">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_-4686939616904422650WordSection1">
<p class="MsoNormal">Hey there,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I'm having a problem with the DMDASNESSetFunctionLocal() function in C and its Fortran counterpart. The thing is, in C, you can pass a bunch of variables using the ctx parameter, but in Fortran, it only seems to accept one variable.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">What's weird is that the SNESSetFunction() function has a similar ctx parameter, but in Fortran, it can handle multiple variables for ctx, unlike DMDASNESSetFunctionLocal(). Do you know if this is on purpose, or am I missing something?</p></div></div></div></blockquote><div><br></div><div>I think we show how to do this here:</div><div><br></div><div> <a href="https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex5f90t.F90">https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex5f90t.F90</a></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-4686939616904422650"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_-4686939616904422650WordSection1">
<p class="MsoNormal">Thanks in advance!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Best regards,<u></u><u></u></p>
<p class="MsoNormal">Khaled<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="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>