reinit! error for parallel integrator and in-pace equations of motion
wisp92 opened this issue · comments
Describe the bug
Using reinit!
to re-initialize a parallel integrator of a continuous dynamical system that has in-place equations of motion throws an error if the provided state is a vector of vectors.
Due to the workaround implemented for this type of integrator (cf. continuous.jl in the DynamicalSystemsBase), the correct type for the state, in this case, should be a Matrix with a number of columns equal to the system's dimensions.
There is no error if the equations of motion are out-of-place.
Minimal Working Example
using DynamicalSystems
eom = @inline @inbounds function(ẋ, x, parameters, t)
ẋ[:] = x
return ẋ
end
ds = ContinuousDynamicalSystem(eom, zeros(3), nothing)
init = [rand(3), rand(3)]
integrator = parallel_integrator(ds, init)
reinit!(integrator, init)
Package versions
- [608a59af] ChaosTools v2.9.0
- ⌅ [5732040d] DelayEmbeddings v2.4.1
- [61744808] DynamicalSystems v2.3.2
- ⌅ [6e36e845] DynamicalSystemsBase v2.8.0
- ⌅ [ed8fcbec] Entropies v1.1.2
- [639c3291] RecurrenceAnalysis v1.8.1
Thanks! I am working on DynamicalSystems.jl 3.0 where I will implement most of these things from scratch and hopefully also fix all errors that remain. C.f. #176
And thanks for the great report, 100% nailed the problem.