ENH: Rebalancing of mesh during conformToSurface.

This commit is contained in:
graham
2011-06-17 10:49:57 +01:00
parent c851cbc2a6
commit a6ba96162d
2 changed files with 13 additions and 1 deletions

View File

@ -1900,7 +1900,6 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh
{ {
// distributeBackground has destroyed all referred vertices, so the // distributeBackground has destroyed all referred vertices, so the
// parallel interface needs to be rebuilt. // parallel interface needs to be rebuilt.
buildParallelInterface("rebuild"); buildParallelInterface("rebuild");
} }

View File

@ -44,6 +44,19 @@ void Foam::conformalVoronoiMesh::conformToSurface()
// Rebuild, insert and store new surface conformation // Rebuild, insert and store new surface conformation
buildSurfaceConformation(reconfMode); buildSurfaceConformation(reconfMode);
if (distributeBackground())
{
// distributeBackground has destroyed all referred vertices, so the
// parallel interface needs to be rebuilt.
buildParallelInterface("rebuild");
// Use storeSizesAndAlignments with no feed points because all
// background points may have been distributed.
storeSizesAndAlignments();
}
// Do not store the surface conformation until after it has been
// (potentially) redistributed.
storeSurfaceConformation(); storeSurfaceConformation();
} }