]> SALOME platform Git repositories - modules/visu.git/blobdiff - src/CONVERTOR/VISU_MedConvertor.cxx
Salome HOME
Merge from PortingMED3 07Apr11
[modules/visu.git] / src / CONVERTOR / VISU_MedConvertor.cxx
index 467a4957a8b3704fc96b64eaf0ab70fbb7a30a39..8ee84ca66cb9c60100d6e4957264e4f4594d18f9 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  VISU OBJECT : interactive object for VISU entities implementation
 //  File   : VISU_MedConvertor.cxx
 //  Author : Alexey PETROV
 
 #include <vtkCellType.h>
 
+#ifdef WNT
+#include <float.h>
+#define isnan _isnan
+#endif
+
 using MED::TInt;
 using MED::TFloat;
 using MED::EBooleen;
@@ -181,11 +187,11 @@ namespace
   //---------------------------------------------------------------
   VISU::PMEDSubProfile
   CrSubProfile(const MED::PWrapper& theMEDWrapper,
-              const MED::PMeshInfo& theMeshInfo,
-              MED::EEntiteMaillage theMEntity,
-              MED::EGeometrieElement theMGeom,
-              const MED::TGeom2Size& theGeom2Size,
-              const MED::TGeom2Profile& theGeom2Profile)
+               const MED::PMeshInfo& theMeshInfo,
+               MED::EEntiteMaillage theMEntity,
+               MED::EGeometrieElement theMGeom,
+               const MED::TGeom2Size& theGeom2Size,
+               const MED::TGeom2Profile& theGeom2Profile)
   {
     VISU::EGeometry aEGeom = MEDGeom2VISU(theMGeom);
     vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
@@ -201,87 +207,87 @@ namespace
     else{
       MED::TGeom2Profile::const_iterator aProfileIter = theGeom2Profile.find(theMGeom);
       if(aProfileIter != theGeom2Profile.end()){
-       MED::PProfileInfo aProfileInfo = aProfileIter->second;
-
-       aSubProfile->myName = aProfileInfo->GetName();
-       aSubProfile->myStatus = VISU::eAddPart;
-
-       const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
-       TInt aNbElem = anElemNum.size();
-       aSubProfile->myNbCells = aNbElem;
-       switch(theMGeom){
-       case MED::ePOLYGONE: {
-         MED::PPolygoneInfo aPolygoneInfo = 
-           theMEDWrapper->GetPPolygoneInfo(theMeshInfo,theMEntity,theMGeom);
-         for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
-           TInt aNbConn = aPolygoneInfo->GetNbConn( anElemNum[ anElemId ] - 1 );
-           aSubProfile->myCellsSize += aNbConn;
-         }
-         break;
-       }
-       case MED::ePOLYEDRE: {
-         MED::PPolyedreInfo aPolyedreInfo = 
-           theMEDWrapper->GetPPolyedreInfo(theMeshInfo,theMEntity,theMGeom);
-         for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
-           MED::TCConnSliceArr aConnSliceArr = 
-             aPolyedreInfo->GetConnSliceArr( anElemNum[ anElemId ] - 1 );
-           TInt aNbFaces = aConnSliceArr.size();
-           TInt aCellSize = 0;
-           for(TInt iFace = 0; iFace < aNbFaces; iFace++){
-             MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
-             TInt aNbConn = aConnSlice.size();
-             aCellSize += aNbConn;
-           }
-           aSubProfile->myCellsSize += aCellSize;
-         }
-         break;
-       }
-       default: {
-         aSubProfile->myCellsSize = aSubProfile->myNbCells*aVNbNodes;
-       }}
+        MED::PProfileInfo aProfileInfo = aProfileIter->second;
+
+        aSubProfile->myName = aProfileInfo->GetName();
+        aSubProfile->myStatus = VISU::eAddPart;
+
+        const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
+        TInt aNbElem = anElemNum.size();
+        aSubProfile->myNbCells = aNbElem;
+        switch(theMGeom){
+        case MED::ePOLYGONE: {
+          MED::PPolygoneInfo aPolygoneInfo = 
+            theMEDWrapper->GetPPolygoneInfo(theMeshInfo,theMEntity,theMGeom);
+          for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
+            TInt aNbConn = aPolygoneInfo->GetNbConn( anElemNum[ anElemId ] - 1 );
+            aSubProfile->myCellsSize += aNbConn;
+          }
+          break;
+        }
+        case MED::ePOLYEDRE: {
+          MED::PPolyedreInfo aPolyedreInfo = 
+            theMEDWrapper->GetPPolyedreInfo(theMeshInfo,theMEntity,theMGeom);
+          for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
+            MED::TCConnSliceArr aConnSliceArr = 
+              aPolyedreInfo->GetConnSliceArr( anElemNum[ anElemId ] - 1 );
+            TInt aNbFaces = aConnSliceArr.size();
+            TInt aCellSize = 0;
+            for(TInt iFace = 0; iFace < aNbFaces; iFace++){
+              MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
+              TInt aNbConn = aConnSlice.size();
+              aCellSize += aNbConn;
+            }
+            aSubProfile->myCellsSize += aCellSize;
+          }
+          break;
+        }
+        default: {
+          aSubProfile->myCellsSize = aSubProfile->myNbCells*aVNbNodes;
+        }}
       }else{
-       TInt aNbElem = aTimeStampIter->second;
-       aSubProfile->myNbCells = aNbElem;
-       switch(theMGeom){
-       case MED::ePOLYGONE: {
-         MED::PPolygoneInfo aPolygoneInfo = 
-           theMEDWrapper->GetPPolygoneInfo(theMeshInfo,theMEntity,theMGeom);
-         for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
-           TInt aNbConn = aPolygoneInfo->GetNbConn(anElemId);
-           aSubProfile->myCellsSize += aNbConn;
-         }
-         break;
-       }
-       case MED::ePOLYEDRE: {
-         MED::PPolyedreInfo aPolyedreInfo = 
-           theMEDWrapper->GetPPolyedreInfo(theMeshInfo,theMEntity,theMGeom);
-         for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
-           MED::TCConnSliceArr aConnSliceArr = 
-             aPolyedreInfo->GetConnSliceArr(anElemId);
-           TInt aNbFaces = aConnSliceArr.size();
-           TInt aCellSize = 0;
-           for(TInt iFace = 0; iFace < aNbFaces; iFace++){
-             MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
-             TInt aNbConn = aConnSlice.size();
-             aCellSize += aNbConn;
-           }
-           aSubProfile->myCellsSize += aCellSize;
-         }
-         break;
-       }
-       default: {
-         aSubProfile->myCellsSize = aSubProfile->myNbCells*aVNbNodes;
-       }}
+        TInt aNbElem = aTimeStampIter->second;
+        aSubProfile->myNbCells = aNbElem;
+        switch(theMGeom){
+        case MED::ePOLYGONE: {
+          MED::PPolygoneInfo aPolygoneInfo = 
+            theMEDWrapper->GetPPolygoneInfo(theMeshInfo,theMEntity,theMGeom);
+          for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
+            TInt aNbConn = aPolygoneInfo->GetNbConn(anElemId);
+            aSubProfile->myCellsSize += aNbConn;
+          }
+          break;
+        }
+        case MED::ePOLYEDRE: {
+          MED::PPolyedreInfo aPolyedreInfo = 
+            theMEDWrapper->GetPPolyedreInfo(theMeshInfo,theMEntity,theMGeom);
+          for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
+            MED::TCConnSliceArr aConnSliceArr = 
+              aPolyedreInfo->GetConnSliceArr(anElemId);
+            TInt aNbFaces = aConnSliceArr.size();
+            TInt aCellSize = 0;
+            for(TInt iFace = 0; iFace < aNbFaces; iFace++){
+              MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
+              TInt aNbConn = aConnSlice.size();
+              aCellSize += aNbConn;
+            }
+            aSubProfile->myCellsSize += aCellSize;
+          }
+          break;
+        }
+        default: {
+          aSubProfile->myCellsSize = aSubProfile->myNbCells*aVNbNodes;
+        }}
       }
     }
     INITMSG(MYDEBUG,
-           "- aMGeom = "<<theMGeom<<
-           "; aEGeom = "<<aEGeom<<
-           "; aName = '"<<aSubProfile->myName<<"'"<<
-           "; aStatus = "<<aSubProfile->myStatus<<
-           "; aNbCells = "<<aSubProfile->myNbCells<<
-           "; aCellsSize = "<<aSubProfile->myCellsSize<<
-           endl);
+            "- aMGeom = "<<theMGeom<<
+            "; aEGeom = "<<aEGeom<<
+            "; aName = '"<<aSubProfile->myName<<"'"<<
+            "; aStatus = "<<aSubProfile->myStatus<<
+            "; aNbCells = "<<aSubProfile->myNbCells<<
+            "; aCellsSize = "<<aSubProfile->myCellsSize<<
+            endl);
     
     return aSubProfile;
   }
@@ -290,11 +296,11 @@ namespace
   //---------------------------------------------------------------
   VISU::TProfileKey
   GetProfileKey(const MED::PWrapper& theMEDWrapper,
-               const MED::PMeshInfo& theMeshInfo,
-               const MED::PTimeStampValueBase& theTimeStampValue,
-               const VISU::TMEDMeshOnEntity& theMeshOnEntity,
-               MED::EEntiteMaillage theMEntity,
-               const MED::TGeom2Size& theGeom2Size)
+                const MED::PMeshInfo& theMeshInfo,
+                const MED::PTimeStampValueBase& theTimeStampValue,
+                const VISU::TMEDMeshOnEntity& theMeshOnEntity,
+                MED::EEntiteMaillage theMEntity,
+                const MED::TGeom2Size& theGeom2Size)
   {
     INITMSG(MYDEBUG,"GetProfileKey"<<endl);
     
@@ -306,11 +312,11 @@ namespace
     for(; anIter != aGeom2Size.end(); anIter++){
       MED::EGeometrieElement aMGeom = anIter->first;
       VISU::PSubProfile aSubProfile = CrSubProfile(theMEDWrapper,
-                                                  theMeshInfo,
-                                                  theMEntity,
-                                                  aMGeom,
-                                                  theGeom2Size,
-                                                  aGeom2Profile);
+                                                   theMeshInfo,
+                                                   theMEntity,
+                                                   aMGeom,
+                                                   theGeom2Size,
+                                                   aGeom2Profile);
       aProfileKey.insert(aSubProfile);
     }
     
@@ -321,12 +327,12 @@ namespace
   //---------------------------------------------------------------
   void
   InitProfile(const MED::PWrapper& theMEDWrapper,
-             const MED::PMeshInfo& theMeshInfo,
-             MED::PTimeStampValueBase& theTimeStampValue,
-             VISU::TMEDMeshOnEntity& theMeshOnEntity,
-             MED::EEntiteMaillage theMEntity,
-             const MED::TGeom2Size& theGeom2Size,
-             VISU::TMEDValForTime& theValForTime)
+              const MED::PMeshInfo& theMeshInfo,
+              MED::PTimeStampValueBase& theTimeStampValue,
+              VISU::TMEDMeshOnEntity& theMeshOnEntity,
+              MED::EEntiteMaillage theMEntity,
+              const MED::TGeom2Size& theGeom2Size,
+              VISU::TMEDValForTime& theValForTime)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"InitProfile");
     INITMSG(MYDEBUG,"InitProfile"<<endl);
@@ -334,11 +340,11 @@ namespace
     VISU::TProfileMap& aProfileMap = theMeshOnEntity.myProfileMap;
     
     VISU::TProfileKey aProfileKey = GetProfileKey(theMEDWrapper,
-                                           theMeshInfo,
-                                           theTimeStampValue,
-                                           theMeshOnEntity,
-                                           theMEntity,
-                                           theGeom2Size);
+                                            theMeshInfo,
+                                            theTimeStampValue,
+                                            theMeshOnEntity,
+                                            theMEntity,
+                                            theGeom2Size);
     
     VISU::TProfileMap::const_iterator anIter = aProfileMap.find(aProfileKey);
     if(anIter != aProfileMap.end()){
@@ -350,13 +356,13 @@ namespace
       
       VISU::TProfileKey::const_iterator anIter = aProfileKey.begin();
       for(; anIter != aProfileKey.end(); anIter++){
-       VISU::PMEDSubProfile aSubProfile(*anIter);
+        VISU::PMEDSubProfile aSubProfile(*anIter);
 
-       if(aProfile->myIsAll && aSubProfile->myStatus != VISU::eAddAll)
-         aProfile->myIsAll = false;
+        if(aProfile->myIsAll && aSubProfile->myStatus != VISU::eAddAll)
+          aProfile->myIsAll = false;
 
-       VISU::EGeometry aEGeom = aSubProfile->myGeom;
-       aGeom2SubProfile[aEGeom] = aSubProfile;
+        VISU::EGeometry aEGeom = aSubProfile->myGeom;
+        aGeom2SubProfile[aEGeom] = aSubProfile;
       }
 
       aProfileMap[aProfileKey] = aProfile;
@@ -368,9 +374,9 @@ namespace
   //---------------------------------------------------------------
   VISU::TGaussKey
   GetGaussKey(const MED::PTimeStampValueBase& theTimeStampValue,
-             const VISU::TMEDMeshOnEntity& theMeshOnEntity,
-             const MED::TGeom2Size& theGeom2Size,
-             VISU::TMEDValForTime& theValForTime)
+              const VISU::TMEDMeshOnEntity& theMeshOnEntity,
+              const MED::TGeom2Size& theGeom2Size,
+              VISU::TMEDValForTime& theValForTime)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"GetGaussKey");
     INITMSG(MYDEBUG,"GetGaussKey"<<endl);
@@ -390,51 +396,51 @@ namespace
 
       VISU::TGeom2SubProfile::iterator anIter2 = aGeom2SubProfile.find(aEGeom);
       if(anIter2 == aGeom2SubProfile.end()){
-       INITMSG(MYDEBUG,"anIter2 == aGeom2SubProfile.end!!"<<endl);
-       continue;
+        INITMSG(MYDEBUG,"anIter2 == aGeom2SubProfile.end!!"<<endl);
+        continue;
       }
       VISU::PMEDSubProfile aSubProfile = anIter2->second;
 
       MED::TGeom2Size::const_iterator aTimeStampIter = theGeom2Size.find(aMGeom);
       if(aTimeStampIter != theGeom2Size.end()){
-       TInt aNbCells = aTimeStampIter->second;
-       if(aSubProfile->myStatus == VISU::eAddPart)
-         aNbCells = aSubProfile->myNbCells;
-
-       VISU::PMEDGaussSubMesh aGaussSubMesh(new VISU::TMEDGaussSubMesh());
-       aGaussSubMesh->mySubProfile = aSubProfile;
-       aGaussSubMesh->myStatus = aSubProfile->myStatus;
-         
-       VISU::PMEDGauss aGauss(new VISU::TMEDGauss());
-       aGaussSubMesh->myGauss = aGauss;
-       aGauss->myGeom = aEGeom;
-       aGauss->myNbPoints = 1;
-
-       MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
-       if(aGaussIter != aGeom2Gauss.end()){
-         MED::PGaussInfo aGaussInfo = aGaussIter->second;
-         aGauss->myGaussInfo = aGaussInfo;
-         aGauss->myName = aGaussInfo->GetName();
-         aGauss->myNbPoints = aGaussInfo->GetNbGauss();
-       } else if ( aTimeStampInfo.GetNbGauss(aMGeom) > 1 )
-         EXCEPTION( std::runtime_error, "aGaussIter == aGeom2Gauss.end()"
-                    " && aTimeStampInfo.GetNbGauss(aMGeom) > 1 !!!" );
-       
-       aGaussSubMesh->myNbCells = aNbCells*aGauss->myNbPoints;
-       aGaussSubMesh->myCellsSize = aGaussSubMesh->myNbCells*2;
-
-       aGaussKey.insert(aGaussSubMesh);
-
-       INITMSGA(MYDEBUG,0,
-                "- aEGeom = "<<aGauss->myGeom<<
-                "; aName = '"<<aGauss->myName<<"'"<<
-                "; aNbGauss = "<<aGauss->myNbPoints<<
-                "; aStatus = "<<aGaussSubMesh->myStatus<<
-                "; aNbCells = "<<aGaussSubMesh->myNbCells<<
-                "; aCellsSize = "<<aGaussSubMesh->myCellsSize<<
-                endl);
-
-       //break;
+        TInt aNbCells = aTimeStampIter->second;
+        if(aSubProfile->myStatus == VISU::eAddPart)
+          aNbCells = aSubProfile->myNbCells;
+
+        VISU::PMEDGaussSubMesh aGaussSubMesh(new VISU::TMEDGaussSubMesh());
+        aGaussSubMesh->mySubProfile = aSubProfile;
+        aGaussSubMesh->myStatus = aSubProfile->myStatus;
+          
+        VISU::PMEDGauss aGauss(new VISU::TMEDGauss());
+        aGaussSubMesh->myGauss = aGauss;
+        aGauss->myGeom = aEGeom;
+        aGauss->myNbPoints = 1;
+
+        MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
+        if(aGaussIter != aGeom2Gauss.end()){
+          MED::PGaussInfo aGaussInfo = aGaussIter->second;
+          aGauss->myGaussInfo = aGaussInfo;
+          aGauss->myName = aGaussInfo->GetName();
+          aGauss->myNbPoints = aGaussInfo->GetNbGauss();
+        } else if ( aTimeStampInfo.GetNbGauss(aMGeom) > 1 )
+          EXCEPTION( std::runtime_error, "aGaussIter == aGeom2Gauss.end()"
+                     " && aTimeStampInfo.GetNbGauss(aMGeom) > 1 !!!" );
+        
+        aGaussSubMesh->myNbCells = aNbCells*aGauss->myNbPoints;
+        aGaussSubMesh->myCellsSize = aGaussSubMesh->myNbCells*2;
+
+        aGaussKey.insert(aGaussSubMesh);
+
+        INITMSGA(MYDEBUG,0,
+                 "- aEGeom = "<<aGauss->myGeom<<
+                 "; aName = '"<<aGauss->myName<<"'"<<
+                 "; aNbGauss = "<<aGauss->myNbPoints<<
+                 "; aStatus = "<<aGaussSubMesh->myStatus<<
+                 "; aNbCells = "<<aGaussSubMesh->myNbCells<<
+                 "; aCellsSize = "<<aGaussSubMesh->myCellsSize<<
+                 endl);
+
+        //break;
       }
     }
 
@@ -445,9 +451,9 @@ namespace
   //---------------------------------------------------------------
   void
   InitGaussMesh(MED::PTimeStampValueBase& theTimeStampValue,
-               VISU::TMEDMeshOnEntity& theMeshOnEntity,
-               const MED::TGeom2Size& theGeom2Size,
-               VISU::TMEDValForTime& theValForTime)
+                VISU::TMEDMeshOnEntity& theMeshOnEntity,
+                const MED::TGeom2Size& theGeom2Size,
+                VISU::TMEDValForTime& theValForTime)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"InitGaussMesh");
     INITMSG(MYDEBUG,"InitGaussMesh"<<endl);
