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