Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple/nested integration error tolerances #167

Open
lxvm opened this issue Apr 18, 2023 · 2 comments
Open

Multiple/nested integration error tolerances #167

lxvm opened this issue Apr 18, 2023 · 2 comments

Comments

@lxvm
Copy link
Collaborator

lxvm commented Apr 18, 2023

In multi-variable integration, it can be efficient to integrate different variables with different algorithms. Currently, this can be expressed as an IntegralProblem for outer variables of integration whose integrand evaluates another IntegralProblem for inner variables of integration. Nearly all integration algorithms are oblivious to use cases such as these, which means that the caller has to make adjustments, such as rescaling absolute error tolerances for inner integrals, by hand. For example, with hypercube domains, the reltol can remain the same because quadrature (i.e. addition and multiplication) preserves the leading number of significant digits (in the absence of catastrophic cancellation), however the abstol for the inner integral should be the outer tolerance divided by vol(outer_hypercube) in order to provide the requested number of absolute digits to the outer integration routine after multiplying the outer integrand/inner integral by its outer quadrature weights.

I was thinking that IntegralProblem could be extended to allow multiple algorithm/domain pairs that indicate which algorithm to integrate which variables of integration, while handling calling each algorithm and rescaling tolerances internally. Could this feature be in the scope of Integrals.jl? Please advise

@ChrisRackauckas
Copy link
Member

This could definitely be in the scope of Integrals.jl. I'm not entirely sure how it would look like, but I could see this being useful.

@lxvm
Copy link
Collaborator Author

lxvm commented Nov 3, 2023

I've been playing around with nested quadratures and other meta algorithms in AutoBZCore.jl (example here), which is like my fork of Integrals.jl, and it works surprisingly well. Meta algorithms for counting the number of integrand evaluations, getting a list of the quadrature evaluation points, and various other features are all possible and made much easier and more generic by the Integrals.jl interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants