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