Commit 93d5fc74 authored by mattijs's avatar mattijs
Browse files

Merge branch 'cvm' of /home/noisy3/OpenFOAM/OpenFOAM-dev into cvm

parents 74d06462 605c27ae
......@@ -1507,9 +1507,13 @@ void Foam::conformalVoronoiMesh::updateSizesAndAlignments
const std::list<Point>& storePts
)
{
// This function is only used in serial, the background redistribution
// triggers this when unbalance is detected in parallel.
if
(
runTime_.run()
!Pstream::parRun()
&& runTime_.run()
&& runTime_.timeIndex()
% cvMeshControls().sizeAndAlignmentRebuildFrequency() == 0
)
......@@ -1546,7 +1550,11 @@ void Foam::conformalVoronoiMesh::setVertexSizeAndAlignment()
vit++
)
{
if (vit->internalOrBoundaryPoint())
if
(
vit->internalOrBoundaryPoint()
|| vit->referredInternalOrBoundaryPoint()
)
{
Foam::point pt(topoint(vit->point()));
......@@ -1958,10 +1966,10 @@ void Foam::conformalVoronoiMesh::move()
if
(
cit->vertex(0)->internalOrBoundaryPoint()
|| cit->vertex(1)->internalOrBoundaryPoint()
|| cit->vertex(2)->internalOrBoundaryPoint()
|| cit->vertex(3)->internalOrBoundaryPoint()
cit->vertex(0)->anyInternalOrBoundaryPoint()
|| cit->vertex(1)->anyInternalOrBoundaryPoint()
|| cit->vertex(2)->anyInternalOrBoundaryPoint()
|| cit->vertex(3)->anyInternalOrBoundaryPoint()
)
{
cit->cellIndex() = dualVertI;
......@@ -1992,7 +2000,11 @@ void Foam::conformalVoronoiMesh::move()
vector::zero
);
PackedBoolList pointToBeRetained(number_of_vertices(), true);
PackedBoolList pointToBeRetained
(
number_of_vertices(),
true
);
std::list<Point> pointsToInsert;
......@@ -2007,10 +2019,16 @@ void Foam::conformalVoronoiMesh::move()
Vertex_handle vA = c->vertex(eit->second);
Vertex_handle vB = c->vertex(eit->third);
if (!vA->internalOrBoundaryPoint() && !vB->internalOrBoundaryPoint())
{
// At least one vertex has to be a real internalOrBoundaryPoint
continue;
}
if
(
vA->internalOrBoundaryPoint()
&& vB->internalOrBoundaryPoint()
vA->anyInternalOrBoundaryPoint()
&& vB->anyInternalOrBoundaryPoint()
)
{
face dualFace = buildDualFace(eit);
......
......@@ -1929,7 +1929,11 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
label patchIndex = -1;
if (vA->referredInternal() || vB->referredInternal())
if
(
vA->referredInternalOrBoundaryPoint()
|| vB->referredInternalOrBoundaryPoint()
)
{
// One (and only one) of the points is an internal
// point from another processor
......@@ -1949,7 +1953,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
Pair<DynamicList<label> >& sortingIndex =
procPatchSortingIndex[patchIndex];
if (vB->referredInternal())
if (vB->referredInternalOrBoundaryPoint())
{
sortingIndex.first().append(vA->index());
sortingIndex.second().append(vB->index());
......@@ -1968,7 +1972,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
Pair<DynamicList<label> >& sortingIndex =
procPatchSortingIndex[patchIndex];
if (vA->referredInternal())
if (vA->referredInternalOrBoundaryPoint())
{
sortingIndex.first().append(vA->index());
sortingIndex.second().append(vB->index());
......
......@@ -305,7 +305,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation
(
vit->nearBoundary()
|| vit->ppMaster()
|| vit->referredInternal()
|| vit->referredInternalOrBoundaryPoint()
)
{
Foam::point vert(topoint(vit->point()));
......
......@@ -227,9 +227,9 @@ public:
// is this a referred internal or boundary vertex
inline bool referredInternal() const
inline bool referredInternalOrBoundaryPoint() const
{
return referred() && index_ >= 0 ;
return referred() && index_ >= 0;
}
......@@ -350,43 +350,11 @@ public:
}
// //- Do the two given vertices consitute a boundary point-pair
// inline friend bool pointPair
// (
// const indexedVertex& v0,
// const indexedVertex& v1
// )
// {
// return v0.index_ == v1.type_ || v1.index_ == v0.type_;
// }
// //- Do the three given vertices consitute a boundary triangle
// inline friend bool boundaryTriangle
// (
// const indexedVertex& v0,
// const indexedVertex& v1,
// const indexedVertex& v2
// )
// {
// return (v0.pairPoint() && pointPair(v1, v2))
// || (v1.pairPoint() && pointPair(v2, v0))
// || (v2.pairPoint() && pointPair(v0, v1));
// }
// //- Do the three given vertices consitute an outside triangle
// inline friend bool outsideTriangle
// (
// const indexedVertex& v0,
// const indexedVertex& v1,
// const indexedVertex& v2
// )
// {
// return (v0.farPoint() || v0.ppSlave())
// || (v1.farPoint() || v1.ppSlave())
// || (v2.farPoint() || v2.ppSlave());
// }
//- Either a real or referred internal or boundary point
inline bool anyInternalOrBoundaryPoint() const
{
return internalOrBoundaryPoint() || referredInternalOrBoundaryPoint();
}
// inline void operator=(const Delaunay::Finite_vertices_iterator vit)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment