JuliaDynamics / DynamicalSystemsBase.jl

Definition of dynamical systems and integrators for DynamicalSystems.jl
Other
56 stars 29 forks source link

`poincaresos` for datasets no longer works with vector-typed hyperplane #179

Closed rusandris closed 1 year ago

rusandris commented 1 year ago

It seems there's a bug somewhere with the namespaces/dependencies. MWE:

ds = PredefinedDynamicalSystems.lorenz()
traj, = trajectory(ds,50000;Ttr=1000)

poincaresos(traj,(1,15.0)) #works
poincaresos(traj,[1,0,0,15.0]) #doesn't work

Last function call gives the following error: ERROR: UndefVarError: LinearAlgebra not defined encountered when calling [1] interpolate_crossing(A::SVector{3, Float64}, B::SVector{3, Float64}, pc::PlaneCrossing{Vector{Float64}, 3, Float64})

The weird thing is

poincaresos(ds,(1,15.0))
poincaresos(ds,[1,0,0,15.0])

both work.

Julia Version 1.9.2 and DynamicalSystemsBase v3.2.1

Datseris commented 1 year ago

easy fix, add using LinearAlgebra before the function interpolate_crossing in the source code!