Skip to content

Commit a9564b8

Browse files
Merge pull request #1181 from SciML/fix-formatter-line-splits
Initialize line split fixes following Catalyst.jl PR #1306
2 parents d831f3d + 6201f98 commit a9564b8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/downstream/community_callback_tests.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,8 @@ function affect!(integrator, idx)
155155
x₂ = u.nodes[l][1:2]
156156
v₂ = u.nodes[l][3:4]
157157
# https://stackoverflow.com/a/35212639
158-
v₁ = (v₁ -
159-
2 / (1 + 1) *
160-
(dot(v₁ - v₂, x₁ - x₂) / sum(abs2, x₁ - x₂) * (x₁ - x₂)))
161-
v₂ = -(v₂ -
162-
2 / (1 + 1) *
163-
(dot(v₂ - v₁, x₂ - x₁) / sum(abs2, x₂ - x₁) * (x₂ - x₁)))
158+
v₁ = (v₁ - 2 / (1 + 1) * (dot(v₁ - v₂, x₁ - x₂) / sum(abs2, x₁ - x₂) * (x₁ - x₂)))
159+
v₂ = -(v₂ - 2 / (1 + 1) * (dot(v₂ - v₁, x₂ - x₁) / sum(abs2, x₂ - x₁) * (x₂ - x₁)))
164160

165161
println("Collision handled.")
166162

0 commit comments

Comments
 (0)