Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
Private Member Functions | List of all members
sll_o_trapz_integrate_1d Interface Reference

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...
 

Detailed Description

Integrate numerically with Gauss-Lobatto formula.

Definition at line 34 of file sll_m_trapz_integration.F90.

Member Function/Subroutine Documentation

◆ trapz_integral_1d()

real(kind=f64) function trapz_integral_1d ( procedure(function_1d)  f,
real(kind=f64), dimension(n)  x,
integer(kind=i32), intent(in)  n 
)
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.

Parameters
fthe function to be integrated
[in]xpositions of points
[in]nthe number of points
Returns
The value of the integral

Definition at line 51 of file sll_m_trapz_integration.F90.

Here is the call graph for this function:
    Report Typos and Errors