]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
New organization of arrays. One array per MEDFileField1TSWithoutDAS rather than plent...
authorageay <ageay>
Thu, 23 Feb 2012 11:53:21 +0000 (11:53 +0000)
committerageay <ageay>
Thu, 23 Feb 2012 11:53:21 +0000 (11:53 +0000)
src/MEDLoader/MEDFileField.cxx
src/MEDLoader/MEDFileField.hxx
src/MEDLoader/SauvWriter.cxx
src/MEDLoader/Swig/MEDLoader.i
src/MEDLoader/Swig/MEDLoaderTest3.py

index f17d480cfe3d63c87a484b6bc437dc588f8ee39b..d48dc5a17d0c1be69efba455aecf7408dce64580 100644 (file)
@@ -2114,7 +2114,22 @@ std::vector<TypeOfField> MEDFileField1TSWithoutDAS::getTypesOfFieldAvailable() c
 /*!
  * entry point for users that want to iterate into MEDFile DataStructure without any overhead.
  */
-std::vector< std::vector<const DataArrayDouble *> > MEDFileField1TSWithoutDAS::getFieldSplitedByType(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception)
+std::vector< std::vector< std::pair<int,int> > > MEDFileField1TSWithoutDAS::getFieldSplitedByType(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception)
+{
+  int meshId=0;
+  if(mname)
+    meshId=getMeshIdFromMeshName(mname);
+  else
+    if(_field_per_mesh.empty())
+      throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutDAS::getFieldSplitedByType : This is empty !");
+  return _field_per_mesh[meshId]->getFieldSplitedByType(types,typesF,pfls,locs);
+}
+
+/*!
+ * entry point for users that want to iterate into MEDFile DataStructure with a reduced overhead because output arrays are extracted (created) specially
+ * for the call of this method. That's why the DataArrayDouble instance in returned vector of vector should be dealed by the caller.
+ */
+std::vector< std::vector<DataArrayDouble *> > MEDFileField1TSWithoutDAS::getFieldSplitedByType2(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception)
 {
   int meshId=0;
   if(mname)
@@ -2124,7 +2139,7 @@ std::vector< std::vector<const DataArrayDouble *> > MEDFileField1TSWithoutDAS::g
       throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutDAS::getFieldSplitedByType : This is empty !");
   std::vector< std::vector< std::pair<int,int> > > ret0=_field_per_mesh[meshId]->getFieldSplitedByType(types,typesF,pfls,locs);
   int nbOfRet=ret0.size();
-  std::vector< std::vector<const DataArrayDouble *> > ret(nbOfRet);
+  std::vector< std::vector<DataArrayDouble *> > ret(nbOfRet);
   for(int i=0;i<nbOfRet;i++)
     {
       const std::vector< std::pair<int,int> >& p=ret0[i];
@@ -2136,7 +2151,6 @@ std::vector< std::vector<const DataArrayDouble *> > MEDFileField1TSWithoutDAS::g
           ret[i][j]=tmp;
         }
     }
-  //anthony.geay@cea.fr
   return ret;
 }
 
@@ -2862,11 +2876,23 @@ std::vector< std::vector<TypeOfField> > MEDFileFieldMultiTSWithoutDAS::getTypesO
   return ret;
 }
 
-std::vector< std::vector<const DataArrayDouble *> > MEDFileFieldMultiTSWithoutDAS::getFieldSplitedByType(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception)
+/*!
+ * entry point for users that want to iterate into MEDFile DataStructure without any overhead.
+ */
+std::vector< std::vector< std::pair<int,int> > > MEDFileFieldMultiTSWithoutDAS::getFieldSplitedByType(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception)
 {
   return getTimeStepEntry(iteration,order).getFieldSplitedByType(mname,types,typesF,pfls,locs);
 }
 
+/*!
+ * entry point for users that want to iterate into MEDFile DataStructure with a reduced overhead because output arrays are extracted (created) specially
+ * for the call of this method. That's why the DataArrayDouble instance in returned vector of vector should be dealed by the caller.
+ */
+std::vector< std::vector<DataArrayDouble *> > MEDFileFieldMultiTSWithoutDAS::getFieldSplitedByType2(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception)
+{
+  return getTimeStepEntry(iteration,order).getFieldSplitedByType2(mname,types,typesF,pfls,locs);
+}
+
 const MEDFileField1TSWithoutDAS& MEDFileFieldMultiTSWithoutDAS::getTimeStepEntry(int iteration, int order) const throw(INTERP_KERNEL::Exception)
 {
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileField1TSWithoutDAS>  >::const_iterator it=_time_steps.begin();it!=_time_steps.end();it++)
index a124ad9aa4327b07e4b89218e56fd7d2d1660dea..4bbc0570b822ce5ddfd882beacd55dbb071ee402 100644 (file)
@@ -351,7 +351,8 @@ namespace ParaMEDMEM
     void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
   public:
     std::vector<TypeOfField> getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
