[petsc-dev] PetscSF in Fortran

Adrian Croucher a.croucher at auckland.ac.nz
Wed Sep 20 18:35:27 CDT 2017


For the dual-porosity stuff I'm working on, I'm creating a modified 
DMPlex. Looking at e.g. TS ex11.c (in the SplitFaces() routine), it 
appears I am going to have to set up a PetscSF for the new DM (from what 
I can gather, that is needed for managing parallel communication of 
partition ghost cell values).

The way I've set up the modified DMPlex, the partition ghost cells are 
in the same locations as they were in the original single-porosity DM. 
So I'm thinking I basically just have to copy the SF straight over from 
the original DM.

The routine DMGetPointSF() seems to work OK in Fortran, but I'm having a 
bit of trouble with PetscSFGetGraph().

When I try to declare an array of type PetscSFNode for the iremote 
parameter, it doesn't seem to know about PetscSFNode, even though I have 
a 'use petsc' in my code, which normally gives access to everything.

Also I'm not sure of exactly how to set up the ilocal and iremote array 
parameters for this function in Fortran. How should they be declared- as 
pointer arrays?

- Adrian

Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611

More information about the petsc-dev mailing list