tvd_rk2.hh

Go to the documentation of this file.
1 
6 #ifndef tvd_rk2_hh
7 #define tvd rk2_hh
8 
9 #include "basics/typedefs.hh"
10 #include "function/vector.hh"
11 #include "timestepping/strategy.hh"
12 #include "timestepping/vectors.hh"
13 
14 namespace concepts {
15  template<typename F>
16  class Operator;
17 }
18 
19 namespace timestepping {
20 
21  using concepts::Real;
22 
23  // class TimeVector;
24 
25  // ****************************************************** TVD Runge Kutta **
29  class TvdRK2 : public TimeStepStrategy {
30  public:
41  TimeVector& trhs,
42  const concepts::Vector<Real>& Y0,
43  Real dt);
44  virtual ~TvdRK2();
45  protected:
46  virtual std::ostream& info(std::ostream& os) const;
47  virtual void next();
48  private:
54  TimeVector Yn1_; // Yn1 = Y(t_{n-1})
55  };
56 
61  public:
72  concepts::Operator<Real>& limiter,
73  TimeVector& trhs,
74  const concepts::Vector<Real>& Y0,
75  Real dt);
76  virtual ~LimitingTvdRK2();
77  protected:
78  virtual std::ostream& info(std::ostream& os) const;
79  virtual void next();
80  private:
86  TimeVector Yn1_; // Yn1 = Y(t_{n-1})
87  };
88 }
89 
90 #endif // tvd_rk2
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
concepts::Operator< Real > & D0_
Space operator.
Definition: tvd_rk2.hh:82
TimeVector Yn1_
Store the latest timestep.
Definition: tvd_rk2.hh:54
concepts::Operator< Real > & limiter_
Definition: tvd_rk2.hh:82
TvdRK2(concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > &D1, concepts::Operator< Real > &D0, TimeVector &trhs, const concepts::Vector< Real > &Y0, Real dt)
Constructor.
Timestepping methods used to solve PDEs in time and space.
Definition: alpha.hh:18
concepts::Operator< Real > & D0_
Space operator.
Definition: tvd_rk2.hh:50
TimeVector Yn1_
Store the latest timestep.
Definition: tvd_rk2.hh:86
Timestep stategy for an explicit two stage TVD Runge Kutta scheme to solve problems in time.
Definition: tvd_rk2.hh:60
LimitingTvdRK2(concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > &D1, concepts::Operator< Real > &D0, concepts::Operator< Real > &limiter, TimeVector &trhs, const concepts::Vector< Real > &Y0, Real dt)
Constructor.
Abstract strategy class for the class Timestepping.
Definition: strategy.hh:32
TimeVector & trhs_
External driver function.
Definition: tvd_rk2.hh:52
Class implementing time dependent vectors.
Definition: vectors.hh:53
virtual void next()
The overloaded member function next() has to calculate the new right hand side and to release the sol...
Timestep stategy for an explicit two stage TVD Runge Kutta scheme to solve problems in time.
Definition: tvd_rk2.hh:29
virtual void next()
The overloaded member function next() has to calculate the new right hand side and to release the sol...
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
TimeVector & trhs_
External driver function.
Definition: tvd_rk2.hh:84
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich