theta.hh

Go to the documentation of this file.
1 
6 #ifndef theta_hh
7 #define theta_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  // ***************************************************************** Theta **
25 
40  class Theta : public TimeStepStrategy {
41  public:
55  const concepts::Vector<Real>& Y0,
56  Real dt,
57  Real theta = 0.5);
58  virtual ~Theta();
59  protected:
60  virtual std::ostream& info(std::ostream& os) const;
61  virtual void next();
62  private:
68  concepts::Vector<Real> Yn1_; // Yn1 = Y(t_{n-1})
72  std::unique_ptr<concepts::Operator<Real> > lhs_;
73  };
74 
75 }
76 
77 #endif // theta_hh
concepts::Vector< Real > Yn1_
Store the latest timestep.
Definition: theta.hh:68
std::unique_ptr< concepts::Operator< Real > > lhs_
Left hand side of the scheme.
Definition: theta.hh:72
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
concepts::Operator< Real > & D1_
Space operator.
Definition: theta.hh:64
Timestepping methods used to solve PDEs in time and space.
Definition: alpha.hh:18
Timestep strategy for the Theta-Scheme algorithm for first order problems in time.
Definition: theta.hh:40
virtual void next()
The overloaded member function next() has to calculate the new right hand side and to release the sol...
timestepping::TimeVector & trhs_
External driver function.
Definition: theta.hh:66
Abstract strategy class for the class Timestepping.
Definition: strategy.hh:32
Class implementing time dependent vectors.
Definition: vectors.hh:53
Real theta_
Parameter of the scheme.
Definition: theta.hh:70
concepts::Operator< Real > & D0_
Definition: theta.hh:64
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Theta(concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > &D1, concepts::Operator< Real > &D0, timestepping::TimeVector &trhs, const concepts::Vector< Real > &Y0, Real dt, Real theta=0.5)
Constructor.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich