Skip to content

Commit

Permalink
reduce time test indexed_correlation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophHotter committed Oct 8, 2024
1 parent 0eb8797 commit d06c14c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions test/test_indexed_correlation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ p0_c2 = correlation_p0(corr2_sc, sol.u[end],ps.=>p0)
u0_c2 = correlation_u0(corr2_sc, sol.u[end])
@named csys2 = ODESystem(corr2_sc) # 5 equations, 8 parameters

prob_c2 = ODEProblem(csys2,u0_c2,(0.0,5.0),p0_c2)
# prob_c2 = ODEProblem(csys2,u0_c2,(0.0,5.0),p0_c2)
prob_c2 = ODEProblem(csys2,u0_c2,(0.0,0.05),p0_c2)
sol_c2 = solve(prob_c2,Tsit5();saveat=0.001,maxiters=1e8);

@test sol_c2.retcode == SciMLBase.ReturnCode.Success
Expand All @@ -152,8 +153,8 @@ eqs_ev = evaluate(eqs_c_2;limits=(N=>3))
u0_ev = zeros(ComplexF64, length(eqs_ev))

@named sys_ev = ODESystem(eqs_ev)
prob_ev = ODEProblem(sys_ev,u0_ev,(0.0, 1.0/50Γ_), ps.=>p0);

# prob_ev = ODEProblem(sys_ev,u0_ev,(0.0, 1.0/50Γ_), ps.=>p0);
prob_ev = ODEProblem(sys_ev,u0_ev,(0.0, 0.1/50Γ_), ps.=>p0);
sol_ev = solve(prob_ev,Tsit5(),maxiters=1e7)
@test sol_ev.retcode == SciMLBase.ReturnCode.Success

Expand All @@ -164,7 +165,8 @@ p0_c3 = correlation_p0(corr3_ev, sol_ev.u[end],ps.=>p0)
u0_c3 = correlation_u0(corr3_ev, sol_ev.u[end])
@named csys3 = ODESystem(corr3_ev)

prob_c3 = ODEProblem(csys3,u0_c3,(0.0,5.0),p0_c3)
# prob_c3 = ODEProblem(csys3,u0_c3,(0.0,5.0),p0_c3)
prob_c3 = ODEProblem(csys3,u0_c3,(0.0,0.05),p0_c3)
sol_c3 = solve(prob_c3,Tsit5();saveat=0.001,maxiters=1e8);

@test sol_c3.retcode == SciMLBase.ReturnCode.Success
Expand All @@ -186,8 +188,9 @@ u0_c = correlation_u0(corr_nss_sc, sol.u[end])

@named csys = ODESystem(corr_nss_sc)

prob_c = ODEProblem(csys,u0_c,(0.0,10.0),p0_c);
sol_c = solve(prob_c,Tsit5();saveat=0.001,maxiters=1e8);
# prob_c4 = ODEProblem(csys,u0_c,(0.0,10.0),p0_c);
prob_c4 = ODEProblem(csys,u0_c,(0.0,0.05),p0_c);
sol_c = solve(prob_c4,Tsit5();saveat=0.001,maxiters=1e8);

@test sol_c.retcode == SciMLBase.ReturnCode.Success

Expand Down Expand Up @@ -351,7 +354,8 @@ new_sum = qc._new_operator(sum1,h_)
ν_ = 1000Γ_ #ν=1Hz
ps = [N, Δ, g(1), κ, Γ, R, ν]
p0 = [N_, Δ_, g_, κ_, Γ_, R_, ν_]
prob = ODEProblem(sys,u0,(0.0, 1.0/50Γ_), ps.=>p0)
# prob = ODEProblem(sys,u0,(0.0, 1.0/50Γ_), ps.=>p0)
prob = ODEProblem(sys,u0,(0.0, 0.1/50Γ_), ps.=>p0)
# Solve the numeric problem
sol = solve(prob,Tsit5(),maxiters=1e7);
b = Index(h,:b,N,hA)
Expand Down

0 comments on commit d06c14c

Please sign in to comment.