From 53f37bce5074ff94a0eae508dd2a42994b1830fe Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 31 Jan 2013 17:27:52 +0000
Subject: [PATCH] favor new names

---
 Geo/GModelIO_GEO.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Geo/GModelIO_GEO.cpp b/Geo/GModelIO_GEO.cpp
index 7c39a464e0..a226150bc5 100644
--- a/Geo/GModelIO_GEO.cpp
+++ b/Geo/GModelIO_GEO.cpp
@@ -370,13 +370,13 @@ class writePhysicalGroupGEO {
   {
     std::string oldName, newName;
     if(printLabels){
-      if(oldLabels.count(g.first)) {
+      if(newLabels.count(std::pair<int, int>(dim, g.first))) {
+        newName = newLabels[std::pair<int, int>(dim, g.first)];
+      }
+      else if(oldLabels.count(g.first)) {
         oldName = oldLabels[g.first];
         fprintf(geo, "%s = %d;\n", oldName.c_str(), g.first);
       }
-      else if(newLabels.count(std::pair<int, int>(dim, g.first))) {
-        newName = newLabels[std::pair<int, int>(dim, g.first)];
-      }
     }
 
     switch (dim) {
@@ -446,7 +446,7 @@ int GModel::writeGEO(const std::string &name, bool printLabels, bool onlyPhysica
     double val = (*it)->prescribedMeshSizeAtVertex();
     if(meshSizeParameters.find(val) == meshSizeParameters.end()){
       std::ostringstream paramName;
-      paramName << "cl" << ++cpt;
+      paramName << "cl__" << ++cpt;
       fprintf(fp, "%s = %.16g;\n", paramName.str().c_str(),val);
       meshSizeParameters.insert(std::make_pair(val, paramName.str()));
     }
-- 
GitLab