Commit 5e3791b5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

add traits to test whether a dune matrix/vector has only one component

parent e01dcaf2
......@@ -39,6 +39,15 @@ namespace Dune
template <class T, int N>
struct IsMatrix<DiagonalMatrix<T,N>> : std::true_type {};
template <class T>
struct IsScalarMatrix : std::false_type {};
template <class T>
struct IsScalarMatrix<FieldMatrix<T,1,1>> : std::true_type {};
template <class T>
struct IsScalarMatrix<DiagonalMatrix<T,1>> : std::true_type {};
template <class T>
struct IsVector : std::false_type {};
......@@ -46,6 +55,13 @@ namespace Dune
template <class T, int N>
struct IsVector<FieldVector<T,N>> : std::true_type {};
template <class T>
struct IsScalarVector : std::false_type {};
template <class T>
struct IsScalarVector<FieldVector<T,1>> : std::true_type {};
template <class T>
struct IsMatVec
......
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