commit 970f3916021a2c94f12552c1dd8775a17f6d4224
parent a06fa5a7ee3a6ff39bff663c303ae1230c44c624
Author: Anders Damsgaard <andersd@riseup.net>
Date: Sat, 27 May 2017 14:07:44 -0400
disable bonded interactions if one member is disabled
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/interaction.jl b/src/interaction.jl
@@ -46,6 +46,10 @@ Young's modulus and Poisson's ratio if Young's modulus is a positive value.
"""
function interactIceFloes!(simulation::Simulation, i::Int, j::Int, ic::Int)
+ if !simulation.ice_floes[i].enabled || !simulation.ice_floes[j].enabled
+ return
+ end
+
force_n = 0. # Contact-normal force
force_t = 0. # Contact-parallel (tangential) force