Commit 4ff894b2 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'feature/scalar_matrix_vector_traits' into 'master'

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

See merge request !53
parents dfa9b663 5e3791b5
......@@ -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