@@ -8,11 +8,13 @@ eqs = [D(x) ~ a * y + t, D(y) ~ b * t]
8
8
9
9
@test all (is_variable .((odesys,), [x, y, 1 , 2 , :x , :y ]))
10
10
@test all (.! is_variable .((odesys,), [a, b, t, 3 , 0 , :a , :b ]))
11
- @test variable_index .((odesys,), [x, y, a, b, t, 1 , 2 , :x , :y , :a , :b ]) == [1 , 2 , nothing , nothing , nothing , 1 , 2 , 1 , 2 , nothing , nothing ]
11
+ @test variable_index .((odesys,), [x, y, a, b, t, 1 , 2 , :x , :y , :a , :b ]) ==
12
+ [1 , 2 , nothing , nothing , nothing , 1 , 2 , 1 , 2 , nothing , nothing ]
12
13
@test isequal (variable_symbols (odesys), [x, y])
13
14
@test all (is_parameter .((odesys,), [a, b, 1 , 2 , :a , :b ]))
14
15
@test all (.! is_parameter .((odesys,), [x, y, t, 3 , 0 , :x , :y ]))
15
- @test parameter_index .((odesys,), [x, y, a, b, t, 1 , 2 , :x , :y , :a , :b ]) == [nothing , nothing , 1 , 2 , nothing , 1 , 2 , nothing , nothing , 1 , 2 ]
16
+ @test parameter_index .((odesys,), [x, y, a, b, t, 1 , 2 , :x , :y , :a , :b ]) ==
17
+ [nothing , nothing , 1 , 2 , nothing , 1 , 2 , nothing , nothing , 1 , 2 ]
16
18
@test isequal (parameter_symbols (odesys), [a, b])
17
19
@test all (is_independent_variable .((odesys,), [t, :t ]))
18
20
@test all (.! is_independent_variable .((odesys,), [x, y, a, :x , :y , :a ]))
@@ -23,10 +25,10 @@ eqs = [D(x) ~ a * y + t, D(y) ~ b * t]
23
25
@variables x y z
24
26
@parameters σ ρ β
25
27
26
- eqs = [0 ~ σ* (y - x),
27
- 0 ~ x* (ρ - z) - y,
28
- 0 ~ x* y - β* z]
29
- @named ns = NonlinearSystem (eqs, [x,y, z],[σ,ρ, β])
28
+ eqs = [0 ~ σ * (y - x),
29
+ 0 ~ x * (ρ - z) - y,
30
+ 0 ~ x * y - β * z]
31
+ @named ns = NonlinearSystem (eqs, [x, y, z], [σ, ρ, β])
30
32
31
33
@test ! is_time_dependent (ns)
32
34
@@ -37,20 +39,20 @@ Dtt = Differential(t)^2
37
39
Dt = Differential (t)
38
40
39
41
# 2D PDE
40
- C= 1
41
- eq = Dtt (u (t,x)) ~ C^ 2 * Dxx (u (t,x))
42
+ C = 1
43
+ eq = Dtt (u (t, x)) ~ C^ 2 * Dxx (u (t, x))
42
44
43
45
# Initial and boundary conditions
44
- bcs = [u (t,0 ) ~ 0. ,# for all t > 0
45
- u (t,1 ) ~ 0. ,# for all t > 0
46
- u (0 ,x) ~ x* (1. - x), # for all 0 < x < 1
47
- Dt (u (0 ,x)) ~ 0. ] # for all 0 < x < 1]
46
+ bcs = [u (t, 0 ) ~ 0.0 ,# for all t > 0
47
+ u (t, 1 ) ~ 0.0 ,# for all t > 0
48
+ u (0 , x) ~ x * (1.0 - x), # for all 0 < x < 1
49
+ Dt (u (0 , x)) ~ 0.0 ] # for all 0 < x < 1]
48
50
49
51
# Space and time domains
50
- domains = [t ∈ (0.0 ,1.0 ),
51
- x ∈ (0.0 ,1.0 )]
52
+ domains = [t ∈ (0.0 , 1.0 ),
53
+ x ∈ (0.0 , 1.0 )]
52
54
53
- @named pde_system = PDESystem (eq,bcs,domains,[t,x],[u])
55
+ @named pde_system = PDESystem (eq, bcs, domains, [t, x], [u])
54
56
55
57
@test pde_system. ps == SciMLBase. NullParameters ()
56
58
@test parameter_symbols (pde_system) == []
0 commit comments