SpECTRE  v2024.04.12
control_system::size::State Class Referenceabstract

Represents a 'state' of the size control system. More...

#include <State.hpp>

Public Member Functions

 State (const State &)=default
 
Stateoperator= (const State &)=default
 
 State (State &&)=default
 
Stateoperator= (State &&)=default
 
virtual std::string name () const =0
 Name of this state. More...
 
virtual size_t number () const =0
 Return a size_t that corresponds to the state number in SpEC. More...
 
virtual std::unique_ptr< Stateget_clone () const =0
 
virtual std::string update (const gsl::not_null< Info * > info, const StateUpdateArgs &update_args, const CrossingTimeInfo &crossing_time_info) const =0
 Updates the Info in info. More...
 
virtual double control_error (const Info &info, const ControlErrorArgs &control_error_args) const =0
 Returns the control signal, but does not modify the state or any parameters. More...
 
 WRAPPED_PUPable_abstract (State)
 
 State (CkMigrateMessage *msg)
 

Detailed Description

Represents a 'state' of the size control system.

Details

Each 'state' of the size control system has a different control signal, which has a different purpose, even though each state controls the same map quantity, namely the Y00 coefficient of the shape map. For example, state Label::AhSpeed controls the Y00 coefficient of the shape map so that the minimum characteristic speed is driven towards a target value, and state Label::DeltaR controls the Y00 coefficient of the shape map (or the Y00 coefficient of a separate spherically-symmetric size map) so that the minimum difference between the horizon radius and the excision boundary radius is driven towards a constant.

Each state has its own logic (the 'update' function) that determines values of certain parameters (i.e. the things in Info), including whether the control system should transition to a different state.

The different states are:

  • Initial: drives dr/dt of the excision boundary to Info::target_drift_velocity.
  • AhSpeed: drives the minimum characteristic speed on the excision boundary to Info::target_char_speed.
  • DeltaR: drives the minimum distance between the horizon and the excision boundary to be constant in time.
  • DeltaRDriftInward: Same as DeltaR but the excision boundary has a small velocity inward. This state is triggered when it is deemed that the excision boundary and the horizon are too close to each other; the small velocity makes the excision boundary and the horizon drift apart.
  • DeltaRDriftOutward: Same as DeltaR but the excision boundary has a small velocity outward. This state is triggered when it is deemed that the excision boundary and the horizon are too far apart.
  • DeltaRTransition: Same as DeltaR except for the logic that determines how DeltaRTransition changes to other states. DeltaRTransition is allowed (under some circumstances) to change to state DeltaR, but DeltaRDriftOutward and DeltaRDriftInward are never allowed to change to state DeltaR. Instead DeltaRDriftOutward and DeltaRDriftInward are allowed (under some circumstances) to change to state DeltaRTransition.

The reason that DeltaRDriftInward, DeltaRDriftOutward, and DeltaRTransition are separate states is to simplify the logic. In principle, all 3 of those states could be merged with state DeltaR, because the control error is the same for all four states (except for a velocity term that could be set to zero). But if that were done, then there would need to be additional complicated logic in determining transitions between different states, and that logic would depend not only on the current state, but also on the previous state.

Member Function Documentation

◆ control_error()

virtual double control_system::size::State::control_error ( const Info info,
const ControlErrorArgs control_error_args 
) const
pure virtual

◆ name()

virtual std::string control_system::size::State::name ( ) const
pure virtual

◆ number()

virtual size_t control_system::size::State::number ( ) const
pure virtual

◆ update()

virtual std::string control_system::size::State::update ( const gsl::not_null< Info * >  info,
const StateUpdateArgs update_args,
const CrossingTimeInfo crossing_time_info 
) const
pure virtual

Updates the Info in info.

Note
Notice that info includes a state, which might be different than the current state upon return. It is the caller's responsibility to check if the current state has changed.

Returns: The return string is used as a helpful diagnostic that may be printed to determine what logic decisions the state is making (depends on the control_system::Tags::Verbosity flag).

Implemented in control_system::size::States::AhSpeed, control_system::size::States::DeltaR, control_system::size::States::DeltaRDriftOutward, and control_system::size::States::Initial.


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