|
SOFUS ..
|
Gauss-Legendre interfaces and implementations. More...
Classes | |
| struct | GLNode |
| Container for weight and nodes. More... | |
Functions | |
| double | GLQuad (size_t n, double(*f)(double, void *), void *data, double a, double b) |
| gl::GLNode | GL (size_t l, size_t k) |
| gl::GLNode | GLS (size_t n, size_t k) |
| double | besseljzero (int k) |
| double | besselj1squared (int k) |
Variables | |
| const double * | weights [_GL_LUT_TABLE_SIZE] |
| Weight used for Gauss-Legendre integration. More... | |
| const double * | abcissas [_GL_LUT_TABLE_SIZE] |
| Abcissae or coordinates used for Gauss-Legendre integration. More... | |
Gauss-Legendre interfaces and implementations.
| double besselj1squared | ( | int | k | ) |
This function computes the square of BesselJ(1, BesselZero(0,k))
| k |
| double besseljzero | ( | int | k | ) |
This function computes the k'th zero of the BesselJ(0,x)
| k |
| gl::GLNode GL | ( | size_t | l, |
| size_t | k | ||
| ) |
Purpose:
GL computes the kth GL pair of an n-point rule. It uses look-up tables for the n < 101.
Licensing:
This code is distributed under the BSD license.
Modified:
22 December 2015
Author:
Ignace Bogaert
Reference:
Ignace Bogaert, Iteration-free computation of Gauss-Legendre quadrature nodes and weights, SIAM Journal on Scientific Computing, Volume 36, Number 3, 2014, pages A1008-1026.
The only function that needs to be public
| l | The number of points in the given rule |
| k | The index of the point to be returned |
| double GLQuad | ( | size_t | n, |
| double(*)(double, void *) | f, | ||
| void * | data, | ||
| double | a, | ||
| double | b | ||
| ) |
Gauss-Legendre quadrature using an n-point rule.
| n | Quadrature order |
| f | Integrand |
| data | Pointer to user-defined data which will be passed to f every time it is called (as second parameter). |
| a | Lower integration limit |
| b | Upper integration limit |
| gl::GLNode GLS | ( | size_t | n, |
| size_t | k | ||
| ) |
GLS computes the kth GL pair of an n-point rule using the formula rather than look-up tables.
Reference:
Ignace Bogaert, Iteration-free computation of Gauss-Legendre quadrature nodes and weights, SIAM Journal on Scientific Computing, Volume 36, Number 3, 2014, pages A1008-1026.
| n | The number of points in the given rule |
| k | The index of the point to be returned |
|
extern |
Abcissae or coordinates used for Gauss-Legendre integration.
|
extern |
Weight used for Gauss-Legendre integration.
Referenced by CalcFastFourAny(), CalcFastFourAny2(), and CalcFourFast().