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

Move DSS to the end of each implicit stage #348

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Move DSS to the end of each implicit stage #348

merged 2 commits into from
Jan 17, 2025

Conversation

dennisYatunin
Copy link
Member

Purpose

This PR moves the DSS operation from the middle of each implicit stage (between the partial stage assembly and the start of Newton's method) to the end of each implicit stage. The change is applied consistently to all algorithms, and it ensures that stage values passed to our explicit and limited tendencies are always continuous across element boundaries.

The minor version number is also incremented so that we can immediately test this out in ClimaAtmos.

Motivation

For all simulations on a sphere, our metric terms (J and g) are discontinuous across element boundaries. Since the implicit tendency uses these metric terms, it introduces discontinuities to the Runge-Kutta stages. To avoid these discontinuities when evaluating explicit and limited tendencies, we must apply DSS after the last iteration of Newton's method (or after the linear solve in the case of Rosenbrock methods). We were previously applying DSS before Newton's method (and before the linear solve for Rosenbrock) because we incorrectly assumed that our metric terms were continuous. However, this intermediate application of DSS is unnecessary, since the implicit tendency does not involve any horizontal derivatives and can therefore handle discontinuous arguments. So, we can simply move DSS to the end of each stage in order to fix this issue.


  • I have read and checked the items on the review checklist.

@dennisYatunin dennisYatunin merged commit 965ee2a into main Jan 17, 2025
9 of 10 checks passed
@dennisYatunin dennisYatunin deleted the dy/move_dss branch January 17, 2025 00:41
@charleskawczynski
Copy link
Member

Did we test this in Atmos yet?

@dennisYatunin
Copy link
Member Author

Opening a PR to test now.

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.

3 participants