// File : VISU_MedConvertor.cxx
// Author : Alexey PETROV
// Module : VISU
-//
+
#include "VISU_MedConvertor.hxx"
#include "VISU_ConvertorUtils.hxx"
#include "MED_GaussUtils.hxx"
#include "MED_Utilities.hxx"
+#include "utilities.h"
+
#include "SALOMEconfig.h"
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
aMesh->myName = aMeshName;
aMesh->myMeshInfo = aMeshInfo;
aMesh->myNamedPointCoords(new VISU::TMEDNamedPointCoords());
-
+
INITMSG(MYDEBUG,"aMeshName = '"<<aMeshName<<
"; aDim = "<<aDim<<"\n");
- if(aType == MED::eNON_STRUCTURE){
+ if (aType == MED::eNON_STRUCTURE) {
- if(MED::PNodeInfo aNodeInfo = myMed->GetPNodeInfo(aMeshInfo)){
- MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
+ if (MED::PNodeInfo aNodeInfo = myMed->GetPNodeInfo(aMeshInfo)) {
+ MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo, MED::eNOD);
aMesh->myNbPoints = aNodeInfo->GetNbElem();
aMesh->myEntityInfo = anEntityInfo;
-
-
+
+ // Check connectivity (Mantis issue 0020483)
+ {
+ bool isDescConn = false;
+
+ MED::TEntityInfo aEntityInfoDesc = myMed->GetEntityInfo(aMeshInfo, MED::eDESC);
+ MED::TEntityInfo::iterator anEntityIterDesc = aEntityInfoDesc.begin();
+ for (; anEntityIterDesc != aEntityInfoDesc.end() && !isDescConn; anEntityIterDesc++) {
+ const MED::EEntiteMaillage& anEntity = anEntityIterDesc->first;
+ if (anEntity != MED::eNOEUD) isDescConn = true;
+ }
+
+ if (isDescConn)
+ INFOS("There are some elements in descending connectivity in med file. They were not read !!!");
+ }
+
#ifndef _DEXCEPT_
try{
#endif
INITMSG(MYDEBUG,"myNbPoints = "<<aMesh->myNbPoints<<
"; anEntityInfo.size() = "<<anEntityInfo.size()<<
"\n");
-
+
BuildMeshOnEntityMap(aMesh,
anEntityInfo,
aNodeInfo,
myMed);
-
+
#ifndef _DEXCEPT_
}catch(std::exception& exc){
MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());