![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
Go to the source code of this file.
Functions | |
| Vector< double > | bdf_coefficients (const unsigned int p, const std::vector< double > &time_steps) |
| Vector< double > | calculate_bdf_coefficients (const Parameters::SimulationControl::TimeSteppingMethod method, const std::vector< double > &time_steps) |
| Vector< double > | delta (const unsigned int order, const unsigned int n, const unsigned int j, const Vector< double > ×) |
| Vector< double > bdf_coefficients | ( | const unsigned int | p, |
| const std::vector< double > & | time_steps ) |
| Vector< double > calculate_bdf_coefficients | ( | Parameters::SimulationControl::TimeSteppingMethod | method, |
| const std::vector< double > & | time_steps ) |
Calculate the coefficients required for backward differentiation formula (BDF) integration of order \(n\).
The coefficients are determined through a recursion algorithm. The algorithm is taken from: Hay, Alexander, et al. "hp-Adaptive time integration based on the BDF for viscous flows." Journal of Computational Physics 291 (2015): 151-176.
| [in] | method | Time stepping method. |
| [in] | time_steps | Vector containing all the time steps. The time steps should be in decreasing order. |
For example, if the method is a BDF2 ( \(n=2\)), it uses three values for the time: \(t\), \(t-\Delta t_1\) and \(t-\Delta t_2\). Thus, the time_steps vector should contain \(\Delta t_1\) and \(\Delta t_2\).
bdf3 (order=3). Definition at line 42 of file bdf.cc.
References Parameters::SimulationControl::bdf1, Parameters::SimulationControl::bdf2, Parameters::SimulationControl::bdf3, bdf_coefficients(), and Parameters::SimulationControl::steady_bdf.
| Vector< double > delta | ( | unsigned int | order, |
| unsigned int | n, | ||
| unsigned int | j, | ||
| const Vector< double > & | times ) |
Recursive function for calculating the \(j^{th}\) order divided differences ( \(\delta^j\)) that is used for calculating backward differentiation formula (BDF) coefficients.
The algorithm is taken from: Hay, Alexander, et al. "hp-Adaptive time integration based on the BDF for viscous flows." Journal of Computational Physics 291 (2015): 151-176.
| [in] | order | Order of the BDF method. |
| [in] | n | Integer required for the recursive function calculation. |
| [in] | j | Order of the divided difference of the value of interest. |
| [in] | times | Vector of times values corresponding to the various iteration in decreasing order. |
For example, if the method is a BDF2 ( \(n=2\)), three values of the time must be in the array: \(t\), \(t-\Delta t_1\) and \(t-\Delta t_2\).
Definition at line 63 of file bdf.cc.
References delta().