DMCreateLocalVector#

Creates a local vector from a DM object.

Synopsis#

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCreateLocalVector(DM dm, Vec *vec)

Not Collective

Input Parameter#

  • dm - the DM object

Output Parameter#

  • vec - the local vector

Notes#

A local vector usually has ghost locations that contain values that are owned by different MPI ranks. A global vector has no ghost locations.

.seealso: Vec, DMCreateGlobalVector(), DMGetLocalVector(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix() DMGlobalToLocalBegin(), DMGlobalToLocalEnd()

Level#

beginner

Location#

src/dm/interface/dm.c

Examples#

src/dm/impls/plex/tutorials/ex14.c.html
src/dm/tutorials/ex13f90.F90.html
src/dm/tutorials/ex1.c.html
src/dm/tutorials/ex2.c.html
src/dm/tutorials/ex5.c.html
src/dm/tutorials/ex6.c.html
src/dm/tutorials/ex7.c.html
src/dm/tutorials/ex9.c.html
src/dm/field/tutorials/ex1.c.html
src/ksp/ksp/tutorials/ex14f.F90.html
src/ksp/ksp/tutorials/ex42.c.html

Implementations#

DMCreateLocalVector_Composite in src/dm/impls/composite/pack.c
DMCreateLocalVector_DA in src/dm/impls/da/dalocal.c
DMCreateLocalVector_pforest in src/dm/impls/forest/p4est/pforest.h
DMCreateLocalVector_Moab in src/dm/impls/moab/dmmbvec.cxx
DMCreateLocalVector_Network in src/dm/impls/network/networkcreate.c
DMCreateLocalVector_Patch in src/dm/impls/patch/patch.c
DMCreateLocalVector_Plex in src/dm/impls/plex/plexcreate.c
DMCreateLocalVector_Redundant in src/dm/impls/redundant/dmredundant.c
DMCreateLocalVector_Shell in src/dm/impls/shell/dmshell.c
DMCreateLocalVector_Stag in src/dm/impls/stag/stag.c
DMCreateLocalVector_Swarm in src/dm/impls/swarm/swarm.c


Edit on GitLab

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