6#include <dune/common/fmatrix.hh>
7#include <dune/common/fvector.hh>
9#include <amdis/common/Tags.hpp>
14 template <
class T,
class =
void>
29 template <
class K,
int SIZE>
36 struct ValueCategory< Dune::FieldVector<K, 1> >
38 using type = tag::scalar;
41 template <
class K,
int ROWS,
int COLS>
42 struct ValueCategory< Dune::FieldMatrix<K, ROWS, COLS> >
44 using type = tag::matrix;
48 struct ValueCategory< Dune::FieldMatrix<K, 1, 1> >
50 using type = tag::scalar;
63 constexpr bool Scalar = std::is_same_v<ValueCategory_t<T>,
tag::scalar>;
66 constexpr bool Vector = std::is_same_v<ValueCategory_t<T>,
tag::vector>;
69 constexpr bool Matrix = std::is_same_v<ValueCategory_t<T>,
tag::matrix>;
74 constexpr bool isVector(V
const&)
76 static_assert(Category::Vector<V>,
"");
77 return Category::Vector<V>;
81 constexpr bool isNotVector(V
const&)
83 static_assert(!Category::Vector<V>,
"");
84 return !Category::Vector<V>;
Category of type T, e.g. scalar, vector matrix, specified by a tag.
Definition: ValueCategory.hpp:16