]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/MEDLoader/Swig/MEDLoaderCommon.i
Salome HOME
Addition of MEDFileUMesh.buildExtrudedMesh method.
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderCommon.i
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay (CEA/DEN)
20
21 %module MEDLoader
22
23 #define MEDCOUPLING_EXPORT
24 #define MEDLOADER_EXPORT
25
26 %include "MEDCouplingCommon.i"
27
28 %{
29 #include "MEDLoader.hxx"
30 #include "MEDFileMesh.hxx"
31 #include "MEDFileField.hxx"
32 #include "MEDFileParameter.hxx"
33 #include "MEDFileData.hxx"
34 #include "MEDFileMeshReadSelector.hxx"
35 #include "MEDFileFieldOverView.hxx"
36 #include "MEDLoaderTypemaps.i"
37 #include "SauvReader.hxx"
38 #include "SauvWriter.hxx"
39
40 using namespace ParaMEDMEM;
41 %}
42
43 #if SWIG_VERSION >= 0x010329
44 %template()  std::vector<std::string>;
45 #endif
46
47 %typemap(out) ParaMEDMEM::MEDFileMesh*
48 {
49   $result=convertMEDFileMesh($1,$owner);
50 }
51
52 %typemap(out) ParaMEDMEM::MEDFileParameter1TS*
53 {
54   $result=convertMEDFileParameter1TS($1,$owner);
55 }
56
57 %typemap(out) ParaMEDMEM::MEDFileAnyTypeFieldMultiTS*
58 {
59   $result=convertMEDFileFieldMultiTS($1,$owner);
60 }
61
62 %typemap(out) ParaMEDMEM::MEDFileAnyTypeField1TS*
63 {
64   $result=convertMEDFileField1TS($1,$owner);
65 }
66
67 %typemap(out) ParaMEDMEM::MEDMeshMultiLev*
68 {
69   $result=convertMEDMeshMultiLev($1,$owner);
70 }
71
72 %newobject MEDLoader::ReadUMeshFromFamilies;
73 %newobject MEDLoader::ReadUMeshFromGroups;
74 %newobject MEDLoader::ReadUMeshFromFile;
75 %newobject MEDLoader::ReadMeshFromFile;
76 %newobject MEDLoader::ReadField;
77 %newobject MEDLoader::ReadFieldCell;
78 %newobject MEDLoader::ReadFieldNode;
79 %newobject MEDLoader::ReadFieldGauss;
80 %newobject MEDLoader::ReadFieldGaussNE;
81 %newobject ParaMEDMEM::MEDFileMesh::New;
82 %newobject ParaMEDMEM::MEDFileMesh::createNewEmpty;
83 %newobject ParaMEDMEM::MEDFileMesh::deepCpy;
84 %newobject ParaMEDMEM::MEDFileMesh::shallowCpy;
85 %newobject ParaMEDMEM::MEDFileMesh::getGenMeshAtLevel;
86 %newobject ParaMEDMEM::MEDFileMesh::getGroupArr;
87 %newobject ParaMEDMEM::MEDFileMesh::getGroupsArr;
88 %newobject ParaMEDMEM::MEDFileMesh::getFamilyArr;
89 %newobject ParaMEDMEM::MEDFileMesh::getFamiliesArr;
90 %newobject ParaMEDMEM::MEDFileMesh::getNodeGroupArr;
91 %newobject ParaMEDMEM::MEDFileMesh::getNodeGroupsArr;
92 %newobject ParaMEDMEM::MEDFileMesh::getNodeFamilyArr;
93 %newobject ParaMEDMEM::MEDFileMesh::getNodeFamiliesArr;
94 %newobject ParaMEDMEM::MEDFileMesh::getAllFamiliesIdsReferenced;
95 %newobject ParaMEDMEM::MEDFileMesh::computeAllFamilyIdsInUse;
96 %newobject ParaMEDMEM::MEDFileStructuredMesh::getImplicitFaceMesh;
97 %newobject ParaMEDMEM::MEDFileUMesh::New;
98 %newobject ParaMEDMEM::MEDFileUMesh::LoadPartOf;
99 %newobject ParaMEDMEM::MEDFileUMesh::getCoords;
100 %newobject ParaMEDMEM::MEDFileUMesh::getPartDefAtLevel;
101 %newobject ParaMEDMEM::MEDFileUMesh::getGroup;
102 %newobject ParaMEDMEM::MEDFileUMesh::getGroups;
103 %newobject ParaMEDMEM::MEDFileUMesh::getFamily;
104 %newobject ParaMEDMEM::MEDFileUMesh::getFamilies;
105 %newobject ParaMEDMEM::MEDFileUMesh::getMeshAtLevel;
106 %newobject ParaMEDMEM::MEDFileUMesh::getLevel0Mesh;
107 %newobject ParaMEDMEM::MEDFileUMesh::getLevelM1Mesh;
108 %newobject ParaMEDMEM::MEDFileUMesh::getLevelM2Mesh;
109 %newobject ParaMEDMEM::MEDFileUMesh::getLevelM3Mesh;
110 %newobject ParaMEDMEM::MEDFileUMesh::getDirectUndergroundSingleGeoTypeMesh;
111 %newobject ParaMEDMEM::MEDFileUMesh::extractFamilyFieldOnGeoType;
112 %newobject ParaMEDMEM::MEDFileUMesh::extractNumberFieldOnGeoType;
113 %newobject ParaMEDMEM::MEDFileUMesh::zipCoords;
114 %newobject ParaMEDMEM::MEDFileUMesh::buildExtrudedMesh;
115 %newobject ParaMEDMEM::MEDFileCMesh::New;
116 %newobject ParaMEDMEM::MEDFileCurveLinearMesh::New;
117 %newobject ParaMEDMEM::MEDFileMeshMultiTS::New;
118 %newobject ParaMEDMEM::MEDFileMeshMultiTS::deepCpy;
119 %newobject ParaMEDMEM::MEDFileMeshMultiTS::getOneTimeStep;
120 %newobject ParaMEDMEM::MEDFileMeshes::New;
121 %newobject ParaMEDMEM::MEDFileMeshes::deepCpy;
122 %newobject ParaMEDMEM::MEDFileMeshes::getMeshAtPos;
123 %newobject ParaMEDMEM::MEDFileMeshes::getMeshWithName;
124 %newobject ParaMEDMEM::MEDFileMeshes::__getitem__;
125 %newobject ParaMEDMEM::MEDFileMeshes::__iter__;
126
127 %newobject ParaMEDMEM::MEDFileFields::New;
128 %newobject ParaMEDMEM::MEDFileFields::LoadPartOf;
129 %newobject ParaMEDMEM::MEDFileFields::deepCpy;
130 %newobject ParaMEDMEM::MEDFileFields::shallowCpy;
131 %newobject ParaMEDMEM::MEDFileFields::getFieldWithName;
132 %newobject ParaMEDMEM::MEDFileFields::getFieldAtPos;
133 %newobject ParaMEDMEM::MEDFileFields::partOfThisLyingOnSpecifiedMeshName;
134 %newobject ParaMEDMEM::MEDFileFields::partOfThisLyingOnSpecifiedTimeSteps;
135 %newobject ParaMEDMEM::MEDFileFields::partOfThisNotLyingOnSpecifiedTimeSteps;
136 %newobject ParaMEDMEM::MEDFileFields::__iter__;
137
138 %newobject ParaMEDMEM::MEDFileAnyTypeFieldMultiTS::New;
139 %newobject ParaMEDMEM::MEDFileAnyTypeFieldMultiTS::deepCpy;
140 %newobject ParaMEDMEM::MEDFileAnyTypeFieldMultiTS::shallowCpy;
141 %newobject ParaMEDMEM::MEDFileAnyTypeFieldMultiTS::getTimeStepAtPos;
142 %newobject ParaMEDMEM::MEDFileAnyTypeFieldMultiTS::getTimeStep;
143 %newobject ParaMEDMEM::MEDFileAnyTypeFieldMultiTS::getTimeStepGivenTime;
144 %newobject ParaMEDMEM::MEDFileAnyTypeFieldMultiTS::__iter__;
145 %newobject ParaMEDMEM::MEDFileFieldMultiTS::New;
146 %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldAtLevel;
147 %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldAtTopLevel;
148 %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldOnMeshAtLevel;
149 %newobject ParaMEDMEM::MEDFileFieldMultiTS::getFieldAtLevelOld;
150 %newobject ParaMEDMEM::MEDFileFieldMultiTS::getUndergroundDataArray;
151 %newobject ParaMEDMEM::MEDFileFieldMultiTS::convertToInt;
152 %newobject ParaMEDMEM::MEDFileIntFieldMultiTS::New;
153 %newobject ParaMEDMEM::MEDFileIntFieldMultiTS::getUndergroundDataArray;
154 %newobject ParaMEDMEM::MEDFileIntFieldMultiTS::convertToDouble;
155
156 %newobject ParaMEDMEM::MEDFileAnyTypeField1TS::New;
157 %newobject ParaMEDMEM::MEDFileAnyTypeField1TS::shallowCpy;
158 %newobject ParaMEDMEM::MEDFileAnyTypeField1TS::deepCpy;
159 %newobject ParaMEDMEM::MEDFileField1TS::New;
160 %newobject ParaMEDMEM::MEDFileField1TS::getFieldAtLevel;
161 %newobject ParaMEDMEM::MEDFileField1TS::getFieldAtTopLevel;
162 %newobject ParaMEDMEM::MEDFileField1TS::getFieldOnMeshAtLevel;
163 %newobject ParaMEDMEM::MEDFileField1TS::getFieldAtLevelOld;
164 %newobject ParaMEDMEM::MEDFileField1TS::getUndergroundDataArray;
165 %newobject ParaMEDMEM::MEDFileField1TS::convertToInt;
166 %newobject ParaMEDMEM::MEDFileIntField1TS::New;
167 %newobject ParaMEDMEM::MEDFileIntField1TS::getUndergroundDataArray;
168 %newobject ParaMEDMEM::MEDFileIntField1TS::convertToDouble;
169
170 %newobject ParaMEDMEM::MEDFileData::New;
171 %newobject ParaMEDMEM::MEDFileData::deepCpy;
172 %newobject ParaMEDMEM::MEDFileData::getMeshes;
173 %newobject ParaMEDMEM::MEDFileData::getFields;
174 %newobject ParaMEDMEM::MEDFileData::getParams;
175
176 %newobject ParaMEDMEM::MEDFileParameterDouble1TS::New;
177 %newobject ParaMEDMEM::MEDFileParameterDouble1TS::deepCpy;
178 %newobject ParaMEDMEM::MEDFileParameterMultiTS::New;
179 %newobject ParaMEDMEM::MEDFileParameterMultiTS::deepCpy;
180 %newobject ParaMEDMEM::MEDFileParameterMultiTS::getTimeStepAtPos;
181 %newobject ParaMEDMEM::MEDFileParameterMultiTS::__getitem__;
182 %newobject ParaMEDMEM::MEDFileParameters::New;
183 %newobject ParaMEDMEM::MEDFileParameters::deepCpy;
184 %newobject ParaMEDMEM::MEDFileParameters::getParamAtPos;
185 %newobject ParaMEDMEM::MEDFileParameters::getParamWithName;
186 %newobject ParaMEDMEM::MEDFileParameters::__getitem__;
187
188 %newobject ParaMEDMEM::SauvWriter::New;
189 %newobject ParaMEDMEM::SauvReader::New;
190 %newobject ParaMEDMEM::SauvReader::loadInMEDFileDS;
191
192 %newobject ParaMEDMEM::MEDFileMeshStruct::New;
193 %newobject ParaMEDMEM::MEDMeshMultiLev::prepare;
194 %newobject ParaMEDMEM::MEDMeshMultiLev::buildDataArray;
195 %newobject ParaMEDMEM::MEDFileFastCellSupportComparator::New;
196 %newobject ParaMEDMEM::MEDFileFastCellSupportComparator::buildFromScratchDataSetSupport;
197
198 %feature("unref") MEDFileMesh "$this->decrRef();"
199 %feature("unref") MEDFileUMesh "$this->decrRef();"
200 %feature("unref") MEDFileCMesh "$this->decrRef();"
201 %feature("unref") MEDFileMeshMultiTS "$this->decrRef();"
202 %feature("unref") MEDFileMeshes "$this->decrRef();"
203 %feature("unref") MEDFileFieldLoc "$this->decrRef();"
204 %feature("unref") MEDFileAnyTypeField1TS "$this->decrRef();"
205 %feature("unref") MEDFileField1TS "$this->decrRef();"
206 %feature("unref") MEDFileIntField1TS "$this->decrRef();"
207 %feature("unref") MEDFileAnyTypeFieldMultiTS "$this->decrRef();"
208 %feature("unref") MEDFileFieldMultiTS "$this->decrRef();"
209 %feature("unref") MEDFileIntFieldMultiTS "$this->decrRef();"
210 %feature("unref") MEDFileFields "$this->decrRef();"
211 %feature("unref") MEDFileParameter1TS "$this->decrRef();"
212 %feature("unref") MEDFileParameterDouble1TSWTI "$this->decrRef();"
213 %feature("unref") MEDFileParameterDouble1TS "$this->decrRef();"
214 %feature("unref") MEDFileParameterMultiTS "$this->decrRef();"
215 %feature("unref") MEDFileParameters "$this->decrRef();"
216 %feature("unref") MEDFileData "$this->decrRef();"
217 %feature("unref") SauvReader "$this->decrRef();"
218 %feature("unref") SauvWriter "$this->decrRef();"
219 %feature("unref") MEDFileFastCellSupportComparator "$this->decrRef();"
220 %feature("unref") MEDMeshMultiLev "$this->decrRef();"
221 %feature("unref") MEDUMeshMultiLev "$this->decrRef();"
222 %feature("unref") MEDCMeshMultiLev "$this->decrRef();"
223 %feature("unref") MEDCurveLinearMeshMultiLev "$this->decrRef();"
224 %feature("unref") MEDFileMeshStruct "$this->decrRef();"
225
226 class MEDLoader
227 {
228 public:
229   static bool HasXDR();
230   static std::string MEDFileVersionStr();
231   static void SetEpsilonForNodeComp(double val) throw(INTERP_KERNEL::Exception);
232   static void SetCompPolicyForCell(int val) throw(INTERP_KERNEL::Exception);
233   static void SetTooLongStrPolicy(int val) throw(INTERP_KERNEL::Exception);
234   static void CheckFileForRead(const std::string& fileName) throw(INTERP_KERNEL::Exception);
235   static std::vector<std::string> GetMeshNames(const std::string& fileName) throw(INTERP_KERNEL::Exception);
236   static std::vector<std::string> GetMeshNamesOnField(const std::string& fileName, const std::string& fieldName) throw(INTERP_KERNEL::Exception);
237   static std::vector<std::string> GetMeshGroupsNames(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
238   static std::vector<std::string> GetMeshFamiliesNames(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
239   static std::vector<std::string> GetMeshFamiliesNamesOnGroup(const std::string& fileName, const std::string& meshName, const std::string& grpName) throw(INTERP_KERNEL::Exception);
240   static std::vector<std::string> GetMeshGroupsNamesOnFamily(const std::string& fileName, const std::string& meshName, const std::string& famName) throw(INTERP_KERNEL::Exception);
241   static std::vector<std::string> GetAllFieldNamesOnMesh(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
242   static std::vector<std::string> GetAllFieldNames(const std::string& fileName) throw(INTERP_KERNEL::Exception);
243   static std::vector<std::string> GetFieldNamesOnMesh(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
244   static std::vector<std::string> GetCellFieldNamesOnMesh(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
245   static std::vector<std::string> GetNodeFieldNamesOnMesh(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
246   static double GetTimeAttachedOnFieldIteration(const std::string& fileName, const std::string& fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
247   static void AssignStaticWritePropertiesTo(ParaMEDMEM::MEDFileWritable& obj) throw(INTERP_KERNEL::Exception);
248   %extend
249      {
250        static PyObject *MEDFileVersion()
251        {
252          int major,minor,release;
253          MEDLoader::MEDFileVersion(major,minor,release);
254          PyObject *ret(PyTuple_New(3));
255          PyTuple_SetItem(ret,0,SWIG_From_int(major));
256          PyTuple_SetItem(ret,1,SWIG_From_int(minor));
257          PyTuple_SetItem(ret,2,SWIG_From_int(release));
258          return ret;
259        }
260
261        static PyObject *GetFieldIterations(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
262        {
263          std::vector< std::pair<int,int> > res=MEDLoader::GetFieldIterations(type,fileName,meshName,fieldName);
264          PyObject *ret=PyList_New(res.size());
265          int rk=0;
266          for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
267            {
268              PyObject *elt=PyTuple_New(2);
269              PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
270              PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
271              PyList_SetItem(ret,rk,elt);
272            }
273          return ret;
274        }
275
276        static PyObject *GetAllFieldIterations(const std::string& fileName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
277        {
278          std::vector< std::pair< std::pair<int,int>, double> > res=MEDLoader::GetAllFieldIterations(fileName,fieldName);
279          PyObject *ret=PyList_New(res.size());
280          int rk=0;
281          for(std::vector< std::pair< std::pair<int,int>, double> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
282            {
283              PyObject *elt=PyTuple_New(3);
284              PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first.first));
285              PyTuple_SetItem(elt,1,SWIG_From_int((*iter).first.second));
286              PyTuple_SetItem(elt,2,SWIG_From_double((*iter).second));
287              PyList_SetItem(ret,rk,elt);
288            }
289          return ret;
290        }
291
292        static PyObject *GetCellFieldIterations(const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
293        {
294          std::vector< std::pair<int,int> > res=MEDLoader::GetCellFieldIterations(fileName,meshName,fieldName);
295          PyObject *ret=PyList_New(res.size());
296          int rk=0;
297          for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
298            {
299              PyObject *elt=PyTuple_New(2);
300              PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
301              PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
302              PyList_SetItem(ret,rk,elt);
303            }
304          return ret;
305        }
306        static PyObject *GetNodeFieldIterations(const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
307        {
308          std::vector< std::pair<int,int> > res=MEDLoader::GetNodeFieldIterations(fileName,meshName,fieldName);
309          PyObject *ret=PyList_New(res.size());
310          int rk=0;
311          for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
312            {
313              PyObject *elt=PyTuple_New(2);
314              PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
315              PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
316              PyList_SetItem(ret,rk,elt);
317            }
318          return ret;
319        }
320        static PyObject *GetComponentsNamesOfField(const std::string& fileName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
321        {
322          std::vector< std::pair<std::string,std::string> > res=MEDLoader::GetComponentsNamesOfField(fileName,fieldName);
323          PyObject *ret=PyList_New(res.size());
324          int rk=0;
325          for(std::vector< std::pair<std::string,std::string> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
326            {
327              PyObject *elt=PyTuple_New(2);
328              PyTuple_SetItem(elt,0,PyString_FromString((*iter).first.c_str()));
329              PyTuple_SetItem(elt,1,PyString_FromString((*iter).second.c_str()));
330              PyList_SetItem(ret,rk,elt);
331            }
332          return ret;
333        }
334        static PyObject *GetUMeshGlobalInfo(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception)
335        {
336          int meshDim,spaceDim,numberOfNodes;
337          std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > res=MEDLoader::GetUMeshGlobalInfo(fileName,meshName,meshDim,spaceDim,numberOfNodes);
338          PyObject *ret=PyTuple_New(4);
339          PyObject *elt0=PyList_New(res.size());
340          int i=0;
341          for(std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > >::const_iterator it=res.begin();it!=res.end();it++,i++)
342            {
343              const std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> >&obj2=(*it);
344              int j=0;
345              PyObject *elt1=PyList_New(obj2.size());
346              for(std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> >::const_iterator it2=obj2.begin();it2!=obj2.end();it2++,j++)
347                {
348                  PyObject *elt2=PyTuple_New(2);
349                  PyTuple_SetItem(elt2,0,SWIG_From_int((int)(*it2).first));
350                  PyTuple_SetItem(elt2,1,SWIG_From_int((*it2).second));
351                  PyList_SetItem(elt1,j,elt2);
352                }
353              PyList_SetItem(elt0,i,elt1);
354            }
355          PyTuple_SetItem(ret,0,elt0);
356          PyTuple_SetItem(ret,1,SWIG_From_int(meshDim));
357          PyTuple_SetItem(ret,2,SWIG_From_int(spaceDim));
358          PyTuple_SetItem(ret,3,SWIG_From_int(numberOfNodes));
359          return ret;
360        }
361        static PyObject *ReadFieldsOnSameMesh(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax,
362                                              const std::string& fieldName, PyObject *liIts) throw(INTERP_KERNEL::Exception)
363        {
364          std::vector<std::pair<int,int> > its=convertTimePairIdsFromPy(liIts);
365          std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> res=MEDLoader::ReadFieldsOnSameMesh(type,fileName,meshName,meshDimRelToMax,fieldName,its);
366          return convertFieldDoubleVecToPy(res);
367        }
368        static void WriteUMeshesPartition(const std::string& fileName, const std::string& meshName, PyObject *li, bool writeFromScratch) throw(INTERP_KERNEL::Exception)
369        {
370          std::vector<const ParaMEDMEM::MEDCouplingUMesh *> v;
371          convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,"MEDCouplingUMesh",v);
372          MEDLoader::WriteUMeshesPartition(fileName,meshName,v,writeFromScratch);
373        }
374        static void WriteUMeshesPartitionDep(const std::string& fileName, const std::string& meshName, PyObject *li, bool writeFromScratch) throw(INTERP_KERNEL::Exception)
375        {
376          std::vector<const ParaMEDMEM::MEDCouplingUMesh *> v;
377          convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,"MEDCouplingUMesh",v);
378          MEDLoader::WriteUMeshesPartitionDep(fileName,meshName,v,writeFromScratch);
379        }
380        static void WriteUMeshes(const std::string& fileName, PyObject *li, bool writeFromScratch) throw(INTERP_KERNEL::Exception)
381        {
382          std::vector<const ParaMEDMEM::MEDCouplingUMesh *> v;
383          convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,"MEDCouplingUMesh",v);
384          MEDLoader::WriteUMeshes(fileName,v,writeFromScratch);
385        }
386        static PyObject *GetTypesOfField(const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
387        {
388          std::vector< ParaMEDMEM::TypeOfField > v=MEDLoader::GetTypesOfField(fileName,meshName,fieldName);
389          int size=v.size();
390          PyObject *ret=PyList_New(size);
391          for(int i=0;i<size;i++)
392            PyList_SetItem(ret,i,PyInt_FromLong((int)v[i]));
393          return ret;
394        }
395        static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromGroups(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, PyObject *li) throw(INTERP_KERNEL::Exception)
396        {
397          std::vector<std::string> grps;
398          converPyListToVecString(li,grps);
399          return MEDLoader::ReadUMeshFromGroups(fileName,meshName,meshDimRelToMax,grps);
400        }
401        static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFamilies(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, PyObject *li) throw(INTERP_KERNEL::Exception)
402        {
403          std::vector<std::string> fams;
404          converPyListToVecString(li,fams);
405          return MEDLoader::ReadUMeshFromFamilies(fileName,meshName,meshDimRelToMax,fams);
406        }
407      }
408   static ParaMEDMEM::MEDCouplingMesh *ReadMeshFromFile(const std::string& fileName, const std::string& meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
409   static ParaMEDMEM::MEDCouplingMesh *ReadMeshFromFile(const std::string& fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
410   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const std::string& fileName, const std::string& meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
411   static ParaMEDMEM::MEDCouplingUMesh *ReadUMeshFromFile(const std::string& fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
412   static int ReadUMeshDimFromFile(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
413   static ParaMEDMEM::MEDCouplingFieldDouble *ReadField(ParaMEDMEM::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
414   static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldCell(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
415   static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldNode(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
416   static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGauss(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
417   static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldGaussNE(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, const std::string& fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
418   static void WriteMesh(const std::string& fileName, const ParaMEDMEM::MEDCouplingMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
419   static void WriteUMesh(const std::string& fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
420   static void WriteUMeshDep(const std::string& fileName, const ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
421   static void WriteField(const std::string& fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
422   static void WriteFieldDep(const std::string& fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
423   static void WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f) throw(INTERP_KERNEL::Exception);
424 };
425
426 namespace ParaMEDMEM
427 {
428   class MEDFileWritable
429   {
430   public:
431     void copyOptionsFrom(const MEDFileWritable& other) const;
432     int getTooLongStrPolicy() const throw(INTERP_KERNEL::Exception);
433     void setTooLongStrPolicy(int newVal) throw(INTERP_KERNEL::Exception);
434     int getZipConnPolicy() throw(INTERP_KERNEL::Exception);
435     void setZipConnPolicy(int newVal) throw(INTERP_KERNEL::Exception);
436   };
437
438   class MEDFileMeshReadSelector
439   {
440   public:
441     MEDFileMeshReadSelector();
442     MEDFileMeshReadSelector(unsigned int code);
443     unsigned int getCode() const;
444     void setCode(unsigned int newCode);
445     bool isCellFamilyFieldReading() const;
446     bool isNodeFamilyFieldReading() const;
447     bool isCellNameFieldReading() const;
448     bool isNodeNameFieldReading() const;
449     bool isCellNumFieldReading() const;
450     bool isNodeNumFieldReading() const;
451     void setCellFamilyFieldReading(bool b);
452     void setNodeFamilyFieldReading(bool b);
453     void setCellNameFieldReading(bool b);
454     void setNodeNameFieldReading(bool b);
455     void setCellNumFieldReading(bool b);
456     void setNodeNumFieldReading(bool b);
457     %extend
458     {
459       std::string __str__() const throw(INTERP_KERNEL::Exception)
460       {
461         std::ostringstream oss;
462         self->reprAll(oss);
463         return oss.str();
464       }
465       
466       std::string __repr__() const throw(INTERP_KERNEL::Exception)
467       {
468         std::ostringstream oss; oss << "MEDFileMeshReadSelector C++ instance at " << self << " (with code=" << self->getCode() << ").";
469         return oss.str();
470       }
471     }
472   };
473
474   class MEDFileMesh : public RefCountObject, public MEDFileWritable
475   {
476   public:
477     static MEDFileMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
478     static MEDFileMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
479     virtual MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception);
480     virtual MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception);
481     virtual MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception);
482     virtual void clearNonDiscrAttributes() const throw(INTERP_KERNEL::Exception);
483     void setName(const std::string& name);
484     std::string getName();
485     std::string getUnivName() const;
486     bool getUnivNameWrStatus() const;
487     void setUnivNameWrStatus(bool newStatus);
488     void setDescription(const std::string& name);
489     std::string getDescription() const;
490     void setOrder(int order);
491     int getOrder() const;
492     void setIteration(int it);
493     int getIteration();
494     void setTimeValue(double time);
495     void setTime(int dt, int it, double time);
496     double getTimeValue() const;
497     void setTimeUnit(const std::string& unit);
498     std::string getTimeUnit() const;
499     virtual int getNumberOfNodes() const throw(INTERP_KERNEL::Exception);
500     virtual bool hasImplicitPart() const throw(INTERP_KERNEL::Exception);
501     virtual int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
502     virtual void releaseImplicitPartIfAny() const throw(INTERP_KERNEL::Exception);
503     virtual std::vector<int> getFamArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
504     virtual std::vector<int> getNumArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
505     virtual std::vector<int> getNameArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
506     virtual std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception);
507     std::vector<int> getNonEmptyLevels() const throw(INTERP_KERNEL::Exception);
508     std::vector<int> getNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
509     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
510     int getSizeAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception);
511     //
512     bool existsGroup(const std::string& groupName) const throw(INTERP_KERNEL::Exception);
513     bool existsFamily(int famId) const throw(INTERP_KERNEL::Exception);
514     bool existsFamily(const std::string& familyName) const throw(INTERP_KERNEL::Exception);
515     void setFamilyId(const std::string& familyName, int id) throw(INTERP_KERNEL::Exception);
516     void setFamilyIdUnique(const std::string& familyName, int id) throw(INTERP_KERNEL::Exception);
517     void addFamily(const std::string& familyName, int id) throw(INTERP_KERNEL::Exception);
518     void addFamilyOnGrp(const std::string& grpName, const std::string& famName) throw(INTERP_KERNEL::Exception);
519     virtual void createGroupOnAll(int meshDimRelToMaxExt, const std::string& groupName) throw(INTERP_KERNEL::Exception);
520     virtual bool keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
521     void copyFamGrpMapsFrom(const MEDFileMesh& other) throw(INTERP_KERNEL::Exception);
522     void clearGrpMap() throw(INTERP_KERNEL::Exception);
523     void clearFamMap() throw(INTERP_KERNEL::Exception);
524     void clearFamGrpMaps() throw(INTERP_KERNEL::Exception);
525     const std::map<std::string,int>& getFamilyInfo() const throw(INTERP_KERNEL::Exception);
526     const std::map<std::string, std::vector<std::string> >& getGroupInfo() const throw(INTERP_KERNEL::Exception);
527     std::vector<std::string> getFamiliesOnGroup(const std::string& name) const throw(INTERP_KERNEL::Exception);
528     std::vector<std::string> getFamiliesOnGroups(const std::vector<std::string>& grps) const throw(INTERP_KERNEL::Exception);
529     std::vector<int> getFamiliesIdsOnGroup(const std::string& name) const throw(INTERP_KERNEL::Exception);
530     void setFamiliesOnGroup(const std::string& name, const std::vector<std::string>& fams) throw(INTERP_KERNEL::Exception);
531     void setFamiliesIdsOnGroup(const std::string& name, const std::vector<int>& famIds) throw(INTERP_KERNEL::Exception);
532     std::vector<std::string> getGroupsOnFamily(const std::string& name) const throw(INTERP_KERNEL::Exception);
533     void setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps) throw(INTERP_KERNEL::Exception);
534     std::vector<std::string> getGroupsNames() const throw(INTERP_KERNEL::Exception);
535     std::vector<std::string> getFamiliesNames() const throw(INTERP_KERNEL::Exception);
536     void assignFamilyNameWithGroupName() throw(INTERP_KERNEL::Exception);
537     std::vector<std::string> removeEmptyGroups() throw(INTERP_KERNEL::Exception);
538     void removeGroup(const std::string& name) throw(INTERP_KERNEL::Exception);
539     void removeFamily(const std::string& name) throw(INTERP_KERNEL::Exception);
540     std::vector<std::string> removeOrphanGroups() throw(INTERP_KERNEL::Exception);
541     std::vector<std::string> removeOrphanFamilies() throw(INTERP_KERNEL::Exception);
542     void changeGroupName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
543     void changeFamilyName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
544     void changeFamilyId(int oldId, int newId) throw(INTERP_KERNEL::Exception);
545     void changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames) throw(INTERP_KERNEL::Exception);
546     void setFamilyInfo(const std::map<std::string,int>& info);
547     void setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
548     int getFamilyId(const std::string& name) const throw(INTERP_KERNEL::Exception);
549     int getMaxAbsFamilyId() const throw(INTERP_KERNEL::Exception);
550     int getMaxFamilyId() const throw(INTERP_KERNEL::Exception);
551     int getMinFamilyId() const throw(INTERP_KERNEL::Exception);
552     int getTheMaxAbsFamilyId() const throw(INTERP_KERNEL::Exception);
553     int getTheMaxFamilyId() const throw(INTERP_KERNEL::Exception);
554     int getTheMinFamilyId() const throw(INTERP_KERNEL::Exception);
555     virtual int getMaxAbsFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
556     virtual int getMaxFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
557     virtual int getMinFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
558     DataArrayInt *getAllFamiliesIdsReferenced() const throw(INTERP_KERNEL::Exception);
559     DataArrayInt *computeAllFamilyIdsInUse() const throw(INTERP_KERNEL::Exception);
560     std::vector<int> getFamiliesIds(const std::vector<std::string>& famNames) const throw(INTERP_KERNEL::Exception);
561     std::string getFamilyNameGivenId(int id) const throw(INTERP_KERNEL::Exception);
562     bool ensureDifferentFamIdsPerLevel() throw(INTERP_KERNEL::Exception);
563     void normalizeFamIdsTrio() throw(INTERP_KERNEL::Exception);
564     void normalizeFamIdsMEDFile() throw(INTERP_KERNEL::Exception);
565     virtual int getMeshDimension() const throw(INTERP_KERNEL::Exception);
566     virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
567     virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
568     //
569     virtual MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception);
570     virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr) throw(INTERP_KERNEL::Exception);
571     virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr) throw(INTERP_KERNEL::Exception);
572     virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr) throw(INTERP_KERNEL::Exception);
573     virtual DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
574     virtual DataArrayInt *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
575     virtual DataArrayInt *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const throw(INTERP_KERNEL::Exception);
576     virtual DataArrayInt *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const throw(INTERP_KERNEL::Exception);
577     virtual DataArrayInt *getNodeGroupArr(const std::string& grp, bool renum=false) const throw(INTERP_KERNEL::Exception);
578     virtual DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
579     virtual DataArrayInt *getNodeFamilyArr(const std::string& fam, bool renum=false) const throw(INTERP_KERNEL::Exception);
580     virtual DataArrayInt *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
581     %extend
582        {
583          std::string __str__() const throw(INTERP_KERNEL::Exception)
584          {
585            return self->simpleRepr();
586          }
587
588          PyObject *getTime() throw(INTERP_KERNEL::Exception)
589          {
590            int tmp1,tmp2;
591            double tmp0=self->getTime(tmp1,tmp2);
592            PyObject *res = PyList_New(3);
593            PyList_SetItem(res,0,SWIG_From_int(tmp1));
594            PyList_SetItem(res,1,SWIG_From_int(tmp2));
595            PyList_SetItem(res,2,SWIG_From_double(tmp0));
596            return res;
597          }
598
599          virtual PyObject *isEqual(const MEDFileMesh *other, double eps) const throw(INTERP_KERNEL::Exception)
600          {
601            std::string what;
602            bool ret0=self->isEqual(other,eps,what);
603            PyObject *res=PyList_New(2);
604            PyObject *ret0Py=ret0?Py_True:Py_False;
605            Py_XINCREF(ret0Py);
606            PyList_SetItem(res,0,ret0Py);
607            PyList_SetItem(res,1,PyString_FromString(what.c_str()));
608            return res;
609          }
610
611          void setGroupsAtLevel(int meshDimRelToMaxExt, PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
612          {
613            std::vector<const DataArrayInt *> grps;
614            convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",grps);
615            self->setGroupsAtLevel(meshDimRelToMaxExt,grps,renum);
616          }
617          
618          PyObject *areFamsEqual(const MEDFileMesh *other) const throw(INTERP_KERNEL::Exception)
619          {
620            std::string what;
621            bool ret0=self->areFamsEqual(other,what);
622            PyObject *res=PyList_New(2);
623            PyObject *ret0Py=ret0?Py_True:Py_False;
624            Py_XINCREF(ret0Py);
625            PyList_SetItem(res,0,ret0Py);
626            PyList_SetItem(res,1,PyString_FromString(what.c_str()));
627            return res;
628          }
629
630          PyObject *areGrpsEqual(const MEDFileMesh *other) const throw(INTERP_KERNEL::Exception)
631          {
632            std::string what;
633            bool ret0=self->areGrpsEqual(other,what);
634            PyObject *res=PyList_New(2);
635            PyObject *ret0Py=ret0?Py_True:Py_False;
636            Py_XINCREF(ret0Py);
637            PyList_SetItem(res,0,ret0Py);
638            PyList_SetItem(res,1,PyString_FromString(what.c_str()));
639            return res;
640          }
641
642          PyObject *getAllGeoTypes() const throw(INTERP_KERNEL::Exception)
643          {
644            std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getAllGeoTypes());
645            std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
646            PyObject *res=PyList_New(result.size());
647            for(int i=0;iL!=result.end(); i++, iL++)
648              PyList_SetItem(res,i,PyInt_FromLong(*iL));
649            return res;
650          }
651
652          PyObject *getGeoTypesAtLevel(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception)
653          {
654            std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getGeoTypesAtLevel(meshDimRelToMax));
655            std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
656            PyObject *res=PyList_New(result.size());
657            for(int i=0;iL!=result.end(); i++, iL++)
658              PyList_SetItem(res,i,PyInt_FromLong(*iL));
659            return res;
660          }
661
662          PyObject *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
663          {
664            const DataArrayInt *tmp=self->getFamilyFieldAtLevel(meshDimRelToMaxExt);
665            if(tmp)
666              tmp->incrRef();
667            return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
668          }
669
670          PyObject *getNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
671          {
672            const DataArrayInt *tmp=self->getNumberFieldAtLevel(meshDimRelToMaxExt);
673            if(tmp)
674              tmp->incrRef();
675            return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
676          }
677
678          PyObject *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
679          {
680            const DataArrayInt *tmp=self->getRevNumberFieldAtLevel(meshDimRelToMaxExt);
681            if(tmp)
682              tmp->incrRef();
683            return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
684          }
685          
686          PyObject *getNameFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
687          {
688            const DataArrayAsciiChar *tmp=self->getNameFieldAtLevel(meshDimRelToMaxExt);
689            if(tmp)
690              tmp->incrRef();
691            return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__DataArrayAsciiChar, SWIG_POINTER_OWN | 0 );
692          }
693
694          PyObject *findOrCreateAndGiveFamilyWithId(int id, bool& created) throw(INTERP_KERNEL::Exception)
695          {
696            bool ret1;
697            std::string ret0=self->findOrCreateAndGiveFamilyWithId(id,ret1);
698            PyObject *ret=PyTuple_New(2);
699            PyTuple_SetItem(ret,0,PyString_FromString(ret0.c_str()));
700            PyTuple_SetItem(ret,1,SWIG_From_bool(ret1));
701            return ret;
702          }
703          
704          PyObject *unPolyze() throw(INTERP_KERNEL::Exception)
705          {
706            DataArrayInt *ret3=0;
707            std::vector<int> ret1,ret2;
708            bool ret0=self->unPolyze(ret1,ret2,ret3);
709            PyObject *ret=PyTuple_New(4);
710            PyTuple_SetItem(ret,0,SWIG_From_bool(ret0));
711            //
712            PyObject *retLev1_0=PyList_New((int)ret1.size()/3);
713            for(int j=0;j<(int)ret1.size()/3;j++)
714              {
715                PyObject *retLev2=PyList_New(3);
716                PyList_SetItem(retLev2,0,SWIG_From_int(ret1[3*j]));
717                PyList_SetItem(retLev2,1,SWIG_From_int(ret1[3*j+1]));
718                PyList_SetItem(retLev2,2,SWIG_From_int(ret1[3*j+2]));
719                PyList_SetItem(retLev1_0,j,retLev2);
720              }
721            PyTuple_SetItem(ret,1,retLev1_0);
722            //
723            PyObject *retLev1_1=PyList_New((int)ret2.size()/3);
724            for(int j=0;j<(int)ret2.size()/3;j++)
725              {
726                PyObject *retLev2=PyList_New(3);
727                PyList_SetItem(retLev2,0,SWIG_From_int(ret2[3*j]));
728                PyList_SetItem(retLev2,1,SWIG_From_int(ret2[3*j+1]));
729                PyList_SetItem(retLev2,2,SWIG_From_int(ret2[3*j+2]));
730                PyList_SetItem(retLev1_1,j,retLev2);
731              }
732            PyTuple_SetItem(ret,2,retLev1_1);
733            //
734            PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(ret3),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
735            return ret;
736          }
737        }
738   };
739
740   class MEDFileUMesh : public MEDFileMesh
741   {
742   public:
743     static MEDFileUMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
744     static MEDFileUMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
745     static MEDFileUMesh *New();
746     ~MEDFileUMesh();
747     int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
748     int getRelativeLevOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
749     //
750     std::vector<int> getGrpNonEmptyLevels(const std::string& grp) const throw(INTERP_KERNEL::Exception);
751     std::vector<int> getGrpNonEmptyLevelsExt(const std::string& grp) const throw(INTERP_KERNEL::Exception);
752     std::vector<int> getFamNonEmptyLevels(const std::string& fam) const throw(INTERP_KERNEL::Exception);
753     std::vector<int> getFamNonEmptyLevelsExt(const std::string& fam) const throw(INTERP_KERNEL::Exception);
754     std::vector<int> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const throw(INTERP_KERNEL::Exception);
755     std::vector<int> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const throw(INTERP_KERNEL::Exception);
756     std::vector<int> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const throw(INTERP_KERNEL::Exception);
757     std::vector<int> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const throw(INTERP_KERNEL::Exception);
758     std::vector<std::string> getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception);
759     MEDCouplingUMesh *getGroup(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const throw(INTERP_KERNEL::Exception);
760     MEDCouplingUMesh *getGroups(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
761     MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const throw(INTERP_KERNEL::Exception);
762     MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
763     DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
764     MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMaxExt, bool renum=false) const throw(INTERP_KERNEL::Exception);
765     MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
766     MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
767     MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
768     MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
769     void forceComputationOfParts() const throw(INTERP_KERNEL::Exception);
770     //
771     int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception);
772     void setFamilyNameAttachedOnId(int id, const std::string& newFamName) throw(INTERP_KERNEL::Exception);
773     void setCoords(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
774     void eraseGroupsAtLevel(int meshDimRelToMaxExt) throw(INTERP_KERNEL::Exception);
775     void addNodeGroup(const DataArrayInt *ids) throw(INTERP_KERNEL::Exception);
776     void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids) throw(INTERP_KERNEL::Exception);
777     void removeMeshAtLevel(int meshDimRelToMax) throw(INTERP_KERNEL::Exception);
778     void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m) throw(INTERP_KERNEL::Exception);
779     void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false) throw(INTERP_KERNEL::Exception);
780     void optimizeFamilies() throw(INTERP_KERNEL::Exception);
781     DataArrayInt *zipCoords() throw(INTERP_KERNEL::Exception);
782     DataArrayInt *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
783     DataArrayInt *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
784     MEDFileUMesh *buildExtrudedMesh(const MEDCouplingUMesh *m1D, int policy) const throw(INTERP_KERNEL::Exception);
785     %extend
786        { 
787          MEDFileUMesh(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
788          {
789            return MEDFileUMesh::New(fileName,mName,dt,it,mrs);
790          }
791
792          MEDFileUMesh(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
793          {
794            return MEDFileUMesh::New(fileName,mrs);
795          }
796
797          MEDFileUMesh()
798          {
799            return MEDFileUMesh::New();
800          }
801
802          static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, PyObject *types, const std::vector<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
803          {
804            std::vector<int> typesCpp1;
805            convertPyToNewIntArr3(types,typesCpp1);
806            std::size_t sz(typesCpp1.size());
807            std::vector<INTERP_KERNEL::NormalizedCellType> typesCpp2(sz);
808            for(std::size_t ii=0;ii<sz;ii++)
809              typesCpp2[ii]=(INTERP_KERNEL::NormalizedCellType)typesCpp1[ii];
810            return MEDFileUMesh::LoadPartOf(fileName,mName,typesCpp2,slicPerTyp,dt,it,mrs);
811          }
812
813          void setMeshes(PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
814          {
815            std::vector<const MEDCouplingUMesh *> ms;
816            convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,"MEDCouplingUMesh",ms);
817            self->setMeshes(ms,renum);
818          }
819
820          void setGroupsFromScratch(int meshDimRelToMax, PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
821          {
822            std::vector<const MEDCouplingUMesh *> ms;
823            convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,"MEDCouplingUMesh",ms);
824            self->setGroupsFromScratch(meshDimRelToMax,ms,renum);
825          }
826          
827          void setGroupsOnSetMesh(int meshDimRelToMax, PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
828          {
829            std::vector<const MEDCouplingUMesh *> ms;
830            convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCouplingUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,"MEDCouplingUMesh",ms);
831            self->setGroupsOnSetMesh(meshDimRelToMax,ms,renum);
832          }
833
834          DataArrayDouble *getCoords() const throw(INTERP_KERNEL::Exception)
835          {
836            DataArrayDouble *ret=self->getCoords();
837            if(ret)
838              ret->incrRef();
839            return ret;
840          }
841
842          PartDefinition *getPartDefAtLevel(int meshDimRelToMaxExt, INTERP_KERNEL::NormalizedCellType gt=INTERP_KERNEL::NORM_ERROR) const throw(INTERP_KERNEL::Exception)
843          {
844            const PartDefinition *ret(self->getPartDefAtLevel(meshDimRelToMaxExt,gt));
845            if(ret)
846              ret->incrRef();
847            return const_cast<PartDefinition *>(ret);
848          }
849
850          PyObject *duplicateNodesOnM1Group(const std::string& grpNameM1) throw(INTERP_KERNEL::Exception)
851          {
852            DataArrayInt *ret0=0,*ret1=0,*ret2=0;
853            self->duplicateNodesOnM1Group(grpNameM1,ret0,ret1,ret2);
854            PyObject *ret=PyTuple_New(3);
855            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
856            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
857            PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
858            return ret;
859          }
860          
861          MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception)
862          {
863            MEDCoupling1GTUMesh *ret(self->getDirectUndergroundSingleGeoTypeMesh(gt));
864            if(ret)
865              ret->incrRef();
866            return ret;
867          }
868
869          PyObject *getDirectUndergroundSingleGeoTypeMeshes(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception)
870          {
871            std::vector<MEDCoupling1GTUMesh *> tmp(self->getDirectUndergroundSingleGeoTypeMeshes(meshDimRelToMax));
872            std::size_t sz(tmp.size());
873            PyObject *ret=PyList_New(sz);
874            for(std::size_t i=0;i<sz;i++)
875              {
876                if(tmp[i])
877                  tmp[i]->incrRef();
878                PyList_SetItem(ret,i,convertMesh(tmp[i], SWIG_POINTER_OWN | 0 ));
879              }
880            return ret;
881          }
882        }
883   };
884
885   class MEDFileStructuredMesh : public MEDFileMesh
886   {
887   public:
888     %extend
889     {
890       MEDCoupling1SGTUMesh *getImplicitFaceMesh() const throw(INTERP_KERNEL::Exception)
891       {
892         MEDCoupling1SGTUMesh *ret(self->getImplicitFaceMesh());
893         if(ret)
894           ret->incrRef();
895         return ret;
896       }
897     }
898   };
899
900   class MEDFileCMesh : public MEDFileStructuredMesh
901   {
902   public:
903     static MEDFileCMesh *New();
904     static MEDFileCMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
905     static MEDFileCMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
906     void setMesh(MEDCouplingCMesh *m) throw(INTERP_KERNEL::Exception);
907     int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
908     %extend
909        {
910          MEDFileCMesh()
911          {
912            return MEDFileCMesh::New();
913          }
914
915          MEDFileCMesh(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
916          {
917            return MEDFileCMesh::New(fileName,mrs);
918          }
919
920          MEDFileCMesh(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
921          {
922            return MEDFileCMesh::New(fileName,mName,dt,it,mrs);
923          }
924          
925          PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
926          {
927            const MEDCouplingCMesh *tmp=self->getMesh();
928            if(tmp)
929              tmp->incrRef();
930            return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__MEDCouplingCMesh, SWIG_POINTER_OWN | 0 );
931          }
932        }
933   };
934
935   class MEDFileCurveLinearMesh : public MEDFileStructuredMesh
936   {
937   public:
938     static MEDFileCurveLinearMesh *New();
939     static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
940     static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
941     void setMesh(MEDCouplingCurveLinearMesh *m) throw(INTERP_KERNEL::Exception);
942     %extend
943        {
944          MEDFileCurveLinearMesh()
945          {
946            return MEDFileCurveLinearMesh::New();
947          }
948
949          MEDFileCurveLinearMesh(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
950          {
951            return MEDFileCurveLinearMesh::New(fileName,mrs);
952          }
953
954          MEDFileCurveLinearMesh(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
955          {
956            return MEDFileCurveLinearMesh::New(fileName,mName,dt,it,mrs);
957          }
958          
959          PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
960          {
961            const MEDCouplingCurveLinearMesh *tmp=self->getMesh();
962            if(tmp)
963              tmp->incrRef();
964            return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__MEDCouplingCurveLinearMesh, SWIG_POINTER_OWN | 0 );
965          }
966        }
967   };
968
969   class MEDFileMeshMultiTS : public RefCountObject, public MEDFileWritable
970   {
971   public:
972     static MEDFileMeshMultiTS *New();
973     static MEDFileMeshMultiTS *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
974     static MEDFileMeshMultiTS *New(const std::string& fileName, const std::string& mName) throw(INTERP_KERNEL::Exception);
975     MEDFileMeshMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception);
976     std::string getName() const throw(INTERP_KERNEL::Exception);
977     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
978     void setOneTimeStep(MEDFileMesh *mesh1TimeStep) throw(INTERP_KERNEL::Exception);
979     %extend
980        { 
981          MEDFileMeshMultiTS()
982          {
983            return MEDFileMeshMultiTS::New();
984          }
985
986          MEDFileMeshMultiTS(const std::string& fileName) throw(INTERP_KERNEL::Exception)
987          {
988            return MEDFileMeshMultiTS::New(fileName);
989          }
990
991          MEDFileMeshMultiTS(const std::string& fileName, const std::string& mName) throw(INTERP_KERNEL::Exception)
992          {
993            return MEDFileMeshMultiTS::New(fileName,mName);
994          }
995
996          MEDFileMesh *getOneTimeStep() const throw(INTERP_KERNEL::Exception)
997            {
998              MEDFileMesh *ret=self->getOneTimeStep();
999              if(ret)
1000                ret->incrRef();
1001              return ret;
1002            }
1003        }
1004   };
1005
1006   class MEDFileMeshesIterator
1007   {
1008   public:
1009     %extend
1010     {
1011       PyObject *next() throw(INTERP_KERNEL::Exception)
1012       {
1013         MEDFileMesh *ret=self->nextt();
1014         if(ret)
1015           {
1016             ret->incrRef();
1017             return convertMEDFileMesh(ret,SWIG_POINTER_OWN | 0 );
1018           }
1019         else
1020           {
1021             PyErr_SetString(PyExc_StopIteration,"No more data.");
1022             return 0;
1023           }
1024       }
1025     }
1026   };
1027
1028   class MEDFileMeshes : public RefCountObject, public MEDFileWritable
1029   {
1030   public:
1031     static MEDFileMeshes *New();
1032     static MEDFileMeshes *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
1033     MEDFileMeshes *deepCpy() const throw(INTERP_KERNEL::Exception);
1034     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
1035     int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
1036     std::vector<std::string> getMeshesNames() const throw(INTERP_KERNEL::Exception);
1037     //
1038     void resize(int newSize) throw(INTERP_KERNEL::Exception);
1039     void pushMesh(MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception);
1040     void setMeshAtPos(int i, MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception);
1041     void destroyMeshAtPos(int i) throw(INTERP_KERNEL::Exception);
1042     %extend
1043        {
1044          MEDFileMeshes()
1045          {
1046            return MEDFileMeshes::New();
1047          }
1048
1049          MEDFileMeshes(const std::string& fileName) throw(INTERP_KERNEL::Exception)
1050          {
1051            return MEDFileMeshes::New(fileName);
1052          }
1053
1054          std::string __str__() const throw(INTERP_KERNEL::Exception)
1055            {
1056              return self->simpleRepr();
1057            }
1058
1059          MEDFileMesh *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1060          {
1061            if(PyInt_Check(obj))
1062              {
1063                MEDFileMesh *ret=self->getMeshAtPos(InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfMeshes()));
1064                if(ret)
1065                  ret->incrRef();
1066                return ret;
1067              }
1068            else if(PyString_Check(obj))
1069              {
1070                MEDFileMesh *ret=self->getMeshWithName(PyString_AsString(obj));
1071                if(ret)
1072                  ret->incrRef();
1073                return ret;
1074              }
1075            else
1076              throw INTERP_KERNEL::Exception("MEDFileMeshes::__getitem__ : only integer or string with meshname supported !");
1077          }
1078
1079          MEDFileMeshes *__setitem__(int obj, MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception)
1080          {
1081            self->setMeshAtPos(obj,mesh);
1082            return self;
1083          }
1084
1085          MEDFileMeshesIterator *__iter__() throw(INTERP_KERNEL::Exception)
1086          {
1087            return self->iterator();
1088          }
1089
1090          int __len__() const throw(INTERP_KERNEL::Exception)
1091          {
1092            return self->getNumberOfMeshes();
1093          }
1094          
1095          MEDFileMesh *getMeshAtPos(int i) const throw(INTERP_KERNEL::Exception)
1096            {
1097              MEDFileMesh *ret=self->getMeshAtPos(i);
1098              if(ret)
1099                ret->incrRef();
1100              return ret;
1101            }
1102          MEDFileMesh *getMeshWithName(const std::string& mname) const throw(INTERP_KERNEL::Exception)
1103            {
1104              MEDFileMesh *ret=self->getMeshWithName(mname);
1105              if(ret)
1106                ret->incrRef();
1107              return ret;
1108            }
1109        }
1110   };
1111
1112   class MEDFileFieldLoc : public RefCountObject
1113   {
1114   public:
1115     std::string getName() const;
1116     int getDimension() const;
1117     int getNumberOfGaussPoints() const;
1118     int getNumberOfPointsInCells() const;
1119     const std::vector<double>& getRefCoords() const;
1120     const std::vector<double>& getGaussCoords() const;
1121     const std::vector<double>& getGaussWeights() const;
1122     bool isEqual(const MEDFileFieldLoc& other, double eps) const throw(INTERP_KERNEL::Exception);
1123   %extend
1124     {
1125       std::string __str__() const throw(INTERP_KERNEL::Exception)
1126       {
1127         return self->repr();
1128       }
1129     }
1130   };
1131
1132   class MEDFileFieldGlobsReal
1133   {
1134   public:
1135     void resetContent();
1136     void shallowCpyGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1137     void deepCpyGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1138     void shallowCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1139     void deepCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1140     void appendGlobs(const MEDFileFieldGlobsReal& other, double eps) throw(INTERP_KERNEL::Exception);
1141     void checkGlobsCoherency() const throw(INTERP_KERNEL::Exception);
1142     void checkGlobsPflsPartCoherency() const throw(INTERP_KERNEL::Exception);
1143     void checkGlobsLocsPartCoherency() const throw(INTERP_KERNEL::Exception);
1144     std::vector<std::string> getPfls() const throw(INTERP_KERNEL::Exception);
1145     std::vector<std::string> getLocs() const throw(INTERP_KERNEL::Exception);
1146     bool existsPfl(const std::string& pflName) const throw(INTERP_KERNEL::Exception);
1147     bool existsLoc(const std::string& locName) const throw(INTERP_KERNEL::Exception);
1148     std::string createNewNameOfPfl() const throw(INTERP_KERNEL::Exception);
1149     std::string createNewNameOfLoc() const throw(INTERP_KERNEL::Exception);
1150     std::vector< std::vector<int> > whichAreEqualProfiles() const throw(INTERP_KERNEL::Exception);
1151     std::vector< std::vector<int> > whichAreEqualLocs(double eps) const throw(INTERP_KERNEL::Exception);
1152     virtual std::vector<std::string> getPflsReallyUsed() const throw(INTERP_KERNEL::Exception);
1153     virtual std::vector<std::string> getLocsReallyUsed() const throw(INTERP_KERNEL::Exception);
1154     virtual std::vector<std::string> getPflsReallyUsedMulti() const throw(INTERP_KERNEL::Exception);
1155     virtual std::vector<std::string> getLocsReallyUsedMulti() const throw(INTERP_KERNEL::Exception);
1156     void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
1157     void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
1158     void changePflName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
1159     void changeLocName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
1160     int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
1161     int getLocalizationId(const std::string& loc) const throw(INTERP_KERNEL::Exception);
1162   %extend
1163      {
1164        PyObject *getProfile(const std::string& pflName) const throw(INTERP_KERNEL::Exception)
1165        {
1166          const DataArrayInt *ret=self->getProfile(pflName);
1167          if(ret)
1168            ret->incrRef();
1169          return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
1170        }
1171
1172        PyObject *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception)
1173        {
1174          const DataArrayInt *ret=self->getProfileFromId(pflId);
1175          if(ret)
1176            ret->incrRef();
1177          return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 );
1178        }
1179
1180        PyObject *getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception)
1181        {
1182          const MEDFileFieldLoc *loc=&self->getLocalizationFromId(locId);
1183          if(loc)
1184            loc->incrRef();
1185          return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_ParaMEDMEM__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
1186        }
1187        
1188        PyObject *getLocalization(const std::string& locName) const throw(INTERP_KERNEL::Exception)
1189        {
1190          const MEDFileFieldLoc *loc=&self->getLocalization(locName);
1191          if(loc)
1192            loc->incrRef();
1193          return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_ParaMEDMEM__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
1194        }
1195        
1196        PyObject *zipPflsNames() throw(INTERP_KERNEL::Exception)
1197        {
1198          std::vector< std::pair<std::vector<std::string>, std::string > > ret=self->zipPflsNames();
1199          return convertVecPairVecStToPy(ret);
1200        }
1201
1202        PyObject *zipLocsNames(double eps) throw(INTERP_KERNEL::Exception)
1203        {
1204          std::vector< std::pair<std::vector<std::string>, std::string > > ret=self->zipLocsNames(eps);
1205          return convertVecPairVecStToPy(ret);
1206        }
1207
1208        void changePflsNames(PyObject *li) throw(INTERP_KERNEL::Exception)
1209        {
1210          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1211          self->changePflsNames(v);
1212        }
1213
1214        void changePflsRefsNamesGen(PyObject *li) throw(INTERP_KERNEL::Exception)
1215        {
1216          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1217          self->changePflsRefsNamesGen(v);
1218        }
1219
1220        void changePflsNamesInStruct(PyObject *li) throw(INTERP_KERNEL::Exception)
1221        {
1222          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1223          self->changePflsNamesInStruct(v);
1224        }
1225
1226        void changeLocsNames(PyObject *li) throw(INTERP_KERNEL::Exception)
1227        {
1228          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1229          self->changeLocsNames(v);
1230        }
1231
1232        void changeLocsRefsNamesGen(PyObject *li) throw(INTERP_KERNEL::Exception)
1233        {
1234          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1235          self->changeLocsRefsNamesGen(v);
1236        }
1237        
1238        void changeLocsNamesInStruct(PyObject *li) throw(INTERP_KERNEL::Exception)
1239        {
1240          std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1241          self->changeLocsNamesInStruct(v);
1242        }
1243
1244        std::string simpleReprGlobs() const throw(INTERP_KERNEL::Exception)
1245        {
1246          std::ostringstream oss;
1247          self->simpleReprGlobs(oss);
1248          return oss.str();
1249        }
1250      }
1251   };
1252
1253   class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritable
1254   {
1255   public:
1256     static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1257     static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1258     static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1259     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
1260     void loadArrays() throw(INTERP_KERNEL::Exception);
1261     void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
1262     void unloadArrays() throw(INTERP_KERNEL::Exception);
1263     void unloadArraysWithoutDataLoss() throw(INTERP_KERNEL::Exception);
1264     int getDimension() const throw(INTERP_KERNEL::Exception);
1265     int getIteration() const throw(INTERP_KERNEL::Exception);
1266     int getOrder() const throw(INTERP_KERNEL::Exception);
1267     std::string getName() throw(INTERP_KERNEL::Exception);
1268     void setName(const std::string& name) throw(INTERP_KERNEL::Exception);
1269     std::string getMeshName() throw(INTERP_KERNEL::Exception);
1270     void setMeshName(const std::string& newMeshName) throw(INTERP_KERNEL::Exception);
1271     int getMeshIteration() const throw(INTERP_KERNEL::Exception);
1272     int getMeshOrder() const throw(INTERP_KERNEL::Exception);
1273     int getNumberOfComponents() const throw(INTERP_KERNEL::Exception);
1274     bool isDealingTS(int iteration, int order) const throw(INTERP_KERNEL::Exception);
1275     void setInfo(const std::vector<std::string>& infos) throw(INTERP_KERNEL::Exception);
1276     const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
1277     bool presenceOfMultiDiscPerGeoType() const throw(INTERP_KERNEL::Exception);
1278     void setTime(int iteration, int order, double val) throw(INTERP_KERNEL::Exception);
1279     virtual MEDFileAnyTypeField1TS *shallowCpy() const throw(INTERP_KERNEL::Exception);
1280     MEDFileAnyTypeField1TS *deepCpy() const throw(INTERP_KERNEL::Exception);
1281     std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
1282     void setDtUnit(const std::string& dtUnit) throw(INTERP_KERNEL::Exception);
1283     %extend
1284     {
1285       PyObject *getTime() throw(INTERP_KERNEL::Exception)
1286       {
1287         int tmp1,tmp2;
1288         double tmp0=self->getTime(tmp1,tmp2);
1289         PyObject *res = PyList_New(3);
1290         PyList_SetItem(res,0,SWIG_From_int(tmp1));
1291         PyList_SetItem(res,1,SWIG_From_int(tmp2));
1292         PyList_SetItem(res,2,SWIG_From_double(tmp0));
1293         return res;
1294       }
1295
1296       PyObject *getDtIt() const throw(INTERP_KERNEL::Exception)
1297       {
1298         std::pair<int,int> res=self->getDtIt();
1299         PyObject *elt=PyTuple_New(2);
1300         PyTuple_SetItem(elt,0,SWIG_From_int(res.first));
1301         PyTuple_SetItem(elt,1,SWIG_From_int(res.second));
1302         return elt;
1303       }
1304
1305       void setProfileNameOnLeaf(INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception)
1306       {
1307         self->setProfileNameOnLeaf(0,typ,locId,newPflName,forceRenameOnGlob);
1308       }
1309       
1310       void setLocNameOnLeaf(INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception)
1311       {
1312         self->setLocNameOnLeaf(0,typ,locId,newLocName,forceRenameOnGlob);
1313       }
1314
1315       bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
1316       {
1317         std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
1318         return self->changeMeshNames(modifTab);
1319       }
1320       
1321       PyObject *getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception)
1322       {
1323         std::vector<TypeOfField> ret=self->getTypesOfFieldAvailable();
1324         PyObject *ret2=PyList_New(ret.size());
1325         for(int i=0;i<(int)ret.size();i++)
1326           PyList_SetItem(ret2,i,SWIG_From_int(ret[i]));
1327         return ret2;
1328       }
1329
1330       PyObject *getNonEmptyLevels(const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
1331       {
1332         std::vector<int> ret1;
1333         int ret0=self->getNonEmptyLevels(mname,ret1);
1334         PyObject *elt=PyTuple_New(2);
1335         PyTuple_SetItem(elt,0,SWIG_From_int(ret0));
1336         PyTuple_SetItem(elt,1,convertIntArrToPyList2(ret1));
1337         return elt;
1338       }
1339
1340       PyObject *getFieldSplitedByType(const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
1341       {
1342         std::vector<INTERP_KERNEL::NormalizedCellType> types;
1343         std::vector< std::vector<TypeOfField> > typesF;
1344         std::vector< std::vector<std::string> > pfls;
1345         std::vector< std::vector<std::string> > locs;
1346         std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(mname,types,typesF,pfls,locs);
1347         int sz=ret.size();
1348         PyObject *ret2=PyList_New(sz);
1349            for(int i=0;i<sz;i++)
1350              {
1351                const std::vector< std::pair<int,int> >& dadsI=ret[i];
1352                const std::vector<TypeOfField>& typesFI=typesF[i];
1353                const std::vector<std::string>& pflsI=pfls[i];
1354                const std::vector<std::string>& locsI=locs[i];
1355                PyObject *elt=PyTuple_New(2);
1356                PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
1357                int sz2=ret[i].size();
1358                PyObject *elt2=PyList_New(sz2);
1359                for(int j=0;j<sz2;j++)
1360                  {
1361                    PyObject *elt3=PyTuple_New(4);
1362                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
1363                    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));
1364                    PyTuple_SetItem(elt3,1,elt4);
1365                    PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
1366                    PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
1367                    PyList_SetItem(elt2,j,elt3);
1368                  }
1369                PyTuple_SetItem(elt,1,elt2);
1370                PyList_SetItem(ret2,i,elt);
1371              }
1372            return ret2;
1373       }
1374
1375       PyObject *splitComponents() const throw(INTERP_KERNEL::Exception)
1376       {
1377         std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > ret=self->splitComponents();
1378         std::size_t sz=ret.size();
1379         PyObject *retPy=PyList_New(sz);
1380         for(std::size_t i=0;i<sz;i++)
1381           PyList_SetItem(retPy,i,convertMEDFileField1TS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
1382         return retPy;
1383       }
1384
1385       PyObject *splitDiscretizations() const throw(INTERP_KERNEL::Exception)
1386       {
1387         std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > ret=self->splitDiscretizations();
1388         std::size_t sz=ret.size();
1389         PyObject *retPy=PyList_New(sz);
1390         for(std::size_t i=0;i<sz;i++)
1391           PyList_SetItem(retPy,i,convertMEDFileField1TS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
1392         return retPy;
1393       }
1394
1395       PyObject *splitMultiDiscrPerGeoTypes() const throw(INTERP_KERNEL::Exception)
1396       {
1397         std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeField1TS > > ret=self->splitMultiDiscrPerGeoTypes();
1398         std::size_t sz=ret.size();
1399         PyObject *retPy=PyList_New(sz);
1400         for(std::size_t i=0;i<sz;i++)
1401           PyList_SetItem(retPy,i,convertMEDFileField1TS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
1402         return retPy;
1403       }
1404     }
1405   };
1406
1407   class MEDFileField1TS : public MEDFileAnyTypeField1TS
1408   {
1409   public:
1410     static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1411     static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1412     static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1413     static MEDFileField1TS *New();
1414     ParaMEDMEM::MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
1415     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1416     MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1417     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1418     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1419     MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
1420     //
1421     void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
1422     void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
1423     void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
1424     void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
1425     %extend
1426        {
1427          MEDFileField1TS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
1428          {
1429            return MEDFileField1TS::New(fileName,loadAll);
1430          }
1431          
1432          MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
1433          {
1434            return MEDFileField1TS::New(fileName,fieldName,loadAll);
1435          }
1436
1437          MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception)
1438          {
1439            return MEDFileField1TS::New(fileName,fieldName,iteration,order,loadAll);
1440          }
1441
1442          MEDFileField1TS()
1443          {
1444            return MEDFileField1TS::New();
1445          }
1446
1447          void copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception)
1448          {
1449            const DataArrayDouble *arr=0;
1450            if(field)
1451              arr=field->getArray();
1452            self->copyTinyInfoFrom(field,arr);
1453          }
1454          
1455          std::string __str__() const throw(INTERP_KERNEL::Exception)
1456          {
1457            return self->simpleRepr();
1458          }
1459          
1460          PyObject *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
1461          {
1462            DataArrayInt *ret1=0;
1463            DataArrayDouble *ret0=self->getFieldWithProfile(type,meshDimRelToMax,mesh,ret1);
1464            PyObject *ret=PyTuple_New(2);
1465            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
1466            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1467            return ret;
1468          }
1469
1470          PyObject *getFieldSplitedByType2(const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
1471          {
1472            std::vector<INTERP_KERNEL::NormalizedCellType> types;
1473            std::vector< std::vector<TypeOfField> > typesF;
1474            std::vector< std::vector<std::string> > pfls;
1475            std::vector< std::vector<std::string> > locs;
1476            std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(mname,types,typesF,pfls,locs);
1477            int sz=ret.size();
1478            PyObject *ret2=PyList_New(sz);
1479            for(int i=0;i<sz;i++)
1480              {
1481                const std::vector<DataArrayDouble *>& dadsI=ret[i];
1482                const std::vector<TypeOfField>& typesFI=typesF[i];
1483                const std::vector<std::string>& pflsI=pfls[i];
1484                const std::vector<std::string>& locsI=locs[i];
1485                PyObject *elt=PyTuple_New(2);
1486                PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
1487                int sz2=ret[i].size();
1488                PyObject *elt2=PyList_New(sz2);
1489                for(int j=0;j<sz2;j++)
1490                  {
1491                    PyObject *elt3=PyTuple_New(4);
1492                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
1493                    PyTuple_SetItem(elt3,1,SWIG_NewPointerObj(SWIG_as_voidptr(dadsI[j]),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
1494                    PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
1495                    PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
1496                    PyList_SetItem(elt2,j,elt3);
1497                  }
1498                PyTuple_SetItem(elt,1,elt2);
1499                PyList_SetItem(ret2,i,elt);
1500              }
1501            return ret2;
1502          }
1503
1504          DataArrayDouble *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception)
1505          {
1506            DataArrayDouble *ret=self->getUndergroundDataArray();
1507            if(ret)
1508              ret->incrRef();
1509            return ret;
1510          }
1511
1512          PyObject *getUndergroundDataArrayExt() const throw(INTERP_KERNEL::Exception)
1513          {
1514            std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > > elt1Cpp;
1515            DataArrayDouble *elt0=self->getUndergroundDataArrayExt(elt1Cpp);
1516            if(elt0)
1517              elt0->incrRef();
1518            PyObject *ret=PyTuple_New(2);
1519            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elt0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
1520            std::size_t sz=elt1Cpp.size();
1521            PyObject *elt=PyList_New(sz);
1522            for(std::size_t i=0;i<sz;i++)
1523              {
1524                PyObject *elt1=PyTuple_New(2);
1525                PyObject *elt2=PyTuple_New(2);
1526                PyTuple_SetItem(elt2,0,SWIG_From_int((int)elt1Cpp[i].first.first));
1527                PyTuple_SetItem(elt2,1,SWIG_From_int(elt1Cpp[i].first.second));
1528                PyObject *elt3=PyTuple_New(2);
1529                PyTuple_SetItem(elt3,0,SWIG_From_int(elt1Cpp[i].second.first));
1530                PyTuple_SetItem(elt3,1,SWIG_From_int(elt1Cpp[i].second.second));
1531                PyTuple_SetItem(elt1,0,elt2);
1532                PyTuple_SetItem(elt1,1,elt3);
1533                PyList_SetItem(elt,i,elt1);
1534              }
1535            PyTuple_SetItem(ret,1,elt);
1536            return ret;
1537          }
1538        }
1539   };
1540
1541   class MEDFileIntField1TS : public MEDFileAnyTypeField1TS
1542   {
1543   public:
1544     static MEDFileIntField1TS *New();
1545     static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1546     static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1547     static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1548     ParaMEDMEM::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
1549     //
1550     void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception);
1551     void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
1552     %extend
1553     {
1554       MEDFileIntField1TS() throw(INTERP_KERNEL::Exception)
1555       {
1556         return MEDFileIntField1TS::New();
1557       }
1558
1559       MEDFileIntField1TS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
1560       {
1561         return MEDFileIntField1TS::New(fileName,loadAll);
1562       }
1563
1564       MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
1565       {
1566         return MEDFileIntField1TS::New(fileName,fieldName,loadAll);
1567       }
1568
1569       MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception)
1570       {
1571         return MEDFileIntField1TS::New(fileName,fieldName,iteration,order,loadAll);
1572       }
1573
1574       std::string __str__() const throw(INTERP_KERNEL::Exception)
1575       {
1576         return self->simpleRepr();
1577       }
1578
1579       PyObject *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception)
1580       {
1581         DataArrayInt *ret1=0;
1582         MEDCouplingFieldDouble *ret0=self->getFieldAtLevel(type,meshDimRelToMax,ret1,renumPol);
1583         PyObject *ret=PyTuple_New(2);
1584         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
1585         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1586         return ret;
1587       }
1588
1589       PyObject *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception)
1590       {
1591         DataArrayInt *ret1=0;
1592         MEDCouplingFieldDouble *ret0=self->getFieldAtTopLevel(type,ret1,renumPol);
1593         PyObject *ret=PyTuple_New(2);
1594         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
1595         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1596         return ret;
1597       }
1598
1599       PyObject *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception)
1600       {
1601         DataArrayInt *ret1=0;
1602         MEDCouplingFieldDouble *ret0=self->getFieldOnMeshAtLevel(type,meshDimRelToMax,mesh,ret1,renumPol);
1603         PyObject *ret=PyTuple_New(2);
1604         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
1605         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1606         return ret;
1607       }
1608       
1609       PyObject *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception)
1610       {
1611         DataArrayInt *ret1=0;
1612         MEDCouplingFieldDouble *ret0=self->getFieldOnMeshAtLevel(type,mesh,ret1,renumPol);
1613         PyObject *ret=PyTuple_New(2);
1614         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
1615         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1616         return ret;
1617       }
1618       
1619       PyObject *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception)
1620       {
1621         DataArrayInt *ret1=0;
1622         MEDCouplingFieldDouble *ret0=self->getFieldAtLevelOld(type,mname,meshDimRelToMax,ret1,renumPol);
1623         PyObject *ret=PyTuple_New(2);
1624         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
1625         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1626         return ret;
1627       }
1628
1629       PyObject *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
1630       {
1631          DataArrayInt *ret1=0;
1632          DataArrayInt *ret0=self->getFieldWithProfile(type,meshDimRelToMax,mesh,ret1);
1633          PyObject *ret=PyTuple_New(2);
1634          PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1635          PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1636          return ret;
1637       }
1638       
1639       DataArrayInt *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception)
1640       {
1641         DataArrayInt *ret=self->getUndergroundDataArray();
1642         if(ret)
1643           ret->incrRef();
1644         return ret;
1645       }
1646     }
1647   };
1648
1649   class MEDFileAnyTypeFieldMultiTSIterator
1650   {
1651   public:
1652     %extend
1653     {
1654       PyObject *next() throw(INTERP_KERNEL::Exception)
1655       {
1656         MEDFileAnyTypeField1TS *ret=self->nextt();
1657         if(ret)
1658           return convertMEDFileField1TS(ret, SWIG_POINTER_OWN | 0 );
1659         else
1660           {
1661             PyErr_SetString(PyExc_StopIteration,"No more data.");
1662             return 0;
1663           }
1664       }
1665     }
1666   };
1667
1668   class MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritable
1669   {
1670   public:
1671     static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1672     static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1673     MEDFileAnyTypeFieldMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception);
1674     virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const throw(INTERP_KERNEL::Exception);
1675     std::string getName() const throw(INTERP_KERNEL::Exception);
1676     void setName(const std::string& name) throw(INTERP_KERNEL::Exception);
1677     std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
1678     void setDtUnit(const std::string& dtUnit) throw(INTERP_KERNEL::Exception);
1679     std::string getMeshName() const throw(INTERP_KERNEL::Exception);
1680     void setMeshName(const std::string& newMeshName) throw(INTERP_KERNEL::Exception);
1681     const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
1682     bool presenceOfMultiDiscPerGeoType() const throw(INTERP_KERNEL::Exception);
1683     int getNumberOfComponents() const throw(INTERP_KERNEL::Exception);
1684     int getNumberOfTS() const throw(INTERP_KERNEL::Exception);
1685     void eraseEmptyTS() throw(INTERP_KERNEL::Exception);
1686     int getPosOfTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
1687     int getPosGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
1688     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
1689     void loadArrays() throw(INTERP_KERNEL::Exception);
1690     void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
1691     void unloadArrays() throw(INTERP_KERNEL::Exception);
1692     void unloadArraysWithoutDataLoss() throw(INTERP_KERNEL::Exception);
1693     //
1694     virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception);
1695     MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
1696     MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
1697     void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts) throw(INTERP_KERNEL::Exception);
1698     void synchronizeNameScope() throw(INTERP_KERNEL::Exception);
1699     %extend
1700     {
1701       int __len__() const throw(INTERP_KERNEL::Exception)
1702       {
1703         return self->getNumberOfTS();
1704       }
1705
1706       int getTimeId(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
1707       {
1708         if(elt0 && PyInt_Check(elt0))
1709           {//fmts[3]
1710             int pos=PyInt_AS_LONG(elt0);
1711             return pos;
1712           }
1713         else if(elt0 && PyTuple_Check(elt0))
1714           {
1715             if(PyTuple_Size(elt0)==2)
1716               {
1717                 PyObject *o0=PyTuple_GetItem(elt0,0);
1718                 PyObject *o1=PyTuple_GetItem(elt0,1);
1719                 if(PyInt_Check(o0) && PyInt_Check(o1))
1720                   {//fmts(1,-1)
1721                     int iter=PyInt_AS_LONG(o0);
1722                     int order=PyInt_AS_LONG(o1);
1723                     return self->getPosOfTimeStep(iter,order);
1724                   }
1725                 else
1726                   throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::__getitem__ : invalid input param ! input is a tuple of size 2 but two integers are expected in this tuple to request a time steps !");
1727               }
1728             else
1729               throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::__getitem__ : invalid input param ! input is a tuple of size != 2 ! two integers are expected in this tuple to request a time steps !");
1730           }
1731         else if(elt0 && PyFloat_Check(elt0))
1732           {
1733             double val=PyFloat_AS_DOUBLE(elt0);
1734             return self->getPosGivenTime(val);
1735           }
1736         else
1737           throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::__getitem__ : invalid input params ! expected fmts[int], fmts[int,int] or fmts[double] to request time step !");
1738       }
1739       
1740       PyObject *getIterations() const throw(INTERP_KERNEL::Exception)
1741       {
1742         std::vector< std::pair<int,int> > res=self->getIterations();
1743         PyObject *ret=PyList_New(res.size());
1744         int rk=0;
1745         for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
1746           {
1747             PyObject *elt=PyTuple_New(2);
1748             PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
1749             PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
1750             PyList_SetItem(ret,rk,elt);
1751           }
1752         return ret;
1753       }
1754       
1755       PyObject *getTimeSteps() const throw(INTERP_KERNEL::Exception)
1756       {
1757         std::vector<double> ret1;
1758         std::vector< std::pair<int,int> > ret=self->getTimeSteps(ret1);
1759         std::size_t sz=ret.size();
1760         PyObject *ret2=PyList_New(sz);
1761         for(std::size_t i=0;i<sz;i++)
1762           {
1763             PyObject *elt=PyTuple_New(3);
1764             PyTuple_SetItem(elt,0,SWIG_From_int(ret[i].first));
1765             PyTuple_SetItem(elt,1,SWIG_From_int(ret[i].second));
1766             PyTuple_SetItem(elt,2,SWIG_From_double(ret1[i]));
1767             PyList_SetItem(ret2,i,elt);
1768           }
1769         return ret2;
1770       }
1771       
1772       PyObject *getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception)
1773       {
1774         std::vector< std::vector<TypeOfField> > ret=self->getTypesOfFieldAvailable();
1775         PyObject *ret2=PyList_New(ret.size());
1776         for(int i=0;i<(int)ret.size();i++)
1777           {
1778             const std::vector<TypeOfField>& rett=ret[i];
1779             PyObject *ret3=PyList_New(rett.size());
1780             for(int j=0;j<(int)rett.size();j++)
1781               PyList_SetItem(ret3,j,SWIG_From_int(rett[j]));
1782             PyList_SetItem(ret2,i,ret3);
1783           }
1784         return ret2;
1785       }
1786       
1787       PyObject *getNonEmptyLevels(int iteration, int order, const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
1788       {
1789         std::vector<int> ret1;
1790         int ret0=self->getNonEmptyLevels(iteration,order,mname,ret1);
1791         PyObject *elt=PyTuple_New(2);
1792         PyTuple_SetItem(elt,0,SWIG_From_int(ret0));
1793         PyTuple_SetItem(elt,1,convertIntArrToPyList2(ret1));
1794         return elt;
1795       }
1796       
1797       PyObject *getFieldSplitedByType(int iteration, int order, const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
1798       {
1799         std::vector<INTERP_KERNEL::NormalizedCellType> types;
1800         std::vector< std::vector<TypeOfField> > typesF;
1801         std::vector< std::vector<std::string> > pfls;
1802         std::vector< std::vector<std::string> > locs;
1803         std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(iteration,order,mname,types,typesF,pfls,locs);
1804         int sz=ret.size();
1805         PyObject *ret2=PyList_New(sz);
1806         for(int i=0;i<sz;i++)
1807           {
1808             const std::vector< std::pair<int,int> >& dadsI=ret[i];
1809             const std::vector<TypeOfField>& typesFI=typesF[i];
1810             const std::vector<std::string>& pflsI=pfls[i];
1811             const std::vector<std::string>& locsI=locs[i];
1812             PyObject *elt=PyTuple_New(2);
1813             PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
1814             int sz2=ret[i].size();
1815             PyObject *elt2=PyList_New(sz2);
1816             for(int j=0;j<sz2;j++)
1817               {
1818                 PyObject *elt3=PyTuple_New(4);
1819                 PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
1820                 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));
1821                 PyTuple_SetItem(elt3,1,elt4);
1822                 PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
1823                 PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
1824                 PyList_SetItem(elt2,j,elt3);
1825               }
1826             PyTuple_SetItem(elt,1,elt2);
1827             PyList_SetItem(ret2,i,elt);
1828           }
1829         return ret2;
1830       }
1831
1832       std::vector<int> getTimeIds(PyObject *elts) const throw(INTERP_KERNEL::Exception)
1833       {
1834         if(PyList_Check(elts))
1835           {
1836             int sz=PyList_Size(elts);
1837             std::vector<int> ret(sz);
1838             for(int i=0;i<sz;i++)
1839               {
1840                 PyObject *elt=PyList_GetItem(elts,i);
1841                 ret[i]=ParaMEDMEM_MEDFileAnyTypeFieldMultiTS_getTimeId(self,elt);
1842               }
1843             return ret;
1844           }
1845         else
1846           {
1847             std::vector<int> ret(1);
1848             ret[0]=ParaMEDMEM_MEDFileAnyTypeFieldMultiTS_getTimeId(self,elts);
1849             return ret;
1850           }
1851       }
1852       
1853       void __delitem__(PyObject *elts) throw(INTERP_KERNEL::Exception)
1854       {
1855         if(PySlice_Check(elts))
1856           {
1857             Py_ssize_t strt=2,stp=2,step=2;
1858             PySliceObject *oC=reinterpret_cast<PySliceObject *>(elts);
1859             GetIndicesOfSlice(oC,self->getNumberOfTS(),&strt,&stp,&step,"MEDFileAnyTypeFieldMultiTS.__delitem__ : error in input slice !");
1860             self->eraseTimeStepIds2(strt,stp,step);
1861           }
1862         else
1863           {
1864             std::vector<int> idsToRemove=ParaMEDMEM_MEDFileAnyTypeFieldMultiTS_getTimeIds(self,elts);
1865             if(!idsToRemove.empty())
1866               self->eraseTimeStepIds(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
1867           }
1868       }
1869       
1870       void eraseTimeStepIds(PyObject *li) throw(INTERP_KERNEL::Exception)
1871       {
1872         int sw;
1873         int pos1;
1874         std::vector<int> pos2;
1875         DataArrayInt *pos3=0;
1876         DataArrayIntTuple *pos4=0;
1877         convertObjToPossibleCpp1(li,sw,pos1,pos2,pos3,pos4);
1878         switch(sw)
1879           {
1880           case 1:
1881             {
1882               self->eraseTimeStepIds(&pos1,&pos1+1);
1883               return;
1884             }
1885           case 2:
1886             {
1887               if(pos2.empty())
1888                 return;
1889               self->eraseTimeStepIds(&pos2[0],&pos2[0]+pos2.size());
1890               return ;
1891             }
1892           case 3:
1893             {
1894               self->eraseTimeStepIds(pos3->begin(),pos3->end());
1895               return ;
1896             }
1897           default:
1898             throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::eraseTimeStepIds : unexpected input array type recognized !");
1899           }
1900       }
1901
1902       MEDFileAnyTypeFieldMultiTSIterator *__iter__() throw(INTERP_KERNEL::Exception)
1903       {
1904         return self->iterator();
1905       }
1906
1907       PyObject *__getitem__(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
1908       {
1909         if(elt0 && PyList_Check(elt0))
1910           {
1911             int sz=PyList_Size(elt0);
1912             MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da=DataArrayInt::New(); da->alloc(sz,1);
1913             int *pt=da->getPointer();
1914             for(int i=0;i<sz;i++,pt++)
1915               {
1916                 PyObject *elt1=PyList_GetItem(elt0,i);
1917                 *pt=MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(self,elt1);
1918               }
1919             return convertMEDFileFieldMultiTS(self->buildSubPart(da->begin(),da->end()),SWIG_POINTER_OWN | 0);
1920           }
1921         else if(elt0 && PySlice_Check(elt0))
1922           {
1923             Py_ssize_t strt=2,stp=2,step=2;
1924             PySliceObject *oC=reinterpret_cast<PySliceObject *>(elt0);
1925             GetIndicesOfSlice(oC,self->getNumberOfTS(),&strt,&stp,&step,"MEDFileAnyTypeFieldMultiTS.__getitem__ : error in input slice !");
1926             return convertMEDFileFieldMultiTS(self->buildSubPartSlice(strt,stp,step),SWIG_POINTER_OWN | 0);
1927           }
1928         else
1929           return convertMEDFileField1TS(self->getTimeStepAtPos(MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(self,elt0)),SWIG_POINTER_OWN | 0);
1930       }
1931
1932       bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
1933       {
1934         std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
1935         return self->changeMeshNames(modifTab);
1936       }
1937
1938       PyObject *splitComponents() const throw(INTERP_KERNEL::Exception)
1939       {
1940         std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > ret=self->splitComponents();
1941         std::size_t sz=ret.size();
1942         PyObject *retPy=PyList_New(sz);
1943         for(std::size_t i=0;i<sz;i++)
1944           PyList_SetItem(retPy,i,convertMEDFileFieldMultiTS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
1945         return retPy;
1946       }
1947
1948       PyObject *splitDiscretizations() const throw(INTERP_KERNEL::Exception)
1949       {
1950         std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > ret=self->splitDiscretizations();
1951         std::size_t sz=ret.size();
1952         PyObject *retPy=PyList_New(sz);
1953         for(std::size_t i=0;i<sz;i++)
1954           PyList_SetItem(retPy,i,convertMEDFileFieldMultiTS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
1955         return retPy;
1956       }
1957
1958       PyObject *splitMultiDiscrPerGeoTypes() const throw(INTERP_KERNEL::Exception)
1959       {
1960         std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > ret=self->splitMultiDiscrPerGeoTypes();
1961         std::size_t sz=ret.size();
1962         PyObject *retPy=PyList_New(sz);
1963         for(std::size_t i=0;i<sz;i++)
1964           PyList_SetItem(retPy,i,convertMEDFileFieldMultiTS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
1965         return retPy;
1966       }
1967
1968       void pushBackTimeSteps(PyObject *li) throw(INTERP_KERNEL::Exception)
1969       {
1970         std::vector<MEDFileAnyTypeField1TS *> tmp;
1971         convertFromPyObjVectorOfObj<ParaMEDMEM::MEDFileAnyTypeField1TS *>(li,SWIGTYPE_p_ParaMEDMEM__MEDFileAnyTypeField1TS,"MEDFileAnyTypeField1TS",tmp);
1972         self->pushBackTimeSteps(tmp);
1973       }
1974
1975       static PyObject *MEDFileAnyTypeFieldMultiTS::SplitIntoCommonTimeSeries(PyObject *li) throw(INTERP_KERNEL::Exception)
1976       {
1977         std::vector<MEDFileAnyTypeFieldMultiTS *> vectFMTS;
1978         convertFromPyObjVectorOfObj<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS *>(li,SWIGTYPE_p_ParaMEDMEM__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",vectFMTS);
1979         std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > ret=MEDFileAnyTypeFieldMultiTS::SplitIntoCommonTimeSeries(vectFMTS);
1980         std::size_t sz=ret.size();
1981         PyObject *retPy=PyList_New(sz);
1982         for(std::size_t i=0;i<sz;i++)
1983           {
1984             std::size_t sz2=ret[i].size();
1985             PyObject *ret1Py=PyList_New(sz2);
1986             for(std::size_t j=0;j<sz2;j++)
1987               {
1988                 MEDFileAnyTypeFieldMultiTS *elt(ret[i][j]);
1989                 if(elt)
1990                   elt->incrRef();
1991                 PyList_SetItem(ret1Py,j,convertMEDFileFieldMultiTS(elt,SWIG_POINTER_OWN | 0 ));
1992               }
1993             PyList_SetItem(retPy,i,ret1Py);
1994           }
1995         return retPy;
1996       }
1997       
1998       static PyObject *MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(PyObject *li, const MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception)
1999       {
2000         std::vector<MEDFileAnyTypeFieldMultiTS *> vectFMTS;
2001         convertFromPyObjVectorOfObj<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS *>(li,SWIGTYPE_p_ParaMEDMEM__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",vectFMTS);
2002         std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> > ret2;
2003         std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > ret=MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(vectFMTS,mesh,ret2);
2004         if(ret2.size()!=ret.size())
2005           {
2006             std::ostringstream oss; oss << "MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport (PyWrap) : internal error ! Size of 2 vectors must match ! (" << ret.size() << "!=" << ret2.size() << ") !";
2007             throw INTERP_KERNEL::Exception(oss.str().c_str());
2008           }
2009         std::size_t sz=ret.size();
2010         PyObject *retPy=PyList_New(sz);
2011         for(std::size_t i=0;i<sz;i++)
2012           {
2013             std::size_t sz2=ret[i].size();
2014             PyObject *ret0Py=PyTuple_New(2);
2015             PyObject *ret1Py=PyList_New(sz2);
2016             for(std::size_t j=0;j<sz2;j++)
2017               {
2018                 MEDFileAnyTypeFieldMultiTS *elt(ret[i][j]);
2019                 if(elt)
2020                   elt->incrRef();
2021                 PyList_SetItem(ret1Py,j,convertMEDFileFieldMultiTS(elt,SWIG_POINTER_OWN | 0 ));
2022               }
2023             PyTuple_SetItem(ret0Py,0,ret1Py);
2024             PyTuple_SetItem(ret0Py,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret2[i].retn()),SWIGTYPE_p_ParaMEDMEM__MEDFileFastCellSupportComparator, SWIG_POINTER_OWN | 0 ));
2025             PyList_SetItem(retPy,i,ret0Py);
2026           }
2027         return retPy;
2028       }
2029     }
2030   };
2031
2032   class MEDFileFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
2033   {
2034   public:
2035     static MEDFileFieldMultiTS *New() throw(INTERP_KERNEL::Exception);
2036     static MEDFileFieldMultiTS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2037     static MEDFileFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2038     //
2039     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2040     MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2041     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2042     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2043     MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2044     //
2045     void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
2046     void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
2047     ParaMEDMEM::MEDFileIntFieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
2048     %extend
2049        {
2050          MEDFileFieldMultiTS()
2051          {
2052            return MEDFileFieldMultiTS::New();
2053          }
2054
2055          MEDFileFieldMultiTS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2056          {
2057            return MEDFileFieldMultiTS::New(fileName,loadAll);
2058          }
2059
2060          MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2061          {
2062            return MEDFileFieldMultiTS::New(fileName,fieldName,loadAll);
2063          }
2064          
2065          std::string __str__() const throw(INTERP_KERNEL::Exception)
2066          {
2067            return self->simpleRepr();
2068          }
2069
2070          PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
2071          {
2072            DataArrayInt *ret1=0;
2073            DataArrayDouble *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
2074            PyObject *ret=PyTuple_New(2);
2075            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2076            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2077            return ret;
2078          }
2079
2080          PyObject *getFieldSplitedByType2(int iteration, int order, const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
2081          {
2082            std::vector<INTERP_KERNEL::NormalizedCellType> types;
2083            std::vector< std::vector<TypeOfField> > typesF;
2084            std::vector< std::vector<std::string> > pfls;
2085            std::vector< std::vector<std::string> > locs;
2086            std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(iteration,order,mname,types,typesF,pfls,locs);
2087            int sz=ret.size();
2088            PyObject *ret2=PyList_New(sz);
2089            for(int i=0;i<sz;i++)
2090              {
2091                const std::vector<DataArrayDouble *>& dadsI=ret[i];
2092                const std::vector<TypeOfField>& typesFI=typesF[i];
2093                const std::vector<std::string>& pflsI=pfls[i];
2094                const std::vector<std::string>& locsI=locs[i];
2095                PyObject *elt=PyTuple_New(2);
2096                PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
2097                int sz2=ret[i].size();
2098                PyObject *elt2=PyList_New(sz2);
2099                for(int j=0;j<sz2;j++)
2100                  {
2101                    PyObject *elt3=PyTuple_New(4);
2102                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
2103                    PyTuple_SetItem(elt3,1,SWIG_NewPointerObj(SWIG_as_voidptr(dadsI[j]),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2104                    PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
2105                    PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
2106                    PyList_SetItem(elt2,j,elt3);
2107                  }
2108                PyTuple_SetItem(elt,1,elt2);
2109                PyList_SetItem(ret2,i,elt);
2110              }
2111            return ret2;
2112          }
2113          DataArrayDouble *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception)
2114          {
2115            DataArrayDouble *ret=self->getUndergroundDataArray(iteration,order);
2116            if(ret)
2117              ret->incrRef();
2118            return ret;
2119          }
2120          
2121          PyObject *getUndergroundDataArrayExt(int iteration, int order) const throw(INTERP_KERNEL::Exception)
2122          {
2123            std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > > elt1Cpp;
2124            DataArrayDouble *elt0=self->getUndergroundDataArrayExt(iteration,order,elt1Cpp);
2125            if(elt0)
2126              elt0->incrRef();
2127            PyObject *ret=PyTuple_New(2);
2128            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elt0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2129            std::size_t sz=elt1Cpp.size();
2130            PyObject *elt=PyList_New(sz);
2131            for(std::size_t i=0;i<sz;i++)
2132              {
2133                PyObject *elt1=PyTuple_New(2);
2134                PyObject *elt2=PyTuple_New(2);
2135                PyTuple_SetItem(elt2,0,SWIG_From_int(elt1Cpp[i].first.first));
2136                PyTuple_SetItem(elt2,1,SWIG_From_int(elt1Cpp[i].first.second));
2137                PyObject *elt3=PyTuple_New(2);
2138                PyTuple_SetItem(elt3,0,SWIG_From_int(elt1Cpp[i].second.first));
2139                PyTuple_SetItem(elt3,1,SWIG_From_int(elt1Cpp[i].second.second));
2140                PyTuple_SetItem(elt1,0,elt2);
2141                PyTuple_SetItem(elt1,1,elt3);
2142                PyList_SetItem(elt,i,elt1);
2143              }
2144            PyTuple_SetItem(ret,1,elt);
2145            return ret;
2146          }
2147        }
2148   };
2149
2150   class MEDFileFieldsIterator
2151   {
2152   public:
2153     %extend
2154     {
2155       PyObject *next() throw(INTERP_KERNEL::Exception)
2156       {
2157         MEDFileAnyTypeFieldMultiTS *ret=self->nextt();
2158         if(ret)
2159           return convertMEDFileFieldMultiTS(ret, SWIG_POINTER_OWN | 0 );
2160         else
2161           {
2162             PyErr_SetString(PyExc_StopIteration,"No more data.");
2163             return 0;
2164           }
2165       }
2166     }
2167   };
2168
2169   class MEDFileIntFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
2170   {
2171   public:
2172     static MEDFileIntFieldMultiTS *New();
2173     static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2174     static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2175     //
2176     void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals) throw(INTERP_KERNEL::Exception);
2177     void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArrayInt *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
2178     ParaMEDMEM::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
2179     %extend
2180     {
2181       MEDFileIntFieldMultiTS()
2182       {
2183         return MEDFileIntFieldMultiTS::New();
2184       }
2185       
2186       MEDFileIntFieldMultiTS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2187       {
2188         return MEDFileIntFieldMultiTS::New(fileName,loadAll);
2189       }
2190       
2191       MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2192       {
2193         return MEDFileIntFieldMultiTS::New(fileName,fieldName,loadAll);
2194       }
2195
2196       std::string __str__() const throw(INTERP_KERNEL::Exception)
2197       {
2198         return self->simpleRepr();
2199       }
2200
2201       PyObject *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception)
2202       {
2203         DataArrayInt *ret1=0;
2204         MEDCouplingFieldDouble *ret0=self->getFieldAtLevel(type,iteration,order,meshDimRelToMax,ret1,renumPol);
2205         PyObject *ret=PyTuple_New(2);
2206         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
2207         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2208         return ret;
2209       }
2210
2211       PyObject *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const throw(INTERP_KERNEL::Exception)
2212       {
2213         DataArrayInt *ret1=0;
2214         MEDCouplingFieldDouble *ret0=self->getFieldAtTopLevel(type,iteration,order,ret1,renumPol);
2215         PyObject *ret=PyTuple_New(2);
2216         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
2217         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2218         return ret;
2219       }
2220
2221       PyObject *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception)
2222       {
2223         DataArrayInt *ret1=0;
2224         MEDCouplingFieldDouble *ret0=self->getFieldOnMeshAtLevel(type,iteration,order,meshDimRelToMax,mesh,ret1,renumPol);
2225         PyObject *ret=PyTuple_New(2);
2226         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
2227         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2228         return ret;
2229       }
2230       
2231       PyObject *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception)
2232       {
2233         DataArrayInt *ret1=0;
2234         MEDCouplingFieldDouble *ret0=self->getFieldOnMeshAtLevel(type,iteration,order,mesh,ret1,renumPol);
2235         PyObject *ret=PyTuple_New(2);
2236         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
2237         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2238         return ret;
2239       }
2240       
2241       PyObject *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception)
2242       {
2243         DataArrayInt *ret1=0;
2244         MEDCouplingFieldDouble *ret0=self->getFieldAtLevelOld(type,iteration,order,mname,meshDimRelToMax,ret1,renumPol);
2245         PyObject *ret=PyTuple_New(2);
2246         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
2247         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2248         return ret;
2249       }
2250
2251       PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
2252       {
2253          DataArrayInt *ret1=0;
2254          DataArrayInt *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
2255          PyObject *ret=PyTuple_New(2);
2256          PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2257          PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2258          return ret;
2259       }
2260
2261       DataArrayInt *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception)
2262       {
2263         DataArrayInt *ret=self->getUndergroundDataArray(iteration,order);
2264         if(ret)
2265           ret->incrRef();
2266         return ret;
2267       }
2268     }
2269   };
2270
2271   class MEDFileFields : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritable
2272   {
2273   public:
2274     static MEDFileFields *New() throw(INTERP_KERNEL::Exception);
2275     static MEDFileFields *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2276     static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0) throw(INTERP_KERNEL::Exception);
2277     MEDFileFields *deepCpy() const throw(INTERP_KERNEL::Exception);
2278     MEDFileFields *shallowCpy() const throw(INTERP_KERNEL::Exception);
2279     void loadArrays() throw(INTERP_KERNEL::Exception);
2280     void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
2281     void unloadArrays() throw(INTERP_KERNEL::Exception);
2282     void unloadArraysWithoutDataLoss() throw(INTERP_KERNEL::Exception);
2283     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
2284     int getNumberOfFields() const;
2285     std::vector<std::string> getFieldsNames() const throw(INTERP_KERNEL::Exception);
2286     std::vector<std::string> getMeshesNames() const throw(INTERP_KERNEL::Exception);
2287     //
2288     void resize(int newSize) throw(INTERP_KERNEL::Exception);
2289     void pushField(MEDFileAnyTypeFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
2290     void setFieldAtPos(int i, MEDFileAnyTypeFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
2291     int getPosFromFieldName(const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
2292     MEDFileAnyTypeFieldMultiTS *getFieldAtPos(int i) const throw(INTERP_KERNEL::Exception);
2293     MEDFileAnyTypeFieldMultiTS *getFieldWithName(const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
2294     MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const std::string& meshName) const throw(INTERP_KERNEL::Exception);
2295     void destroyFieldAtPos(int i) throw(INTERP_KERNEL::Exception);
2296     bool removeFieldsWithoutAnyTimeStep() throw(INTERP_KERNEL::Exception);
2297     %extend
2298        {
2299          MEDFileFields()
2300          {
2301            return MEDFileFields::New();
2302          }
2303
2304          MEDFileFields(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2305          {
2306            return MEDFileFields::New(fileName,loadAll);
2307          }
2308          
2309          std::string __str__() const throw(INTERP_KERNEL::Exception)
2310          {
2311            return self->simpleRepr();
2312          }
2313
2314          PyObject *getCommonIterations() const throw(INTERP_KERNEL::Exception)
2315          {
2316            bool ret1;
2317            std::vector< std::pair<int,int> > ret0=self->getCommonIterations(ret1);
2318            PyObject *ret=PyTuple_New(2);
2319            PyObject *ret_0=PyList_New(ret0.size());
2320            int rk=0;
2321            for(std::vector< std::pair<int,int> >::const_iterator iter=ret0.begin();iter!=ret0.end();iter++,rk++)
2322              {
2323                PyObject *elt=PyTuple_New(2);
2324                PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
2325                PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
2326                PyList_SetItem(ret_0,rk,elt);
2327              }
2328            PyTuple_SetItem(ret,0,ret_0);
2329            PyObject *ret_1=ret1?Py_True:Py_False; Py_XINCREF(ret_1);
2330            PyTuple_SetItem(ret,1,ret_1);
2331            return ret;
2332          }
2333
2334          MEDFileFields *partOfThisLyingOnSpecifiedTimeSteps(PyObject *timeSteps) const throw(INTERP_KERNEL::Exception)
2335          {
2336            std::vector< std::pair<int,int> > ts=convertTimePairIdsFromPy(timeSteps);
2337            return self->partOfThisLyingOnSpecifiedTimeSteps(ts);
2338          }
2339
2340          MEDFileFields *partOfThisNotLyingOnSpecifiedTimeSteps(PyObject *timeSteps) const throw(INTERP_KERNEL::Exception)
2341          {
2342            std::vector< std::pair<int,int> > ts=convertTimePairIdsFromPy(timeSteps);
2343            return self->partOfThisNotLyingOnSpecifiedTimeSteps(ts);
2344          }
2345          
2346          PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
2347          {
2348            if(obj && PyList_Check(obj))
2349              {
2350                int sz=PyList_Size(obj);
2351                MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da=DataArrayInt::New(); da->alloc(sz,1);
2352                int *pt=da->getPointer();
2353                for(int i=0;i<sz;i++,pt++)
2354                  {
2355                    PyObject *elt1=PyList_GetItem(obj,i);
2356                    *pt=MEDFileFieldsgetitemSingleTS__(self,elt1);
2357                  }
2358                return SWIG_NewPointerObj(SWIG_as_voidptr(self->buildSubPart(da->begin(),da->end())),SWIGTYPE_p_ParaMEDMEM__MEDFileFields, SWIG_POINTER_OWN | 0 );
2359              }
2360            else
2361              return convertMEDFileFieldMultiTS(self->getFieldAtPos(MEDFileFieldsgetitemSingleTS__(self,obj)), SWIG_POINTER_OWN | 0 );
2362          }
2363
2364          MEDFileFields *__setitem__(int obj, MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception)
2365          {
2366            self->setFieldAtPos(obj,field);
2367            return self;
2368          }
2369
2370          int __len__() const throw(INTERP_KERNEL::Exception)
2371          {
2372            return self->getNumberOfFields();
2373          }
2374
2375          MEDFileFieldsIterator *__iter__() throw(INTERP_KERNEL::Exception)
2376          {
2377            return self->iterator();
2378          }
2379          
2380          bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
2381          {
2382            std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
2383            return self->changeMeshNames(modifTab);
2384          }
2385
2386          int getPosOfField(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
2387          {
2388            if(elt0 && PyInt_Check(elt0))
2389              {//fmts[3]
2390                return PyInt_AS_LONG(elt0);
2391              }
2392            else if(elt0 && PyString_Check(elt0))
2393              return self->getPosFromFieldName(PyString_AsString(elt0));
2394            else
2395              throw INTERP_KERNEL::Exception("MEDFileFields::getPosOfField : invalid input params ! expected fields[int], fields[string_of_field_name] !");
2396          }
2397          
2398          std::vector<int> getPosOfFields(PyObject *elts) const throw(INTERP_KERNEL::Exception)
2399          {
2400            if(PyList_Check(elts))
2401              {
2402                int sz=PyList_Size(elts);
2403                std::vector<int> ret(sz);
2404                for(int i=0;i<sz;i++)
2405                  {
2406                    PyObject *elt=PyList_GetItem(elts,i);
2407                    ret[i]=ParaMEDMEM_MEDFileFields_getPosOfField(self,elt);
2408                  }
2409                return ret;
2410              }
2411            else
2412              {
2413                std::vector<int> ret(1);
2414                ret[0]=ParaMEDMEM_MEDFileFields_getPosOfField(self,elts);
2415                return ret;
2416              }
2417          }
2418
2419          void pushFields(PyObject *fields) throw(INTERP_KERNEL::Exception)
2420          {
2421            std::vector<MEDFileAnyTypeFieldMultiTS *> tmp;
2422            convertFromPyObjVectorOfObj<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS *>(fields,SWIGTYPE_p_ParaMEDMEM__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",tmp);
2423            self->pushFields(tmp);
2424          }
2425          
2426          void __delitem__(PyObject *elts) throw(INTERP_KERNEL::Exception)
2427          {
2428            if(elts && PySlice_Check(elts))
2429              {
2430                Py_ssize_t strt=2,stp=2,step=2;
2431                PySliceObject *oC=reinterpret_cast<PySliceObject *>(elts);
2432                GetIndicesOfSlice(oC,self->getNumberOfFields(),&strt,&stp,&step,"MEDFileFields.__delitem__ : error in input slice !");
2433                self->destroyFieldsAtPos2(strt,stp,step);
2434              }
2435            else
2436              {
2437                std::vector<int> idsToRemove=ParaMEDMEM_MEDFileFields_getPosOfFields(self,elts);
2438                if(!idsToRemove.empty())
2439                  self->destroyFieldsAtPos(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
2440              }
2441          }
2442        }
2443   };
2444
2445   class MEDFileParameter1TS : public RefCountObject
2446   {
2447   public:
2448     void setIteration(int it);
2449     int getIteration() const;
2450     void setOrder(int order);
2451     int getOrder() const;
2452     void setTimeValue(double time);
2453     void setTime(int dt, int it, double time);
2454     double getTime(int& dt, int& it);
2455     double getTimeValue() const;
2456   };
2457
2458   class MEDFileParameterDouble1TSWTI : public MEDFileParameter1TS
2459   {
2460   public:
2461     void setValue(double val) throw(INTERP_KERNEL::Exception);
2462     double getValue() const throw(INTERP_KERNEL::Exception);
2463     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
2464     %extend
2465     {
2466       std::string __str__() const throw(INTERP_KERNEL::Exception)
2467       {
2468         return self->simpleRepr();
2469       }
2470     }
2471   };
2472
2473   class MEDFileParameterTinyInfo : public MEDFileWritable
2474   {
2475   public:
2476     void setDescription(const std::string& name);
2477     std::string getDescription() const;
2478     void setTimeUnit(const std::string& unit);
2479     std::string getTimeUnit() const;
2480   };
2481
2482   class MEDFileParameterDouble1TS : public MEDFileParameterDouble1TSWTI, public MEDFileParameterTinyInfo
2483   {
2484   public:
2485     static MEDFileParameterDouble1TS *New();
2486     static MEDFileParameterDouble1TS *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
2487     static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName) throw(INTERP_KERNEL::Exception);
2488     static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName, int dt, int it) throw(INTERP_KERNEL::Exception);
2489     virtual MEDFileParameter1TS *deepCpy() const throw(INTERP_KERNEL::Exception);
2490     virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
2491     void setName(const std::string& name) throw(INTERP_KERNEL::Exception);
2492     std::string getName() const throw(INTERP_KERNEL::Exception);
2493     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
2494     %extend
2495     {
2496       MEDFileParameterDouble1TS()
2497       {
2498         return MEDFileParameterDouble1TS::New();
2499       }
2500       
2501       MEDFileParameterDouble1TS(const std::string& fileName) throw(INTERP_KERNEL::Exception)
2502       {
2503         return MEDFileParameterDouble1TS::New(fileName);
2504       }
2505
2506       MEDFileParameterDouble1TS(const std::string& fileName, const std::string& paramName) throw(INTERP_KERNEL::Exception)
2507       {
2508         return MEDFileParameterDouble1TS::New(fileName,paramName);
2509       }
2510
2511       MEDFileParameterDouble1TS(const std::string& fileName, const std::string& paramName, int dt, int it) throw(INTERP_KERNEL::Exception)
2512       {
2513         return MEDFileParameterDouble1TS::New(fileName,paramName,dt,it);
2514       }
2515
2516       std::string __str__() const throw(INTERP_KERNEL::Exception)
2517       {
2518         return self->simpleRepr();
2519       }
2520
2521       PyObject *isEqual(const MEDFileParameter1TS *other, double eps) const throw(INTERP_KERNEL::Exception)
2522       {
2523         std::string what;
2524         bool ret0=self->isEqual(other,eps,what);
2525         PyObject *res=PyList_New(2);
2526         PyObject *ret0Py=ret0?Py_True:Py_False;
2527         Py_XINCREF(ret0Py);
2528         PyList_SetItem(res,0,ret0Py);
2529         PyList_SetItem(res,1,PyString_FromString(what.c_str()));
2530         return res;
2531       }
2532     }
2533   };
2534
2535   class MEDFileParameterMultiTS : public RefCountObject, public MEDFileParameterTinyInfo
2536   {
2537   public:
2538     static MEDFileParameterMultiTS *New();
2539     static MEDFileParameterMultiTS *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
2540     static MEDFileParameterMultiTS *New(const std::string& fileName, const std::string& paramName) throw(INTERP_KERNEL::Exception);
2541     std::string getName() const;
2542     void setName(const std::string& name);
2543     MEDFileParameterMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception);
2544     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
2545     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
2546     void appendValue(int dt, int it, double time, double val) throw(INTERP_KERNEL::Exception);
2547     double getDoubleValue(int iteration, int order) const throw(INTERP_KERNEL::Exception);
2548     int getPosOfTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
2549     int getPosGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
2550     int getNumberOfTS() const throw(INTERP_KERNEL::Exception);
2551     %extend
2552     {
2553       MEDFileParameterMultiTS()
2554       {
2555         return MEDFileParameterMultiTS::New();
2556       }
2557       
2558       MEDFileParameterMultiTS(const std::string& fileName)
2559       {
2560         return MEDFileParameterMultiTS::New(fileName);
2561       }
2562
2563       MEDFileParameterMultiTS(const std::string& fileName, const std::string& paramName)
2564       {
2565         return MEDFileParameterMultiTS::New(fileName,paramName);
2566       }
2567
2568       std::string __str__() const throw(INTERP_KERNEL::Exception)
2569       {
2570         return self->simpleRepr();
2571       }
2572       
2573       PyObject *isEqual(const MEDFileParameterMultiTS *other, double eps) const throw(INTERP_KERNEL::Exception)
2574       {
2575         std::string what;
2576         bool ret0=self->isEqual(other,eps,what);
2577         PyObject *res=PyList_New(2);
2578         PyObject *ret0Py=ret0?Py_True:Py_False;
2579         Py_XINCREF(ret0Py);
2580         PyList_SetItem(res,0,ret0Py);
2581         PyList_SetItem(res,1,PyString_FromString(what.c_str()));
2582         return res;
2583       }
2584       
2585       void eraseTimeStepIds(PyObject *ids) throw(INTERP_KERNEL::Exception)
2586       {
2587         int sw;
2588         int pos1;
2589         std::vector<int> pos2;
2590         DataArrayInt *pos3=0;
2591         DataArrayIntTuple *pos4=0;
2592         convertObjToPossibleCpp1(ids,sw,pos1,pos2,pos3,pos4);
2593         switch(sw)
2594           {
2595           case 1:
2596             {
2597               self->eraseTimeStepIds(&pos1,&pos1+1);
2598               return;
2599             }
2600           case 2:
2601             {
2602               if(pos2.empty())
2603                 return;
2604               self->eraseTimeStepIds(&pos2[0],&pos2[0]+pos2.size());
2605               return ;
2606             }
2607           case 3:
2608             {
2609               self->eraseTimeStepIds(pos3->begin(),pos3->end());
2610               return ;
2611             }
2612           default:
2613             throw INTERP_KERNEL::Exception("MEDFileParameterMultiTS::eraseTimeStepIds : unexpected input array type recognized !");
2614           }
2615       }
2616
2617       int getTimeStepId(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
2618       {
2619         if(elt0 && PyInt_Check(elt0))
2620           {//fmts[3]
2621             int pos=InterpreteNegativeInt(PyInt_AS_LONG(elt0),self->getNumberOfTS());
2622             return pos;
2623           }
2624         else if(elt0 && PyTuple_Check(elt0))
2625           {
2626             if(PyTuple_Size(elt0)==2)
2627               {
2628                 PyObject *o0=PyTuple_GetItem(elt0,0);
2629                 PyObject *o1=PyTuple_GetItem(elt0,1);
2630                 if(PyInt_Check(o0) && PyInt_Check(o1))
2631                   {//fmts(1,-1)
2632                     int iter=PyInt_AS_LONG(o0);
2633                     int order=PyInt_AS_LONG(o1);
2634                     return self->getPosOfTimeStep(iter,order);
2635                   }
2636                 else
2637                   throw INTERP_KERNEL::Exception("MEDFileParameterMultiTS::getTimeStepId : invalid input param ! input is a tuple of size 2 but two integers are expected in this tuple to request a time steps !");
2638               }
2639             else
2640               throw INTERP_KERNEL::Exception("MEDFileParameterMultiTS::getTimeStepId : invalid input param ! input is a tuple of size != 2 ! two integers are expected in this tuple to request a time steps !");
2641           }
2642         else if(elt0 && PyFloat_Check(elt0))
2643           {
2644             double val=PyFloat_AS_DOUBLE(elt0);
2645             return self->getPosGivenTime(val);
2646           }
2647         else
2648           throw INTERP_KERNEL::Exception("MEDFileParameterMultiTS::getTimeStepId : invalid input params ! expected fmts[int], fmts[int,int] or fmts[double] to request time step !");
2649       }
2650
2651       MEDFileParameter1TS *__getitem__(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
2652       {
2653         MEDFileParameter1TS *ret=self->getTimeStepAtPos(ParaMEDMEM_MEDFileParameterMultiTS_getTimeStepId(self,elt0));
2654         if(ret)
2655           ret->incrRef();
2656         return ret;
2657       }
2658
2659       std::vector<int> getTimeStepIds(PyObject *elts) const throw(INTERP_KERNEL::Exception)
2660       {
2661         if(PyList_Check(elts))
2662           {
2663             int sz=PyList_Size(elts);
2664             std::vector<int> ret(sz);
2665             for(int i=0;i<sz;i++)
2666               {
2667                 PyObject *elt=PyList_GetItem(elts,i);
2668                 ret[i]=ParaMEDMEM_MEDFileParameterMultiTS_getTimeStepId(self,elt);
2669               }
2670             return ret;
2671           }
2672         else
2673           {
2674             std::vector<int> ret(1);
2675             ret[0]=ParaMEDMEM_MEDFileParameterMultiTS_getTimeStepId(self,elts);
2676             return ret;
2677           }
2678       }
2679
2680       void __delitem__(PyObject *elts) throw(INTERP_KERNEL::Exception)
2681       {
2682         std::vector<int> idsToRemove=ParaMEDMEM_MEDFileParameterMultiTS_getTimeStepIds(self,elts);
2683         if(!idsToRemove.empty())
2684           self->eraseTimeStepIds(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
2685       }
2686       
2687       MEDFileParameter1TS *getTimeStepAtPos(int posId) const throw(INTERP_KERNEL::Exception)
2688       {
2689         MEDFileParameter1TS *ret=self->getTimeStepAtPos(posId);
2690         if(ret)
2691           ret->incrRef();
2692         return ret;
2693       }
2694
2695       PyObject *getIterations() const throw(INTERP_KERNEL::Exception)
2696       {
2697         std::vector< std::pair<int,int> > res=self->getIterations();
2698         PyObject *ret=PyList_New(res.size());
2699         int rk=0;
2700         for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
2701           {
2702             PyObject *elt=PyTuple_New(2);
2703             PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
2704             PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
2705             PyList_SetItem(ret,rk,elt);
2706           }
2707         return ret;
2708       }
2709
2710       PyObject *getTimeSteps() const throw(INTERP_KERNEL::Exception)
2711       {
2712         std::vector<double> res2;
2713         std::vector< std::pair<int,int> > res=self->getTimeSteps(res2);
2714         PyObject *ret=PyList_New(res.size());
2715         int rk=0;
2716         for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
2717           {
2718             PyObject *elt=PyTuple_New(3);
2719             PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
2720             PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
2721             PyTuple_SetItem(elt,2,SWIG_From_double(res2[rk]));
2722             PyList_SetItem(ret,rk,elt);
2723           }
2724         return ret;
2725       }
2726     }
2727   };
2728
2729   class MEDFileParameters : public RefCountObject, public MEDFileWritable
2730   {
2731   public:
2732     static MEDFileParameters *New();
2733     static MEDFileParameters *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
2734     MEDFileParameters *deepCpy() const throw(INTERP_KERNEL::Exception);
2735     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
2736     std::vector<std::string> getParamsNames() const throw(INTERP_KERNEL::Exception);
2737     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
2738     void resize(int newSize) throw(INTERP_KERNEL::Exception);
2739     void pushParam(MEDFileParameterMultiTS *param) throw(INTERP_KERNEL::Exception);
2740     void setParamAtPos(int i, MEDFileParameterMultiTS *param) throw(INTERP_KERNEL::Exception);
2741     void destroyParamAtPos(int i) throw(INTERP_KERNEL::Exception);
2742     int getPosFromParamName(const std::string& paramName) const throw(INTERP_KERNEL::Exception);
2743     int getNumberOfParams() const throw(INTERP_KERNEL::Exception);
2744     %extend
2745     {
2746       MEDFileParameters()
2747       {
2748         return MEDFileParameters::New();
2749       }
2750       
2751       MEDFileParameters(const std::string& fileName)
2752       {
2753         return MEDFileParameters::New(fileName);
2754       }
2755
2756       std::string __str__() const throw(INTERP_KERNEL::Exception)
2757       {
2758         return self->simpleRepr();
2759       }
2760
2761       MEDFileParameterMultiTS *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
2762       {
2763         if(PyInt_Check(obj))
2764           {
2765             MEDFileParameterMultiTS *ret=self->getParamAtPos(InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfParams()));
2766             if(ret)
2767               ret->incrRef();
2768             return ret;
2769           }
2770         else if(PyString_Check(obj))
2771           {
2772             MEDFileParameterMultiTS *ret=self->getParamWithName(PyString_AsString(obj));
2773             if(ret)
2774               ret->incrRef();
2775             return ret;
2776           }
2777         else
2778           throw INTERP_KERNEL::Exception("MEDFileParameters::__getitem__ : only integer or string with meshname supported !");
2779       }
2780
2781       int __len__() const throw(INTERP_KERNEL::Exception)
2782       {
2783         return self->getNumberOfParams();
2784       }
2785       
2786       MEDFileParameterMultiTS *getParamAtPos(int i) const throw(INTERP_KERNEL::Exception)
2787       {
2788         MEDFileParameterMultiTS *ret=self->getParamAtPos(i);
2789         if(ret)
2790           ret->incrRef();
2791         return ret;
2792       }
2793
2794       MEDFileParameterMultiTS *getParamWithName(const std::string& paramName) const throw(INTERP_KERNEL::Exception)
2795       {
2796         MEDFileParameterMultiTS *ret=self->getParamWithName(paramName);
2797         if(ret)
2798           ret->incrRef();
2799         return ret;
2800       }
2801       
2802       PyObject *isEqual(const MEDFileParameters *other, double eps) const throw(INTERP_KERNEL::Exception)
2803       {
2804         std::string what;
2805         bool ret0=self->isEqual(other,eps,what);
2806         PyObject *res=PyList_New(2);
2807         PyObject *ret0Py=ret0?Py_True:Py_False;
2808         Py_XINCREF(ret0Py);
2809         PyList_SetItem(res,0,ret0Py);
2810         PyList_SetItem(res,1,PyString_FromString(what.c_str()));
2811         return res;
2812       }
2813     }
2814   };
2815
2816   class MEDFileData : public RefCountObject, public MEDFileWritable
2817   {
2818   public:
2819     static MEDFileData *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
2820     static MEDFileData *New();
2821     MEDFileData *deepCpy() const throw(INTERP_KERNEL::Exception);
2822     void setFields(MEDFileFields *fields) throw(INTERP_KERNEL::Exception);
2823     void setMeshes(MEDFileMeshes *meshes) throw(INTERP_KERNEL::Exception);
2824     void setParams(MEDFileParameters *params) throw(INTERP_KERNEL::Exception);
2825     int getNumberOfFields() const throw(INTERP_KERNEL::Exception);
2826     int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
2827     int getNumberOfParams() const throw(INTERP_KERNEL::Exception);
2828     //
2829     bool changeMeshName(const std::string& oldMeshName, const std::string& newMeshName) throw(INTERP_KERNEL::Exception);
2830     bool unPolyzeMeshes() throw(INTERP_KERNEL::Exception);
2831     //
2832     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
2833     %extend
2834        {
2835          MEDFileData(const std::string& fileName) throw(INTERP_KERNEL::Exception)
2836          {
2837            return MEDFileData::New(fileName);
2838          }
2839
2840          MEDFileData()
2841          {
2842            return MEDFileData::New();
2843          }
2844
2845          std::string __str__() const throw(INTERP_KERNEL::Exception)
2846          {
2847            return self->simpleRepr();
2848          }
2849
2850          MEDFileMeshes *getMeshes() const throw(INTERP_KERNEL::Exception)
2851          {
2852            MEDFileMeshes *ret=self->getMeshes();
2853            if(ret)
2854              ret->incrRef();
2855            return ret;
2856          }
2857
2858          MEDFileParameters *getParams() const throw(INTERP_KERNEL::Exception)
2859          {
2860            MEDFileParameters *ret=self->getParams();
2861            if(ret)
2862              ret->incrRef();
2863            return ret;
2864          }
2865
2866          MEDFileFields *getFields() const throw(INTERP_KERNEL::Exception)
2867          {
2868            MEDFileFields *ret=self->getFields();
2869            if(ret)
2870              ret->incrRef();
2871            return ret;
2872          }
2873
2874          bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
2875          {
2876            std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
2877            return self->changeMeshNames(modifTab);
2878          }
2879        }
2880   };
2881
2882   class SauvReader : public RefCountObject
2883   {
2884   public:
2885     static SauvReader* New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
2886     MEDFileData * loadInMEDFileDS() throw(INTERP_KERNEL::Exception);
2887     %extend
2888     {
2889       SauvReader(const std::string& fileName) throw(INTERP_KERNEL::Exception)
2890       {
2891         return SauvReader::New(fileName);
2892       }
2893     }
2894   };
2895
2896   class SauvWriter : public RefCountObject
2897   {
2898   public:
2899     static SauvWriter * New();
2900     void setMEDFileDS(const MEDFileData* medData, unsigned meshIndex = 0) throw(INTERP_KERNEL::Exception);
2901     void write(const std::string& fileName) throw(INTERP_KERNEL::Exception);
2902     void setCpyGrpIfOnASingleFamilyStatus(bool status) throw(INTERP_KERNEL::Exception);
2903     bool getCpyGrpIfOnASingleFamilyStatus() const throw(INTERP_KERNEL::Exception);
2904     %extend
2905     {
2906       SauvWriter() throw(INTERP_KERNEL::Exception)
2907       {
2908         return SauvWriter::New();
2909       }
2910     }
2911   };
2912   
2913   ///////////////
2914
2915   class MEDFileMeshStruct;
2916
2917   class MEDFileField1TSStructItem
2918   {
2919   public:
2920     static MEDFileField1TSStructItem BuildItemFrom(const MEDFileAnyTypeField1TS *ref, const MEDFileMeshStruct *meshSt) throw(INTERP_KERNEL::Exception);
2921   };
2922
2923   class MEDFileMeshStruct : public RefCountObject
2924   {
2925   public:
2926     static MEDFileMeshStruct *New(const MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception);
2927   protected:
2928     ~MEDFileMeshStruct();
2929   };
2930   
2931   class MEDMeshMultiLev : public RefCountObject
2932   {
2933   public:
2934     virtual MEDMeshMultiLev *prepare() const throw(INTERP_KERNEL::Exception);
2935     DataArray *buildDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const throw(INTERP_KERNEL::Exception);
2936   protected:
2937     ~MEDMeshMultiLev();
2938   public:
2939     %extend
2940     {
2941       PyObject *retrieveFamilyIdsOnCells() const throw(INTERP_KERNEL::Exception)
2942       {
2943         DataArrayInt *famIds(0);
2944         bool isWithoutCopy(false);
2945         self->retrieveFamilyIdsOnCells(famIds,isWithoutCopy);
2946         PyObject *ret=PyTuple_New(2);
2947         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
2948         Py_XINCREF(ret1Py);
2949         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2950         PyTuple_SetItem(ret,1,ret1Py);
2951         return ret;
2952       }
2953
2954       PyObject *retrieveNumberIdsOnCells() const throw(INTERP_KERNEL::Exception)
2955       {
2956         DataArrayInt *numIds(0);
2957         bool isWithoutCopy(false);
2958         self->retrieveNumberIdsOnCells(numIds,isWithoutCopy);
2959         PyObject *ret=PyTuple_New(2);
2960         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
2961         Py_XINCREF(ret1Py);
2962         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2963         PyTuple_SetItem(ret,1,ret1Py);
2964         return ret;
2965       }
2966       
2967       PyObject *retrieveFamilyIdsOnNodes() const throw(INTERP_KERNEL::Exception)
2968       {
2969         DataArrayInt *famIds(0);
2970         bool isWithoutCopy(false);
2971         self->retrieveFamilyIdsOnNodes(famIds,isWithoutCopy);
2972         PyObject *ret=PyTuple_New(2);
2973         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
2974         Py_XINCREF(ret1Py);
2975         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2976         PyTuple_SetItem(ret,1,ret1Py);
2977         return ret;
2978       }
2979
2980       PyObject *retrieveNumberIdsOnNodes() const throw(INTERP_KERNEL::Exception)
2981       {
2982         DataArrayInt *numIds(0);
2983         bool isWithoutCopy(false);
2984         self->retrieveNumberIdsOnNodes(numIds,isWithoutCopy);
2985         PyObject *ret=PyTuple_New(2);
2986         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
2987         Py_XINCREF(ret1Py);
2988         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2989         PyTuple_SetItem(ret,1,ret1Py);
2990         return ret;
2991       }
2992
2993       PyObject *getGeoTypes() const throw(INTERP_KERNEL::Exception)
2994       {
2995         std::vector< INTERP_KERNEL::NormalizedCellType > result(self->getGeoTypes());
2996         std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator iL(result.begin());
2997         PyObject *res(PyList_New(result.size()));
2998         for(int i=0;iL!=result.end(); i++, iL++)
2999           PyList_SetItem(res,i,PyInt_FromLong(*iL));
3000         return res;
3001       }
3002     }
3003   };
3004
3005   class MEDUMeshMultiLev : public MEDMeshMultiLev
3006   {
3007   protected:
3008     ~MEDUMeshMultiLev();
3009   public:
3010     %extend
3011      {
3012        PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
3013        {
3014          DataArrayDouble *coords(0); DataArrayByte *types(0); DataArrayInt *cellLocations(0),*cells(0),*faceLocations(0),*faces(0);
3015          bool ncc(self->buildVTUArrays(coords,types,cellLocations,cells,faceLocations,faces));
3016          PyObject *ret0Py=ncc?Py_True:Py_False;
3017          Py_XINCREF(ret0Py);
3018          PyObject *ret=PyTuple_New(7);
3019          PyTuple_SetItem(ret,0,ret0Py);
3020          PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(coords),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
3021          PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(types),SWIGTYPE_p_ParaMEDMEM__DataArrayByte, SWIG_POINTER_OWN | 0 ));
3022          PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellLocations),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3023          PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(cells),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3024          PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(faceLocations),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3025          PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(faces),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3026          return ret;
3027        }
3028      }
3029   };
3030
3031   class MEDStructuredMeshMultiLev : public MEDMeshMultiLev
3032   {
3033   protected:
3034     ~MEDStructuredMeshMultiLev();
3035   };
3036
3037   class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
3038   {
3039   protected:
3040     ~MEDCMeshMultiLev();
3041   public:
3042     %extend
3043     {
3044       PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
3045       {
3046         bool isInternal;
3047         std::vector< DataArrayDouble * > objs(self->buildVTUArrays(isInternal));
3048         std::size_t sz(objs.size());
3049         PyObject *ret(PyTuple_New(2));
3050         PyObject *ret0=PyList_New(sz);
3051         for(std::size_t i=0;i<sz;i++)
3052           PyList_SetItem(ret0,i,SWIG_NewPointerObj(SWIG_as_voidptr(objs[i]),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
3053         PyTuple_SetItem(ret,0,ret0);
3054         PyObject *ret1Py(isInternal?Py_True:Py_False);
3055         Py_XINCREF(ret1Py);
3056         PyTuple_SetItem(ret,1,ret1Py);
3057         return ret;
3058       }
3059     }
3060   };
3061
3062   class MEDCurveLinearMeshMultiLev : public MEDStructuredMeshMultiLev
3063   {
3064   protected:
3065     ~MEDCurveLinearMeshMultiLev();
3066   public:
3067     %extend
3068     {
3069       PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
3070       {
3071         DataArrayDouble *ret0(0);
3072         std::vector<int> ret1;
3073         bool ret2;
3074         self->buildVTUArrays(ret0,ret1,ret2);
3075         std::size_t sz(ret1.size());
3076         PyObject *ret=PyTuple_New(3);
3077         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
3078         PyObject *ret1Py=PyList_New(sz);
3079         for(std::size_t i=0;i<sz;i++)
3080           PyList_SetItem(ret1Py,i,SWIG_From_int(ret1[i]));
3081         PyTuple_SetItem(ret,1,ret1Py);
3082         PyObject *ret2Py(ret2?Py_True:Py_False);
3083         Py_XINCREF(ret2Py);
3084         PyTuple_SetItem(ret,2,ret2Py);
3085         return ret;
3086       }
3087     }
3088   };
3089
3090   class MEDFileFastCellSupportComparator : public RefCountObject
3091   {
3092   public:
3093     static MEDFileFastCellSupportComparator *New(const MEDFileMeshStruct *m, const MEDFileAnyTypeFieldMultiTS *ref) throw(INTERP_KERNEL::Exception);
3094     MEDMeshMultiLev *buildFromScratchDataSetSupport(int timeStepId, const MEDFileFieldGlobsReal *globs) const throw(INTERP_KERNEL::Exception);
3095     bool isDataSetSupportEqualToThePreviousOne(int timeStepId, const MEDFileFieldGlobsReal *globs) const throw(INTERP_KERNEL::Exception);
3096     int getNumberOfTS() const throw(INTERP_KERNEL::Exception);
3097   protected:
3098     ~MEDFileFastCellSupportComparator();
3099   public:
3100     %extend
3101     {
3102       PyObject *getGeoTypesAt(int timeStepId, const MEDFileMesh *m) const throw(INTERP_KERNEL::Exception)
3103       {
3104         std::vector< INTERP_KERNEL::NormalizedCellType > result(self->getGeoTypesAt(timeStepId,m));
3105         std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator iL(result.begin());
3106         PyObject *res(PyList_New(result.size()));
3107         for(int i=0;iL!=result.end(); i++, iL++)
3108           PyList_SetItem(res,i,PyInt_FromLong(*iL));
3109         return res;
3110       }
3111     }
3112   };
3113 }