SpECTRE  v2024.09.29
control_system::size::StateHistory Struct Reference

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::States. 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)
 

Detailed Description

A struct for holding a history of control errors for each state in the control_system::Systems::Size control system.

Member Function Documentation

◆ state_history()

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.

Parameters
state_numbersize_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.

◆ store()

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::States.

Parameters
timeTime to store control errors at
infocontrol_system::size::Info
control_error_argscontrol_system::size::ControlErrorArgs

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