From e239a4acd63f8d5a8dd26e4b4fbc7981afd27e7d Mon Sep 17 00:00:00 2001 From: renchao_lu <renchao.lu@gmail.com> Date: Tue, 27 Feb 2018 14:59:38 +0100 Subject: [PATCH] prevent exception in case of Tnp = 0 when using Cohesive zone modelI. --- MaterialLib/FractureModels/CohesiveZoneModeI.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MaterialLib/FractureModels/CohesiveZoneModeI.h b/MaterialLib/FractureModels/CohesiveZoneModeI.h index 8bbfc83acae..23931d7e16f 100644 --- a/MaterialLib/FractureModels/CohesiveZoneModeI.h +++ b/MaterialLib/FractureModels/CohesiveZoneModeI.h @@ -49,6 +49,11 @@ struct MaterialPropertiesParameters double fracture_opening_at_residual_traction(double const t, X const& x) const { + if (peak_normal_traction(t, x)[0] == 0.0) + { + return 0.0; + } + return 2 * fracture_toughness(t, x)[0] / peak_normal_traction(t, x)[0]; } -- GitLab