This class encapsulates a general timestep solver concept to solve linear PDE in time and space. More...

#include <timestepping.hh>

Inheritance diagram for timestepping::TimeStepping:
concepts::OutputOperator

Public Member Functions

uint operator() (concepts::Vector< Real > &sol)
 
void operator() (concepts::Vector< Real > &sol, uint n)
 Returns the solution of the n'th timestep. More...
 
Real time () const
 Return the time of the current solution. More...
 
 TimeStepping (TimeStepStrategy &timeStepStrategy)
 Constructor. More...
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Attributes

uint n_
 The number of the timestep of the actual solution. More...
 
TimeStepStrategytimeStepStrategy_
 Timestep strategy of the solver. More...
 

Detailed Description

This class encapsulates a general timestep solver concept to solve linear PDE in time and space.

Any linear partial differential equation of the form

\[ ( D_k \partial_t^k + \dots + D_1 \partial_t + D_0 ) y(x,t) = f(x,t), \]

where Dn, ..., D0 are space operators that not depend on time. After the discretisation it can always be brought in the form

\[ ( D + const.(\Delta t) D') Y_n = V(Y_{n-1}, Y_{n-2}, ...), \]

where the LHS depends only on the timestep size and the RHS can be evalated from previous steps. Therefore the new solution Yn is best obtained with an LU separation of the LHS.

Author
Manuel Walser, 2002

Definition at line 42 of file timestepping.hh.

Constructor & Destructor Documentation

◆ TimeStepping()

timestepping::TimeStepping::TimeStepping ( TimeStepStrategy timeStepStrategy)

Constructor.

Parameters
timeStepStrategyTimestep strategy for solving the PDE

Member Function Documentation

◆ info()

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

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

◆ operator()() [1/2]

uint timestepping::TimeStepping::operator() ( concepts::Vector< Real > &  sol)

◆ operator()() [2/2]

void timestepping::TimeStepping::operator() ( concepts::Vector< Real > &  sol,
uint  n 
)

Returns the solution of the n'th timestep.

With the parameter n the actual solution is return, otherwise the specified step in the futur. A step number n before the actual step number is not possible and throws an exception

Parameters
solNew solution vector
nStep number of the solution n

◆ time()

Real timestepping::TimeStepping::time ( ) const

Return the time of the current solution.

Member Data Documentation

◆ n_

uint timestepping::TimeStepping::n_
private

The number of the timestep of the actual solution.

Definition at line 63 of file timestepping.hh.

◆ timeStepStrategy_

TimeStepStrategy& timestepping::TimeStepping::timeStepStrategy_
private

Timestep strategy of the solver.

Definition at line 65 of file timestepping.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