From d0b2a43054c0f1f77ea111baf07ad727b90027e1 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 10 Sep 2006 16:10:34 +0000 Subject: [PATCH] small fix for neg phys --- Geo/gmshModel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Geo/gmshModel.cpp b/Geo/gmshModel.cpp index 7c78a0ddce..d3896fd1e7 100644 --- a/Geo/gmshModel.cpp +++ b/Geo/gmshModel.cpp @@ -1,4 +1,4 @@ -// $Id: gmshModel.cpp,v 1.18 2006-09-10 15:34:12 geuzaine Exp $ +// $Id: gmshModel.cpp,v 1.19 2006-09-10 16:10:34 geuzaine Exp $ // // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // @@ -110,9 +110,10 @@ void gmshModel::import() case MSH_PHYSICAL_SURFACE: ge = faceByTag(abs(num)); break; case MSH_PHYSICAL_VOLUME: ge = regionByTag(abs(num)); break; } - if(ge && std::find(ge->physicals.begin(), ge->physicals.end(), p->Num) == + int pnum = sign(num) * p->Num; + if(ge && std::find(ge->physicals.begin(), ge->physicals.end(), pnum) == ge->physicals.end()) - ge->physicals.push_back(sign(num) * p->Num); + ge->physicals.push_back(pnum); } } -- GitLab