fix growth estimate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user