Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "DataStructures/DataBox/Tag.hpp"
7 : #include "Time/History.hpp"
8 : #include "Utilities/TMPL.hpp"
9 : #include "Utilities/TypeTraits/IsA.hpp"
10 :
11 : namespace Tags {
12 : /// \ingroup DataBoxTagsGroup
13 : /// \ingroup TimeGroup
14 : /// Tag for the TimeStepper history
15 : ///
16 : /// \tparam Tag tag for the variables
17 : template <typename Tag>
18 1 : struct HistoryEvolvedVariables : db::SimpleTag {
19 0 : using type = TimeSteppers::History<typename Tag::type>;
20 : };
21 :
22 : /// \ingroup TimeGroup
23 : /// From a list of tags `TagList`, extract all tags that are template
24 : /// specializations of `HistoryEvolvedVariables`.
25 : template <typename TagList>
26 1 : using get_all_history_tags =
27 : tmpl::filter<TagList, tt::is_a<::Tags::HistoryEvolvedVariables, tmpl::_1>>;
28 : } // namespace Tags
|