21 #ifndef MATCH_TYPES_HPP_INCLUDED
22 #define MATCH_TYPES_HPP_INCLUDED
24 #include <type_traits>
26 #include "../tmp/algorithm.hpp"
49 template <
class TestField,
class TrialField,
class Enable =
void>
53 template <
class TestField,
class TrialField>
55 typename std::enable_if<
57 typename get_formalism<TestField, TrialField>::type,
64 enum { d = TestField::elem_t::domain_t::dimension };
65 typedef typename TestField::elem_t test_elem_t;
66 typedef typename TrialField::elem_t trial_elem_t;
73 template <
class vector,
unsigned dim>
74 struct push_if_needed : std::conditional<
76 (d == dim && std::is_same<test_elem_t, trial_elem_t>::value),
77 typename
tmp::push_back<vector, std::integral_constant<int, int(dim)> >::type,
82 typedef typename push_if_needed<
83 typename push_if_needed<
84 typename push_if_needed<
91 template <
class TestField,
class TrialField>
93 is_collocational<TestField, TrialField>::value
97 enum { d = TestField::elem_t::domain_t::dimension };
98 typedef typename TestField::elem_t test_elem_t;
100 typedef typename TrialField::elem_t trial_elem_t;
108 template <
class vector,
unsigned dim>
109 struct push_if_needed : std::conditional<
110 (d == dim && std::is_same<test_elem_t, trial_elem_t>::value) ||
111 (d > dim && (tmp::is_member<test_dof_vector, position_dof<dim> >::value || tmp::is_member<test_dof_vector, dof0 >::value))
113 typename
tmp::push_back<vector, std::integral_constant<int, int(dim)> >::type,
118 typedef typename push_if_needed<
119 typename push_if_needed<
120 typename push_if_needed<
128 #endif // MATCH_TYPES_HPP_INCLUDED