SpECTRE  v2023.05.16
control_system Namespace Reference

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  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

class  Event
 Event for running control system measurements. More...
 
struct  OptionHolder
 Holds all options for a single control system. More...
 
struct  ResetFunctionOfTimeExpirationTime
 Resets the expiration time of a FunctionOfTime in the global cache. Intended to be used in Parallel::mutate. 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  UpdateControlSystem
 Functor for updating control systems when they are ready. More...
 
struct  UpdateFunctionOfTime
 Updates a FunctionOfTime in the global cache. Intended to be used in Parallel::mutate. More...
 

Typedefs

template<typename Metavariables , typename ControlSystems >
using control_components = tmpl::transform< ControlSystems, tmpl::bind< ControlComponent, tmpl::pin< Metavariables >, tmpl::_1 > >
 List of control componenets to be added to the component list of the metavars.
 
template<typename ControlSystems >
using control_system_events = tmpl::transform< metafunctions::measurements_t< ControlSystems >, tmpl::bind< Event, metafunctions::control_systems_with_measurement< tmpl::pin< ControlSystems >, tmpl::_1 > > >
 The list of events needed for measurements for a list of control systems.
 
template<typename ControlSystems >
using inputs = tmpl::transform< ControlSystems, tmpl::bind< OptionTags::ControlSystemInputs, tmpl::_1 > >
 Alias to get all the option holders from a list of control systems. This is useful in the option_tags alias of simple tags for getting all the options from control systems.
 
template<typename ControlSystems >
using control_system_triggers = tmpl::transform< metafunctions::measurements_t< ControlSystems >, tmpl::bind< Trigger, metafunctions::control_systems_with_measurement< tmpl::pin< ControlSystems >, tmpl::_1 > > >
 The list of triggers needed for measurements for a list of control systems.
 

Functions

template<size_t DerivOrder>
DataVector calculate_measurement_timescales (const ::Controller< DerivOrder > &controller, const ::TimescaleTuner &tuner, const int measurements_per_update)
 Calculate the measurement timescale based on the damping timescale, update fraction, and DerivOrder of the control system. 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...
 
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 &timescales)
 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...
 

Detailed Description

Control systems and related functionality.