46#ifndef ROL_TIMESTAMP_HPP
47#define ROL_TIMESTAMP_HPP
62template<
typename>
struct TimeStamp;
65template<
typename Real>
69template<
typename Real>
72 using size_type =
typename std::vector<Real>::size_type;
87 const std::vector<Real>& t_ref,
90 auto timeStamp = ROL::makePtr<std::vector<ROL::TimeStamp<Real>>>(num_steps);
92 Real dt = (t_final-t_initial)/num_steps;
96 (*timeStamp)[
k].t.resize(nt);
97 for(
size_type l=0; l<nt; ++l ) (*timeStamp)[
k].t[l] = dt*(
k+t_ref[l]);
98 (*timeStamp)[
k].k =
k;
Ptr< std::vector< TimeStamp< Real > > > TimeStampsPtr
Contains local time step information.
typename std::vector< Real >::size_type size_type
TimeStamp & operator=(const TimeStamp &ts)
static TimeStampsPtr< Real > make_uniform(Real t_initial, Real t_final, const std::vector< Real > &t_ref, size_type num_steps)
Create a vector of uniform TimeStamp objects for the interval [t_initial,t_final] where each step has...