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