Description
The current run_simulation
interface is used to create and solve the appropriate ODE/SDE problem based on the thermostat algorithm.
NBodySimulator.jl/src/nbody_simulation_result.jl
Lines 284 to 290 in 172b046
It internally calls
calculate_simulation
for ODEs, which uses dispatch on the algorithm type to choose between creating and solving an ODEProblem
or SecondOrderODEProblem
.NBodySimulator.jl/src/nbody_simulation_result.jl
Lines 292 to 302 in 172b046
The current implementation thus only allows only some some dynamical ODE solvers to be used with run_simulation
since any other would use the ODEProblem
fallback and fail.
One way to solve this would be via a trait, as indicated in the comment. An other option would be to select only some predefined well performing integrators in the union and indicate to users that they should manually construct and solve the problem for other algorithms.
And a simpler option would be to just use SecondOrderODEProblem
s for everything and remove the ODEProblem
path.
I can start a PR if we decide upon a solution.