Inelastica.math.gausskronrod.GaussKronrod(n, tol=1e-10)[source]

Computes the (\(2n+1\))-point Gauss-Kronrod quadrature abscissa \(\{x_i\}\) and weights \(\{w_{1,i}\}\), \(\{w_{2,i}\}\). Kronrod adds \(n+1\) points to an \(n\)-point Gaussian rule.

Definition:

\(\int_{-1/2}^{1/2} f(x) dx \sim \sum_i w_{1,i} f(x_i)\).

The integration range corresponds to the first Brillouin zone in Inelastica.

The weights \(\{w_{2,i}\}\) are used for error estimation.

Parameters:
nint

Points for the Gaussian rule.

tolfloat

The requested absolute accuracy of the abscissas.

Returns:
xndarray

Abscissa for which the function is to be evaluated.

w1ndarray

Integration weights.

w2ndarray

Weights for error estimation.