case MED::ePOLYEDRE: {
MED::PPolyedreInfo aPolyedreInfo = aMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
TInt aNbElem = aPolyedreInfo->GetNbElem();
- MED::TElemNum aConn = aPolyedreInfo->GetConnectivite();
- MED::TElemNum aIndex = aPolyedreInfo->GetIndex();
- TInt aNbIndex = aIndex.size();
- TInt aNbConn = aConn.size();
-
- aMeshOnEntity->myNbCells += aNbElem;
-
- for (int ii = 0; ii<aNbElem ; ii++){
- int aNbConnii = aPolyedreInfo->GetNbConn(ii);
- aMeshOnEntity->myCellsSize += aNbConnii;
- }
INITMSG(MYDEBUG,
"- aMGeom = "<<aMGeom<<
"; aNbElem = "<<aNbElem<<
- "; aNbConn= "<<aNbConn<<
endl);
- for(TInt iElem = 0; iElem < aNbElem; iElem++){
- TInt aFamId = aPolyedreInfo->GetFamNum(iElem);
+ 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){
aFamilyNbCellsCounterMap[aFamId] += 1;
- aFamilyCellsSizeCounterMap[aFamId] += aPolyedreInfo->GetNbConn(iElem) + 1;
+ aFamilyCellsSizeCounterMap[aFamId] += aCellSize + 1;
}
}
break;
TCell2Connect& aCell2Connect = aGeom2Cell2Connect[aVGeom];
aCell2Connect.resize(aNbElem);
- const MED::TElemNum& aConnect = aPolyedreInfo->GetConnectivite();
- const MED::TElemNum& aFaces = aPolyedreInfo->GetFaces();
- const MED::TElemNum& aIndex = aPolyedreInfo->GetIndex();
-
- for(int iElem = 0; iElem < aNbElem; iElem++){
+ for(TInt iElem = 0; iElem < aNbElem; iElem++){
+ MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(iElem);
+ TConnect& anArray = aCell2Connect[iElem];
typedef set<TInt> TConnectSet;
TConnectSet aConnectSet;
- TConnect& anArray = aCell2Connect[iElem];
-
- int aInd1 = aIndex[iElem]-1;
- int aInd2 = aIndex[iElem+1]-2;
-
- for(int i = aInd1; i <= aInd2; i++){
- for(int j = aFaces[i]-1; j < aFaces[i+1]-1; j++){
- aConnectSet.insert(aConnect[j]);
+ TInt aNbFaces = aConnSliceArr.size();
+ for(TInt iFace = 0; iFace < aNbFaces; iFace++){
+ MED::TCConnSlice aConnSlice = aConnSliceArr[iFace];
+ TInt aNbConn = aConnSlice.size();
+ for(TInt iConn = 0; iConn < aNbConn; iConn++){
+ aConnectSet.insert(aConnSlice[iConn]);
}
}
-
+
int aNbConn = aConnectSet.size();
anArray.resize(aNbConn);
- TConnectSet::iterator aIter = aConnectSet.begin();
- for(int i = 0; aIter != aConnectSet.end(); aIter++, i++){
- TInt anId = *aIter;
- anArray[i] = anId-1;
+ TConnectSet::iterator anIter = aConnectSet.begin();
+ for(int i = 0; anIter != aConnectSet.end(); anIter++, i++){
+ TInt anId = *anIter;
+ anArray[i] = anId - 1;
}
}
}