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