Update Dedalus benchmark script
Created originally on Bitbucket by kburns (Keaton Burns)
Was already merged in Bitbucket before import, marked as merged by the import user
This PR updates the bench/dedalus/ns2d_rot_faster.py benchmarking script with two changes:
- The problem size is modified to correctly account for the difference between the Dedalus dealiasing method (3/2 padding) and that of FluidSim (2/3 truncation). In Dedalus, the basis “resolution” is the number of resolved/dealiased modes, rather than the grid size. For proper comparisons to codes with 512 grid points, one should use floor(512*2/3)=341 modes in Dedalus, and a dealiasing factor of 512/341. For comparisons to codes with 1024 grid points, one should similarly use 682 modes in Dedalus and the same dealiasing factor.
- The problem formulation is modified to eliminate diagnostic equations in the implicit solves during timestepping. Dedalus is limited to first-order equations with Chebyshev bases, but not with Fourier bases, so the velocities and vorticity can be defined directly in terms of the streamfunction variable using “substitution” rules, rather than defined as extra state variables and computed during the implicit solve with additional equations. This reformulation computes the same solution while substantially improving performance.