ENH: checkMesh: zero cell meshes

This commit is contained in:
mattijs
2011-10-17 18:27:47 +01:00
parent 6ef1fc7865
commit d25d4d28ce

View File

@ -36,7 +36,7 @@ Foam::label Foam::checkTopology
label nTotCells = returnReduce(mesh.cells().size(), sumOp<label>()); label nTotCells = returnReduce(mesh.cells().size(), sumOp<label>());
// These are actually warnings, not errors. // These are actually warnings, not errors.
if (nEmpty % nTotCells) if (nTotCells && (nEmpty % nTotCells))
{ {
Info<< " ***Total number of faces on empty patches" Info<< " ***Total number of faces on empty patches"
<< " is not divisible by the number of cells in the mesh." << " is not divisible by the number of cells in the mesh."
@ -255,7 +255,7 @@ Foam::label Foam::checkTopology
{ {
regionSplit rs(mesh); regionSplit rs(mesh);
if (rs.nRegions() == 1) if (rs.nRegions() <= 1)
{ {
Info<< " Number of regions: " << rs.nRegions() << " (OK)." Info<< " Number of regions: " << rs.nRegions() << " (OK)."
<< endl; << endl;