Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
TimeStepping::LowStorageRungeKutta< VectorType > Class Template Reference

#include <deal.II/base/time_stepping.h>

Inheritance diagram for TimeStepping::LowStorageRungeKutta< VectorType >:

Classes

struct  Status
 

Public Member Functions

 LowStorageRungeKutta ()=default
 
 LowStorageRungeKutta (const runge_kutta_method method)
 
void initialize (const runge_kutta_method method) override
 
double evolve_one_time_step (const std::function< VectorType(const double, const VectorType &)> &f, const std::function< VectorType(const double, const double, const VectorType &)> &id_minus_tau_J_inverse, double t, double delta_t, VectorType &y) override
 
double evolve_one_time_step (const std::function< VectorType(const double, const VectorType &)> &f, double t, double delta_t, VectorType &solution, VectorType &vec_ri, VectorType &vec_ki)
 
void get_coefficients (std::vector< double > &a, std::vector< double > &b, std::vector< double > &c) const
 
const Statusget_status () const override
 
double evolve_one_time_step (std::vector< std::function< VectorType(const double, const VectorType &)> > &F, std::vector< std::function< VectorType(const double, const double, const VectorType &)> > &J_inverse, double t, double delta_t, VectorType &y) override
 

Protected Attributes

unsigned int n_stages
 
std::vector< double > b
 
std::vector< double > c
 
std::vector< std::vector< double > > a
 

Private Member Functions

void compute_one_stage (const std::function< VectorType(const double, const VectorType &)> &f, const double t, const double factor_solution, const double factor_ai, const VectorType &corrent_ri, VectorType &vec_ki, VectorType &solution, VectorType &next_ri) const
 

Private Attributes

Status status
 

Detailed Description

template<typename VectorType>
class TimeStepping::LowStorageRungeKutta< VectorType >

The LowStorageRungeKutta class is derived from RungeKutta and implements a specific class of explicit methods. The main advantages of low-storage methods are the reduced memory consumption and the reduced memory access.

Definition at line 410 of file time_stepping.h.

Constructor & Destructor Documentation

◆ LowStorageRungeKutta() [1/2]

template<typename VectorType >
TimeStepping::LowStorageRungeKutta< VectorType >::LowStorageRungeKutta ( )
default

Default constructor. This constructor creates an object for which you will want to call initialize(runge_kutta_method) before it can be used.

◆ LowStorageRungeKutta() [2/2]

template<typename VectorType >
TimeStepping::LowStorageRungeKutta< VectorType >::LowStorageRungeKutta ( const runge_kutta_method method)

Constructor. This function calls initialize(runge_kutta_method).

Member Function Documentation

◆ initialize()

template<typename VectorType >
void TimeStepping::LowStorageRungeKutta< VectorType >::initialize ( const runge_kutta_method method)
overridevirtual

Initialize the explicit Runge-Kutta method.

Implements TimeStepping::RungeKutta< VectorType >.

◆ evolve_one_time_step() [1/3]

template<typename VectorType >
double TimeStepping::LowStorageRungeKutta< VectorType >::evolve_one_time_step ( const std::function< VectorType(const double, const VectorType &)> & f,
const std::function< VectorType(const double, const double, const VectorType &)> & id_minus_tau_J_inverse,
double t,
double delta_t,
VectorType & y )
overridevirtual

This function is used to advance from time t to t+ delta_t. f is the function \( f(t,y) \) that should be integrated, the input parameters are the time t and the vector y and the output is value of f at this point. id_minus_tau_J_inverse is a function that computes \( inv(I-\tau J)\) where \( I \) is the identity matrix, \( \tau \) is given, and \( J \) is the Jacobian \( \frac{\partial f}{\partial y} \). The input parameters are the time, \( \tau \), and a vector. The output is the value of function at this point. evolve_one_time_step returns the time at the end of the time step.

Implements TimeStepping::RungeKutta< VectorType >.

◆ evolve_one_time_step() [2/3]

template<typename VectorType >
double TimeStepping::LowStorageRungeKutta< VectorType >::evolve_one_time_step ( const std::function< VectorType(const double, const VectorType &)> & f,
double t,
double delta_t,
VectorType & solution,
VectorType & vec_ri,
VectorType & vec_ki )

This function is used to advance from time t to t+ delta_t. This function is similar to the one derived from RungeKutta, but does not required id_minus_tau_J_inverse because it is not used for explicit methods. evolve_one_time_step returns the time at the end of the time step. Note that vec_ki holds the evaluation of the differential operator, and vec_ri holds the right-hand side for the differential operator application.

◆ get_coefficients()

template<typename VectorType >
void TimeStepping::LowStorageRungeKutta< VectorType >::get_coefficients ( std::vector< double > & a,
std::vector< double > & b,
std::vector< double > & c ) const

Get the coefficients of the scheme. Note that here vector a is not the conventional definition in terms of a Butcher tableau but merely one of the sub-diagonals. More details can be found in step-67 and the references therein.

◆ get_status()

template<typename VectorType >
const Status & TimeStepping::LowStorageRungeKutta< VectorType >::get_status ( ) const
overridevirtual

Return the status of the current object.

Implements TimeStepping::TimeStepping< VectorType >.

◆ compute_one_stage()

template<typename VectorType >
void TimeStepping::LowStorageRungeKutta< VectorType >::compute_one_stage ( const std::function< VectorType(const double, const VectorType &)> & f,
const double t,
const double factor_solution,
const double factor_ai,
const VectorType & corrent_ri,
VectorType & vec_ki,
VectorType & solution,
VectorType & next_ri ) const
private

Compute one stage of low storage rk.

◆ evolve_one_time_step() [3/3]

template<typename VectorType >
double TimeStepping::RungeKutta< VectorType >::evolve_one_time_step ( std::vector< std::function< VectorType(const double, const VectorType &)> > & F,
std::vector< std::function< VectorType(const double, const double, const VectorType &)> > & J_inverse,
double t,
double delta_t,
VectorType & y )
overridevirtualinherited

This function is used to advance from time t to t+ delta_t. F is a vector of functions \( f(t,y) \) that should be integrated, the input parameters are the time t and the vector y and the output is value of f at this point. J_inverse is a vector functions that compute the inverse of the Jacobians associated to the implicit problems. The input parameters are the time, \( \tau \), and a vector. The output is the value of function at this point. This function returns the time at the end of the time step. When using Runge-Kutta methods, F and J_inverse can only contain one element.

Implements TimeStepping::TimeStepping< VectorType >.

Member Data Documentation

◆ status

template<typename VectorType >
Status TimeStepping::LowStorageRungeKutta< VectorType >::status
private

Status structure of the object.

Definition at line 519 of file time_stepping.h.

◆ n_stages

template<typename VectorType >
unsigned int TimeStepping::RungeKutta< VectorType >::n_stages
protectedinherited

Number of stages of the Runge-Kutta method.

Definition at line 281 of file time_stepping.h.

◆ b

template<typename VectorType >
std::vector<double> TimeStepping::RungeKutta< VectorType >::b
protectedinherited

Butcher tableau coefficients.

Definition at line 286 of file time_stepping.h.

◆ c

template<typename VectorType >
std::vector<double> TimeStepping::RungeKutta< VectorType >::c
protectedinherited

Butcher tableau coefficients.

Definition at line 291 of file time_stepping.h.

◆ a

template<typename VectorType >
std::vector<std::vector<double> > TimeStepping::RungeKutta< VectorType >::a
protectedinherited

Butcher tableau coefficients.

Definition at line 296 of file time_stepping.h.


The documentation for this class was generated from the following file: