39#ifndef DUMUX_PROPERTY_SYSTEM_MACROS_HH
40#define DUMUX_PROPERTY_SYSTEM_MACROS_HH
41#warning "Property macros are deprecated and will be removed after release 3.2. \
42If you are not using property macros you can disable this warning by \
43setting DUMUX_ENABLE_OLD_PROPERTY_MACROS to 0 (false) when configuring DuMux. \
44DUMUX_ENABLE_OLD_PROPERTY_MACROS defaults to 1 (true) until release 3.1. \
45After release 3.1 it will default to 0 (false) so you will have to manually \
46enable property macros in order to use them."
58#define TTAG(TypeTagName) ::Dumux::Properties::TTag::TypeTagName
68#define PTAG_(PropTagName) ::Dumux::Properties::PropTagName
74template<
class Tuple,
class IndexSequence>
77template<
class Tuple,
size_t... I>
80 using type = std::tuple<std::tuple_element_t<
sizeof...(I) - 1 - I, Tuple>...>;
91template<
class TypeTagTuple>
94template<
class OneTypeTag>
100template<
class FirstTypeTag,
class ...OtherTypeTags>
128#define DUMUX_GET_HEAD_(Arg1, ...) Arg1
130#define NEW_TYPE_TAG(...) \
132 struct DUMUX_GET_HEAD_(__VA_ARGS__) \
133 { using InheritsFrom = Detail::GetTypeTagInheritance<std::tuple<__VA_ARGS__>>::type; }; \
134 } extern int semicolonHack_
142#define INHERITS_FROM(...) __VA_ARGS__
159#define NEW_PROP_TAG(PTagName) \
160 template<class TypeTag, class MyTypeTag> \
161 struct PTagName { using type = UndefinedProperty; }; \
162 extern int semicolonHack_
194#define SET_PROP(EffTypeTagName, PropTagName) \
195 template <class TypeTag> \
196 struct PropTagName<TypeTag, TTAG(EffTypeTagName)>
204#define SET_INT_PROP(EffTypeTagName, PropTagName, ...) \
205 template <class TypeTag> \
206 struct PropTagName<TypeTag, TTAG(EffTypeTagName)> \
209 static constexpr int value = __VA_ARGS__; \
218#define SET_BOOL_PROP(EffTypeTagName, PropTagName, ...) \
219 template <class TypeTag> \
220 struct PropTagName<TypeTag, TTAG(EffTypeTagName)> \
223 static constexpr bool value = __VA_ARGS__; \
232#define SET_TYPE_PROP(EffTypeTagName, PropTagName, ...) \
233 template <class TypeTag> \
234 struct PropTagName<TypeTag, TTAG(EffTypeTagName)> \
236 using type = __VA_ARGS__; \
247#define SET_SCALAR_PROP(EffTypeTagName, PropTagName, ...) \
248 template <class TypeTag> \
249 struct PropTagName<TypeTag, TTAG(EffTypeTagName)> \
251 using Scalar = Dumux::GetPropType<TypeTag, Scalar>; \
253 using type = Scalar; \
254 static const Scalar value; \
256 template <class TypeTag> \
257 const typename PropTagName<TypeTag, TTAG(EffTypeTagName)>::type \
258 PropTagName<TypeTag, TTAG(EffTypeTagName)>::value(__VA_ARGS__)
267#define SET_STRING_PROP(EffTypeTagName, PropTagName, ...) \
268 template <class TypeTag> \
269 struct PropTagName<TypeTag, TTAG(EffTypeTagName)> \
272 using type = std::string; \
273 static const std::string value; \
275 template <class TypeTag> \
276 const typename PropTagName<TypeTag, TTAG(EffTypeTagName)>::type \
277 PropTagName<TypeTag, TTAG(EffTypeTagName)>::value(__VA_ARGS__)
281#define GET_PROP(TypeTag, PropTagName) ::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type
282#define GET_PROP_VALUE(TypeTag, PropTagName) ::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type::value
283#define GET_PROP_TYPE(TypeTag, PropTagName) ::Dumux::Properties::Detail::GetPropImpl<TypeTag, PTAG_(PropTagName)>::type::type
The Dumux property system, traits with inheritance.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename ReverseTupleImpl< Tuple, std::make_index_sequence< std::tuple_size< Tuple >::value > >::type ReverseTuple
Definition: propertysystemmacros.hh:85
Definition: propertysystemmacros.hh:75
std::tuple< std::tuple_element_t< sizeof...(I) - 1 - I, Tuple >... > type
Definition: propertysystemmacros.hh:80
Definition: propertysystemmacros.hh:92
void type
Definition: propertysystemmacros.hh:97
ReverseTuple< std::tuple< OtherTypeTags... > > type
Definition: propertysystemmacros.hh:104