Skip to content

Commit 9aaf04a

Browse files
committed
more cleanup
1 parent 22a39bd commit 9aaf04a

File tree

3 files changed

+3
-45
lines changed

3 files changed

+3
-45
lines changed

docs/src/systems/DiscreteSystem.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/structural_transformation/symbolics_tearing.jl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,6 @@ function reorder_vars!(state::TearingState, var_eq_matching, eq_ordering, var_or
634634
end
635635
new_fullvars = state.fullvars[var_ordering]
636636

637-
@show new_graph
638-
@show new_var_to_diff
639637
# Update system structure
640638
@set! state.structure.graph = complete(new_graph)
641639
@set! state.structure.var_to_diff = new_var_to_diff
@@ -650,8 +648,6 @@ Set the system equations, unknowns, observables post-tearing.
650648
function update_simplified_system!(state::TearingState, neweqs, solved_eqs, dummy_sub, var_eq_matching, extra_unknowns;
651649
cse_hack = true, array_hack = true)
652650
@unpack solvable_graph, var_to_diff, eq_to_diff, graph = state.structure
653-
@show graph
654-
@show var_to_diff
655651
diff_to_var = invview(var_to_diff)
656652

657653
ispresent = let var_to_diff = var_to_diff, graph = graph
@@ -671,12 +667,7 @@ function update_simplified_system!(state::TearingState, neweqs, solved_eqs, dumm
671667
unknowns = Any[v
672668
for (i, v) in enumerate(state.fullvars)
673669
if diff_to_var[i] === nothing && ispresent(i)]
674-
@show unknowns
675-
@show state.fullvars
676-
@show 𝑑neighbors(graph, 5)
677-
@show neweqs
678670
unknowns = [unknowns; extra_unknowns]
679-
@show unknowns
680671
@set! sys.unknowns = unknowns
681672

682673
obs, subeqs, deps = cse_and_array_hacks(

src/systems/systemstructure.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ get_fullvars(ts::TransformationState) = ts.fullvars
140140
has_equations(::TransformationState) = true
141141

142142
Base.@kwdef mutable struct SystemStructure
143-
"""Maps the (index of) a variable to the (index of) the variable describing its derivative."""
143+
"""Maps the index of variable x to the index of variable D(x)."""
144144
var_to_diff::DiffGraph
145-
"""Maps the (index of) an equation."""
145+
"""Maps the index of an equation."""
146146
eq_to_diff::DiffGraph
147147
# Can be access as
148148
# `graph` to automatically look at the bipartite graph
149149
# or as `torn` to assert that tearing has run.
150-
"""Graph that maps equations to variables that appear in them."""
150+
"""Graph that connects equations to variables that appear in them."""
151151
graph::BipartiteGraph{Int, Nothing}
152152
"""Graph that connects equations to the variable they will be solved for during simplification."""
153153
solvable_graph::Union{BipartiteGraph{Int, Nothing}, Nothing}
@@ -464,15 +464,10 @@ function lower_order_var(dervar, t)
464464
diffvar
465465
end
466466

467-
"""
468-
Shift variable x by the largest shift s such that x(k-s) appears in the system of equations.
469-
The lowest-shift term will have.
470-
"""
471467
function shift_discrete_system(ts::TearingState)
472468
@unpack fullvars, sys = ts
473469
discvars = OrderedSet()
474470
eqs = equations(sys)
475-
476471
for eq in eqs
477472
vars!(discvars, eq; op = Union{Sample, Hold})
478473
end

0 commit comments

Comments
 (0)