From e1763843680116057abc6c0559ec42b78fbdb65c Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Wed, 23 Nov 2016 06:15:37 -0800 Subject: [PATCH] remove plotting from tests --- test/adaptive/sde_autostepsize_test.jl | 2 +- test/adaptive/sde_lorenzattractor_tests.jl | 15 +++++++++------ test/adaptive/sde_twodimlinearadaptive_tests.jl | 15 ++------------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/test/adaptive/sde_autostepsize_test.jl b/test/adaptive/sde_autostepsize_test.jl index aa406f1e3..e2b051703 100644 --- a/test/adaptive/sde_autostepsize_test.jl +++ b/test/adaptive/sde_autostepsize_test.jl @@ -1,4 +1,4 @@ -using StochasticDiffEq, Plots +using StochasticDiffEq#, Plots srand(100) prob = prob_sde_2Dlinear diff --git a/test/adaptive/sde_lorenzattractor_tests.jl b/test/adaptive/sde_lorenzattractor_tests.jl index 8896674d7..8821af9e1 100644 --- a/test/adaptive/sde_lorenzattractor_tests.jl +++ b/test/adaptive/sde_lorenzattractor_tests.jl @@ -2,37 +2,40 @@ using StochasticDiffEq, DiffEqProblemLibrary srand(100) prob = prob_sde_lorenz -using Plots; gr() ## Solve and plot -println("Solve and Plot") println("Plot 1") sol1 =solve(prob,SRI();dt=1/2^(4),abstol=10,reltol=0) +#= p1 = plot(sol1[:,1],sol1[:,2],sol1[:,3],title="Absolute Tolerance = 10",leg=false, top_margin=50px,right_margin=50px,xguide="X",yguide="Y",zguide="Z",bottom_margin=50px, guidefont=font(16),titlefont=font(18),tickfont=font(16)) +=# println("Plot 2") sol2 =solve(prob,SRI();dt=1/2^(4),abstol=1,reltol=0) +#= p2 = plot(sol2[:,1],sol2[:,2],sol2[:,3],title="Absolute Tolerance = 10",leg=false, top_margin=50px,right_margin=50px,xguide="X",yguide="Y",zguide="Z",bottom_margin=50px, guidefont=font(16),titlefont=font(18),tickfont=font(16)) - +=# println("Plot 3") sol3 =solve(prob,SRI();dt=1/2^(4),abstol=1/10,reltol=0) +#= p3 = plot(sol3[:,1],sol3[:,2],sol3[:,3],title="Absolute Tolerance = 10",leg=false, top_margin=50px,right_margin=50px,xguide="X",yguide="Y",zguide="Z",bottom_margin=50px, guidefont=font(16),titlefont=font(18),tickfont=font(16)) - +=# println("Plot 4") sol4 =solve(prob,SRI();dt=1/2^(4),abstol=1/100,reltol=0) +#= p4 = plot(sol4[:,1],sol4[:,2],sol4[:,3],title="Absolute Tolerance = 10",leg=false, top_margin=50px,right_margin=50px,xguide="X",yguide="Y",zguide="Z",bottom_margin=50px, guidefont=font(16),titlefont=font(18),tickfont=font(16)) +=# - -plot(p1,p2,p3,p4,size=(1200,800),plot_title="Lorenz Attractors") +#plot(p1,p2,p3,p4,size=(1200,800),plot_title="Lorenz Attractors") #gui() true diff --git a/test/adaptive/sde_twodimlinearadaptive_tests.jl b/test/adaptive/sde_twodimlinearadaptive_tests.jl index 1038d7360..a3b2977c9 100644 --- a/test/adaptive/sde_twodimlinearadaptive_tests.jl +++ b/test/adaptive/sde_twodimlinearadaptive_tests.jl @@ -2,36 +2,25 @@ using StochasticDiffEq srand(100) prob = prob_sde_2Dlinear -using Plots; gr() ## Solve and plot -println("Solve and Plot") sol =solve(prob,SRI(),dt=1/2^(4),abstol=1,reltol=0) err1 = sol.errors[:final] -p1 = plot(sol,plot_analytic=true,legend=false,title="tol = 1") println("1e-1") sol2 =solve(prob,SRI(),dt=1/2^(4),abstol=1e-1,reltol=0) err2 = sol2.errors[:final] -p2 = plot(sol2,plot_analytic=true,legend=false,title="tol = 1e-1") println("1e-2") sol3 =solve(prob,SRI(),dt=1/2^(4),abstol=1e-2,reltol=0) err3 = sol3.errors[:final] -p3 = plot(sol3,plot_analytic=true,legend=false,title="tol = 1e-2") - +@test err3 < err1 println("1e-3") sol4 =solve(prob,SRI(),dt=1/2^(4),abstol=1e-3,reltol=0) err4 = sol4.errors[:final] -p4 = plot(sol4,plot_analytic=true,legend=false,title="tol = 1e-3") - -plot(p1,p2,p3,p4,title="Solutions to Linear SDE at Different Tolerances",size=(1200,800)) -#gui() - +@test err4 < err2 println(""" Final error for the solutions were: $err1 $err2 $err3 $err4""") - -err4 < err2 && err3 < err1