MortarTags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <array>
7 #include <boost/functional/hash.hpp>
8 #include <cstddef>
9 #include <unordered_map>
10 #include <utility>
11 
12 #include "DataStructures/DataBox/Tag.hpp"
15 #include "Evolution/DiscontinuousGalerkin/MortarData.hpp"
17 #include "NumericalAlgorithms/Spectral/Projection.hpp" // for MortarSize
18 #include "Time/BoundaryHistory.hpp"
19 #include "Time/TimeStepId.hpp"
20 
21 /// %Tags used for DG evolution scheme.
22 namespace evolution::dg::Tags {
23 /// Data on mortars, indexed by (Direction, ElementId) pairs
24 ///
25 /// The `Dim` is the volume dimension, not the face dimension.
26 template <size_t Dim>
29  using type =
31 };
32 
33 /// History of the data on mortars, indexed by (Direction, ElementId) pairs, and
34 /// used by the linear multistep local time stepping code.
35 ///
36 /// The `Dim` is the volume dimension, not the face dimension.
37 ///
38 /// `CouplingResult` is the result of calling a functor of type `Coupling` used
39 /// in `TimeSteppers::BoundaryHistory`. It is also the result of
40 /// `LtsTimeStepper::compute_boundary_delta()`, which again has a `Coupling`
41 /// template parameter.
42 template <size_t Dim, typename CouplingResult>
45  using type =
49  ::evolution::dg::MortarData<Dim>, CouplingResult>,
50  boost::hash<Key>>;
51 };
52 
53 /// Mesh on the mortars, indexed by (Direction, ElementId) pairs
54 ///
55 /// The `Dim` is the volume dimension, not the face dimension.
56 template <size_t Dim>
59  using type = std::unordered_map<Key, Mesh<Dim - 1>, boost::hash<Key>>;
60 };
61 
62 /// Size of a mortar, relative to the element face. That is, the part
63 /// of the face that it covers.
64 ///
65 /// The `Dim` is the volume dimension, not the face dimension.
66 template <size_t Dim>
69  using type =
71  boost::hash<Key>>;
72 };
73 
74 /// The next temporal id at which to receive data on the specified mortar.
75 ///
76 /// The `Dim` is the volume dimension, not the face dimension.
77 template <size_t Dim>
81 };
82 } // namespace evolution::dg::Tags
utility
std::pair
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
ElementId< Dim >
ElementId.hpp
evolution::dg::MortarData
Data on the mortar used to compute the boundary correction for the DG scheme.
Definition: MortarData.hpp:50
cstddef
Spectral::MortarSize
ChildSize MortarSize
The portion of an element covered by a mortar.
Definition: Projection.hpp:23
array
evolution::dg::Tags::MortarMesh
Mesh on the mortars, indexed by (Direction, ElementId) pairs.
Definition: MortarTags.hpp:57
Mesh
Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
Definition: Mesh.hpp:48
TimeStepId.hpp
evolution::dg::Tags::MortarData
Data on mortars, indexed by (Direction, ElementId) pairs.
Definition: MortarTags.hpp:27
TimeSteppers::BoundaryHistory
Definition: BoundaryHistory.hpp:31
evolution::dg::Tags::MortarDataHistory
History of the data on mortars, indexed by (Direction, ElementId) pairs, and used by the linear multi...
Definition: MortarTags.hpp:43
Direction.hpp
evolution::dg::Tags::MortarNextTemporalId
The next temporal id at which to receive data on the specified mortar.
Definition: MortarTags.hpp:78
unordered_map
Mesh.hpp
evolution::dg::Tags::MortarSize
Size of a mortar, relative to the element face. That is, the part of the face that it covers.
Definition: MortarTags.hpp:67