Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/ModelingToolkitBase/test/initial_values.jl
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,11 @@ end
0 ~ x^2 + y^2 - w2^2,
]

@mtkcompile sys = System(eqs, t)
if @isdefined(ModelingToolkit)
@mtkcompile sys = System(eqs, t) reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
else
@mtkcompile sys = System(eqs, t)
end

u0 = [
D(x) => 2.0,
Expand Down
4 changes: 2 additions & 2 deletions lib/ModelingToolkitBase/test/jacobiansparsity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if @isdefined(ModelingToolkit)
D(D(y)) ~ λ * y - g
x^2 + y^2 ~ 1
]
@mtkcompile pend = System(eqs, t)
@mtkcompile pend = System(eqs, t) reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)

u0 = [x => 1, y => 0]
prob = ODEProblem(
Expand Down Expand Up @@ -161,7 +161,7 @@ if @isdefined(ModelingToolkit)
D(D(y)) ~ λ * y - g
x^2 + y^2 ~ 1
]
@mtkcompile pend = System(eqs, t)
@mtkcompile pend = System(eqs, t) reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
prob = ODEProblem(
pend, [x => 0.0, D(x) => 1.0, g => 1.0], (0.0, 1.0);
guesses = [y => 1.0, λ => 1.0], jac = true, sparse = true
Expand Down
5 changes: 4 additions & 1 deletion test/semilinearodeproblem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
] # 14: M

prob = ODEProblem(Nelson!, u0, tspan, params)
sys = mtkcompile(modelingtoolkitize(prob))
sys = mtkcompile(
modelingtoolkitize(prob);
reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
)
A, B, C = ModelingToolkit.calculate_semiquadratic_form(sys)
@test A !== nothing
@test B !== nothing
Expand Down
5 changes: 4 additions & 1 deletion test/state_selection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ let

# solution -------------------------------------------------------------------
@named catapult = System(eqs, t, vars, params, initial_conditions = defs)
sys = mtkcompile(catapult)
sys = mtkcompile(
catapult;
reassemble_alg = StructuralTransformations.DefaultReassembleAlgorithm(; inline_linear_sccs = false)
)
prob = ODEProblem(sys, [l_2f => 0.55, damp => 1.0e7], (0.0, 0.1); jac = true)
@test solve(prob, Rodas4()).retcode == ReturnCode.Success
end
Loading