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

Generated by: LCOV version 1.14