From 84801a625a313e305047be75b61a9bcc0e4dc233 Mon Sep 17 00:00:00 2001 From: James E McClure Date: Fri, 21 Dec 2018 08:00:12 -0500 Subject: [PATCH] fixed sign switch in morph --- analysis/morphology.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/analysis/morphology.cpp b/analysis/morphology.cpp index 9c96279f..1a00d46c 100644 --- a/analysis/morphology.cpp +++ b/analysis/morphology.cpp @@ -369,7 +369,9 @@ double MorphGrow(DoubleArray &BoundaryDist, DoubleArray &Dist, Array &id, //MAX_DISPLACEMENT *= max(TargetGrowth/GrowthEstimate,1.25); if (MAX_DISPLACEMENT > 2.0 ){ - morph_delta *= 2.0/morph_delta; + if (morph_delta > 0.0 ) morph_delta = 2.0; + else morph_delta = -2.0; + //if (COUNT_FOR_LOOP > 2) COUNT_FOR_LOOP = 100; COUNT_FOR_LOOP = 100; // exit loop if displacement is too large }