euler.hh

Go to the documentation of this file.
1 
6 #ifndef euler_hh
7 #define euler_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  // ****************************************************************** Euler **
24 
36  class Euler : public TimeStepStrategy {
37  public:
49  const concepts::Vector<Real>& Y0,
50  Real dt);
51  virtual ~Euler();
52  protected:
53  virtual std::ostream& info(std::ostream& os) const;
54  virtual void next();
55  private:
61  TimeVector Yn1_; // Yn1 = Y(t_{n-1})
62  };
63 
64  // ********************************************************** LimitingEuler **
65 
78  public:
89  concepts::Operator<Real>& limiter,
91  const concepts::Vector<Real>& Y0,
92  Real dt);
93  virtual ~LimitingEuler();
94  protected:
95  virtual std::ostream& info(std::ostream& os) const;
96  virtual void next();
97  private:
103  TimeVector Yn1_; // Yn1 = Y(t_{n-1})
104  };
105 
106 }
107 
108 #endif // euler_hh
TimeVector & trhs_
External driver function.
Definition: euler.hh:101
virtual void next()
The overloaded member function next() has to calculate the new right hand side and to release the sol...
TimeVector & trhs_
External driver function.
Definition: euler.hh:59
Timestepping methods used to solve PDEs in time and space.
Definition: alpha.hh:18
TimeVector Yn1_
Store the latest timestep.
Definition: euler.hh:103
concepts::Operator< Real > & limiter_
Definition: euler.hh:99
Timestep strategy for the explicit Euler algorithm to solve first order problems in time.
Definition: euler.hh:36
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual void next()
The overloaded member function next() has to calculate the new right hand side and to release the sol...
Timestep strategy for the explicit Euler algorithm with limiter to solve first order problems in time...
Definition: euler.hh:77
Abstract strategy class for the class Timestepping.
Definition: strategy.hh:32
concepts::Operator< Real > & D0_
Space operator.
Definition: euler.hh:99
TimeVector Yn1_
Store the latest timestep.
Definition: euler.hh:61
Class implementing time dependent vectors.
Definition: vectors.hh:53
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
LimitingEuler(concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > &D1, concepts::Operator< Real > &D0, concepts::Operator< Real > &limiter, timestepping::TimeVector &trhs, const concepts::Vector< Real > &Y0, Real dt)
Constructor.
concepts::Operator< Real > & D0_
Space operator.
Definition: euler.hh:57
Euler(concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > &D1, concepts::Operator< Real > &D0, timestepping::TimeVector &trhs, const concepts::Vector< Real > &Y0, Real dt)
Constructor.
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