/parallel-in-time_direct-adjoint

Companion code for the article "A parallel-in-time approach for accelerating direct-adjoint studies" by C. S. Skene, M. F. Eggl and P. J. Schmid (JCP, 2021)

Primary LanguagePythonMIT LicenseMIT

DOI

A parallel-in-time approach for accelerating direct-adjoint studies (companion code)

This repository contains companion code for the article "A parallel-in-time approach for accelerating direct-adjoint studies" by C. S. Skene, M. F. Eggl and P. J. Schmid (JCP, 2021). The code is not the code used for the article but is a new version written for educational purposes. We recommend that the user independently validates the code for their own purposes.

The algorithms are based on "PARAEXP: A Parallel Integrator for Linear Initial-Value Problems" by M. J. Gander and S. Güttel (SIAM J. Sci. Comput., 2013) as well as "A block Krylov subspace implementation of the time-parallel Paraexp method and its extension for nonlinear partial differential equations" by G. L. Kooij, M. A. Botchev and B. J. Geurts (J. Comput. Appl. Math, 2017).

The code is written in python and utilises the following libraries

  • numpy
  • scipy
  • mpi4py
  • matplotlib

The algorithms are contained in the files paraExpLin.py, paraExpNL.py and paraExpHyb.py. A simple exponential Euler timestepper is provided in exponentialIntegrators.py but it is straightforward for the user to implement their own exponential solvers. Also provided are the following examples

1 - Linear algorithm

The linear algorithm from section 3.1 is demonstrated by advectionDiffusion.py. An optimisation is conducted to determine the true forcing that generates a specific solution for a 1D advection diffusion equation. It can be run as

mpiexec -n np python advectionDiffusion.py

2 - Non-linear algorithm (parallel)

The non-linear parallel algorithm from section 3.2 is demonstrated by viscousBurgersNL.py. An optimisation is conducted to determine the true forcing that generates a specific solution for a 1D viscous Burgers equation, with the non-linear direct equation being solved in parallel. It can be run as

mpiexec -n np python viscousBurgersNL.py

3 - Non-linear algorithm (hybrid)

The non-linear hybrid algorithm from section 3.3 is demonstrated by viscousBurgersHyb.py. An optimisation is conducted to determine the true forcing that generates a specific solution for a 1D viscous Burgers equation, with the non-linear direct equation being solved in series. It can be run as

mpiexec -n np python viscousBurgersHyb.py

Citation

If you find this repository useful for your research please cite the paper

@article{Skene_Eggl_Schmid_2021,
title={A parallel-in-time approach for accelerating direct-adjoint studies},
author={C.S. Skene and M.F. Eggl and P.J. Schmid},
journal = {Journal of Computational Physics},
volume = {429},
pages = {110033},
year = {2021}}

Acknowledgements

The authors gratefully acknowledge the EPSRC and Roth PhD scholarships on which this research was conducted.