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

Redesign step/slab size changing #5999

Merged
merged 16 commits into from
Jul 11, 2024

Conversation

wthrowe
Copy link
Member

@wthrowe wthrowe commented May 15, 2024

The biggest improvements are completely avoiding roundoff error in some portions of the algorithm (mainly StepToTimes), and fixing the annoyance of things like control system limits gradually decreasing the time step over time in GTS mode.

Proposed changes

Upgrade instructions

When changing slab sizes, including step size with global time-stepping, some effects now only change the size for a single step, after which the step will revert to the previous value. These include the StepChoosers documented as limiting the step (as opposed to setting a goal) and the GTS control-system step limit.

The "Increase" StepChooser has been renamed to "LimitIncrease" to reflect this change, and "Constant" has been split into "Constant", which sets a goal, and "Maximum", which does not. Check the documentation or help text to see which type of change other StepChoosers now apply.

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

nilsdeppe
nilsdeppe previously approved these changes Jul 7, 2024
@nilsdeppe
Copy link
Member

@wthrowe this has conflicts now that need to be resolved :(

wthrowe added 16 commits July 8, 2024 14:27
Using powers of two also matches what we do in almost all cases in an
actual evolution.
The detailed roundoff behavior shouldn't matter in the regimes we care
about, but the symmetric form is convenient for tests where negating
all the inputs now exactly negates the output.
This does not change the StepChoosers to use new features of the
interface, although the new slab-size goal can come into effect with
the LimitTimeStep control system action (as desired).
Instead of making people figure out which to pass for backwards
evolutions, just accept either.
* Do nothing when not active
* Don't set limit as a new goal
StepToTimes no longer has roundoff problems.
Much more common operation than an unconditional size increase.
Like Constant, but will not increase the step size if it is not being
changed for other reasons.

Most appearances of Constant in the examples were not useful, so
removed instead of kept or replaced.
Always clearly indicate whether the class provides a goal or a limit.
@nilsdeppe nilsdeppe merged commit bc19774 into sxs-collaboration:develop Jul 11, 2024
22 checks passed
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