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