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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMBoundaryType.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMBoundaryType</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.14.5 2021-03-03</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.14.5 v3.14.5 docs/manualpages/DM/DMBoundaryType.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMBoundaryType"><H1>DMBoundaryType</H1></A>
Describes the choice for fill of ghost cells on physical domain boundaries.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
typedef enum {<A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_NONE</A>, <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_GHOSTED</A>, <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_MIRROR</A>, <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_PERIODIC</A>, <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_TWIST</A>} <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DMBoundaryType</A>;
</PRE>
<P>
A boundary may be of type <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_NONE</A> (no ghost nodes), <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_GHOSTED</A> (ghost vertices/cells
exist but aren't filled; you can put values into them and then apply a stencil that uses those ghost locations),
<A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_MIRROR</A> (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), <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_PERIODIC</A> (ghost vertices/cells filled by the opposite
edge of the domain), or <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_TWIST</A> (like periodic, only glued backwards like a Mobius strip).
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
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 <A HREF="../DMDA/DMDASetStencilWidth.html#DMDASetStencilWidth">DMDASetStencilWidth</A>().
<P>
If the physical grid points have values 0 1 2 3 with <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_MIRROR</A> then the local vector with ghost points has the values 1 0 1 2 3 2 .
<P>
<H3><FONT COLOR="#CC3333">Developer Notes</FONT></H3>
Should <A HREF="../DM/DMBoundaryType.html#DMBoundaryType">DM_BOUNDARY_MIRROR</A> have the same meaning with <A HREF="../DMDA/DMDAInterpolationType.html#DMDAInterpolationType">DMDA_Q0</A>, 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?
<P>
<H3><FONT COLOR="#CC3333">References</FONT></H3>
https://scicomp.stackexchange.com/questions/5355/writing-the-poisson-equation-finite-difference-matrix-with-neumann-boundary-cond
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DMDA/DMDASetBoundaryType.html#DMDASetBoundaryType">DMDASetBoundaryType</A>(), <A HREF="../DMDA/DMDACreate1d.html#DMDACreate1d">DMDACreate1d</A>(), <A HREF="../DMDA/DMDACreate2d.html#DMDACreate2d">DMDACreate2d</A>(), <A HREF="../DMDA/DMDACreate3d.html#DMDACreate3d">DMDACreate3d</A>(), <A HREF="../DMDA/DMDACreate.html#DMDACreate">DMDACreate</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>beginner<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/../../include/petscdmtypes.h.html#DMBoundaryType">src/dm/../../include/petscdmtypes.h</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/dm/impls/stag/tutorials/ex1.c.html">src/dm/impls/stag/tutorials/ex1.c.html</A><BR>
<A HREF="../../../src/dm/impls/stag/tutorials/ex2.c.html">src/dm/impls/stag/tutorials/ex2.c.html</A><BR>
<A HREF="../../../src/dm/impls/stag/tutorials/ex3.c.html">src/dm/impls/stag/tutorials/ex3.c.html</A><BR>
<A HREF="../../../src/dm/impls/stag/tutorials/ex4.c.html">src/dm/impls/stag/tutorials/ex4.c.html</A><BR>
<A HREF="../../../src/dm/impls/stag/tutorials/ex6.c.html">src/dm/impls/stag/tutorials/ex6.c.html</A><BR>
<A HREF="../../../src/dm/tutorials/ex1.c.html">src/dm/tutorials/ex1.c.html</A><BR>
<A HREF="../../../src/dm/tutorials/ex3.c.html">src/dm/tutorials/ex3.c.html</A><BR>
<A HREF="../../../src/dm/tutorials/ex4.c.html">src/dm/tutorials/ex4.c.html</A><BR>
<A HREF="../../../src/dm/tutorials/ex5.c.html">src/dm/tutorials/ex5.c.html</A><BR>
<A HREF="../../../src/dm/tutorials/ex6.c.html">src/dm/tutorials/ex6.c.html</A><BR>
<A HREF="../../../src/dm/tutorials/ex7.c.html">src/dm/tutorials/ex7.c.html</A><BR>
<BR><A HREF="./index.html">Index of all DM routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|