From 0a765fb4230bab2a325a25316be564e094ee34ed Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 31 Mar 2014 17:59:06 +0400 Subject: [PATCH] 22534: [CEA 1121] failing sauv2med Fix the case of partial nodal field --- src/MEDLoader/SauvMedConvertor.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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 ); -- 2.39.2