From bfb9e4bf33a2141dba4d771a80da4bd80aecd2c8 Mon Sep 17 00:00:00 2001 From: graham <g.macpherson@opencfd.co.uk> Date: Wed, 22 Jun 2011 17:27:16 +0100 Subject: [PATCH] BUG: Influence referring must refer tets with only pair slave real vertices. --- .../conformalVoronoiMesh/conformalVoronoiMesh.C | 4 ++-- .../conformalVoronoiMeshCalcDualMesh.C | 8 +++----- .../conformalVoronoiMeshConformToSurface.C | 4 ++-- .../conformalVoronoiMeshIO.C | 2 +- .../conformalVoronoiMesh/indexedCell.H | 17 +++++++++++++++-- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 626d42397fe..52177d155bb 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -1305,7 +1305,7 @@ bool Foam::conformalVoronoiMesh::distributeBackground() IOobject::NO_WRITE ), bMesh, - dimensionedScalar("weight", dimless, 1e-3), + dimensionedScalar("weight", dimless, 1e-2), zeroGradientFvPatchScalarField::typeName ); @@ -1358,7 +1358,7 @@ bool Foam::conformalVoronoiMesh::distributeBackground() cellWeights.internalField()[cI] = max ( cellVertices[cI].size(), - 1e-3 + 1e-2 ); } diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 404a30eb0a7..4a8ad465312 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -61,9 +61,7 @@ void Foam::conformalVoronoiMesh::calcDualMesh cit->filterCount() = 0; } - PackedBoolList boundaryPts; - - boundaryPts.reserve(number_of_cells()); + PackedBoolList boundaryPts(number_of_cells(), false); indexDualVertices(points, boundaryPts); @@ -1723,10 +1721,10 @@ void Foam::conformalVoronoiMesh::indexDualVertices pts.setSize(number_of_cells()); - boundaryPts.clear(); - boundaryPts.setSize(number_of_cells(), false); + boundaryPts = false; + for ( Delaunay::Finite_cells_iterator cit = finite_cells_begin(); diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index e111155888d..c624f01d0fc 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -978,8 +978,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence // it. // The Delaunay cells to assess have to be real, i.e. all vertices form - // part of the internal or boundary definition - if (cit->internalOrBoundaryDualVertex()) + // part of the internal or any part of the boundary definition + if (cit->real()) { Foam::point cc(topoint(dual(cit))); diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index daed639ee7d..8b90471b6ab 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -408,7 +408,7 @@ void Foam::conformalVoronoiMesh::writeMesh mesh.addFvPatches(patches); // Info<< "ADDPATCHES NOT IN PARALLEL" << endl; - // mesh.addPatches(patches, false); + // mesh.addFvPatches(patches, false); if (!mesh.write()) { diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H index 2fd3a2943d9..45acda67182 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedCell.H @@ -139,8 +139,21 @@ public: } - // Is the Delaunay cell real, i.e. all vertices form part of the internal - // or boundary definition + // Is the Delaunay cell real, i.e. any real vertex + inline int real() const + { + return + ( + this->vertex(0)->real() + || this->vertex(1)->real() + || this->vertex(2)->real() + || this->vertex(3)->real() + ); + } + + + // Is the Delaunay cell part of the final dual mesj, i.e. any vertex form + // part of the internal or boundary definition inline int internalOrBoundaryDualVertex() const { return -- GitLab