Skip to content

Conversation

@bendudson
Copy link
Contributor

Previously the timestep adjustment was inside a conditional if (looping) {.... The variable looping is false when the simulation time reaches or exceeds the next output time.

This meant that when the internal timestep exceeded the output step, looping was almost always false and so the internal timestep would saturate.

With this change a timestep adjustment will be considered after every successful internal timestep.

Note: There may have been a reason why timestep adjustments were not considered, but I can't remember what it was and it was not documented.

It looks like lots of changes but it's really only 2 or 3 lines. Mostly whitespace changes.

Previously the timestep adjustment was inside a conditional
`if (looping) {...`. The variable `looping` is false when the
simulation time reaches or exceeds the next output time.

This meant that when the internal timestep exceeded the output
step, `looping` was almost always `false` and so the internal
timestep would saturate.

With this change a timestep adjustment will be considered after
every successful internal timestep.

Note: There may have been a reason why timestep adjustments were
not considered, but I can't remember what it was and it was not
documented.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@ZedThree ZedThree merged commit 1de1a67 into next Oct 15, 2025
27 checks passed
@ZedThree ZedThree deleted the snes-timestep-adjust branch October 15, 2025 13:14
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