-    std::vector< std::vector<const DataArrayDouble *> > getFieldSplitedByType(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
+    std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
+    std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const char *mName, int renumPol, const MEDFieldFieldGlobsReal *glob) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFieldFieldGlobsReal *glob, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const char *mName, int renumPol, const MEDFieldFieldGlobsReal *glob) const throw(INTERP_KERNEL::Exception);
@@ -413,7 +414,8 @@ namespace ParaMEDMEM
     int getNumberOfTS() const;
     std::vector< std::pair<int,int> > getIterations() const;
     std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
-    std::vector< std::vector<const DataArrayDouble *> > getFieldSplitedByType(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
+    std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
+    std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
     virtual void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
     std::string getName() const;
     std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const throw(INTERP_KERNEL::Exception);
index 712ba6940966194e260a1bf19c3c99e07fe2df56..fb41ea3a60776814909d898f473c425181efc8ea 100644 (file)
@@ -1049,9 +1049,9 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
           vector<INTERP_KERNEL::NormalizedCellType> types;
           vector< vector<TypeOfField> > typesF;
           vector< vector<string> > pfls, locs;
-          vector< vector<const DataArrayDouble *> > valsVec;
-          valsVec = _nodeFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName(),
-                                                            types, typesF, pfls, locs);
+          vector< vector< std::pair<int,int> > > valsVec;
+          valsVec=_nodeFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName(),
+                                                          types, typesF, pfls, locs);
           // believe that there can be only one type in a nodal field,
           // so do not use a loop on types
           if ( pfls[0][0].empty() ) pfls[0][0] = noProfileName( types[0] );
@@ -1060,7 +1060,7 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
             THROW_IK_EXCEPTION( "SauvWriter::writeNodalFields(): no sub-mesh for profile |"
                                 << pfls[0][0] << "|");
           vals[0] = -pfl2Sub->second->_id;
-          vals[1] = valsVec[0][0]->getNumberOfTuples() / nbComp;
+          vals[1] = (valsVec[0][0].second-valsVec[0][0].first);
           vals[2] = compInfo.size();
           for ( size_t i = 0; i < vals.size(); ++i, fcount++ )
             *_sauvFile << setw(8) << vals[i];
@@ -1098,15 +1098,15 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
           vector<INTERP_KERNEL::NormalizedCellType> types;
           vector< vector<TypeOfField> > typesF;
           vector< vector<string> > pfls, locs;
-          vector< vector<const DataArrayDouble *> > valsVec;
+          vector< vector< std::pair<int,int> > > valsVec;
           valsVec = _nodeFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName(),
                                                             types, typesF, pfls, locs);
           // believe that there can be only one type in a nodal field,
           // so do not perform a loop on types
-          const DataArrayDouble* valsArray = valsVec[0][0];
+          const DataArrayDouble* valsArray = _nodeFields[iF]->getUndergroundDataArray(it.first, it.second);
           for ( size_t j = 0; j < compInfo.size(); ++j )
             {
-              for ( size_t i = 0; i < (std::size_t)valsArray->getNumberOfTuples(); ++i, fcount++ )
+              for ( size_t i = valsVec[0][0].first; i < (std::size_t)valsVec[0][0].second; ++i, fcount++ )
                 *_sauvFile << setw(22) << valsArray->getIJ( i, j );
               fcount.stop();
             }
@@ -1159,7 +1159,7 @@ void SauvWriter::writeElemFields(map<string,int>& fldNamePrefixMap)
           vector<INTERP_KERNEL::NormalizedCellType> types;
           vector< vector<TypeOfField> > typesF;
           vector< vector<string> > pfls, locs;
-          vector< vector<const DataArrayDouble *> > valsVec;
+          vector< vector< std::pair<int,int> > > valsVec;
           valsVec = _cellFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName(),
                                                             types, typesF, pfls, locs);
           for ( size_t i = 0; i < valsVec.size(); ++i )
@@ -1187,9 +1187,8 @@ void SauvWriter::writeElemFields(map<string,int>& fldNamePrefixMap)
           vector<INTERP_KERNEL::NormalizedCellType> types;
           vector< vector<TypeOfField> > typesF;
           vector< vector<string> > pfls, locs;
