petsc-3.11.4 2019-09-28
Report Typos and Errors

DMBoundaryType

Describes the choice for fill of ghost cells on physical domain boundaries.

Synopsis

typedef enum {DM_BOUNDARY_NONE, DM_BOUNDARY_GHOSTED, DM_BOUNDARY_MIRROR, DM_BOUNDARY_PERIODIC, DM_BOUNDARY_TWIST} DMBoundaryType;

A boundary may be of type DM_BOUNDARY_NONE (no ghost nodes), DM_BOUNDARY_GHOSTED (ghost vertices/cells exist but aren't filled; you can put values into them and then apply a stencil that uses those ghost locations), 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; not yet implemented for 3d), DM_BOUNDARY_PERIODIC (ghost vertices/cells filled by the opposite edge of the domain), or DM_BOUNDARY_TWIST (like periodic, only glued backwards like a Mobius strip).

Notes

This is information for the boundary of the __PHYSICAL__ domain. It has nothing to do with boundaries between processes. That width is always determined by the stencil width; see DMDASetStencilWidth().

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 .

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 as the 0th grid point where the physical boundary serves as the mirror?

References

http://scicomp.stackexchange.com/questions/5355/writing-the-poisson-equation-finite-difference-matrix-with-neumann-boundary-cond

See Also

DMDASetBoundaryType(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMDACreate()

Level

beginner

Location

src/dm/../../include/petscdmtypes.h

Examples

src/dm/impls/stag/examples/tutorials/ex1.c.html
src/dm/impls/stag/examples/tutorials/ex2.c.html
src/dm/impls/stag/examples/tutorials/ex3.c.html
src/dm/impls/stag/examples/tutorials/ex4.c.html
src/dm/examples/tutorials/ex1.c.html
src/dm/examples/tutorials/ex3.c.html
src/dm/examples/tutorials/ex4.c.html
src/dm/examples/tutorials/ex5.c.html
src/dm/examples/tutorials/ex6.c.html
src/dm/examples/tutorials/ex7.c.html
src/dm/examples/tutorials/ex9.c.html

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages