diff --git a/include/numerics/petsc_vector.h b/include/numerics/petsc_vector.h index 00affa9e0e2..b1d9f2f64e9 100644 --- a/include/numerics/petsc_vector.h +++ b/include/numerics/petsc_vector.h @@ -229,7 +229,7 @@ class PetscVector final : public NumericVector * \note This MUST be called after get_array() or get_array_read() * and before using any other interface functions on PetscVector. */ - void restore_array(); + void restore_array() const; virtual NumericVector & operator += (const NumericVector & v) override; @@ -1160,7 +1160,7 @@ const PetscScalar * PetscVector::get_array_read() const template inline -void PetscVector::restore_array() +void PetscVector::restore_array() const { // \note \p _values_manually_retrieved needs to be set to \p false // \e before calling \p _restore_array()!