diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C index 7013717a5..d52bb93af 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C @@ -2210,7 +2210,7 @@ void Foam::polyhedralRefinement::setSplitPointsToUnrefine // Note: if there is no dynamic load balancing, points at the boundary // cannot be split points by definition. However, in dynamic load balancing - // runs, it is possible that a split point end on processor boundary, in + // runs, it is possible that a split point ends on processor boundary, in // which case we will simply avoid (actually delay) unrefining until this // becomes internal point again. VV, 4/Jul/2018. const label nInternalFaces = mesh_.nInternalFaces(); @@ -2218,7 +2218,7 @@ void Foam::polyhedralRefinement::setSplitPointsToUnrefine for (label faceI = nInternalFaces; faceI < nFaces; ++faceI) { - // Get the face and make sure that the points are unarked + // Get the face and make sure that the points are unmarked const face& f = meshFaces[faceI]; forAll (f, fpI) diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C index f627b7f55..5a85d071a 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C @@ -2695,7 +2695,7 @@ void Foam::prismatic2DRefinement::setSplitPointsToUnrefine // 1. Has pointLevel_ > 0 (obviously), // 2. A point that has the same pointLevel_ as ALL of the points of its // edges. In other words, for each point, we will look through all the - // edges of the point. For each edges, we will visit both points and + // edges of the point. For each edge, we will visit both points and // check point levels. All point levels must be the same for this point // candidate to be a split point. This is quite useful since there is no // need to store the refinement history @@ -2779,11 +2779,14 @@ void Foam::prismatic2DRefinement::setSplitPointsToUnrefine if (isA(patch)) { + // Get patch start + const label startIndex = patch.start(); + // Loop through all the faces forAll (patch, i) { // Get global face index and face - const label faceI = patch.size() + i; + const label faceI = startIndex + i; const face& f = meshFaces[faceI]; // Make sure that we don't split around point at all points of diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C index 685f662a9..c034a388c 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C @@ -956,9 +956,11 @@ Foam::label Foam::refinement::faceConsistentUnrefinement << "Try increasing nUnrefinementBufferLayers. " << abort(FatalError); } - - cellsToUnrefine[own] = false; - ++nRemCells; + else + { + cellsToUnrefine[own] = false; + ++nRemCells; + } } else if (neiLevel < (ownLevel - 1)) { @@ -984,9 +986,11 @@ Foam::label Foam::refinement::faceConsistentUnrefinement << "Try increasing nUnrefinementBufferLayers. " << abort(FatalError); } - - cellsToUnrefine[nei] = false; - ++nRemCells; + else + { + cellsToUnrefine[nei] = false; + ++nRemCells; + } } } @@ -1018,7 +1022,7 @@ Foam::label Foam::refinement::faceConsistentUnrefinement // Note: we are using more stringent 1:1 consistency across coupled // boundaries in order to simplify handling of edge based consistency - // checkes for parallel runs + // checks for parallel runs if (curOwnLevel < neiLevel[i]) { // Owner level is smaller than neighbour level, we must not