@@ -458,9 +464,9 @@ namespace
     VISU::TGaussMeshMap& aGaussMeshMap = theMeshOnEntity.myGaussMeshMap;
     
     VISU::TGaussKey aGaussKey = GetGaussKey(theTimeStampValue,
-                                           theMeshOnEntity,
-                                           theGeom2Size,
-                                           theValForTime);
+                                            theMeshOnEntity,
+                                            theGeom2Size,
+                                            theValForTime);
 
     VISU::TGaussMeshMap::const_iterator anIter = aGaussMeshMap.find(aGaussKey);
     if(anIter != aGaussMeshMap.end()){
@@ -470,22 +476,22 @@ namespace
       VISU::PMEDGaussMesh aGaussMesh(new VISU::TMEDGaussMesh());
       VISU::TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
       {
-       VISU::TGaussKey::const_iterator anIter = aGaussKey.begin();
-       for(; anIter != aGaussKey.end(); anIter++){
-         VISU::PMEDGaussSubMesh aGaussSubMesh(*anIter);
-         VISU::PMEDGauss aGauss = aGaussSubMesh->myGauss;
-         VISU::EGeometry aEGeom = aGauss->myGeom;
-         aGeom2GaussSubMesh[aEGeom] = aGaussSubMesh;
-       }
+        VISU::TGaussKey::const_iterator anIter = aGaussKey.begin();
+        for(; anIter != aGaussKey.end(); anIter++){
+          VISU::PMEDGaussSubMesh aGaussSubMesh(*anIter);
+          VISU::PMEDGauss aGauss = aGaussSubMesh->myGauss;
+          VISU::EGeometry aEGeom = aGauss->myGeom;
+          aGeom2GaussSubMesh[aEGeom] = aGaussSubMesh;
+        }
       }
       {
-       VISU::TGaussSubMeshArr& aGaussSubMeshArr = aGaussMesh->myGaussSubMeshArr;
-       aGaussSubMeshArr.resize(aGeom2GaussSubMesh.size());
-       VISU::TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.begin();
-       for(TInt anID = 0; anIter != aGeom2GaussSubMesh.end(); anIter++, anID++){
-         const VISU::PGaussSubMeshImpl& aGaussSubMesh = anIter->second;
-         aGaussSubMeshArr[anID] = aGaussSubMesh;
-       }
+        VISU::TGaussSubMeshArr& aGaussSubMeshArr = aGaussMesh->myGaussSubMeshArr;
+        aGaussSubMeshArr.resize(aGeom2GaussSubMesh.size());
+        VISU::TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.begin();
+        for(TInt anID = 0; anIter != aGeom2GaussSubMesh.end(); anIter++, anID++){
+          const VISU::PGaussSubMeshImpl& aGaussSubMesh = anIter->second;
+          aGaussSubMeshArr[anID] = aGaussSubMesh;
+        }
       }
       INITMSG(MYDEBUG,"aGaussMeshMap[aGaussKey] = aGaussMesh"<<std::endl);
       aGaussMeshMap[aGaussKey] = aGaussMesh;
@@ -496,9 +502,9 @@ namespace
   //---------------------------------------------------------------
   void
   BuildMeshOnEntityMap(VISU::PMEDMesh theMesh,
-                      const MED::TEntityInfo& theEntityInfo,
-                      const MED::PNodeInfo& theNodeInfo,
-                      const MED::PWrapper& theMEDWrapper)
+                       const MED::TEntityInfo& theEntityInfo,
+                       const MED::PNodeInfo& theNodeInfo,
+                       const MED::PWrapper& theMEDWrapper)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMeshOnEntityMap");
     INITMSG(MYDEBUG,"BuildMeshOnEntityMap"<<endl);
@@ -513,7 +519,7 @@ namespace
       
       VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
       VISU::PMEDMeshOnEntity aMeshOnEntity = 
-       aMeshOnEntityMap[aVEntity](new VISU::TMEDMeshOnEntity());
+        aMeshOnEntityMap[aVEntity](new VISU::TMEDMeshOnEntity());
       aMeshOnEntity->myEntity = aVEntity;
       aMeshOnEntity->myMeshName = aMeshName;
       aMeshOnEntity->myGeom2Size = aGeom2Size;
@@ -521,107 +527,107 @@ namespace
       VISU::TGeom2ElemID2FamilyID& aGeom2ElemID2FamilyID = aMeshOnEntity->myGeom2ElemID2FamilyID;
 
       INITMSG(MYDEBUG,
-             "- aMEntity = "<<aMEntity<<
-             "; aVEntity = "<<aVEntity<<
-             endl);
+              "- aMEntity = "<<aMEntity<<
+              "; aVEntity = "<<aVEntity<<
+              endl);
       
       if(aMEntity == MED::eNOEUD){
-       aMeshOnEntity->myNbCells = theMesh->myNbPoints;
-       aMeshOnEntity->myCellsSize = 2*theMesh->myNbPoints;
-       
-       VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[MED::ePOINT1];
-
-       for(TInt iElem = 0; iElem < theMesh->myNbPoints; iElem++){
-         TInt aFamId = theNodeInfo->GetFamNum(iElem);
-         if(aFamId != 0)
-           aFamilyID2CellsSize[aFamId] += 2;
-         anElemID2FamilyID[iElem] = aFamId;
-       }
-       
-       INITMSG(MYDEBUG,
-               "- myNbCells = "<<aMeshOnEntity->myNbCells<<
-               "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
-               std::endl);
-       
+        aMeshOnEntity->myNbCells = theMesh->myNbPoints;
+        aMeshOnEntity->myCellsSize = 2*theMesh->myNbPoints;
+        
+        VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[MED::ePOINT1];
+
+        for(TInt iElem = 0; iElem < theMesh->myNbPoints; iElem++){
+          TInt aFamId = theNodeInfo->GetFamNum(iElem);
+          if(aFamId != 0)
+            aFamilyID2CellsSize[aFamId] += 2;
+          anElemID2FamilyID[iElem] = aFamId;
+        }
+        
+        INITMSG(MYDEBUG,
+                "- myNbCells = "<<aMeshOnEntity->myNbCells<<
+                "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
+                std::endl);
+        
       }else{
-       MED::TGeom2Size::const_iterator aGeom2SizeIter = aGeom2Size.begin();
-       aMeshOnEntity->myNbCells = 0;
-       aMeshOnEntity->myCellsSize = 0;
-       for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
-         const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
-         
-         VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[aMGeom];
-         switch(aMGeom){
-         case MED::ePOLYGONE: {
-           MED::PPolygoneInfo aPolygoneInfo = theMEDWrapper->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
-           TInt aNbElem = aPolygoneInfo->GetNbElem();
-           
-           INITMSG(MYDEBUG,
-                   "- aMGeom = "<<aMGeom<<
-                   "; aNbElem = "<<aNbElem<<
-                   endl);
-           
-           aMeshOnEntity->myNbCells += aNbElem;      
-           for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
-             TInt aNbConn = aPolygoneInfo->GetNbConn(anElemId);
-             aMeshOnEntity->myCellsSize += aNbConn;
-             TInt aFamId = aPolygoneInfo->GetFamNum(anElemId);
-             if(aFamId != 0)
-               aFamilyID2CellsSize[aFamId] += aNbConn + 1;
-             anElemID2FamilyID[anElemId] = aFamId;
-           }
-           break;
-         }
-         case MED::ePOLYEDRE: {
-           MED::PPolyedreInfo aPolyedreInfo = theMEDWrapper->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
-           TInt aNbElem = aPolyedreInfo->GetNbElem();
-           
-           INITMSG(MYDEBUG,
-                   "- aMGeom = "<<aMGeom<<
-                   "; aNbElem = "<<aNbElem<<
-                   endl);
-           
-           aMeshOnEntity->myNbCells += aNbElem;
-           for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
-             MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(anElemId);
-             TInt aNbFaces = aConnSliceArr.size();
-             TInt aCellSize = 0;
-             for(TInt iFace = 0; iFace < aNbFaces; iFace++){
-               MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
-               TInt aNbConn = aConnSlice.size();
-               aCellSize += aNbConn;
-             }
-             aMeshOnEntity->myCellsSize += aCellSize;
-             TInt aFamId = aPolyedreInfo->GetFamNum(anElemId);
-             if(aFamId != 0)
-               aFamilyID2CellsSize[aFamId] += aCellSize + 1;
-             anElemID2FamilyID[anElemId] = aFamId;
-           }
-           break;
-         }
-         default: {
-           VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
-           vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
-           MED::PCellInfo aCellInfo = theMEDWrapper->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
-           TInt aNbElem = aCellInfo->GetNbElem();
-           aMeshOnEntity->myNbCells += aNbElem;
-           aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1);
-           
-           INITMSG(MYDEBUG,
-                   "- aMGeom = "<<aMGeom<<
-                   "; aNbElem = "<<aNbElem<<
-                   "; myNbCells = "<<aMeshOnEntity->myNbCells<<
-                   "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
-                   endl);
-           
-           for(TInt iElem = 0; iElem < aNbElem; iElem++){
-             TInt aFamId = aCellInfo->GetFamNum(iElem);
-             if(aFamId != 0)
-               aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
-             anElemID2FamilyID[iElem] = aFamId;
-           }
-         }} // end switch(...)
-       }
+        MED::TGeom2Size::const_iterator aGeom2SizeIter = aGeom2Size.begin();
+        aMeshOnEntity->myNbCells = 0;
+        aMeshOnEntity->myCellsSize = 0;
+        for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
+          const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
+          
+          VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[aMGeom];
+          switch(aMGeom){
+          case MED::ePOLYGONE: {
+            MED::PPolygoneInfo aPolygoneInfo = theMEDWrapper->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
+            TInt aNbElem = aPolygoneInfo->GetNbElem();
+            
+            INITMSG(MYDEBUG,
+                    "- aMGeom = "<<aMGeom<<
+                    "; aNbElem = "<<aNbElem<<
+                    endl);
+            
+            aMeshOnEntity->myNbCells += aNbElem;      
+            for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
+              TInt aNbConn = aPolygoneInfo->GetNbConn(anElemId);
+              aMeshOnEntity->myCellsSize += aNbConn;
+              TInt aFamId = aPolygoneInfo->GetFamNum(anElemId);
+              if(aFamId != 0)
+                aFamilyID2CellsSize[aFamId] += aNbConn + 1;
+              anElemID2FamilyID[anElemId] = aFamId;
+            }
+            break;
+          }
+          case MED::ePOLYEDRE: {
+            MED::PPolyedreInfo aPolyedreInfo = theMEDWrapper->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
+            TInt aNbElem = aPolyedreInfo->GetNbElem();
+            
+            INITMSG(MYDEBUG,
+                    "- aMGeom = "<<aMGeom<<
+                    "; aNbElem = "<<aNbElem<<
+                    endl);
+            
+            aMeshOnEntity->myNbCells += aNbElem;
+            for(TInt anElemId = 0; anElemId < aNbElem ; anElemId++){
+              MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(anElemId);
+              TInt aNbFaces = aConnSliceArr.size();
+              TInt aCellSize = 0;
+              for(TInt iFace = 0; iFace < aNbFaces; iFace++){
+                MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
+                TInt aNbConn = aConnSlice.size();
+                aCellSize += aNbConn;
+              }
+              aMeshOnEntity->myCellsSize += aCellSize;
+              TInt aFamId = aPolyedreInfo->GetFamNum(anElemId);
+              if(aFamId != 0)
+                aFamilyID2CellsSize[aFamId] += aCellSize + 1;
+              anElemID2FamilyID[anElemId] = aFamId;
+            }
+            break;
+          }
+          default: {
+            VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+            vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
+            MED::PCellInfo aCellInfo = theMEDWrapper->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
+            TInt aNbElem = aCellInfo->GetNbElem();
+            aMeshOnEntity->myNbCells += aNbElem;
+            aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1);
+            
+            INITMSG(MYDEBUG,
+                    "- aMGeom = "<<aMGeom<<
+                    "; aNbElem = "<<aNbElem<<
+                    "; myNbCells = "<<aMeshOnEntity->myNbCells<<
+                    "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
+                    endl);
+            
+            for(TInt iElem = 0; iElem < aNbElem; iElem++){
+              TInt aFamId = aCellInfo->GetFamNum(iElem);
+              if(aFamId != 0)
+                aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
+              anElemID2FamilyID[iElem] = aFamId;
+            }
+          }} // end switch(...)
+        }
       }
     }
   }
@@ -629,9 +635,9 @@ namespace
   //---------------------------------------------------------------
   void
   BuildMeshGrilleOnEntityMap(VISU::PMEDMesh theMesh,
-                            const MED::TEntityInfo& theEntityInfo,
-                            const MED::PGrilleInfo& theGrilleInfo,
-                            const MED::PWrapper& theMEDWrapper)
+                             const MED::TEntityInfo& theEntityInfo,
+                             const MED::PGrilleInfo& theGrilleInfo,
+                             const MED::PWrapper& theMEDWrapper)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMeshGrilleOnEntityMap");
     INITMSG(MYDEBUG,"BuildMeshGrilleOnEntityMap"<<endl);
@@ -644,11 +650,11 @@ namespace
     VISU::TStructuredId& aGrilleStructure = theMesh->myGrilleStructure;
     if ( theGrilleInfo->GetGrilleType() != MED::eGRILLE_STANDARD )
       for ( int aDimId = 0; aDimId < theMesh->myDim; aDimId++ )
-       aGrilleStructure[aDimId] = theGrilleInfo->GetNbIndexes(aDimId);
+        aGrilleStructure[aDimId] = theGrilleInfo->GetNbIndexes(aDimId);
     else {
       MED::TIntVector aVector = theGrilleInfo->GetGrilleStructure();
       for ( int aDimId = 0; aDimId < aVector.size(); aDimId++ )
-       aGrilleStructure[aDimId] = aVector[aDimId];
+        aGrilleStructure[aDimId] = aVector[aDimId];
     }
 
     int kMax = aGrilleStructure[2];
@@ -660,25 +666,25 @@ namespace
     switch ( theMesh->myDim ) {
     case 1:
       for ( int i = 1; i <= iMax; i++ )
-       aObj2StructuredId[i-1][0] = i;
+        aObj2StructuredId[i-1][0] = i;
       break;
     case 2:
       for ( int j = 1; j <= jMax; j++ )
-       for ( int i = 1; i <= iMax; i++ ) {
-         aObj2StructuredId[iii][0] = i;
-         aObj2StructuredId[iii][1] = j;
-         iii++;
-       }
+        for ( int i = 1; i <= iMax; i++ ) {
+          aObj2StructuredId[iii][0] = i;
+          aObj2StructuredId[iii][1] = j;
+          iii++;
+        }
       break;
     case 3:
       for ( int k = 1; k <= kMax; k++ )
-       for ( int j = 1; j <= jMax; j++ )
-         for ( int i = 1; i <= iMax; i++ ) {
-           aObj2StructuredId[iii][0] = i;
-           aObj2StructuredId[iii][1] = j;
-           aObj2StructuredId[iii][2] = k;
-           iii++;
-         }
+        for ( int j = 1; j <= jMax; j++ )
+          for ( int i = 1; i <= iMax; i++ ) {
+            aObj2StructuredId[iii][0] = i;
+            aObj2StructuredId[iii][1] = j;
+            aObj2StructuredId[iii][2] = k;
+            iii++;
+          }
     }
     
     for(; anEntityIter != theEntityInfo.end(); anEntityIter++){
@@ -687,7 +693,7 @@ namespace
       
       VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
       VISU::PMEDMeshOnEntity aMeshOnEntity = 
-       aMeshOnEntityMap[aVEntity](new VISU::TMEDMeshOnEntity());
+        aMeshOnEntityMap[aVEntity](new VISU::TMEDMeshOnEntity());
       aMeshOnEntity->myEntity = aVEntity;
       aMeshOnEntity->myMeshName = aMeshName;
       aMeshOnEntity->myGeom2Size = aGeom2Size;
@@ -695,58 +701,60 @@ namespace
       VISU::TGeom2ElemID2FamilyID& aGeom2ElemID2FamilyID = aMeshOnEntity->myGeom2ElemID2FamilyID;
 
       INITMSG(MYDEBUG,
-             "- aMEntity = "<<aMEntity<<
-             "; aVEntity = "<<aVEntity<<
-             endl);
-      
+              "- aMEntity = "<<aMEntity<<
+              "; aVEntity = "<<aVEntity<<
+              endl);
+
       if(aMEntity == MED::eNOEUD){
-       aMeshOnEntity->myNbCells = theGrilleInfo->GetNbNodes();
-       aMeshOnEntity->myCellsSize = 2*theGrilleInfo->GetNbNodes();
-
-       VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[MED::ePOINT1];
-
-       if((theGrilleInfo->myFamNumNode).size() > 0)
-       for(TInt iElem = 0; iElem < theGrilleInfo->GetNbNodes(); iElem++){
-         TInt aFamId = theGrilleInfo->GetFamNumNode(iElem);
-         if(aFamId != 0)
-           aFamilyID2CellsSize[aFamId] += 2;
-         anElemID2FamilyID[iElem] = aFamId;
-       }
-       
-       INITMSG(MYDEBUG,
-               "- myNbCells = "<<aMeshOnEntity->myNbCells<<
-               "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
-               endl);;
-       
+        aMeshOnEntity->myNbCells = theGrilleInfo->GetNbNodes();
+        aMeshOnEntity->myCellsSize = 2*theGrilleInfo->GetNbNodes();
+
+        VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[MED::ePOINT1];
+
+        if((theGrilleInfo->myFamNumNode).size() > 0)
+          for(TInt iElem = 0; iElem < theGrilleInfo->GetNbNodes(); iElem++){
+            TInt aFamId = theGrilleInfo->GetFamNumNode(iElem);
+            if(aFamId != 0)
+              aFamilyID2CellsSize[aFamId] += 2;
+            anElemID2FamilyID[iElem] = aFamId;
+          }
+
+        INITMSG(MYDEBUG,
+                "- myNbCells = "<<aMeshOnEntity->myNbCells<<
+                "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
+                endl);;
+
       } else {
-       MED::TGeom2Size::const_iterator aGeom2SizeIter = aGeom2Size.begin();
-       aMeshOnEntity->myNbCells = 0;
-       aMeshOnEntity->myCellsSize = 0;
-       for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
-         const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
-         VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
-         vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
-         TInt aNbElem = aGeom2SizeIter->second;//theGrilleInfo->GetNbCells();
-         aMeshOnEntity->myNbCells += aNbElem;
-         aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1);
-
-         VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[aMGeom];
-         
-         INITMSG(MYDEBUG,
-                 "- aMGeom = "<<aMGeom<<
-                 "; aNbElem = "<<aNbElem<<
-                 "; myNbCells = "<<aMeshOnEntity->myNbCells<<
-                 "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
-                 endl);
-         
-         if((theGrilleInfo->myFamNum).size() > 0)
-         for(TInt iElem = 0; iElem < aNbElem; iElem++){
-           TInt aFamId = theGrilleInfo->GetFamNum(iElem);
-           if(aFamId != 0)
-             aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
-           anElemID2FamilyID[iElem] = aFamId;
-         }
-       }
+        MED::TGeom2Size::const_iterator aGeom2SizeIter = aGeom2Size.begin();
+        aMeshOnEntity->myNbCells = 0;
+        aMeshOnEntity->myCellsSize = 0;
+        for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
+          const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
+          VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+          vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
+          TInt aNbElem = aGeom2SizeIter->second;//theGrilleInfo->GetNbCells();
+          aMeshOnEntity->myNbCells += aNbElem;
+          aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1);
+
+          VISU::TElemID2FamilyID& anElemID2FamilyID = aGeom2ElemID2FamilyID[aMGeom];
+
+          INITMSG(MYDEBUG,
+                  "- aMGeom = "<<aMGeom<<
+                  "; aNbElem = "<<aNbElem<<
+                  "; myNbCells = "<<aMeshOnEntity->myNbCells<<
+                  "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
+                  endl);
+
+          MED::TElemNum& famNums =
+            (aMEntity == MED::eMAILLE) ? theGrilleInfo->myFamNum : theGrilleInfo->myFamSubNum;
+          if (famNums.size() == aNbElem)
+            for(TInt iElem = 0; iElem < aNbElem; iElem++){
+              TInt aFamId = famNums[iElem];
+              if(aFamId != 0)
+                aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
+              anElemID2FamilyID[iElem] = aFamId;
+            }
+        }
       }
     }
   }
