petsc-master 2019-06-22
Report Typos and Errors

VecLockReadPush

Pushes a read-only lock on a vector to prevent it from writing

Synopsis

#include "petscvec.h"   
PetscErrorCode VecLockReadPush(Vec x)
Logically Collective on Vec

Input Parameter

x -the vector

Notes

If this is set then calls to VecGetArray() or VecSetValues() or any other routines that change the vectors values will fail.

The call can be nested, i.e., called multiple times on the same vector, but each VecLockReadPush(x) has to have one matching VecLockReadPop(x), which removes the latest read-only lock.

See Also

VecRestoreArray(), VecGetArrayRead(), VecLockReadPop(), VecLockGet()

Level

beginner

Location

src/vec/vec/interface/rvector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages