petsc-3.11.4 2019-09-28
Report Typos and Errors

DMGetCoordinates

Gets a global vector with the coordinates associated with the DM.

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMGetCoordinates(DM dm, Vec *c)
Collective on DM

Input Parameter

dm -the DM

Output Parameter

c -global coordinate vector

Note

This is a borrowed reference, so the user should NOT destroy this vector

Each process has only the local coordinates (does NOT have the ghost coordinates).

For DMDA, in two and three dimensions coordinates are interlaced (x_0,y_0,x_1,y_1,...) and (x_0,y_0,z_0,x_1,y_1,z_1...)

Keywords

distributed array, get, corners, nodes, local indices, coordinates

See Also

DMSetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM()

Level

intermediate

Location

src/dm/interface/dm.c

Examples

src/dm/impls/stag/examples/tutorials/ex3.c.html
src/dm/examples/tutorials/ex3.c.html
src/dm/examples/tutorials/ex4.c.html
src/dm/examples/tutorials/swarm_ex1.c.html
src/dm/examples/tutorials/swarm_ex3.c.html
src/ksp/ksp/examples/tutorials/ex49.c.html
src/ksp/ksp/examples/tutorials/ex69.c.html
src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex22.c.html
src/snes/examples/tutorials/ex33.c.html
src/snes/examples/tutorials/ex46.c.html

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