]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message ***
authorageay <ageay>
Wed, 29 Sep 2010 07:25:08 +0000 (07:25 +0000)
committerageay <ageay>
Wed, 29 Sep 2010 07:25:08 +0000 (07:25 +0000)
src/MEDLoader/MEDLoader.cxx
src/MEDLoader/MEDLoader.hxx
src/MEDLoader/Swig/MEDLoaderTest.py
src/MEDLoader/Swig/MEDLoaderTest2.py
src/MEDLoader/Swig/libMEDLoader_Swig.i
src/MEDLoader/Test/MEDLoaderTest.cxx

index a40b4922b40b980bb7ac9474cbf9175136e402a6..b8b61edc932a605732e7961b5139160593b14967 100644 (file)
@@ -683,6 +683,18 @@ void MEDLoaderNS::readFieldDoubleDataInMedFile(const char *fileName, const char
                       if(found2)
                         time=dt;
                     }
+                  if(!found2)
+                    {
+                      std::ostringstream oss; oss << "FieldDouble in file \""<< fileName<< "\" with name \"" << fieldName << "\" on mesh \"" <<  meshName;
+                      oss << "\" does not have such time step : iteration=" << iteration << " order=" << order << std::endl;
+                      delete [] valr;
+                      delete [] comp;
+                      delete [] unit;
+                      delete [] dt_unit;
+                      delete [] maa_ass;
+                      MEDfermer(fid);
+                      throw INTERP_KERNEL::Exception(oss.str().c_str());
+                    }
                   MEDchampLire(fid,(char *)meshName,(char *)fieldName,(unsigned char*)valr,MED_FULL_INTERLACE,MED_ALL,locname,
                                pflname,MED_COMPACT,tabEnt[typeOfOutField],tabType[typeOfOutField][j],iteration,order);
                   std::string tmp(locname);
@@ -1543,26 +1555,26 @@ ParaMEDMEM::MEDCouplingUMesh *MEDLoader::ReadUMeshFromGroups(const char *fileNam
   return ret;
 }
 
-ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldDouble(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
+ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadField(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
 {
   CheckFileForRead(fileName);
   switch(type)
     {
     case ON_CELLS:
-      return ReadFieldDoubleCell(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
+      return ReadFieldCell(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
     case ON_NODES:
-      return ReadFieldDoubleNode(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
+      return ReadFieldNode(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
     case ON_GAUSS_PT:
-      return ReadFieldDoubleGauss(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
+      return ReadFieldGauss(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
     case ON_GAUSS_NE:
-      return ReadFieldDoubleGaussNE(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
+      return ReadFieldGaussNE(fileName,meshName,meshDimRelToMax,fieldName,iteration,order);
     default:
       throw INTERP_KERNEL::Exception("Type of field specified not managed ! manages are ON_NODES, ON_CELLS, ON_GAUSS_PT or ON_GAUSS_NE !");
     } 
 }
 
-std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsDoubleOnSameMesh(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
-                                                                                        const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
+std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsOnSameMesh(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+                                                                                  const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
 {
   CheckFileForRead(fileName);
   std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ret(its.size());
@@ -1606,46 +1618,46 @@ std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsDoubleOnS
   return ret;
 }
 
-std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsDoubleCellOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsCellOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
                                                                                             const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
 {
-  return ReadFieldsDoubleOnSameMesh(ON_CELLS,fileName,meshName,meshDimRelToMax,fieldName,its);
+  return ReadFieldsOnSameMesh(ON_CELLS,fileName,meshName,meshDimRelToMax,fieldName,its);
 }
 
-std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsDoubleNodeOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
-                                                                                            const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
+std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsNodeOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+                                                                                      const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
 {
-  return ReadFieldsDoubleOnSameMesh(ON_NODES,fileName,meshName,meshDimRelToMax,fieldName,its);
+  return ReadFieldsOnSameMesh(ON_NODES,fileName,meshName,meshDimRelToMax,fieldName,its);
 }
 
-std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsDoubleGaussOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
-                                                                                             const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
+std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsGaussOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+                                                                                       const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
 {
-  return ReadFieldsDoubleOnSameMesh(ON_GAUSS_PT,fileName,meshName,meshDimRelToMax,fieldName,its);
+  return ReadFieldsOnSameMesh(ON_GAUSS_PT,fileName,meshName,meshDimRelToMax,fieldName,its);
 }
 
-std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsDoubleGaussNEOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
-                                                                                               const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
+std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> MEDLoader::ReadFieldsGaussNEOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+                                                                                         const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception)
 {
-  return ReadFieldsDoubleOnSameMesh(ON_GAUSS_NE,fileName,meshName,meshDimRelToMax,fieldName,its);
+  return ReadFieldsOnSameMesh(ON_GAUSS_NE,fileName,meshName,meshDimRelToMax,fieldName,its);
 }
 
-ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldDoubleCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
+ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
 {
   return MEDLoaderNS::readFieldDoubleLev1(fileName,meshName,meshDimRelToMax,fieldName,iteration,order,ON_CELLS);
 }
 
-ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldDoubleNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
+ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
 {
   return MEDLoaderNS::readFieldDoubleLev1(fileName,meshName,meshDimRelToMax,fieldName,iteration,order,ON_NODES);
 }
 
-ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldDoubleGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
+ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
 {
   return MEDLoaderNS::readFieldDoubleLev1(fileName,meshName,meshDimRelToMax,fieldName,iteration,order,ON_GAUSS_PT);
 }
 
-ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldDoubleGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
+ParaMEDMEM::MEDCouplingFieldDouble *MEDLoader::ReadFieldGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception)
 {
   return MEDLoaderNS::readFieldDoubleLev1(fileName,meshName,meshDimRelToMax,fieldName,iteration,order,ON_GAUSS_NE);
 }
index 2efb99927fa0e8102395ad92b716d6cb6696213a..f302c023c34987f20e931b61ef2e4a23c754f144 100644 (file)
@@ -99,21 +99,21 @@ class MEDLOADER_EXPORT MEDLoader
   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
   static int ReadUMeshDimFromFile(const char *fileName, const char *meshName) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDouble(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsDoubleOnSameMesh(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadField(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsOnSameMesh(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
                                                                                       const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
-  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsDoubleCellOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsCellOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
                                                                                           const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
-  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsDoubleNodeOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsNodeOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
                                                                                           const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
-  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsDoubleGaussOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsGaussOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
                                                                                            const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
-  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsDoubleGaussNEOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
+  static std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> ReadFieldsGaussNEOnSameMesh(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName,
                                                                                            const std::vector<std::pair<int,int> >& its) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
   static void WriteUMesh(const char *fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
   static void WriteUMeshDep(const char *fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
   static void WriteUMeshesPartition(const char *fileName, const char *meshName, const std::vector<ParaMEDMEM::MEDCouplingUMesh *>& meshes, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
index 5f1adc3304822ca74702c28edef8c86e0c58ef27..1b1103bed9bd143c23689808ab77ca76e4571c4f 100644 (file)
@@ -67,12 +67,12 @@ class MEDLoaderTest(unittest.TestCase):
     def testFieldRW1(self):
         f1=MEDLoaderDataForTest.buildVecFieldOnCells_1();
         MEDLoader.WriteField("Pyfile6.med",f1,True);
-        f2=MEDLoader.ReadFieldDoubleCell("Pyfile6.med",f1.getMesh().getName(),0,f1.getName(),0,1);
+        f2=MEDLoader.ReadFieldCell("Pyfile6.med",f1.getMesh().getName(),0,f1.getName(),0,1);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
         #
         f1=MEDLoaderDataForTest.buildVecFieldOnNodes_1();
         MEDLoader.WriteField("Pyfile7.med",f1,True);
-        f2=MEDLoader.ReadFieldDoubleNode("Pyfile7.med",f1.getMesh().getName(),0,f1.getName(),2,3);
+        f2=MEDLoader.ReadFieldNode("Pyfile7.med",f1.getMesh().getName(),0,f1.getName(),2,3);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
         pass
 
@@ -89,17 +89,19 @@ class MEDLoaderTest(unittest.TestCase):
         f1.getArray().setIJ(0,0,VAL2);
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
         #retrieving time steps...
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),0,f1.getName(),8,9);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),0,f1.getName(),8,9);
         f1.setTime(10.,8,9);
         f1.getArray().setIJ(0,0,VAL1);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),0,f1.getName(),0,1);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),0,f1.getName(),0,1);
         f3=MEDLoaderDataForTest.buildVecFieldOnCells_1();
         self.assertTrue(f3.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),0,f1.getName(),18,19);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),0,f1.getName(),18,19);
         f1.setTime(10.14,18,19);
         f1.getArray().setIJ(0,0,VAL2);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
+        #test of throw on invalid (dt,it)
+        self.assertRaises(Exception,MEDLoader.ReadFieldCell,fileName,f1.getMesh().getName(),0,f1.getName(),28,19);
         #ON NODES
         f1=MEDLoaderDataForTest.buildVecFieldOnNodes_1();
         fileName2="Pyfile9.med";
@@ -111,14 +113,14 @@ class MEDLoaderTest(unittest.TestCase):
         f1.setTime(210.,208,209);
         f1.getArray().setIJ(0,3,VAL2);
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName2,f1);
-        f2=MEDLoader.ReadFieldDoubleNode(fileName2,f1.getMesh().getName(),0,f1.getName(),108,109);
+        f2=MEDLoader.ReadFieldNode(fileName2,f1.getMesh().getName(),0,f1.getName(),108,109);
         f1.setTime(110.,108,109);
         f1.getArray().setIJ(0,3,VAL1);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleNode(fileName2,f1.getMesh().getName(),0,f1.getName(),2,3);
+        f2=MEDLoader.ReadFieldNode(fileName2,f1.getMesh().getName(),0,f1.getName(),2,3);
         f3=MEDLoaderDataForTest.buildVecFieldOnNodes_1();
         self.assertTrue(f3.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleNode(fileName2,f1.getMesh().getName(),0,f1.getName(),208,209);
+        f2=MEDLoader.ReadFieldNode(fileName2,f1.getMesh().getName(),0,f1.getName(),208,209);
         f1.setTime(210.,208,209);
         f1.getArray().setIJ(0,3,VAL2);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
@@ -186,22 +188,22 @@ class MEDLoaderTest(unittest.TestCase):
         self.assertTrue(len(it4)==0);
         #
         #
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name3,0,name1,8,9);
+        f1=MEDLoader.ReadFieldCell(fileName,name3,0,name1,8,9);
         self.assertAlmostEqual(VAL1,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name3,0,name1,18,19);
+        f1=MEDLoader.ReadFieldCell(fileName,name3,0,name1,18,19);
         self.assertAlmostEqual(VAL2,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name2,0,name1,28,29);
+        f1=MEDLoader.ReadFieldCell(fileName,name2,0,name1,28,29);
         self.assertAlmostEqual(3*VAL1,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name2,0,name1,38,39);
+        f1=MEDLoader.ReadFieldCell(fileName,name2,0,name1,38,39);
         self.assertAlmostEqual(3*VAL2,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name2,0,name1,48,49);
+        f1=MEDLoader.ReadFieldCell(fileName,name2,0,name1,48,49);
         self.assertAlmostEqual(4*VAL2,f1.getArray().getIJ(0,0),13);
         #
-        f1=MEDLoader.ReadFieldDoubleNode(fileName,name2,0,name1,8,9);
+        f1=MEDLoader.ReadFieldNode(fileName,name2,0,name1,8,9);
         self.assertAlmostEqual(71.,f1.getArray().getIJ(0,3),13);
-        f1=MEDLoader.ReadFieldDoubleNode(fileName,name2,0,name1,108,109);
+        f1=MEDLoader.ReadFieldNode(fileName,name2,0,name1,108,109);
         self.assertAlmostEqual(VAL1,f1.getArray().getIJ(0,3),13);
-        f1=MEDLoader.ReadFieldDoubleNode(fileName,name2,0,name1,208,209);
+        f1=MEDLoader.ReadFieldNode(fileName,name2,0,name1,208,209);
         self.assertAlmostEqual(VAL2,f1.getArray().getIJ(0,3),13);
         pass
 
@@ -283,7 +285,7 @@ class MEDLoaderTest(unittest.TestCase):
         #
         MEDLoader.WriteField(fileName,f1,False);#<- False important for the test
         #
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),0,f1.getName(),2,7);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),0,f1.getName(),2,7);
         f2.checkCoherency();
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
         #
