strategy.hh

Go to the documentation of this file.
1 
6 #ifndef timestpStrg_hh
7 #define timestpStrg_hh
8 
9 #include "basics/typedefs.hh"
10 #include "operator/compositions.hh"
11 #include "function/vector.hh"
12 #include "operator/solverFabric.hh"
13 
14 namespace timestepping {
15 
16  using concepts::Real;
17 
18  class TimeStepping;
19 
20  // ****************************************************** TimeStepStrategy **
21 
33  public:
42  const concepts::Vector<Real>& sol,
43  const concepts::Vector<Real>& rhs,
44  Real dt) :
45  solver_(fabric(*lhs)),
46  liCo_(lhs),
47  sol_(sol),
48  rhs_(rhs),
49  dt_(dt),
50  t_(0) {}
51  protected:
52  friend class TimeStepping;
57  virtual void next() = 0;
59  std::unique_ptr<concepts::Operator<Real> > solver_;
70  concepts::Vector<Real> sol_; // sol_ = Y(t_n)
75  concepts::Vector<Real> rhs_; // rhs_ = rhs(t_n)
77  Real dt_; // dt_ = t_n - t_{n-1},
79  Real t_; // t_ = t_n
80  };
81 
82 }
83 
84 #endif // timestpStrg_hh
concepts::Vector< Real > sol_
The solution vector of the linear equation system which is solved by the friend class TimeStepping.
Definition: strategy.hh:70
std::unique_ptr< concepts::Operator< Real > > solver_
Solver for the linear system.
Definition: strategy.hh:59
Real dt_
Time step size.
Definition: strategy.hh:77
Timestepping methods used to solve PDEs in time and space.
Definition: alpha.hh:18
virtual void next()=0
The overloaded member function next() has to calculate the new right hand side and to release the sol...
concepts::Vector< Real > rhs_
The right hand side vector of the linear equation system which is solved by the friend class TimeStep...
Definition: strategy.hh:75
Abstract strategy class for the class Timestepping.
Definition: strategy.hh:32
This class encapsulates a general timestep solver concept to solve linear PDE in time and space.
Definition: timestepping.hh:42
concepts::Operator< Real > * liCo_
Operator of the linear equation system which is solved by the friend class TimeStepping.
Definition: strategy.hh:65
Class providing an output operator.
Real t_
Time of the actual solution.
Definition: strategy.hh:79
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
TimeStepStrategy(concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > *lhs, const concepts::Vector< Real > &sol, const concepts::Vector< Real > &rhs, Real dt)
Constructor.
Definition: strategy.hh:40
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich