![]() |
OGS 6.1.0-1721-g6382411ad
|
Backward differentiation formula.
Definition at line 452 of file TimeDiscretization.h.
#include <TimeDiscretization.h>
Public Member Functions | |
BackwardDifferentiationFormula (const unsigned num_steps) | |
~BackwardDifferentiationFormula () override | |
void | setInitialState (const double t0, GlobalVector const &x0) override |
Sets the initial condition. More... | |
double | getRelativeChangeFromPreviousTimestep (GlobalVector const &x, MathLib::VecNormType norm_type) override |
void | pushState (const double, GlobalVector const &x, InternalMatrixStorage const &) override |
void | popState (GlobalVector &x) override |
void | nextTimestep (const double t, const double delta_t) override |
double | getCurrentTime () const override |
double | getNewXWeight () const override |
Returns ![]() | |
void | getWeightedOldX (GlobalVector &y) const override |
Returns ![]() | |
![]() | |
TimeDiscretization ()=default | |
void | getXdot (GlobalVector const &x_at_new_timestep, GlobalVector &xdot) const |
virtual | ~TimeDiscretization ()=default |
virtual bool | isLinearTimeDisc () const |
virtual double | getDxDx () const |
virtual GlobalVector const & | getCurrentX (GlobalVector const &x_at_new_timestep) const |
virtual bool | needsPreload () const |
Private Member Functions | |
std::size_t | eff_num_steps () const |
Private Attributes | |
const unsigned | _num_steps |
The order of the BDF method. More... | |
double | _t |
![]() | |
double | _delta_t |
the timestep size More... | |
std::vector< GlobalVector * > | _xs_old |
solutions from the preceding timesteps More... | |
unsigned | _offset = 0 |
allows treating _xs_old as circular buffer More... | |
Additional Inherited Members | |
![]() | |
double | computeRelativeChangeFromPreviousTimestep (GlobalVector const &x, GlobalVector const &x_old, MathLib::VecNormType norm_type) |
![]() | |
std::unique_ptr< GlobalVector > | _dx |
Used to store ![]() | |
|
inlineexplicit |
Constructs a new instance.
num_steps | The order of the BDF to be used (= the number of timesteps kept in the internal history buffer). Valid range: 1 through 6. |
num_steps
order BDF, lower order BDFs are used in the first timesteps. Definition at line 467 of file TimeDiscretization.h.
|
inlineoverride |
Definition at line 474 of file TimeDiscretization.h.
References NumLib::GlobalVectorProvider::provider, and NumLib::VectorProvider::releaseVector().
|
inlineprivate |
Definition at line 511 of file TimeDiscretization.h.
|
inlineoverridevirtual |
Returns , i.e., the time at which the equation will be assembled.
Implements NumLib::TimeDiscretization.
Definition at line 504 of file TimeDiscretization.h.
|
overridevirtual |
Returns .
Implements NumLib::TimeDiscretization.
Definition at line 112 of file TimeDiscretization.cpp.
References NumLib::detail::BDF_Coeffs.
|
overridevirtual |
Get the relative change of solutions between two successive time steps by .
x | The solution at the current timestep. |
norm_type | The type of global vector norm. |
Implements NumLib::TimeDiscretization.
Definition at line 68 of file TimeDiscretization.cpp.
References NumLib::TimeDiscretization::computeRelativeChangeFromPreviousTimestep().
|
overridevirtual |
Returns .
Implements NumLib::TimeDiscretization.
Definition at line 118 of file TimeDiscretization.cpp.
References MathLib::LinAlg::axpy(), NumLib::detail::BDF_Coeffs, MathLib::LinAlg::copy(), and MathLib::LinAlg::scale().
|
inlineoverridevirtual |
Indicate that the computation of a new timestep is being started now.
delta_t
must not change throughout the entire time integration process! This is not checked by this code! Implements NumLib::TimeDiscretization.
Definition at line 498 of file TimeDiscretization.h.
|
inlineoverridevirtual |
Restores the given vector x to its old value. Used only for repeating of the time step with new time step size when the current time step is rejected. The restored x is only used as an initial guess for linear solver in the first Picard nonlinear iteration.
x | The solution at the current time step, which is going to be reset to its previous value. |
Implements NumLib::TimeDiscretization.
Definition at line 493 of file TimeDiscretization.h.
References MathLib::LinAlg::copy().
|
overridevirtual |
Indicate that the current timestep is done and that you will proceed to the next one.
t | The current timestep. |
x | The solution at the current timestep. |
strg | Trigger storing some internal state. Currently only used by the CrankNicolson scheme. |
Implements NumLib::TimeDiscretization.
Definition at line 75 of file TimeDiscretization.cpp.
References MathLib::LinAlg::copy(), and NumLib::GlobalVectorProvider::provider.
|
inlineoverridevirtual |
Sets the initial condition.
Implements NumLib::TimeDiscretization.
Definition at line 480 of file TimeDiscretization.h.
References NumLib::GlobalVectorProvider::provider.
|
private |
the timestep size
Definition at line 514 of file TimeDiscretization.h.
|
private |
The order of the BDF method.
Definition at line 512 of file TimeDiscretization.h.
|
private |
allows treating _xs_old
as circular buffer
Definition at line 517 of file TimeDiscretization.h.
|
private |
Definition at line 513 of file TimeDiscretization.h.
|
private |
solutions from the preceding timesteps
Definition at line 516 of file TimeDiscretization.h.