Relax constraints relating naky to ny and ntheta0 to nx in box mode.
David Dickinson
Branch: feature/flexible_nl_padding
Branch: next
Merged
Merged pull request
Merged in feature/flexible_nl_padding (pull request #316)
Merged in feature/flexible_nl_padding (pull request #316)
Currently ny and nx have to exactly match the de-aliasing requirements - we set ny/nx and determine the naky and ntheta0 values we’re allowed to have. This typically leads to a conflict between choosing ny/nx values with low prime factors and naky/ntheta0 values with plenty of factors to provide many sweetspots. By decoupling the choice of ny and naky / nx and ntheta0 we are able to separately choose ny/nx/naky/ntheta0 to try to satisfy both performance requirements.
Â
With the code in this PR we now just require ny and nx to be at least as large as required for de-aliasing in the nonlinear term. We still need to ensure that de-aliasing conditions are met, so this code aborts if the choice of grids does not satisfy this.