1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (CEA/DEN)
23 #define MEDCOUPLING_EXPORT
24 #define MEDLOADER_EXPORT
26 #ifdef WITH_DOCSTRINGS
27 %include "MEDLoader_doc.i"
30 %include "MEDCouplingCommon.i"
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 "MEDFileMeshReadSelector.hxx"
41 #include "MEDFileFieldOverView.hxx"
42 #include "MEDLoaderTypemaps.i"
43 #include "SauvReader.hxx"
44 #include "SauvWriter.hxx"
46 using namespace MEDCoupling;
49 #if SWIG_VERSION >= 0x010329
50 %template() std::vector<std::string>;
53 %typemap(out) MEDCoupling::MEDFileMesh*
55 $result=convertMEDFileMesh($1,$owner);
58 %typemap(out) MEDCoupling::MEDFileParameter1TS*
60 $result=convertMEDFileParameter1TS($1,$owner);
63 %typemap(out) MEDCoupling::MEDFileAnyTypeFieldMultiTS*
65 $result=convertMEDFileFieldMultiTS($1,$owner);
68 %typemap(out) MEDCoupling::MEDFileAnyTypeField1TS*
70 $result=convertMEDFileField1TS($1,$owner);
73 %typemap(out) MEDCoupling::MEDMeshMultiLev*
75 $result=convertMEDMeshMultiLev($1,$owner);
78 %newobject ReadUMeshFromFamiliesSwig;
79 %newobject ReadUMeshFromGroupsSwig;
80 %newobject MEDCoupling::ReadUMeshFromFile;
81 %newobject MEDCoupling::ReadMeshFromFile;
82 %newobject MEDCoupling::ReadField;
83 %newobject MEDCoupling::ReadFieldCell;
84 %newobject MEDCoupling::ReadFieldNode;
85 %newobject MEDCoupling::ReadFieldGauss;
86 %newobject MEDCoupling::ReadFieldGaussNE;
87 %newobject MEDCoupling::MEDFileMesh::New;
88 %newobject MEDCoupling::MEDFileMesh::createNewEmpty;
89 %newobject MEDCoupling::MEDFileMesh::deepCopy;
90 %newobject MEDCoupling::MEDFileMesh::shallowCpy;
91 %newobject MEDCoupling::MEDFileMesh::getMeshAtLevel;
92 %newobject MEDCoupling::MEDFileMesh::__getitem__;
93 %newobject MEDCoupling::MEDFileMesh::getGroupArr;
94 %newobject MEDCoupling::MEDFileMesh::getGroupsArr;
95 %newobject MEDCoupling::MEDFileMesh::getFamilyArr;
96 %newobject MEDCoupling::MEDFileMesh::getFamiliesArr;
97 %newobject MEDCoupling::MEDFileMesh::getNodeGroupArr;
98 %newobject MEDCoupling::MEDFileMesh::getNodeGroupsArr;
99 %newobject MEDCoupling::MEDFileMesh::getNodeFamilyArr;
100 %newobject MEDCoupling::MEDFileMesh::getNodeFamiliesArr;
101 %newobject MEDCoupling::MEDFileMesh::getAllFamiliesIdsReferenced;
102 %newobject MEDCoupling::MEDFileMesh::computeAllFamilyIdsInUse;
103 %newobject MEDCoupling::MEDFileMesh::getEquivalences;
104 %newobject MEDCoupling::MEDFileMesh::cartesianize;
105 %newobject MEDCoupling::MEDFileData::getJoints;
106 %newobject MEDCoupling::MEDFileStructuredMesh::getImplicitFaceMesh;
107 %newobject MEDCoupling::MEDFileUMesh::New;
108 %newobject MEDCoupling::MEDFileUMesh::LoadPartOf;
109 %newobject MEDCoupling::MEDFileUMesh::getCoords;
110 %newobject MEDCoupling::MEDFileUMesh::getPartDefAtLevel;
111 %newobject MEDCoupling::MEDFileUMesh::getGroup;
112 %newobject MEDCoupling::MEDFileUMesh::getGroups;
113 %newobject MEDCoupling::MEDFileUMesh::getFamily;
114 %newobject MEDCoupling::MEDFileUMesh::getFamilies;
115 %newobject MEDCoupling::MEDFileUMesh::getLevel0Mesh;
116 %newobject MEDCoupling::MEDFileUMesh::getLevelM1Mesh;
117 %newobject MEDCoupling::MEDFileUMesh::getLevelM2Mesh;
118 %newobject MEDCoupling::MEDFileUMesh::getLevelM3Mesh;
119 %newobject MEDCoupling::MEDFileUMesh::getDirectUndergroundSingleGeoTypeMesh;
120 %newobject MEDCoupling::MEDFileUMesh::extractFamilyFieldOnGeoType;
121 %newobject MEDCoupling::MEDFileUMesh::extractNumberFieldOnGeoType;
122 %newobject MEDCoupling::MEDFileUMesh::zipCoords;
123 %newobject MEDCoupling::MEDFileUMesh::deduceNodeSubPartFromCellSubPart;
124 %newobject MEDCoupling::MEDFileUMesh::extractPart;
125 %newobject MEDCoupling::MEDFileUMesh::buildExtrudedMesh;
126 %newobject MEDCoupling::MEDFileUMesh::linearToQuadratic;
127 %newobject MEDCoupling::MEDFileUMesh::quadraticToLinear;
128 %newobject MEDCoupling::MEDFileUMesh::symmetry3DPlane;
129 %newobject MEDCoupling::MEDFileUMesh::Aggregate;
130 %newobject MEDCoupling::MEDFileUMesh::convertToExtrudedMesh;
131 %newobject MEDCoupling::MEDFileCMesh::New;
132 %newobject MEDCoupling::MEDFileCurveLinearMesh::New;
133 %newobject MEDCoupling::MEDFileMeshMultiTS::New;
134 %newobject MEDCoupling::MEDFileMeshMultiTS::deepCopy;
135 %newobject MEDCoupling::MEDFileMeshMultiTS::getOneTimeStep;
136 %newobject MEDCoupling::MEDFileMeshes::New;
137 %newobject MEDCoupling::MEDFileMeshes::deepCopy;
138 %newobject MEDCoupling::MEDFileMeshes::getMeshAtPos;
139 %newobject MEDCoupling::MEDFileMeshes::getMeshWithName;
140 %newobject MEDCoupling::MEDFileMeshes::__getitem__;
141 %newobject MEDCoupling::MEDFileMeshes::__iter__;
143 %newobject MEDCoupling::MEDFileFields::New;
144 %newobject MEDCoupling::MEDFileFields::LoadPartOf;
145 %newobject MEDCoupling::MEDFileFields::LoadSpecificEntities;
146 %newobject MEDCoupling::MEDFileFields::deepCopy;
147 %newobject MEDCoupling::MEDFileFields::shallowCpy;
148 %newobject MEDCoupling::MEDFileFields::getFieldWithName;
149 %newobject MEDCoupling::MEDFileFields::getFieldAtPos;
150 %newobject MEDCoupling::MEDFileFields::partOfThisLyingOnSpecifiedMeshName;
151 %newobject MEDCoupling::MEDFileFields::partOfThisLyingOnSpecifiedTimeSteps;
152 %newobject MEDCoupling::MEDFileFields::partOfThisNotLyingOnSpecifiedTimeSteps;
153 %newobject MEDCoupling::MEDFileFields::__iter__;
154 %newobject MEDCoupling::MEDFileFields::extractPart;
156 %newobject MEDCoupling::MEDFileWritableStandAlone::serialize;
157 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::New;
158 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::deepCopy;
159 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::shallowCpy;
160 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::getTimeStepAtPos;
161 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::getTimeStep;
162 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::getTimeStepGivenTime;
163 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::__iter__;
164 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::extractPart;
165 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::buildNewEmpty;
166 %newobject MEDCoupling::MEDFileFieldMultiTS::New;
167 %newobject MEDCoupling::MEDFileFieldMultiTS::LoadSpecificEntities;
168 %newobject MEDCoupling::MEDFileFieldMultiTS::field;
169 %newobject MEDCoupling::MEDFileFieldMultiTS::getFieldAtLevel;
170 %newobject MEDCoupling::MEDFileFieldMultiTS::getFieldAtTopLevel;
171 %newobject MEDCoupling::MEDFileFieldMultiTS::getFieldOnMeshAtLevel;
172 %newobject MEDCoupling::MEDFileFieldMultiTS::getFieldAtLevelOld;
173 %newobject MEDCoupling::MEDFileFieldMultiTS::getUndergroundDataArray;
174 %newobject MEDCoupling::MEDFileFieldMultiTS::convertToInt;
175 %newobject MEDCoupling::MEDFileIntFieldMultiTS::New;
176 %newobject MEDCoupling::MEDFileIntFieldMultiTS::field;
177 %newobject MEDCoupling::MEDFileIntFieldMultiTS::LoadSpecificEntities;
178 %newobject MEDCoupling::MEDFileIntFieldMultiTS::getUndergroundDataArray;
179 %newobject MEDCoupling::MEDFileIntFieldMultiTS::convertToDouble;
180 %newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtLevel;
181 %newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtTopLevel;
182 %newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldOnMeshAtLevel;
183 %newobject MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtLevelOld;
185 %newobject MEDCoupling::MEDFileAnyTypeField1TS::New;
186 %newobject MEDCoupling::MEDFileAnyTypeField1TS::shallowCpy;
187 %newobject MEDCoupling::MEDFileAnyTypeField1TS::deepCopy;
188 %newobject MEDCoupling::MEDFileAnyTypeField1TS::extractPart;
189 %newobject MEDCoupling::MEDFileField1TS::New;
190 %newobject MEDCoupling::MEDFileField1TS::field;
191 %newobject MEDCoupling::MEDFileField1TS::getFieldAtLevel;
192 %newobject MEDCoupling::MEDFileField1TS::getFieldAtTopLevel;
193 %newobject MEDCoupling::MEDFileField1TS::getFieldOnMeshAtLevel;
194 %newobject MEDCoupling::MEDFileField1TS::getFieldAtLevelOld;
195 %newobject MEDCoupling::MEDFileField1TS::getUndergroundDataArray;
196 %newobject MEDCoupling::MEDFileField1TS::convertToInt;
198 %newobject MEDCoupling::MEDFileIntField1TS::New;
199 %newobject MEDCoupling::MEDFileIntField1TS::field;
200 %newobject MEDCoupling::MEDFileIntField1TS::getFieldAtLevel;
201 %newobject MEDCoupling::MEDFileIntField1TS::getFieldAtTopLevel;
202 %newobject MEDCoupling::MEDFileIntField1TS::getFieldOnMeshAtLevel;
203 %newobject MEDCoupling::MEDFileIntField1TS::getFieldAtLevelOld;
204 %newobject MEDCoupling::MEDFileIntField1TS::getUndergroundDataArray;
205 %newobject MEDCoupling::MEDFileIntField1TS::convertToDouble;
207 %newobject MEDCoupling::MEDFileData::New;
208 %newobject MEDCoupling::MEDFileData::deepCopy;
209 %newobject MEDCoupling::MEDFileData::getMeshes;
210 %newobject MEDCoupling::MEDFileData::getFields;
211 %newobject MEDCoupling::MEDFileData::getParams;
212 %newobject MEDCoupling::MEDFileData::Aggregate;
214 %newobject MEDCoupling::MEDFileParameterDouble1TS::New;
215 %newobject MEDCoupling::MEDFileParameterDouble1TS::deepCopy;
216 %newobject MEDCoupling::MEDFileParameterMultiTS::New;
217 %newobject MEDCoupling::MEDFileParameterMultiTS::deepCopy;
218 %newobject MEDCoupling::MEDFileParameterMultiTS::getTimeStepAtPos;
219 %newobject MEDCoupling::MEDFileParameterMultiTS::__getitem__;
220 %newobject MEDCoupling::MEDFileParameters::New;
221 %newobject MEDCoupling::MEDFileParameters::deepCopy;
222 %newobject MEDCoupling::MEDFileParameters::getParamAtPos;
223 %newobject MEDCoupling::MEDFileParameters::getParamWithName;
224 %newobject MEDCoupling::MEDFileParameters::__getitem__;
226 %newobject MEDCoupling::MEDFileJointCorrespondence::New;
227 %newobject MEDCoupling::MEDFileJointCorrespondence::deepCopy;
228 %newobject MEDCoupling::MEDFileJointCorrespondence::shallowCpy;
229 %newobject MEDCoupling::MEDFileJointOneStep::New;
230 %newobject MEDCoupling::MEDFileJointOneStep::deepCopy;
231 %newobject MEDCoupling::MEDFileJointOneStep::shallowCpy;
232 %newobject MEDCoupling::MEDFileJoint::New;
233 %newobject MEDCoupling::MEDFileJoint::deepCopy;
234 %newobject MEDCoupling::MEDFileJoint::shallowCpy;
235 %newobject MEDCoupling::MEDFileJoints::New;
236 %newobject MEDCoupling::MEDFileJoints::deepCopy;
237 %newobject MEDCoupling::MEDFileJoints::getJointAtPos;
238 %newobject MEDCoupling::MEDFileJoints::getJointWithName;
239 %newobject MEDCoupling::MEDFileJoints::__getitem__;
240 %newobject MEDCoupling::MEDFileEquivalences::getEquivalence;
241 %newobject MEDCoupling::MEDFileEquivalences::getEquivalenceWithName;
242 %newobject MEDCoupling::MEDFileEquivalences::appendEmptyEquivalenceWithName;
243 %newobject MEDCoupling::MEDFileEquivalencePair::initCell;
244 %newobject MEDCoupling::MEDFileEquivalencePair::initNode;
245 %newobject MEDCoupling::MEDFileEquivalencePair::getCell;
246 %newobject MEDCoupling::MEDFileEquivalencePair::getNode;
247 %newobject MEDCoupling::MEDFileEquivalenceData::getArray;
248 %newobject MEDCoupling::MEDFileEquivalenceCell::getArray;
250 %newobject MEDCoupling::SauvWriter::New;
251 %newobject MEDCoupling::SauvReader::New;
252 %newobject MEDCoupling::SauvReader::loadInMEDFileDS;
254 %newobject MEDCoupling::MEDFileMeshStruct::New;
255 %newobject MEDCoupling::MEDMeshMultiLev::prepare;
256 %newobject MEDCoupling::MEDMeshMultiLev::buildDataArray;
257 %newobject MEDCoupling::MEDMeshMultiLev::retrieveGlobalNodeIdsIfAny;
258 %newobject MEDCoupling::MEDFileFastCellSupportComparator::New;
259 %newobject MEDCoupling::MEDFileFastCellSupportComparator::buildFromScratchDataSetSupport;
261 %feature("unref") MEDFileMesh "$this->decrRef();"
262 %feature("unref") MEDFileUMesh "$this->decrRef();"
263 %feature("unref") MEDFileCMesh "$this->decrRef();"
264 %feature("unref") MEDFileMeshMultiTS "$this->decrRef();"
265 %feature("unref") MEDFileMeshes "$this->decrRef();"
266 %feature("unref") MEDFileFieldLoc "$this->decrRef();"
267 %feature("unref") MEDFileAnyTypeField1TS "$this->decrRef();"
268 %feature("unref") MEDFileField1TS "$this->decrRef();"
269 %feature("unref") MEDFileIntField1TS "$this->decrRef();"
270 %feature("unref") MEDFileAnyTypeFieldMultiTS "$this->decrRef();"
271 %feature("unref") MEDFileFieldMultiTS "$this->decrRef();"
272 %feature("unref") MEDFileIntFieldMultiTS "$this->decrRef();"
273 %feature("unref") MEDFileFields "$this->decrRef();"
274 %feature("unref") MEDFileParameter1TS "$this->decrRef();"
275 %feature("unref") MEDFileParameterDouble1TSWTI "$this->decrRef();"
276 %feature("unref") MEDFileParameterDouble1TS "$this->decrRef();"
277 %feature("unref") MEDFileParameterMultiTS "$this->decrRef();"
278 %feature("unref") MEDFileParameters "$this->decrRef();"
279 %feature("unref") MEDFileJointCorrespondence "$this->decrRef();"
280 %feature("unref") MEDFileJointOneStep "$this->decrRef();"
281 %feature("unref") MEDFileJoint "$this->decrRef();"
282 %feature("unref") MEDFileJoints "$this->decrRef();"
283 %feature("unref") MEDFileEquivalences "$this->decrRef();"
284 %feature("unref") MEDFileEquivalencePair "$this->decrRef();"
285 %feature("unref") MEDFileEquivalenceBase "$this->decrRef();"
286 %feature("unref") MEDFileEquivalenceData "$this->decrRef();"
287 %feature("unref") MEDFileEquivalenceCell "$this->decrRef();"
288 %feature("unref") MEDFileEquivalenceNode "$this->decrRef();"
289 %feature("unref") MEDFileData "$this->decrRef();"
290 %feature("unref") SauvReader "$this->decrRef();"
291 %feature("unref") SauvWriter "$this->decrRef();"
292 %feature("unref") MEDFileFastCellSupportComparator "$this->decrRef();"
293 %feature("unref") MEDMeshMultiLev "$this->decrRef();"
294 %feature("unref") MEDUMeshMultiLev "$this->decrRef();"
295 %feature("unref") MEDCMeshMultiLev "$this->decrRef();"
296 %feature("unref") MEDCurveLinearMeshMultiLev "$this->decrRef();"
297 %feature("unref") MEDFileMeshStruct "$this->decrRef();"
299 namespace MEDCoupling
302 std::string MEDFileVersionStr() throw(INTERP_KERNEL::Exception);
303 std::string MEDFileVersionOfFileStr(const std::string& fileName) throw(INTERP_KERNEL::Exception);
304 void SetEpsilonForNodeComp(double val) throw(INTERP_KERNEL::Exception);
305 void SetCompPolicyForCell(int val) throw(INTERP_KERNEL::Exception);
306 void SetTooLongStrPolicy(int val) throw(INTERP_KERNEL::Exception);
307 void CheckFileForRead(const std::string& fileName) throw(INTERP_KERNEL::Exception);
308 std::vector<std::string> GetMeshNames(const std::string& fileName) throw(INTERP_KERNEL::Exception);
309 std::vector<std::string> GetMeshNamesOnField(const std::string& fileName, const std::string& fieldName) throw(INTERP_KERNEL::Exception);
310 std::vector<std::string> GetMeshGroupsNames(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
311 std::vector<std::string> GetMeshFamiliesNames(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
312 std::vector<std::string> GetMeshFamiliesNamesOnGroup(const std::string& fileName, const std::string& meshName, const std::string& grpName) throw(INTERP_KERNEL::Exception);
313 std::vector<std::string> GetMeshGroupsNamesOnFamily(const std::string& fileName, const std::string& meshName, const std::string& famName) throw(INTERP_KERNEL::Exception);
314 std::vector<std::string> GetAllFieldNamesOnMesh(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
315 std::vector<std::string> GetAllFieldNames(const std::string& fileName) throw(INTERP_KERNEL::Exception);
316 std::vector<std::string> GetFieldNamesOnMesh(MEDCoupling::TypeOfField type, const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
317 std::vector<std::string> GetCellFieldNamesOnMesh(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
318 std::vector<std::string> GetNodeFieldNamesOnMesh(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
319 double GetTimeAttachedOnFieldIteration(const std::string& fileName, const std::string& fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
320 void AssignStaticWritePropertiesTo(MEDCoupling::MEDFileWritable& obj) throw(INTERP_KERNEL::Exception);
321 MEDCoupling::MEDCouplingMesh *ReadMeshFromFile(const std::string& fileName, const std::string& meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
322 MEDCoupling::MEDCouplingMesh *ReadMeshFromFile(const std::string& fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
323 MEDCoupling::MEDCouplingUMesh *ReadUMeshFromFile(const std::string& fileName, const std::string& meshName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
324 MEDCoupling::MEDCouplingUMesh *ReadUMeshFromFile(const std::string& fileName, int meshDimRelToMax=0) throw(INTERP_KERNEL::Exception);
325 int ReadUMeshDimFromFile(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
326 MEDCoupling::MEDCouplingFieldDouble *ReadField(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);
327 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);
328 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);
329 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);
330 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);
331 void WriteMesh(const std::string& fileName, const MEDCoupling::MEDCouplingMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
332 void WriteUMesh(const std::string& fileName, const MEDCoupling::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
333 void WriteUMeshDep(const std::string& fileName, const MEDCoupling::MEDCouplingUMesh *mesh, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
334 void WriteField(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
335 void WriteFieldDep(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f, bool writeFromScratch) throw(INTERP_KERNEL::Exception);
336 void WriteFieldUsingAlreadyWrittenMesh(const std::string& fileName, const MEDCoupling::MEDCouplingFieldDouble *f) throw(INTERP_KERNEL::Exception);
339 %rename (MEDFileVersion) MEDFileVersionSwig;
340 %rename (GetFieldIterations) GetFieldIterationsSwig;
341 %rename (GetAllFieldIterations) GetAllFieldIterationsSwig;
342 %rename (GetCellFieldIterations) GetCellFieldIterationsSwig;
343 %rename (GetNodeFieldIterations) GetNodeFieldIterationsSwig;
344 %rename (GetComponentsNamesOfField) GetComponentsNamesOfFieldSwig;
345 %rename (GetUMeshGlobalInfo) GetUMeshGlobalInfoSwig;
346 %rename (ReadFieldsOnSameMesh) ReadFieldsOnSameMeshSwig;
347 %rename (WriteUMeshesPartition) WriteUMeshesPartitionSwig;
348 %rename (WriteUMeshesPartitionDep) WriteUMeshesPartitionDepSwig;
349 %rename (WriteUMeshes) WriteUMeshesSwig;
350 %rename (GetTypesOfField) GetTypesOfFieldSwig;
351 %rename (ReadUMeshFromGroups) ReadUMeshFromGroupsSwig;
352 %rename (ReadUMeshFromFamilies) ReadUMeshFromFamiliesSwig;
356 PyObject *MEDFileVersionSwig() throw(INTERP_KERNEL::Exception)
358 int major,minor,release;
359 MEDCoupling::MEDFileVersion(major,minor,release);
360 PyObject *ret(PyTuple_New(3));
361 PyTuple_SetItem(ret,0,SWIG_From_int(major));
362 PyTuple_SetItem(ret,1,SWIG_From_int(minor));
363 PyTuple_SetItem(ret,2,SWIG_From_int(release));
367 PyObject *GetFieldIterationsSwig(MEDCoupling::TypeOfField type, const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
369 std::vector< std::pair<int,int> > res=MEDCoupling::GetFieldIterations(type,fileName,meshName,fieldName);
370 PyObject *ret=PyList_New(res.size());
372 for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
374 PyObject *elt=PyTuple_New(2);
375 PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
376 PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
377 PyList_SetItem(ret,rk,elt);
382 PyObject *GetAllFieldIterationsSwig(const std::string& fileName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
384 std::vector< std::pair< std::pair<int,int>, double> > res=MEDCoupling::GetAllFieldIterations(fileName,fieldName);
385 PyObject *ret=PyList_New(res.size());
387 for(std::vector< std::pair< std::pair<int,int>, double> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
389 PyObject *elt=PyTuple_New(3);
390 PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first.first));
391 PyTuple_SetItem(elt,1,SWIG_From_int((*iter).first.second));
392 PyTuple_SetItem(elt,2,SWIG_From_double((*iter).second));
393 PyList_SetItem(ret,rk,elt);
398 PyObject *GetCellFieldIterationsSwig(const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
400 std::vector< std::pair<int,int> > res=MEDCoupling::GetCellFieldIterations(fileName,meshName,fieldName);
401 PyObject *ret=PyList_New(res.size());
403 for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
405 PyObject *elt=PyTuple_New(2);
406 PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
407 PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
408 PyList_SetItem(ret,rk,elt);
413 PyObject *GetNodeFieldIterationsSwig(const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
415 std::vector< std::pair<int,int> > res=MEDCoupling::GetNodeFieldIterations(fileName,meshName,fieldName);
416 PyObject *ret=PyList_New(res.size());
418 for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
420 PyObject *elt=PyTuple_New(2);
421 PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
422 PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
423 PyList_SetItem(ret,rk,elt);
428 PyObject *GetComponentsNamesOfFieldSwig(const std::string& fileName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
430 std::vector< std::pair<std::string,std::string> > res=MEDCoupling::GetComponentsNamesOfField(fileName,fieldName);
431 PyObject *ret=PyList_New(res.size());
433 for(std::vector< std::pair<std::string,std::string> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
435 PyObject *elt=PyTuple_New(2);
436 PyTuple_SetItem(elt,0,PyString_FromString((*iter).first.c_str()));
437 PyTuple_SetItem(elt,1,PyString_FromString((*iter).second.c_str()));
438 PyList_SetItem(ret,rk,elt);
443 PyObject *GetUMeshGlobalInfoSwig(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception)
445 int meshDim,spaceDim,numberOfNodes;
446 std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > res=MEDCoupling::GetUMeshGlobalInfo(fileName,meshName,meshDim,spaceDim,numberOfNodes);
447 PyObject *ret=PyTuple_New(4);
448 PyObject *elt0=PyList_New(res.size());
450 for(std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > >::const_iterator it=res.begin();it!=res.end();it++,i++)
452 const std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> >&obj2=(*it);
454 PyObject *elt1=PyList_New(obj2.size());
455 for(std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> >::const_iterator it2=obj2.begin();it2!=obj2.end();it2++,j++)
457 PyObject *elt2=PyTuple_New(2);
458 PyTuple_SetItem(elt2,0,SWIG_From_int((int)(*it2).first));
459 PyTuple_SetItem(elt2,1,SWIG_From_int((*it2).second));
460 PyList_SetItem(elt1,j,elt2);
462 PyList_SetItem(elt0,i,elt1);
464 PyTuple_SetItem(ret,0,elt0);
465 PyTuple_SetItem(ret,1,SWIG_From_int(meshDim));
466 PyTuple_SetItem(ret,2,SWIG_From_int(spaceDim));
467 PyTuple_SetItem(ret,3,SWIG_From_int(numberOfNodes));
471 PyObject *ReadFieldsOnSameMeshSwig(MEDCoupling::TypeOfField type, const std::string& fileName, const std::string& meshName, int meshDimRelToMax,
472 const std::string& fieldName, PyObject *liIts) throw(INTERP_KERNEL::Exception)
474 std::vector<std::pair<int,int> > its=convertTimePairIdsFromPy(liIts);
475 std::vector<MEDCoupling::MEDCouplingFieldDouble *> res=MEDCoupling::ReadFieldsOnSameMesh(type,fileName,meshName,meshDimRelToMax,fieldName,its);
476 return convertFieldDoubleVecToPy(res);
479 void WriteUMeshesPartitionSwig(const std::string& fileName, const std::string& meshName, PyObject *li, bool writeFromScratch) throw(INTERP_KERNEL::Exception)
481 std::vector<const MEDCoupling::MEDCouplingUMesh *> v;
482 convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",v);
483 MEDCoupling::WriteUMeshesPartition(fileName,meshName,v,writeFromScratch);
486 void WriteUMeshesPartitionDepSwig(const std::string& fileName, const std::string& meshName, PyObject *li, bool writeFromScratch) throw(INTERP_KERNEL::Exception)
488 std::vector<const MEDCoupling::MEDCouplingUMesh *> v;
489 convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",v);
490 MEDCoupling::WriteUMeshesPartitionDep(fileName,meshName,v,writeFromScratch);
493 void WriteUMeshesSwig(const std::string& fileName, PyObject *li, bool writeFromScratch) throw(INTERP_KERNEL::Exception)
495 std::vector<const MEDCoupling::MEDCouplingUMesh *> v;
496 convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",v);
497 MEDCoupling::WriteUMeshes(fileName,v,writeFromScratch);
500 PyObject *GetTypesOfFieldSwig(const std::string& fileName, const std::string& meshName, const std::string& fieldName) throw(INTERP_KERNEL::Exception)
502 std::vector< MEDCoupling::TypeOfField > v=MEDCoupling::GetTypesOfField(fileName,meshName,fieldName);
504 PyObject *ret=PyList_New(size);
505 for(int i=0;i<size;i++)
506 PyList_SetItem(ret,i,PyInt_FromLong((int)v[i]));
510 MEDCoupling::MEDCouplingUMesh *ReadUMeshFromGroupsSwig(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, PyObject *li) throw(INTERP_KERNEL::Exception)
512 std::vector<std::string> grps;
513 converPyListToVecString(li,grps);
514 return MEDCoupling::ReadUMeshFromGroups(fileName,meshName,meshDimRelToMax,grps);
517 MEDCoupling::MEDCouplingUMesh *ReadUMeshFromFamiliesSwig(const std::string& fileName, const std::string& meshName, int meshDimRelToMax, PyObject *li) throw(INTERP_KERNEL::Exception)
519 std::vector<std::string> fams;
520 converPyListToVecString(li,fams);
521 return MEDCoupling::ReadUMeshFromFamilies(fileName,meshName,meshDimRelToMax,fams);
525 namespace MEDCoupling
527 class MEDFileWritable
530 void copyOptionsFrom(const MEDFileWritable& other) const;
531 int getTooLongStrPolicy() const throw(INTERP_KERNEL::Exception);
532 void setTooLongStrPolicy(int newVal) throw(INTERP_KERNEL::Exception);
533 int getZipConnPolicy() throw(INTERP_KERNEL::Exception);
534 void setZipConnPolicy(int newVal) throw(INTERP_KERNEL::Exception);
537 class MEDFileWritableStandAlone : public MEDFileWritable
540 void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
541 void write30(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
544 DataArrayByte *serialize() const throw(INTERP_KERNEL::Exception)
546 MCAuto<DataArrayByte> ret(self->serialize());
550 PyObject *__getstate__() throw(INTERP_KERNEL::Exception)
552 PyObject *ret(PyList_New(0));
556 void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
560 PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
563 PyObject *ret(PyTuple_New(1));
564 PyObject *ret0(PyDict_New());
565 DataArrayByte *retCpp(MEDCoupling_MEDFileWritableStandAlone_serialize(self));
566 PyObject *numpyArryObj=SWIG_NewPointerObj(SWIG_as_voidptr(retCpp),SWIGTYPE_p_MEDCoupling__DataArrayByte, SWIG_POINTER_OWN | 0 );
567 {// create a dict to discriminite in __new__ if __init__ should be called. Not beautiful but not idea ...
568 PyObject *tmp1(PyInt_FromLong(0));
569 PyDict_SetItem(ret0,tmp1,numpyArryObj); Py_DECREF(tmp1); Py_DECREF(numpyArryObj);
570 PyTuple_SetItem(ret,0,ret0);
574 throw INTERP_KERNEL::Exception("PyWrap of MEDFileData.__getnewargs__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !");
580 class MEDFileMeshReadSelector
583 MEDFileMeshReadSelector();
584 MEDFileMeshReadSelector(unsigned int code);
585 unsigned int getCode() const;
586 void setCode(unsigned int newCode);
587 bool isCellFamilyFieldReading() const;
588 bool isNodeFamilyFieldReading() const;
589 bool isCellNameFieldReading() const;
590 bool isNodeNameFieldReading() const;
591 bool isCellNumFieldReading() const;
592 bool isNodeNumFieldReading() const;
593 void setCellFamilyFieldReading(bool b);
594 void setNodeFamilyFieldReading(bool b);
595 void setCellNameFieldReading(bool b);
596 void setNodeNameFieldReading(bool b);
597 void setCellNumFieldReading(bool b);
598 void setNodeNumFieldReading(bool b);
601 std::string __str__() const throw(INTERP_KERNEL::Exception)
603 std::ostringstream oss;
608 std::string __repr__() const throw(INTERP_KERNEL::Exception)
610 std::ostringstream oss; oss << "MEDFileMeshReadSelector C++ instance at " << self << " (with code=" << self->getCode() << ").";
616 class MEDFileJointCorrespondence : public RefCountObject, public MEDFileWritable
619 static MEDFileJointCorrespondence *New() throw(INTERP_KERNEL::Exception);
620 static MEDFileJointCorrespondence *New(DataArrayInt* correspondence) // nodes
621 throw(INTERP_KERNEL::Exception);
622 static MEDFileJointCorrespondence *New(DataArrayInt* correspondence, // cells
623 INTERP_KERNEL::NormalizedCellType loc_geo_type,
624 INTERP_KERNEL::NormalizedCellType rem_geo_type)
625 throw(INTERP_KERNEL::Exception);
626 std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
627 MEDFileJointCorrespondence *deepCopy() const;
628 MEDFileJointCorrespondence *shallowCpy() const;
629 void setIsNodal(bool isNodal);
630 bool getIsNodal() const;
631 bool isEqual(const MEDFileJointCorrespondence *other) const;
632 void setLocalGeometryType(INTERP_KERNEL::NormalizedCellType type);
633 INTERP_KERNEL::NormalizedCellType getLocalGeometryType() const;
634 void setRemoteGeometryType(INTERP_KERNEL::NormalizedCellType type);
635 INTERP_KERNEL::NormalizedCellType getRemoteGeometryType() const;
636 void setCorrespondence(DataArrayInt *corr) throw(INTERP_KERNEL::Exception);
637 const DataArrayInt *getCorrespondence() const throw(INTERP_KERNEL::Exception);
638 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);
639 std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
642 MEDFileJointCorrespondence()
644 return MEDFileJointCorrespondence::New();
646 MEDFileJointCorrespondence(DataArrayInt* correspondence) throw(INTERP_KERNEL::Exception)
648 return MEDFileJointCorrespondence::New(correspondence);
650 MEDFileJointCorrespondence(DataArrayInt* correspondence, // cells
651 INTERP_KERNEL::NormalizedCellType loc_geo_type,
652 INTERP_KERNEL::NormalizedCellType rem_geo_type) throw(INTERP_KERNEL::Exception)
654 return MEDFileJointCorrespondence::New(correspondence, loc_geo_type, rem_geo_type);
657 std::string __str__() const throw(INTERP_KERNEL::Exception)
659 return self->simpleRepr();
664 class MEDFileJointOneStep : public RefCountObject, public MEDFileWritable
667 static MEDFileJointOneStep *New(int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception);
668 static MEDFileJointOneStep *New(const std::string& fileName, const std::string& mName, const std::string& jointName, int number=1) throw(INTERP_KERNEL::Exception);
669 MEDFileJointOneStep *deepCopy() const;
670 MEDFileJointOneStep *shallowCpy() const;
671 bool isEqual(const MEDFileJointOneStep *other) const;
672 void setOrder(int order);
673 int getOrder() const;
674 void setIteration(int it);
675 int getIteration() const;
676 void pushCorrespondence(MEDFileJointCorrespondence* correspondence);
677 int getNumberOfCorrespondences() const;
678 MEDFileJointCorrespondence *getCorrespondenceAtPos(int i) const;
679 void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName) const throw(INTERP_KERNEL::Exception);
680 std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
683 MEDFileJointOneStep()
685 return MEDFileJointOneStep::New();
688 MEDFileJointOneStep(const std::string& fileName, const std::string& mName, const std::string& jointName, int number) throw(INTERP_KERNEL::Exception)
690 return MEDFileJointOneStep::New(fileName,mName,jointName,number);
693 std::string __str__() const throw(INTERP_KERNEL::Exception)
695 return self->simpleRepr();
700 class MEDFileJoint : public RefCountObject, public MEDFileWritableStandAlone
703 static MEDFileJoint *New() throw(INTERP_KERNEL::Exception);
704 static MEDFileJoint *New(const std::string& fileName, const std::string& mName, int num) throw(INTERP_KERNEL::Exception);
705 static MEDFileJoint *New(const std::string& jointName, const std::string& locMeshName, const std::string& remoteMeshName, int remoteMeshNum ) throw(INTERP_KERNEL::Exception);
706 MEDFileJoint *deepCopy() const;
707 MEDFileJoint *shallowCpy() const;
708 bool isEqual(const MEDFileJoint *other) const;
709 void setLocalMeshName(const std::string& name);
710 std::string getLocalMeshName() const;
711 void setRemoteMeshName(const std::string& name);
712 std::string getRemoteMeshName() const;
713 void setDescription(const std::string& name);
714 std::string getDescription() const;
715 void setJointName(const std::string& name);
716 std::string getJointName() const;
717 bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
718 void setDomainNumber(const int& number);
719 int getDomainNumber() const;
720 void pushStep(MEDFileJointOneStep* step);
721 int getNumberOfSteps() const;
722 MEDFileJointOneStep *getStepAtPos(int i) const;
723 std::string simpleRepr() const;
728 return MEDFileJoint::New();
731 MEDFileJoint(const std::string& fileName, const std::string& mName, int num) throw(INTERP_KERNEL::Exception)
733 return MEDFileJoint::New(fileName,mName,num);
736 std::string __str__() const throw(INTERP_KERNEL::Exception)
738 return self->simpleRepr();
743 class MEDFileJoints : public RefCountObject, public MEDFileWritableStandAlone
746 static MEDFileJoints *New() throw(INTERP_KERNEL::Exception);
747 static MEDFileJoints *New(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
748 MEDFileJoints *deepCopy() const;
749 std::string simpleRepr() const;
750 std::string getMeshName() const;
751 int getNumberOfJoints() const;
752 std::vector<std::string> getJointsNames() const;
753 bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
754 void resize(int newSize) throw(INTERP_KERNEL::Exception);
755 void pushJoint(MEDFileJoint *joint);
756 void setJointAtPos(int i, MEDFileJoint *joint) throw(INTERP_KERNEL::Exception);
757 void destroyJointAtPos(int i) throw(INTERP_KERNEL::Exception);
762 return MEDFileJoints::New();
765 MEDFileJoints(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception)
767 return MEDFileJoints::New(fileName,meshName);
770 std::string __str__() const throw(INTERP_KERNEL::Exception)
772 return self->simpleRepr();
775 MEDFileJoint *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
779 MEDFileJoint *ret=self->getJointAtPos(InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfJoints()));
784 else if(PyString_Check(obj))
786 MEDFileJoint *ret=self->getJointWithName(PyString_AsString(obj));
792 throw INTERP_KERNEL::Exception("MEDFileJoints::__getitem__ : only integer or string with meshname supported !");
795 int __len__() const throw(INTERP_KERNEL::Exception)
797 return self->getNumberOfJoints();
800 MEDFileJoint *getJointAtPos(int i) const throw(INTERP_KERNEL::Exception)
802 MEDFileJoint *ret=self->getJointAtPos(i);
808 MEDFileJoint *getJointWithName(const std::string& paramName) const throw(INTERP_KERNEL::Exception)
810 MEDFileJoint *ret=self->getJointWithName(paramName);
818 class MEDFileEquivalenceBase : public RefCountObject, public MEDFileWritableStandAlone
821 MEDFileEquivalenceBase();
824 class MEDFileEquivalenceData : public MEDFileEquivalenceBase
827 MEDFileEquivalenceData();
829 void setArray(DataArrayInt *data);
832 DataArrayInt *getArray()
834 DataArrayInt *ret(self->getArray());
835 if(ret) ret->incrRef();
841 class MEDFileEquivalenceNode : public MEDFileEquivalenceData
844 MEDFileEquivalenceNode();
847 class MEDFileEquivalenceCell : public MEDFileEquivalenceBase
850 MEDFileEquivalenceCell();
853 std::size_t size() const;
854 void setArray(int meshDimRelToMax, DataArrayInt *da) throw(INTERP_KERNEL::Exception);
855 void setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da) throw(INTERP_KERNEL::Exception);
858 DataArrayInt *getArray(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
860 DataArrayInt *ret(self->getArray(type));
861 if(ret) ret->incrRef();
865 PyObject *getTypes() const throw(INTERP_KERNEL::Exception)
867 std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getTypes());
868 std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
869 PyObject *res=PyList_New(result.size());
870 for(int i=0;iL!=result.end(); i++, iL++)
871 PyList_SetItem(res,i,PyInt_FromLong(*iL));
877 class MEDFileEquivalencePair : public RefCountObject, public MEDFileWritableStandAlone
880 MEDFileEquivalencePair();
882 std::string getName() const;
883 void setName(const std::string& name);
884 std::string getDescription() const;
885 void setDescription(const std::string& descr);
886 void setArray(int meshDimRelToMaxExt, DataArrayInt *da);;
889 MEDFileEquivalenceCell *initCell()
891 MEDFileEquivalenceCell *ret(self->initCell());
892 if(ret) ret->incrRef();
896 MEDFileEquivalenceNode *initNode()
898 MEDFileEquivalenceNode *ret(self->initNode());
899 if(ret) ret->incrRef();
903 MEDFileEquivalenceCell *getCell()
905 MEDFileEquivalenceCell *ret(self->getCell());
906 if(ret) ret->incrRef();
910 MEDFileEquivalenceNode *getNode()
912 MEDFileEquivalenceNode *ret(self->getNode());
913 if(ret) ret->incrRef();
919 class MEDFileEquivalences : public RefCountObject, public MEDFileWritableStandAlone
922 MEDFileEquivalences();
925 std::vector<std::string> getEquivalenceNames() const throw(INTERP_KERNEL::Exception);
926 void killEquivalenceWithName(const std::string& name) throw(INTERP_KERNEL::Exception);
927 void killEquivalenceAt(int i) throw(INTERP_KERNEL::Exception);
931 MEDFileEquivalencePair *getEquivalence(int i) throw(INTERP_KERNEL::Exception)
933 MEDFileEquivalencePair *ret(self->getEquivalence(i));
934 if(ret) ret->incrRef();
937 MEDFileEquivalencePair *getEquivalenceWithName(const std::string& name) throw(INTERP_KERNEL::Exception)
939 MEDFileEquivalencePair *ret(self->getEquivalenceWithName(name));
940 if(ret) ret->incrRef();
944 MEDFileEquivalencePair *appendEmptyEquivalenceWithName(const std::string& name) throw(INTERP_KERNEL::Exception)
946 MEDFileEquivalencePair *ret(self->appendEmptyEquivalenceWithName(name));
947 if(ret) ret->incrRef();
953 class MEDFileMesh : public RefCountObject, public MEDFileWritableStandAlone
956 static MEDFileMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
957 static MEDFileMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
958 static MEDFileMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
959 virtual MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception);
960 virtual MEDFileMesh *deepCopy() const throw(INTERP_KERNEL::Exception);
961 virtual MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception);
962 virtual void clearNonDiscrAttributes() const throw(INTERP_KERNEL::Exception);
963 void setName(const std::string& name);
964 std::string getName();
965 std::string getUnivName() const;
966 bool getUnivNameWrStatus() const;
967 void setUnivNameWrStatus(bool newStatus);
968 void setDescription(const std::string& name);
969 std::string getDescription() const;
970 void setOrder(int order);
971 int getOrder() const;
972 void setIteration(int it);
974 void setTimeValue(double time);
975 void setTime(int dt, int it, double time);
976 double getTimeValue() const;
977 void setTimeUnit(const std::string& unit);
978 std::string getTimeUnit() const;
979 void setAxisType(MEDCouplingAxisType at);
980 MEDCouplingAxisType getAxisType() const;
981 virtual int getNumberOfNodes() const throw(INTERP_KERNEL::Exception);
982 virtual int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception);
983 virtual bool hasImplicitPart() const throw(INTERP_KERNEL::Exception);
984 virtual int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
985 virtual void releaseImplicitPartIfAny() const throw(INTERP_KERNEL::Exception);
986 virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const throw(INTERP_KERNEL::Exception);
987 virtual std::vector<int> getFamArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
988 virtual std::vector<int> getNumArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
989 virtual std::vector<int> getNameArrNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
990 virtual std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception);
991 virtual MEDFileMesh *cartesianize() const throw(INTERP_KERNEL::Exception);
992 std::vector<int> getNonEmptyLevels() const throw(INTERP_KERNEL::Exception);
993 std::vector<int> getNonEmptyLevelsExt() const throw(INTERP_KERNEL::Exception);
994 int getSizeAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception);
996 bool existsGroup(const std::string& groupName) const throw(INTERP_KERNEL::Exception);
997 bool existsFamily(int famId) const throw(INTERP_KERNEL::Exception);
998 bool existsFamily(const std::string& familyName) const throw(INTERP_KERNEL::Exception);
999 void setFamilyId(const std::string& familyName, int id) throw(INTERP_KERNEL::Exception);
1000 void setFamilyIdUnique(const std::string& familyName, int id) throw(INTERP_KERNEL::Exception);
1001 void addFamily(const std::string& familyName, int id) throw(INTERP_KERNEL::Exception);
1002 void addFamilyOnGrp(const std::string& grpName, const std::string& famName) throw(INTERP_KERNEL::Exception);
1003 virtual void createGroupOnAll(int meshDimRelToMaxExt, const std::string& groupName) throw(INTERP_KERNEL::Exception);
1004 virtual bool keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
1005 void copyFamGrpMapsFrom(const MEDFileMesh& other) throw(INTERP_KERNEL::Exception);
1006 void clearGrpMap() throw(INTERP_KERNEL::Exception);
1007 void clearFamMap() throw(INTERP_KERNEL::Exception);
1008 void clearFamGrpMaps() throw(INTERP_KERNEL::Exception);
1009 const std::map<std::string,int>& getFamilyInfo() const throw(INTERP_KERNEL::Exception);
1010 const std::map<std::string, std::vector<std::string> >& getGroupInfo() const throw(INTERP_KERNEL::Exception);
1011 std::vector<std::string> getFamiliesOnGroup(const std::string& name) const throw(INTERP_KERNEL::Exception);
1012 std::vector<std::string> getFamiliesOnGroups(const std::vector<std::string>& grps) const throw(INTERP_KERNEL::Exception);
1013 std::vector<int> getFamiliesIdsOnGroup(const std::string& name) const throw(INTERP_KERNEL::Exception);
1014 void setFamiliesOnGroup(const std::string& name, const std::vector<std::string>& fams) throw(INTERP_KERNEL::Exception);
1015 void setFamiliesIdsOnGroup(const std::string& name, const std::vector<int>& famIds) throw(INTERP_KERNEL::Exception);
1016 std::vector<std::string> getGroupsOnFamily(const std::string& name) const throw(INTERP_KERNEL::Exception);
1017 void setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps) throw(INTERP_KERNEL::Exception);
1018 std::vector<std::string> getGroupsNames() const throw(INTERP_KERNEL::Exception);
1019 std::vector<std::string> getFamiliesNames() const throw(INTERP_KERNEL::Exception);
1020 std::vector<std::string> getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception);
1021 std::vector<int> getGrpNonEmptyLevelsExt(const std::string& grp) const throw(INTERP_KERNEL::Exception);
1022 std::vector<int> getGrpNonEmptyLevels(const std::string& grp) const throw(INTERP_KERNEL::Exception);
1023 std::vector<int> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const throw(INTERP_KERNEL::Exception);
1024 std::vector<int> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const throw(INTERP_KERNEL::Exception);
1025 std::vector<int> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const throw(INTERP_KERNEL::Exception);
1026 std::vector<int> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const throw(INTERP_KERNEL::Exception);
1027 std::vector<int> getFamNonEmptyLevels(const std::string& fam) const throw(INTERP_KERNEL::Exception);
1028 std::vector<int> getFamNonEmptyLevelsExt(const std::string& fam) const throw(INTERP_KERNEL::Exception);
1029 std::vector<std::string> getFamiliesNamesWithFilePointOfView() const throw(INTERP_KERNEL::Exception);
1030 static std::string GetMagicFamilyStr();
1031 void assignFamilyNameWithGroupName() throw(INTERP_KERNEL::Exception);
1032 std::vector<std::string> removeEmptyGroups() throw(INTERP_KERNEL::Exception);
1033 void removeGroup(const std::string& name) throw(INTERP_KERNEL::Exception);
1034 void removeFamily(const std::string& name) throw(INTERP_KERNEL::Exception);
1035 std::vector<std::string> removeOrphanGroups() throw(INTERP_KERNEL::Exception);
1036 std::vector<std::string> removeOrphanFamilies() throw(INTERP_KERNEL::Exception);
1037 void removeFamiliesReferedByNoGroups() throw(INTERP_KERNEL::Exception);
1038 void rearrangeFamilies() throw(INTERP_KERNEL::Exception);
1039 void checkOrphanFamilyZero() const throw(INTERP_KERNEL::Exception);
1040 void changeGroupName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
1041 void changeFamilyName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
1042 void changeFamilyId(int oldId, int newId) throw(INTERP_KERNEL::Exception);
1043 void changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames) throw(INTERP_KERNEL::Exception);
1044 void setFamilyInfo(const std::map<std::string,int>& info);
1045 void setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
1046 int getFamilyId(const std::string& name) const throw(INTERP_KERNEL::Exception);
1047 int getMaxAbsFamilyId() const throw(INTERP_KERNEL::Exception);
1048 int getMaxFamilyId() const throw(INTERP_KERNEL::Exception);
1049 int getMinFamilyId() const throw(INTERP_KERNEL::Exception);
1050 int getTheMaxAbsFamilyId() const throw(INTERP_KERNEL::Exception);
1051 int getTheMaxFamilyId() const throw(INTERP_KERNEL::Exception);
1052 int getTheMinFamilyId() const throw(INTERP_KERNEL::Exception);
1053 virtual int getMaxAbsFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
1054 virtual int getMaxFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
1055 virtual int getMinFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
1056 DataArrayInt *getAllFamiliesIdsReferenced() const throw(INTERP_KERNEL::Exception);
1057 DataArrayInt *computeAllFamilyIdsInUse() const throw(INTERP_KERNEL::Exception);
1058 std::vector<int> getFamiliesIds(const std::vector<std::string>& famNames) const throw(INTERP_KERNEL::Exception);
1059 std::string getFamilyNameGivenId(int id) const throw(INTERP_KERNEL::Exception);
1060 bool ensureDifferentFamIdsPerLevel() throw(INTERP_KERNEL::Exception);
1061 void normalizeFamIdsTrio() throw(INTERP_KERNEL::Exception);
1062 void normalizeFamIdsMEDFile() throw(INTERP_KERNEL::Exception);
1063 virtual int getMeshDimension() const throw(INTERP_KERNEL::Exception);
1064 virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
1065 virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
1067 virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception);
1068 virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr) throw(INTERP_KERNEL::Exception);
1069 virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr) throw(INTERP_KERNEL::Exception);
1070 virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr) throw(INTERP_KERNEL::Exception);
1071 virtual void addNodeGroup(const DataArrayInt *ids) throw(INTERP_KERNEL::Exception);
1072 virtual void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids) throw(INTERP_KERNEL::Exception);
1073 virtual DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
1074 virtual DataArrayInt *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
1075 virtual DataArrayInt *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const throw(INTERP_KERNEL::Exception);
1076 virtual DataArrayInt *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const throw(INTERP_KERNEL::Exception);
1077 virtual DataArrayInt *getNodeGroupArr(const std::string& grp, bool renum=false) const throw(INTERP_KERNEL::Exception);
1078 virtual DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
1079 virtual DataArrayInt *getNodeFamilyArr(const std::string& fam, bool renum=false) const throw(INTERP_KERNEL::Exception);
1080 virtual DataArrayInt *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
1081 int getNumberOfJoints();
1082 MEDFileJoints *getJoints();
1083 void setJoints( MEDFileJoints* joints );
1084 void initializeEquivalences();
1085 void killEquivalences();
1088 std::string __str__() const throw(INTERP_KERNEL::Exception)
1090 return self->simpleRepr();
1093 MEDCouplingMesh *__getitem__(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
1095 return self->getMeshAtLevel(meshDimRelToMaxExt,false);
1098 PyObject *getTime() throw(INTERP_KERNEL::Exception)
1101 double tmp0=self->getTime(tmp1,tmp2);
1102 PyObject *res = PyList_New(3);
1103 PyList_SetItem(res,0,SWIG_From_int(tmp1));
1104 PyList_SetItem(res,1,SWIG_From_int(tmp2));
1105 PyList_SetItem(res,2,SWIG_From_double(tmp0));
1109 virtual PyObject *isEqual(const MEDFileMesh *other, double eps) const throw(INTERP_KERNEL::Exception)
1112 bool ret0=self->isEqual(other,eps,what);
1113 PyObject *res=PyList_New(2);
1114 PyObject *ret0Py=ret0?Py_True:Py_False;
1116 PyList_SetItem(res,0,ret0Py);
1117 PyList_SetItem(res,1,PyString_FromString(what.c_str()));
1121 void setGroupsAtLevel(int meshDimRelToMaxExt, PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
1123 std::vector<const DataArrayInt *> grps;
1124 convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",grps);
1125 self->setGroupsAtLevel(meshDimRelToMaxExt,grps,renum);
1128 PyObject *areFamsEqual(const MEDFileMesh *other) const throw(INTERP_KERNEL::Exception)
1131 bool ret0=self->areFamsEqual(other,what);
1132 PyObject *res=PyList_New(2);
1133 PyObject *ret0Py=ret0?Py_True:Py_False;
1135 PyList_SetItem(res,0,ret0Py);
1136 PyList_SetItem(res,1,PyString_FromString(what.c_str()));
1140 PyObject *areGrpsEqual(const MEDFileMesh *other) const throw(INTERP_KERNEL::Exception)
1143 bool ret0=self->areGrpsEqual(other,what);
1144 PyObject *res=PyList_New(2);
1145 PyObject *ret0Py=ret0?Py_True:Py_False;
1147 PyList_SetItem(res,0,ret0Py);
1148 PyList_SetItem(res,1,PyString_FromString(what.c_str()));
1152 PyObject *getAllGeoTypes() const throw(INTERP_KERNEL::Exception)
1154 std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getAllGeoTypes());
1155 std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
1156 PyObject *res=PyList_New(result.size());
1157 for(int i=0;iL!=result.end(); i++, iL++)
1158 PyList_SetItem(res,i,PyInt_FromLong(*iL));
1162 PyObject *getGeoTypesAtLevel(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception)
1164 std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getGeoTypesAtLevel(meshDimRelToMax));
1165 std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
1166 PyObject *res=PyList_New(result.size());
1167 for(int i=0;iL!=result.end(); i++, iL++)
1168 PyList_SetItem(res,i,PyInt_FromLong(*iL));
1172 PyObject *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
1174 const DataArrayInt *tmp=self->getFamilyFieldAtLevel(meshDimRelToMaxExt);
1177 return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1180 PyObject *getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt) throw(INTERP_KERNEL::Exception)
1182 const DataArrayInt *tmp=self->getOrCreateAndGetFamilyFieldAtLevel(meshDimRelToMaxExt);
1185 return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1188 PyObject *getNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
1190 const DataArrayInt *tmp=self->getNumberFieldAtLevel(meshDimRelToMaxExt);
1193 return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1196 PyObject *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
1198 const DataArrayInt *tmp=self->getRevNumberFieldAtLevel(meshDimRelToMaxExt);
1201 return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1204 PyObject *getNameFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
1206 const DataArrayAsciiChar *tmp=self->getNameFieldAtLevel(meshDimRelToMaxExt);
1209 return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayAsciiChar, SWIG_POINTER_OWN | 0 );
1212 PyObject *findOrCreateAndGiveFamilyWithId(int id, bool& created) throw(INTERP_KERNEL::Exception)
1215 std::string ret0=self->findOrCreateAndGiveFamilyWithId(id,ret1);
1216 PyObject *ret=PyTuple_New(2);
1217 PyTuple_SetItem(ret,0,PyString_FromString(ret0.c_str()));
1218 PyTuple_SetItem(ret,1,SWIG_From_bool(ret1));
1222 PyObject *unPolyze() throw(INTERP_KERNEL::Exception)
1224 DataArrayInt *ret3=0;
1225 std::vector<int> ret1,ret2;
1226 bool ret0=self->unPolyze(ret1,ret2,ret3);
1227 PyObject *ret=PyTuple_New(4);
1228 PyTuple_SetItem(ret,0,SWIG_From_bool(ret0));
1230 PyObject *retLev1_0=PyList_New((int)ret1.size()/3);
1231 for(int j=0;j<(int)ret1.size()/3;j++)
1233 PyObject *retLev2=PyList_New(3);
1234 PyList_SetItem(retLev2,0,SWIG_From_int(ret1[3*j]));
1235 PyList_SetItem(retLev2,1,SWIG_From_int(ret1[3*j+1]));
1236 PyList_SetItem(retLev2,2,SWIG_From_int(ret1[3*j+2]));
1237 PyList_SetItem(retLev1_0,j,retLev2);
1239 PyTuple_SetItem(ret,1,retLev1_0);
1241 PyObject *retLev1_1=PyList_New((int)ret2.size()/3);
1242 for(int j=0;j<(int)ret2.size()/3;j++)
1244 PyObject *retLev2=PyList_New(3);
1245 PyList_SetItem(retLev2,0,SWIG_From_int(ret2[3*j]));
1246 PyList_SetItem(retLev2,1,SWIG_From_int(ret2[3*j+1]));
1247 PyList_SetItem(retLev2,2,SWIG_From_int(ret2[3*j+2]));
1248 PyList_SetItem(retLev1_1,j,retLev2);
1250 PyTuple_SetItem(ret,2,retLev1_1);
1252 PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(ret3),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1256 MEDFileEquivalences *getEquivalences() throw(INTERP_KERNEL::Exception)
1258 MEDFileEquivalences *ret(self->getEquivalences());
1259 if(ret) ret->incrRef();
1265 class MEDFileUMesh : public MEDFileMesh
1268 static MEDFileUMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
1269 static MEDFileUMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
1270 static MEDFileUMesh *New(const MEDCouplingMappedExtrudedMesh *mem) throw(INTERP_KERNEL::Exception);
1271 static MEDFileUMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
1272 static MEDFileUMesh *New();
1273 static const char *GetSpeStr4ExtMesh();
1275 int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
1276 int getRelativeLevOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
1277 void checkConsistency() const throw(INTERP_KERNEL::Exception);
1278 void checkSMESHConsistency() const throw(INTERP_KERNEL::Exception);
1279 void clearNodeAndCellNumbers();
1281 MEDCouplingUMesh *getGroup(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const throw(INTERP_KERNEL::Exception);
1282 MEDCouplingUMesh *getGroups(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
1283 MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const throw(INTERP_KERNEL::Exception);
1284 MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
1285 DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const throw(INTERP_KERNEL::Exception);
1286 MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
1287 MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
1288 MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
1289 MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const throw(INTERP_KERNEL::Exception);
1290 void forceComputationOfParts() const throw(INTERP_KERNEL::Exception);
1292 void setFamilyNameAttachedOnId(int id, const std::string& newFamName) throw(INTERP_KERNEL::Exception);
1293 void setCoords(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
1294 void setCoordsForced(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
1295 void eraseGroupsAtLevel(int meshDimRelToMaxExt) throw(INTERP_KERNEL::Exception);
1296 void removeMeshAtLevel(int meshDimRelToMax) throw(INTERP_KERNEL::Exception);
1297 void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m) throw(INTERP_KERNEL::Exception);
1298 void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false) throw(INTERP_KERNEL::Exception);
1299 void optimizeFamilies() throw(INTERP_KERNEL::Exception);
1300 DataArrayInt *zipCoords() throw(INTERP_KERNEL::Exception);
1301 DataArrayInt *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
1302 DataArrayInt *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
1303 MEDFileUMesh *buildExtrudedMesh(const MEDCouplingUMesh *m1D, int policy) const throw(INTERP_KERNEL::Exception);
1304 MEDFileUMesh *linearToQuadratic(int conversionType=0, double eps=1e-12) const throw(INTERP_KERNEL::Exception);
1305 MEDFileUMesh *quadraticToLinear(double eps=1e-12) const throw(INTERP_KERNEL::Exception);
1306 MEDCouplingMappedExtrudedMesh *convertToExtrudedMesh() const throw(INTERP_KERNEL::Exception);
1309 MEDFileUMesh(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
1311 return MEDFileUMesh::New(fileName,mName,dt,it,mrs);
1314 MEDFileUMesh(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
1316 return MEDFileUMesh::New(fileName,mrs);
1319 MEDFileUMesh(const MEDCouplingMappedExtrudedMesh *mem) throw(INTERP_KERNEL::Exception)
1321 return MEDFileUMesh::New(mem);
1324 MEDFileUMesh(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
1326 return MEDFileUMesh::New(db);
1331 return MEDFileUMesh::New();
1335 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
1337 return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDFileUMesh");
1340 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)
1342 std::vector<int> typesCpp1;
1343 convertPyToNewIntArr3(types,typesCpp1);
1344 std::size_t sz(typesCpp1.size());
1345 std::vector<INTERP_KERNEL::NormalizedCellType> typesCpp2(sz);
1346 for(std::size_t ii=0;ii<sz;ii++)
1347 typesCpp2[ii]=(INTERP_KERNEL::NormalizedCellType)typesCpp1[ii];
1348 return MEDFileUMesh::LoadPartOf(fileName,mName,typesCpp2,slicPerTyp,dt,it,mrs);
1351 PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
1352 {// put an empty dict in input to say to __new__ to call __init__...
1353 PyObject *ret(PyTuple_New(1));
1354 PyObject *ret0(PyDict_New());
1355 PyTuple_SetItem(ret,0,ret0);
1359 PyObject *__getstate__() throw(INTERP_KERNEL::Exception)
1361 std::vector<double> a0;
1362 std::vector<int> a1;
1363 std::vector<std::string> a2;
1364 std::vector< MCAuto<DataArrayInt> > a3;
1365 MCAuto<DataArrayDouble> a4;
1366 self->serialize(a0,a1,a2,a3,a4);
1367 PyObject *ret(PyTuple_New(5));
1368 PyTuple_SetItem(ret,0,convertDblArrToPyList2(a0));
1369 PyTuple_SetItem(ret,1,convertIntArrToPyList2(a1));
1371 PyObject *ret2(PyList_New(sz));
1372 for(int i=0;i<sz;i++)
1373 PyList_SetItem(ret2,i,PyString_FromString(a2[i].c_str()));
1374 PyTuple_SetItem(ret,2,ret2);
1376 PyObject *ret3(PyList_New(sz));
1377 for(int i=0;i<sz;i++)
1379 DataArrayInt *elt(a3[i]);
1382 PyList_SetItem(ret3,i,SWIG_NewPointerObj(SWIG_as_voidptr(elt),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1384 PyTuple_SetItem(ret,3,ret3);
1385 DataArrayDouble *ret4(a4);
1388 PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(ret4),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
1392 void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
1394 static const char MSG[]="MEDFileUMesh.__setstate__ : expected input is a tuple of size 4 !";
1395 if(!PyTuple_Check(inp))
1396 throw INTERP_KERNEL::Exception(MSG);
1397 int sz(PyTuple_Size(inp));
1399 throw INTERP_KERNEL::Exception(MSG);
1400 std::vector<double> a0;
1401 std::vector<int> a1;
1402 std::vector<std::string> a2;
1403 std::vector< MCAuto<DataArrayInt> > a3;
1404 MCAuto<DataArrayDouble> a4;
1406 PyObject *a0py(PyTuple_GetItem(inp,0)),*a1py(PyTuple_GetItem(inp,1)),*a2py(PyTuple_GetItem(inp,2));
1408 fillArrayWithPyListDbl3(a0py,tmp,a0);
1409 convertPyToNewIntArr3(a1py,a1);
1410 fillStringVector(a2py,a2);
1412 PyObject *b0py(PyTuple_GetItem(inp,3)),*b1py(PyTuple_GetItem(inp,4));
1414 int status(SWIG_ConvertPtr(b1py,&argp,SWIGTYPE_p_MEDCoupling__DataArrayDouble,0|0));
1415 if(!SWIG_IsOK(status))
1416 throw INTERP_KERNEL::Exception(MSG);
1417 a4=reinterpret_cast<DataArrayDouble *>(argp);
1418 if((DataArrayDouble *)a4)
1421 std::vector< DataArrayInt * > a3Tmp;
1422 convertFromPyObjVectorOfObj<MEDCoupling::DataArrayInt *>(b0py,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",a3Tmp);
1423 std::size_t sz(a3Tmp.size());
1425 for(std::size_t i=0;i<sz;i++)
1429 a3Tmp[i]->incrRef();
1431 self->unserialize(a0,a1,a2,a3,a4);
1435 void __setitem__(int meshDimRelToMax, MEDCouplingPointSet *mesh) throw(INTERP_KERNEL::Exception)
1438 throw INTERP_KERNEL::Exception("MEDFileUMesh::__setitem__ : Input mesh is NULL !");
1439 MEDCouplingUMesh *m0(dynamic_cast<MEDCouplingUMesh *>(mesh));
1442 self->setMeshAtLevel(meshDimRelToMax,m0,false);
1445 MEDCoupling1GTUMesh *m1(dynamic_cast<MEDCoupling1GTUMesh *>(mesh));
1448 self->setMeshAtLevel(meshDimRelToMax,m1);
1451 throw INTERP_KERNEL::Exception("MEDFileUMesh::__setitem__ : Not recognized input mesh !");
1454 void __delitem__(int meshDimRelToMax) throw(INTERP_KERNEL::Exception)
1456 self->removeMeshAtLevel(meshDimRelToMax);
1459 MEDFileUMesh *symmetry3DPlane(PyObject *point, PyObject *normalVector) const throw(INTERP_KERNEL::Exception)
1461 const char msg[]="Python wrap of MEDFileUMesh::symmetry3DPlane : ";
1463 DataArrayDouble *a,*a2;
1464 DataArrayDoubleTuple *aa,*aa2;
1465 std::vector<double> bb,bb2;
1467 const double *centerPtr(convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,msg,1,3,true));
1468 const double *vectorPtr(convertObjToPossibleCpp5_Safe(normalVector,sw,val2,a2,aa2,bb2,msg,1,3,true));
1469 MCAuto<MEDFileUMesh> ret(self->symmetry3DPlane(centerPtr,vectorPtr));
1473 static MEDFileUMesh *Aggregate(PyObject *meshes) throw(INTERP_KERNEL::Exception)
1475 std::vector<const MEDFileUMesh *> meshesCpp;
1476 convertFromPyObjVectorOfObj<const MEDCoupling::MEDFileUMesh *>(meshes,SWIGTYPE_p_MEDCoupling__MEDFileUMesh,"MEDFileUMesh",meshesCpp);
1477 MCAuto<MEDFileUMesh> ret(MEDFileUMesh::Aggregate(meshesCpp));
1481 PyObject *getAllDistributionOfTypes() const throw(INTERP_KERNEL::Exception)
1483 std::vector< std::pair<int,int> > ret(self->getAllDistributionOfTypes());
1484 return convertVecPairIntToPy(ret);
1487 DataArrayInt *deduceNodeSubPartFromCellSubPart(PyObject *extractDef) const throw(INTERP_KERNEL::Exception)
1489 std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
1490 convertToMapIntDataArrayInt(extractDef,extractDefCpp);
1491 return self->deduceNodeSubPartFromCellSubPart(extractDefCpp);
1494 MEDFileUMesh *extractPart(PyObject *extractDef) const throw(INTERP_KERNEL::Exception)
1496 std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
1497 convertToMapIntDataArrayInt(extractDef,extractDefCpp);
1498 return self->extractPart(extractDefCpp);
1501 void setMeshes(PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
1503 std::vector<const MEDCouplingUMesh *> ms;
1504 convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",ms);
1505 self->setMeshes(ms,renum);
1508 void setGroupsFromScratch(int meshDimRelToMax, PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
1510 std::vector<const MEDCouplingUMesh *> ms;
1511 convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",ms);
1512 self->setGroupsFromScratch(meshDimRelToMax,ms,renum);
1515 void setGroupsOnSetMesh(int meshDimRelToMax, PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
1517 std::vector<const MEDCouplingUMesh *> ms;
1518 convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",ms);
1519 self->setGroupsOnSetMesh(meshDimRelToMax,ms,renum);
1522 DataArrayDouble *getCoords() const throw(INTERP_KERNEL::Exception)
1524 DataArrayDouble *ret=self->getCoords();
1530 PartDefinition *getPartDefAtLevel(int meshDimRelToMaxExt, INTERP_KERNEL::NormalizedCellType gt=INTERP_KERNEL::NORM_ERROR) const throw(INTERP_KERNEL::Exception)
1532 const PartDefinition *ret(self->getPartDefAtLevel(meshDimRelToMaxExt,gt));
1535 return const_cast<PartDefinition *>(ret);
1538 PyObject *buildInnerBoundaryAlongM1Group(const std::string& grpNameM1) throw(INTERP_KERNEL::Exception)
1540 DataArrayInt *ret0=0,*ret1=0,*ret2=0;
1541 self->buildInnerBoundaryAlongM1Group(grpNameM1,ret0,ret1,ret2);
1542 PyObject *ret=PyTuple_New(3);
1543 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1544 PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1545 PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1549 MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception)
1551 MEDCoupling1GTUMesh *ret(self->getDirectUndergroundSingleGeoTypeMesh(gt));
1557 PyObject *getDirectUndergroundSingleGeoTypeMeshes(int meshDimRelToMax) const throw(INTERP_KERNEL::Exception)
1559 std::vector<MEDCoupling1GTUMesh *> tmp(self->getDirectUndergroundSingleGeoTypeMeshes(meshDimRelToMax));
1560 std::size_t sz(tmp.size());
1561 PyObject *ret=PyList_New(sz);
1562 for(std::size_t i=0;i<sz;i++)
1566 PyList_SetItem(ret,i,convertMesh(tmp[i], SWIG_POINTER_OWN | 0 ));
1573 class MEDFileStructuredMesh : public MEDFileMesh
1578 MEDCoupling1SGTUMesh *getImplicitFaceMesh() const throw(INTERP_KERNEL::Exception)
1580 MEDCoupling1SGTUMesh *ret(self->getImplicitFaceMesh());
1588 class MEDFileCMesh : public MEDFileStructuredMesh
1591 static MEDFileCMesh *New();
1592 static MEDFileCMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
1593 static MEDFileCMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
1594 static MEDFileCMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
1595 void setMesh(MEDCouplingCMesh *m) throw(INTERP_KERNEL::Exception);
1596 int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
1601 return MEDFileCMesh::New();
1604 MEDFileCMesh(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
1606 return MEDFileCMesh::New(fileName,mrs);
1609 MEDFileCMesh(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
1611 return MEDFileCMesh::New(fileName,mName,dt,it,mrs);
1614 MEDFileCMesh(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
1616 return MEDFileCMesh::New(db);
1620 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
1622 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileCMesh");
1625 PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
1627 const MEDCouplingCMesh *tmp=self->getMesh();
1630 return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__MEDCouplingCMesh, SWIG_POINTER_OWN | 0 );
1635 class MEDFileCurveLinearMesh : public MEDFileStructuredMesh
1638 static MEDFileCurveLinearMesh *New();
1639 static MEDFileCurveLinearMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
1640 static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
1641 static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
1642 void setMesh(MEDCouplingCurveLinearMesh *m) throw(INTERP_KERNEL::Exception);
1645 MEDFileCurveLinearMesh()
1647 return MEDFileCurveLinearMesh::New();
1650 MEDFileCurveLinearMesh(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
1652 return MEDFileCurveLinearMesh::New(fileName,mrs);
1655 MEDFileCurveLinearMesh(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception)
1657 return MEDFileCurveLinearMesh::New(fileName,mName,dt,it,mrs);
1660 MEDFileCurveLinearMesh(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
1662 return MEDFileCurveLinearMesh::New(db);
1666 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
1668 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileCurveLinearMesh");
1671 PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
1673 const MEDCouplingCurveLinearMesh *tmp=self->getMesh();
1676 return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__MEDCouplingCurveLinearMesh, SWIG_POINTER_OWN | 0 );
1681 class MEDFileMeshMultiTS : public RefCountObject, public MEDFileWritableStandAlone
1684 static MEDFileMeshMultiTS *New();
1685 static MEDFileMeshMultiTS *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
1686 static MEDFileMeshMultiTS *New(const std::string& fileName, const std::string& mName) throw(INTERP_KERNEL::Exception);
1687 MEDFileMeshMultiTS *deepCopy() const throw(INTERP_KERNEL::Exception);
1688 std::string getName() const throw(INTERP_KERNEL::Exception);
1689 void setOneTimeStep(MEDFileMesh *mesh1TimeStep) throw(INTERP_KERNEL::Exception);
1690 void cartesianizeMe() throw(INTERP_KERNEL::Exception);
1693 MEDFileMeshMultiTS()
1695 return MEDFileMeshMultiTS::New();
1698 MEDFileMeshMultiTS(const std::string& fileName) throw(INTERP_KERNEL::Exception)
1700 return MEDFileMeshMultiTS::New(fileName);
1703 MEDFileMeshMultiTS(const std::string& fileName, const std::string& mName) throw(INTERP_KERNEL::Exception)
1705 return MEDFileMeshMultiTS::New(fileName,mName);
1708 MEDFileMesh *getOneTimeStep() const throw(INTERP_KERNEL::Exception)
1710 MEDFileMesh *ret=self->getOneTimeStep();
1718 class MEDFileMeshesIterator
1723 PyObject *next() throw(INTERP_KERNEL::Exception)
1725 MEDFileMesh *ret=self->nextt();
1729 return convertMEDFileMesh(ret,SWIG_POINTER_OWN | 0 );
1733 PyErr_SetString(PyExc_StopIteration,"No more data.");
1740 class MEDFileMeshes : public RefCountObject, public MEDFileWritableStandAlone
1743 static MEDFileMeshes *New();
1744 static MEDFileMeshes *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
1745 MEDFileMeshes *deepCopy() const throw(INTERP_KERNEL::Exception);
1746 int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
1747 std::vector<std::string> getMeshesNames() const throw(INTERP_KERNEL::Exception);
1749 void resize(int newSize) throw(INTERP_KERNEL::Exception);
1750 void pushMesh(MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception);
1751 void setMeshAtPos(int i, MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception);
1752 void destroyMeshAtPos(int i) throw(INTERP_KERNEL::Exception);
1753 void cartesianizeMe() throw(INTERP_KERNEL::Exception);
1758 return MEDFileMeshes::New();
1761 MEDFileMeshes(const std::string& fileName) throw(INTERP_KERNEL::Exception)
1763 return MEDFileMeshes::New(fileName);
1766 MEDFileMeshes(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
1768 return MEDFileMeshes::New(db);
1772 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
1774 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileMeshes");
1777 std::string __str__() const throw(INTERP_KERNEL::Exception)
1779 return self->simpleRepr();
1782 MEDFileMesh *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
1784 if(PyInt_Check(obj))
1786 MEDFileMesh *ret=self->getMeshAtPos(InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfMeshes()));
1791 else if(PyString_Check(obj))
1793 MEDFileMesh *ret=self->getMeshWithName(PyString_AsString(obj));
1799 throw INTERP_KERNEL::Exception("MEDFileMeshes::__getitem__ : only integer or string with meshname supported !");
1802 MEDFileMeshes *__setitem__(int obj, MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception)
1804 self->setMeshAtPos(obj,mesh);
1808 MEDFileMeshesIterator *__iter__() throw(INTERP_KERNEL::Exception)
1810 return self->iterator();
1813 int __len__() const throw(INTERP_KERNEL::Exception)
1815 return self->getNumberOfMeshes();
1818 MEDFileMesh *getMeshAtPos(int i) const throw(INTERP_KERNEL::Exception)
1820 MEDFileMesh *ret=self->getMeshAtPos(i);
1825 MEDFileMesh *getMeshWithName(const std::string& mname) const throw(INTERP_KERNEL::Exception)
1827 MEDFileMesh *ret=self->getMeshWithName(mname);
1835 class MEDFileFieldLoc : public RefCountObject
1838 std::string getName() const;
1839 int getDimension() const;
1840 int getNumberOfGaussPoints() const;
1841 int getNumberOfPointsInCells() const;
1842 const std::vector<double>& getRefCoords() const;
1843 const std::vector<double>& getGaussCoords() const;
1844 const std::vector<double>& getGaussWeights() const;
1845 bool isEqual(const MEDFileFieldLoc& other, double eps) const throw(INTERP_KERNEL::Exception);
1848 std::string __str__() const throw(INTERP_KERNEL::Exception)
1850 return self->repr();
1855 class MEDFileFieldGlobsReal
1858 void resetContent();
1859 void shallowCpyGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1860 void deepCpyGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1861 void shallowCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1862 void deepCpyOnlyUsedGlobs(const MEDFileFieldGlobsReal& other) throw(INTERP_KERNEL::Exception);
1863 void appendGlobs(const MEDFileFieldGlobsReal& other, double eps) throw(INTERP_KERNEL::Exception);
1864 void checkGlobsCoherency() const throw(INTERP_KERNEL::Exception);
1865 void checkGlobsPflsPartCoherency() const throw(INTERP_KERNEL::Exception);
1866 void checkGlobsLocsPartCoherency() const throw(INTERP_KERNEL::Exception);
1867 std::vector<std::string> getPfls() const throw(INTERP_KERNEL::Exception);
1868 std::vector<std::string> getLocs() const throw(INTERP_KERNEL::Exception);
1869 bool existsPfl(const std::string& pflName) const throw(INTERP_KERNEL::Exception);
1870 bool existsLoc(const std::string& locName) const throw(INTERP_KERNEL::Exception);
1871 std::string createNewNameOfPfl() const throw(INTERP_KERNEL::Exception);
1872 std::string createNewNameOfLoc() const throw(INTERP_KERNEL::Exception);
1873 std::vector< std::vector<int> > whichAreEqualProfiles() const throw(INTERP_KERNEL::Exception);
1874 std::vector< std::vector<int> > whichAreEqualLocs(double eps) const throw(INTERP_KERNEL::Exception);
1875 virtual std::vector<std::string> getPflsReallyUsed() const throw(INTERP_KERNEL::Exception);
1876 virtual std::vector<std::string> getLocsReallyUsed() const throw(INTERP_KERNEL::Exception);
1877 virtual std::vector<std::string> getPflsReallyUsedMulti() const throw(INTERP_KERNEL::Exception);
1878 virtual std::vector<std::string> getLocsReallyUsedMulti() const throw(INTERP_KERNEL::Exception);
1879 void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
1880 void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
1881 void changePflName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
1882 void changeLocName(const std::string& oldName, const std::string& newName) throw(INTERP_KERNEL::Exception);
1883 int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
1884 int getLocalizationId(const std::string& loc) const throw(INTERP_KERNEL::Exception);
1887 PyObject *getProfile(const std::string& pflName) const throw(INTERP_KERNEL::Exception)
1889 const DataArrayInt *ret=self->getProfile(pflName);
1892 return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1895 PyObject *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception)
1897 const DataArrayInt *ret=self->getProfileFromId(pflId);
1900 return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1903 PyObject *getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception)
1905 const MEDFileFieldLoc *loc=&self->getLocalizationFromId(locId);
1908 return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_MEDCoupling__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
1911 PyObject *getLocalization(const std::string& locName) const throw(INTERP_KERNEL::Exception)
1913 const MEDFileFieldLoc *loc=&self->getLocalization(locName);
1916 return SWIG_NewPointerObj(SWIG_as_voidptr(loc),SWIGTYPE_p_MEDCoupling__MEDFileFieldLoc, SWIG_POINTER_OWN | 0 );
1919 PyObject *zipPflsNames() throw(INTERP_KERNEL::Exception)
1921 std::vector< std::pair<std::vector<std::string>, std::string > > ret=self->zipPflsNames();
1922 return convertVecPairVecStToPy(ret);
1925 PyObject *zipLocsNames(double eps) throw(INTERP_KERNEL::Exception)
1927 std::vector< std::pair<std::vector<std::string>, std::string > > ret=self->zipLocsNames(eps);
1928 return convertVecPairVecStToPy(ret);
1931 void changePflsNames(PyObject *li) throw(INTERP_KERNEL::Exception)
1933 std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1934 self->changePflsNames(v);
1937 void changePflsRefsNamesGen(PyObject *li) throw(INTERP_KERNEL::Exception)
1939 std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1940 self->changePflsRefsNamesGen(v);
1943 void changePflsNamesInStruct(PyObject *li) throw(INTERP_KERNEL::Exception)
1945 std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1946 self->changePflsNamesInStruct(v);
1949 void changeLocsNames(PyObject *li) throw(INTERP_KERNEL::Exception)
1951 std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1952 self->changeLocsNames(v);
1955 void changeLocsRefsNamesGen(PyObject *li) throw(INTERP_KERNEL::Exception)
1957 std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1958 self->changeLocsRefsNamesGen(v);
1961 void changeLocsNamesInStruct(PyObject *li) throw(INTERP_KERNEL::Exception)
1963 std::vector< std::pair<std::vector<std::string>, std::string > > v=convertVecPairVecStFromPy(li);
1964 self->changeLocsNamesInStruct(v);
1967 std::string simpleReprGlobs() const throw(INTERP_KERNEL::Exception)
1969 std::ostringstream oss;
1970 self->simpleReprGlobs(oss);
1976 class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritableStandAlone
1979 static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1980 static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1981 static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
1982 void loadArrays() throw(INTERP_KERNEL::Exception);
1983 void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
1984 void unloadArrays() throw(INTERP_KERNEL::Exception);
1985 void unloadArraysWithoutDataLoss() throw(INTERP_KERNEL::Exception);
1986 int getDimension() const throw(INTERP_KERNEL::Exception);
1987 int getIteration() const throw(INTERP_KERNEL::Exception);
1988 int getOrder() const throw(INTERP_KERNEL::Exception);
1989 std::string getName() throw(INTERP_KERNEL::Exception);
1990 void setName(const std::string& name) throw(INTERP_KERNEL::Exception);
1991 std::string getMeshName() throw(INTERP_KERNEL::Exception);
1992 void setMeshName(const std::string& newMeshName) throw(INTERP_KERNEL::Exception);
1993 int getMeshIteration() const throw(INTERP_KERNEL::Exception);
1994 int getMeshOrder() const throw(INTERP_KERNEL::Exception);
1995 int getNumberOfComponents() const throw(INTERP_KERNEL::Exception);
1996 bool isDealingTS(int iteration, int order) const throw(INTERP_KERNEL::Exception);
1997 void setInfo(const std::vector<std::string>& infos) throw(INTERP_KERNEL::Exception);
1998 const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
1999 bool presenceOfMultiDiscPerGeoType() const throw(INTERP_KERNEL::Exception);
2000 void setTime(int iteration, int order, double val) throw(INTERP_KERNEL::Exception);
2001 virtual MEDFileAnyTypeField1TS *shallowCpy() const throw(INTERP_KERNEL::Exception);
2002 MEDFileAnyTypeField1TS *deepCopy() const throw(INTERP_KERNEL::Exception);
2003 std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
2004 void setDtUnit(const std::string& dtUnit) throw(INTERP_KERNEL::Exception);
2007 PyObject *getTime() throw(INTERP_KERNEL::Exception)
2010 double tmp0=self->getTime(tmp1,tmp2);
2011 PyObject *res = PyList_New(3);
2012 PyList_SetItem(res,0,SWIG_From_int(tmp1));
2013 PyList_SetItem(res,1,SWIG_From_int(tmp2));
2014 PyList_SetItem(res,2,SWIG_From_double(tmp0));
2018 PyObject *getDtIt() const throw(INTERP_KERNEL::Exception)
2020 std::pair<int,int> res=self->getDtIt();
2021 PyObject *elt=PyTuple_New(2);
2022 PyTuple_SetItem(elt,0,SWIG_From_int(res.first));
2023 PyTuple_SetItem(elt,1,SWIG_From_int(res.second));
2027 void setProfileNameOnLeaf(INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception)
2029 self->setProfileNameOnLeaf(0,typ,locId,newPflName,forceRenameOnGlob);
2032 void setLocNameOnLeaf(INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception)
2034 self->setLocNameOnLeaf(0,typ,locId,newLocName,forceRenameOnGlob);
2037 bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
2039 std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
2040 return self->changeMeshNames(modifTab);
2043 PyObject *getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception)
2045 std::vector<TypeOfField> ret=self->getTypesOfFieldAvailable();
2046 PyObject *ret2=PyList_New(ret.size());
2047 for(int i=0;i<(int)ret.size();i++)
2048 PyList_SetItem(ret2,i,SWIG_From_int(ret[i]));
2052 PyObject *getNonEmptyLevels(const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
2054 std::vector<int> ret1;
2055 int ret0=self->getNonEmptyLevels(mname,ret1);
2056 PyObject *elt=PyTuple_New(2);
2057 PyTuple_SetItem(elt,0,SWIG_From_int(ret0));
2058 PyTuple_SetItem(elt,1,convertIntArrToPyList2(ret1));
2062 PyObject *getFieldSplitedByType(const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
2064 std::vector<INTERP_KERNEL::NormalizedCellType> types;
2065 std::vector< std::vector<TypeOfField> > typesF;
2066 std::vector< std::vector<std::string> > pfls;
2067 std::vector< std::vector<std::string> > locs;
2068 std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(mname,types,typesF,pfls,locs);
2070 PyObject *ret2=PyList_New(sz);
2071 for(int i=0;i<sz;i++)
2073 const std::vector< std::pair<int,int> >& dadsI=ret[i];
2074 const std::vector<TypeOfField>& typesFI=typesF[i];
2075 const std::vector<std::string>& pflsI=pfls[i];
2076 const std::vector<std::string>& locsI=locs[i];
2077 PyObject *elt=PyTuple_New(2);
2078 PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
2079 int sz2=ret[i].size();
2080 PyObject *elt2=PyList_New(sz2);
2081 for(int j=0;j<sz2;j++)
2083 PyObject *elt3=PyTuple_New(4);
2084 PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
2085 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));
2086 PyTuple_SetItem(elt3,1,elt4);
2087 PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
2088 PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
2089 PyList_SetItem(elt2,j,elt3);
2091 PyTuple_SetItem(elt,1,elt2);
2092 PyList_SetItem(ret2,i,elt);
2097 PyObject *splitComponents() const throw(INTERP_KERNEL::Exception)
2099 std::vector< MCAuto< MEDFileAnyTypeField1TS > > ret=self->splitComponents();
2100 std::size_t sz=ret.size();
2101 PyObject *retPy=PyList_New(sz);
2102 for(std::size_t i=0;i<sz;i++)
2103 PyList_SetItem(retPy,i,convertMEDFileField1TS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
2107 PyObject *splitDiscretizations() const throw(INTERP_KERNEL::Exception)
2109 std::vector< MCAuto< MEDFileAnyTypeField1TS > > ret=self->splitDiscretizations();
2110 std::size_t sz=ret.size();
2111 PyObject *retPy=PyList_New(sz);
2112 for(std::size_t i=0;i<sz;i++)
2113 PyList_SetItem(retPy,i,convertMEDFileField1TS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
2117 PyObject *splitMultiDiscrPerGeoTypes() const throw(INTERP_KERNEL::Exception)
2119 std::vector< MCAuto< MEDFileAnyTypeField1TS > > ret=self->splitMultiDiscrPerGeoTypes();
2120 std::size_t sz=ret.size();
2121 PyObject *retPy=PyList_New(sz);
2122 for(std::size_t i=0;i<sz;i++)
2123 PyList_SetItem(retPy,i,convertMEDFileField1TS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
2127 MEDFileAnyTypeField1TS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const throw(INTERP_KERNEL::Exception)
2129 std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
2130 convertToMapIntDataArrayInt(extractDef,extractDefCpp);
2131 return self->extractPart(extractDefCpp,mm);
2136 class MEDFileField1TS : public MEDFileAnyTypeField1TS
2139 static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2140 static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2141 static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2142 static MEDFileField1TS *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
2143 static MEDFileField1TS *New();
2144 MEDCoupling::MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
2145 MEDCouplingFieldDouble *field(const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception);
2146 MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2147 MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2148 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2149 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2150 MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2152 void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
2153 void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
2154 void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
2155 void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
2158 MEDFileField1TS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2160 return MEDFileField1TS::New(fileName,loadAll);
2163 MEDFileField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2165 return MEDFileField1TS::New(fileName,fieldName,loadAll);
2168 MEDFileField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2170 return MEDFileField1TS::New(fileName,fieldName,iteration,order,loadAll);
2173 MEDFileField1TS(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
2175 return MEDFileField1TS::New(db);
2180 return MEDFileField1TS::New();
2184 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
2186 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileField1TS");
2189 void copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception)
2191 const DataArrayDouble *arr=0;
2193 arr=field->getArray();
2194 self->copyTinyInfoFrom(field,arr);
2197 std::string __str__() const throw(INTERP_KERNEL::Exception)
2199 return self->simpleRepr();
2202 PyObject *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
2204 DataArrayInt *ret1=0;
2205 DataArrayDouble *ret0=self->getFieldWithProfile(type,meshDimRelToMax,mesh,ret1);
2206 PyObject *ret=PyTuple_New(2);
2207 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2208 PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2212 PyObject *getFieldSplitedByType2(const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
2214 std::vector<INTERP_KERNEL::NormalizedCellType> types;
2215 std::vector< std::vector<TypeOfField> > typesF;
2216 std::vector< std::vector<std::string> > pfls;
2217 std::vector< std::vector<std::string> > locs;
2218 std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(mname,types,typesF,pfls,locs);
2220 PyObject *ret2=PyList_New(sz);
2221 for(int i=0;i<sz;i++)
2223 const std::vector<DataArrayDouble *>& dadsI=ret[i];
2224 const std::vector<TypeOfField>& typesFI=typesF[i];
2225 const std::vector<std::string>& pflsI=pfls[i];
2226 const std::vector<std::string>& locsI=locs[i];
2227 PyObject *elt=PyTuple_New(2);
2228 PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
2229 int sz2=ret[i].size();
2230 PyObject *elt2=PyList_New(sz2);
2231 for(int j=0;j<sz2;j++)
2233 PyObject *elt3=PyTuple_New(4);
2234 PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
2235 PyTuple_SetItem(elt3,1,SWIG_NewPointerObj(SWIG_as_voidptr(dadsI[j]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2236 PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
2237 PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
2238 PyList_SetItem(elt2,j,elt3);
2240 PyTuple_SetItem(elt,1,elt2);
2241 PyList_SetItem(ret2,i,elt);
2246 DataArrayDouble *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception)
2248 DataArrayDouble *ret=self->getUndergroundDataArray();
2254 PyObject *getUndergroundDataArrayExt() const throw(INTERP_KERNEL::Exception)
2256 std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > > elt1Cpp;
2257 DataArrayDouble *elt0=self->getUndergroundDataArrayExt(elt1Cpp);
2260 PyObject *ret=PyTuple_New(2);
2261 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elt0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2262 std::size_t sz=elt1Cpp.size();
2263 PyObject *elt=PyList_New(sz);
2264 for(std::size_t i=0;i<sz;i++)
2266 PyObject *elt1=PyTuple_New(2);
2267 PyObject *elt2=PyTuple_New(2);
2268 PyTuple_SetItem(elt2,0,SWIG_From_int((int)elt1Cpp[i].first.first));
2269 PyTuple_SetItem(elt2,1,SWIG_From_int(elt1Cpp[i].first.second));
2270 PyObject *elt3=PyTuple_New(2);
2271 PyTuple_SetItem(elt3,0,SWIG_From_int(elt1Cpp[i].second.first));
2272 PyTuple_SetItem(elt3,1,SWIG_From_int(elt1Cpp[i].second.second));
2273 PyTuple_SetItem(elt1,0,elt2);
2274 PyTuple_SetItem(elt1,1,elt3);
2275 PyList_SetItem(elt,i,elt1);
2277 PyTuple_SetItem(ret,1,elt);
2283 class MEDFileIntField1TS : public MEDFileAnyTypeField1TS
2286 static MEDFileIntField1TS *New();
2287 static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2288 static MEDFileIntField1TS *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
2289 static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2290 static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2291 MEDCoupling::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
2293 void setFieldNoProfileSBT(const MEDCouplingFieldInt *field) throw(INTERP_KERNEL::Exception);
2294 void setFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
2295 MEDCouplingFieldInt *field(const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception);
2296 MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2297 MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2298 MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2299 MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2300 MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2303 MEDFileIntField1TS() throw(INTERP_KERNEL::Exception)
2305 return MEDFileIntField1TS::New();
2308 MEDFileIntField1TS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2310 return MEDFileIntField1TS::New(fileName,loadAll);
2313 MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2315 return MEDFileIntField1TS::New(fileName,fieldName,loadAll);
2318 MEDFileIntField1TS(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2320 return MEDFileIntField1TS::New(fileName,fieldName,iteration,order,loadAll);
2323 MEDFileIntField1TS(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
2325 return MEDFileIntField1TS::New(db);
2329 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
2331 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileIntField1TS");
2334 std::string __str__() const throw(INTERP_KERNEL::Exception)
2336 return self->simpleRepr();
2339 PyObject *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
2341 DataArrayInt *ret1=0;
2342 DataArrayInt *ret0=self->getFieldWithProfile(type,meshDimRelToMax,mesh,ret1);
2343 PyObject *ret=PyTuple_New(2);
2344 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2345 PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2349 DataArrayInt *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception)
2351 DataArrayInt *ret=self->getUndergroundDataArray();
2359 class MEDFileAnyTypeFieldMultiTSIterator
2364 PyObject *next() throw(INTERP_KERNEL::Exception)
2366 MEDFileAnyTypeField1TS *ret=self->nextt();
2368 return convertMEDFileField1TS(ret, SWIG_POINTER_OWN | 0 );
2371 PyErr_SetString(PyExc_StopIteration,"No more data.");
2378 class MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritableStandAlone
2381 static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2382 static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2383 MEDFileAnyTypeFieldMultiTS *deepCopy() const throw(INTERP_KERNEL::Exception);
2384 virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const throw(INTERP_KERNEL::Exception);
2385 std::string getName() const throw(INTERP_KERNEL::Exception);
2386 void setName(const std::string& name) throw(INTERP_KERNEL::Exception);
2387 std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
2388 void setDtUnit(const std::string& dtUnit) throw(INTERP_KERNEL::Exception);
2389 std::string getMeshName() const throw(INTERP_KERNEL::Exception);
2390 void setMeshName(const std::string& newMeshName) throw(INTERP_KERNEL::Exception);
2391 const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
2392 bool presenceOfMultiDiscPerGeoType() const throw(INTERP_KERNEL::Exception);
2393 int getNumberOfComponents() const throw(INTERP_KERNEL::Exception);
2394 int getNumberOfTS() const throw(INTERP_KERNEL::Exception);
2395 void eraseEmptyTS() throw(INTERP_KERNEL::Exception);
2396 int getPosOfTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
2397 int getPosGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
2398 void loadArrays() throw(INTERP_KERNEL::Exception);
2399 void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
2400 void unloadArrays() throw(INTERP_KERNEL::Exception);
2401 void unloadArraysWithoutDataLoss() throw(INTERP_KERNEL::Exception);
2403 virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const throw(INTERP_KERNEL::Exception);
2404 MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
2405 MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
2406 void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts) throw(INTERP_KERNEL::Exception);
2407 void synchronizeNameScope() throw(INTERP_KERNEL::Exception);
2408 MEDFileAnyTypeFieldMultiTS *buildNewEmpty() const throw(INTERP_KERNEL::Exception);
2411 int __len__() const throw(INTERP_KERNEL::Exception)
2413 return self->getNumberOfTS();
2416 int getTimeId(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
2418 if(elt0 && PyInt_Check(elt0))
2420 int pos=PyInt_AS_LONG(elt0);
2423 else if(elt0 && PyTuple_Check(elt0))
2425 if(PyTuple_Size(elt0)==2)
2427 PyObject *o0=PyTuple_GetItem(elt0,0);
2428 PyObject *o1=PyTuple_GetItem(elt0,1);
2429 if(PyInt_Check(o0) && PyInt_Check(o1))
2431 int iter=PyInt_AS_LONG(o0);
2432 int order=PyInt_AS_LONG(o1);
2433 return self->getPosOfTimeStep(iter,order);
2436 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 !");
2439 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 !");
2441 else if(elt0 && PyFloat_Check(elt0))
2443 double val=PyFloat_AS_DOUBLE(elt0);
2444 return self->getPosGivenTime(val);
2447 throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::__getitem__ : invalid input params ! expected fmts[int], fmts[int,int] or fmts[double] to request time step !");
2450 PyObject *getIterations() const throw(INTERP_KERNEL::Exception)
2452 std::vector< std::pair<int,int> > res(self->getIterations());
2453 return convertVecPairIntToPy(res);
2456 PyObject *getTimeSteps() const throw(INTERP_KERNEL::Exception)
2458 std::vector<double> ret1;
2459 std::vector< std::pair<int,int> > ret=self->getTimeSteps(ret1);
2460 std::size_t sz=ret.size();
2461 PyObject *ret2=PyList_New(sz);
2462 for(std::size_t i=0;i<sz;i++)
2464 PyObject *elt=PyTuple_New(3);
2465 PyTuple_SetItem(elt,0,SWIG_From_int(ret[i].first));
2466 PyTuple_SetItem(elt,1,SWIG_From_int(ret[i].second));
2467 PyTuple_SetItem(elt,2,SWIG_From_double(ret1[i]));
2468 PyList_SetItem(ret2,i,elt);
2473 PyObject *getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception)
2475 std::vector< std::vector<TypeOfField> > ret=self->getTypesOfFieldAvailable();
2476 PyObject *ret2=PyList_New(ret.size());
2477 for(int i=0;i<(int)ret.size();i++)
2479 const std::vector<TypeOfField>& rett=ret[i];
2480 PyObject *ret3=PyList_New(rett.size());
2481 for(int j=0;j<(int)rett.size();j++)
2482 PyList_SetItem(ret3,j,SWIG_From_int(rett[j]));
2483 PyList_SetItem(ret2,i,ret3);
2488 PyObject *getNonEmptyLevels(int iteration, int order, const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
2490 std::vector<int> ret1;
2491 int ret0=self->getNonEmptyLevels(iteration,order,mname,ret1);
2492 PyObject *elt=PyTuple_New(2);
2493 PyTuple_SetItem(elt,0,SWIG_From_int(ret0));
2494 PyTuple_SetItem(elt,1,convertIntArrToPyList2(ret1));
2498 PyObject *getFieldSplitedByType(int iteration, int order, const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
2500 std::vector<INTERP_KERNEL::NormalizedCellType> types;
2501 std::vector< std::vector<TypeOfField> > typesF;
2502 std::vector< std::vector<std::string> > pfls;
2503 std::vector< std::vector<std::string> > locs;
2504 std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(iteration,order,mname,types,typesF,pfls,locs);
2506 PyObject *ret2=PyList_New(sz);
2507 for(int i=0;i<sz;i++)
2509 const std::vector< std::pair<int,int> >& dadsI=ret[i];
2510 const std::vector<TypeOfField>& typesFI=typesF[i];
2511 const std::vector<std::string>& pflsI=pfls[i];
2512 const std::vector<std::string>& locsI=locs[i];
2513 PyObject *elt=PyTuple_New(2);
2514 PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
2515 int sz2=ret[i].size();
2516 PyObject *elt2=PyList_New(sz2);
2517 for(int j=0;j<sz2;j++)
2519 PyObject *elt3=PyTuple_New(4);
2520 PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
2521 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));
2522 PyTuple_SetItem(elt3,1,elt4);
2523 PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
2524 PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
2525 PyList_SetItem(elt2,j,elt3);
2527 PyTuple_SetItem(elt,1,elt2);
2528 PyList_SetItem(ret2,i,elt);
2533 std::vector<int> getTimeIds(PyObject *elts) const throw(INTERP_KERNEL::Exception)
2535 if(PyList_Check(elts))
2537 int sz=PyList_Size(elts);
2538 std::vector<int> ret(sz);
2539 for(int i=0;i<sz;i++)
2541 PyObject *elt=PyList_GetItem(elts,i);
2542 ret[i]=MEDCoupling_MEDFileAnyTypeFieldMultiTS_getTimeId(self,elt);
2548 std::vector<int> ret(1);
2549 ret[0]=MEDCoupling_MEDFileAnyTypeFieldMultiTS_getTimeId(self,elts);
2554 void __delitem__(PyObject *elts) throw(INTERP_KERNEL::Exception)
2556 if(PySlice_Check(elts))
2558 Py_ssize_t strt=2,stp=2,step=2;
2559 PySliceObject *oC=reinterpret_cast<PySliceObject *>(elts);
2560 GetIndicesOfSlice(oC,self->getNumberOfTS(),&strt,&stp,&step,"MEDFileAnyTypeFieldMultiTS.__delitem__ : error in input slice !");
2561 self->eraseTimeStepIds2(strt,stp,step);
2565 std::vector<int> idsToRemove=MEDCoupling_MEDFileAnyTypeFieldMultiTS_getTimeIds(self,elts);
2566 if(!idsToRemove.empty())
2567 self->eraseTimeStepIds(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
2571 void eraseTimeStepIds(PyObject *li) throw(INTERP_KERNEL::Exception)
2575 std::vector<int> pos2;
2576 DataArrayInt *pos3=0;
2577 DataArrayIntTuple *pos4=0;
2578 convertObjToPossibleCpp1(li,sw,pos1,pos2,pos3,pos4);
2583 self->eraseTimeStepIds(&pos1,&pos1+1);
2590 self->eraseTimeStepIds(&pos2[0],&pos2[0]+pos2.size());
2595 self->eraseTimeStepIds(pos3->begin(),pos3->end());
2599 throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::eraseTimeStepIds : unexpected input array type recognized !");
2603 MEDFileAnyTypeFieldMultiTSIterator *__iter__() throw(INTERP_KERNEL::Exception)
2605 return self->iterator();
2608 PyObject *__getitem__(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
2610 if(elt0 && PyList_Check(elt0))
2612 int sz=PyList_Size(elt0);
2613 MCAuto<DataArrayInt> da=DataArrayInt::New(); da->alloc(sz,1);
2614 int *pt=da->getPointer();
2615 for(int i=0;i<sz;i++,pt++)
2617 PyObject *elt1=PyList_GetItem(elt0,i);
2618 *pt=MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(self,elt1);
2620 return convertMEDFileFieldMultiTS(self->buildSubPart(da->begin(),da->end()),SWIG_POINTER_OWN | 0);
2622 else if(elt0 && PySlice_Check(elt0))
2624 Py_ssize_t strt=2,stp=2,step=2;
2625 PySliceObject *oC=reinterpret_cast<PySliceObject *>(elt0);
2626 GetIndicesOfSlice(oC,self->getNumberOfTS(),&strt,&stp,&step,"MEDFileAnyTypeFieldMultiTS.__getitem__ : error in input slice !");
2627 return convertMEDFileFieldMultiTS(self->buildSubPartSlice(strt,stp,step),SWIG_POINTER_OWN | 0);
2630 return convertMEDFileField1TS(self->getTimeStepAtPos(MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(self,elt0)),SWIG_POINTER_OWN | 0);
2633 bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
2635 std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
2636 return self->changeMeshNames(modifTab);
2639 PyObject *splitComponents() const throw(INTERP_KERNEL::Exception)
2641 std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > ret=self->splitComponents();
2642 std::size_t sz=ret.size();
2643 PyObject *retPy=PyList_New(sz);
2644 for(std::size_t i=0;i<sz;i++)
2645 PyList_SetItem(retPy,i,convertMEDFileFieldMultiTS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
2649 PyObject *splitDiscretizations() const throw(INTERP_KERNEL::Exception)
2651 std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > ret=self->splitDiscretizations();
2652 std::size_t sz=ret.size();
2653 PyObject *retPy=PyList_New(sz);
2654 for(std::size_t i=0;i<sz;i++)
2655 PyList_SetItem(retPy,i,convertMEDFileFieldMultiTS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
2659 PyObject *splitMultiDiscrPerGeoTypes() const throw(INTERP_KERNEL::Exception)
2661 std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > ret=self->splitMultiDiscrPerGeoTypes();
2662 std::size_t sz=ret.size();
2663 PyObject *retPy=PyList_New(sz);
2664 for(std::size_t i=0;i<sz;i++)
2665 PyList_SetItem(retPy,i,convertMEDFileFieldMultiTS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
2669 void pushBackTimeSteps(PyObject *li) throw(INTERP_KERNEL::Exception)
2672 int status(SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__MEDFileAnyTypeFieldMultiTS,0|0));
2673 if(SWIG_IsOK(status))
2675 self->pushBackTimeSteps(reinterpret_cast<MEDFileAnyTypeFieldMultiTS *>(argp));
2679 std::vector<MEDFileAnyTypeField1TS *> tmp;
2680 convertFromPyObjVectorOfObj<MEDCoupling::MEDFileAnyTypeField1TS *>(li,SWIGTYPE_p_MEDCoupling__MEDFileAnyTypeField1TS,"MEDFileAnyTypeField1TS",tmp);
2681 self->pushBackTimeSteps(tmp);
2685 MEDFileAnyTypeFieldMultiTS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const throw(INTERP_KERNEL::Exception)
2687 std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
2688 convertToMapIntDataArrayInt(extractDef,extractDefCpp);
2689 return self->extractPart(extractDefCpp,mm);
2692 static PyObject *MEDFileAnyTypeFieldMultiTS::SplitIntoCommonTimeSeries(PyObject *li) throw(INTERP_KERNEL::Exception)
2694 std::vector<MEDFileAnyTypeFieldMultiTS *> vectFMTS;
2695 convertFromPyObjVectorOfObj<MEDCoupling::MEDFileAnyTypeFieldMultiTS *>(li,SWIGTYPE_p_MEDCoupling__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",vectFMTS);
2696 std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > ret=MEDFileAnyTypeFieldMultiTS::SplitIntoCommonTimeSeries(vectFMTS);
2697 std::size_t sz=ret.size();
2698 PyObject *retPy=PyList_New(sz);
2699 for(std::size_t i=0;i<sz;i++)
2701 std::size_t sz2=ret[i].size();
2702 PyObject *ret1Py=PyList_New(sz2);
2703 for(std::size_t j=0;j<sz2;j++)
2705 MEDFileAnyTypeFieldMultiTS *elt(ret[i][j]);
2708 PyList_SetItem(ret1Py,j,convertMEDFileFieldMultiTS(elt,SWIG_POINTER_OWN | 0 ));
2710 PyList_SetItem(retPy,i,ret1Py);
2715 static PyObject *MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(PyObject *li, const MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception)
2717 std::vector<MEDFileAnyTypeFieldMultiTS *> vectFMTS;
2718 convertFromPyObjVectorOfObj<MEDCoupling::MEDFileAnyTypeFieldMultiTS *>(li,SWIGTYPE_p_MEDCoupling__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",vectFMTS);
2719 std::vector< MCAuto<MEDFileFastCellSupportComparator> > ret2;
2720 std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > ret=MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(vectFMTS,mesh,ret2);
2721 if(ret2.size()!=ret.size())
2723 std::ostringstream oss; oss << "MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport (PyWrap) : internal error ! Size of 2 vectors must match ! (" << ret.size() << "!=" << ret2.size() << ") !";
2724 throw INTERP_KERNEL::Exception(oss.str().c_str());
2726 std::size_t sz=ret.size();
2727 PyObject *retPy=PyList_New(sz);
2728 for(std::size_t i=0;i<sz;i++)
2730 std::size_t sz2=ret[i].size();
2731 PyObject *ret0Py=PyTuple_New(2);
2732 PyObject *ret1Py=PyList_New(sz2);
2733 for(std::size_t j=0;j<sz2;j++)
2735 MEDFileAnyTypeFieldMultiTS *elt(ret[i][j]);
2738 PyList_SetItem(ret1Py,j,convertMEDFileFieldMultiTS(elt,SWIG_POINTER_OWN | 0 ));
2740 PyTuple_SetItem(ret0Py,0,ret1Py);
2741 PyTuple_SetItem(ret0Py,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret2[i].retn()),SWIGTYPE_p_MEDCoupling__MEDFileFastCellSupportComparator, SWIG_POINTER_OWN | 0 ));
2742 PyList_SetItem(retPy,i,ret0Py);
2749 class MEDFileFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
2752 static MEDFileFieldMultiTS *New() throw(INTERP_KERNEL::Exception);
2753 static MEDFileFieldMultiTS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2754 static MEDFileFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2755 static MEDFileFieldMultiTS *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
2757 MEDCouplingFieldDouble *field(int iteration, int order, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception);
2758 MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2759 MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2760 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2761 MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2762 MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2764 void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
2765 void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
2766 MEDCoupling::MEDFileIntFieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
2769 MEDFileFieldMultiTS()
2771 return MEDFileFieldMultiTS::New();
2774 MEDFileFieldMultiTS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2776 return MEDFileFieldMultiTS::New(fileName,loadAll);
2779 MEDFileFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2781 return MEDFileFieldMultiTS::New(fileName,fieldName,loadAll);
2784 MEDFileFieldMultiTS(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
2786 return MEDFileFieldMultiTS::New(db);
2790 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
2792 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileFieldMultiTS");
2795 static MEDFileFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
2797 std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
2798 std::size_t sz(tmp.size());
2799 std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > entitiesCpp(sz);
2800 for(std::size_t i=0;i<sz;i++)
2802 entitiesCpp[i].first=(TypeOfField)tmp[i].first;
2803 entitiesCpp[i].second=(INTERP_KERNEL::NormalizedCellType)tmp[i].second;
2805 return MEDFileFieldMultiTS::LoadSpecificEntities(fileName,fieldName,entitiesCpp,loadAll);
2808 std::string __str__() const throw(INTERP_KERNEL::Exception)
2810 return self->simpleRepr();
2813 PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
2815 DataArrayInt *ret1=0;
2816 DataArrayDouble *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
2817 PyObject *ret=PyTuple_New(2);
2818 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2819 PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2823 PyObject *getFieldSplitedByType2(int iteration, int order, const std::string& mname=std::string()) const throw(INTERP_KERNEL::Exception)
2825 std::vector<INTERP_KERNEL::NormalizedCellType> types;
2826 std::vector< std::vector<TypeOfField> > typesF;
2827 std::vector< std::vector<std::string> > pfls;
2828 std::vector< std::vector<std::string> > locs;
2829 std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(iteration,order,mname,types,typesF,pfls,locs);
2831 PyObject *ret2=PyList_New(sz);
2832 for(int i=0;i<sz;i++)
2834 const std::vector<DataArrayDouble *>& dadsI=ret[i];
2835 const std::vector<TypeOfField>& typesFI=typesF[i];
2836 const std::vector<std::string>& pflsI=pfls[i];
2837 const std::vector<std::string>& locsI=locs[i];
2838 PyObject *elt=PyTuple_New(2);
2839 PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
2840 int sz2=ret[i].size();
2841 PyObject *elt2=PyList_New(sz2);
2842 for(int j=0;j<sz2;j++)
2844 PyObject *elt3=PyTuple_New(4);
2845 PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
2846 PyTuple_SetItem(elt3,1,SWIG_NewPointerObj(SWIG_as_voidptr(dadsI[j]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2847 PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
2848 PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
2849 PyList_SetItem(elt2,j,elt3);
2851 PyTuple_SetItem(elt,1,elt2);
2852 PyList_SetItem(ret2,i,elt);
2856 DataArrayDouble *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception)
2858 DataArrayDouble *ret=self->getUndergroundDataArray(iteration,order);
2864 PyObject *getUndergroundDataArrayExt(int iteration, int order) const throw(INTERP_KERNEL::Exception)
2866 std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > > elt1Cpp;
2867 DataArrayDouble *elt0=self->getUndergroundDataArrayExt(iteration,order,elt1Cpp);
2870 PyObject *ret=PyTuple_New(2);
2871 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elt0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2872 std::size_t sz=elt1Cpp.size();
2873 PyObject *elt=PyList_New(sz);
2874 for(std::size_t i=0;i<sz;i++)
2876 PyObject *elt1=PyTuple_New(2);
2877 PyObject *elt2=PyTuple_New(2);
2878 PyTuple_SetItem(elt2,0,SWIG_From_int(elt1Cpp[i].first.first));
2879 PyTuple_SetItem(elt2,1,SWIG_From_int(elt1Cpp[i].first.second));
2880 PyObject *elt3=PyTuple_New(2);
2881 PyTuple_SetItem(elt3,0,SWIG_From_int(elt1Cpp[i].second.first));
2882 PyTuple_SetItem(elt3,1,SWIG_From_int(elt1Cpp[i].second.second));
2883 PyTuple_SetItem(elt1,0,elt2);
2884 PyTuple_SetItem(elt1,1,elt3);
2885 PyList_SetItem(elt,i,elt1);
2887 PyTuple_SetItem(ret,1,elt);
2893 class MEDFileFieldsIterator
2898 PyObject *next() throw(INTERP_KERNEL::Exception)
2900 MEDFileAnyTypeFieldMultiTS *ret=self->nextt();
2902 return convertMEDFileFieldMultiTS(ret, SWIG_POINTER_OWN | 0 );
2905 PyErr_SetString(PyExc_StopIteration,"No more data.");
2912 class MEDFileIntFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
2915 static MEDFileIntFieldMultiTS *New();
2916 static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2917 static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
2918 static MEDFileIntFieldMultiTS *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
2920 void appendFieldNoProfileSBT(const MEDCouplingFieldInt *field) throw(INTERP_KERNEL::Exception);
2921 void appendFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
2922 MEDCoupling::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
2923 MEDCouplingFieldDouble *field(int iteration, int order, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception);
2924 MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2925 MEDCouplingFieldInt *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2926 MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2927 MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2928 MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
2931 MEDFileIntFieldMultiTS()
2933 return MEDFileIntFieldMultiTS::New();
2936 MEDFileIntFieldMultiTS(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2938 return MEDFileIntFieldMultiTS::New(fileName,loadAll);
2941 MEDFileIntFieldMultiTS(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
2943 return MEDFileIntFieldMultiTS::New(fileName,fieldName,loadAll);
2946 MEDFileIntFieldMultiTS(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
2948 return MEDFileIntFieldMultiTS::New(db);
2952 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
2954 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileIntFieldMultiTS");
2957 static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
2959 std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
2960 std::size_t sz(tmp.size());
2961 std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > entitiesCpp(sz);
2962 for(std::size_t i=0;i<sz;i++)
2964 entitiesCpp[i].first=(TypeOfField)tmp[i].first;
2965 entitiesCpp[i].second=(INTERP_KERNEL::NormalizedCellType)tmp[i].second;
2967 return MEDFileIntFieldMultiTS::LoadSpecificEntities(fileName,fieldName,entitiesCpp,loadAll);
2970 std::string __str__() const throw(INTERP_KERNEL::Exception)
2972 return self->simpleRepr();
2975 PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception)
2977 DataArrayInt *ret1=0;
2978 DataArrayInt *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
2979 PyObject *ret=PyTuple_New(2);
2980 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2981 PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2985 DataArrayInt *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception)
2987 DataArrayInt *ret=self->getUndergroundDataArray(iteration,order);
2995 class MEDFileFields : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritableStandAlone
2998 static MEDFileFields *New() throw(INTERP_KERNEL::Exception);
2999 static MEDFileFields *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
3000 static MEDFileFields *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
3001 static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0) throw(INTERP_KERNEL::Exception);
3002 MEDFileFields *deepCopy() const throw(INTERP_KERNEL::Exception);
3003 MEDFileFields *shallowCpy() const throw(INTERP_KERNEL::Exception);
3004 void loadArrays() throw(INTERP_KERNEL::Exception);
3005 void loadArraysIfNecessary() throw(INTERP_KERNEL::Exception);
3006 void unloadArrays() throw(INTERP_KERNEL::Exception);
3007 void unloadArraysWithoutDataLoss() throw(INTERP_KERNEL::Exception);
3008 int getNumberOfFields() const;
3009 std::vector<std::string> getFieldsNames() const throw(INTERP_KERNEL::Exception);
3010 std::vector<std::string> getMeshesNames() const throw(INTERP_KERNEL::Exception);
3012 void resize(int newSize) throw(INTERP_KERNEL::Exception);
3013 void pushField(MEDFileAnyTypeFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
3014 void setFieldAtPos(int i, MEDFileAnyTypeFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
3015 int getPosFromFieldName(const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
3016 MEDFileAnyTypeFieldMultiTS *getFieldAtPos(int i) const throw(INTERP_KERNEL::Exception);
3017 MEDFileAnyTypeFieldMultiTS *getFieldWithName(const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
3018 MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const std::string& meshName) const throw(INTERP_KERNEL::Exception);
3019 void destroyFieldAtPos(int i) throw(INTERP_KERNEL::Exception);
3020 bool removeFieldsWithoutAnyTimeStep() throw(INTERP_KERNEL::Exception);
3025 return MEDFileFields::New();
3028 MEDFileFields(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception)
3030 return MEDFileFields::New(fileName,loadAll);
3033 MEDFileFields(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
3035 return MEDFileFields::New(db);
3039 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
3041 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileFields");
3044 std::string __str__() const throw(INTERP_KERNEL::Exception)
3046 return self->simpleRepr();
3049 static MEDFileFields *LoadSpecificEntities(const std::string& fileName, PyObject *entities, bool loadAll=true) throw(INTERP_KERNEL::Exception)
3051 std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
3052 std::size_t sz(tmp.size());
3053 std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > entitiesCpp(sz);
3054 for(std::size_t i=0;i<sz;i++)
3056 entitiesCpp[i].first=(TypeOfField)tmp[i].first;
3057 entitiesCpp[i].second=(INTERP_KERNEL::NormalizedCellType)tmp[i].second;
3059 return MEDFileFields::LoadSpecificEntities(fileName,entitiesCpp,loadAll);
3062 PyObject *getCommonIterations() const throw(INTERP_KERNEL::Exception)
3065 std::vector< std::pair<int,int> > ret0=self->getCommonIterations(ret1);
3066 PyObject *ret=PyTuple_New(2);
3067 PyObject *ret_0=PyList_New(ret0.size());
3069 for(std::vector< std::pair<int,int> >::const_iterator iter=ret0.begin();iter!=ret0.end();iter++,rk++)
3071 PyObject *elt=PyTuple_New(2);
3072 PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
3073 PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
3074 PyList_SetItem(ret_0,rk,elt);
3076 PyTuple_SetItem(ret,0,ret_0);
3077 PyObject *ret_1=ret1?Py_True:Py_False; Py_XINCREF(ret_1);
3078 PyTuple_SetItem(ret,1,ret_1);
3082 MEDFileFields *partOfThisLyingOnSpecifiedTimeSteps(PyObject *timeSteps) const throw(INTERP_KERNEL::Exception)
3084 std::vector< std::pair<int,int> > ts=convertTimePairIdsFromPy(timeSteps);
3085 return self->partOfThisLyingOnSpecifiedTimeSteps(ts);
3088 MEDFileFields *partOfThisNotLyingOnSpecifiedTimeSteps(PyObject *timeSteps) const throw(INTERP_KERNEL::Exception)
3090 std::vector< std::pair<int,int> > ts=convertTimePairIdsFromPy(timeSteps);
3091 return self->partOfThisNotLyingOnSpecifiedTimeSteps(ts);
3094 PyObject *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3096 if(obj && PyList_Check(obj))
3098 int sz=PyList_Size(obj);
3099 MCAuto<DataArrayInt> da=DataArrayInt::New(); da->alloc(sz,1);
3100 int *pt=da->getPointer();
3101 for(int i=0;i<sz;i++,pt++)
3103 PyObject *elt1=PyList_GetItem(obj,i);
3104 *pt=MEDFileFieldsgetitemSingleTS__(self,elt1);
3106 return SWIG_NewPointerObj(SWIG_as_voidptr(self->buildSubPart(da->begin(),da->end())),SWIGTYPE_p_MEDCoupling__MEDFileFields, SWIG_POINTER_OWN | 0 );
3109 return convertMEDFileFieldMultiTS(self->getFieldAtPos(MEDFileFieldsgetitemSingleTS__(self,obj)), SWIG_POINTER_OWN | 0 );
3112 MEDFileFields *__setitem__(int obj, MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception)
3114 self->setFieldAtPos(obj,field);
3118 int __len__() const throw(INTERP_KERNEL::Exception)
3120 return self->getNumberOfFields();
3123 MEDFileFieldsIterator *__iter__() throw(INTERP_KERNEL::Exception)
3125 return self->iterator();
3128 bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
3130 std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
3131 return self->changeMeshNames(modifTab);
3134 int getPosOfField(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
3136 if(elt0 && PyInt_Check(elt0))
3138 return PyInt_AS_LONG(elt0);
3140 else if(elt0 && PyString_Check(elt0))
3141 return self->getPosFromFieldName(PyString_AsString(elt0));
3143 throw INTERP_KERNEL::Exception("MEDFileFields::getPosOfField : invalid input params ! expected fields[int], fields[string_of_field_name] !");
3146 std::vector<int> getPosOfFields(PyObject *elts) const throw(INTERP_KERNEL::Exception)
3148 if(PyList_Check(elts))
3150 int sz=PyList_Size(elts);
3151 std::vector<int> ret(sz);
3152 for(int i=0;i<sz;i++)
3154 PyObject *elt=PyList_GetItem(elts,i);
3155 ret[i]=MEDCoupling_MEDFileFields_getPosOfField(self,elt);
3161 std::vector<int> ret(1);
3162 ret[0]=MEDCoupling_MEDFileFields_getPosOfField(self,elts);
3167 void pushFields(PyObject *fields) throw(INTERP_KERNEL::Exception)
3169 std::vector<MEDFileAnyTypeFieldMultiTS *> tmp;
3170 convertFromPyObjVectorOfObj<MEDCoupling::MEDFileAnyTypeFieldMultiTS *>(fields,SWIGTYPE_p_MEDCoupling__MEDFileAnyTypeFieldMultiTS,"MEDFileAnyTypeFieldMultiTS",tmp);
3171 self->pushFields(tmp);
3174 void __delitem__(PyObject *elts) throw(INTERP_KERNEL::Exception)
3176 if(elts && PySlice_Check(elts))
3178 Py_ssize_t strt=2,stp=2,step=2;
3179 PySliceObject *oC=reinterpret_cast<PySliceObject *>(elts);
3180 GetIndicesOfSlice(oC,self->getNumberOfFields(),&strt,&stp,&step,"MEDFileFields.__delitem__ : error in input slice !");
3181 self->destroyFieldsAtPos2(strt,stp,step);
3185 std::vector<int> idsToRemove=MEDCoupling_MEDFileFields_getPosOfFields(self,elts);
3186 if(!idsToRemove.empty())
3187 self->destroyFieldsAtPos(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
3191 MEDFileFields *extractPart(PyObject *extractDef, MEDFileMesh *mm) const throw(INTERP_KERNEL::Exception)
3193 std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
3194 convertToMapIntDataArrayInt(extractDef,extractDefCpp);
3195 return self->extractPart(extractDefCpp,mm);
3200 class MEDFileParameter1TS : public RefCountObject
3203 void setIteration(int it);
3204 int getIteration() const;
3205 void setOrder(int order);
3206 int getOrder() const;
3207 void setTimeValue(double time);
3208 void setTime(int dt, int it, double time);
3209 double getTime(int& dt, int& it);
3210 double getTimeValue() const;
3213 class MEDFileParameterDouble1TSWTI : public MEDFileParameter1TS
3216 void setValue(double val) throw(INTERP_KERNEL::Exception);
3217 double getValue() const throw(INTERP_KERNEL::Exception);
3218 std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
3221 std::string __str__() const throw(INTERP_KERNEL::Exception)
3223 return self->simpleRepr();
3228 class MEDFileParameterTinyInfo : public MEDFileWritable
3231 void setDescription(const std::string& name);
3232 std::string getDescription() const;
3233 void setTimeUnit(const std::string& unit);
3234 std::string getTimeUnit() const;
3237 class MEDFileParameterDouble1TS : public MEDFileParameterDouble1TSWTI, public MEDFileParameterTinyInfo
3240 static MEDFileParameterDouble1TS *New();
3241 static MEDFileParameterDouble1TS *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
3242 static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName) throw(INTERP_KERNEL::Exception);
3243 static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName, int dt, int it) throw(INTERP_KERNEL::Exception);
3244 virtual MEDFileParameter1TS *deepCopy() const throw(INTERP_KERNEL::Exception);
3245 virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
3246 void setName(const std::string& name) throw(INTERP_KERNEL::Exception);
3247 std::string getName() const throw(INTERP_KERNEL::Exception);
3248 void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
3251 MEDFileParameterDouble1TS()
3253 return MEDFileParameterDouble1TS::New();
3256 MEDFileParameterDouble1TS(const std::string& fileName) throw(INTERP_KERNEL::Exception)
3258 return MEDFileParameterDouble1TS::New(fileName);
3261 MEDFileParameterDouble1TS(const std::string& fileName, const std::string& paramName) throw(INTERP_KERNEL::Exception)
3263 return MEDFileParameterDouble1TS::New(fileName,paramName);
3266 MEDFileParameterDouble1TS(const std::string& fileName, const std::string& paramName, int dt, int it) throw(INTERP_KERNEL::Exception)
3268 return MEDFileParameterDouble1TS::New(fileName,paramName,dt,it);
3271 std::string __str__() const throw(INTERP_KERNEL::Exception)
3273 return self->simpleRepr();
3276 PyObject *isEqual(const MEDFileParameter1TS *other, double eps) const throw(INTERP_KERNEL::Exception)
3279 bool ret0=self->isEqual(other,eps,what);
3280 PyObject *res=PyList_New(2);
3281 PyObject *ret0Py=ret0?Py_True:Py_False;
3283 PyList_SetItem(res,0,ret0Py);
3284 PyList_SetItem(res,1,PyString_FromString(what.c_str()));
3290 class MEDFileParameterMultiTS : public RefCountObject, public MEDFileParameterTinyInfo
3293 static MEDFileParameterMultiTS *New();
3294 static MEDFileParameterMultiTS *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
3295 static MEDFileParameterMultiTS *New(const std::string& fileName, const std::string& paramName) throw(INTERP_KERNEL::Exception);
3296 std::string getName() const;
3297 void setName(const std::string& name);
3298 MEDFileParameterMultiTS *deepCopy() const throw(INTERP_KERNEL::Exception);
3299 void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
3300 std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
3301 void appendValue(int dt, int it, double time, double val) throw(INTERP_KERNEL::Exception);
3302 double getDoubleValue(int iteration, int order) const throw(INTERP_KERNEL::Exception);
3303 int getPosOfTimeStep(int iteration, int order) const throw(INTERP_KERNEL::Exception);
3304 int getPosGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
3305 int getNumberOfTS() const throw(INTERP_KERNEL::Exception);
3308 MEDFileParameterMultiTS()
3310 return MEDFileParameterMultiTS::New();
3313 MEDFileParameterMultiTS(const std::string& fileName)
3315 return MEDFileParameterMultiTS::New(fileName);
3318 MEDFileParameterMultiTS(const std::string& fileName, const std::string& paramName)
3320 return MEDFileParameterMultiTS::New(fileName,paramName);
3323 std::string __str__() const throw(INTERP_KERNEL::Exception)
3325 return self->simpleRepr();
3328 PyObject *isEqual(const MEDFileParameterMultiTS *other, double eps) const throw(INTERP_KERNEL::Exception)
3331 bool ret0=self->isEqual(other,eps,what);
3332 PyObject *res=PyList_New(2);
3333 PyObject *ret0Py=ret0?Py_True:Py_False;
3335 PyList_SetItem(res,0,ret0Py);
3336 PyList_SetItem(res,1,PyString_FromString(what.c_str()));
3340 void eraseTimeStepIds(PyObject *ids) throw(INTERP_KERNEL::Exception)
3344 std::vector<int> pos2;
3345 DataArrayInt *pos3=0;
3346 DataArrayIntTuple *pos4=0;
3347 convertObjToPossibleCpp1(ids,sw,pos1,pos2,pos3,pos4);
3352 self->eraseTimeStepIds(&pos1,&pos1+1);
3359 self->eraseTimeStepIds(&pos2[0],&pos2[0]+pos2.size());
3364 self->eraseTimeStepIds(pos3->begin(),pos3->end());
3368 throw INTERP_KERNEL::Exception("MEDFileParameterMultiTS::eraseTimeStepIds : unexpected input array type recognized !");
3372 int getTimeStepId(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
3374 if(elt0 && PyInt_Check(elt0))
3376 int pos=InterpreteNegativeInt(PyInt_AS_LONG(elt0),self->getNumberOfTS());
3379 else if(elt0 && PyTuple_Check(elt0))
3381 if(PyTuple_Size(elt0)==2)
3383 PyObject *o0=PyTuple_GetItem(elt0,0);
3384 PyObject *o1=PyTuple_GetItem(elt0,1);
3385 if(PyInt_Check(o0) && PyInt_Check(o1))
3387 int iter=PyInt_AS_LONG(o0);
3388 int order=PyInt_AS_LONG(o1);
3389 return self->getPosOfTimeStep(iter,order);
3392 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 !");
3395 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 !");
3397 else if(elt0 && PyFloat_Check(elt0))
3399 double val=PyFloat_AS_DOUBLE(elt0);
3400 return self->getPosGivenTime(val);
3403 throw INTERP_KERNEL::Exception("MEDFileParameterMultiTS::getTimeStepId : invalid input params ! expected fmts[int], fmts[int,int] or fmts[double] to request time step !");
3406 MEDFileParameter1TS *__getitem__(PyObject *elt0) const throw(INTERP_KERNEL::Exception)
3408 MEDFileParameter1TS *ret=self->getTimeStepAtPos(MEDCoupling_MEDFileParameterMultiTS_getTimeStepId(self,elt0));
3414 std::vector<int> getTimeStepIds(PyObject *elts) const throw(INTERP_KERNEL::Exception)
3416 if(PyList_Check(elts))
3418 int sz=PyList_Size(elts);
3419 std::vector<int> ret(sz);
3420 for(int i=0;i<sz;i++)
3422 PyObject *elt=PyList_GetItem(elts,i);
3423 ret[i]=MEDCoupling_MEDFileParameterMultiTS_getTimeStepId(self,elt);
3429 std::vector<int> ret(1);
3430 ret[0]=MEDCoupling_MEDFileParameterMultiTS_getTimeStepId(self,elts);
3435 void __delitem__(PyObject *elts) throw(INTERP_KERNEL::Exception)
3437 std::vector<int> idsToRemove=MEDCoupling_MEDFileParameterMultiTS_getTimeStepIds(self,elts);
3438 if(!idsToRemove.empty())
3439 self->eraseTimeStepIds(&idsToRemove[0],&idsToRemove[0]+idsToRemove.size());
3442 MEDFileParameter1TS *getTimeStepAtPos(int posId) const throw(INTERP_KERNEL::Exception)
3444 MEDFileParameter1TS *ret=self->getTimeStepAtPos(posId);
3450 PyObject *getIterations() const throw(INTERP_KERNEL::Exception)
3452 std::vector< std::pair<int,int> > res=self->getIterations();
3453 PyObject *ret=PyList_New(res.size());
3455 for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
3457 PyObject *elt=PyTuple_New(2);
3458 PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
3459 PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
3460 PyList_SetItem(ret,rk,elt);
3465 PyObject *getTimeSteps() const throw(INTERP_KERNEL::Exception)
3467 std::vector<double> res2;
3468 std::vector< std::pair<int,int> > res=self->getTimeSteps(res2);
3469 PyObject *ret=PyList_New(res.size());
3471 for(std::vector< std::pair<int,int> >::const_iterator iter=res.begin();iter!=res.end();iter++,rk++)
3473 PyObject *elt=PyTuple_New(3);
3474 PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
3475 PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
3476 PyTuple_SetItem(elt,2,SWIG_From_double(res2[rk]));
3477 PyList_SetItem(ret,rk,elt);
3484 class MEDFileParameters : public RefCountObject, public MEDFileWritableStandAlone
3487 static MEDFileParameters *New();
3488 static MEDFileParameters *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
3489 static MEDFileParameters *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
3490 MEDFileParameters *deepCopy() const throw(INTERP_KERNEL::Exception);
3491 std::vector<std::string> getParamsNames() const throw(INTERP_KERNEL::Exception);
3492 std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
3493 void resize(int newSize) throw(INTERP_KERNEL::Exception);
3494 void pushParam(MEDFileParameterMultiTS *param) throw(INTERP_KERNEL::Exception);
3495 void setParamAtPos(int i, MEDFileParameterMultiTS *param) throw(INTERP_KERNEL::Exception);
3496 void destroyParamAtPos(int i) throw(INTERP_KERNEL::Exception);
3497 int getPosFromParamName(const std::string& paramName) const throw(INTERP_KERNEL::Exception);
3498 int getNumberOfParams() const throw(INTERP_KERNEL::Exception);
3503 return MEDFileParameters::New();
3506 MEDFileParameters(const std::string& fileName)
3508 return MEDFileParameters::New(fileName);
3511 MEDFileParameters(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
3513 return MEDFileParameters::New(db);
3517 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
3519 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileParameters");
3522 std::string __str__() const throw(INTERP_KERNEL::Exception)
3524 return self->simpleRepr();
3527 MEDFileParameterMultiTS *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
3529 if(PyInt_Check(obj))
3531 MEDFileParameterMultiTS *ret=self->getParamAtPos(InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfParams()));
3536 else if(PyString_Check(obj))
3538 MEDFileParameterMultiTS *ret=self->getParamWithName(PyString_AsString(obj));
3544 throw INTERP_KERNEL::Exception("MEDFileParameters::__getitem__ : only integer or string with meshname supported !");
3547 int __len__() const throw(INTERP_KERNEL::Exception)
3549 return self->getNumberOfParams();
3552 MEDFileParameterMultiTS *getParamAtPos(int i) const throw(INTERP_KERNEL::Exception)
3554 MEDFileParameterMultiTS *ret=self->getParamAtPos(i);
3560 MEDFileParameterMultiTS *getParamWithName(const std::string& paramName) const throw(INTERP_KERNEL::Exception)
3562 MEDFileParameterMultiTS *ret=self->getParamWithName(paramName);
3568 PyObject *isEqual(const MEDFileParameters *other, double eps) const throw(INTERP_KERNEL::Exception)
3571 bool ret0=self->isEqual(other,eps,what);
3572 PyObject *res=PyList_New(2);
3573 PyObject *ret0Py=ret0?Py_True:Py_False;
3575 PyList_SetItem(res,0,ret0Py);
3576 PyList_SetItem(res,1,PyString_FromString(what.c_str()));
3582 class MEDFileData : public RefCountObject, public MEDFileWritableStandAlone
3585 static MEDFileData *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
3586 static MEDFileData *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
3587 static MEDFileData *New();
3588 MEDFileData *deepCopy() const throw(INTERP_KERNEL::Exception);
3589 void setFields(MEDFileFields *fields) throw(INTERP_KERNEL::Exception);
3590 void setMeshes(MEDFileMeshes *meshes) throw(INTERP_KERNEL::Exception);
3591 void setParams(MEDFileParameters *params) throw(INTERP_KERNEL::Exception);
3592 int getNumberOfFields() const throw(INTERP_KERNEL::Exception);
3593 int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
3594 int getNumberOfParams() const throw(INTERP_KERNEL::Exception);
3596 bool changeMeshName(const std::string& oldMeshName, const std::string& newMeshName) throw(INTERP_KERNEL::Exception);
3597 bool unPolyzeMeshes() throw(INTERP_KERNEL::Exception);
3601 MEDFileData(const std::string& fileName) throw(INTERP_KERNEL::Exception)
3603 return MEDFileData::New(fileName);
3606 MEDFileData(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
3608 return MEDFileData::New(db);
3613 return MEDFileData::New();
3616 std::string __str__() const throw(INTERP_KERNEL::Exception)
3618 return self->simpleRepr();
3621 MEDFileMeshes *getMeshes() const throw(INTERP_KERNEL::Exception)
3623 MEDFileMeshes *ret=self->getMeshes();
3629 MEDFileParameters *getParams() const throw(INTERP_KERNEL::Exception)
3631 MEDFileParameters *ret=self->getParams();
3637 MEDFileFields *getFields() const throw(INTERP_KERNEL::Exception)
3639 MEDFileFields *ret=self->getFields();
3645 bool changeMeshNames(PyObject *li) throw(INTERP_KERNEL::Exception)
3647 std::vector< std::pair<std::string,std::string> > modifTab=convertVecPairStStFromPy(li);
3648 return self->changeMeshNames(modifTab);
3651 static MEDFileData *Aggregate(PyObject *mfds) throw(INTERP_KERNEL::Exception)
3653 std::vector<const MEDFileData *> mfdsCpp;
3654 convertFromPyObjVectorOfObj<const MEDCoupling::MEDFileData *>(mfds,SWIGTYPE_p_MEDCoupling__MEDFileData,"MEDFileData",mfdsCpp);
3655 MCAuto<MEDFileData> ret(MEDFileData::Aggregate(mfdsCpp));
3660 static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
3662 return NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(cls,args,"MEDFileData");
3667 class SauvReader : public RefCountObject
3670 static SauvReader* New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
3671 MEDFileData * loadInMEDFileDS() throw(INTERP_KERNEL::Exception);
3674 SauvReader(const std::string& fileName) throw(INTERP_KERNEL::Exception)
3676 return SauvReader::New(fileName);
3681 class SauvWriter : public RefCountObject
3684 static SauvWriter * New();
3685 void setMEDFileDS(const MEDFileData* medData, unsigned meshIndex = 0) throw(INTERP_KERNEL::Exception);
3686 void write(const std::string& fileName) throw(INTERP_KERNEL::Exception);
3687 void setCpyGrpIfOnASingleFamilyStatus(bool status) throw(INTERP_KERNEL::Exception);
3688 bool getCpyGrpIfOnASingleFamilyStatus() const throw(INTERP_KERNEL::Exception);
3691 SauvWriter() throw(INTERP_KERNEL::Exception)
3693 return SauvWriter::New();
3700 class MEDFileMeshStruct;
3702 class MEDFileField1TSStructItem
3705 static MEDFileField1TSStructItem BuildItemFrom(const MEDFileAnyTypeField1TS *ref, const MEDFileMeshStruct *meshSt) throw(INTERP_KERNEL::Exception);
3708 class MEDFileMeshStruct : public RefCountObject
3711 static MEDFileMeshStruct *New(const MEDFileMesh *mesh) throw(INTERP_KERNEL::Exception);
3713 ~MEDFileMeshStruct();
3716 class MEDMeshMultiLev : public RefCountObject
3719 virtual MEDMeshMultiLev *prepare() const throw(INTERP_KERNEL::Exception);
3720 DataArray *buildDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const throw(INTERP_KERNEL::Exception);
3721 DataArrayInt *retrieveGlobalNodeIdsIfAny() const throw(INTERP_KERNEL::Exception);
3727 PyObject *retrieveFamilyIdsOnCells() const throw(INTERP_KERNEL::Exception)
3729 DataArrayInt *famIds(0);
3730 bool isWithoutCopy(false);
3731 self->retrieveFamilyIdsOnCells(famIds,isWithoutCopy);
3732 PyObject *ret=PyTuple_New(2);
3733 PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
3735 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3736 PyTuple_SetItem(ret,1,ret1Py);
3740 PyObject *retrieveNumberIdsOnCells() const throw(INTERP_KERNEL::Exception)
3742 DataArrayInt *numIds(0);
3743 bool isWithoutCopy(false);
3744 self->retrieveNumberIdsOnCells(numIds,isWithoutCopy);
3745 PyObject *ret=PyTuple_New(2);
3746 PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
3748 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3749 PyTuple_SetItem(ret,1,ret1Py);
3753 PyObject *retrieveFamilyIdsOnNodes() const throw(INTERP_KERNEL::Exception)
3755 DataArrayInt *famIds(0);
3756 bool isWithoutCopy(false);
3757 self->retrieveFamilyIdsOnNodes(famIds,isWithoutCopy);
3758 PyObject *ret=PyTuple_New(2);
3759 PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
3761 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3762 PyTuple_SetItem(ret,1,ret1Py);
3766 PyObject *retrieveNumberIdsOnNodes() const throw(INTERP_KERNEL::Exception)
3768 DataArrayInt *numIds(0);
3769 bool isWithoutCopy(false);
3770 self->retrieveNumberIdsOnNodes(numIds,isWithoutCopy);
3771 PyObject *ret=PyTuple_New(2);
3772 PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
3774 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3775 PyTuple_SetItem(ret,1,ret1Py);
3779 PyObject *getGeoTypes() const throw(INTERP_KERNEL::Exception)
3781 std::vector< INTERP_KERNEL::NormalizedCellType > result(self->getGeoTypes());
3782 std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator iL(result.begin());
3783 PyObject *res(PyList_New(result.size()));
3784 for(int i=0;iL!=result.end(); i++, iL++)
3785 PyList_SetItem(res,i,PyInt_FromLong(*iL));
3791 class MEDUMeshMultiLev : public MEDMeshMultiLev
3794 ~MEDUMeshMultiLev();
3798 PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
3800 DataArrayDouble *coords(0); DataArrayByte *types(0); DataArrayInt *cellLocations(0),*cells(0),*faceLocations(0),*faces(0);
3801 bool ncc(self->buildVTUArrays(coords,types,cellLocations,cells,faceLocations,faces));
3802 PyObject *ret0Py=ncc?Py_True:Py_False;
3804 PyObject *ret=PyTuple_New(7);
3805 PyTuple_SetItem(ret,0,ret0Py);
3806 PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(coords),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
3807 PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(types),SWIGTYPE_p_MEDCoupling__DataArrayByte, SWIG_POINTER_OWN | 0 ));
3808 PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellLocations),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3809 PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(cells),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3810 PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(faceLocations),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3811 PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(faces),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3817 class MEDStructuredMeshMultiLev : public MEDMeshMultiLev
3820 ~MEDStructuredMeshMultiLev();
3823 class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
3826 ~MEDCMeshMultiLev();
3830 PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
3833 std::vector< DataArrayDouble * > objs(self->buildVTUArrays(isInternal));
3834 std::size_t sz(objs.size());
3835 PyObject *ret(PyTuple_New(2));
3836 PyObject *ret0=PyList_New(sz);
3837 for(std::size_t i=0;i<sz;i++)
3838 PyList_SetItem(ret0,i,SWIG_NewPointerObj(SWIG_as_voidptr(objs[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
3839 PyTuple_SetItem(ret,0,ret0);
3840 PyObject *ret1Py(isInternal?Py_True:Py_False);
3842 PyTuple_SetItem(ret,1,ret1Py);
3848 class MEDCurveLinearMeshMultiLev : public MEDStructuredMeshMultiLev
3851 ~MEDCurveLinearMeshMultiLev();
3855 PyObject *buildVTUArrays() const throw(INTERP_KERNEL::Exception)
3857 DataArrayDouble *ret0(0);
3858 std::vector<int> ret1;
3860 self->buildVTUArrays(ret0,ret1,ret2);
3861 std::size_t sz(ret1.size());
3862 PyObject *ret=PyTuple_New(3);
3863 PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
3864 PyObject *ret1Py=PyList_New(sz);
3865 for(std::size_t i=0;i<sz;i++)
3866 PyList_SetItem(ret1Py,i,SWIG_From_int(ret1[i]));
3867 PyTuple_SetItem(ret,1,ret1Py);
3868 PyObject *ret2Py(ret2?Py_True:Py_False);
3870 PyTuple_SetItem(ret,2,ret2Py);
3876 class MEDFileFastCellSupportComparator : public RefCountObject
3879 static MEDFileFastCellSupportComparator *New(const MEDFileMeshStruct *m, const MEDFileAnyTypeFieldMultiTS *ref) throw(INTERP_KERNEL::Exception);
3880 MEDMeshMultiLev *buildFromScratchDataSetSupport(int timeStepId, const MEDFileFieldGlobsReal *globs) const throw(INTERP_KERNEL::Exception);
3881 bool isDataSetSupportEqualToThePreviousOne(int timeStepId, const MEDFileFieldGlobsReal *globs) const throw(INTERP_KERNEL::Exception);
3882 int getNumberOfTS() const throw(INTERP_KERNEL::Exception);
3884 ~MEDFileFastCellSupportComparator();
3888 PyObject *getGeoTypesAt(int timeStepId, const MEDFileMesh *m) const throw(INTERP_KERNEL::Exception)
3890 std::vector< INTERP_KERNEL::NormalizedCellType > result(self->getGeoTypesAt(timeStepId,m));
3891 std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator iL(result.begin());
3892 PyObject *res(PyList_New(result.size()));
3893 for(int i=0;iL!=result.end(); i++, iL++)
3894 PyList_SetItem(res,i,PyInt_FromLong(*iL));