StepController.hpp
Go to the documentation of this file.
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 /// \file
5 /// Defines base class StepController
6 
7 #pragma once
8 
9 #include <pup.h>
10 
12 #include "Parallel/PupStlCpp11.hpp"
13 #include "Time/Time.hpp"
14 #include "Utilities/TMPL.hpp"
15 
16 /// \ingroup TimeSteppersGroup
17 ///
18 /// Holds all the StepControllers
19 namespace StepControllers {
20 class BinaryFraction; // IWYU pragma: keep
21 class FullSlab; // IWYU pragma: keep
22 class SimpleTimes; // IWYU pragma: keep
23 class SplitRemaining; // IWYU pragma: keep
24 } // namespace StepControllers
25 
26 /// \ingroup TimeSteppersGroup
27 ///
28 /// StepControllers take desired step sizes (generally determined by
29 /// StepChoosers) and convert them into TimeDeltas compatible with the
30 /// slab requirements.
31 class StepController : public PUP::able {
32  public:
33  using creatable_classes = tmpl::list<
38 
39  /// \cond HIDDEN_SYMBOLS
41  /// \endcond
42 
43  virtual TimeDelta choose_step(const Time& time,
44  double desired_step) const noexcept = 0;
45 };
46 
47 #include "Time/StepControllers/BinaryFraction.hpp" // IWYU pragma: keep
48 #include "Time/StepControllers/FullSlab.hpp" // IWYU pragma: keep
49 #include "Time/StepControllers/SimpleTimes.hpp" // IWYU pragma: keep
50 #include "Time/StepControllers/SplitRemaining.hpp" // IWYU pragma: keep
A StepController that always chooses to step a full slab, independent of the desired step size...
Definition: FullSlab.hpp:26
A StepController that roughly splits the remaining time, but prefers simpler (smaller denominator) fr...
Definition: SimpleTimes.hpp:28
Defines class StepControllers::BinaryFraction.
A StepController that chooses steps to be 1/2^n of a slab.
Definition: BinaryFraction.hpp:29
The time in a simulation. Times can be safely compared for exact equality as long as they do not belo...
Definition: Time.hpp:31
Defines macros to allow serialization of abstract template base classes.
Defines class StepControllers::SplitRemaining.
Defines Time and TimeDelta.
Defines class StepControllers::SimpleTimes.
StepControllers take desired step sizes (generally determined by StepChoosers) and convert them into ...
Definition: StepController.hpp:31
A StepController that chooses steps to be 1/n of the remainder of the slab.
Definition: SplitRemaining.hpp:28
PUP routines for new C+11 STL containers and other standard library objects Charm does not provide im...
Holds all the StepControllers.
Definition: BinaryFraction.cpp:6
Represents an interval of time within a single slab.
Definition: Time.hpp:108
#define WRAPPED_PUPable_abstract(className)
Wraps the Charm++ macro, see the Charm++ documentation.
Definition: CharmPupable.hpp:39
Wraps the template metaprogramming library used (brigand)
Defines class StepControllers::FullSlab.