From 33a4884d60ce5004b21d62c7077f8d4d77bab6c7 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Mon, 12 Oct 2015 10:21:45 -0500 Subject: [PATCH] Remove operator=, add operator*, and fix typo in the documentation. --- include/deal.II/lac/vector_space_vector.h | 25 ++++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/include/deal.II/lac/vector_space_vector.h b/include/deal.II/lac/vector_space_vector.h index e2f9b02f52..da404acd5c 100644 --- a/include/deal.II/lac/vector_space_vector.h +++ b/include/deal.II/lac/vector_space_vector.h @@ -44,29 +44,34 @@ namespace LinearAlgebra class VectorSpaceVector { public: + typedef Number value_type; typedef types::global_dof_index size_type; typedef typename numbers::NumberTraits::real_type real_type; /** - * Imports all the elements present in the vector's IndexSet from the input - * vector @p read_write_vector. + * Multiply the entire vector by a fixed factor. */ - virtual VectorSpaceVector &operator= (const ReadWriteVector &read_write_vector) = 0; + virtual VectorSpaceVector &operator*= (const Number factor) = 0; /** - * Copies the data and the IndexSet of the input vector @p in_vector. + * Divide the entire vector by a fixed factor. */ - virtual VectorSpaceVector &operator= (const VectorSpaceVector &in_vector) = 0; + virtual VectorSpaceVector &operator/= (const Number factor) = 0; /** - * Multiply the entire vector by a fixed factor. + * Add the vector @p V to the present one. */ - virtual VectorSpaceVector &operator*= (const Number factor) = 0; + virtual VectorSpaceVector &operator+= (const VectorSpaceVector &V) = 0; /** - * Divide the entire vector by a fixed factor. + * Subtract the vector @p V from the present one. */ - virtual VectorSpaceVector &operator/= (const Number factor) = 0; + virtual VectorSpaceVector &operator-= (const VectorSpaceVector &V) = 0; + + /** + * Return the scalar product of two vectors. + */ + virtual Number operator* (const VectorSpaceVector &V) = 0; /** * Simple addition of a multiple of a vector, i.e. *this += a*V. @@ -76,7 +81,7 @@ namespace LinearAlgebra /** * Multiple addition of scaled vectors, i.e. *this += a*V+b*W. */ - virtual void add(const Number a, const VectorSpaceVector &VW, + virtual void add(const Number a, const VectorSpaceVector &V, const Number b, const VectorSpaceVector &W) = 0; /** -- 2.39.5