H2Lib
3.0
|
Construction of one-dimensional quadrature rules. More...
Functions | |
void | assemble_gauss (uint m, preal x, preal w) |
Construction of quadrature points and weights for Gaussian quadrature. More... | |
Construction of one-dimensional quadrature rules.
Construction of quadrature points and weights for Gaussian quadrature.
The quadrature points are the zeros of the -th order Legendre polynomial. The Legendre polynomial can be expressed as the characteristic polynomial of a tridiagonal matrix, so its zeros can be computed by solving an eigenvalue problem. The quadrature weights can be obtained from the corresponding eigenvectors.
m | Required number of quadrature points. The resulting quadrature rule will be exact for polynomials of order . |
x | Should be an array of size , will be overwritten by the quadrature points in . |
w | Should be an array of size , will be overwritten by the quadrature weights. |