MikaelSlevinsky / FastTransforms

:bullettrain_front: Fast orthogonal polynomial transforms :surfer:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add FFTW-based synthesis and analysis

ahbarnett opened this issue · comments

Hi Michael,

It took a little while to get build on linux going. Here's suggestions for tweaks to library (not worth a pull request). I only tested on ubuntu 16.04.

Append to Make.inc:

ifeq ($(UNAME), Linux)
LDLIBS += -lm
CFLAGS += -I/usr/lib/openblas-base
LDFLAGS += -L/usr/lib/openblas-base
endif

You'll also need to add in the ifeq windows block:
UNAME := Windows

Also, you'll want to add instructions to type in the shell:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.

Otherwise the executable can't find the .so

My tests now all run, although I don't understand the output.

PS It's not apparent from your docs how to do a simple spherical harmonic eval or projection onto a tensor product grid. Am I supposed to do sph to Fourier then do FFT2 on grid? I would have to guess the normalization, etc. An example of that would be very helpful.

PPS Good to see you at ICOSAHOM!

This is really helpful, thanks!

The plan is to port over the synthesis and analysis from FFTW as in the Julia package https://github.com/MikaelSlevinsky/FastTransforms.jl/blob/master/src/SphericalHarmonics/synthesisanalysis.jl

The repository now builds and runs the tests on Travis' linux infrastructure. FFTW-based synthesis and analysis are forthcoming and will be available as part of a first release.

P.S. I started adding FFTW overrides for synthesis and analysis on the sphere. I'm not closing the issue because I still have to do the triangle and disk cases, but I also added an example that works through a simple case numerically illustrating the spherical harmonic addition theorem.