Skip to content

Commit

Permalink
Update test/shooting/shooting_tests.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Qingyu Qu <[email protected]>
  • Loading branch information
avik-pal and ErikQQY authored Oct 1, 2023
1 parent ee7e240 commit 1bcc1d9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/shooting/shooting_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ end

@testset "Shooting with Complex Values" begin
# Test for complex values
function f1!(du, u, p, t)
du[1] = u[2]
du[2] = -u[1]
return nothing
end

function bc1!(resid, sol, p, t)
t₀, t₁ = first(t), last(t)
resid[1] = sol(t₀)[1]
resid[2] = sol(t₁)[1] - 1
return nothing
end
u0 = [0.0, 1.0] .+ 1im
bvp = BVProblem(f1!, bc1!, u0, tspan)
resid_f = Array{ComplexF64}(undef, 2)
Expand Down

0 comments on commit 1bcc1d9

Please sign in to comment.