In recent years, great progress has been made in the development of general-purpose, sparse spectral algorithms for solving PDEs in various geometries. Finding a good basis is a critical step towards implementing competitive spectral solvers for large-scale scientific problems, but many challenges remain. First, we need direct solvers that are fast and have low memory requirements for complex systems of equations. If this is achieved, the remaining challenge is to explicitly compute the PDE’s nonlinear terms as efficiently as possible, as this dominates the overall runtime of most solvers.

In this talk, I will describe the open-source spectral code Dedalus and focus on our efforts to develop general-purpose algorithms for meeting these challenges. We will look at linear systems from simulations of geophysical and astrophysical flows, new pivoting methods to avoid fill-in while factorizing these matrices, topological sorting of the nonlinear terms to minimize parallel communication and temporary variables, and rewriting PDEs to minimize all operations. Some of these challenges are well understood, but for most we only have heuristic solutions, and others remain open problems.