DMStagCreate3d#

Create an object to manage data living on the elements, faces, edges, and vertices of a parallelized regular 3D grid.

Synopsis#

PETSC_EXTERN PetscErrorCode DMStagCreate3d(MPI_Comm comm, DMBoundaryType bndx, DMBoundaryType bndy, DMBoundaryType bndz, PetscInt M, PetscInt N, PetscInt P, PetscInt m, PetscInt n, PetscInt p, PetscInt dof0, PetscInt dof1, PetscInt dof2, PetscInt dof3, DMStagStencilType stencilType, PetscInt stencilWidth, const PetscInt lx[], const PetscInt ly[], const PetscInt lz[], DM *dm)

Collective

Input Parameters#

Output Parameter#

Options Database Keys#

  • -dm_view - calls DMViewFromOptions() at the conclusion of DMSetUp()

  • -stag_grid_x - number of elements in the x direction

  • -stag_grid_y - number of elements in the y direction

  • -stag_grid_z - number of elements in the z direction

  • -stag_ranks_x - number of ranks in the x direction

  • -stag_ranks_y - number of ranks in the y direction

  • -stag_ranks_z - number of ranks in the z direction

  • -stag_ghost_stencil_width - width of ghost region, in elements

  • -stag_boundary_type x <none,ghosted,periodic> - DMBoundaryType value

  • -stag_boundary_type y <none,ghosted,periodic> - DMBoundaryType value

  • -stag_boundary_type z <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, DMStagCreate1d(), DMStagCreate2d(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateLocalVector(), DMLocalToGlobalBegin(), DMDACreate3d()

Level#

beginner

Location#

src/dm/impls/stag/stag3d.c

Examples#

src/dm/impls/stag/tutorials/ex4.c
src/dm/impls/stag/tutorials/ex6.c
src/dm/impls/stag/tutorials/ex3.c


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