-
Notifications
You must be signed in to change notification settings - Fork 27
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
Evaluation of SH/Zernike/Triangle expansions/polynomials? #108
Comments
There's 1D The API is subject to change because I think they need so-called transposed versions (transposed Clenshaw algorithm is for evaluating coefficients from function samples). Example code is JuliaApproximation/HarmonicOrthogonalPolynomials.jl#3 (comment) |
I guess the answer is no? That is, we'd have to implement for each case the example code? |
What kind of evaluation do you need? A single point? A Cartesian-product grid? A list of points? |
A single point, and a list of points, with support for in-place. (Would the best way to do a list of points to loop over single points? This seems memory ideal and good for parallelisation.) |
Note that Cartesian-product is already supported with specific grids. I guess a list of points can benefit from multithreading (and planning recurrence coefficients) but probably not SIMD? Aliasing for in-place methods only partially fills the point sets in more than one dimension unless the in-placing is a vector field. |
I thought you had a 2D clenshaw for triangle polynomials? |
I do, was hoping you had a better one 🤣 |
What we really need is a feature-complete C library for nonuniform FFTs (and DCTs and DSTs). Two options include https://github.com/flatironinstitute/finufft and https://github.com/danfortunato/nufftw. It seems that neither one completely replicates the FFTW interface at the moment. My 1D clenshaw code was really a case study in code generation for SIMD kernels so that I don't write them all by hand. If your points aren't Cartesian-product after some transformation, then I don't think I can do what you're asking better in C than in Julia, perhaps slapping on a Threads.@threads on a loop over the points. |
NFFT seems massive overkill when the grid is just a point |
Exactly, but how important is performance for only one point? |
Touche, but a very fast multithreaded 1-pt method would likely outperform NFFT for moderately large use cases |
I'm going to start cleaning up clenshaw from ApproxFun and put it in FastTransforms.jl. Do you have any idea why I pre-allocated the temporary vectors in https://github.com/JuliaApproximation/ApproxFunBase.jl/blob/master/src/LinearAlgebra/clenshaw.jl This seems completely nuts to me...why would we ever want these stored in memory at all? |
You should document your code...how do I know what |
At least there's tests 🌲. That's first kind Chebyshev summation. You can alias There's also the OP-like clenshaw which has the method |
Ok will add docs in a PR |
@MikaelSlevinsky Is there a routine for pointwise evaluation for these bases?
CC @TSGut
The text was updated successfully, but these errors were encountered: