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