Temporary change in refinement.C regarding edge consistency

Removed FatalError and instead issuing a warning (if debug) for runs with
Parallel Load Balancing. Still need to test thoroughly
This commit is contained in:
Vuko Vukcevic 2019-02-20 13:54:16 +01:00
parent cea60ab8ab
commit d1116b86a9

View file

@ -1014,26 +1014,31 @@ Foam::label Foam::refinement::edgeConsistentUnrefinement
// unrefinement
if (!cellsToUnrefine[cellI])
{
FatalErrorIn
(
"label refinement::"
"edgeConsistentUnrefinement"
"(boolList& cellsToUnrefine)"
) << "Cell not marked for unrefinement, indicating a"
<< " previous unnoticed problem with unrefinement."
<< nl
<< "cellI: " << cellI << ", cellJ: " << cellJ
<< nl
<< "Level of cellI: " << cellILevel
<< ", level of cellJ: " << cellJLevel << nl
<< "This is probably because the refinement and "
<< "unrefinement regions are very close." << nl
<< "Try increasing nUnrefinementBufferLayers. "
<< abort(FatalError);
if (debug)
{
WarningIn
(
"label refinement::"
"edgeConsistentUnrefinement"
"(boolList& cellsToUnrefine)"
) << "Cell not marked for unrefinement, indicating a"
<< " previous unnoticed problem with unrefinement."
<< nl
<< "cellI: " << cellI << ", cellJ: " << cellJ
<< nl
<< "Level of cellI: " << cellILevel
<< ", level of cellJ: " << cellJLevel << nl
<< "This is probably because the refinement and "
<< "unrefinement regions are very close." << nl
<< "Try increasing nUnrefinementBufferLayers. "
<< endl;
}
}
else
{
cellsToUnrefine[cellI] = false;
++nRemCells;
}
cellsToUnrefine[cellI] = false;
++nRemCells;
}
else if (cellJLevel < cellILevel - 1)
{
@ -1044,26 +1049,31 @@ Foam::label Foam::refinement::edgeConsistentUnrefinement
// unrefinement
if (!cellsToUnrefine[cellJ])
{
FatalErrorIn
(
"label refinement::"
"edgeConsistentUnrefinement"
"(boolList& cellsToUnrefine)"
) << "Cell not marked for unrefinement, indicating a"
<< " previous unnoticed problem with unrefinement."
<< nl
<< "cellI: " << cellI << ", cellJ: " << cellJ
<< nl
<< "Level of cellI: " << cellILevel
<< ", level of cellJ: " << cellJLevel << nl
<< "This is probably because the refinement and "
<< "unrefinement regions are very close." << nl
<< "Try increasing nUnrefinementBufferLayers. "
<< abort(FatalError);
if (debug)
{
WarningIn
(
"label refinement::"
"edgeConsistentUnrefinement"
"(boolList& cellsToUnrefine)"
) << "Cell not marked for unrefinement, indicating a"
<< " previous unnoticed problem with unrefinement."
<< nl
<< "cellI: " << cellI << ", cellJ: " << cellJ
<< nl
<< "Level of cellI: " << cellILevel
<< ", level of cellJ: " << cellJLevel << nl
<< "This is probably because the refinement and "
<< "unrefinement regions are very close." << nl
<< "Try increasing nUnrefinementBufferLayers. "
<< endl;
}
}
else
{
cellsToUnrefine[cellJ] = false;
++nRemCells;
}
cellsToUnrefine[cellJ] = false;
++nRemCells;
}
}
}