33 #ifndef __H__UG__LIB_DISC__TIME_DISC__PREVIOUS_SOLUTION__
34 #define __H__UG__LIB_DISC__TIME_DISC__PREVIOUS_SOLUTION__
57 template <
typename TVector>
137 :
vec(vec_),
t(t_) {}
190 for(
size_t t=0; t <
size(); ++t)
195 template <
typename TVector>
207 template <
typename TVector>
210 m_vTime.resize(vecTimeSeries->size());
211 for(
size_t i = 0; i <
m_vTime.size(); ++i)
212 m_vTime[i] = vecTimeSeries->time(i);
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
describes a mapping between two local index sets
Definition: function_group.h:186
Definition: local_algebra.h:50
Definition: local_algebra.h:198
void access_by_map(const FunctionIndexMapping &funcMap)
access only part of the functions using mapping (restrict functions)
Definition: local_algebra.h:306
time series of local vectors
Definition: solution_time_series.h:167
void read_values(ConstSmartPtr< VectorTimeSeries< TVector > > vecTimeSeries, LocalIndices &ind)
extract local values from global vectors
Definition: solution_time_series.h:196
void read_times(ConstSmartPtr< VectorTimeSeries< TVector > > vecTimeSeries)
extract time points
Definition: solution_time_series.h:208
number time(size_t i) const
returns time point i
Definition: solution_time_series.h:176
const LocalVector & solution(size_t i) const
returns the local vector for the i'th time point
Definition: solution_time_series.h:182
LocalVectorTimeSeries()
constructor
Definition: solution_time_series.h:170
LocalVector & solution(size_t i)
returns the local vector for the i'th time point
Definition: solution_time_series.h:185
size_t size() const
returns number of time points
Definition: solution_time_series.h:173
std::vector< number > m_vTime
time series
Definition: solution_time_series.h:217
const std::vector< number > & times() const
returns time points
Definition: solution_time_series.h:179
std::vector< LocalVector > m_vLocalVector
vector of local vectors (one for each time point)
Definition: solution_time_series.h:220
void access_by_map(const FunctionIndexMapping &funcMap)
access dofs by map
Definition: solution_time_series.h:188
grouping of solution and time point
Definition: solution_time_series.h:132
TimeSol(SmartPtr< vector_type > vec_, number t_)
Definition: solution_time_series.h:136
const number & time() const
const access time
Definition: solution_time_series.h:149
SmartPtr< vector_type > vec
Definition: solution_time_series.h:153
SmartPtr< vector_type > solution()
access solution
Definition: solution_time_series.h:140
ConstSmartPtr< vector_type > solution() const
const access solution
Definition: solution_time_series.h:143
number & time()
access time
Definition: solution_time_series.h:146
number t
Definition: solution_time_series.h:156
TimeSol()
Definition: solution_time_series.h:134
time series of solutions and corresponding time point
Definition: solution_time_series.h:59
size_t size() const
returns number of time steps handled
Definition: solution_time_series.h:83
number oldest_time() const
time associated with oldest solution
Definition: solution_time_series.h:101
number latest_time() const
time associated with latest solution
Definition: solution_time_series.h:110
ConstSmartPtr< vector_type > latest() const
const access to latest solution
Definition: solution_time_series.h:107
SmartPtr< vector_type > solution(size_t i)
returns solution
Definition: solution_time_series.h:89
virtual ~VectorTimeSeries()
Definition: solution_time_series.h:65
ConstSmartPtr< vector_type > solution(size_t i) const
returns solution
Definition: solution_time_series.h:92
SmartPtr< vector_type > push_discard_oldest(SmartPtr< vector_type > vec, number time)
adds new time point, oldest solution is discarded and returned
Definition: solution_time_series.h:116
SmartPtr< vector_type > oldest()
returns oldest solution
Definition: solution_time_series.h:95
TVector vector_type
vector type of solutions
Definition: solution_time_series.h:62
SmartPtr< vector_type > latest()
returns latest solution
Definition: solution_time_series.h:104
number time(size_t i) const
returns point in time for solution
Definition: solution_time_series.h:86
ConstSmartPtr< vector_type > oldest() const
const access to oldest solution
Definition: solution_time_series.h:98
void clear()
clears the content of the member m_vTimeSol
Definition: solution_time_series.h:80
SmartPtr< VectorTimeSeries< vector_type > > clone() const
clones the object (deep-copy) including values
Definition: solution_time_series.h:68
void push(SmartPtr< vector_type > vec, number time)
adds new time point, not discarding the oldest
Definition: solution_time_series.h:113
void remove_oldest()
removes oldest time point
Definition: solution_time_series.h:127
void remove_latest()
removes latest time point
Definition: solution_time_series.h:124
std::deque< TimeSol > m_vTimeSol
Definition: solution_time_series.h:162
double number
Definition: types.h:124
void GetLocalVector(LocalVector &lvec, const TVector &vec)
Definition: local_algebra.h:739