Commit 6b83e746 authored by Gräser, Carsten's avatar Gräser, Carsten
Browse files

Merge branch 'feature/remove-manual-operator-mult' into 'master'

Remove manual implementation of operator* for FieldMatrix

See merge request !56
parents 23122c0a 011bf056
Pipeline #8866 passed with stage
in 3 minutes and 55 seconds
......@@ -140,30 +140,6 @@ namespace Dune::FracturePhasefields
template <class OtherScalar, int otherRows>
friend auto operator* ( const FieldMatrix<OtherScalar,otherRows,UnblockedDiagonalMatrix::rows >& matrixA,
const UnblockedDiagonalMatrix& matrixB)
FieldMatrix<typename PromotionTraits<field_type,OtherScalar>::PromotedType,otherRows,cols> result(0);
size_t resultColOffset = 0;
size_t factorColOffset = 0;
[&](auto block)
for (int i=0; i<result.rows; ++i)
for (int j=0; j<block.cols; ++j)
for (int k=0; k<block.rows; ++k)
result[i][j+resultColOffset] += matrixA[i][k+factorColOffset] * block[k][j];
resultColOffset += block.cols;
factorColOffset += block.rows;
return result;
// Nonstandard multiplication methods
/** \brief Multiply a transposed FieldMatrix from the left
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment