Skip to content
Snippets Groups Projects
Commit e3bcd560 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Merge branch 'pipping/dune-istl-feature/FS1669-istl_assign_to_fmatrix-removal'

parents 4477d811 49be9867
No related branches found
No related tags found
No related merge requests found
......@@ -474,14 +474,17 @@ namespace Dune {
};
template<class M, class K, int n>
void istl_assign_to_fmatrix(DenseMatrix<M>& fm, const ScaledIdentityMatrix<K,n>& s)
{
fm = K();
for(int i=0; i<n; ++i)
fm[i][i] = s.scalar();
}
template <class DenseMatrix, class field, int N>
struct DenseMatrixAssigner<DenseMatrix, ScaledIdentityMatrix<field, N>> {
static void apply(DenseMatrix& denseMatrix,
ScaledIdentityMatrix<field, N> const& rhs) {
assert(denseMatrix.M() == N);
assert(denseMatrix.N() == N);
denseMatrix = field(0);
for (int i = 0; i < N; ++i)
denseMatrix[i][i] = rhs.scalar();
}
};
} // end namespace
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment