Timestep strategy for the Theta-Scheme algorithm for first order problems in time. More...

#include <theta.hh>

Inheritance diagram for timestepping::Theta:
timestepping::TimeStepStrategy concepts::OutputOperator

Public Member Functions

 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. More...
 
virtual ~Theta ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 
virtual void next ()
 The overloaded member function next() has to calculate the new right hand side and to release the solution vector. More...
 

Protected Attributes

Real dt_
 Time step size. More...
 
concepts::Operator< Real > * liCo_
 Operator of the linear equation system which is solved by the friend class TimeStepping. More...
 
concepts::Vector< Real > rhs_
 The right hand side vector of the linear equation system which is solved by the friend class TimeStepping. More...
 
concepts::Vector< Real > sol_
 The solution vector of the linear equation system which is solved by the friend class TimeStepping. More...
 
std::unique_ptr< concepts::Operator< Real > > solver_
 Solver for the linear system. More...
 
Real t_
 Time of the actual solution. More...
 

Private Attributes

concepts::Operator< Real > & D0_
 
concepts::Operator< Real > & D1_
 Space operator. More...
 
std::unique_ptr< concepts::Operator< Real > > lhs_
 Left hand side of the scheme. More...
 
Real theta_
 Parameter of the scheme. More...
 
timestepping::TimeVectortrhs_
 External driver function. More...
 
concepts::Vector< Real > Yn1_
 Store the latest timestep. More...
 

Detailed Description

Timestep strategy for the Theta-Scheme algorithm for first order problems in time.

\[ [ D_1 \partial_t + D_0 ] y(x,t) = f(x,t) \]

The scheme has one parameter theta. The scheme is implicit if theta!=0 and it has convergence order 2 if theta = 1/2. The algorithm is absolutely stable with the predefined parameters.

See also
C. Schwab Einführung in die Numerik Partieller Differentialgleichungen: Zeitabhängige Probleme, lecture notes 2001.
Author
Manuel Walser, 2002

Definition at line 40 of file theta.hh.

Constructor & Destructor Documentation

◆ Theta()

timestepping::Theta::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.

Parameters
fabricSolver fabric to solve the occuring systems
D1Space operator D1
D0Space operator D0
trhsTimedependent external driver f(x,t)
Y0Initial condition y(x,0)
dtTime step size
thetaParameter of the Theta scheme

◆ ~Theta()

virtual timestepping::Theta::~Theta ( )
virtual

Member Function Documentation

◆ info()

virtual std::ostream& timestepping::Theta::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

◆ next()

virtual void timestepping::Theta::next ( )
protectedvirtual

The overloaded member function next() has to calculate the new right hand side and to release the solution vector.

Then the Timestepping solver can set the new solution.

Implements timestepping::TimeStepStrategy.

Member Data Documentation

◆ D0_

concepts::Operator<Real> & timestepping::Theta::D0_
private

Definition at line 64 of file theta.hh.

◆ D1_

concepts::Operator<Real>& timestepping::Theta::D1_
private

Space operator.

Definition at line 64 of file theta.hh.

◆ dt_

Real timestepping::TimeStepStrategy::dt_
protectedinherited

Time step size.

Definition at line 77 of file strategy.hh.

◆ lhs_

std::unique_ptr<concepts::Operator<Real> > timestepping::Theta::lhs_
private

Left hand side of the scheme.

Definition at line 72 of file theta.hh.

◆ liCo_

concepts::Operator<Real>* timestepping::TimeStepStrategy::liCo_
protectedinherited

Operator of the linear equation system which is solved by the friend class TimeStepping.

It can be stored as a linear combination of two operators. The exact form depends on the specific scheme.

See also
TimeStepping

Definition at line 65 of file strategy.hh.

◆ rhs_

concepts::Vector<Real> timestepping::TimeStepStrategy::rhs_
protectedinherited

The right hand side vector of the linear equation system which is solved by the friend class TimeStepping.


See also
TimeStepping

Definition at line 75 of file strategy.hh.

◆ sol_

concepts::Vector<Real> timestepping::TimeStepStrategy::sol_
protectedinherited

The solution vector of the linear equation system which is solved by the friend class TimeStepping.


See also
TimeStepping

Definition at line 70 of file strategy.hh.

◆ solver_

std::unique_ptr<concepts::Operator<Real> > timestepping::TimeStepStrategy::solver_
protectedinherited

Solver for the linear system.

Definition at line 59 of file strategy.hh.

◆ t_

Real timestepping::TimeStepStrategy::t_
protectedinherited

Time of the actual solution.

Definition at line 79 of file strategy.hh.

◆ theta_

Real timestepping::Theta::theta_
private

Parameter of the scheme.

Definition at line 70 of file theta.hh.

◆ trhs_

timestepping::TimeVector& timestepping::Theta::trhs_
private

External driver function.

Definition at line 66 of file theta.hh.

◆ Yn1_

concepts::Vector<Real> timestepping::Theta::Yn1_
private

Store the latest timestep.

Definition at line 68 of file theta.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich