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