From 476d9e64c680a32b080ec2505c466866570f2684 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 10 Oct 2013 13:24:58 +0000 Subject: [PATCH] 22336: [CEA 955] Impossible conversion of a surface field with sauv2med Fix adding a partial field on gauss points --- src/MEDLoader/SauvMedConvertor.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index f14def680..f277c8347 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -1116,7 +1116,7 @@ namespace // define default GAUSS points add( -a, a, 1 ); break; } case 5: { // out from the 3 specs - const double a = 2/sqrt(3.); + const double a = 0.774596669241483; add( -a, -a, 0.5 ); add( a, -a, 0.5 ); add( a, a, 0.5 ); @@ -3351,17 +3351,17 @@ void IntermediateMED::setTS( SauvUtilities::DoubleField* fld, if ( timeStamp->getTypeOfField() == ParaMEDMEM::ON_GAUSS_PT ) { TGaussDef gaussDef( support->_cellType, fld->_sub[iSub].nbGauss() ); - if ( onAll ) + if ( !onAll ) + { + MEDCouplingAutoRefCountObjectPtr + submesh = dimMesh->buildPart(support->_medGroup->begin(), + support->_medGroup->end()); + timeStamp->setMesh( submesh); + } timeStamp->setGaussLocalizationOnType( support->_cellType, gaussDef.myRefCoords, gaussDef.myCoords, gaussDef.myWeights ); - else - timeStamp->setGaussLocalizationOnCells( support->_medGroup->begin(), - support->_medGroup->end(), - gaussDef.myRefCoords, - gaussDef.myCoords, - gaussDef.myWeights ); } // get a field to add the time-stamp @@ -3378,6 +3378,7 @@ void IntermediateMED::setTS( SauvUtilities::DoubleField* fld, timeStamp->setOrder( nbTS ); // add the time-stamp + timeStamp->checkCoherency(); if ( onAll ) fld->_curMedField->appendFieldNoProfileSBT( timeStamp ); else -- 2.39.2