-          vector< vector<const DataArrayDouble *> > valsVec;
-          valsVec = _cellFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName(),
-                                                            types, typesF, pfls, locs);
+          _cellFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName(),
+                                                  types, typesF, pfls, locs);
           for ( size_t iType = 0; iType < pfls.size(); ++iType )
             for ( size_t iP = 0; iP < pfls[iType].size(); ++iP )
               {
@@ -1253,7 +1252,7 @@ void SauvWriter::writeElemTimeStamp(int iF, int iter, int order)
   vector<INTERP_KERNEL::NormalizedCellType> types;
   vector< vector<TypeOfField> > typesF;
   vector< vector<string> > pfls, locs;
-  vector< vector<const DataArrayDouble *> > valsVec;
+  vector< vector< std::pair<int,int> > > valsVec;
   valsVec = _cellFields[iF]->getFieldSplitedByType( iter, order, _fileMesh->getName(),
                                                     types, typesF, pfls, locs);
   for ( size_t iType = 0; iType < pfls.size(); ++iType )
@@ -1294,16 +1293,17 @@ void SauvWriter::writeElemTimeStamp(int iF, int iter, int order)
           }
 
         // (10) values
-        const DataArrayDouble* valArray = valsVec[iType][iP];
+        const std::pair<int,int>& bgEnd = valsVec[iType][iP];
+        const DataArrayDouble* valArray = _cellFields[iF]->getUndergroundDataArray(iter, order);
         for ( iComp = 0; iComp < nbComp; ++iComp )
           {
             *_sauvFile << setw(8) << nbPntPerCell
-                       << setw(8) << valArray->getNbOfElems() / nbPntPerCell / nbComp
+                       << setw(8) << (bgEnd.second-bgEnd.first) / nbPntPerCell
                        << setw(8) << 0
                        << setw(8) << 0
                        << endl;
             fcount.init(3);
-            for ( size_t i = 0; i < (size_t) valArray->getNumberOfTuples(); ++i, fcount++ )
+            for ( size_t i = bgEnd.first; i < (size_t) bgEnd.second; ++i, fcount++ )
               *_sauvFile << setw(22) << valArray->getIJ( i, iComp );
             fcount.stop();
           }
index 8d00dc2963e32ab9bf431dc94786b3c2aaa5c3e7..b83fbfeb9bbab5820b373d84dc7d98211a835ba5 100644 (file)
@@ -707,12 +707,47 @@ namespace ParaMEDMEM
            std::vector< std::vector<TypeOfField> > typesF;
            std::vector< std::vector<std::string> > pfls;
            std::vector< std::vector<std::string> > locs;
