- if (anElemFamMap.find(anElem) != anElemFamMap.end())
- aFamilyNums->push_back(anElemFamMap[anElem]);
- else
- aFamilyNums->push_back(myFacesDefaultFamilyId);
- }
- if(TInt aNbElems = anTriaElemNums.size()){
- PCellInfo aCellInfo = myMed->CrCellInfo(aMeshInfo,
- SMDS_MED_ENTITY,
- eTRIA3,
- aTriaConn,
- SMDS_MED_CONNECTIVITY,
- aTriaFamilyNums,
- anTriaElemNums);
- MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<eTRIA3<<"; aNbElems = "<<aNbElems);
- myMed->SetCellInfo(aCellInfo);
- }
- if(TInt aNbElems = aQuadElemNums.size()){
- PCellInfo aCellInfo = myMed->CrCellInfo(aMeshInfo,
- SMDS_MED_ENTITY,
- eQUAD4,
- aQuadConn,
- SMDS_MED_CONNECTIVITY,
- aQuadFamilyNums,
- aQuadElemNums);
- MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<eQUAD4<<"; aNbElems = "<<aNbElems);
- myMed->SetCellInfo(aCellInfo);
- }
- if(TInt aNbElems = aPolygoneElemNums.size()){
- // add one element in connectivities,
- // referenced by the last element in indices
- aPolygoneConn.push_back(0);
-
- PPolygoneInfo aCellInfo = myMed->CrPolygoneInfo(aMeshInfo,
- SMDS_MED_ENTITY,
- ePOLYGONE,
- aPolygoneInds,
- aPolygoneConn,
- SMDS_MED_CONNECTIVITY,
- aPolygoneFamilyNums,
- aPolygoneElemNums);
- MESSAGE("Perform - anEntity = "<<SMDS_MED_ENTITY<<"; aGeom = "<<ePOLYGONE<<"; aNbElems = "<<aNbElems);
- myMed->SetPolygoneInfo(aCellInfo);
- }
- }
-
- // 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);
-
- 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;