From 693c537190b0cd458d28c3ee43d17b0773de7f87 Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 9 Feb 2012 10:41:04 +0000 Subject: [PATCH 1/7] BUG: cvMesh: Allow external boundaries to be filtered but not proc boundaries --- .../conformalVoronoiMeshCalcDualMesh.C | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 0a79cd620d..04ef2af045 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -79,9 +79,7 @@ void Foam::conformalVoronoiMesh::calcDualMesh } } -// REMOVED BECAUSE THIS CODE STOPS ALL FACES NEAR ANY BOUNDARY (PROC OR REAL) -// FROM BEING FILTERED. -// + // THIS CODE STOPS ALL FACES NEAR ANY PROCESSOR BOUNDARY BEING FILTERED. for ( Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); @@ -104,19 +102,12 @@ void Foam::conformalVoronoiMesh::calcDualMesh // Allow filtering if any vertices are far points. Otherwise faces // with boundary points attached to a cell with a far point will // not be filtered. -// if -// ( -// (!(*cit)->vertex(0)->real() && !(*cit)->vertex(0)->farPoint()) -// || (!(*cit)->vertex(1)->real() && !(*cit)->vertex(1)->farPoint()) -// || (!(*cit)->vertex(2)->real() && !(*cit)->vertex(2)->farPoint()) -// || (!(*cit)->vertex(3)->real() && !(*cit)->vertex(3)->farPoint()) -// ) if ( - (!(*cit)->vertex(0)->real()) - || (!(*cit)->vertex(1)->real()) - || (!(*cit)->vertex(2)->real()) - || (!(*cit)->vertex(3)->real()) + (!(*cit)->vertex(0)->real() && !(*cit)->vertex(0)->farPoint()) + || (!(*cit)->vertex(1)->real() && !(*cit)->vertex(1)->farPoint()) + || (!(*cit)->vertex(2)->real() && !(*cit)->vertex(2)->farPoint()) + || (!(*cit)->vertex(3)->real() && !(*cit)->vertex(3)->farPoint()) ) { hasProcPt = true; From 779d1548d1ec5c36dd36b7daed901d5e03fda937 Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 9 Feb 2012 10:52:18 +0000 Subject: [PATCH 2/7] ENH: cvMesh surf conformance: Add quick prefilter for vertices near boundary dualCellSurfaceAllIntersections is expensive, so do a faster prefilter to label vertices as being near a boundary before calling that function. May need more tuning on the distance from a surface that constitutes being near a boundary. --- .../conformalVoronoiMesh.C | 2 - .../conformalVoronoiMeshConformToSurface.C | 47 ++++++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 7ca688a113..8abdd02833 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -426,8 +426,6 @@ void Foam::conformalVoronoiMesh::insertPoints indices, types ); - - Pout<< pts.size() << " " << indices.size() << " " << types.size() << endl; } diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index cf77b5e14a..79ca95a03a 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -175,7 +175,34 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation // \ . / // ---x---- + label countNearBoundaryVertices = 0; + for + ( + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); + vit != finite_vertices_end(); + vit++ + ) + { + if (vit->internalPoint()) + { + const Foam::point& pt = topoint(vit->point()); + const scalar range = sqr(2.0*targetCellSize(pt)); + + bool closeToBoundary = geometryToConformTo_.wellInside(pt, range); + + if (!closeToBoundary) + { + vit->setNearBoundary(); + countNearBoundaryVertices++; + } + } + } + + Info<< " Vertices marked as being near a boundary: " + << countNearBoundaryVertices << " (estimated)" << endl; + + timeCheck("After set near boundary"); // Initial surface protrusion conformation - nearest surface point { @@ -198,7 +225,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation vit++ ) { - if (vit->internalPoint()) + if (vit->internalPoint() && vit->nearBoundary()) { const Foam::point vert = topoint(vit->point()); @@ -220,11 +247,6 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation ) ) { - // This used to be just before this if statement. - // Moved because a point is only near the boundary if - // the dual cell intersects the surface. - vit->setNearBoundary(); - // meshTools::writeOBJ(Pout, vert); // meshTools::writeOBJ(Pout, surfHit.hitPoint()); // Pout<< "l cr0 cr1" << endl; @@ -246,9 +268,18 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation existingSurfacePtLocations ); } + else + { + vit->setInternal(); + countNearBoundaryVertices--; + } } } + Info<< " Vertices marked as being near a boundary: " + << countNearBoundaryVertices + << " (after dual surface intersection)" << endl; + label nVerts = number_of_vertices(); label nSurfHits = surfaceHits.size(); label nFeatEdHits = featureEdgeHits.size(); @@ -1179,6 +1210,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence cIOuter++; } + timeCheck("End of testing cell influence"); + // Increasing the circumspheres to increase the overlaps and compensate for // floating point errors missing some referrals labelListList circumsphereOverlaps @@ -1186,6 +1219,8 @@ void Foam::conformalVoronoiMesh::buildParallelInterfaceInfluence overlapsProc(circumcentre, sqr(1.01)*circumradiusSqr) ); + timeCheck("End of increasing overlaps"); + // Reset counters cIOuter = 0; From ecb31dc57f06ed1d510eac68656f195fe9873a5c Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 9 Feb 2012 12:25:42 +0000 Subject: [PATCH 3/7] ENH: cvMesh: Move feature point tree into extendedFeatureEdgeMesh from cvMesh --- .../conformalVoronoiMesh.C | 44 ++++----------- .../conformalVoronoiMesh.H | 6 -- .../conformationSurfaces.C | 31 ++++++++++ .../conformationSurfaces.H | 8 +++ .../extendedFeatureEdgeMesh.C | 56 +++++++++++++++++++ .../extendedFeatureEdgeMesh.H | 15 +++++ 6 files changed, 120 insertions(+), 40 deletions(-) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 8abdd02833..e8cedc49c2 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -522,43 +522,20 @@ void Foam::conformalVoronoiMesh::insertEdgePointGroups } -const Foam::indexedOctree& -Foam::conformalVoronoiMesh::featurePointTree() const -{ - if (featurePointTreePtr_.empty()) - { - treeBoundBox overallBb - ( - geometryToConformTo_.globalBounds().extend(rndGen_, 1e-4) - ); - - overallBb.min() -= Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); - overallBb.max() += Foam::point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); - - featurePointTreePtr_.reset - ( - new indexedOctree - ( - treeDataPoint(featurePointLocations_), - overallBb, // overall search domain - 10, // max levels - 10.0, // maximum ratio of cubes v.s. cells - 100.0 // max. duplicity; n/a since no bounding boxes. - ) - ); - } - - return featurePointTreePtr_(); -} - - bool Foam::conformalVoronoiMesh::nearFeaturePt(const Foam::point& pt) const { - const indexedOctree& tree = featurePointTree(); - scalar exclusionRangeSqr = featurePointExclusionDistanceSqr(pt); - pointIndexHit info = tree.findNearest(pt, exclusionRangeSqr); + pointIndexHit info; + label featureHit; + + geometryToConformTo_.findFeaturePointNearest + ( + pt, + exclusionRangeSqr, + info, + featureHit + ); return info.hit(); } @@ -1207,7 +1184,6 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh limitBounds_(), featureVertices_(), featurePointLocations_(), - featurePointTreePtr_(), edgeLocationTreePtr_(), surfacePtLocationTreePtr_(), sizeAndAlignmentLocations_(), diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index d29cf85295..7a68f98b03 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -169,9 +169,6 @@ private: // Single pointField required by the featurePointTree. pointField featurePointLocations_; - //- Search tree for feature point locations - mutable autoPtr > featurePointTreePtr_; - //- Search tree for edge point locations mutable autoPtr > edgeLocationTreePtr_; @@ -487,9 +484,6 @@ private: //- Reinsert stored feature point defining points void reinsertFeaturePoints(bool distribute = false); - //- Demand driven construction of octree for feature points - const indexedOctree& featurePointTree() const; - //- Check if a location is in exclusion range around a feature point bool nearFeaturePt(const Foam::point& pt) const; diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index b91d40121d..8212688165 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C @@ -619,6 +619,37 @@ void Foam::conformationSurfaces::findSurfaceNearest } +void Foam::conformationSurfaces::findFeaturePointNearest +( + const point& sample, + scalar nearestDistSqr, + pointIndexHit& fpHit, + label& featureHit +) const +{ + // Work arrays + scalar minDistSqr = nearestDistSqr; + pointIndexHit hitInfo; + + forAll(features_, testI) + { + features_[testI].nearestFeaturePoint + ( + sample, + minDistSqr, + hitInfo + ); + + if (hitInfo.hit()) + { + minDistSqr = magSqr(hitInfo.hitPoint()- sample); + fpHit = hitInfo; + featureHit = testI; + } + } +} + + void Foam::conformationSurfaces::findEdgeNearest ( const point& sample, diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H index fe883fbaa5..bb78cde3e4 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.H @@ -246,6 +246,14 @@ public: labelList& hitSurfaces ) const; + //- Find the nearest point on any feature edge + void findFeaturePointNearest + ( + const point& sample, + scalar nearestDistSqr, + pointIndexHit& fpHit, + label& featureHit + ) const; //- Find the nearest point on any feature edge void findEdgeNearest diff --git a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C index 9f621b24ee..b7ab3074fc 100644 --- a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C +++ b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C @@ -72,6 +72,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(const IOobject& io) edgeNormals_(0), featurePointNormals_(0), regionEdges_(0), + pointTree_(), edgeTree_(), edgeTreesByType_() { @@ -159,6 +160,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh edgeNormals_(fem.edgeNormals()), featurePointNormals_(fem.featurePointNormals()), regionEdges_(fem.regionEdges()), + pointTree_(), edgeTree_(), edgeTreesByType_() {} @@ -185,6 +187,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh edgeNormals_(0), featurePointNormals_(0), regionEdges_(0), + pointTree_(), edgeTree_(), edgeTreesByType_() {} @@ -222,6 +225,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh edgeNormals_(0), featurePointNormals_(0), regionEdges_(0), + pointTree_(), edgeTree_(), edgeTreesByType_() { @@ -578,6 +582,7 @@ Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh edgeNormals_(edgeNormals), featurePointNormals_(featurePointNormals), regionEdges_(regionEdges), + pointTree_(), edgeTree_(), edgeTreesByType_() {} @@ -684,6 +689,21 @@ Foam::extendedFeatureEdgeMesh::classifyEdge // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // +void Foam::extendedFeatureEdgeMesh::nearestFeaturePoint +( + const point& sample, + scalar searchDistSqr, + pointIndexHit& info +) const +{ + info = pointTree().findNearest + ( + sample, + searchDistSqr + ); +} + + void Foam::extendedFeatureEdgeMesh::nearestFeatureEdge ( const point& sample, @@ -816,6 +836,42 @@ void Foam::extendedFeatureEdgeMesh::allNearestFeatureEdges } +const Foam::indexedOctree& +Foam::extendedFeatureEdgeMesh::pointTree() const +{ + if (pointTree_.empty()) + { + Random rndGen(17301893); + + // Slightly extended bb. Slightly off-centred just so on symmetric + // geometry there are less face/edge aligned items. + treeBoundBox bb + ( + treeBoundBox(points()).extend(rndGen, 1E-4) + ); + + bb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + bb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + + labelList allPoints(identity(points().size())); + + pointTree_.reset + ( + new indexedOctree + ( + treeDataPoint(points()), + bb, // bb + 8, // maxLevel + 10, // leafsize + 3.0 // duplicity + ) + ); + } + + return pointTree_(); +} + + const Foam::indexedOctree& Foam::extendedFeatureEdgeMesh::edgeTree() const { diff --git a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.H b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.H index 3268e719c5..52de62552c 100644 --- a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.H +++ b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.H @@ -61,6 +61,7 @@ SourceFiles #include "IOdictionary.H" #include "indexedOctree.H" #include "treeDataEdge.H" +#include "treeDataPoint.H" #include "pointIndexHit.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -155,6 +156,9 @@ private: //- Feature edges which are on the boundary between regions labelList regionEdges_; + //- Search tree for all feature points + mutable autoPtr > pointTree_; + //- Search tree for all edges mutable autoPtr > edgeTree_; @@ -247,6 +251,14 @@ public: // Find + //- Find nearest surface edge for the sample point. + void nearestFeaturePoint + ( + const point& sample, + scalar searchDistSqr, + pointIndexHit& info + ) const; + //- Find nearest surface edge for the sample point. void nearestFeatureEdge ( @@ -349,6 +361,9 @@ public: //- Return the edgeStatus of a specified edge inline edgeStatus getEdgeStatus(label edgeI) const; + //- Demand driven construction of octree for feature points + const indexedOctree& pointTree() const; + //- Demand driven construction of octree for boundary edges const indexedOctree& edgeTree() const; From c3d77467e1d6e7664764a9cb6263ff31ca0a4688 Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 9 Feb 2012 12:26:21 +0000 Subject: [PATCH 4/7] ENH: cvMesh: Change wellInside call to findSurfaceNearest Do not need need to know whether point is inside or outside. --- .../conformalVoronoiMeshConformToSurface.C | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 79ca95a03a..349a7299da 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -184,14 +184,23 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation vit++ ) { - if (vit->internalPoint()) + if (vit->internalPoint() && !vit->nearBoundary()) { const Foam::point& pt = topoint(vit->point()); const scalar range = sqr(2.0*targetCellSize(pt)); - bool closeToBoundary = geometryToConformTo_.wellInside(pt, range); + pointIndexHit pHit; + label hitSurface; - if (!closeToBoundary) + geometryToConformTo_.findSurfaceNearest + ( + pt, + range, + pHit, + hitSurface + ); + + if (pHit.hit()) { vit->setNearBoundary(); countNearBoundaryVertices++; @@ -2179,7 +2188,7 @@ void Foam::conformalVoronoiMesh::buildSizeAndAlignmentTree() const treeDataPoint(sizeAndAlignmentLocations_), overallBb, // overall search domain 10, // max levels - 10.0, // maximum ratio of cubes v.s. cells + 20.0, // maximum ratio of cubes v.s. cells 100.0 // max. duplicity; n/a since no bounding boxes. ) ); From be42c48cb6c929bc3dcfdf7117c0f80b4556824f Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 9 Feb 2012 14:44:28 +0000 Subject: [PATCH 5/7] BUG: cvMesh: Reset the initial value of keepSurfacePoint within the loop --- .../conformalVoronoiMeshConformToSurface.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 349a7299da..847974a2f4 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -2212,13 +2212,13 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits DynamicList& existingSurfacePtLocations ) const { - bool keepSurfacePoint = true; - const scalar cellSize = targetCellSize(vert); const scalar cellSizeSqr = sqr(cellSize); forAll(surfHit, sI) { + bool keepSurfacePoint = true; + pointIndexHit surfHitI = surfHit[sI]; label hitSurfaceI = hitSurface[sI]; From f25c2a1155ea649ecbd17a747515d08213de14d2 Mon Sep 17 00:00:00 2001 From: laurence Date: Thu, 9 Feb 2012 15:58:47 +0000 Subject: [PATCH 6/7] ENH: processorPolyPatch::updateMesh outputs FatalError if size of data on neighbour does not match size of data on the current processor --- .../constraint/processor/processorPolyPatch.C | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index ac8e28a81c..7ee72d6142 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -369,6 +369,24 @@ void Foam::processorPolyPatch::updateMesh(PstreamBuffers& pBufs) >> nbrPointIndex >> nbrEdgeFace >> nbrEdgeIndex; + + if + ( + nbrPointIndex.size() != nPoints() + || nbrEdgeIndex.size() != nEdges() + ) + { + FatalErrorIn + ( + "processorPolyPatch::updateMesh(PstreamBuffers&)" + ) << "Size of data from processor " << neighbProcNo() + << " does not match size of data on processor " + << Pstream::myProcNo() << "." << nl + << " Neighbour has " << nbrPointFace.size() + << " points and " << nbrEdgeFace.size() << " edges." << nl + << " This proc has " << nPoints() << " points and " + << nEdges() << " edges." << exit(FatalError); + } } // Convert neighbour faces and indices into face back into From 0b1644a1c4708a358d8cd2d52553356b070b5e82 Mon Sep 17 00:00:00 2001 From: laurence Date: Fri, 10 Feb 2012 09:17:08 +0000 Subject: [PATCH 7/7] BUG: extendedFeatureEdgeMesh feature point tree was not initialised correctly --- .../extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C index b7ab3074fc..0ebb7b58ab 100644 --- a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C +++ b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMesh.C @@ -853,13 +853,17 @@ Foam::extendedFeatureEdgeMesh::pointTree() const bb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); bb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); - labelList allPoints(identity(points().size())); + const labelList featurePointLabels = identity(nonFeatureStart_); pointTree_.reset ( new indexedOctree ( - treeDataPoint(points()), + treeDataPoint + ( + points(), + featurePointLabels + ), bb, // bb 8, // maxLevel 10, // leafsize