forked from petsc/petsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpetscdmdatypes.h
75 lines (60 loc) · 2.5 KB
/
petscdmdatypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#pragma once
#include <petscdmtypes.h>
/* SUBMANSEC = DMDA */
/*E
DMDAStencilType - Determines if the stencil extends only along the coordinate directions, or also
to the northeast, northwest etc
Level: beginner
.seealso: [](ch_dmbase), `DMDA`, `DMDA_STENCIL_BOX`, `DMDA_STENCIL_STAR`,`DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDACreate()`, `DMDASetStencilType()`
E*/
typedef enum {
DMDA_STENCIL_STAR,
DMDA_STENCIL_BOX
} DMDAStencilType;
/*E
DMDAInterpolationType - Defines the type of interpolation that will be returned by
`DMCreateInterpolation()`.
Level: beginner
.seealso: [](ch_dmbase), `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`, `DMDACreate()`
E*/
typedef enum {
DMDA_Q0,
DMDA_Q1
} DMDAInterpolationType;
/*E
DMDAElementType - Defines the type of elements that will be returned by
`DMDAGetElements()`
Level: beginner
.seealso: [](ch_dmbase), `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMCreateInterpolation()`, `DMDASetInterpolationType()`,
`DMDASetElementType()`, `DMDAGetElements()`, `DMDARestoreElements()`, `DMDACreate()`
E*/
typedef enum {
DMDA_ELEMENT_P1,
DMDA_ELEMENT_Q1
} DMDAElementType;
/*S
DMDALocalInfo - C struct that contains information about a structured grid and a processes logical
location in it.
Level: beginner
Fortran Note:
This should be declared as
$ `DMDALocalInfo` :: info(DMDA_LOCAL_INFO_SIZE)
and the entries accessed via
.vb
info(DMDA_LOCAL_INFO_DIM)
info(DMDA_LOCAL_INFO_DOF) etc.
.ve
The entries bx,by,bz, st, and da are not accessible from Fortran.
.seealso: [](ch_dmbase), `DMDA`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDestroy()`, `DM`, `DMDAGetLocalInfo()`, `DMDAGetInfo()`
S*/
typedef struct {
PetscInt dim, dof, sw;
PetscInt mx, my, mz; /* global number of grid points in each direction */
PetscInt xs, ys, zs; /* starting point of this processor, excluding ghosts */
PetscInt xm, ym, zm; /* number of grid points on this processor, excluding ghosts */
PetscInt gxs, gys, gzs; /* starting point of this processor including ghosts */
PetscInt gxm, gym, gzm; /* number of grid points on this processor including ghosts */
DMBoundaryType bx, by, bz; /* type of ghost nodes at boundary */
DMDAStencilType st;
DM da;
} DMDALocalInfo;