From f08d615e0bc91da7626294e1467be021263e9f1b Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 27 Oct 2005 14:54:15 +0000 Subject: [PATCH] PAL10414. Fix SIGSEGV in getConnectivity() when there are cells of mixed dim including 0D. --- src/MEDMEM/MEDMEM_DriverTools.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.2