From: ageay Date: Wed, 24 Aug 2011 15:19:32 +0000 (+0000) Subject: Uniformisation getMeshWithName getFieldWithName. X-Git-Tag: V6_main_FINAL~977 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e285f2951c1f4fbba7888ba4ad0559ed3e0efd3d;p=tools%2Fmedcoupling.git Uniformisation getMeshWithName getFieldWithName. --- diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index e397c5525..03b1d21fe 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -2785,7 +2785,7 @@ MEDFileFieldMultiTS *MEDFileFields::getFieldAtPos(int i) const throw(INTERP_KERN return ret; } -MEDFileFieldMultiTS *MEDFileFields::getField(const char *fieldName) const throw(INTERP_KERNEL::Exception) +MEDFileFieldMultiTS *MEDFileFields::getFieldWithName(const char *fieldName) const throw(INTERP_KERNEL::Exception) { return getFieldAtPos(getPosFromFieldName(fieldName)); } diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index 39b919d7d..2c9a2cba3 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -432,7 +432,7 @@ namespace ParaMEDMEM void pushField(MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception); void setFieldAtPos(int i, MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception); MEDFileFieldMultiTS *getFieldAtPos(int i) const throw(INTERP_KERNEL::Exception); - MEDFileFieldMultiTS *getField(const char *fieldName) const throw(INTERP_KERNEL::Exception); + MEDFileFieldMultiTS *getFieldWithName(const char *fieldName) const throw(INTERP_KERNEL::Exception); void destroyFieldAtPos(int i) throw(INTERP_KERNEL::Exception); private: int getPosFromFieldName(const char *fieldName) const throw(INTERP_KERNEL::Exception); diff --git a/src/MEDLoader/Swig/MEDLoader.i b/src/MEDLoader/Swig/MEDLoader.i index 842ef52b3..e7733e217 100644 --- a/src/MEDLoader/Swig/MEDLoader.i +++ b/src/MEDLoader/Swig/MEDLoader.i @@ -80,7 +80,7 @@ using namespace ParaMEDMEM; %newobject ParaMEDMEM::MEDFileMeshes::getMeshWithName; %newobject ParaMEDMEM::MEDFileFields::New; -%newobject ParaMEDMEM::MEDFileFields::getField; +%newobject ParaMEDMEM::MEDFileFields::getFieldWithName; %newobject ParaMEDMEM::MEDFileFields::getFieldAtPos; %newobject ParaMEDMEM::MEDFileFieldMultiTS::New; %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldAtLevel; @@ -705,7 +705,7 @@ namespace ParaMEDMEM void pushField(MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception); void setFieldAtPos(int i, MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception); MEDFileFieldMultiTS *getFieldAtPos(int i) const throw(INTERP_KERNEL::Exception); - MEDFileFieldMultiTS *getField(const char *fieldName) const throw(INTERP_KERNEL::Exception); + MEDFileFieldMultiTS *getFieldWithName(const char *fieldName) const throw(INTERP_KERNEL::Exception); void destroyFieldAtPos(int i) throw(INTERP_KERNEL::Exception); }; diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index 97644942c..d0d1d8a58 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -538,7 +538,7 @@ class MEDLoaderTest(unittest.TestCase): self.assertTrue(m1.isEqual(m1bis,1e-12)) self.assertEqual(('f1', 'f21', 'f22'),d2.getFields().getFieldsNames()) self.assertEqual([(-1, -1, 0.0)],d2.getFields().getFieldAtPos(2).getTimeSteps()) - self.assertEqual([(-1, -1, 0.0)],d2.getFields().getField("f21").getTimeSteps()) + self.assertEqual([(-1, -1, 0.0)],d2.getFields().getFieldWithName("f21").getTimeSteps()) pass def testMEDField9(self):