|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/experimental/utility/adaptive.hpp>
Adaptive one-dimensional integrator based on a 13-point Gauss-Kronrod-Lobatto rule.
This class integrates a callable \( f(x) \) over a one-dimensional interval \( [a, b] \) by recursively subdividing the domain. On each subinterval it compares a 4-point Gauss-Lobatto estimate with a 7-point Kronrod estimate and keeps subdividing until their difference falls below the requested relative tolerance (scaled by a global 13-point Kronrod estimate of the integral).
It supports both scalar- and array-valued integrands and can be combined with CLEF lazy expressions through triqs::experimental::utility::integrate.
| T | Value type of the integrand, either a scalar type or an array type. |
Definition at line 31 of file adaptive.hpp.
Public Member Functions | |
| integrate_1d_adapt (double tolerance=1e-6) | |
| Construct an adaptive one-dimensional integrator with the given relative tolerance. | |
| auto | operator() (auto const &f, const std::pair< double, double > &domain) const |
| Perform the adaptive one-dimensional integration of a callable integrand over a given domain. | |
| auto | operator() (auto f, const std::pair< double, double > &domain) const |
| Build a lazy CLEF call expression for the integral of a lazy integrand over a given domain. | |
|
inline |
Construct an adaptive one-dimensional integrator with the given relative tolerance.
| tolerance | Relative tolerance at which the recursive subdivision is stopped. |
Definition at line 54 of file adaptive.hpp.
|
inline |
Perform the adaptive one-dimensional integration of a callable integrand over a given domain.
This overload is selected when the integrand is a plain callable (not a CLEF lazy expression). It evaluates a 13-point Kronrod estimate to set the error scale and then drives the recursive subdivision.
| f | Callable integrand \( f(x) \). |
| domain | Pair \( (a, b) \) giving the start and end points of the integration interval. |
Definition at line 82 of file adaptive.hpp.
|
inline |
Build a lazy CLEF call expression for the integral of a lazy integrand over a given domain.
This overload is selected when the integrand is a CLEF lazy expression. It defers the evaluation by returning a CLEF call expression that integrates the expression once its placeholders are assigned.
| f | Lazy CLEF expression representing the integrand \( f(x) \). |
| domain | Pair \( (a, b) \) giving the start and end points of the integration interval. |
Definition at line 66 of file adaptive.hpp.