@@ -293,7 +295,7 @@ class MEDLoaderTest(unittest.TestCase):
         fileName="Pyfile13.med";
         f1=MEDLoaderDataForTest.buildVecFieldOnGauss_1();
         MEDLoader.WriteField(fileName,f1,True);
-        f2=MEDLoader.ReadFieldDouble(ON_GAUSS_PT,fileName,f1.getMesh().getName(),0,f1.getName(),1,5);
+        f2=MEDLoader.ReadField(ON_GAUSS_PT,fileName,f1.getMesh().getName(),0,f1.getName(),1,5);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
         pass
 
@@ -301,7 +303,7 @@ class MEDLoaderTest(unittest.TestCase):
         fileName="Pyfile14.med";
         f1=MEDLoaderDataForTest.buildVecFieldOnGaussNE_1();
         MEDLoader.WriteField(fileName,f1,True);
-        f2=MEDLoader.ReadFieldDouble(ON_GAUSS_NE,fileName,f1.getMesh().getName(),0,f1.getName(),1,5);
+        f2=MEDLoader.ReadField(ON_GAUSS_NE,fileName,f1.getMesh().getName(),0,f1.getName(),1,5);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
         pass
 
@@ -343,7 +345,7 @@ class MEDLoaderTest(unittest.TestCase):
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
         # Reading
         its=[(1,2),(3,4),(5,6)];
