SpECTRE Documentation Coverage Report
Current view: top level - Evolution/DiscontinuousGalerkin - MortarTags.hpp Hit Total Coverage
Commit: 3c072f0ce967e2e56649d3fa12aa2a0e4fe2a42e Lines: 6 19 31.6 %
Date: 2024-04-23 20:50:18
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // 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 <memory>
      10             : #include <unordered_map>
      11             : #include <utility>
      12             : 
      13             : #include "DataStructures/DataBox/Tag.hpp"
      14             : #include "Domain/Structure/Direction.hpp"
      15             : #include "Domain/Structure/DirectionalId.hpp"
      16             : #include "Domain/Structure/ElementId.hpp"
      17             : #include "Evolution/DiscontinuousGalerkin/Messages/BoundaryMessage.hpp"
      18             : #include "Evolution/DiscontinuousGalerkin/MortarData.hpp"
      19             : #include "NumericalAlgorithms/Spectral/Mesh.hpp"
      20             : #include "NumericalAlgorithms/Spectral/Projection.hpp"  // for MortarSize
      21             : #include "Time/BoundaryHistory.hpp"
      22             : #include "Time/TimeStepId.hpp"
      23             : 
      24             : /// %Tags used for DG evolution scheme.
      25             : namespace evolution::dg::Tags {
      26             : /// Data on mortars, indexed by (Direction, ElementId) pairs
      27             : ///
      28             : /// The `Dim` is the volume dimension, not the face dimension.
      29             : template <size_t Dim>
      30           1 : struct MortarData : db::SimpleTag {
      31           0 :   using Key = DirectionalId<Dim>;
      32           0 :   using type =
      33             :       std::unordered_map<Key, evolution::dg::MortarData<Dim>, boost::hash<Key>>;
      34             : };
      35             : 
      36             : /// History of the data on mortars, indexed by (Direction, ElementId) pairs, and
      37             : /// used by the linear multistep local time stepping code.
      38             : ///
      39             : /// The `Dim` is the volume dimension, not the face dimension.
      40             : ///
      41             : /// `CouplingResult` is the result of calling a functor of type `Coupling` used
      42             : /// in `TimeSteppers::BoundaryHistory`. It is also the result of
      43             : /// `LtsTimeStepper::compute_boundary_delta()`, which again has a `Coupling`
      44             : /// template parameter.
      45             : template <size_t Dim, typename CouplingResult>
      46           1 : struct MortarDataHistory : db::SimpleTag {
      47           0 :   using Key = DirectionalId<Dim>;
      48           0 :   using type =
      49             :       std::unordered_map<Key,
      50             :                          TimeSteppers::BoundaryHistory<
      51             :                              ::evolution::dg::MortarData<Dim>,
      52             :                              ::evolution::dg::MortarData<Dim>, CouplingResult>,
      53             :                          boost::hash<Key>>;
      54             : };
      55             : 
      56             : /// Mesh on the mortars, indexed by (Direction, ElementId) pairs
      57             : ///
      58             : /// The `Dim` is the volume dimension, not the face dimension.
      59             : template <size_t Dim>
      60           1 : struct MortarMesh : db::SimpleTag {
      61           0 :   using Key = DirectionalId<Dim>;
      62           0 :   using type = std::unordered_map<Key, Mesh<Dim - 1>, boost::hash<Key>>;
      63             : };
      64             : 
      65             : /// Size of a mortar, relative to the element face.  That is, the part
      66             : /// of the face that it covers.
      67             : ///
      68             : /// The `Dim` is the volume dimension, not the face dimension.
      69             : template <size_t Dim>
      70           1 : struct MortarSize : db::SimpleTag {
      71           0 :   using Key = DirectionalId<Dim>;
      72           0 :   using type =
      73             :       std::unordered_map<Key, std::array<Spectral::MortarSize, Dim - 1>,
      74             :                          boost::hash<Key>>;
      75             : };
      76             : 
      77             : /// The next temporal id at which to receive data on the specified mortar.
      78             : ///
      79             : /// The `Dim` is the volume dimension, not the face dimension.
      80             : template <size_t Dim>
      81           1 : struct MortarNextTemporalId : db::SimpleTag {
      82           0 :   using Key = DirectionalId<Dim>;
      83           0 :   using type = std::unordered_map<Key, TimeStepId, boost::hash<Key>>;
      84             : };
      85             : 
      86             : /// \brief The BoundaryMessage received from the inbox
      87             : ///
      88             : /// We must store the `std::unique_ptr` in the DataBox so the memory persists in
      89             : /// case data was sent from another node
      90             : /// \tparam Dim The volume dimension, not the face dimension
      91             : template <size_t Dim>
      92           1 : struct BoundaryMessageFromInbox : db::SimpleTag {
      93           0 :   using Key = DirectionalId<Dim>;
      94           0 :   using type = std::unordered_map<Key, std::unique_ptr<BoundaryMessage<Dim>>,
      95             :                                   boost::hash<Key>>;
      96             : };
      97             : }  // namespace evolution::dg::Tags

Generated by: LCOV version 1.14