petsc-3.13.6 2020-09-29
Report Typos and Errors

DMStagVecGetValuesStencil

get vector values using grid indexing

Synopsis

PetscErrorCode DMStagVecGetValuesStencil(DM dm, Vec vec,PetscInt n,const DMStagStencil *pos,PetscScalar *val)
Not Collective

Input Parameters

dm - the DMStag object
vec - the vector object
n - the number of values to obtain
pos - locations to obtain values from (as an array of DMStagStencil values)

Output Parameter

val -value at the point

Notes

Accepts stencils which refer to global element numbers, but only allows access to entries in the local representation (including ghosts).

This approach is not as efficient as setting values directly with DMStagVecGetArray(), which is recommended for matrix free operators.

See Also

DMSTAG, DMStagStencil, DMStagStencilLocation, DMStagVecSetValuesStencil(), DMStagMatSetValuesStencil(), DMStagVecGetArray()

Level

advanced

Location

src/dm/impls/stag/stagstencil.c
Index of all DMSTAG routines
Table of Contents for all manual pages
Index of all manual pages