Multi dimensional integrator - #1435
Open
JacobHass8 wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I made a small function to integrate in higher dimensions by recursively integrating in 1D. It gets slower and less accurate as the dimension increases. I only wrote test for 2 and 3 dimensions and 3 dimensions was already getting slow.
However, this could be useful for low dimensional integrals that don't require high precision. When I researched higher dimensional integrals, most answers online suggested repeated 1D integration. From my understanding, this is actually how scipy implements their arbitrary dimensional integrator
nquad. This could work as a quick solution before implementing sparse grids.There's still a few more changes that I need to make, but the rough draft is here.