46 #ifndef ROL_TIMESTAMP_HPP
47 #define ROL_TIMESTAMP_HPP
59 template<
typename Real>
69 static ROL::Ptr<std::vector<TimeStamp<Real>>>
make_uniform( Real t_initial, Real t_final,
const std::vector<Real>& t_ref,
size_type num_steps ) {
71 auto timeStamp = ROL::makePtr<std::vector<ROL::TimeStamp<Real>>>(num_steps);
73 Real dt = (t_final-t_initial)/num_steps;
77 (*timeStamp)[
k].t.resize(nt);
78 for(
size_type l=0; l<nt; ++l ) (*timeStamp)[
k].t[l] = dt*(
k+t_ref[l]);
79 (*timeStamp)[
k].k =
k;
90 #endif // ROL_TIMESTAMP_HPP
typename PV< Real >::size_type size_type
Contains local time step information.
static ROL::Ptr< std::vector< TimeStamp< 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 std::vector< Real >::size_type size_type