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