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