From efdf984e40ba00513859a612721ebe25e711b851 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 26 Jan 2005 06:49:06 +0000 Subject: [PATCH] Improve checking of validity of mesh elements connectivity --- src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx | 32 ++++++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index fe5100d4f..1433e3208 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -309,21 +309,35 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() break; } vector aNodeIds(aNbNodes); + bool anIsValidConnect = false; + + try{ #ifdef _EDF_NODE_IDS_ - if(anIsNodeNum) { - for(int i = 0; i < aNbNodes; i++){ - aNodeIds[i] = aNodeInfo->GetElemNum(aCellInfo->GetConn(iElem,i)-1); + if(anIsNodeNum) { + for(int i = 0; i < aNbNodes; i++){ + aNodeIds[i] = aNodeInfo->GetElemNum(aCellInfo->GetConn(iElem,i)-1); + } + }else{ + for(int i = 0; i < aNbNodes; i++){ + aNodeIds[i] = aCellInfo->GetConn(iElem,i); + } } - }else{ +#else for(int i = 0; i < aNbNodes; i++){ aNodeIds[i] = aCellInfo->GetConn(iElem,i); } - } -#else - for(int i = 0; i < aNbNodes; i++){ - aNodeIds[i] = aCellInfo->GetConn(iElem,i); - } #endif + anIsValidConnect = true; + }catch(const std::exception& exc){ + //INFOS("Follow exception was cought:\n\t"<