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