NormalVectorTags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <optional>
8 
9 #include "DataStructures/DataBox/Tag.hpp"
13 #include "Domain/Structure/DirectionMap.hpp"
14 #include "Utilities/TMPL.hpp"
15 
16 namespace evolution::dg::Tags {
17 /// The magnitude of the unnormalized normal covector to the interface
19  using type = Scalar<DataVector>;
20 };
21 
22 /// The normal covector to the interface
23 template <size_t Dim>
25  using type = tnsr::i<DataVector, Dim, Frame::Inertial>;
26 };
27 
28 /// The normal covector and its magnitude for all internal faces of an element.
29 ///
30 /// The combined tag is used to make the allocations be in a Variables
31 ///
32 /// We use a `std::optional` to keep track of whether or not these values are
33 /// up-to-date.
34 template <size_t Dim>
36  using type = DirectionMap<
37  Dim, std::optional<
38  Variables<tmpl::list<MagnitudeOfNormal, NormalCovector<Dim>>>>>;
39 };
40 } // namespace evolution::dg::Tags
evolution::dg::Tags::NormalCovectorAndMagnitude
The normal covector and its magnitude for all internal faces of an element.
Definition: NormalVectorTags.hpp:35
evolution::dg::Tags
Tags used for DG evolution scheme.
Definition: InboxTags.hpp:23
db::SimpleTag
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
cstddef
evolution::dg::Tags::MagnitudeOfNormal
The magnitude of the unnormalized normal covector to the interface.
Definition: NormalVectorTags.hpp:18
Variables.hpp
DirectionMap
Definition: DirectionMap.hpp:15
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
TypeAliases.hpp
optional
evolution::dg::Tags::NormalCovector
The normal covector to the interface.
Definition: NormalVectorTags.hpp:24
Direction.hpp
TMPL.hpp