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