@@ -7,24 +7,24 @@ using MethodOfLines, Test, ModelingToolkit
77
88 Dx = Differential (x)
99 eq = Dt (u (t,x)) ~ - Dx (u (t,x))
10- @test first (DiffEqOperators . differential_order (eq. rhs, x. val)) == 1
11- @test isempty (DiffEqOperators . differential_order (eq. rhs, t. val))
12- @test first (DiffEqOperators . differential_order (eq. lhs, t. val)) == 1
13- @test isempty (DiffEqOperators . differential_order (eq. lhs, x. val))
10+ @test first (MethodOfLines . differential_order (eq. rhs, x. val)) == 1
11+ @test isempty (MethodOfLines . differential_order (eq. rhs, t. val))
12+ @test first (MethodOfLines . differential_order (eq. lhs, t. val)) == 1
13+ @test isempty (MethodOfLines . differential_order (eq. lhs, x. val))
1414
1515 Dxx = Differential (x)^ 2
1616 eq = Dt (u (t,x)) ~ Dxx (u (t,x))
17- @test first (DiffEqOperators . differential_order (eq. rhs, x. val)) == 2
18- @test isempty (DiffEqOperators . differential_order (eq. rhs, t. val))
19- @test first (DiffEqOperators . differential_order (eq. lhs, t. val)) == 1
20- @test isempty (DiffEqOperators . differential_order (eq. lhs, x. val))
17+ @test first (MethodOfLines . differential_order (eq. rhs, x. val)) == 2
18+ @test isempty (MethodOfLines . differential_order (eq. rhs, t. val))
19+ @test first (MethodOfLines . differential_order (eq. lhs, t. val)) == 1
20+ @test isempty (MethodOfLines . differential_order (eq. lhs, x. val))
2121
2222 Dxxxx = Differential (x)^ 4
2323 eq = Dt (u (t,x)) ~ - Dxxxx (u (t,x))
24- @test first (DiffEqOperators . differential_order (eq. rhs, x. val)) == 4
25- @test isempty (DiffEqOperators . differential_order (eq. rhs, t. val))
26- @test first (DiffEqOperators . differential_order (eq. lhs, t. val)) == 1
27- @test isempty (DiffEqOperators . differential_order (eq. lhs, x. val))
24+ @test first (MethodOfLines . differential_order (eq. rhs, x. val)) == 4
25+ @test isempty (MethodOfLines . differential_order (eq. rhs, t. val))
26+ @test first (MethodOfLines . differential_order (eq. lhs, t. val)) == 1
27+ @test isempty (MethodOfLines . differential_order (eq. lhs, x. val))
2828end
2929
3030@testset " count differentials 2D" begin
3535 Dt = Differential (t)
3636
3737 eq = Dt (u (t,x,y)) ~ Dxx (u (t,x,y)) + Dyy (u (t,x,y))
38- @test first (DiffEqOperators . differential_order (eq. rhs, x. val)) == 2
39- @test first (DiffEqOperators . differential_order (eq. rhs, y. val)) == 2
40- @test isempty (DiffEqOperators . differential_order (eq. rhs, t. val))
41- @test first (DiffEqOperators . differential_order (eq. lhs, t. val)) == 1
42- @test isempty (DiffEqOperators . differential_order (eq. lhs, x. val))
43- @test isempty (DiffEqOperators . differential_order (eq. lhs, y. val))
38+ @test first (MethodOfLines . differential_order (eq. rhs, x. val)) == 2
39+ @test first (MethodOfLines . differential_order (eq. rhs, y. val)) == 2
40+ @test isempty (MethodOfLines . differential_order (eq. rhs, t. val))
41+ @test first (MethodOfLines . differential_order (eq. lhs, t. val)) == 1
42+ @test isempty (MethodOfLines . differential_order (eq. lhs, x. val))
43+ @test isempty (MethodOfLines . differential_order (eq. lhs, y. val))
4444end
4545
4646@testset " count with mixed terms" begin
5353 Dt = Differential (t)
5454
5555 eq = Dt (u (t,x,y)) ~ Dxx (u (t,x,y)) + Dyy (u (t,x,y)) + Dx (Dy (u (t,x,y)))
56- @test DiffEqOperators . differential_order (eq. rhs, x. val) == Set ([2 , 1 ])
57- @test DiffEqOperators . differential_order (eq. rhs, y. val) == Set ([2 , 1 ])
56+ @test MethodOfLines . differential_order (eq. rhs, x. val) == Set ([2 , 1 ])
57+ @test MethodOfLines . differential_order (eq. rhs, y. val) == Set ([2 , 1 ])
5858end
5959
6060@testset " Kuramoto–Sivashinsky equation" begin
7070 β = 4
7171 γ = 1
7272 eq = Dt (u (x,t)) + u (x,t)* Dx (u (x,t)) + α* Dx2 (u (x,t)) + β* Dx3 (u (x,t)) + γ* Dx4 (u (x,t)) ~ 0
73- @test DiffEqOperators . differential_order (eq. lhs, x. val) == Set ([4 , 3 , 2 , 1 ])
73+ @test MethodOfLines . differential_order (eq. lhs, x. val) == Set ([4 , 3 , 2 , 1 ])
7474end
0 commit comments