Salome HOME
Merge changes from 'master' branch.
[modules/smesh.git] / src / DriverMED / DriverMED_W_SMESHDS_Mesh.cxx
index 552a214173a4ced4d3dceb04323d14485458801b..55e80fbfd4cf52e54a3add0f87a80d873f0738d7 100644 (file)
@@ -677,7 +677,11 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              ePENTA15,
-                                             nbElemInfo.NbPrisms( ORDER_QUADRATIC ),
+                                             nbElemInfo.NbQuadPrisms(),
+                                             SMDSAbs_Volume));
+    aTElemTypeDatas.push_back( TElemTypeData(anEntity,
+                                             ePENTA18,
+                                             nbElemInfo.NbBiQuadPrisms(),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eHEXA8,
@@ -729,6 +733,13 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
         continue;
       }
 
+      // build map of family numbers for this type
+      if ( !isElemFamMapBuilt[ aElemTypeData->_smdsType ])
+      {
+        fillElemFamilyMap( anElemFamMap, aFamilies, aElemTypeData->_smdsType );
+        isElemFamMapBuilt[ aElemTypeData->_smdsType ] = true;
+      }
+
       // iterator on elements of a current type
       SMDS_ElemIteratorPtr elemIterator;
       int iElem = 0;
@@ -802,7 +813,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
       else if (aElemTypeData->_geomType == ePOLYEDRE )
       {
         elemIterator = myMesh->elementGeomIterator( SMDSGeom_POLYHEDRA );
-        
+
         if ( nbPolyhedronNodes == 0 ) {
           // Count nb of nodes
           while ( elemIterator->more() ) {
@@ -879,13 +890,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
         // allocate data arrays
         PBallInfo aBallInfo = myMed->CrBallInfo( aMeshInfo, aElemTypeData->_nbElems );
 
-        // build map of family numbers for this type
-        if ( !isElemFamMapBuilt[ aElemTypeData->_smdsType ])
-        {
-          fillElemFamilyMap( anElemFamMap, aFamilies, aElemTypeData->_smdsType );
-          isElemFamMapBuilt[ aElemTypeData->_smdsType ] = true;
-        }
-
         elemIterator = myMesh->elementsIterator( SMDSAbs_Ball );
         while ( elemIterator->more() )
         {
@@ -917,7 +921,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
       {
         // Treat standard types
         // ---------------------
-
         // allocate data arrays
         PCellInfo aCellInfo = myMed->CrCellInfo( aMeshInfo,
                                                  aElemTypeData->_entity,
@@ -926,13 +929,6 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
                                                  theConnMode,
                                                  theIsElemNum,
                                                  theIsElemNames);
-        // build map of family numbers for this type
-        if ( !isElemFamMapBuilt[ aElemTypeData->_smdsType ])
-        {
-          //cout << " fillElemFamilyMap()" << endl;
-          fillElemFamilyMap( anElemFamMap, aFamilies, aElemTypeData->_smdsType );
-          isElemFamMapBuilt[ aElemTypeData->_smdsType ] = true;
-        }
 
         TInt aNbNodes = MED::GetNbNodes(aElemTypeData->_geomType);
         elemIterator = myMesh->elementsIterator( aElemTypeData->_smdsType );
@@ -967,10 +963,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
         // store data in a file
         myMed->SetCellInfo(aCellInfo);
       }
-
     } // loop on geom types
-
-
   }
   catch(const std::exception& exc) {
     INFOS("The following exception was caught:\n\t"<<exc.what());