DMCreate#

Creates an empty DM object. DMs are the abstract objects in PETSc that mediate between meshes and discretizations and the algebraic solvers, time integrators, and optimization algorithms.

Synopsis#

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCreate(MPI_Comm comm, DM *dm)

Collective

Input Parameter#

  • comm - The communicator for the DM object

Output Parameter#

  • dm - The DM object

Notes#

See DMType for a brief summary of available DM.

The type must then be set with DMSetType(). If you never call DMSetType() it will generate an error when you try to use the dm.

See Also#

DM Basics, DM, DMSetType(), DMType, DMDACreate(), DMDA, DMSLICED, DMCOMPOSITE, DMPLEX, DMMOAB, DMNETWORK

Level#

beginner

Location#

src/dm/interface/dm.c

Examples#

src/ts/tutorials/ex11_sa.c
src/ts/tutorials/ex47.c
src/ts/tutorials/ex45.c
src/ts/tutorials/ex30.c
src/ts/tutorials/ex53.c
src/ts/tutorials/ex52.c
src/ts/tutorials/ex76.c
src/ts/tutorials/ex18.c
src/ts/tutorials/ex48.c
src/ts/tutorials/ex11.c

Implementations#

DMCreate_Composite() in src/dm/impls/composite/pack.c
DMCreate_DA() in src/dm/impls/da/dacreate.c
DMCreate_Forest() in src/dm/impls/forest/forest.c
DMCreate_pforest() in src/dm/impls/forest/p4est/pforest.h
DMCreate_Moab() in src/dm/impls/moab/dmmoab.cxx
DMCreate_Network() in src/dm/impls/network/networkcreate.c
DMCreate_Patch() in src/dm/impls/patch/patchcreate.c
DMCreate_Plex() in src/dm/impls/plex/plexcreate.c
DMCreate_Product() in src/dm/impls/product/product.c
DMCreate_Redundant() in src/dm/impls/redundant/dmredundant.c
DMCreate_Shell() in src/dm/impls/shell/dmshell.c
DMCreate_Sliced() in src/dm/impls/sliced/sliced.c
DMCreate_Stag() in src/dm/impls/stag/stag.c
DMCreate_Swarm() in src/dm/impls/swarm/swarm.c


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