Adding fast multipole method for Legendre-Chebyshev transforms #83
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.
This PR adds code originally found in the https://github.com/spectralDNS/Legendre-to-Chebyshev repository. The code should work for single and double precision, but has not been tested for anything else. Basically, there is now
Usage:
where 'N' is the size of the 1D transform, 'fmm_plan' is a struct holding all necessary data for the transforms, 'maxs' is half the size of the smallest hierarchical submatrices, 'M' is the order of the Chebyshev approximation on the submatrices, 'BOTH' indicates that you should plan for both forward L2C and backward C2L transforms. Using either C2L or L2C and the plan will only be initialized for the given direction. The 'lagrange' argument is boolean and if 0 it is using a modal approach, whereas 1 leads to a nodal (the original of Alpert et al) approach. The 'verbose' is an integer and if 0 printing is minimised, whereas 2 leads to some printing, especially in the planning.