11 #include "Evolution/EventsAndTriggers/Event.hpp" 12 #include "Evolution/EventsAndTriggers/Trigger.hpp" 17 template <
typename EventRegistrars,
typename TriggerRegistrars>
26 : events_and_triggers_(std::move(events_and_triggers)) {}
28 template <
typename DbTags,
typename Metavariables,
typename ArrayIndex,
32 const ArrayIndex& array_index,
33 const Component* component)
const noexcept {
34 for (
const auto& trigger_and_events : events_and_triggers_) {
35 const auto& trigger = trigger_and_events.first;
36 const auto& events = trigger_and_events.second;
37 if (trigger->is_triggered(box)) {
38 for (
const auto& event : events) {
39 event->run(box, cache, array_index, component);
46 void pup(PUP::er& p) noexcept {
47 p | events_and_triggers_;
57 template <
typename EventRegistrars,
typename TriggerRegistrars>
67 struct EventsAndTriggersTagBase {};
73 template <
typename EventRegistrars,
typename TriggerRegistrars>
The type that options are passed around as. Contains YAML node data and an OptionContext.
Definition: Options.hpp:103
T parse_as() const
Convert to an object of type T.
Definition: ParseOptions.hpp:69
Used by the parser to create an object. The default action is to parse options using T::options...
Definition: Options.hpp:143
constexpr auto create(Args &&... args)
Create a new DataBox.
Definition: DataBox.hpp:1259
Class that checks triggers and runs events.
Definition: EventsAndTriggers.hpp:18
Defines classes and functions used for manipulating DataBox's.
Definition: InterpolationTargetWedgeSectionTorus.hpp:24
A Charm++ chare that caches constant data once per Charm++ node.
Definition: ConstGlobalCache.hpp:76
Defines class template ConstGlobalCache.