@@ -755,8 +763,8 @@ namespace
   //---------------------------------------------------------------
   void
   BuildFieldMap(VISU::PMEDMesh theMesh,
-               const MED::TEntityInfo& theEntityInfo,
-               MED::PWrapper theMEDWrapper)
+                const MED::TEntityInfo& theEntityInfo,
+                MED::PWrapper theMEDWrapper)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"BuildFieldMap");
     TInt aNbFields = theMEDWrapper->GetNbFields(); 
@@ -769,7 +777,7 @@ namespace
       MED::TErr anError = 0;
       MED::PFieldInfo aFieldInfo = theMEDWrapper->GetPFieldInfo(aMeshInfo, iField, &anError);
       if ( anError < 0 )
-       continue;
+        continue;
 
       TInt aNbComp = aFieldInfo->GetNbComp();
       std::string aFieldName = aFieldInfo->GetName();
@@ -777,19 +785,19 @@ namespace
       MED::TGeom2Size aGeom2Size;
       MED::EEntiteMaillage aMEntity;
       TInt aNbTimeStamps = theMEDWrapper->GetNbTimeStamps(aFieldInfo,
-                                                         theEntityInfo,
-                                                         aMEntity,
-                                                         aGeom2Size);
+                                                          theEntityInfo,
+                                                          aMEntity,
+                                                          aGeom2Size);
       if(aNbTimeStamps < 1)
-       continue;
+        continue;
       
       VISU::TEntity aVEntity = MEDEntityToVTK( aMEntity );
       vtkIdType aDataType = VTK_DOUBLE;
       if ( aFieldInfo->GetType() != MED::eFLOAT64 ) {
 #if defined(HAVE_F77INT64)
-       aDataType = VTK_LONG;
-#else  
-       aDataType = VTK_INT;
+        aDataType = VTK_LONG;
+#else   
+        aDataType = VTK_INT;
 #endif
       }
       VISU::PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[aVEntity];
@@ -804,53 +812,53 @@ namespace
       aField->myIsELNO = ( aMEntity == MED::eNOEUD_ELEMENT );
 
       INITMSG(MYDEBUG,"myName = '"<<aField->myName<<"'"<<
-             "; myId = "<<aField->myId<<
-             "; myEntity = "<<aField->myEntity<<
-             "; myDataSize = "<<aField->myDataSize<<
-             "; myNbComp = "<<aField->myNbComp<<"\n");
+              "; myId = "<<aField->myId<<
+              "; myEntity = "<<aField->myEntity<<
+              "; myDataSize = "<<aField->myDataSize<<
+              "; myNbComp = "<<aField->myNbComp<<"\n");
       
       for(TInt iComp = 0; iComp < aNbComp; iComp++){
-       aField->myCompNames[iComp] = aFieldInfo->GetCompName(iComp);
-       aField->myUnitNames[iComp] = aFieldInfo->GetUnitName(iComp);
+        aField->myCompNames[iComp] = aFieldInfo->GetCompName(iComp);
+        aField->myUnitNames[iComp] = aFieldInfo->GetUnitName(iComp);
       }
       
       for(TInt iTimeStamp = 1; iTimeStamp <= aNbTimeStamps; iTimeStamp++){
-       VISU::TTimerLog aTimerLog(MYDEBUG,"GetPTimeStampInfo");
-
-       MED::TErr anError = 0;
-       MED::PTimeStampInfo aTimeStampInfo = theMEDWrapper->GetPTimeStampInfo(aFieldInfo,
-                                                                             aMEntity,
-                                                                             aGeom2Size,
-                                                                             iTimeStamp,
-                                                                             &anError);
-       if ( anError < 0 )
-         continue;
-
-       TFloat aDt = aTimeStampInfo->GetDt();
-       std::string anUnitDt = aTimeStampInfo->GetUnitDt();
-
-       VISU::TValField& aValField = aField->myValField;
-       VISU::PMEDValForTime aValForTime = aValField[iTimeStamp](new VISU::TMEDValForTime());
-       aValForTime->myId = iTimeStamp;
-       aValForTime->myFieldName = aField->myName;
-       aValForTime->myEntity = aField->myEntity;
-       aValForTime->myMeshName = aField->myMeshName;
-       aValForTime->myTime = VISU::TTime(aDt,anUnitDt);
-       INITMSG(MYDEBUG,"aDt = '"<<aDt<<", "<<anUnitDt<<"'\n");
-       
-       VISU::TGeom2NbGauss& aVGeom2NbGauss = aValForTime->myGeom2NbGauss;
-       const MED::TGeom2NbGauss& aMGeom2NbGauss = aTimeStampInfo->myGeom2NbGauss;
-       MED::TGeom2NbGauss::const_iterator anIter = aMGeom2NbGauss.begin();
-       for(; anIter != aMGeom2NbGauss.end(); anIter++){
-         const MED::EGeometrieElement& aMGeom = anIter->first;
-         VISU::EGeometry aEGeom = MEDGeom2VISU( aMGeom );
-         TInt aNbGauss = anIter->second;
-         aVGeom2NbGauss[ aEGeom ] = aNbGauss;
-
-         // ELNO data should satisfy the following condition ( implicitly )
-         vtkIdType aNbNodes = MEDGeom2NbNodes( aMGeom );
-         aField->myIsELNO &= ( aNbGauss == aNbNodes );
-       }
+        VISU::TTimerLog aTimerLog(MYDEBUG,"GetPTimeStampInfo");
+
+        MED::TErr anError = 0;
+        MED::PTimeStampInfo aTimeStampInfo = theMEDWrapper->GetPTimeStampInfo(aFieldInfo,
+                                                                              aMEntity,
+                                                                              aGeom2Size,
+                                                                              iTimeStamp,
+                                                                              &anError);
+        if ( anError < 0 )
+          continue;
+
+        TFloat aDt = aTimeStampInfo->GetDt();
+        std::string anUnitDt = aTimeStampInfo->GetUnitDt();
+
+        VISU::TValField& aValField = aField->myValField;
+        VISU::PMEDValForTime aValForTime = aValField[iTimeStamp](new VISU::TMEDValForTime());
+        aValForTime->myId = iTimeStamp;
+        aValForTime->myFieldName = aField->myName;
+        aValForTime->myEntity = aField->myEntity;
+        aValForTime->myMeshName = aField->myMeshName;
+        aValForTime->myTime = VISU::TTime(aDt,anUnitDt);
+        INITMSG(MYDEBUG,"aDt = '"<<aDt<<", "<<anUnitDt<<"'\n");
+        
+        VISU::TGeom2NbGauss& aVGeom2NbGauss = aValForTime->myGeom2NbGauss;
+        const MED::TGeom2NbGauss& aMGeom2NbGauss = aTimeStampInfo->myGeom2NbGauss;
+        MED::TGeom2NbGauss::const_iterator anIter = aMGeom2NbGauss.begin();
+        for(; anIter != aMGeom2NbGauss.end(); anIter++){
+          const MED::EGeometrieElement& aMGeom = anIter->first;
+          VISU::EGeometry aEGeom = MEDGeom2VISU( aMGeom );
+          TInt aNbGauss = anIter->second;
+          aVGeom2NbGauss[ aEGeom ] = aNbGauss;
+
+          // ELNO data should satisfy the following condition ( implicitly )
+          vtkIdType aNbNodes = MEDGeom2NbNodes( aMGeom );
+          aField->myIsELNO &= ( aNbGauss == aNbNodes );
+        }
       }
     }
   }
@@ -859,10 +867,10 @@ namespace
   //---------------------------------------------------------------
   void
   BuildFamilyMap(VISU::PMEDMesh theMesh,
-                const MED::TEntityInfo& theEntityInfo,
-                const MED::TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
-                const MED::TFamilyInfoSet& theFamilyInfoSet,
-                MED::PWrapper theMEDWrapper)
+                 const MED::TEntityInfo& theEntityInfo,
+                 const MED::TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
+                 const MED::TFamilyInfoSet& theFamilyInfoSet,
+                 MED::PWrapper theMEDWrapper)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"BuildFamilyMap");
     INITMSG(MYDEBUG,"BuildFamilyMap\n");
@@ -879,61 +887,61 @@ namespace
       const VISU::TFamilyID2CellsSize& aFamilyID2CellsSize = aMeshOnEntity->myFamilyID2CellsSize;
       VISU::TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
       VISU::TFamilyIDMap& aFamilyIDMap = aMeshOnEntity->myFamilyIDMap;
-       
+        
       if(aFamilyTSizeSet.empty())
-       continue;
-       
+        continue;
+        
       INITMSG(MY_FAMILY_DEBUG,
-             "- aMEntity = "<<aMEntity<<
-             "; aVEntity = "<<aVEntity<<
-             endl);
+              "- aMEntity = "<<aMEntity<<
+              "; aVEntity = "<<aVEntity<<
+              endl);
 
       MED::TFamilyTSizeSet::const_iterator aFamilyTSizeSetIter = aFamilyTSizeSet.begin();
       for(; aFamilyTSizeSetIter != aFamilyTSizeSet.end(); aFamilyTSizeSetIter++){
-       const MED::TFamilyTSize& aFamilyTSize = *aFamilyTSizeSetIter;
-       const MED::PFamilyInfo& aFamilyInfo = boost::get<0>(aFamilyTSize);
-       TInt aSize = boost::get<1>(aFamilyTSize);
-       TInt anId = aFamilyInfo->GetId();
-       if(anId == 0) 
-         continue;
-       
-       std::string aFamilyName = aFamilyInfo->GetName();
-
-       VISU::PMEDFamily aFamily = aFamilyMap[aFamilyName](new VISU::TMEDFamily());
-       aFamily->myId = anId;
-       aFamily->myEntity = aVEntity;
-       aFamily->myName = aFamilyName;
-       aFamily->myNbCells = aSize;
-
-       aFamily->myCellsSize = 0;
-       VISU::TFamilyID2CellsSize::const_iterator anIter = aFamilyID2CellsSize.find(anId);
-       if(anIter != aFamilyID2CellsSize.end())
-         aFamily->myCellsSize = anIter->second;
-
-       const TInt aNbGroup = aFamilyInfo->GetNbGroup();
-       VISU::TNames& aGroupNames = aFamily->myGroupNames;
-       aGroupNames.resize(aNbGroup);
-       for(TInt i = 0; i < aNbGroup; i++){
-         std::string aGroupName = aFamilyInfo->GetGroupName(i);
-         aGroupNames[i] = aGroupName;
-       }
-
-       aFamilyIDMap[anId] = aFamily;
-
-       INITMSG(MY_FAMILY_DEBUG,
-               "- aFamilyName = '"<<aFamilyName<<"'"<<
-               "; myId = "<<aFamily->myId<<"; "<<
-               "; aNbAttr = "<<aFamilyInfo->GetNbAttr()<<
-               "; aNbGroup = "<<aFamilyInfo->GetNbGroup()<<
-               "; aVEntity = "<<aVEntity<<
-               "; myNbCells = "<<aFamily->myNbCells<<
-               "; myCellsSize = "<<aFamily->myCellsSize<<
-               endl);
-#ifdef _DEBUG_ 
-       for(TInt i = 0; i < aNbGroup; i++){
-         std::string aGroupName = aFamilyInfo->GetGroupName(i);
-         INITMSG(MY_FAMILY_DEBUG,"- aGroupName = '"<<aGroupName<<"'\n");
-       }
+        const MED::TFamilyTSize& aFamilyTSize = *aFamilyTSizeSetIter;
+        const MED::PFamilyInfo& aFamilyInfo = boost::get<0>(aFamilyTSize);
+        TInt aSize = boost::get<1>(aFamilyTSize);
+        TInt anId = aFamilyInfo->GetId();
+        if(anId == 0) 
+          continue;
+        
+        std::string aFamilyName = aFamilyInfo->GetName();
+
+        VISU::PMEDFamily aFamily = aFamilyMap[aFamilyName](new VISU::TMEDFamily());
+        aFamily->myId = anId;
+        aFamily->myEntity = aVEntity;
+        aFamily->myName = aFamilyName;
+        aFamily->myNbCells = aSize;
+
+        aFamily->myCellsSize = 0;
+        VISU::TFamilyID2CellsSize::const_iterator anIter = aFamilyID2CellsSize.find(anId);
+        if(anIter != aFamilyID2CellsSize.end())
+          aFamily->myCellsSize = anIter->second;
+
+        const TInt aNbGroup = aFamilyInfo->GetNbGroup();
+        VISU::TNames& aGroupNames = aFamily->myGroupNames;
+        aGroupNames.resize(aNbGroup);
+        for(TInt i = 0; i < aNbGroup; i++){
+          std::string aGroupName = aFamilyInfo->GetGroupName(i);
+          aGroupNames[i] = aGroupName;
+        }
+
+        aFamilyIDMap[anId] = aFamily;
+
+        INITMSG(MY_FAMILY_DEBUG,
+                "- aFamilyName = '"<<aFamilyName<<"'"<<
+                "; myId = "<<aFamily->myId<<"; "<<
+                "; aNbAttr = "<<aFamilyInfo->GetNbAttr()<<
+                "; aNbGroup = "<<aFamilyInfo->GetNbGroup()<<
+                "; aVEntity = "<<aVEntity<<
+                "; myNbCells = "<<aFamily->myNbCells<<
+                "; myCellsSize = "<<aFamily->myCellsSize<<
+                endl);
+#ifdef _DEBUG_  
+        for(TInt i = 0; i < aNbGroup; i++){
+          std::string aGroupName = aFamilyInfo->GetGroupName(i);
+          INITMSG(MY_FAMILY_DEBUG,"- aGroupName = '"<<aGroupName<<"'\n");
+        }
 #endif
 
       }
@@ -946,9 +954,9 @@ namespace
    */
   void
   BuildGrilleFamilyMap(VISU::PMEDMesh theMesh,
-                      const MED::TEntityInfo& theEntityInfo,
-                      const MED::TFamilyInfoSet& theFamilyInfoSet,
-                      MED::PWrapper theMEDWrapper)
+                       const MED::TEntityInfo& theEntityInfo,
+                       const MED::TFamilyInfoSet& theFamilyInfoSet,
+                       MED::PWrapper theMEDWrapper)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"BuildGrilleFamilyMap");
     INITMSG(MYDEBUG,"BuildGrilleFamilyMap\n");
@@ -968,17 +976,17 @@ namespace
       TInt anId = aFamilyInfo->GetId();
 
       if(anId == 0)
-       continue;
+        continue;
 
       std::string aFamilyName = aFamilyInfo->GetName();
       const MED::EEntiteMaillage& aMEntity = MED::GetEntityByFamilyId(aGrilleInfo,
-                                                                     anId);
+                                                                      anId);
       VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
 
       VISU::PMEDMeshOnEntity aMeshOnEntity;
       VISU::TMeshOnEntityMap::iterator aMeshOnEntityIter = aMeshOnEntityMap.find(aVEntity);
       if(aMeshOnEntityIter != aMeshOnEntityMap.end())
-       aMeshOnEntity = aMeshOnEntityIter->second;
+        aMeshOnEntity = aMeshOnEntityIter->second;
 
       VISU::TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
       VISU::TFamilyIDMap& aFamilyIDMap = aMeshOnEntity->myFamilyIDMap;
@@ -993,30 +1001,30 @@ namespace
       const VISU::TFamilyID2CellsSize& aFamilyID2CellsSize = aMeshOnEntity->myFamilyID2CellsSize;
       VISU::TFamilyID2CellsSize::const_iterator aFamilyid2CellsSizeIter = aFamilyID2CellsSize.find(anId);
       if(aFamilyid2CellsSizeIter != (aMeshOnEntity->myFamilyID2CellsSize).end())
-       aFamily->myCellsSize = aFamilyid2CellsSizeIter->second;
+        aFamily->myCellsSize = aFamilyid2CellsSizeIter->second;
       MED::TFamilyID2NbCells::const_iterator aFam2NbCellsIter = aFam2NbCells.find(anId);
       if(aFam2NbCellsIter != aFam2NbCells.end())
-       aFamily->myNbCells = aFam2NbCellsIter->second;
+        aFamily->myNbCells = aFam2NbCellsIter->second;
 
       const TInt aNbGroup = aFamilyInfo->GetNbGroup();
       VISU::TNames& aGroupNames = aFamily->myGroupNames;
       aGroupNames.resize(aNbGroup);
       for(TInt i = 0; i < aNbGroup; i++){
-       std::string aGroupName = aFamilyInfo->GetGroupName(i);
-       aGroupNames[i] = aGroupName;
+        std::string aGroupName = aFamilyInfo->GetGroupName(i);
+        aGroupNames[i] = aGroupName;
       }
 
       aFamilyIDMap[anId] = aFamily;
 
       INITMSG(MY_FAMILY_DEBUG,
-             "- aFamilyName =|"<<aFamily->myName<<"|"
-             << "; myId = "<<aFamily->myId
-             << "; aNbAttr = "<<aFamilyInfo->GetNbAttr()
-             << "; aNbGroup = "<<aFamilyInfo->GetNbGroup()
-             << "; aVEntity = "<<aVEntity
-             << "; myNbCells = "<<aFamily->myNbCells
-             << "; myCellsSize = "<<aFamily->myCellsSize
-             <<endl);
+              "- aFamilyName =|"<<aFamily->myName<<"|"
+              << "; myId = "<<aFamily->myId
+              << "; aNbAttr = "<<aFamilyInfo->GetNbAttr()
+              << "; aNbGroup = "<<aFamilyInfo->GetNbGroup()
+              << "; aVEntity = "<<aVEntity
+              << "; myNbCells = "<<aFamily->myNbCells
+              << "; myCellsSize = "<<aFamily->myCellsSize
+              <<endl);
 
 
     }
