Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/med.git] / src / MEDWrapper / Base / MED_Algorithm.cxx
index 2ecf0ca188b4b58b06a68f987588fe5d47d94d8e..c47acbb1e2c6679f0553876a102cdb65f795f34d 100644 (file)
@@ -1,31 +1,29 @@
-//  
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : 
 //  Author : 
 //  Module : 
 //  $Header$
-
+//
 #include "MED_Algorithm.hxx"
 #include "MED_Wrapper.hxx"
 
@@ -173,7 +171,7 @@ namespace MED
       if(aTimeStampInfoSet.empty()) 
        continue;
       const PTimeStampInfo& aTimeStampInfo = *aTimeStampInfoSet.begin();
-      anEntite2TFieldInfo2TimeStampInfoSet[aTimeStampInfo->GetEntity()].insert(*anIter);
+      anEntite2TFieldInfo2TimeStampInfoSet[ConvertEntity(aTimeStampInfo->GetEntity())].insert(*anIter);
     }
     return anEntite2TFieldInfo2TimeStampInfoSet;
   }
@@ -364,4 +362,18 @@ namespace MED
     for(TInt i=0; i<aNbCells; i++) aFamily2NbCells[theInfo->GetFamNum(i)] += 1;
     return aFamily2NbCells;
   }
+
+  EEntiteMaillage ConvertEntity(const EEntiteMaillage& aEntity){
+    switch( aEntity ){
+      
+    case eNOEUD_ELEMENT:
+    case eMAILLE: return eMAILLE; //eNOEUD_ELEMENT it is eMAILLE
+      
+    case eFACE:
+    case eARETE:
+    case eNOEUD: return aEntity; break;
+    default: return EEntiteMaillage(-1);
+      
+    }
+  }
 }