petsc-3.11.4 2019-09-28
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 DMStagVecGetArrayDOF(), which is recommended for matrix free operators.
See Also
DMSTAG, DMStagStencil, DMStagStencilLocation, DMStagVecSetValuesStencil(), DMStagMatSetValuesStencil(), DMStagVecGetArrayDOF()
Level
advanced
Location
src/dm/impls/stag/stagstencil.c
Examples
src/dm/impls/stag/examples/tutorials/ex1.c.html
src/dm/impls/stag/examples/tutorials/ex4.c.html
Index of all DMSTAG routines
Table of Contents for all manual pages
Index of all manual pages