Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Integrate numerically with Gauss-Lobatto formula. More...
Private Member Functions | |
real(kind=f64) function | trapz_integral_1d (f, x, n) |
Integrate with trapz formula. More... | |
Integrate numerically with Gauss-Lobatto formula.
Definition at line 34 of file sll_m_trapz_integration.F90.
|
private |
Integrate with trapz formula.
To integrate the function \( f(x) \) , we use the trapz formula
\[ \int_{-1}^1 f(x)dx \approx \sum_{k=1}^{n} w_k f(x_k) \]
where n and x represents the desired number of points and their positions.
f | the function to be integrated | |
[in] | x | positions of points |
[in] | n | the number of points |
Definition at line 51 of file sll_m_trapz_integration.F90.