Actual source code: ziscoloringf90.c

      1: #include <petscis.h>
      2: #include <petsc/private/ftnimpl.h>

      4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      5:   #define iscoloringgetis_     ISCOLORINGGETIS
      6:   #define iscoloringrestoreis_ ISCOLORINGRESTOREIS
      7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
      8:   #define iscoloringgetis_     iscoloringgetis
      9:   #define iscoloringrestoreis_ iscoloringrestoreis
     10: #endif

     12: PETSC_EXTERN void iscoloringgetis_(ISColoring *iscoloring, PetscCopyMode *mode, PetscInt *n, F90Array1d *ptr, int *ierr PETSC_F90_2PTR_PROTO(ptrd))
     13: {
     14:   IS *lis;

     16:   *ierr = ISColoringGetIS(*iscoloring, *mode, n, &lis);
     17:   if (*ierr) return;
     18:   *ierr = F90Array1dCreate(lis, MPIU_FORTRANADDR, 1, *n, ptr PETSC_F90_2PTR_PARAM(ptrd));
     19: }

     21: PETSC_EXTERN void iscoloringrestoreis_(ISColoring *iscoloring, PetscCopyMode *mode, F90Array1d *ptr, int *ierr PETSC_F90_2PTR_PROTO(ptrd))
     22: {
     23:   IS *is;

     25:   *ierr = F90Array1dAccess(ptr, MPIU_FORTRANADDR, (void **)&is PETSC_F90_2PTR_PARAM(ptrd));
     26:   if (*ierr) return;
     27:   *ierr = F90Array1dDestroy(ptr, MPIU_FORTRANADDR PETSC_F90_2PTR_PARAM(ptrd));
     28:   if (*ierr) return;
     29:   *ierr = ISColoringRestoreIS(*iscoloring, *mode, &is);
     30: }