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

How to set a constant spacing grid for the solver #568

Closed
CNelias opened this issue Mar 13, 2024 · 2 comments
Closed

How to set a constant spacing grid for the solver #568

CNelias opened this issue Mar 13, 2024 · 2 comments
Labels

Comments

@CNelias
Copy link

CNelias commented Mar 13, 2024

Question❓

I have noticed that the time increments used by the solver for SDE (and probably differential equations as well) are not constant, which sometimes makes my results look super weird with dense and sparse regions.
Is there a way to ensure the dt is constant? Passing dt as an argument for the solver apparently does not do it as I still obtain varying time increments.

@frankschae
Copy link
Member

You could set adaptive=false and provide a dt. However, in your case it sounds like you actually want to provide some time points as saveat and let the solver step adaptively.

https://docs.sciml.ai/DiffEqDocs/stable/basics/common_solver_opts/

@CNelias
Copy link
Author

CNelias commented Mar 14, 2024

Thanks! I think this did the trick.

@CNelias CNelias closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants