@@ -19,114 +19,112 @@ end
1919pmul = [1.0 ,- 4. ,- 2. ,10. ,- 1.3 ,- 1.2 , 1.1 ]
2020padd = [1.0 ,- 4. ,- 2. ,10. ,- 0.0 ,- 0.0 , 0.1 ]
2121
22- @testset " Test: SDDEProblem and solve" begin
23- prob = @test_nowarn SDDEProblem (hayes_modelf, hayes_modelg, [1. ], h, tspan, pmul; constant_lags = (pmul[1 ],));
24- @test_nowarn SDDEProblem (hayes_modelf, hayes_modelg, h, tspan, padd; constant_lags = (padd[1 ],));
22+ prob = @test_nowarn SDDEProblem (hayes_modelf, hayes_modelg, [1. ], h, tspan, pmul; constant_lags = (pmul[1 ],));
23+ @test_nowarn SDDEProblem (hayes_modelf, hayes_modelg, h, tspan, padd; constant_lags = (padd[1 ],));
2524
26- sol = @test_nowarn solve (prob,EM (),dt= 0.01 )
27- @test sol. u[end ] != zeros (1 )
28- sol = @test_nowarn solve (prob,LambaEM (),dt= 0.01 )
29- @test sol. u[end ] != zeros (1 )
30- sol = @test_nowarn solve (prob,EulerHeun (),dt= 0.01 )
31- @test sol. u[end ] != zeros (1 )
32- sol = @test_nowarn solve (prob,LambaEulerHeun (),dt= 0.01 )
33- @test sol. u[end ] != zeros (1 )
34- sol = @test_nowarn solve (prob,RKMil (),dt= 0.01 )
35- @test sol. u[end ] != zeros (1 )
36- sol = @test_nowarn solve (prob,RKMil (interpretation= :Stratonovich ),dt= 0.01 )
37- @test sol. u[end ] != zeros (1 )
38- sol = @test_nowarn solve (prob,RKMilCommute (),dt= 0.01 )
39- @test sol. u[end ] != zeros (1 )
40- sol = @test_nowarn solve (prob,RKMilCommute (interpretation= :Stratonovich ),dt= 0.01 )
41- @test sol. u[end ] != zeros (1 )
42- sol = @test_nowarn solve (prob,WangLi3SMil_A (),dt= 0.01 )
43- @test sol. u[end ] != zeros (1 )
44- sol = @test_nowarn solve (prob,WangLi3SMil_B (),dt= 0.01 )
45- @test sol. u[end ] != zeros (1 )
46- sol = @test_nowarn solve (prob,WangLi3SMil_C (),dt= 0.01 )
47- @test sol. u[end ] != zeros (1 )
48- sol = @test_nowarn solve (prob,WangLi3SMil_D (),dt= 0.01 )
49- @test sol. u[end ] != zeros (1 )
50- sol = @test_nowarn solve (prob,WangLi3SMil_E (),dt= 0.01 )
51- @test sol. u[end ] != zeros (1 )
52- sol = @test_nowarn solve (prob,WangLi3SMil_F (),dt= 0.01 )
53- @test sol. u[end ] != zeros (1 )
54- sol = @test_nowarn solve (prob,SRI (),dt= 0.01 )
55- @test sol. u[end ] != zeros (1 )
56- sol = @test_nowarn solve (prob,SRIW1 (),dt= 0.01 )
57- @test sol. u[end ] != zeros (1 )
58- sol = @test_nowarn solve (prob,SRIW2 (),dt= 0.01 )
59- @test sol. u[end ] != zeros (1 )
60- sol = @test_nowarn solve (prob,SOSRI (),dt= 0.01 )
61- @test sol. u[end ] != zeros (1 )
62- sol = @test_nowarn solve (prob,SOSRI2 (),dt= 0.01 )
63- @test sol. u[end ] != zeros (1 )
25+ sol = @test_nowarn solve (prob,EM (),dt= 0.01 )
26+ @test sol. u[end ] != zeros (1 )
27+ sol = @test_nowarn solve (prob,LambaEM (),dt= 0.01 )
28+ @test sol. u[end ] != zeros (1 )
29+ sol = @test_nowarn solve (prob,EulerHeun (),dt= 0.01 )
30+ @test sol. u[end ] != zeros (1 )
31+ sol = @test_nowarn solve (prob,LambaEulerHeun (),dt= 0.01 )
32+ @test sol. u[end ] != zeros (1 )
33+ sol = @test_nowarn solve (prob,RKMil (),dt= 0.01 )
34+ @test sol. u[end ] != zeros (1 )
35+ sol = @test_nowarn solve (prob,RKMil (interpretation= :Stratonovich ),dt= 0.01 )
36+ @test sol. u[end ] != zeros (1 )
37+ sol = @test_nowarn solve (prob,RKMilCommute (),dt= 0.01 )
38+ @test sol. u[end ] != zeros (1 )
39+ sol = @test_nowarn solve (prob,RKMilCommute (interpretation= :Stratonovich ),dt= 0.01 )
40+ @test sol. u[end ] != zeros (1 )
41+ sol = @test_nowarn solve (prob,WangLi3SMil_A (),dt= 0.01 )
42+ @test sol. u[end ] != zeros (1 )
43+ sol = @test_nowarn solve (prob,WangLi3SMil_B (),dt= 0.01 )
44+ @test sol. u[end ] != zeros (1 )
45+ sol = @test_nowarn solve (prob,WangLi3SMil_C (),dt= 0.01 )
46+ @test sol. u[end ] != zeros (1 )
47+ sol = @test_nowarn solve (prob,WangLi3SMil_D (),dt= 0.01 )
48+ @test sol. u[end ] != zeros (1 )
49+ sol = @test_nowarn solve (prob,WangLi3SMil_E (),dt= 0.01 )
50+ @test sol. u[end ] != zeros (1 )
51+ sol = @test_nowarn solve (prob,WangLi3SMil_F (),dt= 0.01 )
52+ @test sol. u[end ] != zeros (1 )
53+ sol = @test_nowarn solve (prob,SRI (),dt= 0.01 )
54+ @test sol. u[end ] != zeros (1 )
55+ sol = @test_nowarn solve (prob,SRIW1 (),dt= 0.01 )
56+ @test sol. u[end ] != zeros (1 )
57+ sol = @test_nowarn solve (prob,SRIW2 (),dt= 0.01 )
58+ @test sol. u[end ] != zeros (1 )
59+ sol = @test_nowarn solve (prob,SOSRI (),dt= 0.01 )
60+ @test sol. u[end ] != zeros (1 )
61+ sol = @test_nowarn solve (prob,SOSRI2 (),dt= 0.01 )
62+ @test sol. u[end ] != zeros (1 )
6463
65- # Additive problems
66- println (" additive problems" )
67- prob. p .= padd;
68- sol = @test_nowarn solve (prob,SRA (),dt= 0.01 )
69- @test sol. u[end ] != zeros (1 )
70- sol = @test_nowarn solve (prob,SRA1 (),dt= 0.01 )
71- @test sol. u[end ] != zeros (1 )
72- sol = @test_nowarn solve (prob,SRA2 (),dt= 0.01 )
73- @test sol. u[end ] != zeros (1 )
74- sol = @test_nowarn solve (prob,SRA3 (),dt= 0.01 )
75- @test sol. u[end ] != zeros (1 )
76- sol = @test_nowarn solve (prob,SOSRA (),dt= 0.01 )
77- @test sol. u[end ] != zeros (1 )
78- sol = @test_nowarn solve (prob,SOSRA2 (),dt= 0.01 )
79- @test sol. u[end ] != zeros (1 )
80- # @test_nowarn solve(prob,SKenCarp(),dt=0.01) # Not working
81-
82- # Test SROCK methods
83- println (" SROCK methods" )
84- prob. p .= pmul;
85- sol = @test_nowarn solve (prob,SROCK1 (),dt= 0.01 )
86- @test sol. u[end ] != zeros (1 )
87- sol = @test_nowarn solve (prob,SROCK1 (interpretation= :Stratonovich ),dt= 0.01 )
88- @test sol. u[end ] != zeros (1 )
89- sol = @test_nowarn solve (prob,SROCKEM (),dt= 0.01 )
90- @test sol. u[end ] != zeros (1 )
91- sol = @test_nowarn solve (prob,SROCKEM (strong_order_1= false ),dt= 0.01 )
92- @test sol. u[end ] != zeros (1 )
93- sol = @test_nowarn solve (prob,SROCK2 (),dt= 0.01 )
94- @test sol. u[end ] != zeros (1 )
95- sol = @test_nowarn solve (prob,SKSROCK (),dt= 0.01 )
96- @test sol. u[end ] != zeros (1 )
97- sol = @test_nowarn solve (prob,SKSROCK (;post_processing= true ),dt= 0.01 )
98- @test sol. u[end ] != zeros (1 )
99- sol = @test_nowarn solve (prob,TangXiaoSROCK2 (),dt= 0.01 )
100- @test sol. u[end ] != zeros (1 )
101- for i in 1 : 5
102- sol = @test_nowarn solve (prob,TangXiaoSROCK2 (version_num= i),dt= 0.01 )
103- @test sol. u[end ] != zeros (1 )
104- end
64+ # Additive problems
65+ println (" additive problems" )
66+ prob. p .= padd;
67+ sol = @test_nowarn solve (prob,SRA (),dt= 0.01 )
68+ @test sol. u[end ] != zeros (1 )
69+ sol = @test_nowarn solve (prob,SRA1 (),dt= 0.01 )
70+ @test sol. u[end ] != zeros (1 )
71+ sol = @test_nowarn solve (prob,SRA2 (),dt= 0.01 )
72+ @test sol. u[end ] != zeros (1 )
73+ sol = @test_nowarn solve (prob,SRA3 (),dt= 0.01 )
74+ @test sol. u[end ] != zeros (1 )
75+ sol = @test_nowarn solve (prob,SOSRA (),dt= 0.01 )
76+ @test sol. u[end ] != zeros (1 )
77+ sol = @test_nowarn solve (prob,SOSRA2 (),dt= 0.01 )
78+ @test sol. u[end ] != zeros (1 )
79+ # @test_nowarn solve(prob,SKenCarp(),dt=0.01) # Not working
10580
106- # Test Implicit methods
107- println (" implicit methods" )
108- sol = @test_nowarn solve (prob,ImplicitEM (),dt= 0.01 )
109- @test sol. u[end ] != zeros (1 )
110- sol = @test_nowarn solve (prob,ImplicitEM (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
111- @test sol. u[end ] != zeros (1 )
112- sol = @test_nowarn solve (prob,ImplicitEulerHeun (),dt= 0.01 )
113- @test sol. u[end ] != zeros (1 )
114- sol = @test_nowarn solve (prob,ImplicitEulerHeun (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
115- @test sol. u[end ] != zeros (1 )
116- sol = @test_nowarn solve (prob,ImplicitRKMil (),dt= 0.01 )
117- @test sol. u[end ] != zeros (1 )
118- sol = @test_nowarn solve (prob,ImplicitRKMil (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
119- @test sol. u[end ] != zeros (1 )
120- sol = @test_nowarn solve (prob,ImplicitRKMil (interpretation= :Stratonovich , symplectic = true , theta = 1 / 2 ),dt= 0.01 )
121- @test sol. u[end ] != zeros (1 )
122- sol = @test_nowarn solve (prob,ISSEM (),dt= 0.01 )
123- @test sol. u[end ] != zeros (1 )
124- sol = @test_nowarn solve (prob,ISSEM (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
125- @test sol. u[end ] != zeros (1 )
126- sol = @test_nowarn solve (prob,ISSEulerHeun (),dt= 0.01 )
127- @test sol. u[end ] != zeros (1 )
128- sol = @test_nowarn solve (prob,ISSEulerHeun (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
129- @test sol. u[end ] != zeros (1 )
130- sol = @test_nowarn solve (prob,SKenCarp (),dt= 0.01 )
81+ # Test SROCK methods
82+ println (" SROCK methods" )
83+ prob. p .= pmul;
84+ sol = @test_nowarn solve (prob,SROCK1 (),dt= 0.01 )
85+ @test sol. u[end ] != zeros (1 )
86+ sol = @test_nowarn solve (prob,SROCK1 (interpretation= :Stratonovich ),dt= 0.01 )
87+ @test sol. u[end ] != zeros (1 )
88+ sol = @test_nowarn solve (prob,SROCKEM (),dt= 0.01 )
89+ @test sol. u[end ] != zeros (1 )
90+ sol = @test_nowarn solve (prob,SROCKEM (strong_order_1= false ),dt= 0.01 )
91+ @test sol. u[end ] != zeros (1 )
92+ sol = @test_nowarn solve (prob,SROCK2 (),dt= 0.01 )
93+ @test sol. u[end ] != zeros (1 )
94+ sol = @test_nowarn solve (prob,SKSROCK (),dt= 0.01 )
95+ @test sol. u[end ] != zeros (1 )
96+ sol = @test_nowarn solve (prob,SKSROCK (;post_processing= true ),dt= 0.01 )
97+ @test sol. u[end ] != zeros (1 )
98+ sol = @test_nowarn solve (prob,TangXiaoSROCK2 (),dt= 0.01 )
99+ @test sol. u[end ] != zeros (1 )
100+ for i in 1 : 5
101+ sol = @test_nowarn solve (prob,TangXiaoSROCK2 (version_num= i),dt= 0.01 )
131102 @test sol. u[end ] != zeros (1 )
132103end
104+
105+ # Test Implicit methods
106+ println (" implicit methods" )
107+ sol = @test_nowarn solve (prob,ImplicitEM (),dt= 0.01 )
108+ @test sol. u[end ] != zeros (1 )
109+ sol = @test_nowarn solve (prob,ImplicitEM (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
110+ @test sol. u[end ] != zeros (1 )
111+ sol = @test_nowarn solve (prob,ImplicitEulerHeun (),dt= 0.01 )
112+ @test sol. u[end ] != zeros (1 )
113+ sol = @test_nowarn solve (prob,ImplicitEulerHeun (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
114+ @test sol. u[end ] != zeros (1 )
115+ sol = @test_nowarn solve (prob,ImplicitRKMil (),dt= 0.01 )
116+ @test sol. u[end ] != zeros (1 )
117+ sol = @test_nowarn solve (prob,ImplicitRKMil (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
118+ @test sol. u[end ] != zeros (1 )
119+ sol = @test_nowarn solve (prob,ImplicitRKMil (interpretation= :Stratonovich , symplectic = true , theta = 1 / 2 ),dt= 0.01 )
120+ @test sol. u[end ] != zeros (1 )
121+ sol = @test_nowarn solve (prob,ISSEM (),dt= 0.01 )
122+ @test sol. u[end ] != zeros (1 )
123+ sol = @test_nowarn solve (prob,ISSEM (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
124+ @test sol. u[end ] != zeros (1 )
125+ sol = @test_nowarn solve (prob,ISSEulerHeun (),dt= 0.01 )
126+ @test sol. u[end ] != zeros (1 )
127+ sol = @test_nowarn solve (prob,ISSEulerHeun (symplectic= true , theta = 1 / 2 ),dt= 0.01 )
128+ @test sol. u[end ] != zeros (1 )
129+ sol = @test_nowarn solve (prob,SKenCarp (),dt= 0.01 )
130+ @test sol. u[end ] != zeros (1 )
0 commit comments