Skip to content

Commit

Permalink
add missing package loading (#180)
Browse files Browse the repository at this point in the history
* add missing package loading

* add poincaresos small test for datasets

* add actual tests

* Update test/poincare.jl

---------

Co-authored-by: George Datseris <datseris.george@gmail.com>
  • Loading branch information
rusandris and Datseris authored Aug 10, 2023
1 parent 61ee01d commit fdf823e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DynamicalSystemsBase"
uuid = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
repo = "https://github.com/JuliaDynamics/DynamicalSystemsBase.jl.git"
version = "3.2.1"
version = "3.2.2"

[deps]
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Expand Down
1 change: 1 addition & 0 deletions src/derived_systems/poincare/hyperplane.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function poincaresos(A::StateSpaceSet, planecrossing::PlaneCrossing, j)
return data
end

using LinearAlgebra
function interpolate_crossing(A, B, pc::PlaneCrossing{<:AbstractVector})
# https://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection
t = LinearAlgebra.dot(pc.n, (pc.p₀ .- A))/LinearAlgebra.dot((B .- A), pc.n)
Expand Down
5 changes: 5 additions & 0 deletions test/poincare.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,9 @@ end
A = poincaresos(X, plane1)
@test dimension(A) == 3
@test all(x -> abs(x) < 1e-12, A[:, 1])
vec_plane = [1.0,0.0,0.0,0.0]
B = poincaresos(X, vec_plane)
@test dimension(B) == 3
@test all(x -> abs(x) < 1e-12, B[:, 1])
@test vec(A) == vec(B)
end

0 comments on commit fdf823e

Please sign in to comment.