From: eap Date: Thu, 27 Oct 2005 14:54:15 +0000 (+0000) Subject: PAL10414. Fix SIGSEGV in getConnectivity() when there are cells of mixed dim includin... X-Git-Tag: OCC_For_3_1_0a3~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f08d615e0bc91da7626294e1467be021263e9f1b;p=modules%2Fmed.git PAL10414. Fix SIGSEGV in getConnectivity() when there are cells of mixed dim including 0D. --- diff --git a/src/MEDMEM/MEDMEM_DriverTools.cxx b/src/MEDMEM/MEDMEM_DriverTools.cxx index 26a57cc3b..c78f1622b 100644 --- a/src/MEDMEM/MEDMEM_DriverTools.cxx +++ b/src/MEDMEM/MEDMEM_DriverTools.cxx @@ -365,7 +365,7 @@ CONNECTIVITY * _intermediateMED::getConnectivity() int * count=NULL; int * connectivity=NULL; CONNECTIVITY *Connectivity, *Constituent; - int dimension_maillage_moin_2=maillage.rbegin()->dimension() - 2; + //int dimension_maillage_moin_2=maillage.rbegin()->dimension() - 2; medGeometryElement type=0; // variables de travail int nbtype=0; @@ -378,6 +378,8 @@ CONNECTIVITY * _intermediateMED::getConnectivity() std::set<_maille>::const_iterator i, j; // iterateurs sur les mailles // skip nodes and elements of or less dimension + // Unfortunately, it is impossible because of MESH::createFamilies() that requires + // presence of connectivity even for nodes! for ( i = maillage.begin(); i != maillage.end(); ++i ) //if ( i->geometricType != MED_POINT1 && i->dimension() > dimension_maillage_moin_2 ) break; @@ -409,6 +411,7 @@ CONNECTIVITY * _intermediateMED::getConnectivity() nbtype=0; type=i->geometricType; vtype.push_back(type); // stocke le nouveau type geometrique rencontre + dimension=i->dimension(); } ++nbtype;