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

[!298] fix CheckIfDiagonalPresent for scalar valued matrices

Merge branch 'fix_checkIfDiagonalPresent_for_scalar_values_matrices' into 'master'

ref:core/dune-istl This MR fixes CheckIfDiagonalPresent for scalar matrices,
which is called by several preconditioners if dune-istl is compiled with
DUNE_ISTL_WITH_CHECKING.

See merge request [!298]

  [!298]: gitlab.dune-project.org/core/dune-istl/merge_requests/298
parents 30c76b81 cc6df74f
No related branches found
No related tags found
1 merge request!298fix CheckIfDiagonalPresent for scalar valued matrices
Pipeline #18874 passed
......@@ -11,6 +11,7 @@
#include <dune/common/dynmatrix.hh>
#include <dune/common/diagonalmatrix.hh>
#include <dune/common/unused.hh>
#include <dune/common/scalarmatrixview.hh>
#include <dune/istl/scaledidmatrix.hh>
#include "istlexception.hh"
......@@ -59,8 +60,10 @@ namespace Dune
if(diagonal==row->end())
DUNE_THROW(ISTLError, "Missing diagonal value in row "<<row.index()
<<" at block recursion level "<<l-blocklevel);
else
CheckIfDiagonalPresent<typename Matrix::block_type,blocklevel-1,l>::check(*diagonal);
else{
auto m = Impl::asMatrix(*diagonal);
CheckIfDiagonalPresent<decltype(m),blocklevel-1,l>::check(m);
}
}
#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