OnSubcells.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include "DataStructures/DataBox/PrefixHelpers.hpp"
7 #include "DataStructures/DataBox/Tag.hpp"
8 #include "DataStructures/VariablesTag.hpp"
9 
10 /// \cond
11 template <typename X, typename Symm, typename IndexList>
12 class Tensor;
13 template <typename TagsList>
14 class Variables;
15 /// \endcond
16 
18 /// Mark a tag as the being on the subcell grid
19 template <typename Tag>
21  static_assert(tt::is_a_v<Tensor, typename Tag::type>,
22  "A subcell tag must be either a Tensor or a Variables "
23  "currently, though this can be generalized if needed.");
24  using type = typename Tag::type;
25  using tag = Tag;
26 };
27 
28 /// \cond
29 template <typename TagList>
30 struct OnSubcells<::Tags::Variables<TagList>> : db::PrefixTag,
32  private:
33  using wrapped_tags_list = db::wrap_tags_in<OnSubcells, TagList>;
34 
35  public:
36  using tag = ::Tags::Variables<TagList>;
37  using type = Variables<wrapped_tags_list>;
38 };
39 /// \endcond
40 } // namespace evolution::dg::subcell::Tags
db::PrefixTag
Mark a struct as a prefix tag by inheriting from this.
Definition: Tag.hpp:103
Tags::Variables
Definition: VariablesTag.hpp:21
evolution::dg::subcell::Tags::OnSubcells
Mark a tag as the being on the subcell grid.
Definition: OnSubcells.hpp:20
db::SimpleTag
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
db::wrap_tags_in
tmpl::transform< TagList, tmpl::bind< Wrapper, tmpl::_1, tmpl::pin< Args >... > > wrap_tags_in
Create a new tmpl::list of tags by wrapping each tag in TagList in Wrapper<_, Args....
Definition: PrefixHelpers.hpp:30
evolution::dg::subcell::Tags
Tags for the DG-subcell solver
Definition: ActiveGrid.hpp:9