petsc-3.9.4 2018-09-11
Report Typos and Errors

DMCreate

Creates an empty DM object. The type can then be set with DMSetType().

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode  DMCreate(MPI_Comm comm,DM *dm)
If you never call DMSetType() it will generate an error when you try to use the vector.

Collective on MPI_Comm

Input Parameter

comm -The communicator for the DM object

Output Parameter

dm -The DM object

See Also

DMSetType(), DMDA, DMSLICED, DMCOMPOSITE, DMPLEX, DMMOAB, DMNETWORK

Level

beginner

Location

src/dm/interface/dm.c

Examples

src/dm/impls/plex/examples/tutorials/ex5.c.html
src/dm/impls/forest/examples/tutorials/ex1.c.html
src/dm/examples/tutorials/ex20.c.html
src/dm/examples/tutorials/swarm_ex1.c.html
src/dm/examples/tutorials/swarm_ex2.c.html
src/dm/examples/tutorials/swarm_ex3.c.html
src/ksp/ksp/examples/tutorials/ex70.c.html
src/ts/examples/tutorials/ex11.c.html

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.c
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_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_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