Skip to content
Snippets Groups Projects
Commit d1f97610 authored by Gaetan Bricteux's avatar Gaetan Bricteux
Browse files

fix physical names

parent 02420be4
No related branches found
No related tags found
No related merge requests found
......@@ -1818,8 +1818,16 @@ GModel *GModel::buildCutGModel(gLevelset *ls, bool cutElem, bool saveTri)
cutGM->_associateEntityWithMeshVertices();
cutGM->_storeVerticesInEntities(vertexMap);
for(int i = 0; i < 4; i++)
for(int i = 0; i < 4; i++){
cutGM->_storePhysicalTagsInEntities(i, physicals[i]);
std::map<int, std::map<int, std::string> >::iterator it = physicals[i].begin();
for(; it != physicals[i].end(); it++){
std::map<int, std::string>::iterator it2 = it->second.begin();
for(; it2 != it->second.end(); it2++)
if(it2->second != "")
cutGM->setPhysicalName(it2->second, i, it2->first);
}
}
Msg::Info("Mesh cutting complete (%g s)", Cpu() - t1);
return cutGM;
......
......@@ -54,11 +54,8 @@ void GModel::_storePhysicalTagsInEntities(int dim,
std::map<int, std::string>::const_iterator it2 = it->second.begin();
for(; it2 != it->second.end(); ++it2){
if(std::find(ge->physicals.begin(), ge->physicals.end(), it2->first) ==
ge->physicals.end()){
ge->physicals.end())
ge->physicals.push_back(it2->first);
if(it2->second != "")
setPhysicalName(it2->second, dim, it2->first);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment