Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <pup.h>
7 : #include <string>
8 :
9 : #include "ControlSystem/ControlErrors/Size/Info.hpp"
10 : #include "ControlSystem/ControlErrors/Size/State.hpp"
11 : #include "Options/String.hpp"
12 : #include "Utilities/Serialization/CharmPupable.hpp"
13 : #include "Utilities/TMPL.hpp"
14 :
15 0 : namespace control_system::size::States {
16 0 : class AhSpeed : public State {
17 : public:
18 0 : using options = tmpl::list<>;
19 0 : static constexpr Options::String help{
20 : "Controls the velocity of the excision surface to avoid incoming "
21 : "characteristic speeds. This is state 1 in SpEC."};
22 0 : AhSpeed() = default;
23 1 : std::string name() const override { return "AhSpeed"; }
24 1 : size_t number() const override { return 1; }
25 0 : std::unique_ptr<State> get_clone() const override;
26 1 : std::string update(const gsl::not_null<Info*> info,
27 : const StateUpdateArgs& update_args,
28 : const CrossingTimeInfo& crossing_time_info) const override;
29 : /// The return value is Q from Eq. 92 of \cite Hemberger2012jz.
30 1 : double control_error(
31 : const Info& info,
32 : const ControlErrorArgs& control_error_args) const override;
33 :
34 0 : WRAPPED_PUPable_decl_template(AhSpeed); // NOLINT
35 0 : explicit AhSpeed(CkMigrateMessage* const /*msg*/) {}
36 : };
37 : } // namespace control_system::size::States
|