From 2f39dd0f08fab8805bdc1ed8445b8ee5b4734493 Mon Sep 17 00:00:00 2001 From: Kilian <kilian.weishaupt@iws.uni-stuttgart.de> Date: Mon, 6 Apr 2020 20:56:32 +0200 Subject: [PATCH] [linear][seqsolverbacked] Introduce preconditionerBlockLevel function --- dumux/linear/seqsolverbackend.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dumux/linear/seqsolverbackend.hh b/dumux/linear/seqsolverbackend.hh index c52132bec4..ffe04084fe 100644 --- a/dumux/linear/seqsolverbackend.hh +++ b/dumux/linear/seqsolverbackend.hh @@ -149,6 +149,18 @@ public: } }; +/*! + * \ingroup Linear + * \brief Returns the block level for the preconditioner for a given matrix + * + * \tparam M The matrix. + */ +template<class M> +constexpr std::size_t preconditionerBlockLevel() noexcept +{ + return isMultiTypeBlockMatrix<M>::value ? 2 : 1; +} + /*! * \ingroup Linear * \brief Sequential ILU(n)-preconditioned BiCSTAB solver. -- GitLab