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