TimeManagement.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <tuple>
7 
9 #include "Evolution/Systems/Cce/OptionTags.hpp"
10 #include "Evolution/Systems/Cce/Tags.hpp"
12 #include "Parallel/Invoke.hpp"
13 #include "Time/Tags.hpp"
14 #include "Time/TimeStepId.hpp"
15 
16 namespace Cce {
17 namespace Actions {
18 
19 /*!
20  * \ingroup ActionGroup
21  * \brief Terminates if the current `::Tags::TimeStepId` has time value later or
22  * equal to `Tags::EndTime`.
23  *
24  * \details Uses:
25  * - DataBox:
26  * - `Cce::Tags::EndTime`
27  * - `Tags::TimeStepId`
28  *
29  * \ref DataBoxGroup changes:
30  * - Adds: nothing
31  * - Removes: nothing
32  * - Modifies: nothing
33  *
34  */
36  template <typename DbTags, typename... InboxTags, typename Metavariables,
37  typename ArrayIndex, typename ActionList,
38  typename ParallelComponent>
39  static auto apply(db::DataBox<DbTags>& box,
40  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
42  const ArrayIndex& /*array_index*/,
43  const ActionList /*meta*/,
44  const ParallelComponent* const /*meta*/) noexcept {
45  return std::tuple<db::DataBox<DbTags>&&, bool>(
46  std::move(box),
47  db::get<::Tags::TimeStepId>(box).substep_time().value() >=
48  db::get<Tags::EndTime>(box));
49  }
50 };
51 
52 } // namespace Actions
53 } // namespace Cce
The set of utilities for performing Cauchy characteristic evolution and Cauchy characteristic matchin...
Definition: BoundaryComputeAndSendToEvolution.hpp:28
Terminates if the current Tags::TimeStepId has time value later or equal to Tags::EndTime.
Definition: TimeManagement.hpp:35
Defines class TimeStepId.
An associative container that is indexed by structs.
Definition: TaggedTuple.hpp:272
Defines classes and functions used for manipulating DataBox&#39;s.
Definition: InterpolationTargetWedgeSectionTorus.hpp:25
A Charm++ chare that caches constant data once per Charm++ node.
Definition: ConstGlobalCache.hpp:136
Definition: Test_ActionTesting.cpp:365
Defines class template ConstGlobalCache.
Definition: ComputeTimeDerivative.hpp:29