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

Speed up calculation of adaptive time step #38

Open
namurphy opened this issue Aug 13, 2020 · 0 comments
Open

Speed up calculation of adaptive time step #38

namurphy opened this issue Aug 13, 2020 · 0 comments
Labels

Comments

@namurphy
Copy link
Member

The adaptive time step calculation is, much to my surprise, slowing things down. The intention of this calculation was to find the time step that corresponds to the temperature changing to the next value in the lookup table. To do so, it uses the temperature evolution in a function and then uses a root finder from SciPy. Unexpectedly, the root finder is taking as much if not more time than the actual time advance. We'll need to optimize this calculation. In the cases of T_e being inputted as an array, we should be able to do that calculation with algebra instead of calling a root finder.

In the meantime, things run faster if you specify dt when creating an NEI object and set adapt_dt to False.

@github-actions github-actions bot added the Stale label Mar 18, 2022
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

1 participant