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

Print an error if non-positive dt is detected #192

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Print an error if non-positive dt is detected #192

merged 3 commits into from
Nov 15, 2023

Conversation

kbarros
Copy link
Member

@kbarros kbarros commented Nov 15, 2023

Print an error if non-positive dt is detected for the usual constructors of any of the integrators. There might be some internal use cases for negative dt; this can be achieved with a mutable update:

integrator = ImplicitMidpoint(0.1)
integrator.Δt *= -1

Also deprecate the Base.copy(dyn::Langevin) overload. For user code, the same can be achieved with deepcopy(dyn). It's not clear we want to recommend that to users, though. See #193 for discussion.

@kbarros kbarros merged commit bc658c8 into main Nov 15, 2023
4 checks passed
@kbarros kbarros deleted the positive_dt branch November 15, 2023 21:49
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.

1 participant