newmark.hh

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