Actual source code: petscda.h

  2: !
  3: !  Include file for Fortran use of the DA (distributed array) package in PETSc
  4: !
  5: #if !defined (__PETSCDA_H)

  8: #define DA PetscFortranAddr
  9: #define DAPeriodicType PetscEnum
 10: #define DAStencilType PetscEnum
 11: #define DADirection PetscEnum
 12: #define DMMG PetscFortranAddr
 13: #define VecPack PetscFortranAddr
 14: #define DM PetscFortranAddr

 16: #define DALocalInfo integer
 17: !
 18: !   DA_LOCAL_INFO_SIZE is one large than the size incase the DA is larger than an integer (on 64 bit systems).
 19: !   non-int fields are not accessiable from fortran.
 20: !
 21: #define DA_LOCAL_INFO_SIZE 22
 22: #define DA_LOCAL_INFO_DIM 1
 23: #define DA_LOCAL_INFO_DOF 2
 24: #define DA_LOCAL_INFO_MX 4
 25: #define DA_LOCAL_INFO_MY 5
 26: #define DA_LOCAL_INFO_MZ 6
 27: #define DA_LOCAL_INFO_XS 7
 28: #define DA_LOCAL_INFO_YS 8
 29: #define DA_LOCAL_INFO_ZS 9
 30: #define DA_LOCAL_INFO_XM 10
 31: #define DA_LOCAL_INFO_YM 11
 32: #define DA_LOCAL_INFO_ZM 12
 33: #define DA_LOCAL_INFO_GXS 13
 34: #define DA_LOCAL_INFO_GYS 14
 35: #define DA_LOCAL_INFO_GZS 15
 36: #define DA_LOCAL_INFO_GXM 16
 37: #define DA_LOCAL_INFO_GYM 17
 38: #define DA_LOCAL_INFO_GZM 18

 40: #define XG_RANGE in(DA_LOCAL_INFO_GXS)+1:in(DA_LOCAL_INFO_GXS)+in(DA_LOCAL_INFO_GXM)
 41: #define YG_RANGE in(DA_LOCAL_INFO_GYS)+1:in(DA_LOCAL_INFO_GYS)+in(DA_LOCAL_INFO_GYM)
 42: #define ZG_RANGE in(DA_LOCAL_INFO_GZS)+1:in(DA_LOCAL_INFO_GZS)+in(DA_LOCAL_INFO_GZM)
 43: #define X_RANGE in(DA_LOCAL_INFO_XS)+1:in(DA_LOCAL_INFO_XS)+in(DA_LOCAL_INFO_XM)
 44: #define Y_RANGE in(DA_LOCAL_INFO_YS)+1:in(DA_LOCAL_INFO_YS)+in(DA_LOCAL_INFO_YM)
 45: #define Z_RANGE in(DA_LOCAL_INFO_ZS)+1:in(DA_LOCAL_INFO_ZS)+in(DA_LOCAL_INFO_ZM)

 47: #define DAInterpolationType PetscEnum
 48: #define DA_Q0 0
 49: #define DA_Q1 1

 51: #endif


 54: #if !defined (PETSC_AVOID_DECLARATIONS)
 55: !
 56: !  Types of stencils
 57: !
 58:       PetscEnum DA_STENCIL_STAR,DA_STENCIL_BOX

 60:       parameter (DA_STENCIL_STAR = 0,DA_STENCIL_BOX = 1)
 61: !
 62: !  Types of periodicity
 63: !
 64:       PetscEnum DA_NONPERIODIC,DA_XPERIODIC,DA_YPERIODIC,DA_XYPERIODIC
 65:       PetscEnum DA_XYZPERIODIC,DA_XZPERIODIC,DA_YZPERIODIC,DA_ZPERIODIC

 67:       parameter (DA_NONPERIODIC = 0,DA_XPERIODIC = 1,DA_YPERIODIC = 2)
 68:       parameter (DA_XYPERIODIC = 3,DA_XYZPERIODIC = 4)
 69:       parameter (DA_XZPERIODIC = 5,DA_YZPERIODIC = 6,DA_ZPERIODIC = 7)
 70: !
 71: ! DA Directions
 72: !
 73:       PetscEnum DA_X,DA_Y,DA_Z

 75:       parameter (DA_X = 0,DA_Y = 1,DA_Z = 2)
 76: !
 77: !  End of Fortran include file for the DA package in PETSc

 79: #endif