Skip to content
Snippets Groups Projects
Commit 9778fb8c authored by Uli Sack's avatar Uli Sack Committed by usack
Browse files

* export field_type

* make method mv const
* add method usmv

[[Imported from SVN: r6465]]
parent 56ab9ea0
Branches new_interface
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ class SumOperator ...@@ -18,6 +18,8 @@ class SumOperator
//! export the summand type //! export the summand type
typedef LowRankMatrix LowRankMatrixType; typedef LowRankMatrix LowRankMatrixType;
typedef typename SparseMatrixType::field_type field_type;
//! default constructor - allocates memory for summand operators internally //! default constructor - allocates memory for summand operators internally
SumOperator(): SumOperator():
summands_allocated_internally_(true) summands_allocated_internally_(true)
...@@ -60,12 +62,20 @@ class SumOperator ...@@ -60,12 +62,20 @@ class SumOperator
//! b = (A+M)x //! b = (A+M)x
template <class LVectorType, class RVectorType> 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); sparse_matrix_->mv(x,b);
lowrank_matrix_->umv(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 //! return the number of rows
size_t N() const size_t N() const
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment