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