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 DMMGArray PetscFortranAddr
14: #define DMComposite PetscFortranAddr
15: #define DM PetscFortranAddr
17: #define DALocalInfo integer
18: !
19: ! DA_LOCAL_INFO_SIZE is one large than the size incase the DA is larger than an integer (on 64 bit systems).
20: ! non-int fields are not accessiable from fortran.
21: !
22: #define DA_LOCAL_INFO_SIZE 22
23: #define DA_LOCAL_INFO_DIM 1
24: #define DA_LOCAL_INFO_DOF 2
25: #define DA_LOCAL_INFO_MX 4
26: #define DA_LOCAL_INFO_MY 5
27: #define DA_LOCAL_INFO_MZ 6
28: #define DA_LOCAL_INFO_XS 7
29: #define DA_LOCAL_INFO_YS 8
30: #define DA_LOCAL_INFO_ZS 9
31: #define DA_LOCAL_INFO_XM 10
32: #define DA_LOCAL_INFO_YM 11
33: #define DA_LOCAL_INFO_ZM 12
34: #define DA_LOCAL_INFO_GXS 13
35: #define DA_LOCAL_INFO_GYS 14
36: #define DA_LOCAL_INFO_GZS 15
37: #define DA_LOCAL_INFO_GXM 16
38: #define DA_LOCAL_INFO_GYM 17
39: #define DA_LOCAL_INFO_GZM 18
41: #define XG_RANGE in(DA_LOCAL_INFO_GXS)+1:in(DA_LOCAL_INFO_GXS)+in(DA_LOCAL_INFO_GXM)
42: #define YG_RANGE in(DA_LOCAL_INFO_GYS)+1:in(DA_LOCAL_INFO_GYS)+in(DA_LOCAL_INFO_GYM)
43: #define ZG_RANGE in(DA_LOCAL_INFO_GZS)+1:in(DA_LOCAL_INFO_GZS)+in(DA_LOCAL_INFO_GZM)
44: #define X_RANGE in(DA_LOCAL_INFO_XS)+1:in(DA_LOCAL_INFO_XS)+in(DA_LOCAL_INFO_XM)
45: #define Y_RANGE in(DA_LOCAL_INFO_YS)+1:in(DA_LOCAL_INFO_YS)+in(DA_LOCAL_INFO_YM)
46: #define Z_RANGE in(DA_LOCAL_INFO_ZS)+1:in(DA_LOCAL_INFO_ZS)+in(DA_LOCAL_INFO_ZM)
48: #define DAInterpolationType PetscEnum
49: #define DA_Q0 0
50: #define DA_Q1 1
52: #endif
55: #if !defined (PETSC_AVOID_DECLARATIONS)
56: !
57: ! Types of stencils
58: !
59: PetscEnum DA_STENCIL_STAR,DA_STENCIL_BOX
61: parameter (DA_STENCIL_STAR = 0,DA_STENCIL_BOX = 1)
62: !
63: ! Types of periodicity
64: !
65: PetscEnum DA_NONPERIODIC,DA_XPERIODIC,DA_YPERIODIC,DA_XYPERIODIC
66: PetscEnum DA_XYZPERIODIC,DA_XZPERIODIC,DA_YZPERIODIC,DA_ZPERIODIC
68: parameter (DA_NONPERIODIC = 0,DA_XPERIODIC = 1,DA_YPERIODIC = 2)
69: parameter (DA_XYPERIODIC = 3,DA_XYZPERIODIC = 4)
70: parameter (DA_XZPERIODIC = 5,DA_YZPERIODIC = 6,DA_ZPERIODIC = 7)
71: !
72: ! DA Directions
73: !
74: PetscEnum DA_X,DA_Y,DA_Z
76: parameter (DA_X = 0,DA_Y = 1,DA_Z = 2)
77: !
78: ! End of Fortran include file for the DA package in PETSc
80: #endif