const MED::TGeom2Profile& theGeom2Profile)
{
vtkIdType aVGeom = MEDGeomToVTK(theMGeom);
- vtkIdType aVNbNodes = VTKGeom2NbNodes(theMGeom);
+ vtkIdType aVNbNodes = VTKGeom2NbNodes(aVGeom);
PMEDSubProfile aSubProfile(new TMEDSubProfile());
aSubProfile->myGeom = aVGeom;
}
}
INITMSG(MYDEBUG,
- "- aVGeom = "<<aVGeom<<
+ "- aMGeom = "<<theMGeom<<
+ "; aVGeom = "<<aVGeom<<
"; aName = '"<<aSubProfile->myName<<"'"<<
"; aStatus = "<<aSubProfile->myStatus<<
"; aNbCells = "<<aSubProfile->myNbCells<<
MED::PElemInfo anElemInfo;
if(aMEntity == MED::eNOEUD)
anElemInfo = theMed->GetPNodeInfo(aMeshInfo);
- else
- anElemInfo = theMed->GetPCellInfo(aMeshInfo,
- aMEntity,
- aMGeom);
-
+ else{
+ switch(aMGeom){
+ case MED::ePOLYGONE: {
+ anElemInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
+ break;
+ }
+ case MED::ePOLYEDRE: {
+ anElemInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
+ break;
+ }
+ default: {
+ anElemInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
+ break;
+ }}
+ }
aSubProfile->myIsElemNum = anElemInfo->IsElemNum();
aSubProfile->myElemNum = anElemInfo->myElemNum;
}
const TSubMeshID& aSubMeshID = aSubProfile->mySubMeshID;
MED::EGeometrieElement aMGeom = aSubProfile->myMGeom;
- MED::PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,
- aMEntity,
- aMGeom);
-
- aGaussSubMesh->myIsElemNum = aCellInfo->IsElemNum();
- aGaussSubMesh->myElemNum = aCellInfo->myElemNum;
+ MED::PPolygoneInfo aPolygoneInfo;
+ MED::PPolyedreInfo aPolyedreInfo;
+ MED::PCellInfo aCellInfo;
+ MED::PElemInfo anElemInfo;
+
+ switch(aMGeom){
+ case MED::ePOLYGONE:
+ aPolygoneInfo = theMed->GetPPolygoneInfo(aMeshInfo,
+ aMEntity,
+ aMGeom);
+ anElemInfo = aPolygoneInfo;
+ break;
+ case MED::ePOLYEDRE:
+ aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,
+ aMEntity,
+ aMGeom);
+ anElemInfo = aPolyedreInfo;
+ break;
+ default:
+ aCellInfo = theMed->GetPCellInfo(aMeshInfo,
+ aMEntity,
+ aMGeom);
+ anElemInfo = aCellInfo;
+ }
+ aGaussSubMesh->myIsElemNum = anElemInfo->IsElemNum();
+ aGaussSubMesh->myElemNum = anElemInfo->myElemNum;
std::string aName;
MED::TGaussCoord aGaussCoord;
aProfileName);
if(aProfileInfo){
const MED::TElemNum& anElemNum = aProfileInfo->myElemNum;
+ switch(aMGeom){
+ case MED::ePOLYGONE:
+ anIsGaussCoord3D = MED::GetBaryCenter(aPolygoneInfo,
+ aNodeInfo,
+ aGaussCoord,
+ anElemNum);
+ break;
+ case MED::ePOLYEDRE:
+ anIsGaussCoord3D = MED::GetBaryCenter(aPolyedreInfo,
+ aNodeInfo,
+ aGaussCoord,
+ anElemNum);
+ break;
+ default:
+ anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
+ aNodeInfo,
+ aGaussCoord,
+ anElemNum);
+ }
+ }
+ }else
+ switch(aMGeom){
+ case MED::ePOLYGONE:
+ anIsGaussCoord3D = MED::GetBaryCenter(aPolygoneInfo,
+ aNodeInfo,
+ aGaussCoord);
+ break;
+ case MED::ePOLYEDRE:
+ anIsGaussCoord3D = MED::GetBaryCenter(aPolyedreInfo,
+ aNodeInfo,
+ aGaussCoord);
+ break;
+ default:
anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
aNodeInfo,
- aGaussCoord,
- anElemNum);
+ aGaussCoord);
}
- }else
- anIsGaussCoord3D = MED::GetBaryCenter(aCellInfo,
- aNodeInfo,
- aGaussCoord);
}
if(anIsGaussCoord3D){