@@ -1025,7 +1033,7 @@ namespace
   //---------------------------------------------------------------
   void
   BuildGroupMap(VISU::PMEDMesh theMesh,
-               const MED::TFamilyInfoSet& theFamilyInfoSet)
+                const MED::TFamilyInfoSet& theFamilyInfoSet)
   {
     VISU::TTimerLog aTimerLog(MYDEBUG,"BuildGroupMap");
     INITMSG(MYDEBUG,"BuildGroupMap\n");
@@ -1043,39 +1051,37 @@ namespace
       const MED::TFamilyInfoSet& aFamilyInfoSet = aGroupInfoIter->second;
       MED::TFamilyInfoSet::const_iterator aFamilyIter = aFamilyInfoSet.begin();
       for(; aFamilyIter != aFamilyInfoSet.end(); aFamilyIter++){
-       const MED::PFamilyInfo& aFamilyInfo = *aFamilyIter;
-       std::string aFamilyName = aFamilyInfo->GetName();
-       
-       VISU::TEntity aVEntity = VISU::TEntity(-1);
-       VISU::PMEDFamily aFamily;
-       
-       // Find aVisuEntity
-       const VISU::TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
-       VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityIter = aMeshOnEntityMap.begin();
-       for(; aMeshOnEntityIter != aMeshOnEntityMap.end(); aMeshOnEntityIter++){
-         const VISU::PMeshOnEntity& aMeshOnEntity = aMeshOnEntityIter->second;
-         const VISU::TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
-         VISU::TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
-         for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
-           const std::string& aName = aFamilyMapIter->first;
-           if(aName == aFamilyName){
+        const MED::PFamilyInfo& aFamilyInfo = *aFamilyIter;
+        std::string aFamilyName = aFamilyInfo->GetName();
+        
+        VISU::TEntity aVEntity = VISU::TEntity(-1);
+        VISU::PMEDFamily aFamily;
+        
+        // Find aVisuEntity
+        const VISU::TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
+        VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityIter = aMeshOnEntityMap.begin();
+        for(; aMeshOnEntityIter != aMeshOnEntityMap.end(); aMeshOnEntityIter++){
+          const VISU::PMeshOnEntity& aMeshOnEntity = aMeshOnEntityIter->second;
+          const VISU::TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
+          VISU::TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
+          for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
+            const std::string& aName = aFamilyMapIter->first;
+            if(aName == aFamilyName){
               aFamily = aFamilyMapIter->second;
-             aVEntity = aFamily->myEntity;
-             goto exit_lable;
-           }
-         }
-       } 
-      exit_lable:
-       if(aFamily && aVEntity >= 0){
-         aFamilySet.insert(aFamily);
-         INITMSG(MY_GROUP_DEBUG,
-                 "- aFamilyName = '"<<aFamilyName<<"'"<<
-                 "; aVEntity = "<<aVEntity<<
-                 "\n");
-       }
+              aVEntity = aFamily->myEntity;
+              if(aFamily && aVEntity >= 0){
+                aFamilySet.insert(VISU::TEnity2Family(aVEntity, aFamily));
+                INITMSG(MY_GROUP_DEBUG,
+                        "- aFamilyName = '"<<aFamilyName<<"'"<<
+                        "; aVEntity = "<<aVEntity<<
+                        "\n");
+              }
+            }
+          }
+        } 
       }
       if(!aFamilySet.empty())
-       aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup));
+        aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup));
     }
   }
 
@@ -1105,11 +1111,11 @@ namespace VISU
   void
   TMEDNamedPointCoords
   ::Init(const MED::PNodeInfo& theNodeInfo,
-        MED::EVersion theVersion)
+         MED::EVersion theVersion)
   {
     TMEDCoordHolder* aCoordHolder = new TMEDCoordHolder();
     TInt aNbElem = theNodeInfo->GetNbElem();
-    TInt aDim = theNodeInfo->GetMeshInfo()->GetDim();
+    TInt aDim = theNodeInfo->GetMeshInfo()->GetSpaceDim();
     aCoordHolder->Init(aNbElem, aDim, theNodeInfo->myCoord);
     TNamedPointCoords::Init(PCoordHolder(aCoordHolder));
     myVersion = theVersion;
@@ -1132,7 +1138,7 @@ namespace VISU
   {
     TMEDCoordHolder* aCoordHolder = new TMEDCoordHolder();
     TInt aNbElem = theGrilleInfo->GetNbNodes();
-    TInt aDim = theGrilleInfo->GetMeshInfo()->GetDim();
+    TInt aDim = theGrilleInfo->GetMeshInfo()->GetSpaceDim();
     MED::PNodeCoord aCoord(new MED::TNodeCoord(aNbElem * aDim));
     aCoordHolder->Init(aNbElem, aDim, aCoord);
     TNamedPointCoords::Init(PCoordHolder(aCoordHolder));
@@ -1144,7 +1150,7 @@ namespace VISU
       VISU::TCoordSlice aVCoordSlice = GetCoordSlice(iElem);
       MED::TNodeCoord aMCoord = theGrilleInfo->GetCoord(iElem);
       for(TInt iDim = 0; iDim < aDim; iDim++){
-       aVCoordSlice[iDim] = aMCoord[iDim];
+        aVCoordSlice[iDim] = aMCoord[iDim];
       }
     }
   }
@@ -1166,13 +1172,13 @@ namespace VISU
     if(myIsElemNum){
       // To prepare corresponding mapper engine
       if(myObj2VTKID.empty()){
-       vtkIdType anEnd = myElemNum->size();
-       for(vtkIdType anID = 0; anID < anEnd; anID++)
-         myObj2VTKID[(*myElemNum)[anID]] = anID;
+        vtkIdType anEnd = myElemNum->size();
+        for(vtkIdType anID = 0; anID < anEnd; anID++)
+          myObj2VTKID[(*myElemNum)[anID]] = anID;
       }
       TObj2VTKID::const_iterator anIter = myObj2VTKID.find(theID);
       if(anIter != myObj2VTKID.end())
-       return anIter->second;
+        return anIter->second;
       return -1;
     }
     return TNamedPointCoords::GetVTKID(theID);
@@ -1234,10 +1240,10 @@ namespace VISU
   {
     if ( myIsElemNum )
       for ( size_t anId = 0; anId < (*myElemNum).size(); anId++ ) 
-       if ( (*myElemNum)[ anId ] == theID ) {
-         theID = anId;
-         break;
-       }
+        if ( (*myElemNum)[ anId ] == theID ) {
+          theID = anId;
+          break;
+        }
 
     return TSubProfileImpl::GetElemVTKID( theID );
   }
@@ -1259,14 +1265,14 @@ namespace VISU
   void
   TMEDGauss
   ::LessThan(const PGaussImpl& theGauss,
-            bool& theResult) const
+             bool& theResult) const
   {
     TGaussImpl::LessThan(theGauss,theResult);
     if(myGaussInfo){
       if(PMEDGauss aGauss = theGauss){
-       const MED::TGaussInfo& aLeft = myGaussInfo;
-       const MED::TGaussInfo& aReight = aGauss->myGaussInfo;
-       theResult = MED::TGaussInfo::TLess()(aLeft,aReight);
+        const MED::TGaussInfo& aLeft = myGaussInfo;
+        const MED::TGaussInfo& aReight = aGauss->myGaussInfo;
+        theResult = MED::TGaussInfo::TLess()(aLeft,aReight);
       }
     }
   }
@@ -1329,7 +1335,7 @@ namespace VISU
   void
   TMEDSubMesh
   ::Init(const MED::PElemInfo& theElemInfo,
-        MED::EVersion theVersion)
+         MED::EVersion theVersion)
   {
     myVersion = theVersion;
     myIsElemNum = theElemInfo->IsElemNum();
@@ -1434,7 +1440,7 @@ VISU_MedConvertor
       std::string aMeshName = aMeshInfo->GetName();
       TInt aDim = aMeshInfo->GetDim();
       MED::EMaillage aType = aMeshInfo->GetType();
-       
+        
       // creating TMesh structure and TMeshOnEntityMap         
       VISU::PMEDMesh aMesh = aMeshMap[aMeshName](new VISU::TMEDMesh());
       
@@ -1444,66 +1450,67 @@ VISU_MedConvertor
       aMesh->myNamedPointCoords(new VISU::TMEDNamedPointCoords());
       
       INITMSG(MYDEBUG,"aMeshName = '"<<aMeshName<<
-             "; aDim = "<<aDim<<"\n");
+              "; aDim = "<<aDim<<"\n");
 
       if(aType == MED::eNON_STRUCTURE){
 
-       if(MED::PNodeInfo aNodeInfo = myMed->GetPNodeInfo(aMeshInfo)){
-         MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
+        if(MED::PNodeInfo aNodeInfo = myMed->GetPNodeInfo(aMeshInfo)){
+          MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
 
-         aMesh->myNbPoints = aNodeInfo->GetNbElem();
-         aMesh->myEntityInfo = anEntityInfo;
-       
-       
+          aMesh->myNbPoints = aNodeInfo->GetNbElem();
+          aMesh->myEntityInfo = anEntityInfo;
+        
+        
 #ifndef _DEXCEPT_
-         try{
+          try{
 #endif
-           INITMSG(MYDEBUG,"myNbPoints = "<<aMesh->myNbPoints<<
-                   "; anEntityInfo.size() = "<<anEntityInfo.size()<<
-                   "\n");
-           
-           BuildMeshOnEntityMap(aMesh,
-                                anEntityInfo,
-                                aNodeInfo,
-                                myMed);
-           
+            INITMSG(MYDEBUG,"myNbPoints = "<<aMesh->myNbPoints<<
+                    "; anEntityInfo.size() = "<<anEntityInfo.size()<<
+                    "\n");
+            
+            BuildMeshOnEntityMap(aMesh,
+                                 anEntityInfo,
+                                 aNodeInfo,
+                                 myMed);
+            
 #ifndef _DEXCEPT_
-         }catch(std::exception& exc){
-           MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
-         }catch(...){
-           MSG(MYDEBUG,"Unknown exception !!!");
-         }
+          }catch(std::exception& exc){
+            MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+          }catch(...){
+            MSG(MYDEBUG,"Unknown exception !!!");
+          }
 #endif
-       }
+        }
       } // NON STRUCTURED MESH
       else {
-       MED::PGrilleInfo aGrilleInfo = myMed->GetPGrilleInfo(aMeshInfo);
-
-       MED::TEntityInfo anEntityInfo;
-       anEntityInfo[MED::eNOEUD][MED::ePOINT1] = aGrilleInfo->GetNbNodes();
-       anEntityInfo[aGrilleInfo->GetEntity()][aGrilleInfo->GetGeom()] = aGrilleInfo->GetNbCells();
-       
-       aMesh->myNbPoints   = aGrilleInfo->GetNbNodes();
-       aMesh->myEntityInfo = anEntityInfo;
-
-       aMesh->myIsPolarType = (MED::eGRILLE_POLAIRE == aGrilleInfo->GetGrilleType());
-       aMesh->myIsStructured = true;
+        MED::PGrilleInfo aGrilleInfo = myMed->GetPGrilleInfo(aMeshInfo);
+
+        MED::TEntityInfo anEntityInfo;
+        anEntityInfo[MED::eNOEUD][MED::ePOINT1] = aGrilleInfo->GetNbNodes();
+        anEntityInfo[aGrilleInfo->GetEntity()][aGrilleInfo->GetGeom()] = aGrilleInfo->GetNbCells();
+        anEntityInfo[aGrilleInfo->GetSubEntity()][aGrilleInfo->GetSubGeom()] = aGrilleInfo->GetNbSubCells();
+        
+        aMesh->myNbPoints   = aGrilleInfo->GetNbNodes();
+        aMesh->myEntityInfo = anEntityInfo;
+
+        aMesh->myIsPolarType = (MED::eGRILLE_POLAIRE == aGrilleInfo->GetGrilleType());
+        aMesh->myIsStructured = true;
 #ifndef _DEXCEPT_
-       try{
+        try{
 #endif
-         BEGMSG(MYDEBUG,"anEntityInfo.size() = "<<anEntityInfo.size()<<"\n");
-         
-         BuildMeshGrilleOnEntityMap(aMesh,
-                                    anEntityInfo,
-                                    aGrilleInfo,
-                                    myMed);
-         
+          BEGMSG(MYDEBUG,"anEntityInfo.size() = "<<anEntityInfo.size()<<"\n");
+          
+          BuildMeshGrilleOnEntityMap(aMesh,
+                                     anEntityInfo,
+                                     aGrilleInfo,
+                                     myMed);
+          
 #ifndef _DEXCEPT_
-       }catch(std::exception& exc){
-         MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
-       }catch(...){
-         MSG(MYDEBUG,"Unknown exception !!!");
-       }
+        }catch(std::exception& exc){
+          MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+        }catch(...){
+          MSG(MYDEBUG,"Unknown exception !!!");
+        }
 #endif
 
       }
@@ -1550,23 +1557,23 @@ VISU_MedConvertor
       
       VISU::TMeshMap::const_iterator anIter = aMeshMap.find(aMeshName);
       if(anIter == aMeshMap.end())
-       continue;
+        continue;
       VISU::PMEDMesh aMesh = anIter->second;
 
       INITMSG(MYDEBUG,"aMeshName = '"<<aMeshName<<"'\n");
 #ifndef _DEXCEPT_
       try{
 #endif
-       MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
+        MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
 
-       BuildFieldMap(aMesh,
-                     anEntityInfo,
-                     myMed);
+        BuildFieldMap(aMesh,
+                      anEntityInfo,
+                      myMed);
 #ifndef _DEXCEPT_
       }catch(std::exception& exc){
-       MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+        MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
       }catch(...){
-       MSG(MYDEBUG,"Unknown exception !!!");
+        MSG(MYDEBUG,"Unknown exception !!!");
       }
 #endif
 
