timestepping::Euler Class Reference
Timestep strategy for the explicit Euler algorithm to solve first order problems in time. More...
#include <euler.hh>
Public Member Functions | |
Euler (concepts::SolverFabric< Real > &fabric, concepts::Operator< Real > &D1, concepts::Operator< Real > &D0, timestepping::TimeVector &trhs, const concepts::Vector< Real > &Y0, Real dt) | |
Constructor. More... | |
virtual | ~Euler () |
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_ |
Space operator. More... | |
TimeVector & | trhs_ |
External driver function. More... | |
TimeVector | Yn1_ |
Store the latest timestep. More... | |
Detailed Description
Timestep strategy for the explicit Euler algorithm to solve first order problems in time.
The scheme has convergence order 1. Please notice that this algorithm is not absolutely stable and may not converge if the stability condition is not fullfilled.
- See also
- H. R. Schwarz Numerische Mathematik, Teubner, 1997
Constructor & Destructor Documentation
◆ Euler()
timestepping::Euler::Euler | ( | concepts::SolverFabric< Real > & | fabric, |
concepts::Operator< Real > & | D1, | ||
concepts::Operator< Real > & | D0, | ||
timestepping::TimeVector & | trhs, | ||
const concepts::Vector< Real > & | Y0, | ||
Real | dt | ||
) |
Constructor.
- Parameters
-
D1 Space operator D1 D0 Space operator D0 trhs Timedependent external driver f(x,t) Y0 Initial condition y(x,0) dt Time step size
◆ ~Euler()
|
virtual |
Member Function Documentation
◆ info()
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::OutputOperator.
◆ 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_
|
private |
◆ dt_
|
protectedinherited |
Time step size.
Definition at line 77 of file strategy.hh.
◆ 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_
|
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_
|
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_
|
protectedinherited |
Solver for the linear system.
Definition at line 59 of file strategy.hh.
◆ t_
|
protectedinherited |
Time of the actual solution.
Definition at line 79 of file strategy.hh.
◆ trhs_
|
private |
◆ Yn1_
|
private |
The documentation for this class was generated from the following file:
- timestepping/euler.hh