mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Better motion output.
This commit is contained in:
@ -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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Cell_handle c = eit->first;
|
||||||
|
Vertex_handle vA = c->vertex(eit->second);
|
||||||
|
Vertex_handle vB = c->vertex(eit->third);
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
eit->first->vertex(eit->second)->internalOrBoundaryPoint()
|
vA->internalOrBoundaryPoint()
|
||||||
&& eit->first->vertex(eit->third)->internalOrBoundaryPoint()
|
&& vB->internalOrBoundaryPoint()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
face dualFace = buildDualFace(eit);
|
face dualFace = buildDualFace(eit);
|
||||||
|
|
||||||
Cell_handle c = eit->first;
|
|
||||||
Vertex_handle vA = c->vertex(eit->second);
|
|
||||||
Vertex_handle vB = c->vertex(eit->third);
|
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user