@@ -1587,36 +1594,43 @@ VISU_MedConvertor
 template<class TimeStampValueType>
 void
 BuildTimeStampMinMax(MED::SharedPtr<TimeStampValueType> theTimeStampValue,
-                    const VISU::PMEDMeshOnEntity theMeshOnEntity,
-                    const MED::TGeom2Gauss& theGeom2Gauss,
-                    VISU::TMinMaxArr& theMinMaxArr,
-                     VISU::TMinMaxArr& theAverageMinMaxArr,
-                    VISU::TGroup2MinMaxArr& theGroup2MinMaxArr,
-                    VISU::TGroup2MinMaxArr& theGroup2AverageMinMaxArr,
-                    TInt theNbComp,
-                    TInt theNbComp2)
+                     const VISU::PMEDMeshOnEntity theMeshOnEntity,
+                     const MED::TGeom2Gauss& theGeom2Gauss,
+                     VISU::TMetric2Comp2MinMax& theMetric2Comp2MinMax,
+                     VISU::TMetric2Comp2MinMax& theMetric2Comp2AverageMinMax,
+                     VISU::TMetric2Comp2Group2MinMax& theMetric2Comp2Group2MinMax,
+                     VISU::TMetric2Comp2Group2MinMax& theMetric2Comp2Group2AverageMinMax,
+                     TInt theNbComp,
+                     TInt theNbComp2)
 {
   const VISU::TFamilyIDMap& aFamilyIDMap = theMeshOnEntity->myFamilyIDMap;
   VISU::TGeom2ElemID2FamilyID aGeom2ElemID2FamilyID = theMeshOnEntity->myGeom2ElemID2FamilyID;
 
+  VISU::TVector<double> aBaseAverageValues;
+  aBaseAverageValues.resize(3);
+  aBaseAverageValues[VISU::AVERAGE_METRIC] = 0.0;
+  aBaseAverageValues[VISU::MINIMUM_METRIC] = VTK_LARGE_FLOAT;
+  aBaseAverageValues[VISU::MAXIMUM_METRIC] = -VTK_LARGE_FLOAT;
+
   const typename TimeStampValueType::TTGeom2Value& aGeom2Value = theTimeStampValue->myGeom2Value;
   typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin();
   for(; anIter != aGeom2Value.end(); anIter++){
     const typename TimeStampValueType::TTMeshValue& aMMeshValue = anIter->second;
     MED::EGeometrieElement aMGeom = anIter->first;
-                 
+                  
     TInt aNbElem = aMMeshValue.myNbElem;
     TInt aNbGauss = aMMeshValue.myNbGauss;
-                 
-    MED::TGeom2Gauss::const_iterator aGaussIter = theGeom2Gauss.find(aMGeom);
-    if(aGaussIter == theGeom2Gauss.end())
-      aNbGauss = 1;
-                 
+                  
+// AKL: fix of 0021175 issue. Non-regression test is GVIEW10561(import zzzz121b.med).
+//     MED::TGeom2Gauss::const_iterator aGaussIter = theGeom2Gauss.find(aMGeom);
+//     if(aGaussIter == theGeom2Gauss.end())
+//       aNbGauss = 1;
+                  
     INITMSG(MYDEBUG,
-           "- aMGeom = "<<aMGeom<<
-           "; aNbElem = "<<aNbElem<<
-           "; aNbGauss = "<<aNbGauss<<
-           endl);
+            "- aMGeom = "<<aMGeom<<
+            "; aNbElem = "<<aNbElem<<
+            "; aNbGauss = "<<aNbGauss<<
+            endl);
 
     VISU::TElemID2FamilyID anElemID2FamilyID = aGeom2ElemID2FamilyID[aMGeom];
     
@@ -1624,186 +1638,218 @@ BuildTimeStampMinMax(MED::SharedPtr<TimeStampValueType> theTimeStampValue,
     // To calculate min/max per components
     for(TInt iElem = 0; iElem < aNbElem; iElem++){
       typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetCompValueSliceArr(iElem);
-      for(TInt iComp = 0; iComp < theNbComp; iComp++){
-       const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iComp];
-       VISU::TMinMax& aMinMax = theMinMaxArr[iComp+1];
-       vtkFloatingPointType& aMin = aMinMax.first;
-       vtkFloatingPointType& aMax = aMinMax.second;
-        VISU::TMinMax& anAverageMinMax = theAverageMinMaxArr[iComp+1];
-        vtkFloatingPointType& anAverageMin = anAverageMinMax.first;
-       vtkFloatingPointType& anAverageMax = anAverageMinMax.second;
-        vtkFloatingPointType anAverageValue = 0.0;
-
-       VISU::TGroup2MinMax& aGroup2MinMax = theGroup2MinMaxArr[iComp+1];
-       VISU::TGroup2MinMax& aGroup2AverageMinMax = theGroup2AverageMinMaxArr[iComp+1];
-       std::map<VISU::TName,vtkFloatingPointType> aGroup2AverageValue;
-
-       // get names of groups, to which the element belongs
-       VISU::TNames aGroupNames;
-       VISU::TElemID2FamilyID::const_iterator anIter = anElemID2FamilyID.find(iElem);
-       if(anIter != anElemID2FamilyID.end()){
-         int aFamilyId = anIter->second;
-         if(aFamilyId != 0){
-           VISU::TFamilyIDMap::const_iterator aFamilyIter = aFamilyIDMap.find(aFamilyId);
-           if(aFamilyIter != aFamilyIDMap.end()){
-             VISU::PMEDFamily aFamily = aFamilyIter->second;
-             aGroupNames = aFamily->myGroupNames;
-             VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
-             for(; aGroupIter != aGroupNames.end(); aGroupIter++)
-               aGroup2AverageValue[*aGroupIter] = 0.0;
-           }
-         }
-       }
 
-        for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
-         const vtkFloatingPointType& aVal = aMValueSlice[iGauss];
-          aMin = std::min(aMin,aVal);
-          aMax = std::max(aMax,aVal);          
-          if(isAverageByGaussPoints){
-            anAverageValue += aVal;
-          }
-          else {
-            anAverageMin = aMin;
-            anAverageMax = aMax;
+      for(int aGaussMetric = (int)VISU::AVERAGE_METRIC; aGaussMetric <= (int)VISU::MAXIMUM_METRIC; aGaussMetric++){
+        VISU::TComp2MinMax& aComp2MinMax = theMetric2Comp2MinMax[aGaussMetric];
+        VISU::TComp2MinMax& aComp2AverageMinMax = theMetric2Comp2AverageMinMax[aGaussMetric];
+        VISU::TComp2Group2MinMax& aComp2Group2MinMax = theMetric2Comp2Group2MinMax[aGaussMetric];
+        VISU::TComp2Group2MinMax& aComp2Group2AverageMinMax = theMetric2Comp2Group2AverageMinMax[aGaussMetric];
+
+        for(TInt iComp = 0; iComp < theNbComp; iComp++){
+          const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iComp];
+
+          VISU::TMinMax& aMinMax = aComp2MinMax[iComp+1];
+          vtkFloatingPointType& aMin = aMinMax.first;
+          vtkFloatingPointType& aMax = aMinMax.second;
+          VISU::TMinMax& anAverageMinMax = aComp2AverageMinMax[iComp+1];
+          vtkFloatingPointType& anAverageMin = anAverageMinMax.first;
+          vtkFloatingPointType& anAverageMax = anAverageMinMax.second;
+          vtkFloatingPointType anAverageValue = aBaseAverageValues[aGaussMetric];
+
+          VISU::TGroup2MinMax& aGroup2MinMax = aComp2Group2MinMax[iComp+1];
+          VISU::TGroup2MinMax& aGroup2AverageMinMax = aComp2Group2AverageMinMax[iComp+1];
+          std::map<VISU::TName,vtkFloatingPointType> aGroup2AverageValue;
+
+          // get names of groups, to which the element belongs
+          VISU::TNames aGroupNames;
+          VISU::TElemID2FamilyID::const_iterator anIter = anElemID2FamilyID.find(iElem);
+          if(anIter != anElemID2FamilyID.end()){
+            int aFamilyId = anIter->second;
+            if(aFamilyId != 0){
+              VISU::TFamilyIDMap::const_iterator aFamilyIter = aFamilyIDMap.find(aFamilyId);
+              if(aFamilyIter != aFamilyIDMap.end()){
+                VISU::PMEDFamily aFamily = aFamilyIter->second;
+                aGroupNames = aFamily->myGroupNames;
+                VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
+                for(; aGroupIter != aGroupNames.end(); aGroupIter++)
+                  aGroup2AverageValue[*aGroupIter] = aBaseAverageValues[aGaussMetric];
+              }
+            }
           }
 
-         // additional calculation for each group, to which the element belongs
-         VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
-         for(; aGroupIter != aGroupNames.end(); aGroupIter++){
-           VISU::TName aGroupName = *aGroupIter;
-           bool isGroupFound = aGroup2MinMax.find(aGroupName) != aGroup2MinMax.end();
-           VISU::TMinMax& aGroupMinMax = aGroup2MinMax[aGroupName];
-           vtkFloatingPointType& aGroupMin = aGroupMinMax.first;
-           vtkFloatingPointType& aGroupMax = aGroupMinMax.second;
-           aGroupMin = isGroupFound ? std::min(aGroupMin,aVal) : aVal;
-           aGroupMax = isGroupFound ? std::max(aGroupMax,aVal) : aVal;          
-
-           if(isAverageByGaussPoints){
-             aGroup2AverageValue[aGroupName] = aGroup2AverageValue[aGroupName] + aVal;
-           }
-           else {
-             VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
-             vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
-             vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
-             aGroupAverageMin = aGroupMin;
-             aGroupAverageMax = aGroupMax;
-           }
-         }
-       }
-        if(isAverageByGaussPoints){
-          anAverageValue /= aNbGauss;
-          anAverageMin = std::min(anAverageMin,anAverageValue);
-          anAverageMax = std::max(anAverageMax,anAverageValue);
-
-         VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
-         for(; aGroupIter != aGroupNames.end(); aGroupIter++){
-           VISU::TName aGroupName = *aGroupIter;
-           vtkFloatingPointType aGroupAverageValue = aGroup2AverageValue[aGroupName] / aNbGauss;
-           bool isGroupFound = aGroup2AverageMinMax.find(aGroupName) != aGroup2AverageMinMax.end();
-           VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
-           vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
-           vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
-           aGroupAverageMin = isGroupFound ? std::min(aGroupAverageMin,aGroupAverageValue) : aGroupAverageValue;
-           aGroupAverageMax = isGroupFound ? std::max(aGroupAverageMax,aGroupAverageValue) : aGroupAverageValue;
-         }
+          for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
+            const vtkFloatingPointType& aVal = aMValueSlice[iGauss];
+            aMin = isnan(aVal) ? aVal : std::min(aMin,aVal);
+            aMax = isnan(aVal) ? aVal : std::max(aMax,aVal);          
+            if(isAverageByGaussPoints){
+              switch(aGaussMetric) {
+                case VISU::AVERAGE_METRIC: anAverageValue += aVal; break;
+                case VISU::MINIMUM_METRIC: anAverageValue = std::min(anAverageValue, aVal); break;
+                case VISU::MAXIMUM_METRIC: anAverageValue = std::max(anAverageValue, aVal); break;
+              }
+            }
+            else {
+              anAverageMin = aMin;
+              anAverageMax = aMax;
+            }
+
+            // additional calculation for each group, to which the element belongs
+            VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
+            for(; aGroupIter != aGroupNames.end(); aGroupIter++){
+              VISU::TName aGroupName = *aGroupIter;
+              bool isGroupFound = aGroup2MinMax.find(aGroupName) != aGroup2MinMax.end();
+              VISU::TMinMax& aGroupMinMax = aGroup2MinMax[aGroupName];
+              vtkFloatingPointType& aGroupMin = aGroupMinMax.first;
+              vtkFloatingPointType& aGroupMax = aGroupMinMax.second;
+              aGroupMin = isGroupFound ? std::min(aGroupMin,aVal) : aVal;
+              aGroupMax = isGroupFound ? std::max(aGroupMax,aVal) : aVal;          
+
+              if(isAverageByGaussPoints){
+                switch(aGaussMetric) {
+                  case VISU::AVERAGE_METRIC: aGroup2AverageValue[aGroupName] = aGroup2AverageValue[aGroupName] + aVal; break;
+                  case VISU::MINIMUM_METRIC: aGroup2AverageValue[aGroupName] = std::min(aGroup2AverageValue[aGroupName], aVal); break;
+                  case VISU::MAXIMUM_METRIC: aGroup2AverageValue[aGroupName] = std::max(aGroup2AverageValue[aGroupName], aVal); break;
+                }
+              }
+              else {
+                VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
+                vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
+                vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+                aGroupAverageMin = aGroupMin;
+                aGroupAverageMax = aGroupMax;
+              }
+            }
+          }
+          if(isAverageByGaussPoints){
+            if(aGaussMetric == VISU::AVERAGE_METRIC)
+              anAverageValue /= aNbGauss;
+            anAverageMin = std::min(anAverageMin,anAverageValue);
+            anAverageMax = std::max(anAverageMax,anAverageValue);
+
+            VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
+            for(; aGroupIter != aGroupNames.end(); aGroupIter++){
+              VISU::TName aGroupName = *aGroupIter;
+              vtkFloatingPointType aGroupAverageValue = aGroup2AverageValue[aGroupName];
+              if(aGaussMetric == VISU::AVERAGE_METRIC)
+                aGroupAverageValue /= aNbGauss;
+              bool isGroupFound = aGroup2AverageMinMax.find(aGroupName) != aGroup2AverageMinMax.end();
+              VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
+              vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
+              vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+              aGroupAverageMin = isGroupFound ? std::min(aGroupAverageMin,aGroupAverageValue) : aGroupAverageValue;
+              aGroupAverageMax = isGroupFound ? std::max(aGroupAverageMax,aGroupAverageValue) : aGroupAverageValue;
+            }
+          }
         }
       }
     }
-                 
-    // To calculate min/max per vector modulus
-    VISU::TMinMax& aMinMax = theMinMaxArr[0];
-    vtkFloatingPointType& aMin = aMinMax.first;
-    vtkFloatingPointType& aMax = aMinMax.second;
-    VISU::TMinMax& anAverageMinMax = theAverageMinMaxArr[0];
-    vtkFloatingPointType& anAverageMin = anAverageMinMax.first;
-    vtkFloatingPointType& anAverageMax = anAverageMinMax.second;
-
-    VISU::TGroup2MinMax& aGroup2MinMax = theGroup2MinMaxArr[0];
-    VISU::TGroup2MinMax& aGroup2AverageMinMax = theGroup2AverageMinMaxArr[0];
 
-    for(TInt iElem = 0; iElem < aNbElem; iElem++){
-      typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetGaussValueSliceArr(iElem);
-
-      // get names of groups, to which the element belongs
-      VISU::TNames aGroupNames;
-      VISU::TElemID2FamilyID::const_iterator anIter = anElemID2FamilyID.find(iElem);
-      if(anIter != anElemID2FamilyID.end()){
-       int aFamilyId = anIter->second;
-       if(aFamilyId != 0){
-         VISU::TFamilyIDMap::const_iterator aFamilyIter = aFamilyIDMap.find(aFamilyId);
-         if(aFamilyIter != aFamilyIDMap.end()){
-           VISU::PMEDFamily aFamily = aFamilyIter->second;
-           aGroupNames = aFamily->myGroupNames;
-         }
-       }
-      }
+    // To calculate min/max per vector modulus
+    for(int aGaussMetric = (int)VISU::AVERAGE_METRIC; aGaussMetric <= (int)VISU::MAXIMUM_METRIC; aGaussMetric++){
+      VISU::TComp2MinMax& aComp2MinMax = theMetric2Comp2MinMax[aGaussMetric];
+      VISU::TComp2MinMax& aComp2AverageMinMax = theMetric2Comp2AverageMinMax[aGaussMetric];
+      VISU::TComp2Group2MinMax& aComp2Group2MinMax = theMetric2Comp2Group2MinMax[aGaussMetric];
+      VISU::TComp2Group2MinMax& aComp2Group2AverageMinMax = theMetric2Comp2Group2AverageMinMax[aGaussMetric];
+
+      VISU::TMinMax& aMinMax = aComp2MinMax[0];
+      vtkFloatingPointType& aMin = aMinMax.first;
+      vtkFloatingPointType& aMax = aMinMax.second;
+      VISU::TMinMax& anAverageMinMax = aComp2AverageMinMax[0];
+      vtkFloatingPointType& anAverageMin = anAverageMinMax.first;
+      vtkFloatingPointType& anAverageMax = anAverageMinMax.second;
+
+      VISU::TGroup2MinMax& aGroup2MinMax = aComp2Group2MinMax[0];
+      VISU::TGroup2MinMax& aGroup2AverageMinMax = aComp2Group2AverageMinMax[0];
+
+      for(TInt iElem = 0; iElem < aNbElem; iElem++){
+        typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMValueSliceArr = aMMeshValue.GetGaussValueSliceArr(iElem);
+
+        // get names of groups, to which the element belongs
+        VISU::TNames aGroupNames;
+        VISU::TElemID2FamilyID::const_iterator anIter = anElemID2FamilyID.find(iElem);
+        if(anIter != anElemID2FamilyID.end()){
+          int aFamilyId = anIter->second;
+          if(aFamilyId != 0){
+            VISU::TFamilyIDMap::const_iterator aFamilyIter = aFamilyIDMap.find(aFamilyId);
+            if(aFamilyIter != aFamilyIDMap.end()){
+              VISU::PMEDFamily aFamily = aFamilyIter->second;
+              aGroupNames = aFamily->myGroupNames;
+            }
+          }
+        }
 
-      for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
-        const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
-        vtkFloatingPointType aValue = 0.0;
-        for(TInt iComp = 0; iComp < theNbComp2; iComp++){
-          vtkFloatingPointType aVal = aMValueSlice[iComp];
-          aValue += aVal*aVal;
+        for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
+          const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
+          vtkFloatingPointType aValue = 0.0;
+          for(TInt iComp = 0; iComp < theNbComp2; iComp++){
+            vtkFloatingPointType aVal = aMValueSlice[iComp];
+            aValue += aVal*aVal;
+          }
+          aValue = sqrt(aValue);
+          aMin = isnan(aValue) ? aValue : std::min(aMin,aValue);
+          aMax = isnan(aValue) ? aValue : std::max(aMax,aValue);
+
+          // additional calculation for each group, to which the element belongs
+          VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
+          for(; aGroupIter != aGroupNames.end(); aGroupIter++){
+            VISU::TName aGroupName = *aGroupIter;
+            bool isGroupFound = aGroup2MinMax.find(aGroupName) != aGroup2MinMax.end();
+            VISU::TMinMax& aGroupMinMax = aGroup2MinMax[aGroupName];
+            vtkFloatingPointType& aGroupMin = aGroupMinMax.first;
+            vtkFloatingPointType& aGroupMax = aGroupMinMax.second;
+            aGroupMin = isGroupFound ? std::min(aGroupMin,aValue) : aValue;
+            aGroupMax = isGroupFound ? std::max(aGroupMax,aValue) : aValue;
+          }
         }
-        aValue = sqrt(aValue);
-        aMin = std::min(aMin,aValue);
-        aMax = std::max(aMax,aValue);
-
-       // additional calculation for each group, to which the element belongs
-       VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
-       for(; aGroupIter != aGroupNames.end(); aGroupIter++){
-         VISU::TName aGroupName = *aGroupIter;
-         bool isGroupFound = aGroup2MinMax.find(aGroupName) != aGroup2MinMax.end();
-         VISU::TMinMax& aGroupMinMax = aGroup2MinMax[aGroupName];
-         vtkFloatingPointType& aGroupMin = aGroupMinMax.first;
-         vtkFloatingPointType& aGroupMax = aGroupMinMax.second;
-         aGroupMin = isGroupFound ? std::min(aGroupMin,aValue) : aValue;
-         aGroupMax = isGroupFound ? std::max(aGroupMax,aValue) : aValue;
-       }
-      }
-      if(isAverageByGaussPoints){
-        typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMCompValueSliceArr = aMMeshValue.GetCompValueSliceArr(iElem);
-        vtkFloatingPointType aValue = 0.0;
-        for(TInt iComp = 0; iComp < theNbComp2; iComp++){
-          const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMCompValueSlice = aMCompValueSliceArr[iComp];
-          vtkFloatingPointType anAverageValue = 0.0;
-          for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
-            const vtkFloatingPointType& aVal = aMCompValueSlice[iGauss];
-            anAverageValue += aVal;
+        if(isAverageByGaussPoints){
+          typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMCompValueSliceArr = aMMeshValue.GetCompValueSliceArr(iElem);
+          vtkFloatingPointType aValue = 0.0;
+          for(TInt iComp = 0; iComp < theNbComp2; iComp++){
+            const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMCompValueSlice = aMCompValueSliceArr[iComp];
+            vtkFloatingPointType anAverageValue = aBaseAverageValues[aGaussMetric];
+            for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
+              const vtkFloatingPointType& aVal = aMCompValueSlice[iGauss];
+              switch(aGaussMetric) {
+                case VISU::AVERAGE_METRIC: anAverageValue += aVal; break;
+                case VISU::MINIMUM_METRIC: anAverageValue = std::min(anAverageValue, aVal); break;
+                case VISU::MAXIMUM_METRIC: anAverageValue = std::max(anAverageValue, aVal); break;
+              }
+            }
+            if(aGaussMetric == VISU::AVERAGE_METRIC)
+              anAverageValue /= aNbGauss;
+            aValue += anAverageValue*anAverageValue;
+          }
+          aValue = sqrt(aValue);
+          anAverageMin = std::min(anAverageMin,aValue);
+          anAverageMax = std::max(anAverageMax,aValue);
+
+          // additional calculation for each group, to which the element belongs
+          VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
+          for(; aGroupIter != aGroupNames.end(); aGroupIter++){
+            VISU::TName aGroupName = *aGroupIter;
+            bool isGroupFound = aGroup2AverageMinMax.find(aGroupName) != aGroup2AverageMinMax.end();
+            VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
+            vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
+            vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+            aGroupAverageMin = isGroupFound ? std::min(aGroupAverageMin,aValue) : aValue;
+            aGroupAverageMax = isGroupFound ? std::max(aGroupAverageMax,aValue) : aValue;
+          }
+        }
+        else {
+          anAverageMin = aMin;
+          anAverageMax = aMax;
+
+          // additional calculation for each group, to which the element belongs
+          VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
+          for(; aGroupIter != aGroupNames.end(); aGroupIter++){
+            VISU::TName aGroupName = *aGroupIter;
+            VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
+            vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
+            vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+            aGroupAverageMin = aGroup2MinMax[aGroupName].first;
+            aGroupAverageMax = aGroup2MinMax[aGroupName].second;
           }
-          anAverageValue /= aNbGauss;
-          aValue += anAverageValue*anAverageValue;
         }
-        aValue = sqrt(aValue);
-        anAverageMin = std::min(anAverageMin,aValue);
-        anAverageMax = std::max(anAverageMax,aValue);
-
-       // additional calculation for each group, to which the element belongs
-       VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
-       for(; aGroupIter != aGroupNames.end(); aGroupIter++){
-         VISU::TName aGroupName = *aGroupIter;
-         bool isGroupFound = aGroup2AverageMinMax.find(aGroupName) != aGroup2AverageMinMax.end();
-         VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
-         vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
-         vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
-         aGroupAverageMin = isGroupFound ? std::min(aGroupAverageMin,aValue) : aValue;
-         aGroupAverageMax = isGroupFound ? std::max(aGroupAverageMax,aValue) : aValue;
-       }
-      }
-      else {
-        anAverageMin = aMin;
-        anAverageMax = aMax;
-
-       // additional calculation for each group, to which the element belongs
-       VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
-       for(; aGroupIter != aGroupNames.end(); aGroupIter++){
-         VISU::TName aGroupName = *aGroupIter;
-         VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
-         vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
-         vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
-         aGroupAverageMin = aGroup2MinMax[aGroupName].first;
-         aGroupAverageMax = aGroup2MinMax[aGroupName].second;
-       }
       }
     }
   }
@@ -1842,61 +1888,62 @@ VISU_MedConvertor
       
       VISU::TMeshMap::const_iterator anIter = aMeshMap.find(aMeshName);
       if(anIter == aMeshMap.end())
-       continue;
+        continue;
       VISU::PMEDMesh aMesh = anIter->second;
 
 #ifndef _DEXCEPT_
       try{
 #endif
-       TInt aNbFields = myMed->GetNbFields(); 
-
-       INITMSG(MYDEBUG,
-               "- aMeshName = '"<<aMeshName<<"'"<<
-               "; aNbFields = "<<aNbFields<<"\n");
-
-       MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
-
-       for(TInt iField = 1; iField <= aNbFields; iField++){
-         VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax - GetPFieldInfo()");
-
-         MED::TErr anError = 0;
-         MED::PFieldInfo aFieldInfo = myMed->GetPFieldInfo(aMeshInfo, iField, &anError);
-         if ( anError < 0 )
-           continue;
-
-         std::string aFieldName = aFieldInfo->GetName();
-         INITMSG(MYDEBUG,"- aFieldName = '"<<aFieldName<<"'\n");
-         
-         MED::TGeom2Size aGeom2Size;
-         MED::EEntiteMaillage aMEntity;
-         TInt aNbTimeStamps = myMed->GetNbTimeStamps(aFieldInfo,
-                                                    anEntityInfo,
-                                                    aMEntity,
-                                                    aGeom2Size);
-         if(aNbTimeStamps < 1)
-           continue;
-       
-         VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
-         VISU::PMEDMeshOnEntity aMeshOnEntity = aMesh->myMeshOnEntityMap[aVEntity];
-         VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
-         VISU::PMEDField aField = aFieldMap[aFieldName];
-       
-         TInt aNbComp = aField->myNbComp;
-         int aNbComp2 = aNbComp;
-         if(aNbComp == 2 || aNbComp == 4)
-           aNbComp2 = 2;
-         else if(aNbComp > 4)
-           aNbComp2 = 3;
-
-         VISU::TMinMaxArr& aMinMaxArr = aField->myMinMaxArr;
-          VISU::TMinMaxArr& anAverageMinMaxArr = aField->myAverageMinMaxArr;
-          VISU::TGroup2MinMaxArr& aGroup2MinMaxArr = aField->myGroup2MinMaxArr;
-          VISU::TGroup2MinMaxArr& aGroup2AverageMinMaxArr = aField->myGroup2AverageMinMaxArr;
-         TSetIsDone aSetIsDone(aField->myIsMinMaxInitilized);
-         for(TInt iTimeStamp = aNbTimeStamps; iTimeStamp >= 1; iTimeStamp--){
-           VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax - GetPTimeStampInfo()");
-           INITMSG(MYDEBUG,"- iTimeStamp = "<<iTimeStamp<<endl);
-           
+        TInt aNbFields = myMed->GetNbFields(); 
+
+        INITMSG(MYDEBUG,
+                "- aMeshName = '"<<aMeshName<<"'"<<
+                "; aNbFields = "<<aNbFields<<"\n");
+
+        MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
+
+        for(TInt iField = 1; iField <= aNbFields; iField++)
+        {
+          VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax - GetPFieldInfo()");
+
+          MED::TErr anError = 0;
+          MED::PFieldInfo aFieldInfo = myMed->GetPFieldInfo(aMeshInfo, iField, &anError);
+          if ( anError < 0 )
+            continue;
+
+          std::string aFieldName = aFieldInfo->GetName();
+          INITMSG(MYDEBUG,"- aFieldName = '"<<aFieldName<<"'\n");
+
+          MED::TGeom2Size aGeom2Size;
+          MED::EEntiteMaillage aMEntity;
+          TInt aNbTimeStamps = myMed->GetNbTimeStamps(aFieldInfo,
+                                                     anEntityInfo,
+                                                     aMEntity,
+                                                     aGeom2Size);
+          if(aNbTimeStamps < 1)
+            continue;
+        
+          VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
+          VISU::PMEDMeshOnEntity aMeshOnEntity = aMesh->myMeshOnEntityMap[aVEntity];
+          VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
+          VISU::PMEDField aField = aFieldMap[aFieldName];
+        
+          TInt aNbComp = aField->myNbComp;
+          int aNbComp2 = aNbComp;
+          if(aNbComp == 2 || aNbComp == 4)
+            aNbComp2 = 2;
+          else if(aNbComp > 4)
+            aNbComp2 = 3;
+
+          VISU::TMetric2Comp2MinMax& aMetric2Comp2MinMax = aField->myMetric2Comp2MinMax;
+          VISU::TMetric2Comp2MinMax& aMetric2Comp2AverageMinMax = aField->myMetric2Comp2AverageMinMax;
+          VISU::TMetric2Comp2Group2MinMax& aMetric2Comp2Group2MinMax = aField->myMetric2Comp2Group2MinMax;
+          VISU::TMetric2Comp2Group2MinMax& aMetric2Comp2Group2AverageMinMax = aField->myMetric2Comp2Group2AverageMinMax;
+          TSetIsDone aSetIsDone(aField->myIsMinMaxInitilized);
+          for(TInt iTimeStamp = aNbTimeStamps; iTimeStamp >= 1; iTimeStamp--){
+            VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax - GetPTimeStampInfo()");
+            INITMSG(MYDEBUG,"- iTimeStamp = "<<iTimeStamp<<endl);
+            
 #ifndef _DEXCEPT_
             try {
 #ifdef NO_CAS_CATCH
@@ -1918,22 +1965,23 @@ VISU_MedConvertor
 
               if(aFieldInfo->GetType() == MED::eFLOAT64)
                 BuildTimeStampMinMax<MED::TFloatTimeStampValue>(CastToFloatTimeStampValue(aTimeStampValue),
-                                                               aMeshOnEntity,
+                                                                aMeshOnEntity,
                                                                 aGeom2Gauss,
-                                                                aMinMaxArr,
-                                                                anAverageMinMaxArr,
-                                                               aGroup2MinMaxArr,
-                                                               aGroup2AverageMinMaxArr,
+                                                                aMetric2Comp2MinMax,
+                                                                aMetric2Comp2AverageMinMax,
+                                                                aMetric2Comp2Group2MinMax,
+                                                                aMetric2Comp2Group2AverageMinMax,
                                                                 aNbComp,
                                                                 aNbComp2);
+
               else
                 BuildTimeStampMinMax<MED::TIntTimeStampValue>(CastToIntTimeStampValue(aTimeStampValue),
-                                                             aMeshOnEntity,
+                                                              aMeshOnEntity,
                                                               aGeom2Gauss,
-                                                              aMinMaxArr,
-                                                              anAverageMinMaxArr,
-                                                             aGroup2MinMaxArr,
-                                                             aGroup2AverageMinMaxArr,
+                                                              aMetric2Comp2MinMax,
+                                                              aMetric2Comp2AverageMinMax,
+                                                              aMetric2Comp2Group2MinMax,
+                                                              aMetric2Comp2Group2AverageMinMax,
                                                               aNbComp,
                                                               aNbComp2);
 
@@ -1947,17 +1995,17 @@ VISU_MedConvertor
               MSG(MYDEBUG,"Unknown exception !!!");
             }
 #endif
-         }
-         for(TInt iComp = 0; iComp <= aNbComp; iComp++){
-           VISU::TMinMax aMinMax = aField->GetMinMax(iComp, VISU::TNames());
-           INITMSG(MYDEBUG,"- "<<iComp<<": "<<aMinMax.first<<"; "<<aMinMax.second<<endl);
-         }
-       }
+          }
+          for(TInt iComp = 0; iComp <= aNbComp; iComp++){
+            VISU::TMinMax aMinMax = aField->GetMinMax(iComp, VISU::TNames());
+            INITMSG(MYDEBUG,"- "<<iComp<<": "<<aMinMax.first<<"; "<<aMinMax.second<<endl);
+          }
+        }
 #ifndef _DEXCEPT_
       }catch(std::exception& exc){
-       MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+        MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
       }catch(...){
-       MSG(MYDEBUG,"Unknown exception !!!");
+        MSG(MYDEBUG,"Unknown exception !!!");
       }
 #endif
 
@@ -1997,11 +2045,11 @@ VISU_MedConvertor
       VISU::TTimerLog aTimerLog(MYDEBUG,"GetPMeshInfo");
 
       MED::PMeshInfo aMeshInfo = myMed->GetPMeshInfo(iMesh);
-      std::string aMeshName = aMeshInfo->GetName();      
+      std::string aMeshName = aMeshInfo->GetName();
 
       VISU::TMeshMap::const_iterator anIter = aMeshMap.find(aMeshName);
       if(anIter == aMeshMap.end())
-       continue;
+        continue;
       VISU::PMEDMesh aMesh = anIter->second;
 
       INITMSG(MYDEBUG,"aMeshName = '"<<aMeshName<<"'\n");
@@ -2011,32 +2059,32 @@ VISU_MedConvertor
       MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
       
       MED::TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo = 
-       MED::GetEntity2TGeom2ElemInfo(myMed, aMeshInfo, anEntityInfo);
+        MED::GetEntity2TGeom2ElemInfo(myMed, aMeshInfo, anEntityInfo);
       
 #ifndef _DEXCEPT_
       try{
 #endif
-       MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(myMed, aMeshInfo);
-       
-       if(aType == MED::eNON_STRUCTURE)
-         BuildFamilyMap(aMesh,
-                        anEntityInfo,
-                        anEntity2TGeom2ElemInfo,
-                        aFamilyInfoSet,
-                        myMed);
-       else
-         BuildGrilleFamilyMap(aMesh,
-                              anEntityInfo,
-                              aFamilyInfoSet,
-                              myMed);
-       
-       BuildGroupMap(aMesh,
-                     aFamilyInfoSet);
+        MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(myMed, aMeshInfo);
+        
+        if(aType == MED::eNON_STRUCTURE)
+          BuildFamilyMap(aMesh,
+                         anEntityInfo,
+                         anEntity2TGeom2ElemInfo,
+                         aFamilyInfoSet,
+                         myMed);
+        else
+          BuildGrilleFamilyMap(aMesh,
+                               anEntityInfo,
+                               aFamilyInfoSet,
+                               myMed);
+        
+        BuildGroupMap(aMesh,
+                      aFamilyInfoSet);
 #ifndef _DEXCEPT_
       }catch(std::exception& exc){
-       MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+        MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
       }catch(...){
-         MSG(MYDEBUG,"Unknown exception !!!");
+          MSG(MYDEBUG,"Unknown exception !!!");
       }
 #endif
 
@@ -2057,7 +2105,7 @@ VISU_MedConvertor
 int
 VISU_MedConvertor
 ::LoadMeshOnEntity(VISU::PMeshImpl theMesh,
-                  VISU::PMeshOnEntityImpl theMeshOnEntity)
+                   VISU::PMeshOnEntityImpl theMeshOnEntity)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadMeshOnEntity");
   INITMSG(MYDEBUG,"LoadMeshOnEntity"<<endl);
