From: eap Date: Mon, 31 Mar 2014 13:59:06 +0000 (+0400) Subject: 22534: [CEA 1121] failing sauv2med X-Git-Tag: V7_4_0a1~5^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a765fb4230bab2a325a25316be564e094ee34ed;p=modules%2Fmed.git 22534: [CEA 1121] failing sauv2med Fix the case of partial nodal field --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index f9dd4f6d5..ad4668c12 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -3285,16 +3285,17 @@ bool IntermediateMED::isOnAll( const Group* grp, int & dimRel ) const int dim = getDim( grp ); int nbElems = 0; - CellsByDimIterator dimCells( *this, dim ); - while ( const std::set * cells = dimCells.nextType() ) - nbElems += cells->size(); - - const bool onAll = ( nbElems == grp->size() ); - if ( dim == 0 ) - dimRel = 0; + { + nbElems = _nbNodes; + dimRel = 0; + } else { + CellsByDimIterator dimCells( *this, dim ); + while ( const std::set * cells = dimCells.nextType() ) + nbElems += cells->size(); + int meshDim = 3; for ( ; meshDim > 0; --meshDim ) { @@ -3304,6 +3305,8 @@ bool IntermediateMED::isOnAll( const Group* grp, int & dimRel ) const } dimRel = dim - meshDim; } + + bool onAll = ( nbElems == grp->size() ); return onAll; } @@ -3432,7 +3435,7 @@ void IntermediateMED::setTS( SauvUtilities::DoubleField* fld, DataArrayDouble * coo = mesh->getCoords(); MEDCouplingAutoRefCountObjectPtr subCoo = coo->selectByTupleId(support->_medGroup->begin(), - support->_medGroup->end()); + support->_medGroup->end()); MEDCouplingAutoRefCountObjectPtr< MEDCouplingUMesh > nodeSubMesh = MEDCouplingUMesh::Build0DMeshFromCoords( subCoo ); timeStamp->setMesh( nodeSubMesh );