integration Module Reference

Numerical integration. More...

Functions/Subroutines

real function, public integrate (fkt, xl, xr, eps, plist, method)
 Numerical integration function. More...
 
recursive real function qadaptive1d_recursive (fkt, oldS, xl, xr, tol, plist)
 
real function qadaptive1d_iterative (fkt, oldS, xl, xr, tol, plist)
 
real function qgauss1d (fkt, xl, xr, plist)
 
real function qromberg (fkt, xl, xr, tol, plist)
 

Variables

integer, parameter maxrec = 100
 maximal depth for recursion More...
 
real, dimension(3, maxrecstack
 stack for iterative algorithm More...
 

Detailed Description

Numerical integration.

Author
Tobias Illenseer

The module implements the Gauss and Romberg quadrature schemes.

Function/Subroutine Documentation

◆ integrate()

real function, public integration::integrate (   fkt,
real, intent(in)  xl,
real, intent(in)  xr,
real, intent(in)  eps,
real, dimension(:), intent(inout), optional  plist,
integer, intent(in), optional  method 
)

Numerical integration function.

It computes an approximation for the definite integral of some function.

Returns
approximation for integral
Parameters
xl[in] fkt function for integration
xl[in] xl lower limit
xr[in] xr upper limit
eps[in] eps numerical precision
plist[in] plist parameter list for function evaluation
method[in] method quadrature scheme

The quadrature scheme could be one of

  1. adaptive Gauss with recursion
  2. adaptive Gauss with iteration
  3. Romberg

Definition at line 124 of file integration.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qadaptive1d_iterative()

real function integration::qadaptive1d_iterative (   fkt,
real, intent(in)  oldS,
real, intent(in)  xl,
real, intent(in)  xr,
real, intent(in)  tol,
real, dimension(:), intent(inout), optional  plist 
)
private

Definition at line 259 of file integration.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qadaptive1d_recursive()

recursive real function integration::qadaptive1d_recursive (   fkt,
real, intent(in)  oldS,
real, intent(in)  xl,
real, intent(in)  xr,
real, intent(in)  tol,
real, dimension(:), intent(inout), optional  plist 
)
private

Definition at line 219 of file integration.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qgauss1d()

real function integration::qgauss1d (   fkt,
real, intent(in)  xl,
real, intent(in)  xr,
real, dimension(:), intent(inout), optional  plist 
)
private

Definition at line 339 of file integration.f90.

Here is the caller graph for this function:

◆ qromberg()

real function integration::qromberg (   fkt,
real, intent(in)  xl,
real, intent(in)  xr,
real  tol,
real, dimension(:), intent(inout), optional  plist 
)
private

Definition at line 379 of file integration.f90.

Here is the caller graph for this function:

Variable Documentation

◆ maxrec

integer, parameter integration::maxrec = 100
private

maximal depth for recursion

Definition at line 45 of file integration.f90.

◆ stack

real, dimension(3,maxrec) integration::stack
private

stack for iterative algorithm

Definition at line 112 of file integration.f90.