All control systems.
struct ExampleControlSystem
const size_t i, const size_t num_components) {
"This control system expected 3 components but there are "
<< num_components << " instead.");
return i == 0 ? "X" : (i == 1 ? "Y" : "Z");
}
using measurement = ExampleMeasurement;
using simple_tags = tmpl::list<>;
static constexpr size_t deriv_order = 2;
using control_error = ExampleControlError;
struct ExampleSubmeasurementQueueTag {
using type = double;
};
using type =
LinkedMessageQueue<double, tmpl::list<ExampleSubmeasurementQueueTag>>;
};
struct process_measurement {
template <typename Submeasurement>
using argument_tags = tmpl::list<MeasurementResultTag>;
template <typename Metavariables>
static void apply(ExampleSubmeasurement ,
const double measurement_result,
ExampleSubmeasurementQueueTag, MeasurementQueue,
SomeControlSystemUpdater>>(control_system_proxy, measurement_id,
measurement_result);
}
};
};
A Charm++ chare that caches global data once per Charm++ node.
Definition: GlobalCache.hpp:222
auto apply(F &&f, const ObservationBox< ComputeTagsList, DataBoxType > &observation_box, Args &&... args)
Apply the function object f using its nested argument_tags list of tags.
Definition: ObservationBox.hpp:238
#define ASSERT(a, m)
Assert that an expression should be true.
Definition: Assert.hpp:51
void simple_action(Proxy &&proxy)
Invoke a simple action on proxy
Definition: Invoke.hpp:86
auto get_parallel_component(GlobalCache< Metavariables > &cache) -> Parallel::proxy_from_parallel_component< GlobalCache_detail::get_component_if_mocked< typename Metavariables::component_list, ParallelComponentTag > > &
Access the Charm++ proxy associated with a ParallelComponent.
Definition: GlobalCache.hpp:750
std::string name()
Return the result of the name() member of a class. If a class doesn't have a name() member,...
Definition: PrettyType.hpp:733
Parallel::GlobalCache< Metavariables > & cache(MockRuntimeSystem< Metavariables > &runner, const ArrayIndex &array_index)
Returns the GlobalCache of Component with index array_index.
Definition: MockRuntimeSystemFreeFunctions.hpp:379
Add data to a LinkedMessageQueue.
Definition: UpdateMessageQueue.hpp:38
The singleton parallel component responsible for managing a single control system.
Definition: Component.hpp:31
An identifier for an element in a sequence.
Definition: LinkedMessageId.hpp:23
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36