Commit 011bf056 authored by Gräser, Carsten's avatar Gräser, Carsten
Browse files

Remove manual implementation of operator* for FieldMatrix

This is now handled by `operator*` in `FieldMatrix` based on `mtv()`.
parent 23122c0a
Pipeline #8864 passed with stage
in 4 minutes
......@@ -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;
Hybrid::forEach(matrixB.blocks_,
[&](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