12 #include "libmesh/petsc_vector.h" 13 #include "libmesh/id_types.h" 14 #include "libmesh/libmesh_common.h" 60 mooseAssert(
readable(),
"Not readable");
const PetscScalar * _raw_value
The raw values in the vector.
PetscVector< Number > & _vec
Reference to the petsc vector whose values shall be read.
dof_id_type numeric_index_type
A class which helps with repeated reading from a petsc vector.
numeric_index_type map_global_to_local_index(const numeric_index_type i) const
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. ...
PetscVectorReader(PetscVector< Number > &vec)
Construct using a pets vector.
PetscScalar operator()(const numeric_index_type i) const
Access a value in the petsc vector.
void restore()
Restore the array, usually upon going out of scope.