Bugfix in AMR related to PLB

Allow 2:1 face consistency on possibly newly created processor faces.
This commit is contained in:
Vuko Vukcevic 2019-01-25 10:26:08 +01:00
parent 920ff7bcc4
commit 957235997b
2 changed files with 18 additions and 1 deletions

View file

@ -2086,6 +2086,11 @@ void Foam::polyhedralRefinement::setCellsToRefine
++nIters;
nTotalAddCells += nAddCells;
if (debug)
{
Info<< "Added " << nAddCells << " in iteration " << nIters << nl;
}
} while (nAddCells > 0);
Info<< "Added " << nTotalAddCells // nTotalAddCells already reduced
@ -2368,6 +2373,11 @@ void Foam::polyhedralRefinement::setSplitPointsToUnrefine
++nIters;
nTotalRemCells += nRemCells;
if (debug)
{
Info<< "Removed " << nRemCells << " in iteration " << nIters << nl;
}
} while (nRemCells > 0);
Info<< "Removed " << nTotalRemCells // nTotalRemCells already reduced

View file

@ -797,7 +797,14 @@ Foam::label Foam::refinement::faceConsistentRefinement
// Note: we are using more stringent 1:1 consistency across coupled
// boundaries in order to simplify handling of edge based consistency
// checks for parallel runs
if (neiLevel[i] > curOwnLevel)
// Bugfix related to PLB: Check whether owner is already marked for
// refinement. Will allow 2:1 consistency across certain processor faces
// where we have a new processor boundary. VV, 23/Jan/2019.
if
(
(neiLevel[i] > curOwnLevel)
&& !cellsToRefine[own]
)
{
// Neighbour level is higher than owner level, owner must be
// marked for refinement