Skip to content
Snippets Groups Projects

[typetraits][matrix] Add trait for MultiTypeBlockMatrix

Merged Kilian Weishaupt requested to merge feature/typetraits-multitype into master
All threads resolved!
@@ -26,16 +26,30 @@
#include <type_traits>
#include <dune/istl/bcrsmatrix.hh>
// Forward declare to avoid includes
namespace Dune {
template <class A, class B>
class BCRSMatrix;
namespace Dumux {
template <class FirstRow, class ... Args>
class MultiTypeBlockMatrix;
} // end namespace Dune
//! Helper type to determine whether a given type is a Dune::BCRSMatrix
template<class T> struct isBCRSMatrix : public std::false_type {};
namespace Dumux {
//! Helper type to determine whether a given type is a Dune::BCRSMatrix
template<class T>
struct isBCRSMatrix<Dune::BCRSMatrix<T> > : public std::true_type {};
struct isBCRSMatrix : public std::false_type {};
template<class B>
struct isBCRSMatrix<Dune::BCRSMatrix<B>> : public std::true_type {};
//! Helper type to determine whether a given type is a Dune::MultiTypeBlockMatrix
template<class... Args>
struct isMultiTypeBlockMatrix : public std::false_type {};
template<class... Args>
struct isMultiTypeBlockMatrix<Dune::MultiTypeBlockMatrix<Args...>> : public std::true_type {};
} // end namespace Dumux
Loading