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

Integration over general domains #160

Open
lxvm opened this issue Mar 15, 2023 · 0 comments
Open

Integration over general domains #160

lxvm opened this issue Mar 15, 2023 · 0 comments

Comments

@lxvm
Copy link
Collaborator

lxvm commented Mar 15, 2023

Issue #41 points to an interesting package that provides an integrate(fun, dom) interface. I believe moving Integrals.jl to an interface like this could also allow developers to include more integration algorithms, because the current (lb, ub) interface to domains in IntegralProblems are restricted to hypercubes. Some algorithms can support integration over polyhedral domains (see IteratedIntegration.jl) and eventually people may want to do integration on manifolds. Although I don't want to reinvent the wheel with integration domains, it seems to me that certain algorithms only work with certain domains and rely crucially on the data representation of that domain.

My proposal is to switch from the (lb, ub) interface to a domain-like interface, where each domain type implements traits indicating the algorithms it is compatible with. For example, the (lb, ub) interface could be recast as a HyperCube(lb, ub) type that supports a method endpoints to interface with all of the current algorithms in Integrals.jl. Already within Integrals.jl, the feature set of QuadGK.jl isn't fully supported, since quadgk(f, a, b, c...) is a valid expression of limits of integration with breakpoints. This could be amended with a PuncturedSegment(a,b,c...) type that supports a method segments to pass the limits to quadgk, which for HyperCube would fall back to endpoints.

I am not very familiar with the AD internals, so I'm not sure if this change would create new problems, but if there is support for this modification I will gladly start a PR in this direction. I am unsure whether all of these new domain types would be a new package or whether this could work with some of DomainSets.jl by adding new methods to their types.

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

1 participant