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