From b5a6f1c0fba7ecd445699b65f3fde613e123ff91 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sat, 17 Aug 2013 09:05:50 +0000 Subject: [PATCH] warn if unknown element type --- Geo/GModelIO_UNV.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Geo/GModelIO_UNV.cpp b/Geo/GModelIO_UNV.cpp index 19e649aa9f..c0b07428ea 100644 --- a/Geo/GModelIO_UNV.cpp +++ b/Geo/GModelIO_UNV.cpp @@ -68,6 +68,16 @@ int GModel::readUNV(const std::string &name) } if(elementary < 0) elementary = getMaxElementaryNumber(-1) + 1; if(physical < 0) physical = 0; + if(!type){ + if(warn[type]++ == 1) + Msg::Warning("No element type: guessing from number of nodes"); + switch(numNodes){ + case 2: type = 11; break; // line + case 3: type = 41; break; // tri + case 4: type = 111; break; // tet + } + } + switch(type){ case 11: case 21: case 22: case 31: case 23: case 24: case 32: -- GitLab