diff --git a/Geo/GModelIO_GEO.cpp b/Geo/GModelIO_GEO.cpp index 7c39a464e02bde916e4f6a8c1fd7e5c9eb73c30c..a226150bc5afc251bd56305052a6ad8af1775687 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())); }