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.
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 anNEI
object and setadapt_dt
toFalse
.