diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C index 8b05d6f39cd9912ff2a0e11bd0e8188b0d9cf170..d73ea12a0bac25c5fd2b3d23ce00734f3d460f91 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementGapRefine.C @@ -1366,14 +1366,17 @@ Foam::label Foam::meshRefinement::markInternalGapRefinement << mesh_.globalData().nTotalFaces() << endl; - FaceCellWave<transportData> deltaCalc + transportData::trackData td(surfaceIndex_); + + FaceCellWave<transportData, transportData::trackData> deltaCalc ( mesh_, frontFaces, frontData, faceData, cellData, - mesh_.globalData().nTotalCells()+1 + mesh_.globalData().nTotalCells()+1, + td ); diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportData.H b/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportData.H index f601d7e315a9c5ab8b579c28620c3f62ad24749d..eec088e6d26c6e306de50c00d72c0b2211267973 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportData.H +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportData.H @@ -45,7 +45,6 @@ namespace Foam // Forward declaration of classes class polyMesh; -class hexRef8; /*---------------------------------------------------------------------------*\ Class transportData Declaration @@ -55,6 +54,23 @@ class transportData : public wallPointData<scalar> { +public: + + //- Class used to pass additional data in + class trackData + { + public: + + //- Per face the index of the surface hit + const labelList& surfaceIndex_; + + trackData(const labelList& surfaceIndex) + : + surfaceIndex_(surfaceIndex) + {} + }; + + private: // Private Member Functions diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportDataI.H b/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportDataI.H index 16b497f4c0bad19b0cfe945e495a2f7922a49745..e0bbeaeaf336aded7f3154b8cf2f3507b676e56f 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportDataI.H +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/transportDataI.H @@ -101,12 +101,17 @@ inline bool Foam::transportData::updateCell ( const polyMesh& mesh, const label cellI, - const label, + const label faceI, const transportData& neighbourWallInfo, const scalar tol, TrackingData& td ) { + if (td.surfaceIndex_[faceI] != -1) + { + return false; + } + const vectorField& cellCentres = mesh.primitiveMesh::cellCentres(); bool updated = update @@ -132,6 +137,11 @@ inline bool Foam::transportData::updateFace TrackingData& td ) { + if (td.surfaceIndex_[thisFaceI] != -1) + { + return false; + } + return update ( mesh.faceCentres()[thisFaceI], @@ -152,6 +162,11 @@ inline bool Foam::transportData::updateFace TrackingData& td ) { + if (td.surfaceIndex_[thisFaceI] != -1) + { + return false; + } + return update ( mesh.faceCentres()[thisFaceI],