From 386b0ee990efeead4ccc5e9073a9639592d7f5b2 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 29 Aug 2024 19:34:24 +0200 Subject: [PATCH] refactoring --- src/Tether_05.jl | 2 +- src/Tether_06.jl | 2 +- src/Tether_06b.jl | 2 +- src/Tether_06c.jl | 4 ++-- src/Tether_08.jl | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Tether_05.jl b/src/Tether_05.jl index f085a2e..926a79f 100644 --- a/src/Tether_05.jl +++ b/src/Tether_05.jl @@ -78,7 +78,7 @@ for i in 1:(segments+1) eqs2 = vcat(eqs2, reduce(vcat, eqs)) end -@named sys = ODESystem(Symbolics.scalarize.(reduce(vcat, Symbolics.scalarize.(eqs2))), t) +@named sys = ODESystem(reduce(vcat, Symbolics.scalarize.(eqs2)), t) simple_sys = structural_simplify(sys) # running the simulation diff --git a/src/Tether_06.jl b/src/Tether_06.jl index 2798666..a2207af 100644 --- a/src/Tether_06.jl +++ b/src/Tether_06.jl @@ -93,7 +93,7 @@ eqs = [len ~ L0 + V_RO*t, damping ~ DAMPING / (len/SEGMENTS)] eqs2 = vcat(eqs2, reduce(vcat, eqs)) -@named sys = ODESystem(Symbolics.scalarize.(reduce(vcat, Symbolics.scalarize.(eqs2))), t) +@named sys = ODESystem(reduce(vcat, Symbolics.scalarize.(eqs2)), t) simple_sys = structural_simplify(sys) # running the simulation diff --git a/src/Tether_06b.jl b/src/Tether_06b.jl index 25b1f12..f370962 100644 --- a/src/Tether_06b.jl +++ b/src/Tether_06b.jl @@ -96,7 +96,7 @@ function model(se) damping ~ se.damping / (len/se.segments)] eqs2 = vcat(eqs2, reduce(vcat, eqs)) - @named sys = ODESystem(Symbolics.scalarize.(reduce(vcat, Symbolics.scalarize.(eqs2))), t) + @named sys = ODESystem(reduce(vcat, Symbolics.scalarize.(eqs2)), t) simple_sys = structural_simplify(sys) simple_sys, pos, vel end diff --git a/src/Tether_06c.jl b/src/Tether_06c.jl index c548e71..010b4b5 100644 --- a/src/Tether_06c.jl +++ b/src/Tether_06c.jl @@ -112,9 +112,9 @@ function model(se) cb = vcat(cb, cbi) end end - @named sys = ODESystem(Symbolics.scalarize.(reduce(vcat, Symbolics.scalarize.(eqs2))), t; continuous_events = cb) + @named sys = ODESystem(reduce(vcat, Symbolics.scalarize.(eqs2)), t; continuous_events = cb) else - @named sys = ODESystem(Symbolics.scalarize.(reduce(vcat, Symbolics.scalarize.(eqs2))), t) + @named sys = ODESystem(reduce(vcat, Symbolics.scalarize.(eqs2)), t) end simple_sys = structural_simplify(sys) simple_sys, pos, vel diff --git a/src/Tether_08.jl b/src/Tether_08.jl index 6342d2f..8e19fc3 100644 --- a/src/Tether_08.jl +++ b/src/Tether_08.jl @@ -163,7 +163,7 @@ function model(se, p1, p2, fix_p1, fix_p2, POS0, VEL0, ACC0) damping ~ se.damping / (len/se.segments)] eqs2 = vcat(eqs2, reduce(vcat, eqs)) - @named sys = ODESystem(Symbolics.scalarize.(reduce(vcat, Symbolics.scalarize.(eqs2))), t) + @named sys = ODESystem(reduce(vcat, Symbolics.scalarize.(eqs2)), t) simple_sys = structural_simplify(sys) simple_sys, pos, vel, len, c_spr end