]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To improve handling of ELNO data
authorapo <apo@opencascade.com>
Wed, 30 Apr 2008 07:46:47 +0000 (07:46 +0000)
committerapo <apo@opencascade.com>
Wed, 30 Apr 2008 07:46:47 +0000 (07:46 +0000)
src/CONVERTOR/VISU_Convertor.hxx
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_Convertor_impl.hxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/CONVERTOR/VISU_MeshValue.cxx
src/CONVERTOR/VISU_MeshValue.hxx
src/CONVERTOR/VISU_Structures.hxx
src/CONVERTOR/VISU_Structures_impl.cxx
src/CONVERTOR/VISU_Structures_impl.hxx

index 0ee92fe3bbac52ae76aa17e2d0188ac36d28e095..cad044cb63c061a6a2fe4299f3c2209f7d63d4be 100644 (file)
@@ -138,10 +138,10 @@ public:
   //! Get mesh with attached values for corresponding MED TIMESTAMP
   virtual
   VISU::PUnstructuredGridIDMapper 
-  GetTimeStampOnMesh(const std::string& theMeshName, 
-                    const VISU::TEntity& theEntity,
-                    const std::string& theFieldName,
-                    int theTimeStampNumber) = 0;
+  GetTimeStampOnMesh( const std::string& theMeshName, 
+                     const VISU::TEntity& theEntity,
+                     const std::string& theFieldName,
+                     int theTimeStampNumber ) = 0;
 
   //! Get Gauss Points mesh with attached values for corresponding MED TIMESTAMP
   virtual
index ad0f502a247b1e47d4e934a9d43c7973ce80746f..e9ecb27b657ffb5d28cc192484f6cbcfdb21370a 100644 (file)
@@ -847,82 +847,63 @@ VISU_Convertor_impl
 //---------------------------------------------------------------
 vtkUnstructuredGrid*
 VISU_Convertor_impl