-           std::vector< std::vector<const DataArrayDouble *> > ret=self->getFieldSplitedByType(mname,types,typesF,pfls,locs);
+           std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(mname,types,typesF,pfls,locs);
            int sz=ret.size();
            PyObject *ret2=PyList_New(sz);
            for(int i=0;i<sz;i++)
              {
-               const std::vector<const DataArrayDouble *>& dadsI=ret[i];
+               const std::vector< std::pair<int,int> >& dadsI=ret[i];
+               const std::vector<TypeOfField>& typesFI=typesF[i];
+               const std::vector<std::string>& pflsI=pfls[i];
+               const std::vector<std::string>& locsI=locs[i];
+               PyObject *elt=PyTuple_New(2);
+               PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
+               int sz2=ret[i].size();
+               PyObject *elt2=PyList_New(sz2);
+               for(int j=0;j<sz2;j++)
+                 {
+                   PyObject *elt3=PyTuple_New(4);
+                   PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
+                   PyObject *elt4=PyTuple_New(2); PyTuple_SetItem(elt4,0,SWIG_From_int(dadsI[j].first)); PyTuple_SetItem(elt4,1,SWIG_From_int(dadsI[j].second));
+                   PyTuple_SetItem(elt3,1,elt4);
+                   PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
+                   PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
+                   PyList_SetItem(elt2,j,elt3);
+                 }
+               PyTuple_SetItem(elt,1,elt2);
+               PyList_SetItem(ret2,i,elt);
+             }
+           return ret2;
+         }
+
+         PyObject *getFieldSplitedByType2(const char *mname=0) const throw(INTERP_KERNEL::Exception)
+         {
+           std::vector<INTERP_KERNEL::NormalizedCellType> types;
+           std::vector< std::vector<TypeOfField> > typesF;
+           std::vector< std::vector<std::string> > pfls;
+           std::vector< std::vector<std::string> > locs;
+           std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(mname,types,typesF,pfls,locs);
+           int sz=ret.size();
+           PyObject *ret2=PyList_New(sz);
+           for(int i=0;i<sz;i++)
+             {
+               const std::vector<DataArrayDouble *>& dadsI=ret[i];
                const std::vector<TypeOfField>& typesFI=typesF[i];
                const std::vector<std::string>& pflsI=pfls[i];
                const std::vector<std::string>& locsI=locs[i];
@@ -723,8 +758,6 @@ namespace ParaMEDMEM
                for(int j=0;j<sz2;j++)
                  {
                    PyObject *elt3=PyTuple_New(4);
-                   if(dadsI[j])
-                     dadsI[j]->incrRef();
                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
                    PyTuple_SetItem(elt3,1,SWIG_NewPointerObj(SWIG_as_voidptr(dadsI[j]),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
                    PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
@@ -864,12 +897,47 @@ namespace ParaMEDMEM
            std::vector< std::vector<TypeOfField> > typesF;
            std::vector< std::vector<std::string> > pfls;
            std::vector< std::vector<std::string> > locs;
-           std::vector< std::vector<const DataArrayDouble *> > ret=self->getFieldSplitedByType(iteration,order,mname,types,typesF,pfls,locs);
+           std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(iteration,order,mname,types,typesF,pfls,locs);
+           int sz=ret.size();
+           PyObject *ret2=PyList_New(sz);
+           for(int i=0;i<sz;i++)
+             {
+               const std::vector< std::pair<int,int> >& dadsI=ret[i];
+               const std::vector<TypeOfField>& typesFI=typesF[i];
+               const std::vector<std::string>& pflsI=pfls[i];
+               const std::vector<std::string>& locsI=locs[i];
+               PyObject *elt=PyTuple_New(2);
+               PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
+               int sz2=ret[i].size();
+               PyObject *elt2=PyList_New(sz2);
+               for(int j=0;j<sz2;j++)
+                 {
+                   PyObject *elt3=PyTuple_New(4);
+                   PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
+                   PyObject *elt4=PyTuple_New(2); PyTuple_SetItem(elt4,0,SWIG_From_int(dadsI[j].first)); PyTuple_SetItem(elt4,1,SWIG_From_int(dadsI[j].second));
+                   PyTuple_SetItem(elt3,1,elt4);
+                   PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
+                   PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
+                   PyList_SetItem(elt2,j,elt3);
+                 }
+               PyTuple_SetItem(elt,1,elt2);
+               PyList_SetItem(ret2,i,elt);
+             }
+           return ret2;
+         }
+
+         PyObject *getFieldSplitedByType2(int iteration, int order, const char *mname=0) const throw(INTERP_KERNEL::Exception)
+         {
+           std::vector<INTERP_KERNEL::NormalizedCellType> types;
+           std::vector< std::vector<TypeOfField> > typesF;
+           std::vector< std::vector<std::string> > pfls;
+           std::vector< std::vector<std::string> > locs;
+           std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(iteration,order,mname,types,typesF,pfls,locs);
            int sz=ret.size();
            PyObject *ret2=PyList_New(sz);
            for(int i=0;i<sz;i++)
              {
-               const std::vector<const DataArrayDouble *>& dadsI=ret[i];
+               const std::vector<DataArrayDouble *>& dadsI=ret[i];
                const std::vector<TypeOfField>& typesFI=typesF[i];
                const std::vector<std::string>& pflsI=pfls[i];
                const std::vector<std::string>& locsI=locs[i];
@@ -880,8 +948,6 @@ namespace ParaMEDMEM
                for(int j=0;j<sz2;j++)
                  {
                    PyObject *elt3=PyTuple_New(4);
-                   if(dadsI[j])
-                     dadsI[j]->incrRef();
                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
                    PyTuple_SetItem(elt3,1,SWIG_NewPointerObj(SWIG_as_voidptr(dadsI[j]),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
                    PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
index 0d62132f33c9e59e7bd8171728913e2b6fcdab7d..79e6a639ec67653d3abc91ae03225549eac2f0a9 100644 (file)
@@ -515,7 +515,7 @@ class MEDLoaderTest(unittest.TestCase):
         ff2=MEDFileField1TS.New(fname,f1.getName(),f1.getTime()[1],f1.getTime()[2])
         f2=ff2.getFieldAtLevel(ON_GAUSS_PT,0)
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12))
-        sbt=ff2.getFieldSplitedByType()
+        sbt=ff2.getFieldSplitedByType2()
         loc1=ff2.getLocalization("Loc_MyFirstFieldOnGaussPoint_NORM_TRI6_5")
         self.assertEqual("Loc_MyFirstFieldOnGaussPoint_NORM_TRI6_5",loc1.getName())
         self.assertEqual((-1, 1,-1,-1,1,-1,-1,0,0,-1,0,0),loc1.getRefCoords())
@@ -596,7 +596,7 @@ class MEDLoaderTest(unittest.TestCase):
         self.assertTrue(vals.isEqual(d,1e-14))
         #
         ff2=MEDFileField1TS.New(fname,f1.getName(),-1,-1)
-        sbt=ff2.getFieldSplitedByType()
+        sbt=ff2.getFieldSplitedByType2()
         self.assertEqual(3,sbt[0][0])#TRI3
         self.assertEqual(0,sbt[0][1][0][0])#CELL For TRI3
         self.assertEqual("",sbt[0][1][0][2])#no profile For TRI3