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

added specialization of GenericVector::resize for VectorTypeB=SumOperator<SparseM,LowRankM>

[[Imported from SVN: r5476]]
parent 200b5bbe
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,17 @@ struct GenericVector
GenericVector::resize(a[it.index()], *(it->begin()));
}
template <class VectorTypeA, class SparseMatrixType, class LowRankMatrixType>
static void resize(VectorTypeA& a, const SumOperator<SparseMatrixType, LowRankMatrixType>& b)
{
a.resize(b.N());
typedef SumOperator<SparseMatrixType,LowRankMatrixType> TypeB;
typename SparseMatrixType::const_iterator it = b.sparseMatrix().begin();
typename SparseMatrixType::const_iterator end = b.sparseMatrix().end();
for(; it!=end; ++it)
GenericVector::resize(a[it.index()], *(it->begin()));
}
template <class field_type, int n, class VectorTypeB>
static void resize(Dune::FieldVector<field_type,n>& a, const VectorTypeB& b)
{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment