From: Matthias Maier Date: Thu, 6 Apr 2017 20:13:38 +0000 (-0500) Subject: C++ cleanup: Remove deprecated class ScaledMatrix X-Git-Tag: v9.0.0-rc1~1711^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5576367b69211277309affbf36a63d42e083ad33;p=dealii.git C++ cleanup: Remove deprecated class ScaledMatrix --- diff --git a/include/deal.II/lac/matrix_lib.h b/include/deal.II/lac/matrix_lib.h index 6be070835a..8fed803703 100644 --- a/include/deal.II/lac/matrix_lib.h +++ b/include/deal.II/lac/matrix_lib.h @@ -32,76 +32,6 @@ template class SparseMatrix; */ -/** - * A matrix that is the multiple of another matrix. - * - * Matrix-vector products of this matrix are composed of those of the original - * matrix with the vector and then scaling of the result by a constant factor. - * - * @deprecated If deal.II was configured with C++11 support, use the - * LinearOperator class instead, see the module on - * @ref LAOperators "linear operators" - * for further details. - * - * @author Guido Kanschat, 2007 - */ -template -class ScaledMatrix : public Subscriptor -{ -public: - /** - * Constructor leaving an uninitialized object. - */ - ScaledMatrix (); - /** - * Constructor with initialization. - */ - template - ScaledMatrix (const MatrixType &M, - const double factor); - - /** - * Destructor - */ - ~ScaledMatrix (); - - /** - * Initialize for use with a new matrix and factor. - */ - template - void initialize (const MatrixType &M, - const double factor); - - /** - * Reset the object to its original state. - */ - void clear (); - - /** - * Matrix-vector product. - */ - void vmult (VectorType &w, - const VectorType &v) const; - - /** - * Transposed matrix-vector product. - */ - void Tvmult (VectorType &w, - const VectorType &v) const; - -private: - /** - * The matrix. - */ - PointerMatrixBase *m; - - /** - * The scaling factor; - */ - double factor; -}; - - /** * Mean value filter. The vmult() functions of this matrix filter out mean * values of the vector. If the vector is of type BlockVector, then an @@ -199,81 +129,6 @@ private: //--------------------------------------------------------------------------- -template -inline -ScaledMatrix::ScaledMatrix() - : - m(0), - factor (0) -{} - - - -template -template -inline -ScaledMatrix::ScaledMatrix(const MatrixType &mat, const double factor) - : - m(new_pointer_matrix_base(mat, VectorType())), - factor(factor) -{} - - - -template -template -inline -void -ScaledMatrix::initialize(const MatrixType &mat, const double f) -{ - if (m) delete m; - m = new_pointer_matrix_base(mat, VectorType()); - factor = f; -} - - - -template -inline -void -ScaledMatrix::clear() -{ - if (m) delete m; - m = 0; -} - - - -template -inline -ScaledMatrix::~ScaledMatrix() -{ - clear (); -} - - -template -inline -void -ScaledMatrix::vmult (VectorType &w, const VectorType &v) const -{ - m->vmult(w, v); - w *= factor; -} - - -template -inline -void -ScaledMatrix::Tvmult (VectorType &w, const VectorType &v) const -{ - m->Tvmult(w, v); - w *= factor; -} - - -//--------------------------------------------------------------------------- - template inline void MeanValueFilter::Tvmult(VectorType &, const VectorType &) const