DMPatchCreateGrid#
Create a DMPATCH whose coarse DM is a structured DMDA of the requested global size, with the given patch and process-grid sizes
Synopsis#
#include "petscdmpatch.h"
PetscErrorCode DMPatchCreateGrid(MPI_Comm comm, PetscInt dim, MatStencil patchSize, MatStencil commSize, MatStencil gridSize, DM *dm)
Collective
Input Parameters#
comm - the MPI communicator
dim - the spatial dimension (1, 2, or 3); unused dimensions of
gridSizeandpatchSizeare forced to 1patchSize -
MatStencilgiving the size of each patch in cellscommSize -
MatStencilgiving the process grid used per patch (seeDMPatchSetCommSize())gridSize -
MatStencilgiving the global cell count of the underlyingDMDAin each dimension
Output Parameter#
dm - the newly created
DMPATCH
Note#
The coarse DM is created as a DMDA with a single degree of freedom per node, stencil width 1, and DM_BOUNDARY_NONE on every side.
See Also#
DMPATCH, DMPatchCreate(), DMPatchSetPatchSize(), DMPatchSetCommSize(), DMDA, MatStencil
Level#
developer
Location#
src/dm/impls/patch/patchcreate.c
Index of all DMPatch routines
Table of Contents for all manual pages
Index of all manual pages