[petsc-users] Petsc DMLabel Fortran Stub request

Matthew Knepley knepley at gmail.com
Mon Mar 27 19:48:54 CDT 2023


On Fri, Jan 6, 2023 at 10:03 AM Nicholas Arnold-Medabalimi <
narnoldm at umich.edu> wrote:

> Hi Petsc Users
>

I apologize. I found this email today and it looks like no one answered.


> I am trying to use the sequence of
> call DMLabelPropagateBegin(synchLabel,sf,ierr)
> call
> DMLabelPropagatePush(synchLabel,sf,PETSC_NULL_OPTIONS,PETSC_NULL_INTEGER,ierr)
> call DMLabelPropagateEnd(synchLabel,sf, ierr)
> in fortran.
>
> I apologize if I messed something up, it appears as if the
> DMLabelPropagatePush command doesn't have an appropriate Fortran interface
> as I get an undefined reference when it is called.
>

Yes, it takes a function pointer, and using function pointers with Fortran
is not easy, although it can be done. It might be better to create a C
function with some default marking and then wrap that. What do you want to
do?

  Thanks,

     Matt


> I would appreciate any assistance.
>
> As a side note in practice, what is the proper Fortran NULL pointer to use
> for void arguments? I used an integer one temporarily to get to the
> undefined reference error but I assume it doesn't matter?
>
>
> Sincerely
> Nicholas
>
> --
> Nicholas Arnold-Medabalimi
>
> Ph.D. Candidate
> Computational Aeroscience Lab
> University of Michigan
>


-- 
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/20230327/1e55e580/attachment.html>


More information about the petsc-users mailing list