ENH: Better motion output.

This commit is contained in:
graham
2011-06-16 16:57:42 +01:00
parent e1d9372431
commit a352fa331f

View File

@ -1996,8 +1996,6 @@ void Foam::conformalVoronoiMesh::move()
std::list<Point> pointsToInsert; std::list<Point> pointsToInsert;
label pointsAdded = 0;
for for
( (
Delaunay::Finite_edges_iterator eit = finite_edges_begin(); Delaunay::Finite_edges_iterator eit = finite_edges_begin();
@ -2005,18 +2003,18 @@ void Foam::conformalVoronoiMesh::move()
++eit ++eit
) )
{ {
if
(
eit->first->vertex(eit->second)->internalOrBoundaryPoint()
&& eit->first->vertex(eit->third)->internalOrBoundaryPoint()
)
{
face dualFace = buildDualFace(eit);
Cell_handle c = eit->first; Cell_handle c = eit->first;
Vertex_handle vA = c->vertex(eit->second); Vertex_handle vA = c->vertex(eit->second);
Vertex_handle vB = c->vertex(eit->third); Vertex_handle vB = c->vertex(eit->third);
if
(
vA->internalOrBoundaryPoint()
&& vB->internalOrBoundaryPoint()
)
{
face dualFace = buildDualFace(eit);
Foam::point dVA = topoint(vA->point()); Foam::point dVA = topoint(vA->point());
Foam::point dVB = topoint(vB->point()); Foam::point dVB = topoint(vB->point());
@ -2155,7 +2153,6 @@ void Foam::conformalVoronoiMesh::move()
toPoint(0.5*(dVA + dVB)) toPoint(0.5*(dVA + dVB))
); );
pointsAdded++;
} }
} }
else if else if
@ -2232,8 +2229,8 @@ void Foam::conformalVoronoiMesh::move()
} }
} }
vector totalDisp = sum(displacementAccumulator); vector totalDisp = gSum(displacementAccumulator);
scalar totalDist = sum(mag(displacementAccumulator)); scalar totalDist = gSum(mag(displacementAccumulator));
// Relax the calculated displacement // Relax the calculated displacement
displacementAccumulator *= relaxation; displacementAccumulator *= relaxation;
@ -2284,11 +2281,6 @@ void Foam::conformalVoronoiMesh::move()
insertPoints(pointsToInsert); insertPoints(pointsToInsert);
label pointsRemoved =
displacementAccumulator.size()
- number_of_vertices()
+ pointsAdded;
timeCheck("Internal points inserted"); timeCheck("Internal points inserted");
conformToSurface(); conformToSurface();
@ -2306,8 +2298,6 @@ void Foam::conformalVoronoiMesh::move()
Info<< nl Info<< nl
<< "Total displacement = " << totalDisp << nl << "Total displacement = " << totalDisp << nl
<< "Total distance = " << totalDist << nl << "Total distance = " << totalDist << nl
<< "Points added = " << pointsAdded << nl
<< "Points removed = " << pointsRemoved
<< endl; << endl;
} }