Skip to content

Commit 3058475

Browse files
committed
Fix tests
1 parent 36a48aa commit 3058475

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/structural_transformation/StructuralTransformations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using ModelingToolkit: ODESystem, AbstractSystem, var_from_nested_derivative, Di
2222
get_postprocess_fbody, vars!,
2323
IncrementalCycleTracker, add_edge_checked!, topological_sort,
2424
invalidate_cache!, Substitutions, get_or_construct_tearing_state,
25-
AliasGraph
25+
AliasGraph, filter_kwargs
2626

2727
using ModelingToolkit.BipartiteGraphs
2828
import .BipartiteGraphs: invview

src/structural_transformation/codegen.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ function build_observed_function(state, ts, var_eq_matching, var_sccs,
384384

385385
fullvars = state.fullvars
386386
s = state.structure
387-
graph = s.graph
388387
solver_states = fullvars[is_solver_state_idxs]
389388
algvars = fullvars[.!is_solver_state_idxs]
390389

@@ -525,6 +524,7 @@ function ODAEProblem{iip}(sys,
525524
has_difference = any(isdifferenceeq, eqs)
526525
cbs = process_events(sys; callback, has_difference, kwargs...)
527526

527+
kwargs = filter_kwargs(kwargs)
528528
if cbs === nothing
529529
ODEProblem{iip}(fun, u0, tspan, p; kwargs...)
530530
else

src/structural_transformation/symbolics_tearing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,12 +591,12 @@ function tearing_reassemble(state::TearingState, var_eq_matching; simplify = fal
591591
end
592592
deleteat!(oldobs, sort!(removed_obs))
593593
@set! sys.substitutions = Substitutions(subeqs, deps)
594-
@set! state.sys = sys
595-
@set! sys.tearing_state = state
596594

597595
der2expr = Dict(eq.lhs => eq.rhs for eq in equations(sys) if isdiffeq(eq))
598596
obs = substitute.([oldobs; subeqs], (der2expr,))
599597
@set! sys.observed = obs
598+
@set! state.sys = sys
599+
@set! sys.tearing_state = state
600600
return invalidate_cache!(sys)
601601
end
602602

0 commit comments

Comments
 (0)