SpECTRE  v2024.04.12
integration::GslQuadAdaptive< GslIntegralType::StandardGaussKronrod > Class Reference

Use Gauss-Kronrod rule to integrate a 1D-function. More...

#include <GslQuadAdaptive.hpp>

Public Member Functions

template<typename IntegrandType >
double operator() (IntegrandType &&integrand, const double lower_boundary, const double upper_boundary, const double tolerance_abs, const int key, const double tolerance_rel=0.) const
 

Detailed Description

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.


The documentation for this class was generated from the following file: