From: eap Date: Fri, 11 Oct 2013 13:16:37 +0000 (+0000) Subject: 22341: [CEA 958] sauv2med: different nb of gauss points in components X-Git-Tag: V7_3_0a1~96 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0f9693fb986e63da6069aab560966d80d21243b8;p=modules%2Fmed.git 22341: [CEA 958] sauv2med: different nb of gauss points in components Fix regression of tests: correct creation of a supporting mesh for a partial field on nodes --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index f243840ce..9d1e08eb4 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -3348,13 +3348,26 @@ void IntermediateMED::setTS( SauvUtilities::DoubleField* fld, timeStamp->setName( fld->_name.c_str() ); timeStamp->setDescription( fld->_description.c_str() ); // set the mesh - MEDCouplingAutoRefCountObjectPtr< MEDCouplingUMesh > dimMesh = mesh->getMeshAtLevel( dimRel ); if ( onAll ) { + MEDCouplingAutoRefCountObjectPtr + < MEDCouplingUMesh > dimMesh = mesh->getMeshAtLevel( dimRel ); timeStamp->setMesh( dimMesh ); } + else if ( timeStamp->getTypeOfField() == ParaMEDMEM::ON_NODES ) + { + DataArrayDouble * coo = mesh->getCoords(); + MEDCouplingAutoRefCountObjectPtr + subCoo = coo->selectByTupleId(support->_medGroup->begin(), + support->_medGroup->end()); + MEDCouplingAutoRefCountObjectPtr< MEDCouplingUMesh > nodeSubMesh = + MEDCouplingUMesh::Build0DMeshFromCoords( subCoo ); + timeStamp->setMesh( nodeSubMesh ); + } else { + MEDCouplingAutoRefCountObjectPtr + < MEDCouplingUMesh > dimMesh = mesh->getMeshAtLevel( dimRel ); MEDCouplingAutoRefCountObjectPtr subMesh = dimMesh->buildPart(support->_medGroup->begin(), support->_medGroup->end());