gauss_quad Module

Utilities for Gaussian quadrature. This module provides subroutines to obtain zeros and weights of Gauss-Legendre and Gauss-Laguerre quadrature rules.



Contents


Variables

Type Visibility Attributes Name Initial
logical, private, parameter :: debug = .false.
logical, private :: weight_roundoff_correction = .false.

Functions

private elemental function legendre_p(n, x)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: x

Return Value double precision

private elemental function legendre_pp(n, x)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: x

Return Value double precision

private elemental function radau_p(n, x)

Polynomial for Radau-Gauss quadrature

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: x

Return Value double precision

private elemental function radau_pp(n, x)

Radau-Gauss polynomial derivative

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: x

Return Value double precision

private elemental function laguerre_l(n, x)

Returns L_n(x) where L_n(x) is an ordinary Laguerre polynomial

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: x

Return Value double precision

public elemental function laguerre_norm(n, x)

Returns (-1)**n n! L_n(x) where L_n(x) is an ordinary Laguerre polynomial

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real, intent(in) :: x

Return Value double precision

private elemental function laguerre_lp(n, x)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: x

Return Value double precision


Subroutines

public subroutine get_legendre_grids_from_cheb(x1, x2, zero, wgt)

returns Legendre zeros and weights in the given interval [x1,x2]. The order is determined from the size of the array 'zero'. $ if (abs(sum(wgt)/abs(x2-x1)) - 1.0 > epsilon(wgt)) then $ print *, 'roundoff correction occurred'

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: x1
real, intent(in) :: x2
real, intent(out), dimension (:) :: zero
real, intent(out), dimension (:) :: wgt

private subroutine find_zero_bisect_newton(n, xold, xnew, pold, pnew, zz)

FIXME : Add documentation

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: xold
double precision, intent(in) :: xnew
double precision, intent(in) :: pold
double precision, intent(in) :: pnew
double precision, intent(out) :: zz

private subroutine check_legendre_zero(x0, x1, zero)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: x0
real, intent(in) :: x1
real, intent(in), dimension (:) :: zero

private subroutine check_legendre_weights(norm, wgt)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: norm
real, intent(in), dimension (:) :: wgt

public subroutine get_radau_gauss_grids(x1, x2, zero, wgt, report_in)

returns radau zeros and weights in the given interval [x1,x2]. The order is determined from the size of the array 'zero'. Note that the last element of 'zero' and 'wgt' are the fixed lower endpoint -1 in (1,-1] Note also that 'zero'(i) contains the zeros in descending order 1 -> -1 with increasing i

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: x1
real, intent(in) :: x2
real, intent(out), dimension (:) :: zero
real, intent(out), dimension (:) :: wgt
logical, intent(in), optional :: report_in

private subroutine find_zero_bisect_newton_radau(n, xold, xnew, pold, pnew, zz)

FIXME : Add documentation

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: xold
double precision, intent(in) :: xnew
double precision, intent(in) :: pold
double precision, intent(in) :: pnew
double precision, intent(out) :: zz

public subroutine get_laguerre_grids(zero, wgt)

Returns Laguerre zeros and weights. The order is determined from the size of the array 'zero'.

Arguments

Type IntentOptional Attributes Name
real, intent(out), dimension (:) :: zero
real, intent(out), dimension (:) :: wgt

private subroutine find_zero(n, xold, xnew, pold, pnew, zz)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
double precision, intent(in) :: xold
double precision, intent(in) :: xnew
double precision, intent(in) :: pold
double precision, intent(in) :: pnew
double precision, intent(out) :: zz

public subroutine check_laguerre_zeros(zero)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension (:) :: zero

public subroutine check_laguerre_weights(wgt, eps)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension (:) :: wgt
real, intent(in) :: eps