From: eap Date: Thu, 19 Sep 2013 09:04:57 +0000 (+0000) Subject: 22321: [CEA 933] Bug when reading a sauve file containing field on Gauss Pt X-Git-Tag: V7_3_0a1~139 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b54e0f1a814039bfa7fddb3a30be4ab71b2e8812;p=modules%2Fmed.git 22321: [CEA 933] Bug when reading a sauve file containing field on Gauss Pt Fix SauvWriter::makeProfileIDs() for a sole cell type and no profile --- diff --git a/src/MEDLoader/SauvWriter.cxx b/src/MEDLoader/SauvWriter.cxx index 0ff5777aa..697847bb6 100644 --- a/src/MEDLoader/SauvWriter.cxx +++ b/src/MEDLoader/SauvWriter.cxx @@ -578,7 +578,16 @@ void SauvWriter::makeProfileIDs( SubMesh* sm, vector idsPerType( 1, profile ); MEDCouplingAutoRefCountObjectPtr resIDs = uMesh->checkTypeConsistencyAndContig( code, idsPerType ); - ids.assign( resIDs->begin(), resIDs->end() ); + if (( const DataArrayInt *) resIDs ) + { + ids.assign( resIDs->begin(), resIDs->end() ); + } + else // mesh includes only one type + { + int nbE = code[1]; + for ( ids.resize( nbE ); nbE; --nbE ) + ids[ nbE-1 ] = nbE-1; + } } }