SpECTRE  2021.08.02
TimeSteppers::History< Vars, DerivVars > Class Template Reference

History data used by a TimeStepper. More...

#include <History.hpp>

Public Types

using value_type = Time
 
using const_reference = const value_type &
 
using const_iterator = HistoryIterator< Vars, DerivVars >
 
using difference_type = typename std::iterator_traits< const_iterator >::difference_type
 
using size_type = size_t
 

Public Member Functions

 History (const History &)=default
 
 History (History &&)=default
 
Historyoperator= (const History &)=default
 
Historyoperator= (History &&)=default
 
 History (const size_t integration_order) noexcept
 
void insert (const TimeStepId &time_step_id, const DerivVars &deriv) noexcept
 Add a new set of values to the end of the history.
 
void insert_initial (TimeStepId time_step_id, DerivVars deriv) noexcept
 Add a new derivative to the front of the history. This is often convenient for setting initial data. The function value must be set separately before this object is used, using most_recent_value().
 
void mark_unneeded (const const_iterator &first_needed) noexcept
 Mark all data before the passed point in history as unneeded so it can be removed. Calling this directly should not often be necessary, as it is handled internally by the time steppers.
 
size_type size () const noexcept
 
size_type capacity () const noexcept
 
void shrink_to_fit () noexcept
 
void pup (PUP::er &p) noexcept
 
Vars & most_recent_value () noexcept
 The most recent value of the integrated variables.
 
const Vars & most_recent_value () const noexcept
 The most recent value of the integrated variables.
 
const_iterator begin () const noexcept
 These iterators directly return the Time of the past values. The derivative data can be accessed through the iterators using HistoryIterator::derivative().
 
const_iterator end () const noexcept
 These iterators directly return the Time of the past values. The derivative data can be accessed through the iterators using HistoryIterator::derivative().
 
const_iterator cbegin () const noexcept
 These iterators directly return the Time of the past values. The derivative data can be accessed through the iterators using HistoryIterator::derivative().
 
const_iterator cend () const noexcept
 These iterators directly return the Time of the past values. The derivative data can be accessed through the iterators using HistoryIterator::derivative().
 
const_reference operator[] (size_type n) const noexcept
 These return the past times. The other data can be accessed through HistoryIterator methods.
 
const_reference front () const noexcept
 These return the past times. The other data can be accessed through HistoryIterator methods.
 
const_reference back () const noexcept
 These return the past times. The other data can be accessed through HistoryIterator methods.
 
size_t integration_order () const noexcept
 Get or set the current order of integration. TimeSteppers may impose restrictions on the valid values.
 
void integration_order (const size_t integration_order) noexcept
 Get or set the current order of integration. TimeSteppers may impose restrictions on the valid values.
 

Detailed Description

template<typename Vars, typename DerivVars>
class TimeSteppers::History< Vars, DerivVars >

History data used by a TimeStepper.

Template Parameters
Varstype of variables being integrated
DerivVarstype of derivative variables