|
SpECTRE
v2025.08.19
|
Definition of a control system. More...
#include <ControlSystem.hpp>
Classes | |
| struct | test |
Definition of a control system.
Defines a control system for controlling a FunctionOfTime.
A conforming class must provide the following functionality:
name returning a std::string. This corresponds to the name of the FunctionOfTime controlled by this system.component_name returning a std::optional<std::string>. This gives a name associated to each component of the FunctionOfTime that is being controlled. E.g. a FunctionOfTime controlling translation will have three components with names "X", "Y", and "Z". This is useful when writing data to disk. The reason this is a std::optional rather than just a std::string is because of shape control. Since the vector of coefficients of the shape map is stored in ylm::Spherepack order, not all components of this vector correspond to an actual l,m pair (see ylm::Spherepack for why this is). Thus, this is a std::optional to signify if a component of the FunctionOfTime isn't actually used and shouldn't be written to disk.measurement to a struct implementing the Measurement protocol.simple_tags to a tmpl::list of simple tags needed for the control system. These tags will be added to the DataBox of the ControlComponent. The list may be empty.control_error to a struct that conforms to the ControlError protocolderiv_order which is the order of the highest derivative of a FunctionOfTime that you wish to control. Typically, this is the order of the FunctionOfTime itself.a member struct (or type alias) process_measurement, defining the following:
argument_tags, which must produce a tmpl::list of tags when instantiated for any submeasurement of the control system's measurement.apply that accepts as arguments:measurement. For measurements with multiple submeasurements, this can be accomplished either by a template parameter or by overloading the function.argument_tags instantiated with the type of the first argument.Parallel::GlobalCache<Metavariables>&const LinkedMessageId<double>& identifying the measurement, with the id field being the measurement time.The apply function will be called once for each submeasurement of the control system's measurement using data from the DataBox passed to RunCallbacks. It should communicate any necessary data to the control system singleton.
Here's an example for a class conforming to this protocol: