golem is hosted by Hepforge, IPPP Durham

src/numerical/adapt_gauss [ Modules ]

[ Top ] [ Modules ]

NAME

  Module adapt_gauss (file src/numerical/adapt_gauss.f90)

USAGE

  use adapt_gauss

DESCRIPTION

  This module contains several routines for a one dimensional
  integration using Gauss Kronrod method

OUTPUT

  The only subroutine which can be used by use association in adapt_gaus1,
  all the other subroutines/functions of this module are private

USES

  * precision (src/module/precision_golem.f90)
  * array (src/module/array.f90)
  * sortie_erreur (src/module/sortie_erreur.f90)

src/numerical/adapt_gauss/adapt_gauss1 [ Functions ]

[ Top ] [ Functions ]

NAME

  Subroutine adapt_gauss1 (file src/numerical/adapt_gauss.f90)

USAGE

  call adapt_gauss1(func,b_inf,b_sup,tol,rest,abserr)

DESCRIPTION

 This subroutine performs a one dimensional adaptative integration of the 
 function func between b_inf and b_sup using a Gaussian quadrature
 with Kronrod polynomial. The integrand is assumed to be complex.  For a
 certain criterium (function test_error), the range of integration is split 
 into two. All the cells are put into a chained list whose element are of 
 type intervalle 

INPUTS

  this subroutine takes as inputs:
  * func -- an external function as declared by the interface block
  * b_inf -- a real (type ki), the lower bound of the integration range
  * b_sup -- a real (type ki), the upper bound of the integration range
  * tol -- a real (type ki), the tolerance asked by the user

SIDE EFFECTS

  no side effects

RETURN VALUE

  it returns:
  * rest -- a complex (type ki), the result of the integration
  * abserr -- a complex (type ki), the absolute value of the estimated error

EXAMPLE

  to integrate a function f
  between 0 and 1 with a tolerance of 0.0001
  the result is put in result
  and the relative error returned in error 

  call adapt_gauss1(f,0._ki,1._ki,1.e-4_ki,result,error)