SpECTRE Documentation Coverage Report
Current view: top level - Domain/Structure - Topology.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 1 13 7.7 %
Date: 2025-12-05 05:03:31
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 <cstddef>
       8             : #include <cstdint>
       9             : #include <iosfwd>
      10             : 
      11             : #include "Utilities/MakeArray.hpp"
      12             : 
      13             : namespace domain {
      14             : 
      15             : /// \brief  The topology of a Block or Element in a particular dimension
      16             : ///
      17             : /// \details The Topology is used to determine the geometry of the Block or
      18             : /// Element, which can be used to determine:
      19             : /// - Whether there is an interface (with a neighbor or external boundary) in a
      20             : /// given direction
      21             : /// - The block (element) logical coordinate bounds
      22             : /// - The appropriate Basis and Quadrature for a Mesh on an Element
      23             : /// - Whether or not h-refinement is allowed in the given dimension
      24             : /// - Whether or not the hybrid DG-Subcell scheme can be used
      25             : ///
      26             : /// \note Choose I1 to represent an open interval \f$[-1, 1]\f$
      27             : ///
      28             : /// \note Choose S1 to represent a periodic interval \f$[0, 2 \pi)\f$
      29             : ///
      30             : /// \note In consecutive dimensions, choose S2Colatitude and S2Longitude to
      31             : /// represent the surface of a sphere
      32             : ///
      33             : /// \note In consecutive dimensions, choose B2Radial and B2Angular to represent
      34             : /// a disk (including the center) or cross-section of a cylinder
      35             : ///
      36             : /// \note In consecutive dimensions, choose B3Radial, B3Colatitude and
      37             : /// B3Longitude to represent a sphere
      38             : ///
      39             : /// \note Currently h-refinement can only be done in dimensions with
      40             : /// Topology::I1
      41             : ///
      42             : /// \note Currently the hybrid DG-Subcell scheme can be used only in Elements
      43             : /// for which all dimensions have Topology::I1
      44           0 : enum class Topology : uint8_t {
      45             :   Uninitialized = 0,
      46             :   I1 = 1,
      47             :   S1 = 2,
      48             :   S2Colatitude = 3,
      49             :   S2Longitude = 4,
      50             :   B2Radial = 5,
      51             :   B2Angular = 6,
      52             :   B3Radial = 7,
      53             :   B3Colatitude = 8,
      54             :   B3Longitude = 9,
      55             :   CartoonSphere = 10,
      56             :   CartoonCylinder = 11
      57             : };
      58             : 
      59             : /// Output operator for a Topology.
      60           1 : std::ostream& operator<<(std::ostream& os, Topology topology);
      61             : 
      62           0 : namespace topologies {
      63             : template <size_t VolumeDim>
      64           0 : static constexpr auto hypercube = make_array<VolumeDim>(Topology::I1);
      65             : 
      66           0 : static constexpr auto annulus = std::array{Topology::I1, Topology::S1};
      67             : 
      68           0 : static constexpr auto disk =
      69             :     std::array{Topology::B2Radial, Topology::B2Angular};
      70             : 
      71           0 : static constexpr auto spherical_shell =
      72             :     std::array{Topology::I1, Topology::S2Colatitude, Topology::S2Longitude};
      73             : 
      74           0 : static constexpr auto cylindrical_shell =
      75             :     std::array{Topology::I1, Topology::S1, Topology::I1};
      76             : 
      77           0 : static constexpr auto full_cylinder =
      78             :     std::array{Topology::B2Radial, Topology::B2Angular, Topology::I1};
      79             : 
      80           0 : static constexpr auto full_sphere = std::array{
      81             :     Topology::B3Radial, Topology::B3Colatitude, Topology::B3Longitude};
      82             : 
      83           0 : static constexpr auto cartoon_sphere =
      84             :     std::array{Topology::I1, Topology::CartoonSphere, Topology::CartoonSphere};
      85             : 
      86           0 : static constexpr auto cartoon_cylinder =
      87             :     std::array{Topology::I1, Topology::I1, Topology::CartoonCylinder};
      88             : }  // namespace topologies
      89             : 
      90             : }  // namespace domain

Generated by: LCOV version 1.14