Skip to content

Commit eb312b2

Browse files
committed
Disable unit checking of initialization problem during remake
This is the default during problem construction (problem_utils.jl:1305). Partial fix for #3283.
1 parent 7b5c5f0 commit eb312b2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/systems/nonlinear/initializesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ function SciMLBase.remake_initialization_data(
660660
kws = maybe_build_initialization_problem(
661661
sys, SciMLBase.isinplace(odefn), op, t0, defs, guesses,
662662
missing_unknowns; time_dependent_init, use_scc, initialization_eqs, floatT,
663-
u0_constructor, p_constructor, allow_incomplete = true)
663+
u0_constructor, p_constructor, allow_incomplete = true, check_units=false)
664664

665665
odefn = remake(odefn; kws...)
666666
return SciMLBase.remake_initialization_data(sys, odefn, newu0, t0, newp, newu0, newp)

test/initializationsystem.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,10 @@ end
11051105
guesses = ModelingToolkit.missing_variable_defaults(pend))
11061106
sol = solve(prob, Rodas5P())
11071107
@test SciMLBase.successful_retcode(sol)
1108+
1109+
prob2 = remake(prob, u0=[x => 0.5, y=>nothing])
1110+
sol2 = solve(prob2, Rodas5P())
1111+
@test SciMLBase.successful_retcode(sol2)
11081112
end
11091113

11101114
@testset "Issue#3205" begin

0 commit comments

Comments
 (0)