Skip to content

Commit

Permalink
Revert "Ignore iv in __get_unit_type"
Browse files Browse the repository at this point in the history
This reverts commit 1a8b723.
  • Loading branch information
YingboMa committed Jan 3, 2024
1 parent 3e474bd commit fc87dd6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/systems/diffeqs/odesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ struct ODESystem <: AbstractODESystem
check_equations(equations(cevents), iv)
end
if checks == true || (checks & CheckUnits) > 0
u = __get_unit_type(dvs, ps)
u = __get_unit_type(dvs, ps, iv)
check_units(u, deqs)
end
new(tag, deqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, tgrad, jac,
Expand Down
2 changes: 1 addition & 1 deletion src/systems/diffeqs/sdesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct SDESystem <: AbstractODESystem
check_equations(equations(cevents), iv)
end
if checks == true || (checks & CheckUnits) > 0
u = __get_unit_type(dvs, ps)
u = __get_unit_type(dvs, ps, iv)
check_units(u, deqs, neqs)
end
new(tag, deqs, neqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, tgrad, jac,
Expand Down
2 changes: 1 addition & 1 deletion src/systems/discrete_system/discrete_system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct DiscreteSystem <: AbstractTimeDependentSystem
check_parameters(ps, iv)
end
if checks == true || (checks & CheckUnits) > 0
u = __get_unit_type(dvs, ps, ctrls)
u = __get_unit_type(dvs, ps, iv, ctrls)
check_units(u, discreteEqs)
end
new(tag, discreteEqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, name,
Expand Down
2 changes: 1 addition & 1 deletion src/systems/jumps/jumpsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct JumpSystem{U <: ArrayPartition} <: AbstractTimeDependentSystem
check_parameters(ps, iv)
end
if checks == true || (checks & CheckUnits) > 0
u = __get_unit_type(states, ps)
u = __get_unit_type(states, ps, iv)
check_units(u, ap, iv)
end
new{U}(tag, ap, iv, states, ps, var_to_name, observed, name, systems, defaults,
Expand Down

0 comments on commit fc87dd6

Please sign in to comment.