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