SpECTRE  v2022.05.05
control_system::Systems Namespace Reference

All control systems. More...


struct  Expansion
 Controls the 3D CubicScale map. More...

Detailed Description

All control systems.


A control system is a struct that conforms to the control_system::protocols::ControlSystem protocol. They are used to control the time dependent coordinate maps in an evolution. See an example of a control system here:

struct ExampleControlSystem
: tt::ConformsTo<control_system::protocols::ControlSystem> {
static std::string name() { return "ExampleControlSystem"; }
static std::string component_name(const size_t i) {
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;
// This is not part of the required interface, but is used by this
// control system to store the measurement data. Most control
// systems will do something like this.
struct ExampleSubmeasurementQueueTag {
using type = double;
// As with the previous struct, this is not part of the required
// interface.
struct MeasurementQueue : db::SimpleTag {
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 /*meta*/,
const double measurement_result,
const LinkedMessageId<double>& measurement_id) {
// Process the submeasurement results and send whatever is
// necessary to the control system component. Usually calls
// some simple action.
auto& control_system_proxy = Parallel::get_parallel_component<
ExampleSubmeasurementQueueTag, MeasurementQueue,
SomeControlSystemUpdater>>(control_system_proxy, measurement_id,
A Charm++ chare that caches constant data once per Charm++ node or non-constant data once per Charm++...
Definition: GlobalCache.hpp:298
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:171
void simple_action(Proxy &&proxy)
Invoke a simple action on proxy
Definition: Invoke.hpp:54
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:693
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:732
Parallel::GlobalCache< Metavariables > & cache(MockRuntimeSystem< Metavariables > &runner, const ArrayIndex &array_index)
Returns the GlobalCache of Component with index array_index.
Definition: MockRuntimeSystemFreeFunctions.hpp:373
Add data to a LinkedMessageQueue.
Definition: UpdateMessageQueue.hpp:34
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
Indicate a class conforms to the Protocol.
Definition: ProtocolHelpers.hpp:22