From 6479930e73777e6cbeb9ab2f7f93b18cbeda3df5 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 3 Dec 2006 04:00:58 +0000 Subject: [PATCH] make sure we don't store physical tags multiple times per entity --- Geo/GModelIO_Mesh.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index e8b391b310..b4de3bc8c2 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: GModelIO_Mesh.cpp,v 1.4 2006-11-30 15:14:29 geuzaine Exp $ +// $Id: GModelIO_Mesh.cpp,v 1.5 2006-12-03 04:00:58 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -168,8 +168,11 @@ static void storePhysicalTagsInEntities(GModel *m, int dim, } if(ge){ std::map<int, std::string>::const_iterator it2 = it->second.begin(); - for(; it2 != it->second.end(); ++it2) - ge->physicals.push_back(it2->first); + for(; it2 != it->second.end(); ++it2){ + if(std::find(ge->physicals.begin(), ge->physicals.end(), it2->first) == + ge->physicals.end()) + ge->physicals.push_back(it2->first); + } } } } -- GitLab