Skip to content

Commit 1a6dc52

Browse files
committed
Remove old comments
1 parent b6d435b commit 1a6dc52

File tree

2 files changed

+4
-34
lines changed

2 files changed

+4
-34
lines changed

src/structural_transformation/bipartite_tearing/modia_tearing.jl

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
# This code is from the Modia project and is licensed as follows:
1+
# This code is derived from the Modia project and is licensed as follows:
22
# https://github.com/ModiaSim/Modia.jl/blob/b61daad643ef7edd0c1ccce6bf462c6acfb4ad1a/LICENSE
33

4-
################################################
5-
#
6-
# Functions to tear systems of equations
7-
#
8-
# Author: Martin Otter, DLR-SR (first version: Jan. 14, 2017)
9-
#
10-
# Details are described in the paper:
11-
# Otter, Elmqvist (2017): Transformation of Differential Algebraic Array Equations to
12-
# Index One Form. Modelica'2017 Conference.
13-
#
14-
################################################
15-
164
function try_assign_eq!(ict::IncrementalCycleTracker, vj::Integer, eq::Integer)
175
G = ict.graph
186
add_edge_checked!(ict, Iterators.filter(!=(vj), 𝑠neighbors(G.graph, eq)), vj) do G
@@ -21,19 +9,6 @@ function try_assign_eq!(ict::IncrementalCycleTracker, vj::Integer, eq::Integer)
219
end
2210
end
2311

24-
"""
25-
(eSolved, vSolved, eResidue, vTear) = tearEquations!(td, Gsolvable, es, vs)
26-
27-
Equations es shall be solved with respect to variables vs. The function returns
28-
the teared equation so that if vTear is given, vSolved can be computed from eSolved
29-
in a forward sequence (so solving eSolved[1] for vSolved[1], eSolved[2] for vSolved[2],
30-
and so on). vTear must be selected, so that the equations eResidues are fulfilled.
31-
Equations es are the union of eSolved and eResidue.
32-
Variables vs are the union of vSolved and vTear.
33-
34-
Gsolvable defines the variables that can be explicitly solved in every equation without influencing the solution space
35-
(= rank preserving operation).
36-
"""
3712
function tearEquations!(ict::IncrementalCycleTracker, Gsolvable, es::Vector{Int}, vs::Vector{Int})
3813
G = ict.graph
3914
vActive = BitSet(vs)
@@ -59,13 +34,8 @@ function tear_graph_block_modia!(var_eq_matching, graph, solvable_graph, eqs, va
5934
return nothing
6035
end
6136

62-
"""
63-
tear_graph_modia(sys) -> sys
64-
65-
Tear the bipartite graph in a system. End users are encouraged to call [`structural_simplify`](@ref)
66-
instead, which calls this function internally.
67-
"""
68-
function tear_graph_modia(graph::BipartiteGraph, solvable_graph::BipartiteGraph; varfilter=v->true, eqfilter=eq->true)
37+
function tear_graph_modia(structure::SystemStructure; varfilter=v->true, eqfilter=eq->true)
38+
@unpack graph, solvable_graph = structure
6939
var_eq_matching = complete(maximal_matching(graph, eqfilter, varfilter))
7040
var_sccs::Vector{Union{Vector{Int}, Int}} = find_var_sccs(graph, var_eq_matching)
7141

src/structural_transformation/symbolics_tearing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function tearing(state::TearingState; kwargs...)
248248
@unpack graph, solvable_graph = state.structure
249249
algvars = BitSet(findall(v->isalgvar(state.structure, v), 1:ndsts(graph)))
250250
aeqs = algeqs(state.structure)
251-
var_eq_matching = Matching{Union{Unassigned, SelectedState}}(tear_graph_modia(graph, solvable_graph;
251+
var_eq_matching = Matching{Union{Unassigned, SelectedState}}(tear_graph_modia(state.structure;
252252
varfilter=var->var in algvars, eqfilter=eq->eq in aeqs))
253253
for var in 1:ndsts(graph)
254254
if isdiffvar(state.structure, var)

0 commit comments

Comments
 (0)