diff --git a/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C b/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C index 296fb963c..d306d77b7 100644 --- a/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C +++ b/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C @@ -140,7 +140,6 @@ void meshToMesh::calcAddressing() forAll (toMesh_.boundaryMesh(), patchi) { - const polyPatch& toPatch = toMesh_.boundaryMesh()[patchi]; if (cuttingPatches_.found(toPatch.name())) @@ -236,7 +235,7 @@ void meshToMesh::calcAddressing() void meshToMesh::cellAddresses ( - labelList& cellAddressing_, + labelList& cellAddr, const pointField& points, const fvMesh& fromMesh, const List& boundaryCell, @@ -298,12 +297,12 @@ void meshToMesh::cellAddresses } } while (closer); - cellAddressing_[toI] = -1; + cellAddr[toI] = -1; // Check point is actually in the nearest cell if (fromMesh.pointInCell(p, curCell)) { - cellAddressing_[toI] = curCell; + cellAddr[toI] = curCell; } else { @@ -313,7 +312,7 @@ void meshToMesh::cellAddresses if (boundaryCell[curCell]) { isBoundary = true; - cellAddressing_[toI] = oc.find(p); + cellAddr[toI] = oc.find(p); } else { @@ -329,7 +328,7 @@ void meshToMesh::cellAddresses // If point is in neighbour reset current cell if (fromMesh.pointInCell(p, neighbours[nI])) { - cellAddressing_[toI] = neighbours[nI]; + cellAddr[toI] = neighbours[nI]; found = true; break; } @@ -353,7 +352,7 @@ void meshToMesh::cellAddresses // If point is in neighbour reset current cell if (fromMesh.pointInCell(p, nn[nI])) { - cellAddressing_[toI] = nn[nI]; + cellAddr[toI] = nn[nI]; found = true; break; } @@ -365,11 +364,11 @@ void meshToMesh::cellAddresses if (!found) { // Still not found so use the octree - cellAddressing_[toI] = oc.find(p); + cellAddr[toI] = oc.find(p); } } - if (cellAddressing_[toI] < 0) + if (cellAddr[toI] < 0) { nCellsOutsideAddressing++; @@ -406,7 +405,7 @@ void meshToMesh::cellAddresses if (mag(points[toI] - centre) < localTol) { localTol = mag(points[toI] - centre); - cellAddressing_[toI] = celli; + cellAddr[toI] = celli; } } @@ -422,7 +421,7 @@ void meshToMesh::cellAddresses { Info<< "Found " << nCellsOutsideAddressing << " cells outside of the addressing" << nl - << "Cell addressing size = " << cellAddressing_.size() << endl; + << "Cell addressing size = " << cellAddr.size() << endl; } } diff --git a/src/sampling/meshToMeshInterpolation/meshToMesh/meshToMesh.H b/src/sampling/meshToMeshInterpolation/meshToMesh/meshToMesh.H index 56b5cc3e0..49d3d6761 100644 --- a/src/sampling/meshToMeshInterpolation/meshToMesh/meshToMesh.H +++ b/src/sampling/meshToMeshInterpolation/meshToMesh/meshToMesh.H @@ -62,9 +62,12 @@ class meshToMesh { // Private data - // mesh references + // Mesh references + //- Source mesh reference - containing data const fvMesh& fromMesh_; + + //- Target mesh reference - mapping target const fvMesh& toMesh_; //- fromMesh patch labels @@ -91,21 +94,29 @@ class meshToMesh // Private Member Functions - void calcAddressing(); + // Access - void cellAddresses - ( - labelList& cells, - const pointField& points, - const fvMesh& fromMesh, - const List& boundaryCell, - const octree& oc, - bool forceFind = false - ) const; + //- Return addressing + void cellAddresses + ( + labelList& cells, + const pointField& points, + const fvMesh& fromMesh, + const List& boundaryCell, + const octree& oc, + bool forceFind = false + ) const; - void calculateInverseDistanceWeights() const; + //- Return inverse distance weights + const scalarListList& inverseDistanceWeights() const; - const scalarListList& inverseDistanceWeights() const; + // Data calculation functions + + //- Calculate weights + void calculateInverseDistanceWeights() const; + + //- Calculate addressing + void calcAddressing(); // Private static data members @@ -154,9 +165,8 @@ public: ); - // Destructor - - ~meshToMesh(); + //- Destructor + ~meshToMesh(); //- Patch-field interpolation class