29 #ifndef Rythmos_DATA_STORE_DECL_H
30 #define Rythmos_DATA_STORE_DECL_H
32 #include "Rythmos_Types.hpp"
33 #include "Thyra_VectorBase.hpp"
34 #include "Teuchos_Describable.hpp"
39 template<
class Scalar>
40 class DataStore :
virtual public Teuchos::Describable
45 typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType ScalarMag;
55 DataStore(Scalar& time_
56 ,
const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& x_
57 ,
const Teuchos::RCP<
const Thyra::VectorBase<Scalar> >& xdot_
58 ,ScalarMag& accuracy_);
62 DataStore(
const DataStore<Scalar>& ds_in);
66 RCP<DataStore<Scalar> > clone()
const;
72 Teuchos::RCP<const Thyra::VectorBase<Scalar> > x;
75 Teuchos::RCP<const Thyra::VectorBase<Scalar> > xdot;
81 bool operator< (const DataStore<Scalar>& ds)
const;
84 bool operator<= (const DataStore<Scalar>& ds)
const;
87 bool operator< (
const Scalar& t)
const;
90 bool operator<= (
const Scalar& t)
const;
93 bool operator> (
const DataStore<Scalar>& ds)
const;
96 bool operator>= (
const DataStore<Scalar>& ds)
const;
99 bool operator> (
const Scalar& t)
const;
102 bool operator>= (
const Scalar& t)
const;
105 bool operator== (
const DataStore<Scalar>& ds)
const;
108 bool operator== (
const Scalar& t)
const;
111 typedef Array<DataStore<Scalar> > DataStoreVector_t;
114 typedef Array<const DataStore<Scalar> > constDataStoreVector_t;
117 typedef std::list<DataStore<Scalar> > DataStoreList_t;
120 typedef std::list<const DataStore<Scalar> > constDataStoreList_t;
124 std::string description()
const;
129 Teuchos::FancyOStream &out
130 ,
const Teuchos::EVerbosityLevel verbLevel
136 template<
class Scalar>
137 void dataStoreVectorToVector(
138 const typename DataStore<Scalar>::DataStoreVector_t &ds
139 ,Array<Scalar> *time_vec
140 ,Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > *x_vec
141 ,Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > *xdot_vec
142 ,Array<
typename Teuchos::ScalarTraits<Scalar>::magnitudeType> *accuracy_vec);
145 template<
class Scalar>
146 void vectorToDataStoreVector(
147 const Array<Scalar> &time_vec
148 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > &x_vec
149 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > &xdot_vec
150 ,
const Array<
typename Teuchos::ScalarTraits<Scalar>::magnitudeType> &accuracy_vec
151 ,
typename DataStore<Scalar>::DataStoreVector_t *ds);
154 template<
class Scalar>
155 void vectorToDataStoreList(
156 const Array<Scalar> &time_vec
157 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > &x_vec
158 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > &xdot_vec
159 ,
const Array<
typename Teuchos::ScalarTraits<Scalar>::magnitudeType> &accuracy_vec
160 ,
typename DataStore<Scalar>::DataStoreList_t *ds);
162 template<
class Scalar>
163 void vectorToDataStoreList(
164 const Array<Scalar> &time_vec
165 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > &x_vec
166 ,
const Array<Teuchos::RCP<
const Thyra::VectorBase<Scalar> > > &xdot_vec
167 ,
typename DataStore<Scalar>::DataStoreList_t *ds);
171 #endif // Rythmos_DATA_STORE_DECL_H