Skip to content
Snippets Groups Projects
Commit c5c14c81 authored by Tom Fischer's avatar Tom Fischer
Browse files

[Mat] PETScVec: Return a ref. instead of a copy.

parent f520f2da
No related branches found
No related tags found
No related merge requests found
...@@ -168,14 +168,14 @@ public: ...@@ -168,14 +168,14 @@ public:
PetscScalar get(const PetscInt idx) const; PetscScalar get(const PetscInt idx) const;
//! Exposes the underlying PETSc vector. //! Exposes the underlying PETSc vector.
PETSc_Vec getRawVector() { return _v; } PETSc_Vec& getRawVector() { return _v; }
/*! Exposes the underlying PETSc vector. /*! Exposes the underlying PETSc vector.
* *
* \warning * \warning
* This method is dangerous insofar as you can do arbitrary things also * This method is dangerous insofar as you can do arbitrary things also
* with a const PETSc vector! * with a const PETSc vector!
*/ */
PETSc_Vec getRawVector() const { return _v; } PETSc_Vec const& getRawVector() const { return _v; }
/*! /*!
Copy local entries including ghost ones to an array Copy local entries including ghost ones to an array
\param u Preallocated vector for the values of local entries. \param u Preallocated vector for the values of local entries.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment