Date: 2026-05-01T06:11:45+00:00

Actual source code: zdasubf.c

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

      4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      5:   #define dmdagetprocessorsubset_  DMDAGETPROCESSORSUBSET
      6:   #define dmdagetprocessorsubsets_ DMDAGETPROCESSORSUBSETS
      7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
      8:   #define dmdagetprocessorsubset_  dmdagetprocessorsubset
      9:   #define dmdagetprocessorsubsets_ dmdagetprocessorsubsets
     10: #endif

     12: PETSC_EXTERN void dmdagetprocessorsubset_(DM *da, DMDirection *dir, PetscInt *gp, MPI_Fint *fcomm, int *__ierr)
     13: {
     14:   MPI_Comm comm;
     15:   *__ierr = DMDAGetProcessorSubset(*da, *dir, *gp, &comm);
     16:   *fcomm  = MPI_Comm_c2f(comm);
     17: }
     18: PETSC_EXTERN void dmdagetprocessorsubsets_(DM *da, DMDirection *dir, MPI_Fint *subfcomm, int *__ierr)
     19: {
     20:   MPI_Comm subcomm;
     21:   *__ierr   = DMDAGetProcessorSubsets(*da, *dir, &subcomm);
     22:   *subfcomm = MPI_Comm_c2f(subcomm);
     23: }