Actual source code: zpartyf.c

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

  4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  5:   #define matpartitioningpartysetglobal_ MATPARTITIONINGPARTYSETGLOBAL
  6:   #define matpartitioningpartysetlocal_  MATPARTITIONINGPARTYSETLOCAL
  7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
  8:   #define matpartitioningpartysetglobal_ matpartitioningpartysetglobal
  9:   #define matpartitioningpartysetlocal_  matpartitioningpartysetlocal
 10: #endif

 12: PETSC_EXTERN void matpartitioningpartysetglobal_(MatPartitioning *part, char *method, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 13: {
 14:   char *t;
 15:   FIXCHAR(method, len, t);
 16:   *ierr = MatPartitioningPartySetGlobal(*part, t);
 17:   if (*ierr) return;
 18:   FREECHAR(method, t);
 19: }

 21: PETSC_EXTERN void matpartitioningpartysetlocal_(MatPartitioning *part, char *method, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 22: {
 23:   char *t;
 24:   FIXCHAR(method, len, t);
 25:   *ierr = MatPartitioningPartySetLocal(*part, t);
 26:   if (*ierr) return;
 27:   FREECHAR(method, t);
 28: }