Skip to content
Snippets Groups Projects
Commit 491ae567 authored by wenqing's avatar wenqing
Browse files

[PETsc] Added more comments to some members of PETScVector

parent 05c36bdc
No related branches found
No related tags found
No related merge requests found
...@@ -161,10 +161,12 @@ class PETScVector ...@@ -161,10 +161,12 @@ class PETScVector
/// Call this before call operator[] or get(...). /// Call this before call operator[] or get(...).
void setLocalAccessibleVector() const; void setLocalAccessibleVector() const;
/// Get several entries /// Get several entries. setLocalAccessibleVector() must be
/// called beforehand.
std::vector<double> get(std::vector<IndexType> const& indices) const; std::vector<double> get(std::vector<IndexType> const& indices) const;
// Get the value of an entry by [] operator /// Get the value of an entry by [] operator.
/// setLocalAccessibleVector() must be called beforehand.
double operator[] (PetscInt idx) const double operator[] (PetscInt idx) const
{ {
return get(idx); return get(idx);
...@@ -182,8 +184,11 @@ class PETScVector ...@@ -182,8 +184,11 @@ class PETScVector
*/ */
void copyValues(std::vector<double>& u) const; void copyValues(std::vector<double>& u) const;
/// Get an entry value. This is an expensive operation, /* Get an entry value. This is an expensive operation,
/// and it only get local value. Use it for only test purpose and it only get local value. Use it for only test purpose
Get the value of an entry by [] operator.
setLocalAccessibleVector() must be called beforehand.
*/
PetscScalar get(const PetscInt idx) const; PetscScalar get(const PetscInt idx) const;
// TODO eliminate in favour of getRawVector() // TODO eliminate in favour of getRawVector()
......
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