SpECTRE Documentation Coverage Report
Current view: top level - NumericalAlgorithms/DiscontinuousGalerkin - Tags.hpp Hit Total Coverage
Commit: 37c384043430860f87787999aa7399d01bb3d213 Lines: 5 20 25.0 %
Date: 2024-04-20 02:24:02
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>  // IWYU pragma: keep
       8             : #include <cstddef>
       9             : #include <string>
      10             : #include <unordered_map>
      11             : #include <utility>
      12             : 
      13             : #include "DataStructures/DataBox/Tag.hpp"
      14             : #include "DataStructures/DataBox/TagName.hpp"
      15             : #include "Domain/Structure/Direction.hpp"  // IWYU pragma: keep
      16             : #include "Domain/Structure/DirectionalId.hpp"
      17             : #include "Domain/Structure/ElementId.hpp"  // IWYU pragma: keep
      18             : #include "NumericalAlgorithms/DiscontinuousGalerkin/SimpleMortarData.hpp"
      19             : #include "NumericalAlgorithms/Spectral/Projection.hpp"
      20             : #include "Options/String.hpp"
      21             : #include "Utilities/PrettyType.hpp"
      22             : 
      23             : /// Functionality related to discontinuous Galerkin schemes
      24             : namespace dg {}
      25             : 
      26             : namespace Tags {
      27             : /// \ingroup DataBoxTagsGroup
      28             : /// \ingroup DiscontinuousGalerkinGroup
      29             : /// Data on mortars, indexed by (Direction, ElementId) pairs
      30             : template <typename Tag, size_t VolumeDim>
      31           1 : struct Mortars : db::PrefixTag, db::SimpleTag {
      32           0 :   using tag = Tag;
      33           0 :   using Key = DirectionalId<VolumeDim>;
      34           0 :   using type = std::unordered_map<Key, typename Tag::type, boost::hash<Key>>;
      35             : };
      36             : 
      37             : /// \ingroup DataBoxTagsGroup
      38             : /// \ingroup DiscontinuousGalerkinGroup
      39             : /// Size of a mortar, relative to the element face.  That is, the part
      40             : /// of the face that it covers.
      41             : template <size_t Dim>
      42           1 : struct MortarSize : db::SimpleTag {
      43           0 :   using type = std::array<Spectral::MortarSize, Dim>;
      44             : };
      45             : }  // namespace Tags
      46             : 
      47             : namespace OptionTags {
      48             : /*!
      49             :  * \ingroup OptionGroupsGroup
      50             :  * \brief Holds the `OptionTags::NumericalFlux` option in the input file
      51             :  */
      52           1 : struct NumericalFluxGroup {
      53           0 :   static std::string name() { return "NumericalFlux"; }
      54           0 :   static constexpr Options::String help = "The numerical flux scheme";
      55             : };
      56             : 
      57             : /*!
      58             :  * \ingroup OptionTagsGroup
      59             :  * \brief The option tag that retrieves the parameters for the numerical
      60             :  * flux from the input file
      61             :  */
      62             : template <typename NumericalFluxType>
      63           1 : struct NumericalFlux {
      64           0 :   static std::string name() { return pretty_type::name<NumericalFluxType>(); }
      65           0 :   static constexpr Options::String help = "Options for the numerical flux";
      66           0 :   using type = NumericalFluxType;
      67           0 :   using group = NumericalFluxGroup;
      68             : };
      69             : }  // namespace OptionTags
      70             : 
      71             : namespace Tags {
      72             : /*!
      73             :  * \brief The global cache tag for the numerical flux
      74             :  */
      75             : template <typename NumericalFluxType>
      76           1 : struct NumericalFlux : db::SimpleTag {
      77           0 :   using type = NumericalFluxType;
      78           0 :   using option_tags =
      79             :       tmpl::list<::OptionTags::NumericalFlux<NumericalFluxType>>;
      80             : 
      81           0 :   static constexpr bool pass_metavariables = false;
      82           0 :   static NumericalFluxType create_from_options(
      83             :       const NumericalFluxType& numerical_flux) {
      84             :     return numerical_flux;
      85             :   }
      86             : };
      87             : }  // namespace Tags

Generated by: LCOV version 1.14