![]()  | 
  
    Semi-Lagrangian Library
    
   Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices. 
   | 
 
Trapezoid formula for numerical integration.
Low-level mathematical utility that applies the Trapezoid formula to compute numeric integrals.
Derived types and interfaces | |
| interface | sll_o_trapz_integrate_1d | 
| Integrate numerically with Gauss-Lobatto formula.  More... | |
Functions/Subroutines | |
| real(kind=f64) function | trapz_integral_1d (f, x, n) | 
| Integrate with trapz formula.  More... | |
| real(kind=f64) function, dimension(n) | trapz_weights (n, x) | 
| Returns a 1d array of size (n) containing trapz integration weights in the interval [x(1),x(n)].  More... | |
      
  | 
  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.
      
  | 
  private | 
Returns a 1d array of size (n) containing trapz integration weights in the interval [x(1),x(n)].
| [in] | n | Number of gauss points. | 
| [in] | x | Point poisitions in interval. | 
Definition at line 72 of file sll_m_trapz_integration.F90.
 1.9.1