Actual source code: zsfutilsf.c

  1: #include <petsc/private/fortranimpl.h>
  2: #include <petscsf.h>

  4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  5:   #define petscsfdistributesection_ PETSCSFDISTRIBUTESECTION
  6:   #define petscsfgetgraphlayout_    PETSCSFGETGRAPHLAYOUT
  7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
  8:   #define petscsfdistributesection_ petscsfdistributesection
  9:   #define petscsfgetgraphlayout_    petscsfgetgraphlayout
 10: #endif

 12: PETSC_EXTERN void petscsfdistributesection_(PetscSF *sf, PetscSection *rootSection, PetscInt **remoteOffsets, PetscSection *leafSection, PetscErrorCode *__ierr)
 13: {
 14:   if (remoteOffsets != PETSC_NULL_INTEGER_Fortran) {
 15:     (void)PetscError(PETSC_COMM_SELF, __LINE__, "PetscSFDistributeSection_Fortran", __FILE__, PETSC_ERR_SUP, PETSC_ERROR_INITIAL, "The remoteOffsets argument must be PETSC_NULL_INTEGER in Fortran");
 16:     *__ierr = PETSC_ERR_SUP;
 17:     return;
 18:   }
 19:   *__ierr = PetscSFDistributeSection(*sf, *rootSection, NULL, *leafSection);
 20: }

 22: PETSC_EXTERN void petscsfgetgraphlayout_(PetscSF *sf, PetscLayout *layout, PetscInt *nleaves, const PetscInt *ilocal[], PetscInt *gremote[], PetscErrorCode *__ierr)
 23: {
 24:   *__ierr = PetscSFGetGraphLayout(*sf, layout, nleaves, ilocal, gremote);
 25: }