petsc-3.8.4 2018-03-24
Report Typos and Errors

DMDANaturalToGlobalBegin

Maps values from a global vector in the "natural" ordering to a global vector in the PETSc DMDA grid ordering. Must be followed by DMDANaturalToGlobalEnd() to complete the exchange.

Synopsis

#include "petscdmda.h"   
PetscErrorCode  DMDANaturalToGlobalBegin(DM da,Vec g,InsertMode mode,Vec l)
Neighbor-wise Collective on DMDA

Input Parameters

da - the distributed array context
g - the global vector in a natural ordering
mode - one of INSERT_VALUES or ADD_VALUES

Output Parameter

l -the values in the DMDA ordering

Notes

The global and natural vectors used here need not be the same as those obtained from DMCreateGlobalVector() and DMDACreateNaturalVector(), BUT they must have the same parallel data layout; they could, for example, be obtained with VecDuplicate() from the DMDA originating vectors.

Keywords

distributed array, global to local, begin

See Also

DMDAGlobalToNaturalEnd(), DMDAGlobalToNaturalBegin(), DMLocalToGlobalBegin(), DMDACreate2d(),
DMGlobalToLocalBegin(), DMGlobalToLocalEnd(), DMDACreateNaturalVector()

Level:advanced
Location:
src/dm/impls/da/dagtol.c
Index of all DMDA routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/dm/examples/tutorials/ex6.c.html