FoTUpdater_Helper.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
8 #include "ControlSystem/FunctionOfTimeUpdater.hpp"
9 #include "DataStructures/DataVector.hpp"
10 
11 // IWYU pragma: no_forward_declare FunctionOfTimeUpdater
12 
13 /// \cond
14 namespace domain {
15 namespace FunctionsOfTime {
16 template <size_t DerivOrder>
17 class PiecewisePolynomial;
18 } // namespace FunctionsOfTime
19 } // namespace domain
20 namespace gsl {
21 template <class T>
22 class not_null;
23 } // namespace gsl
24 /// \endcond
25 
26 namespace TestHelpers {
27 namespace ControlErrors {
28 // This is a simple case of a ControlError for testing purposes only
29 template <size_t DerivOrder>
30 class Translation {
31  public:
32  explicit Translation(DataVector target_coords) noexcept;
33 
34  Translation(Translation&&) noexcept = default;
35  Translation& operator=(Translation&&) noexcept = default;
36  Translation(const Translation&) = delete;
37  Translation& operator=(const Translation&) = delete;
38  ~Translation() = default;
39 
40  // computes the error in the translation map and provides it to the
41  // FunctionOfTimeUpdater
42  void operator()(
45  double time, const DataVector& coords) noexcept;
46 
47  private:
48  DataVector target_coords_;
49 };
50 } // namespace ControlErrors
51 } // namespace TestHelpers
Definition: TestCreation.hpp:14
Implementations from the Guideline Support Library.
Definition: Gsl.hpp:79
A function that has a piecewise-constant MaxDerivth derivative.
Definition: PiecewisePolynomial.hpp:22
Definition: BlockId.hpp:16
Responsible for updating the FunctionOfTime map parameters. modify: updates the FunctionOfTime map pa...
Definition: FunctionOfTimeUpdater.hpp:38
Stores a collection of function values.
Definition: DataVector.hpp:42
Definition: FoTUpdater_Helper.hpp:30
Require a pointer to not be a nullptr
Definition: Gsl.hpp:182