From 9ab303ad39c347ca288a5865550e17f3a13a9764 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 20 May 2013 06:54:25 +0000 Subject: [PATCH] 0022211: [CEA 810] Error "NULL field support" when opening sauv files with MEDLoader Fix splitting a field into part-fields --- src/MEDLoader/SauvMedConvertor.cxx | 6 +++--- src/MEDLoader/SauvReader.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index f4af715ff..c4b17862c 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -2108,8 +2108,8 @@ void IntermediateMED::setFields( SauvUtilities::DoubleField* fld, } else { - fld->setValues( valPtr, iSub++ ); - setTS( fld, values, medFields, mesh, iSub ); + fld->setValues( valPtr, iSub ); + setTS( fld, values, medFields, mesh, iSub++ ); } } } @@ -2127,7 +2127,7 @@ void IntermediateMED::setTS( SauvUtilities::DoubleField* fld, const int iSub) { // analyze a field support - const Group* support = fld->getSupport(); + const Group* support = fld->getSupport( iSub ); int dimRel; const bool onAll = isOnAll( support, dimRel ); if ( !onAll && support->_name.empty() ) diff --git a/src/MEDLoader/SauvReader.cxx b/src/MEDLoader/SauvReader.cxx index da11eeb10..fcbbd5ef2 100644 --- a/src/MEDLoader/SauvReader.cxx +++ b/src/MEDLoader/SauvReader.cxx @@ -806,7 +806,7 @@ void SauvReader::read_PILE_NODES_FIELD (const int nbObjects, fdouble->_group = getFieldSupport( supports ); else for ( i_sub = 0; i_sub < nb_sub; ++i_sub ) - fdouble->_sub[ i_sub ]._support->_isProfile; + fdouble->_sub[ i_sub ]._support->_isProfile = true; } // end loop on field objects -- 2.39.2