- // Storing SMDS Volumes
- if(TInt aNbElems = myMesh->NbVolumes()){
- SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
-#ifdef _ELEMENTS_BY_DIM_
- SMDS_MED_ENTITY = eMAILLE;
-#endif
- TInt aNbTetraConn = MED::GetNbNodes(eTETRA4);
- MED::TIntVector anTetraElemNums;
- anTetraElemNums.reserve(aNbElems);
- MED::TIntVector aTetraFamilyNums;
- aTetraFamilyNums.reserve(aNbElems);
- MED::TIntVector aTetraConn;
- aTetraConn.reserve(aNbElems*aNbTetraConn);
-
- TInt aNbPyraConn = MED::GetNbNodes(ePYRA5);
- MED::TIntVector anPyraElemNums;
- anPyraElemNums.reserve(aNbElems);
- MED::TIntVector aPyraFamilyNums;
- aPyraFamilyNums.reserve(aNbElems);
- MED::TIntVector aPyraConn;
- aPyraConn.reserve(aNbElems*aNbPyraConn);
-
- TInt aNbPentaConn = MED::GetNbNodes(ePENTA6);
- MED::TIntVector anPentaElemNums;
- anPentaElemNums.reserve(aNbElems);
- MED::TIntVector aPentaFamilyNums;
- aPentaFamilyNums.reserve(aNbElems);
- MED::TIntVector aPentaConn;
- aPentaConn.reserve(aNbElems*aNbPentaConn);
-
- TInt aNbHexaConn = MED::GetNbNodes(eHEXA8);
- MED::TIntVector aHexaElemNums;
- aHexaElemNums.reserve(aNbElems);
- MED::TIntVector aHexaFamilyNums;
- aHexaFamilyNums.reserve(aNbElems);
- MED::TIntVector aHexaConn;
- aHexaConn.reserve(aNbElems*aNbHexaConn);
-
- TInt aNbTetra10Conn = MED::GetNbNodes(eTETRA10);
- MED::TIntVector anTetra10ElemNums;
- anTetra10ElemNums.reserve(aNbElems);
- MED::TIntVector aTetra10FamilyNums;
- aTetra10FamilyNums.reserve(aNbElems);
- MED::TIntVector aTetra10Conn;
- aTetra10Conn.reserve(aNbElems*aNbTetra10Conn);
-
- TInt aNbPyra13Conn = MED::GetNbNodes(ePYRA13);
- MED::TIntVector anPyra13ElemNums;
- anPyra13ElemNums.reserve(aNbElems);
- MED::TIntVector aPyra13FamilyNums;
- aPyra13FamilyNums.reserve(aNbElems);
- MED::TIntVector aPyra13Conn;
- aPyra13Conn.reserve(aNbElems*aNbPyra13Conn);
-
- TInt aNbPenta15Conn = MED::GetNbNodes(ePENTA15);
- MED::TIntVector anPenta15ElemNums;
- anPenta15ElemNums.reserve(aNbElems);
- MED::TIntVector aPenta15FamilyNums;
- aPenta15FamilyNums.reserve(aNbElems);
- MED::TIntVector aPenta15Conn;
- aPenta15Conn.reserve(aNbElems*aNbPenta15Conn);
-
- TInt aNbHexa20Conn = MED::GetNbNodes(eHEXA20);
- MED::TIntVector aHexa20ElemNums;
- aHexa20ElemNums.reserve(aNbElems);
- MED::TIntVector aHexa20FamilyNums;
- aHexa20FamilyNums.reserve(aNbElems);
- MED::TIntVector aHexa20Conn;
- aHexa20Conn.reserve(aNbElems*aNbHexa20Conn);
-
- MED::TIntVector aPolyedreElemNums;
- aPolyedreElemNums.reserve(aNbElems);
- MED::TIntVector aPolyedreInds;
- aPolyedreInds.reserve(aNbElems + 1);
- aPolyedreInds.push_back(1); // reference on the first element in the faces
- MED::TIntVector aPolyedreFaces;
- aPolyedreFaces.reserve(aNbElems + 1);
- aPolyedreFaces.push_back(1); // reference on the first element in the connectivities
- MED::TIntVector aPolyedreFamilyNums;
- aPolyedreFamilyNums.reserve(aNbElems);
- MED::TIntVector aPolyedreConn;
- aPolyedreConn.reserve(aNbElems*aNbHexaConn);
-
- for(TInt iElem = 0; iElem < aNbElems && anIter->more(); iElem++){
- const SMDS_MeshVolume* anElem = anIter->next();
-
- MED::TIntVector* anElemNums;
- MED::TIntVector* aFamilyNums;
-
- if (anElem->IsPoly()) {
- const SMDS_PolyhedralVolumeOfNodes* aPolyedre =
- (const SMDS_PolyhedralVolumeOfNodes*) anElem;
- if (!aPolyedre) {
- MESSAGE("Warning: bad volumic element");
- continue;