11 #ifndef ROL_TIMESTAMP_HPP
12 #define ROL_TIMESTAMP_HPP
17 #include "ROL_Ptr.hpp"
30 template<
typename Real>
34 template<
typename Real>
52 const std::vector<Real>& t_ref,
55 auto timeStamp = ROL::makePtr<std::vector<ROL::TimeStamp<Real>>>(num_steps);
57 Real dt = (t_final-t_initial)/num_steps;
61 (*timeStamp)[
k].t.resize(nt);
62 for(
size_type l=0; l<nt; ++l ) (*timeStamp)[
k].t[l] = dt*(
k+t_ref[l]);
63 (*timeStamp)[
k].k =
k;
72 #endif // ROL_TIMESTAMP_HPP
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...
typename PV< Real >::size_type size_type
Contains local time step information.
TimeStamp & operator=(const TimeStamp &ts)
Ptr< std::vector< TimeStamp< Real >>> TimeStampsPtr