Optimization taking into account dealiasing
Created originally on Bitbucket by paugier (Pierre Augier)
As pointed out by a referee, for some classes (in particular fft3d.mpi_with_fftw1d and fft2d.mpi_with_fftw1d), it is possible to avoid a significant part of the computation by taking into account dealiasing.
I think these classes have to be sensible to the environment variable FLUIDFFT_DEALIASING_COEF
(the value has to be checked during the instantiation). The content of this variable can be a simple expression like 2/3
or a number between 0 and 1. For dealiasing_coef > 1
, we retrieve the standard behavior.
All modes such as k_i >= dealiasing_coef * max(k_i)
have to be zeros (so the corresponding FFT don't need to be computed and no need for MPI messages).
I think this problem is a good challenge for @CyrilleBonamy ! Can you please work on this @CyrilleBonamy? I think Patrick should also know such kinds of optimization...