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 OptionString help = {"No time dependence in the in grid."};
46 
47  None() = default;
48  ~None() override = default;
49  None(const None&) = default;
50  None(None&&) noexcept = default;
51  None& operator=(const None&) = default;
52  None& operator=(None&&) noexcept = default;
53 
54  auto get_clone() const noexcept
56 
57  [[noreturn]] auto block_maps(size_t number_of_blocks) const noexcept
59  Frame::Grid, Frame::Inertial, MeshDim>>> override;
60 
61  [[noreturn]] auto functions_of_time() const noexcept -> std::unordered_map<
64 };
65 
66 template <size_t Dim>
67 bool operator==(const None<Dim>& lhs, const None<Dim>& rhs) noexcept;
68 
69 template <size_t Dim>
70 bool operator!=(const None<Dim>& lhs, const None<Dim>& rhs) noexcept;
71 } // namespace time_dependence
72 } // namespace creators
73 } // namespace domain
Definition: IndexType.hpp:43
Definition: BlockId.hpp:16
Abstract base class for CoordinateMap.
Definition: CoordinateMap.hpp:44
Defines classes and functions for making classes creatable from input files.
const char *const OptionString
The string used in option structs.
Definition: Options.hpp:30
The abstract base class off of which specific classes for adding time dependence into a domain creato...
Definition: TimeDependence.hpp:53
Make the mesh time independent so that it isn&#39;t moving.
Definition: None.hpp:40
Indicates the Frame that a TensorIndexType is in.
Definition: IndexType.hpp:36
Defines class CoordinateMap.
Wraps the template metaprogramming library used (brigand)
Definition: IndexType.hpp:44