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