BUG: processorLOD: handle 0 cells. Fixes #2421

This commit is contained in:
mattijs
2022-03-23 10:31:35 +00:00
parent ea2bf0414d
commit 2ee0757364
2 changed files with 5 additions and 3 deletions

View File

@ -124,7 +124,9 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap
// (possibly remote) cells from the tgt mesh such that they
// (together) cover all of the src mesh
const label nGlobalSrcCells = src.globalData().nTotalCells();
const label cellsPerBox = max(1, 0.001*nGlobalSrcCells);
// Note: minimum content has to be > 1 since otherwise
// would keep on splitting. 16 is fairly random choice.
const label cellsPerBox = max(16, 0.001*nGlobalSrcCells);
typename processorLODs::cellBox boxLOD
(
src.cells(),