DMStagCreate1d#
Create an object to manage data living on the elements and vertices of a parallelized regular 1D grid.
Synopsis#
#include "petscdmstag.h"
PetscErrorCode DMStagCreate1d(MPI_Comm comm, DMBoundaryType bndx, PetscInt M, PetscInt dof0, PetscInt dof1, DMStagStencilType stencilType, PetscInt stencilWidth, const PetscInt lx[], DM *dm)
Collective
Input Parameters#
comm - MPI communicator
bndx - boundary type:
DM_BOUNDARY_NONE
,DM_BOUNDARY_PERIODIC
, orDM_BOUNDARY_GHOSTED
M - global number of elements
dof0 - number of degrees of freedom per vertex/0-cell
dof1 - number of degrees of freedom per element/1-cell
stencilType - ghost/halo region type:
DMSTAG_STENCIL_BOX
orDMSTAG_STENCIL_NONE
stencilWidth - width, in elements, of halo/ghost region
lx - array of local sizes, of length equal to the comm size, summing to
M
orNULL
Output Parameter#
dm - the new
DMSTAG
object
Options Database Keys#
-dm_view - calls
DMViewFromOptions()
at the conclusion ofDMSetUp()
-stag_grid_x
- number of elements in the x direction-stag_ghost_stencil_width - width of ghost region, in elements
-stag_boundary_type_x <none,ghosted,periodic> -
DMBoundaryType
value
Notes#
You must call DMSetUp()
after this call before using the DM
.
If you wish to use the options database (see the keys above) to change values in the DMSTAG
, you must call
DMSetFromOptions()
after this function but before DMSetUp()
.
See Also#
DMSTAG: Staggered, Structured Grid, DMSTAG
, DMStagCreate2d()
, DMStagCreate3d()
, DMDestroy()
, DMView()
, DMCreateGlobalVector()
, DMCreateLocalVector()
, DMLocalToGlobalBegin()
, DMDACreate1d()
Level#
beginner
Location#
Examples#
src/dm/impls/stag/tutorials/ex1.c
src/dm/impls/stag/tutorials/ex8.c
Index of all DMStag routines
Table of Contents for all manual pages
Index of all manual pages