rungekutta4.hh

Go to the documentation of this file.
1 
6 #ifndef rungekutta4_hh
7 #define rungekutta4_hh
8 
9 #include "basics/typedefs.hh"
10 #include "function/vector.hh"
11 #include "strategy.hh"
12 
13 namespace concepts {
14  template<typename F>
15  class Operator;
16 }
17 
18 namespace timestepping {
19 
20  using concepts::Real;
21 
22  class TimeVector;
23 
24  // ************************************************* Runge Kutta 4th order **
25 
36  class RungeKutta4 : public TimeStepStrategy {
37  public:
51  const concepts::Vector<Real>& Y0,
52  Real dt);
53  virtual ~RungeKutta4();
54  protected:
55  virtual std::ostream& info(std::ostream& os) const;
56  virtual void next();
57  private:
63  concepts::Vector<Real> Yn1_; // Yn1 = Y(t_{n-1})
64  };
65 
66 }
67 
68 #endif // rungekutta4_hh
timestepping::TimeVector & trhs_
External driver function.
Definition: rungekutta4.hh:61
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Timestepping methods used to solve PDEs in time and space.
Definition: alpha.hh:18
RungeKutta4(concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > &D1, concepts::Operator< Real > &D0, timestepping::TimeVector &trhs, const concepts::Vector< Real > &Y0, Real dt)
Constructor.
Timestep strategy for the explicit 4th order RungeKutta algorithm to solve first order problems in ti...
Definition: rungekutta4.hh:36
Abstract strategy class for the class Timestepping.
Definition: strategy.hh:32
concepts::Vector< Real > Yn1_
Store the latest timestep.
Definition: rungekutta4.hh:63
Class implementing time dependent vectors.
Definition: vectors.hh:53
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
concepts::Operator< Real > & D0_
Space operator.
Definition: rungekutta4.hh:59
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
virtual void next()
The overloaded member function next() has to calculate the new right hand side and to release the sol...
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich