|
SpECTRE
v2026.06.09.01
|
Use Gauss-Kronrod rule to integrate a 1D-function. More...
#include <GslQuadAdaptive.hpp>
Use Gauss-Kronrod rule to integrate a 1D-function.
The algorithm for "StandardGaussKronrod" uses the QAG algorithm to employ an adaptive Gauss-Kronrod n-points integration rule. Its function takes a lower_boundary and upper_boundary to the integration region, an upper bound for the absolute error tolerance_abs and a key. The latter is an index to the array [15, 21, 31, 41, 51, 61], where each element denotes how many function evaluations take place in each subinterval. A higher-order rule serves better for smooth functions, whereas a lower-order rule saves time for functions with local difficulties, such as discontinuities.