Reference documentation for deal.II version 8.4.1
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TimeStepping::ImplicitRungeKutta< VectorType > Class Template Reference

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

Inheritance diagram for TimeStepping::ImplicitRungeKutta< VectorType >:
[legend]

Classes

struct  Status
 

Public Member Functions

 ImplicitRungeKutta ()
 
 ImplicitRungeKutta (runge_kutta_method method, unsigned int max_it=100, double tolerance=1e-6)
 
void initialize (runge_kutta_method method)
 
double evolve_one_time_step (std_cxx11::function< VectorType(const double, const VectorType &)> f, std_cxx11::function< VectorType(const double, const double, const VectorType &)> id_minus_tau_J_inverse, double t, double delta_t, VectorType &y)
 
void set_newton_solver_parameters (unsigned int max_it, double tolerance)
 
const Statusget_status () const
 
- Public Member Functions inherited from TimeStepping::RungeKutta< VectorType >
virtual ~RungeKutta ()
 
double evolve_one_time_step (std::vector< std_cxx11::function< VectorType(const double, const VectorType &)> > &F, std::vector< std_cxx11::function< VectorType(const double, const double, const VectorType &)> > &J_inverse, double t, double delta_t, VectorType &y)
 
- Public Member Functions inherited from TimeStepping::TimeStepping< VectorType >
virtual ~TimeStepping ()
 

Private Member Functions

void compute_stages (std_cxx11::function< VectorType(const double, const VectorType &)> f, std_cxx11::function< VectorType(const double, const double, const VectorType &)> id_minus_tau_J_inverse, double t, double delta_t, VectorType &y, std::vector< VectorType > &f_stages)
 
void newton_solve (std_cxx11::function< void(const VectorType &, VectorType &)> get_residual, std_cxx11::function< VectorType(const VectorType &)> id_minus_tau_J_inverse, VectorType &y)
 
void compute_residual (std_cxx11::function< VectorType(const double, const VectorType &)> f, double t, double delta_t, const VectorType &old_y, const VectorType &y, VectorType &tendency, VectorType &residual) const
 

Private Attributes

bool skip_linear_combi
 
unsigned int max_it
 
double tolerance
 
Status status
 

Additional Inherited Members

- Protected Attributes inherited from TimeStepping::RungeKutta< VectorType >
unsigned int n_stages
 
std::vector< double > b
 
std::vector< double > c
 
std::vector< std::vector< double > > a
 

Detailed Description

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

This class is derived from RungeKutta and implement the implicit methods. This class works only for Diagonal Implicit Runge-Kutta (DIRK) methods.

Definition at line 289 of file time_stepping.h.

Constructor & Destructor Documentation

template<typename VectorType>
TimeStepping::ImplicitRungeKutta< VectorType >::ImplicitRungeKutta ( )
inline

Default constructor. initialize(runge_kutta_method) and set_newton_solver_parameters(unsigned int,double) need to be called before the object can be used.

Definition at line 299 of file time_stepping.h.

template<typename VectorType>
TimeStepping::ImplicitRungeKutta< VectorType >::ImplicitRungeKutta ( runge_kutta_method  method,
unsigned int  max_it = 100,
double  tolerance = 1e-6 
)

Constructor. This function calls initialize(runge_kutta_method) and initialize the maximum number of iterations and the tolerance of the Newton solver.

Member Function Documentation

template<typename VectorType>
void TimeStepping::ImplicitRungeKutta< VectorType >::initialize ( runge_kutta_method  method)
virtual

Initialize the implicit Runge-Kutta method.

Implements TimeStepping::RungeKutta< VectorType >.

template<typename VectorType>
double TimeStepping::ImplicitRungeKutta< VectorType >::evolve_one_time_step ( std_cxx11::function< VectorType(const double, const VectorType &)>  f,
std_cxx11::function< VectorType(const double, const double, const VectorType &)>  id_minus_tau_J_inverse,
double  t,
double  delta_t,
VectorType &  y 
)
virtual

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 \( (I-\tau J)^{-1}\) where \( I \) is the identity matrix, \( \tau \) is given, and \( J \) is the Jacobian \( \frac{\partial J}{\partial y} \). The input parameters this function receives 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 >.

template<typename VectorType>
void TimeStepping::ImplicitRungeKutta< VectorType >::set_newton_solver_parameters ( unsigned int  max_it,
double  tolerance 
)

Set the maximum number of iterations and the tolerance used by the Newton solver.

template<typename VectorType>
const Status& TimeStepping::ImplicitRungeKutta< VectorType >::get_status ( ) const
virtual

Return the status of the current object.

Implements TimeStepping::TimeStepping< VectorType >.

template<typename VectorType>
void TimeStepping::ImplicitRungeKutta< VectorType >::compute_stages ( std_cxx11::function< VectorType(const double, const VectorType &)>  f,
std_cxx11::function< VectorType(const double, const double, const VectorType &)>  id_minus_tau_J_inverse,
double  t,
double  delta_t,
VectorType &  y,
std::vector< VectorType > &  f_stages 
)
private

Compute the different stages needed.

template<typename VectorType>
void TimeStepping::ImplicitRungeKutta< VectorType >::newton_solve ( std_cxx11::function< void(const VectorType &, VectorType &)>  get_residual,
std_cxx11::function< VectorType(const VectorType &)>  id_minus_tau_J_inverse,
VectorType &  y 
)
private

Newton solver used for the implicit stages.

template<typename VectorType>
void TimeStepping::ImplicitRungeKutta< VectorType >::compute_residual ( std_cxx11::function< VectorType(const double, const VectorType &)>  f,
double  t,
double  delta_t,
const VectorType &  old_y,
const VectorType &  y,
VectorType &  tendency,
VectorType &  residual 
) const
private

Compute the residual needed by the Newton solver.

Member Data Documentation

template<typename VectorType>
bool TimeStepping::ImplicitRungeKutta< VectorType >::skip_linear_combi
private

When using SDIRK, there is no need to compute the linear combination of the stages. Thus, when this flag is true, the linear combination is skipped.

Definition at line 388 of file time_stepping.h.

template<typename VectorType>
unsigned int TimeStepping::ImplicitRungeKutta< VectorType >::max_it
private

Maximum number of iterations of the Newton solver.

Definition at line 393 of file time_stepping.h.

template<typename VectorType>
double TimeStepping::ImplicitRungeKutta< VectorType >::tolerance
private

Tolerance of the Newton solver.

Definition at line 398 of file time_stepping.h.

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

Status structure of the object.

Definition at line 403 of file time_stepping.h.


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