fix growth estimate

This commit is contained in:
James E McClure
2018-12-17 08:06:39 -05:00
parent c1a1d468d8
commit 3e1ed52929

View File

@@ -354,11 +354,11 @@ double MorphGrow(DoubleArray &BoundaryDist, DoubleArray &Dist, Array<char> &id,
}
count=sumReduce( Dm->Comm, count);
MAX_DISPLACEMENT = sumReduce( Dm->Comm, MAX_DISPLACEMENT);
GrowthEstimate = count;
GrowthEstimate = count - count_original;
if (rank == 0) printf(" delta=%f, growth=%f, max. displacement = %f \n",morph_delta, GrowthEstimate, MAX_DISPLACEMENT);
// Now adjust morph_delta
morph_delta *= TargetGrowth/(count - count_original);
morph_delta *= TargetGrowth/GrowthEstimate;
if (MAX_DISPLACEMENT > 2.0 ){
morph_delta /= 0.5*MAX_DISPLACEMENT;
COUNT_FOR_LOOP = 100; // exit loop if displacement is too large