SpECTRE
v2024.12.16
|
Control systems and related functionality. More...
Namespaces | |
namespace | Actions |
All Actions related to the control system. | |
namespace | ControlErrors |
All control errors that will be used in control systems. | |
namespace | measurements |
Utilities for doing measurements needed by the control system. | |
namespace | metafunctions |
Metafunctions associated with the control systems. | |
namespace | OptionTags |
All option tags related to the control system. | |
namespace | protocols |
Protocols for control systems. | |
namespace | QueueTags |
All tags that will be used in the LinkedMessageQueue's within control systems. | |
namespace | size |
Classes and functions used in implementation of size control. | |
namespace | Systems |
All control systems. | |
namespace | Tags |
All DataBox tags related to the control system. | |
Classes | |
struct | AggregateUpdate |
Simple action that updates the appropriate UpdateAggregator for the templated ControlSystem . More... | |
class | BNSEvent |
An Event that computes the center of mass for Frame::Grid . More... | |
class | FutureMeasurements |
Class for computing the upcoming measurement times for a control system measurement. More... | |
struct | OptionHolder |
Holds all options for a single control system. More... | |
struct | RunCallbacks |
Apply the process_measurement struct of each of the ControlSystems to the result of the Submeasurement . More... | |
class | Trigger |
Trigger for control system measurements. More... | |
struct | UpdateAggregator |
A class for collecting and storing information related to updating functions of time and measurement timescales. More... | |
struct | UpdateControlSystem |
Functor for updating control systems when they are ready. More... | |
struct | UpdateMultipleFunctionsOfTime |
Updates several FunctionOfTimes in the global cache at once. Intended to be used in Parallel::mutate. More... | |
struct | UpdateSingleFunctionOfTime |
Updates a FunctionOfTime in the global cache. Intended to be used in Parallel::mutate. More... | |
Functions | |
template<size_t DerivOrder, bool AllowDecrease> | |
DataVector | calculate_measurement_timescales (const ::Controller< DerivOrder > &controller, const ::TimescaleTuner< AllowDecrease > &tuner, const int measurements_per_update) |
Calculate the measurement timescale based on the damping timescale, update fraction, and DerivOrder of the control system. More... | |
template<typename ListOfControlSystems > | |
const std::string & | combined_name () |
Given a tmpl::list of control systems, returns a string which is a sorted concatenation of all the control systems' names. More... | |
template<typename ControlSystems > | |
std::unordered_map< std::string, std::string > | system_to_combined_names () |
Given a tmpl::list of control systems, this returns a map between the name of each control system, and the control_system::combined_name of all control systems with the same measurement. More... | |
double | function_of_time_expiration_time (const double time, const DataVector &old_measurement_timescales, const DataVector &new_measurement_timescales, const int measurements_per_update) |
Calculate the next expiration time for the FunctionsOfTime. More... | |
double | measurement_expiration_time (const double time, const DataVector &old_measurement_timescales, const DataVector &new_measurement_timescales, const int measurements_per_update) |
Calculate the next expiration time for the MeasurementTimescales. More... | |
template<size_t Dim, typename... OptionHolders> | |
std::unordered_map< std::string, double > | initial_expiration_times (const double initial_time, const int measurements_per_update, const std::unique_ptr<::DomainCreator< Dim > > &domain_creator, const OptionHolders &... option_holders) |
Construct the initial expiration times for functions of time that are controlled by a control system. More... | |
bool | operator!= (const FutureMeasurements &lhs, const FutureMeasurements &rhs) |
template<typename ControlSystem , typename Metavariables > | |
void | write_components_to_disk (const double time, Parallel::GlobalCache< Metavariables > &cache, const std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > &function_of_time, const std::array< DataVector, 2 > &q_and_dtq, const DataVector ×cales) |
Writes all components of a function of time to disk at a specific time from a control system after it updates the functions of time. More... | |
Control systems and related functionality.
const std::string & control_system::combined_name | ( | ) |
Given a tmpl::list
of control systems, returns a string which is a sorted concatenation of all the control systems' names.
As an example, if ListOfControlSystems
is tmpl::list<Rotation, Expansion, Translation>
, this function would return ExpansionRotationTranslation
. Sorting is done using std::sort
.
ListOfControlSystems | tmpl::list of control systems |
std::unordered_map< std::string, std::string > control_system::system_to_combined_names | ( | ) |
Given a tmpl::list
of control systems, this returns a map between the name of each control system, and the control_system::combined_name
of all control systems with the same measurement.
All control systems have a type alias measurement
corresponding to a control_system::protocols::Measurement
. Some control systems can have the same measurement, while some have different ones. This function splits the template list of control systems into a tmpl::list
of tmpl::list
s where each inner list holds control systems with the same measurement. Each of these inner lists is used in control_system::combined_name
to get the concatenated name for those control systems. This combined name is then used as the value in the resulting map for they key of each control system in the inner list.
ControlSystems | tmpl::list of control systems |