Skip to content
Snippets Groups Projects
Commit b7c913f3 authored by Timo Koch's avatar Timo Koch
Browse files

[pdesolver] Use more conside notation for checkmatrix size

parent 3bfb3b3e
No related branches found
No related tags found
1 merge request!1951[linear] Remove preconditionerBlockLevel
......@@ -109,15 +109,12 @@ protected:
bool checkSizesOfSubMatrices(const M& A) const
{
static_assert(isMultiTypeBlockMatrix<M>::value, "This function can only be used with MultiTypeBlockMatrix");
bool matrixHasCorrectSize = true;
using namespace Dune::Hybrid;
using namespace Dune::Indices;
forEach(A, [&matrixHasCorrectSize](const auto& rowOfMultiTypeBlockMatrix)
{
const auto numRowsLeftMostBlock = rowOfMultiTypeBlockMatrix[_0].N();
forEach(rowOfMultiTypeBlockMatrix, [&matrixHasCorrectSize, &numRowsLeftMostBlock](const auto& subBlock)
{
forEach(A, [&](const auto& row){
const auto numRowsLeftMostBlock = row[Dune::index_constant<0>{}].N();
forEach(row, [&](const auto& subBlock){
if (subBlock.N() != numRowsLeftMostBlock)
matrixHasCorrectSize = false;
});
......
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