-        fs=MEDLoader.ReadFieldsDoubleOnSameMesh(ON_CELLS,fileName,f_1.getMesh().getName(),0,f_1.getName(),its);
+        fs=MEDLoader.ReadFieldsOnSameMesh(ON_CELLS,fileName,f_1.getMesh().getName(),0,f_1.getName(),its);
         self.assertEqual(3,len(fs));
         self.assertTrue(fs[0].isEqual(f_1,1e-12,1e-12));
         self.assertTrue(fs[1].isEqual(f_2,1e-12,1e-12));
@@ -382,7 +384,7 @@ class MEDLoaderTest(unittest.TestCase):
         f1.setTime(3.14,2,7);
         f1.checkCoherency();
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),-1,f1.getName(),2,7);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),-1,f1.getName(),2,7);
         self.assertTrue(f2.isEqual(f1,1e-12,1e-12));
         pass
     pass
index 868421a91cc6a6dc47b565efbc0c3db167add501..bc39c1bc01ffa15137a296017b10bbb0978f1066 100644 (file)
@@ -67,12 +67,12 @@ class MEDLoaderTest(unittest.TestCase):
     def testFieldRW1(self):
         f1=MEDLoaderDataForTest.buildVecFieldOnCells_1();
         MEDLoader.WriteFieldDep("Pyfile6.med",f1,False);
-        f2=MEDLoader.ReadFieldDoubleCell("Pyfile6.med",f1.getMesh().getName(),0,f1.getName(),0,1);
+        f2=MEDLoader.ReadFieldCell("Pyfile6.med",f1.getMesh().getName(),0,f1.getName(),0,1);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
         #
         f1=MEDLoaderDataForTest.buildVecFieldOnNodes_1();
         MEDLoader.WriteFieldDep("Pyfile7.med",f1,False);
-        f2=MEDLoader.ReadFieldDoubleNode("Pyfile7.med",f1.getMesh().getName(),0,f1.getName(),2,3);
+        f2=MEDLoader.ReadFieldNode("Pyfile7.med",f1.getMesh().getName(),0,f1.getName(),2,3);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
         pass
 
@@ -89,14 +89,14 @@ class MEDLoaderTest(unittest.TestCase):
         f1.getArray().setIJ(0,0,VAL2);
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
         #retrieving time steps...
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),0,f1.getName(),8,9);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),0,f1.getName(),8,9);
         f1.setTime(10.,8,9);
         f1.getArray().setIJ(0,0,VAL1);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),0,f1.getName(),0,1);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),0,f1.getName(),0,1);
         f3=MEDLoaderDataForTest.buildVecFieldOnCells_1();
         self.assertTrue(f3.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),0,f1.getName(),18,19);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),0,f1.getName(),18,19);
         f1.setTime(10.14,18,19);
         f1.getArray().setIJ(0,0,VAL2);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
@@ -111,14 +111,14 @@ class MEDLoaderTest(unittest.TestCase):
         f1.setTime(210.,208,209);
         f1.getArray().setIJ(0,3,VAL2);
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName2,f1);
-        f2=MEDLoader.ReadFieldDoubleNode(fileName2,f1.getMesh().getName(),0,f1.getName(),108,109);
+        f2=MEDLoader.ReadFieldNode(fileName2,f1.getMesh().getName(),0,f1.getName(),108,109);
         f1.setTime(110.,108,109);
         f1.getArray().setIJ(0,3,VAL1);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleNode(fileName2,f1.getMesh().getName(),0,f1.getName(),2,3);