@@ -2080,8 +2128,8 @@ VISU_MedConvertor
 int
 VISU_MedConvertor
 ::LoadFamilyOnEntity(VISU::PMeshImpl theMesh,
-                    VISU::PMeshOnEntityImpl theMeshOnEntity, 
-                    VISU::PFamilyImpl theFamily)
+                     VISU::PMeshOnEntityImpl theMeshOnEntity, 
+                     VISU::PFamilyImpl theFamily)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadFamilyOnEntity");
   INITMSG(MYDEBUG,"LoadFamilyOnEntity"<<endl);
@@ -2104,7 +2152,7 @@ VISU_MedConvertor
 int
 VISU_MedConvertor
 ::LoadMeshOnGroup(VISU::PMeshImpl theMesh, 
-                 const VISU::TFamilySet& theFamilySet)
+                  const VISU::TFamilySet& theFamilySet)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadMeshOnGroup");
   INITMSG(MYDEBUG,"LoadMeshOnGroup"<<endl);
@@ -2112,7 +2160,7 @@ VISU_MedConvertor
   int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
   VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
   for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
-    VISU::PMEDFamily aFamily = *aFamilyIter;
+    VISU::PMEDFamily aFamily = (*aFamilyIter).second;
     const VISU::TEntity& anEntity = aFamily->myEntity;
     const VISU::PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[anEntity];
     isPointsUpdated += LoadPoints(myMed, theMesh);
@@ -2131,9 +2179,9 @@ VISU_MedConvertor
 int
 VISU_MedConvertor
 ::LoadValForTimeOnMesh(VISU::PMeshImpl theMesh, 
-                      VISU::PMeshOnEntityImpl theMeshOnEntity, 
-                      VISU::PFieldImpl theField, 
-                      VISU::PValForTimeImpl theValForTime)
+                       VISU::PMeshOnEntityImpl theMeshOnEntity, 
+                       VISU::PFieldImpl theField, 
+                       VISU::PValForTimeImpl theValForTime)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadValForTimeOnMesh");
   INITMSG(MYDEBUG,"LoadValForTimeOnMesh"<<endl);
@@ -2153,9 +2201,9 @@ VISU_MedConvertor
 int
 VISU_MedConvertor
 ::LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh, 
-                          VISU::PMeshOnEntityImpl theMeshOnEntity, 
-                          VISU::PFieldImpl theField, 
-                          VISU::PValForTimeImpl theValForTime)
+                           VISU::PMeshOnEntityImpl theMeshOnEntity, 
+                           VISU::PFieldImpl theField, 
+                           VISU::PValForTimeImpl theValForTime)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadValForTimeOnGaussPts");
   INITMSG(MYDEBUG,"LoadValForTimeOnGaussPts"<<endl);
@@ -2174,7 +2222,7 @@ VISU_MedConvertor
 int 
 VISU_MedConvertor
 ::LoadPoints(const MED::PWrapper& theMed,
-            VISU::PMEDMesh theMesh) 
+             VISU::PMEDMesh theMesh) 
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadPoints");
   try{
@@ -2209,7 +2257,7 @@ VISU_MedConvertor
       VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
       aCell2Connect.resize(aNbElem);
       for (int iElem = 0; iElem < aNbElem; iElem++)
-       aCell2Connect[iElem] = VISU::TConnect(1,iElem);
+        aCell2Connect[iElem] = VISU::TConnect(1,iElem);
     } // END NON_STRUCTURED
     else { // STRUCTURED
       //Main part of code
@@ -2229,7 +2277,7 @@ VISU_MedConvertor
       VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
       aCell2Connect.resize(aNbElem);
       for(int iElem = 0; iElem < aNbElem; iElem++)
-       aCell2Connect[iElem] = VISU::TConnect(1,iElem);
+        aCell2Connect[iElem] = VISU::TConnect(1,iElem);
       
     }
     
@@ -2251,8 +2299,8 @@ VISU_MedConvertor
 int 
 VISU_MedConvertor
 ::LoadPointsOnFamily(const MED::PWrapper& theMed,
-                    const VISU::PMEDMesh theMesh, 
-                    const VISU::PMEDFamily theFamily) 
+                     const VISU::PMEDMesh theMesh, 
+                     const VISU::PMEDFamily theFamily) 
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadPointsOnFamily");
   try{
@@ -2268,11 +2316,11 @@ VISU_MedConvertor
       TInt aNbElem = aNodeInfo->GetNbElem();
       
       if(aNbElem > 0){
-       TInt anId = theFamily->myId;
-       VISU::TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
-       for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-         if(aNodeInfo->GetFamNum(iElem) == anId)
-           aSubMeshID.push_back(iElem);
+        TInt anId = theFamily->myId;
+        VISU::TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
+        for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+          if(aNodeInfo->GetFamNum(iElem) == anId)
+            aSubMeshID.push_back(iElem);
       }
     }
     else {
@@ -2280,11 +2328,11 @@ VISU_MedConvertor
       TInt aNbElem = aGrilleInfo->GetNbNodes();
       
       if(aNbElem > 0){
-       TInt anId = theFamily->myId;
-       VISU::TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
-       for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-         if(aGrilleInfo->GetFamNumNode(iElem) == anId)
-           aSubMeshID.push_back(iElem);
+        TInt anId = theFamily->myId;
+        VISU::TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
+        for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+          if(aGrilleInfo->GetFamNumNode(iElem) == anId)
+            aSubMeshID.push_back(iElem);
       }
     }
 
@@ -2306,8 +2354,8 @@ VISU_MedConvertor
 int 
 VISU_MedConvertor
 ::LoadCellsOnEntity(const MED::PWrapper& theMed,
-                   const VISU::PMEDMesh theMesh,
-                   const VISU::PMEDMeshOnEntity theMeshOnEntity)
+                    const VISU::PMEDMesh theMesh,
+                    const VISU::PMEDMeshOnEntity theMeshOnEntity)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadCellsOnEntity");
 #ifndef _DEXCEPT_
@@ -2338,75 +2386,75 @@ VISU_MedConvertor
       VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
       
       for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
-       const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
-       VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
-       INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"; aEGeom = "<<aEGeom<<"\n");
-       {
-         vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
-         INITMSG(MYDEBUG,"aVNbNodes = "<<aVNbNodes<<"\n");
-       
-         TInt aNbElem = aGeom2SizeIter->second;//aGrilleInfo->GetNbCells();
-         
-         if(aNbElem > 0){
-           VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
-           
-           aSubMesh->Init(aGrilleInfo); 
-           aSubMesh->myNbCells = aNbElem;      
-           aSubMesh->myCellsSize = aNbElem*(aVNbNodes+1);
-           
-           VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
-           aCell2Connect.resize(aNbElem);
-           
-           TInt aMNbNodes = MEDGeom2NbNodes(aMGeom);
-           VISU::TVector<TInt> aConnect(aMNbNodes);
-           
-           for(TInt iElem = 0; iElem < aNbElem; iElem++) {
-             MED::TIntVector aConn = aGrilleInfo->GetConn(iElem);
-             VISU::TConnect& anArray = aCell2Connect[iElem];
-             anArray.resize(aVNbNodes);
-             
-             if(anIsNodeNum){
-               for(TInt iConn = 0; iConn < aMNbNodes; iConn++){
-                 aConnect[iConn] = aNodeIdMap[aConn[iConn] - 1];
-               }
-             }else{
-               for(int iConn = 0; iConn < aMNbNodes; ++iConn){
-                 aConnect[iConn] = aConn[iConn];
-               }
-             }
-             
-             switch(aMGeom){
-             case MED::eQUAD4:
-               anArray[0] = aConnect[0];
-               anArray[1] = aConnect[2];
-               anArray[2] = aConnect[3];
-               anArray[3] = aConnect[1];
-               break;
-             case MED::eHEXA8:
-               anArray[0] = aConnect[0];
-               anArray[1] = aConnect[2];
-               anArray[2] = aConnect[3];
-               anArray[3] = aConnect[1];
-               anArray[4] = aConnect[4];
-               anArray[5] = aConnect[6];
-               anArray[6] = aConnect[7];
-               anArray[7] = aConnect[5];
-               break;
-             default:
-               for(int iNode = 0; iNode < aVNbNodes; iNode++) 
-                 anArray[iNode] = aConnect[iNode];
-             }
-             
-             for(int iNode = 0; iNode < aVNbNodes; iNode++) 
-               if(anArray[iNode] < 0 || aNbPoints <= anArray[iNode])
-                 EXCEPTION(std::runtime_error,"LoadCellsOnEntity - "<<
-                           " aNbPoints("<<aNbPoints<<") "<<
-                           "<= anArray["<<iElem<<"]"<<
-                           "["<<iNode<<"]"<<
-                           "("<<anArray[iNode]<<") < 0");
-           }
-         }
-       }
+        const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
+        VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+        INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"; aEGeom = "<<aEGeom<<"\n");
+        {
+          vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
+          INITMSG(MYDEBUG,"aVNbNodes = "<<aVNbNodes<<"\n");
+        
+          TInt aNbElem = aGeom2SizeIter->second;//aGrilleInfo->GetNbCells();
+          
+          if(aNbElem > 0){
+            VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
+            
+            aSubMesh->Init(aGrilleInfo); 
+            aSubMesh->myNbCells = aNbElem;      
+            aSubMesh->myCellsSize = aNbElem*(aVNbNodes+1);
+            
+            VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
+            aCell2Connect.resize(aNbElem);
+            
+            TInt aMNbNodes = MEDGeom2NbNodes(aMGeom);
+            VISU::TVector<TInt> aConnect(aMNbNodes);
+            
+            for(TInt iElem = 0; iElem < aNbElem; iElem++) {
+              MED::TIntVector aConn = aGrilleInfo->GetConn(iElem, theMeshOnEntity->myEntity != VISU::CELL_ENTITY);
+              VISU::TConnect& anArray = aCell2Connect[iElem];
+              anArray.resize(aVNbNodes);
+              
+              if(anIsNodeNum){
+                for(TInt iConn = 0; iConn < aMNbNodes; iConn++){
+                  aConnect[iConn] = aNodeIdMap[aConn[iConn] - 1];
+                }
+              }else{
+                for(int iConn = 0; iConn < aMNbNodes; ++iConn){
+                  aConnect[iConn] = aConn[iConn];
+                }
+              }
+              
+              switch(aMGeom){
+              case MED::eQUAD4:
+                anArray[0] = aConnect[0];
+                anArray[1] = aConnect[2];
+                anArray[2] = aConnect[3];
+                anArray[3] = aConnect[1];
+                break;
+              case MED::eHEXA8:
+                anArray[0] = aConnect[0];
+                anArray[1] = aConnect[2];
+                anArray[2] = aConnect[3];
+                anArray[3] = aConnect[1];
+                anArray[4] = aConnect[4];
+                anArray[5] = aConnect[6];
+                anArray[6] = aConnect[7];
+                anArray[7] = aConnect[5];
+                break;
+              default:
+                for(int iNode = 0; iNode < aVNbNodes; iNode++) 
+                  anArray[iNode] = aConnect[iNode];
+              }
+              
+              for(int iNode = 0; iNode < aVNbNodes; iNode++) 
+                if(anArray[iNode] < 0 || aNbPoints <= anArray[iNode])
+                  EXCEPTION(std::runtime_error,"LoadCellsOnEntity - "<<
+                            " aNbPoints("<<aNbPoints<<") "<<
+                            "<= anArray["<<iElem<<"]"<<
+                            "["<<iNode<<"]"<<
+                            "("<<anArray[iNode]<<") < 0");
+            }
+          }
+        }
       }
 
       theMeshOnEntity->myIsDone = true;
