Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added multi-level SDC for Firedrake and Gusto coupling #520

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

brownbaerchen
Copy link
Contributor

This PR includes very rudimentary versions of multi-level SDC that work with both the Firedrake and the Gusto examples. I have not made an effort to find the best possible parameters on the different levels. I reckon this exceeds the scope of what I can do within the rest of the week. And, as mentioned below, some performance improvements are needed to really use this in practice.
Anyways, I wanted to do the PR already now so I can add block Gauß-Seidel SDC / PFASST to the Gusto coupling in the coming days, which may be more useful.

Features

  • Transfer class MeshToMeshFiredrake that transfers between any unrelated Firedrake meshes that are simultaneously supported by the Firedrake.interpolate method.
  • Transfer class MeshToMeshFiredrakeHierarchy that transfers between meshes that have been generated using Firedrake.MeshHierarchy. This is a a bit more effort to setup, but is required for certain discretizations, as is the case in the Williamson 5 test case.

Tests

  • Interpolation of a simple quadratic polynomial is exact with both transfer classes
  • MLSDC converges in fewer iterations than single level SDC in the heat equation example
  • MLSDC has lower residual after same amount of iterations than single level SDC in a single step of Williamson 5 test case.

Caveats

  • Setting up MLSDC is quite a mess in Gusto. The problem class is only properly setup once the Gusto time stepper is instantiated and has added all upwinding etc. methods. So, rather than just give a list of refinements, it is necessary to setup Gusto time steppers for all levels individually and then go back and setup the MLSDC description by adding the different discretizations of the equation and residuals that you get from the instantiated time steppers as problem parameters. Can you think of a better way, @jshipton?
  • Interpolation between grids in the Gusto example is prohibitively expensive. In the test, the two level version runs about 10x as long as the single-level version with about a factor of 2 smaller residual in the end. Firedrake raises a warning that the transfer should be precomputed and cached. When I find out how to do that, I will add this, possibly in a follow-up PR.

@pancetta pancetta merged commit 8b1ed0c into Parallel-in-Time:master Jan 29, 2025
87 checks passed
@brownbaerchen brownbaerchen deleted the Firedrake_ML branch January 29, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants