-
Notifications
You must be signed in to change notification settings - Fork 40
Description
According to Yigit, some groups have been using a private method I wrote in #1826 for gyrokinetic simulations. They are probably using it because it is 250x faster than the existing public method offered by DESC. This method is currently still a private method because the API is expected to change once the next improvement is released, which will likely yield another performance boost by at least
Note that, the starting point for the spectral to real space transform is the two-dimensional set of fourier modes on each surface since you have already summed over radial modes to compute lambda on surface in other routines. So all you need to do is matrix multiply the toroidal modes with the precomputed vandermonde basis at the given zeta points. This yields the Fourier series in theta on every (rho, zeta) with cheap cost of the following number of fused multiply and adds
and in particular only requires storing a precomputed Vandermonde matrix of size
This is far more performance than the full spectral to real space transform that is currently done which multiples all points by all modes then takes FFTs which has slow performance of
Therefore, this would be factor of
The objectives that would benefit most from this are the ballooning stability objectives and the bounce integral objectives. The ballooning stability objectives still use the slow method which takes seconds which is significant, so implementing this would see a 10^6 performance boost in that subroutine and that would be measurable.