Skip to content
Snippets Groups Projects
Commit 71e2e4b8 authored by Christian Engwer's avatar Christian Engwer
Browse files

Merge branch 'feature/#5-rightmultiply' into 'master'

Fix FieldMatrix::rightmultiply()

This addresses an issue mentioned in #5 and additionally turns runtime checks into compile-time checks whenever possible.

See merge request !22
parents 394c5cde 0fa536e5
No related branches found
No related tags found
No related merge requests found
......@@ -134,9 +134,14 @@ namespace Dune
return C;
}
using Base::rightmultiply;
//! Multiplies M from the right to this matrix
FieldMatrix& rightmultiply (const FieldMatrix<K,cols,cols>& M)
template <int r, int c>
FieldMatrix& rightmultiply (const FieldMatrix<K,r,c>& M)
{
static_assert(r == c, "Cannot rightmultiply with non-square matrix");
static_assert(r == cols, "Size mismatch");
FieldMatrix<K,rows,cols> C(*this);
for (size_type i=0; i<rows; i++)
......
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