diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C index 29d1ba59f..7dfd2bf3e 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C @@ -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; } } }