From 10cb0b37adf7fab1a6a4ad2fab1e8143b2414518 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Mon, 5 Mar 2012 14:14:23 +0000 Subject: [PATCH] BUG: checkMesh: handle 0 size meshes --- .../utilities/mesh/manipulation/checkMesh/printMeshStats.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C b/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C index 2951cab590a..874ebc3fb26 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C +++ b/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C @@ -70,7 +70,8 @@ void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology) Info<< " faces: " << nFaces << nl << " internal faces: " << nIntFaces << nl << " cells: " << nCells << nl - << " faces per cell: " << scalar(nFaces + nIntFaces)/nCells << nl + << " faces per cell: " + << scalar(nFaces + nIntFaces)/max(1, nCells) << nl << " boundary patches: " << mesh.boundaryMesh().size() << nl << " point zones: " << mesh.pointZones().size() << nl << " face zones: " << mesh.faceZones().size() << nl -- GitLab