When using LinearInterpolation for numberdensity and collisionfrequency fields of Species, the total runtime for a "Wait profile" is approximately twice the runtime for the same discretely sampled Wait profile with a CubicSplineInterpolation. This is likely because the DifferentialEquations solver is trying to resolve the "knees" between each piecewise linear segment.
Cubic splines may overshoot the local true density, so PCHIP interpolation is preferred, but there is no up-to-date Julia package for PCHIP right now. I have a private GitHub repo with three PCHIP algorithms but they can't be released under MIT license, so I'd rather not register them.
When using
LinearInterpolation
fornumberdensity
andcollisionfrequency
fields ofSpecies
, the total runtime for a "Wait profile" is approximately twice the runtime for the same discretely sampled Wait profile with aCubicSplineInterpolation
. This is likely because the DifferentialEquations solver is trying to resolve the "knees" between each piecewise linear segment.Cubic splines may overshoot the local true density, so PCHIP interpolation is preferred, but there is no up-to-date Julia package for PCHIP right now. I have a private GitHub repo with three PCHIP algorithms but they can't be released under MIT license, so I'd rather not register them.