$$ \newcommand{\bs}[1]{\boldsymbol{#1}} \newcommand{\ts}[1]{\bs{\textsf{#1}}} $$

 

 

 

Conclusions

In this paper, the Python module shenfun has been described. Within this module there are tools that greatly simplify the implementation of the spectral Galerkin method for tensor product grids, and parallel solvers may be written with ease and comfort. Shenfun provides a FEniCS like interface to the spectral Galerkin method, where equations are cast on a weak form, and where the required script-like coding remains very similar to the mathematics. We have verified and shown implementations for simple Poisson or biharmonic problems, as well as the nonlinear complex Ginzburg-Landau equation. On a final note, it should be mentioned that these tools have also been used to implement various Navier Stokes solvers within the spectralDNS project (github.com/spectralDNS), that has run on the Shaheen II supercomputer at KAUST, on meshes of size up to \( 2048^3 \).