Skip to content
Snippets Groups Projects
Commit 49be9867 authored by Elias Pipping's avatar Elias Pipping Committed by Christoph Grüninger
Browse files

Remove istl_assign_to_fmatrix

The functionality is retained in the form of a DenseMatrixAssigner
specialisation

See also flyspray/FS#1669
parent 4477d811
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