@@ -957,33 +957,38 @@ end
957
957
@mtkbuild sys = System (
958
958
[D (x) ~ x * p + y^ 2 * q + rhss; alge_eqs],
959
959
t; guesses = [x => 0.0 , y => 0.0 , z => 0.0 , p => 0.0 , q => 0.0 ])
960
- prob = Problem (sys, [x => 1.0 ], (0.0 , 1.0 ), [p => 1.0 , q => missing ]; initialization_eqs = is_nlsolve ? alge_eqs : [])
960
+ prob = Problem (sys, [x => 1.0 ], (0.0 , 1.0 ), [p => 1.0 , q => missing ];
961
+ initialization_eqs = is_nlsolve ? alge_eqs : [])
961
962
@test is_variable (prob. f. initialization_data. initializeprob, q)
962
963
ps = prob. p
963
964
newps = SciMLStructures. replace (Tunable (), ps, ForwardDiff. Dual .(ps. tunable))
964
965
prob2 = remake (prob; p = newps)
965
- @test eltype (state_values (prob2. f. initialization_data. initializeprob)) <: ForwardDiff.Dual
966
+ @test eltype (state_values (prob2. f. initialization_data. initializeprob)) < :
967
+ ForwardDiff. Dual
966
968
@test eltype (prob2. f. initialization_data. initializeprob. p. tunable) < :
967
969
ForwardDiff. Dual
968
970
@test state_values (prob2. f. initialization_data. initializeprob) ≈
969
971
state_values (prob. f. initialization_data. initializeprob)
970
972
971
973
prob2 = remake (prob; u0 = ForwardDiff. Dual .(prob. u0))
972
- @test eltype (state_values (prob2. f. initialization_data. initializeprob)) <: ForwardDiff.Dual
974
+ @test eltype (state_values (prob2. f. initialization_data. initializeprob)) < :
975
+ ForwardDiff. Dual
973
976
@test eltype (prob2. f. initialization_data. initializeprob. p. tunable) <: Float64
974
977
@test state_values (prob2. f. initialization_data. initializeprob) ≈
975
978
state_values (prob. f. initialization_data. initializeprob)
976
979
977
980
prob2 = remake (prob; u0 = ForwardDiff. Dual .(prob. u0), p = newps)
978
- @test eltype (state_values (prob2. f. initialization_data. initializeprob)) <: ForwardDiff.Dual
981
+ @test eltype (state_values (prob2. f. initialization_data. initializeprob)) < :
982
+ ForwardDiff. Dual
979
983
@test eltype (prob2. f. initialization_data. initializeprob. p. tunable) < :
980
984
ForwardDiff. Dual
981
985
@test state_values (prob2. f. initialization_data. initializeprob) ≈
982
986
state_values (prob. f. initialization_data. initializeprob)
983
987
984
988
prob2 = remake (prob; u0 = [x => ForwardDiff. Dual (1.0 )],
985
989
p = [p => ForwardDiff. Dual (1.0 ), q => missing ])
986
- @test eltype (state_values (prob2. f. initialization_data. initializeprob)) <: ForwardDiff.Dual
990
+ @test eltype (state_values (prob2. f. initialization_data. initializeprob)) < :
991
+ ForwardDiff. Dual
987
992
@test eltype (prob2. f. initialization_data. initializeprob. p. tunable) < :
988
993
ForwardDiff. Dual
989
994
@test state_values (prob2. f. initialization_data. initializeprob) ≈
@@ -1027,12 +1032,14 @@ end
1027
1032
@mtkbuild sys = System (
1028
1033
[D (x) ~ x + p * y^ 2 + rhss; alge_eqs], t; guesses = [
1029
1034
y => 1.0 , p => 1.0 ])
1030
- prob = Problem (sys, [x => 1.0 ], (0.0 , 1.0 ), [p => 1.0 ]; initialization_eqs = is_nlsolve ? alge_eqs : [])
1035
+ prob = Problem (sys, [x => 1.0 ], (0.0 , 1.0 ), [p => 1.0 ];
1036
+ initialization_eqs = is_nlsolve ? alge_eqs : [])
1031
1037
@test is_variable (prob. f. initialization_data. initializeprob, y)
1032
1038
prob2 = @test_nowarn remake (prob; p = [p => 3.0 ]) # ensure no over/under-determined warning
1033
1039
@test is_variable (prob. f. initialization_data. initializeprob, y)
1034
1040
1035
- prob = Problem (sys, [y => 1.0 , x => 2.0 ], (0.0 , 1.0 ), [p => missing ]; initialization_eqs = is_nlsolve ? alge_eqs : [])
1041
+ prob = Problem (sys, [y => 1.0 , x => 2.0 ], (0.0 , 1.0 ), [p => missing ];
1042
+ initialization_eqs = is_nlsolve ? alge_eqs : [])
1036
1043
@test is_variable (prob. f. initialization_data. initializeprob, p)
1037
1044
prob2 = @test_nowarn remake (prob; u0 = [y => 0.5 ])
1038
1045
@test is_variable (prob. f. initialization_data. initializeprob, p)
0 commit comments