]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/MEDCoupling_Swig/MEDCouplingCommon.i
Salome HOME
Ajouts des tests
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingCommon.i
1 // Copyright (C) 2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay (EDF R&D)
20
21 #ifdef WITH_DOCSTRINGS
22 %include MEDCoupling_doc.i
23 #endif
24
25 %include std_vector.i
26 %include std_string.i
27
28 %{
29 #include "MEDCouplingMemArray.hxx"
30 #include "MEDCouplingUMesh.hxx"
31 #include "MEDCouplingMappedExtrudedMesh.hxx"
32 #include "MEDCouplingCMesh.hxx"
33 #include "MEDCouplingIMesh.hxx"
34 #include "MEDCouplingCurveLinearMesh.hxx"
35 #include "MEDCoupling1GTUMesh.hxx"
36 #include "MEDCouplingField.hxx"
37 #include "MEDCouplingFieldDouble.hxx"
38 #include "MEDCouplingFieldInt.hxx"
39 #include "MEDCouplingFieldFloat.hxx"
40 #include "MEDCouplingFieldTemplate.hxx"
41 #include "MEDCouplingGaussLocalization.hxx"
42 #include "MCAuto.hxx"
43 #include "MEDCouplingMultiFields.hxx"
44 #include "MEDCouplingFieldOverTime.hxx"
45 #include "MEDCouplingDefinitionTime.hxx"
46 #include "MEDCouplingFieldDiscretization.hxx"
47 #include "MEDCouplingCartesianAMRMesh.hxx"
48 #include "MEDCouplingAMRAttribute.hxx"
49 #include "MEDCouplingMatrix.hxx"
50 #include "MEDCouplingPartDefinition.hxx"
51 #include "MEDCouplingSkyLineArray.hxx"
52 #include "MEDCouplingTypemaps.i"
53
54 #include "InterpKernelAutoPtr.hxx"
55 #include "BoxSplittingOptions.hxx"
56
57 using namespace MEDCoupling;
58 using namespace INTERP_KERNEL;
59
60 %}
61
62 %template(ivec) std::vector<int>;
63 %template(dvec) std::vector<double>;
64 %template(svec) std::vector<std::string>;
65
66 ////////////////////
67 %typemap(out) MEDCoupling::MEDCouplingMesh*
68 {
69   $result=convertMesh($1,$owner);
70 }
71
72 %typemap(out) MEDCouplingMesh*
73 {
74   $result=convertMesh($1,$owner);
75 }
76 //$$$$$$$$$$$$$$$$$$
77
78 ////////////////////
79 %typemap(out) MEDCoupling::MEDCouplingPointSet*
80 {
81   $result=convertMesh($1,$owner);
82 }
83
84 %typemap(out) MEDCouplingPointSet*
85 {
86   $result=convertMesh($1,$owner);
87 }
88 //$$$$$$$$$$$$$$$$$$
89
90 ////////////////////
91 %typemap(out) MEDCouplingCartesianAMRPatchGen*
92 {
93   $result=convertCartesianAMRPatch($1,$owner);
94 }
95 //$$$$$$$$$$$$$$$$$$
96
97 ////////////////////
98 %typemap(out) MEDCouplingCartesianAMRMeshGen*
99 {
100   $result=convertCartesianAMRMesh($1,$owner);
101 }
102 //$$$$$$$$$$$$$$$$$$
103
104 ////////////////////
105 %typemap(out) MEDCouplingDataForGodFather*
106 {
107   $result=convertDataForGodFather($1,$owner);
108 }
109 //$$$$$$$$$$$$$$$$$$
110
111 ////////////////////
112 %typemap(out) MEDCoupling::MEDCoupling1GTUMesh*
113 {
114   $result=convertMesh($1,$owner);
115 }
116
117 %typemap(out) MEDCoupling1GTUMesh*
118 {
119   $result=convertMesh($1,$owner);
120 }
121 //$$$$$$$$$$$$$$$$$$
122
123 ////////////////////
124 %typemap(out) MEDCoupling::MEDCouplingStructuredMesh*
125 {
126   $result=convertMesh($1,$owner);
127 }
128
129 %typemap(out) MEDCouplingStructuredMesh*
130 {
131   $result=convertMesh($1,$owner);
132 }
133 //$$$$$$$$$$$$$$$$$$
134
135 ////////////////////
136 %typemap(out) MEDCoupling::MEDCouplingFieldDiscretization*
137 {
138   $result=convertFieldDiscretization($1,$owner);
139 }
140
141 %typemap(out) MEDCouplingFieldDiscretization*
142 {
143   $result=convertFieldDiscretization($1,$owner);
144 }
145 //$$$$$$$$$$$$$$$$$$
146
147 ////////////////////
148 %typemap(out) MEDCoupling::MEDCouplingField*
149 {
150   $result=convertField($1,$owner);
151 }
152
153 %typemap(out) MEDCouplingField*
154 {
155   $result=convertField($1,$owner);
156 }
157 //$$$$$$$$$$$$$$$$$$
158
159 ////////////////////
160 %typemap(out) MEDCoupling::MEDCouplingMultiFields*
161 {
162   $result=convertMultiFields($1,$owner);
163 }
164
165 %typemap(out) MEDCouplingMultiFields*
166 {
167   $result=convertMultiFields($1,$owner);
168 }
169 //$$$$$$$$$$$$$$$$$$
170
171 ////////////////////
172 %typemap(out) MEDCoupling::PartDefinition*
173 {
174   $result=convertPartDefinition($1,$owner);
175 }
176
177 %typemap(out) PartDefinition*
178 {
179   $result=convertPartDefinition($1,$owner);
180 }
181 //$$$$$$$$$$$$$$$$$$
182
183 #ifdef WITH_NUMPY
184 %init %{ import_array(); %}
185 #endif
186
187 %init %{ initializeMe(); %}
188
189 %feature("autodoc", "1");
190 %feature("docstring");
191
192 %newobject MEDCoupling::MEDCouplingField::buildMeasureField;
193 %newobject MEDCoupling::MEDCouplingField::getLocalizationOfDiscr;
194 %newobject MEDCoupling::MEDCouplingField::computeTupleIdsToSelectFromCellIds;
195 %newobject MEDCoupling::MEDCouplingFieldDouble::New;
196 %newobject MEDCoupling::MEDCouplingFieldDouble::getArray;
197 %newobject MEDCoupling::MEDCouplingFieldDouble::getEndArray;
198 %newobject MEDCoupling::MEDCouplingFieldDouble::MergeFields;
199 %newobject MEDCoupling::MEDCouplingFieldDouble::MeldFields;
200 %newobject MEDCoupling::MEDCouplingFieldDouble::convertToIntField;
201 %newobject MEDCoupling::MEDCouplingFieldDouble::convertToFloatField;
202 %newobject MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct;
203 %newobject MEDCoupling::MEDCouplingFieldDouble::determinant;
204 %newobject MEDCoupling::MEDCouplingFieldDouble::eigenValues;
205 %newobject MEDCoupling::MEDCouplingFieldDouble::eigenVectors;
206 %newobject MEDCoupling::MEDCouplingFieldDouble::inverse;
207 %newobject MEDCoupling::MEDCouplingFieldDouble::trace;
208 %newobject MEDCoupling::MEDCouplingFieldDouble::deviator;
209 %newobject MEDCoupling::MEDCouplingFieldDouble::magnitude;
210 %newobject MEDCoupling::MEDCouplingFieldDouble::maxPerTuple;
211 %newobject MEDCoupling::MEDCouplingFieldDouble::keepSelectedComponents;
212 %newobject MEDCoupling::MEDCouplingFieldDouble::extractSlice3D;
213 %newobject MEDCoupling::MEDCouplingFieldDouble::DotFields;
214 %newobject MEDCoupling::MEDCouplingFieldDouble::dot;
215 %newobject MEDCoupling::MEDCouplingFieldDouble::CrossProductFields;
216 %newobject MEDCoupling::MEDCouplingFieldDouble::crossProduct;
217 %newobject MEDCoupling::MEDCouplingFieldDouble::MaxFields;
218 %newobject MEDCoupling::MEDCouplingFieldDouble::max;
219 %newobject MEDCoupling::MEDCouplingFieldDouble::MinFields;
220 %newobject MEDCoupling::MEDCouplingFieldDouble::AddFields;
221 %newobject MEDCoupling::MEDCouplingFieldDouble::SubstractFields;
222 %newobject MEDCoupling::MEDCouplingFieldDouble::MultiplyFields;
223 %newobject MEDCoupling::MEDCouplingFieldDouble::DivideFields;
224 %newobject MEDCoupling::MEDCouplingFieldDouble::min;
225 %newobject MEDCoupling::MEDCouplingFieldDouble::negate;
226 %newobject MEDCoupling::MEDCouplingFieldDouble::findIdsInRange;
227 %newobject MEDCoupling::MEDCouplingFieldDouble::buildSubPart;
228 %newobject MEDCoupling::MEDCouplingFieldDouble::buildSubPartRange;
229 %newobject MEDCoupling::MEDCouplingFieldDouble::voronoize;
230 %newobject MEDCoupling::MEDCouplingFieldDouble::convertQuadraticCellsToLinear;
231 %newobject MEDCoupling::MEDCouplingFieldDouble::__getitem__;
232 %newobject MEDCoupling::MEDCouplingFieldDouble::__neg__;
233 %newobject MEDCoupling::MEDCouplingFieldDouble::__add__;
234 %newobject MEDCoupling::MEDCouplingFieldDouble::__sub__;
235 %newobject MEDCoupling::MEDCouplingFieldDouble::__mul__;
236 %newobject MEDCoupling::MEDCouplingFieldDouble::__div__;
237 %newobject MEDCoupling::MEDCouplingFieldDouble::__pow__;
238 %newobject MEDCoupling::MEDCouplingFieldDouble::__radd__;
239 %newobject MEDCoupling::MEDCouplingFieldDouble::__rsub__;
240 %newobject MEDCoupling::MEDCouplingFieldDouble::__rmul__;
241 %newobject MEDCoupling::MEDCouplingFieldDouble::__rdiv__;
242 %newobject MEDCoupling::MEDCouplingFieldDouble::clone;
243 %newobject MEDCoupling::MEDCouplingFieldDouble::cloneWithMesh;
244 %newobject MEDCoupling::MEDCouplingFieldDouble::deepCopy;
245 %newobject MEDCoupling::MEDCouplingFieldDouble::buildNewTimeReprFromThis;
246 %newobject MEDCoupling::MEDCouplingFieldDouble::nodeToCellDiscretization;
247 %newobject MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization;
248 %newobject MEDCoupling::MEDCouplingFieldDouble::getValueOnMulti;
249 %newobject MEDCoupling::MEDCouplingFieldDouble::computeVectorFieldCyl;
250 %newobject MEDCoupling::MEDCouplingFieldInt::New;
251 %newobject MEDCoupling::MEDCouplingFieldInt::convertToDblField;
252 %newobject MEDCoupling::MEDCouplingFieldInt::getArray;
253 %newobject MEDCoupling::MEDCouplingFieldInt::deepCopy;
254 %newobject MEDCoupling::MEDCouplingFieldInt::clone;
255 %newobject MEDCoupling::MEDCouplingFieldInt::cloneWithMesh;
256 %newobject MEDCoupling::MEDCouplingFieldInt::buildSubPart;
257 %newobject MEDCoupling::MEDCouplingFieldInt::buildSubPartRange;
258 %newobject MEDCoupling::MEDCouplingFieldInt::__getitem__;
259 %newobject MEDCoupling::MEDCouplingFieldFloat::New;
260 %newobject MEDCoupling::MEDCouplingFieldFloat::convertToDblField;
261 %newobject MEDCoupling::MEDCouplingFieldFloat::getArray;
262 %newobject MEDCoupling::MEDCouplingFieldFloat::deepCopy;
263 %newobject MEDCoupling::MEDCouplingFieldFloat::clone;
264 %newobject MEDCoupling::MEDCouplingFieldFloat::cloneWithMesh;
265 %newobject MEDCoupling::MEDCouplingFieldFloat::buildSubPart;
266 %newobject MEDCoupling::MEDCouplingFieldFloat::buildSubPartRange;
267 %newobject MEDCoupling::MEDCouplingFieldFloat::__getitem__;
268 %newobject MEDCoupling::MEDCouplingFieldTemplate::New;
269 %newobject MEDCoupling::MEDCouplingMesh::deepCopy;
270 %newobject MEDCoupling::MEDCouplingMesh::clone;
271 %newobject MEDCoupling::MEDCouplingMesh::checkDeepEquivalOnSameNodesWith;
272 %newobject MEDCoupling::MEDCouplingMesh::checkTypeConsistencyAndContig;
273 %newobject MEDCoupling::MEDCouplingMesh::computeNbOfNodesPerCell;
274 %newobject MEDCoupling::MEDCouplingMesh::computeNbOfFacesPerCell;
275 %newobject MEDCoupling::MEDCouplingMesh::computeEffectiveNbOfNodesPerCell;
276 %newobject MEDCoupling::MEDCouplingMesh::buildPartRange;
277 %newobject MEDCoupling::MEDCouplingMesh::giveCellsWithType;
278 %newobject MEDCoupling::MEDCouplingMesh::getCoordinatesAndOwner;
279 %newobject MEDCoupling::MEDCouplingMesh::computeCellCenterOfMass;
280 %newobject MEDCoupling::MEDCouplingMesh::computeIsoBarycenterOfNodesPerCell;
281 %newobject MEDCoupling::MEDCouplingMesh::buildOrthogonalField;
282 %newobject MEDCoupling::MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds;
283 %newobject MEDCoupling::MEDCouplingMesh::mergeMyselfWith;
284 %newobject MEDCoupling::MEDCouplingMesh::fillFromAnalytic;
285 %newobject MEDCoupling::MEDCouplingMesh::fillFromAnalyticCompo;
286 %newobject MEDCoupling::MEDCouplingMesh::fillFromAnalyticNamedCompo;
287 %newobject MEDCoupling::MEDCouplingMesh::getMeasureField;
288 %newobject MEDCoupling::MEDCouplingMesh::simplexize;
289 %newobject MEDCoupling::MEDCouplingMesh::buildUnstructured;
290 %newobject MEDCoupling::MEDCouplingMesh::MergeMeshes;
291 %newobject MEDCoupling::MEDCouplingMesh::getDirectAccessOfCoordsArrIfInStructure;
292 %newobject MEDCoupling::MEDCouplingPointSet::zipCoordsTraducer;
293 %newobject MEDCoupling::MEDCouplingPointSet::getCellsInBoundingBox;
294 %newobject MEDCoupling::MEDCouplingPointSet::findBoundaryNodes;
295 %newobject MEDCoupling::MEDCouplingPointSet::buildBoundaryMesh;
296 %newobject MEDCoupling::MEDCouplingPointSet::MergeNodesArray;
297 %newobject MEDCoupling::MEDCouplingPointSet::buildPartOfMySelfSlice;
298 %newobject MEDCoupling::MEDCouplingPointSet::BuildInstanceFromMeshType;
299 %newobject MEDCoupling::MEDCouplingPointSet::zipConnectivityTraducer;
300 %newobject MEDCoupling::MEDCouplingPointSet::mergeMyselfWithOnSameCoords;
301 %newobject MEDCoupling::MEDCouplingPointSet::fillCellIdsToKeepFromNodeIds;
302 %newobject MEDCoupling::MEDCouplingPointSet::getCellIdsLyingOnNodes;
303 %newobject MEDCoupling::MEDCouplingPointSet::deepCopyConnectivityOnly;
304 %newobject MEDCoupling::MEDCouplingPointSet::getBoundingBoxForBBTree;
305 %newobject MEDCoupling::MEDCouplingPointSet::computeFetchedNodeIds;
306 %newobject MEDCoupling::MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells;
307 %newobject MEDCoupling::MEDCouplingPointSet::computeDiameterField;
308 %newobject MEDCoupling::MEDCouplingPointSet::__getitem__;
309 %newobject MEDCoupling::MEDCouplingUMesh::New;
310 %newobject MEDCoupling::MEDCouplingUMesh::getNodalConnectivity;
311 %newobject MEDCoupling::MEDCouplingUMesh::getNodalConnectivityIndex;
312 %newobject MEDCoupling::MEDCouplingUMesh::__iter__;
313 %newobject MEDCoupling::MEDCouplingUMesh::cellsByType;
314 %newobject MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity;
315 %newobject MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity2;
316 %newobject MEDCoupling::MEDCouplingUMesh::explode3DMeshTo1D;
317 %newobject MEDCoupling::MEDCouplingUMesh::explodeMeshIntoMicroEdges;
318 %newobject MEDCoupling::MEDCouplingUMesh::buildExtrudedMesh;
319 %newobject MEDCoupling::MEDCouplingUMesh::buildSpreadZonesWithPoly;
320 %newobject MEDCoupling::MEDCouplingUMesh::MergeUMeshes;
321 %newobject MEDCoupling::MEDCouplingUMesh::MergeUMeshesOnSameCoords;
322 %newobject MEDCoupling::MEDCouplingUMesh::ComputeSpreadZoneGradually;
323 %newobject MEDCoupling::MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed;
324 %newobject MEDCoupling::MEDCouplingUMesh::buildNewNumberingFromCommNodesFrmt;
325 %newobject MEDCoupling::MEDCouplingUMesh::conformize2D;
326 %newobject MEDCoupling::MEDCouplingUMesh::conformize3D;
327 %newobject MEDCoupling::MEDCouplingUMesh::colinearize2D;
328 %newobject MEDCoupling::MEDCouplingUMesh::colinearizeKeepingConform2D;
329 %newobject MEDCoupling::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes;
330 %newobject MEDCoupling::MEDCouplingUMesh::sortCellsInMEDFileFrmt;
331 %newobject MEDCoupling::MEDCouplingUMesh::getRenumArrForMEDFileFrmt;
332 %newobject MEDCoupling::MEDCouplingUMesh::convertCellArrayPerGeoType;
333 %newobject MEDCoupling::MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec;
334 %newobject MEDCoupling::MEDCouplingUMesh::buildDirectionVectorField;
335 %newobject MEDCoupling::MEDCouplingUMesh::convertLinearCellsToQuadratic;
336 %newobject MEDCoupling::MEDCouplingUMesh::getEdgeRatioField;
337 %newobject MEDCoupling::MEDCouplingUMesh::getAspectRatioField;
338 %newobject MEDCoupling::MEDCouplingUMesh::getWarpField;
339 %newobject MEDCoupling::MEDCouplingUMesh::getSkewField;
340 %newobject MEDCoupling::MEDCouplingUMesh::getPartBarycenterAndOwner;
341 %newobject MEDCoupling::MEDCouplingUMesh::computePlaneEquationOf3DFaces;
342 %newobject MEDCoupling::MEDCouplingUMesh::getPartMeasureField;
343 %newobject MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField;
344 %newobject MEDCoupling::MEDCouplingUMesh::keepCellIdsByType;
345 %newobject MEDCoupling::MEDCouplingUMesh::Build0DMeshFromCoords;
346 %newobject MEDCoupling::MEDCouplingUMesh::Build1DMeshFromCoords;
347 %newobject MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells;
348 %newobject MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DCells;
349 %newobject MEDCoupling::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh;
350 %newobject MEDCoupling::MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh;
351 %newobject MEDCoupling::MEDCouplingUMesh::findCellIdsOnBoundary;
352 %newobject MEDCoupling::MEDCouplingUMesh::computeSkin;
353 %newobject MEDCoupling::MEDCouplingUMesh::buildSetInstanceFromThis;
354 %newobject MEDCoupling::MEDCouplingUMesh::getCellIdsCrossingPlane;
355 %newobject MEDCoupling::MEDCouplingUMesh::convexEnvelop2D;
356 %newobject MEDCoupling::MEDCouplingUMesh::ComputeRangesFromTypeDistribution;
357 %newobject MEDCoupling::MEDCouplingUMesh::buildUnionOf2DMesh;
358 %newobject MEDCoupling::MEDCouplingUMesh::buildUnionOf3DMesh;
359 %newobject MEDCoupling::MEDCouplingUMesh::generateGraph;
360 %newobject MEDCoupling::MEDCouplingUMesh::orderConsecutiveCells1D;
361 %newobject MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane;
362 %newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast;
363 %newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic;
364 %newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic;
365 %newobject MEDCoupling::MEDCouplingUMesh::convertDegeneratedCellsAndRemoveFlatOnes;
366 %newobject MEDCoupling::MEDCouplingUMeshCellByTypeEntry::__iter__;
367 %newobject MEDCoupling::MEDCouplingUMeshCellEntry::__iter__;
368 %newobject MEDCoupling::MEDCoupling1GTUMesh::New;
369 %newobject MEDCoupling::MEDCoupling1GTUMesh::getNodalConnectivity;
370 %newobject MEDCoupling::MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh;
371 %newobject MEDCoupling::MEDCoupling1SGTUMesh::New;
372 %newobject MEDCoupling::MEDCoupling1SGTUMesh::buildSetInstanceFromThis;
373 %newobject MEDCoupling::MEDCoupling1SGTUMesh::computeDualMesh;
374 %newobject MEDCoupling::MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4;
375 %newobject MEDCoupling::MEDCoupling1SGTUMesh::sortHexa8EachOther;
376 %newobject MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshes;
377 %newobject MEDCoupling::MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords;
378 %newobject MEDCoupling::MEDCoupling1DGTUMesh::New;
379 %newobject MEDCoupling::MEDCoupling1DGTUMesh::getNodalConnectivityIndex;
380 %newobject MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis;
381 %newobject MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshes;
382 %newobject MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords;
383 %newobject MEDCoupling::MEDCouplingMappedExtrudedMesh::New;
384 %newobject MEDCoupling::MEDCouplingMappedExtrudedMesh::build3DUnstructuredMesh;
385 %newobject MEDCoupling::MEDCouplingStructuredMesh::buildStructuredSubPart;
386 %newobject MEDCoupling::MEDCouplingStructuredMesh::build1SGTUnstructured;
387 %newobject MEDCoupling::MEDCouplingStructuredMesh::build1SGTSubLevelMesh;
388 %newobject MEDCoupling::MEDCouplingStructuredMesh::BuildExplicitIdsFrom;
389 %newobject MEDCoupling::MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom;
390 %newobject MEDCoupling::MEDCouplingStructuredMesh::Build1GTNodalConnectivity;
391 %newobject MEDCoupling::MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh;
392 %newobject MEDCoupling::MEDCouplingStructuredMesh::ComputeCornersGhost;
393 %newobject MEDCoupling::MEDCouplingCMesh::New;
394 %newobject MEDCoupling::MEDCouplingCMesh::getCoordsAt;
395 %newobject MEDCoupling::MEDCouplingCMesh::buildCurveLinear;
396 %newobject MEDCoupling::MEDCouplingIMesh::New;
397 %newobject MEDCoupling::MEDCouplingIMesh::asSingleCell;
398 %newobject MEDCoupling::MEDCouplingIMesh::buildWithGhost;
399 %newobject MEDCoupling::MEDCouplingIMesh::convertToCartesian;
400 %newobject MEDCoupling::MEDCouplingCurveLinearMesh::New;
401 %newobject MEDCoupling::MEDCouplingCurveLinearMesh::getCoords;
402 %newobject MEDCoupling::MEDCouplingMultiFields::New;
403 %newobject MEDCoupling::MEDCouplingMultiFields::deepCopy;
404 %newobject MEDCoupling::MEDCouplingFieldOverTime::New;
405 %newobject MEDCoupling::MEDCouplingCartesianAMRPatchGen::getMesh;
406 %newobject MEDCoupling::MEDCouplingCartesianAMRPatchGen::__getitem__;
407 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::deepCopy;
408 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildUnstructured;
409 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::extractGhostFrom;
410 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildMeshFromPatchEnvelop;
411 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildMeshOfDirectChildrenOnly;
412 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::getImageMesh;
413 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::getGodFather;
414 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::getFather;
415 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::getPatch;
416 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::createCellFieldOnPatch;
417 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::findPatchesInTheNeighborhoodOf;
418 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::getPatchAtPosition;
419 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::getMeshAtPosition;
420 %newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::__getitem__;
421 %newobject MEDCoupling::MEDCouplingCartesianAMRMesh::New;
422 %newobject MEDCoupling::MEDCouplingDataForGodFather::getMyGodFather;
423 %newobject MEDCoupling::MEDCouplingAMRAttribute::New;
424 %newobject MEDCoupling::MEDCouplingAMRAttribute::deepCopy;
425 %newobject MEDCoupling::MEDCouplingAMRAttribute::deepCpyWithoutGodFather;
426 %newobject MEDCoupling::MEDCouplingAMRAttribute::getFieldOn;
427 %newobject MEDCoupling::MEDCouplingAMRAttribute::projectTo;
428 %newobject MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnRecurseWithoutOverlapWithoutGhost;
429 %newobject MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithGhost;
430 %newobject MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost;
431 %newobject MEDCoupling::DenseMatrix::New;
432 %newobject MEDCoupling::DenseMatrix::deepCopy;
433 %newobject MEDCoupling::DenseMatrix::shallowCpy;
434 %newobject MEDCoupling::DenseMatrix::getData;
435 %newobject MEDCoupling::DenseMatrix::matVecMult;
436 %newobject MEDCoupling::DenseMatrix::MatVecMult;
437 %newobject MEDCoupling::DenseMatrix::__add__;
438 %newobject MEDCoupling::DenseMatrix::__sub__;
439 %newobject MEDCoupling::DenseMatrix::__mul__;
440 %newobject MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell;
441 %newobject MEDCoupling::MEDCouplingGaussLocalization::buildRefCell;
442 %newobject MEDCoupling::MEDCouplingSkyLineArray::BuildFromPolyhedronConn;
443 %newobject MEDCoupling::MEDCouplingSkyLineArray::getSuperIndexArray;
444 %newobject MEDCoupling::MEDCouplingSkyLineArray::getIndexArray;
445 %newobject MEDCoupling::MEDCouplingSkyLineArray::getValuesArray;
446
447 %feature("unref") MEDCouplingPointSet "$this->decrRef();"
448 %feature("unref") MEDCouplingMesh "$this->decrRef();"
449 %feature("unref") MEDCouplingUMesh "$this->decrRef();"
450 %feature("unref") MEDCoupling1GTUMesh "$this->decrRef();"
451 %feature("unref") MEDCoupling1SGTUMesh "$this->decrRef();"
452 %feature("unref") MEDCoupling1DGTUMesh "$this->decrRef();"
453 %feature("unref") MEDCouplingMappedExtrudedMesh "$this->decrRef();"
454 %feature("unref") MEDCouplingCMesh "$this->decrRef();"
455 %feature("unref") MEDCouplingIMesh "$this->decrRef();"
456 %feature("unref") MEDCouplingCurveLinearMesh "$this->decrRef();"
457 %feature("unref") MEDCouplingField "$this->decrRef();"
458 %feature("unref") MEDCouplingFieldDiscretizationP0 "$this->decrRef();"
459 %feature("unref") MEDCouplingFieldDiscretizationP1 "$this->decrRef();"
460 %feature("unref") MEDCouplingFieldDiscretizationGauss "$this->decrRef();"
461 %feature("unref") MEDCouplingFieldDiscretizationGaussNE "$this->decrRef();"
462 %feature("unref") MEDCouplingFieldDiscretizationKriging "$this->decrRef();"
463 %feature("unref") MEDCouplingFieldDouble "$this->decrRef();"
464 %feature("unref") MEDCouplingFieldFloat "$this->decrRef();"
465 %feature("unref") MEDCouplingFieldInt "$this->decrRef();"
466 %feature("unref") MEDCouplingMultiFields "$this->decrRef();"
467 %feature("unref") MEDCouplingFieldTemplate "$this->decrRef();"
468 %feature("unref") MEDCouplingMultiFields "$this->decrRef();"
469 %feature("unref") MEDCouplingCartesianAMRMeshGen "$this->decrRef();"
470 %feature("unref") MEDCouplingCartesianAMRMesh "$this->decrRef();"
471 %feature("unref") MEDCouplingCartesianAMRMeshSub "$this->decrRef();"
472 %feature("unref") MEDCouplingCartesianAMRPatchGen "$this->decrRef();"
473 %feature("unref") MEDCouplingCartesianAMRPatchGF "$this->decrRef();"
474 %feature("unref") MEDCouplingCartesianAMRPatch "$this->decrRef();"
475 %feature("unref") MEDCouplingDataForGodFather "$this->decrRef();"
476 %feature("unref") MEDCouplingAMRAttribute "$this->decrRef();"
477 %feature("unref") DenseMatrix "$this->decrRef();"
478 %feature("unref") MEDCouplingSkyLineArray "$this->decrRef();"
479
480 %rename(assign) *::operator=;
481 %ignore MEDCoupling::MEDCouplingGaussLocalization::pushTinySerializationIntInfo;
482 %ignore MEDCoupling::MEDCouplingGaussLocalization::pushTinySerializationDblInfo;
483 %ignore MEDCoupling::MEDCouplingGaussLocalization::fillWithValues;
484 %ignore MEDCoupling::MEDCouplingGaussLocalization::buildNewInstanceFromTinyInfo;
485
486 %nodefaultctor;
487
488 %rename (InterpKernelException) INTERP_KERNEL::Exception;
489
490 %include "MEDCouplingRefCountObject.i"
491 %include "MEDCouplingMemArray.i"
492
493 %{
494   void initializeMe()
495   {// AGY : here initialization of C++ traits in MEDCouplingDataArrayTypemaps.i for code factorization. Awful, I know, but no other solutions.
496     SWIGTITraits<double>::TI=SWIGTYPE_p_MEDCoupling__DataArrayDouble;
497     SWIGTITraits<float>::TI=SWIGTYPE_p_MEDCoupling__DataArrayFloat;
498     SWIGTITraits<int>::TI=SWIGTYPE_p_MEDCoupling__DataArrayInt;
499     SWIGTITraits<double>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayDoubleTuple;
500     SWIGTITraits<float>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayFloatTuple;
501     SWIGTITraits<int>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayIntTuple;
502   }
503 %}
504
505 namespace INTERP_KERNEL
506
507   /*!
508    * \class BoxSplittingOptions
509    * Class defining the options for box splitting used for AMR algorithm like creation of patches following a criterion.
510    */
511   class BoxSplittingOptions
512   {
513   public:
514     BoxSplittingOptions();
515     void init() throw(INTERP_KERNEL::Exception);
516     double getEfficiencyGoal() const throw(INTERP_KERNEL::Exception);
517     void setEfficiencyGoal(double efficiency) throw(INTERP_KERNEL::Exception);
518     double getEfficiencyThreshold() const throw(INTERP_KERNEL::Exception);
519     void setEfficiencyThreshold(double efficiencyThreshold) throw(INTERP_KERNEL::Exception);
520     int getMinimumPatchLength() const throw(INTERP_KERNEL::Exception);
521     void setMinimumPatchLength(int minPatchLength) throw(INTERP_KERNEL::Exception);
522     int getMaximumPatchLength() const throw(INTERP_KERNEL::Exception);
523     void setMaximumPatchLength(int maxPatchLength) throw(INTERP_KERNEL::Exception);
524     int getMaximumNbOfCellsInPatch() const throw(INTERP_KERNEL::Exception);
525     void setMaximumNbOfCellsInPatch(int maxNbCellsInPatch) throw(INTERP_KERNEL::Exception);
526     void copyOptions(const BoxSplittingOptions & other) throw(INTERP_KERNEL::Exception);
527     std::string printOptions() const throw(INTERP_KERNEL::Exception);
528     %extend
529     {
530       std::string __str__() const throw(INTERP_KERNEL::Exception)
531       {
532         return self->printOptions();
533       }
534     }
535   };
536 }
537
538 namespace MEDCoupling
539 {
540   typedef enum
541     {
542       ON_CELLS = 0,
543       ON_NODES = 1,
544       ON_GAUSS_PT = 2,
545       ON_GAUSS_NE = 3,
546       ON_NODES_KR = 4
547     } TypeOfField;
548
549   typedef enum
550     {
551       NO_TIME = 4,
552       ONE_TIME = 5,
553       LINEAR_TIME = 6,
554       CONST_ON_TIME_INTERVAL = 7
555     } TypeOfTimeDiscretization;
556
557   typedef enum
558     {
559       UNSTRUCTURED = 5,
560       CARTESIAN = 7,
561       EXTRUDED = 8,
562       CURVE_LINEAR = 9,
563       SINGLE_STATIC_GEO_TYPE_UNSTRUCTURED = 10,
564       SINGLE_DYNAMIC_GEO_TYPE_UNSTRUCTURED = 11,
565       IMAGE_GRID = 12
566     } MEDCouplingMeshType;
567
568   class DataArrayInt;
569   class DataArrayDouble;
570   class MEDCouplingUMesh;
571   class MEDCouplingCMesh;
572   class MEDCouplingFieldDouble;
573
574   %extend RefCountObject
575   {
576     std::string getHiddenCppPointer() const
577     {
578       std::ostringstream oss; oss << "C++ Pointer address is : " << self;
579       return oss.str();
580     }
581   }
582
583   %extend MEDCouplingGaussLocalization
584   {
585     std::string __str__() const throw(INTERP_KERNEL::Exception)
586     {
587       return self->getStringRepr();
588     }
589
590     std::string __repr__() const throw(INTERP_KERNEL::Exception)
591     {
592       std::ostringstream oss; oss << "MEDCouplingGaussLocalization C++ instance at " << self << "." << std::endl;
593       oss << self->getStringRepr();
594       return oss.str();
595     }
596   }
597
598   //== MEDCouplingMesh
599   
600   class MEDCouplingMesh : public RefCountObject, public TimeLabel
601   {
602   public:
603     void setName(const std::string& name);
604     std::string getName() const;
605     void setDescription(const std::string& descr);
606     std::string getDescription() const;
607     void setTime(double val, int iteration, int order);
608     void setTimeUnit(const std::string& unit);
609     std::string getTimeUnit() const;
610     virtual MEDCouplingMeshType getType() const throw(INTERP_KERNEL::Exception);
611     bool isStructured() const throw(INTERP_KERNEL::Exception);
612     virtual MEDCouplingMesh *deepCopy() const throw(INTERP_KERNEL::Exception);
613     virtual MEDCouplingMesh *clone(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
614     virtual bool isEqual(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception);
615     virtual bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception);
616     virtual void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception);
617     virtual void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception);
618     virtual void copyTinyInfoFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception);
619     virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
620     virtual void checkConsistency(double eps=1e-12) const throw(INTERP_KERNEL::Exception);
621     virtual int getNumberOfCells() const throw(INTERP_KERNEL::Exception);
622     virtual int getNumberOfNodes() const throw(INTERP_KERNEL::Exception);
623     virtual int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
624     virtual int getMeshDimension() const throw(INTERP_KERNEL::Exception);
625     virtual DataArrayDouble *getCoordinatesAndOwner() const throw(INTERP_KERNEL::Exception);
626     virtual DataArrayDouble *computeCellCenterOfMass() const throw(INTERP_KERNEL::Exception);
627     virtual DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
628     virtual DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
629     virtual DataArrayInt *computeNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
630     virtual DataArrayInt *computeNbOfFacesPerCell() const throw(INTERP_KERNEL::Exception);
631     virtual DataArrayInt *computeEffectiveNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
632     virtual MEDCouplingMesh *buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const throw(INTERP_KERNEL::Exception);
633     virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
634     virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
635     virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
636     virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
637     std::string writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
638     virtual std::string getVTKFileExtension() const;
639     std::string getVTKFileNameOf(const std::string& fileName) const;
640     // tools
641     virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const throw(INTERP_KERNEL::Exception);
642     virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const throw(INTERP_KERNEL::Exception);
643     virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, const std::string& func) const throw(INTERP_KERNEL::Exception);
644     virtual MEDCouplingFieldDouble *fillFromAnalyticCompo(TypeOfField t, int nbOfComp, const std::string& func) const throw(INTERP_KERNEL::Exception);
645     virtual MEDCouplingFieldDouble *fillFromAnalyticNamedCompo(TypeOfField t, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) const throw(INTERP_KERNEL::Exception);
646     virtual MEDCouplingFieldDouble *buildOrthogonalField() const throw(INTERP_KERNEL::Exception);
647     virtual MEDCouplingUMesh *buildUnstructured() const throw(INTERP_KERNEL::Exception);
648     virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const throw(INTERP_KERNEL::Exception);
649     virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const throw(INTERP_KERNEL::Exception);
650     virtual DataArrayInt *simplexize(int policy) throw(INTERP_KERNEL::Exception);
651     virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings) throw(INTERP_KERNEL::Exception);
652     static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2) throw(INTERP_KERNEL::Exception);
653     static bool IsStaticGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
654     static bool IsLinearGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
655     static INTERP_KERNEL::NormalizedCellType GetCorrespondingPolyType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
656     static int GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
657     static int GetDimensionOfGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
658     static const char *GetReprOfGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
659     %extend
660        {
661          std::string __str__() const throw(INTERP_KERNEL::Exception)
662          {
663            return self->simpleRepr();
664          }
665
666          PyObject *getTime() throw(INTERP_KERNEL::Exception)
667          {
668            int tmp1,tmp2;
669            double tmp0=self->getTime(tmp1,tmp2);
670            PyObject *res = PyList_New(3);
671            PyList_SetItem(res,0,SWIG_From_double(tmp0));
672            PyList_SetItem(res,1,SWIG_From_int(tmp1));
673            PyList_SetItem(res,2,SWIG_From_int(tmp2));
674            return res;
675          }
676
677          DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const throw(INTERP_KERNEL::Exception)
678          {
679            const DataArrayDouble *ret(self->getDirectAccessOfCoordsArrIfInStructure());
680            DataArrayDouble *ret2(const_cast<DataArrayDouble *>(ret));
681            if(ret2)
682              ret2->incrRef();
683            return ret2;
684          }
685          
686          int getCellContainingPoint(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
687          {
688            double val;
689            DataArrayDouble *a;
690            DataArrayDoubleTuple *aa;
691            std::vector<double> bb;
692            int sw;
693            int spaceDim=self->getSpaceDimension();
694            const char msg[]="Python wrap of MEDCouplingMesh::getCellContainingPoint : ";
695            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,1,spaceDim,true);
696            return self->getCellContainingPoint(pos,eps);
697          }
698
699          PyObject *getCellsContainingPoints(PyObject *p, int nbOfPoints, double eps) const throw(INTERP_KERNEL::Exception)
700          {
701            double val;
702            DataArrayDouble *a;
703            DataArrayDoubleTuple *aa;
704            std::vector<double> bb;
705            int sw;
706            int spaceDim=self->getSpaceDimension();
707            const char msg[]="Python wrap of MEDCouplingMesh::getCellsContainingPoint : ";
708            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,nbOfPoints,spaceDim,true);
709            MCAuto<DataArrayInt> elts,eltsIndex;
710            self->getCellsContainingPoints(pos,nbOfPoints,eps,elts,eltsIndex);
711            PyObject *ret=PyTuple_New(2);
712            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
713            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
714            return ret;
715          }
716
717          PyObject *getCellsContainingPointsLinearPartOnlyOnNonDynType(PyObject *p, int nbOfPoints, double eps) const throw(INTERP_KERNEL::Exception)
718          {
719            double val;
720            DataArrayDouble *a;
721            DataArrayDoubleTuple *aa;
722            std::vector<double> bb;
723            int sw;
724            int spaceDim=self->getSpaceDimension();
725            const char msg[]="Python wrap of MEDCouplingMesh::getCellsContainingPointsLinearPartOnlyOnNonDynType : ";
726            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,nbOfPoints,spaceDim,true);
727            MCAuto<DataArrayInt> elts,eltsIndex;
728            self->getCellsContainingPointsLinearPartOnlyOnNonDynType(pos,nbOfPoints,eps,elts,eltsIndex);
729            PyObject *ret=PyTuple_New(2);
730            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
731            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
732            return ret;
733          }
734
735          PyObject *getCellsContainingPoints(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
736          {
737            auto getCellsContainingPointsFunc=[self](const double *a, int b,double c, MCAuto<DataArrayInt>& d, MCAuto<DataArrayInt>& e) { self->getCellsContainingPoints(a,b,c,d,e); };
738            return Mesh_getCellsContainingPointsLike(p,eps,self,getCellsContainingPointsFunc);
739          }
740
741          PyObject *getCellsContainingPointsLinearPartOnlyOnNonDynType(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
742          {
743            auto getCellsContainingPointsFunc=[self](const double *a, int b,double c, MCAuto<DataArrayInt>& d, MCAuto<DataArrayInt>& e) { self->getCellsContainingPointsLinearPartOnlyOnNonDynType(a,b,c,d,e); };
744            return Mesh_getCellsContainingPointsLike(p,eps,self,getCellsContainingPointsFunc);
745          }
746          
747          PyObject *getCellsContainingPoint(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
748          {
749            double val;
750            DataArrayDouble *a;
751            DataArrayDoubleTuple *aa;
752            std::vector<double> bb;
753            int sw;
754            int spaceDim=self->getSpaceDimension();
755            const char msg[]="Python wrap of MEDCouplingUMesh::getCellsContainingPoint : ";
756            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,1,spaceDim,true);
757            std::vector<int> elts;
758            self->getCellsContainingPoint(pos,eps,elts);
759            DataArrayInt *ret=DataArrayInt::New();
760            ret->alloc((int)elts.size(),1);
761            std::copy(elts.begin(),elts.end(),ret->getPointer());
762            return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
763          }
764          
765          virtual PyObject *getReverseNodalConnectivity() const throw(INTERP_KERNEL::Exception)
766          {
767            MCAuto<DataArrayInt> d0=DataArrayInt::New();
768            MCAuto<DataArrayInt> d1=DataArrayInt::New();
769            self->getReverseNodalConnectivity(d0,d1);
770            PyObject *ret=PyTuple_New(2);
771            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
772            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
773            return ret;
774          }
775          
776          void renumberCells(PyObject *li, bool check=true) throw(INTERP_KERNEL::Exception)
777          {
778            int sw,sz(-1);
779            int v0; std::vector<int> v1;
780            const int *ids(convertIntStarLikePyObjToCppIntStar(li,sw,sz,v0,v1));
781            self->renumberCells(ids,check);
782          }
783
784          PyObject *checkGeoEquivalWith(const MEDCouplingMesh *other, int levOfCheck, double prec) const throw(INTERP_KERNEL::Exception)
785          {
786            DataArrayInt *cellCor, *nodeCor;
787            self->checkGeoEquivalWith(other,levOfCheck,prec,cellCor,nodeCor);
788            PyObject *res = PyList_New(2);
789            PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, cellCor?SWIG_POINTER_OWN | 0:0 ));
790            PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(nodeCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, nodeCor?SWIG_POINTER_OWN | 0:0 ));
791            return res;
792          }
793
794          PyObject *checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec) const throw(INTERP_KERNEL::Exception)
795          {
796            DataArrayInt *cellCor=0,*nodeCor=0;
797            self->checkDeepEquivalWith(other,cellCompPol,prec,cellCor,nodeCor);
798            PyObject *res = PyList_New(2);
799            PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, cellCor?SWIG_POINTER_OWN | 0:0 ));
800            PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(nodeCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, nodeCor?SWIG_POINTER_OWN | 0:0 ));
801            return res;
802          }
803          
804          DataArrayInt *checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec) const throw(INTERP_KERNEL::Exception)
805          {
806            DataArrayInt *cellCor=0;
807            self->checkDeepEquivalOnSameNodesWith(other,cellCompPol,prec,cellCor);
808            return cellCor;
809          }
810
811          DataArrayInt *getCellIdsFullyIncludedInNodeIds(PyObject *li) const throw(INTERP_KERNEL::Exception)
812          {
813            void *da=0;
814            int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
815            if (!SWIG_IsOK(res1))
816              {
817                int size;
818                INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
819                return self->getCellIdsFullyIncludedInNodeIds(tmp,((const int *)tmp)+size);
820              }
821            else
822              {
823                DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
824                if(!da2)
825                  throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
826                da2->checkAllocated();
827                return self->getCellIdsFullyIncludedInNodeIds(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
828              }
829          }
830          PyObject *getNodeIdsOfCell(int cellId) const throw(INTERP_KERNEL::Exception)
831          {
832            std::vector<int> conn;
833            self->getNodeIdsOfCell(cellId,conn);
834            return convertIntArrToPyList2(conn);
835          }
836
837          PyObject *getCoordinatesOfNode(int nodeId) const throw(INTERP_KERNEL::Exception)
838          {
839            std::vector<double> coo;
840            self->getCoordinatesOfNode(nodeId,coo);
841            return convertDblArrToPyList2(coo);
842          }
843
844          void scale(PyObject *point, double factor) throw(INTERP_KERNEL::Exception)
845          {
846            double val;
847            DataArrayDouble *a;
848            DataArrayDoubleTuple *aa;
849            std::vector<double> bb;
850            int sw;
851            int spaceDim=self->getSpaceDimension();
852            const char msg[]="Python wrap of MEDCouplingPointSet::scale : ";
853            const double *pointPtr=convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,msg,1,spaceDim,true);
854            self->scale(pointPtr,factor);
855          }
856
857          PyObject *getBoundingBox() const throw(INTERP_KERNEL::Exception)
858          {
859            int spaceDim=self->getSpaceDimension();
860            INTERP_KERNEL::AutoPtr<double> tmp=new double[2*spaceDim];
861            self->getBoundingBox(tmp);
862            PyObject *ret=convertDblArrToPyListOfTuple<double>(tmp,2,spaceDim);
863            return ret;
864          }
865
866          PyObject *isEqualIfNotWhy(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception)
867          {
868            std::string ret1;
869            bool ret0=self->isEqualIfNotWhy(other,prec,ret1);
870            PyObject *ret=PyTuple_New(2);
871            PyObject *ret0Py=ret0?Py_True:Py_False;
872            Py_XINCREF(ret0Py);
873            PyTuple_SetItem(ret,0,ret0Py);
874            PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
875            return ret;
876          }
877
878          PyObject *buildPart(PyObject *li) const throw(INTERP_KERNEL::Exception)
879          {
880            int szArr,sw,iTypppArr;
881            std::vector<int> stdvecTyyppArr;
882            const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
883            MEDCouplingMesh *ret=self->buildPart(tmp,tmp+szArr);
884            if(sw==3)//DataArrayInt
885              { 
886                void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
887                DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
888                std::string name=argpt->getName();
889                if(!name.empty())
890                  ret->setName(name.c_str());
891              }
892            return convertMesh(ret, SWIG_POINTER_OWN | 0 );
893          }
894         
895          PyObject *buildPartAndReduceNodes(PyObject *li) const throw(INTERP_KERNEL::Exception)
896          {
897            int szArr,sw,iTypppArr;
898            std::vector<int> stdvecTyyppArr;
899            DataArrayInt *arr=0;
900            const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
901            MEDCouplingMesh *ret=self->buildPartAndReduceNodes(tmp,tmp+szArr,arr);
902            if(sw==3)//DataArrayInt
903              { 
904                void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
905                DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
906                std::string name=argpt->getName();
907                if(!name.empty())
908                  ret->setName(name.c_str());
909              }
910            //
911            PyObject *res = PyList_New(2);
912            PyObject *obj0=convertMesh(ret, SWIG_POINTER_OWN | 0 );
913            PyObject *obj1=SWIG_NewPointerObj(SWIG_as_voidptr(arr),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
914            PyList_SetItem(res,0,obj0);
915            PyList_SetItem(res,1,obj1);
916            return res;
917          }
918
919          PyObject *buildPartRangeAndReduceNodes(int beginCellIds, int endCellIds, int stepCellIds) const throw(INTERP_KERNEL::Exception)
920          {
921            int a,b,c;
922            DataArrayInt *arr=0;
923            MEDCouplingMesh *ret=self->buildPartRangeAndReduceNodes(beginCellIds,endCellIds,stepCellIds,a,b,c,arr);
924            PyObject *res = PyTuple_New(2);
925            PyObject *obj0=convertMesh(ret, SWIG_POINTER_OWN | 0 );
926            PyObject *obj1=0;
927            if(arr)
928              obj1=SWIG_NewPointerObj(SWIG_as_voidptr(arr),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
929            else
930              obj1=PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(b));
931            PyTuple_SetItem(res,0,obj0);
932            PyTuple_SetItem(res,1,obj1);
933            return res;
934          }
935
936         PyObject *getDistributionOfTypes() const throw(INTERP_KERNEL::Exception)
937         {
938           std::vector<int> vals=self->getDistributionOfTypes();
939           if(vals.size()%3!=0)
940             throw INTERP_KERNEL::Exception("Internal Error detected in wrap python ! code returned by MEDCouplingMesh::getDistributionOfTypes is not so that %3==0 !");
941           PyObject *ret=PyList_New((int)vals.size()/3);
942           for(int j=0;j<(int)vals.size()/3;j++)
943              {
944                PyObject *ret1=PyList_New(3);
945                PyList_SetItem(ret1,0,SWIG_From_int(vals[3*j]));
946                PyList_SetItem(ret1,1,SWIG_From_int(vals[3*j+1]));
947                PyList_SetItem(ret1,2,SWIG_From_int(vals[3*j+2]));
948                PyList_SetItem(ret,j,ret1);
949              }
950           return ret;
951         }
952
953         DataArrayInt *checkTypeConsistencyAndContig(PyObject *li, PyObject *li2) const throw(INTERP_KERNEL::Exception)
954         {
955           std::vector<int> code;
956           std::vector<const DataArrayInt *> idsPerType;
957           convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li2,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",idsPerType);
958           convertPyToNewIntArr4(li,1,3,code);
959           return self->checkTypeConsistencyAndContig(code,idsPerType);
960         }
961
962         PyObject *splitProfilePerType(const DataArrayInt *profile, bool smartPflKiller=true) const throw(INTERP_KERNEL::Exception)
963         {
964           std::vector<int> code;
965           std::vector<DataArrayInt *> idsInPflPerType;
966           std::vector<DataArrayInt *> idsPerType;
967           self->splitProfilePerType(profile,code,idsInPflPerType,idsPerType,smartPflKiller);
968           PyObject *ret=PyTuple_New(3);
969           //
970           if(code.size()%3!=0)
971             throw INTERP_KERNEL::Exception("Internal Error detected in wrap python ! code returned by MEDCouplingMesh::splitProfilePerType is not so that %3==0 !");
972           PyObject *ret0=PyList_New((int)code.size()/3);
973           for(int j=0;j<(int)code.size()/3;j++)
974              {
975                PyObject *ret00=PyList_New(3);
976                PyList_SetItem(ret00,0,SWIG_From_int(code[3*j]));
977                PyList_SetItem(ret00,1,SWIG_From_int(code[3*j+1]));
978                PyList_SetItem(ret00,2,SWIG_From_int(code[3*j+2]));
979                PyList_SetItem(ret0,j,ret00);
980              }
981           PyTuple_SetItem(ret,0,ret0);
982           //
983           PyObject *ret1=PyList_New(idsInPflPerType.size());
984           for(std::size_t j=0;j<idsInPflPerType.size();j++)
985             PyList_SetItem(ret1,j,SWIG_NewPointerObj(SWIG_as_voidptr(idsInPflPerType[j]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
986           PyTuple_SetItem(ret,1,ret1);
987           int n=idsPerType.size();
988           PyObject *ret2=PyList_New(n);
989           for(int i=0;i<n;i++)
990             PyList_SetItem(ret2,i,SWIG_NewPointerObj(SWIG_as_voidptr(idsPerType[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
991           PyTuple_SetItem(ret,2,ret2);
992           return ret;
993         }
994
995         void translate(PyObject *vector) throw(INTERP_KERNEL::Exception)
996         {
997           double val;
998           DataArrayDouble *a;
999           DataArrayDoubleTuple *aa;
1000           std::vector<double> bb;
1001           int sw;
1002           int spaceDim=self->getSpaceDimension();
1003           const char msg[]="Python wrap of MEDCouplingPointSet::translate : ";
1004           const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val,a,aa,bb,msg,1,spaceDim,true);
1005           self->translate(vectorPtr);
1006         }
1007
1008          void rotate(PyObject *center, double alpha) throw(INTERP_KERNEL::Exception)
1009          {
1010            const char msg[]="Python wrap of MEDCouplingPointSet::rotate : ";
1011            double val;
1012            DataArrayDouble *a;
1013            DataArrayDoubleTuple *aa;
1014            std::vector<double> bb;
1015            int sw;
1016            int spaceDim=self->getSpaceDimension();
1017            const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,spaceDim,true);
1018            self->rotate(centerPtr,0,alpha);
1019          }
1020
1021          void rotate(PyObject *center, PyObject *vector, double alpha) throw(INTERP_KERNEL::Exception)
1022          {
1023            const char msg[]="Python wrap of MEDCouplingPointSet::rotate : ";
1024            double val,val2;
1025            DataArrayDouble *a,*a2;
1026            DataArrayDoubleTuple *aa,*aa2;
1027            std::vector<double> bb,bb2;
1028            int sw;
1029            int spaceDim=self->getSpaceDimension();
1030            const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,spaceDim,true);
1031            const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,spaceDim,false);//vectorPtr can be null in case of space dim 2
1032            self->rotate(centerPtr,vectorPtr,alpha);
1033          }
1034
1035          PyObject *getAllGeoTypes() const throw(INTERP_KERNEL::Exception)
1036          {
1037            std::set<INTERP_KERNEL::NormalizedCellType> result=self->getAllGeoTypes();
1038            std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
1039            PyObject *res=PyList_New(result.size());
1040            for(int i=0;iL!=result.end(); i++, iL++)
1041              PyList_SetItem(res,i,PyInt_FromLong(*iL));
1042            return res;
1043          }
1044
1045          virtual PyObject *getTinySerializationInformation() const throw(INTERP_KERNEL::Exception)
1046          {
1047            std::vector<double> a0;
1048            std::vector<int> a1;
1049            std::vector<std::string> a2;
1050            self->getTinySerializationInformation(a0,a1,a2);
1051            PyObject *ret(PyTuple_New(3));
1052            PyTuple_SetItem(ret,0,convertDblArrToPyList2(a0));
1053            PyTuple_SetItem(ret,1,convertIntArrToPyList2(a1));
1054            int sz(a2.size());
1055            PyObject *ret2(PyList_New(sz));
1056            {
1057              for(int i=0;i<sz;i++)
1058                PyList_SetItem(ret2,i,PyString_FromString(a2[i].c_str()));
1059            }
1060            PyTuple_SetItem(ret,2,ret2);
1061            return ret;
1062          }
1063
1064          virtual PyObject *serialize() const throw(INTERP_KERNEL::Exception)
1065          {
1066            DataArrayInt *a0Tmp(0);
1067            DataArrayDouble *a1Tmp(0);
1068            self->serialize(a0Tmp,a1Tmp);
1069            PyObject *ret(PyTuple_New(2));
1070            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(a0Tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1071            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(a1Tmp),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
1072            return ret;
1073          }
1074
1075          void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2) const throw(INTERP_KERNEL::Exception)
1076          {
1077            std::vector<std::string> littleStrings;
1078            self->resizeForUnserialization(tinyInfo,a1,a2,littleStrings);
1079          }
1080          
1081          PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
1082          {
1083            PyObject *ret0(MEDCoupling_MEDCouplingMesh_getTinySerializationInformation(self));
1084            PyObject *ret1(MEDCoupling_MEDCouplingMesh_serialize(self));
1085            PyObject *ret(PyTuple_New(2));
1086            PyTuple_SetItem(ret,0,ret0);
1087            PyTuple_SetItem(ret,1,ret1);
1088            return ret;
1089          }
1090
1091          void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
1092          {
1093            static const char MSG[]="MEDCouplingMesh.__setstate__ : expected input is a tuple of size 2 !";
1094            if(!PyTuple_Check(inp))
1095              throw INTERP_KERNEL::Exception(MSG);
1096            int sz(PyTuple_Size(inp));
1097            if(sz!=2)
1098              throw INTERP_KERNEL::Exception(MSG);
1099            PyObject *elt0(PyTuple_GetItem(inp,0));
1100            PyObject *elt1(PyTuple_GetItem(inp,1));
1101            std::vector<double> a0;
1102            std::vector<int> a1;
1103            std::vector<std::string> a2;
1104            DataArrayInt *b0(0);
1105            DataArrayDouble *b1(0);
1106            {
1107              if(!PyTuple_Check(elt0) && PyTuple_Size(elt0)!=3)
1108                throw INTERP_KERNEL::Exception(MSG);
1109              PyObject *a0py(PyTuple_GetItem(elt0,0)),*a1py(PyTuple_GetItem(elt0,1)),*a2py(PyTuple_GetItem(elt0,2));
1110              int tmp(-1);
1111              fillArrayWithPyListDbl3(a0py,tmp,a0);
1112              convertPyToNewIntArr3(a1py,a1);
1113              fillStringVector(a2py,a2);
1114            }
1115            {
1116              if(!PyTuple_Check(elt1) && PyTuple_Size(elt1)!=2)
1117                throw INTERP_KERNEL::Exception(MSG);
1118              PyObject *b0py(PyTuple_GetItem(elt1,0)),*b1py(PyTuple_GetItem(elt1,1));
1119              void *argp(0);
1120              int status(SWIG_ConvertPtr(b0py,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0));
1121              if(!SWIG_IsOK(status))
1122                throw INTERP_KERNEL::Exception(MSG);
1123              b0=reinterpret_cast<DataArrayInt *>(argp);
1124              status=SWIG_ConvertPtr(b1py,&argp,SWIGTYPE_p_MEDCoupling__DataArrayDouble,0|0);
1125              if(!SWIG_IsOK(status))
1126                throw INTERP_KERNEL::Exception(MSG);
1127              b1=reinterpret_cast<DataArrayDouble *>(argp);
1128            }
1129            // useless here to call resizeForUnserialization because arrays are well resized.
1130            self->unserialization(a0,a1,b0,b1,a2);
1131          }
1132          
1133          static MEDCouplingMesh *MergeMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
1134          {
1135             std::vector<const MEDCoupling::MEDCouplingMesh *> tmp;
1136             convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingMesh,"MEDCouplingMesh",tmp);
1137             return MEDCouplingMesh::MergeMeshes(tmp);
1138          }
1139        }
1140   };
1141 }
1142
1143 //== MEDCouplingMesh End
1144
1145 %include "NormalizedGeometricTypes"
1146 %include "MEDCouplingNatureOfFieldEnum"
1147 //
1148 namespace MEDCoupling
1149 {
1150   class MEDCouplingNatureOfField
1151   {
1152   public:
1153     static const char *GetRepr(NatureOfField nat) throw(INTERP_KERNEL::Exception);
1154     static std::string GetReprNoThrow(NatureOfField nat);
1155     static std::string GetAllPossibilitiesStr();
1156   };
1157 }
1158
1159 // the MEDCouplingTimeDiscretization classes are not swigged : in case the file can help
1160 // include "MEDCouplingTimeDiscretization.i"
1161
1162 namespace MEDCoupling
1163 {
1164   class MEDCouplingGaussLocalization
1165   {
1166   public:
1167     MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
1168                                  const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
1169     MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType typ) throw(INTERP_KERNEL::Exception);
1170     INTERP_KERNEL::NormalizedCellType getType() const throw(INTERP_KERNEL::Exception);
1171     void setType(INTERP_KERNEL::NormalizedCellType typ) throw(INTERP_KERNEL::Exception);
1172     int getNumberOfGaussPt() const throw(INTERP_KERNEL::Exception);
1173     int getDimension() const throw(INTERP_KERNEL::Exception);
1174     int getNumberOfPtsInRefCell() const throw(INTERP_KERNEL::Exception);
1175     std::string getStringRepr() const throw(INTERP_KERNEL::Exception);
1176     void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
1177     bool isEqual(const MEDCouplingGaussLocalization& other, double eps) const throw(INTERP_KERNEL::Exception);
1178     //
1179     const std::vector<double>& getRefCoords() const throw(INTERP_KERNEL::Exception);
1180     double getRefCoord(int ptIdInCell, int comp) const throw(INTERP_KERNEL::Exception);
1181     const std::vector<double>& getGaussCoords() const throw(INTERP_KERNEL::Exception);
1182     double getGaussCoord(int gaussPtIdInCell, int comp) const throw(INTERP_KERNEL::Exception);
1183     const std::vector<double>& getWeights() const throw(INTERP_KERNEL::Exception);
1184     double getWeight(int gaussPtIdInCell, double newVal) const throw(INTERP_KERNEL::Exception);
1185     void setRefCoord(int ptIdInCell, int comp, double newVal) throw(INTERP_KERNEL::Exception);
1186     void setGaussCoord(int gaussPtIdInCell, int comp, double newVal) throw(INTERP_KERNEL::Exception);
1187     void setWeight(int gaussPtIdInCell, double newVal) throw(INTERP_KERNEL::Exception);
1188     void setRefCoords(const std::vector<double>& refCoo) throw(INTERP_KERNEL::Exception);
1189     void setGaussCoords(const std::vector<double>& gsCoo) throw(INTERP_KERNEL::Exception);
1190     void setWeights(const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
1191     //
1192     static bool AreAlmostEqual(const std::vector<double>& v1, const std::vector<double>& v2, double eps);
1193     //
1194     %extend 
1195     {
1196       DataArrayDouble *localizePtsInRefCooForEachCell(const DataArrayDouble *ptsInRefCoo, const MEDCouplingUMesh *mesh) const throw(INTERP_KERNEL::Exception)
1197       {
1198         MCAuto<DataArrayDouble> ret(self->localizePtsInRefCooForEachCell(ptsInRefCoo,mesh));
1199         return ret.retn();
1200       }
1201
1202       MEDCouplingUMesh *buildRefCell() const throw(INTERP_KERNEL::Exception)
1203       {
1204         MCAuto<MEDCouplingUMesh> ret(self->buildRefCell());
1205         return ret.retn();
1206       }
1207     }
1208   };
1209
1210   class MEDCouplingSkyLineArray
1211   {
1212   public:  
1213     static MEDCouplingSkyLineArray *BuildFromPolyhedronConn( const DataArrayInt* c, const DataArrayInt* cI ) throw(INTERP_KERNEL::Exception);
1214   
1215     void set( DataArrayInt* index, DataArrayInt* value );
1216     void set3( DataArrayInt* superIndex, DataArrayInt* index, DataArrayInt* value );
1217     
1218     int getSuperNumberOf() const;
1219     int getNumberOf() const;
1220     int getLength() const;
1221     
1222     void deletePack(const int i, const int j) throw(INTERP_KERNEL::Exception);
1223     
1224     void deleteSimplePack(const int i) throw(INTERP_KERNEL::Exception);
1225     void deleteSimplePacks(const DataArrayInt* idx) throw(INTERP_KERNEL::Exception);
1226     
1227     %extend 
1228     {
1229       MEDCouplingSkyLineArray() throw(INTERP_KERNEL::Exception)
1230       {
1231         return MEDCouplingSkyLineArray::New();
1232       }
1233
1234       MEDCouplingSkyLineArray( const std::vector<int>& index, const std::vector<int>& value) throw(INTERP_KERNEL::Exception)
1235       {
1236         return MEDCouplingSkyLineArray::New(index, value);
1237       }
1238
1239       MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value ) throw(INTERP_KERNEL::Exception)
1240       {
1241         return MEDCouplingSkyLineArray::New(index, value);
1242       }
1243
1244       MEDCouplingSkyLineArray( const MEDCouplingSkyLineArray & other ) throw(INTERP_KERNEL::Exception)
1245       {
1246         return MEDCouplingSkyLineArray::New(other);
1247       }
1248
1249       std::string __str__() const throw(INTERP_KERNEL::Exception)
1250       {
1251         return self->simpleRepr();
1252       }
1253       
1254       DataArrayInt *getSuperIndexArray() const
1255       {
1256         DataArrayInt *ret(self->getSuperIndexArray());
1257         if(ret)
1258           ret->incrRef();
1259         return ret;
1260       }
1261       
1262       DataArrayInt *getIndexArray() const
1263       {
1264         DataArrayInt *ret(self->getIndexArray());
1265         if(ret)
1266           ret->incrRef();
1267         return ret;
1268       }
1269       
1270       DataArrayInt *getValuesArray() const
1271       {
1272         DataArrayInt *ret(self->getValuesArray());
1273         if(ret)
1274           ret->incrRef();
1275         return ret;
1276       }
1277      
1278       PyObject *getSimplePackSafe(int absolutePackId) const throw(INTERP_KERNEL::Exception)
1279       {
1280         std::vector<int> ret;
1281         self->getSimplePackSafe(absolutePackId,ret);
1282         return convertIntArrToPyList2(ret);
1283       }
1284
1285       PyObject *findPackIds(PyObject *superPackIndices, PyObject *pack) const throw(INTERP_KERNEL::Exception)
1286       {
1287           std::vector<int> vpack, vspIdx, out;
1288           
1289           convertPyToNewIntArr3(superPackIndices,vspIdx);
1290           convertPyToNewIntArr3(pack,vpack);
1291           
1292           self->findPackIds(vspIdx, vpack.data(), vpack.data()+vpack.size(), out);
1293           return convertIntArrToPyList2(out);
1294       }
1295       
1296       void pushBackPack(const int i, PyObject *pack) throw(INTERP_KERNEL::Exception)
1297         {
1298           std::vector<int> vpack;
1299           convertPyToNewIntArr3(pack,vpack);
1300           self->pushBackPack(i,vpack.data(), vpack.data()+vpack.size());
1301         }
1302         
1303       void replaceSimplePack(const int idx, PyObject *pack) throw(INTERP_KERNEL::Exception)
1304         {
1305           std::vector<int> vpack;
1306           convertPyToNewIntArr3(pack,vpack);
1307           self->replaceSimplePack(idx, vpack.data(), vpack.data()+vpack.size());
1308         }
1309         
1310       void replaceSimplePacks(const DataArrayInt* idx, PyObject *listePacks) throw(INTERP_KERNEL::Exception)
1311         {
1312           std::vector<const DataArrayInt*> packs;
1313           convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt*>(listePacks,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",packs);
1314           self->replaceSimplePacks(idx, packs);
1315         }
1316         
1317       void replacePack(const int superIdx, const int idx, PyObject *pack) throw(INTERP_KERNEL::Exception)
1318         {
1319           std::vector<int> vpack;
1320           convertPyToNewIntArr3(pack,vpack);
1321           self->replacePack(superIdx, idx, vpack.data(), vpack.data()+vpack.size());
1322         }
1323
1324       PyObject *convertToPolyhedronConn() const throw(INTERP_KERNEL::Exception)
1325          {
1326            MCAuto<DataArrayInt> d0=DataArrayInt::New();
1327            MCAuto<DataArrayInt> d1=DataArrayInt::New();
1328            self->convertToPolyhedronConn(d0,d1);
1329            PyObject *ret=PyTuple_New(2);
1330            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1331            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1332            return ret;
1333          } 
1334     }
1335   };
1336 }
1337
1338 %include "MEDCouplingFieldDiscretization.i"
1339
1340 //== MEDCouplingPointSet
1341
1342 namespace MEDCoupling
1343 {
1344   class MEDCouplingPointSet : public MEDCoupling::MEDCouplingMesh
1345     {
1346     public:
1347       void setCoords(const DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
1348       DataArrayDouble *getCoordinatesAndOwner() const throw(INTERP_KERNEL::Exception);
1349       bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const throw(INTERP_KERNEL::Exception);
1350       void zipCoords() throw(INTERP_KERNEL::Exception);
1351       double getCaracteristicDimension() const throw(INTERP_KERNEL::Exception);
1352       void recenterForMaxPrecision(double eps) throw(INTERP_KERNEL::Exception);
1353       void changeSpaceDimension(int newSpaceDim, double dftVal=0.) throw(INTERP_KERNEL::Exception);
1354       void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
1355       virtual void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) throw(INTERP_KERNEL::Exception);
1356       virtual MEDCouplingPointSet *buildPartOfMySelfSlice(int start, int end, int step) const throw(INTERP_KERNEL::Exception);
1357       virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
1358       static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception);
1359       static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type) throw(INTERP_KERNEL::Exception);
1360       static DataArrayInt *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps) throw(INTERP_KERNEL::Exception);
1361       virtual DataArrayInt *computeFetchedNodeIds() const throw(INTERP_KERNEL::Exception);
1362       virtual int getNumberOfNodesInCell(int cellId) const throw(INTERP_KERNEL::Exception);
1363       virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const throw(INTERP_KERNEL::Exception);
1364       virtual DataArrayInt *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps) throw(INTERP_KERNEL::Exception);
1365       virtual DataArrayInt *zipCoordsTraducer() throw(INTERP_KERNEL::Exception);
1366       virtual DataArrayInt *findBoundaryNodes() const;
1367       virtual DataArrayInt *zipConnectivityTraducer(int compType, int startCellId=0) throw(INTERP_KERNEL::Exception);
1368       virtual MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const throw(INTERP_KERNEL::Exception);
1369       virtual void checkFullyDefined() const throw(INTERP_KERNEL::Exception);
1370       virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
1371       virtual MEDCouplingPointSet *deepCopyConnectivityOnly() const throw(INTERP_KERNEL::Exception);
1372       virtual DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
1373       virtual void renumberNodesWithOffsetInConn(int offset) throw(INTERP_KERNEL::Exception);
1374       virtual bool areAllNodesFetched() const throw(INTERP_KERNEL::Exception);
1375       virtual MEDCouplingFieldDouble *computeDiameterField() const throw(INTERP_KERNEL::Exception);
1376       virtual void invertOrientationOfAllCells() throw(INTERP_KERNEL::Exception);
1377       %extend 
1378          {
1379            std::string __str__() const throw(INTERP_KERNEL::Exception)
1380            {
1381              return self->simpleRepr();
1382            }
1383            
1384            PyObject *buildNewNumberingFromCommonNodesFormat(const DataArrayInt *comm, const DataArrayInt *commIndex) const throw(INTERP_KERNEL::Exception)
1385            {
1386              int newNbOfNodes;
1387              DataArrayInt *ret0=self->buildNewNumberingFromCommonNodesFormat(comm,commIndex,newNbOfNodes);
1388              PyObject *res = PyList_New(2);
1389              PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1390              PyList_SetItem(res,1,SWIG_From_int(newNbOfNodes));
1391              return res;
1392            }
1393            
1394            PyObject *findCommonNodes(double prec, int limitTupleId=-1) const throw(INTERP_KERNEL::Exception)
1395            {
1396              DataArrayInt *comm, *commIndex;
1397              self->findCommonNodes(prec,limitTupleId,comm,commIndex);
1398              PyObject *res = PyList_New(2);
1399              PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(comm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1400              PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(commIndex),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1401              return res;
1402            }
1403            
1404            PyObject *getCoords() throw(INTERP_KERNEL::Exception)
1405            {
1406              DataArrayDouble *ret1=self->getCoords();
1407              if (ret1)
1408                 ret1->incrRef();
1409              return SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIG_POINTER_OWN | 0);
1410            }
1411            
1412            PyObject *buildPartOfMySelf(PyObject *li, bool keepCoords=true) const throw(INTERP_KERNEL::Exception)
1413            {
1414              int szArr,sw,iTypppArr;
1415              std::vector<int> stdvecTyyppArr;
1416              const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
1417              MEDCouplingPointSet *ret=self->buildPartOfMySelf(tmp,tmp+szArr,keepCoords);
1418              if(sw==3)//DataArrayInt
1419                { 
1420                  void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
1421                  DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
1422                  std::string name=argpt->getName();
1423                  if(!name.empty())
1424                    ret->setName(name.c_str());
1425                }
1426              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
1427            }
1428            
1429            PyObject *buildPartOfMySelfNode(PyObject *li, bool fullyIn) const throw(INTERP_KERNEL::Exception)
1430            {
1431              int szArr,sw,iTypppArr;
1432              std::vector<int> stdvecTyyppArr;
1433              const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
1434              MEDCouplingPointSet *ret=self->buildPartOfMySelfNode(tmp,tmp+szArr,fullyIn);
1435              if(sw==3)//DataArrayInt
1436                { 
1437                  void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
1438                  DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
1439                  std::string name=argpt->getName();
1440                  if(!name.empty())
1441                    ret->setName(name.c_str());
1442                }
1443              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
1444            }
1445
1446            virtual PyObject *buildPartOfMySelfKeepCoords(PyObject *li) const throw(INTERP_KERNEL::Exception)
1447            {
1448              int szArr,sw,iTypppArr;
1449              std::vector<int> stdvecTyyppArr;
1450              const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
1451              MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoords(tmp,tmp+szArr);
1452              if(sw==3)//DataArrayInt
1453                { 
1454                  void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
1455                  DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
1456                  std::string name=argpt->getName();
1457                  if(!name.empty())
1458                    ret->setName(name.c_str());
1459                }
1460              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
1461            }
1462
1463            virtual PyObject *buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const throw(INTERP_KERNEL::Exception)
1464            {
1465              MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoordsSlice(start,end,step);
1466              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
1467            }
1468
1469            PyObject *buildFacePartOfMySelfNode(PyObject *li, bool fullyIn) const throw(INTERP_KERNEL::Exception)
1470            {
1471              int szArr,sw,iTypppArr;
1472              std::vector<int> stdvecTyyppArr;
1473              const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
1474              MEDCouplingPointSet *ret=self->buildFacePartOfMySelfNode(tmp,tmp+szArr,fullyIn);
1475              if(sw==3)//DataArrayInt
1476                { 
1477                  void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
1478                  DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
1479                  std::string name=argpt->getName();
1480                  if(!name.empty())
1481                    ret->setName(name.c_str());
1482                }
1483              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
1484            }
1485
1486            void renumberNodes(PyObject *li, int newNbOfNodes) throw(INTERP_KERNEL::Exception)
1487            {
1488              int szArr,sw,iTypppArr;
1489              std::vector<int> stdvecTyyppArr;
1490              const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
1491              self->renumberNodes(tmp,newNbOfNodes);
1492            }
1493
1494            void renumberNodesCenter(PyObject *li, int newNbOfNodes) throw(INTERP_KERNEL::Exception)
1495            {
1496              int szArr,sw,iTypppArr;
1497              std::vector<int> stdvecTyyppArr;
1498              const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
1499              self->renumberNodesCenter(tmp,newNbOfNodes);
1500            }
1501
1502            PyObject *findNodesOnLine(PyObject *pt, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
1503              {
1504                int spaceDim=self->getSpaceDimension();
1505                double val,val2;
1506                DataArrayDouble *a,*a2;
1507                DataArrayDoubleTuple *aa,*aa2;
1508                std::vector<double> bb,bb2;
1509                int sw;
1510                const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st parameter for point.";
1511                const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd parameter for vector.";
1512                const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
1513                const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
1514                std::vector<int> nodes;
1515                self->findNodesOnLine(p,v,eps,nodes);
1516                DataArrayInt *ret=DataArrayInt::New();
1517                ret->alloc((int)nodes.size(),1);
1518                std::copy(nodes.begin(),nodes.end(),ret->getPointer());
1519                return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1520              }
1521            PyObject *findNodesOnPlane(PyObject *pt, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
1522              {
1523                int spaceDim=self->getSpaceDimension();
1524                double val,val2;
1525                DataArrayDouble *a,*a2;
1526                DataArrayDoubleTuple *aa,*aa2;
1527                std::vector<double> bb,bb2;
1528                int sw;
1529                const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st parameter for point.";
1530                const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd parameter for vector.";
1531                const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
1532                const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
1533                std::vector<int> nodes;
1534                self->findNodesOnPlane(p,v,eps,nodes);
1535                DataArrayInt *ret=DataArrayInt::New();
1536                ret->alloc((int)nodes.size(),1);
1537                std::copy(nodes.begin(),nodes.end(),ret->getPointer());
1538                return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1539              }
1540            
1541            PyObject *getNodeIdsNearPoint(PyObject *pt, double eps) const throw(INTERP_KERNEL::Exception)
1542            {
1543              double val;
1544              DataArrayDouble *a;
1545              DataArrayDoubleTuple *aa;
1546              std::vector<double> bb;
1547              int sw;
1548              int spaceDim=self->getSpaceDimension();
1549              const char msg[]="Python wrap of MEDCouplingPointSet::getNodeIdsNearPoint : ";
1550              const double *pos=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
1551              DataArrayInt *ret=self->getNodeIdsNearPoint(pos,eps);
1552              return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1553            }
1554
1555            PyObject *getNodeIdsNearPoints(PyObject *pt, int nbOfPoints, double eps) const throw(INTERP_KERNEL::Exception)
1556            {
1557              DataArrayInt *c=0,*cI=0;
1558              //
1559              double val;
1560              DataArrayDouble *a;
1561              DataArrayDoubleTuple *aa;
1562              std::vector<double> bb;
1563              int sw;
1564              int spaceDim=self->getSpaceDimension();
1565              const char msg[]="Python wrap of MEDCouplingPointSet::getNodeIdsNearPoints : ";
1566              const double *pos=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,nbOfPoints,spaceDim,true);
1567              self->getNodeIdsNearPoints(pos,nbOfPoints,eps,c,cI);
1568              PyObject *ret=PyTuple_New(2);
1569              PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1570              PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1571              return ret;
1572            }
1573
1574            PyObject *getNodeIdsNearPoints(PyObject *pt, double eps) const throw(INTERP_KERNEL::Exception)
1575            {
1576              DataArrayInt *c=0,*cI=0;
1577              int spaceDim=self->getSpaceDimension();
1578              double val;
1579              DataArrayDouble *a;
1580              DataArrayDoubleTuple *aa;
1581              std::vector<double> bb;
1582              int sw;
1583              int nbOfTuples=-1;
1584              const double *ptPtr=convertObjToPossibleCpp5_Safe2(pt,sw,val,a,aa,bb,"Python wrap of MEDCouplingUMesh::getNodeIdsNearPoints",spaceDim,true,nbOfTuples);
1585              self->getNodeIdsNearPoints(ptPtr,nbOfTuples,eps,c,cI);
1586              //
1587              PyObject *ret=PyTuple_New(2);
1588              PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1589              PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1590              return ret;
1591            }
1592
1593            PyObject *getCellsInBoundingBox(PyObject *bbox, double eps) const throw(INTERP_KERNEL::Exception)
1594            {
1595              double val;
1596              DataArrayDouble *a;
1597              DataArrayDoubleTuple *aa;
1598              std::vector<double> bb;
1599              int sw;
1600              int spaceDim=self->getSpaceDimension();
1601              const char msg[]="Python wrap of MEDCouplingPointSet::getCellsInBoundingBox : ";
1602              const double *tmp=convertObjToPossibleCpp5_Safe(bbox,sw,val,a,aa,bb,msg,spaceDim,2,true);
1603              //
1604              DataArrayInt *elems=self->getCellsInBoundingBox(tmp,eps);
1605              return SWIG_NewPointerObj(SWIG_as_voidptr(elems),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
1606            }
1607
1608            void duplicateNodesInCoords(PyObject *li) throw(INTERP_KERNEL::Exception)
1609            {
1610              int sw;
1611              int singleVal;
1612              std::vector<int> multiVal;
1613              std::pair<int, std::pair<int,int> > slic;
1614              MEDCoupling::DataArrayInt *daIntTyypp=0;
1615              convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
1616              switch(sw)
1617                {
1618                case 1:
1619                  return self->duplicateNodesInCoords(&singleVal,&singleVal+1);
1620                case 2:
1621                  return self->duplicateNodesInCoords(&multiVal[0],&multiVal[0]+multiVal.size());
1622                case 4:
1623                  return self->duplicateNodesInCoords(daIntTyypp->begin(),daIntTyypp->end());
1624                default:
1625                  throw INTERP_KERNEL::Exception("MEDCouplingPointSet::duplicateNodesInCoords : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
1626                }
1627            }
1628
1629            virtual PyObject *findCommonCells(int compType, int startCellId=0) const throw(INTERP_KERNEL::Exception)
1630            {
1631              DataArrayInt *v0(nullptr),*v1(nullptr);
1632              self->findCommonCells(compType,startCellId,v0,v1);
1633              PyObject *res = PyList_New(2);
1634              PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1635              PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1636              return res;
1637            }
1638
1639       
1640            virtual void renumberNodesInConn(PyObject *li) throw(INTERP_KERNEL::Exception)
1641            {
1642              void *da(nullptr);
1643              {
1644                int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__MapII, 0 |  0 ));
1645                if(SWIG_IsOK(res1))
1646                  {
1647                    MapII *da2(reinterpret_cast<MapII *>(da));
1648                    self->renumberNodesInConn(da2->data());
1649                    return ;
1650                  }
1651              }
1652              int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 | 0 ));
1653              if (!SWIG_IsOK(res1))
1654                {
1655                  int size;
1656                  INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
1657                  self->renumberNodesInConn(tmp);
1658                }
1659              else
1660                {
1661                  DataArrayInt *da2(reinterpret_cast< DataArrayInt * >(da));
1662                  if(!da2)
1663                    throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
1664                  da2->checkAllocated();
1665                  self->renumberNodesInConn(da2->getConstPointer());
1666                }
1667            }
1668
1669            virtual PyObject *getNodeIdsInUse() const throw(INTERP_KERNEL::Exception)
1670            {
1671              int ret1=-1;
1672              DataArrayInt *ret0=self->getNodeIdsInUse(ret1);
1673              PyObject *ret=PyTuple_New(2);
1674              PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1675              PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
1676              return ret;
1677            }
1678
1679            virtual DataArrayInt *fillCellIdsToKeepFromNodeIds(PyObject *li, bool fullyIn) const
1680            {
1681              DataArrayInt *ret(nullptr);
1682              //
1683              int szArr,sw,iTypppArr;
1684              std::vector<int> stdvecTyyppArr;
1685              const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
1686              self->fillCellIdsToKeepFromNodeIds(tmp,tmp+szArr,fullyIn,ret);
1687              return ret;
1688            }
1689
1690            virtual PyObject *mergeNodes(double precision) throw(INTERP_KERNEL::Exception)
1691            {
1692              bool ret1;
1693              int ret2;
1694              DataArrayInt *ret0=self->mergeNodes(precision,ret1,ret2);
1695              PyObject *res = PyList_New(3);
1696              PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1697              PyList_SetItem(res,1,SWIG_From_bool(ret1));
1698              PyList_SetItem(res,2,SWIG_From_int(ret2));
1699              return res;
1700            }
1701            
1702            virtual PyObject *mergeNodesCenter(double precision) throw(INTERP_KERNEL::Exception)
1703            {
1704              bool ret1;
1705              int ret2;
1706              DataArrayInt *ret0=self->mergeNodesCenter(precision,ret1,ret2);
1707              PyObject *res = PyList_New(3);
1708              PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
1709              PyList_SetItem(res,1,SWIG_From_bool(ret1));
1710              PyList_SetItem(res,2,SWIG_From_int(ret2));
1711              return res;
1712            }
1713            
1714            DataArrayInt *getCellIdsLyingOnNodes(PyObject *li, bool fullyIn) const throw(INTERP_KERNEL::Exception)
1715            {
1716              void *da=0;
1717              int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
1718              if (!SWIG_IsOK(res1))
1719                {
1720                  int size;
1721                  INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
1722                  return self->getCellIdsLyingOnNodes(tmp,((const int *)tmp)+size,fullyIn);
1723                }
1724              else
1725                {
1726                  DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
1727                  if(!da2)
1728                    throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
1729                  da2->checkAllocated();
1730                  return self->getCellIdsLyingOnNodes(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),fullyIn);
1731                }
1732            }
1733
1734            MEDCouplingPointSet *__getitem__(PyObject *listOrDataArrI) throw(INTERP_KERNEL::Exception)
1735            {
1736              int sw;
1737              int singleVal;
1738              std::vector<int> multiVal;
1739              std::pair<int, std::pair<int,int> > slic;
1740              MEDCoupling::DataArrayInt *daIntTyypp=0;
1741              int nbc=self->getNumberOfCells();
1742              convertIntStarOrSliceLikePyObjToCpp(listOrDataArrI,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
1743              switch(sw)
1744                {
1745                case 1:
1746                  {
1747                    if(singleVal>=nbc)
1748                      {
1749                        std::ostringstream oss;
1750                        oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
1751                        throw INTERP_KERNEL::Exception(oss.str().c_str());
1752                      }
1753                    if(singleVal>=0)
1754                      return self->buildPartOfMySelf(&singleVal,&singleVal+1,true);
1755                    else
1756                      {
1757                        if(nbc+singleVal>0)
1758                          {
1759                            int tmp=nbc+singleVal;
1760                            return self->buildPartOfMySelf(&tmp,&tmp+1,true);
1761                          }
1762                        else
1763                          {
1764                            std::ostringstream oss;
1765                            oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
1766                            throw INTERP_KERNEL::Exception(oss.str().c_str());
1767                          }
1768                      }
1769                  }
1770                case 2:
1771                  {
1772                    return static_cast<MEDCouplingPointSet *>(self->buildPartOfMySelf(&multiVal[0],&multiVal[0]+multiVal.size(),true));
1773                  }
1774                case 3:
1775                  {
1776                    return self->buildPartOfMySelfSlice(slic.first,slic.second.first,slic.second.second,true);
1777                  }
1778                case 4:
1779                  {
1780                    if(!daIntTyypp)
1781                      throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : null instance has been given in input !");
1782                    daIntTyypp->checkAllocated();
1783                    return self->buildPartOfMySelf(daIntTyypp->begin(),daIntTyypp->end(),true);
1784                  }
1785                default:
1786                  throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
1787                }
1788            }
1789            
1790            static void Rotate2DAlg(PyObject *center, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
1791            {
1792              int sz;
1793              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
1794              INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
1795              MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,coo);
1796              for(int i=0;i<sz;i++)
1797                PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
1798            }
1799            
1800            static void Rotate2DAlg(PyObject *center, double angle, PyObject *coords) throw(INTERP_KERNEL::Exception)
1801            {
1802              int sz;
1803              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
1804              int sw,nbNodes=0;
1805              double val0;  MEDCoupling::DataArrayDouble *val1=0; MEDCoupling::DataArrayDoubleTuple *val2=0;
1806              std::vector<double> val3;
1807              const double *coo=convertObjToPossibleCpp5_Safe2(coords,sw,val0,val1,val2,val3,
1808                                                             "Rotate2DAlg",2,true,nbNodes);
1809              if(sw!=2 && sw!=3)
1810                throw INTERP_KERNEL::Exception("Invalid call to MEDCouplingPointSet::Rotate2DAlg : try another overload method !");
1811              MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,const_cast<double *>(coo));
1812            }
1813            
1814            static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
1815            {
1816              int sz,sz2;
1817              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
1818              INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
1819              INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
1820              MEDCoupling::DataArrayDouble::Rotate3DAlg(c,v,angle,nbNodes,coo,coo);
1821              for(int i=0;i<sz;i++)
1822                PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
1823            }
1824            
1825            static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, PyObject *coords) throw(INTERP_KERNEL::Exception)
1826            {
1827              int sz,sz2;
1828              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
1829              int sw,nbNodes=0;
1830              double val0;  MEDCoupling::DataArrayDouble *val1=0; MEDCoupling::DataArrayDoubleTuple *val2=0;
1831              std::vector<double> val3;
1832              const double *coo=convertObjToPossibleCpp5_Safe2(coords,sw,val0,val1,val2,val3,
1833                                                             "Rotate3DAlg",3,true,nbNodes);
1834              if(sw!=2 && sw!=3)
1835                throw INTERP_KERNEL::Exception("Invalid call to MEDCouplingPointSet::Rotate3DAlg : try another overload method !");
1836              INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
1837              MEDCoupling::DataArrayDouble::Rotate3DAlg(c,v,angle,nbNodes,coo,const_cast<double *>(coo));
1838            }
1839          }
1840     };
1841
1842   //== MEDCouplingPointSet End
1843
1844   class MEDCouplingUMeshCell
1845   {
1846   public:
1847     INTERP_KERNEL::NormalizedCellType getType() const;
1848     %extend
1849       {
1850         std::string __str__() const throw(INTERP_KERNEL::Exception)
1851         {
1852           return self->repr();
1853         }
1854
1855         PyObject *getAllConn() const throw(INTERP_KERNEL::Exception)
1856         {
1857           int ret2;
1858           const int *r=self->getAllConn(ret2);
1859           PyObject *ret=PyTuple_New(ret2);
1860           for(int i=0;i<ret2;i++)
1861             PyTuple_SetItem(ret,i,PyInt_FromLong(r[i]));
1862           return ret;
1863         }
1864       }
1865   };
1866
1867   class MEDCouplingUMeshCellIterator
1868   {
1869   public:
1870     %extend
1871       {
1872         PyObject *next()
1873         {
1874           MEDCouplingUMeshCell *ret=self->nextt();
1875           if(ret)
1876             return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__MEDCouplingUMeshCell,0|0);
1877           else
1878             {
1879               PyErr_SetString(PyExc_StopIteration,"No more data.");
1880               return 0;
1881             }
1882         }
1883       }
1884   };
1885
1886   class MEDCouplingUMeshCellByTypeIterator
1887   {
1888   public:
1889     ~MEDCouplingUMeshCellByTypeIterator();
1890     %extend
1891       {
1892         PyObject *next()
1893         {
1894           MEDCouplingUMeshCellEntry *ret=self->nextt();
1895           if(ret)
1896             return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__MEDCouplingUMeshCellEntry,SWIG_POINTER_OWN | 0);
1897           else
1898             {
1899               PyErr_SetString(PyExc_StopIteration,"No more data.");
1900               return 0;
1901             }
1902         }
1903       }
1904   };
1905
1906   class MEDCouplingUMeshCellByTypeEntry
1907   {
1908   public:
1909     ~MEDCouplingUMeshCellByTypeEntry();
1910     %extend
1911       {
1912         MEDCouplingUMeshCellByTypeIterator *__iter__()
1913         {
1914           return self->iterator();
1915         }
1916       }
1917   };
1918
1919   class MEDCouplingUMeshCellEntry
1920   {
1921   public:
1922     INTERP_KERNEL::NormalizedCellType getType() const;
1923     int getNumberOfElems() const;
1924     %extend
1925       {
1926         MEDCouplingUMeshCellIterator *__iter__()
1927         {
1928           return self->iterator();
1929         }
1930       }
1931   };
1932   
1933   //== MEDCouplingUMesh
1934
1935   class MEDCouplingUMesh : public MEDCoupling::MEDCouplingPointSet
1936   {
1937   public:
1938     static MEDCouplingUMesh *New() throw(INTERP_KERNEL::Exception);
1939     static MEDCouplingUMesh *New(const char *meshName, int meshDim) throw(INTERP_KERNEL::Exception);
1940     void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
1941     void setMeshDimension(int meshDim) throw(INTERP_KERNEL::Exception);
1942     void allocateCells(int nbOfCells=0) throw(INTERP_KERNEL::Exception);
1943     void finishInsertingCells() throw(INTERP_KERNEL::Exception);
1944     MEDCouplingUMeshCellByTypeEntry *cellsByType() throw(INTERP_KERNEL::Exception);
1945     void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true) throw(INTERP_KERNEL::Exception);
1946     INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
1947     void setPartOfMySelfSlice(int start, int end, int step, const MEDCouplingUMesh& otherOnSameCoordsThanThis) throw(INTERP_KERNEL::Exception);
1948     int getNodalConnectivityArrayLen() const throw(INTERP_KERNEL::Exception);
1949     void computeTypes() throw(INTERP_KERNEL::Exception);
1950     std::string reprConnectivityOfThis() const throw(INTERP_KERNEL::Exception);
1951     MEDCouplingUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
1952     //tools
1953     DataArrayInt *conformize2D(double eps) throw(INTERP_KERNEL::Exception);
1954     DataArrayInt *conformize3D(double eps) throw(INTERP_KERNEL::Exception);
1955     DataArrayInt *colinearize2D(double eps) throw(INTERP_KERNEL::Exception);
1956     DataArrayInt *colinearizeKeepingConform2D(double eps) throw(INTERP_KERNEL::Exception);
1957     void shiftNodeNumbersInConn(int delta) throw(INTERP_KERNEL::Exception);
1958     std::vector<bool> getQuadraticStatus() const throw(INTERP_KERNEL::Exception);
1959     DataArrayInt *findCellIdsOnBoundary() const throw(INTERP_KERNEL::Exception);
1960     MEDCouplingUMesh *computeSkin() const throw(INTERP_KERNEL::Exception);
1961     bool checkConsecutiveCellTypes() const throw(INTERP_KERNEL::Exception);
1962     bool checkConsecutiveCellTypesForMEDFileFrmt() const throw(INTERP_KERNEL::Exception);
1963     DataArrayInt *rearrange2ConsecutiveCellTypes() throw(INTERP_KERNEL::Exception);
1964     DataArrayInt *sortCellsInMEDFileFrmt() throw(INTERP_KERNEL::Exception);
1965     DataArrayInt *getRenumArrForMEDFileFrmt() const throw(INTERP_KERNEL::Exception);
1966     DataArrayInt *convertCellArrayPerGeoType(const DataArrayInt *da) const throw(INTERP_KERNEL::Exception);
1967     MEDCouplingUMesh *buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
1968     MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
1969     MEDCouplingUMesh *explode3DMeshTo1D(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
1970     MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
1971     void orientCorrectlyPolyhedrons() throw(INTERP_KERNEL::Exception);
1972     bool isPresenceOfQuadratic() const throw(INTERP_KERNEL::Exception);
1973     bool isFullyQuadratic() const throw(INTERP_KERNEL::Exception);
1974     MEDCouplingFieldDouble *buildDirectionVectorField() const throw(INTERP_KERNEL::Exception);
1975     bool isContiguous1D() const throw(INTERP_KERNEL::Exception);
1976     void tessellate2D(double eps) throw(INTERP_KERNEL::Exception);
1977     void convertQuadraticCellsToLinear() throw(INTERP_KERNEL::Exception);
1978     DataArrayInt *convertLinearCellsToQuadratic(int conversionType=0) throw(INTERP_KERNEL::Exception);
1979     void convertDegeneratedCells() throw(INTERP_KERNEL::Exception);
1980     DataArrayInt *convertDegeneratedCellsAndRemoveFlatOnes() throw(INTERP_KERNEL::Exception);
1981     bool areOnlySimplexCells() const throw(INTERP_KERNEL::Exception);
1982     MEDCouplingFieldDouble *getEdgeRatioField() const throw(INTERP_KERNEL::Exception);
1983     MEDCouplingFieldDouble *getAspectRatioField() const throw(INTERP_KERNEL::Exception);
1984     MEDCouplingFieldDouble *getWarpField() const throw(INTERP_KERNEL::Exception);
1985     MEDCouplingFieldDouble *getSkewField() const throw(INTERP_KERNEL::Exception);
1986     DataArrayDouble *computePlaneEquationOf3DFaces() const throw(INTERP_KERNEL::Exception);
1987     DataArrayInt *convexEnvelop2D() throw(INTERP_KERNEL::Exception);
1988     std::string cppRepr() const throw(INTERP_KERNEL::Exception);
1989     DataArrayInt *findAndCorrectBadOriented3DExtrudedCells() throw(INTERP_KERNEL::Exception);
1990     DataArrayInt *findAndCorrectBadOriented3DCells() throw(INTERP_KERNEL::Exception);
1991     MEDCoupling::MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
1992     MEDCouplingSkyLineArray *generateGraph() const throw(INTERP_KERNEL::Exception);
1993     DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
1994     DataArrayInt *buildUnionOf2DMesh() const throw(INTERP_KERNEL::Exception);
1995     DataArrayInt *buildUnionOf3DMesh() const throw(INTERP_KERNEL::Exception);
1996     DataArrayInt *orderConsecutiveCells1D() const throw(INTERP_KERNEL::Exception);
1997     DataArrayDouble *getBoundingBoxForBBTreeFast() const throw(INTERP_KERNEL::Exception);
1998     DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
1999     DataArrayDouble *getBoundingBoxForBBTree1DQuadratic(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
2000     void changeOrientationOfCells() throw(INTERP_KERNEL::Exception);
2001     int split2DCells(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *midOpt=0, const DataArrayInt *midOptI=0) throw(INTERP_KERNEL::Exception);
2002     static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da) throw(INTERP_KERNEL::Exception);
2003     static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
2004     static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
2005     static DataArrayInt *ComputeSpreadZoneGradually(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception);
2006     static DataArrayInt *ComputeRangesFromTypeDistribution(const std::vector<int>& code) throw(INTERP_KERNEL::Exception);
2007     %extend {
2008       MEDCouplingUMesh() throw(INTERP_KERNEL::Exception)
2009       {
2010         return MEDCouplingUMesh::New();
2011       }
2012       
2013       MEDCouplingUMesh(const char *meshName, int meshDim) throw(INTERP_KERNEL::Exception)
2014       {
2015         return MEDCouplingUMesh::New(meshName,meshDim);
2016       }
2017
2018       std::string __str__() const throw(INTERP_KERNEL::Exception)
2019       {
2020         return self->simpleRepr();
2021       }
2022       
2023       std::string __repr__() const throw(INTERP_KERNEL::Exception)
2024       {
2025         std::ostringstream oss;
2026         self->reprQuickOverview(oss);
2027         return oss.str();
2028       }
2029       
2030       MEDCouplingUMeshCellIterator *__iter__() throw(INTERP_KERNEL::Exception)
2031       {
2032         return self->cellIterator();
2033       }
2034
2035       static MEDCouplingUMesh *Build1DMeshFromCoords(DataArrayDouble *da) throw(INTERP_KERNEL::Exception)
2036       {
2037         MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::Build1DMeshFromCoords(da));
2038         return ret.retn();
2039       }
2040       
2041       PyObject *getAllGeoTypesSorted() const throw(INTERP_KERNEL::Exception)
2042       {
2043         std::vector<INTERP_KERNEL::NormalizedCellType> result=self->getAllGeoTypesSorted();
2044         std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
2045         PyObject *res=PyList_New(result.size());
2046         for(int i=0;iL!=result.end(); i++, iL++)
2047           PyList_SetItem(res,i,PyInt_FromLong(*iL));
2048         return res;
2049       }
2050       
2051       void setPartOfMySelf(PyObject *li, const MEDCouplingUMesh& otherOnSameCoordsThanThis) throw(INTERP_KERNEL::Exception)
2052       {
2053         int sw;
2054         int singleVal;
2055         std::vector<int> multiVal;
2056         std::pair<int, std::pair<int,int> > slic;
2057         MEDCoupling::DataArrayInt *daIntTyypp=0;
2058         int nbc=self->getNumberOfCells();
2059         convertIntStarOrSliceLikePyObjToCpp(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
2060         switch(sw)
2061           {
2062           case 1:
2063             {
2064               if(singleVal>=nbc)
2065                 {
2066                   std::ostringstream oss;
2067                   oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
2068                   throw INTERP_KERNEL::Exception(oss.str().c_str());
2069                 }
2070               if(singleVal>=0)
2071                 {
2072                   self->setPartOfMySelf(&singleVal,&singleVal+1,otherOnSameCoordsThanThis);
2073                   break;
2074                 }
2075               else
2076                 {
2077                   if(nbc+singleVal>0)
2078                     {
2079                       int tmp=nbc+singleVal;
2080                       self->setPartOfMySelf(&tmp,&tmp+1,otherOnSameCoordsThanThis);
2081                       break;
2082                     }
2083                   else
2084                     {
2085                       std::ostringstream oss;
2086                       oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
2087                       throw INTERP_KERNEL::Exception(oss.str().c_str());
2088                     }
2089                 }
2090             }
2091           case 2:
2092             {
2093               self->setPartOfMySelf(&multiVal[0],&multiVal[0]+multiVal.size(),otherOnSameCoordsThanThis);
2094               break;
2095             }
2096           case 4:
2097             {
2098               if(!daIntTyypp)
2099                 throw INTERP_KERNEL::Exception("MEDCouplingUMesh::setPartOfMySelf : null instance has been given in input !");
2100               daIntTyypp->checkAllocated();
2101               self->setPartOfMySelf(daIntTyypp->begin(),daIntTyypp->end(),otherOnSameCoordsThanThis);
2102               break;
2103             }
2104           default:
2105             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::setPartOfMySelf : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
2106           }
2107       }
2108
2109       void __setitem__(PyObject *li, const MEDCouplingUMesh& otherOnSameCoordsThanThis) throw(INTERP_KERNEL::Exception)
2110       {
2111         int sw;
2112         int singleVal;
2113         std::vector<int> multiVal;
2114         std::pair<int, std::pair<int,int> > slic;
2115         MEDCoupling::DataArrayInt *daIntTyypp=0;
2116         int nbc=self->getNumberOfCells();
2117         convertIntStarOrSliceLikePyObjToCpp(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
2118         switch(sw)
2119           {
2120           case 1:
2121             {
2122               if(singleVal>=nbc)
2123                 {
2124                   std::ostringstream oss;
2125                   oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
2126                   throw INTERP_KERNEL::Exception(oss.str().c_str());
2127                 }
2128               if(singleVal>=0)
2129                 {
2130                   self->setPartOfMySelf(&singleVal,&singleVal+1,otherOnSameCoordsThanThis);
2131                   break;
2132                 }
2133               else
2134                 {
2135                   if(nbc+singleVal>0)
2136                     {
2137                       int tmp=nbc+singleVal;
2138                       self->setPartOfMySelf(&tmp,&tmp+1,otherOnSameCoordsThanThis);
2139                       break;
2140                     }
2141                   else
2142                     {
2143                       std::ostringstream oss;
2144                       oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
2145                       throw INTERP_KERNEL::Exception(oss.str().c_str());
2146                     }
2147                 }
2148             }
2149           case 2:
2150             {
2151               self->setPartOfMySelf(&multiVal[0],&multiVal[0]+multiVal.size(),otherOnSameCoordsThanThis);
2152               break;
2153             }
2154           case 3:
2155             {
2156               self->setPartOfMySelfSlice(slic.first,slic.second.first,slic.second.second,otherOnSameCoordsThanThis);
2157               break;
2158             }
2159           case 4:
2160             {
2161               if(!daIntTyypp)
2162                 throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__setitem__ : null instance has been given in input !");
2163               daIntTyypp->checkAllocated();
2164               self->setPartOfMySelf(daIntTyypp->begin(),daIntTyypp->end(),otherOnSameCoordsThanThis);
2165               break;
2166             }
2167           default:
2168             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__setitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int, slice, DataArrayInt instance !");
2169           }
2170       }
2171
2172       void insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, PyObject *li) throw(INTERP_KERNEL::Exception)
2173       {
2174         int szArr,sw,iTypppArr;
2175         std::vector<int> stdvecTyyppArr;
2176         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
2177         if(size>szArr)
2178           {
2179             std::ostringstream oss; oss << "Wrap of MEDCouplingUMesh::insertNextCell : request of connectivity with length " << size << " whereas the length of input is " << szArr << " !";
2180             throw INTERP_KERNEL::Exception(oss.str().c_str());
2181           }
2182         self->insertNextCell(type,size,tmp);
2183       }
2184
2185       void insertNextCell(INTERP_KERNEL::NormalizedCellType type, PyObject *li) throw(INTERP_KERNEL::Exception)
2186       {
2187         int szArr,sw,iTypppArr;
2188         std::vector<int> stdvecTyyppArr;
2189         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
2190         self->insertNextCell(type,szArr,tmp);
2191       }
2192       
2193       DataArrayInt *getNodalConnectivity() throw(INTERP_KERNEL::Exception)
2194       {
2195         DataArrayInt *ret=self->getNodalConnectivity();
2196         if(ret)
2197           ret->incrRef();
2198         return ret;
2199       }
2200       DataArrayInt *getNodalConnectivityIndex() throw(INTERP_KERNEL::Exception)
2201       {
2202         DataArrayInt *ret=self->getNodalConnectivityIndex();
2203         if(ret)
2204           ret->incrRef();
2205         return ret;
2206       }
2207       
2208       static PyObject *ComputeSpreadZoneGraduallyFromSeed(PyObject *seed, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn, int nbOfDepthPeeling=-1) throw(INTERP_KERNEL::Exception)
2209       {
2210         int szArr,sw,iTypppArr;
2211         std::vector<int> stdvecTyyppArr;
2212         const int *seedPtr=convertIntStarLikePyObjToCppIntStar(seed,sw,szArr,iTypppArr,stdvecTyyppArr);
2213         int nbOfDepthPeelingPerformed=0;
2214         DataArrayInt *ret0=MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(seedPtr,seedPtr+szArr,arrIn,arrIndxIn,nbOfDepthPeeling,nbOfDepthPeelingPerformed);
2215         PyObject *res=PyTuple_New(2);
2216         PyTuple_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2217         PyTuple_SetItem(res,1,PyInt_FromLong(nbOfDepthPeelingPerformed));
2218         return res;
2219       }
2220
2221       static PyObject *FindCommonCellsAlg(int compType, int startCellId, const DataArrayInt *nodal, const DataArrayInt *nodalI, const DataArrayInt *revNodal, const DataArrayInt *revNodalI) throw(INTERP_KERNEL::Exception)
2222       {
2223         DataArrayInt *v0=0,*v1=0;
2224         MEDCouplingUMesh::FindCommonCellsAlg(compType,startCellId,nodal,nodalI,revNodal,revNodalI,v0,v1);
2225         PyObject *res = PyList_New(2);
2226         PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2227         PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2228         return res;
2229       }
2230       
2231       PyObject *distanceToPoint(PyObject *point) const throw(INTERP_KERNEL::Exception)
2232       {
2233         double val;
2234         DataArrayDouble *a;
2235         DataArrayDoubleTuple *aa;
2236         std::vector<double> bb;
2237         int sw;
2238         int nbOfCompo=self->getSpaceDimension();
2239         const double *pt=convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,"Python wrap of MEDCouplingUMesh::distanceToPoint",1,nbOfCompo,true);
2240         //
2241         int cellId=-1;
2242         double ret0=self->distanceToPoint(pt,pt+nbOfCompo,cellId);
2243         PyObject *ret=PyTuple_New(2);
2244         PyTuple_SetItem(ret,0,PyFloat_FromDouble(ret0));
2245         PyTuple_SetItem(ret,1,PyInt_FromLong(cellId));
2246         return ret;
2247       }
2248
2249       PyObject *distanceToPoints(const DataArrayDouble *pts) const throw(INTERP_KERNEL::Exception)
2250       {
2251         DataArrayInt *ret1=0;
2252         DataArrayDouble *ret0=self->distanceToPoints(pts,ret1);
2253         PyObject *ret=PyTuple_New(2);
2254         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
2255         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2256         return ret;
2257       }
2258
2259       PyObject *tetrahedrize(int policy) throw(INTERP_KERNEL::Exception)
2260       {
2261         int ret2(-1);
2262         DataArrayInt *ret1(0);
2263         MEDCoupling1SGTUMesh *ret0(self->tetrahedrize(policy,ret1,ret2));
2264         PyObject *ret=PyTuple_New(3);
2265         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCoupling1SGTUMesh, SWIG_POINTER_OWN | 0 ));
2266         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2267         PyTuple_SetItem(ret,2,PyInt_FromLong(ret2));
2268         return ret;
2269       }
2270       
2271       PyObject *checkButterflyCells(double eps=1e-12) throw(INTERP_KERNEL::Exception)
2272       {
2273         std::vector<int> cells;
2274         self->checkButterflyCells(cells,eps);
2275         DataArrayInt *ret=DataArrayInt::New();
2276         ret->alloc((int)cells.size(),1);
2277         std::copy(cells.begin(),cells.end(),ret->getPointer());
2278         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
2279       }
2280
2281       PyObject *splitByType() const throw(INTERP_KERNEL::Exception)
2282       {
2283         std::vector<MEDCouplingUMesh *> ms=self->splitByType();
2284         int sz=ms.size();
2285         PyObject *ret = PyList_New(sz);
2286         for(int i=0;i<sz;i++)
2287           PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(ms[i]),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2288         return ret;
2289       }
2290
2291       PyObject *partitionBySpreadZone() const throw(INTERP_KERNEL::Exception)
2292       {
2293         std::vector<DataArrayInt *> retCpp=self->partitionBySpreadZone();
2294         int sz=retCpp.size();
2295         PyObject *ret=PyList_New(sz);
2296         for(int i=0;i<sz;i++)
2297           PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2298         return ret;
2299       }
2300
2301       static PyObject *PartitionBySpreadZone(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
2302       {
2303         std::vector<DataArrayInt *> retCpp(MEDCouplingUMesh::PartitionBySpreadZone(arrIn,arrIndxIn));
2304         int sz=retCpp.size();
2305         PyObject *ret=PyList_New(sz);
2306         for(int i=0;i<sz;i++)
2307           PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2308         return ret;
2309       }
2310
2311       PyObject *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, PyObject *ids) const throw(INTERP_KERNEL::Exception)
2312       {
2313         int size;
2314         INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(ids,&size);
2315         MEDCouplingUMesh *ret=self->keepSpecifiedCells(type,tmp,tmp+size);
2316         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 );
2317       }
2318
2319       bool checkConsecutiveCellTypesAndOrder(PyObject *li) const throw(INTERP_KERNEL::Exception)
2320       {
2321         int sz;
2322         INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=(INTERP_KERNEL::NormalizedCellType *)convertPyToNewIntArr2(li,&sz);
2323         bool ret=self->checkConsecutiveCellTypesAndOrder(order,order+sz);
2324         return ret;
2325       }
2326
2327       DataArrayInt *getRenumArrForConsecutiveCellTypesSpec(PyObject *li) const throw(INTERP_KERNEL::Exception)
2328       {
2329         int sz;
2330         INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=(INTERP_KERNEL::NormalizedCellType *)convertPyToNewIntArr2(li,&sz);
2331         DataArrayInt *ret=self->getRenumArrForConsecutiveCellTypesSpec(order,(INTERP_KERNEL::NormalizedCellType *)order+sz);
2332         return ret;
2333       }
2334
2335       PyObject *findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords) const throw(INTERP_KERNEL::Exception)
2336       {
2337         DataArrayInt *tmp0=0,*tmp1=0,*tmp2=0;
2338         self->findNodesToDuplicate(otherDimM1OnSameCoords,tmp0,tmp1,tmp2);
2339         PyObject *ret=PyTuple_New(3);
2340         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2341         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2342         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(tmp2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2343         return ret;
2344       }
2345
2346       PyObject *findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords) const throw(INTERP_KERNEL::Exception)
2347       {
2348         DataArrayInt *tmp0=0,*tmp1=0;
2349         self->findCellIdsLyingOn(otherDimM1OnSameCoords,tmp0,tmp1);
2350         PyObject *ret=PyTuple_New(2);
2351         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2352         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2353         return ret;
2354       }
2355
2356       void duplicateNodes(PyObject *li) throw(INTERP_KERNEL::Exception)
2357       {
2358         int sw;
2359         int singleVal;
2360         std::vector<int> multiVal;
2361         std::pair<int, std::pair<int,int> > slic;
2362         MEDCoupling::DataArrayInt *daIntTyypp=0;
2363         convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
2364         switch(sw)
2365           {
2366           case 1:
2367             return self->duplicateNodes(&singleVal,&singleVal+1);
2368           case 2:
2369             return self->duplicateNodes(&multiVal[0],&multiVal[0]+multiVal.size());
2370           case 4:
2371             return self->duplicateNodes(daIntTyypp->begin(),daIntTyypp->end());
2372           default:
2373             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::duplicateNodes : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2374           }
2375       }
2376
2377       void duplicateNodesInConn(PyObject *li, int offset) throw(INTERP_KERNEL::Exception)
2378       {
2379         int sw;
2380         int singleVal;
2381         std::vector<int> multiVal;
2382         std::pair<int, std::pair<int,int> > slic;
2383         MEDCoupling::DataArrayInt *daIntTyypp=0;
2384         convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
2385         switch(sw)
2386           {
2387           case 1:
2388             return self->duplicateNodesInConn(&singleVal,&singleVal+1,offset);
2389           case 2:
2390             return self->duplicateNodesInConn(&multiVal[0],&multiVal[0]+multiVal.size(),offset);
2391           case 4:
2392             return self->duplicateNodesInConn(daIntTyypp->begin(),daIntTyypp->end(),offset);
2393           default:
2394             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::duplicateNodesInConn : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2395           }
2396       }
2397
2398       void attractSeg3MidPtsAroundNodes(double ratio, PyObject *nodeIds) throw(INTERP_KERNEL::Exception)
2399       {
2400         int szArr,sw,iTypppArr;
2401         std::vector<int> stdvecTyyppArr;
2402         const int *nodeIdsPtr(convertIntStarLikePyObjToCppIntStar(nodeIds,sw,szArr,iTypppArr,stdvecTyyppArr));
2403         self->attractSeg3MidPtsAroundNodes(ratio,nodeIdsPtr,nodeIdsPtr+szArr);
2404       }
2405
2406       PyObject *getLevArrPerCellTypes(PyObject *li) const throw(INTERP_KERNEL::Exception)
2407       {
2408         int sz;
2409         INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=(INTERP_KERNEL::NormalizedCellType *)convertPyToNewIntArr2(li,&sz);
2410         DataArrayInt *tmp0,*tmp1=0;
2411         tmp0=self->getLevArrPerCellTypes(order,(INTERP_KERNEL::NormalizedCellType *)order+sz,tmp1);
2412         PyObject *ret=PyTuple_New(2);
2413         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2414         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2415         return ret;
2416       }
2417
2418       PyObject *convertNodalConnectivityToDynamicGeoTypeMesh() const throw(INTERP_KERNEL::Exception)
2419       {
2420         DataArrayInt *ret0=0,*ret1=0;
2421         self->convertNodalConnectivityToDynamicGeoTypeMesh(ret0,ret1);
2422         PyObject *ret=PyTuple_New(2);
2423         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2424         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2425         return ret;
2426       }
2427
2428       static PyObject *AggregateSortedByTypeMeshesOnSameCoords(PyObject *ms) throw(INTERP_KERNEL::Exception)
2429       {
2430         std::vector<const MEDCoupling::MEDCouplingUMesh *> meshes;
2431         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(ms,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",meshes);
2432         DataArrayInt *ret1=0,*ret2=0;
2433         MEDCouplingUMesh *ret0=MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(meshes,ret1,ret2);
2434         PyObject *ret=PyTuple_New(3);
2435         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2436         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2437         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2438         return ret;
2439       }
2440
2441       static PyObject *MergeUMeshesOnSameCoords(PyObject *ms) throw(INTERP_KERNEL::Exception)
2442       {
2443         std::vector<const MEDCoupling::MEDCouplingUMesh *> meshes;
2444         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(ms,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",meshes);
2445         MEDCouplingUMesh *ret=MEDCouplingUMesh::MergeUMeshesOnSameCoords(meshes);
2446         return convertMesh(ret, SWIG_POINTER_OWN | 0 );
2447       }
2448
2449       static PyObject *FuseUMeshesOnSameCoords(PyObject *ms, int compType) throw(INTERP_KERNEL::Exception)
2450       {
2451         int sz;
2452         std::vector<const MEDCouplingUMesh *> meshes;
2453         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(ms,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",meshes);
2454         std::vector<DataArrayInt *> corr;
2455         MEDCouplingUMesh *um=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,compType,corr);
2456         sz=corr.size();
2457         PyObject *ret1=PyList_New(sz);
2458         for(int i=0;i<sz;i++)
2459           PyList_SetItem(ret1,i,SWIG_NewPointerObj(SWIG_as_voidptr(corr[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2460         PyObject *ret=PyList_New(2);
2461         PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(um),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2462         PyList_SetItem(ret,1,ret1);
2463         return ret;
2464       }
2465
2466       static void PutUMeshesOnSameAggregatedCoords(PyObject *ms) throw(INTERP_KERNEL::Exception)
2467       {
2468         std::vector<MEDCouplingUMesh *> meshes;
2469         convertFromPyObjVectorOfObj<MEDCoupling::MEDCouplingUMesh *>(ms,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",meshes);
2470         MEDCouplingUMesh::PutUMeshesOnSameAggregatedCoords(meshes);
2471       }
2472
2473       static void MergeNodesOnUMeshesSharingSameCoords(PyObject *ms, double eps) throw(INTERP_KERNEL::Exception)
2474       {
2475         std::vector<MEDCouplingUMesh *> meshes;
2476         convertFromPyObjVectorOfObj<MEDCoupling::MEDCouplingUMesh *>(ms,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",meshes);
2477         MEDCouplingUMesh::MergeNodesOnUMeshesSharingSameCoords(meshes,eps);
2478       }
2479
2480       static bool RemoveIdsFromIndexedArrays(PyObject *li, DataArrayInt *arr, DataArrayInt *arrIndx, int offsetForRemoval=0) throw(INTERP_KERNEL::Exception)
2481       {
2482         int sw;
2483         int singleVal;
2484         std::vector<int> multiVal;
2485         std::pair<int, std::pair<int,int> > slic;
2486         MEDCoupling::DataArrayInt *daIntTyypp=0;
2487         if(!arrIndx)
2488           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::RemoveIdsFromIndexedArrays : null pointer as arrIndex !");
2489         convertIntStarOrSliceLikePyObjToCpp(li,arrIndx->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
2490         switch(sw)
2491           {
2492           case 1:
2493             return MEDCouplingUMesh::RemoveIdsFromIndexedArrays(&singleVal,&singleVal+1,arr,arrIndx,offsetForRemoval);
2494           case 2:
2495             return MEDCouplingUMesh::RemoveIdsFromIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arr,arrIndx,offsetForRemoval);
2496           case 4:
2497             return MEDCouplingUMesh::RemoveIdsFromIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arr,arrIndx,offsetForRemoval);
2498           default:
2499             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::RemoveIdsFromIndexedArrays : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2500           }
2501       }
2502       
2503       static PyObject *ExtractFromIndexedArrays(PyObject *li, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
2504       {
2505         DataArrayInt *arrOut=0,*arrIndexOut=0;
2506         int sw;
2507         int singleVal;
2508         std::vector<int> multiVal;
2509         std::pair<int, std::pair<int,int> > slic;
2510         MEDCoupling::DataArrayInt *daIntTyypp=0;
2511         if(!arrIndxIn)
2512           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ExtractFromIndexedArrays : null pointer as arrIndxIn !");
2513         convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
2514         switch(sw)
2515           {
2516           case 1:
2517             {
2518               MEDCouplingUMesh::ExtractFromIndexedArrays(&singleVal,&singleVal+1,arrIn,arrIndxIn,arrOut,arrIndexOut);
2519               break;
2520             }
2521           case 2:
2522             {
2523               MEDCouplingUMesh::ExtractFromIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,arrOut,arrIndexOut);
2524               break;
2525             }
2526           case 4:
2527             {
2528               MEDCouplingUMesh::ExtractFromIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,arrOut,arrIndexOut);
2529               break;
2530             }
2531           default:
2532             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ExtractFromIndexedArrays : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2533           }
2534         PyObject *ret=PyTuple_New(2);
2535         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2536         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2537         return ret;
2538       }
2539
2540       static PyObject *ExtractFromIndexedArraysSlice(int strt, int stp, int step, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
2541       {
2542         DataArrayInt *arrOut=0,*arrIndexOut=0;
2543         MEDCouplingUMesh::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
2544         PyObject *ret=PyTuple_New(2);
2545         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2546         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2547         return ret;
2548       }
2549
2550       static PyObject *ExtractFromIndexedArraysSlice(PyObject *slic, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
2551       {
2552         if(!PySlice_Check(slic))
2553           throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : the first param is not a pyslice !");
2554         Py_ssize_t strt=2,stp=2,step=2;
2555         if(!arrIndxIn)
2556           throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : last array is null !");
2557         arrIndxIn->checkAllocated();
2558         if(arrIndxIn->getNumberOfComponents()!=1)
2559           throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : number of components of last argument must be equal to one !");
2560         GetIndicesOfSlice(slic,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step,"ExtractFromIndexedArraysSlice (wrap) : Invalid slice regarding nb of elements !");
2561         DataArrayInt *arrOut=0,*arrIndexOut=0;
2562         MEDCouplingUMesh::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
2563         PyObject *ret=PyTuple_New(2);
2564         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2565         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2566         return ret;
2567       }
2568
2569       static PyObject *SetPartOfIndexedArrays(PyObject *li,
2570                                               const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
2571                                               const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex) throw(INTERP_KERNEL::Exception)
2572       {
2573         DataArrayInt *arrOut=0,*arrIndexOut=0;
2574         int sw;
2575         int singleVal;
2576         std::vector<int> multiVal;
2577         std::pair<int, std::pair<int,int> > slic;
2578         MEDCoupling::DataArrayInt *daIntTyypp=0;
2579         if(!arrIndxIn)
2580           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::SetPartOfIndexedArrays : null pointer as arrIndex !");
2581         convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
2582         switch(sw)
2583           {
2584           case 1:
2585             {
2586               MEDCouplingUMesh::SetPartOfIndexedArrays(&singleVal,&singleVal+1,arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
2587               break;
2588             }
2589           case 2:
2590             {
2591               MEDCouplingUMesh::SetPartOfIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
2592               break;
2593             }
2594           case 4:
2595             {
2596               MEDCouplingUMesh::SetPartOfIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
2597               break;
2598             }
2599           default:
2600             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::SetPartOfIndexedArrays : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2601           }
2602         PyObject *ret=PyTuple_New(2);
2603         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2604         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2605         return ret;
2606       }
2607
2608       static void SetPartOfIndexedArraysSameIdx(PyObject *li, DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
2609                                                 const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex) throw(INTERP_KERNEL::Exception)
2610       {
2611         int sw;
2612         int singleVal;
2613         std::vector<int> multiVal;
2614         std::pair<int, std::pair<int,int> > slic;
2615         MEDCoupling::DataArrayInt *daIntTyypp=0;
2616         if(!arrIndxIn)
2617           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx : null pointer as arrIndex !");
2618         convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
2619         switch(sw)
2620           {
2621           case 1:
2622             {
2623               MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx(&singleVal,&singleVal+1,arrIn,arrIndxIn,srcArr,srcArrIndex);
2624               break;
2625             }
2626           case 2:
2627             {
2628               MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,srcArr,srcArrIndex);
2629               break;
2630             }
2631           case 4:
2632             {
2633               MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,srcArr,srcArrIndex);
2634               break;
2635             }
2636           default:
2637             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
2638           }
2639       }
2640
2641       PyObject *are2DCellsNotCorrectlyOriented(PyObject *vec, bool polyOnly) const throw(INTERP_KERNEL::Exception)
2642       {
2643         double val;
2644         DataArrayDouble *a;
2645         DataArrayDoubleTuple *aa;
2646         std::vector<double> bb;
2647         int sw;
2648         int spaceDim=self->getSpaceDimension();
2649         const char msg[]="Python wrap of MEDCouplingUMesh::are2DCellsNotCorrectlyOriented : ";
2650         const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val,a,aa,bb,msg,1,spaceDim,true);
2651         //
2652         std::vector<int> cells;
2653         self->are2DCellsNotCorrectlyOriented(v,polyOnly,cells);
2654         DataArrayInt *ret=DataArrayInt::New();
2655         ret->alloc((int)cells.size(),1);
2656         std::copy(cells.begin(),cells.end(),ret->getPointer());
2657         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
2658       }
2659
2660       void orientCorrectly2DCells(PyObject *vec, bool polyOnly) throw(INTERP_KERNEL::Exception)
2661       {
2662         double val;
2663         DataArrayDouble *a;
2664         DataArrayDoubleTuple *aa;
2665         std::vector<double> bb;
2666         int sw;
2667         int spaceDim=self->getSpaceDimension();
2668         const char msg[]="Python wrap of MEDCouplingUMesh::orientCorrectly2DCells : ";
2669         const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val,a,aa,bb,msg,1,spaceDim,true);
2670         self->orientCorrectly2DCells(v,polyOnly);
2671       }
2672       
2673       PyObject *arePolyhedronsNotCorrectlyOriented() const throw(INTERP_KERNEL::Exception)
2674       {
2675         std::vector<int> cells;
2676         self->arePolyhedronsNotCorrectlyOriented(cells);
2677         DataArrayInt *ret=DataArrayInt::New();
2678         ret->alloc((int)cells.size(),1);
2679         std::copy(cells.begin(),cells.end(),ret->getPointer());
2680         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
2681       }
2682
2683       PyObject *getFastAveragePlaneOfThis() const throw(INTERP_KERNEL::Exception)
2684       {
2685         double vec[3];
2686         double pos[3];
2687         self->getFastAveragePlaneOfThis(vec,pos);
2688         double vals[6];
2689         std::copy(vec,vec+3,vals);
2690         std::copy(pos,pos+3,vals+3);
2691         return convertDblArrToPyListOfTuple<double>(vals,3,2);
2692       }
2693       
2694       static MEDCouplingUMesh *MergeUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
2695       {
2696         std::vector<const MEDCoupling::MEDCouplingUMesh *> tmp;
2697         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",tmp);
2698         return MEDCouplingUMesh::MergeUMeshes(tmp);
2699       }
2700
2701       PyObject *areCellsIncludedIn(const MEDCouplingUMesh *other, int compType) const throw(INTERP_KERNEL::Exception)
2702       {
2703         DataArrayInt *ret1;
2704         bool ret0=self->areCellsIncludedIn(other,compType,ret1);
2705         PyObject *ret=PyTuple_New(2);
2706         PyObject *ret0Py=ret0?Py_True:Py_False;
2707         Py_XINCREF(ret0Py);
2708         PyTuple_SetItem(ret,0,ret0Py);
2709         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2710         return ret;
2711       }
2712
2713       PyObject *areCellsIncludedInPolicy7(const MEDCouplingUMesh *other) const throw(INTERP_KERNEL::Exception)
2714       {
2715         DataArrayInt *ret1;
2716         bool ret0=self->areCellsIncludedInPolicy7(other,ret1);
2717         PyObject *ret=PyTuple_New(2);
2718         PyObject *ret0Py=ret0?Py_True:Py_False;
2719         Py_XINCREF(ret0Py);
2720         PyTuple_SetItem(ret,0,ret0Py);
2721         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2722         return ret;
2723       }
2724
2725       PyObject *explode3DMeshTo1D() const throw(INTERP_KERNEL::Exception)
2726       {
2727         MCAuto<DataArrayInt> d0=DataArrayInt::New();
2728         MCAuto<DataArrayInt> d1=DataArrayInt::New();
2729         MCAuto<DataArrayInt> d2=DataArrayInt::New();
2730         MCAuto<DataArrayInt> d3=DataArrayInt::New();
2731         MEDCouplingUMesh *m=self->explode3DMeshTo1D(d0,d1,d2,d3);
2732         PyObject *ret=PyTuple_New(5);
2733         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2734         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2735         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2736         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2737         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2738         return ret;
2739       }
2740
2741       PyObject *explodeIntoEdges() const throw(INTERP_KERNEL::Exception)
2742       {
2743         MCAuto<DataArrayInt> desc,descIndex,revDesc,revDescIndx;
2744         MCAuto<MEDCouplingUMesh> m(self->explodeIntoEdges(desc,descIndex,revDesc,revDescIndx));
2745         PyObject *ret=PyTuple_New(5);
2746         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2747         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(desc.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2748         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(descIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2749         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(revDesc.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2750         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(revDescIndx.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2751         return ret;
2752       }
2753
2754       PyObject *explodeMeshIntoMicroEdges() const throw(INTERP_KERNEL::Exception)
2755       {
2756         MCAuto<DataArrayInt> d0=DataArrayInt::New();
2757         MCAuto<DataArrayInt> d1=DataArrayInt::New();
2758         MCAuto<DataArrayInt> d2=DataArrayInt::New();
2759         MCAuto<DataArrayInt> d3=DataArrayInt::New();
2760         MEDCouplingUMesh *m=self->explodeMeshIntoMicroEdges(d0,d1,d2,d3);
2761         PyObject *ret=PyTuple_New(5);
2762         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2763         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2764         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2765         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2766         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2767         return ret;
2768       }
2769
2770       PyObject *buildDescendingConnectivity() const throw(INTERP_KERNEL::Exception)
2771       {
2772         MCAuto<DataArrayInt> d0=DataArrayInt::New();
2773         MCAuto<DataArrayInt> d1=DataArrayInt::New();
2774         MCAuto<DataArrayInt> d2=DataArrayInt::New();
2775         MCAuto<DataArrayInt> d3=DataArrayInt::New();
2776         MEDCouplingUMesh *m=self->buildDescendingConnectivity(d0,d1,d2,d3);
2777         PyObject *ret=PyTuple_New(5);
2778         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2779         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2780         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2781         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2782         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2783         return ret;
2784       }
2785
2786       PyObject *buildDescendingConnectivity2() const throw(INTERP_KERNEL::Exception)
2787       {
2788         MCAuto<DataArrayInt> d0=DataArrayInt::New();
2789         MCAuto<DataArrayInt> d1=DataArrayInt::New();
2790         MCAuto<DataArrayInt> d2=DataArrayInt::New();
2791         MCAuto<DataArrayInt> d3=DataArrayInt::New();
2792         MEDCouplingUMesh *m=self->buildDescendingConnectivity2(d0,d1,d2,d3);
2793         PyObject *ret=PyTuple_New(5);
2794         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2795         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2796         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2797         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2798         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2799         return ret;
2800       }
2801       
2802       PyObject *computeNeighborsOfCells() const throw(INTERP_KERNEL::Exception)
2803       {
2804         DataArrayInt *neighbors=0,*neighborsIdx=0;
2805         self->computeNeighborsOfCells(neighbors,neighborsIdx);
2806         PyObject *ret=PyTuple_New(2);
2807         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2808         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2809         return ret;
2810       }
2811
2812       PyObject *computeNeighborsOfNodes() const throw(INTERP_KERNEL::Exception)
2813       {
2814         DataArrayInt *neighbors=0,*neighborsIdx=0;
2815         self->computeNeighborsOfNodes(neighbors,neighborsIdx);
2816         PyObject *ret=PyTuple_New(2);
2817         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2818         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2819         return ret;
2820       }
2821
2822       PyObject *computeEnlargedNeighborsOfNodes() const throw(INTERP_KERNEL::Exception)
2823       {
2824         MCAuto<DataArrayInt> neighbors,neighborsIdx;
2825         self->computeEnlargedNeighborsOfNodes(neighbors,neighborsIdx);
2826         PyObject *ret=PyTuple_New(2);
2827         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2828         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2829         return ret;
2830       }
2831       
2832       PyObject *computeCellNeighborhoodFromNodesOne(const DataArrayInt *nodeNeigh, const DataArrayInt *nodeNeighI) const throw(INTERP_KERNEL::Exception)
2833       {
2834         MCAuto<DataArrayInt> cellNeigh,cellNeighIndex;
2835         self->computeCellNeighborhoodFromNodesOne(nodeNeigh,nodeNeighI,cellNeigh,cellNeighIndex);
2836         PyObject *ret=PyTuple_New(2);
2837         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeigh.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2838         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeighIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2839         return ret;
2840       }
2841       
2842       static PyObject *ComputeNeighborsOfCellsAdv(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *revDesc, const DataArrayInt *revDescI) throw(INTERP_KERNEL::Exception)
2843       {
2844         DataArrayInt *neighbors=0,*neighborsIdx=0;
2845         MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(desc,descI,revDesc,revDescI,neighbors,neighborsIdx);
2846         PyObject *ret=PyTuple_New(2);
2847         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2848         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2849         return ret;
2850       }
2851
2852       PyObject *emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh)
2853       {
2854         MCAuto<DataArrayInt> d0=DataArrayInt::New();
2855         MCAuto<DataArrayInt> d1=DataArrayInt::New();
2856         DataArrayInt *d2,*d3,*d4,*dd5;
2857         MEDCouplingUMesh *mOut=self->emulateMEDMEMBDC(nM1LevMesh,d0,d1,d2,d3,d4,dd5);
2858         PyObject *ret=PyTuple_New(7);
2859         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(mOut),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2860         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2861         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2862         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2863         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2864         PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(d4),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2865         PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(dd5),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2866         return ret;
2867       }
2868
2869       DataArrayDouble *getPartBarycenterAndOwner(DataArrayInt *da) const throw(INTERP_KERNEL::Exception)
2870       {
2871         if(!da)
2872           throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2873         da->checkAllocated();
2874         return self->getPartBarycenterAndOwner(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
2875       }
2876
2877       DataArrayDouble *getPartMeasureField(bool isAbs, DataArrayInt *da) const throw(INTERP_KERNEL::Exception)
2878       {
2879         if(!da)
2880           throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2881         da->checkAllocated();
2882         return self->getPartMeasureField(isAbs,da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
2883       }
2884
2885       MEDCouplingFieldDouble *buildPartOrthogonalField(DataArrayInt *da) const throw(INTERP_KERNEL::Exception)
2886       {
2887         if(!da)
2888           throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2889         da->checkAllocated();
2890         return self->buildPartOrthogonalField(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
2891       }
2892
2893       PyObject *getTypesOfPart(DataArrayInt *da) const throw(INTERP_KERNEL::Exception)
2894       {
2895         if(!da)
2896           throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2897         da->checkAllocated();
2898         std::set<INTERP_KERNEL::NormalizedCellType> result=self->getTypesOfPart(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
2899         std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
2900         PyObject *res = PyList_New(result.size());
2901         for (int i=0;iL!=result.end(); i++, iL++)
2902           PyList_SetItem(res,i,PyInt_FromLong(*iL));
2903         return res;
2904       }
2905
2906       DataArrayInt *keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da) const throw(INTERP_KERNEL::Exception)
2907       {
2908         if(!da)
2909           throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
2910         da->checkAllocated();
2911         DataArrayInt *ret=self->keepCellIdsByType(type,da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
2912         ret->setName(da->getName().c_str());
2913         return ret;
2914       }
2915
2916       static PyObject *Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps) throw(INTERP_KERNEL::Exception)
2917       {
2918         DataArrayInt *cellNb1=0,*cellNb2=0;
2919         MEDCouplingUMesh *mret=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,eps,cellNb1,cellNb2);
2920         PyObject *ret=PyTuple_New(3);
2921         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(mret),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2922         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNb1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2923         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(cellNb2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2924         return ret;
2925       }
2926
2927       static PyObject *Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D, const MEDCouplingUMesh *mesh1D, double eps) throw(INTERP_KERNEL::Exception)
2928       {
2929         MEDCouplingUMesh *splitMesh2D(0),*splitMesh1D(0);
2930         DataArrayInt *cellIdInMesh2D(0),*cellIdInMesh1D(0);
2931         MEDCouplingUMesh::Intersect2DMeshWith1DLine(mesh2D,mesh1D,eps,splitMesh2D,splitMesh1D,cellIdInMesh2D,cellIdInMesh1D);
2932         PyObject *ret(PyTuple_New(4));
2933         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(splitMesh2D),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2934         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(splitMesh1D),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2935         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(cellIdInMesh2D),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2936         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellIdInMesh1D),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2937         return ret;
2938       }
2939
2940       PyObject *buildSlice3D(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
2941       {
2942         int spaceDim=self->getSpaceDimension();
2943         if(spaceDim!=3)
2944           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingUMesh::buildSlice3D : works only for spaceDim 3 !");
2945         double val,val2;
2946         DataArrayDouble *a,*a2;
2947         DataArrayDoubleTuple *aa,*aa2;
2948         std::vector<double> bb,bb2;
2949         int sw;
2950         const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st parameter for origin.";
2951         const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd parameter for vector.";
2952         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
2953         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
2954         //
2955         DataArrayInt *cellIds=0;
2956         MEDCouplingUMesh *ret0=self->buildSlice3D(orig,vect,eps,cellIds);
2957         PyObject *ret=PyTuple_New(2);
2958         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2959         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2960         return ret;
2961       }
2962
2963       PyObject *buildSlice3DSurf(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
2964       {
2965         int spaceDim=self->getSpaceDimension();
2966         if(spaceDim!=3)
2967           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingUMesh::buildSlice3DSurf : works only for spaceDim 3 !");
2968         double val,val2;
2969         DataArrayDouble *a,*a2;
2970         DataArrayDoubleTuple *aa,*aa2;
2971         std::vector<double> bb,bb2;
2972         int sw;
2973         const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st parameter for origin.";
2974         const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd parameter for vector.";
2975         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
2976         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
2977         //
2978         DataArrayInt *cellIds=0;
2979         MEDCouplingUMesh *ret0=self->buildSlice3DSurf(orig,vect,eps,cellIds);
2980         PyObject *ret=PyTuple_New(2);
2981         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
2982         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
2983         return ret;
2984       }
2985
2986       MEDCouplingUMesh *clipSingle3DCellByPlane(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
2987       {
2988         double val,val2;
2989         DataArrayDouble *a,*a2;
2990         DataArrayDoubleTuple *aa,*aa2;
2991         std::vector<double> bb,bb2;
2992         int sw;
2993         const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st parameter for origin.";
2994         const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd parameter for vector.";
2995         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,3,true);
2996         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,3,true);
2997         MCAuto<MEDCouplingUMesh> ret(self->clipSingle3DCellByPlane(orig,vect,eps));
2998         return ret.retn();
2999       }
3000
3001       DataArrayInt *getCellIdsCrossingPlane(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
3002       {
3003         int spaceDim=self->getSpaceDimension();
3004         if(spaceDim!=3)
3005           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : works only for spaceDim 3 !");
3006         double val,val2;
3007         DataArrayDouble *a,*a2;
3008         DataArrayDoubleTuple *aa,*aa2;
3009         std::vector<double> bb,bb2;
3010         int sw;
3011         const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st parameter for origin.";
3012         const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd parameter for vector.";
3013         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
3014         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
3015         return self->getCellIdsCrossingPlane(orig,vect,eps);
3016       }
3017
3018       void convertToPolyTypes(PyObject *li) throw(INTERP_KERNEL::Exception)
3019       {
3020         int sw;
3021         int pos1;
3022         std::vector<int> pos2;
3023         DataArrayInt *pos3=0;
3024         DataArrayIntTuple *pos4=0;
3025         convertIntStarLikePyObjToCpp(li,sw,pos1,pos2,pos3,pos4);
3026         switch(sw)
3027           {
3028           case 1:
3029             {
3030               self->convertToPolyTypes(&pos1,&pos1+1);
3031               return;
3032             }
3033           case 2:
3034             {
3035               if(pos2.empty())
3036                 return;
3037               self->convertToPolyTypes(&pos2[0],&pos2[0]+pos2.size());
3038               return ;
3039             }
3040           case 3:
3041             {
3042               self->convertToPolyTypes(pos3->begin(),pos3->end());
3043               return ;
3044             }
3045           default:
3046             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertToPolyTypes : unexpected input array type recognized !");
3047           }
3048       }      
3049     }
3050     void convertAllToPoly();
3051     void convertExtrudedPolyhedra() throw(INTERP_KERNEL::Exception);
3052     bool unPolyze() throw(INTERP_KERNEL::Exception);
3053     void simplifyPolyhedra(double eps) throw(INTERP_KERNEL::Exception);
3054     MEDCouplingUMesh *buildSpreadZonesWithPoly() const throw(INTERP_KERNEL::Exception);
3055     MEDCouplingUMesh *buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy) throw(INTERP_KERNEL::Exception);
3056   };
3057
3058   //== MEDCouplingUMesh End
3059
3060   //== MEDCouplingMappedExtrudedMesh
3061
3062   class MEDCouplingMappedExtrudedMesh : public MEDCoupling::MEDCouplingMesh
3063   {
3064   public:
3065     static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception);
3066     static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingCMesh *mesh3D) throw(INTERP_KERNEL::Exception);
3067     MEDCouplingUMesh *build3DUnstructuredMesh() const throw(INTERP_KERNEL::Exception);
3068     int get2DCellIdForExtrusion() const;
3069     %extend {
3070       MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception)
3071       {
3072         return MEDCouplingMappedExtrudedMesh::New(mesh3D,mesh2D,cell2DId);
3073       }
3074
3075       MEDCouplingMappedExtrudedMesh(const MEDCouplingCMesh *mesh3D) throw(INTERP_KERNEL::Exception)
3076       {
3077         return MEDCouplingMappedExtrudedMesh::New(mesh3D);
3078       }
3079
3080       MEDCouplingMappedExtrudedMesh()
3081       {
3082         return MEDCouplingMappedExtrudedMesh::New();
3083       }
3084       
3085       std::string __str__() const throw(INTERP_KERNEL::Exception)
3086       {
3087         return self->simpleRepr();
3088       }
3089
3090       std::string __repr__() const throw(INTERP_KERNEL::Exception)
3091       {
3092         std::ostringstream oss;
3093         self->reprQuickOverview(oss);
3094         return oss.str();
3095       }
3096       
3097       PyObject *getMesh2D() const throw(INTERP_KERNEL::Exception)
3098       {
3099         MEDCouplingUMesh *ret=self->getMesh2D();
3100         if(ret)
3101           ret->incrRef();
3102         return convertMesh(ret, SWIG_POINTER_OWN | 0 );
3103       }
3104       PyObject *getMesh1D() const throw(INTERP_KERNEL::Exception)
3105       {
3106         MEDCouplingUMesh *ret=self->getMesh1D();
3107         if(ret)
3108           ret->incrRef();
3109         return convertMesh(ret, SWIG_POINTER_OWN | 0 );
3110       }
3111       PyObject *getMesh3DIds() const throw(INTERP_KERNEL::Exception)
3112       {
3113         DataArrayInt *ret=self->getMesh3DIds();
3114         if(ret)
3115           ret->incrRef();
3116         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3117       } 
3118     }
3119   };
3120
3121   //== MEDCouplingMappedExtrudedMesh End
3122
3123   class MEDCoupling1GTUMesh : public MEDCoupling::MEDCouplingPointSet
3124   {
3125   public:
3126     static MEDCoupling1GTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
3127     static MEDCoupling1GTUMesh *New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception);
3128     INTERP_KERNEL::NormalizedCellType getCellModelEnum() const throw(INTERP_KERNEL::Exception);
3129     int getNodalConnectivityLength() const throw(INTERP_KERNEL::Exception);
3130     virtual void allocateCells(int nbOfCells=0) throw(INTERP_KERNEL::Exception);
3131     virtual void checkConsistencyOfConnectivity() const throw(INTERP_KERNEL::Exception);
3132     %extend
3133     {
3134       virtual void insertNextCell(PyObject *li) throw(INTERP_KERNEL::Exception)
3135       {
3136         int szArr,sw,iTypppArr;
3137         std::vector<int> stdvecTyyppArr;
3138         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
3139         self->insertNextCell(tmp,tmp+szArr);
3140       }
3141
3142       virtual DataArrayInt *getNodalConnectivity() const throw(INTERP_KERNEL::Exception)
3143       {
3144         DataArrayInt *ret=self->getNodalConnectivity();
3145         if(ret) ret->incrRef();
3146         return ret;
3147       }
3148       
3149       static MEDCouplingUMesh *AggregateOnSameCoordsToUMesh(PyObject *li) throw(INTERP_KERNEL::Exception)
3150       {
3151         std::vector< const MEDCoupling1GTUMesh *> parts;
3152         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCoupling1GTUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCoupling1GTUMesh,"MEDCoupling1GTUMesh",parts);
3153         return MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(parts);
3154       }
3155     }
3156   };
3157
3158   //== MEDCoupling1SGTUMesh
3159
3160   class MEDCoupling1SGTUMesh : public MEDCoupling::MEDCoupling1GTUMesh
3161   {
3162   public:
3163     static MEDCoupling1SGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
3164     static MEDCoupling1SGTUMesh *New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception);
3165     void setNodalConnectivity(DataArrayInt *nodalConn) throw(INTERP_KERNEL::Exception);
3166     int getNumberOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
3167     static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2) throw(INTERP_KERNEL::Exception);
3168     MEDCoupling1SGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
3169     MEDCoupling1GTUMesh *computeDualMesh() const throw(INTERP_KERNEL::Exception);
3170     MEDCoupling1SGTUMesh *explodeEachHexa8To6Quad4() const throw(INTERP_KERNEL::Exception);
3171     DataArrayInt *sortHexa8EachOther() throw(INTERP_KERNEL::Exception);
3172     %extend
3173     {
3174       MEDCoupling1SGTUMesh()
3175       {
3176         return MEDCoupling1SGTUMesh::New();
3177       }
3178
3179       MEDCoupling1SGTUMesh(const std::string& name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
3180       {
3181         return MEDCoupling1SGTUMesh::New(name,type);
3182       }
3183
3184       MEDCoupling1SGTUMesh(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
3185       {
3186         return MEDCoupling1SGTUMesh::New(m);
3187       }
3188
3189       std::string __str__() const throw(INTERP_KERNEL::Exception)
3190       {
3191         return self->simpleRepr();
3192       }
3193       
3194       std::string __repr__() const throw(INTERP_KERNEL::Exception)
3195       {
3196         std::ostringstream oss;
3197         self->reprQuickOverview(oss);
3198         return oss.str();
3199       }
3200
3201       PyObject *structurizeMe(double eps=1e-12) const throw(INTERP_KERNEL::Exception)
3202       {
3203         DataArrayInt *cellPerm(0),*nodePerm(0);
3204         MEDCouplingCMesh *retCpp(self->structurizeMe(cellPerm,nodePerm,eps));
3205         PyObject *ret(PyTuple_New(3));
3206         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp),SWIGTYPE_p_MEDCoupling__MEDCouplingCMesh, SWIG_POINTER_OWN | 0 ));
3207         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellPerm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3208         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(nodePerm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3209         return ret;
3210       }
3211
3212       static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
3213       {
3214         std::vector<const MEDCoupling::MEDCoupling1SGTUMesh *> tmp;
3215         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCoupling1SGTUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCoupling1SGTUMesh,"MEDCoupling1SGTUMesh",tmp);
3216         return MEDCoupling1SGTUMesh::Merge1SGTUMeshes(tmp);
3217       }
3218       
3219       static MEDCoupling1SGTUMesh *Merge1SGTUMeshesOnSameCoords(PyObject *li) throw(INTERP_KERNEL::Exception)
3220       {
3221         std::vector<const MEDCoupling::MEDCoupling1SGTUMesh *> tmp;
3222         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCoupling1SGTUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCoupling1SGTUMesh,"MEDCoupling1SGTUMesh",tmp);
3223         return MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(tmp);
3224       }
3225     }
3226   };
3227   
3228   //== MEDCoupling1SGTUMesh End
3229
3230   //== MEDCoupling1DGTUMesh
3231
3232   class MEDCoupling1DGTUMesh : public MEDCoupling::MEDCoupling1GTUMesh
3233   {
3234   public:
3235     static MEDCoupling1DGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
3236     static MEDCoupling1DGTUMesh *New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception);
3237     void setNodalConnectivity(DataArrayInt *nodalConn, DataArrayInt *nodalConnIndex) throw(INTERP_KERNEL::Exception);
3238     MEDCoupling1DGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
3239     bool isPacked() const throw(INTERP_KERNEL::Exception);
3240     %extend
3241     {
3242       MEDCoupling1DGTUMesh()
3243       {
3244         return MEDCoupling1DGTUMesh::New();
3245       }
3246       MEDCoupling1DGTUMesh(const std::string& name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
3247       {
3248         return MEDCoupling1DGTUMesh::New(name,type);
3249       }
3250
3251       MEDCoupling1DGTUMesh(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception)
3252       {
3253         return MEDCoupling1DGTUMesh::New(m);
3254       }
3255
3256       std::string __str__() const throw(INTERP_KERNEL::Exception)
3257       {
3258         return self->simpleRepr();
3259       }
3260       
3261       std::string __repr__() const throw(INTERP_KERNEL::Exception)
3262       {
3263         std::ostringstream oss;
3264         self->reprQuickOverview(oss);
3265         return oss.str();
3266       }
3267
3268       DataArrayInt *getNodalConnectivityIndex() const throw(INTERP_KERNEL::Exception)
3269       {
3270         DataArrayInt *ret=self->getNodalConnectivityIndex();
3271         if(ret) ret->incrRef();
3272         return ret;
3273       }
3274
3275       PyObject *retrievePackedNodalConnectivity() const throw(INTERP_KERNEL::Exception)
3276       {
3277         DataArrayInt *ret1=0,*ret2=0;
3278         bool ret0=self->retrievePackedNodalConnectivity(ret1,ret2);
3279         PyObject *ret0Py=ret0?Py_True:Py_False;
3280         Py_XINCREF(ret0Py);
3281         PyObject *ret=PyTuple_New(3);
3282         PyTuple_SetItem(ret,0,ret0Py);
3283         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3284         PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
3285         return ret;
3286       }
3287       
3288       PyObject *copyWithNodalConnectivityPacked() const throw(INTERP_KERNEL::Exception)
3289       {
3290         bool ret1;
3291         MEDCoupling1DGTUMesh *ret0=self->copyWithNodalConnectivityPacked(ret1);
3292         PyObject *ret=PyTuple_New(2);
3293         PyObject *ret1Py=ret1?Py_True:Py_False; Py_XINCREF(ret1Py);
3294         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCoupling1DGTUMesh, SWIG_POINTER_OWN | 0 ));
3295         PyTuple_SetItem(ret,1,ret1Py);
3296         return ret;
3297       }
3298
3299       static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
3300       {
3301         std::vector<const MEDCoupling::MEDCoupling1DGTUMesh *> tmp;
3302         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCoupling1DGTUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCoupling1DGTUMesh,"MEDCoupling1DGTUMesh",tmp);
3303         return MEDCoupling1DGTUMesh::Merge1DGTUMeshes(tmp);
3304       }
3305       
3306       static MEDCoupling1DGTUMesh *Merge1DGTUMeshesOnSameCoords(PyObject *li) throw(INTERP_KERNEL::Exception)
3307       {
3308         std::vector<const MEDCoupling::MEDCoupling1DGTUMesh *> tmp;
3309         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCoupling1DGTUMesh *>(li,SWIGTYPE_p_MEDCoupling__MEDCoupling1DGTUMesh,"MEDCoupling1DGTUMesh",tmp);
3310         return MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(tmp);
3311       }
3312       
3313       static DataArrayInt *AggregateNodalConnAndShiftNodeIds(PyObject *li, const std::vector<int>& offsetInNodeIdsPerElt) throw(INTERP_KERNEL::Exception)
3314       {
3315         std::vector<const MEDCoupling::DataArrayInt *> tmp;
3316         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
3317         return MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(tmp,offsetInNodeIdsPerElt);
3318       }
3319     }
3320   };
3321
3322   //== MEDCoupling1DGTUMeshEnd
3323
3324   class MEDCouplingStructuredMesh : public MEDCoupling::MEDCouplingMesh
3325   {
3326   public:
3327     int getCellIdFromPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception);
3328     int getNodeIdFromPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception);
3329     int getNumberOfCellsOfSubLevelMesh() const throw(INTERP_KERNEL::Exception);
3330     int getSpaceDimensionOnNodeStruct() const throw(INTERP_KERNEL::Exception);
3331     double computeSquareness() const throw(INTERP_KERNEL::Exception);
3332     virtual std::vector<int> getNodeGridStructure() const throw(INTERP_KERNEL::Exception);
3333     std::vector<int> getCellGridStructure() const throw(INTERP_KERNEL::Exception);
3334     MEDCoupling1SGTUMesh *build1SGTUnstructured() const throw(INTERP_KERNEL::Exception);
3335     std::vector<int> getLocationFromCellId(int cellId) const throw(INTERP_KERNEL::Exception);
3336     std::vector<int> getLocationFromNodeId(int cellId) const throw(INTERP_KERNEL::Exception);
3337     static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension(int meshDim) throw(INTERP_KERNEL::Exception);
3338     MEDCoupling1SGTUMesh *build1SGTSubLevelMesh() const throw(INTERP_KERNEL::Exception);
3339     static int DeduceNumberOfGivenStructure(const std::vector<int>& st) throw(INTERP_KERNEL::Exception);
3340     static DataArrayInt *ComputeCornersGhost(const std::vector<int>& st, int ghostLev) throw(INTERP_KERNEL::Exception);
3341     static std::vector<int> GetSplitVectFromStruct(const std::vector<int>& strct) throw(INTERP_KERNEL::Exception);
3342     %extend
3343     {
3344       virtual MEDCouplingStructuredMesh *buildStructuredSubPart(PyObject *cellPart) const throw(INTERP_KERNEL::Exception)
3345       {
3346         int tmpp1=-1,tmpp2=-1;
3347         std::vector<int> tmp=fillArrayWithPyListInt2(cellPart,tmpp1,tmpp2);
3348         std::vector< std::pair<int,int> > inp;
3349         if(tmpp2==2)
3350           {
3351             inp.resize(tmpp1);
3352             for(int i=0;i<tmpp1;i++)
3353               { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
3354           }
3355         else if(tmpp2==1)
3356           {
3357             if(tmpp1%2!=0)
3358               throw INTERP_KERNEL::Exception("Wrap of MEDCouplingStructuredMesh.buildStructuredSubPart : invalid input size ! Must be even size !");
3359             inp.resize(tmpp1/2);
3360             for(int i=0;i<tmpp1/2;i++)
3361               { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
3362           }
3363         else
3364           throw INTERP_KERNEL::Exception("Wrap of MEDCouplingStructuredMesh.buildStructuredSubPart : invalid input size !");
3365         return self->buildStructuredSubPart(inp);
3366       }
3367
3368       static DataArrayInt *BuildExplicitIdsFrom(PyObject *st, PyObject *part) throw(INTERP_KERNEL::Exception)
3369       {
3370         std::vector< std::pair<int,int> > inp;
3371         convertPyToVectorPairInt(part,inp);
3372         //
3373         int szArr,sw,iTypppArr;
3374         std::vector<int> stdvecTyyppArr;
3375         const int *tmp4=convertIntStarLikePyObjToCppIntStar(st,sw,szArr,iTypppArr,stdvecTyyppArr);
3376         std::vector<int> tmp5(tmp4,tmp4+szArr);
3377         //
3378         return MEDCouplingStructuredMesh::BuildExplicitIdsFrom(tmp5,inp);
3379       }
3380
3381       static void MultiplyPartOf(const std::vector<int>& st, PyObject *part, double factor, DataArrayDouble *da) throw(INTERP_KERNEL::Exception)
3382       {
3383         std::vector< std::pair<int,int> > inp;
3384         convertPyToVectorPairInt(part,inp);
3385         MEDCouplingStructuredMesh::MultiplyPartOf(st,inp,factor,da);
3386       }
3387
3388       static void MultiplyPartOfByGhost(const std::vector<int>& st, PyObject *part, int ghostSize, double factor, DataArrayDouble *da) throw(INTERP_KERNEL::Exception)
3389       {
3390         std::vector< std::pair<int,int> > inp;
3391         convertPyToVectorPairInt(part,inp);
3392         MEDCouplingStructuredMesh::MultiplyPartOfByGhost(st,inp,ghostSize,factor,da);
3393       }
3394
3395       static PyObject *PutInGhostFormat(int ghostSize, const std::vector<int>& st, PyObject *part) throw(INTERP_KERNEL::Exception)
3396       {
3397         std::vector< std::pair<int,int> > inp;
3398         convertPyToVectorPairInt(part,inp);
3399         std::vector<int> stWithGhost;
3400         std::vector< std::pair<int,int> > partWithGhost;
3401         MEDCouplingStructuredMesh::PutInGhostFormat(ghostSize,st,inp,stWithGhost,partWithGhost);
3402         PyObject *ret(PyTuple_New(2));
3403         PyTuple_SetItem(ret,0,convertIntArrToPyList2(stWithGhost));
3404         PyTuple_SetItem(ret,1,convertFromVectorPairInt(partWithGhost));
3405         return ret;
3406       }
3407
3408       static DataArrayDouble *ExtractFieldOfDoubleFrom(const std::vector<int>& st, const DataArrayDouble *fieldOfDbl, PyObject *partCompactFormat) throw(INTERP_KERNEL::Exception)
3409       {
3410         std::vector< std::pair<int,int> > inp;
3411         convertPyToVectorPairInt(partCompactFormat,inp);
3412         return MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(st,fieldOfDbl,inp);
3413       }
3414
3415       static void AssignPartOfFieldOfDoubleUsing(const std::vector<int>& st, DataArrayDouble *fieldOfDbl, PyObject *partCompactFormat, const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
3416       {
3417         std::vector< std::pair<int,int> > inp;
3418         convertPyToVectorPairInt(partCompactFormat,inp);
3419         MEDCouplingStructuredMesh::AssignPartOfFieldOfDoubleUsing(st,fieldOfDbl,inp,other);
3420       }
3421
3422       static int DeduceNumberOfGivenRangeInCompactFrmt(PyObject *part) throw(INTERP_KERNEL::Exception)
3423       {
3424         std::vector< std::pair<int,int> > inp;
3425         convertPyToVectorPairInt(part,inp);
3426         return MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(inp);
3427       }
3428
3429       static DataArrayInt *Build1GTNodalConnectivity(PyObject *li) throw(INTERP_KERNEL::Exception)
3430       {
3431         int szArr,sw,iTypppArr;
3432         std::vector<int> stdvecTyyppArr;
3433         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
3434         return MEDCouplingStructuredMesh::Build1GTNodalConnectivity(tmp,tmp+szArr);
3435       }
3436
3437       static DataArrayInt *Build1GTNodalConnectivityOfSubLevelMesh(PyObject *li) throw(INTERP_KERNEL::Exception)
3438       {
3439         int szArr,sw,iTypppArr;
3440         std::vector<int> stdvecTyyppArr;
3441         const int *tmp(convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr));
3442         return MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh(tmp,tmp+szArr);
3443       }
3444
3445       static std::vector<int> GetDimensionsFromCompactFrmt(PyObject *partCompactFormat) throw(INTERP_KERNEL::Exception)
3446       {
3447         std::vector< std::pair<int,int> > inp;
3448         convertPyToVectorPairInt(partCompactFormat,inp);
3449         return MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(inp);
3450       }
3451
3452       static PyObject *GetCompactFrmtFromDimensions(const std::vector<int>& dims) throw(INTERP_KERNEL::Exception)
3453       {
3454         std::vector< std::pair<int,int> > ret(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dims));
3455         PyObject *retPy=PyList_New(ret.size());
3456         for(std::size_t i=0;i<ret.size();i++)
3457           {
3458             PyObject *tmp=PyTuple_New(2);
3459             PyTuple_SetItem(tmp,0,PyInt_FromLong(ret[i].first));
3460             PyTuple_SetItem(tmp,1,PyInt_FromLong(ret[i].second));
3461             PyList_SetItem(retPy,i,tmp);
3462           }
3463         return retPy;
3464       }
3465
3466       static PyObject *IntersectRanges(PyObject *r1, PyObject *r2) throw(INTERP_KERNEL::Exception)
3467       {
3468         std::vector< std::pair<int,int> > r1Cpp,r2Cpp;
3469         convertPyToVectorPairInt(r1,r1Cpp);
3470         convertPyToVectorPairInt(r2,r2Cpp);
3471         std::vector< std::pair<int,int> > ret(MEDCouplingStructuredMesh::IntersectRanges(r1Cpp,r2Cpp));
3472         PyObject *retPy=PyList_New(ret.size());
3473         for(std::size_t i=0;i<ret.size();i++)
3474           {
3475             PyObject *tmp=PyTuple_New(2);
3476             PyTuple_SetItem(tmp,0,PyInt_FromLong(ret[i].first));
3477             PyTuple_SetItem(tmp,1,PyInt_FromLong(ret[i].second));
3478             PyList_SetItem(retPy,i,tmp);
3479           }
3480         return retPy;
3481       }
3482
3483       static bool AreRangesIntersect(PyObject *r1, PyObject *r2)
3484       {
3485         std::vector< std::pair<int,int> > r1Cpp,r2Cpp;
3486         convertPyToVectorPairInt(r1,r1Cpp);
3487         convertPyToVectorPairInt(r2,r2Cpp);
3488         return MEDCouplingStructuredMesh::AreRangesIntersect(r1Cpp,r2Cpp);
3489       }
3490
3491       static PyObject *IsPartStructured(PyObject *li, PyObject *st) throw(INTERP_KERNEL::Exception)
3492       {
3493         int szArr,sw,iTypppArr;
3494         std::vector<int> stdvecTyyppArr;
3495         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
3496         int szArr2,sw2,iTypppArr2;
3497         std::vector<int> stdvecTyyppArr2;
3498         const int *tmp2=convertIntStarLikePyObjToCppIntStar(st,sw2,szArr2,iTypppArr2,stdvecTyyppArr2);
3499         std::vector<int> tmp3(tmp2,tmp2+szArr2);
3500         std::vector< std::pair<int,int> > partCompactFormat;
3501         bool ret0=MEDCouplingStructuredMesh::IsPartStructured(tmp,tmp+szArr,tmp3,partCompactFormat);
3502         PyObject *ret=PyTuple_New(2);
3503         PyObject *ret0Py=ret0?Py_True:Py_False; Py_XINCREF(ret0Py);
3504         PyTuple_SetItem(ret,0,ret0Py);
3505         PyObject *ret1Py=PyList_New(partCompactFormat.size());
3506         for(std::size_t i=0;i<partCompactFormat.size();i++)
3507           {
3508             PyObject *tmp4=PyTuple_New(2);
3509             PyTuple_SetItem(tmp4,0,PyInt_FromLong(partCompactFormat[i].first));
3510             PyTuple_SetItem(tmp4,1,PyInt_FromLong(partCompactFormat[i].second));
3511             PyList_SetItem(ret1Py,i,tmp4);
3512           }
3513         PyTuple_SetItem(ret,1,ret1Py);
3514         return ret;
3515       }
3516
3517       static PyObject *ChangeReferenceFromGlobalOfCompactFrmt(PyObject *bigInAbs, PyObject *partOfBigInAbs, bool check=true) throw(INTERP_KERNEL::Exception)
3518       {
3519         std::vector< std::pair<int,int> > param0,param1,ret;
3520         convertPyToVectorPairInt(bigInAbs,param0);
3521         convertPyToVectorPairInt(partOfBigInAbs,param1);
3522         MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(param0,param1,ret,check);
3523         PyObject *retPy(PyList_New(ret.size()));
3524         for(std::size_t i=0;i<ret.size();i++)
3525           {
3526             PyObject *tmp(PyTuple_New(2));
3527             PyTuple_SetItem(tmp,0,PyInt_FromLong(ret[i].first));
3528             PyTuple_SetItem(tmp,1,PyInt_FromLong(ret[i].second));
3529             PyList_SetItem(retPy,i,tmp);
3530           }
3531         return retPy;
3532       }
3533
3534       static PyObject *TranslateCompactFrmt(PyObject *part, const std::vector<int>& translation) throw(INTERP_KERNEL::Exception)
3535       {
3536         std::vector< std::pair<int,int> > param0;
3537         convertPyToVectorPairInt(part,param0);
3538         std::vector< std::pair<int,int> > ret(MEDCouplingStructuredMesh::TranslateCompactFrmt(param0,translation));
3539         PyObject *retPy(PyList_New(ret.size()));
3540         for(std::size_t i=0;i<ret.size();i++)
3541           {
3542             PyObject *tmp(PyTuple_New(2));
3543             PyTuple_SetItem(tmp,0,PyInt_FromLong(ret[i].first));
3544             PyTuple_SetItem(tmp,1,PyInt_FromLong(ret[i].second));
3545             PyList_SetItem(retPy,i,tmp);
3546           }
3547         return retPy;
3548       }
3549
3550       static std::vector<int> FindTranslationFrom(PyObject *startingFrom, PyObject *goingTo) throw(INTERP_KERNEL::Exception)
3551       {
3552         std::vector< std::pair<int,int> > param0,param1;
3553         convertPyToVectorPairInt(startingFrom,param0);
3554         convertPyToVectorPairInt(goingTo,param1);
3555         return  MEDCouplingStructuredMesh::FindTranslationFrom(param0,param1);
3556       }
3557
3558       static PyObject *ChangeReferenceToGlobalOfCompactFrmt(PyObject *bigInAbs, PyObject *partOfBigRelativeToBig, bool check=true) throw(INTERP_KERNEL::Exception)
3559       {
3560         std::vector< std::pair<int,int> > param0,param1,ret;
3561         convertPyToVectorPairInt(bigInAbs,param0);
3562         convertPyToVectorPairInt(partOfBigRelativeToBig,param1);
3563         MEDCouplingStructuredMesh::ChangeReferenceToGlobalOfCompactFrmt(param0,param1,ret,check);
3564         PyObject *retPy(PyList_New(ret.size()));
3565         for(std::size_t i=0;i<ret.size();i++)
3566           {
3567             PyObject *tmp(PyTuple_New(2));
3568             PyTuple_SetItem(tmp,0,PyInt_FromLong(ret[i].first));
3569             PyTuple_SetItem(tmp,1,PyInt_FromLong(ret[i].second));
3570             PyList_SetItem(retPy,i,tmp);
3571           }
3572         return retPy;
3573       }
3574     }
3575   };
3576
3577   class MEDCouplingCurveLinearMesh;
3578
3579   //== MEDCouplingCMesh
3580   
3581   class MEDCouplingCMesh : public MEDCoupling::MEDCouplingStructuredMesh
3582   {
3583   public:
3584     static MEDCouplingCMesh *New() throw(INTERP_KERNEL::Exception);
3585     static MEDCouplingCMesh *New(const std::string& meshName) throw(INTERP_KERNEL::Exception);
3586     void setCoords(const DataArrayDouble *coordsX,
3587                    const DataArrayDouble *coordsY=0,
3588                    const DataArrayDouble *coordsZ=0) throw(INTERP_KERNEL::Exception);
3589     void setCoordsAt(int i, const DataArrayDouble *arr) throw(INTERP_KERNEL::Exception);
3590     MEDCouplingCurveLinearMesh *buildCurveLinear() const throw(INTERP_KERNEL::Exception);
3591     %extend {
3592       MEDCouplingCMesh() throw(INTERP_KERNEL::Exception)
3593       {
3594         return MEDCouplingCMesh::New();
3595       }
3596       MEDCouplingCMesh(const std::string& meshName) throw(INTERP_KERNEL::Exception)
3597       {
3598         return MEDCouplingCMesh::New(meshName);
3599       }
3600       std::string __str__() const throw(INTERP_KERNEL::Exception)
3601       {
3602         return self->simpleRepr();
3603       }
3604       std::string __repr__() const throw(INTERP_KERNEL::Exception)
3605       {
3606         std::ostringstream oss;
3607         self->reprQuickOverview(oss);
3608         return oss.str();
3609       }
3610       DataArrayDouble *getCoordsAt(int i) throw(INTERP_KERNEL::Exception)
3611       {
3612         DataArrayDouble *ret=self->getCoordsAt(i);
3613         if(ret)
3614           ret->incrRef();
3615         return ret;
3616       }
3617     }
3618   };
3619
3620   //== MEDCouplingCMesh End
3621
3622   //== MEDCouplingCurveLinearMesh
3623
3624   class MEDCouplingCurveLinearMesh : public MEDCoupling::MEDCouplingStructuredMesh
3625   {
3626   public:
3627     static MEDCouplingCurveLinearMesh *New() throw(INTERP_KERNEL::Exception);
3628     static MEDCouplingCurveLinearMesh *New(const std::string& meshName) throw(INTERP_KERNEL::Exception);
3629     void setCoords(const DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
3630     %extend {
3631       MEDCouplingCurveLinearMesh() throw(INTERP_KERNEL::Exception)
3632       {
3633         return MEDCouplingCurveLinearMesh::New();
3634       }
3635       MEDCouplingCurveLinearMesh(const std::string& meshName) throw(INTERP_KERNEL::Exception)
3636       {
3637         return MEDCouplingCurveLinearMesh::New(meshName);
3638       }
3639       std::string __str__() const throw(INTERP_KERNEL::Exception) 
3640       {
3641         return self->simpleRepr();
3642       }
3643       std::string __repr__() const throw(INTERP_KERNEL::Exception)
3644       {
3645         std::ostringstream oss;
3646         self->reprQuickOverview(oss);
3647         return oss.str();
3648       }
3649       DataArrayDouble *getCoords() throw(INTERP_KERNEL::Exception)
3650       {
3651         DataArrayDouble *ret=self->getCoords();
3652         if(ret)
3653           ret->incrRef();
3654         return ret;
3655       }
3656       void setNodeGridStructure(PyObject *gridStruct) throw(INTERP_KERNEL::Exception)
3657       {
3658         int szArr,sw,iTypppArr;
3659         std::vector<int> stdvecTyyppArr;
3660         const int *tmp=convertIntStarLikePyObjToCppIntStar(gridStruct,sw,szArr,iTypppArr,stdvecTyyppArr);
3661         self->setNodeGridStructure(tmp,tmp+szArr);
3662       }
3663     }
3664   };
3665
3666   //== MEDCouplingCurveLinearMesh End
3667
3668   //== MEDCouplingIMesh
3669
3670   class MEDCouplingIMesh : public MEDCoupling::MEDCouplingStructuredMesh
3671   {
3672   public:
3673     static MEDCouplingIMesh *New() throw(INTERP_KERNEL::Exception);
3674     //
3675     void setSpaceDimension(int spaceDim) throw(INTERP_KERNEL::Exception);
3676     std::vector<int> getNodeStruct() const throw(INTERP_KERNEL::Exception);
3677     std::vector<double> getOrigin() const throw(INTERP_KERNEL::Exception);
3678     std::vector<double> getDXYZ() const throw(INTERP_KERNEL::Exception);
3679     void setAxisUnit(const std::string& unitName) throw(INTERP_KERNEL::Exception);
3680     std::string getAxisUnit() const throw(INTERP_KERNEL::Exception);
3681     double getMeasureOfAnyCell() const throw(INTERP_KERNEL::Exception);
3682     MEDCouplingCMesh *convertToCartesian() const throw(INTERP_KERNEL::Exception);
3683     void refineWithFactor(const std::vector<int>& factors) throw(INTERP_KERNEL::Exception);
3684     MEDCouplingIMesh *asSingleCell() const throw(INTERP_KERNEL::Exception);
3685     MEDCouplingIMesh *buildWithGhost(int ghostLev) const throw(INTERP_KERNEL::Exception);
3686     %extend
3687     {
3688       MEDCouplingIMesh()
3689       {
3690         return MEDCouplingIMesh::New();
3691       }
3692       static MEDCouplingIMesh *New(const std::string& meshName, int spaceDim, PyObject *nodeStrct, PyObject *origin, PyObject *dxyz) throw(INTERP_KERNEL::Exception)
3693       {
3694         static const char msg0[]="MEDCouplingIMesh::New : error on 'origin' parameter !";
3695         static const char msg1[]="MEDCouplingIMesh::New : error on 'dxyz' parameter !";
3696         const int *nodeStrctPtr(0);
3697         const double *originPtr(0),*dxyzPtr(0);
3698         int sw,sz,val0;
3699         std::vector<int> bb0;
3700         nodeStrctPtr=convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0);
3701         //
3702         double val,val2;
3703         std::vector<double> bb,bb2;
3704         int sz1,sz2;
3705         originPtr=convertObjToPossibleCpp5_SingleCompo(origin,sw,val,bb,msg0,false,sz1);
3706         dxyzPtr=convertObjToPossibleCpp5_SingleCompo(dxyz,sw,val2,bb2,msg1,false,sz2);
3707         //
3708         return MEDCouplingIMesh::New(meshName,spaceDim,nodeStrctPtr,nodeStrctPtr+sz,originPtr,originPtr+sz1,dxyzPtr,dxyzPtr+sz2);
3709       }
3710
3711       MEDCouplingIMesh(const std::string& meshName, int spaceDim, PyObject *nodeStrct, PyObject *origin, PyObject *dxyz) throw(INTERP_KERNEL::Exception)
3712       {
3713         return MEDCoupling_MEDCouplingIMesh_New__SWIG_1(meshName,spaceDim,nodeStrct,origin,dxyz);
3714       }
3715
3716       void setNodeStruct(PyObject *nodeStrct) throw(INTERP_KERNEL::Exception)
3717       {
3718         int sw,sz,val0;
3719         std::vector<int> bb0;
3720         const int *nodeStrctPtr(convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0));
3721         self->setNodeStruct(nodeStrctPtr,nodeStrctPtr+sz);
3722       }
3723
3724       void setOrigin(PyObject *origin) throw(INTERP_KERNEL::Exception)
3725       {
3726         static const char msg[]="MEDCouplingIMesh::setOrigin : invalid input 'origin' parameter ! integer, float, list/tuple of float, DataArrayDouble or DataArrayDoubleTuple supported !";
3727         double val;
3728         DataArrayDouble *a;
3729         DataArrayDoubleTuple *aa;
3730         std::vector<double> bb;
3731         int sw,nbTuples;
3732         const double *originPtr(convertObjToPossibleCpp5_SingleCompo(origin,sw,val,bb,msg,false,nbTuples));
3733         self->setOrigin(originPtr,originPtr+nbTuples);
3734       }
3735       
3736       void setDXYZ(PyObject *dxyz) throw(INTERP_KERNEL::Exception)
3737       {
3738         static const char msg[]="MEDCouplingIMesh::setDXYZ : invalid input 'dxyz' parameter ! integer, float, list/tuple of float, DataArrayDouble or DataArrayDoubleTuple supported !";
3739         double val;
3740         DataArrayDouble *a;
3741         DataArrayDoubleTuple *aa;
3742         std::vector<double> bb;
3743         int sw,nbTuples;
3744         const double *originPtr(convertObjToPossibleCpp5_SingleCompo(dxyz,sw,val,bb,msg,false,nbTuples));
3745         self->setDXYZ(originPtr,originPtr+nbTuples);
3746       }
3747
3748       static void CondenseFineToCoarse(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA) throw(INTERP_KERNEL::Exception)
3749       {
3750         std::vector< std::pair<int,int> > inp;
3751         convertPyToVectorPairInt(fineLocInCoarse,inp);
3752         MEDCouplingIMesh::CondenseFineToCoarse(coarseSt,fineDA,inp,facts,coarseDA);
3753       }
3754
3755       static void CondenseFineToCoarseGhost(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA, int ghostSize) throw(INTERP_KERNEL::Exception)
3756       {
3757         std::vector< std::pair<int,int> > inp;
3758         convertPyToVectorPairInt(fineLocInCoarse,inp);
3759         MEDCouplingIMesh::CondenseFineToCoarseGhost(coarseSt,fineDA,inp,facts,coarseDA,ghostSize);
3760       }
3761
3762       static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts) throw(INTERP_KERNEL::Exception)
3763       {
3764         std::vector< std::pair<int,int> > inp;
3765         convertPyToVectorPairInt(fineLocInCoarse,inp);
3766         MEDCouplingIMesh::SpreadCoarseToFine(coarseDA,coarseSt,fineDA,inp,facts);
3767       }
3768
3769       static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, int ghostSize) throw(INTERP_KERNEL::Exception)
3770       {
3771         std::vector< std::pair<int,int> > inp;
3772         convertPyToVectorPairInt(fineLocInCoarse,inp);
3773         MEDCouplingIMesh::SpreadCoarseToFineGhost(coarseDA,coarseSt,fineDA,inp,facts,ghostSize);
3774       }
3775
3776       static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, int ghostSize) throw(INTERP_KERNEL::Exception)
3777       {
3778         std::vector< std::pair<int,int> > inp;
3779         convertPyToVectorPairInt(fineLocInCoarse,inp);
3780         MEDCouplingIMesh::SpreadCoarseToFineGhostZone(coarseDA,coarseSt,fineDA,inp,facts,ghostSize);
3781       }
3782
3783       std::string __str__() const throw(INTERP_KERNEL::Exception)
3784       {
3785         return self->simpleRepr();
3786       }
3787       std::string __repr__() const throw(INTERP_KERNEL::Exception)
3788       {
3789         std::ostringstream oss;
3790         self->reprQuickOverview(oss);
3791         return oss.str();
3792       }
3793     }
3794   };
3795
3796   //== MEDCouplingIMesh End
3797
3798 }
3799
3800 namespace MEDCoupling
3801 {
3802   class MEDCouplingField : public MEDCoupling::RefCountObject, public MEDCoupling::TimeLabel
3803   {
3804   public:
3805     virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
3806     virtual bool areCompatibleForMerge(const MEDCouplingField *other) const throw(INTERP_KERNEL::Exception);
3807     virtual void copyTinyStringsFrom(const MEDCouplingField *other) throw(INTERP_KERNEL::Exception);
3808     void setMesh(const MEDCoupling::MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
3809     void setName(const char *name) throw(INTERP_KERNEL::Exception);
3810     std::string getDescription() const throw(INTERP_KERNEL::Exception);
3811     void setDescription(const char *desc) throw(INTERP_KERNEL::Exception);
3812     std::string getName() const throw(INTERP_KERNEL::Exception);
3813     TypeOfField getTypeOfField() const throw(INTERP_KERNEL::Exception);
3814     NatureOfField getNature() const throw(INTERP_KERNEL::Exception);
3815     virtual void setNature(NatureOfField nat) throw(INTERP_KERNEL::Exception);
3816     DataArrayDouble *getLocalizationOfDiscr() const throw(INTERP_KERNEL::Exception);
3817     MEDCouplingFieldDouble *buildMeasureField(bool isAbs) const throw(INTERP_KERNEL::Exception);
3818     int getNumberOfTuplesExpected() const throw(INTERP_KERNEL::Exception);
3819     int getNumberOfMeshPlacesExpected() const throw(INTERP_KERNEL::Exception);
3820     void setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
3821                                     const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception);
3822     void clearGaussLocalizations() throw(INTERP_KERNEL::Exception);
3823     MEDCouplingGaussLocalization& getGaussLocalization(int locId) throw(INTERP_KERNEL::Exception);
3824     int getNbOfGaussLocalization() const throw(INTERP_KERNEL::Exception);
3825     int getGaussLocalizationIdOfOneCell(int cellId) const throw(INTERP_KERNEL::Exception);
3826     const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception);
3827     int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
3828     void setDiscretization(MEDCouplingFieldDiscretization *newDisc);
3829     %extend {
3830       PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
3831       {
3832         MEDCouplingMesh *ret1=const_cast<MEDCouplingMesh *>(self->getMesh());
3833         if(ret1)
3834           ret1->incrRef();
3835         return convertMesh(ret1,SWIG_POINTER_OWN | 0 );
3836       }
3837
3838       PyObject *getDiscretization() throw(INTERP_KERNEL::Exception)
3839       {
3840         MEDCouplingFieldDiscretization *ret=self->getDiscretization();
3841         if(ret)
3842           ret->incrRef();
3843         return convertFieldDiscretization(ret,SWIG_POINTER_OWN | 0 );
3844       }
3845
3846       PyObject *getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception)
3847       {
3848         std::set<int> ret=self->getGaussLocalizationIdsOfOneType(type);
3849         return convertIntArrToPyList3(ret);
3850       }
3851
3852       PyObject *buildSubMeshData(PyObject *li) const throw(INTERP_KERNEL::Exception)
3853       {
3854         DataArrayInt *ret1=0;
3855         MEDCouplingMesh *ret0=0;
3856         void *da=0;
3857         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
3858         if (!SWIG_IsOK(res1))
3859           {
3860             int size;
3861             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
3862             ret0=self->buildSubMeshData(tmp,tmp+size,ret1);
3863           }
3864         else
3865           {
3866             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
3867             if(!da2)
3868               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
3869             da2->checkAllocated();
3870             ret0=self->buildSubMeshData(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),ret1);
3871           }
3872         PyObject *res = PyList_New(2);
3873         PyList_SetItem(res,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
3874         PyList_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
3875         return res;
3876       }
3877
3878       PyObject *buildSubMeshDataRange(int begin, int end, int step) const throw(INTERP_KERNEL::Exception)
3879       {
3880         DataArrayInt *ret1=0;
3881         int bb,ee,ss;
3882         MEDCouplingMesh *ret0=self->buildSubMeshDataRange(begin,end,step,bb,ee,ss,ret1);
3883         PyObject *res=PyTuple_New(2);
3884         PyTuple_SetItem(res,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
3885         if(ret1)
3886           PyTuple_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
3887         else
3888           {
3889             PyObject *res1=PySlice_New(PyInt_FromLong(bb),PyInt_FromLong(ee),PyInt_FromLong(ss));
3890             PyTuple_SetItem(res,1,res1);
3891           }
3892         return res;
3893       }
3894
3895       DataArrayInt *computeTupleIdsToSelectFromCellIds(PyObject *cellIds) const
3896       {
3897         int sw,sz(-1);
3898         int v0; std::vector<int> v1;
3899         const int *cellIdsBg(convertIntStarLikePyObjToCppIntStar(cellIds,sw,sz,v0,v1));
3900         return self->computeTupleIdsToSelectFromCellIds(cellIdsBg,cellIdsBg+sz);
3901       }
3902
3903       void setGaussLocalizationOnCells(PyObject *li, const std::vector<double>& refCoo,
3904                                        const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception)
3905       {
3906         void *da=0;
3907         int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
3908         if (!SWIG_IsOK(res1))
3909           {
3910             int size;
3911             INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
3912             self->setGaussLocalizationOnCells(tmp,((int *)tmp)+size,refCoo,gsCoo,wg);
3913           }
3914         else
3915           {
3916             DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
3917             if(!da2)
3918               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
3919             da2->checkAllocated();
3920             self->setGaussLocalizationOnCells(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),refCoo,gsCoo,wg);
3921           }
3922       }
3923
3924       PyObject *getCellIdsHavingGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception)
3925       {
3926         std::vector<int> tmp;
3927         self->getCellIdsHavingGaussLocalization(locId,tmp);
3928         DataArrayInt *ret=DataArrayInt::New();
3929         ret->alloc((int)tmp.size(),1);
3930         std::copy(tmp.begin(),tmp.end(),ret->getPointer());
3931         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
3932       }
3933       
3934       int getNumberOfTuplesExpectedRegardingCode(PyObject *code, PyObject *idsPerType) const throw(INTERP_KERNEL::Exception)
3935       {
3936         std::vector<int> inp0;
3937         convertPyToNewIntArr4(code,1,3,inp0);
3938         std::vector<const DataArrayInt *> inp1;
3939         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(idsPerType,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",inp1);
3940         return self->getNumberOfTuplesExpectedRegardingCode(inp0,inp1);
3941       }
3942     }
3943   };
3944   
3945   class MEDCouplingFieldTemplate : public MEDCoupling::MEDCouplingField
3946   {
3947   public:
3948     static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception);
3949     static MEDCouplingFieldTemplate *New(const MEDCouplingFieldFloat& f) throw(INTERP_KERNEL::Exception);
3950     static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt& f) throw(INTERP_KERNEL::Exception);
3951     static MEDCouplingFieldTemplate *New(TypeOfField type);
3952     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
3953     std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
3954     bool isEqual(const MEDCouplingFieldTemplate *other, double meshPrec) const throw(INTERP_KERNEL::Exception);
3955     bool isEqualWithoutConsideringStr(const MEDCouplingFieldTemplate *other, double meshPrec) const throw(INTERP_KERNEL::Exception);
3956     %extend
3957        {
3958          MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception)
3959          {
3960            return MEDCouplingFieldTemplate::New(f);
3961          }
3962
3963          MEDCouplingFieldTemplate(const MEDCouplingFieldFloat& f) throw(INTERP_KERNEL::Exception)
3964          {
3965            return MEDCouplingFieldTemplate::New(f);
3966          }
3967          
3968          MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f) throw(INTERP_KERNEL::Exception)
3969          {
3970            return MEDCouplingFieldTemplate::New(f);
3971          }
3972          
3973          MEDCouplingFieldTemplate(TypeOfField type) throw(INTERP_KERNEL::Exception)
3974          {
3975            return MEDCouplingFieldTemplate::New(type);
3976          }
3977          
3978          std::string __str__() const throw(INTERP_KERNEL::Exception)
3979          {
3980            return self->simpleRepr();
3981          }
3982          
3983          std::string __repr__() const throw(INTERP_KERNEL::Exception)
3984          {
3985            std::ostringstream oss;
3986            self->reprQuickOverview(oss);
3987            return oss.str();
3988          }
3989
3990          PyObject *isEqualIfNotWhy(const MEDCouplingFieldTemplate *other, double meshPrec) const throw(INTERP_KERNEL::Exception)
3991          {
3992            std::string ret1;
3993            bool ret0=self->isEqualIfNotWhy(other,meshPrec,ret1);
3994            PyObject *ret=PyTuple_New(2);
3995            PyObject *ret0Py=ret0?Py_True:Py_False;
3996            Py_XINCREF(ret0Py);
3997            PyTuple_SetItem(ret,0,ret0Py);
3998            PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
3999            return ret;
4000          }
4001        }
4002   };
4003
4004   template<class T>
4005  class MEDCouplingFieldT : public MEDCoupling::MEDCouplingField
4006   {
4007   public:
4008     TypeOfTimeDiscretization getTimeDiscretization() const throw(INTERP_KERNEL::Exception);
4009   protected:
4010     MEDCouplingFieldT();
4011     ~MEDCouplingFieldT();
4012   };
4013
4014   %template(MEDCouplingFieldTdouble) MEDCoupling::MEDCouplingFieldT<double>;
4015   %template(MEDCouplingFieldTfloat) MEDCoupling::MEDCouplingFieldT<float>;
4016   %template(MEDCouplingFieldTint) MEDCoupling::MEDCouplingFieldT<int>;
4017   
4018   class MEDCouplingFieldInt;
4019   class MEDCouplingFieldFloat;
4020   
4021   class MEDCouplingFieldDouble : public MEDCouplingFieldT<double>
4022   {
4023   public:
4024     static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
4025     static MEDCouplingFieldDouble *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
4026     bool isEqual(const MEDCouplingFieldDouble *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
4027     bool isEqualWithoutConsideringStr(const MEDCouplingFieldDouble *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
4028     void setTimeUnit(const std::string& unit);
4029     std::string getTimeUnit() const;
4030     void synchronizeTimeWithSupport() throw(INTERP_KERNEL::Exception);
4031     void copyTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception);
4032     void copyAllTinyAttrFrom(const MEDCouplingFieldDouble *other) throw(INTERP_KERNEL::Exception);
4033     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
4034     std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
4035     std::string  writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
4036     MEDCouplingFieldInt *convertToIntField() const throw(INTERP_KERNEL::Exception);
4037     MEDCouplingFieldFloat *convertToFloatField() const throw(INTERP_KERNEL::Exception);
4038     MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
4039     MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const;
4040     MEDCouplingFieldDouble *deepCopy() const;
4041     MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCopy) const throw(INTERP_KERNEL::Exception);
4042     MEDCouplingFieldDouble *nodeToCellDiscretization() const throw(INTERP_KERNEL::Exception);
4043     MEDCouplingFieldDouble *cellToNodeDiscretization() const throw(INTERP_KERNEL::Exception);
4044     double getIJ(int tupleId, int compoId) const throw(INTERP_KERNEL::Exception);
4045     double getIJK(int cellId, int nodeIdInCell, int compoId) const throw(INTERP_KERNEL::Exception);
4046     void synchronizeTimeWithMesh() throw(INTERP_KERNEL::Exception);
4047     void setArray(DataArrayDouble *array) throw(INTERP_KERNEL::Exception);
4048     void setEndArray(DataArrayDouble *array) throw(INTERP_KERNEL::Exception);
4049     void setTime(double val, int iteration, int order) throw(INTERP_KERNEL::Exception);
4050     void setStartTime(double val, int iteration, int order) throw(INTERP_KERNEL::Exception);
4051     void setEndTime(double val, int iteration, int order) throw(INTERP_KERNEL::Exception);
4052     void applyLin(double a, double b, int compoId) throw(INTERP_KERNEL::Exception);
4053     void applyLin(double a, double b) throw(INTERP_KERNEL::Exception);
4054     int getNumberOfComponents() const throw(INTERP_KERNEL::Exception);
4055     int getNumberOfTuples() const throw(INTERP_KERNEL::Exception);
4056     int getNumberOfValues() const throw(INTERP_KERNEL::Exception);
4057     void setTimeTolerance(double val) throw(INTERP_KERNEL::Exception);
4058     double getTimeTolerance() const throw(INTERP_KERNEL::Exception);
4059     void setIteration(int it) throw(INTERP_KERNEL::Exception);
4060     void setEndIteration(int it) throw(INTERP_KERNEL::Exception);
4061     void setOrder(int order) throw(INTERP_KERNEL::Exception);
4062     void setEndOrder(int order) throw(INTERP_KERNEL::Exception);
4063     void setTimeValue(double val) throw(INTERP_KERNEL::Exception);
4064     void setEndTimeValue(double val) throw(INTERP_KERNEL::Exception);
4065     void changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps=1e-15) throw(INTERP_KERNEL::Exception);
4066     void substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps=1e-15) throw(INTERP_KERNEL::Exception);
4067     bool mergeNodes(double eps, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
4068     bool mergeNodesCenter(double eps, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
4069     bool zipCoords(double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
4070     bool zipConnectivity(int compType,double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
4071     bool simplexize(int policy) throw(INTERP_KERNEL::Exception);
4072     MEDCouplingFieldDouble *doublyContractedProduct() const throw(INTERP_KERNEL::Exception);
4073     MEDCouplingFieldDouble *determinant() const throw(INTERP_KERNEL::Exception);
4074     MEDCouplingFieldDouble *eigenValues() const throw(INTERP_KERNEL::Exception);
4075     MEDCouplingFieldDouble *eigenVectors() const throw(INTERP_KERNEL::Exception);
4076     MEDCouplingFieldDouble *inverse() const throw(INTERP_KERNEL::Exception);
4077     MEDCouplingFieldDouble *trace() const throw(INTERP_KERNEL::Exception);
4078     MEDCouplingFieldDouble *deviator() const throw(INTERP_KERNEL::Exception);
4079     MEDCouplingFieldDouble *magnitude() const throw(INTERP_KERNEL::Exception);
4080     MEDCouplingFieldDouble *maxPerTuple() const throw(INTERP_KERNEL::Exception);
4081     void changeNbOfComponents(int newNbOfComp, double dftValue=0.) throw(INTERP_KERNEL::Exception);
4082     void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception);
4083     MEDCouplingFieldDouble &operator=(double value) throw(INTERP_KERNEL::Exception);
4084     void fillFromAnalytic(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
4085     void fillFromAnalyticCompo(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
4086     void fillFromAnalyticNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) throw(INTERP_KERNEL::Exception);
4087     void applyFunc(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
4088     void applyFuncCompo(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
4089     void applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) throw(INTERP_KERNEL::Exception);
4090     void applyFunc(int nbOfComp, double val) throw(INTERP_KERNEL::Exception);
4091     void applyFunc(const std::string& func) throw(INTERP_KERNEL::Exception);
4092     void applyFuncFast32(const std::string& func) throw(INTERP_KERNEL::Exception);
4093     void applyFuncFast64(const std::string& func) throw(INTERP_KERNEL::Exception);
4094     double accumulate(int compId) const throw(INTERP_KERNEL::Exception);
4095     double getMaxValue() const throw(INTERP_KERNEL::Exception);
4096     double getMinValue() const throw(INTERP_KERNEL::Exception);
4097     double getAverageValue() const throw(INTERP_KERNEL::Exception);
4098     double norm2() const throw(INTERP_KERNEL::Exception);
4099     //do not put a default value to isWAbs because confusion in python with overloaded getWeightedAverageValue method
4100     double getWeightedAverageValue(int compId, bool isWAbs) const throw(INTERP_KERNEL::Exception);
4101     double integral(int compId, bool isWAbs) const throw(INTERP_KERNEL::Exception);
4102     double normL1(int compId) const throw(INTERP_KERNEL::Exception);
4103     double normL2(int compId) const throw(INTERP_KERNEL::Exception);
4104     double normMax(int compId) const throw(INTERP_KERNEL::Exception);
4105     DataArrayInt *findIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
4106     MEDCouplingFieldDouble *buildSubPartRange(int begin, int end, int step) const throw(INTERP_KERNEL::Exception);
4107     static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4108     static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4109     static MEDCouplingFieldDouble *DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4110     MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
4111     static MEDCouplingFieldDouble *CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4112     MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
4113     static MEDCouplingFieldDouble *MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4114     MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
4115     static MEDCouplingFieldDouble *MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4116     static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4117     static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4118     static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4119     static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
4120     MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
4121     MEDCouplingFieldDouble *negate() const throw(INTERP_KERNEL::Exception);
4122     %extend {
4123       MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
4124       {
4125         return MEDCouplingFieldDouble::New(type,td);
4126       }
4127
4128       MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
4129       {
4130         return MEDCouplingFieldDouble::New(ft,td);
4131       }
4132
4133       std::string __str__() const throw(INTERP_KERNEL::Exception)
4134       {
4135         return self->simpleRepr();
4136       }
4137
4138       std::string __repr__() const throw(INTERP_KERNEL::Exception)
4139       {
4140         std::ostringstream oss;
4141         self->reprQuickOverview(oss);
4142         return oss.str();
4143       }
4144
4145       PyObject *isEqualIfNotWhy(const MEDCouplingFieldDouble *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception)
4146       {
4147         std::string ret1;
4148         bool ret0=self->isEqualIfNotWhy(other,meshPrec,valsPrec,ret1);
4149         PyObject *ret=PyTuple_New(2);
4150         PyObject *ret0Py=ret0?Py_True:Py_False;
4151         Py_XINCREF(ret0Py);
4152         PyTuple_SetItem(ret,0,ret0Py);
4153         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
4154         return ret;
4155       }
4156       
4157       MEDCouplingFieldDouble *voronoize(double eps) const throw(INTERP_KERNEL::Exception)
4158       {
4159         MCAuto<MEDCouplingFieldDouble> ret(self->voronoize(eps));
4160         return ret.retn();
4161       }
4162
4163       MEDCouplingFieldDouble *convertQuadraticCellsToLinear() const throw(INTERP_KERNEL::Exception)
4164       {
4165         MCAuto<MEDCouplingFieldDouble> ret(self->convertQuadraticCellsToLinear());
4166         return ret.retn();
4167       }
4168       
4169       MEDCouplingFieldDouble *computeVectorFieldCyl(PyObject *center, PyObject *vector) const
4170       {
4171         const char msg[]="Python wrap of MEDCouplingFieldDouble::computeVectorFieldCyl : ";
4172         double val,val2;
4173         DataArrayDouble *a,*a2;
4174         DataArrayDoubleTuple *aa,*aa2;
4175         std::vector<double> bb,bb2;
4176         int sw;
4177         const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,3,true);
4178         const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,3,true);
4179         return self->computeVectorFieldCyl(centerPtr,vectorPtr);
4180       }
4181
4182       DataArrayDouble *getArray() throw(INTERP_KERNEL::Exception)
4183       {
4184         DataArrayDouble *ret=self->getArray();
4185         if(ret)
4186           ret->incrRef();
4187         return ret;
4188       }
4189
4190       PyObject *getArrays() const throw(INTERP_KERNEL::Exception)
4191       {
4192         std::vector<DataArrayDouble *> arrs=self->getArrays();
4193         for(std::vector<DataArrayDouble *>::iterator it=arrs.begin();it!=arrs.end();it++)
4194           if(*it)
4195             (*it)->incrRef();
4196         int sz=arrs.size();
4197         PyObject *ret=PyTuple_New(sz);
4198         for(int i=0;i<sz;i++)
4199           {
4200             if(arrs[i])
4201               PyTuple_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(arrs[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
4202             else
4203               PyTuple_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 | 0 ));
4204           }
4205         return ret;
4206       }
4207
4208       void setArrays(PyObject *ls) throw(INTERP_KERNEL::Exception)
4209       {
4210         std::vector<const DataArrayDouble *> tmp;
4211         convertFromPyObjVectorOfObj<const DataArrayDouble *>(ls,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",tmp);
4212         int sz=tmp.size();
4213         std::vector<DataArrayDouble *> arrs(sz);
4214         for(int i=0;i<sz;i++)
4215           arrs[i]=const_cast<DataArrayDouble *>(tmp[i]);
4216         self->setArrays(arrs);
4217       }
4218
4219       DataArrayDouble *getEndArray() throw(INTERP_KERNEL::Exception)
4220       {
4221         DataArrayDouble *ret=self->getEndArray();
4222         if(ret)
4223           ret->incrRef();
4224         return ret;
4225       }
4226
4227       PyObject *getValueOn(PyObject *sl) const throw(INTERP_KERNEL::Exception)
4228       {
4229         double val;
4230         DataArrayDouble *a;
4231         DataArrayDoubleTuple *aa;
4232         std::vector<double> bb;
4233         int sw;
4234         const MEDCouplingMesh *mesh=self->getMesh();
4235         if(!mesh)
4236           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingFieldDouble::getValueOn : no underlying mesh !");
4237         int spaceDim=mesh->getSpaceDimension();
4238         const char msg[]="Python wrap of MEDCouplingFieldDouble::getValueOn : ";
4239         const double *spaceLoc=convertObjToPossibleCpp5_Safe(sl,sw,val,a,aa,bb,msg,1,spaceDim,true);
4240         //
4241         int sz=self->getNumberOfComponents();
4242         INTERP_KERNEL::AutoPtr<double> res=new double[sz];
4243         self->getValueOn(spaceLoc,res);
4244         return convertDblArrToPyList<double>(res,sz);
4245       }
4246
4247        PyObject *getValueOnPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception)
4248        {
4249          int sz=self->getNumberOfComponents();
4250          INTERP_KERNEL::AutoPtr<double> res=new double[sz];
4251          self->getValueOnPos(i,j,k,res);
4252          return convertDblArrToPyList<double>(res,sz);
4253        }
4254
4255       DataArrayDouble *getValueOnMulti(PyObject *locs) const throw(INTERP_KERNEL::Exception)
4256       {
4257         const MEDCouplingMesh *mesh(self->getMesh());
4258         if(!mesh)
4259           throw INTERP_KERNEL::Exception("Python wrap MEDCouplingFieldDouble::getValueOnMulti : lying on a null mesh !");
4260         //
4261         int sw,nbPts;
4262         double v0; MEDCoupling::DataArrayDouble *v1(0); MEDCoupling::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
4263         const double *inp=convertObjToPossibleCpp5_Safe2(locs,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDouble::getValueOnMulti",
4264                                                          mesh->getSpaceDimension(),true,nbPts);
4265         return self->getValueOnMulti(inp,nbPts);
4266       }
4267
4268       PyObject *getValueOn(PyObject *sl, double time) const throw(INTERP_KERNEL::Exception)
4269       {
4270         double val;
4271         DataArrayDouble *a;
4272         DataArrayDoubleTuple *aa;
4273         std::vector<double> bb;
4274         int sw;
4275         const MEDCouplingMesh *mesh=self->getMesh();
4276         if(!mesh)
4277           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingFieldDouble::getValueOn : no underlying mesh !");
4278         int spaceDim=mesh->getSpaceDimension();
4279         const char msg[]="Python wrap of MEDCouplingFieldDouble::getValueOn : ";
4280         const double *spaceLoc=convertObjToPossibleCpp5_Safe(sl,sw,val,a,aa,bb,msg,1,spaceDim,true);
4281         //
4282         //
4283         int sz=self->getNumberOfComponents();
4284         INTERP_KERNEL::AutoPtr<double> res=new double[sz];
4285         self->getValueOn(spaceLoc,time,res);
4286         return convertDblArrToPyList<double>(res,sz);
4287       }
4288
4289       void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
4290       {
4291         if(self->getArray()!=0)
4292           MEDCoupling_DataArrayDouble_setValues__SWIG_0(self->getArray(),li,nbOfTuples,nbOfComp);
4293         else
4294           {
4295             MCAuto<DataArrayDouble> arr=DataArrayDouble::New();
4296             MEDCoupling_DataArrayDouble_setValues__SWIG_0(arr,li,nbOfTuples,nbOfComp);
4297             self->setArray(arr);
4298           }
4299       }
4300       
4301       PyObject *getTime() throw(INTERP_KERNEL::Exception)
4302       {
4303         int tmp1,tmp2;
4304         double tmp0=self->getTime(tmp1,tmp2);
4305         PyObject *res = PyList_New(3);
4306         PyList_SetItem(res,0,SWIG_From_double(tmp0));
4307         PyList_SetItem(res,1,SWIG_From_int(tmp1));
4308         PyList_SetItem(res,2,SWIG_From_int(tmp2));
4309         return res;
4310       }
4311
4312       PyObject *getStartTime() throw(INTERP_KERNEL::Exception)
4313       {
4314         int tmp1,tmp2;
4315         double tmp0=self->getStartTime(tmp1,tmp2);
4316         PyObject *res = PyList_New(3);
4317         PyList_SetItem(res,0,SWIG_From_double(tmp0));
4318         PyList_SetItem(res,1,SWIG_From_int(tmp1));
4319         PyList_SetItem(res,2,SWIG_From_int(tmp2));
4320         return res;
4321       }
4322
4323       PyObject *getEndTime() throw(INTERP_KERNEL::Exception)
4324       {
4325         int tmp1,tmp2;
4326         double tmp0=self->getEndTime(tmp1,tmp2);
4327         PyObject *res = PyList_New(3);
4328         PyList_SetItem(res,0,SWIG_From_double(tmp0));
4329         PyList_SetItem(res,1,SWIG_From_int(tmp1));
4330         PyList_SetItem(res,2,SWIG_From_int(tmp2));
4331         return res;
4332       }
4333       PyObject *accumulate() const throw(INTERP_KERNEL::Exception)
4334       {
4335         int sz=self->getNumberOfComponents();
4336         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
4337         self->accumulate(tmp);
4338         return convertDblArrToPyList<double>(tmp,sz);
4339       }
4340       PyObject *integral(bool isWAbs) const throw(INTERP_KERNEL::Exception)
4341       {
4342         int sz=self->getNumberOfComponents();
4343         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
4344         self->integral(isWAbs,tmp);
4345         return convertDblArrToPyList<double>(tmp,sz);
4346       }
4347       PyObject *getWeightedAverageValue(bool isWAbs=true) const throw(INTERP_KERNEL::Exception)
4348       {
4349         int sz=self->getNumberOfComponents();
4350         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
4351         self->getWeightedAverageValue(tmp,isWAbs);
4352         return convertDblArrToPyList<double>(tmp,sz);
4353       }
4354       PyObject *normL1() const throw(INTERP_KERNEL::Exception)
4355       {
4356         int sz=self->getNumberOfComponents();
4357         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
4358         self->normL1(tmp);
4359         return convertDblArrToPyList<double>(tmp,sz);
4360       }
4361       PyObject *normL2() const throw(INTERP_KERNEL::Exception)
4362       {
4363         int sz=self->getNumberOfComponents();
4364         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
4365         self->normL2(tmp);
4366         return convertDblArrToPyList<double>(tmp,sz);
4367       }
4368       PyObject *normMax() const throw(INTERP_KERNEL::Exception)
4369       {
4370         int sz=self->getNumberOfComponents();
4371         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
4372         self->normMax(tmp);
4373         return convertDblArrToPyList<double>(tmp,sz);
4374       }
4375       void renumberCells(PyObject *li, bool check=true) throw(INTERP_KERNEL::Exception)
4376       {
4377         int szArr,sw,iTypppArr;
4378         std::vector<int> stdvecTyyppArr;
4379         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
4380         self->renumberCells(tmp,check);
4381       }
4382       
4383       void renumberCellsWithoutMesh(PyObject *li, bool check=true) throw(INTERP_KERNEL::Exception)
4384       {
4385         int szArr,sw,iTypppArr;
4386         std::vector<int> stdvecTyyppArr;
4387         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
4388         self->renumberCellsWithoutMesh(tmp,check);
4389       }
4390       
4391       void renumberNodes(PyObject *li, double eps=1e-15) throw(INTERP_KERNEL::Exception)
4392       {
4393         int szArr,sw,iTypppArr;
4394         std::vector<int> stdvecTyyppArr;
4395         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
4396         self->renumberNodes(tmp,eps);
4397       }
4398
4399       void renumberNodesWithoutMesh(PyObject *li, int newNbOfNodes, double eps=1e-15) throw(INTERP_KERNEL::Exception)
4400       {
4401         int szArr,sw,iTypppArr;
4402         std::vector<int> stdvecTyyppArr;
4403         const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
4404         self->renumberNodesWithoutMesh(tmp,newNbOfNodes,eps);
4405       }
4406
4407       MEDCouplingFieldDouble *buildSubPart(PyObject *li) const throw(INTERP_KERNEL::Exception)
4408       {
4409         return fieldT_buildSubPart(self,li);
4410       }
4411
4412       MEDCouplingFieldDouble *__getitem__(PyObject *li) const throw(INTERP_KERNEL::Exception)
4413       {
4414         return fieldT__getitem__(self,li);
4415       }
4416
4417       PyObject *getMaxValue2() const throw(INTERP_KERNEL::Exception)
4418       {
4419         DataArrayInt *tmp;
4420         double r1=self->getMaxValue2(tmp);
4421         PyObject *ret=PyTuple_New(2);
4422         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
4423         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4424         return ret;
4425       }
4426       
4427       PyObject *getMinValue2() const throw(INTERP_KERNEL::Exception)
4428       {
4429         DataArrayInt *tmp;
4430         double r1=self->getMinValue2(tmp);
4431         PyObject *ret=PyTuple_New(2);
4432         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
4433         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
4434         return ret;
4435       }
4436       
4437       MEDCouplingFieldDouble *keepSelectedComponents(PyObject *li) const throw(INTERP_KERNEL::Exception)
4438       {
4439         std::vector<int> tmp;
4440         convertPyToNewIntArr3(li,tmp);
4441         return self->keepSelectedComponents(tmp);
4442       }
4443
4444       void setSelectedComponents(const MEDCouplingFieldDouble *f, PyObject *li) throw(INTERP_KERNEL::Exception)
4445       {
4446         std::vector<int> tmp;
4447         convertPyToNewIntArr3(li,tmp);
4448         self->setSelectedComponents(f,tmp);
4449       }
4450
4451       MEDCouplingFieldDouble *extractSlice3D(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
4452       {
4453         double val,val2;
4454         DataArrayDouble *a,*a2;
4455         DataArrayDoubleTuple *aa,*aa2;
4456         std::vector<double> bb,bb2;
4457         int sw;
4458         int spaceDim=3;
4459         const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st parameter for origin.";
4460         const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd parameter for vector.";
4461         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
4462         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
4463         //
4464         return self->extractSlice3D(orig,vect,eps);
4465       }
4466
4467       MEDCouplingFieldDouble *__add__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4468       {
4469         return MEDCoupling_MEDCouplingFieldDouble___add__Impl(self,obj);
4470       }
4471
4472       MEDCouplingFieldDouble *__radd__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4473       {
4474         return MEDCoupling_MEDCouplingFieldDouble___radd__Impl(self,obj);
4475       }
4476
4477       MEDCouplingFieldDouble *__sub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4478       {
4479         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__sub__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4480         const char msg2[]="in MEDCouplingFieldDouble.__sub__ : self field has no Array of values set !";
4481         void *argp;
4482         //
4483         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4484           {
4485             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4486             if(other)
4487               return (*self)-(*other);
4488             else
4489               throw INTERP_KERNEL::Exception(msg);
4490           }
4491         //
4492         double val;
4493         DataArrayDouble *a;
4494         DataArrayDoubleTuple *aa;
4495         std::vector<double> bb;
4496         int sw;
4497         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4498         switch(sw)
4499           {
4500           case 1:
4501             {
4502               if(!self->getArray())
4503                 throw INTERP_KERNEL::Exception(msg2);
4504               MCAuto<DataArrayDouble> ret=self->getArray()->deepCopy();
4505               ret->applyLin(1.,-val);
4506               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4507               ret2->setArray(ret);
4508               return ret2.retn();
4509             }
4510           case 2:
4511             {
4512               if(!self->getArray())
4513                 throw INTERP_KERNEL::Exception(msg2);
4514               MCAuto<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),a);
4515               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4516               ret2->setArray(ret);
4517               return ret2.retn();
4518             }
4519           case 3:
4520             {
4521               if(!self->getArray())
4522                 throw INTERP_KERNEL::Exception(msg2);
4523               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
4524               MCAuto<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),aaa);
4525               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4526               ret2->setArray(ret);
4527               return ret2.retn();
4528             }
4529           case 4:
4530             {
4531               if(!self->getArray())
4532                 throw INTERP_KERNEL::Exception(msg2);
4533               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
4534               MCAuto<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),aaa);
4535               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4536               ret2->setArray(ret);
4537               return ret2.retn();
4538             }
4539           default:
4540             { throw INTERP_KERNEL::Exception(msg); }
4541           }
4542       }
4543
4544       MEDCouplingFieldDouble *__rsub__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4545       {
4546         return MEDCoupling_MEDCouplingFieldDouble___rsub__Impl(self,obj);
4547       }
4548
4549       MEDCouplingFieldDouble *__mul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4550       {
4551         return MEDCoupling_MEDCouplingFieldDouble___mul__Impl(self,obj);
4552       }
4553
4554       MEDCouplingFieldDouble *__rmul__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4555       {
4556         return MEDCoupling_MEDCouplingFieldDouble___rmul__Impl(self,obj);
4557       }
4558
4559       MEDCouplingFieldDouble *__div__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4560       {
4561         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__div__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4562         const char msg2[]="in MEDCouplingFieldDouble.__div__ : self field has no Array of values set !";
4563         void *argp;
4564         //
4565         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4566           {
4567             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4568             if(other)
4569               return (*self)/(*other);
4570             else
4571               throw INTERP_KERNEL::Exception(msg);
4572           }
4573         //
4574         double val;
4575         DataArrayDouble *a;
4576         DataArrayDoubleTuple *aa;
4577         std::vector<double> bb;
4578         int sw;
4579         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4580         switch(sw)
4581           {
4582           case 1:
4583             {
4584               if(val==0.)
4585                 throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble.__div__ : trying to divide by zero !");
4586               if(!self->getArray())
4587                 throw INTERP_KERNEL::Exception(msg2);
4588               MCAuto<DataArrayDouble> ret=self->getArray()->deepCopy();
4589               ret->applyLin(1./val,0);
4590               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4591               ret2->setArray(ret);
4592               return ret2.retn();
4593             }
4594           case 2:
4595             {
4596               if(!self->getArray())
4597                 throw INTERP_KERNEL::Exception(msg2);
4598               MCAuto<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),a);
4599               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4600               ret2->setArray(ret);
4601               return ret2.retn();
4602             }
4603           case 3:
4604             {
4605               if(!self->getArray())
4606                 throw INTERP_KERNEL::Exception(msg2);
4607               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
4608               MCAuto<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),aaa);
4609               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4610               ret2->setArray(ret);
4611               return ret2.retn();
4612             }
4613           case 4:
4614             {
4615               if(!self->getArray())
4616                 throw INTERP_KERNEL::Exception(msg2);
4617               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
4618               MCAuto<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),aaa);
4619               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4620               ret2->setArray(ret);
4621               return ret2.retn();
4622             }
4623           default:
4624             { throw INTERP_KERNEL::Exception(msg); }
4625           }
4626       }
4627
4628       MEDCouplingFieldDouble *__rdiv__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4629       {
4630         return MEDCoupling_MEDCouplingFieldDouble___rdiv__Impl(self,obj);
4631       }
4632
4633       MEDCouplingFieldDouble *__pow__(PyObject *obj) throw(INTERP_KERNEL::Exception)
4634       {
4635         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__pow__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4636         const char msg2[]="in MEDCouplingFieldDouble.__pow__ : self field has no Array of values set !";
4637         void *argp;
4638         //
4639         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4640           {
4641             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4642             if(other)
4643               return (*self)^(*other);
4644             else
4645               throw INTERP_KERNEL::Exception(msg);
4646           }
4647         //
4648         double val;
4649         DataArrayDouble *a;
4650         DataArrayDoubleTuple *aa;
4651         std::vector<double> bb;
4652         int sw;
4653         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4654         switch(sw)
4655           {
4656           case 1:
4657             {
4658               if(!self->getArray())
4659                 throw INTERP_KERNEL::Exception(msg2);
4660               MCAuto<DataArrayDouble> ret=self->getArray()->deepCopy();
4661               ret->applyPow(val);
4662               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4663               ret2->setArray(ret);
4664               return ret2.retn();
4665             }
4666           case 2:
4667             {
4668               if(!self->getArray())
4669                 throw INTERP_KERNEL::Exception(msg2);
4670               MCAuto<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),a);
4671               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4672               ret2->setArray(ret);
4673               return ret2.retn();
4674             }
4675           case 3:
4676             {
4677               if(!self->getArray())
4678                 throw INTERP_KERNEL::Exception(msg2);
4679               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
4680               MCAuto<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),aaa);
4681               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4682               ret2->setArray(ret);
4683               return ret2.retn();
4684             }
4685           case 4:
4686             {
4687               if(!self->getArray())
4688                 throw INTERP_KERNEL::Exception(msg2);
4689               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
4690               MCAuto<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),aaa);
4691               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4692               ret2->setArray(ret);
4693               return ret2.retn();
4694             }
4695           default:
4696             { throw INTERP_KERNEL::Exception(msg); }
4697           }
4698       }
4699
4700       MEDCouplingFieldDouble *__neg__() const throw(INTERP_KERNEL::Exception)
4701       {
4702         return self->negate();
4703       }
4704
4705       PyObject *___iadd___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4706       {
4707         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__iadd__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4708         const char msg2[]="in MEDCouplingFieldDouble.__iadd__ : self field has no Array of values set !";
4709         void *argp;
4710         //
4711         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4712           {
4713             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4714             if(other)
4715               {
4716                 *self+=*other;
4717                 Py_XINCREF(trueSelf);
4718                 return trueSelf;
4719               }
4720             else
4721               throw INTERP_KERNEL::Exception(msg);
4722           }
4723         //
4724         double val;
4725         DataArrayDouble *a;
4726         DataArrayDoubleTuple *aa;
4727         std::vector<double> bb;
4728         int sw;
4729         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4730         switch(sw)
4731           {
4732           case 1:
4733             {
4734               if(!self->getArray())
4735                 throw INTERP_KERNEL::Exception(msg2);
4736               self->getArray()->applyLin(1.,val);
4737               Py_XINCREF(trueSelf);
4738               return trueSelf;
4739             }
4740           case 2:
4741             {
4742               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4743               ret2->setArray(a);
4744               *self+=*ret2;
4745               Py_XINCREF(trueSelf);
4746               return trueSelf;
4747             }
4748           case 3:
4749             {
4750               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
4751               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4752               ret2->setArray(aaa);
4753               *self+=*ret2;
4754               Py_XINCREF(trueSelf);
4755               return trueSelf;
4756             }
4757           case 4:
4758             {
4759               if(!self->getArray())
4760                 throw INTERP_KERNEL::Exception(msg2);
4761               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
4762               self->getArray()->addEqual(aaa);
4763               Py_XINCREF(trueSelf);
4764               return trueSelf;
4765             }
4766           default:
4767             { throw INTERP_KERNEL::Exception(msg); }
4768           }
4769       }
4770
4771       PyObject *___isub___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4772       {
4773         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__isub__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4774         const char msg2[]="in MEDCouplingFieldDouble.__isub__ : self field has no Array of values set !";
4775         void *argp;
4776         //
4777         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4778           {
4779             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4780             if(other)
4781               {
4782                 *self-=*other;
4783                 Py_XINCREF(trueSelf);
4784                 return trueSelf;
4785               }
4786             else
4787               throw INTERP_KERNEL::Exception(msg);
4788           }
4789         //
4790         double val;
4791         DataArrayDouble *a;
4792         DataArrayDoubleTuple *aa;
4793         std::vector<double> bb;
4794         int sw;
4795         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4796         switch(sw)
4797           {
4798           case 1:
4799             {
4800               if(!self->getArray())
4801                 throw INTERP_KERNEL::Exception(msg2);
4802               self->getArray()->applyLin(1.,-val);
4803               Py_XINCREF(trueSelf);
4804               return trueSelf;
4805             }
4806           case 2:
4807             {
4808               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4809               ret2->setArray(a);
4810               *self-=*ret2;
4811               Py_XINCREF(trueSelf);
4812               return trueSelf;
4813             }
4814           case 3:
4815             {
4816               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
4817               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4818               ret2->setArray(aaa);
4819               *self-=*ret2;
4820               Py_XINCREF(trueSelf);
4821               return trueSelf;
4822             }
4823           case 4:
4824             {
4825               if(!self->getArray())
4826                 throw INTERP_KERNEL::Exception(msg2);
4827               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
4828               self->getArray()->substractEqual(aaa);
4829               Py_XINCREF(trueSelf);
4830               return trueSelf;
4831             }
4832           default:
4833             { throw INTERP_KERNEL::Exception(msg); }
4834           }
4835       }
4836
4837       PyObject *___imul___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4838       {
4839         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__imul__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4840         const char msg2[]="in MEDCouplingFieldDouble.__imul__ : self field has no Array of values set !";
4841         void *argp;
4842         //
4843         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4844           {
4845             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4846             if(other)
4847               {
4848                 *self*=*other;
4849                 Py_XINCREF(trueSelf);
4850                 return trueSelf;
4851               }
4852             else
4853               throw INTERP_KERNEL::Exception(msg);
4854           }
4855         //
4856         double val;
4857         DataArrayDouble *a;
4858         DataArrayDoubleTuple *aa;
4859         std::vector<double> bb;
4860         int sw;
4861         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4862         switch(sw)
4863           {
4864           case 1:
4865             {
4866               if(!self->getArray())
4867                 throw INTERP_KERNEL::Exception(msg2);
4868               self->getArray()->applyLin(val,0);
4869               Py_XINCREF(trueSelf);
4870               return trueSelf;
4871             }
4872           case 2:
4873             {
4874               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4875               ret2->setArray(a);
4876               *self*=*ret2;
4877               Py_XINCREF(trueSelf);
4878               return trueSelf;
4879             }
4880           case 3:
4881             {
4882               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
4883               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4884               ret2->setArray(aaa);
4885               *self*=*ret2;
4886               Py_XINCREF(trueSelf);
4887               return trueSelf;
4888             }
4889           case 4:
4890             {
4891               if(!self->getArray())
4892                 throw INTERP_KERNEL::Exception(msg2);
4893               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
4894               self->getArray()->multiplyEqual(aaa);
4895               Py_XINCREF(trueSelf);
4896               return trueSelf;
4897             }
4898           default:
4899             { throw INTERP_KERNEL::Exception(msg); }
4900           }
4901       }
4902
4903       PyObject *___idiv___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4904       {
4905         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__idiv__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4906         const char msg2[]="in MEDCouplingFieldDouble.__idiv__ : self field has no Array of values set !";
4907         void *argp;
4908         //
4909         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4910           {
4911             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4912             if(other)
4913               {
4914                 *self/=*other;
4915                 Py_XINCREF(trueSelf);
4916                 return trueSelf;
4917               }
4918             else
4919               throw INTERP_KERNEL::Exception(msg);
4920           }
4921         //
4922         double val;
4923         DataArrayDouble *a;
4924         DataArrayDoubleTuple *aa;
4925         std::vector<double> bb;
4926         int sw;
4927         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4928         switch(sw)
4929           {
4930           case 1:
4931             {
4932               if(val==0.)
4933                 throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble.__idiv__ : trying to divide by zero !");
4934               if(!self->getArray())
4935                 throw INTERP_KERNEL::Exception(msg2);
4936               self->getArray()->applyLin(1./val,0);
4937               Py_XINCREF(trueSelf);
4938               return trueSelf;
4939             }
4940           case 2:
4941             {
4942               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4943               ret2->setArray(a);
4944               *self/=*ret2;
4945               Py_XINCREF(trueSelf);
4946               return trueSelf;
4947             }
4948           case 3:
4949             {
4950               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
4951               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
4952               ret2->setArray(aaa);
4953               *self/=*ret2;
4954               Py_XINCREF(trueSelf);
4955               return trueSelf;
4956             }
4957           case 4:
4958             {
4959               if(!self->getArray())
4960                 throw INTERP_KERNEL::Exception(msg2);
4961               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
4962               self->getArray()->divideEqual(aaa);
4963               Py_XINCREF(trueSelf);
4964               return trueSelf;
4965             }
4966           default:
4967             { throw INTERP_KERNEL::Exception(msg); }
4968           }
4969       }
4970
4971       PyObject *___ipow___(PyObject *trueSelf, PyObject *obj) throw(INTERP_KERNEL::Exception)
4972       {
4973         const char msg[]="Unexpected situation in MEDCouplingFieldDouble.__ipow__ ! Expecting a not null MEDCouplingFieldDouble or DataArrayDouble or DataArrayDoubleTuple instance, or a list of double, or a double.";
4974         const char msg2[]="in MEDCouplingFieldDouble.__ipow__ : self field has no Array of values set !";
4975         void *argp;
4976         //
4977         if(SWIG_IsOK(SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,0|0)))
4978           {
4979             MEDCouplingFieldDouble *other=reinterpret_cast< MEDCoupling::MEDCouplingFieldDouble * >(argp);
4980             if(other)
4981               {
4982                 *self^=*other;
4983                 Py_XINCREF(trueSelf);
4984                 return trueSelf;
4985               }
4986             else
4987               throw INTERP_KERNEL::Exception(msg);
4988           }
4989         //
4990         double val;
4991         DataArrayDouble *a;
4992         DataArrayDoubleTuple *aa;
4993         std::vector<double> bb;
4994         int sw;
4995         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
4996         switch(sw)
4997           {
4998           case 1:
4999             {
5000               if(!self->getArray())
5001                 throw INTERP_KERNEL::Exception(msg2);
5002               self->getArray()->applyPow(val);
5003               Py_XINCREF(trueSelf);
5004               return trueSelf;
5005             }
5006           case 2:
5007             {
5008               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
5009               ret2->setArray(a);
5010               *self^=*ret2;
5011               Py_XINCREF(trueSelf);
5012               return trueSelf;
5013             }
5014           case 3:
5015             {
5016               MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
5017               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
5018               ret2->setArray(aaa);
5019               *self^=*ret2;
5020               Py_XINCREF(trueSelf);
5021               return trueSelf;
5022             }
5023           case 4:
5024             {
5025               if(!self->getArray())
5026                 throw INTERP_KERNEL::Exception(msg2);
5027               MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
5028               self->getArray()->powEqual(aaa);
5029               Py_XINCREF(trueSelf);
5030               return trueSelf;
5031             }
5032           default:
5033             { throw INTERP_KERNEL::Exception(msg); }
5034           }
5035       }
5036
5037       static MEDCouplingFieldDouble *MergeFields(PyObject *li) throw(INTERP_KERNEL::Exception)
5038       {
5039         std::vector<const MEDCouplingFieldDouble *> tmp;
5040         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
5041         return MEDCouplingFieldDouble::MergeFields(tmp);
5042       }
5043
5044       static std::string WriteVTK(const char *fileName, PyObject *li, bool isBinary=true) throw(INTERP_KERNEL::Exception)
5045       {
5046         std::vector<const MEDCouplingFieldDouble *> tmp;
5047         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
5048         return MEDCouplingFieldDouble::WriteVTK(fileName,tmp,isBinary);
5049       }
5050
5051       PyObject *getTinySerializationInformation() const throw(INTERP_KERNEL::Exception)
5052       {
5053         return field_getTinySerializationInformation<MEDCouplingFieldDouble>(self);
5054       }
5055       
5056       PyObject *serialize() const throw(INTERP_KERNEL::Exception)
5057       {
5058         return field_serialize<double>(self);
5059       }
5060
5061       PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
5062       {
5063         return field__getstate__<MEDCouplingFieldDouble>(self,MEDCoupling_MEDCouplingFieldDouble_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldDouble_serialize);
5064       }
5065       
5066       void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
5067       {
5068         field__setstate__<double>(self,inp);
5069       }
5070     }
5071   };
5072
5073   class MEDCouplingMultiFields : public RefCountObject, public TimeLabel
5074   {
5075   public:
5076     int getNumberOfFields() const;
5077     MEDCouplingMultiFields *deepCopy() const;
5078     virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
5079     virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
5080     virtual bool isEqual(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
5081     virtual bool isEqualWithoutConsideringStr(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
5082     virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
5083     %extend
5084        {
5085          std::string __str__() const throw(INTERP_KERNEL::Exception)
5086          {
5087            return self->simpleRepr();
5088          }
5089          static MEDCouplingMultiFields *New(PyObject *li) throw(INTERP_KERNEL::Exception)
5090          {
5091            std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
5092            convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
5093            int sz=tmp.size();
5094            std::vector<MEDCouplingFieldDouble *> fs(sz);
5095            for(int i=0;i<sz;i++)
5096              fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
5097            return MEDCouplingMultiFields::New(fs);
5098          }
5099          MEDCouplingMultiFields(PyObject *li) throw(INTERP_KERNEL::Exception)
5100          {
5101            std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
5102            convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
5103            int sz=tmp.size();
5104            std::vector<MEDCouplingFieldDouble *> fs(sz);
5105            for(int i=0;i<sz;i++)
5106              fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
5107            return MEDCouplingMultiFields::New(fs);
5108          }
5109          PyObject *getFields() const
5110          {
5111            std::vector<const MEDCouplingFieldDouble *> fields=self->getFields();
5112            int sz=fields.size();
5113            PyObject *res = PyList_New(sz);
5114            for(int i=0;i<sz;i++)
5115              {
5116                if(fields[i])
5117                  {
5118                    fields[i]->incrRef();
5119                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(fields[i]),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
5120                  }
5121                else
5122                  {
5123                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(0),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, 0 ));
5124                  }
5125              }
5126            return res;
5127          }
5128          PyObject *getFieldAtPos(int id) const throw(INTERP_KERNEL::Exception)
5129          {
5130            const MEDCouplingFieldDouble *ret=self->getFieldAtPos(id);
5131            if(ret)
5132              {
5133                ret->incrRef();
5134                return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 );
5135              }
5136            else
5137              return SWIG_NewPointerObj(SWIG_as_voidptr(0),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, 0 );
5138          }
5139          PyObject *getMeshes() const throw(INTERP_KERNEL::Exception)
5140          {
5141            std::vector<MEDCouplingMesh *> ms=self->getMeshes();
5142            int sz=ms.size();
5143            PyObject *res = PyList_New(sz);
5144            for(int i=0;i<sz;i++)
5145              {
5146                if(ms[i])
5147                  {
5148                    ms[i]->incrRef();
5149                    PyList_SetItem(res,i,convertMesh(ms[i], SWIG_POINTER_OWN | 0 ));
5150                  }
5151                else
5152                  {
5153                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, 0 ));
5154                  }
5155              }
5156            return res;
5157          }
5158          PyObject *getDifferentMeshes() const throw(INTERP_KERNEL::Exception)
5159          {
5160            std::vector<int> refs;
5161            std::vector<MEDCouplingMesh *> ms=self->getDifferentMeshes(refs);
5162            int sz=ms.size();
5163            PyObject *res = PyList_New(sz);
5164            for(int i=0;i<sz;i++)
5165              {
5166                if(ms[i])
5167                  {
5168                    ms[i]->incrRef();
5169                    PyList_SetItem(res,i,convertMesh(ms[i], SWIG_POINTER_OWN | 0 ));
5170                  }
5171                else
5172                  {
5173                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, 0 ));
5174                  }
5175              }
5176            //
5177            PyObject *ret=PyTuple_New(2);
5178            PyTuple_SetItem(ret,0,res);
5179            PyTuple_SetItem(ret,1,convertIntArrToPyList2(refs));
5180            return ret;
5181          }
5182          PyObject *getArrays() const throw(INTERP_KERNEL::Exception)
5183          {
5184            std::vector<DataArrayDouble *> ms=self->getArrays();
5185            int sz=ms.size();
5186            PyObject *res = PyList_New(sz);
5187            for(int i=0;i<sz;i++)
5188              {
5189                if(ms[i])
5190                  {
5191                    ms[i]->incrRef();
5192                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(ms[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
5193                  }
5194                else
5195                  {
5196                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 ));
5197                  }
5198              }
5199            return res;
5200          }
5201          PyObject *getDifferentArrays() const throw(INTERP_KERNEL::Exception)
5202          {
5203            std::vector< std::vector<int> > refs;
5204            std::vector<DataArrayDouble *> ms=self->getDifferentArrays(refs);
5205            int sz=ms.size();
5206            PyObject *res = PyList_New(sz);
5207            PyObject *res2 = PyList_New(sz);
5208            for(int i=0;i<sz;i++)
5209              {
5210                if(ms[i])
5211                  {
5212                    ms[i]->incrRef();
5213                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(ms[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
5214                  }
5215                else
5216                  {
5217                    PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 ));
5218                  }
5219                PyList_SetItem(res2,i,convertIntArrToPyList2(refs[i]));
5220              }
5221            //
5222            PyObject *ret=PyTuple_New(2);
5223            PyTuple_SetItem(ret,0,res);
5224            PyTuple_SetItem(ret,1,res2);
5225            return ret;
5226          }
5227        }
5228   };
5229
5230   class MEDCouplingFieldInt : public MEDCouplingFieldT<int>
5231   {
5232   public:
5233     static MEDCouplingFieldInt *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
5234     static MEDCouplingFieldInt *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
5235     bool isEqual(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const throw(INTERP_KERNEL::Exception);
5236     bool isEqualWithoutConsideringStr(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const throw(INTERP_KERNEL::Exception);
5237     void setTimeUnit(const std::string& unit) throw(INTERP_KERNEL::Exception);
5238     std::string getTimeUnit() const throw(INTERP_KERNEL::Exception);
5239     void setTime(double val, int iteration, int order) throw(INTERP_KERNEL::Exception);
5240     void setArray(DataArrayInt *array) throw(INTERP_KERNEL::Exception);
5241     MEDCouplingFieldInt *deepCopy() const throw(INTERP_KERNEL::Exception);
5242     MEDCouplingFieldInt *clone(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
5243     MEDCouplingFieldInt *cloneWithMesh(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
5244     MEDCouplingFieldDouble *convertToDblField() const throw(INTERP_KERNEL::Exception);
5245     MEDCouplingFieldInt *buildSubPartRange(int begin, int end, int step) const throw(INTERP_KERNEL::Exception);
5246     %extend {
5247       MEDCouplingFieldInt(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
5248       {
5249         return MEDCouplingFieldInt::New(type,td);
5250       }
5251
5252       MEDCouplingFieldInt(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
5253       {
5254         return MEDCouplingFieldInt::New(ft,td);
5255       }
5256
5257       PyObject *isEqualIfNotWhy(const MEDCouplingFieldInt *other, double meshPrec, int valsPrec) const throw(INTERP_KERNEL::Exception)
5258       {
5259         std::string ret1;
5260         bool ret0=self->isEqualIfNotWhy(other,meshPrec,valsPrec,ret1);
5261         PyObject *ret=PyTuple_New(2);
5262         PyObject *ret0Py=ret0?Py_True:Py_False;
5263         Py_XINCREF(ret0Py);
5264         PyTuple_SetItem(ret,0,ret0Py);
5265         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
5266         return ret;
5267       }
5268       
5269       std::string __str__() const throw(INTERP_KERNEL::Exception)
5270       {
5271         return self->simpleRepr();
5272       }
5273
5274       std::string __repr__() const throw(INTERP_KERNEL::Exception)
5275       {
5276         std::ostringstream oss;
5277         self->reprQuickOverview(oss);
5278         return oss.str();
5279       }
5280
5281       MEDCouplingFieldInt *buildSubPart(PyObject *li) const throw(INTERP_KERNEL::Exception)
5282       {
5283         return fieldT_buildSubPart(self,li);
5284       }
5285
5286       MEDCouplingFieldInt *__getitem__(PyObject *li) const throw(INTERP_KERNEL::Exception)
5287       {
5288         return fieldT__getitem__(self,li);
5289       }
5290
5291       DataArrayInt *getArray() throw(INTERP_KERNEL::Exception)
5292       {
5293         DataArrayInt *ret=self->getArray();
5294         if(ret)
5295           ret->incrRef();
5296         return ret;
5297       }
5298       
5299       PyObject *getTime() throw(INTERP_KERNEL::Exception)
5300         {
5301         int tmp1,tmp2;
5302         double tmp0=self->getTime(tmp1,tmp2);
5303         PyObject *res = PyList_New(3);
5304         PyList_SetItem(res,0,SWIG_From_double(tmp0));
5305         PyList_SetItem(res,1,SWIG_From_int(tmp1));
5306         PyList_SetItem(res,2,SWIG_From_int(tmp2));
5307         return res;
5308         }
5309
5310       PyObject *getTinySerializationInformation() const throw(INTERP_KERNEL::Exception)
5311       {
5312         return field_getTinySerializationInformation<MEDCouplingFieldInt>(self);
5313       }
5314       
5315       PyObject *serialize() const throw(INTERP_KERNEL::Exception)
5316       {
5317         return field_serialize<int>(self);
5318       }
5319
5320       PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
5321       {
5322         return field__getstate__<MEDCouplingFieldInt>(self,MEDCoupling_MEDCouplingFieldInt_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldInt_serialize);
5323       }
5324       
5325       void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
5326       {
5327         field__setstate__<int>(self,inp);
5328       }
5329     }
5330   };
5331
5332   class MEDCouplingFieldFloat : public MEDCouplingFieldT<float>
5333   {
5334   public:
5335     static MEDCouplingFieldFloat *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
5336     static MEDCouplingFieldFloat *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
5337     bool isEqual(const MEDCouplingFieldFloat *other, double meshPrec, float valsPrec) const throw(INTERP_KERNEL::Exception);
5338     bool isEqualWithoutConsideringStr(const MEDCouplingFieldFloat *other, double meshPrec, float valsPrec) const throw(INTERP_KERNEL::Exception);
5339     void setTimeUnit(const std::string& unit) throw(INTERP_KERNEL::Exception);
5340     std::string getTimeUnit() const throw(INTERP_KERNEL::Exception);
5341     void setTime(double val, int iteration, int order) throw(INTERP_KERNEL::Exception);
5342     void setArray(DataArrayFloat *array) throw(INTERP_KERNEL::Exception);
5343     MEDCouplingFieldFloat *deepCopy() const throw(INTERP_KERNEL::Exception);
5344     MEDCouplingFieldFloat *clone(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
5345     MEDCouplingFieldFloat *cloneWithMesh(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
5346     MEDCouplingFieldDouble *convertToDblField() const throw(INTERP_KERNEL::Exception);
5347     MEDCouplingFieldFloat *buildSubPartRange(int begin, int end, int step) const throw(INTERP_KERNEL::Exception);
5348     %extend {
5349       MEDCouplingFieldFloat(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
5350       {
5351         return MEDCouplingFieldFloat::New(type,td);
5352       }
5353
5354       MEDCouplingFieldFloat(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
5355       {
5356         return MEDCouplingFieldFloat::New(ft,td);
5357       }
5358
5359       PyObject *isEqualIfNotWhy(const MEDCouplingFieldFloat *other, double meshPrec, float valsPrec) const throw(INTERP_KERNEL::Exception)
5360       {
5361         std::string ret1;
5362         bool ret0=self->isEqualIfNotWhy(other,meshPrec,valsPrec,ret1);
5363         PyObject *ret=PyTuple_New(2);
5364         PyObject *ret0Py=ret0?Py_True:Py_False;
5365         Py_XINCREF(ret0Py);
5366         PyTuple_SetItem(ret,0,ret0Py);
5367         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
5368         return ret;
5369       }
5370
5371       std::string __str__() const throw(INTERP_KERNEL::Exception)
5372       {
5373         return self->simpleRepr();
5374       }
5375
5376       std::string __repr__() const throw(INTERP_KERNEL::Exception)
5377       {
5378         std::ostringstream oss;
5379         self->reprQuickOverview(oss);
5380         return oss.str();
5381       }
5382
5383       MEDCouplingFieldFloat *buildSubPart(PyObject *li) const throw(INTERP_KERNEL::Exception)
5384       {
5385         return fieldT_buildSubPart(self,li);
5386       }
5387
5388       MEDCouplingFieldFloat *__getitem__(PyObject *li) const throw(INTERP_KERNEL::Exception)
5389       {
5390         return fieldT__getitem__(self,li);
5391       }
5392
5393       DataArrayFloat *getArray() throw(INTERP_KERNEL::Exception)
5394       {
5395         DataArrayFloat *ret=self->getArray();
5396         if(ret)
5397           ret->incrRef();
5398         return ret;
5399       }
5400       
5401       PyObject *getTime() throw(INTERP_KERNEL::Exception)
5402       {
5403         int tmp1,tmp2;
5404         double tmp0=self->getTime(tmp1,tmp2);
5405         PyObject *res = PyList_New(3);
5406         PyList_SetItem(res,0,SWIG_From_double(tmp0));
5407         PyList_SetItem(res,1,SWIG_From_int(tmp1));
5408         PyList_SetItem(res,2,SWIG_From_int(tmp2));
5409         return res;
5410       }
5411
5412       PyObject *getTinySerializationInformation() const throw(INTERP_KERNEL::Exception)
5413       {
5414         return field_getTinySerializationInformation<MEDCouplingFieldFloat>(self);
5415       }
5416       
5417       PyObject *serialize() const throw(INTERP_KERNEL::Exception)
5418       {
5419         return field_serialize<float>(self);
5420       }
5421       
5422       PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
5423       {
5424         return field__getstate__<MEDCouplingFieldFloat>(self,MEDCoupling_MEDCouplingFieldFloat_getTinySerializationInformation,MEDCoupling_MEDCouplingFieldFloat_serialize);
5425       }
5426         
5427       void __setstate__(PyObject *inp) throw(INTERP_KERNEL::Exception)
5428       {
5429         field__setstate__<float>(self,inp);
5430       }
5431     }
5432   };
5433   
5434   class MEDCouplingDefinitionTime
5435   {
5436   public:
5437     MEDCouplingDefinitionTime();
5438     void assign(const MEDCouplingDefinitionTime& other);
5439     bool isEqual(const MEDCouplingDefinitionTime& other) const;
5440     double getTimeResolution() const;
5441     std::vector<double> getHotSpotsTime() const;
5442     %extend
5443       {
5444         std::string __str__() const throw(INTERP_KERNEL::Exception)
5445           {
5446             std::ostringstream oss;
5447             self->appendRepr(oss);
5448             return oss.str();
5449           }
5450
5451         PyObject *getIdsOnTimeRight(double tm) const throw(INTERP_KERNEL::Exception)
5452         {
5453           int meshId,arrId,arrIdInField,fieldId;
5454           self->getIdsOnTimeRight(tm,meshId,arrId,arrIdInField,fieldId);
5455           PyObject *res=PyList_New(4);
5456           PyList_SetItem(res,0,PyInt_FromLong(meshId));
5457           PyList_SetItem(res,1,PyInt_FromLong(arrId));
5458           PyList_SetItem(res,2,PyInt_FromLong(arrIdInField));
5459           PyList_SetItem(res,3,PyInt_FromLong(fieldId));
5460           return res;
5461         }
5462
5463         PyObject *getIdsOnTimeLeft(double tm) const throw(INTERP_KERNEL::Exception)
5464         {
5465           int meshId,arrId,arrIdInField,fieldId;
5466           self->getIdsOnTimeLeft(tm,meshId,arrId,arrIdInField,fieldId);
5467           PyObject *res=PyList_New(4);
5468           PyList_SetItem(res,0,PyInt_FromLong(meshId));
5469           PyList_SetItem(res,1,PyInt_FromLong(arrId));
5470           PyList_SetItem(res,2,PyInt_FromLong(arrIdInField));
5471           PyList_SetItem(res,3,PyInt_FromLong(fieldId));
5472           return res;
5473         }
5474       }
5475   };
5476
5477   class MEDCouplingFieldOverTime : public MEDCouplingMultiFields
5478   {
5479   public:
5480     double getTimeTolerance() const throw(INTERP_KERNEL::Exception);
5481     MEDCouplingDefinitionTime getDefinitionTimeZone() const;
5482     
5483     %extend
5484       {
5485         MEDCouplingFieldOverTime(PyObject *li) throw(INTERP_KERNEL::Exception)
5486           {
5487             std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
5488             convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
5489             int sz=tmp.size();
5490             std::vector<MEDCouplingFieldDouble *> fs(sz);
5491             for(int i=0;i<sz;i++)
5492               fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
5493             return MEDCouplingFieldOverTime::New(fs);
5494           }
5495         std::string __str__() const throw(INTERP_KERNEL::Exception)
5496           {
5497             return self->simpleRepr();
5498           }
5499         static MEDCouplingFieldOverTime *New(PyObject *li) throw(INTERP_KERNEL::Exception)
5500         {
5501           std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
5502           convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
5503            int sz=tmp.size();
5504            std::vector<MEDCouplingFieldDouble *> fs(sz);
5505            for(int i=0;i<sz;i++)
5506              fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
5507            return MEDCouplingFieldOverTime::New(fs);
5508          }
5509       }
5510   };
5511
5512   class MEDCouplingCartesianAMRMesh;
5513   
5514   class MEDCouplingCartesianAMRPatchGen : public RefCountObject
5515   {
5516   public:
5517     int getNumberOfCellsRecursiveWithOverlap() const throw(INTERP_KERNEL::Exception);
5518     int getNumberOfCellsRecursiveWithoutOverlap() const throw(INTERP_KERNEL::Exception);
5519     int getMaxNumberOfLevelsRelativeToThis() const throw(INTERP_KERNEL::Exception);
5520     %extend
5521     {
5522       MEDCouplingCartesianAMRMeshGen *getMesh() const throw(INTERP_KERNEL::Exception)
5523       {
5524         MEDCouplingCartesianAMRMeshGen *ret(const_cast<MEDCouplingCartesianAMRMeshGen *>(self->getMesh()));
5525         if(ret)
5526           ret->incrRef();
5527         return ret;
5528       }
5529     }
5530   };
5531
5532   class MEDCouplingCartesianAMRPatch : public MEDCouplingCartesianAMRPatchGen
5533   {
5534   public:
5535     int getNumberOfOverlapedCellsForFather() const throw(INTERP_KERNEL::Exception);
5536     bool isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const throw(INTERP_KERNEL::Exception);
5537     std::vector<int> computeCellGridSt() const throw(INTERP_KERNEL::Exception);
5538     %extend
5539     {
5540       PyObject *getBLTRRange() const throw(INTERP_KERNEL::Exception)
5541       {
5542         const std::vector< std::pair<int,int> >& ret(self->getBLTRRange());
5543         return convertFromVectorPairInt(ret);
5544       }
5545
5546       PyObject *getBLTRRangeRelativeToGF() const throw(INTERP_KERNEL::Exception)
5547       {
5548         std::vector< std::pair<int,int> > ret(self->getBLTRRangeRelativeToGF());
5549         return convertFromVectorPairInt(ret);
5550       }
5551
5552       void addPatch(PyObject *bottomLeftTopRight, const std::vector<int>& factors) throw(INTERP_KERNEL::Exception)
5553       {
5554         std::vector< std::pair<int,int> > inp;
5555         convertPyToVectorPairInt(bottomLeftTopRight,inp);
5556         self->addPatch(inp,factors);
5557       }
5558
5559       MEDCouplingCartesianAMRPatch *__getitem__(int patchId) const throw(INTERP_KERNEL::Exception)
5560       {
5561         const MEDCouplingCartesianAMRMeshGen *mesh(self->getMesh());
5562         if(!mesh)
5563           throw INTERP_KERNEL::Exception("wrap MEDCouplingCartesianAMRPatchGen.__getitem__ : no underlying mesh !");
5564         if(patchId==mesh->getNumberOfPatches())
5565           {
5566             std::ostringstream oss;
5567             oss << "Requesting for patchId " << patchId << " having only " << mesh->getNumberOfPatches() << " patches !";
5568             PyErr_SetString(PyExc_StopIteration,oss.str().c_str());
5569             return 0;
5570           }
5571         MEDCouplingCartesianAMRPatch *ret(const_cast<MEDCouplingCartesianAMRPatch *>(mesh->getPatch(patchId)));
5572         if(ret)
5573           ret->incrRef();
5574         return ret;
5575       }
5576
5577       void __delitem__(int patchId) throw(INTERP_KERNEL::Exception)
5578       {
5579         MEDCouplingCartesianAMRMeshGen *mesh(const_cast<MEDCouplingCartesianAMRMeshGen *>(self->getMesh()));
5580         if(!mesh)
5581           throw INTERP_KERNEL::Exception("wrap MEDCouplingCartesianAMRPatch.__delitem__ : no underlying mesh !");
5582         mesh->removePatch(patchId);
5583       }
5584
5585       int __len__() const throw(INTERP_KERNEL::Exception)
5586       {
5587         const MEDCouplingCartesianAMRMeshGen *mesh(self->getMesh());
5588         if(!mesh)
5589           throw INTERP_KERNEL::Exception("wrap MEDCouplingCartesianAMRPatch.__len__ : no underlying mesh !");
5590         return mesh->getNumberOfPatches();
5591       }
5592     }
5593   };
5594
5595   class MEDCouplingCartesianAMRPatchGF : public MEDCouplingCartesianAMRPatchGen
5596   {
5597   };
5598   
5599   class MEDCouplingCartesianAMRMeshGen : public RefCountObject, public TimeLabel
5600   {
5601   public:
5602     int getAbsoluteLevel() const throw(INTERP_KERNEL::Exception);
5603     int getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const throw(INTERP_KERNEL::Exception);
5604     std::vector<int> getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const throw(INTERP_KERNEL::Exception);
5605     int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
5606     const std::vector<int>& getFactors() const throw(INTERP_KERNEL::Exception);
5607     void setFactors(const std::vector<int>& newFactors) throw(INTERP_KERNEL::Exception);
5608     int getMaxNumberOfLevelsRelativeToThis() const throw(INTERP_KERNEL::Exception);
5609     int getNumberOfCellsAtCurrentLevel() const throw(INTERP_KERNEL::Exception);
5610     int getNumberOfCellsAtCurrentLevelGhost(int ghostLev) const throw(INTERP_KERNEL::Exception);
5611     int getNumberOfCellsRecursiveWithOverlap() const throw(INTERP_KERNEL::Exception);
5612     int getNumberOfCellsRecursiveWithoutOverlap() const throw(INTERP_KERNEL::Exception);
5613     bool isPatchInNeighborhoodOf(int patchId1, int patchId2, int ghostLev) const throw(INTERP_KERNEL::Exception);
5614    virtual void detachFromFather() throw(INTERP_KERNEL::Exception);
5615     //
5616     int getNumberOfPatches() const throw(INTERP_KERNEL::Exception);
5617     int getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const throw(INTERP_KERNEL::Exception);
5618     MEDCouplingUMesh *buildUnstructured() const throw(INTERP_KERNEL::Exception);
5619     DataArrayDouble *extractGhostFrom(int ghostSz, const DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception);
5620     std::vector<int> getPatchIdsInTheNeighborhoodOf(int patchId, int ghostLev) const throw(INTERP_KERNEL::Exception);
5621     MEDCoupling1SGTUMesh *buildMeshFromPatchEnvelop() const throw(INTERP_KERNEL::Exception);
5622     MEDCoupling1SGTUMesh *buildMeshOfDirectChildrenOnly() const throw(INTERP_KERNEL::Exception);
5623     void removeAllPatches() throw(INTERP_KERNEL::Exception);
5624     void removePatch(int patchId) throw(INTERP_KERNEL::Exception);
5625     void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<int>& factors) throw(INTERP_KERNEL::Exception);
5626     void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<int>& factors, double eps) throw(INTERP_KERNEL::Exception);
5627     DataArrayDouble *createCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis) const throw(INTERP_KERNEL::Exception);
5628     void fillCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const throw(INTERP_KERNEL::Exception);
5629     void fillCellFieldOnPatchGhost(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev, bool isConservative=true) const throw(INTERP_KERNEL::Exception);
5630     void fillCellFieldOnPatchOnlyOnGhostZone(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev) const throw(INTERP_KERNEL::Exception);
5631     void fillCellFieldOnPatchOnlyOnGhostZoneWith(int ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const;
5632     void fillCellFieldComingFromPatch(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const throw(INTERP_KERNEL::Exception);
5633     void fillCellFieldComingFromPatchGhost(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, int ghostLev, bool isConservative=true) const throw(INTERP_KERNEL::Exception);
5634     DataArrayInt *findPatchesInTheNeighborhoodOf(int patchId, int ghostLev) const throw(INTERP_KERNEL::Exception);
5635     std::string buildPythonDumpOfThis() const throw(INTERP_KERNEL::Exception);
5636     %extend
5637     {
5638       void addPatch(PyObject *bottomLeftTopRight, const std::vector<int>& factors) throw(INTERP_KERNEL::Exception)
5639       {
5640         std::vector< std::pair<int,int> > inp;
5641         convertPyToVectorPairInt(bottomLeftTopRight,inp);
5642         self->addPatch(inp,factors);
5643       }
5644
5645       PyObject *getPatches() const throw(INTERP_KERNEL::Exception)
5646       {
5647         std::vector< const MEDCouplingCartesianAMRPatch *> ps(self->getPatches());
5648         int sz(ps.size());
5649         PyObject *ret = PyList_New(sz);
5650         for(int i=0;i<sz;i++)
5651           {
5652             MEDCouplingCartesianAMRPatch *elt(const_cast<MEDCouplingCartesianAMRPatch *>(ps[i]));
5653             if(elt)
5654               elt->incrRef();
5655             PyList_SetItem(ret,i,convertCartesianAMRPatch(elt, SWIG_POINTER_OWN | 0 ));
5656           }
5657         return ret;
5658       }
5659
5660       // agy : don't know why typemap fails here ??? let it in the extend section
5661       PyObject *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const throw(INTERP_KERNEL::Exception)
5662       {
5663         return convertCartesianAMRMesh(self->deepCopy(father), SWIG_POINTER_OWN | 0 );
5664       }
5665
5666       MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<int>& pos) const throw(INTERP_KERNEL::Exception)
5667       {
5668         const MEDCouplingCartesianAMRPatch *ret(self->getPatchAtPosition(pos));
5669         MEDCouplingCartesianAMRPatch *ret2(const_cast<MEDCouplingCartesianAMRPatch *>(ret));
5670         if(ret2)
5671           ret2->incrRef();
5672         return ret2;
5673       }
5674
5675       MEDCouplingCartesianAMRMeshGen *getMeshAtPosition(const std::vector<int>& pos) const throw(INTERP_KERNEL::Exception)
5676       {
5677         const MEDCouplingCartesianAMRMeshGen *ret(self->getMeshAtPosition(pos));
5678         MEDCouplingCartesianAMRMeshGen *ret2(const_cast<MEDCouplingCartesianAMRMeshGen *>(ret));
5679         if(ret2)
5680           ret2->incrRef();
5681         return ret2;
5682       }
5683
5684       virtual PyObject *positionRelativeToGodFather() const throw(INTERP_KERNEL::Exception)
5685       {
5686         std::vector<int> out1;
5687         std::vector< std::pair<int,int> > out0(self->positionRelativeToGodFather(out1));
5688         PyObject *ret(PyTuple_New(2));
5689         PyTuple_SetItem(ret,0,convertFromVectorPairInt(out0));
5690         PyTuple_SetItem(ret,1,convertIntArrToPyList2(out1));
5691         return ret;
5692       }
5693
5694       virtual PyObject *retrieveGridsAt(int absoluteLev) const throw(INTERP_KERNEL::Exception)
5695       {
5696         std::vector<MEDCouplingCartesianAMRPatchGen *> ps(self->retrieveGridsAt(absoluteLev));
5697         int sz(ps.size());
5698         PyObject *ret = PyList_New(sz);
5699         for(int i=0;i<sz;i++)
5700           PyList_SetItem(ret,i,convertCartesianAMRPatch(ps[i], SWIG_POINTER_OWN | 0 ));
5701         return ret;
5702       }
5703
5704       MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostSz, PyObject *recurseArrs) const
5705       {
5706         std::vector<const DataArrayDouble *> inp;
5707         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayDouble *>(recurseArrs,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",inp);
5708         return self->buildCellFieldOnRecurseWithoutOverlapWithoutGhost(ghostSz,inp);
5709       }
5710
5711       virtual MEDCouplingCartesianAMRMeshGen *getFather() const throw(INTERP_KERNEL::Exception)
5712       {
5713         MEDCouplingCartesianAMRMeshGen *ret(const_cast<MEDCouplingCartesianAMRMeshGen *>(self->getFather()));
5714         if(ret)
5715           ret->incrRef();
5716         return ret;
5717       }
5718       
5719       virtual MEDCouplingCartesianAMRMeshGen *getGodFather() const throw(INTERP_KERNEL::Exception)
5720       {
5721         MEDCouplingCartesianAMRMeshGen *ret(const_cast<MEDCouplingCartesianAMRMeshGen *>(self->getGodFather()));
5722         if(ret)
5723           ret->incrRef();
5724         return ret;
5725       }
5726
5727       MEDCouplingCartesianAMRPatch *getPatch(int patchId) const throw(INTERP_KERNEL::Exception)
5728       {
5729         MEDCouplingCartesianAMRPatch *ret(const_cast<MEDCouplingCartesianAMRPatch *>(self->getPatch(patchId)));
5730         if(ret)
5731           ret->incrRef();
5732         return ret;
5733       }
5734
5735       MEDCouplingIMesh *getImageMesh() const throw(INTERP_KERNEL::Exception)
5736       {
5737         const MEDCouplingIMesh *ret(self->getImageMesh());
5738         if(ret)
5739           ret->incrRef();
5740         return const_cast<MEDCouplingIMesh *>(ret);
5741       }
5742
5743       MEDCouplingCartesianAMRPatch *__getitem__(int patchId) const throw(INTERP_KERNEL::Exception)
5744       {
5745         if(patchId==self->getNumberOfPatches())
5746           {
5747             std::ostringstream oss;
5748             oss << "Requesting for patchId " << patchId << " having only " << self->getNumberOfPatches() << " patches !";
5749             PyErr_SetString(PyExc_StopIteration,oss.str().c_str());
5750             return 0;
5751           }
5752         MEDCouplingCartesianAMRPatch *ret(const_cast<MEDCouplingCartesianAMRPatch *>(self->getPatch(patchId)));
5753         if(ret)
5754           ret->incrRef();
5755         return ret;
5756       }
5757
5758       void fillCellFieldOnPatchGhostAdv(int patchId, const DataArrayDouble *cellFieldOnThis, int ghostLev, PyObject *arrsOnPatches, bool isConservative=true) const throw(INTERP_KERNEL::Exception)
5759       {
5760         std::vector<const MEDCoupling::DataArrayDouble *> arrsOnPatches2;
5761         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayDouble *>(arrsOnPatches,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",arrsOnPatches2);
5762         self->fillCellFieldOnPatchGhostAdv(patchId,cellFieldOnThis,ghostLev,arrsOnPatches2,isConservative);
5763       }
5764
5765       void fillCellFieldOnPatchOnlyGhostAdv(int patchId, int ghostLev, PyObject *arrsOnPatches) const
5766       {
5767         std::vector<const MEDCoupling::DataArrayDouble *> arrsOnPatches2;
5768         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayDouble *>(arrsOnPatches,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",arrsOnPatches2);
5769         self->fillCellFieldOnPatchOnlyGhostAdv(patchId,ghostLev,arrsOnPatches2);
5770       }
5771
5772       void __delitem__(int patchId) throw(INTERP_KERNEL::Exception)
5773       {
5774         self->removePatch(patchId);
5775       }
5776
5777       int __len__() const throw(INTERP_KERNEL::Exception)
5778       {
5779         return self->getNumberOfPatches();
5780       }
5781     }
5782   };
5783
5784   class MEDCouplingCartesianAMRMeshSub : public MEDCouplingCartesianAMRMeshGen
5785   {
5786   };
5787
5788   class MEDCouplingCartesianAMRMesh : public MEDCouplingCartesianAMRMeshGen
5789   {
5790   public:
5791     static MEDCouplingCartesianAMRMesh *New(MEDCouplingIMesh *mesh) throw(INTERP_KERNEL::Exception);
5792     %extend
5793     {
5794       static MEDCouplingCartesianAMRMesh *New(const std::string& meshName, int spaceDim, PyObject *nodeStrct, PyObject *origin, PyObject *dxyz) throw(INTERP_KERNEL::Exception)
5795       {
5796         static const char msg0[]="MEDCouplingCartesianAMRMesh::New : error on 'origin' parameter !";
5797         static const char msg1[]="MEDCouplingCartesianAMRMesh::New : error on 'dxyz' parameter !";
5798         const int *nodeStrctPtr(0);
5799         const double *originPtr(0),*dxyzPtr(0);
5800         int sw,sz,val0;
5801         std::vector<int> bb0;
5802         nodeStrctPtr=convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0);
5803         //
5804         double val,val2;
5805         std::vector<double> bb,bb2;
5806         int sz1,sz2;
5807         originPtr=convertObjToPossibleCpp5_SingleCompo(origin,sw,val,bb,msg0,false,sz1);
5808         dxyzPtr=convertObjToPossibleCpp5_SingleCompo(dxyz,sw,val2,bb2,msg1,false,sz2);
5809         //
5810         return MEDCouplingCartesianAMRMesh::New(meshName,spaceDim,nodeStrctPtr,nodeStrctPtr+sz,originPtr,originPtr+sz1,dxyzPtr,dxyzPtr+sz2);
5811       }
5812
5813       void createPatchesFromCriterionML(PyObject *bso, const DataArrayDouble *criterion, PyObject *factors, double eps) throw(INTERP_KERNEL::Exception)
5814       {
5815         std::vector<const INTERP_KERNEL::BoxSplittingOptions *> inp0;
5816         convertFromPyObjVectorOfObj<const INTERP_KERNEL::BoxSplittingOptions *>(bso,SWIGTYPE_p_INTERP_KERNEL__BoxSplittingOptions,"BoxSplittingOptions",inp0);
5817         std::vector< std::vector<int> > inp2;
5818         convertPyToVectorOfVectorOfInt(factors,inp2);
5819         self->createPatchesFromCriterionML(inp0,criterion,inp2,eps);
5820       }
5821
5822       MEDCouplingCartesianAMRMesh(const std::string& meshName, int spaceDim, PyObject *nodeStrct, PyObject *origin, PyObject *dxyz) throw(INTERP_KERNEL::Exception)
5823       {
5824         return MEDCoupling_MEDCouplingCartesianAMRMesh_New__SWIG_1(meshName,spaceDim,nodeStrct,origin,dxyz);
5825       }
5826
5827       MEDCouplingCartesianAMRMesh(MEDCouplingIMesh *mesh) throw(INTERP_KERNEL::Exception)
5828       {
5829         return MEDCouplingCartesianAMRMesh::New(mesh);
5830       }
5831     }
5832   };
5833
5834   class MEDCouplingDataForGodFather : public RefCountObject
5835   {
5836   public:
5837     virtual void synchronizeFineToCoarse() throw(INTERP_KERNEL::Exception);
5838     virtual void synchronizeFineToCoarseBetween(int fromLev, int toLev) throw(INTERP_KERNEL::Exception);
5839     virtual void synchronizeCoarseToFine() throw(INTERP_KERNEL::Exception);
5840     virtual void synchronizeCoarseToFineBetween(int fromLev, int toLev) throw(INTERP_KERNEL::Exception);
5841     virtual void synchronizeAllGhostZones() throw(INTERP_KERNEL::Exception);
5842     virtual void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh) throw(INTERP_KERNEL::Exception);
5843     virtual void synchronizeAllGhostZonesAtASpecifiedLevel(int level) throw(INTERP_KERNEL::Exception);
5844     virtual void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(int level) throw(INTERP_KERNEL::Exception);
5845     virtual void alloc() throw(INTERP_KERNEL::Exception);
5846     virtual void dealloc() throw(INTERP_KERNEL::Exception);
5847     %extend
5848     {
5849       MEDCouplingCartesianAMRMesh *getMyGodFather() throw(INTERP_KERNEL::Exception)
5850       {
5851         MEDCouplingCartesianAMRMesh *ret(self->getMyGodFather());
5852         if(ret)
5853           ret->incrRef();
5854         return ret;
5855       }
5856     }
5857   };
5858   
5859   class MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
5860   {
5861   public:
5862     int getNumberOfLevels() const throw(INTERP_KERNEL::Exception);
5863     MEDCouplingAMRAttribute *deepCopy() const throw(INTERP_KERNEL::Exception);
5864     MEDCouplingAMRAttribute *deepCpyWithoutGodFather() const throw(INTERP_KERNEL::Exception);
5865     MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
5866     MEDCouplingFieldDouble *buildCellFieldOnWithGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
5867     MEDCouplingFieldDouble *buildCellFieldOnWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
5868     bool changeGodFather(MEDCouplingCartesianAMRMesh *gf) throw(INTERP_KERNEL::Exception);
5869     MEDCouplingAMRAttribute *projectTo(MEDCouplingCartesianAMRMesh *targetGF) const throw(INTERP_KERNEL::Exception);
5870     std::string writeVTHB(const std::string& fileName) const throw(INTERP_KERNEL::Exception);
5871     %extend
5872     {
5873       static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, PyObject *fieldNames, int ghostLev) throw(INTERP_KERNEL::Exception)
5874       {
5875         std::vector< std::pair<std::string,int> > fieldNamesCpp0;
5876         std::vector< std::pair<std::string, std::vector<std::string> > > fieldNamesCpp1;
5877         MEDCouplingAMRAttribute *ret(0);
5878         try
5879           {
5880             convertPyToVectorPairStringInt(fieldNames,fieldNamesCpp0);
5881             ret=MEDCouplingAMRAttribute::New(gf,fieldNamesCpp0,ghostLev);
5882           }
5883         catch(INTERP_KERNEL::Exception&)
5884           {
5885             convertPyToVectorPairStringVecString(fieldNames,fieldNamesCpp1);
5886             ret=MEDCouplingAMRAttribute::New(gf,fieldNamesCpp1,ghostLev);
5887           }
5888         return ret;
5889       }
5890
5891       MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, PyObject *fieldNames, int ghostLev) throw(INTERP_KERNEL::Exception)
5892       {
5893         return MEDCoupling_MEDCouplingAMRAttribute_New(gf,fieldNames,ghostLev);
5894       }
5895
5896       DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception)
5897       {
5898         const DataArrayDouble *ret(self->getFieldOn(mesh,fieldName));
5899         DataArrayDouble *ret2(const_cast<DataArrayDouble *>(ret));
5900         if(ret2)
5901           ret2->incrRef();
5902         return ret2;
5903       }
5904
5905       void spillInfoOnComponents(PyObject *compNames) throw(INTERP_KERNEL::Exception)
5906       {
5907         std::vector< std::vector<std::string> > compNamesCpp;
5908         convertPyToVectorOfVectorOfString(compNames,compNamesCpp);
5909         self->spillInfoOnComponents(compNamesCpp);
5910       }
5911
5912       void spillNatures(PyObject *nfs) throw(INTERP_KERNEL::Exception)
5913       {
5914         std::vector<int> inp0;
5915         if(!fillIntVector(nfs,inp0))
5916           throw INTERP_KERNEL::Exception("wrap of MEDCouplingAMRAttribute::spillNatures : vector of NatureOfField enum expected !");
5917         std::size_t sz(inp0.size());
5918         std::vector<NatureOfField> inp00(sz);
5919         for(std::size_t i=0;i<sz;i++)
5920           inp00[i]=(NatureOfField)inp0[i];
5921         self->spillNatures(inp00);
5922       }
5923       
5924       PyObject *retrieveFieldsOn(MEDCouplingCartesianAMRMeshGen *mesh) const throw(INTERP_KERNEL::Exception)
5925       {
5926         std::vector<DataArrayDouble *> ret(self->retrieveFieldsOn(mesh));
5927         int sz((int)ret.size());
5928         PyObject *retPy(PyList_New(sz));
5929         for(int i=0;i<sz;i++)
5930           PyList_SetItem(retPy,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
5931         return retPy;
5932       }
5933     }
5934   };
5935
5936   class DenseMatrix : public RefCountObject, public TimeLabel
5937   {
5938   public:
5939     static DenseMatrix *New(int nbRows, int nbCols) throw(INTERP_KERNEL::Exception);
5940     static DenseMatrix *New(DataArrayDouble *array, int nbRows, int nbCols) throw(INTERP_KERNEL::Exception);
5941     DenseMatrix *deepCopy() const throw(INTERP_KERNEL::Exception);
5942     DenseMatrix *shallowCpy() const throw(INTERP_KERNEL::Exception);
5943     //
5944     int getNumberOfRows() const throw(INTERP_KERNEL::Exception);
5945     int getNumberOfCols() const throw(INTERP_KERNEL::Exception);
5946     int getNbOfElems() const throw(INTERP_KERNEL::Exception);
5947     void reBuild(DataArrayDouble *array, int nbRows=-1, int nbCols=-1) throw(INTERP_KERNEL::Exception);
5948     void reShape(int nbRows, int nbCols) throw(INTERP_KERNEL::Exception);
5949     void transpose() throw(INTERP_KERNEL::Exception);
5950     //
5951     bool isEqual(const DenseMatrix& other, double eps) const throw(INTERP_KERNEL::Exception);
5952     DataArrayDouble *matVecMult(const DataArrayDouble *vec) const throw(INTERP_KERNEL::Exception);
5953     static DataArrayDouble *MatVecMult(const DenseMatrix *mat, const DataArrayDouble *vec) throw(INTERP_KERNEL::Exception);
5954     %extend
5955     {
5956       DenseMatrix(int nbRows, int nbCols) throw(INTERP_KERNEL::Exception)
5957       {
5958         return DenseMatrix::New(nbRows,nbCols);
5959       }
5960
5961       DenseMatrix(DataArrayDouble *array, int nbRows, int nbCols) throw(INTERP_KERNEL::Exception)
5962       {
5963         return DenseMatrix::New(array,nbRows,nbCols);
5964       }
5965
5966       PyObject *isEqualIfNotWhy(const DenseMatrix& other, double eps) const throw(INTERP_KERNEL::Exception)
5967       {
5968         std::string ret1;
5969         bool ret0=self->isEqualIfNotWhy(other,eps,ret1);
5970         PyObject *ret=PyTuple_New(2);
5971         PyObject *ret0Py=ret0?Py_True:Py_False;
5972         Py_XINCREF(ret0Py);
5973         PyTuple_SetItem(ret,0,ret0Py);
5974         PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
5975         return ret;
5976       }
5977
5978       DataArrayDouble *getData() throw(INTERP_KERNEL::Exception)
5979       {
5980         DataArrayDouble *ret(self->getData());
5981         if(ret)
5982           ret->incrRef();
5983         return ret;
5984       }
5985
5986       DenseMatrix *__add__(const DenseMatrix *other) throw(INTERP_KERNEL::Exception)
5987       {
5988         return MEDCoupling::DenseMatrix::Add(self,other);
5989       }
5990
5991       DenseMatrix *__sub__(const DenseMatrix *other) throw(INTERP_KERNEL::Exception)
5992       {
5993         return MEDCoupling::DenseMatrix::Substract(self,other);
5994       }
5995
5996       DenseMatrix *__mul__(const DenseMatrix *other) throw(INTERP_KERNEL::Exception)
5997       {
5998         return MEDCoupling::DenseMatrix::Multiply(self,other);
5999       }
6000
6001       DenseMatrix *__mul__(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception)
6002       {
6003         return MEDCoupling::DenseMatrix::Multiply(self,other);
6004       }
6005
6006       PyObject *___iadd___(PyObject *trueSelf, const DenseMatrix *other) throw(INTERP_KERNEL::Exception)
6007       {
6008         self->addEqual(other);
6009         Py_XINCREF(trueSelf);
6010         return trueSelf;
6011       }
6012
6013       PyObject *___isub___(PyObject *trueSelf, const DenseMatrix *other) throw(INTERP_KERNEL::Exception)
6014       {
6015         self->substractEqual(other);
6016         Py_XINCREF(trueSelf);
6017         return trueSelf;
6018       }
6019 #ifdef WITH_NUMPY
6020       PyObject *toNumPyMatrix() throw(INTERP_KERNEL::Exception) // not const. It is not a bug !
6021       {
6022         PyObject *obj(ToNumPyArrayUnderground<DataArrayDouble,double>(self->getData(),NPY_DOUBLE,"DataArrayDouble",self->getNumberOfRows(),self->getNumberOfCols()));
6023         return obj;
6024       }
6025 #endif
6026     }
6027   };
6028 }
6029
6030 %pythoncode %{
6031 def MEDCouplingUMeshReduce(self):
6032     return MEDCouplingStdReduceFunct,(MEDCouplingUMesh,((),(self.__getstate__()),))
6033 def MEDCouplingCMeshReduce(self):
6034     return MEDCouplingStdReduceFunct,(MEDCouplingCMesh,((),(self.__getstate__()),))
6035 def MEDCouplingIMeshReduce(self):
6036     return MEDCouplingStdReduceFunct,(MEDCouplingIMesh,((),(self.__getstate__()),))
6037 def MEDCouplingMappedExtrudedMeshReduce(self):
6038     return MEDCouplingStdReduceFunct,(MEDCouplingMappedExtrudedMesh,((),(self.__getstate__()),))
6039 def MEDCouplingCurveLinearMeshReduce(self):
6040     return MEDCouplingStdReduceFunct,(MEDCouplingCurveLinearMesh,((),(self.__getstate__()),))
6041 def MEDCoupling1SGTUMeshReduce(self):
6042     return MEDCouplingStdReduceFunct,(MEDCoupling1SGTUMesh,((),(self.__getstate__()),))
6043 def MEDCoupling1DGTUMeshReduce(self):
6044     return MEDCouplingStdReduceFunct,(MEDCoupling1DGTUMesh,((),(self.__getstate__()),))
6045 def MEDCouplingFieldDoubleReduce(self):
6046     self.checkConsistencyLight()
6047     d=(self.getTypeOfField(),self.getTimeDiscretization())
6048     return MEDCouplingStdReduceFunct,(MEDCouplingFieldDouble,(d,(self.__getstate__()),))
6049 def MEDCouplingFieldIntReduce(self):
6050     self.checkConsistencyLight()
6051     d=(self.getTypeOfField(),self.getTimeDiscretization())
6052     return MEDCouplingStdReduceFunct,(MEDCouplingFieldInt,(d,(self.__getstate__()),))
6053 def MEDCouplingFieldFloatReduce(self):
6054     self.checkConsistencyLight()
6055     d=(self.getTypeOfField(),self.getTimeDiscretization())
6056     return MEDCouplingStdReduceFunct,(MEDCouplingFieldFloat,(d,(self.__getstate__()),))
6057 %}
6058
6059 %pythoncode %{
6060 import os
6061 __filename=os.environ.get('PYTHONSTARTUP')
6062 if __filename and os.path.isfile(__filename):
6063   exec(open(__filename).read())
6064   pass
6065 %}