SpECTRE
v2024.09.29
|
A struct for holding a history of control errors for each state in the control_system::Systems::Size
control system.
More...
#include <StateHistory.hpp>
Public Member Functions | |
StateHistory (size_t num_times_to_store) | |
Only keep num_times_to_store entries in the state_history. | |
void | store (double time, const Info &info, const ControlErrorArgs &control_error_args) |
Store the control errors for all control_system::size::State s. More... | |
const std::deque< std::pair< double, double > > & | state_history (size_t state_number) const |
Return a const reference to the stored control errors from all the states. More... | |
void | pup (PUP::er &p) |
A struct for holding a history of control errors for each state in the control_system::Systems::Size
control system.
const std::deque< std::pair< double, double > > & control_system::size::StateHistory::state_history | ( | size_t | state_number | ) | const |
Return a const reference to the stored control errors from all the states.
state_number | size_t corresponding to the control_system::size::State::number() of a state. |
Returns: std::deque<std::pair<double, double>> The std::pair
holds the time and control error, respectively. The std::deque
is ordered with earlier times at the "front" and later times at the "back". This is to make iteration over the deque easier as we typically want to start with earlier times.
void control_system::size::StateHistory::store | ( | double | time, |
const Info & | info, | ||
const ControlErrorArgs & | control_error_args | ||
) |
Store the control errors for all control_system::size::State
s.
time | Time to store control errors at |
info | control_system::size::Info |
control_error_args | control_system::size::ControlErrorArgs |