@@ -2425,7 +2473,7 @@ VISU_MedConvertor
     EBooleen anIsNodeNum = aNodeInfo->IsElemNum();
     if(anIsNodeNum){
       for(TInt i = 0; i < aNbPoints; i++){
-       aNodeIdMap[aNodeInfo->GetElemNum(i)-1] = i;
+        aNodeIdMap[aNodeInfo->GetElemNum(i)-1] = i;
       }
     }
 #endif
@@ -2440,198 +2488,198 @@ VISU_MedConvertor
       INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"; aEGeom = "<<aEGeom<<"\n");
       switch(aMGeom){
       case MED::ePOLYGONE: {
-       MED::PPolygoneInfo aPolygoneInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
-       TInt aNbElem = aPolygoneInfo->GetNbElem();
-       if(aNbElem > 0){
-         VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
-         
-         aSubMesh->Init(MED::PElemInfo(aPolygoneInfo),theMed->GetVersion()); 
-         aSubMesh->myNbCells = aNbElem;      
-
-         VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
-         aCell2Connect.resize(aNbElem);
-         
-         for(TInt iElem = 0; iElem < aNbElem; iElem++) {
-           MED::TCConnSlice aConnSlice = aPolygoneInfo->GetConnSlice(iElem);
-           TInt aNbConn = aPolygoneInfo->GetNbConn(iElem);
-           aSubMesh->myCellsSize += aNbConn;
-           VISU::TConnect& anArray = aCell2Connect[iElem];
-           anArray.resize(aNbConn);
-           for(TInt iConn = 0; iConn < aNbConn; iConn++)
-             anArray[iConn] = aConnSlice[iConn] - 1;
-         }
-       }
-       break;
+        MED::PPolygoneInfo aPolygoneInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
+        TInt aNbElem = aPolygoneInfo->GetNbElem();
+        if(aNbElem > 0){
+          VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
+          
+          aSubMesh->Init(MED::PElemInfo(aPolygoneInfo),theMed->GetVersion()); 
+          aSubMesh->myNbCells = aNbElem;      
+
+          VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
+          aCell2Connect.resize(aNbElem);
+          
+          for(TInt iElem = 0; iElem < aNbElem; iElem++) {
+            MED::TCConnSlice aConnSlice = aPolygoneInfo->GetConnSlice(iElem);
+            TInt aNbConn = aPolygoneInfo->GetNbConn(iElem);
+            aSubMesh->myCellsSize += aNbConn;
+            VISU::TConnect& anArray = aCell2Connect[iElem];
+            anArray.resize(aNbConn);
+            for(TInt iConn = 0; iConn < aNbConn; iConn++)
+              anArray[iConn] = aConnSlice[iConn] - 1;
+          }
+        }
+        break;
       }
       case MED::ePOLYEDRE: {
-       MED::PPolyedreInfo aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
-       TInt aNbElem = aPolyedreInfo->GetNbElem();
-       
-       if(aNbElem > 0){
-         VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
-         
-         aSubMesh->Init(MED::PElemInfo(aPolyedreInfo),theMed->GetVersion()); 
-         aSubMesh->myNbCells = aNbElem;      
-
-         VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
-         aCell2Connect.resize(aNbElem);
-         
-         for(TInt iElem = 0; iElem < aNbElem; iElem++){
-           MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(iElem);
-           VISU::TConnect& anArray = aCell2Connect[iElem];
-           typedef std::set<TInt> TConnectSet;
-           TConnectSet aConnectSet;
-           TInt aNbFaces = aConnSliceArr.size();
-           for(TInt iFace = 0; iFace < aNbFaces; iFace++){
-             MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
-             TInt aNbConn = aConnSlice.size();
-             aSubMesh->myCellsSize += aNbConn;
-             for(TInt iConn = 0; iConn < aNbConn; iConn++){
-               aConnectSet.insert(aConnSlice[iConn]);
-             }
-           }
-         
-           int aNbConn = aConnectSet.size();
-           anArray.resize(aNbConn);
-           TConnectSet::iterator anIter = aConnectSet.begin();
-           for(int i = 0; anIter != aConnectSet.end(); anIter++, i++){
-             TInt anId = *anIter;
-             anArray[i] = anId - 1;
-           }
-         }
-       }
-
-       break;
+        MED::PPolyedreInfo aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
+        TInt aNbElem = aPolyedreInfo->GetNbElem();
+        
+        if(aNbElem > 0){
+          VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
+          
+          aSubMesh->Init(MED::PElemInfo(aPolyedreInfo),theMed->GetVersion()); 
+          aSubMesh->myNbCells = aNbElem;      
+
+          VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
+          aCell2Connect.resize(aNbElem);
+          
+          for(TInt iElem = 0; iElem < aNbElem; iElem++){
+            MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(iElem);
+            VISU::TConnect& anArray = aCell2Connect[iElem];
+            typedef std::set<TInt> TConnectSet;
+            TConnectSet aConnectSet;
+            TInt aNbFaces = aConnSliceArr.size();
+            for(TInt iFace = 0; iFace < aNbFaces; iFace++){
+              MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
+              TInt aNbConn = aConnSlice.size();
+              aSubMesh->myCellsSize += aNbConn;
+              for(TInt iConn = 0; iConn < aNbConn; iConn++){
+                aConnectSet.insert(aConnSlice[iConn]);
+              }
+            }
+          
+            int aNbConn = aConnectSet.size();
+            anArray.resize(aNbConn);
+            TConnectSet::iterator anIter = aConnectSet.begin();
+            for(int i = 0; anIter != aConnectSet.end(); anIter++, i++){
+              TInt anId = *anIter;
+              anArray[i] = anId - 1;
+            }
+          }
+        }
+
+        break;
       }
       default: {
-       vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
-       INITMSG(MYDEBUG,"aVNbNodes = "<<aVNbNodes<<"\n");
-       
-       MED::PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
-       TInt aNbElem = aCellInfo->GetNbElem();
-       
-       if(aNbElem > 0){
-         VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
-         
-         aSubMesh->Init(MED::PElemInfo(aCellInfo), theMed->GetVersion()); 
-         aSubMesh->myNbCells = aNbElem;      
-         aSubMesh->myCellsSize = aNbElem*(aVNbNodes+1);
-
-         VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
-         aCell2Connect.resize(aNbElem);
-       
-         TInt aMNbNodes = MEDGeom2NbNodes(aMGeom);
-         VISU::TVector<TInt> aConnect(aMNbNodes);
-       
-         for(TInt iElem = 0; iElem < aNbElem; iElem++) {
-           MED::TCConnSlice aConnSlice = aCellInfo->GetConnSlice(iElem);
-           VISU::TConnect& anArray = aCell2Connect[iElem];
-           anArray.resize(aVNbNodes);
-           
-           if(anIsNodeNum){
-             for(TInt iConn = 0; iConn < aMNbNodes; iConn++){
-               aConnect[iConn] = aNodeIdMap[aConnSlice[iConn] - 1];
-             }
-           }else{
-             for(int iConn = 0; iConn < aMNbNodes; iConn++){
-               aConnect[iConn] = aConnSlice[iConn] - 1;
-             }
-           }
-           
-           switch(aMGeom){
+        vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
+        INITMSG(MYDEBUG,"aVNbNodes = "<<aVNbNodes<<"\n");
+        
+        MED::PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
+        TInt aNbElem = aCellInfo->GetNbElem();
+        
+        if(aNbElem > 0){
+          VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
+          
+          aSubMesh->Init(MED::PElemInfo(aCellInfo), theMed->GetVersion()); 
+          aSubMesh->myNbCells = aNbElem;      
+          aSubMesh->myCellsSize = aNbElem*(aVNbNodes+1);
+
+          VISU::TCell2Connect& aCell2Connect = aSubMesh->myCell2Connect;
+          aCell2Connect.resize(aNbElem);
+        
+          TInt aMNbNodes = MEDGeom2NbNodes(aMGeom);
+          VISU::TVector<TInt> aConnect(aMNbNodes);
+        
+          for(TInt iElem = 0; iElem < aNbElem; iElem++) {
+            MED::TCConnSlice aConnSlice = aCellInfo->GetConnSlice(iElem);
+            VISU::TConnect& anArray = aCell2Connect[iElem];
+            anArray.resize(aVNbNodes);
+            
+            if(anIsNodeNum){
+              for(TInt iConn = 0; iConn < aMNbNodes; iConn++){
+                aConnect[iConn] = aNodeIdMap[aConnSlice[iConn] - 1];
+              }
+            }else{
+              for(int iConn = 0; iConn < aMNbNodes; iConn++){
+                aConnect[iConn] = aConnSlice[iConn] - 1;
+              }
+            }
+            
+            switch(aMGeom){
 #if !(defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
-           case MED::eSEG3:
-             anArray[0] = aConnect[0];
-             anArray[2] = aConnect[1];  
+            case MED::eSEG3:
+              anArray[0] = aConnect[0];
+              anArray[2] = aConnect[1];  
 
-             anArray[1] = aConnect[2];
-             break;
+              anArray[1] = aConnect[2];
+              break;
 #endif
 #if !(defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
-           case MED::eTRIA6:
-             anArray[0] = aConnect[0];
-             anArray[2] = aConnect[1];  
-             anArray[4] = aConnect[2];  
-
-             anArray[1] = aConnect[3];
-             anArray[3] = aConnect[4];  
-             anArray[5] = aConnect[5];  
-             break;
+            case MED::eTRIA6:
+              anArray[0] = aConnect[0];
+              anArray[2] = aConnect[1];  
+              anArray[4] = aConnect[2];  
+
+              anArray[1] = aConnect[3];
+              anArray[3] = aConnect[4];  
+              anArray[5] = aConnect[5];  
+              break;
 #endif
 #if !(defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
-           case MED::eQUAD8:
-             anArray[0] = aConnect[0];
-             anArray[2] = aConnect[1];  
-             anArray[4] = aConnect[2];  
-             anArray[6] = aConnect[3];  
-
-             anArray[1] = aConnect[4];
-             anArray[3] = aConnect[5];  
-             anArray[5] = aConnect[6];  
-             anArray[7] = aConnect[7];  
-             break;
+            case MED::eQUAD8:
+              anArray[0] = aConnect[0];
+              anArray[2] = aConnect[1];  
+              anArray[4] = aConnect[2];  
+              anArray[6] = aConnect[3];  
+
+              anArray[1] = aConnect[4];
+              anArray[3] = aConnect[5];  
+              anArray[5] = aConnect[6];  
+              anArray[7] = aConnect[7];  
+              break;
 #endif
 #if (defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
-           case MED::eTETRA10:
-             anArray[0] = aConnect[0];
-             anArray[1] = aConnect[2];
-             anArray[2] = aConnect[1];  
-             anArray[3] = aConnect[3];  
-
-             anArray[4] = aConnect[6];
-             anArray[5] = aConnect[5];
-             anArray[6] = aConnect[4];  
-
-             anArray[7] = aConnect[7];  
-             anArray[8] = aConnect[9];  
-             anArray[9] = aConnect[8];  
-             break;
+            case MED::eTETRA10:
+              anArray[0] = aConnect[0];
+              anArray[1] = aConnect[2];
+              anArray[2] = aConnect[1];  
+              anArray[3] = aConnect[3];  
+
+              anArray[4] = aConnect[6];
+              anArray[5] = aConnect[5];
+              anArray[6] = aConnect[4];  
+
+              anArray[7] = aConnect[7];  
+              anArray[8] = aConnect[9];  
+              anArray[9] = aConnect[8];  
+              break;
 #endif
-           case MED::eTETRA4:
-             anArray[0] = aConnect[0];
-             anArray[1] = aConnect[2];
-             anArray[2] = aConnect[1];  
-             anArray[3] = aConnect[3];  
-             break;
+            case MED::eTETRA4:
+              anArray[0] = aConnect[0];
+              anArray[1] = aConnect[2];
+              anArray[2] = aConnect[1];  
+              anArray[3] = aConnect[3];  
+              break;
 #if (defined(VTK_QUADRATIC_PYRAMID) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
-           case MED::ePYRA13:
-             anArray[0] = aConnect[0];
-             anArray[1] = aConnect[3];
-             anArray[2] = aConnect[2];  
-             anArray[3] = aConnect[1];  
-             anArray[4] = aConnect[4];
-
-             anArray[5] = aConnect[8];
-             anArray[6] = aConnect[7];  
-             anArray[7] = aConnect[6];  
-             anArray[8] = aConnect[5];  
-
-             anArray[9] = aConnect[9];  
-             anArray[10] = aConnect[12];  
-             anArray[11] = aConnect[11];  
-             anArray[12] = aConnect[10];  
-             break;
+            case MED::ePYRA13:
+              anArray[0] = aConnect[0];
+              anArray[1] = aConnect[3];
+              anArray[2] = aConnect[2];  
+              anArray[3] = aConnect[1];  
+              anArray[4] = aConnect[4];
+
+              anArray[5] = aConnect[8];
+              anArray[6] = aConnect[7];  
+              anArray[7] = aConnect[6];  
+              anArray[8] = aConnect[5];  
+
+              anArray[9] = aConnect[9];  
+              anArray[10] = aConnect[12];  
+              anArray[11] = aConnect[11];  
+              anArray[12] = aConnect[10];  
+              break;
 #endif
-           case MED::ePYRA5:
-             anArray[0] = aConnect[0];
-             anArray[1] = aConnect[3];  
-             anArray[2] = aConnect[2];
-             anArray[3] = aConnect[1];  
-             anArray[4] = aConnect[4];
-             break;
-           default:
-             for(int iNode = 0; iNode < aVNbNodes; iNode++) 
-               anArray[iNode] = aConnect[iNode];
-           }
-           for(int iNode = 0; iNode < aVNbNodes; iNode++) 
-             if(anArray[iNode] < 0 || aNbPoints <= anArray[iNode])
-               EXCEPTION(std::runtime_error,"LoadCellsOnEntity - "<<
-                         " aNbPoints("<<aNbPoints<<") "<<
-                         "<= anArray["<<iElem<<"]"<<
-                         "["<<iNode<<"]"<<
-                         "("<<anArray[iNode]<<") < 0");
-         }
-       }
+            case MED::ePYRA5:
+              anArray[0] = aConnect[0];
+              anArray[1] = aConnect[3];  
+              anArray[2] = aConnect[2];
+              anArray[3] = aConnect[1];  
+              anArray[4] = aConnect[4];
+              break;
+            default:
+              for(int iNode = 0; iNode < aVNbNodes; iNode++) 
+                anArray[iNode] = aConnect[iNode];
+            }
+            for(int iNode = 0; iNode < aVNbNodes; iNode++) 
+              if(anArray[iNode] < 0 || aNbPoints <= anArray[iNode])
+                EXCEPTION(std::runtime_error,"LoadCellsOnEntity - "<<
+                          " aNbPoints("<<aNbPoints<<") "<<
+                          "<= anArray["<<iElem<<"]"<<
+                          "["<<iNode<<"]"<<
+                          "("<<anArray[iNode]<<") < 0");
+          }
+        }
       }}
     }
 
@@ -2657,9 +2705,9 @@ VISU_MedConvertor
 int 
 VISU_MedConvertor
 ::LoadCellsOnFamily(const MED::PWrapper& theMed,
-                   const VISU::PMEDMesh theMesh,
-                   const VISU::PMEDMeshOnEntity theMeshOnEntity,
-                   const VISU::PMEDFamily theFamily)
+                    const VISU::PMEDMesh theMesh,
+                    const VISU::PMEDMeshOnEntity theMeshOnEntity,
+                    const VISU::PMEDFamily theFamily)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadCellsOnFamily");
 #ifndef _DEXCEPT_
