DMLocalToGlobalBegin#

begins updating global vectors from local vectors

Synopsis#

#include "petscdm.h"
#include "petscdmlabel.h"
#include "petscds.h"
PetscErrorCode DMLocalToGlobalBegin(DM dm, Vec l, InsertMode mode, Vec g)


Neighbor-wise Collective on dm

Input Parameters#

• dm - the DM object

• l - the local vector

• mode - if INSERT_VALUES then no parallel communication is used, if ADD_VALUES then all ghost points from the same base point accumulate into that base point.

• g - the global vector

Notes#

In the ADD_VALUES case you normally would zero the receiving vector before beginning this operation.

INSERT_VALUES is not supported for DMDA, in that case simply compute the values directly into a global vector instead of a local one.

Use DMLocalToGlobalEnd() to complete the communication process.

DMLocalToGlobal() is a short form of DMLocalToGlobalBegin() and DMLocalToGlobalEnd()

DMLocalToGlobalHookAdd() may be used to provide additional operations that are performed during the update process.

See Also#

DMLocalToGlobal(), DMLocalToGlobalEnd(), DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocal(), DMGlobalToLocalEnd(), DMGlobalToLocalBegin()

intermediate

Location#

src/dm/interface/dm.c

Edit on GitLab