From 4c378cef6b30ba3b9829241b7b4fc7635578cb4d Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 21 Sep 2012 05:50:09 +0000
Subject: [PATCH] MSH3

---
 Geo/GModelIO_MSH.cpp | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/Geo/GModelIO_MSH.cpp b/Geo/GModelIO_MSH.cpp
index 00127caa3b..7323213500 100644
--- a/Geo/GModelIO_MSH.cpp
+++ b/Geo/GModelIO_MSH.cpp
@@ -348,7 +348,20 @@ int GModel::readMSH(const std::string &name)
   else
     _storeVerticesInEntities(_vertexMapCache);
 
-  // FIXME: store physicals in entities
+  // store physicals in entities
+  for(int dim = 0; dim < 4; dim++){
+    for(std::map<int, std::vector<int> >::iterator it = entities[dim].begin();
+        it != entities[dim].end(); it++){
+      GEntity *ge = 0;
+      switch(dim){
+      case 0: ge = getVertexByTag(it->first); break;
+      case 1: ge = getEdgeByTag(it->first); break;
+      case 2: ge = getFaceByTag(it->first); break;
+      case 3: ge = getRegionByTag(it->first); break;
+      }
+      ge->physicals = it->second;
+    }
+  }
 
   fclose(fp);
 
-- 
GitLab