None.hpp
1 // 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 
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 class None final : public TimeDependence<MeshDim> {
41  public:
42  using maps_list = tmpl::list<>;
43  using options = tmpl::list<>;
44 
45  static constexpr Options::String help = {
46  "No time dependence in the in grid."};
47 
48  None() = default;
49  ~None() override = default;
50  None(const None&) = default;
51  None(None&&) noexcept = default;
52  None& operator=(const None&) = default;
53  None& operator=(None&&) noexcept = default;
54 
55  auto get_clone() const noexcept
57 
58  [[noreturn]] auto block_maps(size_t number_of_blocks) const noexcept
60  Frame::Grid, Frame::Inertial, MeshDim>>> override;
61 
62  [[noreturn]] auto functions_of_time() const noexcept -> std::unordered_map<
65 };
66 
67 template <size_t Dim>
68 bool operator==(const None<Dim>& lhs, const None<Dim>& rhs) noexcept;
69 
70 template <size_t Dim>
71 bool operator!=(const None<Dim>& lhs, const None<Dim>& rhs) noexcept;
72 } // namespace time_dependence
73 } // namespace creators
74 } // namespace domain
std::string
Frame::Inertial
Definition: IndexType.hpp:44
domain::CoordinateMapBase
Abstract base class for CoordinateMap.
Definition: CoordinateMap.hpp:45
Frame::Grid
Definition: IndexType.hpp:43
Options.hpp
vector
CoordinateMap.hpp
domain::creators::time_dependence::None
Make the mesh time independent so that it isn't moving.
Definition: None.hpp:40
domain::creators::time_dependence::None::get_clone
auto get_clone() const noexcept -> std::unique_ptr< TimeDependence< MeshDim >> override
Returns a std::unique_ptr pointing to a copy of the TimeDependence.
Definition: None.cpp:20
cstddef
domain::creators::time_dependence::TimeDependence
The abstract base class off of which specific classes for adding time dependence into a domain creato...
Definition: TimeDependence.hpp:60
memory
domain::creators::time_dependence::None::functions_of_time
auto functions_of_time() const noexcept -> std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime >> override
Returns the functions of time for the domain.
Definition: None.cpp:38
Options::String
const char *const String
The string used in option structs.
Definition: Options.hpp:32
Frame
Definition: IndexType.hpp:36
domain::creators::time_dependence::None::block_maps
auto block_maps(size_t number_of_blocks) const noexcept -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, MeshDim >>> override
Returns the coordinate maps from the Frame::Grid to the Frame::Inertial frame for each block.
Definition: None.cpp:28
std::unique_ptr
unordered_map
TMPL.hpp
string