I'm looking for a super duper numerical quadrature function. It should have the following three properties:
- Adaptive - it automatically adjusts the density of sampling points to fit the integrand. This is absolutely necessary because my integrand is very nonuniform and expensive to compute.
- Vectorized - it calls the integrand on lists of sample points rather than one point at a time, for efficiency.
- Able to handle vector-valued functions - all components of the vector-valued integrand are computed at the same time for no additional cost, so it makes no sense to integrate all the components separately.
In addition, it should be:
- 2D - the integral I want to compute is a double integral over a planar region, and I want to be able to specify an overall (relative) tolerance for the whole integral and have it manage the error budget appropriately.
Does anybody know of a library that has such a function? Even two or three of the four properties would be better than nothing.
I'm using Python and SciPy, so if it already works with Python that's a bonus. (But I'm also able to write glue code to let it call my integrand if necessary.)