Automating the spectral Galerkin method in Python
Abstract
Time: 16:10 - 16:30 The spectral Galerkin method employes globally supported spectral basis functions (e.g., Fourier, Chebyshev, Legendre) in the Galerkin approximation. Due to its accuracy, the method is often favoured in... [ view full abstract ]
Time: 16:10 - 16:30
The spectral Galerkin method employes globally supported spectral basis functions (e.g., Fourier, Chebyshev, Legendre) in the Galerkin approximation. Due to its accuracy, the method is often favoured in the study of fundamental physical phenomena in Cartesian domains, like turbulence and transitional flows in channels. Until now there have been few tools available for solving PDEs with this method, at least not if one is aiming at high performance supercomputers. With the shenfun Python module (github.com/spectralDNS/shenfun) an effort is made towards automating the implementation of the spectral Galerkin method for simple (yet large in scale) tensor product domains. The user interface to shenfun is intentionally made very similar to FEniCS (fenicsproject.org). PDEs are represented through weak variational forms and solved using efficient, order optimal direct solvers, that are made possible by exploiting the structure of the operators (e.g., tri-/penta-diagonality and upper Hessenberg), that arise from clever choices of modified Chebyshev or Legendre bases. MPI decomposition is achieved through the resently released mpi4py-fft module (bitbucket.org/mpi4py/mpi4py-fft), and all developed solver may, with no additional effort, be run on supercomputers using thousands of processors. This work is a continuation of M. Mortensen and H. P. Langtangen "High performance Python for direct numerical simulations of turbulent flows", Computer Physics Communications 203, p 53-65 (2016), that showed how a Python (Numpy+MPI for Python) implementation of a fully spectral Navier Stokes solver for triply periodic domains, could run as fast as C++ on thousands of processors. Since then, the shenfun package has also been used to create solvers for, e.g., turbulent channel flows and magnetohydrodynamics. This talk will give a demonstration of current capabilities and highlight Python as the powerful language it is for high performance scientific computing.
Authors
-
Mikael Mortensen
(University of Oslo)
-
Miroslav Kuchta
(University of Oslo)
-
Lisandro Dalcin
(King Abdullah University of Science and Technology)
Topic Area
Scientific Software
Session
» Scientific Software - part II (15:00 - Monday, 23rd October, 12th floor - Stratos)