Date: 2025-03-28T21:10:41+00:00

Actual source code: petscdmda.h

      1: !
      2: !  Include file for Fortran use of the DMDA (distributed array) package in PETSc
      3: !
      4: #if !defined (PETSCDMDADEF_H)
      5: #define PETSCDMDADEF_H

      7: #include "petsc/finclude/petscis.h"
      8: #include "petsc/finclude/petscvec.h"
      9: #include "petsc/finclude/petscmat.h"
     10: #include "petsc/finclude/petscdm.h"

     12: #define DMDAStencilType PetscEnum

     14: #define DMDALocalInfo PetscInt
     15: !
     16: !   DMDA_LOCAL_INFO_SIZE is one larger than the size in case the DMDA is larger than an integer (on 64-bit systems).
     17: !   non-int fields are not accessible from Fortran.
     18: !
     19: #define DMDA_LOCAL_INFO_SIZE 25
     20: #define DMDA_LOCAL_INFO_DIM 1
     21: #define DMDA_LOCAL_INFO_DOF 2
     22: #define DMDA_LOCAL_INFO_MX 4
     23: #define DMDA_LOCAL_INFO_MY 5
     24: #define DMDA_LOCAL_INFO_MZ 6
     25: #define DMDA_LOCAL_INFO_XS 7
     26: #define DMDA_LOCAL_INFO_YS 8
     27: #define DMDA_LOCAL_INFO_ZS 9
     28: #define DMDA_LOCAL_INFO_XM 10
     29: #define DMDA_LOCAL_INFO_YM 11
     30: #define DMDA_LOCAL_INFO_ZM 12
     31: #define DMDA_LOCAL_INFO_GXS 13
     32: #define DMDA_LOCAL_INFO_GYS 14
     33: #define DMDA_LOCAL_INFO_GZS 15
     34: #define DMDA_LOCAL_INFO_GXM 16
     35: #define DMDA_LOCAL_INFO_GYM 17
     36: #define DMDA_LOCAL_INFO_GZM 18

     38: #define XG_RANGE in(DMDA_LOCAL_INFO_GXS)+1:in(DMDA_LOCAL_INFO_GXS)+in(DMDA_LOCAL_INFO_GXM)
     39: #define YG_RANGE in(DMDA_LOCAL_INFO_GYS)+1:in(DMDA_LOCAL_INFO_GYS)+in(DMDA_LOCAL_INFO_GYM)
     40: #define ZG_RANGE in(DMDA_LOCAL_INFO_GZS)+1:in(DMDA_LOCAL_INFO_GZS)+in(DMDA_LOCAL_INFO_GZM)
     41: #define X_RANGE in(DMDA_LOCAL_INFO_XS)+1:in(DMDA_LOCAL_INFO_XS)+in(DMDA_LOCAL_INFO_XM)
     42: #define Y_RANGE in(DMDA_LOCAL_INFO_YS)+1:in(DMDA_LOCAL_INFO_YS)+in(DMDA_LOCAL_INFO_YM)
     43: #define Z_RANGE in(DMDA_LOCAL_INFO_ZS)+1:in(DMDA_LOCAL_INFO_ZS)+in(DMDA_LOCAL_INFO_ZM)

     45: #define DMDAInterpolationType PetscEnum
     46: #define DMDAElementType PetscEnum

     48: #endif