Go to the documentation of this file.00001
00002
00003 #ifndef euler_hh
00004 #define euler_hh
00005
00006 #include "basics/typedefs.hh"
00007 #include "function/vector.hh"
00008 #include "timestepping/strategy.hh"
00009 #include "timestepping/vectors.hh"
00010
00011 namespace concepts {
00012 template<typename F>
00013 class Operator;
00014 }
00015
00016 namespace timestepping {
00017
00018 using concepts::Real;
00019
00020
00021
00033 class Euler : public TimeStepStrategy {
00034 public:
00042 Euler(concepts::SolverFabric<Real>& fabric,
00043 concepts::Operator<Real>& D1,
00044 concepts::Operator<Real>& D0,
00045 timestepping::TimeVector& trhs,
00046 const concepts::Vector<Real>& Y0,
00047 Real dt);
00048 virtual ~Euler();
00049 protected:
00050 virtual std::ostream& info(std::ostream& os) const;
00051 virtual void next();
00052 private:
00054 concepts::Operator<Real> &D1_, &D0_;
00056 TimeVector &trhs_;
00058 TimeVector Yn1_;
00059 };
00060
00061
00073 class LimitingEuler : public TimeStepStrategy {
00074 public:
00082 LimitingEuler(concepts::SolverFabric<Real>& fabric,
00083 concepts::Operator<Real>& D1,
00084 concepts::Operator<Real>& D0,
00085 concepts::Operator<Real>& limiter,
00086 timestepping::TimeVector& trhs,
00087 const concepts::Vector<Real>& Y0,
00088 Real dt);
00089 virtual ~LimitingEuler();
00090 protected:
00091 virtual std::ostream& info(std::ostream& os) const;
00092 virtual void next();
00093 private:
00095 concepts::Operator<Real> &D1_, &D0_, &limiter_;
00097 TimeVector &trhs_;
00099 TimeVector Yn1_;
00100 };
00101
00102 }
00103
00104 #endif // euler_hh