Protocols.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include "Utilities/TypeTraits/CreateHasTypeAlias.hpp"
7 
8 namespace evolution {
9 /// \ref protocols related to evolution systems
10 namespace protocols {
11 
12 namespace detail {
13 CREATE_HAS_TYPE_ALIAS(import_fields)
14 } // namespace detail
15 
16 /*!
17  * \ingroup ProtocolsGroup
18  * \brief Indicates the `ConformingType` provides compile-time information for
19  * importing numeric initial data for an evolution.
20  *
21  * Requires the `ConformingType` has these type aliases:
22  * - `import_fields`: The list of tags that should be imported from a volume
23  * data file
24  *
25  * Here's an example of a class that conforms to this protocol:
26  *
27  * \snippet Evolution/Test_Protocols.cpp conforming_type_example
28  */
29 template <typename ConformingType>
30 using NumericInitialData = detail::has_import_fields<ConformingType>;
31 
32 } // namespace protocols
33 } // namespace evolution
evolution
Functionality for evolving hyperbolic partial differential equations.
Definition: AddMeshVelocityNonconservative.hpp:29
evolution::protocols::NumericInitialData
detail::has_import_fields< ConformingType > NumericInitialData
Indicates the ConformingType provides compile-time information for importing numeric initial data for...
Definition: Protocols.hpp:30
CREATE_HAS_TYPE_ALIAS
#define CREATE_HAS_TYPE_ALIAS(ALIAS_NAME)
Generate a type trait to check if a class has a type alias with a particular name,...
Definition: CreateHasTypeAlias.hpp:27