![]() |
Hex
2.2
Hydrogen-electron collision solver
|
Gauss-Legendre quadrature. More...
#include <gauss.h>


Public Member Functions | |
| void | scaled_nodes_and_weights (int points, Complex x1, Complex x2, Complex *xs, Complex *ws) const |
| Get Gauss-Legendre quadrature points and weights in interval. More... | |
| template<class Functor , class... Data> | |
| Complex | quad (Functor f, Bspline const &bspline, int points, int iknot, Complex x1, Complex x2, Data... data) const |
| Gauss-Legendre integrator. More... | |
| template<class ClassPtr , class Functor , class... Data> | |
| Complex | quadMFP (ClassPtr ptr, Functor f, Bspline const &bspline, int points, int iknot, Complex x1, Complex x2, Data... data) const |
| Gauss-Legendre integrator. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from GaussLegendreData | |
| static void | gauss_nodes_and_weights (int points, const Real *&vx, const Real *&vw) |
| Retrieve Gauss-Legendre data. More... | |
| static void | precompute_nodes_and_weights (int points) |
| Precalculate nodes and weights so that the retrieval is fast and thread-safe. More... | |
This class's purpose is aid in fixed-order Gauss-Legendre quadrature. It is constructed above a B-spline environment, which is passed to the constructor. The functions "p_points" and "p_weights" return evaluation nodes and weights, respectively, and the functions "quad" do the fixed-order quadrature itself. Every call to p_points or p_weights resuts in call to gauss_nodes_and_weights, which uses GSL to get the requested data. The computed nodes and weights are stored in a cache table to allow faster subsequent computations.
|
inline |
Integrate the given function.
| f | Function of type (void (*) (unsigned, complex*, complex*, data...)), where the first parameter is number of points to evaluate, the second parameter is pointer to an array of double complex values at which to evaluate, the third is pointer to an array into which the data will be written (responsibility for memory management is on callers side) and finally the fourth (and further) parameter is any other data to be suplied to the function. |
| data | Data to pass to the function. |
| points | Gauss-Legendre points count. |
| iknot | Knot index. |
| x1 | Left integration boundary. |
| x2 | Right integration boundary. |
It must be
|
inline |
This is a variant of the other quad function that can be used together with the pointer-to-member-function arguments. A typical usage woud be
| void GaussLegendre::scaled_nodes_and_weights | ( | int | points, |
| Complex | x1, | ||
| Complex | x2, | ||
| Complex * | xs, | ||
| Complex * | ws | ||
| ) | const |
Map Gauss-Legendre points provided by gauss_nodes_and_weights to a complex interval \( (x_1,x_2) \).
1.8.13