Bugfix in prismatic2DRefinement
Mistakenly used patch.size() instead of patch.start() to fetch the global face index. This caused points at the boundary to be marked as split points, which is not allowed. Also corrected a few typos.
This commit is contained in:
parent
712807e126
commit
3742439d0f
3 changed files with 18 additions and 11 deletions
|
@ -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)
|
||||
|
|
|
@ -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<processorPolyPatch>(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
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue