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