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 : /// Leaving the template parameter unspecified gives a base tag. 17 : /// 18 : /// \tparam Tag tag for the variables 19 : template <typename Tag = void> 20 1 : struct HistoryEvolvedVariables; 21 : 22 : /// \cond 23 : template <> 24 : struct HistoryEvolvedVariables<> : db::BaseTag {}; 25 : 26 : template <typename Tag> 27 : struct HistoryEvolvedVariables : HistoryEvolvedVariables<>, db::SimpleTag { 28 : using type = TimeSteppers::History<typename Tag::type>; 29 : }; 30 : /// \endcond 31 : 32 : /// \ingroup TimeGroup 33 : /// From a list of tags `TagList`, extract all tags that are template 34 : /// specializations of `HistoryEvolvedVariables`. 35 : template <typename TagList> 36 1 : using get_all_history_tags = 37 : tmpl::filter<TagList, tt::is_a<::Tags::HistoryEvolvedVariables, tmpl::_1>>; 38 : } // namespace Tags