Skip to content

Commit 93e08d0

Browse files
committed
a unknown -> an unknown. Remove reorder_unknown!
1 parent 479bd05 commit 93e08d0

File tree

5 files changed

+3
-29
lines changed

5 files changed

+3
-29
lines changed

docs/src/api/catalyst_api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ ModelingToolkit.extend
196196
ModelingToolkit.compose
197197
Catalyst.flatten
198198
merge!(network1::ReactionSystem, network2::ReactionSystem)
199-
reorder_unknowns!
200199
```
201200

202201
## Network analysis and representations

docs/src/catalyst_applications/simulation_structure_interfacing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ oprob[k1]
127127
```
128128
To interface with integrators and solutions we use a similar syntax.
129129

130-
Finally, instead of using `@unpack` to access a symbolic variable or parameter, we can access it directly using `rn.X1`, and thus access a unknown of our `ODEProblem` using
130+
Finally, instead of using `@unpack` to access a symbolic variable or parameter, we can access it directly using `rn.X1`, and thus access an unknown of our `ODEProblem` using
131131
```@example ex2
132132
oprob[rn.X1]
133133
```

src/networkapi.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,27 +1440,6 @@ function addspecies!(network::ReactionSystem, s::Num; disablechecks = false)
14401440
addspecies!(network, value(s), disablechecks = disablechecks)
14411441
end
14421442

1443-
"""
1444-
reorder_unknowns!(rn, neworder)
1445-
1446-
Given a [`ReactionSystem`](@ref) and a vector `neworder`, reorders the unknowns of `rn`, i.e.
1447-
`get_unknowns(rn)`, according to `neworder`.
1448-
1449-
Notes:
1450-
- Currently only supports `ReactionSystem`s without subsystems.
1451-
"""
1452-
function reorder_unknowns!(rn, neworder)
1453-
reset_networkproperties!(rn)
1454-
1455-
permute!(get_unknowns(rn), neworder)
1456-
if !issorted(get_unknowns(rn); by = !isspecies)
1457-
@warn "New ordering has resulted in a non-species unknown preceding a species unknown. This is not allowed so unknowns have been resorted to ensure species precede non-species."
1458-
sort!(get_unknowns(rn); by = !isspecies)
1459-
end
1460-
get_species(rn) .= Iterators.filter(isspecies, get_unknowns(rn))
1461-
nothing
1462-
end
1463-
14641443
"""
14651444
addparam!(network::ReactionSystem, p::Symbolic; disablechecks=false)
14661445

src/spatial_reaction_systems/lattice_reaction_systems.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ struct LatticeReactionSystem{S,T} # <: MT.AbstractTimeDependentSystem
2828
parameters::Vector{BasicSymbolic{Real}}
2929
"""
3030
Parameters which values are tied to vertexes (adjacencies),
31-
e.g. (possibly) have a unique value at each vertex of the system.
31+
e.g. (possibly) have an unique value at each vertex of the system.
3232
"""
3333
vertex_parameters::Vector{BasicSymbolic{Real}}
3434
"""
3535
Parameters which values are tied to edges (adjacencies),
36-
e.g. (possibly) have a unique value at each edge of the system.
36+
e.g. (possibly) have an unique value at each edge of the system.
3737
"""
3838
edge_parameters::Vector{BasicSymbolic{Real}}
3939

test/miscellaneous_tests/api.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ let
2525
pset = Set([value(k1) => 1, value(k2) => 2])
2626
@test issetequal(pset, paramsmap(rs))
2727

28-
Catalyst.reorder_unknowns!(rs, [3, 1, 2])
29-
specset = Set([value(S) => 2, value(I) => 3, value(R) => 1])
30-
@test issetequal(specset, speciesmap(rs))
31-
3228
rxs = [Reaction(k1, [S, I], [I], [1, 1], [2]),
3329
Reaction(k2, [I], [R])]
3430
@named rs = ReactionSystem(rxs, t, [S, I, R], [k1, k2])

0 commit comments

Comments
 (0)