Actual source code: petscda.h

  1: !
  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: !
 20: #define DA_LOCAL_INFO_SIZE 22
 21: #define DA_LOCAL_INFO_DIM 1
 22: #define DA_LOCAL_INFO_DOF 2
 23: #define DA_LOCAL_INFO_PT 4
 24: #define DA_LOCAL_INFO_ST 5
 25: #define DA_LOCAL_INFO_MX 6
 26: #define DA_LOCAL_INFO_MY 7
 27: #define DA_LOCAL_INFO_MZ 8
 28: #define DA_LOCAL_INFO_XS 9
 29: #define DA_LOCAL_INFO_YS 10
 30: #define DA_LOCAL_INFO_ZS 11
 31: #define DA_LOCAL_INFO_XM 12
 32: #define DA_LOCAL_INFO_YM 13
 33: #define DA_LOCAL_INFO_ZM 14
 34: #define DA_LOCAL_INFO_GXS 15
 35: #define DA_LOCAL_INFO_GYS 16
 36: #define DA_LOCAL_INFO_GZS 17
 37: #define DA_LOCAL_INFO_GXM 18
 38: #define DA_LOCAL_INFO_GYM 19
 39: #define DA_LOCAL_INFO_GZM 20
 40: #define DA_LOCAL_INFO_DA  21

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

 49: #define DAInterpolationType PetscEnum
 50: #define DA_Q0 0
 51: #define DA_Q1 1

 53: #endif


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

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

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

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

 81: #endif