[petsc-users] SNESDMDASNESSetFunctionLocal in Fortran

Matthew Knepley knepley at gmail.com
Sun May 14 11:24:02 CDT 2023


On Sun, May 14, 2023 at 12:06 PM Khaled Nabil Shar Abdelaziz <
kabdelaz at purdue.edu> wrote:

> Hey there,
>
>
>
> 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.
>
>
>
> 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?
>

I think we show how to do this here:

  https://gitlab.com/petsc/petsc/-/blob/main/src/snes/tutorials/ex5f90t.F90

  Thanks,

     Matt


> Thanks in advance!
>
>
>
> Best regards,
>
> Khaled
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230514/890eb8d5/attachment.html>


More information about the petsc-users mailing list