From e4c205229198c178aae9127e5869dcc9ed5d9c14 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sat, 9 Sep 2017 22:34:43 +0100 Subject: [PATCH] ideasUnvToFoam: Added test for no cells (e.g. 2D mesh) Patch contributed by Bruno Santos Resolves patch request https://bugs.openfoam.org/view.php?id=2691 --- .../mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index c1a3512ad..813d683f8 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -226,8 +226,6 @@ void readPoints ( is ) << "Points not in order starting at point " << pointi - //<< " at line " << is.lineNumber() - //<< abort(FatalError); << endl; } @@ -478,6 +476,13 @@ void readCells Info<< "Read " << cellVerts.size() << " cells" << " and " << boundaryFaces.size() << " boundary faces." << endl; + + if (!cellVerts.size()) + { + WarningInFunction + << "There are no cells in the mesh." << endl + << " Note: 2D meshes are not supported."<< endl; + } }