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

Implement revised time stepping schemes #83

Closed
11 tasks done
charleskawczynski opened this issue Nov 17, 2022 · 7 comments
Closed
11 tasks done

Implement revised time stepping schemes #83

charleskawczynski opened this issue Nov 17, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request SDI

Comments

@charleskawczynski
Copy link
Member

charleskawczynski commented Nov 17, 2022

Purpose

The purpose of this SDI is to implement the SSP IMEX scheme, described in this document. The motivation for implementing this scheme is to maintain bounds-preservation of limited prognostic fields across stages.

Cost/Benefits/Risks

  • Cost: 2-3 engineers/scientists for 3-4 weeks
  • Benefits: It's expected that this scheme should preserve bounds constraints and (hopefully) improved numerical stability
  • Risks: Utilization of time and cost of resources

People and Personnel

(@ the personnel required/requested to implement the software solution)

Components

Components delivered will include:

  • Fix the (currently broken) docs

Imex ARK

  • An implementation of a user-facing scheme constructor
  • An implementation of ClimaTimeSteppers's step_u! with appropriate caching
  • A detailed outline of the notation and scheme in the documentation
  • Improve performance (if necessary). If this scheme is more than 30% slower than the existing implementation, we will spend 1 week on investigating and improving performance.

SSP RK

  • An implementation of a user-facing scheme constructor
  • An implementation of ClimaTimeSteppers's step_u! with appropriate caching
  • A detailed outline of the notation and scheme in the documentation
  • Improve performance (if necessary). If this scheme is more than 30% slower than the existing implementation, we will spend 1 week on investigating and improving performance.

Open performance issues that should be resolved at a later time

Inputs

N/A

Results and deliverables

See the components section

Task Breakdown And Tentative Due Date

Proposed Delivery Date

December 14th January 27th


CC

@cmbengue @tapios

@charleskawczynski charleskawczynski added the enhancement New feature or request label Nov 17, 2022
@tapios
Copy link

tapios commented Nov 17, 2022

What about this should take 3-4 weeks? The straightforward implementation should not take long. Are you concerned about performance?

@charleskawczynski
Copy link
Member Author

What about this should take 3-4 weeks? The straightforward implementation should not take long. Are you concerned about performance?

I think the 3-4 weeks takes several things into account:

  • We need to carefully converge on the notation in the code and documentation, to ensure that there's a clear mapping between the documentation and algorithms
  • We need to (or, there's great benefit to) extend the existing design, which adds some (but not excessive) friction to leverage already-engineered solutions (e.g., custom/generic stopping criteria, compatibility with OrdinaryDiffEq, leveraging existing CI / docs infra and tests).
  • We need to convert, to some extent, the google document into documentation in the code
  • We need to implement the algorithm, a (simple) caching structure
  • We need to get the resulting code running, i.e., fix bugs in the algorithm / caching structure after our first draft
  • Add tests (this should be fairly straight forward to extend), and time to fix issues that arise when running unit tests
  • We'll want to test this in ClimaAtmos, before merging, to make sure that we can demonstrate that the algorithm works in at least a simple example.

I'm not concerned about performance. At the moment, we're going to do the bare minimum for the implementation, and we'll only work on performance if we see it as an issue in the first ClimaAtmos tests.

@tapios
Copy link

tapios commented Nov 17, 2022

Ok. Tests we already have for all standard cases. You may just need to re-tool tests for limiters (incorporating @valeriabarra's tests).

Daniel and I can help with notation in the doc. Just let us know what you need. This is straightforward, as is making it code documentation when it's done.

How about we first get the code working (e.g., the revamped ARK_IMEX--it should be a straightforward replacement of what we have, with small changes when there are limiters)? Finish this, merge it, test it (with existing tests, first without limiters), and then move on. I want to avoid a situation in which this leads to overengineering before we test the simplest cases.

This was referenced Nov 19, 2022
@trontrytel trontrytel added the SDI label Nov 23, 2022
@trontrytel
Copy link
Member

From our discussion today: Possible test cases could be: gravity waves, sound wave on a sphere, diffusion.

@tapios
Copy link

tapios commented Nov 24, 2022

From our discussion today: Possible test cases could be: gravity waves, sound wave on a sphere, diffusion.

@charleskawczynski and I talked some more about this. It'll be better to have simpler test cases, which do not require an atmosphere model yet exercise the full functionality of the timesteppers. There are good tests in ARKode, including some that are multivariate (e.g., 1.13 and 1.14 in http://runge.math.smu.edu/ARKode_example.pdf).

bors bot added a commit that referenced this issue Dec 14, 2022
85: Revamp imex ark r=charleskawczynski a=charleskawczynski

This PR revamps the imex ark time stepper, as outlined in the google doc. It's still a WIP.

Related issue: #83.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
Co-authored-by: Dennis Yatunin <dyatun@gmail.com>
@charleskawczynski
Copy link
Member Author

Updates:

  • Imex ARK is now complete, merged in #85

Related PRs:

@OsKnoth, can you please comment on this issue and summarize the issue we faced, and fixed, in this commit? Just so that we have a public record

@charleskawczynski
Copy link
Member Author

charleskawczynski commented Dec 15, 2022

Next we have:

This was referenced Dec 15, 2022
bors bot added a commit that referenced this issue Jan 6, 2023
109: Add sketch for ssprk r=charleskawczynski a=charleskawczynski

This PR adds a sketch for the SSPRK algorithm.

A step towards closing #83.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
Co-authored-by: Dennis Yatunin <dyatun@gmail.com>
@cmbengue cmbengue assigned charleskawczynski and unassigned cmbengue and tapios Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SDI
Projects
None yet
Development

No branches or pull requests

5 participants