try{
MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh);
+ MED::PNodeInfo aNodeInfo = aMed->GetPNodeInfo(aMeshInfo);
+
MED::TEntityInfo aEntityInfo = aMed->GetEntityInfo(aMeshInfo);
MED::TElemGroup anElemGroup = GetElemsByEntity(aMed,aMeshInfo,aEntityInfo);
- // Find PNodeInfo
- MED::TElemGroup::const_iterator anElemGroupIter = anElemGroup.find(MED::eNOEUD);
- if(anElemGroupIter == anElemGroup.end())
- continue;
-
- const MED::TElemMap& anElemMap = anElemGroupIter->second;
- MED::TElemMap::const_iterator anElemMapIter = anElemMap.find(MED::ePOINT1);
- if(anElemMapIter == anElemMap.end())
- continue;
-
- MED::PNodeInfo aNodeInfo(anElemMapIter->second);
-
- // creating TMesh structure and TMeshOnEntityMap
- typedef std::map<TInt,TInt> TFamilyCounterMap;
- TFamilyCounterMap aFamilyNbCellsCounterMap, aFamilyCellsSizeCounterMap;
- TFamilyCounterMap aFamilyNbPolygonesCounterMap, aFamilyPolygonesSizeCounterMap;
-
MED::TInt aDim = aMeshInfo->GetDim();
std::string aMeshName = aMeshInfo->GetName();
-
+
VISU::PMEDMesh aMesh = myMeshMap[aMeshName](new VISU::TMEDMesh());
aMesh->myDim = aDim;
aMesh->myName = aMeshName;
BEGMSG(MYDEBUG,"aEntityInfo.size() = "<<aEntityInfo.size()<<"\n");
+ typedef std::map<TInt,TInt> TFamilyCounterMap;
+ TFamilyCounterMap aFamilyNbCellsCounterMap, aFamilyCellsSizeCounterMap;
+ TFamilyCounterMap aFamilyNbPolygonesCounterMap, aFamilyPolygonesSizeCounterMap;
+
VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
- anElemGroupIter = anElemGroup.begin();
+ MED::TElemGroup::const_iterator anElemGroupIter = anElemGroup.begin();
for(; anElemGroupIter != anElemGroup.end(); anElemGroupIter++){
const MED::EEntiteMaillage& aMEntity = anElemGroupIter->first;
const MED::TElemMap& anElemMap = anElemGroupIter->second;
INITMSG(MYDEBUG,"myNbCells = "<<aMeshOnEntity->myNbCells<<
"; myCellsSize = "<<aMeshOnEntity->myCellsSize<<"\n");;
-
+
}else{
aMeshOnEntity->myNbCells = 0;
aMeshOnEntity->myCellsSize = 0;
- anElemMapIter = anElemMap.begin();
+ MED::TElemMap::const_iterator anElemMapIter = anElemMap.begin();
for(; anElemMapIter != anElemMap.end(); anElemMapIter++){
const MED::EGeometrieElement& aGeom = anElemMapIter->first;
MED::PElemInfo anElemInfo = anElemMapIter->second;
switch(aGeom){
case MED::ePOLYGONE: {
- MED::PPolygoneInfo aPolygoneInfo(anElemInfo);
+ MED::PPolygoneInfo aPolygoneInfo =
+ aMed->GetPPolygoneInfo(aMeshInfo,aMEntity,MED::ePOLYGONE);
MED::TInt aNbElem = aPolygoneInfo->GetNbElem();
MED::TElemNum aConn = aPolygoneInfo->GetConnectivite();
MED::TElemNum aIndex = aPolygoneInfo->GetIndex();
}
default: {
int aVNbNodes = VTKGeom2NbNodes(MEDGeomToVTK(aGeom));
- MED::PCellInfo aCellInfo(anElemInfo);
+ MED::PCellInfo aCellInfo = aMed->GetPCellInfo(aMeshInfo,aMEntity,aGeom);
MED::TInt aNbElem = aCellInfo->GetNbElem();
aMeshOnEntity->myNbCells += aNbElem;
aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1);
const MED::TFamilyGroup& aFamilyGroup = aGroupInfoIter->second;
VISU::PMEDGroup aGroup(new TMEDGroup());
aGroup->myName = aGroupName;
- aGroup->myMeshName = aMesh->myName;
+ aGroup->myMeshName = aMeshName;
INITMSG(MYDEBUG,"aGroup->myName = '"<<aGroup->myName<<"'\n");
}
}
}catch (std::exception& exc){
- MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
+ throw;
}catch(...){
EXCEPTION(runtime_error,"Unknown exception !!!");
}