SpECTRE  v2024.09.29
control_system::protocols::ControlError Struct Reference

Definition of a control error. More...

#include <ControlError.hpp>

Classes

struct  test
 

Detailed Description

Definition of a control error.

A control error is used within a control system to compute how far off the the value you are controlling is from its expected value.

A conforming type must specify:

Note
The TimescaleTuner can have it's template parameter be either true or false.
struct ExampleControlError
: tt::ConformsTo<control_system::protocols::ControlError> {
void pup(PUP::er& /*p*/) {}
template <typename Metavariables, typename... QueueTags>
DataVector operator()(const ::TimescaleTuner<true>& tuner,
const double time,
const std::string& function_of_time_name,
const tuples::TaggedTuple<QueueTags...>& measurements) {
const auto& functions_of_time =
Parallel::get<domain::Tags::FunctionsOfTime>(cache);
const double current_map_value =
functions_of_time.at(function_of_time_name)->func(time)[0][0];
const double measured_value = 0.0;
// Would do something like get<QueueTag>(measurements) here
(void)measurements;
// Size control needs the timescale tuner
(void)tuner;
return {current_map_value - measured_value};
}
};
Stores a collection of function values.
Definition: DataVector.hpp:48
A Charm++ chare that caches global data once per Charm++ node.
Definition: GlobalCache.hpp:223
An associative container that is indexed by structs.
Definition: TaggedTuple.hpp:264
Similar to a tmpl::list but for ObjectLabels.
Definition: ObjectLabel.hpp:28
Indicate a class conforms to the Protocol.
Definition: ProtocolHelpers.hpp:22

The documentation for this struct was generated from the following file: