diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 626d42397fe94d14e603dc7edb6fc4fcb1c13db9..52177d155bbc9bc5d41b948aacc74e42d4b0cf72 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 404a30eb0a716bcdce3b9359b98cbb06294cf0b2..4a8ad465312206e5a2331319712b9fa95e44fa3e 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 e111155888d02a205a95eda1d605c4248e7f3b47..c624f01d0fcbdc6f90e88ecf2374f15f57a03103 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 daed639ee7dbdabcc4bdef9ec0f9325570ac3322..8b90471b6ab35afb1e8cd1894806eceaefdba45a 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 2fd3a2943d997e44510244fdabd8d3250296e20b..45acda6718220b0d7b834a7530e2a4ec347c428b 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