diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H index 496f980a11..4e0f1d160b 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.H @@ -310,14 +310,13 @@ class autoSnapDriver //- Find point on nearest feature edge (within searchDist). // Return point and feature // and store feature-edge to mesh-point and vice versa - pointIndexHit findNearFeatureEdge + Tuple2 findNearFeatureEdge ( const indirectPrimitivePatch& pp, const scalarField& snapDist, const label pointI, const point& estimatedPt, - label& featI, List > >&, List > >&, vectorField&, @@ -330,7 +329,7 @@ class autoSnapDriver // If another mesh point already referring to this feature // point and further away, reset that one to a near feature // edge (using findNearFeatureEdge above) - labelPair findNearFeaturePoint + Tuple2 findNearFeaturePoint ( const indirectPrimitivePatch& pp, const scalarField& snapDist, diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C index 67fee3ef96..03615a76bd 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriverFeature.C @@ -170,7 +170,7 @@ void Foam::autoSnapDriver::smoothAndConstrain if (isMasterEdge[meshEdges[edgeI]]) { - label nbrPointI = edges[pEdges[i]].otherVertex(pointI); + label nbrPointI = edges[edgeI].otherVertex(pointI); if (constraints[nbrPointI].first() >= nConstraints) { dispSum[pointI] += disp[nbrPointI]; @@ -213,80 +213,6 @@ void Foam::autoSnapDriver::smoothAndConstrain } } } -//XXXXXX -//TODO: make proper parallel so coupled edges don't have double influence -//void Foam::autoSnapDriver::smoothAndConstrain2 -//( -// const bool applyConstraints, -// const indirectPrimitivePatch& pp, -// const List& constraints, -// vectorField& disp -//) const -//{ -// const fvMesh& mesh = meshRefiner_.mesh(); -// -// for (label avgIter = 0; avgIter < 20; avgIter++) -// { -// vectorField dispSum(pp.nPoints(), vector::zero); -// labelList dispCount(pp.nPoints(), 0); -// -// const labelListList& pointEdges = pp.pointEdges(); -// const edgeList& edges = pp.edges(); -// -// forAll(pointEdges, pointI) -// { -// const labelList& pEdges = pointEdges[pointI]; -// -// forAll(pEdges, i) -// { -// label nbrPointI = edges[pEdges[i]].otherVertex(pointI); -// dispSum[pointI] += disp[nbrPointI]; -// dispCount[pointI]++; -// } -// } -// -// syncTools::syncPointList -// ( -// mesh, -// pp.meshPoints(), -// dispSum, -// plusEqOp(), -// vector::zero, -// mapDistribute::transform() -// ); -// syncTools::syncPointList -// ( -// mesh, -// pp.meshPoints(), -// dispCount, -// plusEqOp