diff --git a/test/ode/ode_convergence_tests.jl b/test/ode/ode_convergence_tests.jl index af7adfbd2d..761161696f 100644 --- a/test/ode/ode_convergence_tests.jl +++ b/test/ode/ode_convergence_tests.jl @@ -1,5 +1,5 @@ # This definitely needs cleaning -using OrdinaryDiffEq, DiffEqDevTools, DiffEqBase, Test, Random +using OrdinaryDiffEq, Test, Random import DiffEqProblemLibrary.ODEProblemLibrary: prob_ode_linear, prob_ode_2Dlinear probArr = Vector{ODEProblem}(undef, 2) probArr[1] = prob_ode_linear @@ -7,8 +7,8 @@ probArr[1] = prob_ode_linear probArr[2] = prob_ode_2Dlinear srand(100) ## Convergence Testing -dts = 1.//2.^(8:-1:4) -dts1 = 1.//2.^(9:-1:5) +dts = 1 .//2 .^(8:-1:4) +dts1 = 1 .//2 .^(9:-1:5) testTol = 0.2 for i = 1:2 diff --git a/test/ode/ode_ssprk_tests.jl b/test/ode/ode_ssprk_tests.jl index ece9d8cda4..061a0e7f7c 100644 --- a/test/ode/ode_ssprk_tests.jl +++ b/test/ode/ode_ssprk_tests.jl @@ -3,7 +3,7 @@ import DiffEqProblemLibrary.ODEProblemLibrary: prob_ode_linear, prob_ode_2Dlinea srand(100) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) testTol = 0.25 f = (u,p,t)->cos(t) diff --git a/test/runtests.jl b/test/runtests.jl index 04479c9fdd..1e95240851 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -21,7 +21,7 @@ is_APPVEYOR = ( Sys.iswindows() && haskey(ENV,"APPVEYOR") ) #Start Test Script -tic() +@time begin if group == "All" || group == "Interface" @time include("discrete_algorithm_test.jl") @time include("ode/ode_tstops_tests.jl") @@ -64,7 +64,6 @@ if !is_APPVEYOR && ( group == "All" || group == "AlgConvergence_I" ) # ~ 2 s @time @testset "Adams Variable Coefficients Tests" begin include("ode/adams_tests.jl") end # ~ 50 s - # broken @time @testset "Nordsieck Tests" begin include("ode/nordsieck_tests.jl") end #@time @testset "Linear Methods Tests" begin include("linear_method_tests.jl") end # ~ 170 s @@ -83,5 +82,4 @@ if !is_APPVEYOR && ( group == "All" || group == "AlgConvergence_II" ) # ~ 140 s @time @testset "Linear-Nonlinear Krylov Methods Tests" begin include("linear_nonlinear_krylov_tests.jl") end end - -toc() +end # @time diff --git a/test/split_methods_tests.jl b/test/split_methods_tests.jl index 2a92c9f94f..748a62b122 100644 --- a/test/split_methods_tests.jl +++ b/test/split_methods_tests.jl @@ -46,32 +46,32 @@ fun = SplitFunction(f1, f2; analytic=(u0,p,t)->exp(2t)*u0) prob = SplitODEProblem(fun,1.0,(0.0,1.0)) sol = solve(prob,KenCarp3()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp3()) @test abs(sim.đ’Șest[:l∞]-3) < testTol sol = solve(prob,KenCarp4()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp4()) @test abs(sim.đ’Șest[:l∞]-4) < testTol sol = solve(prob,KenCarp5()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp5()) @test abs(sim.đ’Șest[:l∞]-5) < testTol # IMEXEuler -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim1 = test_convergence(dts,prob,IMEXEuler()) @test abs(sim1.đ’Șest[:l∞]-1) < testTol # CNAB2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNAB2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol # CNLF2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNLF2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol @@ -84,32 +84,32 @@ fun = SplitFunction(f1, f2; analytic=(u0,p,t)->exp(2t)*u0) prob = SplitODEProblem(fun,1.0,(0.0,1.0)) sol = solve(prob,KenCarp3()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp3()) @test abs(sim.đ’Șest[:l∞]-3) < testTol sol = solve(prob,KenCarp4()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp4()) @test abs(sim.đ’Șest[:l∞]-4) < testTol sol = solve(prob,KenCarp5()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp5()) @test abs(sim.đ’Șest[:l∞]-5) < testTol # IMEXEuler -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim2 = test_convergence(dts,prob,IMEXEuler()) @test abs(sim2.đ’Șest[:l∞]-1) < testTol # CNAB2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNAB2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol # CNLF2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNLF2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol @@ -122,32 +122,32 @@ fun = SplitFunction(f1, f2; analytic=(u0,p,t)->exp(2t)*u0) prob = SplitODEProblem(fun,1.0,(0.0,1.0)) sol = solve(prob,KenCarp3()) -dts = 1.//2.^(12:-1:8) +dts = 1 .//2 .^(12:-1:8) sim = test_convergence(dts,prob,KenCarp3()) @test abs(sim.đ’Șest[:l∞]-3) < testTol sol = solve(prob,KenCarp4()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp4()) @test abs(sim.đ’Șest[:l∞]-4) < testTol sol = solve(prob,KenCarp5()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp5()) @test abs(sim.đ’Șest[:l∞]-5) < testTol # IMEXEuler -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim3 = test_convergence(dts,prob,IMEXEuler()) @test abs(sim3.đ’Șest[:l∞]-2) < testTol # Super-convergence # CNAB2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNAB2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol # CNLF2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNLF2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol @@ -160,32 +160,32 @@ fun = SplitFunction(f1, f2; analytic=(u0,p,t)->exp(2t)*u0) prob = SplitODEProblem(fun,rand(4,2),(0.0,1.0)) sol = solve(prob,KenCarp3()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp3()) @test abs(sim.đ’Șest[:l∞]-3) < testTol sol = solve(prob,KenCarp4()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp4()) @test abs(sim.đ’Șest[:l∞]-4) < testTol sol = solve(prob,KenCarp5()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp5()) @test abs(sim.đ’Șest[:l∞]-5) < testTol # IMEXEuler -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim1 = test_convergence(dts,prob,IMEXEuler()) @test abs(sim1.đ’Șest[:l∞]-1) < testTol # CNAB2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNAB2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol # CNLF2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNLF2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol @@ -198,32 +198,32 @@ fun = SplitFunction(f1, f2; analytic=(u0,p,t)->exp(2t)*u0) prob = SplitODEProblem(fun,rand(4,2),(0.0,1.0)) sol = solve(prob,KenCarp3()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp3()) @test abs(sim.đ’Șest[:l∞]-3) < testTol sol = solve(prob,KenCarp4()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp4()) @test abs(sim.đ’Șest[:l∞]-4) < testTol sol = solve(prob,KenCarp5()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp5()) @test abs(sim.đ’Șest[:l∞]-5) < testTol # IMEXEuler -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim2 = test_convergence(dts,prob,IMEXEuler()) @test abs(sim2.đ’Șest[:l∞]-1) < testTol # CNAB2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNAB2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol # CNLF2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNLF2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol @@ -236,31 +236,31 @@ fun = SplitFunction(f1, f2; analytic=(u0,p,t)->exp(2t)*u0) prob = SplitODEProblem(fun,rand(4,2),(0.0,1.0)) sol = solve(prob,KenCarp3()) -dts = 1.//2.^(12:-1:8) +dts = 1 .//2 .^(12:-1:8) sim = test_convergence(dts,prob,KenCarp3()) @test abs(sim.đ’Șest[:l∞]-3) < testTol sol = solve(prob,KenCarp4()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp4()) @test abs(sim.đ’Șest[:l∞]-4) < testTol sol = solve(prob,KenCarp5()) -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,KenCarp5()) @test abs(sim.đ’Șest[:l∞]-5) < testTol # IMEXEuler -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim3 = test_convergence(dts,prob,IMEXEuler()) @test abs(sim3.đ’Șest[:l∞]-2) < testTol # Super-convergence # CNAB2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNAB2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol # CNLF2 -dts = 1.//2.^(8:-1:4) +dts = 1 .//2 .^(8:-1:4) sim = test_convergence(dts,prob,CNLF2()) @test abs(sim.đ’Șest[:l∞]-2) < testTol