+        f2=MEDLoader.ReadFieldNode(fileName2,f1.getMesh().getName(),0,f1.getName(),2,3);
         f3=MEDLoaderDataForTest.buildVecFieldOnNodes_1();
         self.assertTrue(f3.isEqual(f2,1e-12,1e-12));
-        f2=MEDLoader.ReadFieldDoubleNode(fileName2,f1.getMesh().getName(),0,f1.getName(),208,209);
+        f2=MEDLoader.ReadFieldNode(fileName2,f1.getMesh().getName(),0,f1.getName(),208,209);
         f1.setTime(210.,208,209);
         f1.getArray().setIJ(0,3,VAL2);
         self.assertTrue(f1.isEqual(f2,1e-12,1e-12));
@@ -186,22 +186,22 @@ class MEDLoaderTest(unittest.TestCase):
         self.assertTrue(len(it4)==0);
         #
         #
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name3,0,name1,8,9);
+        f1=MEDLoader.ReadFieldCell(fileName,name3,0,name1,8,9);
         self.assertAlmostEqual(VAL1,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name3,0,name1,18,19);
+        f1=MEDLoader.ReadFieldCell(fileName,name3,0,name1,18,19);
         self.assertAlmostEqual(VAL2,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name2,0,name1,28,29);
+        f1=MEDLoader.ReadFieldCell(fileName,name2,0,name1,28,29);
         self.assertAlmostEqual(3*VAL1,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name2,0,name1,38,39);
+        f1=MEDLoader.ReadFieldCell(fileName,name2,0,name1,38,39);
         self.assertAlmostEqual(3*VAL2,f1.getArray().getIJ(0,0),13);
-        f1=MEDLoader.ReadFieldDoubleCell(fileName,name2,0,name1,48,49);
+        f1=MEDLoader.ReadFieldCell(fileName,name2,0,name1,48,49);
         self.assertAlmostEqual(4*VAL2,f1.getArray().getIJ(0,0),13);
         #
-        f1=MEDLoader.ReadFieldDoubleNode(fileName,name2,0,name1,8,9);
+        f1=MEDLoader.ReadFieldNode(fileName,name2,0,name1,8,9);
         self.assertAlmostEqual(71.,f1.getArray().getIJ(0,3),13);
-        f1=MEDLoader.ReadFieldDoubleNode(fileName,name2,0,name1,108,109);
+        f1=MEDLoader.ReadFieldNode(fileName,name2,0,name1,108,109);
         self.assertAlmostEqual(VAL1,f1.getArray().getIJ(0,3),13);
-        f1=MEDLoader.ReadFieldDoubleNode(fileName,name2,0,name1,208,209);
+        f1=MEDLoader.ReadFieldNode(fileName,name2,0,name1,208,209);
         self.assertAlmostEqual(VAL2,f1.getArray().getIJ(0,3),13);
         pass
 
@@ -297,7 +297,7 @@ class MEDLoaderTest(unittest.TestCase):
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
         # Reading
         its=[(1,2),(3,4),(5,6)];
-        fs=MEDLoader.ReadFieldsDoubleOnSameMesh(ON_CELLS,fileName,f_1.getMesh().getName(),0,f_1.getName(),its);
+        fs=MEDLoader.ReadFieldsOnSameMesh(ON_CELLS,fileName,f_1.getMesh().getName(),0,f_1.getName(),its);
         self.assertEqual(3,len(fs));
         self.assertTrue(fs[0].isEqual(f_1,1e-12,1e-12));
         self.assertTrue(fs[1].isEqual(f_2,1e-12,1e-12));
@@ -336,7 +336,7 @@ class MEDLoaderTest(unittest.TestCase):
         f1.setTime(3.14,2,7);
         f1.checkCoherency();
         MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
-        f2=MEDLoader.ReadFieldDoubleCell(fileName,f1.getMesh().getName(),-1,f1.getName(),2,7);
+        f2=MEDLoader.ReadFieldCell(fileName,f1.getMesh().getName(),-1,f1.getName(),2,7);
         self.assertTrue(f2.isEqual(f1,1e-12,1e-12));
         pass
     pass
