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

 

 

 

Shenfun - automating the spectral Galerkin method

Mikael Mortensen (mikaem at math.uio.no)

Department of Mathematics, University of Oslo.

Nov 13, 2019


Summary. With the shenfun Python module (github.com/spectralDNS/shenfun) an effort is made towards automating the implementation of the spectral Galerkin method for simple tensor product domains, consisting of (currently) one non-periodic and any number of periodic directions. The user interface to shenfun is intentionally made very similar to FEniCS (fenicsproject.org). Partial Differential Equations are represented through weak variational forms and solved using efficient direct solvers where available. MPI decomposition is achieved through the mpi4py-fft module (bitbucket.org/mpi4py/mpi4py-fft), and all developed solvers may, with no additional effort, be run on supercomputers using thousands of processors. Complete solvers are shown for the linear Poisson and biharmonic problems, as well as the nonlinear and time-dependent Ginzburg-Landau equation.

Table of contents

Introduction
Spectral Galerkin Method
Shenfun
      Classes for basis functions
      Classes for matrices
      Variational forms in 1D
      Poisson equation implemented in 1D
Tensor product spaces
Other functionality of shenfun
Ginzburg-Landau equation
Conclusions
Acknowledgements
Bibliography

© 2019, Mikael Mortensen. Released under CC Attribution 4.0 license