diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 47d049e20ddd8d888b46631922865c47ab7da4c5..c7567200c10b8d56420afbe4d7c2e8d77bc78027 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -563,7 +563,7 @@ void Foam::conformalVoronoiMesh::insertConvexFeaturePoints() vector cornerNormal = sum(featPtNormals); cornerNormal /= mag(cornerNormal); - point internalPt = featPt - pointPairDistance(featPt)*cornerNormal; + point internalPt = featPt - pointPairDistance(featPt)*cornerNormal; label internalPtIndex = insertPoint(internalPt, number_of_vertices() + 1); @@ -651,7 +651,7 @@ void Foam::conformalVoronoiMesh::insertMixedFeaturePoints() // non-specialised feature points, inserting mixed internal and // external edge groups at feature point. - labelList pEds(feMesh.pointEdges()[ptI]); + const labelList& pEds(feMesh.pointEdges()[ptI]); // Skipping unsupported mixed feature point types @@ -695,7 +695,7 @@ void Foam::conformalVoronoiMesh::insertMixedFeaturePoints() label edgeI = pEds[e]; point edgePt = - pt + edgeGroupDistance*feMesh.edgeDirection(edgeI, ptI); + pt + edgeGroupDistance*feMesh.edgeDirection(edgeI, ptI); pointIndexHit edgeHit(true, edgePt, edgeI); diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C index a57cf6543184bfd4d12dc3dc3e60c27550a8f361..ea9206897f562995be989f46f461033b1840222a 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePointSpecialisations.C @@ -33,7 +33,7 @@ bool Foam::conformalVoronoiMesh::insertSpecialisedFeaturePoint label ptI ) { - labelList pEds(feMesh.pointEdges()[ptI]); + const labelList& pEds(feMesh.pointEdges()[ptI]); if (pEds.size() != 3) { @@ -48,13 +48,17 @@ bool Foam::conformalVoronoiMesh::insertSpecialisedFeaturePoint label nOpen = 0; label nMultiple = 0; - forAll(pEds, e) + List<featureEdgeMesh::edgeStatus> allEdStat(pEds.size()); + + forAll(pEds, i) { - label edgeI = pEds[e]; + label edgeI = pEds[i]; + + featureEdgeMesh::edgeStatus& eS = allEdStat[i]; - featureEdgeMesh::edgeStatus edStatus = feMesh.getEdgeStatus(edgeI); + eS = feMesh.getEdgeStatus(edgeI); - switch (edStatus) + switch (eS) { case featureEdgeMesh::EXTERNAL: { diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index df153258acf572fe4aea2b66bc05482109c00f8a..8960adba9544289ce07350cef00f2f1625cbf3be 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -304,26 +304,28 @@ void Foam::conformalVoronoiMesh::writeMesh << exit(FatalError); } - pointIOField cellCs - ( - IOobject - ( - "cellCentres", - mesh.pointsInstance(), - fvMesh::meshSubDir, - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - cellCentres - ); - - Info<< nl - << "Writing " << cellCs.name() - << " to " << cellCs.instance() - << endl; + Info<< "Not writing cell centres" << endl; - cellCs.write(); + // pointIOField cellCs + // ( + // IOobject + // ( + // "cellCentres", + // mesh.pointsInstance(), + // fvMesh::meshSubDir, + // mesh, + // IOobject::NO_READ, + // IOobject::AUTO_WRITE + // ), + // cellCentres + // ); + + // Info<< nl + // << "Writing " << cellCs.name() + // << " to " << cellCs.instance() + // << endl; + + // cellCs.write(); writeCellSizes(mesh); } diff --git a/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index 1dbe372db0837f5a7fc2d49e84c6e33966244f64..f85193b820eb9f27eeac4cb6a7ee52dd40fb8c37 100644 --- a/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C @@ -325,7 +325,7 @@ bool Foam::conformationSurfaces::outside const point& samplePt ) const { - return wellOutside(pointField(1, samplePt), scalarField(1, 0))[0]; + return !inside(samplePt); }