index 70e3043a622ab1f747b0d8b7f4ceb76bf83484d1..37648ec844542cc8a053820927288093ab7a75f2 100644 (file)
 %newobject MEDLoader::ReadUMeshFromFamilies;
 %newobject MEDLoader::ReadUMeshFromGroups;
 %newobject MEDLoader::ReadUMeshFromFile;
-%newobject MEDLoader::ReadFieldDouble;
-%newobject MEDLoader::ReadFieldDoubleCell;
-%newobject MEDLoader::ReadFieldDoubleNode;
-%newobject MEDLoader::ReadFieldDoubleGauss;
-%newobject MEDLoader::ReadFieldDoubleGaussNE;
+%newobject MEDLoader::ReadField;
+%newobject MEDLoader::ReadFieldCell;
+%newobject MEDLoader::ReadFieldNode;
+%newobject MEDLoader::ReadFieldGauss;
+%newobject MEDLoader::ReadFieldGaussNE;
 
 class MEDLoader
 {
@@ -99,11 +99,11 @@ public:
            }
          return ret;
        }
-       static PyObject *ReadFieldsDoubleOnSameMesh(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax,
-                                                   const char *fieldName, PyObject *liIts) throw(INTERP_KERNEL::Exception)
+       static PyObject *ReadFieldsOnSameMesh(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax,
+                                             const char *fieldName, PyObject *liIts) throw(INTERP_KERNEL::Exception)
        {
          std::vector<std::pair<int,int> > its=convertTimePairIdsFromPy(liIts);
-         std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> res=MEDLoader::ReadFieldsDoubleOnSameMesh(type,fileName,meshName,meshDimRelToMax,fieldName,its);
+         std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> res=MEDLoader::ReadFieldsOnSameMesh(type,fileName,meshName,meshDimRelToMax,fieldName,its);
          return convertFieldDoubleVecToPy(res);
        }
        static void WriteUMeshesPartition(const char *fileName, const char *meshName, PyObject *li, bool writeFromScratch) throw(INTERP_KERNEL::Exception)
