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 : namespace control_system::size::States {
16 0 : class Initial : public State {
17 : public:
18 0 : using options = tmpl::list<>;
19 0 : static constexpr Options::String help{
20 : "A temporary state for the beginning of a simulation. This is state 0 in "
21 : "SpEC."};
22 0 : Initial() = default;
23 1 : std::string name() const override { return "Initial"; }
24 1 : size_t number() const override { return 0; }
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 1 : double control_error(
30 : const Info& info,
31 : const ControlErrorArgs& control_error_args) const override;
32 :
33 0 : WRAPPED_PUPable_decl_template(Initial); // NOLINT
34 0 : explicit Initial(CkMigrateMessage* const /*msg*/) {}
35 : };
36 : } // namespace control_system::size::States
|