]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
0022211: [CEA 810] Error "NULL field support" when opening sauv files with MEDLoader
authoreap <eap@opencascade.com>
Mon, 20 May 2013 06:54:25 +0000 (06:54 +0000)
committereap <eap@opencascade.com>
Mon, 20 May 2013 06:54:25 +0000 (06:54 +0000)
Fix splitting a field into part-fields

src/MEDLoader/SauvMedConvertor.cxx
src/MEDLoader/SauvReader.cxx

index f4af715ff6ed43e5489eacf2deee1c8ea832311f..c4b17862c1d5a79a622e0345f6544abec6fe159f 100644 (file)
@@ -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() )
index da11eeb10e81f2ea0e08d90068a5cf3508722dc5..fcbbd5ef26038c499f95ae81120254c02ae876be 100644 (file)
@@ -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