Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Aug 29, 2024
1 parent 918e2d6 commit 386b0ee
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Tether_05.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Tether_06.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Tether_06b.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Tether_06c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Tether_08.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 386b0ee

Please sign in to comment.