diff --git a/dune/solvers/operators/sumoperator.hh b/dune/solvers/operators/sumoperator.hh index 237e705c245df9f1e7e70a7e40484ac166536694..ddead966c87efcdae3d9ae0696a265a3a6c00c75 100644 --- a/dune/solvers/operators/sumoperator.hh +++ b/dune/solvers/operators/sumoperator.hh @@ -18,6 +18,8 @@ class SumOperator //! export the summand type typedef LowRankMatrix LowRankMatrixType; + typedef typename SparseMatrixType::field_type field_type; + //! default constructor - allocates memory for summand operators internally SumOperator(): summands_allocated_internally_(true) @@ -60,12 +62,20 @@ class SumOperator //! b = (A+M)x template <class LVectorType, class RVectorType> - void mv(const LVectorType& x, RVectorType& b) + void mv(const LVectorType& x, RVectorType& b) const { sparse_matrix_->mv(x,b); lowrank_matrix_->umv(x,b); } + //! b += a*(A+M)x + template <class LVectorType, class RVectorType> + void usmv(const field_type a, const LVectorType& x, RVectorType& b) const + { + sparse_matrix_->usmv(a,x,b); + lowrank_matrix_->usmv(a,x,b); + } + //! return the number of rows size_t N() const {