ug4
ug::VectorTimeSeries< TVector > Class Template Reference

time series of solutions and corresponding time point More...

#include <solution_time_series.h>

Classes

class  TimeSol
 grouping of solution and time point More...
 

Public Types

typedef TVector vector_type
 vector type of solutions More...
 

Public Member Functions

void clear ()
 clears the content of the member m_vTimeSol More...
 
SmartPtr< VectorTimeSeries< vector_type > > clone () const
 clones the object (deep-copy) including values More...
 
SmartPtr< vector_typelatest ()
 returns latest solution More...
 
ConstSmartPtr< vector_typelatest () const
 const access to latest solution More...
 
number latest_time () const
 time associated with latest solution More...
 
SmartPtr< vector_typeoldest ()
 returns oldest solution More...
 
ConstSmartPtr< vector_typeoldest () const
 const access to oldest solution More...
 
number oldest_time () const
 time associated with oldest solution More...
 
void push (SmartPtr< vector_type > vec, number time)
 adds new time point, not discarding the oldest More...
 
SmartPtr< vector_typepush_discard_oldest (SmartPtr< vector_type > vec, number time)
 adds new time point, oldest solution is discarded and returned More...
 
void remove_latest ()
 removes latest time point More...
 
void remove_oldest ()
 removes oldest time point More...
 
size_t size () const
 returns number of time steps handled More...
 
SmartPtr< vector_typesolution (size_t i)
 returns solution More...
 
ConstSmartPtr< vector_typesolution (size_t i) const
 returns solution More...
 
number time (size_t i) const
 returns point in time for solution More...
 
virtual ~VectorTimeSeries ()
 

Protected Attributes

std::deque< TimeSolm_vTimeSol
 

Detailed Description

template<typename TVector>
class ug::VectorTimeSeries< TVector >

time series of solutions and corresponding time point

This class holds solutions and corresponding points in time. It is intended to group previous computed solutions for a time stepping scheme, such that previous steps can be passed to a time stepping scheme at once. Internally, this object is basically a deque of old solutions, and adding a newly computed solution lets the object pop the oldest stored solution.

Member Typedef Documentation

◆ vector_type

template<typename TVector >
typedef TVector ug::VectorTimeSeries< TVector >::vector_type

vector type of solutions

Constructor & Destructor Documentation

◆ ~VectorTimeSeries()

template<typename TVector >
virtual ug::VectorTimeSeries< TVector >::~VectorTimeSeries ( )
inlinevirtual

Member Function Documentation

◆ clear()

template<typename TVector >
void ug::VectorTimeSeries< TVector >::clear ( )
inline

clears the content of the member m_vTimeSol

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ clone()

template<typename TVector >
SmartPtr<VectorTimeSeries<vector_type> > ug::VectorTimeSeries< TVector >::clone ( ) const
inline

◆ latest() [1/2]

template<typename TVector >
SmartPtr<vector_type> ug::VectorTimeSeries< TVector >::latest ( )
inline

returns latest solution

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ latest() [2/2]

template<typename TVector >
ConstSmartPtr<vector_type> ug::VectorTimeSeries< TVector >::latest ( ) const
inline

const access to latest solution

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ latest_time()

template<typename TVector >
number ug::VectorTimeSeries< TVector >::latest_time ( ) const
inline

time associated with latest solution

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ oldest() [1/2]

template<typename TVector >
SmartPtr<vector_type> ug::VectorTimeSeries< TVector >::oldest ( )
inline

returns oldest solution

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ oldest() [2/2]

template<typename TVector >
ConstSmartPtr<vector_type> ug::VectorTimeSeries< TVector >::oldest ( ) const
inline

const access to oldest solution

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ oldest_time()

template<typename TVector >
number ug::VectorTimeSeries< TVector >::oldest_time ( ) const
inline

time associated with oldest solution

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ push()

template<typename TVector >
void ug::VectorTimeSeries< TVector >::push ( SmartPtr< vector_type vec,
number  time 
)
inline

◆ push_discard_oldest()

template<typename TVector >
SmartPtr<vector_type> ug::VectorTimeSeries< TVector >::push_discard_oldest ( SmartPtr< vector_type vec,
number  time 
)
inline

◆ remove_latest()

template<typename TVector >
void ug::VectorTimeSeries< TVector >::remove_latest ( )
inline

removes latest time point

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ remove_oldest()

template<typename TVector >
void ug::VectorTimeSeries< TVector >::remove_oldest ( )
inline

◆ size()

template<typename TVector >
size_t ug::VectorTimeSeries< TVector >::size ( ) const
inline

returns number of time steps handled

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ solution() [1/2]

template<typename TVector >
SmartPtr<vector_type> ug::VectorTimeSeries< TVector >::solution ( size_t  i)
inline

◆ solution() [2/2]

template<typename TVector >
ConstSmartPtr<vector_type> ug::VectorTimeSeries< TVector >::solution ( size_t  i) const
inline

returns solution

References ug::VectorTimeSeries< TVector >::m_vTimeSol.

◆ time()

template<typename TVector >
number ug::VectorTimeSeries< TVector >::time ( size_t  i) const
inline

Member Data Documentation

◆ m_vTimeSol


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