Skip to content

Commit 82de5d6

Browse files
Enable index range check for zero crossing function access
1 parent e3f8778 commit 82de5d6

File tree

1 file changed

+3
-3
lines changed
  • src/contactDetection/ContactDetectionMPR

1 file changed

+3
-3
lines changed

src/contactDetection/ContactDetectionMPR/handler.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ function selectContactPairs!(sim, scene::Composition.Scene, ch::Composition.Cont
7474
# z[1] ... zero crossing function from contact to no contact
7575
# max. distance (= min. penetration) of active contact pairs
7676
if isempty(ch.contactDict)
77-
@inbounds simh.z[scene.zStartIndex] = -42.0
77+
simh.z[scene.zStartIndex] = -42.0
7878
else
7979
(pair, key) = findmax(ch.contactDict)
80-
@inbounds simh.z[scene.zStartIndex] = pair.distanceWithHysteresis
80+
simh.z[scene.zStartIndex] = pair.distanceWithHysteresis
8181
end
8282
# z[2] ... zero crossing function from no contact to contact
8383
# min. distance of inactive contact pairs
84-
@inbounds simh.z[1+scene.zStartIndex] = ch.noContactMinVal
84+
simh.z[1+scene.zStartIndex] = ch.noContactMinVal
8585
end
8686
ch.distanceComputed = true
8787
return nothing

0 commit comments

Comments
 (0)