Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Compute numerical integration with Gauss-Legendre formula. More...
Private Member Functions | |
real(kind=f64) function | gauss_legendre_integral_1d (f, a, b, n) |
Gauss-Legendre Quadrature. More... | |
Compute numerical integration with Gauss-Legendre formula.
Definition at line 61 of file sll_m_gauss_legendre_integration.F90.
|
private |
Gauss-Legendre Quadrature.
To integrate the function f(x) (real-valued and of a single, real-valued argument x) over the interval [a,b], we use the Gauss-Legendre formula
\[ \int_{-1}^1 f(x)dx \approx \sum_{k=1}^{n} w_k f(x_k) \]
where n represents the desired number of Gauss points.
the function maps the interval [-1,1] into the arbitrary interval [a,b].
To be considered is to split this function into degree-specific functions to avoid the select statement.
f | the function to be integrated | |
[in] | a | left-bound of the definition interval of f |
[in] | b | right-bound of the definition interval of f |
[in] | n | the desired number of Gauss points |
Definition at line 164 of file sll_m_gauss_legendre_integration.F90.