Actual source code: zplexsectionf90.c

      1: #include <petsc/private/fortranimpl.h>
      2: #include <petscdmplex.h>
      3: #include <petsc/private/f90impl.h>

      5: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      6:   #define dmplexcreatesection_ DMPLEXCREATESECTION
      7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) && !defined(FORTRANDOUBLEUNDERSCORE)
      8:   #define dmplexcreatesection_ dmplexcreatesection
      9: #endif

     11: PETSC_EXTERN void dmplexcreatesection_(DM *dm, F90Array1d *ptrL, F90Array1d *ptrC, F90Array1d *ptrD, PetscInt *numBC, F90Array1d *ptrF, F90Array1d *ptrCp, F90Array1d *ptrP, IS *perm, PetscSection *section, int *ierr PETSC_F90_2PTR_PROTO(ptrLd) PETSC_F90_2PTR_PROTO(ptrCd) PETSC_F90_2PTR_PROTO(ptrDd) PETSC_F90_2PTR_PROTO(ptrFd) PETSC_F90_2PTR_PROTO(ptrCpd) PETSC_F90_2PTR_PROTO(ptrPd))
     12: {
     13:   DMLabel  *labels = NULL;
     14:   PetscInt *numComp;
     15:   PetscInt *numDof;
     16:   PetscInt *bcField;
     17:   IS       *bcComps;
     18:   IS       *bcPoints;

     20:   *ierr = F90Array1dAccess(ptrL, MPIU_FORTRANADDR, (void **)&labels PETSC_F90_2PTR_PARAM(ptrLd));
     21:   if (*ierr) return;
     22:   *ierr = F90Array1dAccess(ptrC, MPIU_INT, (void **)&numComp PETSC_F90_2PTR_PARAM(ptrCd));
     23:   if (*ierr) return;
     24:   *ierr = F90Array1dAccess(ptrD, MPIU_INT, (void **)&numDof PETSC_F90_2PTR_PARAM(ptrDd));
     25:   if (*ierr) return;
     26:   *ierr = F90Array1dAccess(ptrF, MPIU_INT, (void **)&bcField PETSC_F90_2PTR_PARAM(ptrFd));
     27:   if (*ierr) return;
     28:   *ierr = F90Array1dAccess(ptrCp, MPIU_FORTRANADDR, (void **)&bcComps PETSC_F90_2PTR_PARAM(ptrCpd));
     29:   if (*ierr) return;
     30:   *ierr = F90Array1dAccess(ptrP, MPIU_FORTRANADDR, (void **)&bcPoints PETSC_F90_2PTR_PARAM(ptrPd));
     31:   if (*ierr) return;
     32:   *ierr = DMPlexCreateSection(*dm, labels, numComp, numDof, *numBC, bcField, bcComps, bcPoints, *perm, section);
     33: }