Computation of Gauss-Lobatto quadrature rule nodes and weights
|
The Gauss-Lobatto quadrature formula is a quadrature formula having one of the nodes in the left boundary of the integration interval, and the second one in the right boundary. Thus, other N-2 nodes are located as N-point formula is accurate for the polynomials of order 2N-3 and lower (order decreased by 2 beside the Gauss quadrature formula).
The same algorithm is used as algorithm of generating Gauss quadrature formula, but instead of generating matrix Jn , the modified matrix J Ln is used:

The structure of matrix Jn-2 is described in algorithm of Gauss quadratre formula generating. It should be noted that the position of the two nodes is fixed, the degree of freedom is decreased by two, and the number of both coefficients a and b is passed into the algorithm decreased by 1.
Note #1
Although fixed nodes are usually found on the boundaries of the integration interval, it is not obligatory. If we pass any numbers beyond the bounds of the integration interval into the algorithm, it will work.
Implementation of the algorithm
In fact, the algorithm given here is only the wrapper for the algorithm of finding eigenvalues and eigenvectors of a symmetric tridiagonal matrix. On the basis of the passed arrays Alpha and Beta (they correspond to ai and bj coefficients) the algorithm forms a tridiagonal matrix, finds its eigenvalues and eigenvectors and then calculates the result - nodes and weights of the quadrature formula. At that point, there is a special operating mode in the subroutine which finds the eigenvectors. The algorithm can calculate only the first row of the eigenvectors matrix. It will take only O(N 2) instead of O(N 3).
Report a bug
C#
C# 1.0 source.
gqgenlobatto.csharp.zip - Computation of Gauss-Lobatto quadrature rule nodes and weights
C++
C++ source.
gqgenlobatto.cpp.zip - Computation of Gauss-Lobatto quadrature rule nodes and weights
ablas.zip - optimized basic linear algebra subroutines with SSE2 support (for C++ sources only)
C++, multiple precision arithmetic
C++ source. MPFR/GMP is used.
GMP source is available from gmplib.org. MPFR source is available from www.mpfr.org.
gqgenlobatto.mpfr.zip - Computation of Gauss-Lobatto quadrature rule nodes and weights
mpfr.zip - precompiled Win32 MPFR/GMP binaries
Delphi
Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
gqgenlobatto.delphi.zip - Computation of Gauss-Lobatto quadrature rule nodes and weights
Visual Basic 6
Visual Basic 6 source.
gqgenlobatto.vb6.zip - Computation of Gauss-Lobatto quadrature rule nodes and weights
Zonnon beta
Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
gqgenlobatto.zonnon.zip - Computation of Gauss-Lobatto quadrature rule nodes and weights
|