SpECTRE  v2023.05.16
control_system::protocols::ControlError Struct Reference

Definition of a control error. More...

#include <ControlError.hpp>


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:

  • a call operator that returns a DataVector with a signature the same as in the example shown here:
  • a static constexpr size_t expected_number_of_excisions which specifies the number of excisions necessary in order to compute the control error.
  • a type alias object_centers to a domain::object_list of domain::ObjectLabels. These are the objects that will require the domain::Tags::ObjectCenters tags to be in the GlobalCache for this control system to work.

    struct ExampleControlError
    : tt::ConformsTo<control_system::protocols::ControlError> {
    static constexpr size_t expected_number_of_excisions = 1;
    void pup(PUP::er& /*p*/) {}
    template <typename Metavariables, typename... QueueTags>
    const double time,
    const std::string& function_of_time_name,
    const tuples::TaggedTuple<QueueTags...>& measurements) {
    const auto& functions_of_time =
    const double current_map_value =
    const double measured_value = 0.0;
    // Would do something like get<QueueTag>(measurements) here
    return {current_map_value - measured_value};
    Stores a collection of function values.
    Definition: DataVector.hpp:48
    A Charm++ chare that caches constant data once per Charm++ node or non-constant data once per Charm++...
    Definition: GlobalCache.hpp:374
    An associative container that is indexed by structs.
    Definition: TaggedTuple.hpp:261
    Similar to a tmpl::list but for ObjectLabels.
    Definition: ObjectLabel.hpp:26
    Indicate a class conforms to the Protocol.
    Definition: ProtocolHelpers.hpp:22

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