Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
bdf.cc File Reference
#include <core/bdf.h>
#include <deal.II/lac/vector.h>
Include dependency graph for bdf.cc:

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 > &times)

Function Documentation

◆ bdf_coefficients()

Vector< double > bdf_coefficients ( const unsigned int p,
const std::vector< double > & time_steps )

Definition at line 10 of file bdf.cc.

References delta().

◆ calculate_bdf_coefficients()

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.

Parameters
[in]methodTime stepping method.
[in]time_stepsVector 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\).

Returns
Vector containing BDF integration coefficient values.
Note
At the moment, the highest implemented scheme is 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.

◆ delta()

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.

Parameters
[in]orderOrder of the BDF method.
[in]nInteger required for the recursive function calculation.
[in]jOrder of the divided difference of the value of interest.
[in]timesVector 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\).

Returns
Vector of \(n\) divided differences ( \(\delta^j\)) used in the calculation of BDF coefficients.

Definition at line 63 of file bdf.cc.

References delta().