@@ -2684,49 +2732,49 @@ VISU_MedConvertor
     for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
       const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
       if(aType == MED::eNON_STRUCTURE){
-       MED::PElemInfo anElemInfo;
-       switch(aMGeom){
-       case MED::ePOLYGONE: {
-         anElemInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
-         break;
-       }
-       case MED::ePOLYEDRE: {
-         anElemInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
-         break;
-       }
-       default: {
-         anElemInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
-         break;
-       }}
-       if(anElemInfo){
-         if(TInt aNbElem = anElemInfo->GetNbElem()){
-           VISU::TSubMeshID aSubMeshID;
-           for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-             if(anElemInfo->GetFamNum(iElem) == anId)
-               aSubMeshID.push_back(iElem);
-           if(!aSubMeshID.empty()){
-             VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
-             INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
-             aGeom2SubMeshID.insert(VISU::TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
-           }
-         }
-       }
+        MED::PElemInfo anElemInfo;
+        switch(aMGeom){
+        case MED::ePOLYGONE: {
+          anElemInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
+          break;
+        }
+        case MED::ePOLYEDRE: {
+          anElemInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
+          break;
+        }
+        default: {
+          anElemInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
+          break;
+        }}
+        if(anElemInfo){
+          if(TInt aNbElem = anElemInfo->GetNbElem()){
+            VISU::TSubMeshID aSubMeshID;
+            for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+              if(anElemInfo->GetFamNum(iElem) == anId)
+                aSubMeshID.push_back(iElem);
+            if(!aSubMeshID.empty()){
+              VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+              INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
+              aGeom2SubMeshID.insert(VISU::TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+            }
+          }
+        }
       } else {
-       MED::PGrilleInfo anElemInfo = theMed->GetPGrilleInfo(aMeshInfo);
-       if(anElemInfo){
-         TInt aNbElem = anElemInfo->GetNbCells();
-         if(aNbElem>0 && (aMGeom == anElemInfo->GetGeom()) ){
-           VISU::TSubMeshID aSubMeshID;
-           for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-             if(anElemInfo->GetFamNum(iElem) == anId)
-               aSubMeshID.push_back(iElem);
-           if(!aSubMeshID.empty()){
-             VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
-             INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
-             aGeom2SubMeshID.insert(VISU::TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
-           }
-         }
-       }
+        MED::PGrilleInfo anElemInfo = theMed->GetPGrilleInfo(aMeshInfo);
+        if(anElemInfo){
+          TInt aNbElem = anElemInfo->GetNbCells();
+          if(aNbElem>0 && (aMGeom == anElemInfo->GetGeom()) ){
+            VISU::TSubMeshID aSubMeshID;
+            for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+              if(anElemInfo->GetFamNum(iElem) == anId)
+                aSubMeshID.push_back(iElem);
+            if(!aSubMeshID.empty()){
+              VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+              INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
+              aGeom2SubMeshID.insert(VISU::TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+            }
+          }
+        }
       }
     }
 
@@ -2749,10 +2797,10 @@ VISU_MedConvertor
 //---------------------------------------------------------------
 void
 LoadProfile(const MED::PWrapper& theMed,
-           VISU::PMEDMesh theMesh,
-           MED::PTimeStampValueBase theTimeStampValue,
-           VISU::TMEDValForTime& theValForTime,
-           VISU::TMEDMeshOnEntity& theMeshOnEntity)
+            VISU::PMEDMesh theMesh,
+            MED::PTimeStampValueBase theTimeStampValue,
+            VISU::TMEDValForTime& theValForTime,
+            VISU::TMEDMeshOnEntity& theMeshOnEntity)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadProfile");
   INITMSG(MYDEBUG,"LoadProfile"<<endl);
@@ -2775,17 +2823,17 @@ LoadProfile(const MED::PWrapper& theMed,
 
       MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
       if(!anElemNum.empty()){
-       VISU::TSubMeshID& aSubMeshID = aSubProfile->mySubMeshID;
-       TInt aSize = anElemNum.size();
-       aSubMeshID.resize(aSize);
-       for(TInt anId = 0; anId < aSize; anId++)
-         aSubMeshID[anId] = anElemNum[anId] - 1;
+        VISU::TSubMeshID& aSubMeshID = aSubProfile->mySubMeshID;
+        TInt aSize = anElemNum.size();
+        aSubMeshID.resize(aSize);
+        for(TInt anId = 0; anId < aSize; anId++)
+          aSubMeshID[anId] = anElemNum[anId] - 1;
       }
 
       INITMSG(MYDEBUG,
-             "- aEGeom = "<<aEGeom<<
-             "; aNbCells = "<<aSubProfile->mySubMeshID.size()<<
-             endl);
+              "- aEGeom = "<<aEGeom<<
+              "; aNbCells = "<<aSubProfile->mySubMeshID.size()<<
+              endl);
     }
   }
   {
@@ -2813,10 +2861,10 @@ LoadProfile(const MED::PWrapper& theMed,
 //---------------------------------------------------------------
 void
 LoadGaussMesh(const MED::PWrapper& theMed,
-             VISU::PMEDMesh theMesh,
-             MED::PTimeStampValueBase theTimeStampValue,
-             VISU::TMEDValForTime& theValForTime,
-             VISU::TMEDMeshOnEntity& theMeshOnEntity)
+              VISU::PMEDMesh theMesh,
+              MED::PTimeStampValueBase theTimeStampValue,
+              VISU::TMEDValForTime& theValForTime,
+              VISU::TMEDMeshOnEntity& theMeshOnEntity)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadGaussMesh");
   INITMSG(MYDEBUG,"LoadGaussMesh"<<endl);
@@ -2859,20 +2907,20 @@ LoadGaussMesh(const MED::PWrapper& theMed,
     switch(aMGeom){
     case MED::ePOLYGONE: 
       aPolygoneInfo = theMed->GetPPolygoneInfo(aMeshInfo,
-                                              aMEntity,
-                                              aMGeom);
+                                               aMEntity,
+                                               aMGeom);
       anElemInfo = aPolygoneInfo;
       break;
     case MED::ePOLYEDRE: 
       aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,
-                                              aMEntity,
-                                              aMGeom);
+                                               aMEntity,
+                                               aMGeom);
       anElemInfo = aPolyedreInfo;
       break;
     default:
       aCellInfo = theMed->GetPCellInfo(aMeshInfo,
-                                      aMEntity, 
-                                      aMGeom);
+                                       aMEntity, 
+                                       aMGeom);
       anElemInfo = aCellInfo;
     }
     aGaussSubMesh->myIsElemNum = anElemInfo->IsElemNum();
@@ -2888,69 +2936,69 @@ LoadGaussMesh(const MED::PWrapper& theMed,
       VISU::PMEDGauss aGauss = aGaussSubMesh->myGauss;
       MED::PGaussInfo aGaussInfo = aGauss->myGaussInfo;
       if(aGaussInfo){
-       aName = aGaussInfo->GetName();
-       if(!aSubMeshID.empty()){
-         const std::string& aProfileName = aSubProfile->myName;
-         MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(theMed,
-                                                              aProfileName);
-         if(aProfileInfo){
-           const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
-           anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
-                                                   aCellInfo,
-                                                   aNodeInfo,
-                                                   aGaussCoord,
-                                                   anElemNum);
-         }
-       }else
-         anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
-                                                 aCellInfo,
-                                                 aNodeInfo,
-                                                 aGaussCoord);
+        aName = aGaussInfo->GetName();
+        if(!aSubMeshID.empty()){
+          const std::string& aProfileName = aSubProfile->myName;
+          MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(theMed,
+                                                               aProfileName);
+          if(aProfileInfo){
+            const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
+            anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
+                                                    aCellInfo,
+                                                    aNodeInfo,
+                                                    aGaussCoord,
+                                                    anElemNum);
+          }
+        }else
+          anIsGaussCoord3D = MED::GetGaussCoord3D(aGaussInfo,
+                                                  aCellInfo,
+                                                  aNodeInfo,
+                                                  aGaussCoord);
       }
     }else{
       if(!aSubMeshID.empty()){
-       const std::string& aProfileName = aSubProfile->myName;
-       MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(theMed,
-                                                            aProfileName);
-       if(aProfileInfo){
-         const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
-         switch(aMGeom){
-         case MED::ePOLYGONE: 
-           anIsGaussCoord3D = MED::GetBaryCenter(aPolygoneInfo,
-                                                 aNodeInfo,
-                                                 aGaussCoord,
-                                                 anElemNum);
-           break;
-         case MED::ePOLYEDRE: 
-           anIsGaussCoord3D = MED::GetBaryCenter(aPolyedreInfo,
-                                                 aNodeInfo,
-                                                 aGaussCoord,
-                                                 anElemNum);
-           break;
-         default:
-           anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
-                                                 aNodeInfo,
-                                                 aGaussCoord,
-                                                 anElemNum);
-         }
-       }
+        const std::string& aProfileName = aSubProfile->myName;
+        MED::PProfileInfo aProfileInfo = MED::GetProfileInfo(theMed,
+                                                             aProfileName);
+        if(aProfileInfo){
+          const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
+          switch(aMGeom){
+          case MED::ePOLYGONE: 
+            anIsGaussCoord3D = MED::GetBaryCenter(aPolygoneInfo,
+                                                  aNodeInfo,
+                                                  aGaussCoord,
+                                                  anElemNum);
+            break;
+          case MED::ePOLYEDRE: 
+            anIsGaussCoord3D = MED::GetBaryCenter(aPolyedreInfo,
+                                                  aNodeInfo,
+                                                  aGaussCoord,
+                                                  anElemNum);
+            break;
+          default:
+            anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
+                                                  aNodeInfo,
+                                                  aGaussCoord,
+                                                  anElemNum);
+          }
+        }
       }else
-       switch(aMGeom){
-       case MED::ePOLYGONE: 
-         anIsGaussCoord3D = MED::GetBaryCenter(aPolygoneInfo,
-                                               aNodeInfo,
-                                               aGaussCoord);
-         break;
-       case MED::ePOLYEDRE: 
-         anIsGaussCoord3D = MED::GetBaryCenter(aPolyedreInfo,
-                                               aNodeInfo,
-                                               aGaussCoord);
-         break;
-       default:
-         anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
-                                               aNodeInfo,
-                                               aGaussCoord);
-       }
+        switch(aMGeom){
+        case MED::ePOLYGONE: 
+          anIsGaussCoord3D = MED::GetBaryCenter(aPolygoneInfo,
+                                                aNodeInfo,
+                                                aGaussCoord);
+          break;
+        case MED::ePOLYEDRE: 
+          anIsGaussCoord3D = MED::GetBaryCenter(aPolyedreInfo,
+                                                aNodeInfo,
+                                                aGaussCoord);
+          break;
+        default:
+          anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
+                                                aNodeInfo,
+                                                aGaussCoord);
+        }
     }
     
     if(anIsGaussCoord3D){
@@ -2966,13 +3014,13 @@ LoadGaussMesh(const MED::PWrapper& theMed,
       TInt aNbCells = aNbElem*aNbGauss;
 
       INITMSG(MYDEBUG,
-             "- aEGeom = "<<aEGeom<<
-             "; aName = '"<<aName<<"'"<<
-             "; aStatus = "<<aGaussSubMesh->myStatus<<
-             "; aNbElem = "<<aNbElem<<
-             "; aNbGauss = "<<aNbGauss<<
-             "; aNbCells = "<<aNbCells<<
-             endl);
+              "- aEGeom = "<<aEGeom<<
+              "; aName = '"<<aName<<"'"<<
+              "; aStatus = "<<aGaussSubMesh->myStatus<<
+              "; aNbElem = "<<aNbElem<<
+              "; aNbGauss = "<<aNbGauss<<
+              "; aNbCells = "<<aNbCells<<
+              endl);
     }else
       EXCEPTION(std::runtime_error,"LoadGaussMesh - Gauss Points localization error!!!");
   }
@@ -2985,15 +3033,17 @@ LoadGaussMesh(const MED::PWrapper& theMed,
 template<class TimeStampValueType>
 void
 FillValForTime(MED::SharedPtr<TimeStampValueType> theTimeStampValue,
-              const VISU::TGeom2SubProfile& theGeom2SubProfile,
-              VISU::PMEDValForTime theValForTime,
-              VISU::PMEDField theField)
+               const VISU::TGeom2SubProfile& theGeom2SubProfile,
+               VISU::PMEDValForTime theValForTime,
+               VISU::PMEDField theField)
 {
+  if(theValForTime->myIsFilled) 
+    return;
   theField->myDataSize = 0;
   TInt aNbComp = theField->myNbComp;
 
   VISU::TGeom2SubProfile::const_iterator anIter = theGeom2SubProfile.begin();
-  for(; anIter != theGeom2SubProfile.end(); anIter++){
+  for(; anIter != theGeom2SubProfile.end(); anIter++) {
     VISU::EGeometry aEGeom = anIter->first;
     VISU::PMEDSubProfile aSubProfile(anIter->second);
 
@@ -3004,10 +3054,10 @@ FillValForTime(MED::SharedPtr<TimeStampValueType> theTimeStampValue,
       TInt aNbGauss = theValForTime->GetNbGauss(aEGeom);
 
       INITMSG(MYDEBUG,
-             "- aEGeom = "<<aEGeom<<
-             "; aNbElem = "<<aNbElem<<
-             "; aNbGauss = "<<aNbGauss<<
-             endl);
+              "- aEGeom = "<<aEGeom<<
+              "; aNbElem = "<<aNbElem<<
+              "; aNbGauss = "<<aNbGauss<<
+              endl);
       
       VISU::PMeshValue& aVMeshValue = theValForTime->GetMeshValue(aEGeom);
       typedef typename TimeStampValueType::TElement TElement;
@@ -3021,17 +3071,18 @@ FillValForTime(MED::SharedPtr<TimeStampValueType> theTimeStampValue,
       aVMeshValue.reset(aMeshValue);
     }
   }
+  theValForTime->myIsFilled = true;
 }
 
 //---------------------------------------------------------------
 int 
 LoadValForTime(const MED::PWrapper& theMed,
-              VISU::PMEDMesh theMesh,
-              VISU::PMEDMeshOnEntity theMeshOnEntity,
-              VISU::PMEDField theField, 
-              VISU::PMEDValForTime theValForTime,
-              bool theIsGauss,
-              bool& theIsDone)
+               VISU::PMEDMesh theMesh,
+               VISU::PMEDMeshOnEntity theMeshOnEntity,
+               VISU::PMEDField theField, 
+               VISU::PMEDValForTime theValForTime,
+               bool theIsGauss,
+               bool& theIsDone)
 {
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadValForTime");
   INITMSG(MYDEBUG,"LoadValForTime - theIsGauss = "<<theIsGauss<<endl);
@@ -3044,76 +3095,76 @@ LoadValForTime(const MED::PWrapper& theMed,
   const std::string& aMeshName = theMeshOnEntity->myMeshName;
   const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
   MED::PFieldInfo aFieldInfo = theMed->GetPFieldInfo(aMeshInfo,
-                                                    theField->myId);
+                                                     theField->myId);
 
   MED::TGeom2Size aGeom2Size;
   MED::EEntiteMaillage aMEntity;
   theMed->GetNbTimeStamps(aFieldInfo,
-                         theMesh->myEntityInfo,
-                         aMEntity,
-                         aGeom2Size);
+                          theMesh->myEntityInfo,
+                          aMEntity,
+                          aGeom2Size);
 
   MED::PTimeStampInfo aTimeStampInfo = 
     theMed->GetPTimeStampInfo(aFieldInfo,
-                             aMEntity,
-                             aGeom2Size,
-                             theValForTime->myId);
+                              aMEntity,
+                              aGeom2Size,
+                              theValForTime->myId);
 
   MED::TKey2Gauss aKey2Gauss = GetKey2Gauss(theMed);
   MED::TMKey2Profile aMKey2Profile = GetMKey2Profile(theMed);
 
   MED::PTimeStampValueBase aTimeStampValue = 
     theMed->GetPTimeStampValue(aTimeStampInfo,
-                              aMKey2Profile,
-                              aKey2Gauss);
+                               aMKey2Profile,
+                               aKey2Gauss);
   
   InitProfile(theMed,
-             aMeshInfo,
-             aTimeStampValue,
-             theMeshOnEntity,
-             aMEntity,
-             aGeom2Size,
-             theValForTime);
+              aMeshInfo,
+              aTimeStampValue,
+              theMeshOnEntity,
+              aMEntity,
+              aGeom2Size,
+              theValForTime);
 
   LoadProfile(theMed,
-             theMesh,
-             aTimeStampValue,
-             theValForTime,
-             theMeshOnEntity);
+              theMesh,
+              aTimeStampValue,
+              theValForTime,
+              theMeshOnEntity);
   
   if(theIsGauss) {
     InitGaussMesh(aTimeStampValue,
-                 theMeshOnEntity,
-                 aGeom2Size,
-                 theValForTime);
+                  theMeshOnEntity,
+                  aGeom2Size,
+                  theValForTime);
 
     LoadGaussMesh(theMed,
-                 theMesh,
-                 aTimeStampValue,
-                 theValForTime,
-                 theMeshOnEntity);
+                  theMesh,
+                  aTimeStampValue,
+                  theValForTime,
+                  theMeshOnEntity);
   }
   
   VISU::PMEDProfile aProfile = theValForTime->myProfile;
   VISU::TGeom2SubProfile& aGeom2SubProfile = aProfile->myGeom2SubProfile;
 
   INITMSGA(MYDEBUG,0,
-          "- aMeshName = '"<<aMeshName<<"'"<<
-          "; aFieldName = '"<<aFieldInfo->GetName()<<"'"<<
-          "; aMEntity = "<<aMEntity<<
-          "; aNbComp = "<<theField->myNbComp<<
-          endl);
+           "- aMeshName = '"<<aMeshName<<"'"<<
+           "; aFieldName = '"<<aFieldInfo->GetName()<<"'"<<
+           "; aMEntity = "<<aMEntity<<
+           "; aNbComp = "<<theField->myNbComp<<
+           endl);
 
   if(aFieldInfo->GetType() == MED::eFLOAT64)
     FillValForTime<MED::TFloatTimeStampValue>(CastToFloatTimeStampValue(aTimeStampValue),
-                                             aGeom2SubProfile,
-                                             theValForTime,
-                                             theField);
+                                              aGeom2SubProfile,
+                                              theValForTime,
+                                              theField);
   else
     FillValForTime<MED::TIntTimeStampValue>(CastToIntTimeStampValue(aTimeStampValue),
-                                           aGeom2SubProfile,
-                                           theValForTime,
-                                           theField);
+                                            aGeom2SubProfile,
+                                            theValForTime,
+                                            theField);
   theIsDone = true;
 
   return 1; 
@@ -3124,19 +3175,19 @@ LoadValForTime(const MED::PWrapper& theMed,
 int 
 VISU_MedConvertor
 ::LoadValForTimeOnMesh(const MED::PWrapper& theMed,
-                      VISU::PMEDMesh theMesh,
-                      VISU::PMEDMeshOnEntity theMeshOnEntity,
-                      VISU::PMEDField theField, 
-                      VISU::PMEDValForTime theValForTime)
+                       VISU::PMEDMesh theMesh,
+                       VISU::PMEDMeshOnEntity theMeshOnEntity,
+                       VISU::PMEDField theField, 
+                       VISU::PMEDValForTime theValForTime)
 {
   VISU::PUnstructuredGridIDMapperImpl anUnstructuredGridIDMapper = theValForTime->myUnstructuredGridIDMapper;
   return LoadValForTime(theMed,
-                       theMesh,
-                       theMeshOnEntity,
-                       theField,
-                       theValForTime,
-                       false,
-                       anUnstructuredGridIDMapper->myIsVTKDone);
+                        theMesh,
+                        theMeshOnEntity,
+                        theField,
+                        theValForTime,
+                        false,
+                        anUnstructuredGridIDMapper->myIsVTKDone);
 }
 
 
@@ -3144,17 +3195,17 @@ VISU_MedConvertor
 int 
 VISU_MedConvertor
 ::LoadValForTimeOnGaussPts(const MED::PWrapper& theMed,
-                          VISU::PMEDMesh theMesh,
-                          VISU::PMEDMeshOnEntity theMeshOnEntity,
-                          VISU::PMEDField theField, 
-                          VISU::PMEDValForTime theValForTime)
+                           VISU::PMEDMesh theMesh,
+                           VISU::PMEDMeshOnEntity theMeshOnEntity,
+                           VISU::PMEDField theField, 
+                           VISU::PMEDValForTime theValForTime)
 {
   VISU::PGaussPtsIDFilter aGaussPtsIDFilter = theValForTime->myGaussPtsIDFilter;
   return LoadValForTime(theMed,
-                       theMesh,
-                       theMeshOnEntity,
-                       theField,
-                       theValForTime,
-                       true,
-                       aGaussPtsIDFilter->myIsVTKDone);
+                        theMesh,
+                        theMeshOnEntity,
+                        theField,
+                        theValForTime,
+                        true,
+                        aGaussPtsIDFilter->myIsVTKDone);
 }