refineWallLayer: Improved efficiency of the -inSet option

This commit is contained in:
Henry Weller
2020-01-24 10:52:05 +00:00
parent d7a452ccf2
commit 0876ca78c6

View File

@ -146,11 +146,13 @@ int main(int argc, char *argv[])
<< " cells from cellSet " << cellsToRefine.objectPath()
<< nl << endl;
forAll(mesh.cells(), celli)
const labelList allCutCells(cutCells.toc());
forAll(allCutCells, i)
{
if (!cellsToRefine.found(celli))
if (!cellsToRefine.found(allCutCells[i]))
{
cutCells.erase(celli);
cutCells.erase(allCutCells[i]);
}
}
}