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