SpECTRE Documentation Coverage Report
Current view: top level - Domain/Creators/TimeDependence - None.hpp Hit Total Coverage
Commit: f23e75c235cae5144b8ac7ce01280be5b8cd2c8a Lines: 6 18 33.3 %
Date: 2024-09-07 06:21:00
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 <cstddef>
       7             : #include <memory>
       8             : #include <string>
       9             : #include <unordered_map>
      10             : #include <vector>
      11             : 
      12             : #include "Domain/CoordinateMaps/CoordinateMap.hpp"
      13             : #include "Domain/Creators/TimeDependence/TimeDependence.hpp"
      14             : #include "Options/String.hpp"
      15             : #include "Utilities/TMPL.hpp"
      16             : 
      17             : /// \cond
      18             : namespace domain::FunctionsOfTime {
      19             : class FunctionOfTime;
      20             : }  // namespace domain::FunctionsOfTime
      21             : 
      22             : namespace Frame {
      23             : struct Distorted;
      24             : struct Grid;
      25             : struct Inertial;
      26             : }  // namespace Frame
      27             : /// \endcond
      28             : 
      29             : namespace domain::creators::time_dependence {
      30             : /// \brief Make the mesh time independent so that it isn't moving.
      31             : ///
      32             : /// \warning Calling the `block_maps` and `functions_of_time` functions causes
      33             : /// an error because the `None` class should be detected separately and
      34             : /// optimizations applied so that the coordinates, Jacobians, etc. are not
      35             : /// recomputed.
      36             : template <size_t MeshDim>
      37           1 : class None final : public TimeDependence<MeshDim> {
      38             :  public:
      39           0 :   using maps_list = tmpl::list<>;
      40           0 :   using options = tmpl::list<>;
      41             : 
      42           0 :   static constexpr Options::String help = {
      43             :       "No time dependence in the in grid."};
      44             : 
      45           0 :   None() = default;
      46           0 :   ~None() override = default;
      47           0 :   None(const None&) = default;
      48           0 :   None(None&&) = default;
      49           0 :   None& operator=(const None&) = default;
      50           0 :   None& operator=(None&&) = default;
      51             : 
      52           1 :   auto get_clone() const -> std::unique_ptr<TimeDependence<MeshDim>> override;
      53             : 
      54           1 :   [[noreturn]] auto block_maps_grid_to_inertial(size_t number_of_blocks) const
      55             :       -> std::vector<std::unique_ptr<domain::CoordinateMapBase<
      56             :           Frame::Grid, Frame::Inertial, MeshDim>>> override;
      57             : 
      58           1 :   [[noreturn]] auto block_maps_grid_to_distorted(size_t number_of_blocks) const
      59             :       -> std::vector<std::unique_ptr<domain::CoordinateMapBase<
      60             :           Frame::Grid, Frame::Distorted, MeshDim>>> override;
      61             : 
      62           1 :   [[noreturn]] auto block_maps_distorted_to_inertial(size_t number_of_blocks)
      63             :       const -> std::vector<std::unique_ptr<domain::CoordinateMapBase<
      64             :           Frame::Distorted, Frame::Inertial, MeshDim>>> override;
      65             : 
      66           1 :   [[noreturn]] auto functions_of_time(
      67             :       const std::unordered_map<std::string, double>& initial_expiration_times =
      68             :           {}) const
      69             :       -> std::unordered_map<
      70             :           std::string,
      71             :           std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>> override;
      72             : };
      73             : 
      74             : template <size_t Dim>
      75           0 : bool operator==(const None<Dim>& lhs, const None<Dim>& rhs);
      76             : 
      77             : template <size_t Dim>
      78           0 : bool operator!=(const None<Dim>& lhs, const None<Dim>& rhs);
      79             : }  // namespace domain::creators::time_dependence

Generated by: LCOV version 1.14