-::GetTimeStampOnProfile(const VISU::PMeshImpl& theMesh,
-                       const VISU::PMeshOnEntityImpl& theMeshOnEntity,
-                       const VISU::PFieldImpl& theField,
-                       const VISU::PValForTimeImpl& theValForTime,
-                       const VISU::PUnstructuredGridIDMapperImpl& theUnstructuredGridIDMapper,
-                       const VISU::PProfileImpl& theProfile,
-                       const VISU::TEntity& theEntity)
+::GetTimeStampOnProfile( const VISU::PMeshImpl& theMesh,
+                        const VISU::PMeshOnEntityImpl& theMeshOnEntity,
+                        const VISU::PFieldImpl& theField,
+                        const VISU::PValForTimeImpl& theValForTime,
+                        const VISU::PUnstructuredGridIDMapperImpl& theUnstructuredGridIDMapper,
+                        const VISU::PProfileImpl& theProfile,
+                        const VISU::TEntity& theEntity )
 {
-  vtkUnstructuredGrid* anOutput = NULL;
-  
-  LoadMeshOnEntity(theMesh, theMeshOnEntity);
-  GetMeshOnEntity(theMeshOnEntity->myMeshName, theMeshOnEntity->myEntity);
-  GetMeshOnProfile(theMesh, theMeshOnEntity, theProfile);
-  
-  bool isNeedInCells = false;
+  LoadMeshOnEntity( theMesh, theMeshOnEntity );
+  GetMeshOnEntity( theMeshOnEntity->myMeshName, theMeshOnEntity->myEntity );
+  GetMeshOnProfile( theMesh, theMeshOnEntity, theProfile );
   
   theUnstructuredGridIDMapper->myIDMapper = theProfile;
-  if(theMeshOnEntity->myEntity == VISU::NODE_ENTITY){
+
+  if ( theMeshOnEntity->myEntity == VISU::NODE_ENTITY ) {
     // add geometry elements to output,
     // if timestamp on NODE_ENTITY and
     // on profiles with status eAddPart
-    VISU::TGeom2SubProfile::const_iterator anIter = theProfile->myGeom2SubProfile.begin();
-    for(; anIter != (theProfile->myGeom2SubProfile).end(); anIter++){
-      const VISU::EGeometry aGeom = anIter->first;
-      const VISU::PSubProfileImpl aSubProfile = anIter->second;
-      if(aSubProfile->myStatus == VISU::eAddPart && aGeom == VISU::ePOINT1){
-       isNeedInCells = true;
-       break;
+    const VISU::TGeom2SubProfile& aGeom2SubProfile = theProfile->myGeom2SubProfile;
+    VISU::TGeom2SubProfile::const_iterator aSubProfileIter = aGeom2SubProfile.begin();
+    for ( ; aSubProfileIter != aGeom2SubProfile.end(); aSubProfileIter++ ) {
+      const VISU::EGeometry& aGeom = aSubProfileIter->first;
+      const VISU::PSubProfileImpl& aSubProfile = aSubProfileIter->second;
+      if ( aSubProfile->myStatus == VISU::eAddPart && aGeom == VISU::ePOINT1 ) {
+       const VISU::TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
+       VISU::TMeshOnEntityMap::const_reverse_iterator aMeshOnEntityIter = aMeshOnEntityMap.rbegin();
+       for( ; aMeshOnEntityIter != aMeshOnEntityMap.rend(); aMeshOnEntityIter++ ) {
+         VISU::TEntity anEntity = aMeshOnEntityIter->first;
+         if ( anEntity == VISU::NODE_ENTITY )
+           continue;
+         VISU::PNamedIDMapper aNamedIDMapper = GetMeshOnEntity( theMesh->myName, anEntity );
+         if( aNamedIDMapper ) {
+           theUnstructuredGridIDMapper->SetReferencedMesh( aNamedIDMapper );
+           VISU::PUnstructuredGrid aSource = theUnstructuredGridIDMapper->GetSource();
+           VISU::GetTimeStampOnProfile( aSource, theField, theValForTime, theEntity );
+           
+           return theUnstructuredGridIDMapper->GetUnstructuredGridOutput();
+         }
+       }
       }
     }
-    if(isNeedInCells){
-      theUnstructuredGridIDMapper->myIsSpecialKey = true;
-      GetTimeStampOnNodalProfile(theMesh,theUnstructuredGridIDMapper,theField,theValForTime,theEntity);
-      anOutput = theUnstructuredGridIDMapper->GetUnstructuredGridOutput();
-    }
-  }
-  if(!isNeedInCells){
-    vtkUnstructuredGrid* anOutput = theUnstructuredGridIDMapper->GetUnstructuredGridOutput();
-    const VISU::PUnstructuredGrid& aSource = theUnstructuredGridIDMapper->mySource.GetSource();
-    //VISU::GetTimeStampOnProfile(aSource, theField, theValForTime, theEntity);
-     VISU::GetElnoTimeStamp(aSource, theField, theValForTime, theEntity);
   }
-  return anOutput;
-}
 
-void
-VISU_Convertor_impl
-::GetTimeStampOnNodalProfile(const VISU::PMeshImpl& theMesh,
-                             const VISU::PUnstructuredGridIDMapperImpl& theIDMapperFilter,
-                             const VISU::PFieldImpl& theField, 
-                             const VISU::PValForTimeImpl& theValForTime,
-                             const VISU::TEntity& theEntity)
-{
-  const VISU::TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
-  VISU::TMeshOnEntityMap::const_iterator aIter = aMeshOnEntityMap.begin();
-  for(;aIter!=aMeshOnEntityMap.end();aIter++){
-    VISU::TEntity aEntity = aIter->first;
-    if(aEntity != VISU::NODE_ENTITY){
-      VISU::PNamedIDMapper aMapper = GetMeshOnEntity(theMesh->myName,aEntity);
-      if(aMapper)
-        theIDMapperFilter->myMappers[aEntity] = aMapper;
-    }
-  }
+  VISU::PUnstructuredGrid aSource = theUnstructuredGridIDMapper->GetSource();
+  VISU::GetTimeStampOnProfile( aSource, theField, theValForTime, theEntity );
 
-  theIDMapperFilter->GetUnstructuredGridOutput();
-  const VISU::PUnstructuredGrid& aSource = theIDMapperFilter->mySource.GetSource();
-  VISU::GetTimeStampOnProfile(aSource,theField,theValForTime,theEntity);
+  return theUnstructuredGridIDMapper->GetUnstructuredGridOutput();
 }
 
+
 //---------------------------------------------------------------
 VISU::PUnstructuredGridIDMapper 
 VISU_Convertor_impl
-::GetTimeStampOnMesh(const std::string& theMeshName, 
-                    const VISU::TEntity& theEntity,
-                    const std::string& theFieldName,
-                    int theStampsNum)
+::GetTimeStampOnMesh( const std::string& theMeshName, 
+                     const VISU::TEntity& theEntity,
+                     const std::string& theFieldName,
+                     int theStampsNum )
 {
   INITMSG(MYDEBUG,"GetTimeStampOnMesh"<<
          "; theMeshName = '"<<theMeshName<<"'"<<
@@ -1059,9 +1040,9 @@ VISU_Convertor_impl
 
       aGaussPtsIDFilter->myIDMapper = aGaussMesh;
       aGaussPtsIDFilter->myGaussPtsIDMapper = aGaussMesh;
-      vtkPolyData* anOutput = aGaussPtsIDFilter->GetPolyDataOutput();
-      const VISU::PPolyData& aSource = aGaussPtsIDFilter->mySource.GetSource();
+      VISU::PPolyData aSource = aGaussPtsIDFilter->GetSource();
       VISU::GetTimeStampOnGaussMesh(aSource, aField, aValForTime);
+      vtkPolyData* anOutput = aGaussPtsIDFilter->GetPolyDataOutput();
 
       aGaussPtsIDFilter->myIsVTKDone = true;
 
@@ -1361,29 +1342,29 @@ VISU_Convertor_impl
 
   VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
   VISU::PMeshOnEntityImpl aVTKMeshOnEntity = aMeshOnEntity;
-  if(theEntity == VISU::NODE_ENTITY){
-    if(aMeshOnEntityMap.find(VISU::CELL_ENTITY) != aMeshOnEntityMap.end())
-      aVTKMeshOnEntity = aMeshOnEntityMap[VISU::CELL_ENTITY];
-    else if(aMeshOnEntityMap.find(VISU::FACE_ENTITY) != aMeshOnEntityMap.end())
-      aVTKMeshOnEntity = aMeshOnEntityMap[VISU::FACE_ENTITY];
-    else if(aMeshOnEntityMap.find(VISU::EDGE_ENTITY) != aMeshOnEntityMap.end())
-      aVTKMeshOnEntity = aMeshOnEntityMap[VISU::EDGE_ENTITY];
-    else if(aMeshOnEntityMap.find(VISU::NODE_ENTITY) != aMeshOnEntityMap.end())
-      aVTKMeshOnEntity = aMeshOnEntityMap[VISU::NODE_ENTITY];
+  if ( theEntity == VISU::NODE_ENTITY ) {
+    if(aMeshOnEntityMap.find( VISU::CELL_ENTITY ) != aMeshOnEntityMap.end())
+      aVTKMeshOnEntity = aMeshOnEntityMap[ VISU::CELL_ENTITY ];
+    else if (aMeshOnEntityMap.find( VISU::FACE_ENTITY ) != aMeshOnEntityMap.end() )
+      aVTKMeshOnEntity = aMeshOnEntityMap[ VISU::FACE_ENTITY ];
+    else if (aMeshOnEntityMap.find( VISU::EDGE_ENTITY ) != aMeshOnEntityMap.end() )
+      aVTKMeshOnEntity = aMeshOnEntityMap[ VISU::EDGE_ENTITY ];
+    else if ( aMeshOnEntityMap.find( VISU::NODE_ENTITY ) != aMeshOnEntityMap.end() )
+      aVTKMeshOnEntity = aMeshOnEntityMap[ VISU::NODE_ENTITY ];
   }else
     aVTKMeshOnEntity = aMeshOnEntity;
   
   VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
-  VISU::TFieldMap::const_iterator aFieldIter= aFieldMap.find(theFieldName);
+  VISU::TFieldMap::const_iterator aFieldIter= aFieldMap.find( theFieldName );
   if(aFieldIter == aFieldMap.end())
     EXCEPTION(std::runtime_error,"FindField >> There is no field on the mesh!!!");
   
   VISU::PFieldImpl aField = aFieldIter->second;
 
-  return TFindField(aMesh,
-                   aMeshOnEntity,
-                   aVTKMeshOnEntity,
-                   aField);
+  return TFindField( aMesh,
+                    aMeshOnEntity,
+                    aVTKMeshOnEntity,
+                    aField );
 }
 
 
index f6cffc0e99736c3b61e37c867ef605327d311c19..14beaf5ea3af7c0c09fdff48fe3442ed2a38caae 100644 (file)
@@ -120,10 +120,10 @@ public:
   //! Implemention of the VISU_Convertor::GetTimeStampOnMesh
   virtual
   VISU::PUnstructuredGridIDMapper 
-  GetTimeStampOnMesh(const std::string& theMeshName, 
-                    const VISU::TEntity& theEntity,
-                    const std::string& theFieldName,
-                    int theTimeStampNumber);
+  GetTimeStampOnMesh( const std::string& theMeshName, 
+                     const VISU::TEntity& theEntity,
+                     const std::string& theFieldName,
+                     int theTimeStampNumber );
 
   //! Get amount of memory to build vtkDataSet for corresponding MED TIMESTAMP on mesh
   virtual 
@@ -206,9 +206,9 @@ protected:
                       VISU::PMeshOnEntityImpl,
                       VISU::PFieldImpl> TFindField;
   TFindField
-  FindField(const std::string& theMeshName, 
-           const VISU::TEntity& theEntity, 
-           const std::string& theFieldName);
+  FindField( const std::string& theMeshName, 
+            const VISU::TEntity& theEntity, 
+            const std::string& theFieldName );
 
   //! An utility method to find TTimeStamp by name of its parent mesh, corresponding entity, field name and its number
   typedef boost::tuple<VISU::PMeshImpl,
@@ -223,21 +223,14 @@ protected:
                int theStampsNum);
 
   vtkUnstructuredGrid*
-  GetTimeStampOnProfile(const VISU::PMeshImpl& theMesh,
-                       const VISU::PMeshOnEntityImpl& theMeshOnEntity,
-                       const VISU::PFieldImpl& theField,
-                       const VISU::PValForTimeImpl& theValForTime,
-                       const VISU::PUnstructuredGridIDMapperImpl& theIDMapperFilter,
-                       const VISU::PProfileImpl& theProfile,
-                       const VISU::TEntity& theEntity);
-
-  void
-  GetTimeStampOnNodalProfile(const VISU::PMeshImpl& theMesh,
-                             const VISU::PUnstructuredGridIDMapperImpl& theIDMapperFilter,
-                             const VISU::PFieldImpl& theField, 
-                             const VISU::PValForTimeImpl& theValForTime,
-                             const VISU::TEntity& theEntity);
-  
+  GetTimeStampOnProfile( const VISU::PMeshImpl& theMesh,
+                        const VISU::PMeshOnEntityImpl& theMeshOnEntity,
+                        const VISU::PFieldImpl& theField,
+                        const VISU::PValForTimeImpl& theValForTime,
+                        const VISU::PUnstructuredGridIDMapperImpl& theIDMapperFilter,
+                        const VISU::PProfileImpl& theProfile,
+                        const VISU::TEntity& theEntity );
+
 protected:
   //! Implemention of the VISU_Convertor::GetTimeStampSize
   virtual 
index 77f1d06c8bda82521562fe8423947249e60c5a24..3c00f272fd56bd2090a4e16511b1af2810276c83 100644 (file)
@@ -140,16 +140,29 @@ namespace
 
   //---------------------------------------------------------------
   VISU::TEntity
-  MEDEntityToVTK(MED::EEntiteMaillage theMEDEntity)
+  MEDEntityToVTK( MED::EEntiteMaillage theMEDEntity )
   {
+    VISU::TEntity anEntity = VISU::TEntity( -1 );
+
     switch(theMEDEntity){
-    case MED::eNOEUD: return VISU::NODE_ENTITY;
-    case MED::eARETE: return VISU::EDGE_ENTITY;
-    case MED::eFACE: return VISU::FACE_ENTITY;
-    case MED::eNOEUD_ELEMENT:
-    case MED::eMAILLE: return VISU::CELL_ENTITY;
+    case MED::eNOEUD :
+      anEntity = VISU::NODE_ENTITY;
+      break;
+    case MED::eARETE : 
+      anEntity = VISU::EDGE_ENTITY;
+      break;
+    case MED::eFACE : 
+      anEntity = VISU::FACE_ENTITY;
+      break;
+    case MED::eMAILLE : 
+      anEntity = VISU::CELL_ENTITY;
+      break;
+    case MED::eNOEUD_ELEMENT :
+      anEntity = VISU::CELL_ENTITY;
+      break;
     }
-    return VISU::TEntity(-1);
+
+    return anEntity;
   }
 
 
@@ -757,9 +770,9 @@ namespace
       if(aNbTimeStamps < 1)
        continue;
       
-      VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity);
+      VISU::TEntity aVEntity = MEDEntityToVTK( aMEntity );
       vtkIdType aDataType = VTK_DOUBLE;
-      if(aFieldInfo->GetType() != MED::eFLOAT64){
+      if ( aFieldInfo->GetType() != MED::eFLOAT64 ) {
 #if defined(HAVE_F77INT64)
        aDataType = VTK_LONG;
 #else  
@@ -775,6 +788,7 @@ namespace
       aField->myName = aFieldName;
       aField->myMeshName = aMeshName;
       aField->myDataSize = aMeshOnEntity->myNbCells * aNbComp;
+      aField->myIsELNO = true; // To set it true by default
       
       INITMSG(MYDEBUG,"myName = '"<<aField->myName<<"'"<<
              "; myId = "<<aField->myId<<
@@ -816,11 +830,18 @@ namespace
        MED::TGeom2NbGauss::const_iterator anIter = aMGeom2NbGauss.begin();
        for(; anIter != aMGeom2NbGauss.end(); anIter++){
          const MED::EGeometrieElement& aMGeom = anIter->first;
-         VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+         VISU::EGeometry aEGeom = MEDGeom2VISU( aMGeom );
          TInt aNbGauss = anIter->second;
-         aVGeom2NbGauss[aEGeom] = aNbGauss;
+         aVGeom2NbGauss[ aEGeom ] = aNbGauss;
+
+         // ELNO data should satisfy the following condition ( implcitly )
+         vtkIdType aNbNodes = MEDGeom2NbNodes( aMGeom );
+         aField->myIsELNO &= ( aNbGauss == aNbNodes );
        }
       }
+
+      // ELNO data should satisfy the following condition ( explicitly )
+      aField->myIsELNO |= ( aMEntity == MED::eNOEUD_ELEMENT );
     }
   }
 
index 195f333ce240b37419b73350ce3cf646fab4388e..ac4bc0f4e74b6e5b49082af716b29a7c31d41183 100644 (file)
@@ -337,6 +337,88 @@ namespace VISU
   };
 
 
+  //----------------------------------------------------------------------------
+  template<int EDataType>
+  struct TTimeStampOnElnoInitArray
+  {
+    typedef typename TL::TEnum2VTKArrayType<EDataType>::TResult TVTKDataArray;
+    typedef typename TL::TEnum2VTKBasicType<EDataType>::TResult TVTKBasicType;
+    typedef TTMeshValue<TVTKBasicType> TMeshValue;
+    typedef MED::SharedPtr<TMeshValue> TMeshValuePtr;
+
+    typedef TDataArrayHolder<EDataType> TTDataArrayHolder;
+    typedef MED::SharedPtr<TTDataArrayHolder> PDataArrayHolder;
+    PDataArrayHolder myDataArrayHolder;
+    vtkIntArray *myComponentMapper;
+    vtkIdType myComponentStep;
+
+    TTimeStampOnElnoInitArray( const PDataArrayHolder& theDataArrayHolder, 
+                              vtkIntArray* theComponentMapper,
+                              vtkIdType theComponentStep )
+      : myDataArrayHolder(theDataArrayHolder)
+      , myComponentMapper( theComponentMapper )
+      , myComponentStep( theComponentStep )
+    {}
+
+    void
+    Execute( const PFieldImpl& theField,
+            const PValForTimeImpl& theValForTime )
+    {
+      TVector<TVTKBasicType> aDataValues( myComponentStep );
+      
+      vtkIdType aNextStartId = 0;
+      vtkIdType aNbComp = theField->myNbComp;
+      int aTuples[3] = { aNextStartId, aNbComp, -1 };
+
+      vtkIdType aComponentCount = 0, aTupleId = 0, aComponentTupleId = 0;
+      const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
+      TGeom2MeshValue::const_iterator anIter = aGeom2MeshValue.begin();
+      for ( ; anIter != aGeom2MeshValue.end(); anIter++ ) {
+       EGeometry aEGeom = anIter->first;
+       const TMeshValuePtr aMeshValue = anIter->second;
+       
+       vtkIdType aNbElem = aMeshValue->GetNbElem();
+       vtkIdType aNbGauss = aMeshValue->GetNbGauss();
+        aTuples[ 2 ] = aNbGauss;
+       
+       INITMSG(MYDEBUG,
+               "- aEGeom = "<<aEGeom<<
+               "; aNbElem = "<<aNbElem<<
+               "; aNbGauss = "<<aNbGauss<<
+               std::endl);
+
+       for ( vtkIdType iElem = 0; iElem < aNbElem; iElem++ ) {
+          const typename TMeshValue::TValueSliceArr& aValueSliceArr = aMeshValue->GetGaussValueSliceArr( iElem );
+          
+          for( vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++ ) {
+            const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[ iGauss ];
+            
+            for( vtkIdType iComp = 0; iComp < aNbComp; iComp++ ) {
+              aDataValues[ aComponentCount ] = aValueSlice[ iComp ];
+              aComponentCount++;
+
+              if ( aComponentCount == myComponentStep ) {
+                this->myDataArrayHolder->SetTuple( aTupleId, &aDataValues[0] );
+                aComponentCount = 0;
+                aTupleId++;
+              }
+            }
+          }
+
+          aTuples[ 0 ] = aNextStartId;
+          aNextStartId = aTuples[ 0 ] + aNbGauss * aNbComp; 
+
+         this->myComponentMapper->InsertTupleValue( aComponentTupleId, aTuples );
+         aComponentTupleId++;
+       }
+
+        if ( aComponentCount > 0 )
+          this->myDataArrayHolder->SetTuple( aTupleId, &aDataValues[0] );
+      }
+    }
+  };
+
+
   //----------------------------------------------------------------------------
   template<int EDataType>
   void 
@@ -373,33 +455,34 @@ namespace VISU
     aSelectedDataArray->SetName(aFieldName.c_str());
 
     TVTKDataArray *aFullDataArray = TVTKDataArray::New();
-    aFullDataArray->SetNumberOfComponents(aNbComp);
-    aFullDataArray->SetNumberOfTuples(aNbTuples);
-    aFullDataArray->SetName("VISU_FIELD");
-    aDataSetAttributes->AddArray(aFullDataArray);
+    aFullDataArray->SetNumberOfComponents( aNbComp );
+    aFullDataArray->SetNumberOfTuples( aNbTuples );
+    aFullDataArray->SetName( "VISU_FIELD" );
+    aDataSetAttributes->AddArray( aFullDataArray );
 
     INITMSG(MYDEBUG,"InitTimeStampOnProfile "<<
            "- theEntity = "<<theEntity<<
            "; aNbTuples = "<<aNbTuples<<
            "; aNbComp = "<<aNbComp<<
            std::endl);
+
     TTimerLog aTimerLog(MYDEBUG,"InitTimeStampOnProfile");
     
     const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
-    typedef typename TL::TEnum2VTKBasicType<EDataType>::TResult TVTKBasicType;
-    typedef TTMeshValue<TVTKBasicType> TMeshValue;
-    typedef MED::SharedPtr<TMeshValue> TMeshValuePtr;
+    typedef typename TL::TEnum2VTKBasicType< EDataType >::TResult TVTKBasicType;
+    typedef TTMeshValue< TVTKBasicType > TMeshValue;
+    typedef MED::SharedPtr< TMeshValue > TMeshValuePtr;
 
-    typedef TDataArrayHolder<EDataType> TTDataArrayHolder;
-    typedef MED::SharedPtr<TTDataArrayHolder> PDataArrayHolder;
+    typedef TDataArrayHolder< EDataType > TTDataArrayHolder;
+    typedef MED::SharedPtr< TTDataArrayHolder > PDataArrayHolder;
 
     TMeshValuePtr aMeshValue = theValForTime->GetFirstMeshValue();
-    if(aGeom2MeshValue.size() == 1 && aMeshValue->GetNbGauss() == 1){
+    if ( aGeom2MeshValue.size() == 1 && aMeshValue->GetNbGauss() == 1 ) {
       aFullDataArray->SetVoidArray(aMeshValue->GetPointer(),
                                   aMeshValue->size(),
                                   true);
       INITMSG(MYDEBUG,"InitTimeStampOnProfile - aFullDataArray->SetVoidArray()"<<std::endl);
-      if(aNbComp == 1){
+      if ( aNbComp == 1 ) {
        aSelectedDataArray->SetVoidArray(aMeshValue->GetPointer(),
                                         aMeshValue->size(),
                                         true);
@@ -416,6 +499,37 @@ namespace VISU
 
     aSelectedDataArray->Delete();
     aFullDataArray->Delete();
+
+    // Process the case for ELNO data
+    if ( theField->myIsELNO ) {
+      vtkIdType aEffectNbTuples = 0;
+      TGeom2MeshValue::const_iterator anIter = aGeom2MeshValue.begin();
+      for ( ; anIter != aGeom2MeshValue.end(); anIter++ ) {
+       const PMeshValue& aMeshValue = anIter->second;
+       aEffectNbTuples += aMeshValue->GetNbElem() * aMeshValue->GetNbGauss();
+      }
+      vtkIdType aEffectNbComp = ( aEffectNbTuples * aNbComp ) / aNbTuples + 1;
+    
+      vtkIntArray *aComponentMapper = vtkIntArray::New();
+      aComponentMapper->SetNumberOfComponents( 3 );
+      aComponentMapper->SetNumberOfTuples( aNbTuples );
+      //{ [ aStartId , aNbComp, aNbRefPoints ], ..., ... , [ ... ] }
+      aComponentMapper->SetName( "ELNO_COMPONENT_MAPPER" );
+      aDataSetAttributes->AddArray( aComponentMapper );    
+      
+      TVTKDataArray *aFullDataArray = TVTKDataArray::New();
+      aFullDataArray->SetNumberOfComponents( aEffectNbComp );
+      aFullDataArray->SetNumberOfTuples( aNbTuples );
+      aFullDataArray->SetName( "ELNO_FIELD" );
+      aDataSetAttributes->AddArray( aFullDataArray );    
+
+      typedef TDataArrayHolder< EDataType > TTDataArrayHolder;
+      PDataArrayHolder aDataArrayHolder( new TTDataArrayHolder( aFullDataArray ) );
+      TTimeStampOnElnoInitArray< EDataType >( aDataArrayHolder, aComponentMapper, aEffectNbComp ).Execute(theField, theValForTime);
+
+      aComponentMapper->Delete();
+      aFullDataArray->Delete();
+    }
   }
 
 
@@ -611,201 +725,5 @@ namespace VISU
   }
 
   
-  //---------------------------------------------------------------
-  template<int EDataType>
-  void 
-  InitElnoTimeStamp(const PUnstructuredGrid& theSource,
-                        const PFieldImpl& theField, 
-                        const PValForTimeImpl& theValForTime,
-                        const VISU::TEntity& theEntity);
-
-
   //----------------------------------------------------------------------------
-  void 
-  GetElnoTimeStamp(const PUnstructuredGrid& theSource,
-                       const PFieldImpl& theField, 
-                       const PValForTimeImpl& theValForTime,
-                       const VISU::TEntity& theEntity)
-  {
-    vtkIdType aDataType = theField->GetDataType();
-    switch(aDataType){
-    case VTK_DOUBLE:
-      InitElnoTimeStamp<VTK_DOUBLE>(theSource, theField, theValForTime, theEntity);
-      break;
-    case VTK_FLOAT:
-      InitElnoTimeStamp<VTK_FLOAT>(theSource, theField, theValForTime, theEntity);
-      break;
-    case VTK_INT:
-      InitElnoTimeStamp<VTK_INT>(theSource, theField, theValForTime, theEntity);
-      break;
-    case VTK_LONG:
-      InitElnoTimeStamp<VTK_LONG>(theSource, theField, theValForTime, theEntity);
-      break;
-    default:
-      EXCEPTION(std::runtime_error,
-               "GetElnoTimeStamp - handling unsupported data type - "<<aDataType);
-    }
-  }
-
-  //----------------------------------------------------------------------------
-  template<int EDataType>
-  struct TTimeStampOnElnoInitArray
-  {
-    typedef typename TL::TEnum2VTKArrayType<EDataType>::TResult TVTKDataArray;
-    typedef typename TL::TEnum2VTKBasicType<EDataType>::TResult TVTKBasicType;
-    typedef TTMeshValue<TVTKBasicType> TMeshValue;
-    typedef MED::SharedPtr<TMeshValue> TMeshValuePtr;
-
-    typedef TDataArrayHolder<EDataType> TTDataArrayHolder;
-    typedef MED::SharedPtr<TTDataArrayHolder> PDataArrayHolder;
-    PDataArrayHolder myDataArrayHolder;
-    vtkIntArray *myComponentMapper;
-    vtkIdType myComponentStep;
-
-    TTimeStampOnElnoInitArray(const PDataArrayHolder& theDataArrayHolder, vtkIntArray * aComponentMapper=0):
-      myDataArrayHolder(theDataArrayHolder),
-      myComponentStep(0),
-      myComponentMapper(aComponentMapper)
-    {}
-
-    void SetComponentStep(vtkIdType& theStep){
-      myComponentStep = theStep;
-    }
-
-    void
-    Execute(const PFieldImpl& theField,
-           const PValForTimeImpl& theValForTime)
-    {
-      vtkIdType aNbComp = theField->myNbComp;
-      TVector<TVTKBasicType> aDataValues(myComponentStep+1);
-      
-      vtkIdType componentCount=0,aTupleId=0,aNextStartId=0,aComponentTupleId=0;
-      int theTuple[3] = {aNextStartId,
-                         theField->myNbComp,
-                         0};
-
-      const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
-      TGeom2MeshValue::const_iterator anIter = aGeom2MeshValue.begin();
-      for(; anIter != aGeom2MeshValue.end(); anIter++){
-       EGeometry aEGeom = anIter->first;
-       const TMeshValuePtr aMeshValue = anIter->second;
-       
-       vtkIdType aNbElem = aMeshValue->GetNbElem();
-       vtkIdType aNbGauss = aMeshValue->GetNbGauss();
-       
-       INITMSG(MYDEBUG,
-               "- aEGeom = "<<aEGeom<<
-               "; aNbElem = "<<aNbElem<<
-               "; aNbGauss = "<<aNbGauss<<
-               std::endl);
-        theTuple[2] = aNbGauss;
-       for(vtkIdType iElem = 0; iElem < aNbElem; iElem++) {
-          const typename TMeshValue::TValueSliceArr& aValueSliceArr = aMeshValue->GetGaussValueSliceArr(iElem);
-          
-          for( vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++ ) {
-            const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iGauss];
-            
-            for( vtkIdType iComp = 0; iComp < aNbComp; iComp++ ) {
-              aDataValues[componentCount] = aValueSlice[iComp];
-              componentCount++;
-
-              if(componentCount == myComponentStep ) {
-                this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
-                componentCount=0;
-                aTupleId++;
-              }
-            }
-          }
-          theTuple[0]=aNextStartId;
-          if(this->myComponentMapper) {
-            this->myComponentMapper->InsertTupleValue(aComponentTupleId,theTuple);
-            aComponentTupleId++;
-          }
-          aNextStartId=theTuple[1]*theTuple[2]+theTuple[0]; 
-       }
-        if(componentCount > 0)
-          this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
-      }
-    }
-  };
-
-  //----------------------------------------------------------------------------
-  template<int EDataType>
-  void 
-  InitElnoTimeStamp(const PUnstructuredGrid& theSource,
-                    const PFieldImpl& theField, 
-                    const PValForTimeImpl& theValForTime,
-                    const VISU::TEntity& theEntity)
-  {
-    vtkIdType aNbTuples = theField->myDataSize / theField->myNbComp;
-    std::string aFieldName = VISU::GenerateFieldName(theField, theValForTime);
-    
-    vtkDataSetAttributes* aDataSetAttributes = theSource->GetCellData();
-    
-
-    typedef typename TL::TEnum2VTKArrayType<EDataType>::TResult TVTKDataArray;
-    TVTKDataArray *aSelectedDataArray = TVTKDataArray::New();
-    vtkIdType aNbComp = theField->myNbComp;
-
-    //Calculate Effective Nb of Tuples 
-    const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
-    TGeom2MeshValue::const_iterator anIter = aGeom2MeshValue.begin();
-    vtkIdType aEffectNbTuples = 0;
-    for(;anIter != aGeom2MeshValue.end(); anIter++){
-      aEffectNbTuples += anIter->second->GetNbElem()*anIter->second->GetNbGauss();
-    }
-    
-    //Calculate Effective Nb of Components
-    vtkIdType aEffectNbComp = (aEffectNbTuples*aNbComp)/aNbTuples+1;
-    
-    aSelectedDataArray->SetNumberOfComponents(aEffectNbComp);
-    aDataSetAttributes->SetVectors(aSelectedDataArray);
-
-    aSelectedDataArray->SetNumberOfTuples(aNbTuples);
-    aSelectedDataArray->SetName(aFieldName.c_str());
-    
-    //Add in the data set attributes array to restore
-    //real Nb of Components 
-    vtkIntArray *aComponentMapper = vtkIntArray::New();
-    aComponentMapper->SetNumberOfTuples(aNbTuples);
-    //Set 3 components:
-    //{[startId , realNbComponents, nbData], ..., ... ,[...]}
-    aComponentMapper->SetNumberOfComponents(3);
-    aComponentMapper->SetName("ELNO_COMPONENT_MAPPER");
-    aDataSetAttributes->AddArray(aComponentMapper);    
-
-    TVTKDataArray *aFullDataArray = TVTKDataArray::New();
-    aFullDataArray->SetNumberOfComponents(aEffectNbComp);
-    aFullDataArray->SetNumberOfTuples(aNbTuples);
-    aFullDataArray->SetName("ELNO_FIELD");
-    
-    aDataSetAttributes->AddArray(aFullDataArray);
-
-    INITMSG(MYDEBUG,"InitElnoTimeStamp "<<
-           "- theEntity = "<<theEntity<<
-           "; aNbTuples = "<<aNbTuples<<
-           "; aNbComp = "<<aNbComp<<
-           std::endl);
-    TTimerLog aTimerLog(MYDEBUG,"InitElnoTimeStamp");
-    
-    typedef typename TL::TEnum2VTKBasicType<EDataType>::TResult TVTKBasicType;
-    typedef TTMeshValue<TVTKBasicType> TMeshValue;
-    typedef MED::SharedPtr<TMeshValue> TMeshValuePtr;
-
-    typedef TDataArrayHolder<EDataType> TTDataArrayHolder;
-    typedef MED::SharedPtr<TTDataArrayHolder> PDataArrayHolder;
-
-    TMeshValuePtr aMeshValue = theValForTime->GetFirstMeshValue();
-    
-    typedef TDataArrayHolder2<EDataType> TTDataArrayHolder2;
-    PDataArrayHolder aDataArrayHolder(new TTDataArrayHolder2(aSelectedDataArray, aFullDataArray));
-    TTimeStampOnElnoInitArray<EDataType> aArrayInitializer(aDataArrayHolder,aComponentMapper);
-    aArrayInitializer.SetComponentStep(aEffectNbComp);
-    aArrayInitializer.Execute(theField, theValForTime);
-
-
-    aSelectedDataArray->Delete();
-    aFullDataArray->Delete();
-  }
-  
 }
index 1748c1a4fe1f5c4b079d86324dab5e38822b6a1f..f09fb783e36975d0effc28d7de7b717e4a0bd66a 100644 (file)
@@ -214,13 +214,6 @@ namespace VISU
 
 
   //---------------------------------------------------------------
-  // Initilize corresponding vtkDataSetAttributes for TValForTime
-  void
-  GetElnoTimeStamp(const PUnstructuredGrid& theSource,
-                     const PFieldImpl& theField,
-                     const PValForTimeImpl& theValForTime,
-                     const VISU::TEntity& theEntity);
-                                                                           
 }
 
 #endif
index 06d2fadcc2a4c14d580c614424f6649ffef31c1a..31f3e626e191e056c86422c39dbe66de29dbf4fd 100644 (file)
@@ -90,8 +90,6 @@ namespace VISU
 
     std::string myGroupsEntry; //!< To simplify publication of the groups in a data tree
     std::string myFieldsEntry; //!< To simplify publication of the fiels in a data tree
-       
-    // MULTIPR
     std::string myPartsEntry; //!< To simplify publication of the parts in a data tree
 
     TMesh();
@@ -99,8 +97,6 @@ namespace VISU
   typedef std::map<std::string, PMesh> TMeshMap;
 
 
-  typedef std::map<VISU::TEntity,VISU::PNamedIDMapper> PNamedIDMapperMap;
-
   //---------------------------------------------------------------
   //! Define a basic class which corresponds to MED PROFILE entity
   struct VISU_CONVERTOR_EXPORT TSubProfile: virtual TBaseStructure
index 88da9b1d73300379098a45b88f102d9f7850f83d..1b69db6643a0c58c661773c432b6f7642a059486 100644 (file)
@@ -632,10 +632,9 @@ namespace VISU
 
   //---------------------------------------------------------------
   TUnstructuredGridIDMapperImpl
-  ::TUnstructuredGridIDMapperImpl():
-    myIsSpecialKey(false)
+  ::TUnstructuredGridIDMapperImpl()
   {
-    if(!myCommonCellsFilter.GetPointer()){
+    if ( !myCommonCellsFilter.GetPointer() ) {
       myCommonCellsFilter = VISU_CommonCellsFilter::New();
       myCommonCellsFilter->Delete();
     }
@@ -683,48 +682,44 @@ namespace VISU
     return myIDMapper->GetElemCell(theObjID);
   }
   
-  vtkUnstructuredGrid* 
+  void 
   TUnstructuredGridIDMapperImpl
-  ::GetUnstructuredGridOutput()
+  ::SetReferencedMesh( const PNamedIDMapper& theNamedIDMapper )
   {
-    if(!myFilter.GetPointer()){
-      
+    myCommonCellsFilter->SetCellsUG( theNamedIDMapper->GetUnstructuredGridOutput() );
+  }
+
+  void 
+  TUnstructuredGridIDMapperImpl
+  ::Build()
+  {
+    if ( !myFilter.GetPointer() ) {
       const PAppendFilter& anAppendFilter = myIDMapper->GetFilter();
-      vtkUnstructuredGrid* aGeometry;
 
+      vtkUnstructuredGrid* aGeometry = anAppendFilter->GetOutput();
       const PUnstructuredGrid& aSource = mySource.GetSource();
-      vtkUnstructuredGrid* aDataSet;
-      
-      if(myIsSpecialKey){
-        PNamedIDMapperMap::iterator aIter;
-        aIter = myMappers.find(VISU::CELL_ENTITY);
-        if(aIter!=myMappers.end()) myCommonCellsFilter->SetCellsUG((aIter->second)->GetUnstructuredGridOutput());
-        else {
-          aIter = myMappers.find(VISU::FACE_ENTITY);
-          if(aIter!=myMappers.end()) myCommonCellsFilter->SetCellsUG((aIter->second)->GetUnstructuredGridOutput());
-          else {
-            aIter = myMappers.find(VISU::EDGE_ENTITY);
-            if(aIter!=myMappers.end()) myCommonCellsFilter->SetCellsUG((aIter->second)->GetUnstructuredGridOutput());
-          }
-        }
-      }
-      
-      aGeometry = anAppendFilter->GetOutput();
-      aDataSet = aSource.GetPointer();
-      aDataSet->ShallowCopy(aGeometry);
+      vtkUnstructuredGrid* aDataSet = aSource.GetPointer();
+      aDataSet->ShallowCopy( aGeometry );
 
       const PMergeFilter& aFilter = GetFilter();
-      aFilter->SetGeometry(aGeometry);
-      aFilter->SetScalars(aDataSet);
-      aFilter->SetVectors(aDataSet);
-      aFilter->AddField("VISU_FIELD",aDataSet);
-      aFilter->AddField("VISU_CELLS_MAPPER",aDataSet);
-      aFilter->AddField("ELNO_FIELD",aDataSet);
-      aFilter->AddField("ELNO_COMPONENT_MAPPER",aDataSet);
-      aFilter->AddField("VISU_POINTS_MAPPER",aDataSet);
+      aFilter->SetGeometry( aGeometry );
+      aFilter->SetScalars( aDataSet );
+      aFilter->SetVectors( aDataSet );
+      aFilter->AddField( "VISU_FIELD", aDataSet );
+      aFilter->AddField( "VISU_CELLS_MAPPER", aDataSet );
+      aFilter->AddField( "ELNO_FIELD", aDataSet );
+      aFilter->AddField( "ELNO_COMPONENT_MAPPER", aDataSet );
+      aFilter->AddField( "VISU_POINTS_MAPPER", aDataSet );
                                                      
-      myCommonCellsFilter->SetProfileUG(aFilter->GetUnstructuredGridOutput());
+      myCommonCellsFilter->SetProfileUG( aFilter->GetUnstructuredGridOutput() );
     } 
+  }
+
+  vtkUnstructuredGrid* 
+  TUnstructuredGridIDMapperImpl
+  ::GetUnstructuredGridOutput()
+  {
+    Build();
     return myCommonCellsFilter->GetOutput();
   }
 
@@ -735,17 +730,25 @@ namespace VISU
     return GetUnstructuredGridOutput();
   }
 
+  PUnstructuredGrid 
+  TUnstructuredGridIDMapperImpl
+  ::GetSource()
+  {
+    Build();
+    return mySource.GetSource();
+  }
+
   unsigned long int
   TUnstructuredGridIDMapperImpl
   ::GetMemorySize()
   {
     size_t aSize = myIDMapper->GetMemorySize();
+
     aSize += mySource.GetMemorySize();
-    if(vtkUnstructuredGrid* anOutput = myCommonCellsFilter->GetOutput())
+
+    if ( vtkUnstructuredGrid* anOutput = myCommonCellsFilter->GetOutput() )
       aSize += anOutput->GetActualMemorySize() * 1024;
-    PNamedIDMapperMap::const_iterator aIter = myMappers.begin();
-    for(;aIter!=myMappers.end();aIter++)
-      aSize += (aIter->second)->GetMemorySize();
+
     return aSize;
   }
 
@@ -792,26 +795,33 @@ namespace VISU
     return myIDMapper->GetElemCell(theObjID);
   }
   
-  vtkPolyData* 
+  void 
   TPolyDataIDMapperImpl
-  ::GetPolyDataOutput()
+  ::Build()
   {
-    if(!myFilter.GetPointer()){
+    if ( !myFilter.GetPointer() ) {
       const PAppendPolyData& anAppendFilter = myIDMapper->GetFilter();
       vtkPolyData* aGeometry = anAppendFilter->GetOutput();
       
       const PPolyData& aSource = mySource.GetSource();
       vtkPolyData* aDataSet = aSource.GetPointer();
-      aDataSet->ShallowCopy(aGeometry);
+      aDataSet->ShallowCopy( aGeometry );
       
       const PMergeFilter& aFilter = GetFilter();
-      aFilter->SetGeometry(aGeometry);
-      aFilter->SetScalars(aDataSet);
-      aFilter->SetVectors(aDataSet);
-      aFilter->AddField("VISU_FIELD",aDataSet);
-      aFilter->AddField("VISU_CELLS_MAPPER",aDataSet);
-      aFilter->AddField("VISU_POINTS_MAPPER",aDataSet);
+      aFilter->SetGeometry( aGeometry );
+      aFilter->SetScalars( aDataSet );
+      aFilter->SetVectors( aDataSet );
+      aFilter->AddField( "VISU_FIELD", aDataSet );
+      aFilter->AddField( "VISU_CELLS_MAPPER", aDataSet );
+      aFilter->AddField( "VISU_POINTS_MAPPER", aDataSet );
     }
+  }
+
+  vtkPolyData* 
+  TPolyDataIDMapperImpl
+  ::GetPolyDataOutput()
+  {
+    Build();
     return myFilter->GetPolyDataOutput();
   }
 
@@ -822,6 +832,14 @@ namespace VISU
     return GetPolyDataOutput();
   }
 
+  PPolyData 
+  TPolyDataIDMapperImpl
+  ::GetSource()
+  {
+    Build();
+    return mySource.GetSource();
+  }
+
   unsigned long int
   TPolyDataIDMapperImpl
   ::GetMemorySize()
@@ -973,7 +991,6 @@ namespace VISU
       return aResult;
       
     size_t aSubMeshEnd = myGaussSubMeshArr.size();
-    const PAppendFilter& anAppendFilter = GetFilter();
     const PGaussSubMeshImpl& aGaussSubMesh = anIter->second;
     for ( size_t aSubMeshId = 0; aSubMeshId < aSubMeshEnd; aSubMeshId++ ) {
       const PGaussSubMeshImpl& aSubMesh = myGaussSubMeshArr[aSubMeshId];
@@ -1339,9 +1356,10 @@ namespace VISU
   
   //---------------------------------------------------------------
   TFieldImpl
-  ::TFieldImpl(): 
-    myDataSize(0),
-    myDataType(0)
+  ::TFieldImpl()
+    : myDataSize( 0 )
+    , myDataType( 0 )
+    , myIsELNO( false )
   {}
 
   void 
index 35bbc9e343d5a8964f0e8cf67558e48f9dd51231..6b4bc01dc86ee578c38777d3f786b351cf61b7b8 100644 (file)
@@ -157,14 +157,6 @@ namespace VISU
     virtual
     unsigned long int
     GetMemorySize();
-
-    //! if false, TIDCommonCellsFilter - same as TIDMapperFilter
-    //! if true, TIDCommonCellsFilter - use VISU_CommonCellsFilter
-    bool myIsSpecialKey;
-
-    //! Vector of id mappers, which consist of meshonentity in next sequence:
-    //! CELL_ENTITY,FACE_ENTITY,EDGE_ENTITY
-    PNamedIDMapperMap myMappers;
   };
 
   //---------------------------------------------------------------
@@ -348,9 +340,8 @@ namespace VISU
   struct TUnstructuredGridIDMapperImpl: virtual TMergeFilterHolder,
                                        virtual TUnstructuredGridIDMapper
   {
-    PAppendFilterHolder       myIDMapper; //!< Responsible for numbering
-    PCommonCellsFilter        myCommonCellsFilter;
-    TUnstructuredGridHolder   mySource; //!< Keeps assigned data
+    PAppendFilterHolder myIDMapper; //!< Responsible for numbering
+    PCommonCellsFilter myCommonCellsFilter;
 
     TUnstructuredGridIDMapperImpl();
     
@@ -399,13 +390,16 @@ namespace VISU
     unsigned long int
     GetMemorySize();
     
-    //! if false, Not using CommonCellsFilter
-    //! if true,  Using CommonCellsFilter
-    bool myIsSpecialKey;
+    void 
+    SetReferencedMesh( const PNamedIDMapper& theNamedIDMapper );
+
+    PUnstructuredGrid 
+    GetSource();
+
+  protected:
+    void Build();
 
-    //! Vector of id mappers, which consist of meshonentity in next sequence:
-    //! CELL_ENTITY,FACE_ENTITY,EDGE_ENTITY
-    PNamedIDMapperMap myMappers;
+    TUnstructuredGridHolder mySource; //!< Keeps assigned data
   };
 
   //---------------------------------------------------------------
@@ -414,7 +408,6 @@ namespace VISU
                                virtual TPolyDataIDMapper
   {
     PAppendPolyDataHolder myIDMapper; //!< Responsible for numbering
-    TPolyDataHolder mySource; //!< Keeps assigned data
 
     //! Reimplement the TIDMapper::GetNodeObjID
     virtual 
@@ -460,6 +453,14 @@ namespace VISU
     virtual
     unsigned long int
     GetMemorySize();
+
+    PPolyData 
+    GetSource();
+
+  protected:
+    void Build();
+
+    TPolyDataHolder mySource; //!< Keeps assigned data
   };
 
 
@@ -829,6 +830,7 @@ namespace VISU
     vtkIdType myDataSize; //!< Keeps size of the assigned data
     vtkIdType myDataType; //!< Keeps type idetificator of the mesh data
     TMinMaxArr myMinMaxArr; //!< Keeps min/max values for each component of the MED FIELD
+    bool myIsELNO; //!< Defines whether this field contains specific "ELNO" data or not
   };