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 n, InsertMode mode, Vec g)
Neighbor-wise Collective
Input Parameters#
da - the
DMDAcontextg - the global vector in a natural ordering, see
DMDACreateNaturalVector()mode - one of
INSERT_VALUESorADD_VALUES
Output Parameter#
n - the values in the
DMDAordering
Note#
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.
See Also#
DMDA - Creating vectors for structured grids, DM, DMDA, DMDAGlobalToNaturalEnd(), DMDAGlobalToNaturalBegin(), DMLocalToGlobalBegin(), DMDACreate2d(),
DMGlobalToLocalBegin(), DMGlobalToLocalEnd(), DMDACreateNaturalVector()
Level#
advanced
Location#
Examples#
src/dm/tutorials/ex6.c
src/ksp/ksp/tutorials/ex71.c
Index of all DMDA routines
Table of Contents for all manual pages
Index of all manual pages