@@ -127,11 +127,11 @@ public:
   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromGroups(const char *fileName, const char *meshName, int meshDimRelToMax, const std::vector<std::string>& grps) throw(INTERP_KERNEL::Exception);
   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const char *fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDouble(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
-  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadField(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
+  static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
   static void WriteUMesh(const char *fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
   static void WriteUMeshDep(const char *fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
   static void WriteField(const char *fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
index bab43105e212474e32326fdc0bb8de62f7246931..7c3451419c05db4648a2e6c9d521b17dd626c8f5 100644 (file)
@@ -90,14 +90,14 @@ void MEDLoaderTest::testFieldRW1()
 {
   MEDCouplingFieldDouble *f1=buildVecFieldOnCells_1();
   MEDLoader::WriteField("file6.med",f1,true);
-  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldDoubleCell("file6.med",f1->getMesh()->getName(),0,f1->getName(),0,1);
+  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldCell("file6.med",f1->getMesh()->getName(),0,f1->getName(),0,1);
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
   f1->decrRef();
   f2->decrRef();
   //
   f1=buildVecFieldOnNodes_1();
   MEDLoader::WriteField("file7.med",f1,true);
-  f2=MEDLoader::ReadFieldDoubleNode("file7.med",f1->getMesh()->getName(),0,f1->getName(),2,3);
+  f2=MEDLoader::ReadFieldNode("file7.med",f1->getMesh()->getName(),0,f1->getName(),2,3);
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
   f1->decrRef();
   f2->decrRef();
@@ -121,20 +121,22 @@ void MEDLoaderTest::testFieldRW2()
   tmp[0]=VAL2;
   MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
   //retrieving time steps...
-  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldDoubleCell(fileName,f1->getMesh()->getName(),0,f1->getName(),8,9);
+  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldCell(fileName,f1->getMesh()->getName(),0,f1->getName(),8,9);
   f1->setTime(10.,8,9);
   tmp[0]=VAL1;
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
   f2->decrRef();
-  f2=MEDLoader::ReadFieldDoubleCell(fileName,f1->getMesh()->getName(),0,f1->getName(),0,1);
+  f2=MEDLoader::ReadFieldCell(fileName,f1->getMesh()->getName(),0,f1->getName(),0,1);
   MEDCouplingFieldDouble *f3=buildVecFieldOnCells_1();
   CPPUNIT_ASSERT(f3->isEqual(f2,1e-12,1e-12));
   f3->decrRef();
   f2->decrRef();
-  f2=MEDLoader::ReadFieldDoubleCell(fileName,f1->getMesh()->getName(),0,f1->getName(),18,19);
+  f2=MEDLoader::ReadFieldCell(fileName,f1->getMesh()->getName(),0,f1->getName(),18,19);
   f1->setTime(10.14,18,19);
   tmp[0]=VAL2;
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
+  //test of throw on invalid (dt,it)
+  CPPUNIT_ASSERT_THROW(MEDLoader::ReadFieldCell(fileName,f1->getMesh()->getName(),0,f1->getName(),28,19),INTERP_KERNEL::Exception);
   f2->decrRef();
   f1->decrRef();
   //ON NODES
@@ -148,17 +150,17 @@ void MEDLoaderTest::testFieldRW2()
   f1->setTime(210.,208,209);
   tmp[3]=VAL2;
   MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName2,f1);
-  f2=MEDLoader::ReadFieldDoubleNode(fileName2,f1->getMesh()->getName(),0,f1->getName(),108,109);
+  f2=MEDLoader::ReadFieldNode(fileName2,f1->getMesh()->getName(),0,f1->getName(),108,109);
   f1->setTime(110.,108,109);
   tmp[3]=VAL1;
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
   f2->decrRef();
-  f2=MEDLoader::ReadFieldDoubleNode(fileName2,f1->getMesh()->getName(),0,f1->getName(),2,3);
+  f2=MEDLoader::ReadFieldNode(fileName2,f1->getMesh()->getName(),0,f1->getName(),2,3);
   f3=buildVecFieldOnNodes_1();
   CPPUNIT_ASSERT(f3->isEqual(f2,1e-12,1e-12));
   f3->decrRef();
   f2->decrRef();
-  f2=MEDLoader::ReadFieldDoubleNode(fileName2,f1->getMesh()->getName(),0,f1->getName(),208,209);
+  f2=MEDLoader::ReadFieldNode(fileName2,f1->getMesh()->getName(),0,f1->getName(),208,209);
   f1->setTime(210.,208,209);
   tmp[3]=VAL2;
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
@@ -231,29 +233,29 @@ void MEDLoaderTest::testFieldRW3()
   //
   f1->decrRef();
   //
-  f1=MEDLoader::ReadFieldDoubleCell(fileName,name3,0,name1,8,9);
+  f1=MEDLoader::ReadFieldCell(fileName,name3,0,name1,8,9);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(VAL1,f1->getArray()->getConstPointer()[0],1e-13);
   f1->decrRef();
-  f1=MEDLoader::ReadFieldDoubleCell(fileName,name3,0,name1,18,19);
+  f1=MEDLoader::ReadFieldCell(fileName,name3,0,name1,18,19);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(VAL2,f1->getArray()->getConstPointer()[0],1e-13);
   f1->decrRef();
-  f1=MEDLoader::ReadFieldDoubleCell(fileName,name2,0,name1,28,29);
+  f1=MEDLoader::ReadFieldCell(fileName,name2,0,name1,28,29);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(3*VAL1,f1->getArray()->getConstPointer()[0],1e-13);
   f1->decrRef();
-  f1=MEDLoader::ReadFieldDoubleCell(fileName,name2,0,name1,38,39);
+  f1=MEDLoader::ReadFieldCell(fileName,name2,0,name1,38,39);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(3*VAL2,f1->getArray()->getConstPointer()[0],1e-13);
   f1->decrRef();
-  f1=MEDLoader::ReadFieldDoubleCell(fileName,name2,0,name1,48,49);
+  f1=MEDLoader::ReadFieldCell(fileName,name2,0,name1,48,49);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(4*VAL2,f1->getArray()->getConstPointer()[0],1e-13);
   f1->decrRef();
   //
-  f1=MEDLoader::ReadFieldDoubleNode(fileName,name2,0,name1,8,9);
+  f1=MEDLoader::ReadFieldNode(fileName,name2,0,name1,8,9);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(71.,f1->getArray()->getConstPointer()[3],1e-13);
   f1->decrRef();
-  f1=MEDLoader::ReadFieldDoubleNode(fileName,name2,0,name1,108,109);
+  f1=MEDLoader::ReadFieldNode(fileName,name2,0,name1,108,109);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(VAL1,f1->getArray()->getConstPointer()[3],1e-13);
   f1->decrRef();
-  f1=MEDLoader::ReadFieldDoubleNode(fileName,name2,0,name1,208,209);
+  f1=MEDLoader::ReadFieldNode(fileName,name2,0,name1,208,209);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(VAL2,f1->getArray()->getConstPointer()[3],1e-13);
   f1->decrRef();
 }
@@ -360,7 +362,7 @@ void MEDLoaderTest::testFieldProfilRW1()
   //
   MEDLoader::WriteField(fileName,f1,false);//<- false important for the test
   //
-  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldDoubleCell(fileName,f1->getMesh()->getName(),0,f1->getName(),2,7);
+  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldCell(fileName,f1->getMesh()->getName(),0,f1->getName(),2,7);
   f2->checkCoherency();
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
   //
@@ -375,7 +377,7 @@ void MEDLoaderTest::testFieldGaussRW1()
   const char fileName[]="file13.med";
   MEDCouplingFieldDouble *f1=buildVecFieldOnGauss_1();
   MEDLoader::WriteField(fileName,f1,true);
-  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldDouble(ON_GAUSS_PT,fileName,f1->getMesh()->getName(),0,f1->getName(),1,5);
+  MEDCouplingFieldDouble *f2=MEDLoader::ReadField(ON_GAUSS_PT,fileName,f1->getMesh()->getName(),0,f1->getName(),1,5);
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
   f2->decrRef();
   f1->decrRef();
@@ -386,7 +388,7 @@ void MEDLoaderTest::testFieldGaussNERW1()
   const char fileName[]="file14.med";
   MEDCouplingFieldDouble *f1=buildVecFieldOnGaussNE_1();
   MEDLoader::WriteField(fileName,f1,true);
-  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldDouble(ON_GAUSS_NE,fileName,f1->getMesh()->getName(),0,f1->getName(),1,5);
+  MEDCouplingFieldDouble *f2=MEDLoader::ReadField(ON_GAUSS_NE,fileName,f1->getMesh()->getName(),0,f1->getName(),1,5);
   CPPUNIT_ASSERT(f1->isEqual(f2,1e-12,1e-12));
   f2->decrRef();
   f1->decrRef();
@@ -433,7 +435,7 @@ void MEDLoaderTest::testFieldShuffleRW1()
   const int renumber1[6]={2,1,5,0,3,4};
   f1->renumberCells(renumber1,false);
   MEDLoader::WriteField(fileName,f1,true);
-  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldDoubleCell(fileName,mesh->getName(),0,f1->getName(),2,7);
+  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldCell(fileName,mesh->getName(),0,f1->getName(),2,7);
   CPPUNIT_ASSERT(f2->isEqual(f1,1e-12,1e-12));
   f2->decrRef();
   //
@@ -475,7 +477,7 @@ void MEDLoaderTest::testMultiFieldShuffleRW1()
   its.push_back(std::pair<int,int>(1,2));
   its.push_back(std::pair<int,int>(3,4));
   its.push_back(std::pair<int,int>(5,6));
-  std::vector<MEDCouplingFieldDouble *> fs=MEDLoader::ReadFieldsDoubleOnSameMesh(ON_CELLS,fileName,f_1->getMesh()->getName(),0,f_1->getName(),its);
+  std::vector<MEDCouplingFieldDouble *> fs=MEDLoader::ReadFieldsOnSameMesh(ON_CELLS,fileName,f_1->getMesh()->getName(),0,f_1->getName(),its);
   CPPUNIT_ASSERT_EQUAL(3,(int)fs.size());
   const MEDCouplingMesh *mm=fs[0]->getMesh();
   CPPUNIT_ASSERT(fs[0]->isEqual(f_1,1e-12,1e-12));
@@ -531,7 +533,7 @@ void MEDLoaderTest::testWriteUMeshesRW1()
   f1->setTime(3.14,2,7);
   f1->checkCoherency();
   MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
-  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldDoubleCell(fileName,f1->getMesh()->getName(),-1,f1->getName(),2,7);
+  MEDCouplingFieldDouble *f2=MEDLoader::ReadFieldCell(fileName,f1->getMesh()->getName(),-1,f1->getName(),2,7);
   CPPUNIT_ASSERT(f2->isEqual(f1,1e-12,1e-12));
   f1->decrRef();
   f2->decrRef();