]> SALOME platform Git repositories - tools/medcoupling.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 10:26:26 +0000 (10:26 +0000)
committereap <eap@opencascade.com>
Mon, 20 May 2013 10:26:26 +0000 (10:26 +0000)
Fix splitting a field into part-fields

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

index 75e1d0c139c8c6776fb45388a0d459ae31ed88df..ef528cade98891d5d9b046419a641b08d488c56d 100644 (file)
@@ -2102,8 +2102,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++ );
         }
     }
 }
@@ -2121,7 +2121,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 720d34b657309ce845956276b8483f92fee5279d..ebff8ecfd376259d2e285e9c1b498dbd2d941f04 100644 (file)
@@ -808,7 +808,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