13 : _vec(vec), _raw_value(vec.get_array_read())
18 : _vec(
libMesh::cast_ref<
PetscVector<Number> &>(vec)), _raw_value(_vec.get_array_read())
27 mooseAssert(
readable(),
"Array not retrieved");
void restore()
Restore the array, usually upon going out of scope.
PetscVectorReader(PetscVector< Number > &vec)
Construct using a pets vector.
const PetscScalar * _raw_value
The raw values in the vector.
bool readable() const
Check if this vector is readable.
~PetscVectorReader()
Destructor to make sure the vector is restored every time this goes out of scope.
PetscVector< Number > & _vec
Reference to the petsc vector whose values shall be read.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...