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