xref: /petsc/include/petscdmtypes.h (revision 5675c177b73789cdc05a8f1f3054cb769875cf2b)
11e25c274SJed Brown #if !defined(_PETSCDMTYPES_H)
21e25c274SJed Brown #define _PETSCDMTYPES_H
31e25c274SJed Brown 
41e25c274SJed Brown /*S
51e25c274SJed Brown      DM - Abstract PETSc object that manages an abstract grid object and its interactions with the algebraic solvers
61e25c274SJed Brown 
71e25c274SJed Brown    Level: intermediate
81e25c274SJed Brown 
91e25c274SJed Brown   Concepts: grids, grid refinement
101e25c274SJed Brown 
111e25c274SJed Brown    Notes: The DMDACreate() based object and the DMCompositeCreate() based object are examples of DMs
121e25c274SJed Brown 
131e25c274SJed Brown .seealso:  DMCompositeCreate(), DMDACreate(), DMSetType(), DMType
141e25c274SJed Brown S*/
151e25c274SJed Brown typedef struct _p_DM* DM;
161e25c274SJed Brown 
17bff4a2f0SMatthew G. Knepley /*E
18bff4a2f0SMatthew G. Knepley   DMBoundaryType - Describes the choice for fill of ghost cells on physical domain boundaries.
19bff4a2f0SMatthew G. Knepley 
20bff4a2f0SMatthew G. Knepley   Level: beginner
21bff4a2f0SMatthew G. Knepley 
22619efd4aSMatthew G. Knepley   A boundary may be of type DM_BOUNDARY_NONE (no ghost nodes), DM_BOUNDARY_GHOSTED (ghost vertices/cells
23bff4a2f0SMatthew G. Knepley   exist but aren't filled, you can put values into them and then apply a stencil that uses those ghost locations),
24288e7d53SBarry Smith   DM_BOUNDARY_MIRROR (the ghost value is the same as the value 1 grid point in; that is the 0th grid point in the real mesh acts like a mirror to define the ghost point value;
25288e7d53SBarry Smith   not yet implemented for 3d), DM_BOUNDARY_PERIODIC (ghost vertices/cells filled by the opposite
26bff4a2f0SMatthew G. Knepley   edge of the domain), or DM_BOUNDARY_TWIST (like periodic, only glued backwards like a Mobius strip).
27bff4a2f0SMatthew G. Knepley 
28bff4a2f0SMatthew G. Knepley   Note: This is information for the boundary of the __PHYSICAL__ domain. It has nothing to do with boundaries between
29bff4a2f0SMatthew G. Knepley   processes, that width is always determined by the stencil width, see DMDASetStencilWidth().
30bff4a2f0SMatthew G. Knepley 
31288e7d53SBarry Smith   Note: If the physical grid points have values  0 1 2 3 with DM_BOUNDARY_MIRROR then the local vector with ghost points has the values 1 0 1 2 3 2
32288e7d53SBarry Smith 
33288e7d53SBarry Smith   Developer notes: Should DM_BOUNDARY_MIRROR have the same meaning with DMDA_Q0, that is a staggered grid? In that case should the ghost point have the same value
34288e7d53SBarry Smith   as the 0th grid point where the physical boundary serves as the mirror?
35288e7d53SBarry Smith 
36288e7d53SBarry Smith   References: http://scicomp.stackexchange.com/questions/5355/writing-the-poisson-equation-finite-difference-matrix-with-neumann-boundary-cond
37288e7d53SBarry Smith 
38bff4a2f0SMatthew G. Knepley .seealso: DMDASetBoundaryType(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDACreate()
39bff4a2f0SMatthew G. Knepley E*/
40bff4a2f0SMatthew G. Knepley typedef enum {DM_BOUNDARY_NONE, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_MIRROR, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_TWIST} DMBoundaryType;
41bff4a2f0SMatthew G. Knepley 
4262a38674SMatthew G. Knepley /*E
4362a38674SMatthew G. Knepley   DMPointLocationType - Describes the method to handle point location failure
4462a38674SMatthew G. Knepley 
4562a38674SMatthew G. Knepley   Level: beginner
4662a38674SMatthew G. Knepley 
4762a38674SMatthew G. Knepley   If a search using DM_POINTLOCATION_NONE fails, the failure is signaled with a negative cell number. On the
4862a38674SMatthew G. Knepley   other hand, if DM_POINTLOCATION_NEAREST is used, on failure, the (approximate) nearest point in the mesh is
492d1fa6caSMatthew G. Knepley   used, replacing the given point in the input vector. DM_POINTLOCATION_REMOVE returns values only for points
502d1fa6caSMatthew G. Knepley   which were located.
5162a38674SMatthew G. Knepley 
5262a38674SMatthew G. Knepley .seealso: DMLocatePoints()
5362a38674SMatthew G. Knepley E*/
542d1fa6caSMatthew G. Knepley typedef enum {DM_POINTLOCATION_NONE, DM_POINTLOCATION_NEAREST, DM_POINTLOCATION_REMOVE} DMPointLocationType;
5562a38674SMatthew G. Knepley 
56*5675c177SMatthew G. Knepley /*E
57*5675c177SMatthew G. Knepley   DMAdaptationType - Describes the strategy used for adaptive solves
58*5675c177SMatthew G. Knepley 
59*5675c177SMatthew G. Knepley   Level: beginner
60*5675c177SMatthew G. Knepley 
61*5675c177SMatthew G. Knepley   If a search using DM_POINTLOCATION_NONE fails, the failure is signaled with a negative cell number. On the
62*5675c177SMatthew G. Knepley   other hand, if DM_POINTLOCATION_NEAREST is used, on failure, the (approximate) nearest point in the mesh is
63*5675c177SMatthew G. Knepley   used, replacing the given point in the input vector. DM_POINTLOCATION_REMOVE returns values only for points
64*5675c177SMatthew G. Knepley   which were located.
65*5675c177SMatthew G. Knepley 
66*5675c177SMatthew G. Knepley .seealso: DMAdaptorSolve()
67*5675c177SMatthew G. Knepley E*/
68*5675c177SMatthew G. Knepley typedef enum {DM_ADAPTATION_INITIAL, DM_ADAPTATION_SEQUENTIAL, DM_ADAPTATION_MULTILEVEL} DMAdaptationType;
69*5675c177SMatthew G. Knepley 
7077623264SMatthew G. Knepley /*S
7177623264SMatthew G. Knepley   PetscPartitioner - PETSc object that manages a graph partitioner
7277623264SMatthew G. Knepley 
7377623264SMatthew G. Knepley   Level: intermediate
7477623264SMatthew G. Knepley 
7577623264SMatthew G. Knepley   Concepts: partition, mesh
7677623264SMatthew G. Knepley 
7777623264SMatthew G. Knepley .seealso: PetscPartitionerCreate(), PetscPartitionerSetType(), PetscPartitionerType
7877623264SMatthew G. Knepley S*/
7977623264SMatthew G. Knepley typedef struct _p_PetscPartitioner *PetscPartitioner;
8077623264SMatthew G. Knepley 
811e25c274SJed Brown #endif
82