]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Indices are stored as mcIdType type instead of int to support switch to 64bits indexing
authoreap <eap@opencascade.com>
Tue, 22 Oct 2019 06:08:38 +0000 (09:08 +0300)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 20 Dec 2019 09:03:14 +0000 (10:03 +0100)
400 files changed:
MEDCouplingConfig.cmake.in
src/INTERP_KERNEL/BBTree.txx
src/INTERP_KERNEL/BBTreeDst.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/BBTreePts.txx
src/INTERP_KERNEL/Barycentric3DIntersectorP1P1.txx
src/INTERP_KERNEL/Bases/InterpKernelHashTable.hxx
src/INTERP_KERNEL/CMakeLists.txt
src/INTERP_KERNEL/CellModel.cxx
src/INTERP_KERNEL/CellModel.hxx
src/INTERP_KERNEL/ConvexIntersector.txx
src/INTERP_KERNEL/CurveIntersector.hxx
src/INTERP_KERNEL/CurveIntersector.txx
src/INTERP_KERNEL/CurveIntersectorP0P0.hxx
src/INTERP_KERNEL/CurveIntersectorP0P0.txx
src/INTERP_KERNEL/CurveIntersectorP0P1.hxx
src/INTERP_KERNEL/CurveIntersectorP0P1.txx
src/INTERP_KERNEL/CurveIntersectorP1P0.hxx
src/INTERP_KERNEL/CurveIntersectorP1P0.txx
src/INTERP_KERNEL/CurveIntersectorP1P1.hxx
src/INTERP_KERNEL/CurveIntersectorP1P1.txx
src/INTERP_KERNEL/CurveIntersectorP1P1PL.hxx
src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx
src/INTERP_KERNEL/DiameterCalculator.cxx
src/INTERP_KERNEL/DiameterCalculator.hxx
src/INTERP_KERNEL/DirectedBoundingBox.cxx
src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx
src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx
src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.cxx
src/INTERP_KERNEL/GaussPoints/InterpKernelGaussCoords.hxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DAbstractEdge.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.hxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.hxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.hxx
src/INTERP_KERNEL/Geometric2DIntersector.txx
src/INTERP_KERNEL/IntegralUniformIntersector.hxx
src/INTERP_KERNEL/IntegralUniformIntersector.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/InterpKernelCellSimplify.cxx
src/INTERP_KERNEL/InterpKernelCellSimplify.hxx
src/INTERP_KERNEL/InterpKernelMatrixTools.cxx
src/INTERP_KERNEL/InterpKernelMatrixTools.hxx
src/INTERP_KERNEL/InterpKernelUtilities.hxx
src/INTERP_KERNEL/Interpolation.hxx
src/INTERP_KERNEL/Interpolation.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/Interpolation1D0D.cxx
src/INTERP_KERNEL/Interpolation1D0D.hxx
src/INTERP_KERNEL/Interpolation1D0D.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/Interpolation2D1D.hxx
src/INTERP_KERNEL/Interpolation2D1D.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/Interpolation2D3D.hxx
src/INTERP_KERNEL/Interpolation2D3D.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/Interpolation3D.hxx [changed mode: 0644->0755]
src/INTERP_KERNEL/Interpolation3D.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/Interpolation3D1D.cxx
src/INTERP_KERNEL/Interpolation3D1D.hxx [changed mode: 0644->0755]
src/INTERP_KERNEL/Interpolation3D1D.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/InterpolationCC.hxx
src/INTERP_KERNEL/InterpolationCC.txx
src/INTERP_KERNEL/InterpolationCU.hxx
src/INTERP_KERNEL/InterpolationCU.txx
src/INTERP_KERNEL/InterpolationCurve.hxx [changed mode: 0644->0755]
src/INTERP_KERNEL/InterpolationCurve.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/InterpolationOptions.cxx
src/INTERP_KERNEL/InterpolationOptions.hxx
src/INTERP_KERNEL/InterpolationPlanar.hxx [changed mode: 0644->0755]
src/INTERP_KERNEL/InterpolationPlanar.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/InterpolationUtils.hxx
src/INTERP_KERNEL/Intersector3D.txx
src/INTERP_KERNEL/Intersector3DP0P0.hxx
src/INTERP_KERNEL/Intersector3DP0P0.txx
src/INTERP_KERNEL/Intersector3DP0P1.hxx
src/INTERP_KERNEL/Intersector3DP0P1.txx
src/INTERP_KERNEL/Intersector3DP1P0.hxx
src/INTERP_KERNEL/Intersector3DP1P0.txx
src/INTERP_KERNEL/Intersector3DP1P0Bary.hxx
src/INTERP_KERNEL/Intersector3DP1P0Bary.txx
src/INTERP_KERNEL/Intersector3DP1P1.hxx
src/INTERP_KERNEL/Intersector3DP1P1.txx
src/INTERP_KERNEL/IntersectorCU.hxx
src/INTERP_KERNEL/IntersectorCU.txx
src/INTERP_KERNEL/IntersectorCU3D.txx
src/INTERP_KERNEL/MCIdType.hxx [new file with mode: 0644]
src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.hxx
src/INTERP_KERNEL/MappedBarycentric2DIntersectorP1P1.txx
src/INTERP_KERNEL/MappedBarycentric3DIntersectorP1P1.hxx
src/INTERP_KERNEL/MappedBarycentric3DIntersectorP1P1.txx
src/INTERP_KERNEL/MeshElement.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/OrientationInverter.cxx
src/INTERP_KERNEL/OrientationInverter.hxx
src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.hxx
src/INTERP_KERNEL/Planar2D1DIntersectorP0P0.txx
src/INTERP_KERNEL/PlanarIntersector.hxx
src/INTERP_KERNEL/PlanarIntersector.txx
src/INTERP_KERNEL/PlanarIntersectorP0P0.hxx
src/INTERP_KERNEL/PlanarIntersectorP0P0.txx
src/INTERP_KERNEL/PlanarIntersectorP0P1.hxx
src/INTERP_KERNEL/PlanarIntersectorP0P1.txx
src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.hxx
src/INTERP_KERNEL/PlanarIntersectorP0P1Bary.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/PlanarIntersectorP0P1PL.hxx
src/INTERP_KERNEL/PlanarIntersectorP0P1PL.txx
src/INTERP_KERNEL/PlanarIntersectorP1P0.hxx
src/INTERP_KERNEL/PlanarIntersectorP1P0.txx
src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.hxx
src/INTERP_KERNEL/PlanarIntersectorP1P0Bary.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/PlanarIntersectorP1P0PL.hxx
src/INTERP_KERNEL/PlanarIntersectorP1P0PL.txx
src/INTERP_KERNEL/PlanarIntersectorP1P1.hxx
src/INTERP_KERNEL/PlanarIntersectorP1P1.txx
src/INTERP_KERNEL/PlanarIntersectorP1P1PL.hxx
src/INTERP_KERNEL/PlanarIntersectorP1P1PL.txx
src/INTERP_KERNEL/PointLocator2DIntersector.txx
src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.hxx
src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx
src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.hxx
src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx
src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.hxx
src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx
src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.hxx
src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx
src/INTERP_KERNEL/PointLocatorAlgos.txx
src/INTERP_KERNEL/PolygonAlgorithms.txx
src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.hxx
src/INTERP_KERNEL/Polyhedron3D2DIntersectorP0P0.txx
src/INTERP_KERNEL/PolyhedronIntersectorP0P1.txx
src/INTERP_KERNEL/PolyhedronIntersectorP1P0.txx
src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/PolyhedronIntersectorP1P1.txx [changed mode: 0644->0755]
src/INTERP_KERNEL/SplitterTetra.cxx
src/INTERP_KERNEL/SplitterTetra.hxx
src/INTERP_KERNEL/SplitterTetra.txx
src/INTERP_KERNEL/TargetIntersector.hxx
src/INTERP_KERNEL/TransformedTriangleMath.cxx
src/INTERP_KERNEL/TriangulationIntersector.txx
src/INTERP_KERNEL/VolSurfFormulae.hxx
src/INTERP_KERNEL/VolSurfUser.cxx
src/INTERP_KERNEL/VolSurfUser.hxx
src/INTERP_KERNEL/VolSurfUser.txx
src/INTERP_KERNELTest/InterpolationPlanarTestSuite.hxx
src/INTERP_KERNELTest/MeshTestToolkit.hxx
src/INTERP_KERNELTest/MeshTestToolkit.txx
src/INTERP_KERNELTest/PerfTest.cxx
src/INTERP_KERNELTest/ThreeDSurfProjectionTest.cxx
src/INTERP_KERNELTest/UnitTetra3D2DIntersectionTest.cxx
src/INTERP_KERNELTest/UnitTetraIntersectionBaryTest.cxx
src/MEDCoupling/CMakeLists.txt
src/MEDCoupling/MCType.hxx
src/MEDCoupling/MEDCoupling1GTUMesh.cxx
src/MEDCoupling/MEDCoupling1GTUMesh.hxx
src/MEDCoupling/MEDCoupling1GTUMesh.txx
src/MEDCoupling/MEDCouplingAMRAttribute.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingAMRAttribute.hxx
src/MEDCoupling/MEDCouplingCMesh.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingCMesh.hxx
src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingCartesianAMRMesh.hxx
src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingCurveLinearMesh.hxx
src/MEDCoupling/MEDCouplingDefinitionTime.cxx
src/MEDCoupling/MEDCouplingField.cxx
src/MEDCoupling/MEDCouplingField.hxx
src/MEDCoupling/MEDCouplingFieldDiscretization.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingFieldDiscretization.hxx
src/MEDCoupling/MEDCouplingFieldDouble.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingFieldDouble.hxx
src/MEDCoupling/MEDCouplingFieldFloat.cxx
src/MEDCoupling/MEDCouplingFieldInt.cxx
src/MEDCoupling/MEDCouplingFieldT.hxx
src/MEDCoupling/MEDCouplingFieldT.txx
src/MEDCoupling/MEDCouplingFieldTemplate.cxx
src/MEDCoupling/MEDCouplingFieldTemplate.hxx
src/MEDCoupling/MEDCouplingGaussLocalization.cxx
src/MEDCoupling/MEDCouplingGaussLocalization.hxx
src/MEDCoupling/MEDCouplingIMesh.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingIMesh.hxx
src/MEDCoupling/MEDCouplingMap.cxx
src/MEDCoupling/MEDCouplingMap.hxx
src/MEDCoupling/MEDCouplingMap.txx
src/MEDCoupling/MEDCouplingMappedExtrudedMesh.cxx
src/MEDCoupling/MEDCouplingMappedExtrudedMesh.hxx
src/MEDCoupling/MEDCouplingMatrix.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingMatrix.hxx
src/MEDCoupling/MEDCouplingMemArray.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingMemArray.hxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingMemArray.txx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingMemArrayChar.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingMemArrayFloat.cxx
src/MEDCoupling/MEDCouplingMesh.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingMesh.hxx
src/MEDCoupling/MEDCouplingMultiFields.cxx
src/MEDCoupling/MEDCouplingMultiFields.hxx
src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.hxx
src/MEDCoupling/MEDCouplingNormalizedCartesianMesh.txx
src/MEDCoupling/MEDCouplingNormalizedUnstructuredMesh.hxx
src/MEDCoupling/MEDCouplingNormalizedUnstructuredMesh.txx
src/MEDCoupling/MEDCouplingPartDefinition.cxx
src/MEDCoupling/MEDCouplingPartDefinition.hxx
src/MEDCoupling/MEDCouplingPointSet.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingPointSet.hxx
src/MEDCoupling/MEDCouplingRemapper.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingRemapper.hxx
src/MEDCoupling/MEDCouplingSkyLineArray.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingSkyLineArray.hxx
src/MEDCoupling/MEDCouplingStructuredMesh.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingStructuredMesh.hxx
src/MEDCoupling/MEDCouplingTimeDiscretization.cxx
src/MEDCoupling/MEDCouplingTimeDiscretization.hxx
src/MEDCoupling/MEDCouplingTimeDiscretization.txx
src/MEDCoupling/MEDCouplingTraits.hxx
src/MEDCoupling/MEDCouplingUMesh.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingUMesh.hxx
src/MEDCoupling/MEDCouplingUMesh.txx
src/MEDCoupling/MEDCouplingUMesh_internal.cxx [changed mode: 0644->0755]
src/MEDCoupling/MEDCouplingUMesh_internal.hxx
src/MEDCoupling/MEDCouplingUMesh_intersection.cxx
src/MEDCoupling/MEDCouplingVoronoi.cxx [changed mode: 0644->0755]
src/MEDCoupling/Test/MEDCouplingBasicsTest.hxx
src/MEDCoupling/Test/MEDCouplingBasicsTest0.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTestData1.hxx
src/MEDCoupling/Test/MEDCouplingBasicsTestInterp.cxx
src/MEDCoupling/Test/MEDCouplingExamplesTest.cxx
src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx
src/MEDCoupling_Swig/CMakeLists.txt
src/MEDCoupling_Swig/DataArrayInt.i [new file with mode: 0644]
src/MEDCoupling_Swig/MEDCoupling.i
src/MEDCoupling_Swig/MEDCouplingBasicsTest2.py
src/MEDCoupling_Swig/MEDCouplingBasicsTest3.py
src/MEDCoupling_Swig/MEDCouplingBasicsTest4.py
src/MEDCoupling_Swig/MEDCouplingBasicsTest5.py
src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py [new file with mode: 0644]
src/MEDCoupling_Swig/MEDCouplingCommon.i
src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.hxx
src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i
src/MEDCoupling_Swig/MEDCouplingFieldDiscretization.i
src/MEDCoupling_Swig/MEDCouplingFinalize.i
src/MEDCoupling_Swig/MEDCouplingMemArray.i
src/MEDCoupling_Swig/MEDCouplingNumPyTest.py
src/MEDCoupling_Swig/MEDCouplingPickleTest.py
src/MEDCoupling_Swig/MEDCouplingRefCountObject.i
src/MEDCoupling_Swig/MEDCouplingRemapper.i
src/MEDCoupling_Swig/MEDCouplingRemapperCommon.i
src/MEDCoupling_Swig/MEDCouplingRemapperTest.py
src/MEDCoupling_Swig/MEDCouplingTimeDiscretization.i
src/MEDCoupling_Swig/MEDCouplingTypemaps.i
src/MEDCoupling_Swig/UsersGuideExamplesTest_numpy.py
src/MEDCoupling_Swig/tests.set
src/MEDLoader/CMakeLists.txt
src/MEDLoader/MEDFileBasis.hxx
src/MEDLoader/MEDFileBlowStrEltUp.cxx
src/MEDLoader/MEDFileData.cxx
src/MEDLoader/MEDFileEquivalence.cxx
src/MEDLoader/MEDFileField.cxx
src/MEDLoader/MEDFileField.hxx
src/MEDLoader/MEDFileField.txx
src/MEDLoader/MEDFileField1TS.cxx
src/MEDLoader/MEDFileField1TS.hxx
src/MEDLoader/MEDFileFieldGlobs.cxx
src/MEDLoader/MEDFileFieldGlobs.hxx
src/MEDLoader/MEDFileFieldInternal.cxx
src/MEDLoader/MEDFileFieldInternal.hxx
src/MEDLoader/MEDFileFieldMultiTS.cxx
src/MEDLoader/MEDFileFieldMultiTS.hxx
src/MEDLoader/MEDFileFieldOverView.cxx
src/MEDLoader/MEDFileFieldOverView.hxx
src/MEDLoader/MEDFileJoint.cxx
src/MEDLoader/MEDFileJoint.hxx
src/MEDLoader/MEDFileMesh.cxx
src/MEDLoader/MEDFileMesh.hxx
src/MEDLoader/MEDFileMeshElt.cxx
src/MEDLoader/MEDFileMeshElt.hxx
src/MEDLoader/MEDFileMeshLL.cxx
src/MEDLoader/MEDFileMeshLL.hxx
src/MEDLoader/MEDFileMeshSupport.cxx
src/MEDLoader/MEDFileMeshSupport.hxx
src/MEDLoader/MEDFileParameter.cxx
src/MEDLoader/MEDFileStructureElement.cxx
src/MEDLoader/MEDFileStructureElement.hxx
src/MEDLoader/MEDFileUtilities.cxx
src/MEDLoader/MEDLoader.cxx
src/MEDLoader/MEDLoader.hxx
src/MEDLoader/MEDLoaderBase.cxx
src/MEDLoader/MEDLoaderBase.hxx
src/MEDLoader/MEDLoaderNS.hxx
src/MEDLoader/SauvMedConvertor.cxx
src/MEDLoader/SauvMedConvertor.hxx
src/MEDLoader/SauvReader.cxx
src/MEDLoader/SauvWriter.cxx
src/MEDLoader/SauvWriter.hxx
src/MEDLoader/Swig/CMakeLists.txt
src/MEDLoader/Swig/MEDLoader.i
src/MEDLoader/Swig/MEDLoaderCommon.i
src/MEDLoader/Swig/MEDLoaderTest3.py
src/MEDLoader/Swig/MEDLoaderTypemaps.i
src/MEDLoader/Test/MEDLoaderTest.cxx
src/MEDLoader/Test/SauvLoaderTest.cxx
src/MEDPartitioner/CMakeLists.txt
src/MEDPartitioner/MEDPARTITIONER_ConnectZone.cxx
src/MEDPartitioner/MEDPARTITIONER_ConnectZone.hxx
src/MEDPartitioner/MEDPARTITIONER_Graph.cxx
src/MEDPartitioner/MEDPARTITIONER_Graph.hxx
src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx
src/MEDPartitioner/MEDPARTITIONER_JointFinder.hxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollection.cxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedAsciiDriver.cxx
src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx
src/MEDPartitioner/MEDPARTITIONER_MetisGraph.cxx
src/MEDPartitioner/MEDPARTITIONER_PTScotchGraph.cxx
src/MEDPartitioner/MEDPARTITIONER_ParMetisGraph.cxx
src/MEDPartitioner/MEDPARTITIONER_ParaDomainSelector.cxx
src/MEDPartitioner/MEDPARTITIONER_ParaDomainSelector.hxx
src/MEDPartitioner/MEDPARTITIONER_ParallelTopology.cxx
src/MEDPartitioner/MEDPARTITIONER_ParallelTopology.hxx
src/MEDPartitioner/MEDPARTITIONER_ScotchGraph.cxx
src/MEDPartitioner/MEDPARTITIONER_Topology.hxx
src/MEDPartitioner/MEDPARTITIONER_UserGraph.cxx
src/MEDPartitioner/MEDPARTITIONER_UserGraph.hxx
src/MEDPartitioner/MEDPARTITIONER_Utils.cxx
src/MEDPartitioner/MEDPARTITIONER_Utils.hxx
src/MEDPartitioner/MEDPARTITIONER_UtilsPara.cxx
src/MEDPartitioner/Test/MEDPARTITIONERTest.cxx
src/MEDPartitioner_Swig/CMakeLists.txt
src/ParaMEDLoader/CMakeLists.txt
src/ParaMEDLoader/ParaMEDFileMesh.cxx
src/ParaMEDLoader/ParaMEDLoader.cxx
src/ParaMEDMEM/BlockTopology.cxx
src/ParaMEDMEM/BlockTopology.hxx
src/ParaMEDMEM/CMakeLists.txt
src/ParaMEDMEM/CommInterface.hxx
src/ParaMEDMEM/ComponentTopology.hxx
src/ParaMEDMEM/DisjointDEC.cxx
src/ParaMEDMEM/ElementLocator.cxx
src/ParaMEDMEM/ElementLocator.hxx
src/ParaMEDMEM/ExplicitCoincidentDEC.cxx
src/ParaMEDMEM/ExplicitMapping.cxx
src/ParaMEDMEM/ExplicitMapping.hxx
src/ParaMEDMEM/ExplicitTopology.cxx
src/ParaMEDMEM/ExplicitTopology.hxx
src/ParaMEDMEM/InterpKernelDEC.cxx
src/ParaMEDMEM/InterpolationMatrix.cxx
src/ParaMEDMEM/InterpolationMatrix.hxx
src/ParaMEDMEM/MPIAccess.cxx
src/ParaMEDMEM/MPIAccess.hxx
src/ParaMEDMEM/MPIAccessDEC.cxx
src/ParaMEDMEM/MPIProcessorGroup.cxx
src/ParaMEDMEM/MxN_Mapping.cxx
src/ParaMEDMEM/MxN_Mapping.hxx
src/ParaMEDMEM/OverlapDEC.cxx
src/ParaMEDMEM/OverlapElementLocator.cxx
src/ParaMEDMEM/OverlapElementLocator.hxx
src/ParaMEDMEM/OverlapInterpolationMatrix.cxx
src/ParaMEDMEM/OverlapInterpolationMatrix.hxx
src/ParaMEDMEM/OverlapMapping.cxx
src/ParaMEDMEM/OverlapMapping.hxx
src/ParaMEDMEM/ParaFIELD.cxx
src/ParaMEDMEM/ParaFIELD.hxx
src/ParaMEDMEM/ParaIdType.hxx [new file with mode: 0644]
src/ParaMEDMEM/ParaMESH.cxx
src/ParaMEDMEM/ParaMESH.hxx
src/ParaMEDMEM/ProcessorGroup.hxx
src/ParaMEDMEM/StructuredCoincidentDEC.cxx
src/ParaMEDMEM/Topology.hxx
src/ParaMEDMEMTest/ParaMEDMEMTestMPI2_1.cxx
src/ParaMEDMEMTest/ParaMEDMEMTestMPI2_2.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_BlockTopology.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_FabienAPI.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_ICoco.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_OverlapDEC.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_StructuredCoincidentDEC.cxx
src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx
src/ParaMEDMEM_Swig/CMakeLists.txt
src/ParaMEDMEM_Swig/ParaMEDMEM.i
src/ParaMEDMEM_Swig/ParaMEDMEMCommon.i
src/PyWrapping/CMakeLists.txt
src/PyWrapping/medcoupling.i
src/RENUMBER/CMakeLists.txt
src/RENUMBER/RENUMBER_BOOSTRenumbering.cxx
src/RENUMBER/RENUMBER_BOOSTRenumbering.hxx
src/RENUMBER/RENUMBER_METISRenumbering.cxx
src/RENUMBER/RENUMBER_METISRenumbering.hxx
src/RENUMBER/RENUMBER_Renumbering.hxx
src/RENUMBER/renumbering.cxx
src/RENUMBER_Swig/CMakeLists.txt
src/RENUMBER_Swig/MEDRenumber.i
src/RENUMBER_Swig/MEDRenumberImpl.i

index f691656a1f6352f7e661e986f84611df286f10be..42f18a4fe0433d1b1aa84f23809c990a57752ade 100644 (file)
@@ -54,6 +54,7 @@ SET(MEDCOUPLING_USE_MPI            @MEDCOUPLING_USE_MPI@)
 SET(MEDCOUPLING_BUILD_DOC      @MEDCOUPLING_BUILD_DOC@)
 SET(MEDCOUPLING_BUILD_TESTS    @MEDCOUPLING_BUILD_TESTS@)
 SET(MEDCOUPLING_BUILD_GUI      @MEDCOUPLING_BUILD_GUI@)
+SET(MEDCOUPLING_USE_64BIT_IDS  @MEDCOUPLING_USE_64BIT_IDS@)
 
 # Advanced options
 
index b49c93268eeed8039e5c97debae4473f1fdb70ff..c312a646b06c9de6e7d002ffffcc38da33de9255 100644 (file)
@@ -101,9 +101,9 @@ public:
     new_elems_right.reserve(nbelems/2+1);
     double max_left = -std::numeric_limits<double>::max();
     double min_right=  std::numeric_limits<double>::max();
-    for (int i=0; i<nbelems;i++)
+    for (ConnType i=0; i<nbelems;i++)
       {
-        int elem;
+        ConnType elem;
         if (elems!=0)
           elem= elems[i];
         else
@@ -131,11 +131,11 @@ public:
     tmp=0;
     if(!new_elems_left.empty())
       tmp=&(new_elems_left[0]);
-    _left=new BBTree(bbs, tmp, level+1, (int)new_elems_left.size(),_epsilon);
+    _left=new BBTree(bbs, tmp, level+1, (ConnType)new_elems_left.size(),_epsilon);
     tmp=0;
     if(!new_elems_right.empty())
       tmp=&(new_elems_right[0]);
-    _right=new BBTree(bbs, tmp, level+1, (int)new_elems_right.size(),_epsilon);
+    _right=new BBTree(bbs, tmp, level+1, (ConnType)new_elems_right.size(),_epsilon);
   
   }
 
@@ -160,7 +160,7 @@ public:
     //  terminal node : return list of elements intersecting bb
     if (_terminal)
       {
-        for (int i=0; i<_nbelems; i++)
+        for (ConnType i=0; i<_nbelems; i++)
           {
             const double* const  bb_ptr=_bb+_elems[i]*2*dim;
             bool intersects = true;
@@ -197,13 +197,13 @@ public:
   /*!
    * This method is very close to getIntersectingElems except that it returns number of elems instead of elems themselves.
    */
-  int getNbOfIntersectingElems(const double* bb)
+  ConnType getNbOfIntersectingElems(const double* bb)
   {
     //  terminal node : return list of elements intersecting bb
-    int ret(0);
+    ConnType ret(0);
     if (_terminal)
       {
-        for (int i=0; i<_nbelems; i++)
+        for (ConnType i=0; i<_nbelems; i++)
           {
             const double* const  bb_ptr=_bb+_elems[i]*2*dim;
             bool intersects = true;
@@ -272,7 +272,7 @@ public:
 
 
 
-  int size()
+  ConnType size()
   {
     if (_terminal) return _nbelems;
     return _left->size()+_right->size();
old mode 100644 (file)
new mode 100755 (executable)
index 70753de..3862e1b
@@ -38,20 +38,20 @@ private:
   double _max_left;
   double _min_right;
   const double *_bb;
-  std::vector<int> _elems;
+  std::vector<mcIdType> _elems;
   double  *_terminal;
-  int _nbelems;
+  mcIdType _nbelems;
 
   static const int MIN_NB_ELEMS=15;
   static const int MAX_LEVEL=20;
 public:
-  BBTreeDst(const double* bbs, int* elems, int level, int nbelems):
+  BBTreeDst(const double* bbs, mcIdType* elems, int level, mcIdType nbelems):
     _left(0),_right(0),_level(level),_bb(bbs),_terminal(0),_nbelems(nbelems)
   {
     if((nbelems < MIN_NB_ELEMS || level> MAX_LEVEL))
       _terminal=new double[2*dim];
     _elems.resize(nbelems);
-    for (int i=0; i<nbelems; i++)
+    for (mcIdType i=0; i<nbelems; i++)
       _elems[i]=elems?elems[i]:i;
     if(_terminal)
       {
@@ -59,21 +59,21 @@ public:
         return ;
       }
     double *nodes=new double[nbelems];
-    for (int i=0; i<nbelems; i++)
+    for (mcIdType i=0; i<nbelems; i++)
       nodes[i]=bbs[_elems[i]*dim*2+(level%dim)*2];
     std::nth_element<double*>(nodes, nodes+nbelems/2, nodes+nbelems);
     double median = *(nodes+nbelems/2);
     delete [] nodes;
-    std::vector<int> new_elems_left;
-    std::vector<int> new_elems_right;
+    std::vector<mcIdType> new_elems_left;
+    std::vector<mcIdType> new_elems_right;
  
     new_elems_left.reserve(nbelems/2+1);
     new_elems_right.reserve(nbelems/2+1);
     double max_left = -std::numeric_limits<double>::max();
     double min_right=  std::numeric_limits<double>::max();
-    for(int i=0; i<nbelems;i++)
+    for(mcIdType i=0; i<nbelems;i++)
       {
-        int elem;
+        mcIdType elem;
         if (elems!=0)
           elem= elems[i];
         else
@@ -94,15 +94,15 @@ public:
       }
     _max_left=max_left;
     _min_right=min_right;
-    int *tmp;
+    mcIdType *tmp;
     tmp=0;
     if(!new_elems_left.empty())
       tmp=&(new_elems_left[0]);
-    _left=new BBTreeDst(bbs, tmp, level+1, (int)new_elems_left.size());
+    _left=new BBTreeDst(bbs, tmp, level+1, ToIdType(new_elems_left.size()));
     tmp=0;
     if(!new_elems_right.empty())
       tmp=&(new_elems_right[0]);
-    _right=new BBTreeDst(bbs, tmp, level+1, (int)new_elems_right.size());
+    _right=new BBTreeDst(bbs, tmp, level+1, ToIdType(new_elems_right.size()));
   }
 
   ~BBTreeDst()
@@ -112,11 +112,11 @@ public:
     delete [] _terminal;
   }
 
-  void getElemsWhoseMinDistanceToPtSmallerThan(const double *pt, double minOfMaxDstsSq, std::vector<int>& elems) const
+  void getElemsWhoseMinDistanceToPtSmallerThan(const double *pt, double minOfMaxDstsSq, std::vector<mcIdType>& elems) const
   {
     if(_terminal)
       {
-        for(int i=0; i<_nbelems; i++)
+        for(mcIdType i=0; i<_nbelems; i++)
           {
             if(GetMinDistanceFromBBoxToPt(_bb+_elems[i]*2*dim,pt)<minOfMaxDstsSq)
               elems.push_back(_elems[i]);
@@ -144,7 +144,7 @@ public:
       {
         if(GetMinDistanceFromBBoxToPt(_terminal,pt)>minOfMaxDstsSq)//min it is not a bug
           return ;
-        for(int i=0; i<_nbelems; i++)
+        for(mcIdType i=0; i<_nbelems; i++)
           {
             minOfMaxDstsSq=std::min(minOfMaxDstsSq,GetMaxDistanceFromBBoxToPt(_bb+_elems[i]*2*dim,pt));
           }
@@ -168,7 +168,7 @@ public:
         _terminal[2*j]=std::numeric_limits<double>::max();
         _terminal[2*j+1]=-std::numeric_limits<double>::max();
       }
-    for(int i=0;i<_nbelems;i++)
+    for(mcIdType i=0;i<_nbelems;i++)
       {
         for(int j=0;j<dim;j++)
           {
@@ -204,7 +204,7 @@ public:
         for (int idim=0; idim<dim; idim++)
           {
             double val1=pt[idim]-bbox[idim*2],val2=pt[idim]-bbox[idim*2+1];
-            char pos=(( (0.<val1)-(val1<0.) )+( (0.<val2)-(val2<0.) ))/2;// sign(val) = (0.<val)-(val<0.)
+            char pos=static_cast<char>((( (0.<val1)-(val1<0.) )+( (0.<val2)-(val2<0.) ))/2);// sign(val) = (0.<val)-(val<0.)
             if(pos!=0)
               {
                 double x=pos==1?val2:val1;
index 76b2a98f2a3d1d5e8629739bb7a38636c81d5ac5..26cdb33e32b64d94094c3199db5fec551f9f1c9b 100644 (file)
@@ -90,9 +90,9 @@ public:
     new_elems_right.reserve(nbelems/2+1);
     double max_left = -std::numeric_limits<double>::max();
     double min_right=  std::numeric_limits<double>::max();
-    for(int i=0;i<nbelems;i++)
+    for(ConnType i=0;i<nbelems;i++)
       {
-        int elem;
+        ConnType elem;
         if(elems!=0)
           elem= elems[i];
         else
@@ -115,11 +115,11 @@ public:
     tmp=0;
     if(!new_elems_left.empty())
       tmp=&(new_elems_left[0]);
-    _left=new BBTreePts(pts, tmp, level+1, (int)new_elems_left.size(),_epsilon);
+    _left=new BBTreePts(pts, tmp, level+1, (ConnType)new_elems_left.size(),_epsilon);
     tmp=0;
     if(!new_elems_right.empty())
       tmp=&(new_elems_right[0]);
-    _right=new BBTreePts(pts, tmp, level+1, (int)new_elems_right.size(),_epsilon);
+    _right=new BBTreePts(pts, tmp, level+1, (ConnType)new_elems_right.size(),_epsilon);
   }
 
 
@@ -164,7 +164,7 @@ public:
       return _left->getElementsAroundPoint2(xx,threshold,elem);
     if(xx[_level%dim]-s>_max_left)
       return _right->getElementsAroundPoint2(xx,threshold,elem);
-    int eleml,elemr;
+    ConnType eleml,elemr;
     double retl=_left->getElementsAroundPoint2(xx,threshold,eleml);
     double retr=_right->getElementsAroundPoint2(xx,threshold,elemr);
     if(retl<retr)
@@ -211,7 +211,7 @@ public:
     _right->getElementsAroundPoint(xx,elems);
   }
   
-  int size() const
+  ConnType size() const
   {
     if(_terminal)
       return _nbelems;
index 6b0bdf5cf13567ef4527853de4953f9642a1e847..e8d227ed421ca69a28aba6b84544a703e471ba94 100644 (file)
@@ -56,9 +56,9 @@ namespace INTERP_KERNEL
     std::vector<double> CoordsT;
     const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
     Intersector3DP1P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    std::size_t nbOfNodesT=CoordsT.size()/SPACEDIM;
     const double *coordsS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
-    for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+    for(std::size_t nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
       {
         typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
         if(!resRow.empty())
@@ -72,7 +72,7 @@ namespace INTERP_KERNEL
             //
             std::vector<ConnType> connOfCurCellS;
             Intersector3DP1P1<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) )
+            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],ToConnType(connOfCurCellS.size()),coordsS,cmTypeS,_precision) )
               {
                 double resLoc[4];
                 std::vector<double> localCoordsS;
index 72938a4ef64880a5d3fc72f1f3977f5eaa7f74fc..860dd3f9a84f335c3c3823bc9b44d94f6c645d43 100644 (file)
@@ -195,22 +195,22 @@ namespace INTERP_KERNEL
   // Note: assumes long is at least 32 bits.
   enum { _S_num_primes = 28 };
 
-  static const unsigned long __stl_prime_list[_S_num_primes] =
+  static const unsigned long long __stl_prime_list[_S_num_primes] =
     {
-      53ul,         97ul,         193ul,       389ul,       769ul,
-      1543ul,       3079ul,       6151ul,      12289ul,     24593ul,
-      49157ul,      98317ul,      196613ul,    393241ul,    786433ul,
-      1572869ul,    3145739ul,    6291469ul,   12582917ul,  25165843ul,
-      50331653ul,   100663319ul,  201326611ul, 402653189ul, 805306457ul,
-      1610612741ul, 3221225473ul, 4294967291ul
+      53ull,         97ull,         193ull,       389ull,       769ull,
+      1543ull,       3079ull,       6151ull,      12289ull,     24593ull,
+      49157ull,      98317ull,      196613ull,    393241ull,    786433ull,
+      1572869ull,    3145739ull,    6291469ull,   12582917ull,  25165843ull,
+      50331653ull,   100663319ull,  201326611ull, 402653189ull, 805306457ull,
+      1610612741ull, 3221225473ull, 4294967291ull
     };
 
-  inline unsigned long
-  __stl_next_prime(unsigned long __n)
+  inline unsigned long long
+  __stl_next_prime(unsigned long long __n)
   {
-    const unsigned long* __first = __stl_prime_list;
-    const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
-    const unsigned long* pos = std::lower_bound(__first, __last, __n);
+    const unsigned long long* __first = __stl_prime_list;
+    const unsigned long long* __last = __stl_prime_list + (int)_S_num_primes;
+    const unsigned long long* pos = std::lower_bound(__first, __last, __n);
     return pos == __last ? *(__last - 1) : *pos;
   }
 
@@ -497,7 +497,7 @@ namespace INTERP_KERNEL
     void clear();
 
   private:
-    size_type _M_next_size(size_type __n) const { return __stl_next_prime(__n); }
+    size_type _M_next_size(size_type __n) const { return static_cast<size_type>(__stl_next_prime(__n)); }
 
     void _M_initialize_buckets(size_type __n)
     {
index 4b70eceba55bc0c49a5feb4c2b955b3164842a9f..6cf3b22ba012fccae549357315e5aeba9d3dc7a9 100644 (file)
@@ -72,6 +72,10 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/GaussPoints
   )
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 SET(PLATFORM_MMAP)
 IF(NOT WIN32)
   SET(PLATFORM_MMAP "-D_POSIX_MAPPED_FILES")
index 585675205c19909ae7fb70688c7effa760b7fb05..cf71d3a61eadc5e3cc4e65f1fc513d7b330a1842 100644 (file)
@@ -449,29 +449,29 @@ namespace INTERP_KERNEL
   /*!
    * Equivalent to getNumberOfSons except that this method deals with dynamic type.
    */
-  unsigned CellModel::getNumberOfSons2(const int *conn, int lgth) const
+  unsigned CellModel::getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const
   {
     if(!isDynamic())
       return getNumberOfSons();
     if(_dim==2)
       {
         if(_type==NORM_POLYGON)
-          return lgth;
+          return FromIdType<unsigned>(lgth);
         else
-          return lgth/2;
+          return FromIdType<unsigned>(lgth/2);
       }
     else if(_dim==1)
-      return lgth;//NORM_POLYL
+      return FromIdType<unsigned>(lgth);//NORM_POLYL
     else
-      return std::count(conn,conn+lgth,-1)+1;
+      return (unsigned)std::count(conn,conn+lgth,-1)+1;
   }
 
-  unsigned CellModel::getNumberOfEdgesIn3D(const int *conn, int lgth) const
+  unsigned CellModel::getNumberOfEdgesIn3D(const mcIdType *conn, mcIdType lgth) const
   {
     if(!isDynamic())
       return _nb_of_little_sons;
     else//polyhedron
-      return (lgth-std::count(conn,conn+lgth,-1))/2;
+      return FromIdType<unsigned>(lgth-ToIdType(std::count(conn,conn+lgth,-1)/2));
   }
   
   /*!
@@ -549,7 +549,7 @@ namespace INTERP_KERNEL
   /*!
    * \b WARNING this method do not manage correctly types that return true at the call of isDynamic. Use fillSonCellNodalConnectivity2 instead.
    */
-  unsigned CellModel::fillSonCellNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn) const
+  unsigned CellModel::fillSonCellNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn) const
   {
     unsigned nbOfTurnLoop=_nb_of_sons_con[sonId];
     const unsigned *sonConn=_sons_con[sonId];
@@ -558,7 +558,7 @@ namespace INTERP_KERNEL
     return nbOfTurnLoop;
   }
 
-  unsigned CellModel::fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const
+  unsigned CellModel::fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const
   {
     typeOfSon=getSonType2(sonId);
     if(!isDynamic())
@@ -583,15 +583,15 @@ namespace INTERP_KERNEL
           }
         else if(_dim==3)
           {//polyedron
-            const int *where=nodalConn;
+            const mcIdType *where=nodalConn;
             for(int i=0;i<sonId;i++)
               {
                 where=std::find(where,nodalConn+lgth,-1);
                 where++;
               }
-            const int *where2=std::find(where,nodalConn+lgth,-1);
+            const mcIdType *where2=std::find(where,nodalConn+lgth,-1);
             std::copy(where,where2,sonNodalConn);
-            return where2-where;
+            return (unsigned)(where2-where);
           }
         else
           throw INTERP_KERNEL::Exception("CellModel::fillSonCellNodalConnectivity2 : no sons on NORM_POLYL !");
@@ -601,7 +601,7 @@ namespace INTERP_KERNEL
   /*!
    * Equivalent to CellModel::fillSonCellNodalConnectivity2 except for HEXA8 where the order of sub faces is not has MED file numbering for transformation HEXA8->HEXA27
    */
-  unsigned CellModel::fillSonCellNodalConnectivity4(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const
+  unsigned CellModel::fillSonCellNodalConnectivity4(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const
   {
     if(_type==NORM_HEXA8)
       {
@@ -612,7 +612,7 @@ namespace INTERP_KERNEL
       return fillSonCellNodalConnectivity2(sonId,nodalConn,lgth,sonNodalConn,typeOfSon);
   }
 
-  unsigned CellModel::fillSonEdgesNodalConnectivity3D(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const
+  unsigned CellModel::fillSonEdgesNodalConnectivity3D(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const
   {
     if(!isDynamic())
       {
@@ -639,7 +639,7 @@ namespace INTERP_KERNEL
   /*!
    * \sa getNumberOfMicroEdges
    */
-  unsigned CellModel::fillMicroEdgeNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn, NormalizedCellType& typeOfSon) const
+  unsigned CellModel::fillMicroEdgeNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const
   {
     if(isQuadratic())
       {
@@ -680,20 +680,20 @@ namespace INTERP_KERNEL
       }
   }
 
-  void CellModel::changeOrientationOf2D(int *nodalConn, unsigned int sz) const
+  void CellModel::changeOrientationOf2D(mcIdType *nodalConn, unsigned int sz) const
   {
     if(sz<1)
       return ;
     if(!isQuadratic())
       {
-        std::vector<int> tmp(sz-1);
+        std::vector<mcIdType> tmp(sz-1);
         std::copy(nodalConn+1,nodalConn+sz,tmp.rbegin());
         std::copy(tmp.begin(),tmp.end(),nodalConn+1);
       }
     else
       {
         unsigned int sz2(sz/2);
-        std::vector<int> tmp0(sz2-1),tmp1(sz2);
+        std::vector<mcIdType> tmp0(sz2-1),tmp1(sz2);
         std::copy(nodalConn+1,nodalConn+sz2,tmp0.rbegin());
         std::copy(nodalConn+sz2,nodalConn+sz,tmp1.rbegin());
         std::copy(tmp0.begin(),tmp0.end(),nodalConn+1);
@@ -701,7 +701,7 @@ namespace INTERP_KERNEL
       }
   }
 
-  void CellModel::changeOrientationOf1D(int *nodalConn, unsigned int sz) const
+  void CellModel::changeOrientationOf1D(mcIdType *nodalConn, unsigned int sz) const
   {
     if(!isDynamic())
       {
@@ -720,7 +720,7 @@ namespace INTERP_KERNEL
       }
     else
       {
-        std::vector<int> tmp(sz-1);
+        std::vector<mcIdType> tmp(sz-1);
         std::copy(nodalConn+1,nodalConn+sz,tmp.rbegin());
         std::copy(tmp.begin(),tmp.end(),nodalConn+1);
       }
@@ -732,7 +732,7 @@ namespace INTERP_KERNEL
    */
   //================================================================================
 
-  unsigned CellModel::getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const
+  unsigned CellModel::getNumberOfNodesConstituentTheSon2(unsigned sonId, const mcIdType *nodalConn, mcIdType lgth) const
   {
     if(!isDynamic())
       return getNumberOfNodesConstituentTheSon(sonId);
@@ -746,14 +746,14 @@ namespace INTERP_KERNEL
       }
     else if(_dim==3)
       {//polyedron
-        const int *where=nodalConn;
+        const mcIdType *where=nodalConn;
         for(unsigned int i=0;i<sonId;i++)
           {
             where=std::find(where,nodalConn+lgth,-1);
             where++;
           }
-        const int *where2=std::find(where,nodalConn+lgth,-1);
-        return where2-where;
+        const mcIdType *where2=std::find(where,nodalConn+lgth,-1);
+        return (unsigned)(where2-where);
       }
     else
       throw INTERP_KERNEL::Exception("CellModel::getNumberOfNodesConstituentTheSon2 : no sons on NORM_POLYL !");
@@ -765,21 +765,21 @@ namespace INTERP_KERNEL
    * If not an exception will be thrown.
    * @return True if two cells have same orientation, false if not.
    */
-  bool CellModel::getOrientationStatus(unsigned lgth, const int *conn1, const int *conn2) const
+  bool CellModel::getOrientationStatus(mcIdType lgth, const mcIdType *conn1, const mcIdType *conn2) const
   {
     if(_dim!=1 && _dim!=2)
       throw INTERP_KERNEL::Exception("CellModel::getOrientationStatus : invalid dimension ! Must be 1 or 2 !");
     if(!_quadratic)
       {
-        std::vector<int> tmp(2*lgth);
-        std::vector<int>::iterator it=std::copy(conn1,conn1+lgth,tmp.begin());
+        std::vector<mcIdType> tmp(2*lgth);
+        std::vector<mcIdType>::iterator it=std::copy(conn1,conn1+lgth,tmp.begin());
         std::copy(conn1,conn1+lgth,it);
         it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth);
         if(it==tmp.begin())
           return true;
         if(it!=tmp.end())
           return _dim!=1;
-        std::vector<int>::reverse_iterator it2=std::search(tmp.rbegin(),tmp.rend(),conn2,conn2+lgth);
+        std::vector<mcIdType>::reverse_iterator it2=std::search(tmp.rbegin(),tmp.rend(),conn2,conn2+lgth);
         if(it2!=tmp.rend())
           return false;
         throw INTERP_KERNEL::Exception("CellModel::getOrientationStatus : Request of orientation status of non equal connectively cells !");
@@ -788,11 +788,11 @@ namespace INTERP_KERNEL
       {
         if(_dim!=1)
           {
-            std::vector<int> tmp(lgth);
-            std::vector<int>::iterator it=std::copy(conn1,conn1+lgth/2,tmp.begin());
+            std::vector<mcIdType> tmp(lgth);
+            std::vector<mcIdType>::iterator it=std::copy(conn1,conn1+lgth/2,tmp.begin());
             std::copy(conn1,conn1+lgth/2,it);
             it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth/2);
-            int d=std::distance(tmp.begin(),it);
+            std::size_t d=std::distance(tmp.begin(),it);
             if(it==tmp.end())
               return false;
             it=std::copy(conn1+lgth/2,conn1+lgth,tmp.begin());
@@ -800,17 +800,17 @@ namespace INTERP_KERNEL
             it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth);
             if(it==tmp.end())
               return false;
-            int d2=std::distance(tmp.begin(),it);
+            std::size_t d2=std::distance(tmp.begin(),it);
             return d==d2;
           }
         else
           {
-            int p=(lgth+1)/2;
-            std::vector<int> tmp(2*p);
-            std::vector<int>::iterator it=std::copy(conn1,conn1+p,tmp.begin());
+            mcIdType p=(lgth+1)/2;
+            std::vector<mcIdType> tmp(2*p);
+            std::vector<mcIdType>::iterator it=std::copy(conn1,conn1+p,tmp.begin());
             std::copy(conn1,conn1+p,it);
             it=std::search(tmp.begin(),tmp.end(),conn2,conn2+p);
-            int d=std::distance(tmp.begin(),it);
+            std::size_t d=std::distance(tmp.begin(),it);
             if(it==tmp.end())
               return false;
             tmp.resize(2*p-2);
@@ -819,7 +819,7 @@ namespace INTERP_KERNEL
             it=std::search(tmp.begin(),tmp.end(),conn2+p,conn2+lgth);
             if(it==tmp.end())
               return false;
-            int d2=std::distance(tmp.begin(),it);
+            std::size_t d2=std::distance(tmp.begin(),it);
             return d==d2;
           }
       }
index 4300b4327bdf3f89d6afd11164dd64f74f6b9f68..369791950074854412c68b14ebb60d528f4c22b3 100644 (file)
@@ -24,6 +24,7 @@
 #include "INTERPKERNELDefines.hxx"
 
 #include "NormalizedUnstructuredMesh.hxx"
+#include "MCIdType.hxx"
 
 #include <map>
 
@@ -57,14 +58,14 @@ namespace INTERP_KERNEL
     //! sonId is in C format.
     INTERPKERNEL_EXPORT const unsigned *getNodesConstituentTheSon(unsigned sonId) const { return _sons_con[sonId]; }
     INTERPKERNEL_EXPORT const unsigned *getNodesConstituentTheLittleSon(unsigned littleSonId) const { return _little_sons_con[littleSonId]; }
-    INTERPKERNEL_EXPORT bool getOrientationStatus(unsigned lgth, const int *conn1, const int *conn2) const;
+    INTERPKERNEL_EXPORT bool getOrientationStatus(mcIdType lgth, const mcIdType *conn1, const mcIdType *conn2) const;
     INTERPKERNEL_EXPORT unsigned getNumberOfNodes() const { return _nb_of_pts; }
     INTERPKERNEL_EXPORT unsigned getNumberOfSons() const { return _nb_of_sons; }
-    INTERPKERNEL_EXPORT unsigned getNumberOfSons2(const int *conn, int lgth) const;
-    INTERPKERNEL_EXPORT unsigned getNumberOfEdgesIn3D(const int *conn, int lgth) const;
+    INTERPKERNEL_EXPORT unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const;
+    INTERPKERNEL_EXPORT unsigned getNumberOfEdgesIn3D(const mcIdType *conn, mcIdType lgth) const;
     INTERPKERNEL_EXPORT unsigned getNumberOfMicroEdges() const;
     INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon(unsigned sonId) const { return _nb_of_sons_con[sonId]; }
-    INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const;
+    INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const mcIdType *nodalConn, mcIdType lgth) const;
     INTERPKERNEL_EXPORT NormalizedCellType getExtrudedType() const { return _extruded_type; }
     INTERPKERNEL_EXPORT NormalizedCellType getCorrespondingPolyType() const;
     INTERPKERNEL_EXPORT NormalizedCellType getReverseExtrudedType() const { return _reverse_extruded_type; }
@@ -73,13 +74,13 @@ namespace INTERP_KERNEL
     INTERPKERNEL_EXPORT NormalizedCellType getQuadraticType2() const { return _quadratic_type2; }
     INTERPKERNEL_EXPORT NormalizedCellType getSonType(unsigned sonId) const { return _sons_type[sonId]; }
     INTERPKERNEL_EXPORT NormalizedCellType getSonType2(unsigned sonId) const;
-    INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn) const;
-    INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const;
-    INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity4(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const;
-    INTERPKERNEL_EXPORT unsigned fillSonEdgesNodalConnectivity3D(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const;
-    INTERPKERNEL_EXPORT unsigned fillMicroEdgeNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn, NormalizedCellType& typeOfSon) const;
-    INTERPKERNEL_EXPORT void changeOrientationOf2D(int *nodalConn, unsigned int sz) const;
-    INTERPKERNEL_EXPORT void changeOrientationOf1D(int *nodalConn, unsigned int sz) const;
+    INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn) const;
+    INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+    INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity4(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+    INTERPKERNEL_EXPORT unsigned fillSonEdgesNodalConnectivity3D(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+    INTERPKERNEL_EXPORT unsigned fillMicroEdgeNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+    INTERPKERNEL_EXPORT void changeOrientationOf2D(mcIdType *nodalConn, unsigned int sz) const;
+    INTERPKERNEL_EXPORT void changeOrientationOf1D(mcIdType *nodalConn, unsigned int sz) const;
     INTERPKERNEL_EXPORT DiameterCalculator *buildInstanceOfDiameterCalulator(int spaceDim) const;
     INTERPKERNEL_EXPORT OrientationInverter *buildOrientationInverter() const;
   private:
index 98e30ec7a9578915781fc509b9e33cd7f3b973a2..3331675a368e98096b863c3ccc87b029b28fb72f 100644 (file)
@@ -68,7 +68,7 @@ namespace INTERP_KERNEL
     /*** Compute the intersection area ***/
     INTERP_KERNEL::PolygonAlgorithms<SPACEDIM> P(_epsilon, PlanarIntersector<MyMeshType,MyMatrix>::_precision);
     std::deque<double> inter =  P.intersectConvexPolygons(&CoordsT[0], &CoordsS[0],
-                                                            CoordsT.size()/SPACEDIM, CoordsS.size()/SPACEDIM);
+                                                          int(CoordsT.size())/SPACEDIM, int(CoordsS.size())/SPACEDIM);
     double area[SPACEDIM];
     int nb_inter =((int)inter.size())/SPACEDIM;
     for(int i = 1; i<nb_inter-1; i++)
@@ -95,12 +95,12 @@ namespace INTERP_KERNEL
                                                               bool                       isSourceQuad)
   {
     double result = 0;
-    int nbOfNodesS=sourceCoords.size()/SPACEDIM;
+    int nbOfNodesS=int(sourceCoords.size())/SPACEDIM;
 
     /*** Compute the intersection area ***/
     INTERP_KERNEL::PolygonAlgorithms<SPACEDIM> P(_epsilon, PlanarIntersector<MyMeshType,MyMatrix>::_precision);
     std::deque<double> inter =  P.intersectConvexPolygons(quadrangle, &sourceCoords[0],
-                                                            4, nbOfNodesS);
+                                                          4, nbOfNodesS);
     double area[SPACEDIM];
     int nb_inter =((int)inter.size())/SPACEDIM;
     for(int i = 1; i<nb_inter-1; i++)
@@ -126,8 +126,8 @@ namespace INTERP_KERNEL
                                                        const std::vector<double>& sourceCoords)
   {
     double result = 0;
-    int nbOfNodesS=sourceCoords.size()/SPACEDIM;
-    int nbOfNodesT=targetCoords.size()/SPACEDIM;
+    int nbOfNodesS=int(sourceCoords.size())/SPACEDIM;
+    int nbOfNodesT=int(targetCoords.size())/SPACEDIM;
     /*** Compute the intersection area ***/
     INTERP_KERNEL::PolygonAlgorithms<SPACEDIM> P(_epsilon, PlanarIntersector<MyMeshType,MyMatrix>::_precision);
     std::deque<double> inter =  P.intersectConvexPolygons(&targetCoords[0], &sourceCoords[0],
index dfa03a4b9f5c7f0355cf6e948b979320b9faa734..3393438204647e0ab9bdf7b472ae53fb1d8de718 100644 (file)
@@ -54,7 +54,7 @@ namespace INTERP_KERNEL
     struct TDualSegment
     {
       std::vector<double> _coords;
-      int                 _nodeId; // in mesh mode
+      ConnType            _nodeId; // in mesh mode
     };
     static void getDualSegments(ConnType                   icell,
                                 const MyMeshType&          mesh,
index 81d54f386bdc99323638bfeefbac0a52f47a4d5b..50df7a99499ebdc8d7eb816adb3805164df99fad 100644 (file)
@@ -77,7 +77,7 @@ namespace INTERP_KERNEL
     int ibox=0;
     for(long icell=0; icell<nbelems; icell++)
       {
-        int nb_nodes_per_elem = conn_index[icell+1]-conn_index[icell];
+        ConnType nb_nodes_per_elem = conn_index[icell+1]-conn_index[icell];
         //initializing bounding box limits
         for(int idim=0; idim<SPACEDIM; idim++)
           {
@@ -85,7 +85,7 @@ namespace INTERP_KERNEL
             bbox[2*SPACEDIM*ibox+2*idim+1] = -std::numeric_limits<double>::max();
           }
         //updating the bounding box with each node of the element
-        for (int j=0; j<nb_nodes_per_elem; j++)
+        for (ConnType j=0; j<nb_nodes_per_elem; j++)
           {
             const double* coord_node = coords + 
               SPACEDIM*OTT<ConnType,numPol>
@@ -159,8 +159,8 @@ namespace INTERP_KERNEL
   void CurveIntersector<MyMeshType,MyMatrix>::adjustBoundingBoxes (std::vector<double>& bbox,
                                                                    double adjustmentEpsAbs)
   {
-    long size = bbox.size()/(2*SPACEDIM);
-    for (int i=0; i<size; i++)
+    std::size_t size = bbox.size()/(2*SPACEDIM);
+    for (std::size_t i=0; i<size; i++)
       {
         for(int idim=0; idim<SPACEDIM; idim++)
           {
@@ -180,7 +180,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   bool CurveIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(ConnType icellT, std::vector<double>& coordsT) const
   {
-    int nbNodesT(_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1] - _connIndexT[OTT<ConnType,numPol>::ind2C(icellT)]);
+    ConnType nbNodesT(_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1] - _connIndexT[OTT<ConnType,numPol>::ind2C(icellT)]);
     coordsT.resize(SPACEDIM*nbNodesT);
     for (ConnType iT=0; iT<nbNodesT; iT++)
       {
@@ -202,7 +202,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   typename MyMeshType::MyConnType CurveIntersector<MyMeshType,MyMatrix>::getNodeIdOfTargetCellAt(ConnType icellT, ConnType nodeIdInCellT) const
   {
-    int nbNodesT(_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1] - _connIndexT[OTT<ConnType,numPol>::ind2C(icellT)]);
+    ConnType nbNodesT(_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1] - _connIndexT[OTT<ConnType,numPol>::ind2C(icellT)]);
     if(nodeIdInCellT>=0 && nodeIdInCellT<nbNodesT)
       return OTT<ConnType,numPol>::coo2C(_connectT[OTT<ConnType,numPol>::conn2C(_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)]+nodeIdInCellT)]);
     else
@@ -218,7 +218,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   bool CurveIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(ConnType icellS, std::vector<double>& coordsS) const
   {
-    int nbNodesS = _connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1] - _connIndexS[OTT<ConnType,numPol>::ind2C(icellS)];
+    ConnType nbNodesS = _connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1] - _connIndexS[OTT<ConnType,numPol>::ind2C(icellS)];
     coordsS.resize(SPACEDIM*nbNodesS);
     for(ConnType iS=0; iS<nbNodesS; iS++)
       {
@@ -240,7 +240,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   typename MyMeshType::MyConnType CurveIntersector<MyMeshType,MyMatrix>::getNodeIdOfSourceCellAt(ConnType icellS, ConnType nodeIdInCellS) const
   {
-    int nbNodesS(_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1] - _connIndexS[OTT<ConnType,numPol>::ind2C(icellS)]);
+    ConnType nbNodesS(_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1] - _connIndexS[OTT<ConnType,numPol>::ind2C(icellS)]);
     if(nodeIdInCellS>=0 && nodeIdInCellS<nbNodesS)
       return OTT<ConnType,numPol>::coo2C(_connectS[OTT<ConnType,numPol>::conn2C(_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)]+nodeIdInCellS)]);
     else
@@ -259,9 +259,9 @@ namespace INTERP_KERNEL
                                                               std::vector<TDualSegment>& segments)
   {
     // get coordinates of cell nodes
-    int nbNodes;
-    std::vector<double> ncoords;
-    std::vector<int>    nodeIds;
+    ConnType nbNodes;
+    std::vector<double>   ncoords;
+    std::vector<ConnType> nodeIds;
     {
       const ConnType *connect   = mesh.getConnectivityPtr();
       const ConnType *connIndex = mesh.getConnectivityIndexPtr();
@@ -272,7 +272,7 @@ namespace INTERP_KERNEL
       ncoords.resize(SPACEDIM*nbNodes);
       nodeIds.resize(nbNodes);
 
-      for(int i=0; i<nbNodes; i++)
+      for(ConnType i=0; i<nbNodes; i++)
         for(int idim=0; idim<SPACEDIM; idim++)
           {
             nodeIds[i] = connect[OTT<ConnType,numPol>::conn2C(connIndex[OTT<ConnType,numPol>::ind2C(icell)]+i)];
@@ -289,7 +289,7 @@ namespace INTERP_KERNEL
     // fill segments
     segments.clear();
     segments.reserve( 2*nbNodes );
-    for(int i=0; i<nbNodes-1; i++)
+    for(ConnType i=0; i<nbNodes-1; i++)
       {
         segments.push_back(TDualSegment());
         TDualSegment& seg1 = segments.back();
index 365d4b4e44a12b23180c46fb7a31e40aaf2720b2..6c9fbf5ee00428f8220144ea17d7dd5d1994a274 100644 (file)
@@ -38,8 +38,8 @@ namespace INTERP_KERNEL
                          double  precision, double tolerance,
                          double medianLine, int printLevel);
   public:
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     void intersectCells(ConnType icellT,
                         const std::vector<ConnType>& icellsS, MyMatrix& res);
   };
index 54cdc5b5c69132e01db9b7658fb3ca59a20f3ac0..45d5522ea0e8df4eadb9981129c0c23655492a7d 100644 (file)
@@ -37,14 +37,14 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP0P0<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP0P0<MyMeshType,MyMatrix>
     ::getNumberOfRowsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshT.getNumberOfElements();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP0P0<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP0P0<MyMeshType,MyMatrix>
     ::getNumberOfColsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshS.getNumberOfElements();
@@ -56,14 +56,14 @@ namespace INTERP_KERNEL
   {
     typename MyMatrix::value_type& resRow = res[icellT];
     std::vector<double> coordsT;
-    int t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT);
+    ConnType t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT);
     for ( t = 0; t < nbSegT; ++t )
       for(typename std::vector<ConnType>::const_iterator
             iter=icellsS.begin(); iter!=icellsS.end(); iter++)
         {
-          int iS = *iter;
+          ConnType iS = *iter;
           std::vector<double> coordsS;
-          int s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS);
+          ConnType s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS);
           for ( s = 0; s < nbSegS; ++s )
             {
               double surf = BASE_INTERSECTOR::intersectSegments(&coordsT[0] + t*SPACEDIM,
index 0f3145cb923495698ff66be87856cf56be7fd784..e2f88f726e77ee6366f3c0330f8b6be447184256 100644 (file)
@@ -40,8 +40,8 @@ namespace INTERP_KERNEL
   public:
     void intersectCells(ConnType icellT,
                         const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 7173c55e60c2bed44a3089c796cbd9bc546461ee..51960280ec42a1672a7ff2f3efc8c214b067b4b0 100644 (file)
@@ -37,14 +37,14 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP0P1<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP0P1<MyMeshType,MyMatrix>
     ::getNumberOfRowsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP0P1<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP0P1<MyMeshType,MyMatrix>
     ::getNumberOfColsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshS.getNumberOfElements();
@@ -62,15 +62,15 @@ namespace INTERP_KERNEL
   {
     std::vector<typename BASE_INTERSECTOR::TDualSegment> segmentsT;
     BASE_INTERSECTOR::getDualSegments( icellT, BASE_INTERSECTOR::_meshT, segmentsT);
-    for ( int t = 0; t < (int)segmentsT.size(); ++t )
+    for ( ConnType t = 0; t < (ConnType)segmentsT.size(); ++t )
       {
         typename MyMatrix::value_type& resRow = res[ OTT<ConnType,numPol>::ind2C( segmentsT[t]._nodeId )];
         for(typename std::vector<ConnType>::const_iterator
               iter=icellsS.begin(); iter!=icellsS.end(); iter++)
           {
-            int iS = *iter;
+            ConnType iS = *iter;
             std::vector<double> coordsS;
-            int s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS);
+            ConnType s, nbSegS = 1 + BASE_INTERSECTOR::getRealSourceCoordinates(iS,coordsS);
             for ( s = 0; s < nbSegS; ++s )
               {
                 double surf = BASE_INTERSECTOR::intersectSegments(&segmentsT[t]._coords[0],
index 76844461f0cffb419b12b92214961cf1a53f203e..d52eec2dd7377765078e907677b09bc643353f30 100644 (file)
@@ -38,8 +38,8 @@ namespace INTERP_KERNEL
                          double precision, double tolerance, double medianLine, int printLevel);
   public:
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 831d80718c8d68a4a7990301f16ad5fb3e06f966..a5bfe0fcbb69d298b8e114ad4e82462c30e5274a 100644 (file)
@@ -37,14 +37,14 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P0<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP1P0<MyMeshType,MyMatrix>
     ::getNumberOfRowsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshT.getNumberOfElements();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P0<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP1P0<MyMeshType,MyMatrix>
     ::getNumberOfColsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshS.getNumberOfNodes();
@@ -63,21 +63,21 @@ namespace INTERP_KERNEL
     typename MyMatrix::value_type& resRow = res[ icellT ];
     std::vector<typename BASE_INTERSECTOR::TDualSegment> segmentsS;
     std::vector<double> coordsT;
-    int t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT);
+    ConnType t, nbSegT = 1 + BASE_INTERSECTOR::getRealTargetCoordinates(icellT,coordsT);
     for ( t = 0; t < nbSegT; ++t )
       for(typename std::vector<ConnType>::const_iterator
             iter=icellsS.begin(); iter!=icellsS.end(); iter++)
         {
-          int iS = *iter;
+          ConnType iS = *iter;
           BASE_INTERSECTOR::getDualSegments( OTT<ConnType,numPol>::ind2C(iS),
                                              BASE_INTERSECTOR::_meshS, segmentsS);
-          for ( int s = 0; s < (int)segmentsS.size(); ++s )
+          for ( ConnType s = 0; s < (ConnType)segmentsS.size(); ++s )
             {
               double surf = BASE_INTERSECTOR::intersectSegments(&segmentsS[s]._coords[0],
                                                                 &coordsT[0] + t*SPACEDIM);
               if(surf!=0.)
                 {
-                  int nS = segmentsS[s]._nodeId;
+                  ConnType nS = segmentsS[s]._nodeId;
                   typename MyMatrix::value_type::const_iterator iterRes=resRow.find(nS);
                   if(iterRes==resRow.end())
                     resRow.insert(std::make_pair(nS,surf));
index de086bb4defb1b89ed2410a31811a1aeb1ca675b..106d8529709c02073dc2fb7b141c7d48c5880dc8 100644 (file)
@@ -40,8 +40,8 @@ namespace INTERP_KERNEL
   public:
     void intersectCells(ConnType icellT,
                         const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index d63d34aaebe8e47d91038115a527c6da01a05f77..dd91ee5f288dd07af06b12e17979e43beeb597d5 100644 (file)
@@ -37,14 +37,14 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P1<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP1P1<MyMeshType,MyMatrix>
   ::getNumberOfRowsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P1<MyMeshType,MyMatrix>
+  typename MyMeshType::MyConnType CurveIntersectorP1P1<MyMeshType,MyMatrix>
   ::getNumberOfColsOfResMatrix() const
   {
     return BASE_INTERSECTOR::_meshS.getNumberOfNodes();
@@ -56,22 +56,22 @@ namespace INTERP_KERNEL
   {
     std::vector<typename BASE_INTERSECTOR::TDualSegment> segmentsT, segmentsS;
     BASE_INTERSECTOR::getDualSegments( icellT, BASE_INTERSECTOR::_meshT, segmentsT);
-    for ( int t = 0; t < (int)segmentsT.size(); ++t )
+    for ( ConnType t = 0; t < (ConnType)segmentsT.size(); ++t )
       {
         typename MyMatrix::value_type& resRow = res[ OTT<ConnType,numPol>::ind2C( segmentsT[t]._nodeId )];
         for(typename std::vector<ConnType>::const_iterator
               iter=icellsS.begin(); iter!=icellsS.end(); iter++)
           {
-            int iS = *iter;
+            ConnType iS = *iter;
             BASE_INTERSECTOR::getDualSegments( OTT<ConnType,numPol>::ind2C(iS),
                                                BASE_INTERSECTOR::_meshS, segmentsS);
-            for ( int s = 0; s < (int)segmentsS.size(); ++s )
+            for ( ConnType s = 0; s < (ConnType)segmentsS.size(); ++s )
               {
                 double surf = BASE_INTERSECTOR::intersectSegments(&segmentsT[t]._coords[0],
                                                                   &segmentsS[s]._coords[0]);
                 if(surf!=0.)
                   {
-                    int nS = segmentsS[s]._nodeId;
+                    ConnType nS = segmentsS[s]._nodeId;
                     typename MyMatrix::value_type::const_iterator iterRes=resRow.find(nS);
                     if(iterRes==resRow.end())
                       resRow.insert(std::make_pair(nS,surf));
index 16104ab5e38ccd475337bbcb6321631c4f4fac27..a3fb45ea08c27c2bf60e8352b81d7cdb5b1878b7 100644 (file)
@@ -39,8 +39,8 @@ namespace INTERP_KERNEL
                            double medianLine, int printLevel);
   public:
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   private:
     static void AppendValueInMatrix(MyMatrix& res, ConnType nodeIdT, ConnType nodeIdS0, double val0, ConnType nodeIdS1, double val1);
     static void AppendValueInMatrix2(typename MyMatrix::value_type& resRow, ConnType nodeIdS0, double val0);
index 60bdd97e676eb22ae844b6403dc74f09e7e6db77..e9bd3e5c287664fec1d893878df47427a599dc4f 100644 (file)
@@ -34,13 +34,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType CurveIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return CurveIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int CurveIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType CurveIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return CurveIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }
index 09eb07ce843a6d196bde81135f13e3fac2e140bf..1ea15692c7e31d4d6ea5741f83a9fa99aceeb5ec 100644 (file)
@@ -94,14 +94,14 @@ inline void DiffV3(const double a[3], const double b[3], double c[3])
 }
 
 template<class Evaluator>
-void ComputeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr)
+void ComputeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr)
 {
   Evaluator evtor;
   NormalizedCellType ct(Evaluator::TYPE);
   int cti((int) ct);
-  for(const int *it=bgIds;it!=endIds;it++)
+  for(const mcIdType *it=bgIds;it!=endIds;it++)
     {
-      int offset(indPtr[*it]);
+      mcIdType offset(indPtr[*it]);
       if(connPtr[offset]==cti)
         resPtr[*it]=evtor.ComputeForOneCellInternal(connPtr+offset+1,connPtr+indPtr[(*it)+1],coordsPtr);
       else
@@ -113,14 +113,14 @@ void ComputeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const
 }
 
 template<class Evaluator>
-void ComputeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr)
+void ComputeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr)
 {
   Evaluator evtor;
   NormalizedCellType ct(Evaluator::TYPE);
   int cti((int) ct);
-  for(int it=bgId;it<endId;it++)
+  for(mcIdType it=bgId;it<endId;it++)
     {
-      int offset(indPtr[it]);
+      mcIdType offset(indPtr[it]);
       if(connPtr[offset]==cti)
         resPtr[it]=evtor.ComputeForOneCellInternal(connPtr+offset+1,connPtr+indPtr[it+1],coordsPtr);
       else
@@ -132,20 +132,20 @@ void ComputeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, c
 }
 
 template<class Evaluator>
-void ComputeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr)
+void ComputeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr)
 {
   Evaluator evtor;
   NormalizedCellType ct(Evaluator::TYPE);
   const CellModel& cm(CellModel::GetCellModel(ct));
   unsigned nbNodes(cm.getNumberOfNodes());
-  const int *ptr(connPtr);
-  for(int i=0;i<nbOfCells;i++,ptr+=nbNodes,resPtr++)
+  const mcIdType *ptr(connPtr);
+  for(mcIdType i=0;i<nbOfCells;i++,ptr+=nbNodes,resPtr++)
     *resPtr=evtor.ComputeForOneCellInternal(ptr,ptr+nbNodes,coordsPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTRI3S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTRI3S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==3)
     {
@@ -162,24 +162,24 @@ double DiameterCalulatorTRI3S2::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorTRI3S2::ComputeForOneCellInternal : input connectivity must be of size 3 !");
 }
 
-void DiameterCalulatorTRI3S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI3S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI3S2>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI3S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI3S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI3S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI3S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI3S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI3S2>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTRI3S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTRI3S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==3)
     {
@@ -196,24 +196,24 @@ double DiameterCalulatorTRI3S3::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorTRI3S2::ComputeForOneCellInternal : input connectivity must be of size 3 !");
 }
 
-void DiameterCalulatorTRI3S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI3S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI3S3>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI3S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI3S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI3S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI3S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI3S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI3S3>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTRI6S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTRI6S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==6)
     return DiameterCalulatorTRI3S2::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
@@ -221,24 +221,24 @@ double DiameterCalulatorTRI6S2::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorTRI6S2::ComputeForOneCellInternal : input connectivity must be of size 6 !");
 }
 
-void DiameterCalulatorTRI6S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI6S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S2>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI6S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI6S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI6S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI6S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI6S2>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTRI6S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTRI6S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==6)
     return DiameterCalulatorTRI3S3::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
@@ -246,24 +246,24 @@ double DiameterCalulatorTRI6S3::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorTRI6S3::ComputeForOneCellInternal : input connectivity must be of size 6 !");
 }
 
-void DiameterCalulatorTRI6S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI6S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S3>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI6S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI6S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI6S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI6S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI6S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI6S3>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTRI7S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTRI7S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==7)
     return DiameterCalulatorTRI3S2::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
@@ -271,24 +271,24 @@ double DiameterCalulatorTRI7S2::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorTRI7S2::ComputeForOneCellInternal : input connectivity must be of size 7 !");
 }
 
-void DiameterCalulatorTRI7S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI7S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S2>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI7S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI7S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI7S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI7S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI7S2>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTRI7S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTRI7S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==7)
     return DiameterCalulatorTRI3S3::ComputeForOneCellInternal(bg,bg+3,coordsPtr);
@@ -296,24 +296,24 @@ double DiameterCalulatorTRI7S3::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorTRI7S3::ComputeForOneCellInternal : input connectivity must be of size 7 !");
 }
 
-void DiameterCalulatorTRI7S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI7S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S3>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI7S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI7S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTRI7S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTRI7S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTRI7S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTRI7S3>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==4)
     {
@@ -327,24 +327,24 @@ double DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorQUAD4S2::ComputeForOneCellInternal : input connectivity must be of size 4 !");
 }
 
-void DiameterCalulatorQUAD4S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD4S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD4S2>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD4S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD4S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD4S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD4S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD4S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD4S2>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==4)
     {
@@ -358,24 +358,24 @@ double DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorQUAD4S3::ComputeForOneCellInternal : input connectivity must be of size 4 !");
 }
 
-void DiameterCalulatorQUAD4S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD4S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD4S3>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD4S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD4S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD4S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD4S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD4S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD4S3>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorQUAD8S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorQUAD8S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==8)
     return DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
@@ -383,24 +383,24 @@ double DiameterCalulatorQUAD8S2::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorQUAD8S2::ComputeForOneCellInternal : input connectivity must be of size 8 !");
 }
 
-void DiameterCalulatorQUAD8S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD8S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S2>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD8S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD8S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD8S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD8S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD8S2>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorQUAD8S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorQUAD8S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==8)
     return DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
@@ -408,24 +408,24 @@ double DiameterCalulatorQUAD8S3::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorQUAD8S3::ComputeForOneCellInternal : input connectivity must be of size 8 !");
 }
 
-void DiameterCalulatorQUAD8S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD8S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S3>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD8S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD8S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD8S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD8S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD8S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD8S3>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorQUAD9S2::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorQUAD9S2::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==9)
     return DiameterCalulatorQUAD4S2::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
@@ -433,24 +433,24 @@ double DiameterCalulatorQUAD9S2::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorQUAD9S2::ComputeForOneCellInternal : input connectivity must be of size 9 !");
 }
 
-void DiameterCalulatorQUAD9S2::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD9S2::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S2>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD9S2::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD9S2::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S2>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD9S2::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD9S2::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD9S2>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorQUAD9S3::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorQUAD9S3::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==9)
     return DiameterCalulatorQUAD4S3::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
@@ -458,24 +458,24 @@ double DiameterCalulatorQUAD9S3::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorQUAD8S3::ComputeForOneCellInternal : input connectivity must be of size 9 !");
 }
 
-void DiameterCalulatorQUAD9S3::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD9S3::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S3>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD9S3::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD9S3::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorQUAD9S3>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorQUAD9S3::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorQUAD9S3::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorQUAD9S3>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTETRA4::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTETRA4::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==4)
     {
@@ -495,24 +495,24 @@ double DiameterCalulatorTETRA4::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorTETRA4::ComputeForOneCellInternal : input connectivity must be of size 4 !");
 }
 
-void DiameterCalulatorTETRA4::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTETRA4::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTETRA4>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTETRA4::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTETRA4::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTETRA4>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTETRA4::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTETRA4::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTETRA4>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorTETRA10::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorTETRA10::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==10)
     return DiameterCalulatorTETRA4::ComputeForOneCellInternal(bg,bg+4,coordsPtr);
@@ -520,24 +520,24 @@ double DiameterCalulatorTETRA10::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorTETRA10::ComputeForOneCellInternal : input connectivity must be of size 10 !");
 }
 
-void DiameterCalulatorTETRA10::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTETRA10::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorTETRA10>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTETRA10::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTETRA10::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorTETRA10>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorTETRA10::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorTETRA10::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorTETRA10>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorHEXA8::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorHEXA8::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==8)
     {
@@ -555,24 +555,24 @@ double DiameterCalulatorHEXA8::ComputeForOneCellInternal(const int *bg, const in
     throw Exception("DiameterCalulatorHEXA8::ComputeForOneCellInternal : input connectivity must be of size 8 !");
 }
 
-void DiameterCalulatorHEXA8::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA8::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorHEXA8>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorHEXA8::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA8::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorHEXA8>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorHEXA8::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA8::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorHEXA8>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorHEXA20::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorHEXA20::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==20)
     return DiameterCalulatorHEXA8::ComputeForOneCellInternal(bg,bg+8,coordsPtr);
@@ -580,24 +580,24 @@ double DiameterCalulatorHEXA20::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorHEXA20::ComputeForOneCellInternal : input connectivity must be of size 20 !");
 }
 
-void DiameterCalulatorHEXA20::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA20::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorHEXA20>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorHEXA20::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA20::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorHEXA20>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorHEXA20::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA20::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorHEXA20>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorHEXA27::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorHEXA27::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==27)
     return DiameterCalulatorHEXA8::ComputeForOneCellInternal(bg,bg+8,coordsPtr);
@@ -605,24 +605,24 @@ double DiameterCalulatorHEXA27::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorHEXA27::ComputeForOneCellInternal : input connectivity must be of size 27 !");
 }
 
-void DiameterCalulatorHEXA27::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA27::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorHEXA27>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorHEXA27::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA27::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorHEXA27>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorHEXA27::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorHEXA27::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorHEXA27>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorPENTA6::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorPENTA6::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==6)
     {
@@ -642,24 +642,24 @@ double DiameterCalulatorPENTA6::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorPENTA6::ComputeForOneCellInternal : input connectivity must be of size 6 !");
 }
 
-void DiameterCalulatorPENTA6::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPENTA6::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorPENTA6>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPENTA6::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPENTA6::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorPENTA6>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPENTA6::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPENTA6::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorPENTA6>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorPENTA15::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorPENTA15::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==15)
     return DiameterCalulatorPENTA6::ComputeForOneCellInternal(bg,bg+6,coordsPtr);
@@ -667,24 +667,24 @@ double DiameterCalulatorPENTA15::ComputeForOneCellInternal(const int *bg, const
     throw Exception("DiameterCalulatorPENTA15::ComputeForOneCellInternal : input connectivity must be of size 15 !");
 }
 
-void DiameterCalulatorPENTA15::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPENTA15::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorPENTA15>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPENTA15::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPENTA15::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorPENTA15>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPENTA15::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPENTA15::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorPENTA15>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorPYRA5::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorPYRA5::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==5)
     {
@@ -704,24 +704,24 @@ double DiameterCalulatorPYRA5::ComputeForOneCellInternal(const int *bg, const in
     throw Exception("DiameterCalulatorPYRA5::ComputeForOneCellInternal : input connectivity must be of size 5 !");
 }
 
-void DiameterCalulatorPYRA5::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPYRA5::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorPYRA5>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPYRA5::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPYRA5::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorPYRA5>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPYRA5::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPYRA5::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorPYRA5>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
 
 //=================================================================
 
-double DiameterCalulatorPYRA13::ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr)
+double DiameterCalulatorPYRA13::ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr)
 {
   if(std::distance(bg,endd)==13)
     return DiameterCalulatorPYRA5::ComputeForOneCellInternal(bg,bg+5,coordsPtr);
@@ -729,17 +729,17 @@ double DiameterCalulatorPYRA13::ComputeForOneCellInternal(const int *bg, const i
     throw Exception("DiameterCalulatorPYRA13::ComputeForOneCellInternal : input connectivity must be of size 13 !");
 }
 
-void DiameterCalulatorPYRA13::computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPYRA13::computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForListOfCellIdsUMeshFrmt<DiameterCalulatorPYRA13>(bgIds,endIds,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPYRA13::computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPYRA13::computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeForRangeOfCellIdsUMeshFrmt<DiameterCalulatorPYRA13>(bgId,endId,indPtr,connPtr,coordsPtr,resPtr);
 }
 
-void DiameterCalulatorPYRA13::computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const
+void DiameterCalulatorPYRA13::computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const
 {
   ComputeFor1SGTUMeshFrmt<DiameterCalulatorPYRA13>(nbOfCells,connPtr,coordsPtr,resPtr);
 }
index 939e85f8b38c6f5c6af23d4c7abc96d16071459f..1c08dbd19bfe1bffe5796298eabde50afe13b022 100644 (file)
@@ -24,6 +24,7 @@
 #include "INTERPKERNELDefines.hxx"
 
 #include "NormalizedGeometricTypes"
+#include "MCIdType.hxx"
 
 namespace INTERP_KERNEL
 {
@@ -32,21 +33,21 @@ namespace INTERP_KERNEL
   public:
     INTERPKERNEL_EXPORT virtual ~DiameterCalculator() { }
     INTERPKERNEL_EXPORT virtual NormalizedCellType getType() const = 0;
-    INTERPKERNEL_EXPORT virtual double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const = 0;
-    INTERPKERNEL_EXPORT virtual void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const = 0;
-    INTERPKERNEL_EXPORT virtual void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const = 0;
-    INTERPKERNEL_EXPORT virtual void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const = 0;
+    INTERPKERNEL_EXPORT virtual double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const = 0;
+    INTERPKERNEL_EXPORT virtual void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const = 0;
+    INTERPKERNEL_EXPORT virtual void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const = 0;
+    INTERPKERNEL_EXPORT virtual void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const = 0;
   };
 
   class DiameterCalulatorTRI3S2 : public DiameterCalculator
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -55,11 +56,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -68,11 +69,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -81,11 +82,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -94,11 +95,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -107,11 +108,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -120,11 +121,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -133,11 +134,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -146,11 +147,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -159,11 +160,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -172,11 +173,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -185,11 +186,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -198,11 +199,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -211,11 +212,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -224,11 +225,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -237,11 +238,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -250,11 +251,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -263,11 +264,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -276,11 +277,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -289,11 +290,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
@@ -302,11 +303,11 @@ namespace INTERP_KERNEL
   {
   public:
     NormalizedCellType getType() const { return TYPE; }
-    double computeForOneCell(const int *bg, const int *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
-    static double ComputeForOneCellInternal(const int *bg, const int *endd, const double *coordsPtr);
-    void computeForListOfCellIdsUMeshFrmt(const int *bgIds, const int *endIds, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeForRangeOfCellIdsUMeshFrmt(int bgId, int endId, const int *indPtr, const int *connPtr, const double *coordsPtr, double *resPtr) const;
-    void computeFor1SGTUMeshFrmt(int nbOfCells, const int *connPtr, const double *coordsPtr, double *resPtr) const;
+    double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const { return ComputeForOneCellInternal(bg,endd,coordsPtr); }
+    static double ComputeForOneCellInternal(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr);
+    void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeForRangeOfCellIdsUMeshFrmt(mcIdType bgId, mcIdType endId, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
+    void computeFor1SGTUMeshFrmt(mcIdType nbOfCells, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const;
   public:
     static NormalizedCellType TYPE;
   };
index 8c06642f905ca1ad7c0516069d8930ea9b7b6156..3fdf8ce060f5aa47efc0a059294ef9657027036a 100644 (file)
@@ -617,7 +617,7 @@ namespace INTERP_KERNEL
         getCorners( corners, &cornerBox->_minmax[0] );
 
         double globCorner[3];
-        for ( int iC = 0, nC = corners.size()/_dim; iC < nC; ++iC)
+        for ( std::size_t iC = 0, nC = corners.size()/_dim; iC < nC; ++iC)
           {
             cornerBox->fromLocalCS( &corners[iC*_dim], globCorner );
             mmBox.addPointToBox( globCorner );
@@ -649,7 +649,7 @@ namespace INTERP_KERNEL
       getCorners( cornersOther, box );
       DirectedBoundingBox mmBox((double*)0,0,_dim); //!< empty box with CS == this->_axes
       mmBox._axes = this->_axes;
-      for ( int iC = 0, nC = cornersOther.size()/_dim; iC < nC; ++iC)
+      for ( std::size_t iC = 0, nC = cornersOther.size()/_dim; iC < nC; ++iC)
         mmBox.addPointToBox( &cornersOther[iC*_dim] );
 
       if ( isMinMaxOut( &mmBox._minmax[0], &this->_minmax[0], _dim ))
@@ -662,7 +662,7 @@ namespace INTERP_KERNEL
       getCorners( cornersThis, &_minmax[0] );
       DirectedBoundingBox mmBox((double*)0,0,_dim); //!< initailized _minmax
       double globCorner[3];
-      for ( int iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC)
+      for ( std::size_t iC = 0, nC = cornersThis.size()/_dim; iC < nC; ++iC)
         {
           fromLocalCS( &cornersThis[iC*_dim], globCorner );
           for ( int i = 0; i < (int)_dim; ++i )
index d040be703d737a6ab53e1be039ee4c9b016d6f85..794c664db95fd7f215dc19e6fb58505efe70c039 100644 (file)
@@ -45,7 +45,7 @@ std::vector<char> INTERP_KERNEL::AsmX86::convertIntoMachineLangage(const std::ve
 char *INTERP_KERNEL::AsmX86::copyToExecMemZone(const std::vector<char>& ml, unsigned& offset) const
 {
   char *ret=0;
-  int lgth=ml.size();
+  std::size_t lgth=ml.size();
 #ifdef _POSIX_MAPPED_FILES
 # ifdef __APPLE__
   ret=(char *)mmap(0,lgth,PROT_EXEC | PROT_WRITE,MAP_ANON | MAP_PRIVATE,-1,0);
@@ -492,7 +492,7 @@ void INTERP_KERNEL::AsmX86::appendAddress(const std::string& addr, int nbOfByte,
   for(int k=0;k<nbOfByte;k++)
     {
       j=i&255;
-      v=j;
+      v=(char)j;
       ml.push_back(v);
       i>>=8;
     }
index ab5e989d95f5a064db638abe2ca9d734a5159457..ab5a4a79bb34de2d754e666c5c41146d0c10bb50 100644 (file)
@@ -233,7 +233,8 @@ void DecompositionInUnitBase::tryToConvertInUnit(double val)
 
 DecompositionInUnitBase &DecompositionInUnitBase::operator*(const DecompositionInUnitBase& other)
 {
-  _value[0]+=other._value[0]; _value[1]+=other._value[1]; _value[2]+=other._value[2]; _value[3]+=other._value[3]; _value[4]+=other._value[4];
+  // += causes ' conversion to 'short int' from 'int' may alter its value [-Wconversion]'
+  _value[0]=(short)(_value[0]+other._value[0]); _value[1]=(short)(_value[1]+other._value[1]); _value[2]=(short)(_value[2]+other._value[2]); _value[3]=(short)(_value[3]+other._value[3]); _value[4]=(short)(_value[4]+other._value[4]);
   _mult_fact_to_base*=other._mult_fact_to_base;
   _add_to_base=0.;
   return *this;
@@ -241,7 +242,8 @@ DecompositionInUnitBase &DecompositionInUnitBase::operator*(const DecompositionI
 
 DecompositionInUnitBase &DecompositionInUnitBase::operator/(const DecompositionInUnitBase& other)
 {
-  _value[0]-=other._value[0]; _value[1]-=other._value[1]; _value[2]-=other._value[2]; _value[3]-=other._value[3]; _value[4]-=other._value[4];
+  // -= causes ' conversion to 'short int' from 'int' may alter its value [-Wconversion]'
+  _value[0]=(short)(_value[0]-other._value[0]); _value[1]=(short)(_value[1]-other._value[1]); _value[2]=(short)(_value[2]-other._value[2]); _value[3]=(short)(_value[3]-other._value[3]); _value[4]=(short)(_value[4]-other._value[4]);
   _mult_fact_to_base/=other._mult_fact_to_base;
  _add_to_base=0.;
  return *this;
@@ -252,7 +254,8 @@ DecompositionInUnitBase &DecompositionInUnitBase::operator^(const DecompositionI
   if(!other.isAdimensional())
     throw INTERP_KERNEL::Exception("Trying to execute operator ^ with a second member not adimensionnal");
   int exp=couldItBeConsideredAsInt(other._mult_fact_to_base);
-  _value[0]*=exp; _value[1]*=exp; _value[2]*=exp; _value[3]*=exp; _value[4]*=exp;
+  // *= causes ' conversion to 'short int' from 'int' may alter its value [-Wconversion]'
+  _value[0]=(short)(_value[0]*exp); _value[1]=(short)(_value[1]*exp); _value[2]=(short)(_value[2]*exp); _value[3]=(short)(_value[3]*exp); _value[4]=(short)(_value[4]*exp);
   _mult_fact_to_base=powInt(_mult_fact_to_base,exp);
   _add_to_base=0.;
   return *this;
index 2f3ad3ff3eacd15101afc4077dd9566f4dbc4637..42adbc54c61b4177edbfad1bb243cfdd888966b1 100644 (file)
@@ -172,7 +172,7 @@ int GaussInfo::getGaussCoordDim() const
 {
   if( _my_nb_gauss ) 
     {
-      return _my_gauss_coord.size()/_my_nb_gauss;
+      return (int)_my_gauss_coord.size()/_my_nb_gauss;
     }
   else 
     {
@@ -187,7 +187,7 @@ int GaussInfo::getReferenceCoordDim() const
 {
   if( _my_nb_ref ) 
     {
-      return _my_reference_coord.size()/_my_nb_ref;
+      return (int)(_my_reference_coord.size()/_my_nb_ref);
     }
   else 
     {
@@ -2945,9 +2945,9 @@ GaussCoords::~GaussCoords()
 void GaussCoords::addGaussInfo( NormalizedCellType theGeometry,
                                 int coordDim,
                                 const double* theGaussCoord,
-                                int theNbGauss,
+                                mcIdType theNbGauss,
                                 const double* theReferenceCoord,
-                                int theNbRef)
+                                mcIdType theNbRef)
 {
   GaussInfoVector::iterator it = _my_gauss_info.begin();
   for( ; it != _my_gauss_info.end(); it++ ) 
@@ -2967,7 +2967,7 @@ void GaussCoords::addGaussInfo( NormalizedCellType theGeometry,
     aReferenceCoord.push_back(theReferenceCoord[i]);
 
 
-  GaussInfo* info = new GaussInfo( theGeometry, aGaussCoord, theNbGauss, aReferenceCoord, theNbRef);
+  GaussInfo* info = new GaussInfo( theGeometry, aGaussCoord, FromIdType<int>(theNbGauss), aReferenceCoord, FromIdType<int>(theNbRef));
   info->initLocalInfo();
 
   //If info with cell type doesn't exist add it
@@ -2979,7 +2979,7 @@ void GaussCoords::addGaussInfo( NormalizedCellType theGeometry,
     }
   else 
     {
-      int index = std::distance(_my_gauss_info.begin(),it);
+      std::size_t index = std::distance(_my_gauss_info.begin(),it);
       delete (*it);
       _my_gauss_info[index] = info;
     }
@@ -2992,7 +2992,7 @@ void GaussCoords::addGaussInfo( NormalizedCellType theGeometry,
 double* GaussCoords::calculateCoords( NormalizedCellType theGeometry, 
                                       const double *theNodeCoords, 
                                       const int theSpaceDim,
-                                      const int *theIndex)
+                                      const mcIdType *theIndex)
 {
   const GaussInfo *info = getInfoGivenCellType(theGeometry);
   int nbCoords = theSpaceDim * info->getNbGauss();
@@ -3002,13 +3002,13 @@ double* GaussCoords::calculateCoords( NormalizedCellType theGeometry,
 }
 
 
-void GaussCoords::calculateCoords( NormalizedCellType theGeometry, const double *theNodeCoords, const int theSpaceDim, const int *theIndex, double *result)
+void GaussCoords::calculateCoords( NormalizedCellType theGeometry, const double *theNodeCoords, const int theSpaceDim, const mcIdType *theIndex, double *result)
 {
   const GaussInfo *info = getInfoGivenCellType(theGeometry);
   calculateCoordsAlg(info,theNodeCoords,theSpaceDim,theIndex,result);
 }
 
-void GaussCoords::calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const int *theIndex, double *result)
+void GaussCoords::calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const mcIdType *theIndex, double *result)
 {
   int aConn = info->getNbRef();
 
index a263134e88bf711508376c51bc28bbed30b8631f..70195f701b8c2244e1e1e6b516f9c9b3cce4df66 100644 (file)
@@ -23,6 +23,7 @@
 #include "INTERPKERNELDefines.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
 #include "InterpKernelException.hxx"
+#include "MCIdType.hxx"
 
 #include <vector>
 
@@ -200,23 +201,23 @@ namespace INTERP_KERNEL
     INTERPKERNEL_EXPORT void addGaussInfo( NormalizedCellType theGeometry,
                                            int coordDim,
                                            const double* theGaussCoord,
-                                           int theNbGauss,
+                                           mcIdType theNbGauss,
                                            const double* theReferenceCoord,
-                                           int theNbRef);
+                                           mcIdType theNbRef);
 
     INTERPKERNEL_EXPORT double* calculateCoords( NormalizedCellType theGeometry, 
                                                  const double* theNodeCoords, 
                                                  const int theSpaceDim,
-                                                 const int* theIndex);
+                                                 const mcIdType* theIndex);
 
     INTERPKERNEL_EXPORT void calculateCoords( NormalizedCellType theGeometry, 
                                               const double* theNodeCoords, 
                                               const int theSpaceDim,
-                                              const int* theIndex,
+                                              const mcIdType* theIndex,
                                               double *result);
   private:
     const GaussInfo *getInfoGivenCellType(NormalizedCellType cellType);
-    void calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const int *theIndex,
+    void calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const mcIdType *theIndex,
                             double *result);
   private:
     typedef std::vector<GaussInfo*> GaussInfoVector;
index 2c555198835e06eb06afb96e8cca0df7f0432066..bd12d34fd3c9f367c6e48e062af990a1be3f38fc 100644 (file)
@@ -107,11 +107,11 @@ void IteratorOnComposedEdge::insertElemEdges(ComposedEdge *elems, bool changeMyS
   *_deep_it=*iter;
   _deep_it++;
   iter++;
-  int sizeOfMyList=myListToInsert->size();
+  std::size_t sizeOfMyList=myListToInsert->size();
   _list_handle->insert(_deep_it,iter,myListToInsert->end());
   if(!changeMySelf)
     {
-      for(int i=0;i<sizeOfMyList;i++)
+      for(std::size_t i=0;i<sizeOfMyList;i++)
         _deep_it--;
     }
 }
index 7357282391d8d583ba1eb336e8fac81edeb4c52e..a2f2fe97b8af075e77ad0afe922cad66bf1a722d 100644 (file)
@@ -587,7 +587,7 @@ double ComposedEdge::isInOrOutAlg(Node *nodeToTest, const std::set<Node*>& nodes
   std::vector<double> radialDistrib3(radialDistrib.size());
   std::transform(radialDistrib2.begin(),radialDistrib2.end(),radialDistrib.begin(),radialDistrib3.begin(),std::minus<double>());
   std::vector<double>::iterator iter3=max_element(radialDistrib3.begin(),radialDistrib3.end());
-  int i=iter3-radialDistrib3.begin();
+  std::size_t i=iter3-radialDistrib3.begin();
   // ok for e1 - Let's go.
   EdgeInfLin *e1=new EdgeInfLin(nodeToTest,radialDistrib[i]+radialDistrib3[i]/2.);
   double ref=e1->getCharactValue(*nodeToTest);
index 074fd5b8fb6d3e191f0e2b01cc6d995c8832c512..a3220bf615e38966a1ae131278bf1d85d94b0f5d 100644 (file)
@@ -166,13 +166,13 @@ unsigned MergePoints::getNumberOfAssociations() const
   return ret;
 }
 
-void MergePoints::PushInMap(int key, int value, std::map<int,int>& mergedNodes)
+void MergePoints::PushInMap(mcIdType key, mcIdType value, std::map<mcIdType,mcIdType>& mergedNodes)
 {
   if(key!=-1 && value!=-1)
     mergedNodes[key]=value;
 }
 
-void MergePoints::updateMergedNodes(int e1Start, int e1End, int e2Start, int e2End, std::map<int,int>& mergedNodes)
+void MergePoints::updateMergedNodes(mcIdType e1Start, mcIdType e1End, mcIdType e2Start, mcIdType e2End, std::map<mcIdType,mcIdType>& mergedNodes)
 {
   unsigned subTot(_ass1Start1+_ass1End1+_ass1Start2+_ass1End2);
   if(subTot!=0)
@@ -684,17 +684,17 @@ bool Edge::IntersectOverlapped(const Edge *f1, const Edge *f2, EdgeIntersector *
  */
 void Edge::Interpolate1DLin(const std::vector<double>& distrib1, const std::vector<double>& distrib2, std::map<int, std::map<int,double> >& result)
 {
-  int nbOfV1=distrib1.size()-1;
-  int nbOfV2=distrib2.size()-1;
+  std::size_t nbOfV1=distrib1.size()-1;
+  std::size_t nbOfV2=distrib2.size()-1;
   Node *n1=new Node(0.,0.); Node *n3=new Node(0.,0.);
   Node *n2=new Node(0.,0.); Node *n4=new Node(0.,0.);
   MergePoints commonNode;
-  for(int i=0;i<nbOfV1;i++)
+  for(unsigned int i=0;i<nbOfV1;i++)
     {
       std::vector<double>::const_iterator iter=find_if(distrib2.begin()+1,distrib2.end(),bind2nd(std::greater_equal<double>(),distrib1[i]));
       if(iter!=distrib2.end())
         {
-          for(int j=(iter-1)-distrib2.begin();j<nbOfV2;j++)
+          for(unsigned int j=(unsigned)((iter-1)-distrib2.begin());j<nbOfV2;j++)
             {
               if(distrib2[j]<=distrib1[i+1])
                 {
@@ -984,7 +984,7 @@ bool Edge::isEqual(const Edge& other) const
  * \param [in,out] subNodes to be sorted
  * \return true if a reordering was necessary false if not.
  */
-bool Edge::sortSubNodesAbs(const double *coo, std::vector<int>& subNodes)
+bool Edge::sortSubNodesAbs(const double *coo, std::vector<mcIdType>& subNodes)
 {
   Bounds b;
   b.prepareForAggregation();
@@ -998,8 +998,8 @@ bool Edge::sortSubNodesAbs(const double *coo, std::vector<int>& subNodes)
   //
   std::size_t sz(subNodes.size()),i(0);
   std::vector< std::pair<double,Node *> > an2(sz);
-  std::map<Node *, int> m;
-  for(std::vector<int>::const_iterator it=subNodes.begin();it!=subNodes.end();it++,i++)
+  std::map<Node *, mcIdType> m;
+  for(std::vector<mcIdType>::const_iterator it=subNodes.begin();it!=subNodes.end();it++,i++)
     {
       Node *n(new Node(coo[2*(*it)],coo[2*(*it)+1]));
       n->applySimilarity(xBary,yBary,dimChar);
@@ -1011,12 +1011,12 @@ bool Edge::sortSubNodesAbs(const double *coo, std::vector<int>& subNodes)
   bool ret(false);
   for(i=0;i<sz;i++)
     {
-      int id(m[an2[i].second]);
+      mcIdType id(m[an2[i].second]);
       if(id!=subNodes[i])
         { subNodes[i]=id; ret=true; }
     }
   //
-  for(std::map<INTERP_KERNEL::Node *,int>::const_iterator it2=m.begin();it2!=m.end();it2++)
+  for(std::map<INTERP_KERNEL::Node *,mcIdType>::const_iterator it2=m.begin();it2!=m.end();it2++)
     (*it2).first->decrRef();
   return ret;
 }
@@ -1024,11 +1024,11 @@ bool Edge::sortSubNodesAbs(const double *coo, std::vector<int>& subNodes)
 /**
  * Sort nodes so that they all lie consecutively on the edge that has been cut.
  */
-void Edge::sortIdsAbs(const std::vector<INTERP_KERNEL::Node *>& addNodes, const std::map<INTERP_KERNEL::Node *, int>& mapp1,
-                      const std::map<INTERP_KERNEL::Node *, int>& mapp2, std::vector<int>& edgesThis)
+void Edge::sortIdsAbs(const std::vector<INTERP_KERNEL::Node *>& addNodes, const std::map<INTERP_KERNEL::Node *, mcIdType>& mapp1,
+                      const std::map<INTERP_KERNEL::Node *, mcIdType>& mapp2, std::vector<mcIdType>& edgesThis)
 {
-  int startId=(*mapp1.find(_start)).second;
-  int endId=(*mapp1.find(_end)).second;
+  mcIdType startId=(*mapp1.find(_start)).second;
+  mcIdType endId=(*mapp1.find(_end)).second;
   if (! addNodes.size()) // quick way out, no new node to add.
     {
       edgesThis.push_back(startId);
@@ -1052,30 +1052,30 @@ void Edge::sortIdsAbs(const std::vector<INTERP_KERNEL::Node *>& addNodes, const
   for(std::size_t i=0;i<sz;i++)
     an2[i]=std::pair<double,Node *>(getCharactValueBtw0And1(*addNodes[i]),addNodes[i]);
   std::sort(an2.begin(),an2.end());
-  std::vector<int> tmpp;
+  std::vector<mcIdType> tmpp;
   for(std::vector< std::pair<double,Node *> >::const_iterator it=an2.begin();it!=an2.end();it++)
     {
-      int idd=(*mapp2.find((*it).second)).second;
+      mcIdType idd=(*mapp2.find((*it).second)).second;
       tmpp.push_back(idd);
     }
-  std::vector<int> tmpp2(tmpp.size()+2);
+  std::vector<mcIdType> tmpp2(tmpp.size()+2);
   tmpp2[0]=startId;
   std::copy(tmpp.begin(),tmpp.end(),tmpp2.begin()+1);
   tmpp2[tmpp.size()+1]=endId;
-  std::vector<int>::iterator itt=std::unique(tmpp2.begin(),tmpp2.end());
+  std::vector<mcIdType>::iterator itt=std::unique(tmpp2.begin(),tmpp2.end());
   tmpp2.resize(std::distance(tmpp2.begin(),itt));
-  int nbOfEdges=tmpp2.size()-1;
-  for(int i=0;i<nbOfEdges;i++)
+  std::size_t nbOfEdges=tmpp2.size()-1;
+  for(std::size_t i=0;i<nbOfEdges;i++)
     {
       edgesThis.push_back(tmpp2[i]);
       edgesThis.push_back(tmpp2[i+1]);
     }
 }
 
-void Edge::fillGlobalInfoAbs(bool direction, const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                                std::vector<int>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int> mapAddCoo) const
+void Edge::fillGlobalInfoAbs(bool direction, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                                std::vector<mcIdType>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType> mapAddCoo) const
 {
-  int tmp[2];
+  mcIdType tmp[2];
   _start->fillGlobalInfoAbs(mapThis,mapOther,offset1,offset2,fact,baryX,baryY,addCoo,mapAddCoo,tmp);
   _end->fillGlobalInfoAbs(mapThis,mapOther,offset1,offset2,fact,baryX,baryY,addCoo,mapAddCoo,tmp+1);
   if(direction)
@@ -1090,9 +1090,9 @@ void Edge::fillGlobalInfoAbs(bool direction, const std::map<INTERP_KERNEL::Node
     }
 }
 
-void Edge::fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
+void Edge::fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
                               short skipStartOrEnd,
-                              std::vector<int>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo) const
+                              std::vector<mcIdType>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo) const
 {
   if (skipStartOrEnd != -1) // see meaning in splitAbs()
     _start->fillGlobalInfoAbs2(mapThis,mapOther,offset1,offset2,fact,baryX,baryY,addCoo,mapAddCoo,edgesOther);
index 1b4438e1d79f78ba3cebfc1177ee96da2bf8ad0d..32ee76a10d7aec9c6a4e632b78c196ab5a804ad4 100644 (file)
@@ -25,6 +25,7 @@
 #include "InterpKernelException.hxx"
 #include "InterpKernelGeo2DBounds.hxx"
 #include "InterpKernelGeo2DNode.hxx"
+#include "MCIdType.hxx"
 
 #include <iostream>
 #include <vector>
@@ -82,9 +83,9 @@ namespace INTERP_KERNEL
     bool isEnd2(unsigned rk) const;
     void clear();
     unsigned getNumberOfAssociations() const;
-    void updateMergedNodes(int e1Start, int e1End, int e2Start, int e2End, std::map<int,int>& mergedNodes);
+    void updateMergedNodes(mcIdType e1Start, mcIdType e1End, mcIdType e2Start, mcIdType e2End, std::map<mcIdType,mcIdType>& mergedNodes);
   private:
-    static void PushInMap(int key, int value, std::map<int,int>& mergedNodes);
+    static void PushInMap(mcIdType key, mcIdType value, std::map<mcIdType,mcIdType>& mergedNodes);
   private:
     unsigned _ass1Start1  : 1;
     unsigned _ass1End1    : 1;
@@ -281,14 +282,14 @@ namespace INTERP_KERNEL
     void dumpToCout(const std::map<INTERP_KERNEL::Node *,int>& mapp, int index) const;
     bool isEqual(const Edge& other) const;
   public:
-    bool sortSubNodesAbs(const double *coo, std::vector<int>& subNodes);
-    void sortIdsAbs(const std::vector<INTERP_KERNEL::Node *>& addNodes, const std::map<INTERP_KERNEL::Node *, int>& mapp1, const std::map<INTERP_KERNEL::Node *, int>& mapp2, std::vector<int>& edgesThis);
+    bool sortSubNodesAbs(const double *coo, std::vector<mcIdType>& subNodes);
+    void sortIdsAbs(const std::vector<INTERP_KERNEL::Node *>& addNodes, const std::map<INTERP_KERNEL::Node *, mcIdType>& mapp1, const std::map<INTERP_KERNEL::Node *, mcIdType>& mapp2, std::vector<mcIdType>& edgesThis);
     virtual Edge *buildEdgeLyingOnMe(Node *start, Node *end, bool direction=true) const = 0;
-    void fillGlobalInfoAbs(bool direction, const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                           std::vector<int>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int> mapAddCoo) const;
-    void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
+    void fillGlobalInfoAbs(bool direction, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                           std::vector<mcIdType>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType> mapAddCoo) const;
+    void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
                             short skipStartOrEnd,
-                            std::vector<int>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo) const;
+                            std::vector<mcIdType>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo) const;
 
   protected:
     Edge():_cnt(1),_loc(FULL_UNKNOWN),_start(0),_end(0) { }
index f73b9e154295082f7cbe64569e2786a5132d962e..d54a41f48ec83f73fbb7645297e68f4b14f0e712 100644 (file)
@@ -495,8 +495,8 @@ EdgeArcCircle::EdgeArcCircle(double sX, double sY, double mX, double mY, double
  * @param angle0 in ]-Pi;Pi[
  * @param deltaAngle in ]-2.*Pi;2.*Pi[
  */
-EdgeArcCircle::EdgeArcCircle(Node *start, Node *end, const double *center, double radius, double angle0, double deltaAngle, bool direction):Edge(start,end,direction),_angle(deltaAngle),
-    _angle0(angle0),_radius(radius)
+EdgeArcCircle::EdgeArcCircle(Node *start, Node *end, const double *center, double radius, double angle0, double deltaAngle, bool direction):Edge(start,end,direction),_angle0(angle0),_angle(deltaAngle),
+    _radius(radius)
 {
   _center[0]=center[0];
   _center[1]=center[1];
@@ -546,7 +546,7 @@ void EdgeArcCircle::unApplySimilarity(double xBary, double yBary, double dimChar
  * 'conn' is of size 3. conn[0] is start id, conn[1] is end id and conn[2] is middle id.
  * 'offset' is typically the number of nodes already existing in global 2D curve mesh. Additional coords 'addCoo' ids will be put after the already existing.
  */
-void EdgeArcCircle::tesselate(const int *conn, int offset, double eps, std::vector<int>& newConn, std::vector<double>& addCoo) const
+void EdgeArcCircle::tesselate(const mcIdType *conn, mcIdType offset, double eps, std::vector<mcIdType>& newConn, std::vector<double>& addCoo) const
 {
   newConn.push_back(INTERP_KERNEL::NORM_POLYL);
   int nbOfSubDiv=(int)(fabs(_angle)/eps);
@@ -556,7 +556,7 @@ void EdgeArcCircle::tesselate(const int *conn, int offset, double eps, std::vect
       return ;
     }
   double signOfAngle=_angle>0.?1.:-1.;
-  int offset2=offset+((int)addCoo.size())/2;
+  mcIdType offset2=offset+(ToIdType(addCoo.size()))/2;
   newConn.push_back(conn[0]);
   for(int i=1;i<nbOfSubDiv;i++,offset2++)
     {
index ea2373dc0396ce43dadc9c3a6824b00762364640..f15b5bbf4627d0d93413a3ce93d27361a173a989 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "INTERPKERNELDefines.hxx"
 #include "InterpKernelGeo2DEdge.hxx"
+#include "MCIdType.hxx"
 
 namespace INTERP_KERNEL
 {
@@ -106,7 +107,7 @@ namespace INTERP_KERNEL
     double getAngle0() const { return _angle0; }
     double getRadius() const { return _radius; }
     double getAngle() const { return _angle; }
-    void tesselate(const int *conn, int offset, double eps, std::vector<int>& newConn, std::vector<double>& addCoo) const;
+    void tesselate(const mcIdType *conn, mcIdType offset, double eps, std::vector<mcIdType>& newConn, std::vector<double>& addCoo) const;
     static EdgeArcCircle *BuildFromNodes(Node *start, Node *middle, Node *end);
     static double GetAbsoluteAngle(const double *vect, double& normVect);
     static double GetAbsoluteAngleOfNormalizedVect(double ux, double uy);
index 857821515afbefb22f62fe8b5a8e8a42beac4c4d..f0237a7ab94ff90a0f49dcc832011ae91478f193 100644 (file)
@@ -219,8 +219,8 @@ bool ElementaryEdge::isEqual(const ElementaryEdge& other) const
 /*!
  * Called by QuadraticPolygon::splitAbs method.
  */
-void ElementaryEdge::fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                                       std::vector<int>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int> mapAddCoo) const
+void ElementaryEdge::fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                                       std::vector<mcIdType>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType> mapAddCoo) const
 {
   _ptr->fillGlobalInfoAbs(_direction,mapThis,mapOther,offset1,offset2,fact,baryX,baryY,edgesThis,addCoo,mapAddCoo);
 }
@@ -229,12 +229,12 @@ void ElementaryEdge::fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,int>
  * Called by QuadraticPolygon::splitAbs method. Close to ElementaryEdge::fillGlobalInfoAbs method expect that here edgesOther (that replace edgesThis) is here an in/out parameter that only contains nodes
  * unsorted because the "other" mesh is not subdivided yet.
  */
-void ElementaryEdge::fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
+void ElementaryEdge::fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
                                         short skipStartOrEnd,
-                                        std::vector<int>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo) const
+                                        std::vector<mcIdType>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo) const
 {
   if (!_direction)
-    skipStartOrEnd *= -1;  // invert value - see QuadraticPolygon::splitAbs()
+    skipStartOrEnd = (short)(-skipStartOrEnd);  // invert value - see QuadraticPolygon::splitAbs()
   _ptr->fillGlobalInfoAbs2(mapThis,mapOther,offset1,offset2,fact,baryX,baryY,skipStartOrEnd,edgesOther,addCoo,mapAddCoo);
 }
 
index 3446b70ff1a0b51108fe007684f32585ff14362f..55b90d455f6daf87e597a17370c22867caabd670 100644 (file)
@@ -70,11 +70,11 @@ namespace INTERP_KERNEL
     INTERPKERNEL_EXPORT bool intresincEqCoarse(const Edge *other) const;
     INTERPKERNEL_EXPORT bool isEqual(const ElementaryEdge& other) const;
   public:
-    INTERPKERNEL_EXPORT void fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                                               std::vector<int>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int> mapAddCoo) const;
-    INTERPKERNEL_EXPORT void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
+    INTERPKERNEL_EXPORT void fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                                               std::vector<mcIdType>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType> mapAddCoo) const;
+    INTERPKERNEL_EXPORT void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
                                                 short skipStartOrEnd,
-                                                std::vector<int>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo) const;
+                                                std::vector<mcIdType>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo) const;
     INTERPKERNEL_EXPORT static ElementaryEdge *BuildEdgeFromStartEndDir(bool direction, INTERP_KERNEL::Node *start, INTERP_KERNEL::Node *end);
   private:
     bool _direction;
index c48d783f900b43b5402c4328b3dd1787c011317c..31f7622364c04cefa83b0334e63938d98296a688 100644 (file)
@@ -148,10 +148,10 @@ void Node::unApplySimilarity(double xBary, double yBary, double dimChar)
 /*!
  * Called by QuadraticPolygon::splitAbs method.
  */
-void Node::fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                             std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo, int *nodeId) const
+void Node::fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                             std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo, mcIdType *nodeId) const
 {
-  std::map<INTERP_KERNEL::Node *,int>::const_iterator it=mapOther.find(const_cast<Node *>(this));
+  std::map<INTERP_KERNEL::Node *,mcIdType>::const_iterator it=mapOther.find(const_cast<Node *>(this));
   if(it!=mapOther.end())     // order matters, try in mapOther first.
     {
       *nodeId=(*it).second+offset1;
@@ -179,10 +179,10 @@ void Node::fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,int>& mapThis,
 /*!
  * Called by QuadraticPolygon::splitAbs method.
  */
-void Node::fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                              std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo, std::vector<int>& pointsOther) const
+void Node::fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                              std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo, std::vector<mcIdType>& pointsOther) const
 {
-  int tmp;
+  mcIdType tmp;
   std::size_t sz1=addCoo.size();
   fillGlobalInfoAbs(mapThis,mapOther,offset1,offset2,fact,baryX,baryY,addCoo,mapAddCoo,&tmp);
   if(sz1!=addCoo.size()     // newly created point
@@ -192,7 +192,7 @@ void Node::fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,int>& mapThis
       pointsOther.push_back(tmp);
       return ;
     }
-  std::vector<int>::const_iterator it=std::find(pointsOther.begin(),pointsOther.end(),tmp);
+  std::vector<mcIdType>::const_iterator it=std::find(pointsOther.begin(),pointsOther.end(),tmp);
   if(it!=pointsOther.end())
     return ;
   pointsOther.push_back(tmp);
index be9ba0d581799f44809a67c33569b2fdde8f8161..b6ac1863e808afabbe525e5137dc6f51d032ac33 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "InterpKernelGeo2DPrecision.hxx"
 #include "INTERPKERNELDefines.hxx"
+#include "MCIdType.hxx"
 
 #include <map>
 #include <cmath>
@@ -96,10 +97,10 @@ namespace INTERP_KERNEL
     static double distanceBtw2Pt(const double *a, const double *b) { return sqrt((a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1])); }
     static double distanceBtw2PtSq(const double *a, const double *b) { return (a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1]); }
     //
-    void fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                           std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo, int *nodeId) const;
-    void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, double fact, double baryX, double baryY,
-                            std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,int>& mapAddCoo, std::vector<int>& pointsOther) const;
+    void fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                           std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo, mcIdType *nodeId) const;
+    void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+                            std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo, std::vector<mcIdType>& pointsOther) const;
   protected:
     ~Node();
   protected:
index 3e4c6c10ddc2b41e80f187e2c716730474bc1235..7494e5328b275c1089b3c7f2b52eab84ba5392b6 100644 (file)
@@ -284,12 +284,12 @@ double QuadraticPolygon::intersectWithAbs(QuadraticPolygon& other)
  * the cell id in global other mesh.
  */
 void QuadraticPolygon::splitAbs(QuadraticPolygon& other,
-                                const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther,
-                                int offset1, int offset2 ,
-                                const std::vector<int>& otherEdgeIds,
-                                std::vector<int>& edgesThis, int cellIdThis,
-                                std::vector< std::vector<int> >& edgesInOtherColinearWithThis, std::vector< std::vector<int> >& subDivOther,
-                                std::vector<double>& addCoo, std::map<int,int>& mergedNodes)
+                                const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther,
+                                mcIdType offset1, mcIdType offset2 ,
+                                const std::vector<mcIdType>& otherEdgeIds,
+                                std::vector<mcIdType>& edgesThis, mcIdType cellIdThis,
+                                std::vector< std::vector<mcIdType> >& edgesInOtherColinearWithThis, std::vector< std::vector<mcIdType> >& subDivOther,
+                                std::vector<double>& addCoo, std::map<mcIdType,mcIdType>& mergedNodes)
 {
   double xBaryBB, yBaryBB;
   double fact=normalizeExt(&other, xBaryBB, yBaryBB);
@@ -300,7 +300,7 @@ void QuadraticPolygon::splitAbs(QuadraticPolygon& other,
   ComposedEdge *cThis=new ComposedEdge;
   ComposedEdge *cOther=new ComposedEdge;
   int i=0;
-  std::map<INTERP_KERNEL::Node *,int> mapAddCoo;
+  std::map<INTERP_KERNEL::Node *,mcIdType> mapAddCoo;
   for(itOther.first();!itOther.finished();itOther.next(),i++)
     {
       // For each edge of 'other', proceed with intersections: the edge might split into sub-edges, 'otherTmp' will hold the final split result.
@@ -322,9 +322,9 @@ void QuadraticPolygon::splitAbs(QuadraticPolygon& other,
               ElementaryEdge* curThis=itThis.current();
               merge.clear();
               //
-              std::map<INTERP_KERNEL::Node *,int>::const_iterator thisStart(mapThis.find(curThis->getStartNode())),thisEnd(mapThis.find(curThis->getEndNode())),
+              std::map<INTERP_KERNEL::Node *,mcIdType>::const_iterator thisStart(mapThis.find(curThis->getStartNode())),thisEnd(mapThis.find(curThis->getEndNode())),
                                                                   otherStart(mapOther.find(curOtherTmp->getStartNode())),otherEnd(mapOther.find(curOtherTmp->getEndNode()));
-              int thisStart2(thisStart==mapThis.end()?-1:(*thisStart).second), thisEnd2(thisEnd==mapThis.end()?-1:(*thisEnd).second),
+              mcIdType thisStart2(thisStart==mapThis.end()?-1:(*thisStart).second), thisEnd2(thisEnd==mapThis.end()?-1:(*thisEnd).second),
                   otherStart2(otherStart==mapOther.end()?-1:(*otherStart).second+offset1),otherEnd2(otherEnd==mapOther.end()?-1:(*otherEnd).second+offset1);
               //
               if(curThis->getPtr()->intersectWith(curOtherTmp->getPtr(),merge,*cThis,*cOther))
@@ -362,7 +362,7 @@ void QuadraticPolygon::splitAbs(QuadraticPolygon& other,
       // Converting back to integer connectivity:
       if(otherTmp._sub_edges.size()>1)   // only if a new point has been added (i.e. an actual intersection was done)
         {
-          int jj = 0, sz(otherTmp._sub_edges.size());
+          std::size_t jj = 0, sz(otherTmp._sub_edges.size());
           for(std::list<ElementaryEdge *>::const_iterator it=otherTmp._sub_edges.begin();it!=otherTmp._sub_edges.end();it++, jj++)
             {
               short skipStartOrEnd = jj == 0 ? -1 : (jj == sz-1 ? 1 : 0);  // -1 means START, 1 means END, 0 other
@@ -386,8 +386,8 @@ void QuadraticPolygon::splitAbs(QuadraticPolygon& other,
  * orientation of edge (see buildDescendingConnectivity2() method).
  * See appendEdgeFromCrudeDataArray() for params description.
  */
-void QuadraticPolygon::buildFromCrudeDataArray(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords,
-                                               const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges)
+void QuadraticPolygon::buildFromCrudeDataArray(const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp, bool isQuad, const mcIdType *nodalBg, const double *coords,
+                                               const mcIdType *descBg, const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges)
 {
   std::size_t nbOfSeg=std::distance(descBg,descEnd);
   for(std::size_t i=0;i<nbOfSeg;i++)
@@ -396,15 +396,15 @@ void QuadraticPolygon::buildFromCrudeDataArray(const std::map<int,INTERP_KERNEL:
     }
 }
 
-void QuadraticPolygon::appendEdgeFromCrudeDataArray(std::size_t edgePos, const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad,
-                                                    const int *nodalBg, const double *coords,
-                                                    const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges)
+void QuadraticPolygon::appendEdgeFromCrudeDataArray(std::size_t edgePos, const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp, bool isQuad,
+                                                    const mcIdType *nodalBg, const double *coords,
+                                                    const mcIdType *descBg, const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges)
 {
   if(!isQuad)
     {
       bool direct=descBg[edgePos]>0;
-      int edgeId=abs(descBg[edgePos])-1; // back to C indexing mode
-      const std::vector<int>& subEdge=intersectEdges[edgeId];
+      mcIdType edgeId=std::abs(descBg[edgePos])-1; // back to C indexing mode
+      const std::vector<mcIdType>& subEdge=intersectEdges[edgeId];
       std::size_t nbOfSubEdges=subEdge.size()/2;
       for(std::size_t j=0;j<nbOfSubEdges;j++)
         appendSubEdgeFromCrudeDataArray(0,j,direct,edgeId,subEdge,mapp);
@@ -426,8 +426,8 @@ void QuadraticPolygon::appendEdgeFromCrudeDataArray(std::size_t edgePos, const s
       delete e1; delete e2;
       //
       bool direct=descBg[edgePos]>0;
-      int edgeId=abs(descBg[edgePos])-1;
-      const std::vector<int>& subEdge=intersectEdges[edgeId];
+      mcIdType edgeId=std::abs(descBg[edgePos])-1;
+      const std::vector<mcIdType>& subEdge=intersectEdges[edgeId];
       std::size_t nbOfSubEdges=subEdge.size()/2;
       if(colinearity)
         {   
@@ -445,7 +445,7 @@ void QuadraticPolygon::appendEdgeFromCrudeDataArray(std::size_t edgePos, const s
     }
 }
 
-void QuadraticPolygon::appendSubEdgeFromCrudeDataArray(Edge *baseEdge, std::size_t j, bool direct, int edgeId, const std::vector<int>& subEdge, const std::map<int,INTERP_KERNEL::Node *>& mapp)
+void QuadraticPolygon::appendSubEdgeFromCrudeDataArray(Edge *baseEdge, std::size_t j, bool direct, mcIdType edgeId, const std::vector<mcIdType>& subEdge, const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp)
 {
   std::size_t nbOfSubEdges=subEdge.size()/2;
   if(!baseEdge)
@@ -469,17 +469,17 @@ void QuadraticPolygon::appendSubEdgeFromCrudeDataArray(Edge *baseEdge, std::size
  * This method builds from descending conn of a quadratic polygon stored in crude mode (MEDCoupling). Descending conn is in FORTRAN relative mode in order to give the
  * orientation of edge.
  */
-void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords, const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges2,
-                                                const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1, const std::vector<std::vector<int> >& intersectEdges1,
-                                                const std::vector< std::vector<int> >& colinear1,
-                                                std::map<int,std::vector<INTERP_KERNEL::ElementaryEdge *> >& alreadyExistingIn2)
+void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp, bool isQuad, const mcIdType *nodalBg, const double *coords, const mcIdType *descBg, const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges2,
+                                                const INTERP_KERNEL::QuadraticPolygon& pol1, const mcIdType *descBg1, const mcIdType *descEnd1, const std::vector<std::vector<mcIdType> >& intersectEdges1,
+                                                const std::vector< std::vector<mcIdType> >& colinear1,
+                                                std::map<mcIdType,std::vector<INTERP_KERNEL::ElementaryEdge *> >& alreadyExistingIn2)
 {
   std::size_t nbOfSeg=std::distance(descBg,descEnd);
   for(std::size_t i=0;i<nbOfSeg;i++)//loop over all edges of pol2
     {
       bool direct=descBg[i]>0;
-      int edgeId=abs(descBg[i])-1;//current edge id of pol2
-      std::map<int,std::vector<INTERP_KERNEL::ElementaryEdge *> >::const_iterator it1=alreadyExistingIn2.find(descBg[i]),it2=alreadyExistingIn2.find(-descBg[i]);
+      mcIdType edgeId=std::abs(descBg[i])-1;//current edge id of pol2
+      std::map<mcIdType,std::vector<INTERP_KERNEL::ElementaryEdge *> >::const_iterator it1=alreadyExistingIn2.find(descBg[i]),it2=alreadyExistingIn2.find(-descBg[i]);
       if(it1!=alreadyExistingIn2.end() || it2!=alreadyExistingIn2.end())
         {
           bool sameDir=(it1!=alreadyExistingIn2.end());
@@ -503,21 +503,21 @@ void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL
           continue;
         }
       bool directos=colinear1[edgeId].empty();
-      std::vector<std::pair<int,std::pair<bool,int> > > idIns1;
-      int offset1=0;
+      std::vector<std::pair<mcIdType,std::pair<bool,mcIdType> > > idIns1;
+      mcIdType offset1=0;
       if(!directos)
         {// if the current edge of pol2 has one or more colinear edges part into pol1
-          const std::vector<int>& c=colinear1[edgeId];
+          const std::vector<mcIdType>& c=colinear1[edgeId];
           std::size_t nbOfEdgesIn1=std::distance(descBg1,descEnd1);
           for(std::size_t j=0;j<nbOfEdgesIn1;j++)
             {
-              int edgeId1=abs(descBg1[j])-1;
+              mcIdType edgeId1=std::abs(descBg1[j])-1;
               if(std::find(c.begin(),c.end(),edgeId1)!=c.end())
                 {
-                  idIns1.push_back(std::pair<int,std::pair<bool,int> >(edgeId1,std::pair<bool,int>(descBg1[j]>0,offset1)));// it exists an edge into pol1 given by tuple (idIn1,direct1) that is colinear at edge 'edgeId' in pol2
+                  idIns1.push_back(std::pair<mcIdType,std::pair<bool,mcIdType> >(edgeId1,std::pair<bool,mcIdType>(descBg1[j]>0,offset1)));// it exists an edge into pol1 given by tuple (idIn1,direct1) that is colinear at edge 'edgeId' in pol2
                   //std::pair<edgeId1); direct1=descBg1[j]>0;
                 }
-              offset1+=intersectEdges1[edgeId1].size()/2;//offset1 is used to find the INTERP_KERNEL::Edge * instance into pol1 that will be part of edge into pol2
+              offset1+=ToIdType(intersectEdges1[edgeId1].size()/2);//offset1 is used to find the INTERP_KERNEL::Edge * instance into pol1 that will be part of edge into pol2
             }
           directos=idIns1.empty();
         }
@@ -534,25 +534,25 @@ void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL
         }
       else
         {//there is subpart of edge 'edgeId' of pol2 inside pol1
-          const std::vector<int>& subEdge=intersectEdges2[edgeId];
+          const std::vector<mcIdType>& subEdge=intersectEdges2[edgeId];
           std::size_t nbOfSubEdges=subEdge.size()/2;
           for(std::size_t j=0;j<nbOfSubEdges;j++)
             {
-              int idBg=direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1];
-              int idEnd=direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2];
+              mcIdType idBg=direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1];
+              mcIdType idEnd=direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2];
               bool direction11,found=false;
               bool direct1;//store if needed the direction in 1
-              int offset2;
-              std::size_t nbOfSubEdges1;
-              for(std::vector<std::pair<int,std::pair<bool,int> > >::const_iterator it=idIns1.begin();it!=idIns1.end() && !found;it++)
+              mcIdType offset2;
+              mcIdType nbOfSubEdges1;
+              for(std::vector<std::pair<mcIdType,std::pair<bool,mcIdType> > >::const_iterator it=idIns1.begin();it!=idIns1.end() && !found;it++)
                 {
-                  int idIn1=(*it).first;//store if needed the cell id in 1
+                  mcIdType idIn1=(*it).first;//store if needed the cell id in 1
                   direct1=(*it).second.first;
                   offset1=(*it).second.second;
-                  const std::vector<int>& subEdge1PossiblyAlreadyIn1=intersectEdges1[idIn1];
-                  nbOfSubEdges1=subEdge1PossiblyAlreadyIn1.size()/2;
+                  const std::vector<mcIdType>& subEdge1PossiblyAlreadyIn1=intersectEdges1[idIn1];
+                  nbOfSubEdges1=ToIdType(subEdge1PossiblyAlreadyIn1.size()/2);
                   offset2=0;
-                  for(std::size_t k=0;k<nbOfSubEdges1 && !found;k++)
+                  for(mcIdType k=0;k<nbOfSubEdges1 && !found;k++)
                     {//perform a loop on all subedges of pol1 that includes edge 'edgeId' of pol2. For the moment we iterate only on subedges of ['idIn1']... To improve
                       if(subEdge1PossiblyAlreadyIn1[2*k]==idBg && subEdge1PossiblyAlreadyIn1[2*k+1]==idEnd)
                         { direction11=true; found=true; }
@@ -573,7 +573,7 @@ void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL
                 }
               else
                 {//the current subedge of edge 'edgeId' of pol2 is part of the colinear edge 'idIn1' of pol1 -> reuse Edge instance of pol1
-                  ElementaryEdge *e=pol1[offset1+(direct1?offset2:nbOfSubEdges1-offset2-1)];
+                  ElementaryEdge *e=pol1[FromIdType<int>(offset1+(direct1?offset2:nbOfSubEdges1-offset2-1))];
                   Edge *ee=e->getPtr();
                   ee->incrRef();
                   ElementaryEdge *e2=new ElementaryEdge(ee,!(direct1^direction11));
@@ -589,39 +589,39 @@ void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL
  * Method expected to be called on pol2. Every params not suffixed by numbered are supposed to refer to pol2 (this).
  * Method to find edges that are ON.
  */
-void QuadraticPolygon::updateLocOfEdgeFromCrudeDataArray2(const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges,
-                                                          const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1,
-                                                          const std::vector<std::vector<int> >& intersectEdges1, const std::vector< std::vector<int> >& colinear1) const
+void QuadraticPolygon::updateLocOfEdgeFromCrudeDataArray2(const mcIdType *descBg, const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges,
+                                                          const INTERP_KERNEL::QuadraticPolygon& pol1, const mcIdType *descBg1, const mcIdType *descEnd1,
+                                                          const std::vector<std::vector<mcIdType> >& intersectEdges1, const std::vector< std::vector<mcIdType> >& colinear1) const
 {
   std::size_t nbOfSeg=std::distance(descBg,descEnd);
   for(std::size_t i=0;i<nbOfSeg;i++)//loop over all edges of pol2
     {
       bool direct=descBg[i]>0;
-      int edgeId=abs(descBg[i])-1;//current edge id of pol2
-      const std::vector<int>& c=colinear1[edgeId];
+      mcIdType edgeId=std::abs(descBg[i])-1;//current edge id of pol2
+      const std::vector<mcIdType>& c=colinear1[edgeId];
       if(c.empty())
         continue;
-      const std::vector<int>& subEdge=intersectEdges[edgeId];
+      const std::vector<mcIdType>& subEdge=intersectEdges[edgeId];
       std::size_t nbOfSubEdges=subEdge.size()/2;
       //
       std::size_t nbOfEdgesIn1=std::distance(descBg1,descEnd1);
-      int offset1=0;
+      mcIdType offset1=0;
       for(std::size_t j=0;j<nbOfEdgesIn1;j++)
         {
-          int edgeId1=abs(descBg1[j])-1;
+          mcIdType edgeId1=std::abs(descBg1[j])-1;
           if(std::find(c.begin(),c.end(),edgeId1)!=c.end())
             {
               for(std::size_t k=0;k<nbOfSubEdges;k++)
                 {
-                  int idBg=direct?subEdge[2*k]:subEdge[2*nbOfSubEdges-2*k-1];
-                  int idEnd=direct?subEdge[2*k+1]:subEdge[2*nbOfSubEdges-2*k-2];
-                  int idIn1=edgeId1;
+                  mcIdType idBg=direct?subEdge[2*k]:subEdge[2*nbOfSubEdges-2*k-1];
+                  mcIdType idEnd=direct?subEdge[2*k+1]:subEdge[2*nbOfSubEdges-2*k-2];
+                  mcIdType idIn1=edgeId1;
                   bool direct1=descBg1[j]>0;
-                  const std::vector<int>& subEdge1PossiblyAlreadyIn1=intersectEdges1[idIn1];
-                  std::size_t nbOfSubEdges1=subEdge1PossiblyAlreadyIn1.size()/2;
-                  int offset2=0;
+                  const std::vector<mcIdType>& subEdge1PossiblyAlreadyIn1=intersectEdges1[idIn1];
+                  mcIdType nbOfSubEdges1=ToIdType(subEdge1PossiblyAlreadyIn1.size()/2);
+                  mcIdType offset2=0;
                   bool found=false;
-                  for(std::size_t kk=0;kk<nbOfSubEdges1 && !found;kk++)
+                  for(mcIdType kk=0;kk<nbOfSubEdges1 && !found;kk++)
                     {
                       found=(subEdge1PossiblyAlreadyIn1[2*kk]==idBg && subEdge1PossiblyAlreadyIn1[2*kk+1]==idEnd) || (subEdge1PossiblyAlreadyIn1[2*kk]==idEnd && subEdge1PossiblyAlreadyIn1[2*kk+1]==idBg);
                       if(!found)
@@ -629,17 +629,17 @@ void QuadraticPolygon::updateLocOfEdgeFromCrudeDataArray2(const int *descBg, con
                     }
                   if(found)
                     {
-                      ElementaryEdge *e=pol1[offset1+(direct1?offset2:nbOfSubEdges1-offset2-1)];
+                      ElementaryEdge *e=pol1[(int)(offset1+(direct1?offset2:nbOfSubEdges1-offset2-1))];
                       e->getPtr()->declareOn();
                     }
                 }
             }
-          offset1+=intersectEdges1[edgeId1].size()/2;//offset1 is used to find the INTERP_KERNEL::Edge * instance into pol1 that will be part of edge into pol2
+          offset1+=ToIdType(intersectEdges1[edgeId1].size()/2);//offset1 is used to find the INTERP_KERNEL::Edge * instance into pol1 that will be part of edge into pol2
         }
     }
 }
 
-void QuadraticPolygon::appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>& mapp, double xBary, double yBary, double fact, int offset, std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI) const
+void QuadraticPolygon::appendCrudeData(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapp, double xBary, double yBary, double fact, mcIdType offset, std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& conn, std::vector<mcIdType>& connI) const
 {
   int nbOfNodesInPg=0;
   bool presenceOfQuadratic=presenceOfQuadraticEdge();
@@ -648,14 +648,14 @@ void QuadraticPolygon::appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>
     {
       Node *tmp=0;
       tmp=(*it)->getStartNode();
-      std::map<INTERP_KERNEL::Node *,int>::const_iterator it1=mapp.find(tmp);
+      std::map<INTERP_KERNEL::Node *,mcIdType>::const_iterator it1=mapp.find(tmp);
       conn.push_back((*it1).second);
       nbOfNodesInPg++;
     }
   if(presenceOfQuadratic)
     {
       int j=0;
-      int off=offset+((int)addCoordsQuadratic.size())/2;
+      mcIdType off=offset+ToIdType(addCoordsQuadratic.size())/2;
       for(std::list<ElementaryEdge *>::const_iterator it=_sub_edges.begin();it!=_sub_edges.end();it++,j++,nbOfNodesInPg++)
         {
           INTERP_KERNEL::Node *node=(*it)->getPtr()->buildRepresentantOfMySelf();
@@ -676,9 +676,9 @@ void QuadraticPolygon::appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>
  * @param [in,out] edgesBoundaryOther, parameter that stores all edges in result of intersection that are not
  */
 void QuadraticPolygon::buildPartitionsAbs(QuadraticPolygon& other, std::set<INTERP_KERNEL::Edge *>& edgesThis, std::set<INTERP_KERNEL::Edge *>& edgesBoundaryOther,
-                                          const std::map<INTERP_KERNEL::Node *,int>& mapp, int idThis, int idOther, int offset,
-                                          std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI,
-                                          std::vector<int>& nbThis, std::vector<int>& nbOther)
+                                          const std::map<INTERP_KERNEL::Node *,mcIdType>& mapp, mcIdType idThis, mcIdType idOther, mcIdType offset,
+                                          std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& conn, std::vector<mcIdType>& connI,
+                                          std::vector<mcIdType>& nbThis, std::vector<mcIdType>& nbOther)
 {
   double xBaryBB, yBaryBB;
   double fact=normalizeExt(&other, xBaryBB, yBaryBB);
@@ -1244,9 +1244,9 @@ std::list<QuadraticPolygon *>::iterator QuadraticPolygon::CheckInList(Node *n, s
 *      intersecting cells
 */
 void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std::set<Edge *>& notUsedInPol1, const std::set<Edge *>& edgesInPol2OnBoundary,
-                                       const std::map<INTERP_KERNEL::Node *,int>& mapp, int offset, int idThis,
-                                       std::vector<double>& addCoordsQuadratic, std::vector<int>& conn,
-                                       std::vector<int>& connI, std::vector<int>& nb1, std::vector<int>& nb2)
+                                       const std::map<INTERP_KERNEL::Node *,mcIdType>& mapp, mcIdType offset, mcIdType idThis,
+                                       std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& conn,
+                                       std::vector<mcIdType>& connI, std::vector<mcIdType>& nb1, std::vector<mcIdType>& nb2)
 {
   // Initialise locations on pol1. Remember that edges found in 'notUsedInPol1' are also part of the edges forming pol1.
   pol1.initLocations();
index 4814be460fe0e7bd982e0ac5e8d0df6b0d61bfa7..478b10ad2cc8cbaabd271380d7d21562ca801326 100644 (file)
@@ -66,21 +66,21 @@ namespace INTERP_KERNEL
     INTERPKERNEL_EXPORT double intersectWithAbs1D(QuadraticPolygon& other, bool& isColinear);
     //! Before intersecting as intersectWith a normalization is done.
     INTERPKERNEL_EXPORT double intersectWithAbs(QuadraticPolygon& other, double* barycenter);
-    INTERPKERNEL_EXPORT void splitAbs(QuadraticPolygon& other, const std::map<INTERP_KERNEL::Node *,int>& mapThis, const std::map<INTERP_KERNEL::Node *,int>& mapOther, int offset1, int offset2, const std::vector<int>& otherEdgeIds,
-                                      std::vector<int>& edgesThis, int cellIdThis, std::vector< std::vector<int> >& edgesInOtherColinearWithThis, std::vector< std::vector<int> >& subDivOther, std::vector<double>& addCoo, std::map<int,int>& mergedNodes);
-    INTERPKERNEL_EXPORT void buildFromCrudeDataArray(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords,
-                                                     const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges);
-    INTERPKERNEL_EXPORT void buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords, const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges,
-                                                      const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1, const std::vector<std::vector<int> >& intersectEdges1,
-                                                      const std::vector< std::vector<int> >& colinear1,
-                                                      std::map<int,std::vector<INTERP_KERNEL::ElementaryEdge *> >& alreadyExistingIn2);
-    INTERPKERNEL_EXPORT void updateLocOfEdgeFromCrudeDataArray2(const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges, const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1, const std::vector<std::vector<int> >& intersectEdges1, const std::vector< std::vector<int> >& colinear1) const;
-    INTERPKERNEL_EXPORT void appendEdgeFromCrudeDataArray(std::size_t edgeId, const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords,
-                                                          const int *descBg,  const int *descEnd, const std::vector<std::vector<int> >& intersectEdges);
-    INTERPKERNEL_EXPORT void appendSubEdgeFromCrudeDataArray(Edge *baseEdge, std::size_t j, bool direct, int edgeId, const std::vector<int>& subEdge, const std::map<int,INTERP_KERNEL::Node *>& mapp);
-    INTERPKERNEL_EXPORT void appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>& mapp, double xBary, double yBary, double fact, int offset, std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI) const;
-    INTERPKERNEL_EXPORT void buildPartitionsAbs(QuadraticPolygon& other, std::set<INTERP_KERNEL::Edge *>& edgesThis, std::set<INTERP_KERNEL::Edge *>& edgesBoundaryOther, const std::map<INTERP_KERNEL::Node *,int>& mapp, int idThis, int idOther, int offset,
-                                                std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI, std::vector<int>& nb1, std::vector<int>& nb2);
+    INTERPKERNEL_EXPORT void splitAbs(QuadraticPolygon& other, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, const std::vector<mcIdType>& otherEdgeIds,
+                                      std::vector<mcIdType>& edgesThis, mcIdType cellIdThis, std::vector< std::vector<mcIdType> >& edgesInOtherColinearWithThis, std::vector< std::vector<mcIdType> >& subDivOther, std::vector<double>& addCoo, std::map<mcIdType,mcIdType>& mergedNodes);
+    INTERPKERNEL_EXPORT void buildFromCrudeDataArray(const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp, bool isQuad, const mcIdType *nodalBg, const double *coords,
+                                                     const mcIdType *descBg, const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges);
+    INTERPKERNEL_EXPORT void buildFromCrudeDataArray2(const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp, bool isQuad, const mcIdType *nodalBg, const double *coords, const mcIdType *descBg, const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges,
+                                                      const INTERP_KERNEL::QuadraticPolygon& pol1, const mcIdType *descBg1, const mcIdType *descEnd1, const std::vector<std::vector<mcIdType> >& intersectEdges1,
+                                                      const std::vector< std::vector<mcIdType> >& colinear1,
+                                                      std::map<mcIdType,std::vector<INTERP_KERNEL::ElementaryEdge *> >& alreadyExistingIn2);
+    INTERPKERNEL_EXPORT void updateLocOfEdgeFromCrudeDataArray2(const mcIdType *descBg, const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges, const INTERP_KERNEL::QuadraticPolygon& pol1, const mcIdType *descBg1, const mcIdType *descEnd1, const std::vector<std::vector<mcIdType> >& intersectEdges1, const std::vector< std::vector<mcIdType> >& colinear1) const;
+    INTERPKERNEL_EXPORT void appendEdgeFromCrudeDataArray(std::size_t edgeId, const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp, bool isQuad, const mcIdType *nodalBg, const double *coords,
+                                                          const mcIdType *descBg,  const mcIdType *descEnd, const std::vector<std::vector<mcIdType> >& intersectEdges);
+    INTERPKERNEL_EXPORT void appendSubEdgeFromCrudeDataArray(Edge *baseEdge, std::size_t j, bool direct, mcIdType edgeId, const std::vector<mcIdType>& subEdge, const std::map<mcIdType,INTERP_KERNEL::Node *>& mapp);
+    INTERPKERNEL_EXPORT void appendCrudeData(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapp, double xBary, double yBary, double fact, mcIdType offset, std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& conn, std::vector<mcIdType>& connI) const;
+    INTERPKERNEL_EXPORT void buildPartitionsAbs(QuadraticPolygon& other, std::set<INTERP_KERNEL::Edge *>& edgesThis, std::set<INTERP_KERNEL::Edge *>& edgesBoundaryOther, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapp, mcIdType idThis, mcIdType idOther, mcIdType offset,
+                                                std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& conn, std::vector<mcIdType>& connI, std::vector<mcIdType>& nb1, std::vector<mcIdType>& nb2);
     //
     INTERPKERNEL_EXPORT double intersectWith(const QuadraticPolygon& other) const;
     INTERPKERNEL_EXPORT double intersectWith(const QuadraticPolygon& other, double* barycenter) const;
@@ -95,8 +95,8 @@ namespace INTERP_KERNEL
     INTERPKERNEL_EXPORT std::vector<QuadraticPolygon *> buildIntersectionPolygons(const QuadraticPolygon& pol1, const QuadraticPolygon& pol2) const;
     INTERPKERNEL_EXPORT bool haveIAChanceToBeCompletedBy(const QuadraticPolygon& pol1NotSplitted, const QuadraticPolygon& pol2Splitted,
                                                          bool& direction, bool& needCleaning) const;
-    INTERPKERNEL_EXPORT static void ComputeResidual(const QuadraticPolygon& pol1, const std::set<Edge *>& notUsedInPol1, const std::set<Edge *>& edgesInPol2OnBoundary, const std::map<INTERP_KERNEL::Node *,int>& mapp, int offset, int idThis,
-                                                    std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI, std::vector<int>& nb1, std::vector<int>& nb2);
+    INTERPKERNEL_EXPORT static void ComputeResidual(const QuadraticPolygon& pol1, const std::set<Edge *>& notUsedInPol1, const std::set<Edge *>& edgesInPol2OnBoundary, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapp, mcIdType offset, mcIdType idThis,
+                                                    std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& conn, std::vector<mcIdType>& connI, std::vector<mcIdType>& nb1, std::vector<mcIdType>& nb2);
     INTERPKERNEL_EXPORT void cleanDegeneratedConsecutiveEdges();
   protected:
     std::list<QuadraticPolygon *> zipConsecutiveInSegments() const;
index d929824c8e756713ab1c462a42a60975b3c92490..1fbbb27a132bceb740321882e9f9b794034d14d7 100644 (file)
@@ -94,9 +94,9 @@ namespace INTERP_KERNEL
     nodes[1]=new Node(quadrangle[SPACEDIM],quadrangle[SPACEDIM+1]);
     nodes[2]=new Node(quadrangle[2*SPACEDIM],quadrangle[2*SPACEDIM+1]);
     nodes[3]=new Node(quadrangle[3*SPACEDIM],quadrangle[3*SPACEDIM+1]);
-    int nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
+    std::size_t nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
     std::vector<Node *> nodes2(nbOfSourceNodes);
-    for(int i=0;i<nbOfSourceNodes;i++)
+    for(std::size_t i=0;i<nbOfSourceNodes;i++)
       nodes2[i]=new Node(sourceCoords[i*SPACEDIM],sourceCoords[i*SPACEDIM+1]);
     QuadraticPolygon *p1=QuadraticPolygon::BuildLinearPolygon(nodes);
     QuadraticPolygon *p2;
@@ -113,13 +113,13 @@ namespace INTERP_KERNEL
   double GEO2D_INTERSECTOR::intersectGeometryGeneral(const std::vector<double>& targetCoords,
                                                      const std::vector<double>& sourceCoords)
   {
-    int nbOfTargetNodes=targetCoords.size()/SPACEDIM;
+    std::size_t nbOfTargetNodes=targetCoords.size()/SPACEDIM;
     std::vector<Node *> nodes(nbOfTargetNodes);
-    for(int i=0;i<nbOfTargetNodes;i++)
+    for(std::size_t i=0;i<nbOfTargetNodes;i++)
       nodes[i]=new Node(targetCoords[i*SPACEDIM],targetCoords[i*SPACEDIM+1]);
-    int nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
+    std::size_t nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
     std::vector<Node *> nodes2(nbOfSourceNodes);
-    for(int i=0;i<nbOfSourceNodes;i++)
+    for(std::size_t i=0;i<nbOfSourceNodes;i++)
       nodes2[i]=new Node(sourceCoords[i*SPACEDIM],sourceCoords[i*SPACEDIM+1]);
     QuadraticPolygon *p1=QuadraticPolygon::BuildLinearPolygon(nodes);
     QuadraticPolygon *p2=QuadraticPolygon::BuildLinearPolygon(nodes2);
@@ -148,9 +148,9 @@ namespace INTERP_KERNEL
     nodes[0]=new Node(sourceTria[0*SPACEDIM],sourceTria[0*SPACEDIM+1]);
     nodes[1]=new Node(sourceTria[1*SPACEDIM],sourceTria[1*SPACEDIM+1]);
     nodes[2]=new Node(sourceTria[2*SPACEDIM],sourceTria[2*SPACEDIM+1]);
-    int nbOfTargetNodes=targetCell.size()/SPACEDIM;
+    std::size_t nbOfTargetNodes=targetCell.size()/SPACEDIM;
     std::vector<Node *> nodes2(nbOfTargetNodes);
-    for(int i=0;i<nbOfTargetNodes;i++)
+    for(std::size_t i=0;i<nbOfTargetNodes;i++)
       nodes2[i]=new Node(targetCell[i*SPACEDIM],targetCell[i*SPACEDIM+1]);
     QuadraticPolygon *p1=QuadraticPolygon::BuildLinearPolygon(nodes);
     QuadraticPolygon *p2;
@@ -183,9 +183,9 @@ namespace INTERP_KERNEL
   INTERSECTOR_TEMPLATE
   QuadraticPolygon *GEO2D_INTERSECTOR::buildPolygonFrom(const std::vector<double>& coords, NormalizedCellType type)
   {
-    int nbNodes=coords.size()/SPACEDIM;
+    std::size_t nbNodes=coords.size()/SPACEDIM;
     std::vector<Node *> nodes(nbNodes);
-    for(int i=0;i<nbNodes;i++)
+    for(std::size_t i=0;i<nbNodes;i++)
       nodes[i]=new Node(coords[i*SPACEDIM],coords[i*SPACEDIM+1]);
     if(!CellModel::GetCellModel(type).isQuadratic())
       return QuadraticPolygon::BuildLinearPolygon(nodes);
index 4b9c4b7cc3b70c5d87321fc9afb4a47383a446f9..8f4f5516feb6ff8c467609c3b132068c292b7466 100644 (file)
@@ -51,8 +51,8 @@ namespace INTERP_KERNEL
     typedef typename MyMeshType::MyConnType ConnType;
   public:
     IntegralUniformIntersectorP0(const MyMeshType& mesh, bool isAbs);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res);
   };
 
@@ -63,8 +63,8 @@ namespace INTERP_KERNEL
     typedef typename MyMeshType::MyConnType ConnType;
   public:
     IntegralUniformIntersectorP1(const MyMeshType& mesh, bool isAbs);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res);
   };
 }
old mode 100644 (file)
new mode 100755 (executable)
index e5b84ea..d328faa
@@ -69,7 +69,7 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int IntegralUniformIntersectorP0<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType IntegralUniformIntersectorP0<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     if(IntegralUniformIntersector<MyMeshType,MyMatrix>::_from_to)
       return 1;
@@ -78,7 +78,7 @@ namespace INTERP_KERNEL
   }
   
   template<class MyMeshType, class MyMatrix>
-  int IntegralUniformIntersectorP0<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType IntegralUniformIntersectorP0<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     if(IntegralUniformIntersector<MyMeshType,MyMatrix>::_from_to)
       return IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getNumberOfElements();
@@ -91,11 +91,11 @@ namespace INTERP_KERNEL
   {
     static const NumberingPolicy numPol=MyMeshType::My_numPol;
     res.resize(getNumberOfRowsOfResMatrix());
-    unsigned long nbelem=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getNumberOfElements();
+    ConnType nbelem=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getNumberOfElements();
     const ConnType *connIndx=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getConnectivityIndexPtr();
     const ConnType *conn=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getConnectivityPtr();
     const double *coords=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getCoordinatesPtr();
-    for(unsigned long i=0;i<nbelem;i++)
+    for(ConnType i=0;i<nbelem;i++)
       {
         INTERP_KERNEL::NormalizedCellType t=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(i));
         double val=computeVolSurfOfCell<ConnType,numPol,MyMeshType::MY_SPACEDIM>(t,conn+OTT<ConnType,numPol>::ind2C(connIndx[i]),connIndx[i+1]-connIndx[i],coords);
@@ -109,7 +109,7 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int IntegralUniformIntersectorP1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType IntegralUniformIntersectorP1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     if(IntegralUniformIntersector<MyMeshType,MyMatrix>::_from_to)
       return 1;
@@ -118,7 +118,7 @@ namespace INTERP_KERNEL
   }
   
   template<class MyMeshType, class MyMatrix>
-  int IntegralUniformIntersectorP1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType IntegralUniformIntersectorP1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     if(IntegralUniformIntersector<MyMeshType,MyMatrix>::_from_to)
       return IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getNumberOfNodes();
@@ -131,14 +131,14 @@ namespace INTERP_KERNEL
   {
     static const NumberingPolicy numPol=MyMeshType::My_numPol;
     res.resize(getNumberOfRowsOfResMatrix());
-    unsigned long nbelem=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getNumberOfElements();
+    ConnType nbelem=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getNumberOfElements();
     const ConnType *connIndx=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getConnectivityIndexPtr();
     const ConnType *conn=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getConnectivityPtr();
     const double *coords=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getCoordinatesPtr();
-    for(unsigned long i=0;i<nbelem;i++)
+    for(ConnType i=0;i<nbelem;i++)
       {
         INTERP_KERNEL::NormalizedCellType t=IntegralUniformIntersector<MyMeshType,MyMatrix>::_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(i));
-        int lgth=connIndx[i+1]-connIndx[i];
+        ConnType lgth=connIndx[i+1]-connIndx[i];
         const ConnType *locConn=conn+OTT<ConnType,numPol>::ind2C(connIndx[i]);
         double val=computeVolSurfOfCell<ConnType,numPol,MyMeshType::MY_SPACEDIM>(t,locConn,lgth,coords);
         if(t==NORM_TRI3)
@@ -147,7 +147,7 @@ namespace INTERP_KERNEL
           val/=4.;
         else
           throw INTERP_KERNEL::Exception("Invalid cell type detected : must be TRI3 or TETRA4 ! ");
-        for(int j=0;j<lgth;j++)
+        for(ConnType j=0;j<lgth;j++)
           IntegralUniformIntersector<MyMeshType,MyMatrix>::putValueIn(OTT<ConnType,numPol>::coo2C(locConn[j]),val,res);
       }
   }
index f295fd4163788e43597f5e18045012cf03281246..028f61b5acac3b67a5c8d05db8adc946cbaf14e8 100644 (file)
@@ -39,16 +39,16 @@ using namespace INTERP_KERNEL;
  * It retrieves the same cell with a potentially different type (in return) whose connectivity is defined by (retConn,retLgth)
  * \b WARNING for optimization reason the arrays 'retConn' and 'conn' can overlapped !
  */
-INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
-  std::set<int> c(conn,conn+lgth);
+  std::set<mcIdType> c(conn,conn+lgth);
   c.erase(-1);
-  bool isObviousNonDegeneratedCell=((int)c.size()==lgth);
+  bool isObviousNonDegeneratedCell=(ToIdType(c.size())==lgth);
   if((cm.getDimension()==3 && cm.isQuadratic()) || isObviousNonDegeneratedCell)
     {//quadratic 3D, do nothing for the moment.
       retLgth=lgth;
-      int *tmp=new int[lgth];//no direct std::copy ! overlapping of conn and retConn !
+      mcIdType *tmp=new mcIdType[lgth];//no direct std::copy ! overlapping of conn and retConn !
       std::copy(conn,conn+lgth,tmp);
       std::copy(tmp,tmp+lgth,retConn);
       delete [] tmp;
@@ -56,7 +56,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K
     }
   if(cm.getDimension()==2)
     {
-      int *tmp=new int[lgth];
+      mcIdType *tmp=new mcIdType[lgth];
       int newPos=0;
       if(!cm.isQuadratic())
         {
@@ -66,8 +66,8 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K
         }
       else
         {
-          int quadOff = lgth/2;
-          int *tmpQuad = new int[quadOff];
+          mcIdType quadOff = lgth/2;
+          mcIdType *tmpQuad = new mcIdType[quadOff];
           for(int i = 0; i < quadOff; i++)
             if(conn[i] != conn[(i+1)%quadOff] || conn[i] != conn[i+quadOff])  // zip nul segments/arcs (quad point must match too)
               {
@@ -85,8 +85,8 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K
     }
   if(cm.getDimension()==3)
     {
-      int nbOfFaces,lgthOfPolyhConn;
-      int *zipFullReprOfPolyh=getFullPolyh3DCell(type,conn,lgth,nbOfFaces,lgthOfPolyhConn);
+      mcIdType nbOfFaces,lgthOfPolyhConn;
+      mcIdType *zipFullReprOfPolyh=getFullPolyh3DCell(type,conn,lgth,nbOfFaces,lgthOfPolyhConn);
       INTERP_KERNEL::NormalizedCellType ret=tryToUnPoly3D(zipFullReprOfPolyh,nbOfFaces,lgthOfPolyhConn,retConn,retLgth);
       delete [] zipFullReprOfPolyh;
       return ret;
@@ -99,7 +99,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_K
  * This static method tries to unpolygonize a cell whose connectivity is given by 'conn' and 'lgth'.
  * Contrary to INTERP_KERNEL::CellSimplify::simplifyDegeneratedCell method 'conn' and 'retConn' do not overlap. 
  */
-INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly2D(bool isQuad, const int *conn, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly2D(bool isQuad, const mcIdType *conn, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
   retLgth=lgth;
   std::copy(conn,conn+lgth,retConn);
@@ -135,22 +135,22 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly2D(bool isQuad, const
  * The format of output array is the following :
  * 1,2,3,-1,3,4,2,-1,3,4,1,-1,1,2,4,NORM_TRI3,NORM_TRI3,NORM_TRI3 (faces type at the end of classical polyhedron nodal description)
  */
-int *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth,
-                                      int& retNbOfFaces, int& retLgth)
+mcIdType *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, mcIdType lgth,
+                                      mcIdType& retNbOfFaces, mcIdType& retLgth)
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
   unsigned nbOfFaces=cm.getNumberOfSons2(conn,lgth);
-  int *tmp=new int[nbOfFaces*(lgth+1)];
-  int *work=tmp;
-  std::vector<int> faces;
+  mcIdType *tmp=new mcIdType[nbOfFaces*(lgth+1)];
+  mcIdType *work=tmp;
+  std::vector<mcIdType> faces;
   for(unsigned j=0;j<nbOfFaces;j++)
     {
       INTERP_KERNEL::NormalizedCellType type2;
       unsigned offset=cm.fillSonCellNodalConnectivity2(j,conn,lgth,work,type2);
       //
-      int *tmp2=new int[offset];
+      mcIdType *tmp2=new mcIdType[offset];
       tmp2[0]=work[0];
-      int newPos=1;
+      mcIdType newPos=1;
       for(unsigned k=1;k<offset;k++)
         if(std::find(tmp2,tmp2+newPos,work[k])==tmp2+newPos)
           tmp2[newPos++]=work[k];
@@ -159,7 +159,7 @@ int *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, co
           delete [] tmp2;
           continue;
         }
-      int tmp3;
+      mcIdType tmp3;
       faces.push_back(tryToUnPoly2D(CellModel::GetCellModel(type2).isQuadratic(),tmp2,newPos,work,tmp3));
       delete [] tmp2;
       //
@@ -177,12 +177,12 @@ int *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, co
  * method INTERP_KERNEL::CellSimplify::getFullPolyh3DCell ) and 'lgth'+'nbOfFaces'.
  * Contrary to INTERP_KERNEL::CellSimplify::simplifyDegeneratedCell method 'conn' and 'retConn' do not overlap. 
  */
-INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly3D(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly3D(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
-  std::set<int> nodes(conn,conn+lgth);
+  std::set<mcIdType> nodes(conn,conn+lgth);
   nodes.erase(-1);
-  int nbOfNodes=(int)nodes.size();
-  int magicNumber=100*nbOfNodes+nbOfFaces;
+  std::size_t nbOfNodes=nodes.size();
+  std::size_t magicNumber=100*nbOfNodes+nbOfFaces;
   switch(magicNumber)
     {
     case 806:
@@ -202,48 +202,48 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly3D(const int *conn, i
     }
 }
 
-bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const int *sideFace, int lgthBaseFace)
+bool CellSimplify::orientOppositeFace(const mcIdType *baseFace, mcIdType *retConn, const mcIdType *sideFace, mcIdType lgthBaseFace)
 {
-  std::vector<int> tmp2;
-  std::set<int> bases(baseFace,baseFace+lgthBaseFace);
-  std::set<int> sides(sideFace,sideFace+4);
-  std::set_intersection(bases.begin(),bases.end(),sides.begin(),sides.end(),std::back_insert_iterator< std::vector<int> >(tmp2));
+  std::vector<mcIdType> tmp2;
+  std::set<mcIdType> bases(baseFace,baseFace+lgthBaseFace);
+  std::set<mcIdType> sides(sideFace,sideFace+4);
+  std::set_intersection(bases.begin(),bases.end(),sides.begin(),sides.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp2));
   if(tmp2.size()!=2)
     return false;
-  std::vector< std::pair<int,int> > baseEdges(lgthBaseFace);
-  std::vector< std::pair<int,int> > oppEdges(lgthBaseFace);
-  std::vector< std::pair<int,int> > sideEdges(4);
-  for(int i=0;i<lgthBaseFace;i++)
+  std::vector< std::pair<mcIdType,mcIdType> > baseEdges(lgthBaseFace);
+  std::vector< std::pair<mcIdType,mcIdType> > oppEdges(lgthBaseFace);
+  std::vector< std::pair<mcIdType,mcIdType> > sideEdges(4);
+  for(mcIdType i=0;i<lgthBaseFace;i++)
     {
-      baseEdges[i]=std::pair<int,int>(baseFace[i],baseFace[(i+1)%lgthBaseFace]);
-      oppEdges[i]=std::pair<int,int>(retConn[i],retConn[(i+1)%lgthBaseFace]);
+      baseEdges[i]=std::pair<mcIdType,mcIdType>(baseFace[i],baseFace[(i+1)%lgthBaseFace]);
+      oppEdges[i]=std::pair<mcIdType,mcIdType>(retConn[i],retConn[(i+1)%lgthBaseFace]);
     }
   for(int i=0;i<4;i++)
-    sideEdges[i]=std::pair<int,int>(sideFace[i],sideFace[(i+1)%4]);
-  std::vector< std::pair<int,int> > tmp;
-  std::set< std::pair<int,int> > baseEdgesS(baseEdges.begin(),baseEdges.end());
-  std::set< std::pair<int,int> > sideEdgesS(sideEdges.begin(),sideEdges.end());
-  std::set_intersection(baseEdgesS.begin(),baseEdgesS.end(),sideEdgesS.begin(),sideEdgesS.end(),std::back_insert_iterator< std::vector< std::pair<int,int> > >(tmp));
+    sideEdges[i]=std::pair<mcIdType,mcIdType>(sideFace[i],sideFace[(i+1)%4]);
+  std::vector< std::pair<mcIdType,mcIdType> > tmp;
+  std::set< std::pair<mcIdType,mcIdType> > baseEdgesS(baseEdges.begin(),baseEdges.end());
+  std::set< std::pair<mcIdType,mcIdType> > sideEdgesS(sideEdges.begin(),sideEdges.end());
+  std::set_intersection(baseEdgesS.begin(),baseEdgesS.end(),sideEdgesS.begin(),sideEdgesS.end(),std::back_insert_iterator< std::vector< std::pair<mcIdType,mcIdType> > >(tmp));
   if(tmp.empty())
     {
       //reverse sideFace
       for(int i=0;i<4;i++)
         {
-          std::pair<int,int> p=sideEdges[i];
-          std::pair<int,int> r(p.second,p.first);
+          std::pair<mcIdType,mcIdType> p=sideEdges[i];
+          std::pair<mcIdType,mcIdType> r(p.second,p.first);
           sideEdges[i]=r;
         }
       //end reverse sideFace
-      std::set< std::pair<int,int> > baseEdgesS2(baseEdges.begin(),baseEdges.end());
-      std::set< std::pair<int,int> > sideEdgesS2(sideEdges.begin(),sideEdges.end());
-      std::set_intersection(baseEdgesS2.begin(),baseEdgesS2.end(),sideEdgesS2.begin(),sideEdgesS2.end(),std::back_insert_iterator< std::vector< std::pair<int,int> > >(tmp));
+      std::set< std::pair<mcIdType,mcIdType> > baseEdgesS2(baseEdges.begin(),baseEdges.end());
+      std::set< std::pair<mcIdType,mcIdType> > sideEdgesS2(sideEdges.begin(),sideEdges.end());
+      std::set_intersection(baseEdgesS2.begin(),baseEdgesS2.end(),sideEdgesS2.begin(),sideEdgesS2.end(),std::back_insert_iterator< std::vector< std::pair<mcIdType,mcIdType> > >(tmp));
       if(tmp.empty())
         return false;
     }
   if(tmp.size()!=1)
     return false;
   bool found=false;
-  std::pair<int,int> pInOpp;
+  std::pair<mcIdType,mcIdType> pInOpp;
   for(int i=0;i<4 && !found;i++)
     {//finding the pair(edge) in sideFace that do not include any node of tmp[0] edge
       found=(tmp[0].first!=sideEdges[i].first && tmp[0].first!=sideEdges[i].second &&
@@ -257,15 +257,15 @@ bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const i
   if(!found)
     return false;
   int pos=(int)std::distance(baseEdges.begin(),std::find(baseEdges.begin(),baseEdges.end(),tmp[0]));
-  std::vector< std::pair<int,int> >::iterator it=std::find(oppEdges.begin(),oppEdges.end(),pInOpp);
+  std::vector< std::pair<mcIdType,mcIdType> >::iterator it=std::find(oppEdges.begin(),oppEdges.end(),pInOpp);
   if(it==oppEdges.end())//the opposite edge of side face is not found opposite face ... maybe problem of orientation of polyhedron
     return false;
-  int pos2=(int)std::distance(oppEdges.begin(),it);
-  int offset=pos-pos2;
+  mcIdType pos2=ToIdType(std::distance(oppEdges.begin(),it));
+  mcIdType offset=pos-pos2;
   if(offset<0)
     offset+=lgthBaseFace;
   //this is the end copy the result
-  int *tmp3=new int[lgthBaseFace];
+  mcIdType *tmp3=new mcIdType[lgthBaseFace];
   for(int i=0;i<lgthBaseFace;i++)
     tmp3[(offset+i)%lgthBaseFace]=oppEdges[i].first;
   std::copy(tmp3,tmp3+lgthBaseFace,retConn);
@@ -273,7 +273,7 @@ bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const i
   return true;
 }
 
-bool CellSimplify::isWellOriented(const int *baseFace, int *retConn, const int *sideFace, int lgthBaseFace)
+bool CellSimplify::isWellOriented(const mcIdType *baseFace, mcIdType *retConn, const mcIdType *sideFace, mcIdType lgthBaseFace)
 {
   return true;
 }
@@ -283,12 +283,12 @@ bool CellSimplify::isWellOriented(const int *baseFace, int *retConn, const int *
  * k_th node in retConnOfOppFace. Excluded faces 'baseFace' and 'oppFace' all the other faces in 'conn' must be QUAD4 faces.
  * If the arrangement process succeeds true is returned and retConnOfOppFace is filled.
  */
-bool CellSimplify::tryToArrangeOppositeFace(const int *conn, int lgth, int lgthBaseFace, const int *baseFace, const int *oppFace, int nbOfFaces, int *retConnOfOppFace)
+bool CellSimplify::tryToArrangeOppositeFace(const mcIdType *conn, mcIdType lgth, mcIdType lgthBaseFace, const mcIdType *baseFace, const mcIdType *oppFace, mcIdType nbOfFaces, mcIdType *retConnOfOppFace)
 {
   retConnOfOppFace[0]=oppFace[0];
-  for(int j=1;j<lgthBaseFace;j++)
+  for(mcIdType j=1;j<lgthBaseFace;j++)
     retConnOfOppFace[j]=oppFace[lgthBaseFace-j];
-  const int *curFace=conn;
+  const mcIdType *curFace=conn;
   int sideFace=0;
   bool ret=true;
   for(int i=0;i<nbOfFaces && ret;i++)
@@ -312,23 +312,23 @@ bool CellSimplify::tryToArrangeOppositeFace(const int *conn, int lgth, int lgthB
  * This method is only callable if in 'conn' there is 8 nodes and 6 faces.
  * If fails a POLYHED is returned. 
  */
-INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHex8(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHex8(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
-  if(std::find_if(conn+lgth,conn+lgth+nbOfFaces,std::bind2nd(std::not_equal_to<int>(),(int)INTERP_KERNEL::NORM_QUAD4))==conn+lgth+nbOfFaces)
+  if(std::find_if(conn+lgth,conn+lgth+nbOfFaces,std::bind2nd(std::not_equal_to<mcIdType>(),ToIdType(INTERP_KERNEL::NORM_QUAD4)))==conn+lgth+nbOfFaces)
     {//6 faces are QUAD4.
       int oppositeFace=-1;
-      std::set<int> conn1(conn,conn+4);
+      std::set<mcIdType> conn1(conn,conn+4);
       for(int i=1;i<6 && oppositeFace<0;i++)
         {
-          std::vector<int> tmp;
-          std::set<int> conn2(conn+5*i,conn+5*i+4);
-          std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector<int> >(tmp));
+          std::vector<mcIdType> tmp;
+          std::set<mcIdType> conn2(conn+5*i,conn+5*i+4);
+          std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
           if(tmp.empty())
             oppositeFace=i;
         }
       if(oppositeFace>=1)
         {//oppositeFace of face#0 found.
-          int tmp2[4];
+          mcIdType tmp2[4];
           if(tryToArrangeOppositeFace(conn,lgth,4,conn,conn+5*oppositeFace,6,tmp2))
             {
               std::copy(conn,conn+4,retConn);
@@ -343,31 +343,31 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHex8(const int *conn,
   return INTERP_KERNEL::NORM_POLYHED;
 }
 
-INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
-  std::size_t nbOfHexagon=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON);
-  std::size_t nbOfQuad=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
+  std::size_t nbOfHexagon=std::count(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_POLYGON));
+  std::size_t nbOfQuad=std::count(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_QUAD4));
   if(nbOfQuad==6 && nbOfHexagon==2)
     {
-      const int *hexag0=std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON);
+      const mcIdType *hexag0=std::find(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_POLYGON));
       std::size_t hexg0Id=std::distance(conn+lgth,hexag0);
-      const int *hexag1=std::find(hexag0+1,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON);
+      const mcIdType *hexag1=std::find(hexag0+1,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_POLYGON));
       std::size_t hexg1Id=std::distance(conn+lgth,hexag1);
-      const int *connHexag0=conn+5*hexg0Id;
+      const mcIdType *connHexag0=conn+5*hexg0Id;
       std::size_t lgthH0=std::distance(connHexag0,std::find(connHexag0,conn+lgth,-1));
       if(lgthH0==6)
         {
-          const int *connHexag1=conn+5*hexg0Id+7+(hexg1Id-hexg0Id-1)*5;
+          const mcIdType *connHexag1=conn+5*hexg0Id+7+(hexg1Id-hexg0Id-1)*5;
           std::size_t lgthH1=std::distance(connHexag1,std::find(connHexag1,conn+lgth,-1));
           if(lgthH1==6)
             {
-              std::vector<int> tmp;
-              std::set<int> conn1(connHexag0,connHexag0+6);
-              std::set<int> conn2(connHexag1,connHexag1+6);
-              std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector<int> >(tmp));
+              std::vector<mcIdType> tmp;
+              std::set<mcIdType> conn1(connHexag0,connHexag0+6);
+              std::set<mcIdType> conn2(connHexag1,connHexag1+6);
+              std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
               if(tmp.empty())
                 {
-                  int tmp2[6];
+                  mcIdType tmp2[6];
                   if(tryToArrangeOppositeFace(conn,lgth,6,connHexag0,connHexag1,8,tmp2))
                     {
                       std::copy(connHexag0,connHexag0+6,retConn);
@@ -388,16 +388,16 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const int *con
  * Cell with 'conn' connectivity has been detected as a good candidate. Full check of this. If yes NORM_PENTA6 is returned.
  * If fails a POLYHED is returned. 
  */
-INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
-  std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3);
-  std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
+  std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_TRI3));
+  std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_QUAD4));
   if(nbOfTriFace==2 && nbOfQuadFace==3)
     {
-      std::size_t tri3_0=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3));
-      std::size_t tri3_1=std::distance(conn+lgth,std::find(conn+lgth+tri3_0+1,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3));
-      const int *tri_0=0,*tri_1=0;
-      const int *w=conn;
+      std::size_t tri3_0=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_TRI3)));
+      std::size_t tri3_1=std::distance(conn+lgth,std::find(conn+lgth+tri3_0+1,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_TRI3)));
+      const mcIdType *tri_0=0,*tri_1=0;
+      const mcIdType *w=conn;
       for(std::size_t i=0;i<5;i++)
         {
           if(i==tri3_0)
@@ -407,13 +407,13 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *con
           w=std::find(w,conn+lgth,-1);
           w++;
         }
-      std::vector<int> tmp;
-      std::set<int> conn1(tri_0,tri_0+3);
-      std::set<int> conn2(tri_1,tri_1+3);
-      std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector<int> >(tmp));
+      std::vector<mcIdType> tmp;
+      std::set<mcIdType> conn1(tri_0,tri_0+3);
+      std::set<mcIdType> conn2(tri_1,tri_1+3);
+      std::set_intersection(conn1.begin(),conn1.end(),conn2.begin(),conn2.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
       if(tmp.empty())
         {
-          int tmp2[3];
+          mcIdType tmp2[3];
           if(tryToArrangeOppositeFace(conn,lgth,3,tri_0,tri_1,5,tmp2))
             {
               std::copy(tri_0,tri_0+3,retConn);
@@ -432,15 +432,15 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *con
  * Cell with 'conn' connectivity has been detected as a good candidate. Full check of this. If yes NORM_PYRA5 is returned.
  * If fails a POLYHED is returned. 
  */
-INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
-  std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3);
-  std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
+  std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_TRI3));
+  std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_QUAD4));
   if(nbOfTriFace==4 && nbOfQuadFace==1)
     {
-      std::size_t quad4_pos=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4));
-      const int *quad4=0;
-      const int *w=conn;
+      std::size_t quad4_pos=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,ToIdType(INTERP_KERNEL::NORM_QUAD4)));
+      const mcIdType *quad4=0;
+      const mcIdType *w=conn;
       for(std::size_t i=0;i<5 && quad4==0;i++)
         {
           if(i==quad4_pos)
@@ -448,20 +448,20 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn
           w=std::find(w,conn+lgth,-1);
           w++;
         }
-      std::set<int> quad4S(quad4,quad4+4);
+      std::set<mcIdType> quad4S(quad4,quad4+4);
       w=conn;
       bool ok=true;
-      int point=-1;
+      mcIdType point=-1;
       for(std::size_t i=0;i<5 && ok;i++)
         {
           if(i!=quad4_pos)
             {
-              std::vector<int> tmp;
-              std::set<int> conn2(w,w+3);
-              std::set_intersection(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector<int> >(tmp));
+              std::vector<mcIdType> tmp;
+              std::set<mcIdType> conn2(w,w+3);
+              std::set_intersection(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
               ok=tmp.size()==2;
               tmp.clear();
-              std::set_difference(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector<int> >(tmp));
+              std::set_difference(conn2.begin(),conn2.end(),quad4S.begin(),quad4S.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
               ok=ok && tmp.size()==1;
               if(ok)
                 {
@@ -491,21 +491,21 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn
  * Cell with 'conn' connectivity has been detected as a good candidate. Full check of this. If yes NORM_TETRA4 is returned.
  * If fails a POLYHED is returned. 
  */
-INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyTetra4(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
+INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyTetra4(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth)
 {
-  if(std::find_if(conn+lgth,conn+lgth+nbOfFaces,std::bind2nd(std::not_equal_to<int>(),(int)INTERP_KERNEL::NORM_TRI3))==conn+lgth+nbOfFaces)
+  if(std::find_if(conn+lgth,conn+lgth+nbOfFaces,std::bind2nd(std::not_equal_to<mcIdType>(),ToIdType(INTERP_KERNEL::NORM_TRI3)))==conn+lgth+nbOfFaces)
     {
-      std::set<int> tribase(conn,conn+3);
-      int point=-1;
+      std::set<mcIdType> tribase(conn,conn+3);
+      mcIdType point=-1;
       bool ok=true;
       for(int i=1;i<4 && ok;i++)
         {
-          std::vector<int> tmp;
-          std::set<int> conn2(conn+i*4,conn+4*i+3);
-          std::set_intersection(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector<int> >(tmp));
+          std::vector<mcIdType> tmp;
+          std::set<mcIdType> conn2(conn+i*4,conn+4*i+3);
+          std::set_intersection(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
           ok=tmp.size()==2;
           tmp.clear();
-          std::set_difference(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector<int> >(tmp));
+          std::set_difference(conn2.begin(),conn2.end(),tribase.begin(),tribase.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
           ok=ok && tmp.size()==1;
           if(ok)
             {
@@ -534,7 +534,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyTetra4(const int *con
  *  - fully degenerated polygons (polygon with 1 point, or 2 if quadratic)
  *  - quad polygon with 2 points and two identical quad points
  */
-bool CellSimplify::isFlatCell(const int* conn, int pos, int lgth, NormalizedCellType type)
+bool CellSimplify::isFlatCell(const mcIdType* conn, mcIdType pos, mcIdType lgth, NormalizedCellType type)
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
   if ( lgth <= 2 ) // a polygon with a single, or two points has been returned. This check also captures degenerated quadratics
index ba21683746acf8135753785419d1226ed7344bc0..1246a2722335918aa690a484b120d9dcc4bd23e1 100644 (file)
 #include "INTERPKERNELDefines.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
 #include "InterpKernelException.hxx"
+#include "MCIdType.hxx"
 
 namespace INTERP_KERNEL
 {
   class INTERPKERNEL_EXPORT CellSimplify
   {
   public:
-    static INTERP_KERNEL::NormalizedCellType simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, int *retConn, int& retLgth);
-    static int *getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth,
-                                   int& retNbOfFaces, int& retLgth);
-    static INTERP_KERNEL::NormalizedCellType tryToUnPoly2D(bool isQuad, const int *conn, int lgth, int *retConn, int& retLgth);
-    static INTERP_KERNEL::NormalizedCellType tryToUnPoly3D(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth);
-    static INTERP_KERNEL::NormalizedCellType tryToUnPolyHex8(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth);
-    static INTERP_KERNEL::NormalizedCellType tryToUnPolyHexp12(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth);
-    static INTERP_KERNEL::NormalizedCellType tryToUnPolyPenta6(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth);
-    static INTERP_KERNEL::NormalizedCellType tryToUnPolyPyra5(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth);
-    static INTERP_KERNEL::NormalizedCellType tryToUnPolyTetra4(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth);
-    static bool tryToArrangeOppositeFace(const int *conn, int lgth, int lgthBaseFace, const int *baseFace, const int *oppFaceId, int nbOfFaces, int *retConnOfOppFace);
-    static bool isWellOriented(const int *baseFace, int *retConn, const int *sideFace, int lgthBaseFace);
-    static bool orientOppositeFace(const int *baseFace, int *retConn, const int *sideFace, int lgthBaseFace);
-    static bool isFlatCell(const int* conn, int pos, int lgth, NormalizedCellType type);
+    static INTERP_KERNEL::NormalizedCellType simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static mcIdType *getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const mcIdType *conn, mcIdType lgth,
+                                   mcIdType& retNbOfFaces, mcIdType& retLgth);
+    static INTERP_KERNEL::NormalizedCellType tryToUnPoly2D(bool isQuad, const mcIdType *conn, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static INTERP_KERNEL::NormalizedCellType tryToUnPoly3D(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static INTERP_KERNEL::NormalizedCellType tryToUnPolyHex8(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static INTERP_KERNEL::NormalizedCellType tryToUnPolyHexp12(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static INTERP_KERNEL::NormalizedCellType tryToUnPolyPenta6(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static INTERP_KERNEL::NormalizedCellType tryToUnPolyPyra5(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static INTERP_KERNEL::NormalizedCellType tryToUnPolyTetra4(const mcIdType *conn, mcIdType nbOfFaces, mcIdType lgth, mcIdType *retConn, mcIdType& retLgth);
+    static bool tryToArrangeOppositeFace(const mcIdType *conn, mcIdType lgth, mcIdType lgthBaseFace, const mcIdType *baseFace, const mcIdType *oppFaceId, mcIdType nbOfFaces, mcIdType *retConnOfOppFace);
+    static bool isWellOriented(const mcIdType *baseFace, mcIdType *retConn, const mcIdType *sideFace, mcIdType lgthBaseFace);
+    static bool orientOppositeFace(const mcIdType *baseFace, mcIdType *retConn, const mcIdType *sideFace, mcIdType lgthBaseFace);
+    static bool isFlatCell(const mcIdType* conn, mcIdType pos, mcIdType lgth, NormalizedCellType type);
   };
 }
 
index ee2f3e531e1092026d5c31687e8501eeddde8087..3b8de967a1744e71b7bc154d809a98e58adc9c55 100644 (file)
@@ -52,10 +52,10 @@ namespace INTERP_KERNEL
    *  \param [in] incy the increment between successive entries in \a dy.
    *  \return the sum of the product of the corresponding entries of \a dx and \a dy.
    */
-  double ddot(int n, const double *dx, int incx, const double *dy, int incy)
+  double ddot(mcIdType n, const double *dx, mcIdType incx, const double *dy, mcIdType incy)
   {
     double dtemp=0.0;
-    int i,ix,iy,m;
+    mcIdType i,ix,iy,m;
     if(n<=0)
       return dtemp;
     // Code for unequal increments or equal increments not equal to 1.
@@ -86,9 +86,9 @@ namespace INTERP_KERNEL
   }
 
 
-  void dscal(int n, double sa, double *x, int incx)
+  void dscal(mcIdType n, double sa, double *x, mcIdType incx)
   {
-    int i,ix,m;
+    mcIdType i,ix,m;
 
     if(n<=0) { }
     else if(incx==1)
@@ -118,9 +118,9 @@ namespace INTERP_KERNEL
       }
   }
 
-  void daxpy(int n, double da, const double *dx, int incx, double *dy, int incy)
+  void daxpy(mcIdType n, double da, const double *dx, mcIdType incx, double *dy, mcIdType incy)
   {
-    int i,ix,iy,m;
+    mcIdType i,ix,iy,m;
     if (n<=0)
       return;
     if (da==0.0)
@@ -165,9 +165,9 @@ namespace INTERP_KERNEL
       return -x;
   }
 
-  void dswap(int n, double *x, int incx, double *y, int incy)
+  void dswap(mcIdType n, double *x, mcIdType incx, double *y, mcIdType incy)
   {
-    int i,ix,iy,m;
+    mcIdType i,ix,iy,m;
     double temp;
 
     if(n<=0) { }
@@ -222,10 +222,10 @@ namespace INTERP_KERNEL
    *    \param [in] incx the increment between successive entries of SX.
    *    \return the index of the element of maximum absolute value (in C convention).
    */
-  int idamax(int n, const double *dx, int incx)
+  mcIdType idamax(mcIdType n, const double *dx, mcIdType incx)
   {
     double dmax;
-    int i,ix,value;
+    mcIdType i,ix,value;
     value=-1;
     if ( n < 1 || incx <= 0 )
       return value;
@@ -292,13 +292,13 @@ namespace INTERP_KERNEL
    *  - K, if U(K-1,K-1) == 0.  This is not an error condition for this subroutine,
    *    but it does indicate that DGESL or DGEDI will divide by zero if called.
    */
-  int dgefa(double *a, int lda, int n, int *ipvt)
+  mcIdType dgefa(double *a, mcIdType lda, mcIdType n, mcIdType *ipvt)
   {
-    int info=0;
-    int l;
+    mcIdType info=0;
+    mcIdType l;
     double t;
     // Gaussian elimination with partial pivoting.
-    for(int k=0;k<n-1;k++)
+    for(mcIdType k=0;k<n-1;k++)
       {
         //  Find L=pivot index.
         l=idamax(n-k,a+k+k*lda,1)+k;
@@ -320,7 +320,7 @@ namespace INTERP_KERNEL
         t=-1.0/a[k+k*lda];
         dscal(n-k-1,t,a+k+1+k*lda,1);
         // Row elimination with column indexing.
-        for(int j=k+1;j<n;j++)
+        for(mcIdType j=k+1;j<n;j++)
           {
             t=a[l+j*lda];
             if(l!=k)
@@ -361,15 +361,15 @@ namespace INTERP_KERNEL
    *    \param [in] ipvt, the pivot vector from dgfa.
    *    \param [in,out] work a work array of size at least equal to \a n.
    */
-  void dgedi(double *a, int lda, int n, const int *ipvt, double *work)
+  void dgedi(double *a, mcIdType lda, mcIdType n, const mcIdType *ipvt, double *work)
   {
     double t;
-    for(int k=0;k<n;k++)
+    for(mcIdType k=0;k<n;k++)
       {
         a[k+k*lda]=1.0/a[k+k*lda];
         t=-a[k+k*lda];
         dscal(k,t,a+0+k*lda,1);
-        for(int j=k+1;j<n;j++)
+        for(mcIdType j=k+1;j<n;j++)
           {
             t=a[k+j*lda];
             a[k+j*lda]=0.0;
@@ -377,46 +377,46 @@ namespace INTERP_KERNEL
           }
       }
     // Form inverse(U) * inverse(L).
-    for(int k=n-2;k>=0;k--)
+    for(mcIdType k=n-2;k>=0;k--)
       {
-        for(int i=k+1;i<n;i++)
+        for(mcIdType i=k+1;i<n;i++)
           {
             work[i]=a[i+k*lda];
             a[i+k*lda]=0.0;
           }
 
-        for(int j=k+1;j<n;j++)
+        for(mcIdType j=k+1;j<n;j++)
           {
             t=work[j];
             daxpy(n,t,a+0+j*lda,1,a+0+k*lda,1);
           }
-        int l=ipvt[k];
+        mcIdType l=ipvt[k];
         if(l!=k-1)
           dswap(n,a+0+k*lda,1,a+0+l*lda,1);
       }
   }
 
-  void matrixProduct(const double *A, int n1, int p1, const double *B, int n2, int p2, double *C)
+  void matrixProduct(const double *A, mcIdType n1, mcIdType p1, const double *B, mcIdType n2, mcIdType p2, double *C)
   {
     if(p1!=n2)
       {
         std::ostringstream oss; oss << "matrixProduct : the size of input matrix are not coherent the nb of cols of input matrix #0 is " <<  p1 << " whereas the number of rows of input matrix #1 is " << n2 << " !";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
       }
-    for(int i=0;i<n1;i++)
+    for(mcIdType i=0;i<n1;i++)
       {
-        for(int j=0;j<p2;j++)
+        for(mcIdType j=0;j<p2;j++)
           {
             C[i*p2+j] = 0.;
-            for(int k=0;k<p1;k++)
+            for(mcIdType k=0;k<p1;k++)
               C[i*p2+j]+=A[i*p1+k]*B[k*p2+j];
           }
       }
   }
 
-  void inverseMatrix(const double *A, int n, double *iA)
+  void inverseMatrix(const double *A, mcIdType n, double *iA)
   {
-    INTERP_KERNEL::AutoPtr<int> ipvt=new int[n];
+    INTERP_KERNEL::AutoPtr<mcIdType> ipvt=new mcIdType[n];
     INTERP_KERNEL::AutoPtr<double> work=new double[n*n];
     std::copy(A,A+n*n,iA);
     dgefa(iA,n,n,ipvt);
index 231e97ac9cf60699caa4009df8d31b19e38c0da6..beb155a6d3eb5c4ace6e2fc8573ace7245e66d44 100644 (file)
 #define __INTERPKERNELMATRIXTOOLS_HXX__
 
 #include "INTERPKERNELDefines.hxx"
+#include "MCIdType.hxx"
 
 namespace INTERP_KERNEL
 {
-  void INTERPKERNEL_EXPORT matrixProduct(const double *A, int n1, int p1, const double *B, int n2, int p2, double *C);
-  void INTERPKERNEL_EXPORT inverseMatrix(const double *A, int n, double *iA);
-  void INTERPKERNEL_EXPORT daxpy(int n, double da, const double *dx, int incx, double *dy, int incy);
+  void INTERPKERNEL_EXPORT matrixProduct(const double *A, mcIdType n1, mcIdType p1, const double *B, mcIdType n2, mcIdType p2, double *C);
+  void INTERPKERNEL_EXPORT inverseMatrix(const double *A, mcIdType n, double *iA);
+  void INTERPKERNEL_EXPORT daxpy(mcIdType n, double da, const double *dx, mcIdType incx, double *dy, mcIdType incy);
 }
 
 #endif
index cb7064abd51dbf294e8272e0ef050d16d136a9f2..cbf11572d0879848e1acfd486af8e37ec77997db 100644 (file)
@@ -35,4 +35,7 @@
 
 #define LOCALIZED(message) static_cast<const char *> (message) , __FILE__ , __LINE__
 
+// conversion to mesh connection type
+#define ToConnType(x) static_cast<typename MyMeshType::MyConnType>(x)
+
 #endif
index 4baba86f4204c2cda178d219e80d701978681724..f8fa6a14636dd2a5648d55c3ec4ed73a90408a64 100644 (file)
@@ -37,17 +37,17 @@ namespace INTERP_KERNEL
     Interpolation(const InterpolationOptions& io) :InterpolationOptions(io){}
     //interpolation of two triangular meshes.
     template<class MatrixType, class MyMeshType>
-    int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result)
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result)
     { return asLeaf().interpolateMeshes(meshS,meshT,result); }
     template<class MyMeshType, class MatrixType>
-    int fromIntegralUniform(const MyMeshType& meshT, MatrixType& result, const std::string& method) { return fromToIntegralUniform(false,meshT,result,method); }
+    typename MyMeshType::MyConnType fromIntegralUniform(const MyMeshType& meshT, MatrixType& result, const std::string& method) { return fromToIntegralUniform(false,meshT,result,method); }
     template<class MyMeshType, class MatrixType>
-    int toIntegralUniform(const MyMeshType& meshS, MatrixType& result, const std::string& method) { return fromToIntegralUniform(true,meshS,result,method); }
+    typename MyMeshType::MyConnType toIntegralUniform(const MyMeshType& meshS, MatrixType& result, const std::string& method) { return fromToIntegralUniform(true,meshS,result,method); }
     template<class MyMeshType>
     static double CalculateCharacteristicSizeOfMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, const int printLevel);
   protected:
     template<class MyMeshType, class MatrixType>
-    int fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method);
+    typename MyMeshType::MyConnType fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method);
   protected:
     TrueMainInterpolator& asLeaf() { return static_cast<TrueMainInterpolator&>(*this); }
   };
old mode 100644 (file)
new mode 100755 (executable)
index a9d02ee..5187a59
@@ -29,10 +29,10 @@ namespace INTERP_KERNEL
 { 
   template<class TrueMainInterpolator>
   template<class MyMeshType, class MatrixType>
-  int Interpolation<TrueMainInterpolator>::fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method)
+  typename MyMeshType::MyConnType Interpolation<TrueMainInterpolator>::fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const std::string& method)
   {
     typedef typename MyMeshType::MyConnType ConnType;
-    int ret=-1;
+    ConnType ret=-1;
     if(method=="P0")
       {
         IntegralUniformIntersectorP0<MyMeshType,MatrixType> intersector(mesh,InterpolationOptions::getMeasureAbsStatus());
@@ -59,9 +59,10 @@ namespace INTERP_KERNEL
   double Interpolation<TrueMainInterpolator>::CalculateCharacteristicSizeOfMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, const int printLevel)
   {
     static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
+    typedef typename MyMeshType::MyConnType ConnType;
 
-    long nbMailleS=myMeshS.getNumberOfElements();
-    long nbMailleT=myMeshT.getNumberOfElements();
+    ConnType nbMailleS=myMeshS.getNumberOfElements();
+    ConnType nbMailleT=myMeshT.getNumberOfElements();
 
     /**************************************************/
     /* Search the characteristic size of the meshes   */
@@ -73,13 +74,13 @@ namespace INTERP_KERNEL
     if(nbMailleS!=0)
       {
         diagonalS=getDistanceBtw2Pts<SPACEDIM>(BoxS+SPACEDIM,BoxS);
-        dimCaracteristicS=diagonalS/nbMailleS;
+        dimCaracteristicS=diagonalS/(double)nbMailleS;
       }
     double diagonalT,dimCaracteristicT=std::numeric_limits<double>::max();
     if(nbMailleT!=0)
       {
         diagonalT=getDistanceBtw2Pts<SPACEDIM>(BoxT+SPACEDIM,BoxT);
-        dimCaracteristicT=diagonalT/nbMailleT;
+        dimCaracteristicT=diagonalT/(double)nbMailleT;
       }
     if (printLevel>=1)
       {
index b1a1dd03c955b58007ec75ac539b4b0892fdf1b6..65ab1c0aaac09c4c410b7fb3e6e9ac2182eb7cc0 100644 (file)
@@ -44,8 +44,8 @@ namespace INTERP_KERNEL
     const int SPACE_DIM = 3;
     const double adj(getPrecision());// here precision is used instead of getBoundingBoxAdjustment and getBoundingBoxAdjustmentAbs because in the context only precision is relevant
 
-    long size = bbox.size()/(2*SPACE_DIM);
-    for (int i=0; i<size; i++)
+    std::size_t size = bbox.size()/(2*SPACE_DIM);
+    for (std::size_t i=0; i<size; i++)
       {
         for(int idim=0; idim<SPACE_DIM; idim++)
           {
index df400c8cf69d447eae103d53134fc09ad5f677a0..1507a9ab3d3977365daf8751ba8281592ba759a3 100644 (file)
@@ -36,7 +36,7 @@ namespace INTERP_KERNEL
     Interpolation1D0D();
     Interpolation1D0D(const InterpolationOptions& io);
     template<class MyMeshType, class MatrixType>
-    int interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method);
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method);
   private:
     void adjustBoundingBoxes(std::vector<double>& bbox);
   };
old mode 100644 (file)
new mode 100755 (executable)
index da9fe59..9bce350
@@ -41,7 +41,7 @@ namespace INTERP_KERNEL
    *  adjusted in a similar fashion as in InterpolationPlanar::performAdjustmentOfBB()
    **/
   template<class MyMeshType, class MatrixType>
-  int Interpolation1D0D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method)
+  typename MyMeshType::MyConnType Interpolation1D0D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method)
   {
     constexpr int SPACEDIM=MyMeshType::MY_SPACEDIM;
     using ConnType=typename MyMeshType::MyConnType;
@@ -56,7 +56,7 @@ namespace INTERP_KERNEL
 
     const double epsilon(getPrecision());
     // create MeshElement objects corresponding to each element of the two meshes
-    const unsigned long numSrcElems(srcMesh.getNumberOfElements()), numTargetElems(targetMesh.getNumberOfElements());
+    const ConnType numSrcElems(srcMesh.getNumberOfElements()), numTargetElems(targetMesh.getNumberOfElements());
 
     LOG(2, "Source mesh has " << numSrcElems << " elements and target mesh has " << numTargetElems << " elements ");
 
@@ -64,7 +64,7 @@ namespace INTERP_KERNEL
 
     std::map<MeshElement<ConnType>*, int> indices;
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       srcElems[i] = new MeshElement<ConnType>(i, srcMesh);       
 
     // create empty maps for all source elements
@@ -73,8 +73,8 @@ namespace INTERP_KERNEL
     // create BBTree structure
     // - get bounding boxes
     std::vector<double> bboxes(2*SPACEDIM*numSrcElems);
-    int* srcElemIdx = new int[numSrcElems];
-    for(unsigned long i = 0; i < numSrcElems ; ++i)
+    ConnType* srcElemIdx = new ConnType[numSrcElems];
+    for(ConnType i = 0; i < numSrcElems ; ++i)
       {
         // get source bboxes in right order
         srcElems[i]->getBoundingBox()->toCompactData(bboxes.data()+6*i);
@@ -89,7 +89,7 @@ namespace INTERP_KERNEL
     const ConnType *trgConnPtr(targetMesh.getConnectivityPtr()),*trgConnIPtr(targetMesh.getConnectivityIndexPtr());
     const ConnType *srcConnPtr(srcMesh.getConnectivityPtr()),*srcConnIPtr(srcMesh.getConnectivityIndexPtr());
     const double *trgCooPtr(targetMesh.getCoordinatesPtr()),*srcCooPtr(srcMesh.getCoordinatesPtr());
-    for(unsigned long i = 0; i < numTargetElems; ++i)
+    for(ConnType i = 0; i < numTargetElems; ++i)
       {
         IKAssert(trgConnIPtr[i+1]==i+1 && trgConnIPtr[i]==i);
         std::vector<ConnType> srcSegCondidates;
@@ -110,7 +110,7 @@ namespace INTERP_KERNEL
           }
       }
     delete [] srcElemIdx;
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       delete srcElems[i];
     return srcMesh.getNumberOfNodes();
   }
index 9d0ce99d60de1e258d1ffefe36c222b15d28b977..a2c2f601d25f4d6eb4b62c2acf3b6136ba9f5752 100644 (file)
@@ -40,7 +40,7 @@ namespace INTERP_KERNEL
   class Interpolation2D1D : public Interpolation<Interpolation2D1D>
   {
   public:
-    typedef std::map<int,std::set<int> > DuplicateFacesType;
+    typedef std::map<mcIdType,std::set<mcIdType> > DuplicateFacesType;
 
     Interpolation2D1D() { setOrientation(2); }
     Interpolation2D1D(const InterpolationOptions& io):Interpolation<Interpolation2D1D>(io) { }
@@ -48,7 +48,7 @@ namespace INTERP_KERNEL
 
     // Main function to interpolate triangular and quadratic meshes
     template<class MyMeshType, class MatrixType>
-    int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result, const std::string& method);
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result, const std::string& method);
     DuplicateFacesType retrieveDuplicateFaces() const
     {
       return _duplicate_faces;
old mode 100644 (file)
new mode 100755 (executable)
index 1e644d7..7cc6ca4
@@ -46,19 +46,19 @@ namespace INTERP_KERNEL
       *
       */
   template<class MyMeshType, class MatrixType>
-  int Interpolation2D1D::interpolateMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, MatrixType& result, const std::string& method)
+  typename MyMeshType::MyConnType Interpolation2D1D::interpolateMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, MatrixType& result, const std::string& method)
   {
     static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
     typedef typename MyMeshType::MyConnType ConnType;
     static const NumberingPolicy numPol=MyMeshType::My_numPol;
 
     long global_start =clock();
-    int counter=0;
+    std::size_t counter=0;
     /***********************************************************/
     /* Check both meshes are made of triangles and quadrangles */
     /***********************************************************/
 
-    long nbMailleS=myMeshS.getNumberOfElements();
+    ConnType nbMailleS=myMeshS.getNumberOfElements();
 
     /**************************************************/
     /* Search the characteristic size of the meshes   */
@@ -114,12 +114,12 @@ namespace INTERP_KERNEL
     /* Loop on the target cells - core of the algorithm */
     /****************************************************/
     long start_intersection=clock();
-    long nbelem_type=myMeshT.getNumberOfElements();
+    ConnType nbelem_type=myMeshT.getNumberOfElements();
     const ConnType *connIndxT=myMeshT.getConnectivityIndexPtr();
-    for(int iT=0; iT<nbelem_type; iT++)
+    for(ConnType iT=0; iT<nbelem_type; iT++)
       {
-        int nb_nodesT=connIndxT[iT+1]-connIndxT[iT];
-        std::vector<int> intersecting_elems;
+        ConnType nb_nodesT=connIndxT[iT+1]-connIndxT[iT];
+        std::vector<ConnType> intersecting_elems;
         double bb[2*SPACEDIM];
         intersector->getElemBB(bb,myMeshT,OTT<ConnType,numPol>::indFC(iT),nb_nodesT);
         my_tree.getIntersectingElems(bb, intersecting_elems);
@@ -127,7 +127,7 @@ namespace INTERP_KERNEL
         counter+=intersecting_elems.size();
         intersecting_elems.clear();
       }
-    int ret=intersector->getNumberOfColsOfResMatrix();
+    ConnType ret=intersector->getNumberOfColsOfResMatrix();
 
     const DuplicateFacesType& intersectFaces = *intersector->getIntersectFaces();
     DuplicateFacesType::const_iterator iter;
index ddfaf93dc972cabfa1ed6b74327becb398567dce..0a624c9afccd7a193d7306fbae8c13087c3b65d6 100644 (file)
@@ -27,6 +27,7 @@
 #include "Interpolation.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
 #include "InterpolationOptions.hxx"
+#include "MCIdType.hxx"
 
 namespace INTERP_KERNEL
 {
@@ -42,12 +43,12 @@ namespace INTERP_KERNEL
   class Interpolation2D3D : public Interpolation<Interpolation2D3D>
   {
   public:
-    typedef std::map<int,std::set<int> > DuplicateFacesType;
+    typedef std::map<mcIdType,std::set<mcIdType> > DuplicateFacesType;
 
     INTERPKERNEL_EXPORT Interpolation2D3D();
     INTERPKERNEL_EXPORT Interpolation2D3D(const InterpolationOptions& io);
     template<class MyMeshType, class MyMatrixType>
-    int interpolateMeshes(const MyMeshType& srcMesh,
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh,
                           const MyMeshType& targetMesh,
                           MyMatrixType& matrix,
                           const std::string& method);
old mode 100644 (file)
new mode 100755 (executable)
index a9b7252..4e7fac8
@@ -60,28 +60,28 @@ namespace INTERP_KERNEL
    *
    */
   template<class MyMeshType, class MyMatrixType>
-  int Interpolation2D3D::interpolateMeshes(const MyMeshType& srcMesh,
+  typename MyMeshType::MyConnType Interpolation2D3D::interpolateMeshes(const MyMeshType& srcMesh,
                                            const MyMeshType& targetMesh,
                                            MyMatrixType& matrix,
                                            const std::string& method)
   {
     typedef typename MyMeshType::MyConnType ConnType;
     // create MeshElement objects corresponding to each element of the two meshes
-    const unsigned long numSrcElems = srcMesh.getNumberOfElements();
-    const unsigned long numTargetElems = targetMesh.getNumberOfElements();
+    const ConnType numSrcElems = srcMesh.getNumberOfElements();
+    const ConnType numTargetElems = targetMesh.getNumberOfElements();
 
     LOG(2, "Source mesh has " << numSrcElems << " elements and target mesh has " << numTargetElems << " elements ");
 
     std::vector<MeshElement<ConnType>*> srcElems(numSrcElems);
     std::vector<MeshElement<ConnType>*> targetElems(numTargetElems);
 
-    std::map<MeshElement<ConnType>*, int> indices;
+    std::map<MeshElement<ConnType>*, ConnType> indices;
     DuplicateFacesType intersectFaces;
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       srcElems[i] = new MeshElement<ConnType>(i, srcMesh);       
 
-    for(unsigned long i = 0 ; i < numTargetElems ; ++i)
+    for(ConnType i = 0 ; i < numTargetElems ; ++i)
       targetElems[i] = new MeshElement<ConnType>(i, targetMesh);
 
     Intersector3D<MyMeshType,MyMatrixType>* intersector=0;
@@ -111,8 +111,8 @@ namespace INTERP_KERNEL
     // create BBTree structure
     // - get bounding boxes
     double* bboxes = new double[6 * numSrcElems];
-    int* srcElemIdx = new int[numSrcElems];
-    for(unsigned long i = 0; i < numSrcElems ; ++i)
+    ConnType* srcElemIdx = new ConnType[numSrcElems];
+    for(ConnType i = 0; i < numSrcElems ; ++i)
       {
         // get source bboxes in right order
         const BoundingBox* box = srcElems[i]->getBoundingBox();
@@ -131,10 +131,10 @@ namespace INTERP_KERNEL
 
     // for each target element, get source elements with which to calculate intersection
     // - calculate intersection by calling intersectCells
-    for(unsigned long i = 0; i < numTargetElems; ++i)
+    for(ConnType i = 0; i < numTargetElems; ++i)
       {
         const BoundingBox* box = targetElems[i]->getBoundingBox();
-        const int targetIdx = targetElems[i]->getIndex();
+        const ConnType targetIdx = targetElems[i]->getIndex();
 
         // get target bbox in right order
         double targetBox[6];
@@ -167,15 +167,15 @@ namespace INTERP_KERNEL
       }
 
     // free allocated memory
-    int ret=intersector->getNumberOfColsOfResMatrix();
+    ConnType ret=intersector->getNumberOfColsOfResMatrix();
 
     delete intersector;
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       {
         delete srcElems[i];
       }
-    for(unsigned long i = 0 ; i < numTargetElems ; ++i)
+    for(ConnType i = 0 ; i < numTargetElems ; ++i)
       {
         delete targetElems[i];
       }
old mode 100644 (file)
new mode 100755 (executable)
index 19e2ee9..fca0a76
@@ -1,43 +1,43 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// Author : Anthony Geay (CEA/DEN)
-
-#ifndef __INTERPOLATION3D_HXX__
-#define __INTERPOLATION3D_HXX__
-
-#include "INTERPKERNELDefines.hxx"
-#include "Interpolation.hxx"
-#include "NormalizedUnstructuredMesh.hxx"
-#include "InterpolationOptions.hxx"
-
-namespace INTERP_KERNEL
-{
-  class INTERPKERNEL_EXPORT Interpolation3D : public Interpolation<Interpolation3D>
-  {
-  public:
-    Interpolation3D();
-    Interpolation3D(const InterpolationOptions& io);
-    template<class MyMeshType, class MatrixType>
-    int interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method);
-  private:
-    SplittingPolicy _splitting_policy;
-  };
-}
-
-#endif
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2.1 of the License, or (at your option) any later version.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+//\r
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+//\r
+// Author : Anthony Geay (CEA/DEN)\r
+\r
+#ifndef __INTERPOLATION3D_HXX__\r
+#define __INTERPOLATION3D_HXX__\r
+\r
+#include "INTERPKERNELDefines.hxx"\r
+#include "Interpolation.hxx"\r
+#include "NormalizedUnstructuredMesh.hxx"\r
+#include "InterpolationOptions.hxx"\r
+\r
+namespace INTERP_KERNEL\r
+{\r
+  class INTERPKERNEL_EXPORT Interpolation3D : public Interpolation<Interpolation3D>\r
+  {\r
+  public:\r
+    Interpolation3D();\r
+    Interpolation3D(const InterpolationOptions& io);\r
+    template<class MyMeshType, class MatrixType>\r
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method);\r
+  private:\r
+    SplittingPolicy _splitting_policy;\r
+  };\r
+}\r
+\r
+#endif\r
old mode 100644 (file)
new mode 100755 (executable)
index 46b7f7d..e0872c2
@@ -75,24 +75,24 @@ namespace INTERP_KERNEL
    *
    */
   template<class MyMeshType, class MatrixType>
-  int Interpolation3D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method)
+  typename MyMeshType::MyConnType Interpolation3D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method)
   {
     typedef typename MyMeshType::MyConnType ConnType;
     // create MeshElement objects corresponding to each element of the two meshes
-    const unsigned long numSrcElems = srcMesh.getNumberOfElements();
-    const unsigned long numTargetElems = targetMesh.getNumberOfElements();
+    const ConnType numSrcElems = srcMesh.getNumberOfElements();
+    const ConnType numTargetElems = targetMesh.getNumberOfElements();
 
     LOG(2, "Source mesh has " << numSrcElems << " elements and target mesh has " << numTargetElems << " elements ");
 
     std::vector<MeshElement<ConnType>*> srcElems(numSrcElems);
     std::vector<MeshElement<ConnType>*> targetElems(numTargetElems);
 
-    std::map<MeshElement<ConnType>*, int> indices;
+    std::map<MeshElement<ConnType>*, ConnType> indices;
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       srcElems[i] = new MeshElement<ConnType>(i, srcMesh);       
 
-    for(unsigned long i = 0 ; i < numTargetElems ; ++i)
+    for(ConnType i = 0 ; i < numTargetElems ; ++i)
       targetElems[i] = new MeshElement<ConnType>(i, targetMesh);
 
     Intersector3D<MyMeshType,MatrixType>* intersector=0;
@@ -186,14 +186,14 @@ namespace INTERP_KERNEL
 
     MeshRegion<ConnType>& srcRegion = firstNode->getSrcRegion();
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       {
         srcRegion.addElement(srcElems[i], srcMesh);
       }
 
     MeshRegion<ConnType>& targetRegion = firstNode->getTargetRegion();
 
-    for(unsigned long i = 0 ; i < numTargetElems ; ++i)
+    for(ConnType i = 0 ; i < numTargetElems ; ++i)
       {
         if(!srcRegion.isDisjointWithElementBoundingBox( *(targetElems[i]) ))
           {
@@ -252,8 +252,8 @@ namespace INTERP_KERNEL
 
             // add source elements of current node that overlap the target regions of the new nodes
             LOG(5, " -- Adding source elements");
-            int numLeftElements = 0;
-            int numRightElements = 0;
+            ConnType numLeftElements = 0;
+            ConnType numRightElements = 0;
             for(typename std::vector<MeshElement<ConnType>*>::const_iterator iter = currNode->getSrcRegion().getBeginElements() ; 
                 iter != currNode->getSrcRegion().getEndElements() ; ++iter)
               {
@@ -307,8 +307,8 @@ namespace INTERP_KERNEL
       // create BBTree structure
       // - get bounding boxes
     double* bboxes = new double[6 * numSrcElems];
-    int* srcElemIdx = new int[numSrcElems];
-    for(unsigned long i = 0; i < numSrcElems ; ++i)
+    ConnType* srcElemIdx = new ConnType[numSrcElems];
+    for(ConnType i = 0; i < numSrcElems ; ++i)
       {
         // get source bboxes in right order
         const BoundingBox* box = srcElems[i]->getBoundingBox();
@@ -327,10 +327,10 @@ namespace INTERP_KERNEL
 
     // for each target element, get source elements with which to calculate intersection
     // - calculate intersection by calling intersectCells
-    for(unsigned long i = 0; i < numTargetElems; ++i)
+    for(ConnType i = 0; i < numTargetElems; ++i)
       {
         const BoundingBox* box = targetElems[i]->getBoundingBox();
-        const int targetIdx = targetElems[i]->getIndex();
+        const ConnType targetIdx = targetElems[i]->getIndex();
 
         // get target bbox in right order
         double targetBox[6];
@@ -354,15 +354,15 @@ namespace INTERP_KERNEL
 
 #endif
     // free allocated memory
-    int ret=intersector->getNumberOfColsOfResMatrix();
+    ConnType ret=intersector->getNumberOfColsOfResMatrix();
 
     delete intersector;
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       {
         delete srcElems[i];
       }
-    for(unsigned long i = 0 ; i < numTargetElems ; ++i)
+    for(ConnType i = 0 ; i < numTargetElems ; ++i)
       {
         delete targetElems[i];
       }
index da03d877563087707051b946a9590cb8dc6dfbc3..faa65ec42603d04c926b129058a412cfdbc93661 100644 (file)
@@ -45,8 +45,8 @@ namespace INTERP_KERNEL
     const double adj = getBoundingBoxAdjustmentAbs();
     const double adjRel = getBoundingBoxAdjustment();
 
-    long size = bbox.size()/(2*SPACE_DIM);
-    for (int i=0; i<size; i++)
+    std::size_t size = bbox.size()/(2*SPACE_DIM);
+    for (std::size_t i=0; i<size; i++)
       {
         double max=- std::numeric_limits<double>::max();
         for(int idim=0; idim<SPACE_DIM; idim++)
old mode 100644 (file)
new mode 100755 (executable)
index 8680ea2..59a5cec
@@ -1,45 +1,45 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// Author : A Bruneton (CEA/DEN)
-
-#ifndef __INTERPOLATION3D1D_HXX__
-#define __INTERPOLATION3D1D_HXX__
-
-#include "INTERPKERNELDefines.hxx"
-#include "Interpolation.hxx"
-#include "NormalizedUnstructuredMesh.hxx"
-#include "InterpolationOptions.hxx"
-
-#include <vector>
-
-namespace INTERP_KERNEL
-{
-  class INTERPKERNEL_EXPORT Interpolation3D1D : public Interpolation<Interpolation3D1D>
-  {
-  public:
-    Interpolation3D1D();
-    Interpolation3D1D(const InterpolationOptions& io);
-    template<class MyMeshType, class MatrixType>
-    int interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method);
-  private:
-    void adjustBoundingBoxes(std::vector<double>& bbox);
-  };
-}
-
-#endif
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2.1 of the License, or (at your option) any later version.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+//\r
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+//\r
+// Author : A Bruneton (CEA/DEN)\r
+\r
+#ifndef __INTERPOLATION3D1D_HXX__\r
+#define __INTERPOLATION3D1D_HXX__\r
+\r
+#include "INTERPKERNELDefines.hxx"\r
+#include "Interpolation.hxx"\r
+#include "NormalizedUnstructuredMesh.hxx"\r
+#include "InterpolationOptions.hxx"\r
+\r
+#include <vector>\r
+\r
+namespace INTERP_KERNEL\r
+{\r
+  class INTERPKERNEL_EXPORT Interpolation3D1D : public Interpolation<Interpolation3D1D>\r
+  {\r
+  public:\r
+    Interpolation3D1D();\r
+    Interpolation3D1D(const InterpolationOptions& io);\r
+    template<class MyMeshType, class MatrixType>\r
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method);\r
+  private:\r
+    void adjustBoundingBoxes(std::vector<double>& bbox);\r
+  };\r
+}\r
+\r
+#endif\r
old mode 100644 (file)
new mode 100755 (executable)
index 15d100d..9bc67b3
@@ -39,27 +39,27 @@ namespace INTERP_KERNEL
    *  adjusted in a similar fashion as in InterpolationPlanar::performAdjustmentOfBB()
    **/
   template<class MyMeshType, class MatrixType>
-  int Interpolation3D1D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method)
+  typename MyMeshType::MyConnType Interpolation3D1D::interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const std::string& method)
   {
     if(InterpolationOptions::getIntersectionType() != PointLocator)
       INTERP_KERNEL::Exception("Invalid 3D/1D intersection type specified : must be PointLocator.");
 
     typedef typename MyMeshType::MyConnType ConnType;
     // create MeshElement objects corresponding to each element of the two meshes
-    const unsigned long numSrcElems = srcMesh.getNumberOfElements();
-    const unsigned long numTargetElems = targetMesh.getNumberOfElements();
+    const ConnType numSrcElems = srcMesh.getNumberOfElements();
+    const ConnType numTargetElems = targetMesh.getNumberOfElements();
 
     LOG(2, "Source mesh has " << numSrcElems << " elements and target mesh has " << numTargetElems << " elements ");
 
     std::vector<MeshElement<ConnType>*> srcElems(numSrcElems);
     std::vector<MeshElement<ConnType>*> targetElems(numTargetElems);
 
-    std::map<MeshElement<ConnType>*, int> indices;
+    std::map<MeshElement<ConnType>*, ConnType> indices;
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       srcElems[i] = new MeshElement<ConnType>(i, srcMesh);       
 
-    for(unsigned long i = 0 ; i < numTargetElems ; ++i)
+    for(ConnType i = 0 ; i < numTargetElems ; ++i)
       targetElems[i] = new MeshElement<ConnType>(i, targetMesh);
 
     Intersector3D<MyMeshType,MatrixType>* intersector=0;
@@ -84,8 +84,8 @@ namespace INTERP_KERNEL
     // create BBTree structure
     // - get bounding boxes
     std::vector<double> bboxes(6*numSrcElems);
-    int* srcElemIdx = new int[numSrcElems];
-    for(unsigned long i = 0; i < numSrcElems ; ++i)
+    ConnType* srcElemIdx = new ConnType[numSrcElems];
+    for(ConnType i = 0; i < numSrcElems ; ++i)
       {
         // get source bboxes in right order
         const BoundingBox* box = srcElems[i]->getBoundingBox();
@@ -107,10 +107,10 @@ namespace INTERP_KERNEL
 
     // for each target element, get source elements with which to calculate intersection
     // - calculate intersection by calling intersectCells
-    for(unsigned long i = 0; i < numTargetElems; ++i)
+    for(ConnType i = 0; i < numTargetElems; ++i)
       {
         const BoundingBox* box = targetElems[i]->getBoundingBox();
-        const int targetIdx = targetElems[i]->getIndex();
+        const ConnType targetIdx = targetElems[i]->getIndex();
 
         // get target bbox in right order
         double targetBox[6];
@@ -132,15 +132,15 @@ namespace INTERP_KERNEL
     // free allocated memory
     delete [] srcElemIdx;
 
-    int ret=intersector->getNumberOfColsOfResMatrix();
+    ConnType ret=intersector->getNumberOfColsOfResMatrix();
 
     delete intersector;
 
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       {
         delete srcElems[i];
       }
-    for(unsigned long i = 0 ; i < numTargetElems ; ++i)
+    for(ConnType i = 0 ; i < numTargetElems ; ++i)
       {
         delete targetElems[i];
       }
index 00a22098aa0a1c8b34fb6c30631d9df87477cfc5..d1b434f9932a27893b4b352aa2df95c87a2f4e67 100644 (file)
@@ -41,7 +41,7 @@ namespace INTERP_KERNEL
     InterpolationCC();
     InterpolationCC(const InterpolationOptions& io);
     template<class MyMeshType, class MatrixType>
-    int interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const char *method);
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh, const MyMeshType& targetMesh, MatrixType& result, const char *method);
 
   private:
   };
index ecbd29210173c3130d4567cfa0cbca0b632d01da..7a3363bcac905c21ac4d89f0fd87150541ed40ef 100644 (file)
@@ -74,15 +74,15 @@ namespace INTERP_KERNEL
    */
   //================================================================================
 
-  template <class MyMeshType, class MatrixType, int dim>
+  template <class MyMeshType, int dim, class MatrixType, class ConnType>
   void fillMatrix(const std::list< Interference >  inter_of_axis[dim],
                   MatrixType&                      result,
-                  const int                        src_nb_cells[dim],
-                  const int                        tgt_nb_cells[dim],
-                  const int                        src_i_cell = 0,
-                  const int                        tgt_i_cell = 0,
-                  const int                        src_prev_area = 1,
-                  const int                        tgt_prev_area = 1,
+                  const ConnType                   src_nb_cells[dim],
+                  const ConnType                   tgt_nb_cells[dim],
+                  const ConnType                   src_i_cell = 0,
+                  const ConnType                   tgt_i_cell = 0,
+                  const ConnType                   src_prev_area = 1,
+                  const ConnType                   tgt_prev_area = 1,
                   const int                        axis = 0,
                   const double                     prev_value = 1.0)
   {
@@ -92,29 +92,29 @@ namespace INTERP_KERNEL
     {
       for ( TIntIterator i = inter_of_axis[axis].begin(); i != inter_of_axis[axis].end(); ++i )
       {
-        double value = i->_length * prev_value;
-        int src_i    = i->_src_index * src_prev_area + src_i_cell;
-        int tgt_i    = i->_tgt_index * tgt_prev_area + tgt_i_cell;
+        double   value = i->_length * prev_value;
+        ConnType src_i = i->_src_index * src_prev_area + src_i_cell;
+        ConnType tgt_i = i->_tgt_index * tgt_prev_area + tgt_i_cell;
 
         result[ tgt_i ].insert( std::make_pair( _TMI( src_i ), value ));
       }
     }
     else
     {
-      int src_prev_area_next = src_prev_area * src_nb_cells[ axis ];
-      int tgt_prev_area_next = tgt_prev_area * tgt_nb_cells[ axis ];
+      ConnType src_prev_area_next = src_prev_area * src_nb_cells[ axis ];
+      ConnType tgt_prev_area_next = tgt_prev_area * tgt_nb_cells[ axis ];
 
       for ( TIntIterator i = inter_of_axis[axis].begin(); i != inter_of_axis[axis].end(); ++i )
       {
-        double value = i->_length * prev_value;
-        int src_i    = i->_src_index * src_prev_area + src_i_cell;
-        int tgt_i    = i->_tgt_index * tgt_prev_area + tgt_i_cell;
+        double   value = i->_length * prev_value;
+        ConnType src_i = i->_src_index * src_prev_area + src_i_cell;
+        ConnType tgt_i = i->_tgt_index * tgt_prev_area + tgt_i_cell;
 
         // call for the next axis
-        fillMatrix<MyMeshType, MatrixType, dim>(inter_of_axis, result,
-                                                src_nb_cells, tgt_nb_cells, src_i, tgt_i,
-                                                src_prev_area_next, tgt_prev_area_next,
-                                                axis+1, value );
+        fillMatrix<MyMeshType, dim>(inter_of_axis, result,
+                                    src_nb_cells, tgt_nb_cells, src_i, tgt_i,
+                                    src_prev_area_next, tgt_prev_area_next,
+                                    axis+1, value );
       }
     }
   }
@@ -141,7 +141,7 @@ namespace INTERP_KERNEL
   //================================================================================
 
   template<class MyMeshType, class MatrixType>
-  int InterpolationCC::interpolateMeshes(const MyMeshType& src_mesh,
+  typename MyMeshType::MyConnType InterpolationCC::interpolateMeshes(const MyMeshType& src_mesh,
                                          const MyMeshType& tgt_mesh,
                                          MatrixType&       result,
                                          const char *      method)
@@ -152,7 +152,8 @@ namespace INTERP_KERNEL
     // create empty maps for all target elements
     result.resize( tgt_mesh.getNumberOfElements() );
 
-    const int ret = src_mesh.getNumberOfElements();
+    typedef typename MyMeshType::MyConnType ConnType;
+    const ConnType ret = src_mesh.getNumberOfElements();
 
     const double eps = getPrecision();
     const int dim = MyMeshType::MY_MESHDIM;
@@ -160,14 +161,15 @@ namespace INTERP_KERNEL
 
     const double* src_coords[ dim ];
     const double* tgt_coords[ dim ];
-    int src_nb_cells[ dim ];
-    int tgt_nb_cells[ dim ];
+    ConnType src_nb_cells[ dim ];
+    ConnType tgt_nb_cells[ dim ];
     for ( int j = 0; j < dim; ++j )
     {
-      src_coords[ j ] = src_mesh.getCoordsAlongAxis( _TMI( j ));
-      tgt_coords[ j ] = tgt_mesh.getCoordsAlongAxis( _TMI( j ));
-      src_nb_cells[ j ] = src_mesh.nbCellsAlongAxis( _TMI( j ));
-      tgt_nb_cells[ j ] = tgt_mesh.nbCellsAlongAxis( _TMI( j ));
+      int axis = static_cast<int>( _TMI( j ));
+      src_coords[ j ] = src_mesh.getCoordsAlongAxis( axis );
+      tgt_coords[ j ] = tgt_mesh.getCoordsAlongAxis( axis );
+      src_nb_cells[ j ] = src_mesh.nbCellsAlongAxis( axis );
+      tgt_nb_cells[ j ] = tgt_mesh.nbCellsAlongAxis( axis );
     }
     
     // ============================================
@@ -235,15 +237,15 @@ namespace INTERP_KERNEL
     switch ( dim )
     {
     case 3:
-      fillMatrix<MyMeshType,MatrixType,3>( interferences, result, src_nb_cells,tgt_nb_cells );
+      fillMatrix<MyMeshType,3>( interferences, result, src_nb_cells,tgt_nb_cells );
       break;
 
     case 2:
-      fillMatrix<MyMeshType,MatrixType,2>( interferences, result, src_nb_cells,tgt_nb_cells );
+      fillMatrix<MyMeshType,2>( interferences, result, src_nb_cells,tgt_nb_cells );
       break;
 
     case 1:
-      fillMatrix<MyMeshType,MatrixType,1>( interferences, result, src_nb_cells,tgt_nb_cells );
+      fillMatrix<MyMeshType,1>( interferences, result, src_nb_cells,tgt_nb_cells );
       break;
     }
 
index 3d74d4ddd2fcc8278a49b3d7ff2b337f8293b039..31c95329c1a12819130ee2831440311c7bae7f0f 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "Interpolation.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
+#include "InterpKernelUtilities.hxx"
 
 namespace INTERP_KERNEL
 {
@@ -36,10 +37,10 @@ namespace INTERP_KERNEL
     InterpolationCU(const InterpolationOptions & io);
 
     template<class MyCMeshType, class MyUMeshType, class MatrixType>
-    int interpolateMeshes(const MyCMeshType& meshS, const MyUMeshType& meshT, MatrixType& result, const char *method);
+    typename MyCMeshType::MyConnType interpolateMeshes(const MyCMeshType& meshS, const MyUMeshType& meshT, MatrixType& result, const char *method);
 
     template<class MyUMeshType, class MyCMeshType, class MatrixType>
-    int interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method);
+    typename MyUMeshType::MyConnType interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method);
 
   };
 }
index a202ec305d8151ff400d029e8541b833a4146d08..e43d80cc82589246cb0d8a8299fb5aa540ddc2ba 100644 (file)
@@ -92,12 +92,13 @@ namespace INTERP_KERNEL
   //================================================================================
 
   template<class MyCMeshType, class MyUMeshType, class MatrixType>
-  int InterpolationCU::interpolateMeshes(const MyCMeshType& src_mesh,
+  typename MyCMeshType::MyConnType InterpolationCU::interpolateMeshes(const MyCMeshType& src_mesh,
                                          const MyUMeshType& tgt_mesh,
                                          MatrixType&        result,
                                          const char *       method)
   {
     typedef typename MyCMeshType::MyConnType CConnType;
+    typedef typename MyUMeshType::MyConnType UConnType;
 
     if ( std::string("P0P0") != method )
       throw Exception("Only P0P0 method is implemented so far");
@@ -117,27 +118,28 @@ namespace INTERP_KERNEL
       }
     // create empty maps for all target elements
     result.resize( intersector->getNumberOfRowsOfResMatrix() );
-    const int ret = intersector->getNumberOfColsOfResMatrix();
+    const CConnType ret = intersector->getNumberOfColsOfResMatrix();
 
     const double* src_coords[ dim ];
-    int        src_nb_coords[ dim ];
-    std::map< double, int> src_coord_to_index[ dim ];
+    CConnType  src_nb_coords[ dim ];
+    std::map< double, CConnType> src_coord_to_index[ dim ];
     for ( int j = 0; j < dim; ++j )
       {
-        src_coords   [j] = src_mesh.getCoordsAlongAxis( _TMIC( j ));
-        src_nb_coords[j] = src_mesh.nbCellsAlongAxis  ( _TMIC( j )) + 1;
-        for (int i = 0; i < src_nb_coords[j]; ++i )
+        int axis = static_cast<int>( _TMIC( j ));
+        src_coords   [j] = src_mesh.getCoordsAlongAxis( axis );
+        src_nb_coords[j] = static_cast<CConnType>(src_mesh.nbCellsAlongAxis( axis )) + 1;
+        for (CConnType i = 0; i < src_nb_coords[j]; ++i )
           src_coord_to_index[j].insert( std::make_pair( src_coords[j][i], i ));
       }
 
-    const unsigned long tgtu_nb_cells = tgt_mesh.getNumberOfElements();
+    const UConnType tgtu_nb_cells = tgt_mesh.getNumberOfElements();
 
     IntersectorCU<MyCMeshType, MyUMeshType, MatrixType> bbHelper(src_mesh, tgt_mesh);
     double bb[2*dim];
 
     // loop on unstructured tgt cells
 
-    for(unsigned int iT=0; iT<tgtu_nb_cells; iT++)
+    for(UConnType iT=0; iT<tgtu_nb_cells; iT++)
       {
         result[ iT ].clear();
 
@@ -154,23 +156,23 @@ namespace INTERP_KERNEL
 
         // find structured src cells intersecting iT cell
         std::vector< std::vector< CConnType > > structIndices(1);
-        std::map< double, int>::iterator coo_ind;
+        typename std::map< double, CConnType>::iterator coo_ind;
         for ( int j = 0; j < dim; ++j )
           {
             coo_ind = src_coord_to_index[j].lower_bound( bb[2*j+1] - eps );
             if ( coo_ind == src_coord_to_index[j].end() )
               --coo_ind;
-            int max_i = coo_ind->second;
+            CConnType max_i = coo_ind->second;
 
             coo_ind = src_coord_to_index[j].upper_bound( bb[2*j  ] + eps );
             if ( coo_ind != src_coord_to_index[j].begin() )
               --coo_ind;
-            int min_i = coo_ind->second;
+            CConnType min_i = coo_ind->second;
 
             std::vector< std::vector< CConnType > > newStructIndices;
             for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd )
               {
-                for ( int i = min_i; i < max_i; ++i )
+                for ( CConnType i = min_i; i < max_i; ++i )
                   {
                     std::vector< CConnType > index = structIndices[iInd];
                     index.push_back( i );
@@ -214,14 +216,17 @@ namespace INTERP_KERNEL
   //================================================================================
 
   template<class MyUMeshType, class MyCMeshType, class MatrixType>
-  int InterpolationCU::interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method)
+  typename MyUMeshType::MyConnType InterpolationCU::interpolateMeshesRev(const MyUMeshType& meshS, const MyCMeshType& meshT, MatrixType& result, const char *method)
   {
+    typedef typename MyCMeshType::MyConnType CConnType;
+    typedef typename MyUMeshType::MyConnType UConnType;
+
     MatrixType revResult;
-    int sizeT = interpolateMeshes( meshT, meshS, revResult, method );
-    int sizeS = revResult.size();
+    CConnType sizeT = interpolateMeshes( meshT, meshS, revResult, method );
+    UConnType sizeS = revResult.size();
     result.resize( sizeT );
 
-    for ( int iS = 0; iS < sizeS; ++iS )
+    for ( CConnType iS = 0; iS < sizeS; ++iS )
       {
         typename MatrixType::value_type & row = revResult[iS];
         typename MatrixType::value_type::iterator iT_surf = row.begin();
old mode 100644 (file)
new mode 100755 (executable)
index 25f81e0..af93323
@@ -1,44 +1,44 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// Author : Anthony Geay (CEA/DEN)
-
-#ifndef __INTERPOLATIONCURVE_HXX__
-#define __INTERPOLATIONCURVE_HXX__
-
-#include "Interpolation.hxx"
-#include "InterpolationOptions.hxx"
-
-namespace INTERP_KERNEL
-{
-  template<class RealCurve>
-  class InterpolationCurve : public Interpolation< InterpolationCurve<RealCurve> >
-  {
-  public:
-    InterpolationCurve();
-    InterpolationCurve(const InterpolationOptions & io);
-
-    // Main function to interpolate
-    template<class MyMeshType, class MatrixType>
-    int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT,
-                          MatrixType& result, const std::string& method);
-    
-  };
-}
-
-#endif
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2.1 of the License, or (at your option) any later version.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+//\r
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+//\r
+// Author : Anthony Geay (CEA/DEN)\r
+\r
+#ifndef __INTERPOLATIONCURVE_HXX__\r
+#define __INTERPOLATIONCURVE_HXX__\r
+\r
+#include "Interpolation.hxx"\r
+#include "InterpolationOptions.hxx"\r
+\r
+namespace INTERP_KERNEL\r
+{\r
+  template<class RealCurve>\r
+  class InterpolationCurve : public Interpolation< InterpolationCurve<RealCurve> >\r
+  {\r
+  public:\r
+    InterpolationCurve();\r
+    InterpolationCurve(const InterpolationOptions & io);\r
+\r
+    // Main function to interpolate\r
+    template<class MyMeshType, class MatrixType>\r
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT,\r
+                          MatrixType& result, const std::string& method);\r
+    \r
+  };\r
+}\r
+\r
+#endif\r
old mode 100644 (file)
new mode 100755 (executable)
index 097f8d0..972aa5f
@@ -73,7 +73,7 @@ namespace INTERP_KERNEL
       */
   template<class RealCurve>
   template<class MyMeshType, class MatrixType>
-  int InterpolationCurve<RealCurve>::interpolateMeshes (const MyMeshType&  myMeshS,
+  typename MyMeshType::MyConnType InterpolationCurve<RealCurve>::interpolateMeshes (const MyMeshType&  myMeshS,
                                                         const MyMeshType&  myMeshT,
                                                         MatrixType&        result,
                                                         const std::string& method)
@@ -83,10 +83,10 @@ namespace INTERP_KERNEL
     static const NumberingPolicy numPol = MyMeshType::My_numPol;
 
     long global_start = clock();
-    int counter=0;   
+    std::size_t counter=0;   
 
-    long nbMailleS = myMeshS.getNumberOfElements();
-    long nbMailleT = myMeshT.getNumberOfElements();
+    ConnType nbMailleS = myMeshS.getNumberOfElements();
+    ConnType nbMailleT = myMeshT.getNumberOfElements();
     
     CurveIntersector<MyMeshType,MatrixType>* intersector=0;
     if(method=="P0P0")
@@ -187,17 +187,17 @@ namespace INTERP_KERNEL
     /****************************************************/
     long start_intersection = clock();
     const ConnType *connIndxT = myMeshT.getConnectivityIndexPtr();
-    for(int iT=0; iT<nbMailleT; iT++)
+    for(ConnType iT=0; iT<nbMailleT; iT++)
       {
-        int nb_nodesT = connIndxT[iT+1] - connIndxT[iT];
-        std::vector<int> intersecting_elems;
+        ConnType nb_nodesT = connIndxT[iT+1] - connIndxT[iT];
+        std::vector<ConnType> intersecting_elems;
         double bb[2*SPACEDIM];
         intersector->getElemBB(bb,myMeshT,OTT<ConnType,numPol>::indFC(iT),nb_nodesT);
         my_tree.getIntersectingElems(bb, intersecting_elems);
         intersector->intersectCells(iT,intersecting_elems,result);
         counter += intersecting_elems.size();
       }
-    int ret = intersector->getNumberOfColsOfResMatrix();
+    ConnType ret = intersector->getNumberOfColsOfResMatrix();
     delete intersector;
     
     if (InterpolationOptions::getPrintLevel() >= 1)
index 63998d9338e251920589a8ad365829aa221b656a..0d70a7d0ab28307a186ab1c190d710539075748f 100644 (file)
@@ -255,7 +255,7 @@ std::string INTERP_KERNEL::InterpolationOptions::filterInterpolationMethod(const
   return std::string(meth);
 }
 
-bool INTERP_KERNEL::InterpolationOptions::setInterpolationOptions(long print_level,
+bool INTERP_KERNEL::InterpolationOptions::setInterpolationOptions(int print_level,
                                                                   std::string intersection_type,
                                                                   double precision,
                                                                   double median_plane,
@@ -263,7 +263,7 @@ bool INTERP_KERNEL::InterpolationOptions::setInterpolationOptions(long print_lev
                                                                   double bounding_box_adjustment,
                                                                   double bounding_box_adjustment_abs,
                                                                   double max_distance_for_3Dsurf_intersect,
-                                                                  long orientation,
+                                                                  int orientation,
                                                                   bool measure_abs,
                                                                   std::string splitting_policy)
 {
index d06c50964a7daa38e228194ea9f27ade135afdce..f4fd8984d99b6d04f977fe31caa816b51048059c 100644 (file)
@@ -98,7 +98,7 @@ namespace INTERP_KERNEL
 
     void init();
     
-    bool setInterpolationOptions(long print_level,
+    bool setInterpolationOptions(int print_level,
                                  std::string intersection_type,
                                  double precision,
                                  double median_plane,
@@ -106,7 +106,7 @@ namespace INTERP_KERNEL
                                  double bounding_box_adjustment,
                                  double bounding_box_adjustment_abs,
                                  double max_distance_for_3Dsurf_intersect,
-                                 long orientation,
+                                 int orientation,
                                  bool measure_abs,
                                  std::string splitting_policy);
     void copyOptions(const InterpolationOptions & other) { *this = other; }
old mode 100644 (file)
new mode 100755 (executable)
index 0403487..76b52f8
@@ -1,59 +1,59 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// Author : Anthony Geay (CEA/DEN)
-
-#ifndef __INTERPOLATIONPLANAR_HXX__
-#define __INTERPOLATIONPLANAR_HXX__
-
-#include "Interpolation.hxx"
-#include "PlanarIntersector.hxx"
-#include "NormalizedUnstructuredMesh.hxx"
-#include "InterpolationOptions.hxx"
-
-namespace INTERP_KERNEL
-{
-  template<class RealPlanar>
-  class InterpolationPlanar : public Interpolation< InterpolationPlanar<RealPlanar> >
-  {
-  private:
-    double _dim_caracteristic;
-  public:
-    InterpolationPlanar();
-    InterpolationPlanar(const InterpolationOptions & io);
-
-    // geometric precision, debug print level, choice of the median plane, intersection etc ...
-    void setOptions(double precision, int printLevel,
-                    IntersectionType intersectionType, int orientation=0);
-
-    // Main function to interpolate triangular and quadratic meshes
-    template<class MyMeshType, class MatrixType>
-    int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result, const std::string& method);
-  public:
-    bool doRotate() const { return asLeafInterpPlanar().doRotate(); }
-    double medianPlane() const { return asLeafInterpPlanar().medianPlane(); }
-    template<class MyMeshType, class MyMatrixRow>
-      void performAdjustmentOfBB(PlanarIntersector<MyMeshType,MyMatrixRow>* intersector, std::vector<double>& bbox) const
-    { return asLeafInterpPlanar().performAdjustmentOfBB(intersector,bbox); }
-  protected:
-    RealPlanar& asLeafInterpPlanar() { return static_cast<RealPlanar&>(*this); }
-    const RealPlanar& asLeafInterpPlanar() const { return static_cast< const RealPlanar& >(*this); }
-  };
-}
-
-#endif
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2.1 of the License, or (at your option) any later version.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+//\r
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+//\r
+// Author : Anthony Geay (CEA/DEN)\r
+\r
+#ifndef __INTERPOLATIONPLANAR_HXX__\r
+#define __INTERPOLATIONPLANAR_HXX__\r
+\r
+#include "Interpolation.hxx"\r
+#include "PlanarIntersector.hxx"\r
+#include "NormalizedUnstructuredMesh.hxx"\r
+#include "InterpolationOptions.hxx"\r
+\r
+namespace INTERP_KERNEL\r
+{\r
+  template<class RealPlanar>\r
+  class InterpolationPlanar : public Interpolation< InterpolationPlanar<RealPlanar> >\r
+  {\r
+  private:\r
+    double _dim_caracteristic;\r
+  public:\r
+    InterpolationPlanar();\r
+    InterpolationPlanar(const InterpolationOptions & io);\r
+\r
+    // geometric precision, debug print level, choice of the median plane, intersection etc ...\r
+    void setOptions(double precision, int printLevel,\r
+                    IntersectionType intersectionType, int orientation=0);\r
+\r
+    // Main function to interpolate triangular and quadratic meshes\r
+    template<class MyMeshType, class MatrixType>\r
+    typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result, const std::string& method);\r
+  public:\r
+    bool doRotate() const { return asLeafInterpPlanar().doRotate(); }\r
+    double medianPlane() const { return asLeafInterpPlanar().medianPlane(); }\r
+    template<class MyMeshType, class MyMatrixRow>\r
+      void performAdjustmentOfBB(PlanarIntersector<MyMeshType,MyMatrixRow>* intersector, std::vector<double>& bbox) const\r
+    { return asLeafInterpPlanar().performAdjustmentOfBB(intersector,bbox); }\r
+  protected:\r
+    RealPlanar& asLeafInterpPlanar() { return static_cast<RealPlanar&>(*this); }\r
+    const RealPlanar& asLeafInterpPlanar() const { return static_cast< const RealPlanar& >(*this); }\r
+  };\r
+}\r
+\r
+#endif\r
old mode 100644 (file)
new mode 100755 (executable)
index eb969ea..bf9481f
@@ -114,20 +114,20 @@ namespace INTERP_KERNEL
       */
   template<class RealPlanar>
   template<class MyMeshType, class MatrixType>
-  int InterpolationPlanar<RealPlanar>::interpolateMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, MatrixType& result, const std::string& method)
+  typename MyMeshType::MyConnType InterpolationPlanar<RealPlanar>::interpolateMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, MatrixType& result, const std::string& method)
   {
     static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
     typedef typename MyMeshType::MyConnType ConnType;
     static const NumberingPolicy numPol=MyMeshType::My_numPol;
 
     long global_start =clock();
-    int counter=0;   
+    std::size_t counter=0;   
     /***********************************************************/
     /* Check both meshes are made of triangles and quadrangles */
     /***********************************************************/
 
-    long nbMailleS=myMeshS.getNumberOfElements();
-    long nbMailleT=myMeshT.getNumberOfElements();
+    ConnType nbMailleS=myMeshS.getNumberOfElements();
+    ConnType nbMailleT=myMeshT.getNumberOfElements();
     
     /**************************************************/
     /* Search the characteristic size of the meshes   */
@@ -139,13 +139,13 @@ namespace INTERP_KERNEL
     if(nbMailleS!=0)
       {
         diagonalS=getDistanceBtw2Pts<SPACEDIM>(BoxS+SPACEDIM,BoxS);
-        dimCaracteristicS=diagonalS/nbMailleS;
+        dimCaracteristicS=diagonalS/(double)(nbMailleS);
       }
     double diagonalT,dimCaracteristicT=std::numeric_limits<double>::max();
     if(nbMailleT!=0)
       {
         diagonalT=getDistanceBtw2Pts<SPACEDIM>(BoxT+SPACEDIM,BoxT);
-        dimCaracteristicT=diagonalT/nbMailleT;
+        dimCaracteristicT=diagonalT/(double)(nbMailleT);
       }
     
     _dim_caracteristic=std::min(dimCaracteristicS, dimCaracteristicT);
@@ -397,12 +397,12 @@ namespace INTERP_KERNEL
     /* Loop on the target cells - core of the algorithm */
     /****************************************************/
     long start_intersection=clock();
-    long nbelem_type=myMeshT.getNumberOfElements();
+    ConnType nbelem_type=myMeshT.getNumberOfElements();
     const ConnType *connIndxT=myMeshT.getConnectivityIndexPtr();
-    for(int iT=0; iT<nbelem_type; iT++)
+    for(ConnType iT=0; iT<nbelem_type; iT++)
       {
-        int nb_nodesT=connIndxT[iT+1]-connIndxT[iT];
-        std::vector<int> intersecting_elems;
+        ConnType nb_nodesT=connIndxT[iT+1]-connIndxT[iT];
+        std::vector<ConnType> intersecting_elems;
         double bb[2*SPACEDIM];
         intersector->getElemBB(bb,myMeshT,OTT<ConnType,numPol>::indFC(iT),nb_nodesT);
         my_tree.getIntersectingElems(bb, intersecting_elems);
@@ -410,7 +410,7 @@ namespace INTERP_KERNEL
         counter+=intersecting_elems.size();
         intersecting_elems.clear();
       }
-    int ret=intersector->getNumberOfColsOfResMatrix();
+    ConnType ret=intersector->getNumberOfColsOfResMatrix();
     delete intersector;
 
     if (InterpolationOptions::getPrintLevel() >=1)
index f40bd33518b27d324ea181269f2a8213977ee661..abf55b69866ec1d3dae2c685fbb11094ea121968 100644 (file)
@@ -170,7 +170,7 @@ namespace INTERP_KERNEL
    * @param quadOut is a 8 doubles array filled after the following call.
    */
   template<int SPACEDIM>
-  inline void fillDualCellOfPolyg(const double *polygIn, int nPtsPolygonIn, double *polygOut)
+  inline void fillDualCellOfPolyg(const double *polygIn, mcIdType nPtsPolygonIn, double *polygOut)
   {
     //1st point
     std::copy(polygIn,polygIn+SPACEDIM,polygOut);
@@ -179,7 +179,7 @@ namespace INTERP_KERNEL
     std::transform(polygOut+SPACEDIM,polygOut+2*SPACEDIM,polygOut+SPACEDIM,std::bind2nd(std::multiplies<double>(),0.5));
     double tmp[SPACEDIM];
     //
-    for(int i=0;i<nPtsPolygonIn-2;i++)
+    for(mcIdType i=0;i<nPtsPolygonIn-2;i++)
       {
         std::transform(polygIn,polygIn+SPACEDIM,polygIn+(i+2)*SPACEDIM,tmp,std::plus<double>());
         std::transform(tmp,tmp+SPACEDIM,polygOut+(2*i+3)*SPACEDIM,std::bind2nd(std::multiplies<double>(),0.5));
@@ -197,17 +197,17 @@ namespace INTERP_KERNEL
   inline std::vector<double> bary_poly(const std::vector<double>& V)
   {
     std::vector<double> Bary;
-    long taille=V.size();
+    std::size_t taille=V.size();
     double x=0;
     double y=0;
 
-    for(long i=0;i<taille/2;i++)
+    for(std::size_t i=0;i<taille/2;i++)
       {
         x=x+V[2*i];
         y=y+V[2*i+1];
       }
-    double A=2*x/((double)taille);
-    double B=2*y/((double)taille);
+    double A=2*x/(static_cast<double>(taille));
+    double B=2*y/(static_cast<double>(taille));
     Bary.push_back(A);//taille vecteur=2*nb de points.
     Bary.push_back(B);
 
@@ -801,9 +801,9 @@ namespace INTERP_KERNEL
 
   inline void verif_point_dans_vect(const double* P, std::vector<double>& V, double absolute_precision )
   {
-    long taille=V.size();
+    std::size_t taille=V.size();
     bool isPresent=false;
-    for(long i=0;i<taille/2;i++) 
+    for(std::size_t i=0;i<taille/2;i++) 
       {
         if (sqrt(((P[0]-V[2*i])*(P[0]-V[2*i])+(P[1]-V[2*i+1])*(P[1]-V[2*i+1])))<absolute_precision)
           isPresent=true;
@@ -911,9 +911,9 @@ namespace INTERP_KERNEL
 
   inline void verif_maill_dans_vect(int Num, std::vector<int>& V)
   {
-    long taille=V.size();
+    std::size_t taille=V.size();
     int A=0;
-    for(long i=0;i<taille;i++)
+    for(std::size_t i=0;i<taille;i++)
       {
         if(Num==V[i])
           {
@@ -1012,7 +1012,7 @@ namespace INTERP_KERNEL
   }
 
   template<int DIM, NumberingPolicy numPol, class MyMeshType>
-  inline void getElemBB(double* bb, const double *coordsOfMesh, int iP, int nb_nodes)
+  inline void getElemBB(double* bb, const double *coordsOfMesh, mcIdType iP, int nb_nodes)
   {
     bb[0]=std::numeric_limits<double>::max();
     bb[1]=-std::numeric_limits<double>::max();
index 7cd83329b1b75e6620d6db156bb17c0bdb015ce3..47bec7ebfe8748e3ac0f2b74a3d08be142769c3e 100644 (file)
@@ -37,7 +37,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   void Intersector3D<MyMeshType,MyMatrix>::getRealTargetCoordinates(ConnType icellT, std::vector<double>& coordsT) const
   {
-    int nbNodesT=_target_mesh.getNumberOfNodesOfElement(icellT);
+    ConnType nbNodesT=_target_mesh.getNumberOfNodesOfElement(icellT);
     coordsT.resize(SPACEDIM*nbNodesT);
     std::vector<double>::iterator iter=coordsT.begin();
     for (ConnType iT=0; iT<nbNodesT; iT++)
@@ -53,7 +53,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   void Intersector3D<MyMeshType,MyMatrix>::getRealSourceCoordinates(ConnType icellS, std::vector<double>& coordsS) const
   {
-    int nbNodesS=_src_mesh.getNumberOfNodesOfElement(icellS);
+    ConnType nbNodesS=_src_mesh.getNumberOfNodesOfElement(icellS);
     coordsS.resize(SPACEDIM*nbNodesS);
     std::vector<double>::iterator iter=coordsS.begin();
     for (ConnType iS=0; iS<nbNodesS; iS++)
@@ -98,7 +98,7 @@ namespace INTERP_KERNEL
     const ConnType *myConIndexS=_src_mesh.getConnectivityIndexPtr();
     ConnType start=myConIndexS[OTT<ConnType,numPol>::ind2C(icellS)];
     ConnType end=myConIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1];
-    int nbNodesS=end-start;
+    ConnType nbNodesS=end-start;
     res.resize(nbNodesS);
     std::copy(myConectS+OTT<ConnType,numPol>::conn2C(start),myConectS+OTT<ConnType,numPol>::conn2C(end),res.begin());
   }
index ccb8ed34993dac77d31b8d6e0d12af1db39cb699..987fd7f294ea7d02defc351eb82e6818e489f581 100644 (file)
@@ -30,8 +30,8 @@ namespace INTERP_KERNEL
   {
   public:
     Intersector3DP0P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 7b3db0bc5f01fe646a8f86e616f03fb8637fdf85..86fed9bacefd0491c6c419259af17e773d7f134e 100644 (file)
@@ -31,13 +31,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP0P0<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP0P0<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_target_mesh.getNumberOfElements();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP0P0<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP0P0<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_src_mesh.getNumberOfElements();
   }
index 0c599f04fe7c709cbba3233240ac95991cfd53d1..7032d1e112cc5fc9ed2874a32c7f3d2a1a2b32c7 100644 (file)
@@ -30,8 +30,8 @@ namespace INTERP_KERNEL
   {
   public:
     Intersector3DP0P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 62a632caefc0062b4630d5504fb405c2932bff0e..f9e067da2b6e3c1b7957c8384d3c12c417d4fa88 100644 (file)
@@ -31,13 +31,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP0P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP0P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_target_mesh.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP0P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP0P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_src_mesh.getNumberOfElements();
   }
index fbaac7a69cab475e6f476fa24ce9ba925c14a125..3a310c8014642fb2dfa9830073dac9bb9de7c7cb 100644 (file)
@@ -30,8 +30,8 @@ namespace INTERP_KERNEL
   {
   public:
     Intersector3DP1P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 7926071016964ec71080f400edee46ae6d544760..235babdfc0ae59381ee361a194a71afbec42b5b2 100644 (file)
@@ -31,13 +31,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP1P0<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP1P0<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_target_mesh.getNumberOfElements();
   }
   
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP1P0<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP1P0<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_src_mesh.getNumberOfNodes();
   }
index 4871adf4890a00d30b19305dc6845efd0a87392b..79532b6ea8c25f98a196f97f6f4d6a007bf6b43c 100644 (file)
@@ -30,8 +30,8 @@ namespace INTERP_KERNEL
   {
   public:
     Intersector3DP1P0Bary(const MyMeshType& targetMesh, const MyMeshType& srcMesh);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 4c8498e7a37c482b4f906617f016f14886682d96..40a20eee0f58207a40ba03435d543195991b50af 100644 (file)
@@ -31,13 +31,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP1P0Bary<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP1P0Bary<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_target_mesh.getNumberOfElements();
   }
   
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP1P0Bary<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP1P0Bary<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_src_mesh.getNumberOfNodes();
   }
index e337bf471c9ce7b999a23265326f569bf9ad9b15..b5c1374e7d9bd4c72b2d1ea2137890ef534c9e52 100644 (file)
@@ -30,8 +30,8 @@ namespace INTERP_KERNEL
   {
   public:
     Intersector3DP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfRowsOfResMatrix() const;
+    typename MyMeshType::MyConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 73bdbecb625f2c968670da8ef60beb1a30b2649e..5e89479167f2f95c43b3e5148a709163eb0ffeb8 100644 (file)
@@ -31,13 +31,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP1P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP1P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_target_mesh.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int Intersector3DP1P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType Intersector3DP1P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return Intersector3D<MyMeshType,MyMatrix>::_src_mesh.getNumberOfNodes();
   }
index e0b6329649ec08583712147a67d3c8a96021654b..32c3b888cff1575bf91911590a22c45b70541e89 100644 (file)
@@ -47,8 +47,8 @@ namespace INTERP_KERNEL
     void getUElemBB(double* bb, UConnType iP);
     void getUCoordinates(UConnType icell, std::vector<double>& coords);
 
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    CConnType getNumberOfRowsOfResMatrix() const;
+    CConnType getNumberOfColsOfResMatrix() const;
     void intersectCells(CConnType icellU, const std::vector<CConnType>& icellC, MyMatrix& res);
     double intersectGeometry(CConnType icellT, const std::vector<CConnType>& icellC) { return asLeaf().intersectGeometry(icellT,icellC); }
   protected:
@@ -61,7 +61,7 @@ namespace INTERP_KERNEL
     const MyUMeshType& _meshU;
 
     const double *     _coordsC[SPACEDIM];
-    int                _nbCellsC[SPACEDIM];
+    CConnType          _nbCellsC[SPACEDIM];
     const MyCMeshType& _meshC;
   };
 
index fe9789b60621f1fb98a7f825efecb43cc5a3506f..de1a4cd48b25a4869f7707897199ed12a757638f 100644 (file)
@@ -60,8 +60,9 @@ namespace INTERP_KERNEL
 
     for ( int j = 0; j < SPACEDIM; ++j )
       {
-        _coordsC [ j ] = _meshC.getCoordsAlongAxis( _TMIC( j ));
-        _nbCellsC[ j ] = _meshC.nbCellsAlongAxis  ( _TMIC( j ));
+        int axis = static_cast<int>( _TMIC( j ));
+        _coordsC [ j ] = _meshC.getCoordsAlongAxis( axis );
+        _nbCellsC[ j ] = static_cast<CConnType>(_meshC.nbCellsAlongAxis( axis ));
       }
   }
 
@@ -123,14 +124,14 @@ namespace INTERP_KERNEL
   }
 
   _CU_TEMPLATE
-  int _INTERSECTOR_CU_::getNumberOfRowsOfResMatrix() const
+  typename MyCMeshType::MyConnType _INTERSECTOR_CU_::getNumberOfRowsOfResMatrix() const
   {
     return _meshU.getNumberOfElements();
   }
   _CU_TEMPLATE
-  int _INTERSECTOR_CU_::getNumberOfColsOfResMatrix() const
+  typename MyCMeshType::MyConnType _INTERSECTOR_CU_::getNumberOfColsOfResMatrix() const
   {
-    return _meshC.getNumberOfElements();
+    return static_cast<CConnType>(_meshC.getNumberOfElements());
   }
 
   //================================================================================
index 6b128dd295a9147f768c0f1537017133b4cc439b..7db6905bbff2505d25613a54c1412cb2a8267a09 100644 (file)
@@ -45,30 +45,30 @@ namespace INTERP_KERNEL
   public:
     static const int MY_SPACEDIM=3;
     static const int MY_MESHDIM=3;
-    typedef int MyConnType;
+    typedef mcIdType MyConnType;
     static const NumberingPolicy My_numPol=ALL_C_MODE;
 
     _Cartesian3D2UnstructHexMesh(const double * coords[3]): _coordsC(coords) {}
-    void setHexa(int I, int J, int K) // indices in C mode
+    void setHexa(mcIdType I, mcIdType J, mcIdType K) // indices in C mode
     {
       double* pCoord = _coordsU;
-      for ( int k = K; k < K+2; ++k )
-        for ( int j = J; j < J+2; ++j )
-          for ( int i = I; i < I+2; ++i )
+      for ( mcIdType k = K; k < K+2; ++k )
+        for ( mcIdType j = J; j < J+2; ++j )
+          for ( mcIdType i = I; i < I+2; ++i )
             {
               *pCoord++ = _coordsC[0][i];
               *pCoord++ = _coordsC[1][j];
               *pCoord++ = _coordsC[2][k];
             }
     }
-    const int *getConnectivityPtr() const
+    const mcIdType *getConnectivityPtr() const
     {
-      static int conn[] = { 1,0,2,3,5,4,6,7 };
+      static mcIdType conn[] = { 1,0,2,3,5,4,6,7 };
       return conn;
     }
-    const int *getConnectivityIndexPtr() const
+    const mcIdType *getConnectivityIndexPtr() const
     {
-      static int conInd[] = { 0,8 };
+      static mcIdType conInd[] = { 0,8 };
       return conInd;
     }
     void getBoundingBox(double *boundingBox) const
@@ -80,10 +80,10 @@ namespace INTERP_KERNEL
       boundingBox[BoundingBox::ZMIN] = _coordsU[2];
       boundingBox[BoundingBox::ZMAX] = _coordsU[2+4*MY_SPACEDIM];
     }
-    NormalizedCellType getTypeOfElement(int eltId) const { return NORM_HEXA8; }
-    unsigned char getNumberOfNodesOfElement(int eltId) const { return 8; }
-    unsigned long getNumberOfElements() const { return 1; }
-    unsigned long getNumberOfNodes()    const { return 8; }
+    NormalizedCellType getTypeOfElement(mcIdType eltId) const { return NORM_HEXA8; }
+    mcIdType getNumberOfNodesOfElement(mcIdType eltId) const { return 8; }
+    mcIdType getNumberOfElements() const { return 1; }
+    mcIdType getNumberOfNodes()    const { return 8; }
     const double *getCoordinatesPtr()   const { return _coordsU; }
     void releaseTempArrays() {}
   private:
diff --git a/src/INTERP_KERNEL/MCIdType.hxx b/src/INTERP_KERNEL/MCIdType.hxx
new file mode 100644 (file)
index 0000000..6accd36
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright (C) 2017-2019  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (EDF R&D)
+
+#ifndef __IK_MCIDTYPE_HXX__
+#define __IK_MCIDTYPE_HXX__
+
+#include <cstdint>
+#include <stddef.h>
+#include <cstddef>
+
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+
+typedef std::int32_t mcIdType;
+
+#else
+
+typedef std::int64_t mcIdType;
+
+#endif
+
+template <class T> inline mcIdType ToIdType(T val)
+{
+  return static_cast<mcIdType>(val);
+}
+template <class T> inline T FromIdType(mcIdType val)
+{
+  return static_cast<T>(val);
+}
+
+
+#endif
index b9d525f8ae65ddb4e8d81f5c57833609ad35d9b1..cef886d5188bc4bb51c3eacc6c68713239f2654b 100644 (file)
@@ -36,8 +36,8 @@ namespace INTERP_KERNEL
   public:
     MappedBarycentric2DIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation);
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index f399844d6eee91b0dcc058c581a6da728c3e1303..4939806e9b5eb03e84181eda06ff784812e6137b 100644 (file)
@@ -43,7 +43,7 @@ namespace INTERP_KERNEL
   {
     std::vector<double> CoordsT;
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    ConnType nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM;
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
       {
         NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iter));
@@ -53,9 +53,9 @@ namespace INTERP_KERNEL
         PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(*iter),CoordsS);
         std::vector<double> CoordsTTmp(CoordsT);
         if(SPACEDIM==3)
-          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],CoordsS.size()/SPACEDIM,nbOfNodesT);
+          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],ToConnType(CoordsS.size())/SPACEDIM,nbOfNodesT);
         const ConnType *startOfCellNodeConnT=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
-        for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+        for(ConnType nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
           {
             typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
             if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2D(&CoordsTTmp[nodeIdT*SPACEDIM],&CoordsS[0],4,PlanarIntersector<MyMeshType,MyMatrix>::_precision) )
@@ -74,7 +74,7 @@ namespace INTERP_KERNEL
                 resLoc[3] =  mco[0]     * (1.-mco[1]);
 
                 const ConnType *startOfCellNodeConnS=PlanarIntersector<MyMeshType,MyMatrix>::_connectS+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[*iter]);
-                for(int nodeIdS=0;nodeIdS<4;nodeIdS++)
+                for(ConnType nodeIdS=0;nodeIdS<4;nodeIdS++)
                   {
                     if(fabs(resLoc[nodeIdS])>PlanarIntersector<MyMeshType,MyMatrix>::_precision)
                       {
@@ -96,13 +96,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix>
-  int MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType MappedBarycentric2DIntersectorP1P1<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }
index 58011c94694fae60252129e8c085f1e694f557b9..da0488528fc071a3cf782376c3984188d7512b0f 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "Intersector3DP1P1.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
+#include "InterpKernelUtilities.hxx"
 
 namespace INTERP_KERNEL
 {
index 1835f3150ec15c1ca1de28b811a7c50f7db789ef..7015c26faef0d468d072db302740c13fd091adba 100644 (file)
@@ -56,9 +56,9 @@ namespace INTERP_KERNEL
     std::vector<double> CoordsT;
     const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
     Intersector3DP1P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    std::size_t nbOfNodesT=CoordsT.size()/SPACEDIM;
     const double *coordsS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
-    for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+    for(std::size_t nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
       {
         typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
         if(!resRow.empty())
@@ -72,7 +72,7 @@ namespace INTERP_KERNEL
             //
             std::vector<ConnType> connOfCurCellS;
             Intersector3DP1P1<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) )
+            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],ToConnType(connOfCurCellS.size()),coordsS,cmTypeS,_precision) )
               {
                 double mco[3];  // mapped coordinates in the hexa8
                 std::vector<double> localCoordsS;
old mode 100644 (file)
new mode 100755 (executable)
index def3087..b3ab357
@@ -39,7 +39,7 @@ namespace INTERP_KERNEL
   template<class ConnType>
   template<class MyMeshType>
   MeshElement<ConnType>::MeshElement(const ConnType index, const MyMeshType& mesh)
-    : _index(index), _number(mesh.getNumberOfNodesOfElement(OTT<typename MyMeshType::MyConnType,MyMeshType::My_numPol>::indFC(index))), _box(0)
+    : _index(index), _number((unsigned char)mesh.getNumberOfNodesOfElement(OTT<typename MyMeshType::MyConnType,MyMeshType::My_numPol>::indFC(index))), _box(0)
   {
     const double**vertices = new const double*[_number];
 
index c23a75b902e2f87d2e7a2d9d5276e4131150014a..e61f3af1212cb8503df429b4c15b4e3df3084faa 100644 (file)
@@ -72,7 +72,7 @@ OrientationInverter *OrientationInverter::BuildInstanceFrom(NormalizedCellType g
     }
 }
 
-void OrientationInverterChecker::check(int *beginPt, int *endPt) const
+void OrientationInverterChecker::check(mcIdType *beginPt, mcIdType *endPt) const
 {
   if(std::distance(beginPt,endPt)!=getNbNodes())
     {
@@ -81,72 +81,72 @@ void OrientationInverterChecker::check(int *beginPt, int *endPt) const
     }
 }
 
-void OrientationInverterSEG2::operateAndShutUp(int *beginPt) const
+void OrientationInverterSEG2::operateAndShutUp(mcIdType *beginPt) const
 {
   std::swap(beginPt[0],beginPt[1]);
 }
 
-void OrientationInverterSEG3::operateAndShutUp(int *beginPt) const
+void OrientationInverterSEG3::operateAndShutUp(mcIdType *beginPt) const
 {
   std::swap(beginPt[0],beginPt[2]);
 }
 
-void OrientationInverter2DLinear::operateAndShutUp(int *beginPt) const
+void OrientationInverter2DLinear::operateAndShutUp(mcIdType *beginPt) const
 {
   std::reverse(beginPt+1,beginPt+getNbNodes());
 }
 
-void OrientationInverter2DQuadratic::operateAndShutUp(int *beginPt) const
+void OrientationInverter2DQuadratic::operateAndShutUp(mcIdType *beginPt) const
 {
   int nbNodes(getNbNodes());
   std::reverse(beginPt+1,beginPt+nbNodes/2);
   std::reverse(beginPt+nbNodes/2,beginPt+nbNodes);
 }
 
-void OrientationInverterPolygon::operate(int *beginPt, int *endPt) const
+void OrientationInverterPolygon::operate(mcIdType *beginPt, mcIdType *endPt) const
 {
   std::reverse(beginPt+1,endPt);
 }
 
-void OrientationInverterQPolygon::operate(int *beginPt, int *endPt) const
+void OrientationInverterQPolygon::operate(mcIdType *beginPt, mcIdType *endPt) const
 {
   std::size_t sz(std::distance(beginPt,endPt));
   std::reverse(beginPt+1,beginPt+sz/2);
   std::reverse(beginPt+sz/2,endPt);
 }
 
-void OrientationInverterTetra4::operateAndShutUp(int *beginPt) const
+void OrientationInverterTetra4::operateAndShutUp(mcIdType *beginPt) const
 {
   std::swap(beginPt[1],beginPt[2]);
 }
 
-void OrientationInverterTetra10::operateAndShutUp(int *beginPt) const
+void OrientationInverterTetra10::operateAndShutUp(mcIdType *beginPt) const
 {
   std::swap(beginPt[1],beginPt[2]);
   std::swap(beginPt[4],beginPt[6]);
   std::swap(beginPt[8],beginPt[9]);
 }
 
-void OrientationInverterPyra5::operateAndShutUp(int *beginPt) const
+void OrientationInverterPyra5::operateAndShutUp(mcIdType *beginPt) const
 {
   std::reverse(beginPt+1,beginPt+4);
 }
 
-void OrientationInverterPyra13::operateAndShutUp(int *beginPt) const
+void OrientationInverterPyra13::operateAndShutUp(mcIdType *beginPt) const
 {
   std::reverse(beginPt+1,beginPt+4);
   std::reverse(beginPt+5,beginPt+9);
   std::swap(beginPt[10],beginPt[12]);
 }
 
-void OrientationInverter3DExtrusionLinear::operateAndShutUp(int *beginPt) const
+void OrientationInverter3DExtrusionLinear::operateAndShutUp(mcIdType *beginPt) const
 {
   int nbNodes(getNbNodes());
   std::reverse(beginPt+1,beginPt+nbNodes/2);
   std::reverse(beginPt+nbNodes/2+1,beginPt+nbNodes);
 }
 
-void OrientationInverter3DExtrusionQuadratic::operateAndShutUp(int *beginPt) const
+void OrientationInverter3DExtrusionQuadratic::operateAndShutUp(mcIdType *beginPt) const
 {
   int nbNodes(getNbNodes()),nbNodesLinearBase(nbNodes/5);
   std::reverse(beginPt+1,beginPt+nbNodesLinearBase);
index 06653e419119dc74ee9b80abb7c3ed46002d8301..5ab0ee6297468feb6da25607375d43571d494c94 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "INTERPKERNELDefines.hxx"
 #include "NormalizedGeometricTypes"
+#include "MCIdType.hxx"
 
 namespace INTERP_KERNEL
 {
@@ -31,19 +32,19 @@ namespace INTERP_KERNEL
   public:
     INTERPKERNEL_EXPORT static OrientationInverter *BuildInstanceFrom(NormalizedCellType gt);
     INTERPKERNEL_EXPORT virtual ~OrientationInverter() { }
-    INTERPKERNEL_EXPORT virtual void operate(int *beginPt, int *endPt) const = 0;
+    INTERPKERNEL_EXPORT virtual void operate(mcIdType *beginPt, mcIdType *endPt) const = 0;
   };
 
   class OrientationInverterChecker : public OrientationInverter
   {
   public:
     OrientationInverterChecker(unsigned nbNodes):_nb_nodes(nbNodes) { }
-    void operate(int *beginPt, int *endPt) const { check(beginPt,endPt); operateAndShutUp(beginPt); }
-    virtual void operateAndShutUp(int *beginPt) const = 0;
+    void operate(mcIdType *beginPt, mcIdType *endPt) const { check(beginPt,endPt); operateAndShutUp(beginPt); }
+    virtual void operateAndShutUp(mcIdType *beginPt) const = 0;
   protected:
     unsigned getNbNodes() const { return _nb_nodes; }
   private:
-    void check(int *beginPt, int *endPt) const;
+    void check(mcIdType *beginPt, mcIdType *endPt) const;
   private:
     unsigned _nb_nodes;
   };
@@ -52,82 +53,82 @@ namespace INTERP_KERNEL
   {
   public:
     OrientationInverterSEG2():OrientationInverterChecker(2u) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverterSEG3 : public OrientationInverterChecker
   {
   public:
     OrientationInverterSEG3():OrientationInverterChecker(3u) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverter2DLinear : public OrientationInverterChecker
   {
   public:
     OrientationInverter2DLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverter2DQuadratic : public OrientationInverterChecker
   {
   public:
     OrientationInverter2DQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverterPolygon : public OrientationInverter
   {
   public:
-    void operate(int *beginPt, int *endPt) const;
+    void operate(mcIdType *beginPt, mcIdType *endPt) const;
   };
 
   class OrientationInverterQPolygon : public OrientationInverter
   {
   public:
-    void operate(int *beginPt, int *endPt) const;
+    void operate(mcIdType *beginPt, mcIdType *endPt) const;
   };
 
   class OrientationInverterTetra4 : public OrientationInverterChecker
   {
   public:
     OrientationInverterTetra4():OrientationInverterChecker(4u) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverterTetra10 : public OrientationInverterChecker
   {
   public:
     OrientationInverterTetra10():OrientationInverterChecker(10u) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverterPyra5 : public OrientationInverterChecker
   {
   public:
     OrientationInverterPyra5():OrientationInverterChecker(5u) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverterPyra13 : public OrientationInverterChecker
   {
   public:
     OrientationInverterPyra13():OrientationInverterChecker(13u) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverter3DExtrusionLinear : public OrientationInverterChecker
   {
   public:
     OrientationInverter3DExtrusionLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 
   class OrientationInverter3DExtrusionQuadratic : public OrientationInverterChecker
   {
   public:
     OrientationInverter3DExtrusionQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { }
-    void operateAndShutUp(int *beginPt) const;
+    void operateAndShutUp(mcIdType *beginPt) const;
   };
 }
 
index 8f125a974e78b56dba4e45f560732402ef71ad7b..b59a9bb5501cb522568ee13ac3475a59f5aedb90 100644 (file)
@@ -37,8 +37,8 @@ namespace INTERP_KERNEL
     Planar2D1DIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS,
                               double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
   public:
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     const typename PlanarIntersector<MyMeshType,MyMatrix>::DuplicateFacesType* getIntersectFaces() const
     {
       return &_intersect_faces;
index ecc8c1e4c22a709db365a00857c2b3a3a9745d6e..5c85b45e7a1f838ac23f712600f92e4becb6d3c1 100644 (file)
@@ -33,13 +33,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
-  int Planar2D1DIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType Planar2D1DIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfElements();
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
-  int Planar2D1DIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType Planar2D1DIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfElements();
   }
@@ -47,12 +47,12 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
   void Planar2D1DIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res)
   {
-    int nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
+    ConnType nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
     typename MyMatrix::value_type& resRow=res[icellT];
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
       {
-        int iS=*iter;
-        int nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
+        ConnType iS=*iter;
+        ConnType nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
         bool isColinear = false;
         double surf=intersectGeometry1D(OTT<ConnType,numPol>::indFC(icellT),OTT<ConnType,numPol>::indFC(iS),
                                         nbNodesT,nbNodesS, isColinear);
@@ -69,7 +69,7 @@ namespace INTERP_KERNEL
             }
           else
             {
-              std::set<int> targetCellSet;
+              std::set<ConnType> targetCellSet;
               targetCellSet.insert(icellT);
               _intersect_faces.insert(std::make_pair(iS, targetCellSet));
             }
index ef35bbde961b92a5089bb2373cfbced570f44175..f648c7533347d2a46073ff5330055acb64ab428a 100644 (file)
@@ -39,7 +39,7 @@ namespace INTERP_KERNEL
     static const int MESHDIM=MyMeshType::MY_MESHDIM;
     typedef typename MyMeshType::MyConnType ConnType;
     static const NumberingPolicy numPol=MyMeshType::My_numPol;
-    typedef typename std::map<int,std::set<int> > DuplicateFacesType;
+    typedef typename std::map<ConnType,std::set<ConnType> > DuplicateFacesType;
   public:
     PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
     virtual ~PlanarIntersector();
@@ -47,17 +47,17 @@ namespace INTERP_KERNEL
     void adjustBoundingBoxes(std::vector<double>& bbox, double surf3DAdjustmentEps, double surf3DAdjustmentEpsAbs);
     inline void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes);
     static int Projection(double *Coords_A, double *Coords_B,
-                          int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double minDot3DSurf, double median_plane, bool do_rotate);
+                          ConnType nb_NodesA, ConnType nb_NodesB, double epsilon, double md3DSurf, double minDot3DSurf, double median_plane, bool do_rotate);
     virtual const DuplicateFacesType* getIntersectFaces() const
     {
       return NULL;
     }
   protected :
-    int projectionThis(double *Coords_A, double *Coords_B, int nb_NodesA, int nb_NodesB);
+    int projectionThis(double *Coords_A, double *Coords_B, ConnType nb_NodesA, ConnType nb_NodesB);
     void getRealTargetCoordinates(ConnType icellT, std::vector<double>& coordsT);
     void getRealSourceCoordinates(ConnType icellS, std::vector<double>& coordsS);
-    void getRealTargetCoordinatesPermute(ConnType icellT, int offset, std::vector<double>& coordsT);
-    void getRealSourceCoordinatesPermute(ConnType icellS, int offset, std::vector<double>& coordsS);
+    void getRealTargetCoordinatesPermute(ConnType icellT, ConnType offset, std::vector<double>& coordsT);
+    void getRealSourceCoordinatesPermute(ConnType icellS, ConnType offset, std::vector<double>& coordsS);
     void getRealCoordinates(ConnType icellT, ConnType icellS, ConnType nbNodesT, ConnType nbNodesS, std::vector<double>& coordsT, std::vector<double>& coordsS, int& orientation);
     double getValueRegardingOption(double val) const;
     static void Rotate3DTriangle( double* PP1, double*PP2, double*PP3,
index 22ac30f9195cff97891a56a4f4bcc8993a066dfa..f5a9ae7298aa01722bdae885b7c7f12f2e123afe 100644 (file)
@@ -70,7 +70,7 @@ namespace INTERP_KERNEL
     int ibox=0;
     for(long icell=0; icell<nbelems; icell++)
       {
-        int nb_nodes_per_elem =conn_index[icell+1]-conn_index[icell];
+        ConnType nb_nodes_per_elem =conn_index[icell+1]-conn_index[icell];
         //initializing bounding box limits
         for(int idim=0; idim<SPACEDIM; idim++)
           {
@@ -78,7 +78,7 @@ namespace INTERP_KERNEL
             bbox[2*SPACEDIM*ibox+2*idim+1] = -std::numeric_limits<double>::max();
           }
         //updating the bounding box with each node of the element
-        for (int j=0; j<nb_nodes_per_elem; j++)
+        for (ConnType j=0; j<nb_nodes_per_elem; j++)
           {
             const double* coord_node=coords+SPACEDIM*OTT<ConnType,numPol>::coo2C(conn[OTT<ConnType,numPol>::conn2C(conn_index[icell]+j)]);
             for(int idim=0; idim<SPACEDIM; idim++)
@@ -132,8 +132,8 @@ namespace INTERP_KERNEL
   {
     /* We build the segment tree for locating possible matching intersections*/
   
-    long size = bbox.size()/(2*SPACEDIM);
-    for (int i=0; i<size; i++)
+    std::size_t size = bbox.size()/(2*SPACEDIM);
+    for (std::size_t i=0; i<size; i++)
       {
         double max=- std::numeric_limits<double>::max();
         for(int idim=0; idim<SPACEDIM; idim++)
@@ -156,7 +156,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   void PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(ConnType icellT, std::vector<double>& coordsT)
   {
-    int nbNodesT=_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1]-_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)];
+    ConnType nbNodesT=_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1]-_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)];
     coordsT.resize(SPACEDIM*nbNodesT);
     for (ConnType iT=0; iT<nbNodesT; iT++)
       for(int idim=0; idim<SPACEDIM; idim++)
@@ -170,7 +170,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix>
   void PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(ConnType icellS, std::vector<double>& coordsS)
   {
-    int nbNodesS=_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1]-_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)];
+    ConnType nbNodesS=_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1]-_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)];
     coordsS.resize(SPACEDIM*nbNodesS);
     for (ConnType iS=0; iS<nbNodesS; iS++)
       for(int idim=0; idim<SPACEDIM; idim++)
@@ -183,9 +183,9 @@ namespace INTERP_KERNEL
    * @param coordsT output val that stores coordinates of the target cell automatically resized to the right length.
    */
   template<class MyMeshType, class MyMatrix>
-  void PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinatesPermute(ConnType icellT, int offset, std::vector<double>& coordsT)
+  void PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinatesPermute(ConnType icellT, ConnType offset, std::vector<double>& coordsT)
   {
-    int nbNodesT=_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1]-_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)];
+    ConnType nbNodesT=_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)+1]-_connIndexT[OTT<ConnType,numPol>::ind2C(icellT)];
     coordsT.resize(SPACEDIM*nbNodesT);
     for (ConnType iTTmp=0; iTTmp<nbNodesT; iTTmp++)
       {
@@ -201,9 +201,9 @@ namespace INTERP_KERNEL
    * @param coordsS output val that stores coordinates of the source cell automatically resized to the right length.
    */
   template<class MyMeshType, class MyMatrix>
-  void PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinatesPermute(ConnType icellS, int offset, std::vector<double>& coordsS)
+  void PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinatesPermute(ConnType icellS, ConnType offset, std::vector<double>& coordsS)
   {
-    int nbNodesS=_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1]-_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)];
+    ConnType nbNodesS=_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)+1]-_connIndexS[OTT<ConnType,numPol>::ind2C(icellS)];
     coordsS.resize(SPACEDIM*nbNodesS);
     for (ConnType iSTmp=0; iSTmp<nbNodesS; iSTmp++)
       {
@@ -273,14 +273,14 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(double *Coords_A, double *Coords_B, int nb_NodesA, int nb_NodesB)
+  int PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(double *Coords_A, double *Coords_B, ConnType nb_NodesA, ConnType nb_NodesB)
   {
     return Projection(Coords_A,Coords_B,nb_NodesA,nb_NodesB,_dim_caracteristic*_precision,_max_distance_3Dsurf_intersect,_min_dot_btw_3Dsurf_intersect,_median_plane,_do_rotate);
   }
 
   template<class MyMeshType, class MyMatrix>
   int PlanarIntersector<MyMeshType,MyMatrix>::Projection(double *Coords_A, double *Coords_B, 
-                                                         int nb_NodesA, int nb_NodesB, double epsilon, double md3DSurf, double minDot3DSurf, double median_plane, bool do_rotate)
+                                                         ConnType nb_NodesA, ConnType nb_NodesB, double epsilon, double md3DSurf, double minDot3DSurf, double median_plane, bool do_rotate)
   {
     double normal_A[3]={0,0,0};
     double normal_B[3]={0,0,0};
@@ -289,10 +289,10 @@ namespace INTERP_KERNEL
     bool same_orientation;
 
     //Find the normal to cells A and B
-    int i_A1(1);
+    ConnType i_A1(1);
     while(i_A1<nb_NodesA && distance2<SPACEDIM>(Coords_A,&Coords_A[SPACEDIM*i_A1])< epsilon)
       i_A1++;
-    int i_A2(i_A1+1);
+    ConnType i_A2(i_A1+1);
     crossprod<SPACEDIM>(Coords_A, &Coords_A[SPACEDIM*i_A1], &Coords_A[SPACEDIM*i_A2],normal_A);
     double normA(sqrt(dotprod<SPACEDIM>(normal_A,normal_A)));
     while(i_A2<nb_NodesA && normA < epsilon)
@@ -302,10 +302,10 @@ namespace INTERP_KERNEL
         normA = sqrt(dotprod<SPACEDIM>(normal_A,normal_A));
 
       }
-    int i_B1(1);
+    ConnType i_B1(1);
     while(i_B1<nb_NodesB && distance2<SPACEDIM>(Coords_B,Coords_B+SPACEDIM*i_B1)< epsilon)
       i_B1++;
-    int i_B2(i_B1+1);
+    ConnType i_B2(i_B1+1);
     crossprod<SPACEDIM>(Coords_B, Coords_B+SPACEDIM*i_B1, Coords_B+SPACEDIM*i_B2,normal_B);
     double normB(sqrt(dotprod<SPACEDIM>(normal_B,normal_B)));
     while(i_B2<nb_NodesB && normB < epsilon)
@@ -324,7 +324,7 @@ namespace INTERP_KERNEL
             coords_GA[i]=0.;
             for (int j=0;j<nb_NodesA;j++)
               coords_GA[i]+=Coords_A[3*j+i];
-            coords_GA[i]/=nb_NodesA;
+            coords_GA[i]/=(double)nb_NodesA;
           }
         double G1[3],G2[3],G3[3];
         for(int i=0;i<3;i++)
@@ -367,13 +367,13 @@ namespace INTERP_KERNEL
           linear_comb[idim]/=norm;
         
         //Project the nodes of A and B on the median plane
-        for(int i_A=0; i_A<nb_NodesA; i_A++)
+        for(ConnType i_A=0; i_A<nb_NodesA; i_A++)
           {
             proj = dotprod<SPACEDIM>(&Coords_A[SPACEDIM*i_A],linear_comb);
             for(int idim =0; idim< SPACEDIM; idim++)
               Coords_A[SPACEDIM*i_A+idim] -=  proj*linear_comb[idim];
           }
-        for(int i_B=0; i_B<nb_NodesB; i_B++)
+        for(ConnType i_B=0; i_B<nb_NodesB; i_B++)
           {
             proj = dotprod<SPACEDIM>(Coords_B+SPACEDIM*i_B,linear_comb);
             for(int idim =0; idim< SPACEDIM; idim++)
index 5b23d1862bfacf413ea6f6cb4c7491b1a5fda14b..9beb3c2db0781a0487fcf96029218761c55907e0 100644 (file)
@@ -36,8 +36,8 @@ namespace INTERP_KERNEL
   protected:
     PlanarIntersectorP0P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
   public:
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
     /*!
      * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType.
index 478ff1c15f4d7c5d7953116144006b43115bda5d..02d38c4df61defcb878db240f5a9fcb2680cb4b9 100644 (file)
@@ -33,13 +33,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
-  int PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfElements();
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
-  int PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfElements();
   }
@@ -47,12 +47,12 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix, class ConcreteP0P0Intersector>
   void PlanarIntersectorP0P0<MyMeshType,MyMatrix,ConcreteP0P0Intersector>::intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res)
   {
-    int nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
+    ConnType nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
     typename MyMatrix::value_type& resRow=res[icellT];
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
       {
-        int iS=*iter;
-        int nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
+        ConnType iS=*iter;
+        ConnType nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
         double surf=intersectGeometry(OTT<ConnType,numPol>::indFC(icellT),OTT<ConnType,numPol>::indFC(iS),nbNodesT,nbNodesS);
         surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
         if(surf!=0.)
index 15b8972906f1c47e4dae5e90fd62745b0718e112..2095c2ce63651e85e818572180cb9d24c89e67a0 100644 (file)
@@ -22,6 +22,7 @@
 #define __PLANARINTERSECTORP0P1_HXX__
 
 #include "PlanarIntersector.hxx"
+#include "InterpKernelUtilities.hxx"
 
 namespace INTERP_KERNEL
 {
@@ -37,8 +38,8 @@ namespace INTERP_KERNEL
     PlanarIntersectorP0P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
   public:
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     /*!
      * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType.
      */
index 67d7f79134ba1f47938360dbeab349c902994532..25a38bb9a4697606f459e5de5fbc108e8f56aae5 100644 (file)
@@ -35,13 +35,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P1Intersector>
-  int PlanarIntersectorP0P1<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P1<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P1Intersector>
-  int PlanarIntersectorP0P1<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P1<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfElements();
   }
@@ -52,13 +52,13 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix, class ConcreteP0P1Intersector>
   void PlanarIntersectorP0P1<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res)
   {
-    int nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
+    ConnType nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
     double triangle[9];
     double quadrangle[12];
     std::vector<double> sourceCellCoords;
     int orientation=1;
     const ConnType *startOfCellNodeConn=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
-    for(int nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
+    for(ConnType nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
       {
         ConnType curNodeTInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[nodeIdT]);
         std::copy(PlanarIntersector<MyMeshType,MyMatrix>::_coordsT+curNodeTInCmode*SPACEDIM,
@@ -66,9 +66,9 @@ namespace INTERP_KERNEL
         typename MyMatrix::value_type& resRow=res[curNodeTInCmode];
         for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
           {
-            int iS=*iter;
+            ConnType iS=*iter;
             PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(iS),sourceCellCoords);
-            for(int subTriT=1;subTriT<=nbNodesT-2;subTriT++)
+            for(ConnType subTriT=1;subTriT<=nbNodesT-2;subTriT++)
               {
                 std::copy(PlanarIntersector<MyMeshType,MyMatrix>::_coordsT+OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[(nodeIdT+subTriT)%nbNodesT])*SPACEDIM,
                           PlanarIntersector<MyMeshType,MyMatrix>::_coordsT+OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[(nodeIdT+subTriT)%nbNodesT])*SPACEDIM+SPACEDIM,
@@ -79,7 +79,7 @@ namespace INTERP_KERNEL
                 fillDualCellOfTri<SPACEDIM>(triangle,quadrangle);
                 std::vector<double> sourceCellCoordsTmp(sourceCellCoords);
                 if(SPACEDIM==3)
-                  orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&sourceCellCoordsTmp[0],quadrangle,sourceCellCoords.size()/SPACEDIM,4);
+                  orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&sourceCellCoordsTmp[0],quadrangle,ToConnType(sourceCellCoords.size())/SPACEDIM,4);
                 NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(iS));
                 double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,sourceCellCoordsTmp,CellModel::GetCellModel(tS).isQuadratic());
                 surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
index 14a0ce60bd55608c42544f28cb91672e007943ad..214cb98ffbbf9a3683256b358c97b349368951d2 100644 (file)
@@ -37,8 +37,8 @@ namespace INTERP_KERNEL
     PlanarIntersectorP0P1Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
   public:
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     /*!
      * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType.
      */
old mode 100644 (file)
new mode 100755 (executable)
index 444e096..63d735f
@@ -42,20 +42,20 @@ namespace INTERP_KERNEL
     // Check types of source elements here rather than in intersectCells() since a wrong type can be
     // found late after a long time of calculation.
 
-    const unsigned long numTrgElems = meshT.getNumberOfElements();
-    for(unsigned long i = 0 ; i < numTrgElems ; ++i)
+    const ConnType numTrgElems = meshT.getNumberOfElements();
+    for(ConnType i = 0 ; i < numTrgElems ; ++i)
       if ( meshT.getTypeOfElement( OTT<ConnType,numPol>::indFC( i )) != NORM_TRI3 )
         throw INTERP_KERNEL::Exception("P0P1 barycentric algorithm works only with triangular target meshes");
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P1Intersector>
-  int PlanarIntersectorP0P1Bary<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P1Bary<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP0P1Intersector>
-  int PlanarIntersectorP0P1Bary<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P1Bary<MyMeshType,MyMatrix,ConcreteP0P1Intersector>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfElements();
   }
@@ -76,12 +76,12 @@ namespace INTERP_KERNEL
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
     {
       std::vector<double> srcCellCoords,srcCellCoordsTmp,nodeCeffs;
-      int iS=*iter;
+      ConnType iS=*iter;
       NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(iS));
       bool isSourceQuad=CellModel::GetCellModel(tS).isQuadratic();
       PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(iS),srcCellCoords);
       std::vector<double> *srcCoords(&srcCellCoords);
-      int srcNbNodes = srcCellCoords.size()/SPACEDIM;
+      ConnType srcNbNodes = ToConnType(srcCellCoords.size())/SPACEDIM;
       if(SPACEDIM==3)
         {
           srcCellCoordsTmp=srcCellCoords;
index c0b91f5d7a0a17c866235d1542354dcd54febed1..790982344236469e9392978ade13146bad6ebd5f 100644 (file)
@@ -36,8 +36,8 @@ namespace INTERP_KERNEL
   public:
     PlanarIntersectorP0P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation);
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 94631a14c421dbc5551c88c4274c99bcd69c8bc6..25de970a8a2d484d9a6580f342bd28e572c0f380 100644 (file)
@@ -46,17 +46,17 @@ namespace INTERP_KERNEL
     const ConnType *startOfCellNodeConnT=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
     std::vector<double> coordsTarget;
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),coordsTarget);
-    int nbNodesT=coordsTarget.size()/SPACEDIM;
+    ConnType nbNodesT=ToConnType(coordsTarget.size())/SPACEDIM;
     ii=0;
     for(typename std::vector<ConnType>::const_iterator iter2=icellsS.begin();iter2!=icellsS.end();iter2++,ii++)
       {
         std::vector<double> tmpSource(coordsOfSources[ii]);
         std::vector<double> tmpTarget(coordsTarget);
         if(SPACEDIM==3)
-          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&tmpSource[0],&tmpTarget[0],tmpSource.size()/SPACEDIM,nbNodesT);
-        for(int nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
+          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&tmpSource[0],&tmpTarget[0],ToConnType(tmpSource.size())/SPACEDIM,nbNodesT);
+        for(ConnType nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
           {
-            if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2D(&tmpTarget[0]+nodeIdT*SPACEDIM,&tmpSource[0],tmpSource.size()/SPACEDIM,PlanarIntersector<MyMeshType,MyMatrix>::_precision))
+            if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg2D(&tmpTarget[0]+nodeIdT*SPACEDIM,&tmpSource[0],ToConnType(tmpSource.size())/SPACEDIM,PlanarIntersector<MyMeshType,MyMatrix>::_precision))
               {
                 ConnType curNodeTInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConnT[nodeIdT]);
                 typename MyMatrix::value_type& resRow=res[curNodeTInCmode];
@@ -69,13 +69,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP0P1PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P1PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
   
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP0P1PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP0P1PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfElements();
   }
index cbc7f716334a1d30c81eb0be5b74d8050a7823b0..94630f70995256d1c9de52f0d1506c7d75aa8112 100644 (file)
@@ -37,8 +37,8 @@ namespace INTERP_KERNEL
     PlanarIntersectorP1P0(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
   public:
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     /*!
      * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType.
      */
index 865435ccebd05c3d71320d8f7f5f0f23a98e6789..48ec63802a5ccb791569fc503b41efeed4af896d 100644 (file)
@@ -34,13 +34,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP1P0Intersector>
-  int PlanarIntersectorP1P0<MyMeshType,MyMatrix,ConcreteP1P0Intersector>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P0<MyMeshType,MyMatrix,ConcreteP1P0Intersector>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfElements();
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP1P0Intersector>
-  int PlanarIntersectorP1P0<MyMeshType,MyMatrix,ConcreteP1P0Intersector>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P0<MyMeshType,MyMatrix,ConcreteP1P0Intersector>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }
@@ -61,15 +61,15 @@ namespace INTERP_KERNEL
     typename MyMatrix::value_type& resRow=res[icellT];
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
       {
-        int iS=*iter;
-        int nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
+        ConnType iS=*iter;
+        ConnType nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
         const ConnType *startOfCellNodeConn=PlanarIntersector<MyMeshType,MyMatrix>::_connectS+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS]);
-        for(int nodeIdS=0;nodeIdS<nbNodesS;nodeIdS++)
+        for(ConnType nodeIdS=0;nodeIdS<nbNodesS;nodeIdS++)
           {
             ConnType curNodeSInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[nodeIdS]);
             std::copy(PlanarIntersector<MyMeshType,MyMatrix>::_coordsS+curNodeSInCmode*SPACEDIM,
                       PlanarIntersector<MyMeshType,MyMatrix>::_coordsS+curNodeSInCmode*SPACEDIM+SPACEDIM,triangle);
-            for(int subTriS=1;subTriS<=nbNodesS-2;subTriS++)
+            for(ConnType subTriS=1;subTriS<=nbNodesS-2;subTriS++)
               {
                 std::copy(PlanarIntersector<MyMeshType,MyMatrix>::_coordsS+OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[(nodeIdS+subTriS)%nbNodesS])*SPACEDIM,
                           PlanarIntersector<MyMeshType,MyMatrix>::_coordsS+OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[(nodeIdS+subTriS)%nbNodesS])*SPACEDIM+SPACEDIM,
@@ -80,7 +80,7 @@ namespace INTERP_KERNEL
                 fillDualCellOfTri<SPACEDIM>(triangle,quadrangle);
                 std::vector<double> targetCellCoordsTmp(targetCellCoords);
                 if(SPACEDIM==3)
-                  orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&targetCellCoordsTmp[0],quadrangle,targetCellCoords.size()/SPACEDIM,4);
+                  orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&targetCellCoordsTmp[0],quadrangle,ToConnType(targetCellCoords.size())/SPACEDIM,4);
                 double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,targetCellCoordsTmp,isTargetQuad);
                 surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
                 if(surf!=0.)
index 60a3f7af68e29df31c4ee0a7b20de6d16aa14451..25d149d426344cf2b804ec46c388a09f1b779553 100644 (file)
@@ -37,8 +37,8 @@ namespace INTERP_KERNEL
     PlanarIntersectorP1P0Bary(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
   public:
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
     /*!
      * Contrary to intersectCells method here icellS and icellT are \b not in \b C mode but in mode of MyMeshType.
      */
old mode 100644 (file)
new mode 100755 (executable)
index b63d9f5..442177d
@@ -44,20 +44,20 @@ namespace INTERP_KERNEL
     // Check types of source elements here rather than in intersectCells() since a wrong type can be
     // found late after a long time of calculation.
 
-    const unsigned long numSrcElems = meshS.getNumberOfElements();
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    const ConnType numSrcElems = meshS.getNumberOfElements();
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       if ( meshS.getTypeOfElement( OTT<ConnType,numPol>::indFC( i )) != NORM_TRI3 )
         throw INTERP_KERNEL::Exception("P1P0 barycentric algorithm works only with triangular source meshes");
   }
 
   PLAN_INTER_TEMPLATE
-  int PLAN_INTERSECTOR::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PLAN_INTERSECTOR::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfElements();
   }
 
   PLAN_INTER_TEMPLATE
-  int PLAN_INTERSECTOR::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PLAN_INTERSECTOR::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }
@@ -76,7 +76,7 @@ namespace INTERP_KERNEL
     // target cell data
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),tgtCellCoords);
     std::vector<double> * tgtCoords = & tgtCellCoords;
-    int tgtNbNodes = tgtCellCoords.size()/SPACEDIM;
+    ConnType tgtNbNodes = ToConnType(tgtCellCoords.size())/SPACEDIM;
     NormalizedCellType tT=PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getTypeOfElement(OTT<ConnType,numPol>::indFC(icellT));
     bool isTargetQuad=CellModel::GetCellModel(tT).isQuadratic();
 
@@ -85,7 +85,7 @@ namespace INTERP_KERNEL
     // treat each source triangle
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
     {
-      int iS=*iter;
+      ConnType iS=*iter;
       PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(iS),srcTriaCoords);
       const ConnType *startOfCellNodeConn=PlanarIntersector<MyMeshType,MyMatrix>::_connectS+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS]);
       if(SPACEDIM==3)
index 8a14b069d838a1fd4cc21199002248251741dd08..a01a10026788b8f0d5e30e78a2c15ee47b12ce92 100644 (file)
@@ -36,8 +36,8 @@ namespace INTERP_KERNEL
   public:
     PlanarIntersectorP1P0PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation);
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index 2989168f2717cad1f1f8c752303908c9989974ec..6cf35469bf0eee8128a21cabaa2c7e66baf7e8e7 100644 (file)
@@ -46,7 +46,7 @@ namespace INTERP_KERNEL
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
     double baryT[SPACEDIM];
     double baryTTmp[SPACEDIM];
-    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],CoordsT.size()/SPACEDIM,baryT);
+    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],ToConnType(CoordsT.size())/SPACEDIM,baryT);
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
       {
         NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iter));
@@ -93,13 +93,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfElements();
   }
   
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P0PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }
index b4873ffd0b9de65778fa54fd96e46fa22991854b..4307715222a2e94c856cea187700d594ba223193 100644 (file)
@@ -37,8 +37,8 @@ namespace INTERP_KERNEL
     PlanarIntersectorP1P1(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel);
   public:
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
 
     double intersectGeometryGeneral(const std::vector<double>& targetCoords, const std::vector<double>& sourceCoords) { return asLeaf().intersectGeometryGeneral(targetCoords,sourceCoords); }
   protected:
index 14dfe0620295554394e2bfcdae9f6e55d0a7e8b8..86791ab8bbbff6891534482d48b2c5429180479d 100644 (file)
@@ -35,13 +35,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP1P1Intersector>
-  int PlanarIntersectorP1P1<MyMeshType,MyMatrix,ConcreteP1P1Intersector>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P1<MyMeshType,MyMatrix,ConcreteP1P1Intersector>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
 
   template<class MyMeshType, class MyMatrix, class ConcreteP1P1Intersector>
-  int PlanarIntersectorP1P1<MyMeshType,MyMatrix,ConcreteP1P1Intersector>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P1<MyMeshType,MyMatrix,ConcreteP1P1Intersector>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }
@@ -52,33 +52,33 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrix, class ConcreteP1P1Intersector>
   void PlanarIntersectorP1P1<MyMeshType,MyMatrix,ConcreteP1P1Intersector>::intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res)
   {
-    int nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
+    ConnType nbNodesT=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT];
     int orientation=1;
     const ConnType *startOfCellNodeConn=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
     std::vector<double> polygT;
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),polygT);
-    for(int nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
+    for(ConnType nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
       {
         ConnType curNodeTInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[nodeIdT]);
         PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinatesPermute(OTT<ConnType,numPol>::indFC(icellT),nodeIdT,polygT);
         std::vector<double> polygDualT(SPACEDIM*2*(nbNodesT-1));
-        fillDualCellOfPolyg<SPACEDIM>(&polygT[0],polygT.size()/SPACEDIM,&polygDualT[0]);
+        fillDualCellOfPolyg<SPACEDIM>(&polygT[0],ToConnType(polygT.size())/SPACEDIM,&polygDualT[0]);
         typename MyMatrix::value_type& resRow=res[curNodeTInCmode];
         for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
           {
-            int iS=*iter;
-            int nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
+            ConnType iS=*iter;
+            ConnType nbNodesS=PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS+1]-PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS];
             const ConnType *startOfCellNodeConnS=PlanarIntersector<MyMeshType,MyMatrix>::_connectS+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexS[iS]);
-            for(int nodeIdS=0;nodeIdS<nbNodesS;nodeIdS++)
+            for(ConnType nodeIdS=0;nodeIdS<nbNodesS;nodeIdS++)
               {
                 ConnType curNodeSInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConnS[nodeIdS]);
                 std::vector<double> polygS;
                 PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinatesPermute(OTT<ConnType,numPol>::indFC(iS),nodeIdS,polygS);
                 std::vector<double> polygDualS(SPACEDIM*2*(nbNodesS-1));
-                fillDualCellOfPolyg<SPACEDIM>(&polygS[0],polygS.size()/SPACEDIM,&polygDualS[0]);
+                fillDualCellOfPolyg<SPACEDIM>(&polygS[0],ToConnType(polygS.size())/SPACEDIM,&polygDualS[0]);
                 std::vector<double> polygDualTTmp(polygDualT);
                 if(SPACEDIM==3)
-                  orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&polygDualS[0],&polygDualTTmp[0],polygDualS.size()/SPACEDIM,polygDualT.size()/SPACEDIM);
+                  orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&polygDualS[0],&polygDualTTmp[0],ToConnType(polygDualS.size())/SPACEDIM,ToConnType(polygDualT.size())/SPACEDIM);
                 double surf=orientation*intersectGeometryGeneral(polygDualTTmp,polygDualS);
                 surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
                 if(surf!=0.)
index e85c337d897e494a9b8bd9f610d7de8bd40017b0..724d7433bc53f68512cdddaa1913ccd76716d80f 100644 (file)
@@ -36,8 +36,8 @@ namespace INTERP_KERNEL
   public:
     PlanarIntersectorP1P1PL(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double md3DSurf, double minDot3DSurf, double medianPlane, double precision, int orientation);
     void intersectCells(ConnType icellT, const std::vector<ConnType>& icellsS, MyMatrix& res);
-    int getNumberOfRowsOfResMatrix() const;
-    int getNumberOfColsOfResMatrix() const;
+    ConnType getNumberOfRowsOfResMatrix() const;
+    ConnType getNumberOfColsOfResMatrix() const;
   };
 }
 
index a7235b54ef6ed28deb49486fe5316854f9f3c9b3..ed82199f6dfa29f984c787b6735b05a370f65bb7 100644 (file)
@@ -42,7 +42,7 @@ namespace INTERP_KERNEL
   {
     std::vector<double> CoordsT;
     PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    ConnType nbOfNodesT=ToConnType(CoordsT.size())/SPACEDIM;
     for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
       {
         NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iter));
@@ -52,7 +52,7 @@ namespace INTERP_KERNEL
         PlanarIntersector<MyMeshType,MyMatrix>::getRealSourceCoordinates(OTT<ConnType,numPol>::indFC(*iter),CoordsS);
         std::vector<double> CoordsTTmp(CoordsT);
         if(SPACEDIM==3)
-          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],CoordsS.size()/SPACEDIM,nbOfNodesT);
+          PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&CoordsS[0],&CoordsTTmp[0],ToConnType(CoordsS.size())/SPACEDIM,nbOfNodesT);
         const ConnType *startOfCellNodeConnT=PlanarIntersector<MyMeshType,MyMatrix>::_connectT+OTT<ConnType,numPol>::conn2C(PlanarIntersector<MyMeshType,MyMatrix>::_connIndexT[icellT]);
         for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
           {
@@ -84,13 +84,13 @@ namespace INTERP_KERNEL
   }
 
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfRowsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getNumberOfNodes();
   }
   
   template<class MyMeshType, class MyMatrix>
-  int PlanarIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
+  typename MyMeshType::MyConnType PlanarIntersectorP1P1PL<MyMeshType,MyMatrix>::getNumberOfColsOfResMatrix() const
   {
     return PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getNumberOfNodes();
   }
index 54344d8561c7225a9fe6d1a146632f44b7dfab36..2202206ff1be9ebca619cd4cd1786ed5aa928f4c 100644 (file)
@@ -125,9 +125,9 @@ namespace INTERP_KERNEL
   INTERSECTOR_TEMPLATE
   QuadraticPolygon *PTLOC2D_INTERSECTOR::buildPolygonFrom(const std::vector<double>& coords, NormalizedCellType type)
   {
-    int nbNodes=coords.size()/SPACEDIM;
+    std::size_t nbNodes=coords.size()/SPACEDIM;
     std::vector<Node *> nodes(nbNodes);
-    for(int i=0;i<nbNodes;i++)
+    for(std::size_t i=0;i<nbNodes;i++)
       nodes[i]=new Node(coords[i*SPACEDIM],coords[i*SPACEDIM+1]);
     if(!CellModel::GetCellModel(type).isQuadratic())
       return QuadraticPolygon::BuildLinearPolygon(nodes);
index e2ca0c5e944ff18627c09fc4c7eb4305bf6bbe34..d39479a0caa764e9d7ed9b88033a28b8657ca2bb 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "Intersector3DP0P0.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
+#include "InterpKernelUtilities.hxx"
 
 namespace INTERP_KERNEL
 {
index 09e67690222ebffccf72d70ac52b8f659ef54ad9..3b1a334a544144538686351f3adc60889cc66218 100644 (file)
@@ -58,7 +58,7 @@ namespace INTERP_KERNEL
     std::vector<double> CoordsT;
     Intersector3DP0P0<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
     double bary[SPACEDIM];
-    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],CoordsT.size()/SPACEDIM,bary);
+    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],ToConnType(CoordsT.size())/SPACEDIM,bary);
     typename MyMatrix::value_type& resRow=res[targetCell];
     const double *coordsS=Intersector3DP0P0<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
     for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
@@ -67,7 +67,7 @@ namespace INTERP_KERNEL
         const CellModel& cmTypeS=CellModel::GetCellModel(tS);
         std::vector<ConnType> connOfCurCellS;
         Intersector3DP0P0<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-        if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(bary,&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision))
+        if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(bary,&connOfCurCellS[0],ToConnType(connOfCurCellS.size()),coordsS,cmTypeS,_precision))
           {
             resRow.insert(std::make_pair(OTT<ConnType,numPol>::indFC(*iterCellS),1));
           }
index 66acfa48308c9fa9a63dc838ca28800b23e97e15..731241310bc4a4c8356c28f019d149b955ec68b4 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "Intersector3DP0P1.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
+#include "InterpKernelUtilities.hxx"
 
 namespace INTERP_KERNEL
 {
index f96e28852e3c30e8b298c79797c44a11d5af3e68..7acdefec9fe0daaa200e8480c2ebbad1bff22528 100644 (file)
@@ -54,7 +54,7 @@ namespace INTERP_KERNEL
   {
     std::vector<double> coordsTarget;
     Intersector3DP0P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),coordsTarget);
-    int nbNodesT=coordsTarget.size()/SPACEDIM;
+    std::size_t nbNodesT=coordsTarget.size()/SPACEDIM;
     const double *coordsS=Intersector3DP0P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
     const ConnType *startOfCellNodeConnT=Intersector3DP0P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
     for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
@@ -63,9 +63,9 @@ namespace INTERP_KERNEL
         const CellModel& cmTypeS=CellModel::GetCellModel(tS);
         std::vector<ConnType> connOfCurCellS;
         Intersector3DP0P1<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-        for(int nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
+        for(std::size_t nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
           {
-            if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&coordsTarget[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision))
+            if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&coordsTarget[nodeIdT*SPACEDIM],&connOfCurCellS[0],ToConnType(connOfCurCellS.size()),coordsS,cmTypeS,_precision))
               {
                 ConnType curNodeTInCmode=OTT<ConnType,numPol>::coo2C(startOfCellNodeConnT[nodeIdT]);
                 typename MyMatrix::value_type& resRow=res[curNodeTInCmode];
index b7826bd4ff008514131e8560e1f9599c0a2df05c..439100f2cc18688cc14ff6802147bc12300a4739 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "Intersector3DP1P0.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
+#include "InterpKernelUtilities.hxx"
 
 namespace INTERP_KERNEL
 {
index 44956c078b833f53e7bda822b8b1c4f454ed2dd6..d85f6894d5bc5fb461e03131954ab437cd32ce87 100644 (file)
@@ -57,7 +57,7 @@ namespace INTERP_KERNEL
     const double *coordsS=Intersector3DP1P0<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
     Intersector3DP1P0<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
     double baryT[SPACEDIM];
-    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],CoordsT.size()/SPACEDIM,baryT);
+    calculateBarycenterDyn2<SPACEDIM>(&CoordsT[0],ToConnType(CoordsT.size())/SPACEDIM,baryT);
     for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
       {
         NormalizedCellType tS=Intersector3DP1P0<MyMeshType,MyMatrix>::_src_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iterCellS));
@@ -66,7 +66,7 @@ namespace INTERP_KERNEL
         const CellModel& cmTypeS=CellModel::GetCellModel(tS);
         std::vector<ConnType> connOfCurCellS;
         Intersector3DP1P0<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-        if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(baryT,&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) )
+        if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(baryT,&connOfCurCellS[0],ToConnType(connOfCurCellS.size()),coordsS,cmTypeS,_precision) )
           {
             double resLoc[4];
             std::vector<double> srcCell;
index efea6865984002390646971ceb10dd9123abf5f4..4734af56e8f29b522794b1ec886b1cb465b706e5 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "Intersector3DP1P1.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
+#include "InterpKernelUtilities.hxx"
 
 namespace INTERP_KERNEL
 {
index c587e01025977e12bfd453f03e6ed32928d90481..5d7336bcca4dc2256e9390a36948e48525986821 100644 (file)
@@ -54,7 +54,7 @@ namespace INTERP_KERNEL
   {
     std::vector<double> CoordsT;
     Intersector3DP1P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    std::size_t nbOfNodesT=CoordsT.size()/SPACEDIM;
     const double *coordsS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
     for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
       {
@@ -63,12 +63,12 @@ namespace INTERP_KERNEL
           throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==3. Only TETRA4 supported !");
         const CellModel& cmTypeS=CellModel::GetCellModel(tS);
         const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
-        for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+        for(std::size_t nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
           {
             typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
             std::vector<ConnType> connOfCurCellS;
             Intersector3DP1P1<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) )
+            if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&CoordsT[nodeIdT*SPACEDIM],&connOfCurCellS[0],ToConnType(connOfCurCellS.size()),coordsS,cmTypeS,_precision) )
               {
                 double resLoc[4];
                 std::vector<double> localCoordsS;
index 6a0498e72dc85cf9e5345a5dfde7b453b81eea56..1cf302acb329fdbfcdda6bfa73cd0321878cb66f 100644 (file)
@@ -34,7 +34,7 @@ namespace INTERP_KERNEL
   {
   public:
     virtual ~GenericPointLocatorAlgos() { }
-    virtual std::list<int> locates(const double* x, double eps) = 0;     
+    virtual std::list<mcIdType> locates(const double* x, double eps) = 0;
   };
         
   template<class MyMeshType>
@@ -50,19 +50,19 @@ namespace INTERP_KERNEL
       typedef typename MyMeshType::MyConnType ConnType;
       const int SPACEDIM=MyMeshType::MY_SPACEDIM;
       const NumberingPolicy numPol=MyMeshType::My_numPol;
-      int nelem = _mesh.getNumberOfElements();
+      ConnType nelem = _mesh.getNumberOfElements();
       _bb = new double[SPACEDIM*2*nelem];
       const ConnType* conn = _mesh.getConnectivityPtr();
       const ConnType* conn_index = _mesh.getConnectivityIndexPtr();
       const double* coords=_mesh.getCoordinatesPtr();
-      for (int i=0; i<nelem; i++)
+      for (ConnType i=0; i<nelem; i++)
         {
           for (int idim=0; idim<SPACEDIM; idim++)
             {
               _bb[2*(i*SPACEDIM+idim)]=std::numeric_limits<double>::max();
               _bb[2*(i*SPACEDIM+idim)+1]=-std::numeric_limits<double>::max();
             }
-          for (int index= conn_index[i]; index < conn_index[i+1];index++)
+          for (ConnType index= conn_index[i]; index < conn_index[i+1];index++)
             {
               //coordelem points to the coordinates of the current node of the i-th element
               const double* coordelem = coords+OTT<ConnType,numPol>::ind2C(conn[OTT<ConnType,numPol>::ind2C(index)])*SPACEDIM;
@@ -95,14 +95,14 @@ namespace INTERP_KERNEL
       std::list<ConnType> retlist;
       for(unsigned int i=0; i< candidates.size(); i++)
         {
-          int ielem=candidates[i];
+          ConnType ielem=candidates[i];
           if (elementContainsPoint(ielem,x,eps))
             retlist.push_back(OTT<ConnType,numPol>::indFC(ielem));
         }
       return retlist;
     }
 
-    static bool isElementContainsPointAlg2D(const double *ptToTest, const double *cellPts, int nbEdges, double eps)
+    static bool isElementContainsPointAlg2D(const double *ptToTest, const double *cellPts, mcIdType nbEdges, double eps)
     {
       /* with dimension 2, it suffices to check all the edges
          and see if the sign of double products from the point
@@ -116,7 +116,7 @@ namespace INTERP_KERNEL
          here XA^XC and XC^XB have different signs*/
       const int SPACEDIM=MyMeshType::MY_SPACEDIM;
       int* sign = new int[nbEdges];
-      for (int iedge=0; iedge<nbEdges; iedge++)
+      for (mcIdType iedge=0; iedge<nbEdges; iedge++)
         {
           const double* A=cellPts+SPACEDIM*iedge;
           const double* B=cellPts+SPACEDIM*((iedge+1)%nbEdges);
@@ -133,7 +133,7 @@ namespace INTERP_KERNEL
       return ret;
     }
 
-    static bool isElementContainsPointAlg3D(const double *ptToTest, const typename MyMeshType::MyConnType *conn_elem, int conn_elem_sz, const double *coords, const CellModel& cmType, double eps)
+    static bool isElementContainsPointAlg3D(const double *ptToTest, const typename MyMeshType::MyConnType *conn_elem, typename MyMeshType::MyConnType conn_elem_sz, const double *coords, const CellModel& cmType, double eps)
     {
       const int SPACEDIM=MyMeshType::MY_SPACEDIM;
       typedef typename MyMeshType::MyConnType ConnType;
@@ -141,7 +141,7 @@ namespace INTERP_KERNEL
       
       int nbfaces = cmType.getNumberOfSons2(conn_elem,conn_elem_sz);
       int *sign = new int[nbfaces];
-      int *connOfSon = new int[conn_elem_sz];
+      ConnType *connOfSon = new ConnType[conn_elem_sz];
       for (int iface=0; iface<nbfaces; iface++)
         {
           NormalizedCellType typeOfSon;
@@ -166,7 +166,7 @@ namespace INTERP_KERNEL
     /*!
      * Precondition : spacedim==meshdim. To be checked upstream to this call.
      */
-    static bool isElementContainsPoint(const double *ptToTest, NormalizedCellType type, const double *coords, const typename MyMeshType::MyConnType *conn_elem, int conn_elem_sz, double eps)
+    static bool isElementContainsPoint(const double *ptToTest, NormalizedCellType type, const double *coords, const typename MyMeshType::MyConnType *conn_elem, typename MyMeshType::MyConnType conn_elem_sz, double eps)
     {
       const int SPACEDIM=MyMeshType::MY_SPACEDIM;
       typedef typename MyMeshType::MyConnType ConnType;
@@ -220,7 +220,7 @@ namespace INTERP_KERNEL
       return isElementContainsPoint(x,type,coords,conn_elem,conn_elem_sz,eps);
     }
                 
-    static bool decideFromSign(const int* sign, int nbelem)
+    static bool decideFromSign(const int* sign, mcIdType nbelem)
     {
       int min_sign = 1;
       int max_sign = -1;
@@ -249,17 +249,17 @@ namespace INTERP_KERNEL
      */
     //================================================================================
 
-    virtual std::list<int> locates(const double* x, double eps)
+    virtual std::list<typename MyMeshType::MyConnType> locates(const double* x, double eps)
     {
       typedef typename MyMeshType::MyConnType ConnType;
       const NumberingPolicy numPol=MyMeshType::My_numPol;
 
-      std::list<int> simplexNodes;
-      std::list<int> candidates = PointLocatorAlgos<MyMeshType>::locates(x,eps);
-      std::list<int>::iterator eIt = candidates.begin();
+      std::list<ConnType> simplexNodes;
+      std::list<ConnType> candidates = PointLocatorAlgos<MyMeshType>::locates(x,eps);
+      typename std::list<ConnType>::iterator eIt = candidates.begin();
       for ( ; eIt != candidates.end(); ++eIt )
         {
-          const int i = OTT<ConnType,numPol>::ind2C( *eIt );
+          const ConnType i = OTT<ConnType,numPol>::ind2C( *eIt );
           const double* coords= _mesh.getCoordinatesPtr();
           const ConnType* conn=_mesh.getConnectivityPtr();
           const ConnType* conn_index= _mesh.getConnectivityIndexPtr();
@@ -279,14 +279,14 @@ namespace INTERP_KERNEL
           else
             {
               NormalizedCellType simlexType = cell.getDimension()==3 ? NORM_TETRA4 : NORM_TRI3;
-              std::vector<int> sonNodes;
+              std::vector<mcIdType> sonNodes;
               NormalizedCellType sonType;
               const unsigned nbSons = cell.getNumberOfSons2( conn_elem, conn_elem_sz );
               for ( unsigned s = 0; s < nbSons; ++s )
                 {
                   sonNodes.resize( cell.getNumberOfNodesConstituentTheSon2( s, conn_elem, conn_elem_sz ));
                   cell.fillSonCellNodalConnectivity2( s, conn_elem, conn_elem_sz, &sonNodes[0], sonType );
-                  std::set<int> sonNodesSet( sonNodes.begin(), sonNodes.end() );
+                  std::set<mcIdType> sonNodesSet( sonNodes.begin(), sonNodes.end() );
 
                   std::set< std::set< ConnType > > checkedSonSimplex;
                   for ( unsigned sn = 0; sn < sonNodes.size(); ++sn )
index 3bde89a9b710d96a2086d0f4d7f64dbe203c0dba..2eef9bdae5ef2d2bedc94970d7df44e2fe1e46a9 100644 (file)
@@ -430,7 +430,7 @@ namespace INTERP_KERNEL
         while( !four_neighbours)
           {
             i_glob=(* mi1).second;//global index of vertex i
-            nb_prev = _Status.count(i_glob);//counts the number of segments ending at i
+            nb_prev = static_cast<int>(_Status.count(i_glob));//counts the number of segments ending at i
                                                 
             //std::cout<< "nb_prev= "<< nb_prev << " i_glob= " << i_glob << std::endl;
             switch (nb_prev)
@@ -667,7 +667,7 @@ namespace INTERP_KERNEL
               } 
             mi1++;
             i_glob=(* mi1).second;//global index of vertex i
-            nb_prev = _Status.count(i_glob);
+            nb_prev = static_cast<int>(_Status.count(i_glob));
           }
       }
     return _Inter;
index 73a536cc4b20b43f67d56cc0f704301ad4b31c20..9f878479ccc19621060c42c5574ce733035ee79b 100644 (file)
@@ -36,7 +36,7 @@ namespace INTERP_KERNEL
   template<class MyMeshType, class MyMatrixType>
   class Polyhedron3D2DIntersectorP0P0 : public Intersector3DP0P0<MyMeshType,MyMatrixType>
   {
-    typedef typename std::map<int,std::set<int> > DuplicateFacesType;
+    typedef typename std::map<mcIdType,std::set<mcIdType> > DuplicateFacesType;
 
   public:
     static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
index ecc0ddb8da8ceb60d5b24d3ade0056ec5fe67f6d..a2ae9b7c4db2bdabbc58b9969927468ad24160b0 100644 (file)
@@ -87,7 +87,7 @@ namespace INTERP_KERNEL
                                                                               const std::vector<ConnType>& srcCells,
                                                                               MyMatrixType& matrix)
   {
-    int nbOfNodesT=Intersector3D<MyMeshType,MyMatrixType>::_target_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(targetCell));
+    ConnType nbOfNodesT=Intersector3D<MyMeshType,MyMatrixType>::_target_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(targetCell));
     releaseArrays();
     _split.splitTargetCell(targetCell,nbOfNodesT,_tetra);
 
@@ -99,18 +99,18 @@ namespace INTERP_KERNEL
 
         // calculate the coordinates of the nodes
         typename MyMeshType::MyConnType cellSrc = *iterCellS;
-        int cellSrcIdx = OTT<ConnType,numPol>::indFC(cellSrc);
+        ConnType cellSrcIdx = OTT<ConnType,numPol>::indFC(cellSrc);
         NormalizedCellType normCellType=Intersector3D<MyMeshType,MyMatrixType>::_src_mesh.getTypeOfElement(cellSrcIdx);
         const CellModel& cellModelCell=CellModel::GetCellModel(normCellType);
         const MyMeshType& src_mesh = Intersector3D<MyMeshType,MyMatrixType>::_src_mesh;
-        unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? src_mesh.getNumberOfNodesOfElement(cellSrcIdx) : cellModelCell.getNumberOfNodes();
-        int *polyNodes=new int[nbOfNodes4Type];
+        ConnType nbOfNodes4Type=cellModelCell.isDynamic() ? src_mesh.getNumberOfNodesOfElement(cellSrcIdx) : cellModelCell.getNumberOfNodes();
+        mcIdType *polyNodes=new mcIdType[nbOfNodes4Type];
         double **polyCoords = new double*[nbOfNodes4Type];
         for(int i = 0;i<(int)nbOfNodes4Type;++i)
           {
             // we could store mapping local -> global numbers too, but not sure it is worth it
-            const int globalNodeNum = getGlobalNumberOfNode(i, OTT<ConnType,numPol>::indFC(*iterCellS), src_mesh);
-            polyNodes[i] = globalNodeNum;
+            const ConnType globalNodeNum = getGlobalNumberOfNode(i, OTT<ConnType,numPol>::indFC(*iterCellS), src_mesh);
+            polyNodes[i] = ToIdType( globalNodeNum );
             polyCoords[i] = const_cast<double*>(src_mesh.getCoordinatesPtr()+MyMeshType::MY_SPACEDIM*globalNodeNum);
           }
 
@@ -153,7 +153,7 @@ namespace INTERP_KERNEL
                   }
                 else
                   {
-                    std::set<int> targetCellSet;
+                    std::set<ConnType> targetCellSet;
                     targetCellSet.insert(targetCell);
                     _intersect_faces.insert(std::make_pair(cellSrcIdx, targetCellSet));
                   }
index eac117c246d629cfbdd749aa1f683658355eb05a..baa5a50efee6f806f0c38312d31984e073a1f4a0 100644 (file)
@@ -91,7 +91,7 @@ namespace INTERP_KERNEL
                 double volume = tmp->intersectSourceCell(*iterCellS);
                 if(volume!=0.)
                   {
-                    int targetNodeId(tmp->getId(0));
+                    ConnType targetNodeId(tmp->getId(0));
                     if(targetNodeId<0)
                       {
                         std::ostringstream oss; oss << "PolyhedronIntersectorP0P1::intersectCells : On target cell #" <<  targetCell << " the splitting into tetra4 leads to the creation of an additional point that interacts with source cell Id #" << *iterCellS << " !";
index 85b4b58ae13f0f731be69d89671275c880112667..b56f5f5efe2cd158eafff1c7add3b61bf92c812e 100644 (file)
@@ -85,7 +85,7 @@ namespace INTERP_KERNEL
     for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
       {
         releaseArrays();
-        int nbOfNodesS=Intersector3D<MyMeshType,MyMatrix>::_src_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(*iterCellS));
+        ConnType nbOfNodesS=Intersector3D<MyMeshType,MyMatrix>::_src_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(*iterCellS));
         _split.splitTargetCell(*iterCellS,nbOfNodesS,_tetra);
         for(typename std::vector<SplitterTetra<MyMeshType>*>::iterator iter = _tetra.begin(); iter != _tetra.end(); ++iter)
           {
old mode 100644 (file)
new mode 100755 (executable)
index 87813b6..7084fd9
@@ -55,8 +55,8 @@ namespace INTERP_KERNEL
     // Check types of source elements here rather than in intersectCells() since a wrong type can be
     // found late after a long time of calculation.
 
-    const unsigned long numSrcElems = srcMesh.getNumberOfElements();
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    const ConnType numSrcElems = srcMesh.getNumberOfElements();
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       if ( srcMesh.getTypeOfElement( OTT<ConnType,numPol>::indFC(i) ) != NORM_TETRA4 )
         throw INTERP_KERNEL::Exception("P1P0 barycentric algorithm works only with tetrahedral source meshes");
   }
@@ -97,7 +97,7 @@ namespace INTERP_KERNEL
   {
     typename MyMatrix::value_type& resRow=res[tgtCell];
 
-    int nbOfNodesT=Intersector3D<MyMeshType,MyMatrix>::_target_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(tgtCell));
+    ConnType nbOfNodesT=Intersector3D<MyMeshType,MyMatrix>::_target_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(tgtCell));
     releaseArrays();
     _split.splitTargetCell(tgtCell,nbOfNodesT,_tetra);
 
old mode 100644 (file)
new mode 100755 (executable)
index 38634d4..79731b9
@@ -46,13 +46,13 @@ namespace INTERP_KERNEL
     // Check types of elements here rather than in intersectCells() since a wrong type can be
     // found late after a long time of calculation.
 
-    const unsigned long numSrcElems = srcMesh.getNumberOfElements();
-    for(unsigned long i = 0 ; i < numSrcElems ; ++i)
+    const ConnType numSrcElems = srcMesh.getNumberOfElements();
+    for(ConnType i = 0 ; i < numSrcElems ; ++i)
       if ( srcMesh.getTypeOfElement( OTT<ConnType,numPol>::indFC( i )) != NORM_TETRA4 )
         throw INTERP_KERNEL::Exception("P1P1 3D algorithm works only with tetrahedral meshes");
 
-    const unsigned long numTgtElems = targetMesh.getNumberOfElements();
-    for(unsigned long i = 0 ; i < numTgtElems ; ++i)
+    const ConnType numTgtElems = targetMesh.getNumberOfElements();
+    for(ConnType i = 0 ; i < numTgtElems ; ++i)
       if ( targetMesh.getTypeOfElement( OTT<ConnType,numPol>::indFC( i )) != NORM_TETRA4 )
         throw INTERP_KERNEL::Exception("P1P1 3D algorithm works only with tetrahedral meshes");
   }
@@ -79,8 +79,8 @@ namespace INTERP_KERNEL
     UnitTetraIntersectionBary b; b.init();
 #endif
     // split the targetCell into dual cells
-    std::pair< int, std::vector<double> > subTetraNodes[24]; // a node of sub tetra and its coordinates
-    const double* nodes[4]; int conn[4];
+    std::pair< ConnType, std::vector<double> > subTetraNodes[24]; // a node of sub tetra and its coordinates
+    const double* nodes[4]; ConnType conn[4];
     for(int node = 0; node < 4 ; ++node)
       nodes[node]=getCoordsOfNode2(node, OTT<ConnType,numPol>::indFC(targetCell),
                                    Intersector3D<MyMeshType,MyMatrix>::_target_mesh,conn[node]);
index 67eb81537c074712d11d8b2bc30c21460ac4cc7a..c906545d36f8d80b2262366bede14c42d91a60ee 100644 (file)
@@ -23,8 +23,8 @@
 namespace INTERP_KERNEL
 {
 
-  void SplitHexa8IntoTetras(SplittingPolicy policy, const int *nodalConnBg, const int *nodalConnEnd, const double *coords,
-                            std::vector<int>& tetrasNodalConn, std::vector<double>& addCoords)
+  void SplitHexa8IntoTetras(SplittingPolicy policy, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, const double *coords,
+                            std::vector<mcIdType>& tetrasNodalConn, std::vector<double>& addCoords)
   {
     if(std::distance(nodalConnBg,nodalConnEnd)!=8)
       throw INTERP_KERNEL::Exception("SplitHexa8IntoTetras : input hexa do not have 8 nodes !");
@@ -33,7 +33,7 @@ namespace INTERP_KERNEL
       case PLANAR_FACE_5:
         {
           tetrasNodalConn.resize(20);
-          int *conn(&tetrasNodalConn[0]);
+          mcIdType *conn(&tetrasNodalConn[0]);
           conn[0]=nodalConnBg[SPLIT_NODES_5_WO[0]]; conn[1]=nodalConnBg[SPLIT_NODES_5_WO[1]]; conn[2]=nodalConnBg[SPLIT_NODES_5_WO[2]]; conn[3]=nodalConnBg[SPLIT_NODES_5_WO[3]];
           conn[4]=nodalConnBg[SPLIT_NODES_5_WO[4]]; conn[5]=nodalConnBg[SPLIT_NODES_5_WO[5]]; conn[6]=nodalConnBg[SPLIT_NODES_5_WO[6]]; conn[7]=nodalConnBg[SPLIT_NODES_5_WO[7]];
           conn[8]=nodalConnBg[SPLIT_NODES_5_WO[8]]; conn[9]=nodalConnBg[SPLIT_NODES_5_WO[9]]; conn[10]=nodalConnBg[SPLIT_NODES_5_WO[10]]; conn[11]=nodalConnBg[SPLIT_NODES_5_WO[11]];
@@ -44,7 +44,7 @@ namespace INTERP_KERNEL
       case PLANAR_FACE_6:
         {
           tetrasNodalConn.resize(24);
-          int *conn(&tetrasNodalConn[0]);
+          mcIdType *conn(&tetrasNodalConn[0]);
           conn[0]=nodalConnBg[SPLIT_NODES_6_WO[0]]; conn[1]=nodalConnBg[SPLIT_NODES_6_WO[1]]; conn[2]=nodalConnBg[SPLIT_NODES_6_WO[2]]; conn[3]=nodalConnBg[SPLIT_NODES_6_WO[3]];
           conn[4]=nodalConnBg[SPLIT_NODES_6_WO[4]]; conn[5]=nodalConnBg[SPLIT_NODES_6_WO[5]]; conn[6]=nodalConnBg[SPLIT_NODES_6_WO[6]]; conn[7]=nodalConnBg[SPLIT_NODES_6_WO[7]];
           conn[8]=nodalConnBg[SPLIT_NODES_6_WO[8]]; conn[9]=nodalConnBg[SPLIT_NODES_6_WO[9]]; conn[10]=nodalConnBg[SPLIT_NODES_6_WO[10]]; conn[11]=nodalConnBg[SPLIT_NODES_6_WO[11]];
@@ -57,7 +57,7 @@ namespace INTERP_KERNEL
         {
           addCoords.resize(7*3);
           tetrasNodalConn.resize(24*4);
-          int *conn(&tetrasNodalConn[0]);
+          mcIdType *conn(&tetrasNodalConn[0]);
           double *tmp(&addCoords[18]);
           tmp[0]=0.; tmp[1]=0.; tmp[2]=0.;
           double *tmp2(&addCoords[0]);
@@ -66,7 +66,7 @@ namespace INTERP_KERNEL
               tmp2[0]=0.; tmp2[1]=0.; tmp2[2]=0.;
               for(int j=0;j<4;j++,conn+=4)
                 {
-                  int tmp3(nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+j]]);
+                  mcIdType tmp3(nodalConnBg[GENERAL_24_SUB_NODES_WO[4*i+j]]);
                   tmp2[0]+=coords[3*tmp3+0];
                   tmp2[1]+=coords[3*tmp3+1];
                   tmp2[2]+=coords[3*tmp3+2];
@@ -97,13 +97,13 @@ namespace INTERP_KERNEL
               tmp2[1]=(tmp[3*(GENERAL_48_SUB_NODES[2*i+24]-8)+1]+tmp[3*(GENERAL_48_SUB_NODES[2*i+25]-8)+1])/2.;
               tmp2[2]=(tmp[3*(GENERAL_48_SUB_NODES[2*i+24]-8)+2]+tmp[3*(GENERAL_48_SUB_NODES[2*i+25]-8)+2])/2.;
             }
-          int *conn(&tetrasNodalConn[0]);
+          mcIdType *conn(&tetrasNodalConn[0]);
           std::vector<double> dummy;
           for(int i=0;i<8;i++)
             {
-              std::vector<int> c;
+              std::vector<mcIdType> c;
               SplitHexa8IntoTetras(PLANAR_FACE_6,GENERAL_48_SUBZONES_2+i*8,GENERAL_48_SUBZONES_2+(i+1)*8,coords,c,dummy);
-              int *conn2(&c[0]);
+              mcIdType *conn2(&c[0]);
               for(int j=0;j<6;j++,conn+=4,conn2+=4)
                 {
                   conn[0]=conn2[0]>=0?nodalConnBg[conn2[0]]:conn2[0];
@@ -119,8 +119,8 @@ namespace INTERP_KERNEL
       }
   }
 
-  void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const int *nodalConnBg, const int *nodalConnEnd, const double *coords,
-                       std::vector<int>& tetrasNodalConn, std::vector<double>& addCoords)
+  void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, const double *coords,
+                       std::vector<mcIdType>& tetrasNodalConn, std::vector<double>& addCoords)
   {
     switch(gt)
       {
@@ -143,7 +143,7 @@ namespace INTERP_KERNEL
           if(sz!=5)
             throw INTERP_KERNEL::Exception("SplitIntoTetras : input pyra5 do not have 5 nodes !");
           tetrasNodalConn.resize(8);
-          int *conn(&tetrasNodalConn[0]);
+          mcIdType *conn(&tetrasNodalConn[0]);
           conn[0]=nodalConnBg[0]; conn[1]=nodalConnBg[1]; conn[2]=nodalConnBg[2]; conn[3]=nodalConnBg[4];
           conn[4]=nodalConnBg[0]; conn[5]=nodalConnBg[2]; conn[6]=nodalConnBg[3]; conn[7]=nodalConnBg[4];
           return ;
@@ -154,7 +154,7 @@ namespace INTERP_KERNEL
           if(sz!=6)
             throw INTERP_KERNEL::Exception("SplitIntoTetras : input penta6 do not have 6 nodes !");
           tetrasNodalConn.resize(12);
-          int *conn(&tetrasNodalConn[0]);
+          mcIdType *conn(&tetrasNodalConn[0]);
           conn[0]=nodalConnBg[0]; conn[1]=nodalConnBg[1]; conn[2]=nodalConnBg[2]; conn[3]=nodalConnBg[3];
           conn[4]=nodalConnBg[3]; conn[5]=nodalConnBg[5]; conn[6]=nodalConnBg[4]; conn[7]=nodalConnBg[2];
           conn[8]=nodalConnBg[4]; conn[9]=nodalConnBg[2]; conn[10]=nodalConnBg[1]; conn[11]=nodalConnBg[3];
@@ -166,7 +166,7 @@ namespace INTERP_KERNEL
           if(sz!=12)
             throw INTERP_KERNEL::Exception("SplitIntoTetras : input octa12 (hexagone prism) do not have 12 nodes !");
           tetrasNodalConn.resize(48);
-          int *conn(&tetrasNodalConn[0]);
+          mcIdType *conn(&tetrasNodalConn[0]);
           conn[0]=nodalConnBg[0]; conn[1]=nodalConnBg[1]; conn[2]=nodalConnBg[5]; conn[3]=nodalConnBg[6];
           conn[4]=nodalConnBg[6]; conn[5]=nodalConnBg[11]; conn[6]=nodalConnBg[7]; conn[7]=nodalConnBg[5];
           conn[8]=nodalConnBg[7]; conn[9]=nodalConnBg[5]; conn[10]=nodalConnBg[1]; conn[11]=nodalConnBg[6];
@@ -186,28 +186,30 @@ namespace INTERP_KERNEL
         }
       case NORM_POLYHED:
         {
-          std::size_t nbOfFaces(std::count(nodalConnBg,nodalConnEnd,-1)+1);
-          std::size_t nbOfTetra(std::distance(nodalConnBg,nodalConnEnd)-nbOfFaces+1);
+          mcIdType nbOfFaces(ToIdType(std::count(nodalConnBg,nodalConnEnd,-1)+1));
+          mcIdType nbOfTetra(ToIdType(std::distance(nodalConnBg,nodalConnEnd)-nbOfFaces+1));
           addCoords.resize((nbOfFaces+1)*3);
           tetrasNodalConn.resize(nbOfTetra*4);
-          int *conn(&tetrasNodalConn[0]);
-          const int *work(nodalConnBg);
+          mcIdType *conn(&tetrasNodalConn[0]);
+          const mcIdType *work(nodalConnBg);
           double *tmp(&addCoords[0]),*tmp2(&addCoords[3*nbOfFaces]);
           tmp2[0]=0.; tmp2[1]=0.; tmp2[2]=0.;
-          for(std::size_t i=0;i<nbOfFaces;i++,tmp+=3)
+          for(int i=0;i<nbOfFaces;i++,tmp+=3)
             {
               tmp[0]=0.; tmp[1]=0.; tmp[2]=0.;
               std::size_t nbOfNodesOfFace(std::distance(work,std::find(work,nodalConnEnd,-1)));
               for(std::size_t j=0;j<nbOfNodesOfFace;j++,conn+=4)
                 {
-                  conn[0]=work[j]; conn[1]=work[(j+1)%nbOfNodesOfFace]; conn[2]=-((int)i+1); conn[3]=-((int)nbOfFaces+1);
+                  conn[0]=work[j]; conn[1]=work[(j+1)%nbOfNodesOfFace]; conn[2]=-(i+1); conn[3]=ToIdType(-(nbOfFaces+1));
                   tmp[0]+=coords[3*work[j]+0]; tmp[1]+=coords[3*work[j]+1]; tmp[2]+=coords[3*work[j]+2];
                 }
-              tmp[0]/=(int)nbOfNodesOfFace; tmp[1]/=(int)nbOfNodesOfFace; tmp[2]/=(int)nbOfNodesOfFace;
+              double nbNF = (double)nbOfNodesOfFace;
+              tmp[0]/=nbNF; tmp[1]/=nbNF; tmp[2]/=nbNF;
               tmp2[0]+=tmp[0]; tmp2[1]+=tmp[1]; tmp2[2]+=tmp[2];
               work+=nbOfNodesOfFace+1;
             }
-          tmp2[0]/=(int)nbOfFaces; tmp2[1]/=(int)nbOfFaces; tmp2[2]/=(int)nbOfFaces;
+          double nbF = (double)nbOfFaces;
+          tmp2[0]/=nbF; tmp2[1]/=nbF; tmp2[2]/=nbF;
           return ;
         }
       default:
index 54e1387b79aeba6cc4cf038d61d65347d7d6eeac..0c5d933bbc647843c9da605d2be56c70774e151c 100644 (file)
@@ -27,6 +27,7 @@
 #include "InterpKernelException.hxx"
 #include "InterpKernelHashMap.hxx"
 #include "VectorUtils.hxx"
+#include "MCIdType.hxx"
 
 #include <functional>
 #include <vector>
@@ -188,7 +189,7 @@ namespace INTERP_KERNEL
       26,23,18,25,24,15,6,19
     };
 
-  static const int GENERAL_48_SUBZONES_2[64] = 
+  static const mcIdType GENERAL_48_SUBZONES_2[64] = 
     {
       0,-1,-14,-5,-2,-13,-19,-15,
       -1,1,-6,-14,-13,-3,-16,-19,
@@ -199,11 +200,11 @@ namespace INTERP_KERNEL
       -15,-19,-18,-10,-7,-17,-12,7,
       -19,-16,-11,-18,-17,-8,6,-12};
 
-  void SplitHexa8IntoTetras(SplittingPolicy policy, const int *nodalConnBg, const int *nodalConnEnd, const double *coords,
-                            std::vector<int>& tetrasNodalConn, std::vector<double>& addCoords);
+  void SplitHexa8IntoTetras(SplittingPolicy policy, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, const double *coords,
+                            std::vector<mcIdType>& tetrasNodalConn, std::vector<double>& addCoords);
   
-  INTERPKERNEL_EXPORT void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const int *nodalConnBg, const int *nodalConnEnd, const double *coords,
-                                           std::vector<int>& tetrasNodalConn, std::vector<double>& addCoords);
+  INTERPKERNEL_EXPORT void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, const double *coords,
+                                           std::vector<mcIdType>& tetrasNodalConn, std::vector<double>& addCoords);
   
   /**
    * \brief Class representing a triangular face, used as key in caching hash map in SplitterTetra.
@@ -222,7 +223,7 @@ namespace INTERP_KERNEL
      * @param node2  global number of the second node of the face
      * @param node3  global number of the third node of the face
      */
-    TriangleFaceKey(int node1, int node2, int node3)
+    TriangleFaceKey(mcIdType node1, mcIdType node2, mcIdType node3)
     {
       Sort3Ints(_nodes, node1, node2, node3);
       _hashVal = ( _nodes[0] + _nodes[1] + _nodes[2] ) % 29;
@@ -268,30 +269,30 @@ namespace INTERP_KERNEL
      *
      * @return  a hash value for the object
      */
-    int hashVal() const
+    mcIdType hashVal() const
     {
       return _hashVal;
     }
      
-    inline static void Sort3Ints(int* sorted, int node1, int node2, int node3);
+    inline static void Sort3Ints(mcIdType* sorted, mcIdType node1, mcIdType node2, mcIdType node3);
 
   private:
     /// global numbers of the three nodes, sorted in ascending order
-    int _nodes[3];
+    mcIdType _nodes[3];
     
     /// hash value for the object, calculated in the constructor
-    int _hashVal;
+    mcIdType _hashVal;
   };
   
   /**
    * Method to sort three integers in ascending order
    *
-   * @param sorted  int[3] array in which to store the result
+   * @param sorted  mcIdType[3] array in which to store the result
    * @param x1   first integer
    * @param x2   second integer
    * @param x3   third integer
    */
-  inline void TriangleFaceKey::Sort3Ints(int* sorted, int x1, int x2, int x3)
+  inline void TriangleFaceKey::Sort3Ints(mcIdType* sorted, mcIdType x1, mcIdType x2, mcIdType x3)
   {
     if(x1 < x2)
       {
@@ -343,7 +344,7 @@ namespace INTERP_KERNEL
      * @param key  a TriangleFaceKey object
      * @return an integer hash value for key
      */
-    int operator()(const INTERP_KERNEL::TriangleFaceKey& key) const
+    mcIdType operator()(const INTERP_KERNEL::TriangleFaceKey& key) const
     {
       return key.hashVal();
     }
@@ -360,18 +361,19 @@ namespace INTERP_KERNEL
   template<class MyMeshType>
   class SplitterTetra
   {
-  public: 
+  public:
+    typedef typename MyMeshType::MyConnType ConnType;
     
     SplitterTetra(const MyMeshType& srcMesh, const double** tetraCorners, const typename MyMeshType::MyConnType *nodesId);
 
-    SplitterTetra(const MyMeshType& srcMesh, const double tetraCorners[12], const int *conn = 0);
+    SplitterTetra(const MyMeshType& srcMesh, const double tetraCorners[12], const ConnType *conn = 0);
 
     ~SplitterTetra();
 
     double intersectSourceCell(typename MyMeshType::MyConnType srcCell, double* baryCentre=0);
     double intersectSourceFace(const NormalizedCellType polyType,
-                               const int polyNodesNbr,
-                               const int *const polyNodes,
+                               const ConnType polyNodesNbr,
+                               const ConnType *const polyNodes,
                                const double *const *const polyCoords,
                                const double dimCaracteristic,
                                const double precision,
@@ -380,19 +382,19 @@ namespace INTERP_KERNEL
 
     double intersectTetra(const double** tetraCorners);
 
-    typename MyMeshType::MyConnType getId(int id) { return _conn[id]; }
+    ConnType getId(mcIdType id) { return _conn[id]; }
     
     void splitIntoDualCells(SplitterTetra<MyMeshType> **output);
 
-    void splitMySelfForDual(double* output, int i, typename MyMeshType::MyConnType& nodeId);
+    void splitMySelfForDual(double* output, int i, ConnType& nodeId);
 
     void clearVolumesCache();
 
   private:
     inline static void CheckIsOutside(const double* pt, bool* isOutside, const double errTol = DEFAULT_ABS_TOL);
     inline static void CheckIsStrictlyOutside(const double* pt, bool* isStrictlyOutside, const double errTol = DEFAULT_ABS_TOL);
-    inline void calculateNode(typename MyMeshType::MyConnType globalNodeNum);
-    inline void calculateNode2(typename MyMeshType::MyConnType globalNodeNum, const double* node);
+    inline void calculateNode(ConnType globalNodeNum);
+    inline void calculateNode2(ConnType globalNodeNum, const double* node);
     inline void calculateVolume(TransformedTriangle& tri, const TriangleFaceKey& key);
     inline void calculateSurface(TransformedTriangle& tri, const TriangleFaceKey& key);
 
@@ -415,7 +417,7 @@ namespace INTERP_KERNEL
     TetraAffineTransform* _t;
     
     /// HashMap relating node numbers to transformed nodes, used for caching
-    HashMap< int , double* > _nodes;
+    HashMap< ConnType , double* > _nodes;
     
     /// HashMap relating triangular faces to calculated volume contributions, used for caching
     HashMap< TriangleFaceKey, double > _volumes;
@@ -424,7 +426,7 @@ namespace INTERP_KERNEL
     const MyMeshType& _src_mesh;
                 
     // node id of the first node in target mesh in C mode.
-    typename MyMeshType::MyConnType _conn[4];
+    ConnType _conn[4];
 
     double _coords[12];
     
@@ -556,7 +558,7 @@ namespace INTERP_KERNEL
     inline const double* getCoordsOfSubNode(typename MyMeshTypeT::MyConnType node);//to suppress
     inline const double* getCoordsOfSubNode2(typename MyMeshTypeT::MyConnType node, typename MyMeshTypeT::MyConnType& nodeId);//to suppress
     //template<int n>
-    inline void calcBarycenter(int n, double* barycenter, const typename MyMeshTypeT::MyConnType* pts);//to suppress
+    inline void calcBarycenter(typename MyMeshTypeT::MyConnType n, double* barycenter, const int* pts);//to suppress
   private:
     const MyMeshTypeT& _target_mesh;
     const MyMeshTypeS& _src_mesh;
@@ -576,7 +578,7 @@ namespace INTERP_KERNEL
    */
   template<class MyMeshTypeT, class MyMeshTypeS>
   //template<int n>
-  inline void SplitterTetra2<MyMeshTypeT, MyMeshTypeS>::calcBarycenter(int n, double* barycenter, const typename MyMeshTypeT::MyConnType* pts)
+  inline void SplitterTetra2<MyMeshTypeT, MyMeshTypeS>::calcBarycenter(typename MyMeshTypeT::MyConnType n, double* barycenter, const int* pts)
   {
     barycenter[0] = barycenter[1] = barycenter[2] = 0.0;
     for(int i = 0; i < n ; ++i)
@@ -587,9 +589,9 @@ namespace INTERP_KERNEL
        barycenter[2] += pt[2];
       }
     
-    barycenter[0] /= n;
-    barycenter[1] /= n;
-    barycenter[2] /= n;
+    barycenter[0] /= (double)n;
+    barycenter[1] /= (double)n;
+    barycenter[2] /= (double)n;
   }
 
   /**
index 83b2628f9840640d53cfd9c89ea1502bc60332b6..ce0136d99360f1b9c708b70eadd3b703e77ac738 100644 (file)
@@ -99,7 +99,7 @@ namespace INTERP_KERNEL
    * \param [in] tetraCorners  array 4*3 doubles containing corners of input tetrahedron (P0X,P0Y,P0Y,P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z).
    */
   template<class MyMeshType>
-  SplitterTetra<MyMeshType>::SplitterTetra(const MyMeshType& srcMesh, const double tetraCorners[12], const int *conn): _t(0),_src_mesh(srcMesh)
+  SplitterTetra<MyMeshType>::SplitterTetra(const MyMeshType& srcMesh, const double tetraCorners[12], const ConnType *conn): _t(0),_src_mesh(srcMesh)
   {
     if(!conn)
       { _conn[0]=0; _conn[1]=1; _conn[2]=2; _conn[3]=3; }
@@ -121,7 +121,7 @@ namespace INTERP_KERNEL
   SplitterTetra<MyMeshType>::~SplitterTetra()
   {
     delete _t;
-    for(HashMap< int, double* >::iterator iter = _nodes.begin(); iter != _nodes.end() ; ++iter)
+    for(typename HashMap< ConnType, double* >::iterator iter = _nodes.begin(); iter != _nodes.end() ; ++iter)
       delete[] iter->second;
   }
 
@@ -191,17 +191,17 @@ namespace INTERP_KERNEL
     // get type of cell
     NormalizedCellType normCellType=_src_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(element));
     const CellModel& cellModelCell=CellModel::GetCellModel(normCellType);
-    unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? _src_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(element)) : cellModelCell.getNumberOfNodes();
+    ConnType nbOfNodes4Type=cellModelCell.isDynamic() ? _src_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(element)) : cellModelCell.getNumberOfNodes();
     // halfspace filtering
     bool isOutside[8] = {true, true, true, true, true, true, true, true};
     bool isTargetOutside = false;
 
     // calculate the coordinates of the nodes
-    int *cellNodes=new int[nbOfNodes4Type];
-    for(int i = 0;i<(int)nbOfNodes4Type;++i)
+    ConnType *cellNodes=new ConnType[nbOfNodes4Type];
+    for(ConnType i = 0;i<nbOfNodes4Type;++i)
       {
         // we could store mapping local -> global numbers too, but not sure it is worth it
-        const int globalNodeNum = getGlobalNumberOfNode(i, OTT<ConnType,numPol>::indFC(element), _src_mesh);
+        const ConnType globalNodeNum = getGlobalNumberOfNode(i, OTT<ConnType,numPol>::indFC(element), _src_mesh);
         cellNodes[i]=globalNodeNum;
         if(_nodes.find(globalNodeNum) == _nodes.end()) 
           {
@@ -232,19 +232,19 @@ namespace INTERP_KERNEL
 
         // get nb of sons of a cell
         const ConnType* rawCellConn = _src_mesh.getConnectivityPtr() + OTT<ConnType,numPol>::conn2C( _src_mesh.getConnectivityIndexPtr()[ element ]);
-        const int rawNbCellNodes = _src_mesh.getConnectivityIndexPtr()[ element+1 ] - _src_mesh.getConnectivityIndexPtr()[ element ];
+        const ConnType rawNbCellNodes = _src_mesh.getConnectivityIndexPtr()[ element+1 ] - _src_mesh.getConnectivityIndexPtr()[ element ];
         unsigned nbOfSons = cellModelCell.getNumberOfSons2(rawCellConn, rawNbCellNodes);
 
         for(unsigned ii = 0 ; ii < nbOfSons; ++ii)
           {
             // get sons connectivity
             NormalizedCellType faceType;
-            int *faceNodes, nbFaceNodes=-1;
+            ConnType *faceNodes, nbFaceNodes=-1;
             if ( cellModelCell.isDynamic() )
               {
-                faceNodes=new int[nbOfNodes4Type];
+                faceNodes=new ConnType[nbOfNodes4Type];
                 nbFaceNodes = cellModelCell.fillSonCellNodalConnectivity2(ii,rawCellConn,rawNbCellNodes,faceNodes,faceType);
-                for ( int i = 0; i < nbFaceNodes; ++i )
+                for ( ConnType i = 0; i < nbFaceNodes; ++i )
                   faceNodes[i] = OTT<ConnType,numPol>::coo2C(faceNodes[i]);
               }
             else
@@ -253,7 +253,7 @@ namespace INTERP_KERNEL
                 const CellModel& faceModel=CellModel::GetCellModel(faceType);
                 assert(faceModel.getDimension() == 2);
                 nbFaceNodes = cellModelCell.getNumberOfNodesConstituentTheSon(ii);
-                faceNodes = new int[nbFaceNodes];
+                faceNodes = new ConnType[nbFaceNodes];
                 cellModelCell.fillSonCellNodalConnectivity(ii,cellNodes,faceNodes);
               }
             // intersect a son with the unit tetra
@@ -326,8 +326,8 @@ namespace INTERP_KERNEL
 
               case NORM_POLYGON:
                 {
-                  int nbTria = nbFaceNodes - 2; // split polygon into nbTria triangles
-                  for ( int iTri = 0; iTri < nbTria; ++iTri )
+                  ConnType nbTria = nbFaceNodes - 2; // split polygon into nbTria triangles
+                  for ( ConnType iTri = 0; iTri < nbTria; ++iTri )
                     {
                       TriangleFaceKey key = TriangleFaceKey(faceNodes[0], faceNodes[1+iTri], faceNodes[2+iTri]);
                       if(_volumes.find(key) == _volumes.end())
@@ -589,8 +589,8 @@ namespace INTERP_KERNEL
    */
   template<class MyMeshType>
   double SplitterTetra<MyMeshType>::intersectSourceFace(const NormalizedCellType polyType,
-                                                        const int polyNodesNbr,
-                                                        const int *const polyNodes,
+                                                        const ConnType polyNodesNbr,
+                                                        const ConnType *const polyNodes,
                                                         const double *const *const polyCoords,
                                                         const double dimCaracteristic,
                                                         const double precision,
@@ -614,9 +614,9 @@ namespace INTERP_KERNEL
     bool isTargetOutside = false;
 
     // calculate the coordinates of the nodes
-    for(int i = 0;i<(int)polyNodesNbr;++i)
+    for(ConnType i = 0;i<polyNodesNbr;++i)
       {
-        const int globalNodeNum = polyNodes[i];
+        const ConnType globalNodeNum = polyNodes[i];
         if(_nodes.find(globalNodeNum) == _nodes.end())
           {
             calculateNode2(globalNodeNum, polyCoords[i]);
@@ -684,8 +684,8 @@ namespace INTERP_KERNEL
                     double planeConstant = dot(planeNormal, coordsTetraTriNode1);
                     if (IsFacesCoplanar(planeNormal, planeConstant, polyCoords, precision))
                       {
-                        int nbrPolyTri = polyNodesNbr - 2; // split polygon into nbrPolyTri triangles
-                        for (int iTri = 0; iTri < nbrPolyTri; ++iTri)
+                        ConnType nbrPolyTri = polyNodesNbr - 2; // split polygon into nbrPolyTri triangles
+                        for (ConnType iTri = 0; iTri < nbrPolyTri; ++iTri)
                           {
                             double volume = CalculateIntersectionSurfaceOfCoplanarTriangles(planeNormal,
                                                                                             planeConstant,
@@ -782,8 +782,8 @@ namespace INTERP_KERNEL
 
                 case NORM_POLYGON:
                   {
-                    int nbrPolyTri = polyNodesNbr - 2; // split polygon into nbrPolyTri triangles
-                    for (int iTri = 0; iTri < nbrPolyTri; ++iTri)
+                    ConnType nbrPolyTri = polyNodesNbr - 2; // split polygon into nbrPolyTri triangles
+                    for (ConnType iTri = 0; iTri < nbrPolyTri; ++iTri)
                       {
                         TriangleFaceKey key = TriangleFaceKey(polyNodes[0], polyNodes[1 + iTri], polyNodes[2 + iTri]);
                         if (_volumes.find(key) == _volumes.end())
@@ -866,7 +866,7 @@ namespace INTERP_KERNEL
     if(!isTargetOutside)
     {
       const CellModel& cellModelCell=CellModel::GetCellModel(NORM_TETRA4);
-      int cellNodes[4] = { 0, 1, 2, 3 }, faceNodes[3];
+      ConnType cellNodes[4] = { 0, 1, 2, 3 }, faceNodes[3];
 
       for(unsigned ii = 0 ; ii < 4 ; ++ii)
       {
@@ -909,9 +909,9 @@ namespace INTERP_KERNEL
   void SplitterTetra2<MyMeshTypeT, MyMeshTypeS>::releaseArrays()
   {
     // free potential sub-mesh nodes that have been allocated
-    typename MyMeshTypeT::MyConnType nbOfNodesT = _node_ids.size();// Issue 0020634.
-    if((int)_nodes.size()>=/*8*/nbOfNodesT)
+    if(_nodes.size()>=/*8*/_node_ids.size())
       {
+        typename MyMeshTypeT::MyConnType nbOfNodesT = static_cast<typename MyMeshTypeT::MyConnType>(_node_ids.size());
         std::vector<const double*>::iterator iter = _nodes.begin() + /*8*/nbOfNodesT;
         while(iter != _nodes.end())
           {
@@ -929,21 +929,22 @@ namespace INTERP_KERNEL
   template<class MyMeshTypeT, class MyMeshTypeS>
   void SplitterTetra2<MyMeshTypeT, MyMeshTypeS>::splitTargetCell2(typename MyMeshTypeT::MyConnType targetCell, typename std::vector< SplitterTetra<MyMeshTypeS>* >& tetra)
   {
-    const int *refConn(_target_mesh.getConnectivityPtr());
-    const int *cellConn(refConn+_target_mesh.getConnectivityIndexPtr()[targetCell]);
+    typedef typename MyMeshTypeT::MyConnType TConnType;
+    const TConnType *refConn(_target_mesh.getConnectivityPtr());
+    const TConnType *cellConn(refConn+_target_mesh.getConnectivityIndexPtr()[targetCell]);
     INTERP_KERNEL::NormalizedCellType gt(_target_mesh.getTypeOfElement(targetCell));
-    std::vector<int> tetrasNodalConn;
+    std::vector<TConnType> tetrasNodalConn;
     std::vector<double> addCoords;
     const double *coords(_target_mesh.getCoordinatesPtr());
     SplitIntoTetras(_splitting_pol,gt,cellConn,refConn+_target_mesh.getConnectivityIndexPtr()[targetCell+1],coords,tetrasNodalConn,addCoords);
     std::size_t nbTetras(tetrasNodalConn.size()/4); tetra.resize(nbTetras);
     double tmp[12];
-    int tmp2[4];
+    typename MyMeshTypeS::MyConnType tmp2[4];
     for(std::size_t i=0;i<nbTetras;i++)
       {
         for(int j=0;j<4;j++)
           {
-            int cellId(tetrasNodalConn[4*i+j]);
+            TConnType cellId(tetrasNodalConn[4*i+j]);
             tmp2[j]=cellId;
             if(cellId>=0)
               {
@@ -980,7 +981,7 @@ namespace INTERP_KERNEL
         _node_ids.resize(8);
         tetra.reserve(1);
         const double *nodes[4];
-        int conn[4];
+        ConnType conn[4];
         for(int node = 0; node < 4 ; ++node)
           {
             nodes[node]=getCoordsOfNode2(node, OTT<ConnType,numPol>::indFC(targetCell),_target_mesh,conn[node]);
@@ -1061,7 +1062,7 @@ namespace INTERP_KERNEL
     for(int i = 0; i < 5; ++i)
       {
         const double* nodes[4];
-        int conn[4];
+        typename MyMeshTypeS::MyConnType conn[4];
         for(int j = 0; j < 4; ++j)
           {
             conn[j] = subZone[ SPLIT_NODES_5[4*i+j] ];
@@ -1085,7 +1086,7 @@ namespace INTERP_KERNEL
     for(int i = 0; i < 6; ++i)
       {
         const double* nodes[4];
-        int conn[4];
+        typename MyMeshTypeS::MyConnType conn[4];
         for(int j = 0; j < 4; ++j)
           {
             conn[j] = subZone[SPLIT_NODES_6[4*i+j]];
@@ -1112,7 +1113,7 @@ namespace INTERP_KERNEL
     
     // nodes to use for tetrahedron
     const double* nodes[4];
-    int conn[4];
+    typename MyMeshTypeS::MyConnType conn[4];
     // get the cell center
     conn[0] = 14;
     nodes[0] = getCoordsOfSubNode(conn[0]);
@@ -1172,7 +1173,7 @@ namespace INTERP_KERNEL
     
     // create tetrahedra
     const double* nodes[4];
-    int conn[4];
+    typename MyMeshTypeS::MyConnType conn[4];
     for(int i = 0; i < 2; ++i)
       {
         for(int j = 0; j < 4; ++j)
@@ -1198,24 +1199,24 @@ namespace INTERP_KERNEL
     // get type of cell and nb of cell nodes
     NormalizedCellType normCellType=_target_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(targetCell));
     const CellModel& cellModelCell=CellModel::GetCellModel(normCellType);
-    unsigned nbOfCellNodes=cellModelCell.isDynamic() ? _target_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(targetCell)) : cellModelCell.getNumberOfNodes();
+    ConnType nbOfCellNodes=cellModelCell.isDynamic() ? _target_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(targetCell)) : cellModelCell.getNumberOfNodes();
 
     // get nb of cell sons (faces)
     const ConnType* rawCellConn = _target_mesh.getConnectivityPtr() + OTT<ConnType,numPol>::conn2C( _target_mesh.getConnectivityIndexPtr()[ targetCell ]);
-    const int rawNbCellNodes = _target_mesh.getConnectivityIndexPtr()[ targetCell+1 ] - _target_mesh.getConnectivityIndexPtr()[ targetCell ];
+    const ConnType rawNbCellNodes = _target_mesh.getConnectivityIndexPtr()[ targetCell+1 ] - _target_mesh.getConnectivityIndexPtr()[ targetCell ];
     unsigned nbOfSons = cellModelCell.getNumberOfSons2(rawCellConn, rawNbCellNodes);
 
     // indices of nodes of a son
-    static std::vector<int> allNodeIndices; // == 0,1,2,...,nbOfCellNodes-1
-    while ( allNodeIndices.size() < nbOfCellNodes )
-      allNodeIndices.push_back( allNodeIndices.size() );
-    std::vector<int> classicFaceNodes(4);
+    static std::vector<ConnType> allNodeIndices; // == 0,1,2,...,nbOfCellNodes-1
+    while ( allNodeIndices.size() < (std::size_t)nbOfCellNodes )
+      allNodeIndices.push_back( static_cast<ConnType>(allNodeIndices.size()) );
+    std::vector<ConnType> classicFaceNodes(4);
     if(cellModelCell.isQuadratic())
       throw INTERP_KERNEL::Exception("SplitterTetra2::splitConvex : quadratic 3D cells are not implemented yet !");
-    int* faceNodes = cellModelCell.isDynamic() ? &allNodeIndices[0] : &classicFaceNodes[0];
+    ConnType* faceNodes = cellModelCell.isDynamic() ? &allNodeIndices[0] : &classicFaceNodes[0];
 
     // nodes of tetrahedron
-    int conn[4];
+    typename MyMeshTypeS::MyConnType conn[4];
     const double* nodes[4];
     nodes[3] = getCoordsOfSubNode2( nbOfCellNodes,conn[3]); // barycenter
 
@@ -1260,7 +1261,7 @@ namespace INTERP_KERNEL
   {
     // retrieve real mesh nodes
     
-    typename MyMeshTypeT::MyConnType nbOfNodesT = _node_ids.size();// Issue 0020634. _node_ids.resize(8);
+    typename MyMeshTypeT::MyConnType nbOfNodesT = static_cast<typename MyMeshTypeT::MyConnType>(_node_ids.size());// Issue 0020634. _node_ids.resize(8);
     for(int node = 0; node < nbOfNodesT ; ++node)
       {
         // calculate only normal nodes
index 55fba1d65ee12b31136e3b1480265d2b8df993bc..aefeed0b596a83ca3e1e8214db45e9b78b8e538d 100644 (file)
@@ -46,8 +46,8 @@ namespace INTERP_KERNEL
      */
     virtual void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res) = 0;
 
-    virtual int getNumberOfRowsOfResMatrix() const = 0;
-    virtual int getNumberOfColsOfResMatrix() const = 0;
+    virtual ConnType getNumberOfRowsOfResMatrix() const = 0;
+    virtual ConnType getNumberOfColsOfResMatrix() const = 0;
     virtual ~TargetIntersector() { }
   };
 }
index 6f896d28da9b1e2ac1c51c7c6426df1332e41683..d55c994c98b91cd0cdedec733dd1e3455c601ce7 100644 (file)
@@ -146,7 +146,7 @@ namespace INTERP_KERNEL
 
             const long double delta = MULT_PREC_F * ( std::fabs(term1) + std::fabs(term2) );
          
-            if( epsilonEqual(_doubleProducts[8*seg + dp], 0.0, THRESHOLD_F * delta))
+            if( epsilonEqual(_doubleProducts[8*seg + dp], 0.0, (double)(THRESHOLD_F * delta)))
               {
                 // debug output
 #if LOG_LEVEL >= 5
@@ -485,7 +485,7 @@ namespace INTERP_KERNEL
     const long double delta = MULT_PREC_F * (std::fabs(p_term) + std::fabs(q_term) + std::fabs(r_term));
 #endif
 
-    if( epsilonEqual( p_term + q_term + r_term, 0.0, THRESHOLD_F * delta) )
+    if( epsilonEqual( p_term + q_term + r_term, 0.0, (double)(THRESHOLD_F * delta)) )
       {
         LOG(4, "Reset imprecise triple product for corner " << corner << " to zero" ); 
         return 0.0;
index 5efe430ff659821f08c588c567affe6606c234a4..365cda2cd686fee476645c50ee85d65505e0980d 100644 (file)
@@ -73,7 +73,7 @@ namespace INTERP_KERNEL
                                                 &CoordsS[0],&CoordsS[SPACEDIM*iS],&CoordsS[SPACEDIM*(iS+1)],
                                                 inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
                                                 PlanarIntersector<MyMeshType,MyMatrix>::_precision);
-            ConnType nb_inter=((ConnType)inter.size())/2;
+            ConnType nb_inter=ToConnType(inter.size())/2;
             if(nb_inter >3) inter=reconstruct_polygon(inter);
             for(ConnType i = 1; i<nb_inter-1; i++)
               {
@@ -103,7 +103,7 @@ namespace INTERP_KERNEL
                                                           bool                       isSourceQuad)
   {
     double result = 0.;
-    ConnType nbNodesS=sourceCoords.size()/SPACEDIM;
+    ConnType nbNodesS=ToConnType(sourceCoords.size())/SPACEDIM;
     //Compute the intersection area
     double area[SPACEDIM];
     for(ConnType iT = 1; iT<3; iT++)
@@ -115,7 +115,7 @@ namespace INTERP_KERNEL
                                                 &sourceCoords[0],&sourceCoords[SPACEDIM*iS],&sourceCoords[SPACEDIM*(iS+1)],
                                                 inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
                                                 PlanarIntersector<MyMeshType,MyMatrix>::_precision);
-            ConnType nb_inter=((ConnType)inter.size())/2;
+            ConnType nb_inter=ToConnType(inter.size())/2;
             if(nb_inter >3) inter=reconstruct_polygon(inter);
             for(ConnType i = 1; i<nb_inter-1; i++)
               {
@@ -144,8 +144,8 @@ namespace INTERP_KERNEL
                                                    const std::vector<double>& sourceCoords)
   {
     double result = 0.;
-    ConnType nbNodesS=sourceCoords.size()/SPACEDIM;
-    ConnType nbNodesT=targetCoords.size()/SPACEDIM;
+    ConnType nbNodesS=ToConnType(sourceCoords.size())/SPACEDIM;
+    ConnType nbNodesT=ToConnType(targetCoords.size())/SPACEDIM;
     //Compute the intersection area
     double area[SPACEDIM];
     for(ConnType iT = 1; iT<nbNodesT-1; iT++)
@@ -157,7 +157,7 @@ namespace INTERP_KERNEL
                                                 &sourceCoords[0],&sourceCoords[SPACEDIM*iS],&sourceCoords[SPACEDIM*(iS+1)],
                                                 inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
                                                 PlanarIntersector<MyMeshType,MyMatrix>::_precision);
-            ConnType nb_inter=((ConnType)inter.size())/2;
+            ConnType nb_inter=ToConnType(inter.size())/2;
             if(nb_inter >3) inter=reconstruct_polygon(inter);
             for(ConnType i = 1; i<nb_inter-1; i++)
             {
@@ -194,7 +194,7 @@ namespace INTERP_KERNEL
     double inter_area[SPACEDIM], total_area = 0.;
     double total_barycenter[SPACEDIM]={0.,0.};
 
-    const ConnType nbNodesT=targetCell.size()/SPACEDIM;
+    const ConnType nbNodesT=ToConnType(targetCell.size())/SPACEDIM;
     for(ConnType iT = 1; iT<nbNodesT-1; iT++)
     {
       std::vector<double> inter;
@@ -202,7 +202,7 @@ namespace INTERP_KERNEL
                                           sourceCell[0], sourceCell[1], sourceCell[2],
                                           inter, PlanarIntersector<MyMeshType,MyMatrix>::_dim_caracteristic,
                                           PlanarIntersector<MyMeshType,MyMatrix>::_precision);
-      ConnType nb_inter=((ConnType)inter.size())/2;
+      ConnType nb_inter=ToConnType(inter.size())/2;
       if(nb_inter >3) inter=reconstruct_polygon(inter);
       for(ConnType i = 1; i<nb_inter-1; i++)
       {
index f7269bfcf5d414e9c056685f7689318f501e68d1..ae285138711016e923a511a1caf946637b15786b 100644 (file)
 #include "InterpKernelGeo2DEdgeLin.hxx"
 #include "InterpKernelGeo2DEdgeArcCircle.hxx"
 #include "InterpKernelGeo2DQuadraticPolygon.hxx"
+#include "MCIdType.hxx"
 
 #include <sstream>
 #include <cmath>
 
 namespace INTERP_KERNEL
 {
-  inline void calculateBarycenterDyn(const double **pts, int nbPts,
+  inline void calculateBarycenterDyn(const double **pts, mcIdType nbPts,
                                      int dim, double *bary);
 
-  inline double calculateAreaForPolyg(const double **coords, int nbOfPtsInPolygs,
+  inline double calculateAreaForPolyg(const double **coords, mcIdType nbOfPtsInPolygs,
                                       int spaceDim);
 
 
-  inline double calculateAreaForQPolyg(const double **coords, int nbOfPtsInPolygs,
+  inline double calculateAreaForQPolyg(const double **coords, mcIdType nbOfPtsInPolygs,
                                        int spaceDim);
 
   inline double calculateLgthForSeg2(const double *p1, const double *p2, int spaceDim)
@@ -168,7 +169,7 @@ namespace INTERP_KERNEL
   // ===================================
   // Calculate Normal Vector for Polygon
   // ===================================
-  inline void calculateNormalForPolyg(const double **coords, int nbOfPtsInPolygs,
+  inline void calculateNormalForPolyg(const double **coords, mcIdType nbOfPtsInPolygs,
                                       double *normal)
   {
     double coordOfBary[3];
@@ -203,14 +204,14 @@ namespace INTERP_KERNEL
   // ==========================
   // Calculate Area for Polygon
   // ==========================
-  inline double calculateAreaForPolyg(const double **coords, int nbOfPtsInPolygs,
+  inline double calculateAreaForPolyg(const double **coords, mcIdType nbOfPtsInPolygs,
                                       int spaceDim)
   {
     double ret=0.;
     double coordOfBary[3];
 
     calculateBarycenterDyn(coords,nbOfPtsInPolygs,spaceDim,coordOfBary);
-    for ( int i=0; i<nbOfPtsInPolygs; i++ )
+    for ( mcIdType i=0; i<nbOfPtsInPolygs; i++ )
       {
         double tmp = calculateAreaForTria(coords[i],coords[(i+1)%nbOfPtsInPolygs],
                                           coordOfBary,spaceDim);
@@ -219,7 +220,7 @@ namespace INTERP_KERNEL
     return ret;
   }
 
-  double calculateAreaForQPolyg(const double **coords, int nbOfPtsInPolygs, int spaceDim)
+  double calculateAreaForQPolyg(const double **coords, mcIdType nbOfPtsInPolygs, int spaceDim)
   {
     
     if(nbOfPtsInPolygs%2==0)
@@ -227,7 +228,7 @@ namespace INTERP_KERNEL
         if(spaceDim==2)
           {
             std::vector<Node *> nodes(nbOfPtsInPolygs);
-            for(int i=0;i<nbOfPtsInPolygs;i++)
+            for(mcIdType i=0;i<nbOfPtsInPolygs;i++)
               nodes[i]=new Node(coords[i][0],coords[i][1]);
             QuadraticPolygon *pol=QuadraticPolygon::BuildArcCirclePolygon(nodes);
             double ret=pol->getArea();
@@ -465,14 +466,14 @@ namespace INTERP_KERNEL
    * polyhedron
    */
   template<class ConnType, NumberingPolicy numPol>
-  inline double calculateVolumeForPolyh2(const ConnType *connec, int lgth, const double *coords)
+  inline double calculateVolumeForPolyh2(const ConnType *connec, mcIdType lgth, const double *coords)
   {
     std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1;
     double volume=0.;
-    const int *work=connec;
+    const ConnType *work=connec;
     for(std::size_t iFace=0;iFace<nbOfFaces;iFace++)
       {
-        const int *work2=std::find(work+1,connec+lgth,-1);
+        const ConnType *work2=std::find(work+1,connec+lgth,-1);
         std::size_t nbOfNodesOfCurFace=std::distance(work,work2);
         double areaVector[3]={0.,0.,0.};
         for(std::size_t ptId=0;ptId<nbOfNodesOfCurFace;ptId++)
@@ -496,10 +497,10 @@ namespace INTERP_KERNEL
    * @param res must be of size at least 3 to store the result.
    */
   template<class ConnType, NumberingPolicy numPol>
-  inline void areaVectorOfPolygon(const ConnType *connec, int lgth, const double *coords, double *res)
+  inline void areaVectorOfPolygon(const ConnType *connec, mcIdType lgth, const double *coords, double *res)
   {
     res[0]=0.; res[1]=0.; res[2]=0.;
-    for(int ptId=0;ptId<lgth;ptId++)
+    for(mcIdType ptId=0;ptId<lgth;ptId++)
       {
         const double *pti=coords+3*OTT<ConnType,numPol>::coo2C(connec[ptId]);
         const double *pti1=coords+3*OTT<ConnType,numPol>::coo2C(connec[(ptId+1)%lgth]);
@@ -510,7 +511,7 @@ namespace INTERP_KERNEL
   }
 
   template<class ConnType, NumberingPolicy numPol>
-  inline void computePolygonBarycenter3D(const ConnType *connec, int lgth, const double *coords, double *res)
+  inline void computePolygonBarycenter3D(const ConnType *connec, mcIdType lgth, const double *coords, double *res)
   {
     double area[3];
     areaVectorOfPolygon<ConnType,numPol>(connec,lgth,coords,area);
@@ -519,7 +520,7 @@ namespace INTERP_KERNEL
       {
         area[0]/=norm; area[1]/=norm; area[2]/=norm;
         res[0]=0.; res[1]=0.; res[2]=0.;
-        for(int i=1;i<lgth-1;i++)
+        for(mcIdType i=1;i<lgth-1;i++)
           {
             double v[3];
             double tmpArea[3];
@@ -550,7 +551,7 @@ namespace INTERP_KERNEL
           throw INTERP_KERNEL::Exception("computePolygonBarycenter3D : lgth of polygon is < 1 !");
         norm=0.;
         double v[3];
-        for(int i=0;i<lgth;i++)
+        for(mcIdType i=0;i<lgth;i++)
           {
             v[0]=coords[3*OTT<ConnType,numPol>::coo2C(connec[(i+1)%lgth])]-coords[3*OTT<ConnType,numPol>::coo2C(connec[i])];
             v[1]=coords[3*OTT<ConnType,numPol>::coo2C(connec[(i+1)%lgth])+1]-coords[3*OTT<ConnType,numPol>::coo2C(connec[i])+1];
@@ -569,13 +570,13 @@ namespace INTERP_KERNEL
         else
           {
             res[0]=0.; res[1]=0.; res[2]=0.;
-            for(int i=0;i<lgth;i++)
+            for(mcIdType i=0;i<lgth;i++)
               {
                 res[0]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[i])];
                 res[1]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[i])+1];
                 res[2]+=coords[3*OTT<ConnType,numPol>::coo2C(connec[i])+2];
               }
-            res[0]/=lgth; res[1]/=lgth; res[2]/=lgth;
+            res[0]/=FromIdType<double>(lgth); res[1]/=FromIdType<double>(lgth); res[2]/=FromIdType<double>(lgth);
             return;
           }
       }
@@ -588,14 +589,14 @@ namespace INTERP_KERNEL
   }
 
   template<class ConnType, NumberingPolicy numPol>
-  inline void barycenterOfPolyhedron(const ConnType *connec, int lgth, const double *coords, double *res)
+  inline void barycenterOfPolyhedron(const ConnType *connec, mcIdType lgth, const double *coords, double *res)
   {
     std::size_t nbOfFaces=std::count(connec,connec+lgth,-1)+1;
     res[0]=0.; res[1]=0.; res[2]=0.;
-    const int *work=connec;
+    const ConnType *work=connec;
     for(std::size_t i=0;i<nbOfFaces;i++)
       {
-        const int *work2=std::find(work+1,connec+lgth,-1);
+        const ConnType *work2=std::find(work+1,connec+lgth,-1);
         int nbOfNodesOfCurFace=(int)std::distance(work,work2);
         // projection to (u,v) of each faces of polyh to compute integral(x^2/2) on each faces.
         double normal[3];
@@ -660,7 +661,7 @@ namespace INTERP_KERNEL
         work=connec;
         for(std::size_t i=0;i<nbOfFaces;i++)
           {
-            const int *work2=std::find(work+1,connec+lgth,-1);
+            const ConnType *work2=std::find(work+1,connec+lgth,-1);
             int nbOfNodesOfCurFace=(int)std::distance(work,work2);
             double normal[3];
             areaVectorOfPolygon<ConnType,numPol>(work,nbOfNodesOfCurFace,coords,normal);
@@ -755,39 +756,39 @@ namespace INTERP_KERNEL
   {
   }
 
-  inline void calculateBarycenterDyn(const double **pts, int nbPts,
+  inline void calculateBarycenterDyn(const double **pts, mcIdType nbPts,
                                      int dim, double *bary)
   {
     for(int i=0;i<dim;i++)
       {
         double temp=0.;
-        for(int j=0;j<nbPts;j++)
+        for(mcIdType j=0;j<nbPts;j++)
           {
             temp+=pts[j][i];
           }
-        bary[i]=temp/nbPts;
+        bary[i]=temp/FromIdType<double>(nbPts);
       }
   }
 
   template<int SPACEDIM>
-  inline void calculateBarycenterDyn2(const double *pts, int nbPts, double *bary)
+  inline void calculateBarycenterDyn2(const double *pts, mcIdType nbPts, double *bary)
   {
     for(int i=0;i<SPACEDIM;i++)
       {
         double temp=0.;
-        for(int j=0;j<nbPts;j++)
+        for(mcIdType j=0;j<nbPts;j++)
           {
             temp+=pts[j*SPACEDIM+i];
           }
-        bary[i]=temp/nbPts;
+        bary[i]=temp/FromIdType<double>(nbPts);
       }
   }
 
-  inline void computePolygonBarycenter2DEngine(double **coords, int lgth, double *res)
+  inline void computePolygonBarycenter2DEngine(double **coords, mcIdType lgth, double *res)
   {
     double area=0.;
     res[0]=0.; res[1]=0.;
-    for(int i=0;i<lgth;i++)
+    for(mcIdType i=0;i<lgth;i++)
       {
         double cp=coords[i][0]*coords[(i+1)%lgth][1]-coords[i][1]*coords[(i+1)%lgth][0];
         area+=cp;
@@ -799,23 +800,23 @@ namespace INTERP_KERNEL
   }
 
   template<class ConnType, NumberingPolicy numPol>
-  inline void computePolygonBarycenter2D(const ConnType *connec, int lgth, const double *coords, double *res)
+  inline void computePolygonBarycenter2D(const ConnType *connec, mcIdType lgth, const double *coords, double *res)
   {
     double **coords2=new double *[lgth];
-    for(int i=0;i<lgth;i++)
+    for(mcIdType i=0;i<lgth;i++)
       coords2[i]=const_cast<double *>(coords+2*OTT<ConnType,numPol>::coo2C(connec[i]));
     computePolygonBarycenter2DEngine(coords2,lgth,res);
     delete [] coords2;
   }
   
-  inline void computeQPolygonBarycenter2D(double **coords, int nbOfPtsInPolygs, int spaceDim, double *res)
+  inline void computeQPolygonBarycenter2D(double **coords, mcIdType nbOfPtsInPolygs, int spaceDim, double *res)
   {
     if(nbOfPtsInPolygs%2==0)
       {
         if(spaceDim==2)
           {
             std::vector<Node *> nodes(nbOfPtsInPolygs);
-            for(int i=0;i<nbOfPtsInPolygs;i++)
+            for(mcIdType i=0;i<nbOfPtsInPolygs;i++)
               nodes[i]=new Node(coords[i][0],coords[i][1]);
             QuadraticPolygon *pol=QuadraticPolygon::BuildArcCirclePolygon(nodes);
             pol->getBarycenter(res);
index 853e3226d116a3e072459b82e9bb29041862d1af..c8b01fd08db711c83b1bf2cd21f22908bc72b1b6 100644 (file)
@@ -212,7 +212,7 @@ namespace INTERP_KERNEL
     return sqrt(sDist);
   }
 
-  double DistanceFromPtToPolygonInSpaceDim3(const double *pt, const int *connOfPolygonBg, const int *connOfPolygonEnd, const double *coords)
+  double DistanceFromPtToPolygonInSpaceDim3(const double *pt, const mcIdType *connOfPolygonBg, const mcIdType *connOfPolygonEnd, const double *coords)
   {
     std::size_t nbOfEdges=std::distance(connOfPolygonBg,connOfPolygonEnd);
     if(nbOfEdges<3)
index 03562790eacc37491c3572869b15026558b16d1c..e3755034452a8df73de7dacbee8512d7fd91be99 100644 (file)
 #include "INTERPKERNELDefines.hxx"
 #include "InterpKernelException.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
+#include "MCIdType.hxx"
 
 namespace INTERP_KERNEL
 {
   template<class ConnType, NumberingPolicy numPolConn, int SPACEDIM>
-  double computeVolSurfOfCell(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords);
+  double computeVolSurfOfCell(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords);
 
   template<class ConnType, NumberingPolicy numPolConn>
-  double computeVolSurfOfCell2(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim);
+  double computeVolSurfOfCell2(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, int spaceDim);
 
   template<class ConnType, NumberingPolicy numPolConn, int SPACEDIM>
-  void computeBarycenter(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, double *res);
+  void computeBarycenter(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, double *res);
 
   template<class ConnType, NumberingPolicy numPolConn>
-  void computeBarycenter2(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim, double *res);
+  void computeBarycenter2(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, int spaceDim, double *res);
 
   double INTERPKERNEL_EXPORT OrthoDistanceFromPtToPlaneInSpaceDim3(const double *p, const double *p1, const double *p2, const double *p3);
 
@@ -45,7 +46,7 @@ namespace INTERP_KERNEL
 
   double INTERPKERNEL_EXPORT DistanceFromPtToTriInSpaceDim3(const double *pt, const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3);
 
-  double INTERPKERNEL_EXPORT DistanceFromPtToPolygonInSpaceDim3(const double *pt, const int *connOfPolygonBg, const int *connOfPolygonEnd, const double *coords);
+  double INTERPKERNEL_EXPORT DistanceFromPtToPolygonInSpaceDim3(const double *pt, const mcIdType *connOfPolygonBg, const mcIdType *connOfPolygonEnd, const double *coords);
 
   bool ComputeRotTranslationMatrixToPut3PointsOnOXY(const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3, double *matrix);
 }
index cdcc00c1c42980169937a72162b5535afe07a723..6e15126030f05eab24de16f8e477892ae6790309 100644 (file)
 namespace INTERP_KERNEL
 {
   template<class ConnType, NumberingPolicy numPol, int SPACEDIM>
-  double computeVolSurfOfCell(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords)
+  double computeVolSurfOfCell(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords)
   {
     switch(type)
       {
       case INTERP_KERNEL::NORM_SEG2 :
       case INTERP_KERNEL::NORM_SEG4 :
         {
-          int N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
           return INTERP_KERNEL::calculateLgthForSeg2(coords+(SPACEDIM*N1),coords+(SPACEDIM*N2),SPACEDIM);
         }
       case INTERP_KERNEL::NORM_SEG3 :
         {
-          int beginNode = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int endNode = OTT<ConnType,numPol>::coo2C(connec[1]);
-          int middleNode = OTT<ConnType,numPol>::coo2C(connec[2]);
+          ConnType beginNode = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType endNode = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType middleNode = OTT<ConnType,numPol>::coo2C(connec[2]);
           return INTERP_KERNEL::calculateLgthForSeg3(coords+(SPACEDIM*beginNode),coords+(SPACEDIM*endNode),coords+(SPACEDIM*middleNode),SPACEDIM);
         }
       case INTERP_KERNEL::NORM_TRI3 :
         {
-          int N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
-          int N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
+          ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
               
           return INTERP_KERNEL::calculateAreaForTria(coords+(SPACEDIM*N1),
                                                      coords+(SPACEDIM*N2),
@@ -75,10 +75,10 @@ namespace INTERP_KERNEL
         break;
       case INTERP_KERNEL::NORM_QUAD4 :
         {
-          int N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
-          int N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
-          int N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
+          ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
+          ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
               
           return INTERP_KERNEL::calculateAreaForQuad(coords+SPACEDIM*N1,
                                                      coords+SPACEDIM*N2,
@@ -125,10 +125,10 @@ namespace INTERP_KERNEL
       case INTERP_KERNEL::NORM_TETRA4 :
       case INTERP_KERNEL::NORM_TETRA10 :
         {
-          int N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
-          int N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
-          int N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
+          ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
+          ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
               
           return INTERP_KERNEL::calculateVolumeForTetra(coords+SPACEDIM*N1,
                                                         coords+SPACEDIM*N2,
@@ -140,11 +140,11 @@ namespace INTERP_KERNEL
       case INTERP_KERNEL::NORM_PYRA5 :
       case INTERP_KERNEL::NORM_PYRA13 :
         {
-          int N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
-          int N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
-          int N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
-          int N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
+          ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
+          ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
+          ConnType N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
               
           return INTERP_KERNEL::calculateVolumeForPyra(coords+SPACEDIM*N1,
                                                        coords+SPACEDIM*N2,
@@ -158,12 +158,12 @@ namespace INTERP_KERNEL
       case INTERP_KERNEL::NORM_PENTA15 :
       case INTERP_KERNEL::NORM_PENTA18 :
         {
-          int N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
-          int N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
-          int N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
-          int N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
-          int N6 = OTT<ConnType,numPol>::coo2C(connec[5]);
+          ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
+          ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
+          ConnType N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
+          ConnType N6 = OTT<ConnType,numPol>::coo2C(connec[5]);
               
           return INTERP_KERNEL::calculateVolumeForPenta(coords+SPACEDIM*N1,
                                                         coords+SPACEDIM*N2,
@@ -178,14 +178,14 @@ namespace INTERP_KERNEL
       case INTERP_KERNEL::NORM_HEXA20 :
       case INTERP_KERNEL::NORM_HEXA27 :
         {
-          int N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
-          int N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
-          int N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
-          int N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
-          int N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
-          int N6 = OTT<ConnType,numPol>::coo2C(connec[5]);
-          int N7 = OTT<ConnType,numPol>::coo2C(connec[6]);
-          int N8 = OTT<ConnType,numPol>::coo2C(connec[7]);
+          ConnType N1 = OTT<ConnType,numPol>::coo2C(connec[0]);
+          ConnType N2 = OTT<ConnType,numPol>::coo2C(connec[1]);
+          ConnType N3 = OTT<ConnType,numPol>::coo2C(connec[2]);
+          ConnType N4 = OTT<ConnType,numPol>::coo2C(connec[3]);
+          ConnType N5 = OTT<ConnType,numPol>::coo2C(connec[4]);
+          ConnType N6 = OTT<ConnType,numPol>::coo2C(connec[5]);
+          ConnType N7 = OTT<ConnType,numPol>::coo2C(connec[6]);
+          ConnType N8 = OTT<ConnType,numPol>::coo2C(connec[7]);
               
           return INTERP_KERNEL::calculateVolumeForHexa(coords+SPACEDIM*N1,
                                                        coords+SPACEDIM*N2,
@@ -199,7 +199,7 @@ namespace INTERP_KERNEL
         break;
       case INTERP_KERNEL::NORM_HEXGP12:
         {
-          const int connecHexa12[43]={
+          const ConnType connecHexa12[43]={
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
             OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[7]),-1,
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[1]),-1,
@@ -221,7 +221,7 @@ namespace INTERP_KERNEL
   }
 
   template<class ConnType, NumberingPolicy numPolConn>
-  double computeVolSurfOfCell2(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim)
+  double computeVolSurfOfCell2(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, int spaceDim)
   {
     if(spaceDim==3)
       return computeVolSurfOfCell<ConnType,numPolConn,3>(type,connec,lgth,coords);
@@ -234,7 +234,7 @@ namespace INTERP_KERNEL
 
 
   template<class ConnType, NumberingPolicy numPol,int SPACEDIM>
-  void computeBarycenter(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, double *res)
+  void computeBarycenter(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, double *res)
   {
     switch(type)
       {
@@ -376,7 +376,7 @@ namespace INTERP_KERNEL
         }
       case NORM_HEXA8:
         {
-          const int conn[29]={
+          const ConnType conn[29]={
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[3]),-1,
             OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[4]),-1,
@@ -389,7 +389,7 @@ namespace INTERP_KERNEL
         }
       case NORM_PENTA6:
         {
-          const int conn[22]={
+          const ConnType conn[22]={
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),-1,
             OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[4]),-1,
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[5]),OTT<ConnType,numPol>::coo2C(connec[3]),-1,
@@ -401,7 +401,7 @@ namespace INTERP_KERNEL
         }
       case INTERP_KERNEL::NORM_HEXGP12:
         {
-          const int connecHexa12[43]={
+          const ConnType connecHexa12[43]={
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[1]),OTT<ConnType,numPol>::coo2C(connec[2]),OTT<ConnType,numPol>::coo2C(connec[3]),OTT<ConnType,numPol>::coo2C(connec[4]),OTT<ConnType,numPol>::coo2C(connec[5]),-1,
             OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[11]),OTT<ConnType,numPol>::coo2C(connec[10]),OTT<ConnType,numPol>::coo2C(connec[9]),OTT<ConnType,numPol>::coo2C(connec[8]),OTT<ConnType,numPol>::coo2C(connec[7]),-1,
             OTT<ConnType,numPol>::coo2C(connec[0]),OTT<ConnType,numPol>::coo2C(connec[6]),OTT<ConnType,numPol>::coo2C(connec[7]),OTT<ConnType,numPol>::coo2C(connec[1]),-1,
@@ -424,7 +424,7 @@ namespace INTERP_KERNEL
   }
 
   template<class ConnType, NumberingPolicy numPolConn>
-  void computeBarycenter2(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim, double *res)
+  void computeBarycenter2(NormalizedCellType type, const ConnType *connec, mcIdType lgth, const double *coords, int spaceDim, double *res)
   {
     if(spaceDim==3)
       return computeBarycenter<ConnType,numPolConn,3>(type,connec,lgth,coords,res);
index 0c57c80ba1b7020e713b46430426da2c6a08900d..1e7966b959c01c4b591b613cd84dc7fc3beb4520 100644 (file)
@@ -59,12 +59,12 @@ namespace INTERP_TEST
     bool checkDequesEqual(std::deque< double > deque1,  
                           std::deque< double > deque2, double epsilon)
     {
-      int size1 = deque1.size();
-      int size2 = deque2.size();
+      std::size_t size1 = deque1.size();
+      std::size_t size2 = deque2.size();
       bool are_equal = size1 == size2;
     
       if(are_equal)
-        for(int i = 0; i < size1 && are_equal; i++)
+        for(std::size_t i = 0; i < size1 && are_equal; i++)
           are_equal = fabs(deque1[i] - deque2[i]) < epsilon;
       
       return are_equal; 
@@ -72,19 +72,19 @@ namespace INTERP_TEST
     bool checkVectorsEqual(std::vector< double > vect1,  
                            std::vector< double > vect2, double epsilon)
     {
-      int size1 = vect1.size();
-      int size2 = vect2.size();
+      std::size_t size1 = vect1.size();
+      std::size_t size2 = vect2.size();
       bool are_equal = size1 == size2;
       
       if(are_equal)
-        for(int i = 0; i < size1 && are_equal; i++)
+        for(std::size_t i = 0; i < size1 && are_equal; i++)
           are_equal = fabs(vect1[i] - vect2[i]) < epsilon;
       
       return are_equal; 
     }
     void dequePrintOut(std::deque< double > deque1)
     {
-      for(int i = 0; i< (int)deque1.size(); i++)
+      for(std::size_t i = 0; i< deque1.size(); i++)
         {
           std::cerr << deque1[i] << " ";
         }
@@ -92,7 +92,7 @@ namespace INTERP_TEST
     }
     void vectPrintOut(std::vector< double > vect)
     {
-      for(int i = 0; i< (int)vect.size(); i++)
+      for(std::size_t i = 0; i< vect.size(); i++)
         {
           std::cerr << vect[i] << " ";
         }
index 39ab79a98d20a0a710e9012988a56deb0df8e3d2..ff4cc7be2d77f6c3f0d55e8eb4bb0b79646449e1 100644 (file)
@@ -29,7 +29,7 @@
 
 #define ERR_TOL 1.0e-8
 
-typedef std::vector<std::map<int,double> > IntersectionMatrix;
+typedef std::vector<std::map<mcIdType,double> > IntersectionMatrix;
 
 namespace INTERP_KERNEL
 {
index b2e695a722356165b0a2707545e75ce2f203416b..f934c1e8aced7a8fb29a2304ee76ef53d4517d34 100644 (file)
@@ -70,7 +70,7 @@ namespace INTERP_TEST
       {
         if(iter->count(i) != 0.0)
           {
-            std::map<int, double>::const_iterator iter2 = iter->find(i);
+            std::map<mcIdType, double>::const_iterator iter2 = iter->find(i);
             vol += fabs(iter2->second);
           }
       }
@@ -89,8 +89,8 @@ namespace INTERP_TEST
   double MeshTestToolkit<SPACEDIM,MESHDIM>::sumCol(const IntersectionMatrix& m, int i) const
   {
     double vol = 0.0;
-    const std::map<int, double>& col = m[i];
-    for(std::map<int, double>::const_iterator iter = col.begin() ; iter != col.end() ; ++iter)
+    const std::map<mcIdType, double>& col = m[i];
+    for(std::map<mcIdType, double>::const_iterator iter = col.begin() ; iter != col.end() ; ++iter)
       {
         vol += fabs(iter->second);
       }
@@ -123,7 +123,7 @@ namespace INTERP_TEST
     std::vector<double> volumes;
     for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter)
       {
-        for(std::map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
+        for(std::map<mcIdType, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
           {
             volumes.push_back(fabs(iter2->second));
           }
@@ -203,9 +203,9 @@ namespace INTERP_TEST
     int i = 0;
     for(IntersectionMatrix::const_iterator iter = m1.begin() ; iter != m1.end() ; ++iter)
       {
-        for(std::map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
+        for(std::map<mcIdType, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
           {
-            int j = iter2->first;
+            mcIdType j = iter2->first;
             if(m2.at(j).count(i) == 0)
               {
                 if(!epsilonEqual(iter2->second, 0.0, _precision))
@@ -245,13 +245,13 @@ namespace INTERP_TEST
 
     for(IntersectionMatrix::const_iterator iter = m1.begin() ; iter != m1.end() ; ++iter)
       {
-        for(std::map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
+        for(std::map<mcIdType, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
           {
-            int j = iter2->first;
+            mcIdType j = iter2->first;
             const double v1 = fabs(iter2->second);
             //if(m2[j - 1].count(i+1) > 0)
             //  {
-            std::map<int, double> theMap =  m2.at(j);
+            std::map<mcIdType, double> theMap =  m2.at(j);
             const double v2 = fabs(theMap[i]);
             if(v1 != v2)
               {
@@ -287,9 +287,9 @@ namespace INTERP_TEST
     bool isDiagonal = true;
     for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter)
       {
-        for(std::map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
+        for(std::map<mcIdType, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
           {
-            int j = iter2->first;
+            mcIdType j = iter2->first;
             const double vol = iter2->second;
             if(vol != 0.0 && (i != j))
               {
@@ -322,7 +322,7 @@ namespace INTERP_TEST
     std::cout << "Intersection matrix is " << std::endl;
     for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter)
       {
-        for(std::map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
+        for(std::map<mcIdType, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
           {
             std::cout << "V(" << i << ", " << iter2->first << ") = " << iter2->second << std::endl;
           }
index 1d78aaf91e46a25e9fef1c96149f1f2ec5a35b8f..2b76b4eaf259c021037ad27384c4c79e2ed7055a 100644 (file)
@@ -106,7 +106,7 @@ namespace INTERP_TEST
       for(IntersectionMatrix::const_iterator iter = m.begin() ; iter != m.end() ; ++iter)
         {
           numElems += iter->size();
-          for(std::map<int, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
+          for(std::map<mcIdType, double>::const_iterator iter2 = iter->begin() ; iter2 != iter->end() ; ++iter2)
             {
               if(!INTERP_KERNEL::epsilonEqual(iter2->second, 0.0, VOL_PREC))
                 {
index 2b0443eb22348d4622b13910f67e2024ba60a65f..c647bf1f7fc38ec9d1b6dc65caecdaeeb61353f2 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "ThreeDSurfProjectionTest.hxx"
 #include "PlanarIntersector.txx"
+#include "MCIdType.hxx"
 
 class MyMeshType
 {
@@ -26,7 +27,7 @@ public:
   static const int MY_SPACEDIM=3;
   static const int MY_MESHDIM=3;
   static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE;
-  typedef int MyConnType;
+  typedef mcIdType MyConnType;
 };
 
 class MyMatrixType
index 98bd5e21a371ca8f6e596cbe6ad0a35e2effe9c4..c58578451028143204d95b1b724a11b6d7ab4d08 100644 (file)
@@ -22,6 +22,7 @@
 #include "TetraAffineTransform.hxx"
 #include "InterpolationUtils.hxx"
 #include "SplitterTetra.txx"
+#include "MCIdType.hxx"
 
 #include <iostream>
 
@@ -31,13 +32,13 @@ namespace INTERP_TEST
 {
   struct __MESH_DUMMY
   {
-    typedef int MyConnType;
+    typedef mcIdType MyConnType;
     static const int MY_SPACEDIM=3;
   };
 
   static SplitterTetra<__MESH_DUMMY>* buildSplitterTetra()
   {
-    const int conn[4] = { 0,1,2,3 };
+    const mcIdType conn[4] = { 0,1,2,3 };
 
     const double targetCoords[] = { -20., 0.,10.,
                                     -20.,10.,10.,
@@ -53,7 +54,7 @@ namespace INTERP_TEST
 
   void UnitTetra3D2DIntersectionTest::test_UnitTetra3D2DIntersection_1()
   {
-    const int conn[4] = { 0,1,2 };
+    const mcIdType conn[4] = { 0,1,2 };
 
     const double sourceCoords[] = { -20., 0., 10.,
                                     -12., 0., 10.,
@@ -98,7 +99,7 @@ namespace INTERP_TEST
 
   void UnitTetra3D2DIntersectionTest::test_UnitTetra3D2DIntersection_2()
   {
-    const int conn[4] = { 0,1,2,3 };
+    const mcIdType conn[4] = { 0,1,2,3 };
 
     const double sourceCoords[] = { -20., 0., 10.,
                                     -12., 0., 10.,
@@ -144,7 +145,7 @@ namespace INTERP_TEST
 
   void UnitTetra3D2DIntersectionTest::test_UnitTetra3D2DIntersection_3()
   {
-    const int conn[4] = { 0,1,2 };
+    const mcIdType conn[4] = { 0,1,2 };
 
     const double sourceCoords[] = { -20., 0., 16.,
                                     -18., 0., 16.,
index 0b1df04a08e60f0dff9adbf19536b4c424703138..e1afe231ea2c8fb3e19176bdb35019bfb31efb90 100644 (file)
@@ -27,6 +27,7 @@
 #include "TetraAffineTransform.hxx"
 #include "InterpolationUtils.hxx"
 #include "SplitterTetra.txx"
+#include "MCIdType.hxx"
 
 #include <iostream>
 
@@ -271,7 +272,7 @@ namespace INTERP_TEST
 
   struct __MESH_DUMMY
   {
-    typedef int MyConnType;
+    typedef mcIdType MyConnType;
   };
 
   void UnitTetraIntersectionBaryTest::test_UnitTetraIntersectionBary_13()
@@ -288,7 +289,7 @@ namespace INTERP_TEST
       75,150,75,
       100,100,100};
 
-    int conn[4] = { 0,1,2,3 };
+    mcIdType conn[4] = { 0,1,2,3 };
     
     const double* tnodes[4]={ T, T+3, T+6, T+9 };
     const double* snodes[4]={ S, S+3, S+6, S+9 };
index 04e0b5b3ec88ab787468611b8b042fb70963ed49..a2253b26689963803f466fe27d4b59353fd227a2 100644 (file)
@@ -25,6 +25,10 @@ ENDIF(MEDCOUPLING_BUILD_TESTS)
 ### KILLER WARNINGS TO HELP INT64 MANAGEMENT
 #ADD_DEFINITIONS(-Wextra -Wsynth -Wno-unused-parameter -pedantic -Wall -Wshadow  -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreturn-type  -Wno-endif-labels  -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wlong-long -Wdisabled-optimization -Wunknown-pragmas -Wundef  -Wreorder)
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_BINARY_DIR}/../..
   ${CMAKE_CURRENT_SOURCE_DIR}
index abc049dd124216eb022b5a2beb38b494136ba626..32a82b7092db2cf455d86f3127cc1f3a3ed136ab 100644 (file)
 #ifndef __MEDCOUPLING_MCTYPE_HXX__
 #define __MEDCOUPLING_MCTYPE_HXX__
 
+#include "MCIdType.hxx"
+
 #include <cstdint>
 #include <stddef.h>
 #include <cstddef>
 
 namespace MEDCoupling
 {
+  using mcIdType = ::mcIdType;
   using Int64 = std::int64_t;
   using Int32 = std::int32_t;
+
+  class DataArrayInt32;
+  class DataArrayInt32Iterator;
+  class DataArrayInt32Tuple;
+  class DataArrayInt64;
+  class DataArrayInt64Tuple;
+
 #ifndef MEDCOUPLING_USE_64BIT_IDS
-  using mcIdType = std::int32_t;
+
+#define DataArrayIdType DataArrayInt32
+#define DataArrayIdTypeTuple DataArrayInt32Tuple
+
 #else
-  using mcIdType = std::int64_t;
+
+#define DataArrayIdType DataArrayInt64
+#define DataArrayIdTypeTuple DataArrayInt64Tuple
+
 #endif
-  inline mcIdType ToIdType(std::size_t val) { return mcIdType(val); }
-}
 
 #define DataArrayInt DataArrayInt32
-#define DataArrayIdType DataArrayInt32
-
 #define DataArrayIntIterator DataArrayInt32Iterator
+}
 
 #endif
index 074ec79873bfeaccb6ace255602c90744c0b8289..80eb49f990e119adc76c433bb8faac952150c863 100644 (file)
@@ -94,9 +94,9 @@ int MEDCoupling1GTUMesh::getMeshDimension() const
  * \param [in] type the geometric type
  * \return cell ids in this having geometric type \a type.
  */
-DataArrayInt *MEDCoupling1GTUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+DataArrayIdType *MEDCoupling1GTUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   if(type==getCellModelEnum())
     ret->alloc(getNumberOfCells(),1);
   else
@@ -108,7 +108,7 @@ DataArrayInt *MEDCoupling1GTUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCe
 /*!
  * Returns nb of cells having the geometric type \a type. No throw if no cells in \a this has the geometric type \a type.
  */
-std::size_t MEDCoupling1GTUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+mcIdType MEDCoupling1GTUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
   return type==getCellModelEnum()?getNumberOfCells():0;
 }
@@ -119,7 +119,7 @@ std::size_t MEDCoupling1GTUMesh::getNumberOfCellsWithType(INTERP_KERNEL::Normali
  *  \return INTERP_KERNEL::NormalizedCellType - enumeration item describing the cell type.
  *  \throw If \a cellId is invalid. Valid range is [0, \a this->getNumberOfCells() ).
  */
-INTERP_KERNEL::NormalizedCellType MEDCoupling1GTUMesh::getTypeOfCell(std::size_t cellId) const
+INTERP_KERNEL::NormalizedCellType MEDCoupling1GTUMesh::getTypeOfCell(mcIdType cellId) const
 {
   if(cellId<getNumberOfCells())
     return getCellModelEnum();
@@ -147,10 +147,10 @@ std::set<INTERP_KERNEL::NormalizedCellType> MEDCoupling1GTUMesh::getAllGeoTypes(
  * For every k in [0,n] ret[3*k+2]==-1 because it has no sense here. 
  * This parameter is kept only for compatibility with other method listed above.
  */
-std::vector<int> MEDCoupling1GTUMesh::getDistributionOfTypes() const
+std::vector<mcIdType> MEDCoupling1GTUMesh::getDistributionOfTypes() const
 {
-  std::vector<int> ret(3);
-  ret[0]=(int)getCellModelEnum(); ret[1]=getNumberOfCells(); ret[2]=-1;
+  std::vector<mcIdType> ret(3);
+  ret[0]=ToIdType(getCellModelEnum()); ret[1]=getNumberOfCells(); ret[2]=-1;
   return ret;
 }
 
@@ -178,28 +178,28 @@ std::vector<int> MEDCoupling1GTUMesh::getDistributionOfTypes() const
  *          - After \a code contains [NORM_...,nbCells,0], \a idsInPflPerType [[0,1]] and \a idsPerType is [[1,2]] <br>
 
  */
-void MEDCoupling1GTUMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller) const
+void MEDCoupling1GTUMesh::splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller) const
 {
   if(!profile)
     throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::splitProfilePerType : input profile is NULL !");
   if(profile->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::splitProfilePerType : input profile should have exactly one component !");
-  int nbTuples(profile->getNumberOfTuples()),nbOfCells(getNumberOfCells());
+  mcIdType nbTuples=profile->getNumberOfTuples(),nbOfCells=getNumberOfCells();
   code.resize(3); idsInPflPerType.resize(1);
-  code[0]=(int)getCellModelEnum(); code[1]=nbTuples;
+  code[0]=ToIdType(getCellModelEnum()); code[1]=nbTuples;
   idsInPflPerType.resize(1);
   if(smartPflKiller && profile->isIota(nbOfCells))
     {
       code[2]=-1;
-      idsInPflPerType[0]=const_cast<DataArrayInt *>(profile); idsInPflPerType[0]->incrRef();
+      idsInPflPerType[0]=const_cast<DataArrayIdType *>(profile); idsInPflPerType[0]->incrRef();
       idsPerType.clear();
       return ;
     }
   code[2]=0;
   profile->checkAllIdsInRange(0,nbOfCells);
   idsPerType.resize(1);
-  idsPerType[0]=const_cast<DataArrayInt *>(profile); idsPerType[0]->incrRef();
-  idsInPflPerType[0]=DataArrayInt::Range(0,nbTuples,1);
+  idsPerType[0]=const_cast<DataArrayIdType *>(profile); idsPerType[0]->incrRef();
+  idsInPflPerType[0]=DataArrayIdType::Range(0,nbTuples,1);
 }
 
 /*!
@@ -208,12 +208,12 @@ void MEDCoupling1GTUMesh::splitProfilePerType(const DataArrayInt *profile, std::
  * 
  * \sa MEDCouplingUMesh::checkTypeConsistencyAndContig
  */
-DataArrayInt *MEDCoupling1GTUMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+DataArrayIdType *MEDCoupling1GTUMesh::checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(code.size()!=3)
     throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : invalid input code should be exactly of size 3 !");
-  if(code[0]!=(int)getCellModelEnum())
+  if(code[0]!=ToIdType(getCellModelEnum()))
     {
       std::ostringstream oss; oss << "MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : Mismatch of geometric type ! Asking for " << code[0] << " whereas the geometric type is \a this is " << getCellModelEnum() << " (" << _cm->getRepr() << ") !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -231,15 +231,15 @@ DataArrayInt *MEDCoupling1GTUMesh::checkTypeConsistencyAndContig(const std::vect
   if(code[2]!=0)
     throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : single geo type mesh ! 0 or -1 is expected at pos #2 of input code !");
   if(idsPerType.size()!=1)
-    throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : input code points to DataArrayInt #0 whereas the size of idsPerType is not equal to 1 !");
-  const DataArrayInt *pfl=idsPerType[0];
+    throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : input code points to DataArrayIdType #0 whereas the size of idsPerType is not equal to 1 !");
+  const DataArrayIdType *pfl=idsPerType[0];
   if(!pfl)
-    throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : the input code points to a NULL DataArrayInt at rank 0 !");
+    throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : the input code points to a NULL DataArrayIdType at rank 0 !");
   if(pfl->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::checkTypeConsistencyAndContig : input profile should have exactly one component !");
   pfl->checkAllIdsInRange(0,nbOfCells);
   pfl->incrRef();
-  return const_cast<DataArrayInt *>(pfl);
+  return const_cast<DataArrayIdType *>(pfl);
 }
 
 void MEDCoupling1GTUMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const
@@ -328,7 +328,7 @@ MEDCouplingFieldDouble *MEDCoupling1GTUMesh::getMeasureFieldOnNode(bool isAbs) c
 /*!
  * to improve perf !
  */
-int MEDCoupling1GTUMesh::getCellContainingPoint(const double *pos, double eps) const
+mcIdType MEDCoupling1GTUMesh::getCellContainingPoint(const double *pos, double eps) const
 {
   MCAuto<MEDCouplingUMesh> m(buildUnstructured());
   return m->getCellContainingPoint(pos,eps);
@@ -337,7 +337,7 @@ int MEDCoupling1GTUMesh::getCellContainingPoint(const double *pos, double eps) c
 /*!
  * to improve perf !
  */
-void MEDCoupling1GTUMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const
+void MEDCoupling1GTUMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const
 {
   MCAuto<MEDCouplingUMesh> m(buildUnstructured());
   return m->getCellsContainingPoint(pos,eps,elts);
@@ -351,25 +351,25 @@ MEDCouplingFieldDouble *MEDCoupling1GTUMesh::buildOrthogonalField() const
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1GTUMesh::getCellsInBoundingBox(const double *bbox, double eps) const
+DataArrayIdType *MEDCoupling1GTUMesh::getCellsInBoundingBox(const double *bbox, double eps) const
 {
   MCAuto<MEDCouplingUMesh> m=buildUnstructured();
   return m->getCellsInBoundingBox(bbox,eps);
 }
 
-DataArrayInt *MEDCoupling1GTUMesh::getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps)
+DataArrayIdType *MEDCoupling1GTUMesh::getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps)
 {
   MCAuto<MEDCouplingUMesh> m=buildUnstructured();
   return m->getCellsInBoundingBox(bbox,eps);
 }
 
-MEDCouplingPointSet *MEDCoupling1GTUMesh::buildFacePartOfMySelfNode(const int *start, const int *end, bool fullyIn) const
+MEDCouplingPointSet *MEDCoupling1GTUMesh::buildFacePartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const
 {
   MCAuto<MEDCouplingUMesh> m=buildUnstructured();
   return m->buildFacePartOfMySelfNode(start,end,fullyIn);
 }
 
-DataArrayInt *MEDCoupling1GTUMesh::findBoundaryNodes() const
+DataArrayIdType *MEDCoupling1GTUMesh::findBoundaryNodes() const
 {
   MCAuto<MEDCouplingUMesh> m=buildUnstructured();
   return m->findBoundaryNodes();
@@ -381,15 +381,15 @@ MEDCouplingPointSet *MEDCoupling1GTUMesh::buildBoundaryMesh(bool keepCoords) con
   return m->buildBoundaryMesh(keepCoords);
 }
 
-void MEDCoupling1GTUMesh::findCommonCells(int compType, int startCellId, DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr) const
+void MEDCoupling1GTUMesh::findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const
 {
   MCAuto<MEDCouplingUMesh> m=buildUnstructured();
   m->findCommonCells(compType,startCellId,commonCellsArr,commonCellsIArr);
 }
 
-std::size_t MEDCoupling1GTUMesh::getNodalConnectivityLength() const
+mcIdType MEDCoupling1GTUMesh::getNodalConnectivityLength() const
 {
-  const DataArrayInt *c1(getNodalConnectivity());
+  const DataArrayIdType *c1(getNodalConnectivity());
   if(!c1)
     throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::getNodalConnectivityLength : no connectivity set !");
   if(c1->getNumberOfComponents()!=1)
@@ -423,7 +423,7 @@ MEDCouplingUMesh *MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(const std::v
   int meshDim(firstPart->getMeshDimension());
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::New(firstPart->getName(),meshDim)); ret->setDescription(firstPart->getDescription());
   ret->setCoords(coords);
-  int nbOfCells(0),connSize(0);
+  mcIdType nbOfCells(0),connSize(0);
   for(std::vector< const MEDCoupling1GTUMesh *>::const_iterator it=parts.begin();it!=parts.end();it++)
     {
       if(!(*it))
@@ -435,19 +435,19 @@ MEDCouplingUMesh *MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(const std::v
       nbOfCells+=(*it)->getNumberOfCells();
       connSize+=(*it)->getNodalConnectivityLength();
     }
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()),connI(DataArrayIdType::New());
   connI->alloc(nbOfCells+1,1); conn->alloc(connSize+nbOfCells,1);
-  int *c(conn->getPointer()),*ci(connI->getPointer()); *ci=0;
+  mcIdType *c(conn->getPointer()),*ci(connI->getPointer()); *ci=0;
   for(std::vector< const MEDCoupling1GTUMesh *>::const_iterator it=parts.begin();it!=parts.end();it++)
     {
-      int curNbCells((*it)->getNumberOfCells());
-      int geoType((int)(*it)->getCellModelEnum());
-      const int *cinPtr((*it)->getNodalConnectivity()->begin());
+      mcIdType curNbCells=(*it)->getNumberOfCells();
+      mcIdType geoType(ToIdType((*it)->getCellModelEnum()));
+      const mcIdType *cinPtr((*it)->getNodalConnectivity()->begin());
       const MEDCoupling1SGTUMesh *ps(dynamic_cast<const MEDCoupling1SGTUMesh *>(*it));
       const MEDCoupling1DGTUMesh *pd(dynamic_cast<const MEDCoupling1DGTUMesh *>(*it));
       if(ps && !pd)
         {
-          int nNodesPerCell(ps->getNumberOfNodesPerCell());
+          mcIdType nNodesPerCell(ps->getNumberOfNodesPerCell());
           for(int i=0;i<curNbCells;i++,ci++,cinPtr+=nNodesPerCell)
             {
               *c++=geoType;
@@ -457,7 +457,7 @@ MEDCouplingUMesh *MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(const std::v
         }
       else if(!ps && pd)
         {
-          const int *ciinPtr(pd->getNodalConnectivityIndex()->begin());
+          const mcIdType *ciinPtr(pd->getNodalConnectivityIndex()->begin());
           for(int i=0;i<curNbCells;i++,ci++,ciinPtr++)
             {
               *c++=geoType;
@@ -478,7 +478,7 @@ MEDCoupling1SGTUMesh::MEDCoupling1SGTUMesh(const MEDCoupling1SGTUMesh& other, bo
 {
   if(recDeepCpy)
     {
-      const DataArrayInt *c(other._conn);
+      const DataArrayIdType *c(other._conn);
       if(c)
         _conn=c->deepCopy();
     }
@@ -517,15 +517,15 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New(const MEDCouplingUMesh *m)
   std::set<INTERP_KERNEL::NormalizedCellType> gts(m->getAllGeoTypes());
   if(gts.size()!=1)
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::New : input mesh must have exactly one geometric type !");
-  int geoType((int)*gts.begin());
+  mcIdType geoType(ToIdType(*gts.begin()));
   MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(m->getName(),*gts.begin()));
   ret->setCoords(m->getCoords()); ret->setDescription(m->getDescription());
-  int nbCells(m->getNumberOfCells());
-  int nbOfNodesPerCell(ret->getNumberOfNodesPerCell());
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()); conn->alloc(nbCells*nbOfNodesPerCell,1);
-  int *c(conn->getPointer());
-  const int *cin(m->getNodalConnectivity()->begin()),*ciin(m->getNodalConnectivityIndex()->begin());
-  for(int i=0;i<nbCells;i++,ciin++)
+  mcIdType nbCells=m->getNumberOfCells();
+  mcIdType nbOfNodesPerCell(ret->getNumberOfNodesPerCell());
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()); conn->alloc(nbCells*nbOfNodesPerCell,1);
+  mcIdType *c(conn->getPointer());
+  const mcIdType *cin(m->getNodalConnectivity()->begin()),*ciin(m->getNodalConnectivityIndex()->begin());
+  for(mcIdType i=0;i<nbCells;i++,ciin++)
     {
       if(cin[ciin[0]]==geoType)
         {
@@ -566,7 +566,7 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::deepCopyConnectivityOnly() const
 {
   checkConsistencyLight();
   MCAuto<MEDCoupling1SGTUMesh> ret(clone(false));
-  MCAuto<DataArrayInt> c(_conn->deepCopy());
+  MCAuto<DataArrayIdType> c(_conn->deepCopy());
   ret->setNodalConnectivity(c);
   return ret.retn();
 }
@@ -584,7 +584,7 @@ void MEDCoupling1SGTUMesh::shallowCopyConnectivityFrom(const MEDCouplingPointSet
 void MEDCoupling1SGTUMesh::updateTime() const
 {
   MEDCoupling1GTUMesh::updateTime();
-  const DataArrayInt *c(_conn);
+  const DataArrayIdType *c(_conn);
   if(c)
     updateTimeWith(*c);
 }
@@ -597,7 +597,7 @@ std::size_t MEDCoupling1SGTUMesh::getHeapMemorySizeWithoutChildren() const
 std::vector<const BigMemoryObject *> MEDCoupling1SGTUMesh::getDirectChildrenWithNull() const
 {
   std::vector<const BigMemoryObject *> ret(MEDCoupling1GTUMesh::getDirectChildrenWithNull());
-  ret.push_back((const DataArrayInt *)_conn);
+  ret.push_back((const DataArrayIdType *)_conn);
   return ret;
 }
 
@@ -619,7 +619,7 @@ bool MEDCoupling1SGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double
     }
   if(!MEDCoupling1GTUMesh::isEqualIfNotWhy(other,prec,reason))
     return false;
-  const DataArrayInt *c1(_conn),*c2(otherC->_conn);
+  const DataArrayIdType *c1(_conn),*c2(otherC->_conn);
   if(c1==c2)
     return true;
   if(!c1 || !c2)
@@ -629,7 +629,7 @@ bool MEDCoupling1SGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double
     }
   if(!c1->isEqualIfNotWhy(*c2,reason))
     {
-      reason.insert(0,"Nodal connectivity DataArrayInt differ : ");
+      reason.insert(0,"Nodal connectivity DataArrayIdType differ : ");
       return false;
     }
   return true;
@@ -644,7 +644,7 @@ bool MEDCoupling1SGTUMesh::isEqualWithoutConsideringStr(const MEDCouplingMesh *o
     return false;
   if(!MEDCoupling1GTUMesh::isEqualWithoutConsideringStr(other,prec))
     return false;
-  const DataArrayInt *c1(_conn),*c2(otherC->_conn);
+  const DataArrayIdType *c1(_conn),*c2(otherC->_conn);
   if(c1==c2)
     return true;
   if(!c1 || !c2)
@@ -656,7 +656,7 @@ bool MEDCoupling1SGTUMesh::isEqualWithoutConsideringStr(const MEDCouplingMesh *o
 
 void MEDCoupling1SGTUMesh::checkConsistencyOfConnectivity() const
 {
-  const DataArrayInt *c1(_conn);
+  const DataArrayIdType *c1(_conn);
   if(c1)
     {
       if(c1->getNumberOfComponents()!=1)
@@ -678,18 +678,18 @@ void MEDCoupling1SGTUMesh::checkConsistencyLight() const
 void MEDCoupling1SGTUMesh::checkConsistency(double eps) const
 {
   checkConsistencyLight();
-  const DataArrayInt *c1(_conn);
-  int nbOfTuples=c1->getNumberOfTuples();
-  int nbOfNodesPerCell=(int)_cm->getNumberOfNodes();
+  const DataArrayIdType *c1(_conn);
+  mcIdType nbOfTuples(c1->getNumberOfTuples());
+  mcIdType nbOfNodesPerCell=_cm->getNumberOfNodes();
   if(nbOfTuples%nbOfNodesPerCell!=0)
     {
       std::ostringstream oss; oss << "MEDCoupling1SGTUMesh::checkConsistency : the nb of tuples in conn is " << nbOfTuples << " and number of nodes per cell is " << nbOfNodesPerCell << ". But " << nbOfTuples << "%" << nbOfNodesPerCell << " !=0 !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  int nbOfNodes=getNumberOfNodes();
-  int nbOfCells=nbOfTuples/nbOfNodesPerCell;
-  const int *w(c1->begin());
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfCells=nbOfTuples/nbOfNodesPerCell;
+  const mcIdType *w(c1->begin());
+  for(mcIdType i=0;i<nbOfCells;i++)
     for(int j=0;j<nbOfNodesPerCell;j++,w++)
       {
         if(*w<0 || *w>=nbOfNodes)
@@ -700,10 +700,10 @@ void MEDCoupling1SGTUMesh::checkConsistency(double eps) const
       }
 }
 
-std::size_t MEDCoupling1SGTUMesh::getNumberOfCells() const
+mcIdType MEDCoupling1SGTUMesh::getNumberOfCells() const
 {
-  std::size_t nbOfTuples(getNodalConnectivityLength());
-  int nbOfNodesPerCell(getNumberOfNodesPerCell());
+  mcIdType nbOfTuples(getNodalConnectivityLength());
+  mcIdType nbOfNodesPerCell(getNumberOfNodesPerCell());
   if(nbOfTuples%nbOfNodesPerCell!=0)
     {
       std::ostringstream oss; oss << "MEDCoupling1SGTUMesh:getNumberOfCells: : the nb of tuples in conn is " << nbOfTuples << " and number of nodes per cell is " << nbOfNodesPerCell << ". But " << nbOfTuples << "%" << nbOfNodesPerCell << " !=0 !";
@@ -712,55 +712,55 @@ std::size_t MEDCoupling1SGTUMesh::getNumberOfCells() const
   return nbOfTuples/nbOfNodesPerCell;
 }
 
-int MEDCoupling1SGTUMesh::getNumberOfNodesInCell(int cellId) const
+mcIdType MEDCoupling1SGTUMesh::getNumberOfNodesInCell(mcIdType cellId) const
 {
   return getNumberOfNodesPerCell();
 }
 
-int MEDCoupling1SGTUMesh::getNumberOfNodesPerCell() const
+mcIdType MEDCoupling1SGTUMesh::getNumberOfNodesPerCell() const
 {
   checkNonDynamicGeoType();
-  return (int)_cm->getNumberOfNodes();
+  return _cm->getNumberOfNodes();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::computeNbOfNodesPerCell() const
+DataArrayIdType *MEDCoupling1SGTUMesh::computeNbOfNodesPerCell() const
 {
   checkNonDynamicGeoType();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(getNumberOfCells(),1);
-  ret->fillWithValue((int)_cm->getNumberOfNodes());
+  ret->fillWithValue(_cm->getNumberOfNodes());
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::computeNbOfFacesPerCell() const
+DataArrayIdType *MEDCoupling1SGTUMesh::computeNbOfFacesPerCell() const
 {
   checkNonDynamicGeoType();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(getNumberOfCells(),1);
-  ret->fillWithValue((int)_cm->getNumberOfSons());
+  ret->fillWithValue(ToIdType(_cm->getNumberOfSons()));
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::computeEffectiveNbOfNodesPerCell() const
+DataArrayIdType *MEDCoupling1SGTUMesh::computeEffectiveNbOfNodesPerCell() const
 {
   checkNonDynamicGeoType();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  int nbCells(getNumberOfCells());
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  mcIdType nbCells=getNumberOfCells();
   ret->alloc(nbCells,1);
-  int *retPtr(ret->getPointer());
-  int nbNodesPerCell(getNumberOfNodesPerCell());
-  const int *conn(_conn->begin());
-  for(int i=0;i<nbCells;i++,conn+=nbNodesPerCell,retPtr++)
+  mcIdType *retPtr(ret->getPointer());
+  mcIdType nbNodesPerCell(getNumberOfNodesPerCell());
+  const mcIdType *conn(_conn->begin());
+  for(mcIdType i=0;i<nbCells;i++,conn+=nbNodesPerCell,retPtr++)
     {
-      std::set<int> s(conn,conn+nbNodesPerCell);
-      *retPtr=(int)s.size();
+      std::set<mcIdType> s(conn,conn+nbNodesPerCell);
+      *retPtr=ToIdType(s.size());
     }
   return ret.retn();
 }
 
-void MEDCoupling1SGTUMesh::getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const
+void MEDCoupling1SGTUMesh::getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const
 {
-  int sz=getNumberOfNodesPerCell();
+  mcIdType sz=getNumberOfNodesPerCell();
   conn.resize(sz);
   if(cellId<getNumberOfCells())
     std::copy(_conn->begin()+cellId*sz,_conn->begin()+(cellId+1)*sz,conn.begin());
@@ -804,7 +804,7 @@ std::string MEDCoupling1SGTUMesh::simpleRepr() const
   else
     ret << msg0 << "\n";
   ret << "Number of cells : ";
-  if((const DataArrayInt *)_conn)
+  if((const DataArrayIdType *)_conn)
     {
       if(_conn->isAllocated())
         {
@@ -833,19 +833,19 @@ std::string MEDCoupling1SGTUMesh::advancedRepr() const
     ret << "No array set !\n";
   ret << "\n\nConnectivity array : \n____________________\n\n";
   //
-  if((const DataArrayInt *)_conn)
+  if((const DataArrayIdType *)_conn)
     {
       if(_conn->isAllocated())
         {
           if(_conn->getNumberOfComponents()==1)
             {
-              int nbOfCells=getNumberOfCells();
-              int sz=getNumberOfNodesPerCell();
-              const int *connPtr=_conn->begin();
-              for(int i=0;i<nbOfCells;i++,connPtr+=sz)
+              mcIdType nbOfCells=getNumberOfCells();
+              mcIdType sz=getNumberOfNodesPerCell();
+              const mcIdType *connPtr=_conn->begin();
+              for(mcIdType i=0;i<nbOfCells;i++,connPtr+=sz)
                 {
                   ret << "Cell #" << i << " : ";
-                  std::copy(connPtr,connPtr+sz,std::ostream_iterator<int>(ret," "));
+                  std::copy(connPtr,connPtr+sz,std::ostream_iterator<mcIdType>(ret," "));
                   ret << "\n";
                 }
             }
@@ -864,18 +864,18 @@ DataArrayDouble *MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell() cons
 {
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   int spaceDim=getSpaceDimension();
-  int nbOfCells=getNumberOfCells();//checkConsistencyLight()
-  int nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfCells=getNumberOfCells();//checkConsistencyLight()
+  mcIdType nbOfNodes=getNumberOfNodes();
   ret->alloc(nbOfCells,spaceDim);
   double *ptToFill=ret->getPointer();
   const double *coor=_coords->begin();
-  const int *nodal=_conn->begin();
-  int sz=getNumberOfNodesPerCell();
-  double coeff=1./(double)sz;
-  for(int i=0;i<nbOfCells;i++,ptToFill+=spaceDim)
+  const mcIdType *nodal=_conn->begin();
+  mcIdType sz=getNumberOfNodesPerCell();
+  double coeff=1./FromIdType<double>(sz);
+  for(mcIdType i=0;i<nbOfCells;i++,ptToFill+=spaceDim)
     {
       std::fill(ptToFill,ptToFill+spaceDim,0.);
-      for(int j=0;j<sz;j++,nodal++)
+      for(mcIdType j=0;j<sz;j++,nodal++)
         if(*nodal>=0 && *nodal<nbOfNodes)
           std::transform(coor+spaceDim*nodal[0],coor+spaceDim*(nodal[0]+1),ptToFill,ptToFill,std::plus<double>());
         else
@@ -888,26 +888,26 @@ DataArrayDouble *MEDCoupling1SGTUMesh::computeIsoBarycenterOfNodesPerCell() cons
   return ret.retn();
 }
 
-void MEDCoupling1SGTUMesh::renumberCells(const int *old2NewBg, bool check)
+void MEDCoupling1SGTUMesh::renumberCells(const mcIdType *old2NewBg, bool check)
 {
-  int nbCells=getNumberOfCells();
-  MCAuto<DataArrayInt> o2n=DataArrayInt::New();
+  mcIdType nbCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> o2n=DataArrayIdType::New();
   o2n->useArray(old2NewBg,false,DeallocType::C_DEALLOC,nbCells,1);
   if(check)
     o2n=o2n->checkAndPreparePermutation();
   //
-  const int *conn=_conn->begin();
-  MCAuto<DataArrayInt> n2o=o2n->invertArrayO2N2N2O(nbCells);
-  const int *n2oPtr=n2o->begin();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
+  const mcIdType *conn=_conn->begin();
+  MCAuto<DataArrayIdType> n2o=o2n->invertArrayO2N2N2O(nbCells);
+  const mcIdType *n2oPtr=n2o->begin();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
   newConn->alloc(_conn->getNumberOfTuples(),1);
   newConn->copyStringInfoFrom(*_conn);
-  int sz=getNumberOfNodesPerCell();
+  mcIdType sz=getNumberOfNodesPerCell();
   //
-  int *newC=newConn->getPointer();
-  for(int i=0;i<nbCells;i++,newC+=sz)
+  mcIdType *newC=newConn->getPointer();
+  for(mcIdType i=0;i<nbCells;i++,newC+=sz)
     {
-      int pos=n2oPtr[i];
+      mcIdType pos=n2oPtr[i];
       std::copy(conn+pos*sz,conn+(pos+1)*sz,newC);
     }
   _conn=newConn;
@@ -924,22 +924,22 @@ void MEDCoupling1SGTUMesh::renumberCells(const int *old2NewBg, bool check)
  * \param [in] fullyIn input that specifies if all node ids must be in [\a begin,\a end) array to consider cell to be in.
  * \param [in,out] cellIdsKeptArr array where all candidate cell ids are put at the end.
  */
-void MEDCoupling1SGTUMesh::fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const
+void MEDCoupling1SGTUMesh::fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const
 {
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> cellIdsKept=DataArrayInt::New(); cellIdsKept->alloc(0,1);
-  int tmp=-1;
-  int sz=_conn->getMaxValue(tmp); sz=std::max(sz,0)+1;
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> cellIdsKept=DataArrayIdType::New(); cellIdsKept->alloc(0,1);
+  mcIdType tmp=-1;
+  mcIdType sz=_conn->getMaxValue(tmp); sz=std::max(sz,ToIdType(0))+1;
   std::vector<bool> fastFinder(sz,false);
-  for(const int *work=begin;work!=end;work++)
+  for(const mcIdType *work=begin;work!=end;work++)
     if(*work>=0 && *work<sz)
       fastFinder[*work]=true;
-  const int *conn=_conn->begin();
-  int nbNodesPerCell=getNumberOfNodesPerCell();
-  for(int i=0;i<nbOfCells;i++,conn+=nbNodesPerCell)
+  const mcIdType *conn=_conn->begin();
+  mcIdType nbNodesPerCell=getNumberOfNodesPerCell();
+  for(mcIdType i=0;i<nbOfCells;i++,conn+=nbNodesPerCell)
     {
       int ref=0,nbOfHit=0;
-      for(int j=0;j<nbNodesPerCell;j++)
+      for(mcIdType j=0;j<nbNodesPerCell;j++)
         if(conn[j]>=0)
           {
             ref++;
@@ -964,18 +964,18 @@ MEDCouplingUMesh *MEDCoupling1SGTUMesh::buildUnstructured() const
 {
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),getMeshDimension());
   ret->setCoords(getCoords());
-  const int *nodalConn=_conn->begin();
-  int nbCells=getNumberOfCells();
-  int nbNodesPerCell=getNumberOfNodesPerCell();
-  int geoType=(int)getCellModelEnum();
-  MCAuto<DataArrayInt> c=DataArrayInt::New(); c->alloc(nbCells*(nbNodesPerCell+1),1);
-  int *cPtr=c->getPointer();
-  for(int i=0;i<nbCells;i++,nodalConn+=nbNodesPerCell)
+  const mcIdType *nodalConn=_conn->begin();
+  mcIdType nbCells=getNumberOfCells();
+  mcIdType nbNodesPerCell=getNumberOfNodesPerCell();
+  mcIdType geoType=ToIdType(getCellModelEnum());
+  MCAuto<DataArrayIdType> c=DataArrayIdType::New(); c->alloc(nbCells*(nbNodesPerCell+1),1);
+  mcIdType *cPtr=c->getPointer();
+  for(mcIdType i=0;i<nbCells;i++,nodalConn+=nbNodesPerCell)
     {
       *cPtr++=geoType;
       cPtr=std::copy(nodalConn,nodalConn+nbNodesPerCell,cPtr);
     }
-  MCAuto<DataArrayInt> cI=DataArrayInt::Range(0,(nbCells+1)*(nbNodesPerCell+1),nbNodesPerCell+1);
+  MCAuto<DataArrayIdType> cI=DataArrayIdType::Range(0,(nbCells+1)*(nbNodesPerCell+1),nbNodesPerCell+1);
   ret->setConnectivity(c,cI,true);
   try
   { ret->copyTinyInfoFrom(this); }
@@ -983,7 +983,7 @@ MEDCouplingUMesh *MEDCoupling1SGTUMesh::buildUnstructured() const
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::simplexize(int policy)
+DataArrayIdType *MEDCoupling1SGTUMesh::simplexize(int policy)
 {
   switch(policy)
   {
@@ -991,9 +991,9 @@ DataArrayInt *MEDCoupling1SGTUMesh::simplexize(int policy)
       return simplexizePol0();
     case 1:
       return simplexizePol1();
-    case (int) INTERP_KERNEL::PLANAR_FACE_5:
+    case INTERP_KERNEL::PLANAR_FACE_5:
         return simplexizePlanarFace5();
-    case (int) INTERP_KERNEL::PLANAR_FACE_6:
+    case INTERP_KERNEL::PLANAR_FACE_6:
         return simplexizePlanarFace6();
     default:
       throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::simplexize : unrecognized policy ! Must be :\n  - 0 or 1 (only available for meshdim=2) \n  - PLANAR_FACE_5, PLANAR_FACE_6  (only for meshdim=3)");
@@ -1005,8 +1005,8 @@ DataArrayInt *MEDCoupling1SGTUMesh::simplexize(int policy)
 struct MEDCouplingAccVisit
 {
   MEDCouplingAccVisit():_new_nb_of_nodes(0) { }
-  int operator()(int val) { if(val!=-1) return _new_nb_of_nodes++; else return -1; }
-  int _new_nb_of_nodes;
+  mcIdType operator()(mcIdType val) { if(val!=-1) return _new_nb_of_nodes++; else return -1; }
+  mcIdType _new_nb_of_nodes;
 };
 
 /// @endcond
@@ -1014,21 +1014,21 @@ struct MEDCouplingAccVisit
 /*!
  * This method returns all node ids used in \b this. The data array returned has to be dealt by the caller.
  * The returned node ids are sortes ascendingly. This method is closed to MEDCoupling1SGTUMesh::getNodeIdsInUse except
- * the format of returned DataArrayInt instance.
+ * the format of returned DataArrayIdType instance.
  *
- * \return a newly allocated DataArrayInt sorted ascendingly of fetched node ids.
+ * \return a newly allocated DataArrayIdType sorted ascendingly of fetched node ids.
  * \sa MEDCoupling1SGTUMesh::getNodeIdsInUse, areAllNodesFetched
  */
-DataArrayInt *MEDCoupling1SGTUMesh::computeFetchedNodeIds() const
+DataArrayIdType *MEDCoupling1SGTUMesh::computeFetchedNodeIds() const
 {
   checkConsistencyOfConnectivity();
-  int nbNodes(getNumberOfNodes());
+  mcIdType nbNodes(getNumberOfNodes());
   std::vector<bool> fetchedNodes(nbNodes,false);
   computeNodeIdsAlg(fetchedNodes);
-  int sz((int)std::count(fetchedNodes.begin(),fetchedNodes.end(),true));
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(sz,1);
-  int *retPtr(ret->getPointer());
-  for(int i=0;i<nbNodes;i++)
+  mcIdType sz(ToIdType(std::count(fetchedNodes.begin(),fetchedNodes.end(),true)));
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(sz,1);
+  mcIdType *retPtr(ret->getPointer());
+  for(mcIdType i=0;i<nbNodes;i++)
     if(fetchedNodes[i])
       *retPtr++=i;
   return ret.retn();
@@ -1039,7 +1039,7 @@ DataArrayInt *MEDCoupling1SGTUMesh::computeFetchedNodeIds() const
  * by excluding the unused nodes, for which the array holds -1. The result array is
  * a mapping in "Old to New" mode. 
  *  \param [out] nbrOfNodesInUse - number of node ids present in the nodal connectivity.
- *  \return DataArrayInt * - a new instance of DataArrayInt. Its length is \a
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType. Its length is \a
  *          this->getNumberOfNodes(). It holds for each node of \a this mesh either -1
  *          if the node is unused or a new id else. The caller is to delete this
  *          array using decrRef() as it is no more needed.  
@@ -1048,18 +1048,18 @@ DataArrayInt *MEDCoupling1SGTUMesh::computeFetchedNodeIds() const
  *  \throw If the nodal connectivity includes an invalid id.
  *  \sa MEDCoupling1SGTUMesh::computeFetchedNodeIds, areAllNodesFetched
  */
-DataArrayInt *MEDCoupling1SGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
+DataArrayIdType *MEDCoupling1SGTUMesh::getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const
 {
   nbrOfNodesInUse=-1;
-  int nbOfNodes=getNumberOfNodes();
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret(DataArrayInt::New());
+  mcIdType nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
   ret->alloc(nbOfNodes,1);
-  int *traducer=ret->getPointer();
+  mcIdType *traducer=ret->getPointer();
   std::fill(traducer,traducer+nbOfNodes,-1);
-  const int *conn=_conn->begin();
-  int nbNodesPerCell=getNumberOfNodesPerCell();
-  for(int i=0;i<nbOfCells;i++)
+  const mcIdType *conn=_conn->begin();
+  mcIdType nbNodesPerCell=getNumberOfNodesPerCell();
+  for(mcIdType i=0;i<nbOfCells;i++)
     for(int j=0;j<nbNodesPerCell;j++,conn++)
       if(*conn>=0 && *conn<nbOfNodes)
         traducer[*conn]=1;
@@ -1068,7 +1068,7 @@ DataArrayInt *MEDCoupling1SGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
           std::ostringstream oss; oss << "MEDCoupling1SGTUMesh::getNodeIdsInUse : In cell #" << i  << " presence of node id " <<  conn[j] << " not in [0," << nbOfNodes << ") !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-  nbrOfNodesInUse=(int)std::count(traducer,traducer+nbOfNodes,1);
+  nbrOfNodesInUse=ToIdType(std::count(traducer,traducer+nbOfNodes,1));
   std::transform(traducer,traducer+nbOfNodes,traducer,MEDCouplingAccVisit());
   return ret.retn();
 }
@@ -1081,7 +1081,7 @@ DataArrayInt *MEDCoupling1SGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
  *
  * \sa renumberNodesInConn
  */
-void MEDCoupling1SGTUMesh::renumberNodesWithOffsetInConn(int offset)
+void MEDCoupling1SGTUMesh::renumberNodesWithOffsetInConn(mcIdType offset)
 {
   getNumberOfCells();//only to check that all is well defined.
   _conn->applyLin(1,offset);
@@ -1089,23 +1089,23 @@ void MEDCoupling1SGTUMesh::renumberNodesWithOffsetInConn(int offset)
 }
 
 /*!
- *  Same than renumberNodesInConn(const int *) except that here the format of old-to-new traducer is using map instead
+ *  Same than renumberNodesInConn(const mcIdType *) except that here the format of old-to-new traducer is using map instead
  *  of array. This method is dedicated for renumbering from a big set of nodes the a tiny set of nodes which is the case during extraction
  *  of a big mesh.
  */
-void MEDCoupling1SGTUMesh::renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N)
+void MEDCoupling1SGTUMesh::renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N)
 {
-  this->renumberNodesInConnT< INTERP_KERNEL::HashMap<int,int> >(newNodeNumbersO2N);
+  this->renumberNodesInConnT< INTERP_KERNEL::HashMap<mcIdType,mcIdType> >(newNodeNumbersO2N);
 }
 
 /*!
- *  Same than renumberNodesInConn(const int *) except that here the format of old-to-new traducer is using map instead
+ *  Same than renumberNodesInConn(const mcIdType *) except that here the format of old-to-new traducer is using map instead
  *  of array. This method is dedicated for renumbering from a big set of nodes the a tiny set of nodes which is the case during extraction
  *  of a big mesh.
  */
-void MEDCoupling1SGTUMesh::renumberNodesInConn(const std::map<int,int>& newNodeNumbersO2N)
+void MEDCoupling1SGTUMesh::renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N)
 {
-  this->renumberNodesInConnT< std::map<int,int> >(newNodeNumbersO2N);
+  this->renumberNodesInConnT< std::map<mcIdType,mcIdType> >(newNodeNumbersO2N);
 }
 
 /*!
@@ -1118,7 +1118,7 @@ void MEDCoupling1SGTUMesh::renumberNodesInConn(const std::map<int,int>& newNodeN
  *         See \ref numbering for more info on renumbering modes.
  *  \throw If the nodal connectivity of cells is not defined.
  */
-void MEDCoupling1SGTUMesh::renumberNodesInConn(const int *newNodeNumbersO2N)
+void MEDCoupling1SGTUMesh::renumberNodesInConn(const mcIdType *newNodeNumbersO2N)
 {
   getNumberOfCells();//only to check that all is well defined.
   _conn->transformWithIndArr(newNodeNumbersO2N,newNodeNumbersO2N+getNumberOfNodes());
@@ -1149,15 +1149,15 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshes(std::vector<const M
       throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshes : all items must have the same geo type !");
   std::vector< MCAuto<MEDCoupling1SGTUMesh> > bb(sz);
   std::vector< const MEDCoupling1SGTUMesh * > aa(sz);
-  int spaceDim=-3;
-  for(std::size_t i=0;i<sz && spaceDim==-3;i++)
+  std::size_t spaceDimUndef=-3, spaceDim=spaceDimUndef;
+  for(std::size_t i=0;i<sz && spaceDim==spaceDimUndef;i++)
     {
       const MEDCoupling1SGTUMesh *cur=a[i];
       const DataArrayDouble *coo=cur->getCoords();
       if(coo)
         spaceDim=coo->getNumberOfComponents();
     }
-  if(spaceDim==-3)
+  if(spaceDim==spaceDimUndef)
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshes : no spaceDim specified ! unable to perform merge !");
   for(std::size_t i=0;i<sz;i++)
     {
@@ -1178,7 +1178,7 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(std::ve
   std::vector<const MEDCoupling1SGTUMesh *>::const_iterator it=a.begin();
   if(!(*it))
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords : null instance in the first element of input vector !");
-  std::vector<const DataArrayInt *> ncs(a.size());
+  std::vector<const DataArrayIdType *> ncs(a.size());
   (*it)->getNumberOfCells();//to check that all is OK
   const DataArrayDouble *coords=(*it)->getCoords();
   const INTERP_KERNEL::CellModel *cm=&((*it)->getCellModel());
@@ -1197,7 +1197,7 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(std::ve
     }
   MCAuto<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh("merge",*cm));
   ret->setCoords(coords);
-  ret->_conn=DataArrayInt::Aggregate(ncs);
+  ret->_conn=DataArrayIdType::Aggregate(ncs);
   return ret.retn();
 }
 
@@ -1209,9 +1209,9 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesLL(std::vector<const
   if(a.empty())
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::Merge1SGTUMeshes : input array must be NON EMPTY !");
   std::vector<const MEDCoupling1SGTUMesh *>::const_iterator it=a.begin();
-  int nbOfCells=(*it)->getNumberOfCells();
+  mcIdType nbOfCells=(*it)->getNumberOfCells();
   const INTERP_KERNEL::CellModel *cm=&((*it)->getCellModel());
-  int nbNodesPerCell=(*it)->getNumberOfNodesPerCell();
+  mcIdType nbNodesPerCell=(*it)->getNumberOfNodesPerCell();
   it++;
   for(;it!=a.end();it++)
     {
@@ -1224,15 +1224,15 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesLL(std::vector<const
   MCAuto<DataArrayDouble> pts=MergeNodesArray(aps);
   MCAuto<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh("merge",*cm));
   ret->setCoords(pts);
-  MCAuto<DataArrayInt> c=DataArrayInt::New();
+  MCAuto<DataArrayIdType> c=DataArrayIdType::New();
   c->alloc(nbOfCells*nbNodesPerCell,1);
-  int *cPtr=c->getPointer();
-  int offset=0;
+  mcIdType *cPtr=c->getPointer();
+  mcIdType offset=0;
   for(it=a.begin();it!=a.end();it++)
     {
-      int curConnLgth=(*it)->getNodalConnectivityLength();
-      const int *curC=(*it)->_conn->begin();
-      cPtr=std::transform(curC,curC+curConnLgth,cPtr,std::bind2nd(std::plus<int>(),offset));
+      mcIdType curConnLgth=(*it)->getNodalConnectivityLength();
+      const mcIdType *curC=(*it)->_conn->begin();
+      cPtr=std::transform(curC,curC+curConnLgth,cPtr,std::bind2nd(std::plus<mcIdType>(),offset));
       offset+=(*it)->getNumberOfNodes();
     }
   //
@@ -1240,17 +1240,17 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesLL(std::vector<const
   return ret.retn();
 }
 
-MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords(const int *begin, const int *end) const
+MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const
 {
-  int ncell=getNumberOfCells();
+  mcIdType ncell=getNumberOfCells();
   MCAuto<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName(),*_cm));
   ret->setCoords(_coords);
   std::size_t nbOfElemsRet=std::distance(begin,end);
-  const int *inConn=_conn->getConstPointer();
-  int sz=getNumberOfNodesPerCell();
-  MCAuto<DataArrayInt> connRet=DataArrayInt::New(); connRet->alloc((int)nbOfElemsRet*sz,1);
-  int *connPtr=connRet->getPointer();
-  for(const int *work=begin;work!=end;work++,connPtr+=sz)
+  const mcIdType *inConn=_conn->getConstPointer();
+  mcIdType sz=getNumberOfNodesPerCell();
+  MCAuto<DataArrayIdType> connRet=DataArrayIdType::New(); connRet->alloc(nbOfElemsRet*sz,1);
+  mcIdType *connPtr=connRet->getPointer();
+  for(const mcIdType *work=begin;work!=end;work++,connPtr+=sz)
     {
       if(*work>=0 && *work<ncell)
         std::copy(inConn+(work[0])*sz,inConn+(work[0]+1)*sz,connPtr);
@@ -1265,18 +1265,18 @@ MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords(const int
   return ret.retn();
 }
 
-MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const
+MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const
 {
-  int ncell=getNumberOfCells();
-  int nbOfElemsRet=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice : ");
+  mcIdType ncell=getNumberOfCells();
+  mcIdType nbOfElemsRet=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice : ");
   MCAuto<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName(),*_cm));
   ret->setCoords(_coords);
-  const int *inConn=_conn->getConstPointer();
-  int sz=getNumberOfNodesPerCell();
-  MCAuto<DataArrayInt> connRet=DataArrayInt::New(); connRet->alloc((int)nbOfElemsRet*sz,1);
-  int *connPtr=connRet->getPointer();
-  int curId=start;
-  for(int i=0;i<nbOfElemsRet;i++,connPtr+=sz,curId+=step)
+  const mcIdType *inConn=_conn->getConstPointer();
+  mcIdType sz=getNumberOfNodesPerCell();
+  MCAuto<DataArrayIdType> connRet=DataArrayIdType::New(); connRet->alloc(nbOfElemsRet*sz,1);
+  mcIdType *connPtr=connRet->getPointer();
+  mcIdType curId=start;
+  for(mcIdType i=0;i<nbOfElemsRet;i++,connPtr+=sz,curId+=step)
     {
       if(curId>=0 && curId<ncell)
         std::copy(inConn+curId*sz,inConn+(curId+1)*sz,connPtr);
@@ -1293,8 +1293,8 @@ MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoordsSlice(int
 
 void MEDCoupling1SGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const
 {
-  int sz((int)nodeIdsInUse.size());
-  for(const int *conn=_conn->begin();conn!=_conn->end();conn++)
+  mcIdType sz(ToIdType(nodeIdsInUse.size()));
+  for(const mcIdType *conn=_conn->begin();conn!=_conn->end();conn++)
     {
       if(*conn>=0 && *conn<sz)
        nodeIdsInUse[*conn]=true;
@@ -1306,14 +1306,14 @@ void MEDCoupling1SGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) co
     }
 }
 
-MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::buildSetInstanceFromThis(int spaceDim) const
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::buildSetInstanceFromThis(std::size_t spaceDim) const
 {
   MCAuto<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName(),*_cm));
-  MCAuto<DataArrayInt> tmp1;
-  const DataArrayInt *nodalConn(_conn);
+  MCAuto<DataArrayIdType> tmp1;
+  const DataArrayIdType *nodalConn(_conn);
   if(!nodalConn)
     {
-      tmp1=DataArrayInt::New(); tmp1->alloc(0,1);
+      tmp1=DataArrayIdType::New(); tmp1->alloc(0,1);
     }
   else
     tmp1=_conn;
@@ -1328,16 +1328,16 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::buildSetInstanceFromThis(int spaceDi
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol0()
+DataArrayIdType *MEDCoupling1SGTUMesh::simplexizePol0()
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(getCellModelEnum()!=INTERP_KERNEL::NORM_QUAD4)
-    return DataArrayInt::Range(0,nbOfCells,1);
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(2*3*nbOfCells,1);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(2*nbOfCells,1);
-  const int *c(_conn->begin());
-  int *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
-  for(int i=0;i<nbOfCells;i++,c+=4,newConnPtr+=6,retPtr+=2)
+    return DataArrayIdType::Range(0,nbOfCells,1);
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(2*3*nbOfCells,1);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(2*nbOfCells,1);
+  const mcIdType *c(_conn->begin());
+  mcIdType *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
+  for(mcIdType i=0;i<nbOfCells;i++,c+=4,newConnPtr+=6,retPtr+=2)
     {
       newConnPtr[0]=c[0]; newConnPtr[1]=c[1]; newConnPtr[2]=c[2];
       newConnPtr[3]=c[0]; newConnPtr[4]=c[2]; newConnPtr[5]=c[3];
@@ -1349,16 +1349,16 @@ DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol0()
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol1()
+DataArrayIdType *MEDCoupling1SGTUMesh::simplexizePol1()
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(getCellModelEnum()!=INTERP_KERNEL::NORM_QUAD4)
-    return DataArrayInt::Range(0,nbOfCells,1);
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(2*3*nbOfCells,1);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(2*nbOfCells,1);
-  const int *c(_conn->begin());
-  int *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
-  for(int i=0;i<nbOfCells;i++,c+=4,newConnPtr+=6,retPtr+=2)
+    return DataArrayIdType::Range(0,nbOfCells,1);
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(2*3*nbOfCells,1);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(2*nbOfCells,1);
+  const mcIdType *c(_conn->begin());
+  mcIdType *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
+  for(mcIdType i=0;i<nbOfCells;i++,c+=4,newConnPtr+=6,retPtr+=2)
     {
       newConnPtr[0]=c[0]; newConnPtr[1]=c[1]; newConnPtr[2]=c[3];
       newConnPtr[3]=c[1]; newConnPtr[4]=c[2]; newConnPtr[5]=c[3];
@@ -1370,16 +1370,16 @@ DataArrayInt *MEDCoupling1SGTUMesh::simplexizePol1()
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePlanarFace5()
+DataArrayIdType *MEDCoupling1SGTUMesh::simplexizePlanarFace5()
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(getCellModelEnum()!=INTERP_KERNEL::NORM_HEXA8)
-    return DataArrayInt::Range(0,nbOfCells,1);
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(5*4*nbOfCells,1);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(5*nbOfCells,1);
-  const int *c(_conn->begin());
-  int *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
-  for(int i=0;i<nbOfCells;i++,c+=8,newConnPtr+=20,retPtr+=5)
+    return DataArrayIdType::Range(0,nbOfCells,1);
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(5*4*nbOfCells,1);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(5*nbOfCells,1);
+  const mcIdType *c(_conn->begin());
+  mcIdType *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
+  for(mcIdType i=0;i<nbOfCells;i++,c+=8,newConnPtr+=20,retPtr+=5)
     {
       for(int j=0;j<20;j++)
         newConnPtr[j]=c[INTERP_KERNEL::SPLIT_NODES_5_WO[j]];
@@ -1391,16 +1391,16 @@ DataArrayInt *MEDCoupling1SGTUMesh::simplexizePlanarFace5()
   return ret.retn();
 }
 
-DataArrayInt *MEDCoupling1SGTUMesh::simplexizePlanarFace6()
+DataArrayIdType *MEDCoupling1SGTUMesh::simplexizePlanarFace6()
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(getCellModelEnum()!=INTERP_KERNEL::NORM_HEXA8)
-    return DataArrayInt::Range(0,nbOfCells,1);
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(6*4*nbOfCells,1);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(6*nbOfCells,1);
-  const int *c(_conn->begin());
-  int *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
-  for(int i=0;i<nbOfCells;i++,c+=8,newConnPtr+=24,retPtr+=6)
+    return DataArrayIdType::Range(0,nbOfCells,1);
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(6*4*nbOfCells,1);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(6*nbOfCells,1);
+  const mcIdType *c(_conn->begin());
+  mcIdType *retPtr(ret->getPointer()),*newConnPtr(newConn->getPointer());
+  for(mcIdType i=0;i<nbOfCells;i++,c+=8,newConnPtr+=24,retPtr+=6)
     {
       for(int j=0;j<24;j++)
         newConnPtr[j]=c[INTERP_KERNEL::SPLIT_NODES_6_WO[j]];
@@ -1422,7 +1422,7 @@ void MEDCoupling1SGTUMesh::reprQuickOverview(std::ostream& stream) const
     { stream << " Coordinates set but not allocated !"; return ; }
   stream << " Space dimension : " << _coords->getNumberOfComponents() << "." << std::endl;
   stream << "Number of nodes : " << _coords->getNumberOfTuples() << ".";
-  if(!(const DataArrayInt *)_conn)
+  if(!(const DataArrayIdType *)_conn)
     { stream << std::endl << "Nodal connectivity NOT set !"; return ; }
   if(_conn->isAllocated())
     {
@@ -1433,19 +1433,19 @@ void MEDCoupling1SGTUMesh::reprQuickOverview(std::ostream& stream) const
 
 void MEDCoupling1SGTUMesh::checkFullyDefined() const
 {
-  if(!((const DataArrayInt *)_conn) || !((const DataArrayDouble *)_coords))
+  if(!((const DataArrayIdType *)_conn) || !((const DataArrayDouble *)_coords))
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::checkFullyDefined : part of this is not fully defined.");
 }
 
 /*!
  * First step of unserialization process.
  */
-bool MEDCoupling1SGTUMesh::isEmptyMesh(const std::vector<int>& tinyInfo) const
+bool MEDCoupling1SGTUMesh::isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const
 {
   throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::isEmptyMesh : not implemented yet !");
 }
 
-void MEDCoupling1SGTUMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCoupling1SGTUMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
   int it,order;
   double time=getTime(it,order);
@@ -1458,21 +1458,21 @@ void MEDCoupling1SGTUMesh::getTinySerializationInformation(std::vector<double>&
   std::vector<std::string> littleStrings2,littleStrings3;
   if((const DataArrayDouble *)_coords)
     _coords->getTinySerializationStrInformation(littleStrings2);
-  if((const DataArrayInt *)_conn)
+  if((const DataArrayIdType *)_conn)
     _conn->getTinySerializationStrInformation(littleStrings3);
-  int sz0((int)littleStrings2.size()),sz1((int)littleStrings3.size());
+  mcIdType sz0(ToIdType(littleStrings2.size())),sz1(ToIdType(littleStrings3.size()));
   littleStrings.insert(littleStrings.end(),littleStrings2.begin(),littleStrings2.end());
   littleStrings.insert(littleStrings.end(),littleStrings3.begin(),littleStrings3.end());
   //
   tinyInfo.push_back(getCellModelEnum());
   tinyInfo.push_back(it);
   tinyInfo.push_back(order);
-  std::vector<int> tinyInfo2,tinyInfo3;
+  std::vector<mcIdType> tinyInfo2,tinyInfo3;
   if((const DataArrayDouble *)_coords)
     _coords->getTinySerializationIntInformation(tinyInfo2);
-  if((const DataArrayInt *)_conn)
+  if((const DataArrayIdType *)_conn)
     _conn->getTinySerializationIntInformation(tinyInfo3);
-  int sz2((int)tinyInfo2.size()),sz3((int)tinyInfo3.size());
+  mcIdType sz2(ToIdType(tinyInfo2.size())),sz3(ToIdType(tinyInfo3.size()));
   tinyInfo.push_back(sz0); tinyInfo.push_back(sz1); tinyInfo.push_back(sz2); tinyInfo.push_back(sz3);
   tinyInfo.insert(tinyInfo.end(),tinyInfo2.begin(),tinyInfo2.end());
   tinyInfo.insert(tinyInfo.end(),tinyInfo3.begin(),tinyInfo3.end());
@@ -1480,23 +1480,23 @@ void MEDCoupling1SGTUMesh::getTinySerializationInformation(std::vector<double>&
   tinyInfoD.push_back(time);
 }
 
-void MEDCoupling1SGTUMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCoupling1SGTUMesh::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
-  std::vector<int> tinyInfo2(tinyInfo.begin()+7,tinyInfo.begin()+7+tinyInfo[5]);
-  std::vector<int> tinyInfo1(tinyInfo.begin()+7+tinyInfo[5],tinyInfo.begin()+7+tinyInfo[5]+tinyInfo[6]);
+  std::vector<mcIdType> tinyInfo2(tinyInfo.begin()+7,tinyInfo.begin()+7+tinyInfo[5]);
+  std::vector<mcIdType> tinyInfo1(tinyInfo.begin()+7+tinyInfo[5],tinyInfo.begin()+7+tinyInfo[5]+tinyInfo[6]);
   a1->resizeForUnserialization(tinyInfo1);
   a2->resizeForUnserialization(tinyInfo2);
 }
 
-void MEDCoupling1SGTUMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCoupling1SGTUMesh::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
-  int sz(0);
-  if((const DataArrayInt *)_conn)
+  mcIdType sz(0);
+  if((const DataArrayIdType *)_conn)
     if(_conn->isAllocated())
       sz=_conn->getNbOfElems();
-  a1=DataArrayInt::New();
+  a1=DataArrayIdType::New();
   a1->alloc(sz,1);
-  if(sz!=0 && (const DataArrayInt *)_conn)
+  if(sz!=0 && (const DataArrayIdType *)_conn)
     std::copy(_conn->begin(),_conn->end(),a1->getPointer());
   sz=0;
   if((const DataArrayDouble *)_coords)
@@ -1508,7 +1508,7 @@ void MEDCoupling1SGTUMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) co
     std::copy(_coords->begin(),_coords->end(),a2->getPointer());
 }
 
-void MEDCoupling1SGTUMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+void MEDCoupling1SGTUMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                            const std::vector<std::string>& littleStrings)
 {
   INTERP_KERNEL::NormalizedCellType gt((INTERP_KERNEL::NormalizedCellType)tinyInfo[0]);
@@ -1516,15 +1516,15 @@ void MEDCoupling1SGTUMesh::unserialization(const std::vector<double>& tinyInfoD,
   setName(littleStrings[0]);
   setDescription(littleStrings[1]);
   setTimeUnit(littleStrings[2]);
-  setTime(tinyInfoD[0],tinyInfo[1],tinyInfo[2]);
-  int sz0(tinyInfo[3]),sz1(tinyInfo[4]),sz2(tinyInfo[5]),sz3(tinyInfo[6]);
+  setTime(tinyInfoD[0],FromIdType<int>(tinyInfo[1]),FromIdType<int>(tinyInfo[2]));
+  mcIdType sz0(tinyInfo[3]),sz1(tinyInfo[4]),sz2(tinyInfo[5]),sz3(tinyInfo[6]);
   //
   _coords=DataArrayDouble::New();
-  std::vector<int> tinyInfo2(tinyInfo.begin()+7,tinyInfo.begin()+7+sz2);
+  std::vector<mcIdType> tinyInfo2(tinyInfo.begin()+7,tinyInfo.begin()+7+sz2);
   _coords->resizeForUnserialization(tinyInfo2);
   std::copy(a2->begin(),a2->end(),_coords->getPointer());
-  _conn=DataArrayInt::New();
-  std::vector<int> tinyInfo3(tinyInfo.begin()+7+sz2,tinyInfo.begin()+7+sz2+sz3);
+  _conn=DataArrayIdType::New();
+  std::vector<mcIdType> tinyInfo3(tinyInfo.begin()+7+sz2,tinyInfo.begin()+7+sz2+sz3);
   _conn->resizeForUnserialization(tinyInfo3);
   std::copy(a1->begin(),a1->end(),_conn->getPointer());
   std::vector<std::string> littleStrings2(littleStrings.begin()+3,littleStrings.begin()+3+sz0);
@@ -1549,7 +1549,7 @@ void MEDCoupling1SGTUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, do
   const MEDCoupling1SGTUMesh *otherC=dynamic_cast<const MEDCoupling1SGTUMesh *>(other);
   if(!otherC)
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::checkFastEquivalWith : Two meshes are not unstructured with single static geometric type !");
-  const DataArrayInt *c1(_conn),*c2(otherC->_conn);
+  const DataArrayIdType *c1(_conn),*c2(otherC->_conn);
   if(c1==c2)
     return;
   if(!c1 || !c2)
@@ -1575,18 +1575,18 @@ MEDCouplingPointSet *MEDCoupling1SGTUMesh::mergeMyselfWithOnSameCoords(const MED
   return Merge1SGTUMeshesOnSameCoords(ms);
 }
 
-void MEDCoupling1SGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const
+void MEDCoupling1SGTUMesh::getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const
 {
   checkFullyDefined();
-  int nbOfNodes=getNumberOfNodes();
-  int *revNodalIndxPtr=(int *)malloc((nbOfNodes+1)*sizeof(int));
+  mcIdType nbOfNodes=getNumberOfNodes();
+  mcIdType *revNodalIndxPtr=(mcIdType *)malloc((nbOfNodes+1)*sizeof(mcIdType));
   revNodalIndx->useArray(revNodalIndxPtr,true,DeallocType::C_DEALLOC,nbOfNodes+1,1);
   std::fill(revNodalIndxPtr,revNodalIndxPtr+nbOfNodes+1,0);
-  const int *conn=_conn->begin();
-  int nbOfCells=getNumberOfCells();
-  int nbOfEltsInRevNodal=0;
-  int nbOfNodesPerCell=getNumberOfNodesPerCell();
-  for(int eltId=0;eltId<nbOfCells;eltId++)
+  const mcIdType *conn=_conn->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType nbOfEltsInRevNodal=0;
+  mcIdType nbOfNodesPerCell=getNumberOfNodesPerCell();
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++)
     {
       for(int j=0;j<nbOfNodesPerCell;j++,conn++)
         {
@@ -1602,16 +1602,16 @@ void MEDCoupling1SGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, D
             }
         }
     }
-  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<int>());
+  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<mcIdType>());
   conn=_conn->begin();
-  int *revNodalPtr=(int *)malloc((nbOfEltsInRevNodal)*sizeof(int));
+  mcIdType *revNodalPtr=(mcIdType *)malloc(nbOfEltsInRevNodal*sizeof(mcIdType));
   revNodal->useArray(revNodalPtr,true,DeallocType::C_DEALLOC,nbOfEltsInRevNodal,1);
   std::fill(revNodalPtr,revNodalPtr+nbOfEltsInRevNodal,-1);
-  for(int eltId=0;eltId<nbOfCells;eltId++)
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++)
     {
       for(int j=0;j<nbOfNodesPerCell;j++,conn++)
         {
-          *std::find_if(revNodalPtr+revNodalIndxPtr[*conn],revNodalPtr+revNodalIndxPtr[*conn+1],std::bind2nd(std::equal_to<int>(),-1))=eltId;
+          *std::find_if(revNodalPtr+revNodalIndxPtr[*conn],revNodalPtr+revNodalIndxPtr[*conn+1],std::bind2nd(std::equal_to<mcIdType>(),-1))=eltId;
         }
     }
 }
@@ -1619,7 +1619,7 @@ void MEDCoupling1SGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, D
 /*!
  * Use \a nodalConn array as nodal connectivity of \a this. The input \a nodalConn pointer can be null.
  */
-void MEDCoupling1SGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn)
+void MEDCoupling1SGTUMesh::setNodalConnectivity(DataArrayIdType *nodalConn)
 {
   if(nodalConn)
     nodalConn->incrRef();
@@ -1628,12 +1628,12 @@ void MEDCoupling1SGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn)
 }
 
 /*!
- * \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not responsible to deallocate it.
+ * \return DataArrayIdType * - the internal reference to the nodal connectivity. The caller is not responsible to deallocate it.
  */
-DataArrayInt *MEDCoupling1SGTUMesh::getNodalConnectivity() const
+DataArrayIdType *MEDCoupling1SGTUMesh::getNodalConnectivity() const
 {
-  const DataArrayInt *ret(_conn);
-  return const_cast<DataArrayInt *>(ret);
+  const DataArrayIdType *ret(_conn);
+  return const_cast<DataArrayIdType *>(ret);
 }
 
 /*!
@@ -1643,11 +1643,11 @@ DataArrayInt *MEDCoupling1SGTUMesh::getNodalConnectivity() const
  *
  *  \param [in] nbOfCells - estimation of the number of cell \a this mesh will contain.
  */
-void MEDCoupling1SGTUMesh::allocateCells(int nbOfCells)
+void MEDCoupling1SGTUMesh::allocateCells(mcIdType nbOfCells)
 {
   if(nbOfCells<0)
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::allocateCells : the input number of cells should be >= 0 !");
-  _conn=DataArrayInt::New();
+  _conn=DataArrayIdType::New();
   _conn->reserve(getNumberOfNodesPerCell()*nbOfCells);
   declareAsNew();
 }
@@ -1661,13 +1661,13 @@ void MEDCoupling1SGTUMesh::allocateCells(int nbOfCells)
  *        attached to \a this.
  * \throw If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
  */
-void MEDCoupling1SGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd)
+void MEDCoupling1SGTUMesh::insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd)
 {
-  int sz=(int)std::distance(nodalConnOfCellBg,nodalConnOfCellEnd);
-  int ref=getNumberOfNodesPerCell();
+  mcIdType sz=ToIdType(std::distance(nodalConnOfCellBg,nodalConnOfCellEnd));
+  mcIdType ref=getNumberOfNodesPerCell();
   if(sz==ref)
     {
-      DataArrayInt *c(_conn);
+      DataArrayIdType *c(_conn);
       if(c)
         c->pushBackValsSilent(nodalConnOfCellBg,nodalConnOfCellEnd);
       else
@@ -1717,12 +1717,12 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4() const
   const INTERP_KERNEL::CellModel& cm(getCellModel());
   if(cm.getEnum()!=INTERP_KERNEL::NORM_HEXA8)
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4 : this method can be applied only on HEXA8 mesh !");
-  int nbHexa8(getNumberOfCells());
-  const int *inConnPtr(getNodalConnectivity()->begin());
+  mcIdType nbHexa8=getNumberOfCells();
+  const mcIdType *inConnPtr(getNodalConnectivity()->begin());
   MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(getName(),INTERP_KERNEL::NORM_QUAD4));
-  MCAuto<DataArrayInt> c(DataArrayInt::New()); c->alloc(nbHexa8*6*4,1);
-  int *cPtr(c->getPointer());
-  for(int i=0;i<nbHexa8;i++,inConnPtr+=8)
+  MCAuto<DataArrayIdType> c(DataArrayIdType::New()); c->alloc(nbHexa8*6*4,1);
+  mcIdType *cPtr(c->getPointer());
+  for(mcIdType i=0;i<nbHexa8;i++,inConnPtr+=8)
     {
       for(int j=0;j<6;j++,cPtr+=4)
         cm.fillSonCellNodalConnectivity(j,inConnPtr,cPtr);
@@ -1744,16 +1744,16 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::explodeEachHexa8To6Quad4() const
  * \param [out] nodePerm the permutation array of size \c this->getNumberOfNodes()
  * \return MEDCouplingCMesh * - a newly allocated mesh that is the result of the structurization of \a this.
  */
-MEDCouplingCMesh *MEDCoupling1SGTUMesh::structurizeMe(DataArrayInt *& cellPerm, DataArrayInt *& nodePerm, double eps) const
+MEDCouplingCMesh *MEDCoupling1SGTUMesh::structurizeMe(DataArrayIdType *& cellPerm, DataArrayIdType *& nodePerm, double eps) const
 {
   checkConsistencyLight();
-  int spaceDim(getSpaceDimension()),meshDim(getMeshDimension()),nbNodes(getNumberOfNodes());
+  int spaceDim(getSpaceDimension()),meshDim(getMeshDimension()); mcIdType nbNodes(getNumberOfNodes());
   if(MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(meshDim)!=getCellModelEnum())
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::structurizeMe : the unique geo type in this is not compatible with the geometric type regarding mesh dimension !");
   MCAuto<MEDCouplingCMesh> cm(MEDCouplingCMesh::New());
   for(int i=0;i<spaceDim;i++)
     {
-      std::vector<int> tmp(1,i);
+      std::vector<std::size_t> tmp(1,i);
       MCAuto<DataArrayDouble> elt(static_cast<DataArrayDouble*>(getCoords()->keepSelectedComponents(tmp)));
       elt=elt->getDifferentValues(eps);
       elt->sort(true);
@@ -1771,7 +1771,7 @@ MEDCouplingCMesh *MEDCoupling1SGTUMesh::structurizeMe(DataArrayInt *& cellPerm,
 
 /// @cond INTERNAL
 
-bool UpdateHexa8Cell(int validAxis, int neighId, const int *validConnQuad4NeighSide, int *allFacesNodalConn, int *myNeighbours)
+bool UpdateHexa8Cell(int validAxis, mcIdType neighId, const mcIdType *validConnQuad4NeighSide, mcIdType *allFacesNodalConn, mcIdType *myNeighbours)
 {
   static const int TAB[48]={
     0,1,2,3,4,5,6,7,//0
@@ -1784,11 +1784,11 @@ bool UpdateHexa8Cell(int validAxis, int neighId, const int *validConnQuad4NeighS
   static const int TAB2[6]={0,0,3,3,3,3};
   if(myNeighbours[validAxis]==neighId && allFacesNodalConn[4*validAxis+0]==validConnQuad4NeighSide[TAB2[validAxis]])
     return true;
-  int oldAxis((int)std::distance(myNeighbours,std::find(myNeighbours,myNeighbours+6,neighId)));
+  mcIdType oldAxis(ToIdType(std::distance(myNeighbours,std::find(myNeighbours,myNeighbours+6,neighId))));
   std::size_t pos(std::distance(MEDCoupling1SGTUMesh::HEXA8_FACE_PAIRS,std::find(MEDCoupling1SGTUMesh::HEXA8_FACE_PAIRS,MEDCoupling1SGTUMesh::HEXA8_FACE_PAIRS+6,oldAxis)));
   std::size_t pos0(pos/2),pos1(pos%2);
   int oldAxisOpp(MEDCoupling1SGTUMesh::HEXA8_FACE_PAIRS[2*pos0+(pos1+1)%2]);
-  int oldConn[8],myConn2[8]={-1,-1,-1,-1,-1,-1,-1,-1},myConn[8],edgeConn[2],allFacesTmp[24],neighTmp[6];
+  mcIdType oldConn[8],myConn2[8]={-1,-1,-1,-1,-1,-1,-1,-1},myConn[8],edgeConn[2],allFacesTmp[24],neighTmp[6];
   oldConn[0]=allFacesNodalConn[0]; oldConn[1]=allFacesNodalConn[1]; oldConn[2]=allFacesNodalConn[2]; oldConn[3]=allFacesNodalConn[3];
   oldConn[4]=allFacesNodalConn[4]; oldConn[5]=allFacesNodalConn[7]; oldConn[6]=allFacesNodalConn[6]; oldConn[7]=allFacesNodalConn[5];
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(INTERP_KERNEL::NORM_HEXA8));
@@ -1796,7 +1796,7 @@ bool UpdateHexa8Cell(int validAxis, int neighId, const int *validConnQuad4NeighS
     myConn2[i]=validConnQuad4NeighSide[(4-i+TAB2[validAxis])%4];
   for(int i=0;i<4;i++)
     {
-      int nodeId(myConn2[i]);//the node id for which the opposite one will be found
+      mcIdType nodeId(myConn2[i]);//the node id for which the opposite one will be found
       bool found(false);
       INTERP_KERNEL::NormalizedCellType typeOfSon;
       for(int j=0;j<12 && !found;j++)
@@ -1820,11 +1820,11 @@ bool UpdateHexa8Cell(int validAxis, int neighId, const int *validConnQuad4NeighS
   for(int i=0;i<6;i++)
     {
       cm.fillSonCellNodalConnectivity(i,myConn,allFacesTmp+4*i);
-      std::set<int> s(allFacesTmp+4*i,allFacesTmp+4*i+4);
+      std::set<mcIdType> s(allFacesTmp+4*i,allFacesTmp+4*i+4);
       bool found(false);
       for(int j=0;j<6 && !found;j++)
         {
-          std::set<int> s1(allFacesNodalConn+4*j,allFacesNodalConn+4*j+4);
+          std::set<mcIdType> s1(allFacesNodalConn+4*j,allFacesNodalConn+4*j+4);
           if(s==s1)
             {
               neighTmp[i]=myNeighbours[j];
@@ -1845,42 +1845,44 @@ bool UpdateHexa8Cell(int validAxis, int neighId, const int *validConnQuad4NeighS
  * This method expects the \a this contains NORM_HEXA8 cells only. This method will sort each cells in \a this so that their numbering was
  * homogeneous. If it succeeds the result of MEDCouplingUMesh::tetrahedrize will return a conform mesh.
  *
- * \return DataArrayInt * - a newly allocated array (to be managed by the caller) containing renumbered cell ids.
+ * \return DataArrayIdType * - a newly allocated array (to be managed by the caller) containing renumbered cell ids.
  *
  * \throw If \a this is not a mesh containing only NORM_HEXA8 cells.
  * \throw If \a this is not properly allocated.
  * \sa MEDCouplingUMesh::tetrahedrize, MEDCouplingUMesh::simplexize.
  */
-DataArrayInt *MEDCoupling1SGTUMesh::sortHexa8EachOther()
+DataArrayIdType *MEDCoupling1SGTUMesh::sortHexa8EachOther()
 {
   MCAuto<MEDCoupling1SGTUMesh> quads(explodeEachHexa8To6Quad4());//checks that only hexa8
-  int nbHexa8(getNumberOfCells()),*cQuads(quads->getNodalConnectivity()->getPointer());
-  MCAuto<DataArrayInt> neighOfQuads(DataArrayInt::New()); neighOfQuads->alloc(nbHexa8*6,1); neighOfQuads->fillWithValue(-1);
-  int *ptNeigh(neighOfQuads->getPointer());
+  mcIdType nbHexa8=getNumberOfCells();
+  mcIdType *cQuads(quads->getNodalConnectivity()->getPointer());
+  MCAuto<DataArrayIdType> neighOfQuads(DataArrayIdType::New()); neighOfQuads->alloc(nbHexa8*6,1); neighOfQuads->fillWithValue(-1);
+  mcIdType *ptNeigh(neighOfQuads->getPointer());
   {//neighOfQuads tells for each face of each Quad8 which cell (if!=-1) is connected to this face.
     MCAuto<MEDCouplingUMesh> quadsTmp(quads->buildUnstructured());
-    MCAuto<DataArrayInt> ccSafe,cciSafe;
-    DataArrayInt *cc(0),*cci(0);
+    MCAuto<DataArrayIdType> ccSafe,cciSafe;
+    DataArrayIdType *cc(0),*cci(0);
     quadsTmp->findCommonCells(3,0,cc,cci);
     ccSafe=cc; cciSafe=cci;
-    const int *ccPtr(ccSafe->begin()),nbOfPair(cci->getNumberOfTuples()-1);
-    for(int i=0;i<nbOfPair;i++)
+    const mcIdType *ccPtr(ccSafe->begin());
+    mcIdType nbOfPair=cci->getNumberOfTuples()-1;
+    for(mcIdType i=0;i<nbOfPair;i++)
       { ptNeigh[ccPtr[2*i+0]]=ccPtr[2*i+1]/6; ptNeigh[ccPtr[2*i+1]]=ccPtr[2*i+0]/6; }
   }
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
   std::vector<bool> fetched(nbHexa8,false);
   std::vector<bool>::iterator it(std::find(fetched.begin(),fetched.end(),false));
   while(it!=fetched.end())//it will turns as time as number of connected zones
     {
-      int cellId((int)std::distance(fetched.begin(),it));//it is the seed of the connected zone.
-      std::set<int> s; s.insert(cellId);//s contains already organized.
+      mcIdType cellId(ToIdType(std::distance(fetched.begin(),it)));//it is the seed of the connected zone.
+      std::set<mcIdType> s; s.insert(cellId);//s contains already organized.
       while(!s.empty())
         {
-          std::set<int> sNext;
-          for(std::set<int>::const_iterator it0=s.begin();it0!=s.end();it0++)
+          std::set<mcIdType> sNext;
+          for(std::set<mcIdType>::const_iterator it0=s.begin();it0!=s.end();it0++)
             {
               fetched[*it0]=true;
-              int *myNeighb(ptNeigh+6*(*it0));
+              mcIdType *myNeighb(ptNeigh+6*(*it0));
               for(int i=0;i<6;i++)
                 {
                   if(myNeighb[i]!=-1 && !fetched[myNeighb[i]])
@@ -1900,10 +1902,10 @@ DataArrayInt *MEDCoupling1SGTUMesh::sortHexa8EachOther()
     }
   if(!ret->empty())
     {
-      int *conn(getNodalConnectivity()->getPointer());
-      for(const int *pt=ret->begin();pt!=ret->end();pt++)
+      mcIdType *conn(getNodalConnectivity()->getPointer());
+      for(const mcIdType *pt=ret->begin();pt!=ret->end();pt++)
         {
-          int cellId(*pt);
+          mcIdType cellId(*pt);
           conn[8*cellId+0]=cQuads[24*cellId+0]; conn[8*cellId+1]=cQuads[24*cellId+1]; conn[8*cellId+2]=cQuads[24*cellId+2]; conn[8*cellId+3]=cQuads[24*cellId+3];
           conn[8*cellId+4]=cQuads[24*cellId+4]; conn[8*cellId+5]=cQuads[24*cellId+7]; conn[8*cellId+6]=cQuads[24*cellId+6]; conn[8*cellId+7]=cQuads[24*cellId+5];
         }
@@ -1931,26 +1933,28 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh3D() const
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::computeDualMesh3D : only TETRA4 supported !");
   checkFullyDefined();
   MCAuto<MEDCouplingUMesh> thisu(buildUnstructured());
-  MCAuto<DataArrayInt> revNodArr(DataArrayInt::New()),revNodIArr(DataArrayInt::New());
+  MCAuto<DataArrayIdType> revNodArr(DataArrayIdType::New()),revNodIArr(DataArrayIdType::New());
   thisu->getReverseNodalConnectivity(revNodArr,revNodIArr);
-  const int *revNod(revNodArr->begin()),*revNodI(revNodIArr->begin()),*nodal(_conn->begin());
-  MCAuto<DataArrayInt> d1Arr(DataArrayInt::New()),di1Arr(DataArrayInt::New()),rd1Arr(DataArrayInt::New()),rdi1Arr(DataArrayInt::New());
+  const mcIdType *revNod(revNodArr->begin()),*revNodI(revNodIArr->begin()),*nodal(_conn->begin());
+  MCAuto<DataArrayIdType> d1Arr(DataArrayIdType::New()),di1Arr(DataArrayIdType::New()),rd1Arr(DataArrayIdType::New()),rdi1Arr(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> edges(thisu->explode3DMeshTo1D(d1Arr,di1Arr,rd1Arr,rdi1Arr));
-  const int *d1(d1Arr->begin());
-  MCAuto<DataArrayInt> d2Arr(DataArrayInt::New()),di2Arr(DataArrayInt::New()),rd2Arr(DataArrayInt::New()),rdi2Arr(DataArrayInt::New());
+  const mcIdType *d1(d1Arr->begin());
+  MCAuto<DataArrayIdType> d2Arr(DataArrayIdType::New()),di2Arr(DataArrayIdType::New()),rd2Arr(DataArrayIdType::New()),rdi2Arr(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> faces(thisu->buildDescendingConnectivity(d2Arr,di2Arr,rd2Arr,rdi2Arr));  thisu=0;
-  const int *d2(d2Arr->begin()),*rdi2(rdi2Arr->begin());
+  const mcIdType *d2(d2Arr->begin()),*rdi2(rdi2Arr->begin());
   MCAuto<DataArrayDouble> edgesBaryArr(edges->computeCellCenterOfMass()),facesBaryArr(faces->computeCellCenterOfMass()),baryArr(computeCellCenterOfMass());
-  const int nbOfNodes(getNumberOfNodes()),offset0(nbOfNodes+faces->getNumberOfCells()),offset1(offset0+edges->getNumberOfCells());
+  const mcIdType nbOfNodes(getNumberOfNodes());
+  const mcIdType offset0=nbOfNodes+faces->getNumberOfCells();
+  const mcIdType offset1=offset0+edges->getNumberOfCells();
   edges=0; faces=0;
   std::vector<const DataArrayDouble *> v(4); v[0]=getCoords(); v[1]=facesBaryArr; v[2]=edgesBaryArr; v[3]=baryArr;
   MCAuto<DataArrayDouble> zeArr(DataArrayDouble::Aggregate(v)); baryArr=0; edgesBaryArr=0; facesBaryArr=0;
   std::string name("DualOf_"); name+=getName();
   MCAuto<MEDCoupling1DGTUMesh> ret(MEDCoupling1DGTUMesh::New(name,INTERP_KERNEL::NORM_POLYHED)); ret->setCoords(zeArr);
-  MCAuto<DataArrayInt> cArr(DataArrayInt::New()),ciArr(DataArrayInt::New()); ciArr->alloc(nbOfNodes+1,1); ciArr->setIJ(0,0,0); cArr->alloc(0,1);
-  for(int i=0;i<nbOfNodes;i++,revNodI++)
+  MCAuto<DataArrayIdType> cArr(DataArrayIdType::New()),ciArr(DataArrayIdType::New()); ciArr->alloc(nbOfNodes+1,1); ciArr->setIJ(0,0,0); cArr->alloc(0,1);
+  for(mcIdType i=0;i<nbOfNodes;i++,revNodI++)
     {
-      int nbOfCellsSharingNode(revNodI[1]-revNodI[0]);
+      mcIdType nbOfCellsSharingNode(revNodI[1]-revNodI[0]);
       if(nbOfCellsSharingNode==0)
         {
           std::ostringstream oss; oss << "MEDCoupling1SGTUMesh::computeDualMesh3D : Node #" << i << " is orphan !"; 
@@ -1958,11 +1962,11 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh3D() const
         }
       for(int j=0;j<nbOfCellsSharingNode;j++)
         {
-          int curCellId(revNod[revNodI[0]+j]);
-          const int *connOfCurCell(nodal+4*curCellId);
+          mcIdType curCellId(revNod[revNodI[0]+j]);
+          const mcIdType *connOfCurCell(nodal+4*curCellId);
           std::size_t nodePosInCurCell(std::distance(connOfCurCell,std::find(connOfCurCell,connOfCurCell+4,i)));
           if(j!=0) cArr->pushBackSilent(-1);
-          int tmp[14];
+          mcIdType tmp[14];
           //
           tmp[0]=d1[6*curCellId+DUAL_TETRA_0[nodePosInCurCell*9+0]-4]+offset0; tmp[1]=d2[4*curCellId+DUAL_TETRA_0[nodePosInCurCell*9+1]]+nbOfNodes;
           tmp[2]=curCellId+offset1; tmp[3]=d2[4*curCellId+DUAL_TETRA_0[nodePosInCurCell*9+2]]+nbOfNodes;
@@ -1978,10 +1982,10 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh3D() const
             {
               if(FACEID_NOT_SH_NODE[nodePosInCurCell]!=k)
                 {
-                  const int *faceId(d2+4*curCellId+k);
+                  const mcIdType *faceId(d2+4*curCellId+k);
                   if(rdi2[*faceId+1]-rdi2[*faceId]==1)
                     {
-                      int tmp2[5]; tmp2[0]=-1; tmp2[1]=i;
+                      mcIdType tmp2[5]; tmp2[0]=-1; tmp2[1]=i;
                       tmp2[2]=d1[6*curCellId+DUAL_TETRA_1[9*nodePosInCurCell+3*kk+0]-8]+offset0;
                       tmp2[3]=d2[4*curCellId+DUAL_TETRA_1[9*nodePosInCurCell+3*kk+1]-4]+nbOfNodes;
                       tmp2[4]=d1[6*curCellId+DUAL_TETRA_1[9*nodePosInCurCell+3*kk+2]-8]+offset0;
@@ -2006,35 +2010,35 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::computeDualMesh2D : only TRI3 supported !");
   checkFullyDefined();
   MCAuto<MEDCouplingUMesh> thisu(buildUnstructured());
-  MCAuto<DataArrayInt> revNodArr(DataArrayInt::New()),revNodIArr(DataArrayInt::New());
+  MCAuto<DataArrayIdType> revNodArr(DataArrayIdType::New()),revNodIArr(DataArrayIdType::New());
   thisu->getReverseNodalConnectivity(revNodArr,revNodIArr);
-  const int *revNod(revNodArr->begin()),*revNodI(revNodIArr->begin()),*nodal(_conn->begin());
-  MCAuto<DataArrayInt> d2Arr(DataArrayInt::New()),di2Arr(DataArrayInt::New()),rd2Arr(DataArrayInt::New()),rdi2Arr(DataArrayInt::New());
+  const mcIdType *revNod(revNodArr->begin()),*revNodI(revNodIArr->begin()),*nodal(_conn->begin());
+  MCAuto<DataArrayIdType> d2Arr(DataArrayIdType::New()),di2Arr(DataArrayIdType::New()),rd2Arr(DataArrayIdType::New()),rdi2Arr(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> edges(thisu->buildDescendingConnectivity(d2Arr,di2Arr,rd2Arr,rdi2Arr));  thisu=0;
-  const int *d2(d2Arr->begin()),*rdi2(rdi2Arr->begin());
+  const mcIdType *d2(d2Arr->begin()),*rdi2(rdi2Arr->begin());
   MCAuto<DataArrayDouble> edgesBaryArr(edges->computeCellCenterOfMass()),baryArr(computeCellCenterOfMass());
-  const int nbOfNodes(getNumberOfNodes()),offset0(nbOfNodes+edges->getNumberOfCells());
+  const mcIdType nbOfNodes(getNumberOfNodes()),offset0(nbOfNodes+edges->getNumberOfCells());
   edges=0;
   std::vector<const DataArrayDouble *> v(3); v[0]=getCoords(); v[1]=edgesBaryArr; v[2]=baryArr;
   MCAuto<DataArrayDouble> zeArr(DataArrayDouble::Aggregate(v)); baryArr=0; edgesBaryArr=0;
   std::string name("DualOf_"); name+=getName();
   MCAuto<MEDCoupling1DGTUMesh> ret(MEDCoupling1DGTUMesh::New(name,INTERP_KERNEL::NORM_POLYGON)); ret->setCoords(zeArr);
-  MCAuto<DataArrayInt> cArr(DataArrayInt::New()),ciArr(DataArrayInt::New()); ciArr->alloc(nbOfNodes+1,1); ciArr->setIJ(0,0,0); cArr->alloc(0,1);
-  for(int i=0;i<nbOfNodes;i++,revNodI++)
+  MCAuto<DataArrayIdType> cArr(DataArrayIdType::New()),ciArr(DataArrayIdType::New()); ciArr->alloc(nbOfNodes+1,1); ciArr->setIJ(0,0,0); cArr->alloc(0,1);
+  for(mcIdType i=0;i<nbOfNodes;i++,revNodI++)
     {
-      int nbOfCellsSharingNode(revNodI[1]-revNodI[0]);
+      mcIdType nbOfCellsSharingNode(revNodI[1]-revNodI[0]);
       if(nbOfCellsSharingNode==0)
         {
           std::ostringstream oss; oss << "MEDCoupling1SGTUMesh::computeDualMesh2D : Node #" << i << " is orphan !"; 
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      std::vector< std::vector<int> > polyg;
+      std::vector< std::vector<mcIdType> > polyg;
       for(int j=0;j<nbOfCellsSharingNode;j++)
         {
-          int curCellId(revNod[revNodI[0]+j]);
-          const int *connOfCurCell(nodal+3*curCellId);
+          mcIdType curCellId(revNod[revNodI[0]+j]);
+          const mcIdType *connOfCurCell(nodal+3*curCellId);
           std::size_t nodePosInCurCell(std::distance(connOfCurCell,std::find(connOfCurCell,connOfCurCell+4,i)));
-          std::vector<int> locV(3);
+          std::vector<mcIdType> locV(3);
           locV[0]=d2[3*curCellId+DUAL_TRI_0[2*nodePosInCurCell+0]]+nbOfNodes; locV[1]=curCellId+offset0; locV[2]=d2[3*curCellId+DUAL_TRI_0[2*nodePosInCurCell+1]]+nbOfNodes;
           polyg.push_back(locV);
           int kk(0);
@@ -2042,10 +2046,10 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const
             {
               if(FACEID_NOT_SH_NODE[nodePosInCurCell]!=k)
                 {
-                  const int *edgeId(d2+3*curCellId+k);
+                  const mcIdType *edgeId(d2+3*curCellId+k);
                   if(rdi2[*edgeId+1]-rdi2[*edgeId]==1)
                     {
-                      std::vector<int> locV2(2);
+                      std::vector<mcIdType> locV2(2);
                       int zeLocEdgeIdRel(DUAL_TRI_1[2*nodePosInCurCell+kk]);
                       if(zeLocEdgeIdRel>0)
                         {  locV2[0]=d2[3*curCellId+zeLocEdgeIdRel-3]+nbOfNodes;  locV2[1]=i; }
@@ -2057,7 +2061,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const
                 }
             }
         }
-      std::vector<int> zePolyg(MEDCoupling1DGTUMesh::BuildAPolygonFromParts(polyg));
+      std::vector<mcIdType> zePolyg(MEDCoupling1DGTUMesh::BuildAPolygonFromParts(polyg));
       cArr->insertAtTheEnd(zePolyg.begin(),zePolyg.end());
       ciArr->setIJ(i+1,0,cArr->getNumberOfTuples());
     }
@@ -2077,22 +2081,22 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const
  */
 DataArrayDouble *MEDCoupling1SGTUMesh::getBoundingBoxForBBTree(double arcDetEps) const
 {
-  int spaceDim(getSpaceDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes()),nbOfNodesPerCell(getNumberOfNodesPerCell());
+  mcIdType spaceDim(getSpaceDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes()),nbOfNodesPerCell(getNumberOfNodesPerCell());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
   double *bbox(ret->getPointer());
-  for(int i=0;i<nbOfCells*spaceDim;i++)
+  for(mcIdType i=0;i<nbOfCells*spaceDim;i++)
     {
       bbox[2*i]=std::numeric_limits<double>::max();
       bbox[2*i+1]=-std::numeric_limits<double>::max();
     }
   const double *coordsPtr(_coords->getConstPointer());
-  const int *conn(_conn->getConstPointer());
-  for(int i=0;i<nbOfCells;i++)
+  const mcIdType *conn(_conn->getConstPointer());
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       int kk(0);
       for(int j=0;j<nbOfNodesPerCell;j++,conn++)
         {
-          int nodeId(*conn);
+          mcIdType nodeId(*conn);
           if(nodeId>=0 && nodeId<nbOfNodes)
             {
               for(int k=0;k<spaceDim;k++)
@@ -2121,7 +2125,7 @@ MEDCouplingFieldDouble *MEDCoupling1SGTUMesh::computeDiameterField() const
 {
   checkFullyDefined();
   MCAuto<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME));
-  int nbCells(getNumberOfCells());
+  mcIdType nbCells=getNumberOfCells();
   MCAuto<DataArrayDouble> arr(DataArrayDouble::New());
   arr->alloc(nbCells,1);
   INTERP_KERNEL::AutoCppPtr<INTERP_KERNEL::DiameterCalculator> dc(_cm->buildInstanceOfDiameterCalulator(getSpaceDimension()));
@@ -2141,9 +2145,9 @@ void MEDCoupling1SGTUMesh::invertOrientationOfAllCells()
 {
   checkConsistencyOfConnectivity();
   INTERP_KERNEL::AutoCppPtr<INTERP_KERNEL::OrientationInverter> oi(INTERP_KERNEL::OrientationInverter::BuildInstanceFrom(getCellModelEnum()));
-  int nbOfNodesPerCell((int)_cm->getNumberOfNodes()),nbCells(getNumberOfCells());
-  int *conn(_conn->getPointer());
-  for(int i=0;i<nbCells;i++)
+  mcIdType nbOfNodesPerCell=ToIdType(_cm->getNumberOfNodes()),nbCells=getNumberOfCells();
+  mcIdType *conn(_conn->getPointer());
+  for(mcIdType i=0;i<nbCells;i++)
     oi->operate(conn+i*nbOfNodesPerCell,conn+(i+1)*nbOfNodesPerCell);
   updateTime();
 }
@@ -2180,7 +2184,7 @@ MEDCoupling1DGTUMesh::MEDCoupling1DGTUMesh(const MEDCoupling1DGTUMesh& other, bo
 {
   if(recDeepCpy)
     {
-      const DataArrayInt *c(other._conn);
+      const DataArrayIdType *c(other._conn);
       if(c)
         _conn=c->deepCopy();
       c=other._conn_indx;
@@ -2205,7 +2209,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::deepCopyConnectivityOnly() const
 {
   checkConsistencyLight();
   MCAuto<MEDCoupling1DGTUMesh> ret(clone(false));
-  MCAuto<DataArrayInt> c(_conn->deepCopy()),ci(_conn_indx->deepCopy());
+  MCAuto<DataArrayIdType> c(_conn->deepCopy()),ci(_conn_indx->deepCopy());
   ret->setNodalConnectivity(c,ci);
   return ret.retn();
 }
@@ -2213,7 +2217,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::deepCopyConnectivityOnly() const
 void MEDCoupling1DGTUMesh::updateTime() const
 {
   MEDCoupling1GTUMesh::updateTime();
-  const DataArrayInt *c(_conn);
+  const DataArrayIdType *c(_conn);
   if(c)
     updateTimeWith(*c);
   c=_conn_indx;
@@ -2229,8 +2233,8 @@ std::size_t MEDCoupling1DGTUMesh::getHeapMemorySizeWithoutChildren() const
 std::vector<const BigMemoryObject *> MEDCoupling1DGTUMesh::getDirectChildrenWithNull() const
 {
   std::vector<const BigMemoryObject *> ret(MEDCoupling1GTUMesh::getDirectChildrenWithNull());
-  ret.push_back((const DataArrayInt *)_conn);
-  ret.push_back((const DataArrayInt *)_conn_indx);
+  ret.push_back((const DataArrayIdType *)_conn);
+  ret.push_back((const DataArrayIdType *)_conn_indx);
   return ret;
 }
 
@@ -2252,7 +2256,7 @@ bool MEDCoupling1DGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double
     }
   if(!MEDCoupling1GTUMesh::isEqualIfNotWhy(other,prec,reason))
     return false;
-  const DataArrayInt *c1(_conn),*c2(otherC->_conn);
+  const DataArrayIdType *c1(_conn),*c2(otherC->_conn);
   if(c1==c2)
     return true;
   if(!c1 || !c2)
@@ -2262,7 +2266,7 @@ bool MEDCoupling1DGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double
     }
   if(!c1->isEqualIfNotWhy(*c2,reason))
     {
-      reason.insert(0,"Nodal connectivity DataArrayInt differs : ");
+      reason.insert(0,"Nodal connectivity DataArrayIdType differs : ");
       return false;
     }
   c1=_conn_indx; c2=otherC->_conn_indx;
@@ -2275,7 +2279,7 @@ bool MEDCoupling1DGTUMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double
     }
   if(!c1->isEqualIfNotWhy(*c2,reason))
     {
-      reason.insert(0,"Nodal connectivity index DataArrayInt differs : ");
+      reason.insert(0,"Nodal connectivity index DataArrayIdType differs : ");
       return false;
     }
   return true;
@@ -2290,7 +2294,7 @@ bool MEDCoupling1DGTUMesh::isEqualWithoutConsideringStr(const MEDCouplingMesh *o
     return false;
   if(!MEDCoupling1GTUMesh::isEqualWithoutConsideringStr(other,prec))
     return false;
-  const DataArrayInt *c1(_conn),*c2(otherC->_conn);
+  const DataArrayIdType *c1(_conn),*c2(otherC->_conn);
   if(c1==c2)
     return true;
   if(!c1 || !c2)
@@ -2324,7 +2328,7 @@ void MEDCoupling1DGTUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, do
   const MEDCoupling1DGTUMesh *otherC=dynamic_cast<const MEDCoupling1DGTUMesh *>(other);
   if(!otherC)
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::checkFastEquivalWith : Two meshes are not unstructured with single dynamic geometric type !");
-  const DataArrayInt *c1(_conn),*c2(otherC->_conn);
+  const DataArrayIdType *c1(_conn),*c2(otherC->_conn);
   if(c1!=c2)
     {
       if(!c1 || !c2)
@@ -2352,7 +2356,7 @@ void MEDCoupling1DGTUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, do
 
 void MEDCoupling1DGTUMesh::checkConsistencyOfConnectivity() const
 {
-  const DataArrayInt *c1(_conn);
+  const DataArrayIdType *c1(_conn);
   if(c1)
     {
       if(c1->getNumberOfComponents()!=1)
@@ -2364,7 +2368,7 @@ void MEDCoupling1DGTUMesh::checkConsistencyOfConnectivity() const
   else
     throw INTERP_KERNEL::Exception("Nodal connectivity array not defined !");
   //
-  int sz2=_conn->getNumberOfTuples();
+  mcIdType sz2(_conn->getNumberOfTuples());
   c1=_conn_indx;
   if(c1)
     {
@@ -2375,7 +2379,7 @@ void MEDCoupling1DGTUMesh::checkConsistencyOfConnectivity() const
         throw INTERP_KERNEL::Exception("Nodal connectivity index array is expected to have a a size of 1 at least !");
       if(c1->getInfoOnComponent(0)!="")
         throw INTERP_KERNEL::Exception("Nodal connectivity index array is expected to have no info on its single component !");
-      int f=c1->front(),ll=c1->back();
+      mcIdType f=c1->front(),ll=c1->back();
       if(f<0 || (sz2>0 && f>=sz2))
         {
           std::ostringstream oss; oss << "Nodal connectivity index array first value (" << f << ") is expected to be exactly in [0," << sz2 << ") !";
@@ -2394,7 +2398,7 @@ void MEDCoupling1DGTUMesh::checkConsistencyOfConnectivity() const
     }
   else
     throw INTERP_KERNEL::Exception("Nodal connectivity index array not defined !");
-  int szOfC1Exp=_conn_indx->back();
+  mcIdType szOfC1Exp=_conn_indx->back();
   if(sz2<szOfC1Exp)
     {
       std::ostringstream oss; oss << "MEDCoupling1DGTUMesh::checkConsistencyOfConnectivity : The expected length of nodal connectivity array regarding index is " << szOfC1Exp << " but the actual size of it is " << c1->getNumberOfTuples() << " !";
@@ -2416,14 +2420,14 @@ void MEDCoupling1DGTUMesh::checkConsistencyLight() const
 void MEDCoupling1DGTUMesh::checkConsistency(double eps) const
 {
   checkConsistencyLight();
-  const DataArrayInt *c1(_conn),*c2(_conn_indx);
+  const DataArrayIdType *c1(_conn),*c2(_conn_indx);
   if(!c2->isMonotonic(true))
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::checkConsistency : the nodal connectivity index is expected to be increasing monotinic !");
   //
-  int nbOfTuples=c1->getNumberOfTuples();
-  int nbOfNodes=getNumberOfNodes();
-  const int *w(c1->begin());
-  for(int i=0;i<nbOfTuples;i++,w++)
+  mcIdType nbOfTuples(c1->getNumberOfTuples());
+  mcIdType nbOfNodes=getNumberOfNodes();
+  const mcIdType *w(c1->begin());
+  for(mcIdType i=0;i<nbOfTuples;i++,w++)
     {
       if(*w==-1) continue;
       if(*w<0 || *w>=nbOfNodes)
@@ -2434,7 +2438,7 @@ void MEDCoupling1DGTUMesh::checkConsistency(double eps) const
     }
 }
 
-std::size_t MEDCoupling1DGTUMesh::getNumberOfCells() const
+mcIdType MEDCoupling1DGTUMesh::getNumberOfCells() const
 {
   checkConsistencyOfConnectivity();//do not remove
   return _conn_indx->getNumberOfTuples()-1;
@@ -2448,20 +2452,20 @@ std::size_t MEDCoupling1DGTUMesh::getNumberOfCells() const
  * 
  * \return a newly allocated array
  */
-DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfNodesPerCell() const
+DataArrayIdType *MEDCoupling1DGTUMesh::computeNbOfNodesPerCell() const
 {
   checkConsistencyLight();
   _conn_indx->checkMonotonic(true);
   if(getCellModelEnum()!=INTERP_KERNEL::NORM_POLYHED)
     return _conn_indx->deltaShiftIndex();
   // for polyhedrons
-  int nbOfCells=_conn_indx->getNumberOfTuples()-1;
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfCells=_conn_indx->getNumberOfTuples()-1;
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
-  int *retPtr=ret->getPointer();
-  const int *ci=_conn_indx->begin(),*c=_conn->begin();
-  for(int i=0;i<nbOfCells;i++,retPtr++,ci++)
-    *retPtr=ci[1]-ci[0]-std::count(c+ci[0],c+ci[1],-1);
+  mcIdType *retPtr=ret->getPointer();
+  const mcIdType *ci=_conn_indx->begin(),*c=_conn->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,retPtr++,ci++)
+    *retPtr=int(ci[1]-ci[0]-ToIdType(std::count(c+ci[0],c+ci[1],-1)));
   return ret.retn();
 }
 
@@ -2471,7 +2475,7 @@ DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfNodesPerCell() const
  * 
  * \return a newly allocated array
  */
-DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfFacesPerCell() const
+DataArrayIdType *MEDCoupling1DGTUMesh::computeNbOfFacesPerCell() const
 {
   checkConsistencyLight();
   _conn_indx->checkMonotonic(true);
@@ -2479,18 +2483,18 @@ DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfFacesPerCell() const
     return _conn_indx->deltaShiftIndex();
   if(getCellModelEnum()==INTERP_KERNEL::NORM_QPOLYG)
     {
-      MCAuto<DataArrayInt> ret=_conn_indx->deltaShiftIndex();
+      MCAuto<DataArrayIdType> ret=_conn_indx->deltaShiftIndex();
       ret->applyDivideBy(2);
       return ret.retn();
     }
   // for polyhedrons
-  int nbOfCells=_conn_indx->getNumberOfTuples()-1;
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfCells=_conn_indx->getNumberOfTuples()-1;
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
-  int *retPtr=ret->getPointer();
-  const int *ci=_conn_indx->begin(),*c=_conn->begin();
-  for(int i=0;i<nbOfCells;i++,retPtr++,ci++)
-    *retPtr=std::count(c+ci[0],c+ci[1],-1)+1;
+  mcIdType *retPtr=ret->getPointer();
+  const mcIdType *ci=_conn_indx->begin(),*c=_conn->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,retPtr++,ci++)
+    *retPtr=ToIdType(std::count(c+ci[0],c+ci[1],-1))+1;
   return ret.retn();
 }
 
@@ -2498,44 +2502,44 @@ DataArrayInt *MEDCoupling1DGTUMesh::computeNbOfFacesPerCell() const
  * This method computes effective number of nodes per cell. That is to say nodes appearing several times in nodal connectivity of a cell,
  * will be counted only once here whereas it will be counted several times in MEDCoupling1DGTUMesh::computeNbOfNodesPerCell method.
  *
- * \return DataArrayInt * - new object to be deallocated by the caller.
+ * \return DataArrayIdType * - new object to be deallocated by the caller.
  * \sa MEDCoupling1DGTUMesh::computeNbOfNodesPerCell
  */
-DataArrayInt *MEDCoupling1DGTUMesh::computeEffectiveNbOfNodesPerCell() const
+DataArrayIdType *MEDCoupling1DGTUMesh::computeEffectiveNbOfNodesPerCell() const
 {
   checkConsistencyLight();
   _conn_indx->checkMonotonic(true);
-  int nbOfCells(_conn_indx->getNumberOfTuples()-1);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfCells=_conn_indx->getNumberOfTuples()-1;
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
-  int *retPtr(ret->getPointer());
-  const int *ci(_conn_indx->begin()),*c(_conn->begin());
+  mcIdType *retPtr(ret->getPointer());
+  const mcIdType *ci(_conn_indx->begin()),*c(_conn->begin());
   if(getCellModelEnum()!=INTERP_KERNEL::NORM_POLYHED)
     {
-      for(int i=0;i<nbOfCells;i++,retPtr++,ci++)
+      for(mcIdType i=0;i<nbOfCells;i++,retPtr++,ci++)
         {
-          std::set<int> s(c+ci[0],c+ci[1]);
-          *retPtr=(int)s.size();
+          std::set<mcIdType> s(c+ci[0],c+ci[1]);
+          *retPtr=ToIdType(s.size());
         }
     }
   else
     {
-      for(int i=0;i<nbOfCells;i++,retPtr++,ci++)
+      for(mcIdType i=0;i<nbOfCells;i++,retPtr++,ci++)
         {
-          std::set<int> s(c+ci[0],c+ci[1]); s.erase(-1);
-          *retPtr=(int)s.size();
+          std::set<mcIdType> s(c+ci[0],c+ci[1]); s.erase(-1);
+          *retPtr=ToIdType(s.size());
         }
     }
   return ret.retn();
 }
 
-void MEDCoupling1DGTUMesh::getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const
+void MEDCoupling1DGTUMesh::getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const
 {
-  std::size_t nbOfCells(getNumberOfCells());//performs checks
+  mcIdType nbOfCells(getNumberOfCells());//performs checks
   if(cellId<nbOfCells)
     {
-      int strt=_conn_indx->getIJ(cellId,0),stp=_conn_indx->getIJ(cellId+1,0);
-      int nbOfNodes=stp-strt;
+      mcIdType strt=_conn_indx->getIJ(cellId,0),stp=_conn_indx->getIJ(cellId+1,0);
+      mcIdType nbOfNodes=stp-strt;
       if(nbOfNodes<0)
         throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::getNodeIdsOfCell : the index array is invalid ! Should be increasing monotonic !");
       conn.resize(nbOfNodes);
@@ -2548,14 +2552,14 @@ void MEDCoupling1DGTUMesh::getNodeIdsOfCell(std::size_t cellId, std::vector<int>
     }
 }
 
-int MEDCoupling1DGTUMesh::getNumberOfNodesInCell(int cellId) const
+mcIdType MEDCoupling1DGTUMesh::getNumberOfNodesInCell(mcIdType cellId) const
 {
-  int nbOfCells(getNumberOfCells());//performs checks
+  mcIdType nbOfCells=getNumberOfCells();//performs checks
   if(cellId>=0 && cellId<nbOfCells)
     {
-      const int *conn(_conn->begin());
-      int strt=_conn_indx->getIJ(cellId,0),stp=_conn_indx->getIJ(cellId+1,0);
-      return stp-strt-std::count(conn+strt,conn+stp,-1);
+      const mcIdType *conn(_conn->begin());
+      mcIdType strt=_conn_indx->getIJ(cellId,0),stp=_conn_indx->getIJ(cellId+1,0);
+      return stp-strt-ToIdType(std::count(conn+strt,conn+stp,-1));
     }
   else
     {
@@ -2622,9 +2626,9 @@ std::string MEDCoupling1DGTUMesh::advancedRepr() const
   }
   if(!isOK)
     return ret.str();
-  int nbOfCells=getNumberOfCells();
-  const int *ci=_conn_indx->begin(),*c=_conn->begin();
-  for(int i=0;i<nbOfCells;i++,ci++)
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *ci=_conn_indx->begin(),*c=_conn->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,ci++)
     {
       ret << "Cell #" << i << " : ";
       std::copy(c+ci[0],c+ci[1],std::ostream_iterator<int>(ret," "));
@@ -2637,21 +2641,21 @@ DataArrayDouble *MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell() cons
 {
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   int spaceDim=getSpaceDimension();
-  int nbOfCells=getNumberOfCells();//checkConsistencyLight()
-  int nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfCells=getNumberOfCells();//checkConsistencyLight()
+  mcIdType nbOfNodes=getNumberOfNodes();
   ret->alloc(nbOfCells,spaceDim);
   double *ptToFill=ret->getPointer();
   const double *coor=_coords->begin();
-  const int *nodal=_conn->begin(),*nodali=_conn_indx->begin();
+  const mcIdType *nodal=_conn->begin(),*nodali=_conn_indx->begin();
   nodal+=nodali[0];
   if(getCellModelEnum()!=INTERP_KERNEL::NORM_POLYHED)
     {
-      for(int i=0;i<nbOfCells;i++,ptToFill+=spaceDim,nodali++)
+      for(mcIdType i=0;i<nbOfCells;i++,ptToFill+=spaceDim,nodali++)
         {
           std::fill(ptToFill,ptToFill+spaceDim,0.);
           if(nodali[0]<nodali[1])// >= to avoid division by 0.
             {
-              for(int j=nodali[0];j<nodali[1];j++,nodal++)
+              for(mcIdType j=nodali[0];j<nodali[1];j++,nodal++)
                 {
                   if(*nodal>=0 && *nodal<nbOfNodes)
                     std::transform(coor+spaceDim*nodal[0],coor+spaceDim*(nodal[0]+1),ptToFill,ptToFill,std::plus<double>());
@@ -2660,7 +2664,7 @@ DataArrayDouble *MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell() cons
                       std::ostringstream oss; oss << "MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell : on cell #" << i << " presence of nodeId #" << *nodal << " should be in [0," <<   nbOfNodes << ") !";
                       throw INTERP_KERNEL::Exception(oss.str().c_str());
                     }
-                  std::transform(ptToFill,ptToFill+spaceDim,ptToFill,std::bind2nd(std::multiplies<double>(),1./(nodali[1]-nodali[0])));
+                  std::transform(ptToFill,ptToFill+spaceDim,ptToFill,std::bind2nd(std::multiplies<double>(),1./double(nodali[1]-nodali[0])));
                 }
             }
           else
@@ -2672,13 +2676,13 @@ DataArrayDouble *MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell() cons
     }
   else
     {
-      for(int i=0;i<nbOfCells;i++,ptToFill+=spaceDim,nodali++)
+      for(mcIdType i=0;i<nbOfCells;i++,ptToFill+=spaceDim,nodali++)
         {
           std::fill(ptToFill,ptToFill+spaceDim,0.);
           if(nodali[0]<nodali[1])// >= to avoid division by 0.
             {
               int nbOfNod=0;
-              for(int j=nodali[0];j<nodali[1];j++,nodal++)
+              for(mcIdType j=nodali[0];j<nodali[1];j++,nodal++)
                 {
                   if(*nodal==-1) continue;
                   if(*nodal>=0 && *nodal<nbOfNodes)
@@ -2710,26 +2714,26 @@ DataArrayDouble *MEDCoupling1DGTUMesh::computeIsoBarycenterOfNodesPerCell() cons
   return ret.retn();
 }
 
-void MEDCoupling1DGTUMesh::renumberCells(const int *old2NewBg, bool check)
+void MEDCoupling1DGTUMesh::renumberCells(const mcIdType *old2NewBg, bool check)
 {
-  int nbCells=getNumberOfCells();
-  MCAuto<DataArrayInt> o2n=DataArrayInt::New();
+  mcIdType nbCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> o2n=DataArrayIdType::New();
   o2n->useArray(old2NewBg,false,DeallocType::C_DEALLOC,nbCells,1);
   if(check)
     o2n=o2n->checkAndPreparePermutation();
   //
-  const int *o2nPtr=o2n->getPointer();
-  const int *conn=_conn->begin(),*conni=_conn_indx->begin();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New();
+  const mcIdType *o2nPtr=o2n->getPointer();
+  const mcIdType *conn=_conn->begin(),*conni=_conn_indx->begin();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New();
   newConn->alloc(_conn->getNumberOfTuples(),1); newConnI->alloc(nbCells,1);
   newConn->copyStringInfoFrom(*_conn); newConnI->copyStringInfoFrom(*_conn_indx);
   //
-  int *newC=newConn->getPointer(),*newCI=newConnI->getPointer();
-  for(int i=0;i<nbCells;i++)
+  mcIdType *newC=newConn->getPointer(),*newCI=newConnI->getPointer();
+  for(mcIdType i=0;i<nbCells;i++)
     {
-      int newPos=o2nPtr[i];
-      int sz=conni[i+1]-conni[i];
+      mcIdType newPos=o2nPtr[i];
+      mcIdType sz=conni[i+1]-conni[i];
       if(sz>=0)
         newCI[newPos]=sz;
       else
@@ -2740,9 +2744,9 @@ void MEDCoupling1DGTUMesh::renumberCells(const int *old2NewBg, bool check)
     }
   newConnI->computeOffsetsFull(); newCI=newConnI->getPointer();
   //
-  for(int i=0;i<nbCells;i++,conni++)
+  for(mcIdType i=0;i<nbCells;i++,conni++)
     {
-      int newp=o2nPtr[i];
+      mcIdType newp=o2nPtr[i];
       std::copy(conn+conni[0],conn+conni[1],newC+newCI[newp]);
     }
   _conn=newConn;
@@ -2761,16 +2765,16 @@ MEDCouplingUMesh *MEDCoupling1DGTUMesh::buildUnstructured() const
 {
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),getMeshDimension());
   ret->setCoords(getCoords());
-  const int *nodalConn=_conn->begin(),*nodalConnI=_conn_indx->begin();
-  int nbCells=getNumberOfCells();//checkConsistencyLight
-  int geoType=(int)getCellModelEnum();
-  MCAuto<DataArrayInt> c=DataArrayInt::New(); c->alloc(nbCells+_conn->getNumberOfTuples(),1);
-  MCAuto<DataArrayInt> cI=DataArrayInt::New(); cI->alloc(nbCells+1);
-  int *cPtr=c->getPointer(),*ciPtr=cI->getPointer();
+  const mcIdType *nodalConn=_conn->begin(),*nodalConnI=_conn_indx->begin();
+  mcIdType nbCells=getNumberOfCells();//checkConsistencyLight
+  mcIdType geoType=ToIdType(getCellModelEnum());
+  MCAuto<DataArrayIdType> c=DataArrayIdType::New(); c->alloc(nbCells+_conn->getNumberOfTuples(),1);
+  MCAuto<DataArrayIdType> cI=DataArrayIdType::New(); cI->alloc(nbCells+1);
+  mcIdType *cPtr=c->getPointer(),*ciPtr=cI->getPointer();
   ciPtr[0]=0;
-  for(int i=0;i<nbCells;i++,ciPtr++)
+  for(mcIdType i=0;i<nbCells;i++,ciPtr++)
     {
-      int sz=nodalConnI[i+1]-nodalConnI[i];
+      mcIdType sz=nodalConnI[i+1]-nodalConnI[i];
       if(sz>=0)
         {
           *cPtr++=geoType;
@@ -2793,10 +2797,10 @@ MEDCouplingUMesh *MEDCoupling1DGTUMesh::buildUnstructured() const
 /*!
  * Do nothing for the moment, because there is no policy that allows to split polygons, polyhedrons ... into simplexes
  */
-DataArrayInt *MEDCoupling1DGTUMesh::simplexize(int policy)
+DataArrayIdType *MEDCoupling1DGTUMesh::simplexize(int policy)
 {
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
   ret->iota(0);
   return ret.retn();
@@ -2845,26 +2849,26 @@ MEDCouplingPointSet *MEDCoupling1DGTUMesh::mergeMyselfWithOnSameCoords(const MED
   return Merge1DGTUMeshesOnSameCoords(ms);
 }
 
-MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoords(const int *begin, const int *end) const
+MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const
 {
   checkConsistencyLight();
   MCAuto<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
   ret->setCoords(_coords);
-  DataArrayInt *c=0,*ci=0;
-  DataArrayInt::ExtractFromIndexedArrays(begin,end,_conn,_conn_indx,c,ci);
-  MCAuto<DataArrayInt> cSafe(c),ciSafe(ci);
+  DataArrayIdType *c=0,*ci=0;
+  DataArrayIdType::ExtractFromIndexedArrays(begin,end,_conn,_conn_indx,c,ci);
+  MCAuto<DataArrayIdType> cSafe(c),ciSafe(ci);
   ret->setNodalConnectivity(c,ci);
   return ret.retn();
 }
 
-MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const
+MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const
 {
   checkConsistencyLight();
   MCAuto<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
   ret->setCoords(_coords);
-  DataArrayInt *c=0,*ci=0;
-  DataArrayInt::ExtractFromIndexedArraysSlice(start,end,step,_conn,_conn_indx,c,ci);
-  MCAuto<DataArrayInt> cSafe(c),ciSafe(ci);
+  DataArrayIdType *c=0,*ci=0;
+  DataArrayIdType::ExtractFromIndexedArraysSlice(start,end,step,_conn,_conn_indx,c,ci);
+  MCAuto<DataArrayIdType> cSafe(c),ciSafe(ci);
   ret->setNodalConnectivity(c,ci);
   return ret.retn();
 }
@@ -2872,8 +2876,8 @@ MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoordsSlice(int
 void MEDCoupling1DGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const
 {
   checkConsistency();
-  int sz((int)nodeIdsInUse.size());
-  for(const int *conn=_conn->begin();conn!=_conn->end();conn++)
+  mcIdType sz(ToIdType(nodeIdsInUse.size()));
+  for(const mcIdType *conn=_conn->begin();conn!=_conn->end();conn++)
     {
       if(*conn>=0 && *conn<sz)
         nodeIdsInUse[*conn]=true;
@@ -2888,24 +2892,24 @@ void MEDCoupling1DGTUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) co
     }
 }
 
-void MEDCoupling1DGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const
+void MEDCoupling1DGTUMesh::getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const
 {
   checkFullyDefined();
-  int nbOfNodes=getNumberOfNodes();
-  int *revNodalIndxPtr=(int *)malloc((nbOfNodes+1)*sizeof(int));
+  mcIdType nbOfNodes=getNumberOfNodes();
+  mcIdType *revNodalIndxPtr=(mcIdType *)malloc((nbOfNodes+1)*sizeof(mcIdType));
   revNodalIndx->useArray(revNodalIndxPtr,true,DeallocType::C_DEALLOC,nbOfNodes+1,1);
   std::fill(revNodalIndxPtr,revNodalIndxPtr+nbOfNodes+1,0);
-  const int *conn=_conn->begin(),*conni=_conn_indx->begin();
-  int nbOfCells=getNumberOfCells();
-  int nbOfEltsInRevNodal=0;
-  for(int eltId=0;eltId<nbOfCells;eltId++)
+  const mcIdType *conn=_conn->begin(),*conni=_conn_indx->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType nbOfEltsInRevNodal=0;
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++)
     {
-      int nbOfNodesPerCell=conni[eltId+1]-conni[eltId];
+      mcIdType nbOfNodesPerCell=conni[eltId+1]-conni[eltId];
       if(nbOfNodesPerCell>=0)
         {
-          for(int j=0;j<nbOfNodesPerCell;j++)
+          for(mcIdType j=0;j<nbOfNodesPerCell;j++)
             {
-              int nodeId=conn[conni[eltId]+j];
+              mcIdType nodeId=conn[conni[eltId]+j];
               if(nodeId==-1) continue;            
               if(nodeId>=0 && nodeId<nbOfNodes)
                 {
@@ -2925,35 +2929,35 @@ void MEDCoupling1DGTUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, D
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
     }
-  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<int>());
+  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<mcIdType>());
   conn=_conn->begin();
-  int *revNodalPtr=(int *)malloc((nbOfEltsInRevNodal)*sizeof(int));
+  mcIdType *revNodalPtr=(mcIdType *)malloc((nbOfEltsInRevNodal)*sizeof(mcIdType));
   revNodal->useArray(revNodalPtr,true,DeallocType::C_DEALLOC,nbOfEltsInRevNodal,1);
   std::fill(revNodalPtr,revNodalPtr+nbOfEltsInRevNodal,-1);
-  for(int eltId=0;eltId<nbOfCells;eltId++)
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++)
     {
-      int nbOfNodesPerCell=conni[eltId+1]-conni[eltId];
-      for(int j=0;j<nbOfNodesPerCell;j++)
+      mcIdType nbOfNodesPerCell=conni[eltId+1]-conni[eltId];
+      for(mcIdType j=0;j<nbOfNodesPerCell;j++)
         {
-          int nodeId=conn[conni[eltId]+j];
+          mcIdType nodeId=conn[conni[eltId]+j];
           if(nodeId!=-1)
-            *std::find_if(revNodalPtr+revNodalIndxPtr[nodeId],revNodalPtr+revNodalIndxPtr[nodeId+1],std::bind2nd(std::equal_to<int>(),-1))=eltId;
+            *std::find_if(revNodalPtr+revNodalIndxPtr[nodeId],revNodalPtr+revNodalIndxPtr[nodeId+1],std::bind2nd(std::equal_to<mcIdType>(),-1))=eltId;
         }
     }
 }
 
 void MEDCoupling1DGTUMesh::checkFullyDefined() const
 {
-  if(!((const DataArrayInt *)_conn) || !((const DataArrayInt *)_conn_indx) || !((const DataArrayDouble *)_coords))
+  if(!((const DataArrayIdType *)_conn) || !((const DataArrayIdType *)_conn_indx) || !((const DataArrayDouble *)_coords))
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::checkFullyDefined : part of this is not fully defined.");
 }
 
-bool MEDCoupling1DGTUMesh::isEmptyMesh(const std::vector<int>& tinyInfo) const
+bool MEDCoupling1DGTUMesh::isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const
 {
   throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::isEmptyMesh : not implemented yet !");
 }
 
-void MEDCoupling1DGTUMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCoupling1DGTUMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
   int it,order;
   double time=getTime(it,order);
@@ -2966,11 +2970,11 @@ void MEDCoupling1DGTUMesh::getTinySerializationInformation(std::vector<double>&
   std::vector<std::string> littleStrings2,littleStrings3,littleStrings4;
   if((const DataArrayDouble *)_coords)
     _coords->getTinySerializationStrInformation(littleStrings2);
-  if((const DataArrayInt *)_conn)
+  if((const DataArrayIdType *)_conn)
     _conn->getTinySerializationStrInformation(littleStrings3);
-  if((const DataArrayInt *)_conn_indx)
+  if((const DataArrayIdType *)_conn_indx)
     _conn_indx->getTinySerializationStrInformation(littleStrings4);
-  int sz0((int)littleStrings2.size()),sz1((int)littleStrings3.size()),sz2((int)littleStrings4.size());
+  mcIdType sz0(ToIdType(littleStrings2.size())),sz1(ToIdType(littleStrings3.size())),sz2(ToIdType(littleStrings4.size()));
   littleStrings.insert(littleStrings.end(),littleStrings2.begin(),littleStrings2.end());
   littleStrings.insert(littleStrings.end(),littleStrings3.begin(),littleStrings3.end());
   littleStrings.insert(littleStrings.end(),littleStrings4.begin(),littleStrings4.end());
@@ -2978,14 +2982,14 @@ void MEDCoupling1DGTUMesh::getTinySerializationInformation(std::vector<double>&
   tinyInfo.push_back(getCellModelEnum());
   tinyInfo.push_back(it);
   tinyInfo.push_back(order);
-  std::vector<int> tinyInfo2,tinyInfo3,tinyInfo4;
+  std::vector<mcIdType> tinyInfo2,tinyInfo3,tinyInfo4;
   if((const DataArrayDouble *)_coords)
     _coords->getTinySerializationIntInformation(tinyInfo2);
-  if((const DataArrayInt *)_conn)
+  if((const DataArrayIdType *)_conn)
     _conn->getTinySerializationIntInformation(tinyInfo3);
-  if((const DataArrayInt *)_conn_indx)
+  if((const DataArrayIdType *)_conn_indx)
     _conn_indx->getTinySerializationIntInformation(tinyInfo4);
-  int sz3((int)tinyInfo2.size()),sz4((int)tinyInfo3.size()),sz5((int)tinyInfo4.size());
+  mcIdType sz3(ToIdType(tinyInfo2.size())),sz4(ToIdType(tinyInfo3.size())),sz5(ToIdType(tinyInfo4.size()));
   tinyInfo.push_back(sz0); tinyInfo.push_back(sz1); tinyInfo.push_back(sz2); tinyInfo.push_back(sz3); tinyInfo.push_back(sz4);  tinyInfo.push_back(sz5);
   tinyInfo.insert(tinyInfo.end(),tinyInfo2.begin(),tinyInfo2.end());
   tinyInfo.insert(tinyInfo.end(),tinyInfo3.begin(),tinyInfo3.end());
@@ -2994,34 +2998,34 @@ void MEDCoupling1DGTUMesh::getTinySerializationInformation(std::vector<double>&
   tinyInfoD.push_back(time);
 }
 
-void MEDCoupling1DGTUMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCoupling1DGTUMesh::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
-  std::vector<int> tinyInfo2(tinyInfo.begin()+9,tinyInfo.begin()+9+tinyInfo[6]);
-  std::vector<int> tinyInfo1(tinyInfo.begin()+9+tinyInfo[6],tinyInfo.begin()+9+tinyInfo[6]+tinyInfo[7]);
-  std::vector<int> tinyInfo12(tinyInfo.begin()+9+tinyInfo[6]+tinyInfo[7],tinyInfo.begin()+9+tinyInfo[6]+tinyInfo[7]+tinyInfo[8]);
-  MCAuto<DataArrayInt> p1(DataArrayInt::New()); p1->resizeForUnserialization(tinyInfo1);
-  MCAuto<DataArrayInt> p2(DataArrayInt::New()); p2->resizeForUnserialization(tinyInfo12);
-  std::vector<const DataArrayInt *> v(2); v[0]=p1; v[1]=p2;
-  p2=DataArrayInt::Aggregate(v);
+  std::vector<mcIdType> tinyInfo2(tinyInfo.begin()+9,tinyInfo.begin()+9+tinyInfo[6]);
+  std::vector<mcIdType> tinyInfo1(tinyInfo.begin()+9+tinyInfo[6],tinyInfo.begin()+9+tinyInfo[6]+tinyInfo[7]);
+  std::vector<mcIdType> tinyInfo12(tinyInfo.begin()+9+tinyInfo[6]+tinyInfo[7],tinyInfo.begin()+9+tinyInfo[6]+tinyInfo[7]+tinyInfo[8]);
+  MCAuto<DataArrayIdType> p1(DataArrayIdType::New()); p1->resizeForUnserialization(tinyInfo1);
+  MCAuto<DataArrayIdType> p2(DataArrayIdType::New()); p2->resizeForUnserialization(tinyInfo12);
+  std::vector<const DataArrayIdType *> v(2); v[0]=p1; v[1]=p2;
+  p2=DataArrayIdType::Aggregate(v);
   a2->resizeForUnserialization(tinyInfo2);
   a1->alloc(p2->getNbOfElems(),1);
 }
 
-void MEDCoupling1DGTUMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCoupling1DGTUMesh::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
-  int sz(0);
-  if((const DataArrayInt *)_conn)
+  mcIdType sz(0);
+  if((const DataArrayIdType *)_conn)
     if(_conn->isAllocated())
       sz=_conn->getNbOfElems();
-  if((const DataArrayInt *)_conn_indx)
+  if((const DataArrayIdType *)_conn_indx)
     if(_conn_indx->isAllocated())
       sz+=_conn_indx->getNbOfElems();
-  a1=DataArrayInt::New();
+  a1=DataArrayIdType::New();
   a1->alloc(sz,1);
-  int *work(a1->getPointer());
-  if(sz!=0 && (const DataArrayInt *)_conn)
+  mcIdType *work(a1->getPointer());
+  if(sz!=0 && (const DataArrayIdType *)_conn)
     work=std::copy(_conn->begin(),_conn->end(),a1->getPointer());
-  if(sz!=0 && (const DataArrayInt *)_conn_indx)
+  if(sz!=0 && (const DataArrayIdType *)_conn_indx)
     std::copy(_conn_indx->begin(),_conn_indx->end(),work);
   sz=0;
   if((const DataArrayDouble *)_coords)
@@ -3033,7 +3037,7 @@ void MEDCoupling1DGTUMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) co
     std::copy(_coords->begin(),_coords->end(),a2->getPointer());
 }
 
-void MEDCoupling1DGTUMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+void MEDCoupling1DGTUMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                            const std::vector<std::string>& littleStrings)
 {
   INTERP_KERNEL::NormalizedCellType gt((INTERP_KERNEL::NormalizedCellType)tinyInfo[0]);
@@ -3041,19 +3045,19 @@ void MEDCoupling1DGTUMesh::unserialization(const std::vector<double>& tinyInfoD,
   setName(littleStrings[0]);
   setDescription(littleStrings[1]);
   setTimeUnit(littleStrings[2]);
-  setTime(tinyInfoD[0],tinyInfo[1],tinyInfo[2]);
-  int sz0(tinyInfo[3]),sz1(tinyInfo[4]),sz2(tinyInfo[5]),sz3(tinyInfo[6]),sz4(tinyInfo[7]),sz5(tinyInfo[8]);
+  setTime(tinyInfoD[0],FromIdType<int>(tinyInfo[1]),FromIdType<int>(tinyInfo[2]));
+  mcIdType sz0(tinyInfo[3]),sz1(tinyInfo[4]),sz2(tinyInfo[5]),sz3(tinyInfo[6]),sz4(tinyInfo[7]),sz5(tinyInfo[8]);
   //
   _coords=DataArrayDouble::New();
-  std::vector<int> tinyInfo2(tinyInfo.begin()+9,tinyInfo.begin()+9+sz3);
+  std::vector<mcIdType> tinyInfo2(tinyInfo.begin()+9,tinyInfo.begin()+9+sz3);
   _coords->resizeForUnserialization(tinyInfo2);
   std::copy(a2->begin(),a2->end(),_coords->getPointer());
-  _conn=DataArrayInt::New();
-  std::vector<int> tinyInfo3(tinyInfo.begin()+9+sz3,tinyInfo.begin()+9+sz3+sz4);
+  _conn=DataArrayIdType::New();
+  std::vector<mcIdType> tinyInfo3(tinyInfo.begin()+9+sz3,tinyInfo.begin()+9+sz3+sz4);
   _conn->resizeForUnserialization(tinyInfo3);
   std::copy(a1->begin(),a1->begin()+_conn->getNbOfElems(),_conn->getPointer());
-  _conn_indx=DataArrayInt::New();
-  std::vector<int> tinyInfo4(tinyInfo.begin()+9+sz3+sz4,tinyInfo.begin()+9+sz3+sz4+sz5);
+  _conn_indx=DataArrayIdType::New();
+  std::vector<mcIdType> tinyInfo4(tinyInfo.begin()+9+sz3+sz4,tinyInfo.begin()+9+sz3+sz4+sz5);
   _conn_indx->resizeForUnserialization(tinyInfo4);
   std::copy(a1->begin()+_conn->getNbOfElems(),a1->end(),_conn_indx->getPointer());
   std::vector<std::string> littleStrings2(littleStrings.begin()+3,littleStrings.begin()+3+sz0);
@@ -3069,7 +3073,7 @@ void MEDCoupling1DGTUMesh::unserialization(const std::vector<double>& tinyInfoD,
  * by excluding the unused nodes, for which the array holds -1. The result array is
  * a mapping in "Old to New" mode.
  *  \param [out] nbrOfNodesInUse - number of node ids present in the nodal connectivity.
- *  \return DataArrayInt * - a new instance of DataArrayInt. Its length is \a
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType. Its length is \a
  *          this->getNumberOfNodes(). It holds for each node of \a this mesh either -1
  *          if the node is unused or a new id else. The caller is to delete this
  *          array using decrRef() as it is no more needed.
@@ -3078,16 +3082,16 @@ void MEDCoupling1DGTUMesh::unserialization(const std::vector<double>& tinyInfoD,
  *  \throw If the nodal connectivity includes an invalid id.
  *  \sa MEDCoupling1DGTUMesh::getNodeIdsInUse, areAllNodesFetched
  */
-DataArrayInt *MEDCoupling1DGTUMesh::computeFetchedNodeIds() const
+DataArrayIdType *MEDCoupling1DGTUMesh::computeFetchedNodeIds() const
 {
   checkConsistency();
-  int nbNodes(getNumberOfNodes());
+  mcIdType nbNodes(getNumberOfNodes());
   std::vector<bool> fetchedNodes(nbNodes,false);
   computeNodeIdsAlg(fetchedNodes);
-  int sz((int)std::count(fetchedNodes.begin(),fetchedNodes.end(),true));
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(sz,1);
-  int *retPtr(ret->getPointer());
-  for(int i=0;i<nbNodes;i++)
+  mcIdType sz(ToIdType(std::count(fetchedNodes.begin(),fetchedNodes.end(),true)));
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(sz,1);
+  mcIdType *retPtr(ret->getPointer());
+  for(mcIdType i=0;i<nbNodes;i++)
     if(fetchedNodes[i])
       *retPtr++=i;
   return ret.retn();
@@ -3098,7 +3102,7 @@ DataArrayInt *MEDCoupling1DGTUMesh::computeFetchedNodeIds() const
  * by excluding the unused nodes, for which the array holds -1. The result array is
  * a mapping in "Old to New" mode. 
  *  \param [out] nbrOfNodesInUse - number of node ids present in the nodal connectivity.
- *  \return DataArrayInt * - a new instance of DataArrayInt. Its length is \a
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType. Its length is \a
  *          this->getNumberOfNodes(). It holds for each node of \a this mesh either -1
  *          if the node is unused or a new id else. The caller is to delete this
  *          array using decrRef() as it is no more needed.  
@@ -3107,22 +3111,22 @@ DataArrayInt *MEDCoupling1DGTUMesh::computeFetchedNodeIds() const
  *  \throw If the nodal connectivity includes an invalid id.
  *  \sa MEDCoupling1DGTUMesh::computeFetchedNodeIds, areAllNodesFetched
  */
-DataArrayInt *MEDCoupling1DGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
+DataArrayIdType *MEDCoupling1DGTUMesh::getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const
 {
   nbrOfNodesInUse=-1;
-  int nbOfNodes=getNumberOfNodes();
-  int nbOfCells=getNumberOfCells();//checkConsistencyLight
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfCells=getNumberOfCells();//checkConsistencyLight
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfNodes,1);
-  int *traducer=ret->getPointer();
+  mcIdType *traducer=ret->getPointer();
   std::fill(traducer,traducer+nbOfNodes,-1);
-  const int *conn=_conn->begin(),*conni(_conn_indx->begin());
-  for(int i=0;i<nbOfCells;i++,conni++)
+  const mcIdType *conn=_conn->begin(),*conni(_conn_indx->begin());
+  for(mcIdType i=0;i<nbOfCells;i++,conni++)
     {
-      int nbNodesPerCell=conni[1]-conni[0];
-      for(int j=0;j<nbNodesPerCell;j++)
+      mcIdType nbNodesPerCell=conni[1]-conni[0];
+      for(mcIdType j=0;j<nbNodesPerCell;j++)
         {
-          int nodeId=conn[conni[0]+j];
+          mcIdType nodeId=conn[conni[0]+j];
           if(nodeId==-1) continue;
           if(nodeId>=0 && nodeId<nbOfNodes)
             traducer[nodeId]=1;
@@ -3133,7 +3137,7 @@ DataArrayInt *MEDCoupling1DGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
             }
         }
     }
-  nbrOfNodesInUse=(int)std::count(traducer,traducer+nbOfNodes,1);
+  nbrOfNodesInUse=ToIdType(std::count(traducer,traducer+nbOfNodes,1));
   std::transform(traducer,traducer+nbOfNodes,traducer,MEDCouplingAccVisit());
   return ret.retn();
 }
@@ -3146,13 +3150,13 @@ DataArrayInt *MEDCoupling1DGTUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
  *
  * \sa renumberNodesInConn
  */
-void MEDCoupling1DGTUMesh::renumberNodesWithOffsetInConn(int offset)
+void MEDCoupling1DGTUMesh::renumberNodesWithOffsetInConn(mcIdType offset)
 {
   getNumberOfCells();//only to check that all is well defined.
   //
-  int nbOfTuples(_conn->getNumberOfTuples());
-  int *pt(_conn->getPointer());
-  for(int i=0;i<nbOfTuples;i++,pt++)
+  mcIdType nbOfTuples(_conn->getNumberOfTuples());
+  mcIdType *pt(_conn->getPointer());
+  for(mcIdType i=0;i<nbOfTuples;i++,pt++)
     {
       if(*pt==-1) continue;
       *pt+=offset;
@@ -3162,23 +3166,23 @@ void MEDCoupling1DGTUMesh::renumberNodesWithOffsetInConn(int offset)
 }
 
 /*!
- *  Same than renumberNodesInConn(const int *) except that here the format of old-to-new traducer is using map instead
+ *  Same than renumberNodesInConn(const mcIdType *) except that here the format of old-to-new traducer is using map instead
  *  of array. This method is dedicated for renumbering from a big set of nodes the a tiny set of nodes which is the case during extraction
  *  of a big mesh.
  */
-void MEDCoupling1DGTUMesh::renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N)
+void MEDCoupling1DGTUMesh::renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N)
 {
-  this->renumberNodesInConnT< INTERP_KERNEL::HashMap<int,int> >(newNodeNumbersO2N);
+  this->renumberNodesInConnT< INTERP_KERNEL::HashMap<mcIdType,mcIdType> >(newNodeNumbersO2N);
 }
 
 /*!
- *  Same than renumberNodesInConn(const int *) except that here the format of old-to-new traducer is using map instead
+ *  Same than renumberNodesInConn(const mcIdType *) except that here the format of old-to-new traducer is using map instead
  *  of array. This method is dedicated for renumbering from a big set of nodes the a tiny set of nodes which is the case during extraction
  *  of a big mesh.
  */
-void MEDCoupling1DGTUMesh::renumberNodesInConn(const std::map<int,int>& newNodeNumbersO2N)
+void MEDCoupling1DGTUMesh::renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N)
 {
-  this->renumberNodesInConnT< std::map<int,int> >(newNodeNumbersO2N);
+  this->renumberNodesInConnT< std::map<mcIdType,mcIdType> >(newNodeNumbersO2N);
 }
 
 /*!
@@ -3191,13 +3195,13 @@ void MEDCoupling1DGTUMesh::renumberNodesInConn(const std::map<int,int>& newNodeN
  *         See \ref numbering for more info on renumbering modes.
  *  \throw If the nodal connectivity of cells is not defined.
  */
-void MEDCoupling1DGTUMesh::renumberNodesInConn(const int *newNodeNumbersO2N)
+void MEDCoupling1DGTUMesh::renumberNodesInConn(const mcIdType *newNodeNumbersO2N)
 {
   getNumberOfCells();//only to check that all is well defined.
   //
-  int nbElemsIn(getNumberOfNodes()),nbOfTuples(_conn->getNumberOfTuples());
-  int *pt(_conn->getPointer());
-  for(int i=0;i<nbOfTuples;i++,pt++)
+  mcIdType nbElemsIn(getNumberOfNodes()),nbOfTuples(_conn->getNumberOfTuples());
+  mcIdType *pt(_conn->getPointer());
+  for(mcIdType i=0;i<nbOfTuples;i++,pt++)
     {
       if(*pt==-1) continue;
       if(*pt>=0 && *pt<nbElemsIn)
@@ -3223,26 +3227,26 @@ void MEDCoupling1DGTUMesh::renumberNodesInConn(const int *newNodeNumbersO2N)
  * \param [in] fullyIn input that specifies if all node ids must be in [\a begin,\a end) array to consider cell to be in.
  * \param [in,out] cellIdsKeptArr array where all candidate cell ids are put at the end.
  */
-void MEDCoupling1DGTUMesh::fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const
+void MEDCoupling1DGTUMesh::fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const
 {
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> cellIdsKept=DataArrayInt::New(); cellIdsKept->alloc(0,1);
-  int tmp=-1;
-  int sz=_conn->getMaxValue(tmp); sz=std::max(sz,0)+1;
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> cellIdsKept=DataArrayIdType::New(); cellIdsKept->alloc(0,1);
+  mcIdType tmp=-1;
+  mcIdType sz=_conn->getMaxValue(tmp); sz=std::max(sz,ToIdType(0))+1;
   std::vector<bool> fastFinder(sz,false);
-  for(const int *work=begin;work!=end;work++)
+  for(const mcIdType *work=begin;work!=end;work++)
     if(*work>=0 && *work<sz)
       fastFinder[*work]=true;
-  const int *conn=_conn->begin(),*conni=_conn_indx->begin();
-  for(int i=0;i<nbOfCells;i++,conni++)
+  const mcIdType *conn=_conn->begin(),*conni=_conn_indx->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,conni++)
     {
       int ref=0,nbOfHit=0;
-      int nbNodesPerCell=conni[1]-conni[0];
+      mcIdType nbNodesPerCell=conni[1]-conni[0];
       if(nbNodesPerCell>=0)
         {
-          for(int j=0;j<nbNodesPerCell;j++)
+          for(mcIdType j=0;j<nbNodesPerCell;j++)
             {
-              int nodeId=conn[conni[0]+j];
+              mcIdType nodeId=conn[conni[0]+j];
               if(nodeId>=0)
                 {
                   ref++;
@@ -3262,13 +3266,13 @@ void MEDCoupling1DGTUMesh::fillCellIdsToKeepFromNodeIds(const int *begin, const
   cellIdsKeptArr=cellIdsKept.retn();
 }
 
-void MEDCoupling1DGTUMesh::allocateCells(int nbOfCells)
+void MEDCoupling1DGTUMesh::allocateCells(mcIdType nbOfCells)
 {
   if(nbOfCells<0)
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::allocateCells : the input number of cells should be >= 0 !");
-  _conn=DataArrayInt::New();
+  _conn=DataArrayIdType::New();
   _conn->reserve(nbOfCells*3);
-  _conn_indx=DataArrayInt::New();
+  _conn_indx=DataArrayIdType::New();
   _conn_indx->reserve(nbOfCells+1); _conn_indx->pushBackSilent(0);
   declareAsNew();
 }
@@ -3282,17 +3286,17 @@ void MEDCoupling1DGTUMesh::allocateCells(int nbOfCells)
  *        attached to \a this.
  * \throw If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
  */
-void MEDCoupling1DGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd)
+void MEDCoupling1DGTUMesh::insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd)
 {
   std::size_t sz(std::distance(nodalConnOfCellBg,nodalConnOfCellEnd));
-  DataArrayInt *c(_conn),*c2(_conn_indx);
+  DataArrayIdType *c(_conn),*c2(_conn_indx);
   if(c && c2)
     {
-      int pos=c2->back();
-      if(pos==(int)c->getNumberOfTuples())
+      mcIdType pos=c2->back();
+      if(pos==c->getNumberOfTuples())
         {
           c->pushBackValsSilent(nodalConnOfCellBg,nodalConnOfCellEnd);
-          c2->pushBackSilent(pos+sz);
+          c2->pushBackSilent(pos+ToIdType(sz));
         }
       else
         {
@@ -3304,7 +3308,7 @@ void MEDCoupling1DGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const in
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::insertNextCell : nodal connectivity array is null ! Call MEDCoupling1DGTUMesh::allocateCells before !");
 }
 
-void MEDCoupling1DGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn, DataArrayInt *nodalConnIndex)
+void MEDCoupling1DGTUMesh::setNodalConnectivity(DataArrayIdType *nodalConn, DataArrayIdType *nodalConnIndex)
 {
   if(nodalConn)
     nodalConn->incrRef();
@@ -3316,21 +3320,21 @@ void MEDCoupling1DGTUMesh::setNodalConnectivity(DataArrayInt *nodalConn, DataArr
 }
 
 /*!
- * \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not responsible to deallocate it.
+ * \return DataArrayIdType * - the internal reference to the nodal connectivity. The caller is not responsible to deallocate it.
  */
-DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivity() const
+DataArrayIdType *MEDCoupling1DGTUMesh::getNodalConnectivity() const
 {
-  const DataArrayInt *ret(_conn);
-  return const_cast<DataArrayInt *>(ret);
+  const DataArrayIdType *ret(_conn);
+  return const_cast<DataArrayIdType *>(ret);
 }
 
 /*!
- * \return DataArrayInt * - the internal reference to the nodal connectivity index. The caller is not responsible to deallocate it.
+ * \return DataArrayIdType * - the internal reference to the nodal connectivity index. The caller is not responsible to deallocate it.
  */
-DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivityIndex() const
+DataArrayIdType *MEDCoupling1DGTUMesh::getNodalConnectivityIndex() const
 {
-  const DataArrayInt *ret(_conn_indx);
-  return const_cast<DataArrayInt *>(ret);
+  const DataArrayIdType *ret(_conn_indx);
+  return const_cast<DataArrayIdType *>(ret);
 }
 
 /*!
@@ -3349,9 +3353,9 @@ DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivityIndex() const
 MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(bool& isShallowCpyOfNodalConnn) const
 {
   MCAuto<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
-  DataArrayInt *nc=0,*nci=0;
+  DataArrayIdType *nc=0,*nci=0;
   isShallowCpyOfNodalConnn=retrievePackedNodalConnectivity(nc,nci);
-  MCAuto<DataArrayInt> ncs(nc),ncis(nci);
+  MCAuto<DataArrayIdType> ncs(nc),ncis(nci);
   ret->_conn=ncs; ret->_conn_indx=ncis;
   ret->setCoords(getCoords());
   return ret.retn();
@@ -3378,18 +3382,18 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(bool
  *
  * \throw if \a this does not pass MEDCoupling1DGTUMesh::checkConsistencyLight test
  */
-bool MEDCoupling1DGTUMesh::retrievePackedNodalConnectivity(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndx) const
+bool MEDCoupling1DGTUMesh::retrievePackedNodalConnectivity(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndx) const
 {
   if(isPacked())//performs the checkConsistencyLight
     {
-      const DataArrayInt *c0(_conn),*c1(_conn_indx);
-      nodalConn=const_cast<DataArrayInt *>(c0); nodalConnIndx=const_cast<DataArrayInt *>(c1);
+      const DataArrayIdType *c0(_conn),*c1(_conn_indx);
+      nodalConn=const_cast<DataArrayIdType *>(c0); nodalConnIndx=const_cast<DataArrayIdType *>(c1);
       nodalConn->incrRef(); nodalConnIndx->incrRef();
       return true;
     }
-  int bg=_conn_indx->front(),end=_conn_indx->back();
-  MCAuto<DataArrayInt> nc(_conn->selectByTupleIdSafeSlice(bg,end,1));
-  MCAuto<DataArrayInt> nci(_conn_indx->deepCopy());
+  mcIdType bg=_conn_indx->front(),end=_conn_indx->back();
+  MCAuto<DataArrayIdType> nc(_conn->selectByTupleIdSafeSlice(bg,end,1));
+  MCAuto<DataArrayIdType> nci(_conn_indx->deepCopy());
   nci->applyLin(1,-bg);
   nodalConn=nc.retn(); nodalConnIndx=nci.retn();
   return false;
@@ -3406,7 +3410,7 @@ bool MEDCoupling1DGTUMesh::retrievePackedNodalConnectivity(DataArrayInt *&nodalC
 bool MEDCoupling1DGTUMesh::isPacked() const
 {
   checkConsistencyLight();
-  return _conn_indx->front()==0 && _conn_indx->back()==(int)_conn->getNumberOfTuples();
+  return _conn_indx->front()==0 && _conn_indx->back()==_conn->getNumberOfTuples();
 }
 
 MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshes(const MEDCoupling1DGTUMesh *mesh1, const MEDCoupling1DGTUMesh *mesh2)
@@ -3433,15 +3437,15 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshes(std::vector<const M
       throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshes : all items must have the same geo type !");
   std::vector< MCAuto<MEDCoupling1DGTUMesh> > bb(sz);
   std::vector< const MEDCoupling1DGTUMesh * > aa(sz);
-  int spaceDim=-3;
-  for(std::size_t i=0;i<sz && spaceDim==-3;i++)
+  std::size_t spaceDimUndef=-3, spaceDim=spaceDimUndef;
+  for(std::size_t i=0;i<sz && spaceDim==spaceDimUndef;i++)
     {
       const MEDCoupling1DGTUMesh *cur=a[i];
       const DataArrayDouble *coo=cur->getCoords();
       if(coo)
         spaceDim=coo->getNumberOfComponents();
     }
-  if(spaceDim==-3)
+  if(spaceDim==spaceDimUndef)
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshes : no spaceDim specified ! unable to perform merge !");
   for(std::size_t i=0;i<sz;i++)
     {
@@ -3463,7 +3467,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(std::ve
   if(!(*it))
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords : null instance in the first element of input vector !");
   std::vector< MCAuto<MEDCoupling1DGTUMesh> > objs(a.size());
-  std::vector<const DataArrayInt *> ncs(a.size()),ncis(a.size());
+  std::vector<const DataArrayIdType *> ncs(a.size()),ncis(a.size());
   (*it)->getNumberOfCells();//to check that all is OK
   const DataArrayDouble *coords=(*it)->getCoords();
   const INTERP_KERNEL::CellModel *cm=&((*it)->getCellModel());
@@ -3485,8 +3489,8 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(std::ve
     }
   MCAuto<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh("merge",*cm));
   ret->setCoords(coords);
-  ret->_conn=DataArrayInt::Aggregate(ncs);
-  ret->_conn_indx=DataArrayInt::AggregateIndexes(ncis);
+  ret->_conn=DataArrayIdType::Aggregate(ncs);
+  ret->_conn_indx=DataArrayIdType::AggregateIndexes(ncis);
   return ret.retn();
 }
 
@@ -3498,15 +3502,15 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesLL(std::vector<const
   if(a.empty())
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::Merge1DGTUMeshes : input array must be NON EMPTY !");
   std::vector< MCAuto<MEDCoupling1DGTUMesh> > objs(a.size());
-  std::vector<const DataArrayInt *> ncs(a.size()),ncis(a.size());
+  std::vector<const DataArrayIdType *> ncs(a.size()),ncis(a.size());
   std::vector<const MEDCoupling1DGTUMesh *>::const_iterator it=a.begin();
-  std::vector<int> nbNodesPerElt(a.size());
-  int nbOfCells=(*it)->getNumberOfCells();
+  std::vector<mcIdType> nbNodesPerElt(a.size());
+  std::size_t nbOfCells=(*it)->getNumberOfCells();
   bool tmp;
   objs[0]=(*it)->copyWithNodalConnectivityPacked(tmp);
   ncs[0]=objs[0]->getNodalConnectivity(); ncis[0]=objs[0]->getNodalConnectivityIndex();
   nbNodesPerElt[0]=0;
-  int prevNbOfNodes=(*it)->getNumberOfNodes();
+  mcIdType prevNbOfNodes=(*it)->getNumberOfNodes();
   const INTERP_KERNEL::CellModel *cm=&((*it)->getCellModel());
   it++;
   for(int i=1;it!=a.end();i++,it++)
@@ -3525,18 +3529,18 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesLL(std::vector<const
   MCAuto<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh("merge",*cm));
   ret->setCoords(pts);
   ret->_conn=AggregateNodalConnAndShiftNodeIds(ncs,nbNodesPerElt);
-  ret->_conn_indx=DataArrayInt::AggregateIndexes(ncis);
+  ret->_conn_indx=DataArrayIdType::AggregateIndexes(ncis);
   return ret.retn();
 }
 
-MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(int spaceDim) const
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(std::size_t spaceDim) const
 {
   MCAuto<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
-  MCAuto<DataArrayInt> tmp1,tmp2;
-  const DataArrayInt *nodalConn(_conn),*nodalConnI(_conn_indx);
+  MCAuto<DataArrayIdType> tmp1,tmp2;
+  const DataArrayIdType *nodalConn(_conn),*nodalConnI(_conn_indx);
   if(!nodalConn)
     {
-      tmp1=DataArrayInt::New(); tmp1->alloc(0,1);
+      tmp1=DataArrayIdType::New(); tmp1->alloc(0,1);
     }
   else
     tmp1=_conn;
@@ -3544,7 +3548,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(int spaceDi
   //
   if(!nodalConnI)
     {
-      tmp2=DataArrayInt::New(); tmp2->alloc(1,1); tmp2->setIJ(0,0,0);
+      tmp2=DataArrayIdType::New(); tmp2->alloc(1,1); tmp2->setIJ(0,0,0);
     }
   else
     tmp2=_conn_indx;
@@ -3573,23 +3577,23 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(int spaceDi
 DataArrayDouble *MEDCoupling1DGTUMesh::getBoundingBoxForBBTree(double arcDetEps) const
 {
   checkFullyDefined();
-  int spaceDim(getSpaceDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
+  mcIdType spaceDim(getSpaceDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
   double *bbox(ret->getPointer());
-  for(int i=0;i<nbOfCells*spaceDim;i++)
+  for(mcIdType i=0;i<nbOfCells*spaceDim;i++)
     {
       bbox[2*i]=std::numeric_limits<double>::max();
       bbox[2*i+1]=-std::numeric_limits<double>::max();
     }
   const double *coordsPtr(_coords->getConstPointer());
-  const int *conn(_conn->getConstPointer()),*connI(_conn_indx->getConstPointer());
-  for(int i=0;i<nbOfCells;i++)
+  const mcIdType *conn(_conn->getConstPointer()),*connI(_conn_indx->getConstPointer());
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int offset=connI[i];
-      int nbOfNodesForCell(connI[i+1]-offset),kk(0);
-      for(int j=0;j<nbOfNodesForCell;j++)
+      mcIdType offset=connI[i];
+      mcIdType nbOfNodesForCell(connI[i+1]-offset),kk(0);
+      for(mcIdType j=0;j<nbOfNodesForCell;j++)
         {
-          int nodeId=conn[offset+j];
+          mcIdType nodeId=conn[offset+j];
           if(nodeId>=0 && nodeId<nbOfNodes)
             {
               for(int k=0;k<spaceDim;k++)
@@ -3619,13 +3623,13 @@ MEDCouplingFieldDouble *MEDCoupling1DGTUMesh::computeDiameterField() const
   throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::computeDiameterField : not implemented yet for dynamic types !");
 }
 
-std::vector<int> MEDCoupling1DGTUMesh::BuildAPolygonFromParts(const std::vector< std::vector<int> >& parts)
+std::vector<mcIdType> MEDCoupling1DGTUMesh::BuildAPolygonFromParts(const std::vector< std::vector<mcIdType> >& parts)
 {
-  std::vector<int> ret;
+  std::vector<mcIdType> ret;
   if(parts.empty())
     return ret;
   ret.insert(ret.end(),parts[0].begin(),parts[0].end());
-  int ref(ret.back());
+  mcIdType ref(ret.back());
   std::size_t sz(parts.size()),nbh(1);
   std::vector<bool> b(sz,true); b[0]=false;
   while(nbh<sz)
@@ -3651,36 +3655,36 @@ void MEDCoupling1DGTUMesh::invertOrientationOfAllCells()
 {
   checkConsistencyOfConnectivity();
   INTERP_KERNEL::AutoCppPtr<INTERP_KERNEL::OrientationInverter> oi(INTERP_KERNEL::OrientationInverter::BuildInstanceFrom(getCellModelEnum()));
-  int nbCells(getNumberOfCells());
-  const int *connI(_conn_indx->begin());
-  int *conn(_conn->getPointer());
-  for(int i=0;i<nbCells;i++)
+  mcIdType nbCells=getNumberOfCells();
+  const mcIdType *connI(_conn_indx->begin());
+  mcIdType *conn(_conn->getPointer());
+  for(mcIdType i=0;i<nbCells;i++)
     oi->operate(conn+connI[i],conn+connI[i+1]);
   updateTime();
 }
 
 /*!
- * This method performs an aggregation of \a nodalConns (as DataArrayInt::Aggregate does) but in addition of that a shift is applied on the 
+ * This method performs an aggregation of \a nodalConns (as DataArrayIdType::Aggregate does) but in addition of that a shift is applied on the 
  * values contained in \a nodalConns using corresponding offset specified in input \a offsetInNodeIdsPerElt.
  * But it also manage the values -1, that have a semantic in MEDCoupling1DGTUMesh class (separator for polyhedron).
  *
  * \param [in] nodalConns - a list of nodal connectivity arrays same size than \a offsetInNodeIdsPerElt.
  * \param [in] offsetInNodeIdsPerElt - a list of offsets to apply.
- * \return DataArrayInt * - A new object (to be managed by the caller) that is the result of the aggregation.
+ * \return DataArrayIdType * - A new object (to be managed by the caller) that is the result of the aggregation.
  * \throw If \a nodalConns or \a offsetInNodeIdsPerElt are empty.
  * \throw If \a nodalConns and \a offsetInNodeIdsPerElt have not the same size.
  * \throw If presence of null pointer in \a nodalConns.
  * \throw If presence of not allocated or array with not exactly one component in \a nodalConns.
  */
-DataArrayInt *MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayInt *>& nodalConns, const std::vector<int>& offsetInNodeIdsPerElt)
+DataArrayIdType *MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayIdType *>& nodalConns, const std::vector<mcIdType>& offsetInNodeIdsPerElt)
 {
   std::size_t sz1(nodalConns.size()),sz2(offsetInNodeIdsPerElt.size());
   if(sz1!=sz2)
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : input vectors do not have the same size !");
   if(sz1==0)
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : empty vectors in input !");
-  int nbOfTuples=0;
-  for(std::vector<const DataArrayInt *>::const_iterator it=nodalConns.begin();it!=nodalConns.end();it++)
+  mcIdType nbOfTuples=0;
+  for(std::vector<const DataArrayIdType *>::const_iterator it=nodalConns.begin();it!=nodalConns.end();it++)
     {
       if(!(*it))
         throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : presence of null pointer in input vector !");
@@ -3690,15 +3694,15 @@ DataArrayInt *MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(const std:
         throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds : presence of array with not exactly one component !");
       nbOfTuples+=(*it)->getNumberOfTuples();
     }
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(nbOfTuples,1);
-  int *pt=ret->getPointer();
-  int i=0;
-  for(std::vector<const DataArrayInt *>::const_iterator it=nodalConns.begin();it!=nodalConns.end();it++,i++)
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(nbOfTuples,1);
+  mcIdType *pt=ret->getPointer();
+  mcIdType i=0;
+  for(std::vector<const DataArrayIdType *>::const_iterator it=nodalConns.begin();it!=nodalConns.end();it++,i++)
     {
-      int curNbt=(*it)->getNumberOfTuples();
-      const int *inPt=(*it)->begin();
-      int offset=offsetInNodeIdsPerElt[i];
-      for(int j=0;j<curNbt;j++,pt++)
+      mcIdType curNbt=(*it)->getNumberOfTuples();
+      const mcIdType *inPt=(*it)->begin();
+      mcIdType offset=offsetInNodeIdsPerElt[i];
+      for(mcIdType j=0;j<curNbt;j++,pt++)
         {
           if(inPt[j]!=-1)
             *pt=inPt[j]+offset;
@@ -3716,15 +3720,15 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const MEDCouplingUMesh *m)
   std::set<INTERP_KERNEL::NormalizedCellType> gts(m->getAllGeoTypes());
   if(gts.size()!=1)
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::New : input mesh must have exactly one geometric type !");
-  int geoType((int)*gts.begin());
+  mcIdType geoType(ToIdType(*gts.begin()));
   MCAuto<MEDCoupling1DGTUMesh> ret(MEDCoupling1DGTUMesh::New(m->getName(),*gts.begin()));
   ret->setCoords(m->getCoords()); ret->setDescription(m->getDescription());
-  int nbCells(m->getNumberOfCells());
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
+  mcIdType nbCells=m->getNumberOfCells();
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()),connI(DataArrayIdType::New());
   conn->alloc(m->getNodalConnectivityArrayLen()-nbCells,1); connI->alloc(nbCells+1,1);
-  int *c(conn->getPointer()),*ci(connI->getPointer()); *ci=0;
-  const int *cin(m->getNodalConnectivity()->begin()),*ciin(m->getNodalConnectivityIndex()->begin());
-  for(int i=0;i<nbCells;i++,ciin++,ci++)
+  mcIdType *c(conn->getPointer()),*ci(connI->getPointer()); *ci=0;
+  const mcIdType *cin(m->getNodalConnectivity()->begin()),*ciin(m->getNodalConnectivityIndex()->begin());
+  for(mcIdType i=0;i<nbCells;i++,ciin++,ci++)
     {
       if(cin[ciin[0]]==geoType)
         {
index 9c238cf4504e11655b31f3d323a87b30b67c9c66..777d1dd97473ecdb6d09126d1fa1a0f7ad0c67b2 100644 (file)
@@ -41,39 +41,39 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT const INTERP_KERNEL::CellModel& getCellModel() const;
     MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getCellModelEnum() const;
     MEDCOUPLING_EXPORT int getMeshDimension() const;
-    MEDCOUPLING_EXPORT DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(std::size_t cellId) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
     MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
-    MEDCOUPLING_EXPORT std::vector<int> getDistributionOfTypes() const;
-    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller=true) const;
-    MEDCOUPLING_EXPORT DataArrayInt *checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
+    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
     MEDCOUPLING_EXPORT void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
     MEDCOUPLING_EXPORT std::string getVTKDataSetType() const;
     MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
     //
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT std::size_t getNodalConnectivityLength() const;
+    MEDCOUPLING_EXPORT mcIdType getNodalConnectivityLength() const;
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
-    MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const;
-    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const;
+    MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
+    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
-    MEDCOUPLING_EXPORT DataArrayInt *getCellsInBoundingBox(const double *bbox, double eps) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
-    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildFacePartOfMySelfNode(const int *start, const int *end, bool fullyIn) const;
-    MEDCOUPLING_EXPORT DataArrayInt *findBoundaryNodes() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
+    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildFacePartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findBoundaryNodes() const;
     MEDCOUPLING_EXPORT MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const;
-    MEDCOUPLING_EXPORT void findCommonCells(int compType, int startCellId, DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr) const;
+    MEDCOUPLING_EXPORT void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const;
     MEDCOUPLING_EXPORT static MEDCouplingUMesh *AggregateOnSameCoordsToUMesh(const std::vector< const MEDCoupling1GTUMesh *>& parts);
   public:
-    MEDCOUPLING_EXPORT virtual void allocateCells(int nbOfCells=0) = 0;
-    MEDCOUPLING_EXPORT virtual void insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd) = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *getNodalConnectivity() const = 0;
+    MEDCOUPLING_EXPORT virtual void allocateCells(mcIdType nbOfCells=0) = 0;
+    MEDCOUPLING_EXPORT virtual void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd) = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *getNodalConnectivity() const = 0;
     MEDCOUPLING_EXPORT virtual void checkConsistencyOfConnectivity() const = 0;
   protected:
     MEDCoupling1GTUMesh(const std::string& name, const INTERP_KERNEL::CellModel& cm);
@@ -109,60 +109,60 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
     MEDCOUPLING_EXPORT std::string simpleRepr() const;
     MEDCOUPLING_EXPORT std::string advancedRepr() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
     MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
-    MEDCOUPLING_EXPORT DataArrayInt *simplexize(int policy);
+    MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     // overload of MEDCouplingPointSet
     MEDCOUPLING_EXPORT void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
     MEDCOUPLING_EXPORT MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
-    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const int *begin, const int *end) const;
-    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const;
+    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const;
+    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const;
     MEDCOUPLING_EXPORT void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
-    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const;
+    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
     MEDCOUPLING_EXPORT void checkFullyDefined() const;
-    MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<int>& tinyInfo) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeFetchedNodeIds() const;
-    MEDCOUPLING_EXPORT DataArrayInt *getNodeIdsInUse(int& nbrOfNodesInUse) const;
-    MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(int offset);
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N);
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<int,int>& newNodeNumbersO2N) override;
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const int *newNodeNumbersO2N);
-    MEDCOUPLING_EXPORT void fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const;
-    MEDCOUPLING_EXPORT int getNumberOfNodesInCell(int cellId) const;
+    MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeFetchedNodeIds() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
+    MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(mcIdType offset);
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
+    MEDCOUPLING_EXPORT void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
     MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeDiameterField() const;
     MEDCOUPLING_EXPORT void invertOrientationOfAllCells();
     // overload of MEDCoupling1GTUMesh
     MEDCOUPLING_EXPORT void checkConsistencyOfConnectivity() const;
-    MEDCOUPLING_EXPORT void allocateCells(int nbOfCells=0);
-    MEDCOUPLING_EXPORT void insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd);
+    MEDCOUPLING_EXPORT void allocateCells(mcIdType nbOfCells=0);
+    MEDCOUPLING_EXPORT void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd);
   public://specific
-    MEDCOUPLING_EXPORT void setNodalConnectivity(DataArrayInt *nodalConn);
-    MEDCOUPLING_EXPORT DataArrayInt *getNodalConnectivity() const;
-    MEDCOUPLING_EXPORT int getNumberOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT void setNodalConnectivity(DataArrayIdType *nodalConn);
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivity() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodesPerCell() const;
     MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2);
     MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(std::vector<const MEDCoupling1SGTUMesh *>& a);
     MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *Merge1SGTUMeshesOnSameCoords(std::vector<const MEDCoupling1SGTUMesh *>& a);
-    MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildSetInstanceFromThis(int spaceDim) const;
+    MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
     MEDCOUPLING_EXPORT MEDCoupling1GTUMesh *computeDualMesh() const;
-    MEDCOUPLING_EXPORT DataArrayInt *sortHexa8EachOther();
+    MEDCOUPLING_EXPORT DataArrayIdType *sortHexa8EachOther();
     MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *explodeEachHexa8To6Quad4() const;
-    MEDCOUPLING_EXPORT MEDCouplingCMesh *structurizeMe(DataArrayInt *& cellPerm, DataArrayInt *& nodePerm, double eps=1e-12) const;
+    MEDCOUPLING_EXPORT MEDCouplingCMesh *structurizeMe(DataArrayIdType *& cellPerm, DataArrayIdType *& nodePerm, double eps=1e-12) const;
   public://serialization
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                             const std::vector<std::string>& littleStrings);
   private:
     MEDCoupling1SGTUMesh(const std::string& name, const INTERP_KERNEL::CellModel& cm);
@@ -171,10 +171,10 @@ namespace MEDCoupling
   private:
     void checkNonDynamicGeoType() const;
     static MEDCoupling1SGTUMesh *Merge1SGTUMeshesLL(std::vector<const MEDCoupling1SGTUMesh *>& a);
-    DataArrayInt *simplexizePol0();
-    DataArrayInt *simplexizePol1();
-    DataArrayInt *simplexizePlanarFace5();
-    DataArrayInt *simplexizePlanarFace6();
+    DataArrayIdType *simplexizePol0();
+    DataArrayIdType *simplexizePol1();
+    DataArrayIdType *simplexizePlanarFace5();
+    DataArrayIdType *simplexizePlanarFace6();
     MEDCoupling1DGTUMesh *computeDualMesh3D() const;
     MEDCoupling1DGTUMesh *computeDualMesh2D() const;
     template<class MAPCLS>
@@ -208,61 +208,61 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
     MEDCOUPLING_EXPORT std::string simpleRepr() const;
     MEDCOUPLING_EXPORT std::string advancedRepr() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
     MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
-    MEDCOUPLING_EXPORT DataArrayInt *simplexize(int policy);
+    MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     // overload of MEDCouplingPointSet
     MEDCOUPLING_EXPORT void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
     MEDCOUPLING_EXPORT MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
-    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const int *begin, const int *end) const;
-    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const;
+    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const;
+    MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const;
     MEDCOUPLING_EXPORT void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
-    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const;
+    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
     MEDCOUPLING_EXPORT void checkFullyDefined() const;
-    MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<int>& tinyInfo) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeFetchedNodeIds() const;
-    MEDCOUPLING_EXPORT DataArrayInt *getNodeIdsInUse(int& nbrOfNodesInUse) const;
-    MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(int offset);
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N);
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<int,int>& newNodeNumbersO2N) override;
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const int *newNodeNumbersO2N);
-    MEDCOUPLING_EXPORT void fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const;
-    MEDCOUPLING_EXPORT int getNumberOfNodesInCell(int cellId) const;
+    MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeFetchedNodeIds() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
+    MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(mcIdType offset);
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
+    MEDCOUPLING_EXPORT void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
     MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeDiameterField() const;
     MEDCOUPLING_EXPORT void invertOrientationOfAllCells();
     // overload of MEDCoupling1GTUMesh
     MEDCOUPLING_EXPORT void checkConsistencyOfConnectivity() const;
-    MEDCOUPLING_EXPORT void allocateCells(int nbOfCells=0);
-    MEDCOUPLING_EXPORT void insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd);
+    MEDCOUPLING_EXPORT void allocateCells(mcIdType nbOfCells=0);
+    MEDCOUPLING_EXPORT void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd);
   public://specific
-    MEDCOUPLING_EXPORT void setNodalConnectivity(DataArrayInt *nodalConn, DataArrayInt *nodalConnIndex);
-    MEDCOUPLING_EXPORT DataArrayInt *getNodalConnectivity() const;
-    MEDCOUPLING_EXPORT DataArrayInt *getNodalConnectivityIndex() const;
+    MEDCOUPLING_EXPORT void setNodalConnectivity(DataArrayIdType *nodalConn, DataArrayIdType *nodalConnIndex);
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivity() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivityIndex() const;
     MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *copyWithNodalConnectivityPacked(bool& isShallowCpyOfNodalConnn) const;
-    MEDCOUPLING_EXPORT bool retrievePackedNodalConnectivity(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndx) const;
+    MEDCOUPLING_EXPORT bool retrievePackedNodalConnectivity(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndx) const;
     MEDCOUPLING_EXPORT bool isPacked() const;
     MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(const MEDCoupling1DGTUMesh *mesh1, const MEDCoupling1DGTUMesh *mesh2);
     MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(std::vector<const MEDCoupling1DGTUMesh *>& a);
     MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshesOnSameCoords(std::vector<const MEDCoupling1DGTUMesh *>& a);
-    MEDCOUPLING_EXPORT static DataArrayInt *AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayInt *>& nodalConns, const std::vector<int>& offsetInNodeIdsPerElt);
-    MEDCOUPLING_EXPORT static std::vector<int> BuildAPolygonFromParts(const std::vector< std::vector<int> >& parts);
-    MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *buildSetInstanceFromThis(int spaceDim) const;
+    MEDCOUPLING_EXPORT static DataArrayIdType *AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayIdType *>& nodalConns, const std::vector<mcIdType>& offsetInNodeIdsPerElt);
+    MEDCOUPLING_EXPORT static std::vector<mcIdType> BuildAPolygonFromParts(const std::vector< std::vector<mcIdType> >& parts);
+    MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
   public://serialization
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                             const std::vector<std::string>& littleStrings);
   private:
     MEDCoupling1DGTUMesh(const std::string& name, const INTERP_KERNEL::CellModel& cm);
index 99fa524d457d62b50b72eaba3d01b5a309985755..efd0db6b5161285e76263b268635a375c6cdd77d 100644 (file)
@@ -27,10 +27,10 @@ template<class MAPCLS>
 void MEDCoupling::MEDCoupling1SGTUMesh::renumberNodesInConnT(const MAPCLS& newNodeNumbersO2N)
 {
   getNumberOfCells();//only to check that all is well defined.
-  int *begPtr(_conn->getPointer());
-  int nbElt(_conn->getNumberOfTuples());
-  int *endPtr(begPtr+nbElt);
-  for(int *it=begPtr;it!=endPtr;it++)
+  mcIdType *begPtr(_conn->getPointer());
+  mcIdType nbElt(_conn->getNumberOfTuples());
+  mcIdType *endPtr(begPtr+nbElt);
+  for(mcIdType *it=begPtr;it!=endPtr;it++)
     {
       auto it2(newNodeNumbersO2N.find(*it));
       if(it2!=newNodeNumbersO2N.end())
@@ -51,9 +51,9 @@ void MEDCoupling::MEDCoupling1DGTUMesh::renumberNodesInConnT(const MAPCLS& newNo
 {
   getNumberOfCells();//only to check that all is well defined.
   //
-  int nbOfTuples(_conn->getNumberOfTuples());
-  int *pt(_conn->getPointer());
-  for(int i=0;i<nbOfTuples;i++,pt++)
+  mcIdType nbOfTuples(_conn->getNumberOfTuples());
+  mcIdType *pt(_conn->getPointer());
+  for(mcIdType i=0;i<nbOfTuples;i++,pt++)
     {
       if(*pt==-1) continue;
       if(*pt>=0)
old mode 100644 (file)
new mode 100755 (executable)
index f20dbba..3b123d3
@@ -43,7 +43,7 @@ DataArrayDoubleCollection *DataArrayDoubleCollection::deepCopy() const
   return new DataArrayDoubleCollection(*this);
 }
 
-void DataArrayDoubleCollection::allocTuples(int nbOfTuples)
+void DataArrayDoubleCollection::allocTuples(mcIdType nbOfTuples)
 {
   std::size_t sz(_arrs.size());
   for(std::size_t i=0;i<sz;i++)
@@ -171,26 +171,26 @@ DataArrayDouble *DataArrayDoubleCollection::getFieldWithName(const std::string&
   throw INTERP_KERNEL::Exception(oss.str().c_str());
 }
 
-DataArrayDouble *DataArrayDoubleCollection::at(int pos)
+DataArrayDouble *DataArrayDoubleCollection::at(mcIdType pos)
 {
-  if(pos<0 || pos>=(int)_arrs.size())
+  if(pos<0 || pos>=ToIdType(_arrs.size()))
     throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::at (non const) : pos must be in [0,nbOfFields) !");
   return _arrs[pos].first;
 }
 
-const DataArrayDouble *DataArrayDoubleCollection::at(int pos) const
+const DataArrayDouble *DataArrayDoubleCollection::at(mcIdType pos) const
 {
-  if(pos<0 || pos>=(int)_arrs.size())
+  if(pos<0 || pos>=ToIdType(_arrs.size()))
     throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::at : pos must be in [0,nbOfFields) !");
   return _arrs[pos].first;
 }
 
-int DataArrayDoubleCollection::size() const
+mcIdType DataArrayDoubleCollection::size() const
 {
-  return (int)_arrs.size();
+  return ToIdType(_arrs.size());
 }
 
-void DataArrayDoubleCollection::SynchronizeFineToCoarse(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *fine, DataArrayDoubleCollection *coarse)
+void DataArrayDoubleCollection::SynchronizeFineToCoarse(mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, mcIdType patchId, const DataArrayDoubleCollection *fine, DataArrayDoubleCollection *coarse)
 {
   if(!fine || !coarse)
     throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::SynchronizeFineToCoarse : the input DataArrayDouble collections must be non NULL !");
@@ -204,7 +204,7 @@ void DataArrayDoubleCollection::SynchronizeFineToCoarse(int ghostLev, const MEDC
     }
 }
 
-void DataArrayDoubleCollection::SynchronizeCoarseToFine(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine)
+void DataArrayDoubleCollection::SynchronizeCoarseToFine(mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, mcIdType patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine)
 {
   if(!fine || !coarse)
     throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::SynchronizeCoarseToFine : the input DataArrayDouble collections must be non NULL !");
@@ -218,7 +218,7 @@ void DataArrayDoubleCollection::SynchronizeCoarseToFine(int ghostLev, const MEDC
     }
 }
 
-void DataArrayDoubleCollection::SynchronizeFineEachOther(int patchId, int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, const std::vector<const MEDCouplingCartesianAMRMeshGen *>& children, const std::vector<DataArrayDoubleCollection *>& fieldsOnFine)
+void DataArrayDoubleCollection::SynchronizeFineEachOther(mcIdType patchId, mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, const std::vector<const MEDCouplingCartesianAMRMeshGen *>& children, const std::vector<DataArrayDoubleCollection *>& fieldsOnFine)
 {
   if(!fatherOfFineMesh)
     throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::SynchronizeFineEachOther : father is NULL !");
@@ -229,7 +229,7 @@ void DataArrayDoubleCollection::SynchronizeFineEachOther(int patchId, int ghostL
     return ;
   std::size_t nbOfCall(fieldsOnFine[0]->_arrs.size());
   for(std::size_t i=0;i<sz;i++)
-    if(fatherOfFineMesh->getPatchIdFromChildMesh(children[i])!=(int)i)
+    if(fatherOfFineMesh->getPatchIdFromChildMesh(children[i])!=ToIdType(i))
       throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::SynchronizeFineEachOther : internal error !");
   for(std::size_t i=1;i<sz;i++)
     if(nbOfCall!=fieldsOnFine[i]->_arrs.size())
@@ -246,7 +246,7 @@ void DataArrayDoubleCollection::SynchronizeFineEachOther(int patchId, int ghostL
 /*!
  * This method updates \a p1dac ghost zone parts using \a p2dac (which is really const). \a p2 is in the neighborhood of \a p1 (which size is defined by \a ghostLev).
  */
-void DataArrayDoubleCollection::SynchronizeGhostZoneOfOneUsingTwo(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const DataArrayDoubleCollection *p1dac, const MEDCouplingCartesianAMRPatch *p2, const DataArrayDoubleCollection *p2dac)
+void DataArrayDoubleCollection::SynchronizeGhostZoneOfOneUsingTwo(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const DataArrayDoubleCollection *p1dac, const MEDCouplingCartesianAMRPatch *p2, const DataArrayDoubleCollection *p2dac)
 {
   if(!p1 || !p1dac || !p2 || !p2dac)
     throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::SynchronizeGhostZoneOfOneUsingTwo : input pointer must be not NULL !");
@@ -262,7 +262,7 @@ void DataArrayDoubleCollection::SynchronizeGhostZoneOfOneUsingTwo(int ghostLev,
     }
 }
 
-void DataArrayDoubleCollection::SynchronizeCoarseToFineOnlyInGhostZone(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine)
+void DataArrayDoubleCollection::SynchronizeCoarseToFineOnlyInGhostZone(mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, mcIdType patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine)
 {
   if(!fine || !coarse)
     throw INTERP_KERNEL::Exception("DataArrayDoubleCollection::SynchronizeCoarseToFineOnlyInGhostZone : the input DataArrayDouble collections must be non NULL !");
@@ -273,7 +273,7 @@ void DataArrayDoubleCollection::SynchronizeCoarseToFineOnlyInGhostZone(int ghost
     fatherOfFineMesh->fillCellFieldOnPatchOnlyOnGhostZone(patchId,coarse->_arrs[i].first,fine->_arrs[i].first,ghostLev);
 }
 
-void DataArrayDoubleCollection::synchronizeMyGhostZoneUsing(int ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp, const MEDCouplingCartesianAMRMeshGen *father) const
+void DataArrayDoubleCollection::synchronizeMyGhostZoneUsing(mcIdType ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp, const MEDCouplingCartesianAMRMeshGen *father) const
 {
   DataArrayDoubleCollection *thisNC(const_cast<DataArrayDoubleCollection *>(this));
   std::size_t sz(_arrs.size());
@@ -283,7 +283,7 @@ void DataArrayDoubleCollection::synchronizeMyGhostZoneUsing(int ghostLev, const
     father->fillCellFieldOnPatchOnlyOnGhostZoneWith(ghostLev,thisp,otherp,thisNC->_arrs[i].first,other._arrs[i].first);
 }
 
-void DataArrayDoubleCollection::synchronizeMyGhostZoneUsingExt(int ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp) const
+void DataArrayDoubleCollection::synchronizeMyGhostZoneUsingExt(mcIdType ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp) const
 {
   DataArrayDoubleCollection *thisNC(const_cast<DataArrayDoubleCollection *>(this));
   std::size_t sz(_arrs.size());
@@ -309,7 +309,7 @@ DataArrayDoubleCollection::DataArrayDoubleCollection(const std::vector< std::pai
       _arrs[i].first=DataArrayDouble::New();
       _arrs[i].first->alloc(0,info.second);
       _arrs[i].first->setName(info.first);
-      names[i]=info.second;
+      names[i]=info.first;
       _arrs[i].second=IntensiveMaximum;
     }
   CheckDiscriminantNames(names);
@@ -389,11 +389,11 @@ MEDCouplingGridCollection *MEDCouplingGridCollection::deepCopy(const MEDCoupling
   return new MEDCouplingGridCollection(*this,newGf,oldGf);
 }
 
-void MEDCouplingGridCollection::alloc(int ghostLev)
+void MEDCouplingGridCollection::alloc(mcIdType ghostLev)
 {
   for(std::vector< std::pair<const MEDCouplingCartesianAMRMeshGen *,MCAuto<DataArrayDoubleCollection> > >::iterator it=_map_of_dadc.begin();it!=_map_of_dadc.end();it++)
     {
-      int nbTuples((*it).first->getNumberOfCellsAtCurrentLevelGhost(ghostLev));
+      mcIdType nbTuples((*it).first->getNumberOfCellsAtCurrentLevelGhost(ghostLev));
       DataArrayDoubleCollection *dadc((*it).second);
       if(dadc)
         dadc->allocTuples(nbTuples);
@@ -446,9 +446,9 @@ std::vector<NatureOfField> MEDCouplingGridCollection::getNatures() const
   return elt->getNatures();
 }
 
-bool MEDCouplingGridCollection::presenceOf(const MEDCouplingCartesianAMRMeshGen *m, int& pos) const
+bool MEDCouplingGridCollection::presenceOf(const MEDCouplingCartesianAMRMeshGen *m, mcIdType& pos) const
 {
-  int ret(0);
+  mcIdType ret(0);
   for(std::vector< std::pair<const MEDCouplingCartesianAMRMeshGen *,MCAuto<DataArrayDoubleCollection> > >::const_iterator it=_map_of_dadc.begin();it!=_map_of_dadc.end();it++,ret++)
     {
       if((*it).first==m)
@@ -460,16 +460,16 @@ bool MEDCouplingGridCollection::presenceOf(const MEDCouplingCartesianAMRMeshGen
   return false;
 }
 
-const DataArrayDoubleCollection& MEDCouplingGridCollection::getFieldsAt(int pos) const
+const DataArrayDoubleCollection& MEDCouplingGridCollection::getFieldsAt(mcIdType pos) const
 {
-  if(pos<0 || pos>(int)_map_of_dadc.size())
+  if(pos<0 || pos>ToIdType(_map_of_dadc.size()))
     throw INTERP_KERNEL::Exception("MEDCouplingGridCollection::getFieldsAt : invalid pos given in input ! Must be in [0,size) !");
   return *_map_of_dadc[pos].second;
 }
 
-DataArrayDoubleCollection& MEDCouplingGridCollection::getFieldsAt(int pos)
+DataArrayDoubleCollection& MEDCouplingGridCollection::getFieldsAt(mcIdType pos)
 {
-  if(pos<0 || pos>(int)_map_of_dadc.size())
+  if(pos<0 || pos>ToIdType(_map_of_dadc.size()))
     throw INTERP_KERNEL::Exception("MEDCouplingGridCollection::getFieldsAt (non const) : invalid pos given in input ! Must be in [0,size) !");
   return *_map_of_dadc[pos].second;
 }
@@ -479,29 +479,29 @@ DataArrayDoubleCollection& MEDCouplingGridCollection::getFieldsAt(int pos)
  * part of fields of \a this. The fields are expected to be the same between \a other and \a this.
  * This methods makes the hypothesis that \a this and \a other share two god father that are compatible each other that is to say with the same cell grid structure.
  */
-void MEDCouplingGridCollection::copyOverlappedZoneFrom(int ghostLev, const MEDCouplingGridCollection& other)
+void MEDCouplingGridCollection::copyOverlappedZoneFrom(mcIdType ghostLev, const MEDCouplingGridCollection& other)
 {
   for(std::vector< std::pair<const MEDCouplingCartesianAMRMeshGen *,MCAuto<DataArrayDoubleCollection> > >::iterator it=_map_of_dadc.begin();it!=_map_of_dadc.end();it++)
     {
-      std::vector<int> deltaThis,deltaOther;
-      std::vector< std::pair<int,int> > rgThis((*it).first->positionRelativeToGodFather(deltaThis));
-      std::vector<int> thisSt((*it).first->getImageMesh()->getCellGridStructure());
-      std::transform(thisSt.begin(),thisSt.end(),thisSt.begin(),std::bind2nd(std::plus<int>(),2*ghostLev));
+      std::vector<mcIdType> deltaThis,deltaOther;
+      std::vector< std::pair<mcIdType,mcIdType> > rgThis((*it).first->positionRelativeToGodFather(deltaThis));
+      std::vector<mcIdType> thisSt((*it).first->getImageMesh()->getCellGridStructure());
+      std::transform(thisSt.begin(),thisSt.end(),thisSt.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostLev));
       for(std::vector< std::pair<const MEDCouplingCartesianAMRMeshGen *,MCAuto<DataArrayDoubleCollection> > >::const_iterator it2=other._map_of_dadc.begin();it2!=other._map_of_dadc.end();it2++)
         {
-          std::vector< std::pair<int,int> > rgOther((*it2).first->positionRelativeToGodFather(deltaOther));
+          std::vector< std::pair<mcIdType,mcIdType> > rgOther((*it2).first->positionRelativeToGodFather(deltaOther));
           if(MEDCouplingStructuredMesh::AreRangesIntersect(rgThis,rgOther))
             {
-              std::vector< std::pair<int,int> > isect(MEDCouplingStructuredMesh::IntersectRanges(rgThis,rgOther));
-              std::vector< std::pair<int,int> > pThis,pOther;
+              std::vector< std::pair<mcIdType,mcIdType> > isect(MEDCouplingStructuredMesh::IntersectRanges(rgThis,rgOther));
+              std::vector< std::pair<mcIdType,mcIdType> > pThis,pOther;
               MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(rgThis,isect,pThis,true);
               MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(rgOther,isect,pOther,true);
-              std::vector<int> otherSt((*it2).first->getImageMesh()->getCellGridStructure());
+              std::vector<mcIdType> otherSt((*it2).first->getImageMesh()->getCellGridStructure());
               MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(pThis,ghostLev);
               MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(pOther,ghostLev);
-              std::transform(otherSt.begin(),otherSt.end(),otherSt.begin(),std::bind2nd(std::plus<int>(),2*ghostLev));
-              int sz((*it2).second->size());
-              for(int i=0;i<sz;i++)
+              std::transform(otherSt.begin(),otherSt.end(),otherSt.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostLev));
+              mcIdType sz((*it2).second->size());
+              for(mcIdType i=0;i<sz;i++)
                 {
                   const DataArrayDouble *otherArr((*it2).second->at(i));
                   DataArrayDouble *thisArr((*it).second->at(i));
@@ -513,7 +513,7 @@ void MEDCouplingGridCollection::copyOverlappedZoneFrom(int ghostLev, const MEDCo
     }
 }
 
-void MEDCouplingGridCollection::SynchronizeFineToCoarse(int ghostLev, const MEDCouplingGridCollection *fine, const MEDCouplingGridCollection *coarse)
+void MEDCouplingGridCollection::SynchronizeFineToCoarse(mcIdType ghostLev, const MEDCouplingGridCollection *fine, const MEDCouplingGridCollection *coarse)
 {
   if(!fine || !coarse)
     throw INTERP_KERNEL::Exception("MEDCouplingGridCollection::SynchronizeFineToCoarse : one or more input pointer is NULL !");
@@ -529,7 +529,7 @@ void MEDCouplingGridCollection::SynchronizeFineToCoarse(int ghostLev, const MEDC
           if((*it0).first==fatherOfFineMesh)
             {
               found=true;
-              int patchId(fatherOfFineMesh->getPatchIdFromChildMesh(fineMesh));
+              mcIdType patchId(fatherOfFineMesh->getPatchIdFromChildMesh(fineMesh));
               const DataArrayDoubleCollection *coarseDaCol((*it0).second);
               DataArrayDoubleCollection *coarseModified(const_cast<DataArrayDoubleCollection *>(coarseDaCol));//coarse values in DataArrayDouble will be altered
               DataArrayDoubleCollection::SynchronizeFineToCoarse(ghostLev,fatherOfFineMesh,patchId,(*it).second,coarseModified);
@@ -540,7 +540,7 @@ void MEDCouplingGridCollection::SynchronizeFineToCoarse(int ghostLev, const MEDC
     }
 }
 
-void MEDCouplingGridCollection::SynchronizeCoarseToFine(int ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine)
+void MEDCouplingGridCollection::SynchronizeCoarseToFine(mcIdType ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine)
 {
   if(!fine || !coarse)
     throw INTERP_KERNEL::Exception("MEDCouplingGridCollection::SynchronizeCoarseToFine : one or more input pointer is NULL !");
@@ -556,7 +556,7 @@ void MEDCouplingGridCollection::SynchronizeCoarseToFine(int ghostLev, const MEDC
           if((*it0).first==fatherOfFineMesh)
             {
               found=true;
-              int patchId(fatherOfFineMesh->getPatchIdFromChildMesh(fineMesh));
+              mcIdType patchId(fatherOfFineMesh->getPatchIdFromChildMesh(fineMesh));
               const DataArrayDoubleCollection *fineDaCol((*it).second);
               DataArrayDoubleCollection *fineModified(const_cast<DataArrayDoubleCollection *>(fineDaCol));//fine values in DataArrayDouble will be altered
               DataArrayDoubleCollection::SynchronizeCoarseToFine(ghostLev,fatherOfFineMesh,patchId,(*it0).second,fineModified);
@@ -572,11 +572,11 @@ void MEDCouplingGridCollection::SynchronizeCoarseToFine(int ghostLev, const MEDC
  *
  * \sa synchronizeFineEachOtherExt
  */
-void MEDCouplingGridCollection::synchronizeFineEachOther(int ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const
+void MEDCouplingGridCollection::synchronizeFineEachOther(mcIdType ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const
 {
   for(std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >::const_iterator it=ps.begin();it!=ps.end();it++)
     {
-      int p1,p2;
+      mcIdType p1,p2;
       if(!presenceOf((*it).first->getMesh(),p1))
         throw INTERP_KERNEL::Exception("MEDCouplingGridCollection::synchronizeFineEachOther : internal error #1 !");
       if(!presenceOf((*it).second->getMesh(),p2))
@@ -592,11 +592,11 @@ void MEDCouplingGridCollection::synchronizeFineEachOther(int ghostLev, const std
  *
  * \sa synchronizeFineEachOther
  */
-void MEDCouplingGridCollection::synchronizeFineEachOtherExt(int ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const
+void MEDCouplingGridCollection::synchronizeFineEachOtherExt(mcIdType ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const
 {
   for(std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >::const_iterator it=ps.begin();it!=ps.end();it++)
     {
-      int p1,p2;
+      mcIdType p1,p2;
       if(!presenceOf((*it).first->getMesh(),p1))
         throw INTERP_KERNEL::Exception("MEDCouplingGridCollection::synchronizeFineEachOtherExt : internal error #1 !");
       if(!presenceOf((*it).second->getMesh(),p2))
@@ -610,7 +610,7 @@ void MEDCouplingGridCollection::synchronizeFineEachOtherExt(int ghostLev, const
 /*!
  * The pairs returned share the same direct father. The number of returned elements must be even.
  */
-std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > MEDCouplingGridCollection::findNeighbors(int ghostLev) const
+std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > MEDCouplingGridCollection::findNeighbors(mcIdType ghostLev) const
 {
   std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > ret;
   std::map<const MEDCouplingCartesianAMRMeshGen *,std::vector< const MEDCouplingCartesianAMRMeshGen * > > m;
@@ -624,10 +624,10 @@ std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCar
     {
       for(std::vector<const MEDCouplingCartesianAMRMeshGen *>::const_iterator it1=(*it0).second.begin();it1!=(*it0).second.end();it1++)
         {
-          int patchId((*it0).first->getPatchIdFromChildMesh(*it1));
-          std::vector<int> neighs((*it0).first->getPatchIdsInTheNeighborhoodOf(patchId,ghostLev));
+          mcIdType patchId((*it0).first->getPatchIdFromChildMesh(*it1));
+          std::vector<mcIdType> neighs((*it0).first->getPatchIdsInTheNeighborhoodOf(patchId,ghostLev));
           const MEDCouplingCartesianAMRPatch *pRef((*it0).first->getPatch(patchId));
-          for(std::vector<int>::const_iterator it2=neighs.begin();it2!=neighs.end();it2++)
+          for(std::vector<mcIdType>::const_iterator it2=neighs.begin();it2!=neighs.end();it2++)
             {
               const MEDCouplingCartesianAMRPatch *pLoc((*it0).first->getPatch(*it2));
               ret.push_back(std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *>(pRef,pLoc));
@@ -639,7 +639,7 @@ std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCar
   return ret;
 }
 
-void MEDCouplingGridCollection::SynchronizeCoarseToFineOnlyInGhostZone(int ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine)
+void MEDCouplingGridCollection::SynchronizeCoarseToFineOnlyInGhostZone(mcIdType ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine)
 {
   if(!fine || !coarse)
     throw INTERP_KERNEL::Exception("MEDCouplingGridCollection::SynchronizeCoarseToFineOnlyInGhostZone : one or more input pointer is NULL !");
@@ -655,7 +655,7 @@ void MEDCouplingGridCollection::SynchronizeCoarseToFineOnlyInGhostZone(int ghost
           if((*it0).first==fatherOfFineMesh)
             {
               found=true;
-              int patchId(fatherOfFineMesh->getPatchIdFromChildMesh(fineMesh));
+              mcIdType patchId(fatherOfFineMesh->getPatchIdFromChildMesh(fineMesh));
               const DataArrayDoubleCollection *fineDaCol((*it).second);
               DataArrayDoubleCollection *fineModified(const_cast<DataArrayDoubleCollection *>(fineDaCol));//fine values in DataArrayDouble will be altered
               DataArrayDoubleCollection::SynchronizeCoarseToFineOnlyInGhostZone(ghostLev,fatherOfFineMesh,patchId,(*it0).second,fineModified);
@@ -696,7 +696,7 @@ MEDCouplingGridCollection::MEDCouplingGridCollection(const MEDCouplingGridCollec
   std::size_t sz(other._map_of_dadc.size());
   for(std::size_t i=0;i<sz;i++)
     {
-      std::vector<int> pos(other._map_of_dadc[i].first->getPositionRelativeTo(oldGf));
+      std::vector<mcIdType> pos(other._map_of_dadc[i].first->getPositionRelativeTo(oldGf));
       _map_of_dadc[i].first=newGf->getMeshAtPosition(pos);
       const DataArrayDoubleCollection *dac(other._map_of_dadc[i].second);
       if(dac)
@@ -783,12 +783,12 @@ MEDCouplingDataForGodFather::MEDCouplingDataForGodFather(const MEDCouplingDataFo
 /*!
  * This method creates, attach to a main AMR mesh \a gf ( called god father :-) ) and returns a data linked to \a gf ready for the computation.
  */
-MEDCouplingAMRAttribute *MEDCouplingAMRAttribute::New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, int ghostLev)
+MEDCouplingAMRAttribute *MEDCouplingAMRAttribute::New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, mcIdType ghostLev)
 {
   return new MEDCouplingAMRAttribute(gf,fieldNames,ghostLev);
 }
 
-MEDCouplingAMRAttribute *MEDCouplingAMRAttribute::New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string, std::vector<std::string> > >& fieldNames, int ghostLev)
+MEDCouplingAMRAttribute *MEDCouplingAMRAttribute::New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string, std::vector<std::string> > >& fieldNames, mcIdType ghostLev)
 {
   std::size_t sz(fieldNames.size());
   std::vector< std::pair<std::string,int> > fieldNames2(sz);
@@ -842,10 +842,10 @@ MEDCouplingAMRAttribute *MEDCouplingAMRAttribute::deepCpyWithoutGodFather() cons
  * Returns the number of levels by \b only \b considering \a this (god father instance is considered only to see if it has not changed still last update of \a this).
  *
  */
-int MEDCouplingAMRAttribute::getNumberOfLevels() const
+mcIdType MEDCouplingAMRAttribute::getNumberOfLevels() const
 {
   checkGodFatherFrozen();
-  return (int)_levs.size();
+  return ToIdType(_levs.size());
 }
 
 /*!
@@ -859,7 +859,7 @@ std::vector<DataArrayDouble *> MEDCouplingAMRAttribute::retrieveFieldsOn(MEDCoup
 {
   for(std::vector< MCAuto<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++)
     {
-      int tmp(-1);
+      mcIdType tmp(-1);
       if((*it)->presenceOf(mesh,tmp))
         {
           const DataArrayDoubleCollection& ddc((*it)->getFieldsAt(tmp));
@@ -876,7 +876,7 @@ const DataArrayDouble *MEDCouplingAMRAttribute::getFieldOn(MEDCouplingCartesianA
 {
   for(std::vector< MCAuto<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++)
     {
-      int tmp(-1);
+      mcIdType tmp(-1);
       if((*it)->presenceOf(mesh,tmp))
         {
           const DataArrayDoubleCollection& ddc((*it)->getFieldsAt(tmp));
@@ -890,7 +890,7 @@ DataArrayDouble *MEDCouplingAMRAttribute::getFieldOn(MEDCouplingCartesianAMRMesh
 {
   for(std::vector< MCAuto<MEDCouplingGridCollection> >::iterator it=_levs.begin();it!=_levs.end();it++)
     {
-      int tmp(-1);
+      mcIdType tmp(-1);
       if((*it)->presenceOf(mesh,tmp))
         {
           DataArrayDoubleCollection& ddc((*it)->getFieldsAt(tmp));
@@ -912,7 +912,7 @@ MEDCouplingFieldDouble *MEDCouplingAMRAttribute::buildCellFieldOnRecurseWithoutO
   std::size_t lev(0);
   for(std::vector< MCAuto<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++,lev++)
     {
-      int tmp(-1);
+      mcIdType tmp(-1);
       if((*it)->presenceOf(mesh,tmp))
         {
           const DataArrayDoubleCollection& ddc((*it)->getFieldsAt(tmp));
@@ -942,7 +942,7 @@ MEDCouplingFieldDouble *MEDCouplingAMRAttribute::buildCellFieldOnWithGhost(MEDCo
   const DataArrayDouble *arr(0);
   for(std::vector< MCAuto<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++)
     {
-      int tmp(-1);
+      mcIdType tmp(-1);
       if((*it)->presenceOf(mesh,tmp))
         {
           const DataArrayDoubleCollection& ddc((*it)->getFieldsAt(tmp));
@@ -972,7 +972,7 @@ MEDCouplingFieldDouble *MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost(ME
   const DataArrayDouble *arr(0);
   for(std::vector< MCAuto<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++)
     {
-      int tmp(-1);
+      mcIdType tmp(-1);
       if((*it)->presenceOf(mesh,tmp))
         {
           const DataArrayDoubleCollection& ddc((*it)->getFieldsAt(tmp));
@@ -983,12 +983,12 @@ MEDCouplingFieldDouble *MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost(ME
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost : the mesh specified is not in the progeny of this !");
   //
   MCAuto<MEDCouplingIMesh> im(mesh->getImageMesh()->buildWithGhost(_ghost_lev));
-  std::vector<int> cgs(mesh->getImageMesh()->getCellGridStructure()),cgsWG(im->getCellGridStructure());
+  std::vector<mcIdType> cgs(mesh->getImageMesh()->getCellGridStructure()),cgsWG(im->getCellGridStructure());
   MCAuto<DataArrayDouble> arr2(DataArrayDouble::New());
   arr2->alloc(mesh->getImageMesh()->getNumberOfCells(),arr->getNumberOfComponents());
-  std::vector< std::pair<int,int> > cgs2(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(cgs));
+  std::vector< std::pair<mcIdType,mcIdType> > cgs2(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(cgs));
   MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(cgs2,_ghost_lev);
-  std::vector<int> fakeFactors(mesh->getImageMesh()->getSpaceDimension(),1);
+  std::vector<mcIdType> fakeFactors(mesh->getImageMesh()->getSpaceDimension(),1);
   MEDCouplingIMesh::SpreadCoarseToFine(arr,cgsWG,arr2,cgs2,fakeFactors);
   arr2->copyStringInfoFrom(*arr);
   //
@@ -1017,17 +1017,17 @@ std::string MEDCouplingAMRAttribute::writeVTHB(const std::string& fileName) cons
   const MEDCouplingIMesh *gfm(gf->getImageMesh());
   std::vector<double> orig(gfm->getOrigin());
   std::vector<double> spacing(gfm->getDXYZ());
-  int dim((int)orig.size());
+  mcIdType dim(ToIdType(orig.size()));
   std::copy(orig.begin(),orig.end(),std::ostream_iterator<double>(ofs," ")); ofs << "\" grid_description=\"";
-  for(int i=0;i<dim;i++)
+  for(mcIdType i=0;i<dim;i++)
     {
-      char tmp[2]; tmp[0]='X'+i; tmp[1]='\0';
+      char tmp[2]; tmp[0]=(char)(int('X')+i); tmp[1]='\0';
       ofs << tmp;
     }
   ofs << "\">\n";
   //
-  int maxLev(gf->getMaxNumberOfLevelsRelativeToThis()),kk(0);
-  for(int i=0;i<maxLev;i++)
+  mcIdType maxLev(gf->getMaxNumberOfLevelsRelativeToThis()),kk(0);
+  for(mcIdType i=0;i<maxLev;i++)
     {
       std::vector<MEDCouplingCartesianAMRPatchGen *> patches(gf->retrieveGridsAt(i));
       std::size_t sz(patches.size());
@@ -1041,8 +1041,8 @@ std::string MEDCouplingAMRAttribute::writeVTHB(const std::string& fileName) cons
       ofs << "\">\n";
       if(i!=maxLev-1)
         {
-          std::vector<int> factors(patches[0]->getMesh()->getFactors());
-          for(int k=0;k<dim;k++)
+          std::vector<mcIdType> factors(patches[0]->getMesh()->getFactors());
+          for(mcIdType k=0;k<dim;k++)
             spacing[k]*=1./((double) factors[k]);
         }
       std::size_t jj(0);
@@ -1053,20 +1053,20 @@ std::string MEDCouplingAMRAttribute::writeVTHB(const std::string& fileName) cons
           const MEDCouplingCartesianAMRMeshGen *mesh((*it)->getMesh());
           if(patchCast)
             {
-              const std::vector< std::pair<int,int> >& bltr(patchCast->getBLTRRangeRelativeToGF());
-              for(int pp=0;pp<dim;pp++)
+              const std::vector< std::pair<mcIdType,mcIdType> >& bltr(patchCast->getBLTRRangeRelativeToGF());
+              for(mcIdType pp=0;pp<dim;pp++)
                 ofs << bltr[pp].first << " " << bltr[pp].second-1 << " ";
             }
           else
             {
               const MEDCouplingIMesh *im((*it)->getMesh()->getImageMesh());
-              std::vector<int> cgs(im->getCellGridStructure());
-              for(int pp=0;pp<dim;pp++)
+              std::vector<mcIdType> cgs(im->getCellGridStructure());
+              for(mcIdType pp=0;pp<dim;pp++)
                 ofs << "0 " << cgs[pp]-1 << " ";
             }
           ofs << "\" file=\"";
           //
-          int tmp(-1);
+          mcIdType tmp(-1);
           if(_levs[i]->presenceOf((*it)->getMesh(),tmp))
             {
               const DataArrayDoubleCollection& ddc(_levs[i]->getFieldsAt(tmp));
@@ -1080,12 +1080,12 @@ std::string MEDCouplingAMRAttribute::writeVTHB(const std::string& fileName) cons
               for(std::size_t pp=0;pp<nbFields;pp++)
                 {
                   MCAuto<MEDCouplingIMesh> im(mesh->getImageMesh()->buildWithGhost(_ghost_lev));
-                  std::vector<int> cgs(mesh->getImageMesh()->getCellGridStructure()),cgsWG(im->getCellGridStructure());
+                  std::vector<mcIdType> cgs(mesh->getImageMesh()->getCellGridStructure()),cgsWG(im->getCellGridStructure());
                   arrs2Safe[pp]=DataArrayDouble::New();
                   arrs2Safe[pp]->alloc(mesh->getImageMesh()->getNumberOfCells(),arrs[pp]->getNumberOfComponents());
-                  std::vector< std::pair<int,int> > cgs2(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(cgs));
+                  std::vector< std::pair<mcIdType,mcIdType> > cgs2(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(cgs));
                   MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(cgs2,_ghost_lev);
-                  std::vector<int> fakeFactors(mesh->getImageMesh()->getSpaceDimension(),1);
+                  std::vector<mcIdType> fakeFactors(mesh->getImageMesh()->getSpaceDimension(),1);
                   MEDCouplingIMesh::SpreadCoarseToFine(arrs[pp],cgsWG,arrs2Safe[pp],cgs2,fakeFactors);
                   arrs2Safe[pp]->copyStringInfoFrom(*arrs[pp]);
                   //
@@ -1134,7 +1134,7 @@ MEDCouplingAMRAttribute *MEDCouplingAMRAttribute::projectTo(MEDCouplingCartesian
   MCAuto<MEDCouplingAMRAttribute> ret(MEDCouplingAMRAttribute::New(targetGF,fieldNames,_ghost_lev));
   ret->spillNatures(lev0->getNatures());
   ret->alloc();
-  int nbLevs(getNumberOfLevels());
+  mcIdType nbLevs(getNumberOfLevels());
   if(targetGF->getMaxNumberOfLevelsRelativeToThis()!=nbLevs)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::projectTo : number of levels of this and targetGF must be the same !");
   // first step copy level0
@@ -1144,7 +1144,7 @@ MEDCouplingAMRAttribute *MEDCouplingAMRAttribute::projectTo(MEDCouplingCartesian
   DataArrayDoubleCollection& colTarget(ret->_levs[0]->getFieldsAt(0));
   colTarget.copyFrom(col);
   // then go deeper and deeper
-  for(int i=1;i<nbLevs;i++)
+  for(mcIdType i=1;i<nbLevs;i++)
     {
       ret->synchronizeCoarseToFineByOneLevel(i-1);
       MEDCouplingGridCollection *targetCol(ret->_levs[i]);
@@ -1174,7 +1174,7 @@ void MEDCouplingAMRAttribute::synchronizeFineToCoarse()
   while(sz>1)
     {
       sz--;
-      synchronizeFineToCoarseByOneLevel((int)sz);
+      synchronizeFineToCoarseByOneLevel(ToIdType(sz));
     }
 }
 
@@ -1188,16 +1188,16 @@ void MEDCouplingAMRAttribute::synchronizeFineToCoarse()
  * \param [in] toLev - an existing level considered as the target level to reach.
  *
  */
-void MEDCouplingAMRAttribute::synchronizeFineToCoarseBetween(int fromLev, int toLev)
+void MEDCouplingAMRAttribute::synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev)
 {
-  int nbl(getNumberOfLevels());
+  mcIdType nbl(getNumberOfLevels());
   if(fromLev<0 || toLev<0 || fromLev>=nbl || toLev>=nbl)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeFineToCoarseBetween : fromLev and toLev must be >= 0 and lower than number of levels in this !");
   if(fromLev==toLev)
     return ;//nothing to do
   if(fromLev<toLev)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeFineToCoarseBetween : the fromLev level is lower than toLev level ! Call synchronizeFineToCoarseBetween ");
-  for(int i=fromLev;i>toLev;i--)
+  for(mcIdType i=fromLev;i>toLev;i--)
     synchronizeFineToCoarseByOneLevel(i);
 }
 
@@ -1213,7 +1213,7 @@ void MEDCouplingAMRAttribute::synchronizeCoarseToFine()
   std::size_t sz(_levs.size());
   //
   for(std::size_t i=0;i<sz-1;i++)
-    synchronizeCoarseToFineByOneLevel((int)i);
+    synchronizeCoarseToFineByOneLevel(ToIdType(i));
 }
 
 /*!
@@ -1225,16 +1225,16 @@ void MEDCouplingAMRAttribute::synchronizeCoarseToFine()
  * \param [in] fromLev - an existing level considered as coarse so lower than \a toLev
  * \param [in] toLev - an existing level considered as the target level to reach.
  */
-void MEDCouplingAMRAttribute::synchronizeCoarseToFineBetween(int fromLev, int toLev)
+void MEDCouplingAMRAttribute::synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev)
 {
-  int nbl(getNumberOfLevels());
+  mcIdType nbl(getNumberOfLevels());
   if(fromLev<0 || toLev<0 || fromLev>=nbl || toLev>=nbl)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeCoarseToFineBetween : fromLev and toLev must be >= 0 and lower than number of levels in this !");
   if(fromLev==toLev)
     return ;//nothing to do
   if(fromLev>toLev)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeCoarseToFineBetween : the fromLev level is greater than toLev level ! Call synchronizeFineToCoarseBetween instead !");
-  for(int i=fromLev;i<toLev;i++)
+  for(mcIdType i=fromLev;i<toLev;i++)
     synchronizeCoarseToFineByOneLevel(i);
 }
 
@@ -1252,17 +1252,17 @@ void MEDCouplingAMRAttribute::synchronizeCoarseToFineBetween(int fromLev, int to
  */
 void MEDCouplingAMRAttribute::synchronizeAllGhostZones()
 {
-  int sz(getNumberOfLevels());
+  mcIdType sz(getNumberOfLevels());
   if(sz==0)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeFineEachOther : not any levels in this !");
   // 1st - synchronize from coarse to the finest all the patches (excepted the god father one)
-  for(int i=1;i<sz;i++)
+  for(mcIdType i=1;i<sz;i++)
     {
       const MEDCouplingGridCollection *fine(_levs[i]),*coarse(_levs[i-1]);
       MEDCouplingGridCollection::SynchronizeCoarseToFineOnlyInGhostZone(_ghost_lev,coarse,fine);
     }
   // 2nd - classical direct sublevel inside common patch
-  for(int i=1;i<sz;i++)
+  for(mcIdType i=1;i<sz;i++)
     {
       const MEDCouplingGridCollection *curLev(_levs[i]);
       if(!curLev)
@@ -1276,7 +1276,7 @@ void MEDCouplingAMRAttribute::synchronizeAllGhostZones()
       DataArrayDoubleCollection::SynchronizeGhostZoneOfOneUsingTwo(_ghost_lev,(*it).first,firstDAC,(*it).second,secondDAC);
     }
   // 4th - same level but with far ancestor.
-  for(int i=1;i<sz;i++)
+  for(mcIdType i=1;i<sz;i++)
     {
       const MEDCouplingGridCollection *fine(_levs[i]);
       fine->synchronizeFineEachOtherExt(_ghost_lev,_cross_lev_neighbors[i]);
@@ -1296,7 +1296,7 @@ void MEDCouplingAMRAttribute::synchronizeAllGhostZonesOfDirectChidrenOf(const ME
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeAllGhostZonesOfDirectChidrenOf : input mesh is NULL !");
-  int level(mesh->getAbsoluteLevelRelativeTo(_gf)),sz(getNumberOfLevels());
+  mcIdType level(mesh->getAbsoluteLevelRelativeTo(_gf)),sz(getNumberOfLevels());
   if(level<0 || level>=sz-1)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeAllGhostZonesOfDirectChidrenOf : the specified level does not exist ! Must be in [0,nbOfLevelsOfThis-1) !");
   const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& itemsToFilter(_neighbors[level+1]);
@@ -1316,9 +1316,9 @@ void MEDCouplingAMRAttribute::synchronizeAllGhostZonesOfDirectChidrenOf(const ME
  * This method updates \b all the patches at level \a level each other without consideration of their father.
  * So this method is more time consuming than synchronizeAllGhostZonesOfDirectChidrenOf.
  */
-void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevel(int level)
+void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level)
 {
-  int maxLev(getNumberOfLevels());
+  mcIdType maxLev(getNumberOfLevels());
   if(level<0 || level>=maxLev)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevel : the specified level must be in [0,maxLevel) !");
   if(level==0)
@@ -1338,9 +1338,9 @@ void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevel(int leve
  * This method updates ghost zones of patches at level \a level whatever their father \b using \b father \b patches \b ONLY (at level \b level - 1).
  * This method is useful to propagate to the ghost zone of childhood the modification.
  */
-void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(int level)
+void MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level)
 {
-  int maxLev(getNumberOfLevels());
+  mcIdType maxLev(getNumberOfLevels());
   if(level<=0 || level>=maxLev)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather : the specified level must be in (0,maxLevel) !");
   const MEDCouplingGridCollection *fine(_levs[level]),*coarse(_levs[level-1]);
@@ -1408,12 +1408,12 @@ void MEDCouplingAMRAttribute::updateTime() const
 {//tony
 }
 
-MEDCouplingAMRAttribute::MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, int ghostLev):MEDCouplingDataForGodFather(gf),_ghost_lev(ghostLev)
+MEDCouplingAMRAttribute::MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, mcIdType ghostLev):MEDCouplingDataForGodFather(gf),_ghost_lev(ghostLev)
 {
   //gf non empty, checked by constructor
-  int maxLev(gf->getMaxNumberOfLevelsRelativeToThis());
+  mcIdType maxLev(gf->getMaxNumberOfLevelsRelativeToThis());
   _levs.resize(maxLev);
-  for(int i=0;i<maxLev;i++)
+  for(mcIdType i=0;i<maxLev;i++)
     {
       std::vector<MEDCouplingCartesianAMRPatchGen *> patches(gf->retrieveGridsAt(i));
       std::size_t sz(patches.size());
@@ -1477,7 +1477,7 @@ MEDCouplingAMRAttribute::MEDCouplingAMRAttribute(const MEDCouplingAMRAttribute&
       for(std::size_t j=0;j<sz2;j++)
         {
           const MEDCouplingCartesianAMRPatch *p1(neigh2[j].first),*p2(neigh2[j].second);
-          std::vector<int> pp1(p1->getMesh()->getPositionRelativeTo(other._gf)),pp2(p2->getMesh()->getPositionRelativeTo(other._gf));
+          std::vector<mcIdType> pp1(p1->getMesh()->getPositionRelativeTo(other._gf)),pp2(p2->getMesh()->getPositionRelativeTo(other._gf));
           neigh3[j].first=_gf->getPatchAtPosition(pp1);
           neigh3[j].second=_gf->getPatchAtPosition(pp2);
         }
@@ -1487,7 +1487,7 @@ MEDCouplingAMRAttribute::MEDCouplingAMRAttribute(const MEDCouplingAMRAttribute&
   for(std::size_t i=0;i<sz;i++)
     {
       const MEDCouplingCartesianAMRPatch *p1(other._mixed_lev_neighbors[i].first),*p2(other._mixed_lev_neighbors[i].second);
-      std::vector<int> pp1(p1->getMesh()->getPositionRelativeTo(other._gf)),pp2(p2->getMesh()->getPositionRelativeTo(other._gf));
+      std::vector<mcIdType> pp1(p1->getMesh()->getPositionRelativeTo(other._gf)),pp2(p2->getMesh()->getPositionRelativeTo(other._gf));
       _mixed_lev_neighbors[i].first=_gf->getPatchAtPosition(pp1);
       _mixed_lev_neighbors[i].second=_gf->getPatchAtPosition(pp2);
     }
@@ -1501,7 +1501,7 @@ MEDCouplingAMRAttribute::MEDCouplingAMRAttribute(const MEDCouplingAMRAttribute&
       for(std::size_t j=0;j<sz2;j++)
         {
           const MEDCouplingCartesianAMRPatch *p1(neigh2[j].first),*p2(neigh2[j].second);
-          std::vector<int> pp1(p1->getMesh()->getPositionRelativeTo(other._gf)),pp2(p2->getMesh()->getPositionRelativeTo(other._gf));
+          std::vector<mcIdType> pp1(p1->getMesh()->getPositionRelativeTo(other._gf)),pp2(p2->getMesh()->getPositionRelativeTo(other._gf));
           neigh3[j].first=_gf->getPatchAtPosition(pp1);
           neigh3[j].second=_gf->getPatchAtPosition(pp2);
         }
@@ -1515,7 +1515,7 @@ const DataArrayDoubleCollection& MEDCouplingAMRAttribute::findCollectionAttached
       const MEDCouplingGridCollection *elt(*it);
       if(elt)
         {
-          int tmp(-1);
+          mcIdType tmp(-1);
           if(elt->presenceOf(m,tmp))
             {
               return elt->getFieldsAt(tmp);
@@ -1525,18 +1525,18 @@ const DataArrayDoubleCollection& MEDCouplingAMRAttribute::findCollectionAttached
   throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::findCollectionAttachedTo : unable to find such part of mesh in this !");
 }
 
-void MEDCouplingAMRAttribute::synchronizeFineToCoarseByOneLevel(int level)
+void MEDCouplingAMRAttribute::synchronizeFineToCoarseByOneLevel(mcIdType level)
 {
-  int nbl(getNumberOfLevels());
+  mcIdType nbl(getNumberOfLevels());
   if(level<=0 || level>=nbl)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeFineToCoarseByOneLevel : the input level must be in ]0,nb_of_levels[ !");
   const MEDCouplingGridCollection *fine(_levs[level]),*coarse(_levs[level-1]);
   MEDCouplingGridCollection::SynchronizeFineToCoarse(_ghost_lev,fine,coarse);
 }
 
-void MEDCouplingAMRAttribute::synchronizeCoarseToFineByOneLevel(int level)
+void MEDCouplingAMRAttribute::synchronizeCoarseToFineByOneLevel(mcIdType level)
 {
-  int nbl(getNumberOfLevels());
+  mcIdType nbl(getNumberOfLevels());
   if(level<0 || level>=nbl-1)
     throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::synchronizeFineToCoarseByOneLevel : the input level must be in [0,nb_of_levels[ !");
   const MEDCouplingGridCollection *fine(_levs[level+1]),*coarse(_levs[level]);
index 4e818db7ed36b72c60dd33856ecfdc974798928e..22497d538736a5e38b1660cb7907239efe474c9a 100644 (file)
@@ -33,7 +33,7 @@ namespace MEDCoupling
   public:
     static DataArrayDoubleCollection *New(const std::vector< std::pair<std::string,int> >& fieldNames);
     DataArrayDoubleCollection *deepCopy() const;
-    void allocTuples(int nbOfTuples);
+    void allocTuples(mcIdType nbOfTuples);
     void dellocTuples();
     void copyFrom(const DataArrayDoubleCollection& other);
     void spillInfoOnComponents(const std::vector< std::vector<std::string> >& compNames);
@@ -43,16 +43,16 @@ namespace MEDCoupling
     std::vector<DataArrayDouble *> retrieveFields() const;
     const DataArrayDouble *getFieldWithName(const std::string& name) const;
     DataArrayDouble *getFieldWithName(const std::string& name);
-    DataArrayDouble *at(int pos);
-    const DataArrayDouble *at(int pos) const;
-    int size() const;
-    static void SynchronizeFineToCoarse(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *fine, DataArrayDoubleCollection *coarse);
-    static void SynchronizeCoarseToFine(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine);
-    static void SynchronizeFineEachOther(int patchId, int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, const std::vector<const MEDCouplingCartesianAMRMeshGen *>& children, const std::vector<DataArrayDoubleCollection *>& fieldsOnFine);
-    static void SynchronizeCoarseToFineOnlyInGhostZone(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine);
-    static void SynchronizeGhostZoneOfOneUsingTwo(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const DataArrayDoubleCollection *p1dac, const MEDCouplingCartesianAMRPatch *p2, const DataArrayDoubleCollection *p2dac);
-    void synchronizeMyGhostZoneUsing(int ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp, const MEDCouplingCartesianAMRMeshGen *father) const;
-    void synchronizeMyGhostZoneUsingExt(int ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp) const;
+    DataArrayDouble *at(mcIdType pos);
+    const DataArrayDouble *at(mcIdType pos) const;
+    mcIdType size() const;
+    static void SynchronizeFineToCoarse(mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, mcIdType patchId, const DataArrayDoubleCollection *fine, DataArrayDoubleCollection *coarse);
+    static void SynchronizeCoarseToFine(mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, mcIdType patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine);
+    static void SynchronizeFineEachOther(mcIdType patchId, mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, const std::vector<const MEDCouplingCartesianAMRMeshGen *>& children, const std::vector<DataArrayDoubleCollection *>& fieldsOnFine);
+    static void SynchronizeCoarseToFineOnlyInGhostZone(mcIdType ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, mcIdType patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine);
+    static void SynchronizeGhostZoneOfOneUsingTwo(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const DataArrayDoubleCollection *p1dac, const MEDCouplingCartesianAMRPatch *p2, const DataArrayDoubleCollection *p2dac);
+    void synchronizeMyGhostZoneUsing(mcIdType ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp, const MEDCouplingCartesianAMRMeshGen *father) const;
+    void synchronizeMyGhostZoneUsingExt(mcIdType ghostLev, const DataArrayDoubleCollection& other, const MEDCouplingCartesianAMRPatch *thisp, const MEDCouplingCartesianAMRPatch *otherp) const;
   private:
     DataArrayDoubleCollection(const std::vector< std::pair<std::string,int> >& fieldNames);
     DataArrayDoubleCollection(const DataArrayDoubleCollection& other);
@@ -72,22 +72,22 @@ namespace MEDCoupling
   public:
     static MEDCouplingGridCollection *New(const std::vector<const MEDCouplingCartesianAMRMeshGen *>& ms, const std::vector< std::pair<std::string,int> >& fieldNames);
     MEDCouplingGridCollection *deepCopy(const MEDCouplingCartesianAMRMeshGen *newGf, const MEDCouplingCartesianAMRMeshGen *oldGf) const;
-    void alloc(int ghostLev);
+    void alloc(mcIdType ghostLev);
     void dealloc();
     void spillInfoOnComponents(const std::vector< std::vector<std::string> >& compNames);
     void spillNatures(const std::vector<NatureOfField>& nfs);
     std::vector< std::pair<std::string, std::vector<std::string> > > getInfoOnComponents() const;
     std::vector<NatureOfField> getNatures() const;
-    bool presenceOf(const MEDCouplingCartesianAMRMeshGen *m, int& pos) const;
-    const DataArrayDoubleCollection& getFieldsAt(int pos) const;
-    DataArrayDoubleCollection& getFieldsAt(int pos);
-    void copyOverlappedZoneFrom(int ghostLev, const MEDCouplingGridCollection& other);
-    static void SynchronizeFineToCoarse(int ghostLev, const MEDCouplingGridCollection *fine, const MEDCouplingGridCollection *coarse);
-    static void SynchronizeCoarseToFine(int ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine);
-    void synchronizeFineEachOther(int ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const;
-    void synchronizeFineEachOtherExt(int ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const;
-    std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > findNeighbors(int ghostLev) const;
-    static void SynchronizeCoarseToFineOnlyInGhostZone(int ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine);
+    bool presenceOf(const MEDCouplingCartesianAMRMeshGen *m, mcIdType& pos) const;
+    const DataArrayDoubleCollection& getFieldsAt(mcIdType pos) const;
+    DataArrayDoubleCollection& getFieldsAt(mcIdType pos);
+    void copyOverlappedZoneFrom(mcIdType ghostLev, const MEDCouplingGridCollection& other);
+    static void SynchronizeFineToCoarse(mcIdType ghostLev, const MEDCouplingGridCollection *fine, const MEDCouplingGridCollection *coarse);
+    static void SynchronizeCoarseToFine(mcIdType ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine);
+    void synchronizeFineEachOther(mcIdType ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const;
+    void synchronizeFineEachOtherExt(mcIdType ghostLev, const std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ps) const;
+    std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > findNeighbors(mcIdType ghostLev) const;
+    static void SynchronizeCoarseToFineOnlyInGhostZone(mcIdType ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine);
     void fillIfInTheProgenyOf(const std::string& fieldName, const MEDCouplingCartesianAMRMeshGen *head, std::vector<const DataArrayDouble *>& recurseArrs) const;
   private:
     MEDCouplingGridCollection(const std::vector<const MEDCouplingCartesianAMRMeshGen *>& ms, const std::vector< std::pair<std::string,int> >& fieldNames);
@@ -108,13 +108,13 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT MEDCouplingCartesianAMRMesh *getMyGodFather();
     MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMesh *getMyGodFather() const;
     MEDCOUPLING_EXPORT virtual void synchronizeFineToCoarse() = 0;
-    MEDCOUPLING_EXPORT virtual void synchronizeFineToCoarseBetween(int fromLev, int toLev) = 0;
+    MEDCOUPLING_EXPORT virtual void synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev) = 0;
     MEDCOUPLING_EXPORT virtual void synchronizeCoarseToFine() = 0;
-    MEDCOUPLING_EXPORT virtual void synchronizeCoarseToFineBetween(int fromLev, int toLev) = 0;
+    MEDCOUPLING_EXPORT virtual void synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev) = 0;
     MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZones() = 0;
     MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh) = 0;
-    MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesAtASpecifiedLevel(int level) = 0;
-    MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(int level) = 0;
+    MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level) = 0;
+    MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level) = 0;
     MEDCOUPLING_EXPORT virtual void alloc() = 0;
     MEDCOUPLING_EXPORT virtual void dealloc() = 0;
   protected:
@@ -131,13 +131,13 @@ namespace MEDCoupling
   class MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
   {
   public:
-    MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, int ghostLev);
-    MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string, std::vector<std::string> > >& fieldNames, int ghostLev);
+    MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, mcIdType ghostLev);
+    MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string, std::vector<std::string> > >& fieldNames, mcIdType ghostLev);
     MEDCOUPLING_EXPORT void spillInfoOnComponents(const std::vector< std::vector<std::string> >& compNames);
     MEDCOUPLING_EXPORT void spillNatures(const std::vector<NatureOfField>& nfs);
     MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *deepCopy() const;
     MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *deepCpyWithoutGodFather() const;
-    MEDCOUPLING_EXPORT int getNumberOfLevels() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfLevels() const;
     MEDCOUPLING_EXPORT std::vector<DataArrayDouble *> retrieveFieldsOn(MEDCouplingCartesianAMRMeshGen *mesh) const;
     MEDCOUPLING_EXPORT const DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
     MEDCOUPLING_EXPORT DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName);
@@ -149,13 +149,13 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *projectTo(MEDCouplingCartesianAMRMesh *targetGF) const;
     //
     MEDCOUPLING_EXPORT void synchronizeFineToCoarse();
-    MEDCOUPLING_EXPORT void synchronizeFineToCoarseBetween(int fromLev, int toLev);
+    MEDCOUPLING_EXPORT void synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev);
     MEDCOUPLING_EXPORT void synchronizeCoarseToFine();
-    MEDCOUPLING_EXPORT void synchronizeCoarseToFineBetween(int fromLev, int toLev);
+    MEDCOUPLING_EXPORT void synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev);
     MEDCOUPLING_EXPORT void synchronizeAllGhostZones();
     MEDCOUPLING_EXPORT void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh);
-    MEDCOUPLING_EXPORT void synchronizeAllGhostZonesAtASpecifiedLevel(int level);
-    MEDCOUPLING_EXPORT void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(int level);
+    MEDCOUPLING_EXPORT void synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level);
+    MEDCOUPLING_EXPORT void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level);
     //
     MEDCOUPLING_EXPORT void alloc();
     MEDCOUPLING_EXPORT void dealloc();
@@ -165,13 +165,13 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     MEDCOUPLING_EXPORT void updateTime() const;
   private:
-    MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, int ghostLev);
+    MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, mcIdType ghostLev);
     MEDCouplingAMRAttribute(const MEDCouplingAMRAttribute& other, bool deepCpyGF);
     const DataArrayDoubleCollection& findCollectionAttachedTo(const MEDCouplingCartesianAMRMeshGen *m) const;
-    void synchronizeFineToCoarseByOneLevel(int level);
-    void synchronizeCoarseToFineByOneLevel(int level);
+    void synchronizeFineToCoarseByOneLevel(mcIdType level);
+    void synchronizeCoarseToFineByOneLevel(mcIdType level);
   private:
-    int _ghost_lev;
+    mcIdType _ghost_lev;
     std::vector< MCAuto<MEDCouplingGridCollection> > _levs;
     std::vector< std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > > _neighbors;
     std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > _mixed_lev_neighbors;
old mode 100644 (file)
new mode 100755 (executable)
index bad815c..100e213
@@ -107,10 +107,10 @@ const DataArrayDouble *MEDCouplingCMesh::getDirectAccessOfCoordsArrIfInStructure
 MEDCouplingCurveLinearMesh *MEDCouplingCMesh::buildCurveLinear() const
 {
   checkConsistencyLight();
-  int dim(getSpaceDimension());
+  std::size_t dim(getSpaceDimension());
   MCAuto<MEDCouplingCurveLinearMesh> ret(MEDCouplingCurveLinearMesh::New());
   ret->MEDCouplingStructuredMesh::operator=(*this);
-  INTERP_KERNEL::AutoPtr<int> ngs(new int[dim]);
+  INTERP_KERNEL::AutoPtr<mcIdType> ngs(new mcIdType[dim]);
   getNodeGridStructure(ngs);
   ret->setNodeGridStructure(ngs,ngs+dim);
   MCAuto<DataArrayDouble> coo(getCoordinatesAndOwner());
@@ -213,7 +213,7 @@ bool MEDCouplingCMesh::isEqualWithoutConsideringStr(const MEDCouplingMesh *other
 }
 
 void MEDCouplingCMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                            DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
+                                            DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 {
   if(!isEqualWithoutConsideringStr(other,prec))
     throw INTERP_KERNEL::Exception("MEDCouplingCMesh::checkDeepEquivalWith : Meshes are not the same !");
@@ -224,7 +224,7 @@ void MEDCouplingCMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int ce
  * The user intend that the nodes are the same, so by construction of MEDCoupling::MEDCouplingCMesh, \a this and \a other are the same !
  */
 void MEDCouplingCMesh::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                       DataArrayInt *&cellCor) const
+                                                       DataArrayIdType *&cellCor) const
 {
   if(!isEqualWithoutConsideringStr(other,prec))
     throw INTERP_KERNEL::Exception("MEDCouplingCMesh::checkDeepEquivalOnSameNodesWith : Meshes are not the same !");
@@ -288,16 +288,16 @@ void MEDCouplingCMesh::checkConsistency(double eps) const
     _z_array->checkMonotonic(true, eps);
 }
 
-void MEDCouplingCMesh::getNodeGridStructure(int *res) const
+void MEDCouplingCMesh::getNodeGridStructure(mcIdType *res) const
 {
-  std::vector<int> ret(getNodeGridStructure());
+  std::vector<mcIdType> ret(getNodeGridStructure());
   std::copy(ret.begin(),ret.end(),res);
 }
 
-std::vector<int> MEDCouplingCMesh::getNodeGridStructure() const
+std::vector<mcIdType> MEDCouplingCMesh::getNodeGridStructure() const
 {
   static const char MSG[]="MEDCouplingCMesh::getNodeGridStructure : mesh is invalid ! null vectors (X, Y or Z) must be put contiguously at the end !";
-  std::vector<int> ret;
+  std::vector<mcIdType> ret;
   bool isOK(true);
   if(_x_array)
     {
@@ -328,11 +328,11 @@ std::vector<int> MEDCouplingCMesh::getNodeGridStructure() const
   return ret;
 }
 
-MEDCouplingStructuredMesh *MEDCouplingCMesh::buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const
+MEDCouplingStructuredMesh *MEDCouplingCMesh::buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const
 {
   checkConsistencyLight();
   int dim(getSpaceDimension());
-  if(dim!=(int)cellPart.size())
+  if(dim!=ToIdType(cellPart.size()))
     {
       std::ostringstream oss; oss << "MEDCouplingCMesh::buildStructuredSubPart : the space dimension is " << dim << " and cell part size is " << cellPart.size() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -355,13 +355,13 @@ int MEDCouplingCMesh::getSpaceDimension() const
   return (int)getNodeGridStructure().size();
 }
 
-void MEDCouplingCMesh::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const
+void MEDCouplingCMesh::getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const
 {
-  int tmp[3];
+  mcIdType tmp[3];
   int spaceDim=getSpaceDimension();
   getSplitNodeValues(tmp);
   const DataArrayDouble *tabs[3]={getCoordsAt(0),getCoordsAt(1),getCoordsAt(2)};
-  int tmp2[3];
+  mcIdType tmp2[3];
   GetPosFromId(nodeId,spaceDim,tmp,tmp2);
   for(int j=0;j<spaceDim;j++)
     if(tabs[j])
@@ -542,7 +542,7 @@ void MEDCouplingCMesh::getBoundingBox(double *bbox) const
       if(c)
         {
           const double *coords=c->getConstPointer();
-          int nb=c->getNbOfElems();
+          mcIdType nb=ToIdType(c->getNbOfElems());
           bbox[2*j]=coords[0];
           bbox[2*j+1]=coords[nb-1];
           j++;
@@ -565,7 +565,7 @@ MEDCouplingFieldDouble *MEDCouplingCMesh::getMeasureField(bool isAbs) const
 {
   std::string name="MeasureOfMesh_";
   name+=getName();
-  int nbelem=getNumberOfCells();
+  mcIdType nbelem=ToIdType(getNumberOfCells());
   MEDCouplingFieldDouble *field=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   field->setName(name);
   DataArrayDouble* array=DataArrayDouble::New();
@@ -575,16 +575,16 @@ MEDCouplingFieldDouble *MEDCouplingCMesh::getMeasureField(bool isAbs) const
   array->decrRef();
   field->setMesh(const_cast<MEDCouplingCMesh *>(this));
   field->synchronizeTimeWithMesh();
-  int tmp[3];
+  mcIdType tmp[3];
   getSplitCellValues(tmp);
   int dim=getSpaceDimension();
   const double **thisArr=new const double *[dim];
   const DataArrayDouble *thisArr2[3]={_x_array,_y_array,_z_array};
   for(int i=0;i<dim;i++)
     thisArr[i]=thisArr2[i]->getConstPointer();
-  for(int icell=0;icell<nbelem;icell++)
+  for(mcIdType icell=0;icell<nbelem;icell++)
     {
-      int tmp2[3];
+      mcIdType tmp2[3];
       GetPosFromId(icell,dim,tmp,tmp2);
       area_vol[icell]=1.;
       for(int i=0;i<dim;i++)
@@ -603,18 +603,18 @@ MEDCouplingFieldDouble *MEDCouplingCMesh::getMeasureFieldOnNode(bool isAbs) cons
   //return 0;
 }
 
-int MEDCouplingCMesh::getCellContainingPoint(const double *pos, double eps) const
+mcIdType MEDCouplingCMesh::getCellContainingPoint(const double *pos, double eps) const
 {
   int dim=getSpaceDimension();
-  int ret=0;
-  int coeff=1;
+  mcIdType ret=0;
+  mcIdType coeff=1;
   for(int i=0;i<dim;i++)
     {
       const double *d=getCoordsAt(i)->getConstPointer();
-      int nbOfNodes=getCoordsAt(i)->getNbOfElems();
+      mcIdType nbOfNodes=getCoordsAt(i)->getNbOfElems();
       double ref=pos[i];
       const double *w=std::find_if(d,d+nbOfNodes,std::bind2nd(std::greater_equal<double>(),ref));
-      int w2=(int)std::distance(d,w);
+      mcIdType w2=ToIdType(std::distance(d,w));
       if(w2<nbOfNodes)
         {
           if(w2==0)
@@ -633,9 +633,9 @@ int MEDCouplingCMesh::getCellContainingPoint(const double *pos, double eps) cons
   return ret;
 }
 
-void MEDCouplingCMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const
+void MEDCouplingCMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const
 {
-  int ret(getCellContainingPoint(pos,eps));
+  mcIdType ret(getCellContainingPoint(pos,eps));
   elts.push_back(ret);
 }
 
@@ -665,7 +665,7 @@ void MEDCouplingCMesh::translate(const double *vector)
 
 /*!
  * Applies scaling transformation to all nodes of \a this mesh.
- *  \param [in] point - coordinates of a scaling center. This array is to be of
+ *  \param [in] postd::size_t - coordinates of a scaling center. This array is to be of
  *         size \a this->getSpaceDimension() at least.
  *  \param [in] factor - a scale factor.
  */
@@ -677,7 +677,7 @@ void MEDCouplingCMesh::scale(const double *point, double factor)
       if(c)
         {
           double *coords=c->getPointer();
-          int lgth=c->getNbOfElems();
+          mcIdType lgth=ToIdType(c->getNbOfElems());
           std::transform(coords,coords+lgth,coords,std::bind2nd(std::minus<double>(),point[i]));
           std::transform(coords,coords+lgth,coords,std::bind2nd(std::multiplies<double>(),factor));
           std::transform(coords,coords+lgth,coords,std::bind2nd(std::plus<double>(),point[i]));
@@ -703,20 +703,21 @@ MEDCouplingMesh *MEDCouplingCMesh::mergeMyselfWith(const MEDCouplingMesh *other)
 DataArrayDouble *MEDCouplingCMesh::getCoordinatesAndOwner() const
 {
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
-  int spaceDim(getSpaceDimension()),nbNodes(getNumberOfNodes());
+  int spaceDim(getSpaceDimension());
+  mcIdType nbNodes(getNumberOfNodes());
   ret->alloc(nbNodes,spaceDim);
   double *pt(ret->getPointer());
-  int tmp[3];
+  mcIdType tmp[3];
   getSplitNodeValues(tmp);
   const DataArrayDouble *tabs[3]={getCoordsAt(0),getCoordsAt(1),getCoordsAt(2)};
   const double *tabsPtr[3];
-  for(int j=0;j<spaceDim;j++)
+  for(mcIdType j=0;j<spaceDim;j++)
     {
       tabsPtr[j]=tabs[j]->getConstPointer();
       ret->setInfoOnComponent(j,tabs[j]->getInfoOnComponent(0));
     }
-  int tmp2[3];
-  for(int i=0;i<nbNodes;i++)
+  mcIdType tmp2[3];
+  for(mcIdType i=0;i<nbNodes;i++)
     {
       GetPosFromId(i,spaceDim,tmp,tmp2);
       for(int j=0;j<spaceDim;j++)
@@ -737,23 +738,23 @@ DataArrayDouble *MEDCouplingCMesh::computeCellCenterOfMass() const
 {
   DataArrayDouble *ret=DataArrayDouble::New();
   int spaceDim=getSpaceDimension();
-  int nbCells=getNumberOfCells();
+  mcIdType nbCells=ToIdType(getNumberOfCells());
   ret->alloc(nbCells,spaceDim);
   double *pt=ret->getPointer();
-  int tmp[3];
+  mcIdType tmp[3];
   getSplitCellValues(tmp);
   const DataArrayDouble *tabs[3]={getCoordsAt(0),getCoordsAt(1),getCoordsAt(2)};
   std::vector<double> tabsPtr[3];
   for(int j=0;j<spaceDim;j++)
     {
-      int sz=tabs[j]->getNbOfElems()-1;
+      mcIdType sz=tabs[j]->getNbOfElems()-1;
       ret->setInfoOnComponent(j,tabs[j]->getInfoOnComponent(0));
       const double *srcPtr=tabs[j]->getConstPointer();
       tabsPtr[j].insert(tabsPtr[j].end(),srcPtr,srcPtr+sz);
       std::transform(tabsPtr[j].begin(),tabsPtr[j].end(),srcPtr+1,tabsPtr[j].begin(),std::plus<double>());
       std::transform(tabsPtr[j].begin(),tabsPtr[j].end(),tabsPtr[j].begin(),std::bind2nd(std::multiplies<double>(),0.5));
     }
-  int tmp2[3];
+  mcIdType tmp2[3];
   for(int i=0;i<nbCells;i++)
     {
       GetPosFromId(i,spaceDim,tmp,tmp2);
@@ -768,12 +769,12 @@ DataArrayDouble *MEDCouplingCMesh::computeIsoBarycenterOfNodesPerCell() const
   return MEDCouplingCMesh::computeCellCenterOfMass();
 }
 
-void MEDCouplingCMesh::renumberCells(const int *old2NewBg, bool check)
+void MEDCouplingCMesh::renumberCells(const mcIdType *old2NewBg, bool check)
 {
   throw INTERP_KERNEL::Exception("Functionality of renumbering cell not available for CMesh !");
 }
 
-void MEDCouplingCMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingCMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
   int it,order;
   double time=getTime(it,order);
@@ -786,7 +787,7 @@ void MEDCouplingCMesh::getTinySerializationInformation(std::vector<double>& tiny
   const DataArrayDouble *thisArr[3]={_x_array,_y_array,_z_array};
   for(int i=0;i<3;i++)
     {
-      int val=-1;
+      mcIdType val=-1;
       std::string st;
       if(thisArr[i])
         {
@@ -801,22 +802,22 @@ void MEDCouplingCMesh::getTinySerializationInformation(std::vector<double>& tiny
   tinyInfoD.push_back(time);
 }
 
-void MEDCouplingCMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCouplingCMesh::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
   a1->alloc(0,1);
-  int sum=0;
+  mcIdType sum=0;
   for(int i=0;i<3;i++)
     if(tinyInfo[i]!=-1)
       sum+=tinyInfo[i];
   a2->alloc(sum,1);
 }
 
-void MEDCouplingCMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCouplingCMesh::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
-  a1=DataArrayInt::New();
+  a1=DataArrayIdType::New();
   a1->alloc(0,1);
   const DataArrayDouble *thisArr[3]={_x_array,_y_array,_z_array};
-  int sz=0;
+  mcIdType sz=0;
   for(int i=0;i<3;i++)
     {
       if(thisArr[i])
@@ -830,7 +831,7 @@ void MEDCouplingCMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
       a2Ptr=std::copy(thisArr[i]->getConstPointer(),thisArr[i]->getConstPointer()+thisArr[i]->getNumberOfTuples(),a2Ptr);
 }
 
-void MEDCouplingCMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+void MEDCouplingCMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                        const std::vector<std::string>& littleStrings)
 {
   setName(littleStrings[0]);
@@ -849,7 +850,7 @@ void MEDCouplingCMesh::unserialization(const std::vector<double>& tinyInfoD, con
           data+=tinyInfo[i];
         }
     }
-  setTime(tinyInfoD[0],tinyInfo[3],tinyInfo[4]);
+  setTime(tinyInfoD[0],FromIdType<int>(tinyInfo[3]),FromIdType<int>(tinyInfo[4]));
 }
 
 void MEDCouplingCMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const
@@ -892,22 +893,22 @@ void MEDCouplingCMesh::reprQuickOverview(std::ostream& stream) const
   const DataArrayDouble *thisArr[3]={_x_array,_y_array,_z_array};
   std::ostringstream stream2[3];
   bool isDef[3];
-  int nbOfCells=1,nbOfNodes=1;
+  mcIdType nbOfCells=1,nbOfNodes=1;
   for(int i=0;i<3;i++)
     {
       isDef[i]=thisArr[i]!=0;
       if(isDef[i])
         {    
-          char tmp='X'+i;
+          char tmp=(char)((int)('X')+i);
           stream2[i] << tmp << " positions array ";
           if(!thisArr[i]->isAllocated())
             stream2[i] << "set but not allocated.";
           else
             {
-              int nbCompo=thisArr[i]->getNumberOfComponents();
+              std::size_t nbCompo=thisArr[i]->getNumberOfComponents();
               if(nbCompo==1)
                 {
-                  int nbTuples=thisArr[i]->getNumberOfTuples();
+                  mcIdType nbTuples=thisArr[i]->getNumberOfTuples();
                   if(nbTuples<1)
                     { stream2[i] << "set and allocated - WARNING number of elements < 1 !"; nbOfCells=-1; nbOfNodes=-1; }
                   else
index e97618ed6fd46a66467670c6687a21c0c26cdba5..ae68dffb8e275b8a9a1dd99d58affc7951736f42 100644 (file)
@@ -45,13 +45,13 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                 DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
+                                                 DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                            DataArrayInt *&cellCor) const;
+                                                            DataArrayIdType *&cellCor) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
     MEDCOUPLING_EXPORT int getSpaceDimension() const;
-    MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
+    MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
     MEDCOUPLING_EXPORT std::string simpleRepr() const;
     MEDCOUPLING_EXPORT std::string advancedRepr() const;
     MEDCOUPLING_EXPORT const DataArrayDouble *getCoordsAt(int i) const;
@@ -64,8 +64,8 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
-    MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const;
-    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const;
+    MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
+    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
     MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
     MEDCOUPLING_EXPORT void translate(const double *vector);
     MEDCOUPLING_EXPORT void scale(const double *point, double factor);
@@ -73,16 +73,16 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
     //some useful methods
-    MEDCOUPLING_EXPORT void getNodeGridStructure(int *res) const;
-    MEDCOUPLING_EXPORT std::vector<int> getNodeGridStructure() const;
-    MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const;
+    MEDCOUPLING_EXPORT void getNodeGridStructure(mcIdType *res) const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeGridStructure() const;
+    MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const;
     //serialisation-unserialization
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                             const std::vector<std::string>& littleStrings);
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
old mode 100644 (file)
new mode 100755 (executable)
index c4ea272..ef0ed1b
@@ -33,17 +33,17 @@ using namespace MEDCoupling;
 
 /// @cond INTERNAL
 
-int MEDCouplingCartesianAMRPatchGen::getNumberOfCellsRecursiveWithOverlap() const
+mcIdType MEDCouplingCartesianAMRPatchGen::getNumberOfCellsRecursiveWithOverlap() const
 {
   return _mesh->getNumberOfCellsRecursiveWithOverlap();
 }
 
-int MEDCouplingCartesianAMRPatchGen::getNumberOfCellsRecursiveWithoutOverlap() const
+mcIdType MEDCouplingCartesianAMRPatchGen::getNumberOfCellsRecursiveWithoutOverlap() const
 {
   return _mesh->getNumberOfCellsRecursiveWithoutOverlap();
 }
 
-int MEDCouplingCartesianAMRPatchGen::getMaxNumberOfLevelsRelativeToThis() const
+mcIdType MEDCouplingCartesianAMRPatchGen::getMaxNumberOfLevelsRelativeToThis() const
 {
   return _mesh->getMaxNumberOfLevelsRelativeToThis();
 }
@@ -90,9 +90,9 @@ std::vector<const BigMemoryObject *> MEDCouplingCartesianAMRPatchGen::getDirectC
  * \param [in] bottomLeftTopRight a vector equal to the space dimension of \a mesh that specifies for each dimension, the included cell start of the range for the first element of the pair,
  *                                a the end cell (\b excluded) of the range for the second element of the pair.
  */
-MEDCouplingCartesianAMRPatch::MEDCouplingCartesianAMRPatch(MEDCouplingCartesianAMRMeshGen *mesh, const std::vector< std::pair<int,int> >& bottomLeftTopRight):MEDCouplingCartesianAMRPatchGen(mesh),_bl_tr(bottomLeftTopRight)
+MEDCouplingCartesianAMRPatch::MEDCouplingCartesianAMRPatch(MEDCouplingCartesianAMRMeshGen *mesh, const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight):MEDCouplingCartesianAMRPatchGen(mesh),_bl_tr(bottomLeftTopRight)
 {
-  int dim((int)bottomLeftTopRight.size()),dimExp(_mesh->getSpaceDimension());
+  std::size_t dim(bottomLeftTopRight.size()),dimExp(_mesh->getSpaceDimension());
   if(dim!=dimExp)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch constructor : space dimension of father and input bottomLeft/topRight size mismatches !");
 }
@@ -102,12 +102,12 @@ MEDCouplingCartesianAMRPatch *MEDCouplingCartesianAMRPatch::deepCopy(MEDCoupling
   return new MEDCouplingCartesianAMRPatch(*this,father);
 }
 
-void MEDCouplingCartesianAMRPatch::addPatch(const std::vector< std::pair<int,int> >& bottomLeftTopRight, const std::vector<int>& factors)
+void MEDCouplingCartesianAMRPatch::addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors)
 {
   return getMeshSafe()->addPatch(bottomLeftTopRight,factors);
 }
 
-int MEDCouplingCartesianAMRPatch::getNumberOfOverlapedCellsForFather() const
+mcIdType MEDCouplingCartesianAMRPatch::getNumberOfOverlapedCellsForFather() const
 {
   return MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(_bl_tr);
 }
@@ -126,14 +126,14 @@ int MEDCouplingCartesianAMRPatch::getNumberOfOverlapedCellsForFather() const
  *
  * \sa isInMyNeighborhoodExt
  */
-bool MEDCouplingCartesianAMRPatch::isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const
+bool MEDCouplingCartesianAMRPatch::isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const
 {
   if(ghostLev<0)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::isInMyNeighborhood : the size of the neighborhood must be >= 0 !");
   if(!other)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::isInMyNeighborhood : the input patch is NULL !");
-  const std::vector< std::pair<int,int> >& thisp(getBLTRRange());
-  const std::vector< std::pair<int,int> >& otherp(other->getBLTRRange());
+  const std::vector< std::pair<mcIdType,mcIdType> >& thisp(getBLTRRange());
+  const std::vector< std::pair<mcIdType,mcIdType> >& otherp(other->getBLTRRange());
   return IsInMyNeighborhood(ghostLev==0?0:1,thisp,otherp);//make hypothesis that nb this->_mesh->getFather->getFactors() is >= ghostLev
 }
 
@@ -152,19 +152,19 @@ bool MEDCouplingCartesianAMRPatch::isInMyNeighborhood(const MEDCouplingCartesian
  *
  * \sa isInMyNeighborhood, isInMyNeighborhoodDiffLev
  */
-bool MEDCouplingCartesianAMRPatch::isInMyNeighborhoodExt(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const
+bool MEDCouplingCartesianAMRPatch::isInMyNeighborhoodExt(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const
 {
   if(ghostLev<0)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::isInMyNeighborhoodExt : the size of the neighborhood must be >= 0 !");
   if(!other)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::isInMyNeighborhoodExt : the input patch is NULL !");
-  int lev;
+  mcIdType lev;
   const MEDCouplingCartesianAMRMeshGen *com(FindCommonAncestor(this,other,lev));//check that factors are OK
   if(lev==0)
     return isInMyNeighborhood(other,ghostLev);
-  std::vector<int> offset(ComputeOffsetFromTwoToOne(com,lev,this,other));
-  const std::vector< std::pair<int,int> >& thisp(getBLTRRange());
-  std::vector< std::pair<int,int> > otherp(other->getBLTRRange());
+  std::vector<mcIdType> offset(ComputeOffsetFromTwoToOne(com,lev,this,other));
+  const std::vector< std::pair<mcIdType,mcIdType> >& thisp(getBLTRRange());
+  std::vector< std::pair<mcIdType,mcIdType> > otherp(other->getBLTRRange());
   otherp=MEDCouplingStructuredMesh::TranslateCompactFrmt(otherp,offset);
   return IsInMyNeighborhood(ghostLev,thisp,otherp);
 }
@@ -184,24 +184,24 @@ bool MEDCouplingCartesianAMRPatch::isInMyNeighborhoodExt(const MEDCouplingCartes
  *
  * \sa isInMyNeighborhoodExt
  */
-bool MEDCouplingCartesianAMRPatch::isInMyNeighborhoodDiffLev(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const
+bool MEDCouplingCartesianAMRPatch::isInMyNeighborhoodDiffLev(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const
 {
-  std::vector< std::pair<int,int> > thispp,otherpp;
-  std::vector<int> factors;
+  std::vector< std::pair<mcIdType,mcIdType> > thispp,otherpp;
+  std::vector<mcIdType> factors;
   ComputeZonesOfTwoRelativeToOneDiffLev(ghostLev,this,other,thispp,otherpp,factors);
   return IsInMyNeighborhood(ghostLev>0?1:0,thispp,otherpp);//1 not ghostLev ! It is not a bug ( I hope :) ) ! Because as \a this is a refinement of \a other ghostLev is supposed to be <= factors
 }
 
-std::vector< std::pair<int,int> > MEDCouplingCartesianAMRPatch::getBLTRRangeRelativeToGF() const
+std::vector< std::pair<mcIdType,mcIdType> > MEDCouplingCartesianAMRPatch::getBLTRRangeRelativeToGF() const
 {
-  std::vector< std::pair<int,int> > ret(_bl_tr);
+  std::vector< std::pair<mcIdType,mcIdType> > ret(_bl_tr);
   const MEDCouplingCartesianAMRMeshGen *mesh(getMesh());
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::getBLTRRangeRelativeToGF : not valid !");
   const MEDCouplingCartesianAMRMeshGen *fath(mesh->getFather());
   if(!fath)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::getBLTRRangeRelativeToGF : not valid 2 !");
-  std::vector<int> factors(fath->getFactors());
+  std::vector<mcIdType> factors(fath->getFactors());
   std::size_t sz(ret.size());
   for(std::size_t ii=0;ii<sz;ii++)
     {
@@ -212,14 +212,14 @@ std::vector< std::pair<int,int> > MEDCouplingCartesianAMRPatch::getBLTRRangeRela
   fath=oldFather->getFather();
   while(fath)
     {
-      int pos(fath->getPatchIdFromChildMesh(oldFather));
+      mcIdType pos(fath->getPatchIdFromChildMesh(oldFather));
       const MEDCouplingCartesianAMRPatch *p(fath->getPatch(pos));
-      const std::vector< std::pair<int,int> >& tmp(p->getBLTRRange());
-      const std::vector<int>& factors2(fath->getFactors());
-      std::transform(factors.begin(),factors.end(),factors2.begin(),factors.begin(),std::multiplies<int>());
+      const std::vector< std::pair<mcIdType,mcIdType> >& tmp(p->getBLTRRange());
+      const std::vector<mcIdType>& factors2(fath->getFactors());
+      std::transform(factors.begin(),factors.end(),factors2.begin(),factors.begin(),std::multiplies<mcIdType>());
       for(std::size_t ii=0;ii<sz;ii++)
         {
-          int delta(ret[ii].second-ret[ii].first);
+          mcIdType delta(ret[ii].second-ret[ii].first);
           ret[ii].first+=tmp[ii].first*factors[ii];
           ret[ii].second=ret[ii].first+delta;
         }
@@ -229,7 +229,7 @@ std::vector< std::pair<int,int> > MEDCouplingCartesianAMRPatch::getBLTRRangeRela
   return ret;
 }
 
-std::vector<int> MEDCouplingCartesianAMRPatch::computeCellGridSt() const
+std::vector<mcIdType> MEDCouplingCartesianAMRPatch::computeCellGridSt() const
 {
   const MEDCouplingCartesianAMRMeshGen *m(getMesh());
   if(!m)
@@ -237,22 +237,22 @@ std::vector<int> MEDCouplingCartesianAMRPatch::computeCellGridSt() const
   const MEDCouplingCartesianAMRMeshGen *father(m->getFather());
   if(!father)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::computeCellGridSt : no father help by underlying mesh !");
-  const std::vector< std::pair<int,int> >& bltr(getBLTRRange());
-  const std::vector<int>& factors(father->getFactors());
-  std::vector<int> ret(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(bltr));
-  std::transform(ret.begin(),ret.end(),factors.begin(),ret.begin(),std::multiplies<int>());
+  const std::vector< std::pair<mcIdType,mcIdType> >& bltr(getBLTRRange());
+  const std::vector<mcIdType>& factors(father->getFactors());
+  std::vector<mcIdType> ret(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(bltr));
+  std::transform(ret.begin(),ret.end(),factors.begin(),ret.begin(),std::multiplies<mcIdType>());
   return ret;
 }
 
-bool MEDCouplingCartesianAMRPatch::IsInMyNeighborhood(int ghostLev, const std::vector< std::pair<int,int> >& p1, const std::vector< std::pair<int,int> >& p2)
+bool MEDCouplingCartesianAMRPatch::IsInMyNeighborhood(mcIdType ghostLev, const std::vector< std::pair<mcIdType,mcIdType> >& p1, const std::vector< std::pair<mcIdType,mcIdType> >& p2)
 {
   std::size_t thispsize(p1.size());
   if(thispsize!=p2.size())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::isInMyNeighborhood : the dimensions must be the same !");
   for(std::size_t i=0;i<thispsize;i++)
     {
-      const std::pair<int,int>& thispp(p1[i]);
-      const std::pair<int,int>& otherpp(p2[i]);
+      const std::pair<mcIdType,mcIdType>& thispp(p1[i]);
+      const std::pair<mcIdType,mcIdType>& otherpp(p2[i]);
       if(thispp.second<thispp.first)
         throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::isInMyNeighborhood : this patch is invalid !");
       if(otherpp.second<otherpp.first)
@@ -261,7 +261,7 @@ bool MEDCouplingCartesianAMRPatch::IsInMyNeighborhood(int ghostLev, const std::v
         continue;
       if(otherpp.second+ghostLev-1==thispp.first)
         continue;
-      int start(std::max(thispp.first,otherpp.first)),end(std::min(thispp.second,otherpp.second));
+      mcIdType start(std::max(thispp.first,otherpp.first)),end(std::min(thispp.second,otherpp.second));
       if(end<start)
         return false;
     }
@@ -271,7 +271,7 @@ bool MEDCouplingCartesianAMRPatch::IsInMyNeighborhood(int ghostLev, const std::v
 /*!
  * \sa FindNeighborsOfSubPatchesOf
  */
-std::vector< std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > > MEDCouplingCartesianAMRPatch::FindNeighborsOfSubPatchesOfSameLev(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2)
+std::vector< std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > > MEDCouplingCartesianAMRPatch::FindNeighborsOfSubPatchesOfSameLev(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2)
 {
   if(!p1 || !p2)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::FindNeighborsOfSubPatchesOfSameLev : the input pointers must be not NULL !");
@@ -310,7 +310,7 @@ std::vector< std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const M
  *
  * \sa FindNeighborsOfSubPatchesOfSameLev
  */
-void MEDCouplingCartesianAMRPatch::FindNeighborsOfSubPatchesOf(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<const MEDCouplingCartesianAMRPatch *, const MEDCouplingCartesianAMRPatch *> >& ret)
+void MEDCouplingCartesianAMRPatch::FindNeighborsOfSubPatchesOf(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<const MEDCouplingCartesianAMRPatch *, const MEDCouplingCartesianAMRPatch *> >& ret)
 {
   if(!p1 || !p2)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::FindNeighborsOfSubPatchesOf : the input pointers must be not NULL !");
@@ -334,10 +334,10 @@ void MEDCouplingCartesianAMRPatch::FindNeighborsOfSubPatchesOf(int ghostLev, con
  *
  * \saUpdateNeighborsOfOneWithTwoExt
  */
-void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwo(int ghostLev, const std::vector<int>& factors, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2)
+void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwo(mcIdType ghostLev, const std::vector<mcIdType>& factors, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2)
 {
-  const std::vector< std::pair<int,int> >& p1BLTR(p1->getBLTRRange());
-  const std::vector< std::pair<int,int> >& p2BLTR(p2->getBLTRRange());
+  const std::vector< std::pair<mcIdType,mcIdType> >& p1BLTR(p1->getBLTRRange());
+  const std::vector< std::pair<mcIdType,mcIdType> >& p2BLTR(p2->getBLTRRange());
   UpdateNeighborsOfOneWithTwoInternal(ghostLev,factors,p1BLTR,p2BLTR,dataOnP1,dataOnP2);
 }
 
@@ -346,13 +346,13 @@ void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwo(int ghostLev, con
  *
  * \sa UpdateNeighborsOfOneWithTwo
  */
-void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoExt(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2)
+void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoExt(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2)
 {
-  const std::vector< std::pair<int,int> >& p1BLTR(p1->getBLTRRange());//p1BLTR=[(10,12),(5,8)]
-  std::vector< std::pair<int,int> > p2BLTR(p2->getBLTRRange());//p2BLTR=[(0,1),(0,5)]
-  int lev(0);
+  const std::vector< std::pair<mcIdType,mcIdType> >& p1BLTR(p1->getBLTRRange());//p1BLTR=[(10,12),(5,8)]
+  std::vector< std::pair<mcIdType,mcIdType> > p2BLTR(p2->getBLTRRange());//p2BLTR=[(0,1),(0,5)]
+  mcIdType lev(0);
   const MEDCouplingCartesianAMRMeshGen *ca(FindCommonAncestor(p1,p2,lev));
-  std::vector<int> offset(ComputeOffsetFromTwoToOne(ca,lev,p1,p2));//[12,4]
+  std::vector<mcIdType> offset(ComputeOffsetFromTwoToOne(ca,lev,p1,p2));//[12,4]
   p2BLTR=MEDCouplingStructuredMesh::TranslateCompactFrmt(p2BLTR,offset);//p2BLTR=[(12,13),(4,9)]
   UpdateNeighborsOfOneWithTwoInternal(ghostLev,p1->getMesh()->getFather()->getFactors(),p1BLTR,p2BLTR,dataOnP1,dataOnP2);
 }
@@ -360,23 +360,23 @@ void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoExt(int ghostLev,
 /*!
  * \a p1 is expected to be more refined than \a p2. \a p1 and \a p2 have to share a common ancestor. Compared to UpdateNeighborsOfOneWithTwoExt here \a p1 and \a p2 are \b not at the same level !
  */
-void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoMixedLev(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2, bool isConservative)
+void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoMixedLev(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2, bool isConservative)
 {
-  std::vector< std::pair<int,int> > p1pp,p2pp;
-  std::vector<int> factors;
+  std::vector< std::pair<mcIdType,mcIdType> > p1pp,p2pp;
+  std::vector<mcIdType> factors;
   ComputeZonesOfTwoRelativeToOneDiffLev(ghostLev,p1,p2,p1pp,p2pp,factors);
   //
-  std::vector<int> dimsP2NotRefined(p2->computeCellGridSt());
-  std::vector<int> dimsP2Refined(dimsP2NotRefined);
-  std::transform(dimsP2NotRefined.begin(),dimsP2NotRefined.end(),factors.begin(),dimsP2Refined.begin(),std::multiplies<int>());
-  std::vector< std::pair<int,int> > p2RefinedAbs(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dimsP2NotRefined));
-  std::vector<int> dimsP2RefinedGhost(dimsP2Refined.size());
-  std::transform(dimsP2Refined.begin(),dimsP2Refined.end(),dimsP2RefinedGhost.begin(),std::bind2nd(std::plus<int>(),2*ghostLev));
+  std::vector<mcIdType> dimsP2NotRefined(p2->computeCellGridSt());
+  std::vector<mcIdType> dimsP2Refined(dimsP2NotRefined);
+  std::transform(dimsP2NotRefined.begin(),dimsP2NotRefined.end(),factors.begin(),dimsP2Refined.begin(),std::multiplies<mcIdType>());
+  std::vector< std::pair<mcIdType,mcIdType> > p2RefinedAbs(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dimsP2NotRefined));
+  std::vector<mcIdType> dimsP2RefinedGhost(dimsP2Refined.size());
+  std::transform(dimsP2Refined.begin(),dimsP2Refined.end(),dimsP2RefinedGhost.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostLev));
   MCAuto<DataArrayDouble> fineP2(DataArrayDouble::New()); fineP2->alloc(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(dimsP2RefinedGhost),dataOnP2->getNumberOfComponents());
   MEDCouplingIMesh::SpreadCoarseToFineGhost(dataOnP2,dimsP2NotRefined,fineP2,p2RefinedAbs,factors,ghostLev);
   if(isConservative)
     {
-      int fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(factors));
+      mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(factors));
       std::transform(fineP2->begin(),fineP2->end(),fineP2->getPointer(),std::bind2nd(std::multiplies<double>(),1./((double)fact)));
     }
   //
@@ -388,7 +388,7 @@ void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoMixedLev(int ghost
  * This method has 3 outputs. 2 two first are the resp the position of \a p1 and \a p2 relative to \a p1. And \a factToApplyOn2 is the coeff of refinement to be applied on \a p2 to be virtually
  * on the same level as \a p1.
  */
-void MEDCouplingCartesianAMRPatch::ComputeZonesOfTwoRelativeToOneDiffLev(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<int,int> >& p1Zone, std::vector< std::pair<int,int> >& p2Zone, std::vector<int>& factToApplyOn2)
+void MEDCouplingCartesianAMRPatch::ComputeZonesOfTwoRelativeToOneDiffLev(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<mcIdType,mcIdType> >& p1Zone, std::vector< std::pair<mcIdType,mcIdType> >& p2Zone, std::vector<mcIdType>& factToApplyOn2)
 {
   std::vector<const MEDCouplingCartesianAMRMeshGen *> ancestorsOfThis;
   const MEDCouplingCartesianAMRMeshGen *work(p1->getMesh()),*work2(0);
@@ -424,24 +424,24 @@ void MEDCouplingCartesianAMRPatch::ComputeZonesOfTwoRelativeToOneDiffLev(int gho
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::ComputeZonesOfTwoRelativeToOneDiffLev : this method is not called correctly !");
   //
   const MEDCouplingCartesianAMRMeshGen *comAncestor(ancestorsOfThis[levThis]);
-  int idThis(comAncestor->getPatchIdFromChildMesh(ancestorsOfThis[levThis-1])),idOther(comAncestor->getPatchIdFromChildMesh(work2));
+  mcIdType idThis(comAncestor->getPatchIdFromChildMesh(ancestorsOfThis[levThis-1])),idOther(comAncestor->getPatchIdFromChildMesh(work2));
   const MEDCouplingCartesianAMRPatch *thisp(comAncestor->getPatch(idThis)),*otherp(comAncestor->getPatch(idOther));
-  std::vector<int> offset(ComputeOffsetFromTwoToOne(comAncestor,levOther,thisp,otherp));
+  std::vector<mcIdType> offset(ComputeOffsetFromTwoToOne(comAncestor,ToIdType(levOther),thisp,otherp));
   p1Zone=thisp->getBLTRRange(); p2Zone=MEDCouplingStructuredMesh::TranslateCompactFrmt(otherp->getBLTRRange(),offset);
   factToApplyOn2.resize(p1Zone.size()); std::fill(factToApplyOn2.begin(),factToApplyOn2.end(),1);
   //
   std::size_t nbOfTurn(levThis-levOther);
   for(std::size_t i=0;i<nbOfTurn;i++)
     {
-      std::vector< std::pair<int,int> > tmp0;
+      std::vector< std::pair<mcIdType,mcIdType> > tmp0;
       MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(p1Zone,p2Zone,tmp0,false);
       p2Zone=tmp0;
       const MEDCouplingCartesianAMRMeshGen *curAncestor(ancestorsOfThis[levThis-i]);
       ApplyFactorsOnCompactFrmt(p2Zone,curAncestor->getFactors());
       curAncestor=ancestorsOfThis[levThis-1-i];
-      const std::vector<int>& factors(curAncestor->getFactors());
-      std::transform(factToApplyOn2.begin(),factToApplyOn2.end(),factors.begin(),factToApplyOn2.begin(),std::multiplies<int>());
-      int tmpId(curAncestor->getPatchIdFromChildMesh(ancestorsOfThis[levThis-2-i]));
+      const std::vector<mcIdType>& factors(curAncestor->getFactors());
+      std::transform(factToApplyOn2.begin(),factToApplyOn2.end(),factors.begin(),factToApplyOn2.begin(),std::multiplies<mcIdType>());
+      mcIdType tmpId(curAncestor->getPatchIdFromChildMesh(ancestorsOfThis[levThis-2-i]));
       p1Zone=curAncestor->getPatch(tmpId)->getBLTRRange();
     }
 }
@@ -449,11 +449,11 @@ void MEDCouplingCartesianAMRPatch::ComputeZonesOfTwoRelativeToOneDiffLev(int gho
 std::size_t MEDCouplingCartesianAMRPatch::getHeapMemorySizeWithoutChildren() const
 {
   std::size_t ret(sizeof(MEDCouplingCartesianAMRPatch));
-  ret+=_bl_tr.capacity()*sizeof(std::pair<int,int>);
+  ret+=_bl_tr.capacity()*sizeof(std::pair<mcIdType,mcIdType>);
   return ret;
 }
 
-const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRPatch::FindCommonAncestor(const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, int& lev)
+const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRPatch::FindCommonAncestor(const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, mcIdType& lev)
 {
   const MEDCouplingCartesianAMRMeshGen *f1(p1->_mesh),*f2(p2->_mesh);
   lev=0;
@@ -469,33 +469,33 @@ const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRPatch::FindCommonAn
   return f1;
 }
 
-std::vector<int> MEDCouplingCartesianAMRPatch::ComputeOffsetFromTwoToOne(const MEDCouplingCartesianAMRMeshGen *comAncestor, int lev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2)
+std::vector<mcIdType> MEDCouplingCartesianAMRPatch::ComputeOffsetFromTwoToOne(const MEDCouplingCartesianAMRMeshGen *comAncestor, mcIdType lev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2)
 {
   if(lev<=0)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::ComputeOffsetFromTwoToOne : this method is useful only for lev > 0 !");
-  int zeLev(lev-1);
-  int dim(p1->getMesh()->getSpaceDimension());
+  mcIdType zeLev(lev-1);
+  mcIdType dim(p1->getMesh()->getSpaceDimension());
   if(p2->getMesh()->getSpaceDimension()!=dim)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::ComputeOffsetFromTwoToOne : dimension must be the same !");
-  std::vector< int > ret(dim,0);
-  for(int i=0;i<zeLev;i++)
+  std::vector< mcIdType > ret(dim,0);
+  for(mcIdType i=0;i<zeLev;i++)
     {
       const MEDCouplingCartesianAMRMeshGen *f1(p1->_mesh),*f2(p2->_mesh);
       const MEDCouplingCartesianAMRPatch *p1h(0),*p2h(0);
-      for(int j=0;j<lev-i;j++)
+      for(mcIdType j=0;j<lev-i;j++)
         {
           const MEDCouplingCartesianAMRMeshGen *f1tmp(f1->getFather()),*f2tmp(f2->getFather());
-          int pid1(f1tmp->getPatchIdFromChildMesh(f1)),pid2(f2tmp->getPatchIdFromChildMesh(f2));
+          mcIdType pid1(f1tmp->getPatchIdFromChildMesh(f1)),pid2(f2tmp->getPatchIdFromChildMesh(f2));
           p1h=f1tmp->getPatch(pid1); p2h=f2tmp->getPatch(pid2);
           f1=f1tmp; f2=f2tmp;
         }
-      std::vector< std::pair<int,int> > p2c(p2h->getBLTRRange());
-      for(int k=0;k<dim;k++)
+      std::vector< std::pair<mcIdType,mcIdType> > p2c(p2h->getBLTRRange());
+      for(mcIdType k=0;k<dim;k++)
         {
           p2c[k].first+=ret[k];
           p2c[k].second+=ret[k];
         }
-      for(int k=0;k<dim;k++)
+      for(mcIdType k=0;k<dim;k++)
         {
           ret[k]=p2c[k].first-p1h->getBLTRRange()[k].first;
           ret[k]*=f1->getFactors()[k];
@@ -504,25 +504,25 @@ std::vector<int> MEDCouplingCartesianAMRPatch::ComputeOffsetFromTwoToOne(const M
   return ret;
 }
 
-void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoInternal(int ghostLev, const std::vector<int>& factors, const std::vector< std::pair<int,int> >&p1 ,const std::vector< std::pair<int,int> >&p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2)
+void MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwoInternal(mcIdType ghostLev, const std::vector<mcIdType>& factors, const std::vector< std::pair<mcIdType,mcIdType> >&p1 ,const std::vector< std::pair<mcIdType,mcIdType> >&p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2)
 {//p1=[(1,4),(2,4)] p2=[(4,5),(3,4)]
-  int dim((int)factors.size());
-  std::vector<int> dimsCoarse(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(p1));//[3,2]
-  std::transform(dimsCoarse.begin(),dimsCoarse.end(),factors.begin(),dimsCoarse.begin(),std::multiplies<int>());//[12,8]
-  std::transform(dimsCoarse.begin(),dimsCoarse.end(),dimsCoarse.begin(),std::bind2nd(std::plus<int>(),2*ghostLev));//[14,10]
-  std::vector< std::pair<int,int> > rangeCoarse(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dimsCoarse));//[(0,14),(0,10)]
-  std::vector<int> fakeFactors(dim,1);
+  mcIdType dim(ToIdType(factors.size()));
+  std::vector<mcIdType> dimsCoarse(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(p1));//[3,2]
+  std::transform(dimsCoarse.begin(),dimsCoarse.end(),factors.begin(),dimsCoarse.begin(),std::multiplies<mcIdType>());//[12,8]
+  std::transform(dimsCoarse.begin(),dimsCoarse.end(),dimsCoarse.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostLev));//[14,10]
+  std::vector< std::pair<mcIdType,mcIdType> > rangeCoarse(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dimsCoarse));//[(0,14),(0,10)]
+  std::vector<mcIdType> fakeFactors(dim,1);
   //
-  std::vector< std::pair<int,int> > tmp0,tmp1,tmp2;
+  std::vector< std::pair<mcIdType,mcIdType> > tmp0,tmp1,tmp2;
   MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(p1,p2,tmp0,false);//tmp0=[(3,4),(1,2)]
   ApplyFactorsOnCompactFrmt(tmp0,factors);//tmp0=[(12,16),(4,8)]
   MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(tmp0,ghostLev);//tmp0=[(13,17),(5,9)]
-  std::vector< std::pair<int,int> > interstRange(MEDCouplingStructuredMesh::IntersectRanges(tmp0,rangeCoarse));//interstRange=[(13,14),(5,9)]
+  std::vector< std::pair<mcIdType,mcIdType> > interstRange(MEDCouplingStructuredMesh::IntersectRanges(tmp0,rangeCoarse));//interstRange=[(13,14),(5,9)]
   MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(p2,p1,tmp1,false);//tmp1=[(-3,0),(-1,1)]
   ApplyFactorsOnCompactFrmt(tmp1,factors);//tmp1=[(-12,-4),(-4,0)]
   MEDCouplingStructuredMesh::ChangeReferenceToGlobalOfCompactFrmt(tmp1,interstRange,tmp2,false);//tmp2=[(1,2),(1,5)]
   //
-  std::vector< std::pair<int,int> > dimsFine(p2);
+  std::vector< std::pair<mcIdType,mcIdType> > dimsFine(p2);
   ApplyFactorsOnCompactFrmt(dimsFine,factors);
   ApplyAllGhostOnCompactFrmt(dimsFine,ghostLev);
   //
@@ -538,7 +538,7 @@ MEDCouplingCartesianAMRPatch::MEDCouplingCartesianAMRPatch(const MEDCouplingCart
  * \param [in,out] partBeforeFact - the part of a image mesh in compact format that will be put in refined reference.
  * \param [in] factors - the factors per axis.
  */
-void MEDCouplingCartesianAMRPatch::ApplyFactorsOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, const std::vector<int>& factors)
+void MEDCouplingCartesianAMRPatch::ApplyFactorsOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, const std::vector<mcIdType>& factors)
 {
   std::size_t sz(factors.size());
   if(sz!=partBeforeFact.size())
@@ -556,7 +556,7 @@ void MEDCouplingCartesianAMRPatch::ApplyFactorsOnCompactFrmt(std::vector< std::p
  * \param [in,out] partBeforeFact - the part of a image mesh in compact format that will be put in ghost reference.
  * \param [in] ghostSize - the ghost size of zone for all axis.
  */
-void MEDCouplingCartesianAMRPatch::ApplyAllGhostOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, int ghostSize)
+void MEDCouplingCartesianAMRPatch::ApplyAllGhostOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, mcIdType ghostSize)
 {
   if(ghostSize<0)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRPatch::ApplyAllGhostOnCompactFrmt : ghost size must be >= 0 !");
@@ -593,9 +593,9 @@ int MEDCouplingCartesianAMRMeshGen::getSpaceDimension() const
   return _mesh->getSpaceDimension();
 }
 
-void MEDCouplingCartesianAMRMeshGen::setFactors(const std::vector<int>& newFactors)
+void MEDCouplingCartesianAMRMeshGen::setFactors(const std::vector<mcIdType>& newFactors)
 {
-  if(getSpaceDimension()!=(int)newFactors.size())
+  if(getSpaceDimension()!=ToIdType(newFactors.size()))
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::setFactors : size of input factors is not equal to the space dimension !");
   if(_factors.empty())
     {
@@ -610,9 +610,9 @@ void MEDCouplingCartesianAMRMeshGen::setFactors(const std::vector<int>& newFacto
   declareAsNew();
 }
 
-int MEDCouplingCartesianAMRMeshGen::getMaxNumberOfLevelsRelativeToThis() const
+mcIdType MEDCouplingCartesianAMRMeshGen::getMaxNumberOfLevelsRelativeToThis() const
 {
-  int ret(1);
+  mcIdType ret(1);
   for(std::vector< MCAuto<MEDCouplingCartesianAMRPatch> >::const_iterator it=_patches.begin();it!=_patches.end();it++)
     ret=std::max(ret,(*it)->getMaxNumberOfLevelsRelativeToThis()+1);
   return ret;
@@ -623,7 +623,7 @@ int MEDCouplingCartesianAMRMeshGen::getMaxNumberOfLevelsRelativeToThis() const
  * The patches in \a this are ignored here.
  * \sa getNumberOfCellsAtCurrentLevelGhost, getNumberOfCellsRecursiveWithOverlap
  */
-int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevel() const
+mcIdType MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevel() const
 {
   return _mesh->getNumberOfCells();
 }
@@ -635,7 +635,7 @@ int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevel() const
  *
  * \sa getNumberOfCellsAtCurrentLevel
  */
-int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevelGhost(int ghostLev) const
+mcIdType MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevelGhost(mcIdType ghostLev) const
 {
   MCAuto<MEDCouplingIMesh> tmp(_mesh->buildWithGhost(ghostLev));
   return tmp->getNumberOfCells();
@@ -645,9 +645,9 @@ int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsAtCurrentLevelGhost(int ghos
  * This method returns the number of cells including the current level but \b also \b including recursively all cells of other levels
  * starting from this. The set of cells which size is returned here are generally overlapping each other.
  */
-int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithOverlap() const
+mcIdType MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithOverlap() const
 {
-  int ret(_mesh->getNumberOfCells());
+  mcIdType ret=_mesh->getNumberOfCells();
   for(std::vector< MCAuto<MEDCouplingCartesianAMRPatch> >::const_iterator it=_patches.begin();it!=_patches.end();it++)
     {
       ret+=(*it)->getNumberOfCellsRecursiveWithOverlap();
@@ -662,9 +662,9 @@ int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithOverlap() const
  *
  * \sa buildUnstructured
  */
-int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithoutOverlap() const
+mcIdType MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithoutOverlap() const
 {
-  int ret(_mesh->getNumberOfCells());
+  mcIdType ret=_mesh->getNumberOfCells();
   for(std::vector< MCAuto<MEDCouplingCartesianAMRPatch> >::const_iterator it=_patches.begin();it!=_patches.end();it++)
     {
       ret-=(*it)->getNumberOfOverlapedCellsForFather();
@@ -679,11 +679,11 @@ int MEDCouplingCartesianAMRMeshGen::getNumberOfCellsRecursiveWithoutOverlap() co
  *
  * \sa getPatchAtPosition
  */
-std::vector<int> MEDCouplingCartesianAMRMeshGen::getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const
+std::vector<mcIdType> MEDCouplingCartesianAMRMeshGen::getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const
 {
   if(!ref)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::getPositionRelativeTo : input pointer is NULL !");
-  std::vector<int> ret;
+  std::vector<mcIdType> ret;
   getPositionRelativeToInternal(ref,ret);
   std::reverse(ret.begin(),ret.end());
   return ret;
@@ -692,27 +692,27 @@ std::vector<int> MEDCouplingCartesianAMRMeshGen::getPositionRelativeTo(const MED
 /*!
  * \sa getPositionRelativeTo, getMeshAtPosition
  */
-const MEDCouplingCartesianAMRPatch *MEDCouplingCartesianAMRMeshGen::getPatchAtPosition(const std::vector<int>& pos) const
+const MEDCouplingCartesianAMRPatch *MEDCouplingCartesianAMRMeshGen::getPatchAtPosition(const std::vector<mcIdType>& pos) const
 {
   std::size_t sz(pos.size());
   if(sz==0)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::getPatchAtPosition : empty input -> no patch by definition !");
-  int patchId(pos[0]);
+  mcIdType patchId(pos[0]);
   const MEDCouplingCartesianAMRPatch *elt(getPatch(patchId));
   if(sz==1)
     return elt;
   if(!elt || !elt->getMesh())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::getPatchAtPosition : NULL element found during walk !");
-  std::vector<int> pos2(pos.begin()+1,pos.end());
+  std::vector<mcIdType> pos2(pos.begin()+1,pos.end());
   return elt->getMesh()->getPatchAtPosition(pos2);
 }
 
-const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRMeshGen::getMeshAtPosition(const std::vector<int>& pos) const
+const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRMeshGen::getMeshAtPosition(const std::vector<mcIdType>& pos) const
 {
   std::size_t sz(pos.size());
   if(sz==0)
     return this;
-  int patchId(pos[0]);
+  mcIdType patchId(pos[0]);
   const MEDCouplingCartesianAMRPatch *elt(getPatch(patchId));
   if(sz==1)
     {
@@ -722,7 +722,7 @@ const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRMeshGen::getMeshAtP
     }
   if(!elt || !elt->getMesh())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::getPatchAtPosition : NULL element found during walk !");
-  std::vector<int> pos2(pos.begin()+1,pos.end());
+  std::vector<mcIdType> pos2(pos.begin()+1,pos.end());
   return elt->getMesh()->getMeshAtPosition(pos2);
 }
 
@@ -731,7 +731,7 @@ const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRMeshGen::getMeshAtP
  *
  * \return std::vector<MEDCouplingCartesianAMRPatchGen *> - objects in vector are to be managed (decrRef) by the caller.
  */
-std::vector<MEDCouplingCartesianAMRPatchGen *> MEDCouplingCartesianAMRMeshGen::retrieveGridsAt(int absoluteLev) const
+std::vector<MEDCouplingCartesianAMRPatchGen *> MEDCouplingCartesianAMRMeshGen::retrieveGridsAt(mcIdType absoluteLev) const
 {
   if(absoluteLev<0)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::retrieveGridsAt : absolute level must be >=0 !");
@@ -743,7 +743,7 @@ std::vector<MEDCouplingCartesianAMRPatchGen *> MEDCouplingCartesianAMRMeshGen::r
  *                                a the end cell (\b excluded) of the range for the second element of the pair.
  * \param [in] factors The factor of refinement per axis (different from 0).
  */
-void MEDCouplingCartesianAMRMeshGen::addPatch(const std::vector< std::pair<int,int> >& bottomLeftTopRight, const std::vector<int>& factors)
+void MEDCouplingCartesianAMRMeshGen::addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors)
 {
   checkFactorsAndIfNotSetAssign(factors);
   MCAuto<MEDCouplingIMesh> mesh(static_cast<MEDCouplingIMesh *>(_mesh->buildStructuredSubPart(bottomLeftTopRight)));
@@ -760,38 +760,38 @@ class InternalPatch : public RefCountObjectOnly
 {
 public:
   InternalPatch():_nb_of_true(0) { }
-  int getDimension() const { return (int)_part.size(); }
+  mcIdType getDimension() const { return ToIdType(_part.size()); }
   double getEfficiency() const { return (double)_nb_of_true/(double)_crit.size(); }
-  int getNumberOfCells() const { return (int)_crit.size(); }
-  void setNumberOfTrue(int nboft) { _nb_of_true=nboft; }
+  mcIdType getNumberOfCells() const { return ToIdType(_crit.size()); }
+  void setNumberOfTrue(mcIdType nboft) { _nb_of_true=nboft; }
   std::vector<bool>& getCriterion() { return _crit; }
   const std::vector<bool>& getConstCriterion() const { return _crit; }
-  void setPart(const std::vector< std::pair<int,int> >& part) { _part=part; }
-  std::vector< std::pair<int,int> >& getPart() { return _part; }
-  const std::vector< std::pair<int,int> >& getConstPart() const { return _part; }
+  void setPart(const std::vector< std::pair<mcIdType,mcIdType> >& part) { _part=part; }
+  std::vector< std::pair<mcIdType,mcIdType> >& getPart() { return _part; }
+  const std::vector< std::pair<mcIdType,mcIdType> >& getConstPart() const { return _part; }
   bool presenceOfTrue() const { return _nb_of_true>0; }
-  std::vector<int> computeCGS() const { return MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(_part); }
-  std::vector< std::vector<int> > computeSignature() const { return MEDCouplingStructuredMesh::ComputeSignaturePerAxisOf(computeCGS(),getConstCriterion()); }
-  double getEfficiencyPerAxis(int axisId) const { return (double)_nb_of_true/((double)(_part[axisId].second-_part[axisId].first)); }
-  void zipToFitOnCriterion(int minPatchLgth);
+  std::vector<mcIdType> computeCGS() const { return MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(_part); }
+  std::vector< std::vector<mcIdType> > computeSignature() const { return MEDCouplingStructuredMesh::ComputeSignaturePerAxisOf(computeCGS(),getConstCriterion()); }
+  double getEfficiencyPerAxis(mcIdType axisId) const { return (double)_nb_of_true/((double)(_part[axisId].second-_part[axisId].first)); }
+  void zipToFitOnCriterion(mcIdType minPatchLgth);
   void updateNumberOfTrue() const;
-  MCAuto<InternalPatch> extractPart(const std::vector< std::pair<int,int> >&partInGlobal) const;
+  MCAuto<InternalPatch> extractPart(const std::vector< std::pair<mcIdType,mcIdType> >&partInGlobal) const;
   MCAuto<InternalPatch> deepCopy() const;
 protected:
   ~InternalPatch() { }
 private:
-  mutable int _nb_of_true;
+  mutable mcIdType _nb_of_true;
   std::vector<bool> _crit;
   //! _part is global
-  std::vector< std::pair<int,int> > _part;
+  std::vector< std::pair<mcIdType,mcIdType> > _part;
 };
 
-void InternalPatch::zipToFitOnCriterion(int minPatchLgth)
+void InternalPatch::zipToFitOnCriterion(mcIdType minPatchLgth)
 {
-  std::vector<int> cgs(computeCGS());
+  std::vector<mcIdType> cgs(computeCGS());
   std::vector<bool> newCrit;
-  std::vector< std::pair<int,int> > newPart,newPart2;
-  int newNbOfTrue(MEDCouplingStructuredMesh::FindMinimalPartOf(minPatchLgth,cgs,_crit,newCrit,newPart));
+  std::vector< std::pair<mcIdType,mcIdType> > newPart,newPart2;
+  mcIdType newNbOfTrue(MEDCouplingStructuredMesh::FindMinimalPartOf(minPatchLgth,cgs,_crit,newCrit,newPart));
   MEDCouplingStructuredMesh::ChangeReferenceToGlobalOfCompactFrmt(_part,newPart,newPart2);
   if(newNbOfTrue!=_nb_of_true)
     throw INTERP_KERNEL::Exception("InternalPatch::zipToFitOnCrit : internal error !");
@@ -800,14 +800,14 @@ void InternalPatch::zipToFitOnCriterion(int minPatchLgth)
 
 void InternalPatch::updateNumberOfTrue() const
 {
-  _nb_of_true=(int)std::count(_crit.begin(),_crit.end(),true);
+  _nb_of_true=ToIdType(std::count(_crit.begin(),_crit.end(),true));
 }
 
-MCAuto<InternalPatch> InternalPatch::extractPart(const std::vector< std::pair<int,int> >&partInGlobal) const
+MCAuto<InternalPatch> InternalPatch::extractPart(const std::vector< std::pair<mcIdType,mcIdType> >&partInGlobal) const
 {
   MCAuto<InternalPatch> ret(new InternalPatch);
-  std::vector<int> cgs(computeCGS());
-  std::vector< std::pair<int,int> > newPart;
+  std::vector<mcIdType> cgs(computeCGS());
+  std::vector< std::pair<mcIdType,mcIdType> > newPart;
   MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(_part,partInGlobal,newPart);
   MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom(cgs,_crit,newPart,ret->getCriterion());
   ret->setPart(partInGlobal);
@@ -822,19 +822,19 @@ MCAuto<InternalPatch> InternalPatch::deepCopy() const
   return ret;
 }
 
-void DissectBigPatch(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, int axisId, int largestLength, int& cutPlace)
+void DissectBigPatch(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, mcIdType axisId, mcIdType largestLength, mcIdType& cutPlace)
 {
-  int minimumPatchLength(bso.getMinimumPatchLength());
+  mcIdType minimumPatchLength(bso.getMinimumPatchLength());
   std::vector<double> ratio(largestLength-minimumPatchLength,std::numeric_limits<double>::max());
-  int index_min = -1;
+  mcIdType index_min = -1;
   double minSemiEfficiencyRatio(std::numeric_limits<double>::max());
   double efficiencyPerAxis[2];
 
-  for(int i=minimumPatchLength-1;i<largestLength-minimumPatchLength;i++)
+  for(mcIdType i=minimumPatchLength-1;i<largestLength-minimumPatchLength;i++)
     {
-      for(int h=0;h<2;h++)
+      for(mcIdType h=0;h<2;h++)
         {
-          std::vector< std::pair<int,int> > rectH(patchToBeSplit->getConstPart());
+          std::vector< std::pair<mcIdType,mcIdType> > rectH(patchToBeSplit->getConstPart());
           if(h==0)
             rectH[axisId].second=patchToBeSplit->getConstPart()[axisId].first+i;
           else
@@ -857,26 +857,26 @@ void DissectBigPatch(const INTERP_KERNEL::BoxSplittingOptions& bso, const Intern
   cutPlace=index_min+patchToBeSplit->getConstPart()[axisId].first;
 }
 
-bool FindHole(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, int axisId, int& cutPlace)
+bool FindHole(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, mcIdType axisId, mcIdType& cutPlace)
 {
   cutPlace=-1;
-  int minimumPatchLength(bso.getMinimumPatchLength());
-  const int dim(patchToBeSplit->getDimension());
-  std::vector< std::vector<int> > signatures(patchToBeSplit->computeSignature());
-  for(int id=0;id<dim;id++)
+  mcIdType minimumPatchLength(bso.getMinimumPatchLength());
+  const mcIdType dim(patchToBeSplit->getDimension());
+  std::vector< std::vector<mcIdType> > signatures(patchToBeSplit->computeSignature());
+  for(mcIdType id=0;id<dim;id++)
     {
-      const std::vector<int>& signature(signatures[id]);
-      std::vector<int> hole;
+      const std::vector<mcIdType>& signature(signatures[id]);
+      std::vector<mcIdType> hole;
       std::vector<double> distance;
-      int len((int)signature.size());
-      for(int i=minimumPatchLength-1;i<len-minimumPatchLength;i++)
+      mcIdType len(ToIdType(signature.size()));
+      for(mcIdType i=minimumPatchLength-1;i<len-minimumPatchLength;i++)
         if(signature[i]==0)
           hole.push_back(i);
       if(!hole.empty())
         {
-          int closestHoleToMiddle(hole[0]);
-          int oldDistanceToMiddle(std::abs(hole[0]-len/2));
-          int newDistanceToMiddle(oldDistanceToMiddle);
+          mcIdType closestHoleToMiddle(hole[0]);
+          mcIdType oldDistanceToMiddle(std::abs(hole[0]-len/2));
+          mcIdType newDistanceToMiddle(oldDistanceToMiddle);
           for(std::size_t i=0;i<hole.size();i++)
             {
               newDistanceToMiddle=std::abs(hole[i]-len/2);
@@ -893,21 +893,21 @@ bool FindHole(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch
   return false;
 }
 
-bool FindInflection(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, int& cutPlace, int& axisId)
+bool FindInflection(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, mcIdType& cutPlace, int& axisId)
 {
   bool cutFound(false); cutPlace=-1;// do not set axisId before to be sure that cutFound was set to true
-  const std::vector< std::pair<int,int> >& part(patchToBeSplit->getConstPart());
-  int sign,minimumPatchLength(bso.getMinimumPatchLength());
-  const int dim(patchToBeSplit->getDimension());
-
-  std::vector<int> zeroCrossDims(dim,-1);
-  std::vector<int> zeroCrossVals(dim,-1);
-  std::vector< std::vector<int> > signatures(patchToBeSplit->computeSignature());
-  for (int id=0;id<dim;id++)
+  const std::vector< std::pair<mcIdType,mcIdType> >& part(patchToBeSplit->getConstPart());
+  mcIdType sign,minimumPatchLength(bso.getMinimumPatchLength());
+  const mcIdType dim(patchToBeSplit->getDimension());
+
+  std::vector<mcIdType> zeroCrossDims(dim,-1);
+  std::vector<mcIdType> zeroCrossVals(dim,-1);
+  std::vector< std::vector<mcIdType> > signatures(patchToBeSplit->computeSignature());
+  for (mcIdType id=0;id<dim;id++)
     {
-      const std::vector<int>& signature(signatures[id]);
+      const std::vector<mcIdType>& signature(signatures[id]);
 
-      std::vector<int> derivate_second_order,gradient_absolute,zero_cross,edge,max_cross_list ;
+      std::vector<mcIdType> derivate_second_order,gradient_absolute,zero_cross,edge,max_cross_list ;
       std::vector<double> distance ;
 
       for(std::size_t i=1;i<signature.size()-1;i++)
@@ -915,7 +915,7 @@ bool FindInflection(const INTERP_KERNEL::BoxSplittingOptions& bso, const Interna
 
       // Gradient absolute value
       for(std::size_t i=1;i<derivate_second_order.size();i++)
-        gradient_absolute.push_back(abs(derivate_second_order[i]-derivate_second_order[i-1])) ;
+        gradient_absolute.push_back(std::abs(derivate_second_order[i]-derivate_second_order[i-1])) ;
       if(derivate_second_order.empty())
         continue;
       for(std::size_t i=1;i<derivate_second_order.size()-1;i++)
@@ -929,24 +929,24 @@ bool FindInflection(const INTERP_KERNEL::BoxSplittingOptions& bso, const Interna
           if ( sign==0 || sign==-1 )
             if ( i >= (std::size_t)minimumPatchLength-2 && i <= signature.size()-minimumPatchLength-2 )
               {
-                zero_cross.push_back(i) ;
+                zero_cross.push_back(ToIdType(i)) ;
                 edge.push_back(gradient_absolute[i]) ;
               }
         }
       if ( zero_cross.size() > 0 )
         {
-          int max_cross=*max_element(edge.begin(),edge.end()) ;
-          for (unsigned int i=0;i<edge.size();i++)
+          mcIdType max_cross=*max_element(edge.begin(),edge.end()) ;
+          for (std::size_t i=0;i<edge.size();i++)
             if (edge[i]==max_cross)
               max_cross_list.push_back(zero_cross[i]+1) ;
 
-          double center((signature.size()/2.0));
-          for (unsigned int i=0;i<max_cross_list.size();i++)
-            distance.push_back(fabs(max_cross_list[i]+1-center));
+          double center(static_cast<double>(signature.size())/2.0);
+          for (std::size_t i=0;i<max_cross_list.size();i++)
+            distance.push_back(fabs(FromIdType<double>(max_cross_list[i])+1-center));
 
           double distance_min=*min_element(distance.begin(),distance.end()) ;
-          int pos_distance_min=find(distance.begin(),distance.end(),distance_min)-distance.begin();
-          int best_place = max_cross_list[pos_distance_min] + part[id].first ;
+          mcIdType pos_distance_min=ToIdType(find(distance.begin(),distance.end(),distance_min)-distance.begin());
+          mcIdType best_place = max_cross_list[pos_distance_min] + part[id].first ;
           if ( max_cross >=0 )
             {
               zeroCrossDims[id] = best_place ;
@@ -963,27 +963,27 @@ bool FindInflection(const INTERP_KERNEL::BoxSplittingOptions& bso, const Interna
 
   if ( zeroCrossDims[0]!=-1 || zeroCrossDims[1]!=-1  )
     {
-      int max_cross_dims = *max_element(zeroCrossVals.begin(),zeroCrossVals.end()) ;
+      mcIdType max_cross_dims = *max_element(zeroCrossVals.begin(),zeroCrossVals.end()) ;
 
       if (zeroCrossVals[0]==max_cross_dims &&  zeroCrossVals[1]==max_cross_dims )
         {
-          int nl_left(part[0].second-part[0].first);
-          int nc_left(part[1].second-part[1].first);
+          mcIdType nl_left(part[0].second-part[0].first);
+          mcIdType nc_left(part[1].second-part[1].first);
           if ( nl_left >=  nc_left )
             max_cross_dims = 0 ;
           else
             max_cross_dims = 1 ;
         }
       else
-        max_cross_dims=std::find(zeroCrossVals.begin(),zeroCrossVals.end(),max_cross_dims)-zeroCrossVals.begin();
+        max_cross_dims=ToIdType(std::find(zeroCrossVals.begin(),zeroCrossVals.end(),max_cross_dims)-zeroCrossVals.begin());
       cutFound=true;
       cutPlace=zeroCrossDims[max_cross_dims];
-      axisId=max_cross_dims ;
+      axisId=FromIdType<int>(max_cross_dims);
     }
   return cutFound;
 }
 
-bool TryAction4(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, int axisId, int rangeOfAxisId, int& cutPlace)
+bool TryAction4(const INTERP_KERNEL::BoxSplittingOptions& bso, const InternalPatch *patchToBeSplit, mcIdType axisId, mcIdType rangeOfAxisId, mcIdType& cutPlace)
 {
   if(patchToBeSplit->getEfficiency()<=bso.getEfficiencyGoal())
     {
@@ -1013,16 +1013,16 @@ MCAuto<InternalPatch> DealWithNoCut(const InternalPatch *patch)
   return ret;
 }
 
-void DealWithCut(double minPatchLgth, const InternalPatch *patchToBeSplit, int axisId, int cutPlace, std::vector<MCAuto<InternalPatch> >& listOfPatches)
+void DealWithCut(double minPatchLgth, const InternalPatch *patchToBeSplit, int axisId, mcIdType cutPlace, std::vector<MCAuto<InternalPatch> >& listOfPatches)
 {
   MCAuto<InternalPatch> leftPart,rightPart;
-  std::vector< std::pair<int,int> > rect(patchToBeSplit->getConstPart());
-  std::vector< std::pair<int,int> > leftRect(rect),rightRect(rect);
+  std::vector< std::pair<mcIdType,mcIdType> > rect(patchToBeSplit->getConstPart());
+  std::vector< std::pair<mcIdType,mcIdType> > leftRect(rect),rightRect(rect);
   leftRect[axisId].second=cutPlace+1;
   rightRect[axisId].first=cutPlace+1;
   leftPart=patchToBeSplit->extractPart(leftRect);
   rightPart=patchToBeSplit->extractPart(rightRect);
-  leftPart->zipToFitOnCriterion(minPatchLgth); rightPart->zipToFitOnCriterion(minPatchLgth);
+  leftPart->zipToFitOnCriterion(ToIdType(minPatchLgth)); rightPart->zipToFitOnCriterion(ToIdType(minPatchLgth));
   listOfPatches.push_back(leftPart);
   listOfPatches.push_back(rightPart);
 }
@@ -1035,12 +1035,12 @@ void MEDCouplingCartesianAMRMeshGen::removeAllPatches()
   declareAsNew();
 }
 
-void MEDCouplingCartesianAMRMeshGen::removePatch(int patchId)
+void MEDCouplingCartesianAMRMeshGen::removePatch(mcIdType patchId)
 {
   checkPatchId(patchId);
-  int sz((int)_patches.size()),j(0);
+  mcIdType sz(ToIdType(_patches.size())),j(0);
   std::vector< MCAuto<MEDCouplingCartesianAMRPatch> > patches(sz-1);
-  for(int i=0;i<sz;i++)
+  for(mcIdType i=0;i<sz;i++)
     if(i!=patchId)
       patches[j++]=_patches[i];
   (const_cast<MEDCouplingCartesianAMRMeshGen *>(_patches[patchId]->getMesh()))->detachFromFather();
@@ -1048,9 +1048,9 @@ void MEDCouplingCartesianAMRMeshGen::removePatch(int patchId)
   declareAsNew();
 }
 
-int MEDCouplingCartesianAMRMeshGen::getNumberOfPatches() const
+mcIdType MEDCouplingCartesianAMRMeshGen::getNumberOfPatches() const
 {
-  return (int)_patches.size();
+  return ToIdType(_patches.size());
 }
 
 /*!
@@ -1070,13 +1070,13 @@ int MEDCouplingCartesianAMRMeshGen::getNumberOfPatches() const
  * for more information.
  *
  */
-void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const std::vector<bool>& criterion, const std::vector<int>& factors)
+void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const std::vector<bool>& criterion, const std::vector<mcIdType>& factors)
 {
-  int nbCells(getNumberOfCellsAtCurrentLevel());
-  if(nbCells!=(int)criterion.size())
+  mcIdType nbCells(getNumberOfCellsAtCurrentLevel());
+  if(nbCells!=ToIdType(criterion.size()))
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion : the number of tuples of criterion array must be equal to the number of cells at the current level !");
   _patches.clear();
-  std::vector<int> cgs(_mesh->getCellGridStructure());
+  std::vector<mcIdType> cgs(_mesh->getCellGridStructure());
   std::vector< MCAuto<InternalPatch> > listOfPatches,listOfPatchesOK;
   //
   MCAuto<InternalPatch> p(new InternalPatch);
@@ -1089,7 +1089,8 @@ void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KER
       for(std::vector< MCAuto<InternalPatch> >::iterator it=listOfPatches.begin();it!=listOfPatches.end();it++)
         {
           //
-          int axisId,largestLength,cutPlace;
+          int axisId;
+          mcIdType largestLength,cutPlace;
           MEDCouplingStructuredMesh::FindTheWidestAxisOfGivenRangeInCompactFrmt((*it)->getConstPart(),axisId,largestLength);
           if((*it)->getEfficiency()>=bso.getEfficiencyThreshold() && ((*it)->getNumberOfCells()>bso.getMaximumNbOfCellsInPatch() || largestLength>bso.getMaximumPatchLength()))
             {
@@ -1117,7 +1118,7 @@ void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KER
  * This method creates patches in \a this (by destroying the patches if any). This method uses \a criterion array as a field on cells on this level.
  * This method only create patches at level 0 relative to \a this.
  */
-void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<int>& factors)
+void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<mcIdType>& factors)
 {
   if(!criterion || !criterion->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion : the criterion DataArrayByte instance must be allocated and not NULL !");
@@ -1126,7 +1127,7 @@ void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KER
   declareAsNew();
 }
 
-void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<int>& factors, double eps)
+void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<mcIdType>& factors, double eps)
 {
   if(!criterion)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion : null criterion pointer !");
@@ -1134,9 +1135,9 @@ void MEDCouplingCartesianAMRMeshGen::createPatchesFromCriterion(const INTERP_KER
   createPatchesFromCriterion(bso,inp,factors);
 }
 
-int MEDCouplingCartesianAMRMeshGen::getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const
+mcIdType MEDCouplingCartesianAMRMeshGen::getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const
 {
-  int ret(0);
+  mcIdType ret(0);
   for(std::vector< MCAuto<MEDCouplingCartesianAMRPatch> >::const_iterator it=_patches.begin();it!=_patches.end();it++,ret++)
     {
       if((*it)->getMesh()==mesh)
@@ -1154,7 +1155,7 @@ std::vector< const MEDCouplingCartesianAMRPatch *> MEDCouplingCartesianAMRMeshGe
   return ret;
 }
 
-const MEDCouplingCartesianAMRPatch *MEDCouplingCartesianAMRMeshGen::getPatch(int patchId) const
+const MEDCouplingCartesianAMRPatch *MEDCouplingCartesianAMRMeshGen::getPatch(mcIdType patchId) const
 {
   checkPatchId(patchId);
   return _patches[patchId];
@@ -1164,7 +1165,7 @@ const MEDCouplingCartesianAMRPatch *MEDCouplingCartesianAMRMeshGen::getPatch(int
  * This method states if patch2 (with id \a patchId2) is in the neighborhood of patch1 (with id \a patchId1).
  * The neighborhood size is defined by \a ghostLev in the reference of \a this ( \b not in the reference of patches !).
  */
-bool MEDCouplingCartesianAMRMeshGen::isPatchInNeighborhoodOf(int patchId1, int patchId2, int ghostLev) const
+bool MEDCouplingCartesianAMRMeshGen::isPatchInNeighborhoodOf(mcIdType patchId1, mcIdType patchId2, mcIdType ghostLev) const
 {
   const MEDCouplingCartesianAMRPatch *p1(getPatch(patchId1)),*p2(getPatch(patchId2));
   return p1->isInMyNeighborhood(p2,ghostLev);
@@ -1183,7 +1184,7 @@ bool MEDCouplingCartesianAMRMeshGen::isPatchInNeighborhoodOf(int patchId1, int p
  * \throw if \a cellFieldOnThis is NULL or not allocated
  * \sa fillCellFieldOnPatch, MEDCouplingIMesh::SpreadCoarseToFine
  */
-DataArrayDouble *MEDCouplingCartesianAMRMeshGen::createCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis) const
+DataArrayDouble *MEDCouplingCartesianAMRMeshGen::createCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis) const
 {
   if(!cellFieldOnThis || !cellFieldOnThis->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::createCellFieldOnPatch : the input cell field array is NULL or not allocated !");
@@ -1205,7 +1206,7 @@ DataArrayDouble *MEDCouplingCartesianAMRMeshGen::createCellFieldOnPatch(int patc
  *
  * \sa createCellFieldOnPatch, fillCellFieldComingFromPatch
  */
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative) const
 {
   if(!cellFieldOnThis || !cellFieldOnThis->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::createCellFieldOnPatch : the input cell field array is NULL or not allocated !");
@@ -1213,7 +1214,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatch(int patchId, const Dat
   MEDCouplingIMesh::SpreadCoarseToFine(cellFieldOnThis,_mesh->getCellGridStructure(),cellFieldOnPatch,patch->getBLTRRange(),getFactors());
   if(isConservative)
     {
-      int fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
+      mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
       std::transform(cellFieldOnPatch->begin(),cellFieldOnPatch->end(),cellFieldOnPatch->getPointer(),std::bind2nd(std::multiplies<double>(),1./((double)fact)));
     }
 }
@@ -1229,7 +1230,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatch(int patchId, const Dat
  *
  * \sa fillCellFieldOnPatch, fillCellFieldOnPatchGhostAdv
  */
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhost(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev, bool isConservative) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev, bool isConservative) const
 {
   if(!cellFieldOnThis || !cellFieldOnThis->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::createCellFieldOnPatchGhost : the input cell field array is NULL or not allocated !");
@@ -1237,7 +1238,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhost(int patchId, cons
   MEDCouplingIMesh::SpreadCoarseToFineGhost(cellFieldOnThis,_mesh->getCellGridStructure(),cellFieldOnPatch,patch->getBLTRRange(),getFactors(),ghostLev);
   if(isConservative)
     {
-      int fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
+      mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
       std::transform(cellFieldOnPatch->begin(),cellFieldOnPatch->end(),cellFieldOnPatch->getPointer(),std::bind2nd(std::multiplies<double>(),1./((double)fact)));
     }
 }
@@ -1251,7 +1252,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhost(int patchId, cons
  * \param [in,out] cellFieldOnPatch - The array of the cell field on the requested patch to be filled \b only \b in \b the \b ghost \b zone.
  * \param [in] ghostLev - The size of the ghost zone (must be >=0 !)
  */
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZone(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZone(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev) const
 {
   if(!cellFieldOnThis || !cellFieldOnThis->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::fillCellFieldOnPatchOnlyOnGhostZone : the input cell field array is NULL or not allocated !");
@@ -1271,10 +1272,10 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZone(int pat
  *
  * \sa fillCellFieldOnPatchOnlyGhostAdv
  */
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhostAdv(int patchId, const DataArrayDouble *cellFieldOnThis, int ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches, bool isConservative) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhostAdv(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches, bool isConservative) const
 {
-  int nbp(getNumberOfPatches());
-  if(nbp!=(int)arrsOnPatches.size())
+  mcIdType nbp(getNumberOfPatches());
+  if(nbp!=ToIdType(arrsOnPatches.size()))
     {
       std::ostringstream oss; oss << "MEDCouplingCartesianAMRMesh::fillCellFieldOnPatchGhostAdv : there are " << nbp << " patches in this and " << arrsOnPatches.size() << " arrays in the last parameter !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -1291,25 +1292,25 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchGhostAdv(int patchId, c
  *
  * \sa getPatchIdsInTheNeighborhoodOf
  */
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyGhostAdv(int patchId, int ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyGhostAdv(mcIdType patchId, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches) const
 {
-  int nbp(getNumberOfPatches());
-  if(nbp!=(int)arrsOnPatches.size())
+  mcIdType nbp(getNumberOfPatches());
+  if(nbp!=ToIdType(arrsOnPatches.size()))
     {
       std::ostringstream oss; oss << "MEDCouplingCartesianAMRMesh::fillCellFieldOnPatchOnlyGhostAdv : there are " << nbp << " patches in this and " << arrsOnPatches.size() << " arrays in the last parameter !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   const MEDCouplingCartesianAMRPatch *refP(getPatch(patchId));
   DataArrayDouble *theFieldToFill(const_cast<DataArrayDouble *>(arrsOnPatches[patchId]));
-  std::vector<int> ids(getPatchIdsInTheNeighborhoodOf(patchId,ghostLev));
-  for(std::vector<int>::const_iterator it=ids.begin();it!=ids.end();it++)
+  std::vector<mcIdType> ids(getPatchIdsInTheNeighborhoodOf(patchId,ghostLev));
+  for(std::vector<mcIdType>::const_iterator it=ids.begin();it!=ids.end();it++)
     {
       const MEDCouplingCartesianAMRPatch *otherP(getPatch(*it));
       MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwo(ghostLev,_factors,refP,otherP,theFieldToFill,arrsOnPatches[*it]);
     }
 }
 
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZoneWith(int ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZoneWith(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const
 {
   MEDCouplingCartesianAMRPatch::UpdateNeighborsOfOneWithTwo(ghostLev,_factors,patchToBeModified,neighborPatch,cellFieldOnPatch,cellFieldNeighbor);
 }
@@ -1326,7 +1327,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZoneWith(int
  * \throw if \a cellFieldOnPatch is NULL or not allocated
  * \sa createCellFieldOnPatch, MEDCouplingIMesh::CondenseFineToCoarse,fillCellFieldComingFromPatchGhost
  */
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatch(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative) const
 {
   if(!cellFieldOnPatch || !cellFieldOnPatch->isAllocated())
       throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::fillCellFieldComingFromPatch : the input cell field array is NULL or not allocated !");
@@ -1334,7 +1335,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatch(int patchId, c
   MEDCouplingIMesh::CondenseFineToCoarse(_mesh->getCellGridStructure(),cellFieldOnPatch,patch->getBLTRRange(),getFactors(),cellFieldOnThis);
   if(!isConservative)
     {
-      int fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
+      mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
       MEDCouplingStructuredMesh::MultiplyPartOf(_mesh->getCellGridStructure(),patch->getBLTRRange(),1./((double)fact),cellFieldOnThis);
     }
 }
@@ -1353,7 +1354,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatch(int patchId, c
  * \throw if \a cellFieldOnPatch is NULL or not allocated
  * \sa fillCellFieldComingFromPatch
  */
-void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatchGhost(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, int ghostLev, bool isConservative) const
+void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, bool isConservative) const
 {
   if(!cellFieldOnPatch || !cellFieldOnPatch->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::fillCellFieldComingFromPatchGhost : the input cell field array is NULL or not allocated !");
@@ -1361,7 +1362,7 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatchGhost(int patch
   MEDCouplingIMesh::CondenseFineToCoarseGhost(_mesh->getCellGridStructure(),cellFieldOnPatch,patch->getBLTRRange(),getFactors(),cellFieldOnThis,ghostLev);
   if(!isConservative)
     {
-      int fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
+      mcIdType fact(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(getFactors()));
       MEDCouplingStructuredMesh::MultiplyPartOfByGhost(_mesh->getCellGridStructure(),patch->getBLTRRange(),ghostLev,1./((double)fact),cellFieldOnThis);
     }
 }
@@ -1372,13 +1373,13 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldComingFromPatchGhost(int patch
  *
  * \param [in] patchId - the id of the considered patch.
  * \param [in] ghostLev - the size of the neighborhood.
- * \return DataArrayInt * - the newly allocated array containing the list of patches in the neighborhood of the considered patch. This array is to be deallocated by the caller.
+ * \return DataArrayIdType * - the newly allocated array containing the list of patches in the neighborhood of the considered patch. This array is to be deallocated by the caller.
  */
-DataArrayInt *MEDCouplingCartesianAMRMeshGen::findPatchesInTheNeighborhoodOf(int patchId, int ghostLev) const
+DataArrayIdType *MEDCouplingCartesianAMRMeshGen::findPatchesInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const
 {
-  int nbp(getNumberOfPatches());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  for(int i=0;i<nbp;i++)
+  mcIdType nbp(getNumberOfPatches());
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+  for(mcIdType i=0;i<nbp;i++)
     {
       if(i!=patchId)
         if(isPatchInNeighborhoodOf(i,patchId,ghostLev))
@@ -1391,7 +1392,7 @@ MEDCouplingUMesh *MEDCouplingCartesianAMRMeshGen::buildUnstructured() const
 {
   MCAuto<MEDCouplingUMesh> part(_mesh->buildUnstructured());
   std::vector<bool> bs(_mesh->getNumberOfCells(),false);
-  std::vector<int> cgs(_mesh->getCellGridStructure());
+  std::vector<mcIdType> cgs(_mesh->getCellGridStructure());
   std::vector< MCAuto<MEDCouplingUMesh> > msSafe(_patches.size()+1);
   std::size_t ii(0);
   for(std::vector< MCAuto<MEDCouplingCartesianAMRPatch> >::const_iterator it=_patches.begin();it!=_patches.end();it++,ii++)
@@ -1399,7 +1400,7 @@ MEDCouplingUMesh *MEDCouplingCartesianAMRMeshGen::buildUnstructured() const
       MEDCouplingStructuredMesh::SwitchOnIdsFrom(cgs,(*it)->getBLTRRange(),bs);
       msSafe[ii+1]=(*it)->getMesh()->buildUnstructured();
     }
-  MCAuto<DataArrayInt> eltsOff(DataArrayInt::BuildListOfSwitchedOff(bs));
+  MCAuto<DataArrayIdType> eltsOff(DataArrayIdType::BuildListOfSwitchedOff(bs));
   msSafe[0]=static_cast<MEDCouplingUMesh *>(part->buildPartOfMySelf(eltsOff->begin(),eltsOff->end(),false));
   std::vector< const MEDCouplingUMesh * > ms(msSafe.size());
   for(std::size_t i=0;i<msSafe.size();i++)
@@ -1451,13 +1452,13 @@ MEDCoupling1SGTUMesh *MEDCouplingCartesianAMRMeshGen::buildMeshOfDirectChildrenO
  * \return MEDCouplingFieldDouble * - a newly created instance the caller has reponsability to deal with.
  * \sa buildUnstructured
  */
-MEDCouplingFieldDouble *MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const
+MEDCouplingFieldDouble *MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost(mcIdType ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const
 {
   if(recurseArrs.empty())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost : array is empty ! Should never happen !");
   //
   std::vector<bool> bs(_mesh->getNumberOfCells(),false);
-  std::vector<int> cgs(_mesh->getCellGridStructure());
+  std::vector<mcIdType> cgs(_mesh->getCellGridStructure());
   std::vector< MCAuto<MEDCouplingFieldDouble> > msSafe(_patches.size()+1);
   std::size_t ii(0);
   for(std::vector< MCAuto<MEDCouplingCartesianAMRPatch> >::const_iterator it=_patches.begin();it!=_patches.end();it++,ii++)
@@ -1466,7 +1467,7 @@ MEDCouplingFieldDouble *MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseW
       std::vector<const DataArrayDouble *> tmpArrs(extractSubTreeFromGlobalFlatten((*it)->getMesh(),recurseArrs));
       msSafe[ii+1]=(*it)->getMesh()->buildCellFieldOnRecurseWithoutOverlapWithoutGhost(ghostSz,tmpArrs);
     }
-  MCAuto<DataArrayInt> eltsOff(DataArrayInt::BuildListOfSwitchedOff(bs));
+  MCAuto<DataArrayIdType> eltsOff(DataArrayIdType::BuildListOfSwitchedOff(bs));
   //
   MCAuto<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(ON_CELLS));
   MCAuto<DataArrayDouble> arr2(extractGhostFrom(ghostSz,recurseArrs[0]));
@@ -1489,11 +1490,11 @@ MEDCouplingFieldDouble *MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseW
  * This method extracts from \arr arr the part inside \a arr by cutting the \a ghostSz external part.
  * \arr is expected to be an array having a number of tuples equal to \c getImageMesh()->buildWithGhost(ghostSz).
  */
-DataArrayDouble *MEDCouplingCartesianAMRMeshGen::extractGhostFrom(int ghostSz, const DataArrayDouble *arr) const
+DataArrayDouble *MEDCouplingCartesianAMRMeshGen::extractGhostFrom(mcIdType ghostSz, const DataArrayDouble *arr) const
 {
-  std::vector<int> st(_mesh->getCellGridStructure());
-  std::vector< std::pair<int,int> > p(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(st));
-  std::transform(st.begin(),st.end(),st.begin(),std::bind2nd(std::plus<int>(),2*ghostSz));
+  std::vector<mcIdType> st(_mesh->getCellGridStructure());
+  std::vector< std::pair<mcIdType,mcIdType> > p(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(st));
+  std::transform(st.begin(),st.end(),st.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSz));
   MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(p,ghostSz);
   MCAuto<DataArrayDouble> ret(MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(st,arr,p));
   return ret.retn();
@@ -1504,12 +1505,12 @@ DataArrayDouble *MEDCouplingCartesianAMRMeshGen::extractGhostFrom(int ghostSz, c
  *
  * \sa fillCellFieldOnPatchOnlyGhostAdv
  */
-std::vector<int> MEDCouplingCartesianAMRMeshGen::getPatchIdsInTheNeighborhoodOf(int patchId, int ghostLev) const
+std::vector<mcIdType> MEDCouplingCartesianAMRMeshGen::getPatchIdsInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const
 {
-  std::vector<int> ret;
-  int nbp(getNumberOfPatches());
+  std::vector<mcIdType> ret;
+  mcIdType nbp(getNumberOfPatches());
   //
-  for(int i=0;i<nbp;i++)
+  for(mcIdType i=0;i<nbp;i++)
     {
       if(i!=patchId)
         if(isPatchInNeighborhoodOf(i,patchId,ghostLev))
@@ -1527,9 +1528,9 @@ std::string MEDCouplingCartesianAMRMeshGen::buildPythonDumpOfThis() const
 {
   std::ostringstream oss;
   oss << "amr=MEDCouplingCartesianAMRMesh(\""<< getImageMesh()->getName() << "\"," << getSpaceDimension() << ",[";
-  std::vector<int> ngs(getImageMesh()->getNodeGridStructure());
+  std::vector<mcIdType> ngs(getImageMesh()->getNodeGridStructure());
   std::vector<double> orig(getImageMesh()->getOrigin()),dxyz(getImageMesh()->getDXYZ());
-  std::copy(ngs.begin(),ngs.end(),std::ostream_iterator<int>(oss,","));
+  std::copy(ngs.begin(),ngs.end(),std::ostream_iterator<mcIdType>(oss,","));
   oss <<  "],[";
   std::copy(orig.begin(),orig.end(),std::ostream_iterator<double>(oss,","));
   oss << "],[";
@@ -1553,7 +1554,7 @@ MEDCouplingCartesianAMRMeshGen::MEDCouplingCartesianAMRMeshGen(const MEDCoupling
     }
 }
 
-MEDCouplingCartesianAMRMeshGen::MEDCouplingCartesianAMRMeshGen(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+MEDCouplingCartesianAMRMeshGen::MEDCouplingCartesianAMRMeshGen(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                                                const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop)
 {
   _mesh=MEDCouplingIMesh::New(meshName,spaceDim,nodeStrctStart,nodeStrctStop,originStart,originStop,dxyzStart,dxyzStop);
@@ -1567,9 +1568,9 @@ MEDCouplingCartesianAMRMeshGen::MEDCouplingCartesianAMRMeshGen(MEDCouplingIMesh
   _mesh=mesh; _mesh->incrRef();
 }
 
-void MEDCouplingCartesianAMRMeshGen::checkPatchId(int patchId) const
+void MEDCouplingCartesianAMRMeshGen::checkPatchId(mcIdType patchId) const
 {
-  int sz(getNumberOfPatches());
+  mcIdType sz(getNumberOfPatches());
   if(patchId<0 || patchId>=sz)
     {
       std::ostringstream oss; oss << "MEDCouplingCartesianAMRMeshGen::checkPatchId : invalid patchId (" << patchId << ") ! Must be in [0," << sz << ") !";
@@ -1577,9 +1578,9 @@ void MEDCouplingCartesianAMRMeshGen::checkPatchId(int patchId) const
     }
 }
 
-void MEDCouplingCartesianAMRMeshGen::checkFactorsAndIfNotSetAssign(const std::vector<int>& factors)
+void MEDCouplingCartesianAMRMeshGen::checkFactorsAndIfNotSetAssign(const std::vector<mcIdType>& factors)
 {
-  if(getSpaceDimension()!=(int)factors.size())
+  if(getSpaceDimension()!=ToIdType(factors.size()))
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::checkFactorsAndIfNotSetAssign : invalid size of factors ! size must be equal to the spaceDimension !");
   if(_factors.empty())
     {
@@ -1592,7 +1593,7 @@ void MEDCouplingCartesianAMRMeshGen::checkFactorsAndIfNotSetAssign(const std::ve
     }
 }
 
-void MEDCouplingCartesianAMRMeshGen::retrieveGridsAtInternal(int lev, std::vector< MCAuto<MEDCouplingCartesianAMRPatchGen> >& grids) const
+void MEDCouplingCartesianAMRMeshGen::retrieveGridsAtInternal(mcIdType lev, std::vector< MCAuto<MEDCouplingCartesianAMRPatchGen> >& grids) const
 {
   if(lev==0)
     {
@@ -1623,13 +1624,13 @@ void MEDCouplingCartesianAMRMeshGen::retrieveGridsAtInternal(int lev, std::vecto
     }
 }
 
-int MEDCouplingCartesianAMRMeshGen::GetGhostLevelInFineRef(int ghostLev, const std::vector<int>& factors)
+mcIdType MEDCouplingCartesianAMRMeshGen::GetGhostLevelInFineRef(mcIdType ghostLev, const std::vector<mcIdType>& factors)
 {
   if(ghostLev<0)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::GetGhostLevelInFineRef : the ghost size must be >=0 !");
   if(factors.empty())
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::GetGhostLevelInFineRef : no factors defined !");
-  int ghostLevInPatchRef;
+  mcIdType ghostLevInPatchRef;
   if(ghostLev==0)
     ghostLevInPatchRef=0;
   else
@@ -1647,11 +1648,11 @@ int MEDCouplingCartesianAMRMeshGen::GetGhostLevelInFineRef(int ghostLev, const s
  */
 std::vector<const DataArrayDouble *> MEDCouplingCartesianAMRMeshGen::extractSubTreeFromGlobalFlatten(const MEDCouplingCartesianAMRMeshGen *head, const std::vector<const DataArrayDouble *>& all) const
 {
-  int maxLev(getMaxNumberOfLevelsRelativeToThis());
+  mcIdType maxLev(getMaxNumberOfLevelsRelativeToThis());
   std::vector<const DataArrayDouble *> ret;
   std::vector<const MEDCouplingCartesianAMRMeshGen *> meshes(1,this);
   std::size_t kk(0);
-  for(int i=0;i<maxLev;i++)
+  for(mcIdType i=0;i<maxLev;i++)
     {
       std::vector<const MEDCouplingCartesianAMRMeshGen *> meshesTmp;
       for(std::vector<const MEDCouplingCartesianAMRMeshGen *>::const_iterator it=meshes.begin();it!=meshes.end();it++)
@@ -1682,7 +1683,7 @@ void MEDCouplingCartesianAMRMeshGen::dumpPatchesOf(const std::string& varName, s
       if(patch)
         {
           std::ostringstream oss2; oss2 << varName << ".addPatch([";
-          const std::vector< std::pair<int,int> >& bltr(patch->getBLTRRange());
+          const std::vector< std::pair<mcIdType,mcIdType> >& bltr(patch->getBLTRRange());
           std::size_t sz(bltr.size());
           for(std::size_t i=0;i<sz;i++)
             {
@@ -1691,7 +1692,7 @@ void MEDCouplingCartesianAMRMeshGen::dumpPatchesOf(const std::string& varName, s
                 oss2 << ",";
             }
           oss2 << "],[";
-          std::copy(_factors.begin(),_factors.end(),std::ostream_iterator<int>(oss2,","));
+          std::copy(_factors.begin(),_factors.end(),std::ostream_iterator<mcIdType>(oss2,","));
           oss2 << "])\n";
           oss << oss2.str();
           std::ostringstream oss3; oss3 << varName << "[" << j++ << "]";
@@ -1750,7 +1751,7 @@ const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRMeshSub::getGodFath
 /*!
  * This method returns the level of \a this. 0 for god father. 1 for children of god father ...
  */
-int MEDCouplingCartesianAMRMeshSub::getAbsoluteLevel() const
+mcIdType MEDCouplingCartesianAMRMeshSub::getAbsoluteLevel() const
 {
   if(!_father)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshSub::getAbsoluteLevel : Impossible to find a god father because there is a hole in chain !");
@@ -1763,34 +1764,34 @@ void MEDCouplingCartesianAMRMeshSub::detachFromFather()
   declareAsNew();
 }
 
-std::vector< std::pair<int,int> > MEDCouplingCartesianAMRMeshSub::positionRelativeToGodFather(std::vector<int>& st) const
+std::vector< std::pair<mcIdType,mcIdType> > MEDCouplingCartesianAMRMeshSub::positionRelativeToGodFather(std::vector<mcIdType>& st) const
 {
   st=_father->getFactors();
   std::size_t dim(st.size());
-  std::vector<int> prev(st);
-  int id(_father->getPatchIdFromChildMesh(this));
+  std::vector<mcIdType> prev(st);
+  mcIdType id(_father->getPatchIdFromChildMesh(this));
   const MEDCouplingCartesianAMRPatch *p(_father->getPatch(id));
-  std::vector< std::pair<int,int> > ret(p->getBLTRRange());
-  std::vector<int> delta(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(ret)),start(dim);
-  std::transform(delta.begin(),delta.end(),prev.begin(),delta.begin(),std::multiplies<int>());
+  std::vector< std::pair<mcIdType,mcIdType> > ret(p->getBLTRRange());
+  std::vector<mcIdType> delta(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(ret)),start(dim);
+  std::transform(delta.begin(),delta.end(),prev.begin(),delta.begin(),std::multiplies<mcIdType>());
   for(std::size_t i=0;i<dim;i++)
     start[i]=ret[i].first;
-  std::transform(start.begin(),start.end(),prev.begin(),start.begin(),std::multiplies<int>());
+  std::transform(start.begin(),start.end(),prev.begin(),start.begin(),std::multiplies<mcIdType>());
   const MEDCouplingCartesianAMRMeshGen *it(_father);
   while(!dynamic_cast<const MEDCouplingCartesianAMRMesh *>(it))
     {
       const MEDCouplingCartesianAMRMeshSub *itc(static_cast<const MEDCouplingCartesianAMRMeshSub *>(it));
-      int id2(itc->_father->getPatchIdFromChildMesh(itc));
+      mcIdType id2(itc->_father->getPatchIdFromChildMesh(itc));
       const MEDCouplingCartesianAMRPatch *p2(itc->_father->getPatch(id2));
-      const std::vector< std::pair<int,int> >& start2(p2->getBLTRRange());
-      std::vector<int> tmp(dim);
+      const std::vector< std::pair<mcIdType,mcIdType> >& start2(p2->getBLTRRange());
+      std::vector<mcIdType> tmp(dim);
       for(std::size_t i=0;i<dim;i++)
         tmp[i]=start2[i].first;
       //
       prev=itc->_father->getFactors();
-      std::transform(st.begin(),st.end(),prev.begin(),st.begin(),std::multiplies<int>());
-      std::transform(st.begin(),st.end(),tmp.begin(),tmp.begin(),std::multiplies<int>());
-      std::transform(start.begin(),start.end(),tmp.begin(),start.begin(),std::plus<int>());
+      std::transform(st.begin(),st.end(),prev.begin(),st.begin(),std::multiplies<mcIdType>());
+      std::transform(st.begin(),st.end(),tmp.begin(),tmp.begin(),std::multiplies<mcIdType>());
+      std::transform(start.begin(),start.end(),tmp.begin(),start.begin(),std::plus<mcIdType>());
       it=itc->_father;
     }
   for(std::size_t i=0;i<dim;i++)
@@ -1801,7 +1802,7 @@ std::vector< std::pair<int,int> > MEDCouplingCartesianAMRMeshSub::positionRelati
   return ret;
 }
 
-int MEDCouplingCartesianAMRMeshSub::getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const
+mcIdType MEDCouplingCartesianAMRMeshSub::getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const
 {
   if(this==ref)
     return 0;
@@ -1823,18 +1824,18 @@ MEDCouplingCartesianAMRMeshSub *MEDCouplingCartesianAMRMeshSub::deepCopy(MEDCoup
 /*!
  * \sa getPositionRelativeTo
  */
-void MEDCouplingCartesianAMRMeshSub::getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<int>& ret) const
+void MEDCouplingCartesianAMRMeshSub::getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<mcIdType>& ret) const
 {
   if(this==ref)
     return ;
   if(!_father)
     throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshSub::getPositionRelativeToInternal : ref is not in the progeny of this !");
-  int myId(_father->getPatchIdFromChildMesh(this));
+  mcIdType myId(_father->getPatchIdFromChildMesh(this));
   ret.push_back(myId);
   _father->getPositionRelativeToInternal(ref,ret);
 }
 
-MEDCouplingCartesianAMRMesh *MEDCouplingCartesianAMRMesh::New(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+MEDCouplingCartesianAMRMesh *MEDCouplingCartesianAMRMesh::New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                                               const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop)
 {
   return new MEDCouplingCartesianAMRMesh(meshName,spaceDim,nodeStrctStart,nodeStrctStop,originStart,originStop,dxyzStart,dxyzStop);
@@ -1856,7 +1857,7 @@ const MEDCouplingCartesianAMRMeshGen *MEDCouplingCartesianAMRMesh::getGodFather(
   return this;
 }
 
-int MEDCouplingCartesianAMRMesh::getAbsoluteLevel() const
+mcIdType MEDCouplingCartesianAMRMesh::getAbsoluteLevel() const
 {
   return 0;
 }
@@ -1865,20 +1866,20 @@ void MEDCouplingCartesianAMRMesh::detachFromFather()
 {//not a bug - do nothing
 }
 
-std::vector< std::pair<int,int> > MEDCouplingCartesianAMRMesh::positionRelativeToGodFather(std::vector<int>& st) const
+std::vector< std::pair<mcIdType,mcIdType> > MEDCouplingCartesianAMRMesh::positionRelativeToGodFather(std::vector<mcIdType>& st) const
 {
   st=_mesh->getCellGridStructure();
   return MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(st);
 }
 
-int MEDCouplingCartesianAMRMesh::getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const
+mcIdType MEDCouplingCartesianAMRMesh::getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const
 {
   if(this==ref)
     return 0;
   throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::getAbsoluteLevelRelativeTo : ref is not in the progeny of this !");
 }
 
-std::vector<MEDCouplingCartesianAMRPatchGen *> MEDCouplingCartesianAMRMesh::retrieveGridsAt(int absoluteLev) const
+std::vector<MEDCouplingCartesianAMRPatchGen *> MEDCouplingCartesianAMRMesh::retrieveGridsAt(mcIdType absoluteLev) const
 {
   std::vector< MCAuto<MEDCouplingCartesianAMRPatchGen> > rets;
   retrieveGridsAtInternal(absoluteLev,rets);
@@ -1909,7 +1910,7 @@ MEDCouplingCartesianAMRMesh *MEDCouplingCartesianAMRMesh::deepCopy(MEDCouplingCa
  *
  * \sa createPatchesFromCriterion
  */
-void MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML(const std::vector<const INTERP_KERNEL::BoxSplittingOptions *>& bso, const DataArrayDouble *criterion, const std::vector< std::vector<int> >& factors, double eps)
+void MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML(const std::vector<const INTERP_KERNEL::BoxSplittingOptions *>& bso, const DataArrayDouble *criterion, const std::vector< std::vector<mcIdType> >& factors, double eps)
 {
   std::size_t nbOfLevs(bso.size());
   if(nbOfLevs!=factors.size())
@@ -1924,7 +1925,7 @@ void MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML(const std::vector
       if(!bso[i])
         throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML : presence of a NULL BoxSplittingOptions in input vector !");
       //
-      std::vector<MEDCouplingCartesianAMRPatchGen *> elts(retrieveGridsAt((int)(i)));
+      std::vector<MEDCouplingCartesianAMRPatchGen *> elts(retrieveGridsAt(ToIdType((i))));
       std::size_t sz(elts.size());
       std::vector< MCAuto<MEDCouplingCartesianAMRPatchGen> > elts2(sz);
       std::vector< MCAuto<DataArrayDouble> > elts3(sz);
@@ -1949,7 +1950,7 @@ void MEDCouplingCartesianAMRMesh::createPatchesFromCriterionML(const std::vector
     }
 }
 
-void MEDCouplingCartesianAMRMesh::getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<int>& ret) const
+void MEDCouplingCartesianAMRMesh::getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<mcIdType>& ret) const
 {
 
 }
@@ -1958,7 +1959,7 @@ MEDCouplingCartesianAMRMesh::MEDCouplingCartesianAMRMesh(const MEDCouplingCartes
 {
 }
 
-MEDCouplingCartesianAMRMesh::MEDCouplingCartesianAMRMesh(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+MEDCouplingCartesianAMRMesh::MEDCouplingCartesianAMRMesh(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                                          const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop):MEDCouplingCartesianAMRMeshGen(meshName,spaceDim,nodeStrctStart,nodeStrctStop,originStart,originStop,dxyzStart,dxyzStop)
 {
 }
index ad4e74aa9135116aef5f2d9fb8e7636410ca0762..cfe7aa4ab28b8612a02c4649876988878c4889a6 100644 (file)
@@ -34,7 +34,7 @@ namespace MEDCoupling
 {
   class MEDCouplingIMesh;
   class MEDCouplingUMesh;
-  class DataArrayInt;
+  class DataArrayIdType;
   class DataArrayByte;
   class DataArrayDouble;
   class MEDCoupling1SGTUMesh;
@@ -51,9 +51,9 @@ namespace MEDCoupling
   {
   public:
     MEDCOUPLING_EXPORT virtual MEDCouplingCartesianAMRPatchGen *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const = 0;
-    MEDCOUPLING_EXPORT int getNumberOfCellsRecursiveWithOverlap() const;
-    MEDCOUPLING_EXPORT int getNumberOfCellsRecursiveWithoutOverlap() const;
-    MEDCOUPLING_EXPORT int getMaxNumberOfLevelsRelativeToThis() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithOverlap() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithoutOverlap() const;
+    MEDCOUPLING_EXPORT mcIdType getMaxNumberOfLevelsRelativeToThis() const;
     MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getMesh() const { return _mesh; }
   protected:
     MEDCouplingCartesianAMRPatchGen(const MEDCouplingCartesianAMRPatchGen& other, MEDCouplingCartesianAMRMeshGen *father);
@@ -72,41 +72,41 @@ namespace MEDCoupling
   class MEDCouplingCartesianAMRPatch : public MEDCouplingCartesianAMRPatchGen
   {
   public:
-    MEDCouplingCartesianAMRPatch(MEDCouplingCartesianAMRMeshGen *mesh, const std::vector< std::pair<int,int> >& bottomLeftTopRight);
+    MEDCouplingCartesianAMRPatch(MEDCouplingCartesianAMRMeshGen *mesh, const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight);
     MEDCouplingCartesianAMRPatch *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const;
     // direct forward to _mesh
-    MEDCOUPLING_EXPORT void addPatch(const std::vector< std::pair<int,int> >& bottomLeftTopRight, const std::vector<int>& factors);
+    MEDCOUPLING_EXPORT void addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors);
     // end of direct forward to _mesh
-    MEDCOUPLING_EXPORT int getNumberOfOverlapedCellsForFather() const;
-    MEDCOUPLING_EXPORT bool isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const;
-    MEDCOUPLING_EXPORT bool isInMyNeighborhoodExt(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const;
-    MEDCOUPLING_EXPORT bool isInMyNeighborhoodDiffLev(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfOverlapedCellsForFather() const;
+    MEDCOUPLING_EXPORT bool isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
+    MEDCOUPLING_EXPORT bool isInMyNeighborhoodExt(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
+    MEDCOUPLING_EXPORT bool isInMyNeighborhoodDiffLev(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
     // basic set/get
-    MEDCOUPLING_EXPORT const std::vector< std::pair<int,int> >& getBLTRRange() const { return _bl_tr; }
-    MEDCOUPLING_EXPORT std::vector< std::pair<int,int> > getBLTRRangeRelativeToGF() const;
-    MEDCOUPLING_EXPORT std::vector<int> computeCellGridSt() const;
-    MEDCOUPLING_EXPORT static bool IsInMyNeighborhood(int ghostLev, const std::vector< std::pair<int,int> >& p1, const std::vector< std::pair<int,int> >& p2);
+    MEDCOUPLING_EXPORT const std::vector< std::pair<mcIdType,mcIdType> >& getBLTRRange() const { return _bl_tr; }
+    MEDCOUPLING_EXPORT std::vector< std::pair<mcIdType,mcIdType> > getBLTRRangeRelativeToGF() const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> computeCellGridSt() const;
+    MEDCOUPLING_EXPORT static bool IsInMyNeighborhood(mcIdType ghostLev, const std::vector< std::pair<mcIdType,mcIdType> >& p1, const std::vector< std::pair<mcIdType,mcIdType> >& p2);
     //
-    static std::vector< std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > > FindNeighborsOfSubPatchesOfSameLev(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2);
-    static void FindNeighborsOfSubPatchesOf(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ret);
-    static void UpdateNeighborsOfOneWithTwo(int ghostLev, const std::vector<int>& factors, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2);
-    static void UpdateNeighborsOfOneWithTwoExt(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2);
-    static void UpdateNeighborsOfOneWithTwoMixedLev(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2, bool isConservative);
+    static std::vector< std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > > FindNeighborsOfSubPatchesOfSameLev(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2);
+    static void FindNeighborsOfSubPatchesOf(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ret);
+    static void UpdateNeighborsOfOneWithTwo(mcIdType ghostLev, const std::vector<mcIdType>& factors, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2);
+    static void UpdateNeighborsOfOneWithTwoExt(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2);
+    static void UpdateNeighborsOfOneWithTwoMixedLev(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2, bool isConservative);
   private:
-    static void ComputeZonesOfTwoRelativeToOneDiffLev(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<int,int> >& p1Zone, std::vector< std::pair<int,int> >& p2Zone, std::vector<int>& factToApplyOn2);
+    static void ComputeZonesOfTwoRelativeToOneDiffLev(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<mcIdType,mcIdType> >& p1Zone, std::vector< std::pair<mcIdType,mcIdType> >& p2Zone, std::vector<mcIdType>& factToApplyOn2);
   private:
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    static const MEDCouplingCartesianAMRMeshGen *FindCommonAncestor(const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, int& lev);
-    static std::vector<int> ComputeOffsetFromTwoToOne(const MEDCouplingCartesianAMRMeshGen *comAncestor, int lev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2);
-    static void UpdateNeighborsOfOneWithTwoInternal(int ghostLev, const std::vector<int>& factors, const std::vector< std::pair<int,int> >&p1 ,const std::vector< std::pair<int,int> >&p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2);
+    static const MEDCouplingCartesianAMRMeshGen *FindCommonAncestor(const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, mcIdType& lev);
+    static std::vector<mcIdType> ComputeOffsetFromTwoToOne(const MEDCouplingCartesianAMRMeshGen *comAncestor, mcIdType lev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2);
+    static void UpdateNeighborsOfOneWithTwoInternal(mcIdType ghostLev, const std::vector<mcIdType>& factors, const std::vector< std::pair<mcIdType,mcIdType> >&p1 ,const std::vector< std::pair<mcIdType,mcIdType> >&p2, DataArrayDouble *dataOnP1, const DataArrayDouble *dataOnP2);
   public:
-    static void ApplyFactorsOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, const std::vector<int>& factors);
-    static void ApplyAllGhostOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, int ghostSize);
+    static void ApplyFactorsOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, const std::vector<mcIdType>& factors);
+    static void ApplyAllGhostOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, mcIdType ghostSize);
   private:
     MEDCouplingCartesianAMRPatch(const MEDCouplingCartesianAMRPatch& other, MEDCouplingCartesianAMRMeshGen *father);
   private:
     //! bottom left/top right cell range relative to \a _father
-    std::vector< std::pair<int,int> > _bl_tr;
+    std::vector< std::pair<mcIdType,mcIdType> > _bl_tr;
   };
 
   /*!
@@ -135,72 +135,72 @@ namespace MEDCoupling
   public:
     MEDCOUPLING_EXPORT virtual MEDCouplingCartesianAMRMeshGen *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const = 0;
     MEDCOUPLING_EXPORT int getSpaceDimension() const;
-    MEDCOUPLING_EXPORT const std::vector<int>& getFactors() const { return _factors; }
-    MEDCOUPLING_EXPORT void setFactors(const std::vector<int>& newFactors);
-    MEDCOUPLING_EXPORT int getMaxNumberOfLevelsRelativeToThis() const;
-    MEDCOUPLING_EXPORT int getNumberOfCellsAtCurrentLevel() const;
-    MEDCOUPLING_EXPORT int getNumberOfCellsAtCurrentLevelGhost(int ghostLev) const;
-    MEDCOUPLING_EXPORT int getNumberOfCellsRecursiveWithOverlap() const;
-    MEDCOUPLING_EXPORT int getNumberOfCellsRecursiveWithoutOverlap() const;
+    MEDCOUPLING_EXPORT const std::vector<mcIdType>& getFactors() const { return _factors; }
+    MEDCOUPLING_EXPORT void setFactors(const std::vector<mcIdType>& newFactors);
+    MEDCOUPLING_EXPORT mcIdType getMaxNumberOfLevelsRelativeToThis() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsAtCurrentLevel() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsAtCurrentLevelGhost(mcIdType ghostLev) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithOverlap() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithoutOverlap() const;
     MEDCOUPLING_EXPORT const MEDCouplingIMesh *getImageMesh() const { return _mesh; }
     //
     MEDCOUPLING_EXPORT virtual const MEDCouplingCartesianAMRMeshGen *getFather() const = 0;
     MEDCOUPLING_EXPORT virtual const MEDCouplingCartesianAMRMeshGen *getGodFather() const = 0;
-    MEDCOUPLING_EXPORT virtual int getAbsoluteLevel() const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getAbsoluteLevel() const = 0;
     MEDCOUPLING_EXPORT virtual void detachFromFather() = 0;
-    MEDCOUPLING_EXPORT virtual std::vector< std::pair<int,int> > positionRelativeToGodFather(std::vector<int>& st) const = 0;
-    MEDCOUPLING_EXPORT virtual int getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const = 0;
-    MEDCOUPLING_EXPORT std::vector<int> getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
-    MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<int>& pos) const;
-    MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getMeshAtPosition(const std::vector<int>& pos) const;
-    MEDCOUPLING_EXPORT virtual std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(int absoluteLev) const;
-    MEDCOUPLING_EXPORT void addPatch(const std::vector< std::pair<int,int> >& bottomLeftTopRight, const std::vector<int>& factors);
+    MEDCOUPLING_EXPORT virtual std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const = 0;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+    MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<mcIdType>& pos) const;
+    MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getMeshAtPosition(const std::vector<mcIdType>& pos) const;
+    MEDCOUPLING_EXPORT virtual std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(mcIdType absoluteLev) const;
+    MEDCOUPLING_EXPORT void addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors);
     MEDCOUPLING_EXPORT void removeAllPatches();
-    MEDCOUPLING_EXPORT void removePatch(int patchId);
-    MEDCOUPLING_EXPORT int getNumberOfPatches() const;
-    MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const std::vector<bool>& criterion, const std::vector<int>& factors);
-    MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<int>& factors);
-    MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<int>& factors, double eps);
-    MEDCOUPLING_EXPORT int getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const;
+    MEDCOUPLING_EXPORT void removePatch(mcIdType patchId);
+    MEDCOUPLING_EXPORT mcIdType getNumberOfPatches() const;
+    MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const std::vector<bool>& criterion, const std::vector<mcIdType>& factors);
+    MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<mcIdType>& factors);
+    MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<mcIdType>& factors, double eps);
+    MEDCOUPLING_EXPORT mcIdType getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const;
     MEDCOUPLING_EXPORT std::vector< const MEDCouplingCartesianAMRPatch *> getPatches() const;
-    MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRPatch *getPatch(int patchId) const;
-    MEDCOUPLING_EXPORT bool isPatchInNeighborhoodOf(int patchId1, int patchId2, int ghostLev) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *createCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis) const;
+    MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRPatch *getPatch(mcIdType patchId) const;
+    MEDCOUPLING_EXPORT bool isPatchInNeighborhoodOf(mcIdType patchId1, mcIdType patchId2, mcIdType ghostLev) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *createCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis) const;
     // coarse to fine
-    MEDCOUPLING_EXPORT void fillCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const;
-    MEDCOUPLING_EXPORT void fillCellFieldOnPatchGhost(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev, bool isConservative=true) const;
-    MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyOnGhostZone(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev) const;
+    MEDCOUPLING_EXPORT void fillCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const;
+    MEDCOUPLING_EXPORT void fillCellFieldOnPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev, bool isConservative=true) const;
+    MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyOnGhostZone(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev) const;
     // coarse to fine + fine to fine
-    MEDCOUPLING_EXPORT void fillCellFieldOnPatchGhostAdv(int patchId, const DataArrayDouble *cellFieldOnThis, int ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches, bool isConservative=true) const;
+    MEDCOUPLING_EXPORT void fillCellFieldOnPatchGhostAdv(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches, bool isConservative=true) const;
     // fine to fine
-    MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyGhostAdv(int patchId, int ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches) const;
-    MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyOnGhostZoneWith(int ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const;
+    MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyGhostAdv(mcIdType patchId, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches) const;
+    MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyOnGhostZoneWith(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const;
     // fine to coarse
-    MEDCOUPLING_EXPORT void fillCellFieldComingFromPatch(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const;
-    MEDCOUPLING_EXPORT void fillCellFieldComingFromPatchGhost(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, int ghostLev, bool isConservative=true) const;
+    MEDCOUPLING_EXPORT void fillCellFieldComingFromPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const;
+    MEDCOUPLING_EXPORT void fillCellFieldComingFromPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, bool isConservative=true) const;
     //
-    MEDCOUPLING_EXPORT DataArrayInt *findPatchesInTheNeighborhoodOf(int patchId, int ghostLev) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findPatchesInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
     //
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
     MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildMeshFromPatchEnvelop() const;
     MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildMeshOfDirectChildrenOnly() const;
-    MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *extractGhostFrom(int ghostSz, const DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT std::vector<int> getPatchIdsInTheNeighborhoodOf(int patchId, int ghostLev) const;
+    MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(mcIdType ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *extractGhostFrom(mcIdType ghostSz, const DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getPatchIdsInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
     MEDCOUPLING_EXPORT std::string buildPythonDumpOfThis() const;
   protected:
     MEDCouplingCartesianAMRMeshGen(const MEDCouplingCartesianAMRMeshGen& other);
-    MEDCouplingCartesianAMRMeshGen(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+    MEDCouplingCartesianAMRMeshGen(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                    const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
     MEDCouplingCartesianAMRMeshGen(MEDCouplingIMesh *mesh);
-    void checkPatchId(int patchId) const;
-    void checkFactorsAndIfNotSetAssign(const std::vector<int>& factors);
-    void retrieveGridsAtInternal(int lev, std::vector< MCAuto<MEDCouplingCartesianAMRPatchGen> >& grids) const;
-    static int GetGhostLevelInFineRef(int ghostLev, const std::vector<int>& factors);
+    void checkPatchId(mcIdType patchId) const;
+    void checkFactorsAndIfNotSetAssign(const std::vector<mcIdType>& factors);
+    void retrieveGridsAtInternal(mcIdType lev, std::vector< MCAuto<MEDCouplingCartesianAMRPatchGen> >& grids) const;
+    static mcIdType GetGhostLevelInFineRef(mcIdType ghostLev, const std::vector<mcIdType>& factors);
     std::vector<const DataArrayDouble *> extractSubTreeFromGlobalFlatten(const MEDCouplingCartesianAMRMeshGen *head, const std::vector<const DataArrayDouble *>& all) const;
     void dumpPatchesOf(const std::string& varName, std::ostream& oss) const;
   public:
-    virtual void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<int>& ret) const = 0;
+    virtual void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<mcIdType>& ret) const = 0;
   protected:
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
@@ -208,7 +208,7 @@ namespace MEDCoupling
   protected:
     MCAuto<MEDCouplingIMesh> _mesh;
     std::vector< MCAuto<MEDCouplingCartesianAMRPatch> > _patches;
-    std::vector<int> _factors;
+    std::vector<mcIdType> _factors;
   };
 
   class MEDCouplingCartesianAMRMeshSub : public MEDCouplingCartesianAMRMeshGen
@@ -217,14 +217,14 @@ namespace MEDCoupling
     MEDCouplingCartesianAMRMeshSub(MEDCouplingCartesianAMRMeshGen *father, MEDCouplingIMesh *mesh);
     MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getFather() const;
     MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getGodFather() const;
-    MEDCOUPLING_EXPORT int getAbsoluteLevel() const;
+    MEDCOUPLING_EXPORT mcIdType getAbsoluteLevel() const;
     MEDCOUPLING_EXPORT void detachFromFather();
-    MEDCOUPLING_EXPORT std::vector< std::pair<int,int> > positionRelativeToGodFather(std::vector<int>& st) const;
-    MEDCOUPLING_EXPORT int getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+    MEDCOUPLING_EXPORT std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const;
+    MEDCOUPLING_EXPORT mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
   private:
     MEDCouplingCartesianAMRMeshSub(const MEDCouplingCartesianAMRMeshSub& other, MEDCouplingCartesianAMRMeshGen *father);
     MEDCouplingCartesianAMRMeshSub *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const;
-    void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<int>& ret) const;
+    void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<mcIdType>& ret) const;
   protected:
     MEDCouplingCartesianAMRMeshGen *_father;
   };
@@ -232,22 +232,22 @@ namespace MEDCoupling
   class MEDCouplingCartesianAMRMesh : public MEDCouplingCartesianAMRMeshGen
   {
   public:
-    MEDCOUPLING_EXPORT static MEDCouplingCartesianAMRMesh *New(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+    MEDCOUPLING_EXPORT static MEDCouplingCartesianAMRMesh *New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                                                const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
     MEDCOUPLING_EXPORT static MEDCouplingCartesianAMRMesh *New(MEDCouplingIMesh *mesh);
     MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getFather() const;
     MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getGodFather() const;
-    MEDCOUPLING_EXPORT int getAbsoluteLevel() const;
+    MEDCOUPLING_EXPORT mcIdType getAbsoluteLevel() const;
     MEDCOUPLING_EXPORT void detachFromFather();
-    MEDCOUPLING_EXPORT std::vector< std::pair<int,int> > positionRelativeToGodFather(std::vector<int>& st) const;
-    MEDCOUPLING_EXPORT int getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
-    MEDCOUPLING_EXPORT std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(int absoluteLev) const;
+    MEDCOUPLING_EXPORT std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const;
+    MEDCOUPLING_EXPORT mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+    MEDCOUPLING_EXPORT std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(mcIdType absoluteLev) const;
     MEDCouplingCartesianAMRMesh *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const;
-    MEDCOUPLING_EXPORT void createPatchesFromCriterionML(const std::vector<const INTERP_KERNEL::BoxSplittingOptions *>& bso, const DataArrayDouble *criterion, const std::vector< std::vector<int> >& factors, double eps);
+    MEDCOUPLING_EXPORT void createPatchesFromCriterionML(const std::vector<const INTERP_KERNEL::BoxSplittingOptions *>& bso, const DataArrayDouble *criterion, const std::vector< std::vector<mcIdType> >& factors, double eps);
   private:
-    void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<int>& ret) const;
+    void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<mcIdType>& ret) const;
     MEDCouplingCartesianAMRMesh(const MEDCouplingCartesianAMRMesh& other);
-    MEDCouplingCartesianAMRMesh(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+    MEDCouplingCartesianAMRMesh(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                 const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
     MEDCouplingCartesianAMRMesh(MEDCouplingIMesh *mesh);
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
old mode 100644 (file)
new mode 100755 (executable)
index 1ca531a..8b1ad4a
@@ -83,7 +83,7 @@ void MEDCouplingCurveLinearMesh::updateTime() const
 std::size_t MEDCouplingCurveLinearMesh::getHeapMemorySizeWithoutChildren() const
 {
   std::size_t ret(MEDCouplingStructuredMesh::getHeapMemorySizeWithoutChildren());
-  ret+=_structure.capacity()*sizeof(int);
+  ret+=_structure.capacity()*sizeof(mcIdType);
   return ret;
 }
 
@@ -159,7 +159,7 @@ bool MEDCouplingCurveLinearMesh::isEqualWithoutConsideringStr(const MEDCouplingM
 }
 
 void MEDCouplingCurveLinearMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                      DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
+                                                      DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 {
   if(!isEqualWithoutConsideringStr(other,prec))
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::checkDeepEquivalWith : Meshes are not the same !");
@@ -170,7 +170,7 @@ void MEDCouplingCurveLinearMesh::checkDeepEquivalWith(const MEDCouplingMesh *oth
  * The user intend that the nodes are the same, so by construction of MEDCoupling::MEDCouplingCurveLinearMesh, \a this and \a other are the same !
  */
 void MEDCouplingCurveLinearMesh::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                                 DataArrayInt *&cellCor) const
+                                                                 DataArrayIdType *&cellCor) const
 {
   if(!isEqualWithoutConsideringStr(other,prec))
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::checkDeepEquivalOnSameNodesWith : Meshes are not the same !");
@@ -178,10 +178,11 @@ void MEDCouplingCurveLinearMesh::checkDeepEquivalOnSameNodesWith(const MEDCoupli
 
 void MEDCouplingCurveLinearMesh::checkConsistencyLight() const
 {
-  std::size_t sz=_structure.size(),i=0,nbOfNodes=1;
+  std::size_t sz=_structure.size(),i=0;
+  mcIdType nbOfNodes=1;
   if(sz<1)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::checkConsistencyLight : structure should have a lgth of size 1 at least !");
-  for(std::vector<int>::const_iterator it=_structure.begin();it!=_structure.end();it++,i++)
+  for(std::vector<mcIdType>::const_iterator it=_structure.begin();it!=_structure.end();it++,i++)
     {
       if((*it)<1)
         { std::ostringstream oss; oss << "MEDCouplingCurveLinearMesh::checkConsistencyLight : At pos #" << i << " of structure value is " << *it << "should be >= 1 !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); }
@@ -193,7 +194,7 @@ void MEDCouplingCurveLinearMesh::checkConsistencyLight() const
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::checkConsistencyLight : the array is not allocated !");
   if(_coords->getNumberOfComponents()<1)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::checkConsistencyLight : the array should have >= 1 components !");
-  if(_coords->getNumberOfTuples()!=(int)nbOfNodes)
+  if(_coords->getNumberOfTuples()!=nbOfNodes)
     {
       std::ostringstream oss; oss << "MEDCouplingCurveLinearMesh::checkConsistencyLight : structure said that number of nodes should be equal to " << nbOfNodes << " but number of tuples in array is equal to " << _coords->getNumberOfTuples() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -205,19 +206,19 @@ void MEDCouplingCurveLinearMesh::checkConsistency(double eps) const
   checkConsistencyLight();
 }
 
-std::size_t MEDCouplingCurveLinearMesh::getNumberOfCells() const
+mcIdType MEDCouplingCurveLinearMesh::getNumberOfCells() const
 {
   checkConsistencyLight();
   return MEDCouplingStructuredMesh::getNumberOfCells();
 }
 
-int MEDCouplingCurveLinearMesh::getNumberOfNodes() const
+mcIdType MEDCouplingCurveLinearMesh::getNumberOfNodes() const
 {
   checkConsistencyLight();
   return MEDCouplingStructuredMesh::getNumberOfNodes();
 }
 
-void MEDCouplingCurveLinearMesh::getNodeGridStructure(int *res) const
+void MEDCouplingCurveLinearMesh::getNodeGridStructure(mcIdType *res) const
 {
   std::copy(_structure.begin(),_structure.end(),res);
 }
@@ -232,14 +233,14 @@ int MEDCouplingCurveLinearMesh::getSpaceDimension() const
 {
   if(!((const DataArrayDouble *)_coords))
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getSpaceDimension : no array set ! impossible to deduce a space dimension !");
-  return _coords->getNumberOfComponents();
+  return int(_coords->getNumberOfComponents());
 }
 
-void MEDCouplingCurveLinearMesh::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const
+void MEDCouplingCurveLinearMesh::getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const
 {
   if(!((const DataArrayDouble *)_coords))
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getCoordinatesOfNode : Coordinates not set !");
-  int nbOfCompo=_coords->getNumberOfComponents();
+  std::size_t nbOfCompo=_coords->getNumberOfComponents();
   if(nodeId>=0 && nodeId<_coords->getNumberOfTuples())
     coo.insert(coo.end(),_coords->begin()+nodeId*nbOfCompo,_coords->begin()+(nodeId+1)*nbOfCompo);
   else
@@ -296,7 +297,7 @@ void MEDCouplingCurveLinearMesh::setCoords(const DataArrayDouble *coords)
     }
 }
 
-void MEDCouplingCurveLinearMesh::setNodeGridStructure(const int *gridStructBg, const int *gridStructEnd)
+void MEDCouplingCurveLinearMesh::setNodeGridStructure(const mcIdType *gridStructBg, const mcIdType *gridStructEnd)
 {
   std::size_t sz=std::distance(gridStructBg,gridStructEnd);
   if(sz>=1 && sz<=3)
@@ -311,25 +312,25 @@ void MEDCouplingCurveLinearMesh::setNodeGridStructure(const int *gridStructBg, c
     }
 }
 
-std::vector<int> MEDCouplingCurveLinearMesh::getNodeGridStructure() const
+std::vector<mcIdType> MEDCouplingCurveLinearMesh::getNodeGridStructure() const
 {
   return _structure;
 }
 
-MEDCouplingStructuredMesh *MEDCouplingCurveLinearMesh::buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const
+MEDCouplingStructuredMesh *MEDCouplingCurveLinearMesh::buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const
 {
   checkConsistencyLight();
   int dim(getSpaceDimension());
-  std::vector<int> dims(getMeshDimension());
-  if(dim!=(int)cellPart.size())
+  std::vector<mcIdType> dims(getMeshDimension());
+  if(dim!=ToIdType(cellPart.size()))
     {
       std::ostringstream oss; oss << "MEDCouplingCurveLinearMesh::buildStructuredSubPart : the space dimension is " << dim << " and cell part size is " << cellPart.size() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  std::vector< std::pair<int,int> > nodePartFormat(cellPart);
-  for(std::vector< std::pair<int,int> >::iterator it=nodePartFormat.begin();it!=nodePartFormat.end();it++)
+  std::vector< std::pair<mcIdType,mcIdType> > nodePartFormat(cellPart);
+  for(std::vector< std::pair<mcIdType,mcIdType> >::iterator it=nodePartFormat.begin();it!=nodePartFormat.end();it++)
     (*it).second++;
-  MCAuto<DataArrayInt> tmp1(BuildExplicitIdsFrom(getNodeGridStructure(),nodePartFormat));
+  MCAuto<DataArrayIdType> tmp1(BuildExplicitIdsFrom(getNodeGridStructure(),nodePartFormat));
   MCAuto<MEDCouplingCurveLinearMesh> ret(dynamic_cast<MEDCouplingCurveLinearMesh *>(deepCopy()));
   const DataArrayDouble *coo(ret->getCoords());
   if(coo)
@@ -380,7 +381,7 @@ MEDCouplingFieldDouble *MEDCouplingCurveLinearMesh::getMeasureField(bool isAbs)
  */
 void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim1(bool isAbs, MEDCouplingFieldDouble *field) const
 {
-  int nbnodes=getNumberOfNodes();
+  mcIdType nbnodes=getNumberOfNodes();
   int spaceDim=getSpaceDimension();
   MCAuto<DataArrayDouble> arr=DataArrayDouble::New(); field->setArray(arr);
   if(nbnodes==0)
@@ -406,7 +407,7 @@ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim1(bool isAbs, MEDCoupling
  */
 void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim2(bool isAbs, MEDCouplingFieldDouble *field) const
 {
-  int nbcells=getNumberOfCells();
+  mcIdType nbcells=getNumberOfCells();
   int spaceDim=getSpaceDimension();
   if(spaceDim!=2 && spaceDim!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim2 : with meshDim 2 only space dimension 2 and 3 are possible !");
@@ -414,13 +415,13 @@ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim2(bool isAbs, MEDCoupling
   arr->alloc(nbcells,1);
   double *pt=arr->getPointer();
   const double *coords=_coords->begin();
-  int nX=_structure[0]-1;
-  int conn[4];
-  for(int i=0;i<nbcells;i++,pt++)
+  mcIdType nX=_structure[0]-1;
+  mcIdType conn[4];
+  for(mcIdType i=0;i<nbcells;i++,pt++)
     {
-      int cy=i/nX,cx=i-cy*nX;
+      mcIdType cy=i/nX,cx=i-cy*nX;
       conn[0]=cy*(nX+1)+cx; conn[1]=(cy+1)*(nX+1)+cx; conn[2]=(cy+1)*(nX+1)+1+cx; conn[3]=cy*(nX+1)+cx+1;
-      *pt=INTERP_KERNEL::computeVolSurfOfCell2<int,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_QUAD4,conn,4,coords,spaceDim);
+      *pt=INTERP_KERNEL::computeVolSurfOfCell2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_QUAD4,conn,4,coords,spaceDim);
     }
   if(isAbs)
     arr->abs();
@@ -432,7 +433,7 @@ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim2(bool isAbs, MEDCoupling
  */
 void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim3(bool isAbs, MEDCouplingFieldDouble *field) const
 {
-  int nbcells=getNumberOfCells();
+  mcIdType nbcells=getNumberOfCells();
   int spaceDim=getSpaceDimension();
   if(spaceDim!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim3 : with meshDim 3 only space dimension 3 is possible !");
@@ -440,17 +441,17 @@ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim3(bool isAbs, MEDCoupling
   arr->alloc(nbcells,1);
   double *pt=arr->getPointer();
   const double *coords=_coords->begin();
-  int nX=_structure[0]-1,nY=(_structure[0]-1)*(_structure[1]-1);
-  int nY1=_structure[0]*_structure[1];
-  int conn[8];
-  for(int i=0;i<nbcells;i++,pt++)
+  mcIdType nX=_structure[0]-1,nY=(_structure[0]-1)*(_structure[1]-1);
+  mcIdType nY1=_structure[0]*_structure[1];
+  mcIdType conn[8];
+  for(mcIdType i=0;i<nbcells;i++,pt++)
     {
-      int cz=i/nY;
-      int cy=(i-cz*nY)/nX;
-      int cx=(i-cz*nY)-nX*cy;
+      mcIdType cz=i/nY;
+      mcIdType cy=(i-cz*nY)/nX;
+      mcIdType cx=(i-cz*nY)-nX*cy;
       conn[0]=cz*nY1+cy*(nX+1)+cx; conn[1]=cz*nY1+(cy+1)*(nX+1)+cx; conn[2]=cz*nY1+(cy+1)*(nX+1)+1+cx; conn[3]=cz*nY1+cy*(nX+1)+cx+1;
       conn[4]=(cz+1)*nY1+cy*(nX+1)+cx; conn[5]=(cz+1)*nY1+(cy+1)*(nX+1)+cx; conn[6]=(cz+1)*nY1+(cy+1)*(nX+1)+1+cx; conn[7]=(cz+1)*nY1+cy*(nX+1)+cx+1;
-      *pt=INTERP_KERNEL::computeVolSurfOfCell2<int,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_HEXA8,conn,8,coords,3);
+      *pt=INTERP_KERNEL::computeVolSurfOfCell2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_HEXA8,conn,8,coords,3);
     }
   if(isAbs)
     arr->abs();
@@ -470,10 +471,10 @@ MEDCouplingFieldDouble *MEDCouplingCurveLinearMesh::buildOrthogonalField() const
     throw INTERP_KERNEL::Exception("Expected a cmesh with meshDim == 2 !");
   MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
   DataArrayDouble *array=DataArrayDouble::New();
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   array->alloc(nbOfCells,3);
   double *vals=array->getPointer();
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     { vals[3*i]=0.; vals[3*i+1]=0.; vals[3*i+2]=1.; }
   ret->setArray(array);
   array->decrRef();
@@ -491,31 +492,31 @@ namespace MEDCoupling
   public:
     static const int MY_SPACEDIM=SPACEDIMM;
     static const int MY_MESHDIM=8;
-    typedef int MyConnType;
+    typedef mcIdType MyConnType;
     static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE;
     // begin
     // useless, but for windows compilation ...
     const double* getCoordinatesPtr() const { return 0; }
-    const int* getConnectivityPtr() const { return 0; }
-    const int* getConnectivityIndexPtr() const { return 0; }
-    INTERP_KERNEL::NormalizedCellType getTypeOfElement(int) const { return (INTERP_KERNEL::NormalizedCellType)0; }
+    const mcIdType* getConnectivityPtr() const { return 0; }
+    const mcIdType* getConnectivityIndexPtr() const { return 0; }
+    INTERP_KERNEL::NormalizedCellType getTypeOfElement(mcIdType) const { return (INTERP_KERNEL::NormalizedCellType)0; }
     // end
   };
 }
 
 /// @endcond
 
-int MEDCouplingCurveLinearMesh::getCellContainingPoint(const double *pos, double eps) const
+mcIdType MEDCouplingCurveLinearMesh::getCellContainingPoint(const double *pos, double eps) const
 {
   checkConsistencyLight();
   int spaceDim=getSpaceDimension();
   const double *coords=_coords->getConstPointer();
-  int nodeId=-1;
+  mcIdType nodeId=-1;
   _coords->distanceToTuple(pos,pos+spaceDim,nodeId);
   if(nodeId<0)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getCellContainingPoint : internal problem 1 !");
-  int conn[8];
-  int nbOfNodes=getNumberOfNodes();
+  mcIdType conn[8];
+  mcIdType nbOfNodes=getNumberOfNodes();
   if(nbOfNodes==1)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getCellContainingPoint : No cells in this !");
   switch(getMeshDimension())
@@ -539,7 +540,7 @@ int MEDCouplingCurveLinearMesh::getCellContainingPoint(const double *pos, double
     case 2:
       if(spaceDim==2)
         {
-          int ny=nodeId/_structure[0],nx=nodeId-ny*_structure[0];
+          mcIdType ny=nodeId/_structure[0],nx=nodeId-ny*_structure[0];
           if(nx>0 && ny>0)
             {
               conn[0]=nx-1+_structure[0]*(ny-1); conn[1]=nx-1+_structure[0]*ny; conn[2]=nx+_structure[0]*ny; conn[3]=nx+_structure[0]*(ny-1);
@@ -569,8 +570,8 @@ int MEDCouplingCurveLinearMesh::getCellContainingPoint(const double *pos, double
       {
         if(spaceDim==3)
           {
-            int nY=_structure[0]*_structure[1];
-            int nz=nodeId/_structure[1]; int ny=(nodeId-nz*nY)/_structure[0]; int nx=(nodeId-nz*nY)-_structure[0]*ny;
+            mcIdType nY=_structure[0]*_structure[1];
+            mcIdType nz=nodeId/_structure[1]; mcIdType ny=(nodeId-nz*nY)/_structure[0]; mcIdType nx=(nodeId-nz*nY)-_structure[0]*ny;
             if(nx>0 && ny>0 && nz>0)
               {
                 conn[0]=nx-1+_structure[0]*(ny-1)+nY*(nz-1); conn[1]=nx-1+_structure[2]*ny+nY*(nz-1); conn[2]=nx+_structure[2]*ny+nY*(nz-1); conn[3]=nx+_structure[0]*(ny-1)+nY*(nz-1);
@@ -634,9 +635,9 @@ int MEDCouplingCurveLinearMesh::getCellContainingPoint(const double *pos, double
   }
 }
 
-void MEDCouplingCurveLinearMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const
+void MEDCouplingCurveLinearMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const
 {
-  int ret(getCellContainingPoint(pos,eps));
+  mcIdType ret(getCellContainingPoint(pos,eps));
   elts.push_back(ret);
 }
 
@@ -645,7 +646,7 @@ void MEDCouplingCurveLinearMesh::rotate(const double *center, const double *vect
   if(!((DataArrayDouble *)_coords))
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::rotate : no coordinates set !");
   int spaceDim=getSpaceDimension();
-  int nbNodes=_coords->getNumberOfTuples();
+  mcIdType nbNodes(_coords->getNumberOfTuples());
   double *coords=_coords->getPointer();
   if(spaceDim==3)
     DataArrayDouble::Rotate3DAlg(center,vector,angle,nbNodes,coords,coords);
@@ -664,9 +665,9 @@ void MEDCouplingCurveLinearMesh::translate(const double *vector)
   if(!((DataArrayDouble *)_coords))
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::translate : no coordinates set !");
   double *coords=_coords->getPointer();
-  int nbNodes=getNumberOfNodes();
+  mcIdType nbNodes=getNumberOfNodes();
   int dim=getSpaceDimension();
-  for(int i=0; i<nbNodes; i++)
+  for(mcIdType i=0; i<nbNodes; i++)
     for(int idim=0; idim<dim;idim++)
       coords[i*dim+idim]+=vector[idim];
   _coords->declareAsNew();
@@ -680,9 +681,9 @@ void MEDCouplingCurveLinearMesh::scale(const double *point, double factor)
   if(!((DataArrayDouble *)_coords))
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::scale : no coordinates set !");
   double *coords=_coords->getPointer();
-  int nbNodes=_coords->getNumberOfTuples();
-  int dim=_coords->getNumberOfComponents();
-  for(int i=0;i<nbNodes;i++)
+  mcIdType nbNodes(_coords->getNumberOfTuples());
+  std::size_t dim(_coords->getNumberOfComponents());
+  for(mcIdType i=0;i<nbNodes;i++)
     {
       std::transform(coords+i*dim,coords+(i+1)*dim,point,coords+i*dim,std::minus<double>());
       std::transform(coords+i*dim,coords+(i+1)*dim,coords+i*dim,std::bind2nd(std::multiplies<double>(),factor));
@@ -711,7 +712,7 @@ DataArrayDouble *MEDCouplingCurveLinearMesh::computeCellCenterOfMass() const
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   int spaceDim=getSpaceDimension();
   int meshDim=getMeshDimension();
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   ret->alloc(nbOfCells,spaceDim);
   ret->copyStringInfoFrom(*getCoords());
   switch(meshDim)
@@ -738,22 +739,22 @@ DataArrayDouble *MEDCouplingCurveLinearMesh::computeIsoBarycenterOfNodesPerCell(
  */
 void MEDCouplingCurveLinearMesh::getBarycenterAndOwnerMeshDim3(DataArrayDouble *bary) const
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   double *ptToFill=bary->getPointer();
   const double *coor=_coords->getConstPointer();
   if(getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getBarycenterAndOwnerMeshDim3 : with meshDim 3 only space dimension 3 is possible !");
-  int nX=_structure[0]-1,nY=(_structure[0]-1)*(_structure[1]-1);
-  int nY1=_structure[0]*_structure[1];
-  int conn[8];
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nX=_structure[0]-1,nY=(_structure[0]-1)*(_structure[1]-1);
+  mcIdType nY1=_structure[0]*_structure[1];
+  mcIdType conn[8];
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int cz=i/nY;
-      int cy=(i-cz*nY)/nX;
-      int cx=(i-cz*nY)-nX*cy;
+      mcIdType cz=i/nY;
+      mcIdType cy=(i-cz*nY)/nX;
+      mcIdType cx=(i-cz*nY)-nX*cy;
       conn[0]=cz*nY1+cy*(nX+1)+cx+1; conn[1]=cz*nY1+cy*(nX+1)+cx; conn[2]=cz*nY1+(cy+1)*(nX+1)+cx; conn[3]=cz*nY1+(cy+1)*(nX+1)+1+cx;
       conn[4]=(cz+1)*nY1+cy*(nX+1)+cx+1; conn[5]=(cz+1)*nY1+cy*(nX+1)+cx; conn[6]=(cz+1)*nY1+(cy+1)*(nX+1)+cx; conn[7]=(cz+1)*nY1+(cy+1)*(nX+1)+1+cx;
-      INTERP_KERNEL::computeBarycenter2<int,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_HEXA8,conn,8,coor,3,ptToFill);
+      INTERP_KERNEL::computeBarycenter2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_HEXA8,conn,8,coor,3,ptToFill);
       ptToFill+=3;
     }
 }
@@ -764,19 +765,19 @@ void MEDCouplingCurveLinearMesh::getBarycenterAndOwnerMeshDim3(DataArrayDouble *
  */
 void MEDCouplingCurveLinearMesh::getBarycenterAndOwnerMeshDim2(DataArrayDouble *bary) const
 {
-  int nbcells=getNumberOfCells();
+  mcIdType nbcells=getNumberOfCells();
   int spaceDim=getSpaceDimension();
   double *ptToFill=bary->getPointer();
   const double *coor=_coords->getConstPointer();
   if(spaceDim!=2 && spaceDim!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::getBarycenterAndOwnerMeshDim2 : with meshDim 2 only space dimension 2 and 3 are possible !");
-  int nX=_structure[0]-1;
-  int conn[4];
-  for(int i=0;i<nbcells;i++)
+  mcIdType nX=_structure[0]-1;
+  mcIdType conn[4];
+  for(mcIdType i=0;i<nbcells;i++)
     {
-      int cy=i/nX,cx=i-cy*nX;
+      mcIdType cy=i/nX,cx=i-cy*nX;
       conn[0]=cy*(nX+1)+cx; conn[1]=(cy+1)*(nX+1)+cx; conn[2]=(cy+1)*(nX+1)+1+cx; conn[3]=cy*(nX+1)+cx+1;
-      INTERP_KERNEL::computeBarycenter2<int,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_QUAD4,conn,4,coor,spaceDim,ptToFill);
+      INTERP_KERNEL::computeBarycenter2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(INTERP_KERNEL::NORM_QUAD4,conn,4,coor,spaceDim,ptToFill);
       ptToFill+=spaceDim;
     }
 }
@@ -792,12 +793,12 @@ void MEDCouplingCurveLinearMesh::getBarycenterAndOwnerMeshDim1(DataArrayDouble *
   std::transform(bary->begin(),bary->end(),bary->getPointer(),std::bind2nd(std::multiplies<double>(),0.5));
 }
 
-void MEDCouplingCurveLinearMesh::renumberCells(const int *old2NewBg, bool check)
+void MEDCouplingCurveLinearMesh::renumberCells(const mcIdType *old2NewBg, bool check)
 {
   throw INTERP_KERNEL::Exception("Functionality of renumbering cell not available for CurveLinear Mesh !");
 }
 
-void MEDCouplingCurveLinearMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingCurveLinearMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
   int it,order;
   double time=getTime(it,order);
@@ -815,10 +816,10 @@ void MEDCouplingCurveLinearMesh::getTinySerializationInformation(std::vector<dou
   //
   tinyInfo.push_back(it);
   tinyInfo.push_back(order);
-  tinyInfo.push_back((int)_structure.size());
-  for(std::vector<int>::const_iterator itt=_structure.begin();itt!=_structure.end();itt++)
+  tinyInfo.push_back(ToIdType(_structure.size()));
+  for(std::vector<mcIdType>::const_iterator itt=_structure.begin();itt!=_structure.end();itt++)
     tinyInfo.push_back(*itt);
-  std::vector<int> tinyInfo2;
+  std::vector<mcIdType> tinyInfo2;
   if((const DataArrayDouble *)_coords)
     _coords->getTinySerializationIntInformation(tinyInfo2);
   tinyInfo.insert(tinyInfo.end(),tinyInfo2.begin(),tinyInfo2.end());
@@ -826,21 +827,21 @@ void MEDCouplingCurveLinearMesh::getTinySerializationInformation(std::vector<dou
   tinyInfoD.push_back(time);
 }
 
-void MEDCouplingCurveLinearMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCouplingCurveLinearMesh::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
   a1->alloc(tinyInfo[2],1);
-  std::vector<int> tinyInfo2(tinyInfo.begin()+3+tinyInfo[2],tinyInfo.end());
+  std::vector<mcIdType> tinyInfo2(tinyInfo.begin()+3+tinyInfo[2],tinyInfo.end());
   a2->resizeForUnserialization(tinyInfo2);
 }
 
-void MEDCouplingCurveLinearMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCouplingCurveLinearMesh::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
-  a1=DataArrayInt::New();
-  a1->alloc((int)_structure.size(),1);
-  int *ptr=a1->getPointer();
-  for(std::vector<int>::const_iterator it=_structure.begin();it!=_structure.end();it++,ptr++)
+  a1=DataArrayIdType::New();
+  a1->alloc(_structure.size(),1);
+  mcIdType *ptr=a1->getPointer();
+  for(std::vector<mcIdType>::const_iterator it=_structure.begin();it!=_structure.end();it++,ptr++)
     *ptr=(*it);
-  int sz=0;
+  mcIdType sz=0;
   if((const DataArrayDouble *)_coords)
     if(_coords->isAllocated())
       sz=_coords->getNbOfElems();
@@ -850,21 +851,21 @@ void MEDCouplingCurveLinearMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&
     std::copy(_coords->begin(),_coords->end(),a2->getPointer());
 }
 
-void MEDCouplingCurveLinearMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+void MEDCouplingCurveLinearMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                                  const std::vector<std::string>& littleStrings)
 {
   setName(littleStrings[0]);
   setDescription(littleStrings[1]);
   setTimeUnit(littleStrings[2]);
-  setTime(tinyInfoD[0],tinyInfo[0],tinyInfo[1]);
-  int sz=tinyInfo[2];
+  setTime(tinyInfoD[0],FromIdType<int>(tinyInfo[0]),FromIdType<int>(tinyInfo[1]));
+  mcIdType sz=tinyInfo[2];
   _structure.resize(sz);
-  for(int i=0;i<sz;i++)
+  for(mcIdType i=0;i<sz;i++)
     _structure[i]=tinyInfo[3+i];
-  if((int)tinyInfo.size()>sz+3)
+  if(ToIdType(tinyInfo.size())>sz+3)
     {
       _coords=DataArrayDouble::New();
-      std::vector<int> tinyInfo2(tinyInfo.begin()+3+sz,tinyInfo.end());
+      std::vector<mcIdType> tinyInfo2(tinyInfo.begin()+3+sz,tinyInfo.end());
       _coords->resizeForUnserialization(tinyInfo2);
       std::copy(a2->begin(),a2->end(),_coords->getPointer());
       std::vector<std::string> littleStrings2(littleStrings.begin()+3,littleStrings.end());
@@ -875,11 +876,11 @@ void MEDCouplingCurveLinearMesh::unserialization(const std::vector<double>& tiny
 void MEDCouplingCurveLinearMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const
 {
   std::ostringstream extent;
-  int meshDim=(int)_structure.size();
-  if(meshDim<=0 || meshDim>3)
+  std::size_t meshDim=_structure.size();
+  if(meshDim==0 || meshDim>3)
     throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::writeVTKLL : meshDim invalid ! must be in [1,2,3] !");
-  for(int i=0;i<3;i++)
-    { int val=i<meshDim?_structure[i]-1:0; extent << "0 " <<  val << " "; }
+  for(std::size_t i=0;i<3;i++)
+    { mcIdType val=i<meshDim?_structure[i]-1:0; extent << "0 " <<  val << " "; }
   ofs << "  <" << getVTKDataSetType() << " WholeExtent=\"" << extent.str() << "\">\n";
   ofs << "    <Piece Extent=\"" << extent.str() << "\">\n";
   ofs << "      <PointData>\n" << pointData << std::endl;
@@ -903,11 +904,12 @@ void MEDCouplingCurveLinearMesh::reprQuickOverview(std::ostream& stream) const
 {
   stream << "MEDCouplingCurveLinearMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
   stream << " Nodal structure : [";
-  for(std::size_t i=0;i<_structure.size();i++)
+  std::size_t s_size=_structure.size();
+  for(std::size_t i=0;i<s_size;i++)
     {
-      char tmp='X'+i;
+      char tmp=(char)((int)('X')+i);
       stream << " " << tmp << "=" << _structure[i];
-      if(i!=_structure.size()-1)
+      if(i!=s_size-1)
         stream << ", ";
     }
   stream << " ].";
@@ -916,13 +918,13 @@ void MEDCouplingCurveLinearMesh::reprQuickOverview(std::ostream& stream) const
     { stream << std::endl << "No coordinates set !"; return ; }
   if(!coo->isAllocated())
     { stream << std::endl << "Coordinates set but not allocated !"; return ; }
-  int nbOfCompo(coo->getNumberOfComponents());
-  int nbOfCompoExp(-1);
+  std::size_t nbOfCompo(coo->getNumberOfComponents());
+  std::size_t nbOfCompoExp(-1);
   try
     {
       nbOfCompoExp=getSpaceDimension();
     }
-  catch(INTERP_KERNEL::Exception& e)
+  catch(INTERP_KERNEL::Exception&)
     {
     }
   if(nbOfCompo!=nbOfCompoExp)
index 05d29452a4af5968a30cef8a2873dbe0e5267a7e..c99730e36acaa1f07586ff7deddf88f917e66392 100644 (file)
@@ -42,31 +42,31 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                 DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
+                                                 DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                            DataArrayInt *&cellCor) const;
+                                                            DataArrayIdType *&cellCor) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
-    MEDCOUPLING_EXPORT int getNumberOfNodes() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
     MEDCOUPLING_EXPORT int getSpaceDimension() const;
-    MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
+    MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
     MEDCOUPLING_EXPORT std::string simpleRepr() const;
     MEDCOUPLING_EXPORT std::string advancedRepr() const;
     MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
     MEDCOUPLING_EXPORT DataArrayDouble *getCoords();
     MEDCOUPLING_EXPORT const DataArrayDouble *getCoords() const;
     MEDCOUPLING_EXPORT void setCoords(const DataArrayDouble *coords);
-    MEDCOUPLING_EXPORT void setNodeGridStructure(const int *gridStructBg, const int *gridStructEnd);
-    MEDCOUPLING_EXPORT std::vector<int> getNodeGridStructure() const;
-    MEDCOUPLING_EXPORT MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const;
+    MEDCOUPLING_EXPORT void setNodeGridStructure(const mcIdType *gridStructBg, const mcIdType *gridStructEnd);
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeGridStructure() const;
+    MEDCOUPLING_EXPORT MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const;
     // tools
     MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
-    MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const;
-    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const;
+    MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
+    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
     MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
     MEDCOUPLING_EXPORT void translate(const double *vector);
     MEDCOUPLING_EXPORT void scale(const double *point, double factor);
@@ -74,14 +74,14 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
     //some useful methods
-    MEDCOUPLING_EXPORT void getNodeGridStructure(int *res) const;
+    MEDCOUPLING_EXPORT void getNodeGridStructure(mcIdType *res) const;
     //serialisation-unserialization
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                             const std::vector<std::string>& littleStrings);
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
@@ -100,7 +100,7 @@ namespace MEDCoupling
     std::string getVTKDataSetType() const;
   private:
     MCAuto<DataArrayDouble> _coords;
-    std::vector<int> _structure;
+    std::vector<mcIdType> _structure;
   };
 }
 
index 23d4204b42ca0cfdff06979c5daea73e13fe833a..d6dc441a7c291aa306709e958ffccf1a4822e29c 100644 (file)
@@ -446,11 +446,11 @@ MEDCouplingDefinitionTime::MEDCouplingDefinitionTime(const std::vector<const MED
   if(sz!=arrRefs.size())
     throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : internal error ! should never happen !");
   _slices.resize(sz);
-  for(std::size_t i=0;i<sz;i++)
+  for(int i=0;i<ToIdType(sz);i++)
     {
       if(arrRefs.empty())
         throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : A field is null in list impossible to build a time definition !");
-      _slices[i]=MEDCouplingDefinitionTimeSlice::New(fs[i],meshRefs[i],arrRefs[i],(int)i);
+      _slices[i]=MEDCouplingDefinitionTimeSlice::New(fs[i],meshRefs[i],arrRefs[i],i);
     }
   if(sz<=1)
     return ;
index a6eda85b2a6de7f11ae4a954e90f00ad3ec53b54..167b4284fb1d15d86e98b06e7e6e37618ee58d21 100644 (file)
@@ -335,7 +335,7 @@ void MEDCouplingField::setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellT
  *  \throw If type of any cell in \a begin differs from that of cell # \a begin[0].
  *  \throw If the range [_begin_,_end_) is empty.
  */
-void MEDCouplingField::setGaussLocalizationOnCells(const int *begin, const int *end, const std::vector<double>& refCoo,
+void MEDCouplingField::setGaussLocalizationOnCells(const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
                                                    const std::vector<double>& gsCoo, const std::vector<double>& wg)
 {
   if(!_mesh)
@@ -379,13 +379,13 @@ MEDCouplingGaussLocalization& MEDCouplingField::getGaussLocalization(int locId)
 /*!
  * Returns an id of the Gauss localization object corresponding to a given cell type.
  *  \param [in] type - the cell type of interest.
- *  \return int - the id of the Gauss localization object.
+ *  \return mcIdType - the id of the Gauss localization object.
  *  \throw If \a this field is not on Gauss points.
  *  \throw If the spatial discretization of \a this field is NULL.
  *  \throw If no Gauss localization object found for the given cell \a type.
  *  \throw If more than one Gauss localization object found for the given cell \a type.
  */
-int MEDCouplingField::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+mcIdType MEDCouplingField::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneType method !");
@@ -395,11 +395,11 @@ int MEDCouplingField::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedC
 /*!
  * Returns ids of Gauss localization objects corresponding to a given cell type.
  *  \param [in] type - the cell type of interest.
- *  \return std::set<int> - ids of the Gauss localization object.
+ *  \return std::set<mcIdType> - ids of the Gauss localization object.
  *  \throw If \a this field is not on Gauss points.
  *  \throw If the spatial discretization of \a this field is NULL
  */
-std::set<int> MEDCouplingField::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+std::set<mcIdType> MEDCouplingField::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdsOfOneType method !");
@@ -409,11 +409,11 @@ std::set<int> MEDCouplingField::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::
 /*!
  * Returns number of Gauss localization objects available. Implicitly all ids in
  * [0,getNbOfGaussLocalization()) are valid Gauss localization ids. 
- *  \return int - the number of available Gauss localization objects.
+ *  \return mcIdType - the number of available Gauss localization objects.
  *  \throw If \a this field is not on Gauss points.
  *  \throw If the spatial discretization of \a this field is NULL.
  */
-int MEDCouplingField::getNbOfGaussLocalization() const
+mcIdType MEDCouplingField::getNbOfGaussLocalization() const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNbOfGaussLocalization method !");
@@ -423,12 +423,12 @@ int MEDCouplingField::getNbOfGaussLocalization() const
 /*!
  * Returns an id of the Gauss localization object corresponding to a type of a given cell.
  *  \param [in] cellId - an id of the cell of interest.
- *  \return int - the id of the Gauss localization object.
+ *  \return mcIdType - the id of the Gauss localization object.
  *  \throw If \a this field is not on Gauss points.
  *  \throw If the spatial discretization of \a this field is NULL.
  *  \throw If no Gauss localization object found for the given cell.
  */
-int MEDCouplingField::getGaussLocalizationIdOfOneCell(int cellId) const
+mcIdType MEDCouplingField::getGaussLocalizationIdOfOneCell(mcIdType cellId) const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getGaussLocalizationIdOfOneCell method !");
@@ -445,7 +445,7 @@ int MEDCouplingField::getGaussLocalizationIdOfOneCell(int cellId) const
  *  \throw If \a locId is not within the valid range.
  *  \throw If the spatial discretization of \a this field is NULL.
  */
-void MEDCouplingField::getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const
+void MEDCouplingField::getCellIdsHavingGaussLocalization(int locId, std::vector<mcIdType>& cellIds) const
 {
   cellIds.clear();
   if(!((const MEDCouplingFieldDiscretization *)_type))
@@ -506,7 +506,7 @@ MEDCouplingField::MEDCouplingField(const MEDCouplingField& other, bool deepCopy)
  *  \param [in] start - an array of cell ids to include to the result mesh.
  *  \param [in] end - specifies the end of the array \a start, so that
  *              the last value of \a start is \a end[ -1 ].
- *  \param [out] di - a new instance of DataArrayInt holding the ids of entities (nodes,
+ *  \param [out] di - a new instance of DataArrayIdType holding the ids of entities (nodes,
  *         cells, Gauss points). The caller is to delete this array using decrRef() as it
  *         is no more needed.  
  *  \return MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to
@@ -515,7 +515,7 @@ MEDCouplingField::MEDCouplingField(const MEDCouplingField& other, bool deepCopy)
  *  \throw If the mesh is not set.
  * \sa buildSubMeshDataRange()
  */
-MEDCouplingMesh *MEDCouplingField::buildSubMeshData(const int *start, const int *end, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingField::buildSubMeshData(const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call buildSubMeshData method !");
@@ -532,7 +532,7 @@ MEDCouplingMesh *MEDCouplingField::buildSubMeshData(const int *start, const int
  * 
  * \sa MEDCouplingField::buildSubMeshData
  */
-MEDCouplingMesh *MEDCouplingField::buildSubMeshDataRange(int begin, int end, int step, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingField::buildSubMeshDataRange(mcIdType begin, mcIdType end, mcIdType step, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call buildSubMeshDataRange method !");
@@ -541,9 +541,9 @@ MEDCouplingMesh *MEDCouplingField::buildSubMeshDataRange(int begin, int end, int
 
 /*!
  * This method returns tuples ids implied by the mesh selection of the  cell ids contained in array defined as an interval [start;end).
- * \return a newly allocated DataArrayInt instance containing tuples ids.
+ * \return a newly allocated DataArrayIdType instance containing tuples ids.
  */
-DataArrayInt *MEDCouplingField::computeTupleIdsToSelectFromCellIds(const int *startCellIds, const int *endCellIds) const
+DataArrayIdType *MEDCouplingField::computeTupleIdsToSelectFromCellIds(const mcIdType *startCellIds, const mcIdType *endCellIds) const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call computeTupleIdsToSelectFromCellIds method !");
@@ -553,11 +553,11 @@ DataArrayInt *MEDCouplingField::computeTupleIdsToSelectFromCellIds(const int *st
 /*!
  * Returns number of tuples expected regarding the spatial discretization of \a this
  * field and number of entities in the underlying mesh. This method behaves exactly as MEDCouplingFieldDouble::getNumberOfTuples.
- *  \return int - the number of expected tuples.
+ *  \return mcIdType - the number of expected tuples.
  *  \throw If the spatial discretization of \a this field is NULL.
  *  \throw If the mesh is not set.
  */
-int MEDCouplingField::getNumberOfTuplesExpected() const
+mcIdType MEDCouplingField::getNumberOfTuplesExpected() const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNumberOfTuplesExpected method !");
@@ -580,11 +580,11 @@ void MEDCouplingField::setDiscretization(MEDCouplingFieldDiscretization *newDisc
 /*!
  * Returns number of mesh entities in the underlying mesh of \a this field regarding the
  * spatial discretization.
- *  \return int - the number of mesh entities porting the field values.
+ *  \return mcIdType - the number of mesh entities porting the field values.
  *  \throw If the spatial discretization of \a this field is NULL.
  *  \throw If the mesh is not set.
  */
-int MEDCouplingField::getNumberOfMeshPlacesExpected() const
+mcIdType MEDCouplingField::getNumberOfMeshPlacesExpected() const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("Spatial discretization not set ! Impossible to call getNumberOfMeshPlacesExpected method !");
@@ -623,7 +623,7 @@ void MEDCouplingField::copyTinyStringsFrom(const MEDCouplingField *other)
  * \throw If input code point to invalid zones in spatial discretization.
  * \throw If spatial discretization in \a this requires a mesh and those mesh is invalid (null,...)
  */
-int MEDCouplingField::getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+mcIdType MEDCouplingField::getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
   const MEDCouplingFieldDiscretization *t(_type);
   if(!t)
index 942d5c6cc34e397494698c8dfde26f8c5dbc6366..c472db057b2444fed48160ae029ecbebb6a345e4 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace MEDCoupling
 {
-  class DataArrayInt;
+  class DataArrayIdType;
   class DataArrayDouble;
   class MEDCouplingMesh;
   class MEDCouplingFieldDouble;
@@ -61,32 +61,32 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual void setNature(NatureOfField nat);
     MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscr() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildMeasureField(bool isAbs) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const int *start, const int *end, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(int begin, int end, int step, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeTupleIdsToSelectFromCellIds(const int *startCellIds, const int *endCellIds) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(mcIdType begin, mcIdType end, mcIdType step, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
     MEDCOUPLING_EXPORT const MEDCouplingFieldDiscretization *getDiscretization() const { return _type; }
     MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *getDiscretization() { return _type; }
     MEDCOUPLING_EXPORT void setDiscretization(MEDCouplingFieldDiscretization *newDisc);
-    MEDCOUPLING_EXPORT int getNumberOfTuplesExpected() const;
-    MEDCOUPLING_EXPORT int getNumberOfMeshPlacesExpected() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpected() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlacesExpected() const;
     // Gauss point specific methods
     MEDCOUPLING_EXPORT void setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
                                                        const std::vector<double>& gsCoo, const std::vector<double>& wg);
-    MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const int *begin, const int *end, const std::vector<double>& refCoo,
+    MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
                                                         const std::vector<double>& gsCoo, const std::vector<double>& wg);
     MEDCOUPLING_EXPORT void clearGaussLocalizations();
     MEDCOUPLING_EXPORT MEDCouplingGaussLocalization& getGaussLocalization(int locId);
-    MEDCOUPLING_EXPORT int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT std::set<int> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT int getNbOfGaussLocalization() const;
-    MEDCOUPLING_EXPORT int getGaussLocalizationIdOfOneCell(int cellId) const;
-    MEDCOUPLING_EXPORT void getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const;
+    MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT mcIdType getNbOfGaussLocalization() const;
+    MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
+    MEDCOUPLING_EXPORT void getCellIdsHavingGaussLocalization(int locId, std::vector<mcIdType>& cellIds) const;
     MEDCOUPLING_EXPORT const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const;
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     // for MED file RW
-    MEDCOUPLING_EXPORT int getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
     MEDCOUPLING_EXPORT virtual void reprQuickOverview(std::ostream& stream) const = 0;
   protected:
     MEDCOUPLING_EXPORT MEDCouplingField(TypeOfField type);
old mode 100644 (file)
new mode 100755 (executable)
index 419218f..d0b3bd4
@@ -50,7 +50,7 @@ const char MEDCouplingFieldDiscretizationP1::REPR[]="P1";
 
 const TypeOfField MEDCouplingFieldDiscretizationP1::TYPE=ON_NODES;
 
-const int MEDCouplingFieldDiscretizationPerCell::DFT_INVALID_LOCID_VALUE=-1;
+const mcIdType MEDCouplingFieldDiscretizationPerCell::DFT_INVALID_LOCID_VALUE=-1;
 
 const char MEDCouplingFieldDiscretizationGauss::REPR[]="GAUSS";
 
@@ -197,7 +197,7 @@ MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::deepCopy() const
 /*!
  * For all field discretization excepted GaussPts the [ \a startCellIds, \a endCellIds ) has no impact on the cloned instance.
  */
-MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::clonePart(const int *startCellIds, const int *endCellIds) const
+MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const
 {
   return clone();
 }
@@ -205,7 +205,7 @@ MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::clonePart(const
 /*!
  * For all field discretization excepted GaussPts the slice( \a beginCellId, \a endCellIds, \a stepCellId ) has no impact on the cloned instance.
  */
-MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::clonePartRange(int beginCellIds, int endCellIds, int stepCellIds) const
+MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretization::clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const
 {
   return clone();
 }
@@ -235,16 +235,16 @@ std::vector<const BigMemoryObject *> MEDCouplingFieldDiscretization::getDirectCh
 void MEDCouplingFieldDiscretization::normL1(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const
 {
   MCAuto<MEDCouplingFieldDouble> vol=getMeasureField(mesh,true);
-  int nbOfCompo=arr->getNumberOfComponents();
-  int nbOfElems=getNumberOfTuples(mesh);
+  std::size_t nbOfCompo=arr->getNumberOfComponents();
+  mcIdType nbOfElems=getNumberOfTuples(mesh);
   std::fill(res,res+nbOfCompo,0.);
   const double *arrPtr=arr->getConstPointer();
   const double *volPtr=vol->getArray()->getConstPointer();
   double deno=0.;
-  for(int i=0;i<nbOfElems;i++)
+  for(mcIdType i=0;i<nbOfElems;i++)
     {
       double v=fabs(volPtr[i]);
-      for(int j=0;j<nbOfCompo;j++)
+      for(std::size_t j=0;j<nbOfCompo;j++)
         res[j]+=fabs(arrPtr[i*nbOfCompo+j])*v;
       deno+=v;
     }
@@ -259,16 +259,16 @@ void MEDCouplingFieldDiscretization::normL1(const MEDCouplingMesh *mesh, const D
 void MEDCouplingFieldDiscretization::normL2(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const
 {
   MCAuto<MEDCouplingFieldDouble> vol=getMeasureField(mesh,true);
-  int nbOfCompo=arr->getNumberOfComponents();
-  int nbOfElems=getNumberOfTuples(mesh);
+  std::size_t nbOfCompo=arr->getNumberOfComponents();
+  mcIdType nbOfElems=getNumberOfTuples(mesh);
   std::fill(res,res+nbOfCompo,0.);
   const double *arrPtr=arr->getConstPointer();
   const double *volPtr=vol->getArray()->getConstPointer();
   double deno=0.;
-  for(int i=0;i<nbOfElems;i++)
+  for(mcIdType i=0;i<nbOfElems;i++)
     {
       double v=fabs(volPtr[i]);
-      for(int j=0;j<nbOfCompo;j++)
+      for(std::size_t j=0;j<nbOfCompo;j++)
         res[j]+=arrPtr[i*nbOfCompo+j]*arrPtr[i*nbOfCompo+j]*v;
       deno+=v;
     }
@@ -288,7 +288,8 @@ void MEDCouplingFieldDiscretization::integral(const MEDCouplingMesh *mesh, const
   if(!arr)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretization::integral : input array is NULL !");
   MCAuto<MEDCouplingFieldDouble> vol=getMeasureField(mesh,isWAbs);
-  std::size_t nbOfCompo(arr->getNumberOfComponents()),nbOfElems(getNumberOfTuples(mesh));
+  std::size_t nbOfCompo(arr->getNumberOfComponents());
+  mcIdType nbOfElems(getNumberOfTuples(mesh));
   if(nbOfElems!=arr->getNumberOfTuples())
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDiscretization::integral : field is not correct ! number of tuples in array is " << arr->getNumberOfTuples();
@@ -298,7 +299,7 @@ void MEDCouplingFieldDiscretization::integral(const MEDCouplingMesh *mesh, const
   std::fill(res,res+nbOfCompo,0.);
   const double *arrPtr(arr->begin()),*volPtr(vol->getArray()->begin());
   INTERP_KERNEL::AutoPtr<double> tmp=new double[nbOfCompo];
-  for(std::size_t i=0;i<nbOfElems;i++)
+  for(mcIdType i=0;i<nbOfElems;i++)
     {
       std::transform(arrPtr+i*nbOfCompo,arrPtr+(i+1)*nbOfCompo,(double *)tmp,std::bind2nd(std::multiplies<double>(),volPtr[i]));
       std::transform((double *)tmp,(double *)tmp+nbOfCompo,res,res,std::plus<double>());
@@ -315,13 +316,13 @@ void MEDCouplingFieldDiscretization::integral(const MEDCouplingMesh *mesh, const
  *
  * \sa MEDCouplingFieldDiscretization::buildSubMeshData
  */
-MEDCouplingMesh *MEDCouplingFieldDiscretization::buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretization::buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
 {
-  MCAuto<DataArrayInt> da=DataArrayInt::Range(beginCellIds,endCellIds,stepCellIds);
+  MCAuto<DataArrayIdType> da=DataArrayIdType::Range(beginCellIds,endCellIds,stepCellIds);
   return buildSubMeshData(mesh,da->begin(),da->end(),di);
 }
 
-void MEDCouplingFieldDiscretization::getSerializationIntArray(DataArrayInt *& arr) const
+void MEDCouplingFieldDiscretization::getSerializationIntArray(DataArrayIdType *& arr) const
 {
   arr=0;
 }
@@ -329,7 +330,7 @@ void MEDCouplingFieldDiscretization::getSerializationIntArray(DataArrayInt *& ar
 /*!
  * Empty : Not a bug
  */
-void MEDCouplingFieldDiscretization::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+void MEDCouplingFieldDiscretization::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
 {
 }
 
@@ -340,7 +341,7 @@ void MEDCouplingFieldDiscretization::getTinySerializationDbleInformation(std::ve
 {
 }
 
-void MEDCouplingFieldDiscretization::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *& arr)
+void MEDCouplingFieldDiscretization::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr)
 {
   arr=0;
 }
@@ -348,7 +349,7 @@ void MEDCouplingFieldDiscretization::resizeForUnserialization(const std::vector<
 /*!
  * Empty : Not a bug
  */
-void MEDCouplingFieldDiscretization::checkForUnserialization(const std::vector<int>& tinyInfo, const DataArrayInt *arr)
+void MEDCouplingFieldDiscretization::checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr)
 {
 }
 
@@ -363,11 +364,11 @@ void MEDCouplingFieldDiscretization::finishUnserialization(const std::vector<dou
  * This method is typically the first step of renumbering. The implementation is empty it is not a bug only gauss is impacted
  * virtually by this method.
  */
-void MEDCouplingFieldDiscretization::renumberCells(const int *old2NewBg, bool check)
+void MEDCouplingFieldDiscretization::renumberCells(const mcIdType *old2NewBg, bool check)
 {
 }
 
-double MEDCouplingFieldDiscretization::getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const
+double MEDCouplingFieldDiscretization::getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const
 {
   throw INTERP_KERNEL::Exception("getIJK Invalid ! only for GaussPoint and GaussNE discretizations !");
 }
@@ -378,7 +379,7 @@ void MEDCouplingFieldDiscretization::setGaussLocalizationOnType(const MEDCouplin
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-void MEDCouplingFieldDiscretization::setGaussLocalizationOnCells(const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector<double>& refCoo,
+void MEDCouplingFieldDiscretization::setGaussLocalizationOnCells(const MEDCouplingMesh *m, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
                                                                  const std::vector<double>& gsCoo, const std::vector<double>& wg)
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
@@ -389,57 +390,57 @@ void MEDCouplingFieldDiscretization::clearGaussLocalizations()
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-MEDCouplingGaussLocalization& MEDCouplingFieldDiscretization::getGaussLocalization(int locId)
+MEDCouplingGaussLocalization& MEDCouplingFieldDiscretization::getGaussLocalization(mcIdType locId)
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-const MEDCouplingGaussLocalization& MEDCouplingFieldDiscretization::getGaussLocalization(int locId) const
+const MEDCouplingGaussLocalization& MEDCouplingFieldDiscretization::getGaussLocalization(mcIdType locId) const
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-int MEDCouplingFieldDiscretization::getNbOfGaussLocalization() const
+mcIdType MEDCouplingFieldDiscretization::getNbOfGaussLocalization() const
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-int MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneCell(int cellId) const
+mcIdType MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneCell(mcIdType cellId) const
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-int MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+mcIdType MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-std::set<int> MEDCouplingFieldDiscretization::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+std::set<mcIdType> MEDCouplingFieldDiscretization::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-void MEDCouplingFieldDiscretization::getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const
+void MEDCouplingFieldDiscretization::getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const
 {
   throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !");
 }
 
-void MEDCouplingFieldDiscretization::RenumberEntitiesFromO2NArr(double eps, const int *old2NewPtr, int newNbOfEntity, DataArrayDouble *arr, const std::string& msg)
+void MEDCouplingFieldDiscretization::RenumberEntitiesFromO2NArr(double eps, const mcIdType *old2NewPtr, mcIdType newNbOfEntity, DataArrayDouble *arr, const std::string& msg)
 {
   if(!arr)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretization::RenumberEntitiesFromO2NArr : input array is NULL !");
-  int oldNbOfElems=arr->getNumberOfTuples();
-  int nbOfComp=arr->getNumberOfComponents();
-  int newNbOfTuples=newNbOfEntity;
+  mcIdType oldNbOfElems=arr->getNumberOfTuples();
+  std::size_t nbOfComp=arr->getNumberOfComponents();
+  mcIdType newNbOfTuples=newNbOfEntity;
   MCAuto<DataArrayDouble> arrCpy=arr->deepCopy();
   const double *ptSrc=arrCpy->getConstPointer();
   arr->reAlloc(newNbOfTuples);
   double *ptToFill=arr->getPointer();
   std::fill(ptToFill,ptToFill+nbOfComp*newNbOfTuples,std::numeric_limits<double>::max());
   INTERP_KERNEL::AutoPtr<double> tmp=new double[nbOfComp];
-  for(int i=0;i<oldNbOfElems;i++)
+  for(mcIdType i=0;i<oldNbOfElems;i++)
     {
-      int newNb=old2NewPtr[i];
+      mcIdType newNb=old2NewPtr[i];
       if(newNb>=0)//if newNb<0 the node is considered as out.
         {
           if(std::find_if(ptToFill+newNb*nbOfComp,ptToFill+(newNb+1)*nbOfComp,std::bind2nd(std::not_equal_to<double>(),std::numeric_limits<double>::max()))
@@ -462,16 +463,16 @@ void MEDCouplingFieldDiscretization::RenumberEntitiesFromO2NArr(double eps, cons
     }
 }
 
-void MEDCouplingFieldDiscretization::RenumberEntitiesFromN2OArr(const int *new2OldPtr, int new2OldSz, DataArrayDouble *arr, const std::string& msg)
+void MEDCouplingFieldDiscretization::RenumberEntitiesFromN2OArr(const mcIdType *new2OldPtr, mcIdType new2OldSz, DataArrayDouble *arr, const std::string& msg)
 {
-  int nbOfComp=arr->getNumberOfComponents();
+  std::size_t nbOfComp=arr->getNumberOfComponents();
   MCAuto<DataArrayDouble> arrCpy=arr->deepCopy();
   const double *ptSrc=arrCpy->getConstPointer();
   arr->reAlloc(new2OldSz);
   double *ptToFill=arr->getPointer();
-  for(int i=0;i<new2OldSz;i++)
+  for(mcIdType i=0;i<new2OldSz;i++)
     {
-      int oldNb=new2OldPtr[i];
+      mcIdType oldNb=new2OldPtr[i];
       std::copy(ptSrc+oldNb*nbOfComp,ptSrc+(oldNb+1)*nbOfComp,ptToFill+i*nbOfComp);
     }
 }
@@ -533,7 +534,7 @@ bool MEDCouplingFieldDiscretizationP0::isEqualIfNotWhy(const MEDCouplingFieldDis
   return ret;
 }
 
-int MEDCouplingFieldDiscretizationP0::getNumberOfTuples(const MEDCouplingMesh *mesh) const
+mcIdType MEDCouplingFieldDiscretizationP0::getNumberOfTuples(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::getNumberOfTuples : NULL input mesh !");
@@ -546,19 +547,19 @@ int MEDCouplingFieldDiscretizationP0::getNumberOfTuples(const MEDCouplingMesh *m
  * If an incoherency is detected, an exception will be thrown. If the input code is coherent, the number of tuples expected is returned.
  * The number of tuples expected is equal to those to have a valid field lying on \a this and having a mesh fitting perfectly the input code (geometric type distribution).
  */
-int MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+mcIdType MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
   if(code.size()%3!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode : invalid input code !");
-  int nbOfSplit=(int)idsPerType.size();
-  int nbOfTypes=(int)code.size()/3;
-  int ret=0;
-  for(int i=0;i<nbOfTypes;i++)
+  mcIdType nbOfSplit=ToIdType(idsPerType.size());
+  mcIdType nbOfTypes=ToIdType(code.size()/3);
+  mcIdType ret=0;
+  for(mcIdType i=0;i<nbOfTypes;i++)
     {
-      int nbOfEltInChunk=code[3*i+1];
+      mcIdType nbOfEltInChunk=code[3*i+1];
       if(nbOfEltInChunk<0)
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode : invalid input code ! presence of negative value in a type !");
-      int pos=code[3*i+2];
+      mcIdType pos=code[3*i+2];
       if(pos!=-1)
         {
           if(pos<0 || pos>=nbOfSplit)
@@ -566,8 +567,8 @@ int MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode(con
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode : input code points to pos " << pos << " in typeid " << i << " ! Should be in [0," << nbOfSplit << ") !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
-          const DataArrayInt *ids(idsPerType[pos]);
-          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || (int)ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
+          const DataArrayIdType *ids(idsPerType[pos]);
+          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
             {
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode : input pfl chunck at pos " << pos << " should have " << i << " tuples and one component and with ids all >=0 !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -578,39 +579,39 @@ int MEDCouplingFieldDiscretizationP0::getNumberOfTuplesExpectedRegardingCode(con
   return ret;
 }
 
-int MEDCouplingFieldDiscretizationP0::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
+mcIdType MEDCouplingFieldDiscretizationP0::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::getNumberOfMeshPlaces : NULL input mesh !");
   return mesh->getNumberOfCells();
 }
 
-DataArrayInt *MEDCouplingFieldDiscretizationP0::getOffsetArr(const MEDCouplingMesh *mesh) const
+DataArrayIdType *MEDCouplingFieldDiscretizationP0::getOffsetArr(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::getOffsetArr : NULL input mesh !");
-  int nbOfTuples=mesh->getNumberOfCells();
-  DataArrayInt *ret=DataArrayInt::New();
+  std::size_t nbOfTuples=mesh->getNumberOfCells();
+  DataArrayIdType *ret=DataArrayIdType::New();
   ret->alloc(nbOfTuples+1,1);
   ret->iota(0);
   return ret;
 }
 
 void MEDCouplingFieldDiscretizationP0::renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                             const int *old2NewBg, bool check)
+                                                             const mcIdType *old2NewBg, bool check)
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::renumberArraysForCell : NULL input mesh !");
-  const int *array=old2NewBg;
+  const mcIdType *array=old2NewBg;
   if(check)
-    array=DataArrayInt::CheckAndPreparePermutation(old2NewBg,old2NewBg+mesh->getNumberOfCells());
+    array=DataArrayIdType::CheckAndPreparePermutation(old2NewBg,old2NewBg+mesh->getNumberOfCells());
   for(std::vector<DataArray *>::const_iterator it=arrays.begin();it!=arrays.end();it++)
     {
       if(*it)
         (*it)->renumberInPlace(array);
     }
   if(check)
-    free(const_cast<int *>(array));
+    free(const_cast<mcIdType *>(array));
 }
 
 DataArrayDouble *MEDCouplingFieldDiscretizationP0::getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const
@@ -620,15 +621,15 @@ DataArrayDouble *MEDCouplingFieldDiscretizationP0::getLocalizationOfDiscValues(c
   return mesh->computeCellCenterOfMass();
 }
 
-void MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                                          DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const
+void MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                                          DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::computeMeshRestrictionFromTupleIds : NULL input mesh !");
-  MCAuto<DataArrayInt> tmp=DataArrayInt::New();
-  tmp->alloc((int)std::distance(tupleIdsBg,tupleIdsEnd),1);
+  MCAuto<DataArrayIdType> tmp=DataArrayIdType::New();
+  tmp->alloc(std::distance(tupleIdsBg,tupleIdsEnd),1);
   std::copy(tupleIdsBg,tupleIdsEnd,tmp->getPointer());
-  MCAuto<DataArrayInt> tmp2(tmp->deepCopy());
+  MCAuto<DataArrayIdType> tmp2(tmp->deepCopy());
   cellRestriction=tmp.retn();
   trueTupleRestriction=tmp2.retn();
 }
@@ -666,34 +667,34 @@ void MEDCouplingFieldDiscretizationP0::getValueOn(const DataArrayDouble *arr, co
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::getValueOn : NULL input mesh !");
-  int id=mesh->getCellContainingPoint(loc,_precision);
+  mcIdType id=mesh->getCellContainingPoint(loc,_precision);
   if(id==-1)
     throw INTERP_KERNEL::Exception("Specified point is detected outside of mesh : unable to apply P0::getValueOn !");
   arr->getTuple(id,res);
 }
 
-void MEDCouplingFieldDiscretizationP0::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
+void MEDCouplingFieldDiscretizationP0::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const
 {
   const MEDCouplingCMesh *meshC=dynamic_cast<const MEDCouplingCMesh *>(mesh);
   if(!meshC)
     throw INTERP_KERNEL::Exception("P0::getValueOnPos is only accessible for structured meshes !");
-  int id=meshC->getCellIdFromPos(i,j,k);
+  mcIdType id=meshC->getCellIdFromPos(i,j,k);
   arr->getTuple(id,res);
 }
 
-DataArrayDouble *MEDCouplingFieldDiscretizationP0::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const
+DataArrayDouble *MEDCouplingFieldDiscretizationP0::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::getValueOnMulti : NULL input mesh !");
-  MCAuto<DataArrayInt> eltsArr,eltsIndexArr;
+  MCAuto<DataArrayIdType> eltsArr,eltsIndexArr;
   mesh->getCellsContainingPoints(loc,nbOfPoints,_precision,eltsArr,eltsIndexArr);
-  const int *elts(eltsArr->begin()),*eltsIndex(eltsIndexArr->begin());
+  const mcIdType *elts(eltsArr->begin()),*eltsIndex(eltsIndexArr->begin());
   int spaceDim=mesh->getSpaceDimension();
-  int nbOfComponents=arr->getNumberOfComponents();
+  std::size_t nbOfComponents=arr->getNumberOfComponents();
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   ret->alloc(nbOfPoints,nbOfComponents);
   double *ptToFill=ret->getPointer();
-  for(int i=0;i<nbOfPoints;i++,ptToFill+=nbOfComponents)
+  for(mcIdType i=0;i<nbOfPoints;i++,ptToFill+=nbOfComponents)
     if(eltsIndex[i+1]-eltsIndex[i]>=1)
       arr->getTuple(elts[eltsIndex[i]],ptToFill);
     else
@@ -709,16 +710,16 @@ DataArrayDouble *MEDCouplingFieldDiscretizationP0::getValueOnMulti(const DataArr
 /*!
  * Nothing to do. It's not a bug.
  */
-void MEDCouplingFieldDiscretizationP0::renumberValuesOnNodes(double , const int *, int newNbOfNodes, DataArrayDouble *) const
+void MEDCouplingFieldDiscretizationP0::renumberValuesOnNodes(double , const mcIdType *, mcIdType newNbOfNodes, DataArrayDouble *) const
 {
 }
 
-void MEDCouplingFieldDiscretizationP0::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationP0::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const
 {
   RenumberEntitiesFromO2NArr(epsOnVals,old2New,newSz,arr,"Cell");
 }
 
-void MEDCouplingFieldDiscretizationP0::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationP0::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const
 {
   RenumberEntitiesFromN2OArr(new2old,newSz,arr,"Cell");
 }
@@ -731,10 +732,10 @@ void MEDCouplingFieldDiscretizationP0::renumberValuesOnCellsR(const MEDCouplingM
  * \return a newly allocated array containing ids to select into the DataArrayDouble of the field.
  * 
  */
-DataArrayInt *MEDCouplingFieldDiscretizationP0::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const
+DataArrayIdType *MEDCouplingFieldDiscretizationP0::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const
 {
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc((int)std::distance(startCellIds,endCellIds),1);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  ret->alloc(std::distance(startCellIds,endCellIds),1);
   std::copy(startCellIds,endCellIds,ret->getPointer());
   return ret.retn();
 }
@@ -746,13 +747,13 @@ DataArrayInt *MEDCouplingFieldDiscretizationP0::computeTupleIdsToSelectFromCellI
  *
  * \sa MEDCouplingFieldDiscretizationP0::buildSubMeshDataRange
  */
-MEDCouplingMesh *MEDCouplingFieldDiscretizationP0::buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationP0::buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::buildSubMeshData : NULL input mesh !");
   MCAuto<MEDCouplingMesh> ret=mesh->buildPart(start,end);
-  MCAuto<DataArrayInt> diSafe=DataArrayInt::New();
-  diSafe->alloc((int)std::distance(start,end),1);
+  MCAuto<DataArrayIdType> diSafe=DataArrayIdType::New();
+  diSafe->alloc(std::distance(start,end),1);
   std::copy(start,end,diSafe->getPointer());
   di=diSafe.retn();
   return ret.retn();
@@ -768,7 +769,7 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationP0::buildSubMeshData(const MEDCou
  *
  * \sa MEDCouplingFieldDiscretizationP0::buildSubMeshData
  */
-MEDCouplingMesh *MEDCouplingFieldDiscretizationP0::buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationP0::buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP0::buildSubMeshDataRange : NULL input mesh !");
@@ -782,7 +783,7 @@ MCAuto<MEDCouplingFieldDiscretization> MEDCouplingFieldDiscretizationP0::aggrega
   return EasyAggregate<MEDCouplingFieldDiscretizationP0>(fds);
 }
 
-int MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuples(const MEDCouplingMesh *mesh) const
+mcIdType MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuples(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationNodes::getNumberOfTuples : NULL input mesh !");
@@ -795,19 +796,19 @@ int MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuples(const MEDCouplingMe
  * If an incoherency is detected, an exception will be thrown. If the input code is coherent, the number of tuples expected is returned.
  * The number of tuples expected is equal to those to have a valid field lying on \a this and having a mesh fitting perfectly the input code (geometric type distribution).
  */
-int MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+mcIdType MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
   if(code.size()%3!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCode : invalid input code !");
-  int nbOfSplit=(int)idsPerType.size();
-  int nbOfTypes=(int)code.size()/3;
-  int ret=0;
-  for(int i=0;i<nbOfTypes;i++)
+  mcIdType nbOfSplit=ToIdType(idsPerType.size());
+  mcIdType nbOfTypes=ToIdType(code.size()/3);
+  mcIdType ret=0;
+  for(mcIdType i=0;i<nbOfTypes;i++)
     {
-      int nbOfEltInChunk=code[3*i+1];
+      mcIdType nbOfEltInChunk=code[3*i+1];
       if(nbOfEltInChunk<0)
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCode : invalid input code ! presence of negative value in a type !");
-      int pos=code[3*i+2];
+      mcIdType pos=code[3*i+2];
       if(pos!=-1)
         {
           if(pos<0 || pos>=nbOfSplit)
@@ -815,8 +816,8 @@ int MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCod
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCode : input code points to pos " << pos << " in typeid " << i << " ! Should be in [0," << nbOfSplit << ") !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
-          const DataArrayInt *ids(idsPerType[pos]);
-          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || (int)ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
+          const DataArrayIdType *ids(idsPerType[pos]);
+          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
             {
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCode : input pfl chunck at pos " << pos << " should have " << i << " tuples and one component and with ids all >=0 !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -827,7 +828,7 @@ int MEDCouplingFieldDiscretizationOnNodes::getNumberOfTuplesExpectedRegardingCod
   return ret;
 }
 
-int MEDCouplingFieldDiscretizationOnNodes::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
+mcIdType MEDCouplingFieldDiscretizationOnNodes::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationNodes::getNumberOfMeshPlaces : NULL input mesh !");
@@ -838,16 +839,16 @@ int MEDCouplingFieldDiscretizationOnNodes::getNumberOfMeshPlaces(const MEDCoupli
  * Nothing to do here.
  */
 void MEDCouplingFieldDiscretizationOnNodes::renumberArraysForCell(const MEDCouplingMesh *, const std::vector<DataArray *>& arrays,
-                                                                  const int *old2NewBg, bool check)
+                                                                  const mcIdType *old2NewBg, bool check)
 {
 }
 
-DataArrayInt *MEDCouplingFieldDiscretizationOnNodes::getOffsetArr(const MEDCouplingMesh *mesh) const
+DataArrayIdType *MEDCouplingFieldDiscretizationOnNodes::getOffsetArr(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationNodes::getOffsetArr : NULL input mesh !");
-  int nbOfTuples=mesh->getNumberOfNodes();
-  DataArrayInt *ret=DataArrayInt::New();
+  mcIdType nbOfTuples=mesh->getNumberOfNodes();
+  DataArrayIdType *ret=DataArrayIdType::New();
   ret->alloc(nbOfTuples+1,1);
   ret->iota(0);
   return ret;
@@ -860,17 +861,17 @@ DataArrayDouble *MEDCouplingFieldDiscretizationOnNodes::getLocalizationOfDiscVal
   return mesh->getCoordinatesAndOwner();
 }
 
-void MEDCouplingFieldDiscretizationOnNodes::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                                               DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const
+void MEDCouplingFieldDiscretizationOnNodes::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                                               DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationOnNodes::computeMeshRestrictionFromTupleIds : NULL input mesh !");
-  MCAuto<DataArrayInt> ret1=mesh->getCellIdsFullyIncludedInNodeIds(tupleIdsBg,tupleIdsEnd);
+  MCAuto<DataArrayIdType> ret1=mesh->getCellIdsFullyIncludedInNodeIds(tupleIdsBg,tupleIdsEnd);
   const MEDCouplingUMesh *meshc=dynamic_cast<const MEDCouplingUMesh *>(mesh);
   if(!meshc)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationOnNodes::computeMeshRestrictionFromTupleIds : trying to subpart field on nodes by node ids ! Your mesh has to be unstructured !");
   MCAuto<MEDCouplingUMesh> meshPart=static_cast<MEDCouplingUMesh *>(meshc->buildPartOfMySelf(ret1->begin(),ret1->end(),true));
-  MCAuto<DataArrayInt> ret2=meshPart->computeFetchedNodeIds();
+  MCAuto<DataArrayIdType> ret2=meshPart->computeFetchedNodeIds();
   cellRestriction=ret1.retn();
   trueTupleRestriction=ret2.retn();
 }
@@ -879,7 +880,7 @@ void MEDCouplingFieldDiscretizationOnNodes::checkCoherencyBetween(const MEDCoupl
 {
   if(!mesh || !da)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationNodes::checkCoherencyBetween : NULL input mesh or DataArray !");
-  if(mesh->getNumberOfNodes()!=(int)da->getNumberOfTuples())
+  if(mesh->getNumberOfNodes()!=da->getNumberOfTuples())
     {
       std::ostringstream message;
       message << "Field on nodes invalid because there are " << mesh->getNumberOfNodes();
@@ -893,14 +894,14 @@ void MEDCouplingFieldDiscretizationOnNodes::checkCoherencyBetween(const MEDCoupl
  * @param di is an array returned that specifies entity ids (here nodes ids) in mesh 'mesh' of entity in returned submesh.
  * Example : The first node id of returned mesh has the (*di)[0] id in 'mesh'
  */
-MEDCouplingMesh *MEDCouplingFieldDiscretizationOnNodes::buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationOnNodes::buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationNodes::buildSubMeshData : NULL input mesh !");
-  DataArrayInt *diTmp=0;
+  DataArrayIdType *diTmp=0;
   MCAuto<MEDCouplingMesh> ret=mesh->buildPartAndReduceNodes(start,end,diTmp);
-  MCAuto<DataArrayInt> diTmpSafe(diTmp);
-  MCAuto<DataArrayInt> di2=diTmpSafe->invertArrayO2N2N2O(ret->getNumberOfNodes());
+  MCAuto<DataArrayIdType> diTmpSafe(diTmp);
+  MCAuto<DataArrayIdType> di2=diTmpSafe->invertArrayO2N2N2O(ret->getNumberOfNodes());
   di=di2.retn();
   return ret.retn();
 }
@@ -915,16 +916,16 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationOnNodes::buildSubMeshData(const M
  *
  * \sa MEDCouplingFieldDiscretizationNodes::buildSubMeshData
  */
-MEDCouplingMesh *MEDCouplingFieldDiscretizationOnNodes::buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationOnNodes::buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationOnNodes::buildSubMeshDataRange : NULL input mesh !");
-  DataArrayInt *diTmp=0;
+  DataArrayIdType *diTmp=0;
   MCAuto<MEDCouplingMesh> ret=mesh->buildPartRangeAndReduceNodes(beginCellIds,endCellIds,stepCellIds,beginOut,endOut,stepOut,diTmp);
   if(diTmp)
     {
-      MCAuto<DataArrayInt> diTmpSafe(diTmp);
-      MCAuto<DataArrayInt> di2=diTmpSafe->invertArrayO2N2N2O(ret->getNumberOfNodes());
+      MCAuto<DataArrayIdType> diTmpSafe(diTmp);
+      MCAuto<DataArrayIdType> di2=diTmpSafe->invertArrayO2N2N2O(ret->getNumberOfNodes());
       di=di2.retn();
     }
   return ret.retn();
@@ -938,7 +939,7 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationOnNodes::buildSubMeshDataRange(co
  * \return a newly allocated array containing ids to select into the DataArrayDouble of the field.
  * 
  */
-DataArrayInt *MEDCouplingFieldDiscretizationOnNodes::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const
+DataArrayIdType *MEDCouplingFieldDiscretizationOnNodes::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP1::computeTupleIdsToSelectFromCellIds : NULL input mesh !");
@@ -947,7 +948,7 @@ DataArrayInt *MEDCouplingFieldDiscretizationOnNodes::computeTupleIdsToSelectFrom
   return umesh2->computeFetchedNodeIds();
 }
 
-void MEDCouplingFieldDiscretizationOnNodes::renumberValuesOnNodes(double epsOnVals, const int *old2NewPtr, int newNbOfNodes, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationOnNodes::renumberValuesOnNodes(double epsOnVals, const mcIdType *old2NewPtr, mcIdType newNbOfNodes, DataArrayDouble *arr) const
 {
   RenumberEntitiesFromO2NArr(epsOnVals,old2NewPtr,newNbOfNodes,arr,"Node");
 }
@@ -955,23 +956,23 @@ void MEDCouplingFieldDiscretizationOnNodes::renumberValuesOnNodes(double epsOnVa
 /*!
  * Nothing to do it's not a bug.
  */
-void MEDCouplingFieldDiscretizationOnNodes::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationOnNodes::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const
 {
 }
 
 /*!
  * Nothing to do it's not a bug.
  */
-void MEDCouplingFieldDiscretizationOnNodes::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationOnNodes::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const
 {
 }
 
-void MEDCouplingFieldDiscretizationOnNodes::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
+void MEDCouplingFieldDiscretizationOnNodes::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const
 {
   const MEDCouplingCMesh *meshC=dynamic_cast<const MEDCouplingCMesh *>(mesh);
   if(!meshC)
     throw INTERP_KERNEL::Exception("OnNodes::getValueOnPos(i,j,k) is only accessible for structured meshes !");
-  int id=meshC->getNodeIdFromPos(i,j,k);
+  mcIdType id=meshC->getNodeIdFromPos(i,j,k);
   arr->getTuple(id,res);
 }
 
@@ -1031,7 +1032,7 @@ void MEDCouplingFieldDiscretizationP1::getValueOn(const DataArrayDouble *arr, co
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP1::getValueOn : NULL input mesh !");
-  int id=mesh->getCellContainingPoint(loc,_precision);
+  mcIdType id=mesh->getCellContainingPoint(loc,_precision);
   if(id==-1)
     throw INTERP_KERNEL::Exception("Specified point is detected outside of mesh : unable to apply P1::getValueOn !");
   INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(id);
@@ -1044,14 +1045,14 @@ void MEDCouplingFieldDiscretizationP1::getValueOn(const DataArrayDouble *arr, co
  * This method localizes a point defined by 'loc' in a cell with id 'cellId' into mesh 'mesh'.
  * The result is put into res expected to be of size at least arr->getNumberOfComponents()
  */
-void MEDCouplingFieldDiscretizationP1::getValueInCell(const MEDCouplingMesh *mesh, int cellId, const DataArrayDouble *arr, const double *loc, double *res) const
+void MEDCouplingFieldDiscretizationP1::getValueInCell(const MEDCouplingMesh *mesh, mcIdType cellId, const DataArrayDouble *arr, const double *loc, double *res) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP1::getValueInCell : NULL input mesh !");
-  std::vector<int> conn;
+  std::vector<mcIdType> conn;
   std::vector<double> coo;
   mesh->getNodeIdsOfCell(cellId,conn);
-  for(std::vector<int>::const_iterator iter=conn.begin();iter!=conn.end();iter++)
+  for(std::vector<mcIdType>::const_iterator iter=conn.begin();iter!=conn.end();iter++)
     mesh->getCoordinatesOfNode(*iter,coo);
   int spaceDim=mesh->getSpaceDimension();
   std::size_t nbOfNodes=conn.size();
@@ -1061,7 +1062,7 @@ void MEDCouplingFieldDiscretizationP1::getValueInCell(const MEDCouplingMesh *mes
   INTERP_KERNEL::AutoPtr<double> tmp=new double[nbOfNodes];
   INTERP_KERNEL::NormalizedCellType ct(mesh->getTypeOfCell(cellId));
   INTERP_KERNEL::barycentric_coords(ct,vec,loc,tmp);
-  int sz=arr->getNumberOfComponents();
+  std::size_t sz=arr->getNumberOfComponents();
   INTERP_KERNEL::AutoPtr<double> tmp2=new double[sz];
   std::fill(res,res+sz,0.);
   for(std::size_t i=0;i<nbOfNodes;i++)
@@ -1072,19 +1073,19 @@ void MEDCouplingFieldDiscretizationP1::getValueInCell(const MEDCouplingMesh *mes
     }
 }
 
-DataArrayDouble *MEDCouplingFieldDiscretizationP1::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const
+DataArrayDouble *MEDCouplingFieldDiscretizationP1::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationP1::getValueOnMulti : NULL input mesh !");
-  MCAuto<DataArrayInt> eltsArr,eltsIndexArr;
+  MCAuto<DataArrayIdType> eltsArr,eltsIndexArr;
   mesh->getCellsContainingPoints(loc,nbOfPoints,_precision,eltsArr,eltsIndexArr);
-  const int *elts(eltsArr->begin()),*eltsIndex(eltsIndexArr->begin());
+  const mcIdType *elts(eltsArr->begin()),*eltsIndex(eltsIndexArr->begin());
   int spaceDim=mesh->getSpaceDimension();
-  int nbOfComponents=arr->getNumberOfComponents();
+  std::size_t nbOfComponents=arr->getNumberOfComponents();
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   ret->alloc(nbOfPoints,nbOfComponents);
   double *ptToFill=ret->getPointer();
-  for(int i=0;i<nbOfPoints;i++)
+  for(mcIdType i=0;i<nbOfPoints;i++)
     if(eltsIndex[i+1]-eltsIndex[i]>=1)
       getValueInCell(mesh,elts[eltsIndex[i]],arr,loc+i*spaceDim,ptToFill+i*nbOfComponents);
     else
@@ -1118,11 +1119,11 @@ MEDCouplingFieldDiscretizationPerCell::~MEDCouplingFieldDiscretizationPerCell()
 }
 
 /*!
- * This constructor deep copies MEDCoupling::DataArrayInt instance from other (if any).
+ * This constructor deep copies MEDCoupling::DataArrayIdType instance from other (if any).
  */
-MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, const int *startCellIds, const int *endCellIds):_discr_per_cell(0)
+MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, const mcIdType *startCellIds, const mcIdType *endCellIds):_discr_per_cell(0)
 {
-  DataArrayInt *arr=other._discr_per_cell;
+  DataArrayIdType *arr=other._discr_per_cell;
   if(arr)
     {
       if(startCellIds==0 && endCellIds==0)
@@ -1132,16 +1133,16 @@ MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(con
     }
 }
 
-MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, int beginCellIds, int endCellIds, int stepCellIds):_discr_per_cell(0)
+MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds):_discr_per_cell(0)
 {
-  DataArrayInt *arr=other._discr_per_cell;
+  DataArrayIdType *arr=other._discr_per_cell;
   if(arr)
     {
       _discr_per_cell=arr->selectByTupleIdSafeSlice(beginCellIds,endCellIds,stepCellIds);
     }
 }
 
-MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(DataArrayInt *dpc):_discr_per_cell(dpc)
+MEDCouplingFieldDiscretizationPerCell::MEDCouplingFieldDiscretizationPerCell(DataArrayIdType *dpc):_discr_per_cell(dpc)
 {
   if(_discr_per_cell)
     _discr_per_cell->incrRef();
@@ -1172,7 +1173,7 @@ void MEDCouplingFieldDiscretizationPerCell::checkCoherencyBetween(const MEDCoupl
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationPerCell has no discretization per cell !");
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationPerCell::checkCoherencyBetween : NULL input mesh or DataArray !");
-  std::size_t nbOfTuples(_discr_per_cell->getNumberOfTuples());
+  mcIdType nbOfTuples(_discr_per_cell->getNumberOfTuples());
   if(nbOfTuples!=mesh->getNumberOfCells())
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationPerCell has a discretization per cell but it's not matching the underlying mesh !");
 }
@@ -1196,7 +1197,7 @@ bool MEDCouplingFieldDiscretizationPerCell::isEqualIfNotWhy(const MEDCouplingFie
     return false;
   bool ret=_discr_per_cell->isEqualIfNotWhy(*otherC->_discr_per_cell,reason);
   if(!ret)
-    reason.insert(0,"Field discretization per cell DataArrayInt given the discid per cell :");
+    reason.insert(0,"Field discretization per cell DataArrayIdType given the discid per cell :");
   return ret;
 }
 
@@ -1216,19 +1217,19 @@ bool MEDCouplingFieldDiscretizationPerCell::isEqualWithoutConsideringStr(const M
  * This method is typically the first step of renumbering. The impact on _discr_per_cell is necessary here.
  * virtually by this method.
  */
-void MEDCouplingFieldDiscretizationPerCell::renumberCells(const int *old2NewBg, bool check)
+void MEDCouplingFieldDiscretizationPerCell::renumberCells(const mcIdType *old2NewBg, bool check)
 {
-  int nbCells=_discr_per_cell->getNumberOfTuples();
-  const int *array=old2NewBg;
+  mcIdType nbCells=_discr_per_cell->getNumberOfTuples();
+  const mcIdType *array=old2NewBg;
   if(check)
-    array=DataArrayInt::CheckAndPreparePermutation(old2NewBg,old2NewBg+nbCells);
+    array=DataArrayIdType::CheckAndPreparePermutation(old2NewBg,old2NewBg+nbCells);
   //
-  DataArrayInt *dpc=_discr_per_cell->renumber(array);
+  DataArrayIdType *dpc=_discr_per_cell->renumber(array);
   _discr_per_cell->decrRef();
   _discr_per_cell=dpc;
   //
   if(check)
-    free(const_cast<int *>(array));
+    free(const_cast<mcIdType *>(array));
 }
 
 void MEDCouplingFieldDiscretizationPerCell::buildDiscrPerCellIfNecessary(const MEDCouplingMesh *mesh)
@@ -1237,10 +1238,10 @@ void MEDCouplingFieldDiscretizationPerCell::buildDiscrPerCellIfNecessary(const M
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationPerCell::buildDiscrPerCellIfNecessary : NULL input mesh !");
   if(!_discr_per_cell)
     {
-      _discr_per_cell=DataArrayInt::New();
-      int nbTuples=mesh->getNumberOfCells();
+      _discr_per_cell=DataArrayIdType::New();
+      mcIdType nbTuples=mesh->getNumberOfCells();
       _discr_per_cell->alloc(nbTuples,1);
-      int *ptr=_discr_per_cell->getPointer();
+      mcIdType *ptr=_discr_per_cell->getPointer();
       std::fill(ptr,ptr+nbTuples,DFT_INVALID_LOCID_VALUE);
     }
 }
@@ -1249,7 +1250,7 @@ void MEDCouplingFieldDiscretizationPerCell::checkNoOrphanCells() const
 {
   if(!_discr_per_cell)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationPerCell::checkNoOrphanCells : no discretization defined !");
-  MCAuto<DataArrayInt> test=_discr_per_cell->findIdsEqual(DFT_INVALID_LOCID_VALUE);
+  MCAuto<DataArrayIdType> test( _discr_per_cell->findIdsEqual(DFT_INVALID_LOCID_VALUE));
   if(test->getNumberOfTuples()!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationPerCell::checkNoOrphanCells : presence of orphan cells !");
 }
@@ -1264,25 +1265,25 @@ void MEDCouplingFieldDiscretizationPerCell::checkNoOrphanCells() const
  * 
  * If no descretization is set in 'this' and exception will be thrown.
  */
-std::vector<DataArrayInt *> MEDCouplingFieldDiscretizationPerCell::splitIntoSingleGaussDicrPerCellType(std::vector<int>& locIds) const
+std::vector<DataArrayIdType *> MEDCouplingFieldDiscretizationPerCell::splitIntoSingleGaussDicrPerCellType(std::vector<mcIdType>& locIds) const
 {
   if(!_discr_per_cell)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationPerCell::splitIntoSingleGaussDicrPerCellType : no descretization set !");
   return _discr_per_cell->partitionByDifferentValues(locIds);
 }
 
-const DataArrayInt *MEDCouplingFieldDiscretizationPerCell::getArrayOfDiscIds() const
+const DataArrayIdType *MEDCouplingFieldDiscretizationPerCell::getArrayOfDiscIds() const
 {
   return _discr_per_cell;
 }
 
-void MEDCouplingFieldDiscretizationPerCell::setArrayOfDiscIds(const DataArrayInt *adids)
+void MEDCouplingFieldDiscretizationPerCell::setArrayOfDiscIds(const DataArrayIdType *adids)
 {
   if(adids!=_discr_per_cell)
     {
       if(_discr_per_cell)
         _discr_per_cell->decrRef();
-      _discr_per_cell=const_cast<DataArrayInt *>(adids);
+      _discr_per_cell=const_cast<DataArrayIdType *>(adids);
       if(_discr_per_cell)
         _discr_per_cell->incrRef();
       declareAsNew();
@@ -1293,11 +1294,11 @@ MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss()
 {
 }
 
-MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, const int *startCellIds, const int *endCellIds):MEDCouplingFieldDiscretizationPerCell(other,startCellIds,endCellIds),_loc(other._loc)
+MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, const mcIdType *startCellIds, const mcIdType *endCellIds):MEDCouplingFieldDiscretizationPerCell(other,startCellIds,endCellIds),_loc(other._loc)
 {
 }
 
-MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, int beginCellIds, int endCellIds, int stepCellIds):MEDCouplingFieldDiscretizationPerCell(other,beginCellIds,endCellIds,stepCellIds),_loc(other._loc)
+MEDCouplingFieldDiscretizationGauss::MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds):MEDCouplingFieldDiscretizationPerCell(other,beginCellIds,endCellIds,stepCellIds),_loc(other._loc)
 {
 }
 
@@ -1363,12 +1364,12 @@ MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretizationGauss::clone() con
   return new MEDCouplingFieldDiscretizationGauss(*this);
 }
 
-MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretizationGauss::clonePart(const int *startCellIds, const int *endCellIds) const
+MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretizationGauss::clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const
 {
   return new MEDCouplingFieldDiscretizationGauss(*this,startCellIds,endCellIds);
 }
 
-MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretizationGauss::clonePartRange(int beginCellIds, int endCellIds, int stepCellIds) const
+MEDCouplingFieldDiscretization *MEDCouplingFieldDiscretizationGauss::clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const
 {
   return new MEDCouplingFieldDiscretizationGauss(*this,beginCellIds,endCellIds,stepCellIds);
 }
@@ -1381,7 +1382,7 @@ std::string MEDCouplingFieldDiscretizationGauss::getStringRepr() const
       if(_discr_per_cell->isAllocated())
         {
           oss << "Discretization per cell : ";
-          std::copy(_discr_per_cell->begin(),_discr_per_cell->end(),std::ostream_iterator<int>(oss,", "));
+          std::copy(_discr_per_cell->begin(),_discr_per_cell->end(),std::ostream_iterator<mcIdType>(oss,", "));
           oss << std::endl;
         }
     }
@@ -1416,21 +1417,21 @@ const char *MEDCouplingFieldDiscretizationGauss::getRepr() const
  * If an incoherency is detected, an exception will be thrown. If the input code is coherent, the number of tuples expected is returned.
  * The number of tuples expected is equal to those to have a valid field lying on \a this and having a mesh fitting perfectly the input code (geometric type distribution).
  */
-int MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+mcIdType MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
   if(!_discr_per_cell || !_discr_per_cell->isAllocated() || _discr_per_cell->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode");
   if(code.size()%3!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode : invalid input code !");
-  int nbOfSplit=(int)idsPerType.size();
-  int nbOfTypes=(int)code.size()/3;
-  std::size_t ret(0);
-  for(int i=0;i<nbOfTypes;i++)
+  mcIdType nbOfSplit=ToIdType(idsPerType.size());
+  mcIdType nbOfTypes=ToIdType(code.size()/3);
+  mcIdType ret(0);
+  for(mcIdType i=0;i<nbOfTypes;i++)
     {
-      int nbOfEltInChunk=code[3*i+1];
+      mcIdType nbOfEltInChunk=code[3*i+1];
       if(nbOfEltInChunk<0)
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode : invalid input code ! presence of negative value in a type !");
-      int pos=code[3*i+2];
+      mcIdType pos=code[3*i+2];
       if(pos!=-1)
         {
           if(pos<0 || pos>=nbOfSplit)
@@ -1438,8 +1439,8 @@ int MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode(
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode : input code points to pos " << pos << " in typeid " << i << " ! Should be in [0," << nbOfSplit << ") !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
-          const DataArrayInt *ids(idsPerType[pos]);
-          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || (int)ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
+          const DataArrayIdType *ids(idsPerType[pos]);
+          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
             {
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode : input pfl chunck at pos " << pos << " should have " << i << " tuples and one component and with ids all >=0 !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -1455,15 +1456,15 @@ int MEDCouplingFieldDiscretizationGauss::getNumberOfTuplesExpectedRegardingCode(
   return getNumberOfTuples(0);//0 is not an error ! It is to be sure that input mesh is not used
 }
 
-int MEDCouplingFieldDiscretizationGauss::getNumberOfTuples(const MEDCouplingMesh *) const
+mcIdType MEDCouplingFieldDiscretizationGauss::getNumberOfTuples(const MEDCouplingMesh *) const
 {
-  int ret=0;
+  mcIdType ret=0;
   if (_discr_per_cell == 0)
     throw INTERP_KERNEL::Exception("Discretization is not initialized!");
-  const int *dcPtr=_discr_per_cell->getConstPointer();
-  int nbOfTuples=_discr_per_cell->getNumberOfTuples();
-  int maxSz=(int)_loc.size();
-  for(const int *w=dcPtr;w!=dcPtr+nbOfTuples;w++)
+  const mcIdType *dcPtr=_discr_per_cell->getConstPointer();
+  mcIdType nbOfTuples=_discr_per_cell->getNumberOfTuples();
+  mcIdType maxSz=ToIdType(_loc.size());
+  for(const mcIdType *w=dcPtr;w!=dcPtr+nbOfTuples;w++)
     {
       if(*w>=0 && *w<maxSz)
         ret+=_loc[*w].getNumberOfGaussPt();
@@ -1476,7 +1477,7 @@ int MEDCouplingFieldDiscretizationGauss::getNumberOfTuples(const MEDCouplingMesh
   return ret;
 }
 
-int MEDCouplingFieldDiscretizationGauss::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
+mcIdType MEDCouplingFieldDiscretizationGauss::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getNumberOfMeshPlaces : NULL input mesh !");
@@ -1487,20 +1488,20 @@ int MEDCouplingFieldDiscretizationGauss::getNumberOfMeshPlaces(const MEDCoupling
  * This method is redevelopped for performance reasons, but it is equivalent to a call to MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField
  * and a call to DataArrayDouble::computeOffsetsFull on the returned array.
  */
-DataArrayInt *MEDCouplingFieldDiscretizationGauss::getOffsetArr(const MEDCouplingMesh *mesh) const
+DataArrayIdType *MEDCouplingFieldDiscretizationGauss::getOffsetArr(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getOffsetArr : NULL input mesh !");
-  std::size_t nbOfTuples(mesh->getNumberOfCells());
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfTuples=mesh->getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfTuples+1,1);
-  int *retPtr(ret->getPointer());
-  const int *start(_discr_per_cell->begin());
+  mcIdType *retPtr(ret->getPointer());
+  const mcIdType *start(_discr_per_cell->begin());
   if(_discr_per_cell->getNumberOfTuples()!=nbOfTuples)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getOffsetArr : mismatch between the mesh and the discretization ids array length !");
-  int maxPossible=(int)_loc.size();
+  mcIdType maxPossible=ToIdType(_loc.size());
   retPtr[0]=0;
-  for(std::size_t i=0;i<nbOfTuples;i++,start++)
+  for(mcIdType i=0;i<nbOfTuples;i++,start++)
     {
       if(*start>=0 && *start<maxPossible)
         retPtr[i+1]=retPtr[i]+_loc[*start].getNumberOfGaussPt();
@@ -1514,26 +1515,26 @@ DataArrayInt *MEDCouplingFieldDiscretizationGauss::getOffsetArr(const MEDCouplin
 }
 
 void MEDCouplingFieldDiscretizationGauss::renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                                const int *old2NewBg, bool check)
+                                                                const mcIdType *old2NewBg, bool check)
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::renumberArraysForCell : NULL input mesh !");
-  const int *array=old2NewBg;
+  const mcIdType *array=old2NewBg;
   if(check)
-    array=DataArrayInt::CheckAndPreparePermutation(old2NewBg,old2NewBg+mesh->getNumberOfCells());
-  int nbOfCells=_discr_per_cell->getNumberOfTuples();
-  int nbOfTuples=getNumberOfTuples(0);
-  const int *dcPtr=_discr_per_cell->getConstPointer();
-  int *array2=new int[nbOfTuples];//stores the final conversion array old2New to give to arrays in renumberInPlace.
-  int *array3=new int[nbOfCells];//store for each cell in present dcp array (already renumbered) the offset needed by each cell in new numbering.
+    array=DataArrayIdType::CheckAndPreparePermutation(old2NewBg,old2NewBg+mesh->getNumberOfCells());
+  mcIdType nbOfCells=_discr_per_cell->getNumberOfTuples();
+  mcIdType nbOfTuples=getNumberOfTuples(0);
+  const mcIdType *dcPtr=_discr_per_cell->getConstPointer();
+  mcIdType *array2=new mcIdType[nbOfTuples];//stores the final conversion array old2New to give to arrays in renumberInPlace.
+  mcIdType *array3=new mcIdType[nbOfCells];//store for each cell in present dcp array (already renumbered) the offset needed by each cell in new numbering.
   array3[0]=0;
-  for(int i=1;i<nbOfCells;i++)
+  for(mcIdType i=1;i<nbOfCells;i++)
     array3[i]=array3[i-1]+_loc[dcPtr[i-1]].getNumberOfGaussPt();
-  int j=0;
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType j=0;
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int nbOfGaussPt=_loc[dcPtr[array[i]]].getNumberOfGaussPt();
-      for(int k=0;k<nbOfGaussPt;k++,j++)
+      mcIdType nbOfGaussPt=_loc[dcPtr[array[i]]].getNumberOfGaussPt();
+      for(mcIdType k=0;k<nbOfGaussPt;k++,j++)
         array2[j]=array3[array[i]]+k;
     }
   delete [] array3;
@@ -1542,7 +1543,7 @@ void MEDCouplingFieldDiscretizationGauss::renumberArraysForCell(const MEDCouplin
       (*it)->renumberInPlace(array2);
   delete [] array2;
   if(check)
-    free(const_cast<int*>(array));
+    free(const_cast<mcIdType*>(array));
 }
 
 DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const
@@ -1551,20 +1552,20 @@ DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValue
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValues : NULL input mesh !");
   checkNoOrphanCells();
   MCAuto<MEDCouplingUMesh> umesh=mesh->buildUnstructured();//in general do nothing
-  int nbOfTuples=getNumberOfTuples(mesh);
+  mcIdType nbOfTuples=getNumberOfTuples(mesh);
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   int spaceDim=mesh->getSpaceDimension();
   ret->alloc(nbOfTuples,spaceDim);
-  std::vector< int > locIds;
-  std::vector<DataArrayInt *> parts=splitIntoSingleGaussDicrPerCellType(locIds);
-  std::vector< MCAuto<DataArrayInt> > parts2(parts.size());
+  std::vector< mcIdType > locIds;
+  std::vector<DataArrayIdType *> parts=splitIntoSingleGaussDicrPerCellType(locIds);
+  std::vector< MCAuto<DataArrayIdType> > parts2(parts.size());
   std::copy(parts.begin(),parts.end(),parts2.begin());
-  MCAuto<DataArrayInt> offsets=buildNbOfGaussPointPerCellField();
+  MCAuto<DataArrayIdType> offsets=buildNbOfGaussPointPerCellField();
   offsets->computeOffsets();
-  const int *ptrOffsets=offsets->getConstPointer();
+  const mcIdType *ptrOffsets=offsets->getConstPointer();
   const double *coords=umesh->getCoords()->getConstPointer();
-  const int *connI=umesh->getNodalConnectivityIndex()->getConstPointer();
-  const int *conn=umesh->getNodalConnectivity()->getConstPointer();
+  const mcIdType *connI=umesh->getNodalConnectivityIndex()->getConstPointer();
+  const mcIdType *conn=umesh->getNodalConnectivity()->getConstPointer();
   double *valsToFill=ret->getPointer();
   for(std::size_t i=0;i<parts2.size();i++)
     {
@@ -1574,26 +1575,26 @@ DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValue
       INTERP_KERNEL::NormalizedCellType typ(cli.getType());
       const std::vector<double>& wg(cli.getWeights());
       calculator.addGaussInfo(typ,INTERP_KERNEL::CellModel::GetCellModel(typ).getDimension(),
-          &cli.getGaussCoords()[0],(int)wg.size(),&cli.getRefCoords()[0],
+                              &cli.getGaussCoords()[0],ToIdType(wg.size()),&cli.getRefCoords()[0],
           INTERP_KERNEL::CellModel::GetCellModel(typ).getNumberOfNodes());
       //
-      for(const int *w=parts2[i]->begin();w!=parts2[i]->end();w++)
+      for(const mcIdType *w=parts2[i]->begin();w!=parts2[i]->end();w++)
         calculator.calculateCoords(cli.getType(),coords,spaceDim,conn+connI[*w]+1,valsToFill+spaceDim*(ptrOffsets[*w]));
     }
   ret->copyStringInfoFrom(*umesh->getCoords());
   return ret.retn();
 }
 
-void MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                                             DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const
+void MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                                             DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::computeMeshRestrictionFromTupleIds : NULL input mesh !");
-  MCAuto<DataArrayInt> tmp=DataArrayInt::New(); tmp->alloc((int)std::distance(tupleIdsBg,tupleIdsEnd),1);
+  MCAuto<DataArrayIdType> tmp=DataArrayIdType::New(); tmp->alloc(std::distance(tupleIdsBg,tupleIdsEnd),1);
   std::copy(tupleIdsBg,tupleIdsEnd,tmp->getPointer());
   tmp->sort(true);
   tmp=tmp->buildUnique();
-  MCAuto<DataArrayInt> nbOfNodesPerCell=buildNbOfGaussPointPerCellField();
+  MCAuto<DataArrayIdType> nbOfNodesPerCell=buildNbOfGaussPointPerCellField();
   nbOfNodesPerCell->computeOffsetsFull();
   nbOfNodesPerCell->findIdsRangesInListOfIds(tmp,cellRestriction,trueTupleRestriction);
 }
@@ -1605,13 +1606,13 @@ void MEDCouplingFieldDiscretizationGauss::checkCompatibilityWithNature(NatureOfF
 {
 }
 
-void MEDCouplingFieldDiscretizationGauss::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+void MEDCouplingFieldDiscretizationGauss::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
 {
-  int val=-1;
+  mcIdType val=-1;
   if(_discr_per_cell)
     val=_discr_per_cell->getNumberOfTuples();
   tinyInfo.push_back(val);
-  tinyInfo.push_back((int)_loc.size());
+  tinyInfo.push_back(ToIdType(_loc.size()));
   if(_loc.empty())
     tinyInfo.push_back(-1);
   else
@@ -1626,19 +1627,19 @@ void MEDCouplingFieldDiscretizationGauss::getTinySerializationDbleInformation(st
     (*iter).pushTinySerializationDblInfo(tinyInfo);
 }
 
-void MEDCouplingFieldDiscretizationGauss::getSerializationIntArray(DataArrayInt *& arr) const
+void MEDCouplingFieldDiscretizationGauss::getSerializationIntArray(DataArrayIdType *& arr) const
 {
   arr=0;
   if(_discr_per_cell)
     arr=_discr_per_cell;
 }
 
-void MEDCouplingFieldDiscretizationGauss::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *& arr)
+void MEDCouplingFieldDiscretizationGauss::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr)
 {
-  int val=tinyInfo[0];
+  mcIdType val=tinyInfo[0];
   if(val>=0)
     {
-      _discr_per_cell=DataArrayInt::New();
+      _discr_per_cell=DataArrayIdType::New();
       _discr_per_cell->alloc(val,1);
     }
   else
@@ -1647,16 +1648,16 @@ void MEDCouplingFieldDiscretizationGauss::resizeForUnserialization(const std::ve
   commonUnserialization(tinyInfo);
 }
 
-void MEDCouplingFieldDiscretizationGauss::checkForUnserialization(const std::vector<int>& tinyInfo, const DataArrayInt *arr)
+void MEDCouplingFieldDiscretizationGauss::checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr)
 {
-  static const char MSG[]="MEDCouplingFieldDiscretizationGauss::checkForUnserialization : expect to have one not null DataArrayInt !";
-  int val=tinyInfo[0];
+  static const char MSG[]="MEDCouplingFieldDiscretizationGauss::checkForUnserialization : expect to have one not null DataArrayIdType !";
+  mcIdType val=tinyInfo[0];
   if(val>=0)
     {
       if(!arr)
         throw INTERP_KERNEL::Exception(MSG);
       arr->checkNbOfTuplesAndComp(val,1,MSG);
-      _discr_per_cell=const_cast<DataArrayInt *>(arr);
+      _discr_per_cell=const_cast<DataArrayIdType *>(arr);
       _discr_per_cell->incrRef();
     }
   else
@@ -1674,9 +1675,9 @@ void MEDCouplingFieldDiscretizationGauss::finishUnserialization(const std::vecto
   delete [] tmp;
 }
 
-double MEDCouplingFieldDiscretizationGauss::getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const
+double MEDCouplingFieldDiscretizationGauss::getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const
 {
-  int offset=getOffsetOfCell(cellId);
+  mcIdType offset=getOffsetOfCell(cellId);
   return da->getIJ(offset+nodeIdInCell,compoId);
 }
 
@@ -1687,10 +1688,10 @@ void MEDCouplingFieldDiscretizationGauss::checkCoherencyBetween(const MEDCouplin
   MEDCouplingFieldDiscretizationPerCell::checkCoherencyBetween(mesh,da);
   for(std::vector<MEDCouplingGaussLocalization>::const_iterator iter=_loc.begin();iter!=_loc.end();iter++)
     (*iter).checkConsistencyLight();
-  int nbOfDesc=(int)_loc.size();
-  int nbOfCells=mesh->getNumberOfCells();
-  const int *dc=_discr_per_cell->getConstPointer();
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nbOfDesc=ToIdType(_loc.size());
+  mcIdType nbOfCells=mesh->getNumberOfCells();
+  const mcIdType *dc=_discr_per_cell->getConstPointer();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       if(dc[i]>=nbOfDesc)
         {
@@ -1708,7 +1709,7 @@ void MEDCouplingFieldDiscretizationGauss::checkCoherencyBetween(const MEDCouplin
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
     }
-  std::size_t nbOfTuples(getNumberOfTuples(mesh));
+  mcIdType nbOfTuples(getNumberOfTuples(mesh));
   if(nbOfTuples!=da->getNumberOfTuples())
     {
       std::ostringstream oss; oss << "Invalid number of tuples in the array : expecting " << nbOfTuples << " having " << da->getNumberOfTuples() << " !";
@@ -1732,28 +1733,28 @@ MEDCouplingFieldDouble *MEDCouplingFieldDiscretizationGauss::getMeasureField(con
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getMeasureField : no discr per cell array defined but with nb of components different from 1 !");
   if(_discr_per_cell->getNumberOfTuples()!=vol->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::getMeasureField : no discr per cell array defined but mismatch between nb of cells of mesh and size of spatial disr array !");
-  MCAuto<DataArrayInt> offset=getOffsetArr(mesh);
+  MCAuto<DataArrayIdType> offset=getOffsetArr(mesh);
   MCAuto<DataArrayDouble> arr=DataArrayDouble::New(); arr->alloc(getNumberOfTuples(mesh),1);
   ret->setArray(arr);
   double *arrPtr=arr->getPointer();
-  const int *offsetPtr=offset->getConstPointer();
-  int maxGaussLoc=(int)_loc.size();
-  std::vector<int> locIds;
-  std::vector<DataArrayInt *> ids=splitIntoSingleGaussDicrPerCellType(locIds);
-  std::vector< MCAuto<DataArrayInt> > ids2(ids.size()); std::copy(ids.begin(),ids.end(),ids2.begin());
+  const mcIdType *offsetPtr=offset->getConstPointer();
+  mcIdType maxGaussLoc=ToIdType(_loc.size());
+  std::vector<mcIdType> locIds;
+  std::vector<DataArrayIdType *> ids=splitIntoSingleGaussDicrPerCellType(locIds);
+  std::vector< MCAuto<DataArrayIdType> > ids2(ids.size()); std::copy(ids.begin(),ids.end(),ids2.begin());
   for(std::size_t i=0;i<locIds.size();i++)
     {
-      const DataArrayInt *curIds=ids[i];
-      int locId=locIds[i];
+      const DataArrayIdType *curIds=ids[i];
+      mcIdType locId=locIds[i];
       if(locId>=0 && locId<maxGaussLoc)
         {
           const MEDCouplingGaussLocalization& loc=_loc[locId];
-          int nbOfGaussPt=loc.getNumberOfGaussPt();
+          mcIdType nbOfGaussPt=loc.getNumberOfGaussPt();
           INTERP_KERNEL::AutoPtr<double> weights=new double[nbOfGaussPt];
           double sum=std::accumulate(loc.getWeights().begin(),loc.getWeights().end(),0.);
           std::transform(loc.getWeights().begin(),loc.getWeights().end(),(double *)weights,std::bind2nd(std::multiplies<double>(),1./sum));
-          for(const int *cellId=curIds->begin();cellId!=curIds->end();cellId++)
-            for(int j=0;j<nbOfGaussPt;j++)
+          for(const mcIdType *cellId=curIds->begin();cellId!=curIds->end();cellId++)
+            for(mcIdType j=0;j<nbOfGaussPt;j++)
               arrPtr[offsetPtr[*cellId]+j]=weights[j]*volPtr[*cellId];
         }
       else
@@ -1771,21 +1772,21 @@ void MEDCouplingFieldDiscretizationGauss::getValueOn(const DataArrayDouble *arr,
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
 
-void MEDCouplingFieldDiscretizationGauss::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
+void MEDCouplingFieldDiscretizationGauss::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const
 {
   throw INTERP_KERNEL::Exception("getValueOnPos(i,j,k) : Not applicable for Gauss points !");
 }
 
-DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const
+DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const
 {
   throw INTERP_KERNEL::Exception("getValueOnMulti : Not implemented yet for gauss points !");
 }
 
-MEDCouplingMesh *MEDCouplingFieldDiscretizationGauss::buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationGauss::buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::buildSubMeshData : NULL input mesh !");
-  MCAuto<DataArrayInt> diSafe=computeTupleIdsToSelectFromCellIds(mesh,start,end);
+  MCAuto<DataArrayIdType> diSafe=computeTupleIdsToSelectFromCellIds(mesh,start,end);
   MCAuto<MEDCouplingMesh> ret=mesh->buildPart(start,end);
   di=diSafe.retn();
   return ret.retn();
@@ -1801,7 +1802,7 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationGauss::buildSubMeshData(const MED
  *
  * \sa MEDCouplingFieldDiscretizationGauss::buildSubMeshData
  */
-MEDCouplingMesh *MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
 {
   if(stepCellIds!=1)//even for stepCellIds==-1 the output will not be a range
     return MEDCouplingFieldDiscretization::buildSubMeshDataRange(mesh,beginCellIds,endCellIds,stepCellIds,beginOut,endOut,stepOut,di);
@@ -1811,16 +1812,16 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange(cons
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange : no discretization array set !");
   di=0; beginOut=0; endOut=0; stepOut=stepCellIds;
   const char msg[]="MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange : cell #";
-  int nbOfTuples=_discr_per_cell->getNumberOfTuples();
-  const int *w=_discr_per_cell->begin();
-  int nbMaxOfLocId=(int)_loc.size();
-  for(int i=0;i<nbOfTuples;i++,w++)
+  mcIdType nbOfTuples=_discr_per_cell->getNumberOfTuples();
+  const mcIdType *w=_discr_per_cell->begin();
+  mcIdType nbMaxOfLocId=ToIdType(_loc.size());
+  for(mcIdType i=0;i<nbOfTuples;i++,w++)
     {
       if(*w!=DFT_INVALID_LOCID_VALUE)
         {
           if(*w>=0 && *w<nbMaxOfLocId)
             {
-              int delta=_loc[*w].getNumberOfGaussPt();
+              mcIdType delta=_loc[*w].getNumberOfGaussPt();
               if(i<beginCellIds)
                 beginOut+=delta;
               endOut+=delta;
@@ -1844,32 +1845,32 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationGauss::buildSubMeshDataRange(cons
  * \return a newly allocated array containing ids to select into the DataArrayDouble of the field.
  * 
  */
-DataArrayInt *MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const
+DataArrayIdType *MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds : null mesh !");
-  MCAuto<DataArrayInt> nbOfNodesPerCell=buildNbOfGaussPointPerCellField();//check of _discr_per_cell not NULL pointer
-  std::size_t nbOfCells(mesh->getNumberOfCells());
+  MCAuto<DataArrayIdType> nbOfNodesPerCell=buildNbOfGaussPointPerCellField();//check of _discr_per_cell not NULL pointer
+  mcIdType nbOfCells(mesh->getNumberOfCells());
   if(_discr_per_cell->getNumberOfTuples()!=nbOfCells)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::computeTupleIdsToSelectFromCellIds : mismatch of nb of tuples of cell ids array and number of cells !");
   nbOfNodesPerCell->computeOffsetsFull();
-  MCAuto<DataArrayInt> sel=DataArrayInt::New(); sel->useArray(startCellIds,false,DeallocType::CPP_DEALLOC,(int)std::distance(startCellIds,endCellIds),1);
+  MCAuto<DataArrayIdType> sel=DataArrayIdType::New(); sel->useArray(startCellIds,false,DeallocType::CPP_DEALLOC,ToIdType(std::distance(startCellIds,endCellIds)),1);
   return sel->buildExplicitArrByRanges(nbOfNodesPerCell);
 }
 
 /*!
  * No implementation needed !
  */
-void MEDCouplingFieldDiscretizationGauss::renumberValuesOnNodes(double , const int *, int newNbOfNodes, DataArrayDouble *) const
+void MEDCouplingFieldDiscretizationGauss::renumberValuesOnNodes(double , const mcIdType *, mcIdType newNbOfNodes, DataArrayDouble *) const
 {
 }
 
-void MEDCouplingFieldDiscretizationGauss::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationGauss::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const
 {
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
 
-void MEDCouplingFieldDiscretizationGauss::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationGauss::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const
 {
   throw INTERP_KERNEL::Exception("Number of cells has changed and becomes higher with some cells that have been split ! Unable to conserve the Gauss field !");
 }
@@ -1879,7 +1880,7 @@ MCAuto<MEDCouplingFieldDiscretization> MEDCouplingFieldDiscretizationGauss::aggr
   if(fds.empty())
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::aggregate : input array is empty");
   std::vector<MEDCouplingGaussLocalization> loc;//store the localizations for the output GaussDiscretization object
-  std::vector< MCAuto<DataArrayInt> > discPerCells(fds.size());
+  std::vector< MCAuto<DataArrayIdType> > discPerCells(fds.size());
   std::size_t i(0);
   for(auto it=fds.begin();it!=fds.end();++it,++i)
     {
@@ -1888,7 +1889,7 @@ MCAuto<MEDCouplingFieldDiscretization> MEDCouplingFieldDiscretizationGauss::aggr
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::aggregate : same field discretization expected for all input discretizations !");
       //
       std::vector<MEDCouplingGaussLocalization> loc2(itc->_loc);
-      std::vector<int> newLocId(loc2.size());
+      std::vector<mcIdType> newLocId(loc2.size());
       for(std::size_t j=0;j<loc2.size();++j)
         {
           std::size_t k(0);
@@ -1896,24 +1897,24 @@ MCAuto<MEDCouplingFieldDiscretization> MEDCouplingFieldDiscretizationGauss::aggr
             {
               if(loc2[j].isEqual(loc[k],1e-10))
                 {
-                  newLocId[j]=(int)k;
+                  newLocId[j]=ToIdType(k);
                   break;
                 }
             }
           if(k==loc.size())// current loc2[j]
             {
-              newLocId[j]=(int)loc.size();
+              newLocId[j]=ToIdType(loc.size());
               loc.push_back(loc2[j]);
             }
         }
-      const DataArrayInt *dpc(itc->_discr_per_cell);
+      const DataArrayIdType *dpc(itc->_discr_per_cell);
       if(!dpc)
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::aggregate : Presence of nullptr array of disc per cell !");
-      MCAuto<DataArrayInt> dpc2(dpc->deepCopy());
+      MCAuto<DataArrayIdType> dpc2(dpc->deepCopy());
       dpc2->transformWithIndArr(newLocId.data(),newLocId.data()+newLocId.size());
       discPerCells[i]=dpc2;
     }
-  MCAuto<DataArrayInt> dpc3(DataArrayInt::Aggregate(ToConstVect(discPerCells)));
+  MCAuto<DataArrayIdType> dpc3(DataArrayIdType::Aggregate(ToConstVect(discPerCells)));
   MCAuto<MEDCouplingFieldDiscretizationGauss> ret(new MEDCouplingFieldDiscretizationGauss(dpc3,loc));
   return DynamicCast<MEDCouplingFieldDiscretizationGauss,MEDCouplingFieldDiscretization>(ret);
 }
@@ -1924,25 +1925,25 @@ void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType(const MEDCo
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType : NULL input mesh !");
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
-  if((int)cm.getDimension()!=mesh->getMeshDimension())
+  if(ToIdType(cm.getDimension())!=mesh->getMeshDimension())
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType : mismatch of dimensions ! MeshDim==" << mesh->getMeshDimension();
       oss << " whereas Type '" << cm.getRepr() << "' has dimension " << cm.getDimension() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   buildDiscrPerCellIfNecessary(mesh);
-  int id=(int)_loc.size();
+  mcIdType id=ToIdType(_loc.size());
   MEDCouplingGaussLocalization elt(type,refCoo,gsCoo,wg);
   _loc.push_back(elt);
-  int *ptr=_discr_per_cell->getPointer();
-  int nbCells=mesh->getNumberOfCells();
-  for(int i=0;i<nbCells;i++)
+  mcIdType *ptr=_discr_per_cell->getPointer();
+  mcIdType nbCells=mesh->getNumberOfCells();
+  for(mcIdType i=0;i<nbCells;i++)
     if(mesh->getTypeOfCell(i)==type)
       ptr[i]=id;
   zipGaussLocalizations();
 }
 
-void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const int *begin, const int *end, const std::vector<double>& refCoo,
+void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
                                                                       const std::vector<double>& gsCoo, const std::vector<double>& wg)
 {
   if(!mesh)
@@ -1952,9 +1953,9 @@ void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(const MEDC
     throw INTERP_KERNEL::Exception("Size of [begin,end) must be equal or greater than 1 !");
   INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(*begin);
   MEDCouplingGaussLocalization elt(type,refCoo,gsCoo,wg);
-  int id=(int)_loc.size();
-  int *ptr=_discr_per_cell->getPointer();
-  for(const int *w=begin+1;w!=end;w++)
+  mcIdType id=ToIdType(_loc.size());
+  mcIdType *ptr=_discr_per_cell->getPointer();
+  for(const mcIdType *w=begin+1;w!=end;w++)
     {
       if(mesh->getTypeOfCell(*w)!=type)
         {
@@ -1963,7 +1964,7 @@ void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(const MEDC
         }
     }
   //
-  for(const int *w2=begin;w2!=end;w2++)
+  for(const mcIdType *w2=begin;w2!=end;w2++)
     ptr[*w2]=id;
   //
   _loc.push_back(elt);
@@ -1980,18 +1981,18 @@ void MEDCouplingFieldDiscretizationGauss::clearGaussLocalizations()
   _loc.clear();
 }
 
-void MEDCouplingFieldDiscretizationGauss::setGaussLocalization(int locId, const MEDCouplingGaussLocalization& loc)
+void MEDCouplingFieldDiscretizationGauss::setGaussLocalization(mcIdType locId, const MEDCouplingGaussLocalization& loc)
 {
   if(locId<0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::setGaussLocalization : localization id has to be >=0 !");
-  int sz=(int)_loc.size();
+  mcIdType sz=ToIdType(_loc.size());
   MEDCouplingGaussLocalization gLoc(INTERP_KERNEL::NORM_ERROR);
   if(locId>=sz)
     _loc.resize(locId+1,gLoc);
   _loc[locId]=loc;
 }
 
-void MEDCouplingFieldDiscretizationGauss::resizeLocalizationVector(int newSz)
+void MEDCouplingFieldDiscretizationGauss::resizeLocalizationVector(mcIdType newSz)
 {
   if(newSz<0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::resizeLocalizationVector : new size has to be >=0 !");
@@ -1999,30 +2000,30 @@ void MEDCouplingFieldDiscretizationGauss::resizeLocalizationVector(int newSz)
   _loc.resize(newSz,gLoc);
 }
 
-MEDCouplingGaussLocalization& MEDCouplingFieldDiscretizationGauss::getGaussLocalization(int locId)
+MEDCouplingGaussLocalization& MEDCouplingFieldDiscretizationGauss::getGaussLocalization(mcIdType locId)
 {
   checkLocalizationId(locId);
   return _loc[locId];
 }
 
-int MEDCouplingFieldDiscretizationGauss::getNbOfGaussLocalization() const
+mcIdType MEDCouplingFieldDiscretizationGauss::getNbOfGaussLocalization() const
 {
-  return (int)_loc.size();
+  return ToIdType(_loc.size());
 }
 
-int MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneCell(int cellId) const
+mcIdType MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneCell(mcIdType cellId) const
 {
   if(!_discr_per_cell)
     throw INTERP_KERNEL::Exception("No Gauss localization still set !");
-  int locId=_discr_per_cell->begin()[cellId];
+  mcIdType locId=_discr_per_cell->begin()[cellId];
   if(locId<0)
     throw INTERP_KERNEL::Exception("No Gauss localization set for the specified cell !");
   return locId;
 }
 
-int MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+mcIdType MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const
 {
-  std::set<int> ret=getGaussLocalizationIdsOfOneType(type);
+  std::set<mcIdType> ret=getGaussLocalizationIdsOfOneType(type);
   if(ret.empty())
     throw INTERP_KERNEL::Exception("No gauss discretization found for the specified type !");
   if(ret.size()>1)
@@ -2030,46 +2031,46 @@ int MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneType(INTERP_
   return *ret.begin();
 }
 
-std::set<int> MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
+std::set<mcIdType> MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
 {
   if(!_discr_per_cell)
     throw INTERP_KERNEL::Exception("No Gauss localization still set !");
-  std::set<int> ret;
-  int id=0;
+  std::set<mcIdType> ret;
+  mcIdType id=0;
   for(std::vector<MEDCouplingGaussLocalization>::const_iterator iter=_loc.begin();iter!=_loc.end();iter++,id++)
     if((*iter).getType()==type)
       ret.insert(id);
   return ret;
 }
 
-void MEDCouplingFieldDiscretizationGauss::getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const
+void MEDCouplingFieldDiscretizationGauss::getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const
 {
-  if(locId<0 || locId>=(int)_loc.size())
+  if(locId<0 || locId>=ToIdType(_loc.size()))
     throw INTERP_KERNEL::Exception("Invalid locId given : must be in range [0:getNbOfGaussLocalization()) !");
-  int nbOfTuples=_discr_per_cell->getNumberOfTuples();
-  const int *ptr=_discr_per_cell->getConstPointer();
-  for(int i=0;i<nbOfTuples;i++)
+  mcIdType nbOfTuples=_discr_per_cell->getNumberOfTuples();
+  const mcIdType *ptr=_discr_per_cell->getConstPointer();
+  for(mcIdType i=0;i<nbOfTuples;i++)
     if(ptr[i]==locId)
       cellIds.push_back(i);
 }
 
-const MEDCouplingGaussLocalization& MEDCouplingFieldDiscretizationGauss::getGaussLocalization(int locId) const
+const MEDCouplingGaussLocalization& MEDCouplingFieldDiscretizationGauss::getGaussLocalization(mcIdType locId) const
 {
   checkLocalizationId(locId);
   return _loc[locId];
 }
 
-void MEDCouplingFieldDiscretizationGauss::checkLocalizationId(int locId) const
+void MEDCouplingFieldDiscretizationGauss::checkLocalizationId(mcIdType locId) const
 {
-  if(locId<0 || locId>=(int)_loc.size())
+  if(locId<0 || locId>=ToIdType(_loc.size()))
     throw INTERP_KERNEL::Exception("Invalid locId given : must be in range [0:getNbOfGaussLocalization()) !");
 }
 
-int MEDCouplingFieldDiscretizationGauss::getOffsetOfCell(int cellId) const
+mcIdType MEDCouplingFieldDiscretizationGauss::getOffsetOfCell(mcIdType cellId) const
 {
-  int ret=0;
-  const int *start=_discr_per_cell->getConstPointer();
-  for(const int *w=start;w!=start+cellId;w++)
+  mcIdType ret=0;
+  const mcIdType *start=_discr_per_cell->getConstPointer();
+  for(const mcIdType *w=start;w!=start+cellId;w++)
     ret+=_loc[*w].getNumberOfGaussPt();
   return ret;
 }
@@ -2080,17 +2081,17 @@ int MEDCouplingFieldDiscretizationGauss::getOffsetOfCell(int cellId) const
  * This method returns a newly created array with number of tuples equals to '_discr_per_cell->getNumberOfTuples' and number of components equal to 1.
  * The i_th tuple in returned array is the number of gauss point if the corresponding cell.
  */
-DataArrayInt *MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField() const
+DataArrayIdType *MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField() const
 {
   if(!_discr_per_cell)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGauss::buildNbOfGaussPointPerCellField : no discretization array set !");
-  int nbOfTuples=_discr_per_cell->getNumberOfTuples();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  const int *w=_discr_per_cell->begin();
+  mcIdType nbOfTuples=_discr_per_cell->getNumberOfTuples();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  const mcIdType *w=_discr_per_cell->begin();
   ret->alloc(nbOfTuples,1);
-  int *valsToFill=ret->getPointer();
-  int nbMaxOfLocId=(int)_loc.size();
-  for(int i=0;i<nbOfTuples;i++,w++)
+  mcIdType *valsToFill=ret->getPointer();
+  mcIdType nbMaxOfLocId=ToIdType(_loc.size());
+  for(mcIdType i=0;i<nbOfTuples;i++,w++)
     if(*w!=DFT_INVALID_LOCID_VALUE)
       {
         if(*w>=0 && *w<nbMaxOfLocId)
@@ -2121,42 +2122,42 @@ void MEDCouplingFieldDiscretizationGauss::reprQuickOverview(std::ostream& stream
  */
 void MEDCouplingFieldDiscretizationGauss::zipGaussLocalizations()
 {
-  const int *start=_discr_per_cell->begin();
-  int nbOfTuples=_discr_per_cell->getNumberOfTuples();
-  INTERP_KERNEL::AutoPtr<int> tmp=new int[_loc.size()];
-  std::fill((int *)tmp,(int *)tmp+_loc.size(),-2);
-  for(const int *w=start;w!=start+nbOfTuples;w++)
+  const mcIdType *start=_discr_per_cell->begin();
+  mcIdType nbOfTuples=_discr_per_cell->getNumberOfTuples();
+  INTERP_KERNEL::AutoPtr<mcIdType> tmp=new mcIdType[_loc.size()];
+  std::fill((mcIdType *)tmp,(mcIdType *)tmp+_loc.size(),-2);
+  for(const mcIdType *w=start;w!=start+nbOfTuples;w++)
     if(*w>=0)
       tmp[*w]=1;
-  int fid=0;
-  for(int i=0;i<(int)_loc.size();i++)
+  mcIdType fid=0;
+  for(mcIdType i=0;i<ToIdType(_loc.size());i++)
     if(tmp[i]!=-2)
       tmp[i]=fid++;
-  if(fid==(int)_loc.size())
+  if(fid==ToIdType(_loc.size()))
     return;
   // zip needed
-  int *start2=_discr_per_cell->getPointer();
-  for(int *w2=start2;w2!=start2+nbOfTuples;w2++)
+  mcIdType *start2=_discr_per_cell->getPointer();
+  for(mcIdType *w2=start2;w2!=start2+nbOfTuples;w2++)
     if(*w2>=0)
       *w2=tmp[*w2];
   std::vector<MEDCouplingGaussLocalization> tmpLoc;
-  for(int i=0;i<(int)_loc.size();i++)
+  for(mcIdType i=0;i<ToIdType(_loc.size());i++)
     if(tmp[i]!=-2)
       tmpLoc.push_back(_loc[i]);
   _loc=tmpLoc;
 }
 
-void MEDCouplingFieldDiscretizationGauss::commonUnserialization(const std::vector<int>& tinyInfo)
+void MEDCouplingFieldDiscretizationGauss::commonUnserialization(const std::vector<mcIdType>& tinyInfo)
 {
-  int nbOfLoc=tinyInfo[1];
+  mcIdType nbOfLoc=tinyInfo[1];
   _loc.clear();
-  int dim=tinyInfo[2];
-  int delta=-1;
+  mcIdType dim=tinyInfo[2];
+  mcIdType delta=-1;
   if(nbOfLoc>0)
-    delta=((int)tinyInfo.size()-3)/nbOfLoc;
-  for(int i=0;i<nbOfLoc;i++)
+    delta=(ToIdType(tinyInfo.size())-3)/nbOfLoc;
+  for(mcIdType i=0;i<nbOfLoc;i++)
     {
-      std::vector<int> tmp(tinyInfo.begin()+3+i*delta,tinyInfo.begin()+3+(i+1)*delta);
+      std::vector<mcIdType> tmp(tinyInfo.begin()+3+i*delta,tinyInfo.begin()+3+(i+1)*delta);
       MEDCouplingGaussLocalization elt=MEDCouplingGaussLocalization::BuildNewInstanceFromTinyInfo(dim,tmp);
       _loc.push_back(elt);
     }
@@ -2211,14 +2212,14 @@ bool MEDCouplingFieldDiscretizationGaussNE::isEqualIfNotWhy(const MEDCouplingFie
  * If an incoherency is detected, an exception will be thrown. If the input code is coherent, the number of tuples expected is returned.
  * The number of tuples expected is equal to those to have a valid field lying on \a this and having a mesh fitting perfectly the input code (geometric type distribution).
  */
-int MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+mcIdType MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
   if(code.size()%3!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCode : invalid input code !");
-  int nbOfSplit=(int)idsPerType.size();
-  int nbOfTypes=(int)code.size()/3;
-  int ret(0);
-  for(int i=0;i<nbOfTypes;i++)
+  mcIdType nbOfSplit=ToIdType(idsPerType.size());
+  mcIdType nbOfTypes=ToIdType(code.size()/3);
+  mcIdType ret(0);
+  for(mcIdType i=0;i<nbOfTypes;i++)
     {
       const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)code[3*i]));
       if(cm.isDynamic())
@@ -2226,10 +2227,10 @@ int MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCod
           std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCode : At pos #" << i << " the geometric type " << cm.getRepr() << " is dynamic ! There are not managed by GAUSS_NE field discretization !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      int nbOfEltInChunk=code[3*i+1];
+      mcIdType nbOfEltInChunk=code[3*i+1];
       if(nbOfEltInChunk<0)
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCode : invalid input code ! presence of negative value in a type !");
-      int pos=code[3*i+2];
+      mcIdType pos=code[3*i+2];
       if(pos!=-1)
         {
           if(pos<0 || pos>=nbOfSplit)
@@ -2237,25 +2238,25 @@ int MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCod
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCode : input code points to pos " << pos << " in typeid " << i << " ! Should be in [0," << nbOfSplit << ") !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
-          const DataArrayInt *ids(idsPerType[pos]);
-          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || (int)ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
+          const DataArrayIdType *ids(idsPerType[pos]);
+          if(!ids || !ids->isAllocated() || ids->getNumberOfComponents()!=1 || ids->getNumberOfTuples()!=nbOfEltInChunk || ids->getMinValueInArray()<0)
             {
               std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuplesExpectedRegardingCode : input pfl chunck at pos " << pos << " should have " << i << " tuples and one component and with ids all >=0 !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
         }
-      ret+=nbOfEltInChunk*(int)cm.getNumberOfNodes();
+      ret+=nbOfEltInChunk*ToIdType(cm.getNumberOfNodes());
     }
   return ret;
 }
 
-int MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuples(const MEDCouplingMesh *mesh) const
+mcIdType MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuples(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuples : NULL input mesh !");
-  int ret=0;
-  int nbOfCells=mesh->getNumberOfCells();
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType ret=0;
+  mcIdType nbOfCells=mesh->getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
@@ -2266,23 +2267,23 @@ int MEDCouplingFieldDiscretizationGaussNE::getNumberOfTuples(const MEDCouplingMe
   return ret;
 }
 
-int MEDCouplingFieldDiscretizationGaussNE::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
+mcIdType MEDCouplingFieldDiscretizationGaussNE::getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::getNumberOfMeshPlaces : NULL input mesh !");
   return mesh->getNumberOfCells();
 }
 
-DataArrayInt *MEDCouplingFieldDiscretizationGaussNE::getOffsetArr(const MEDCouplingMesh *mesh) const
+DataArrayIdType *MEDCouplingFieldDiscretizationGaussNE::getOffsetArr(const MEDCouplingMesh *mesh) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::getOffsetArr : NULL input mesh !");
-  int nbOfTuples=mesh->getNumberOfCells();
-  DataArrayInt *ret=DataArrayInt::New();
+  mcIdType nbOfTuples=mesh->getNumberOfCells();
+  DataArrayIdType *ret=DataArrayIdType::New();
   ret->alloc(nbOfTuples+1,1);
-  int *retPtr=ret->getPointer();
+  mcIdType *retPtr=ret->getPointer();
   retPtr[0]=0;
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
@@ -2294,30 +2295,30 @@ DataArrayInt *MEDCouplingFieldDiscretizationGaussNE::getOffsetArr(const MEDCoupl
 }
 
 void MEDCouplingFieldDiscretizationGaussNE::renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                                  const int *old2NewBg, bool check)
+                                                                  const mcIdType *old2NewBg, bool check)
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::renumberArraysForCell : NULL input mesh !");
-  const int *array=old2NewBg;
+  const mcIdType *array=old2NewBg;
   if(check)
-    array=DataArrayInt::CheckAndPreparePermutation(old2NewBg,old2NewBg+mesh->getNumberOfCells());
-  int nbOfCells=mesh->getNumberOfCells();
-  int nbOfTuples=getNumberOfTuples(mesh);
-  int *array2=new int[nbOfTuples];//stores the final conversion array old2New to give to arrays in renumberInPlace.
-  int *array3=new int[nbOfCells];//store for each cell in after renumbering the offset needed by each cell in new numbering.
+    array=DataArrayIdType::CheckAndPreparePermutation(old2NewBg,old2NewBg+mesh->getNumberOfCells());
+  mcIdType nbOfCells=mesh->getNumberOfCells();
+  mcIdType nbOfTuples=getNumberOfTuples(mesh);
+  mcIdType *array2=new mcIdType[nbOfTuples];//stores the final conversion array old2New to give to arrays in renumberInPlace.
+  mcIdType *array3=new mcIdType[nbOfCells];//store for each cell in after renumbering the offset needed by each cell in new numbering.
   array3[0]=0;
-  for(int i=1;i<nbOfCells;i++)
+  for(mcIdType i=1;i<nbOfCells;i++)
     {
-      INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell((int)std::distance(array,std::find(array,array+nbOfCells,i-1)));
+      INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(ToIdType(std::distance(array,std::find(array,array+nbOfCells,i-1))));
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
       array3[i]=array3[i-1]+cm.getNumberOfNodes();
     }
-  int j=0;
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType j=0;
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
-      for(int k=0;k<(int)cm.getNumberOfNodes();k++,j++)
+      for(mcIdType k=0;k<ToIdType(cm.getNumberOfNodes());k++,j++)
         array2[j]=array3[array[i]]+k;
     }
   delete [] array3;
@@ -2326,7 +2327,7 @@ void MEDCouplingFieldDiscretizationGaussNE::renumberArraysForCell(const MEDCoupl
       (*it)->renumberInPlace(array2);
   delete [] array2;
   if(check)
-    free(const_cast<int *>(array));
+    free(const_cast<mcIdType *>(array));
 }
 
 DataArrayDouble *MEDCouplingFieldDiscretizationGaussNE::getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const
@@ -2335,16 +2336,16 @@ DataArrayDouble *MEDCouplingFieldDiscretizationGaussNE::getLocalizationOfDiscVal
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::getLocalizationOfDiscValues : NULL input mesh !");
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   MCAuto<MEDCouplingUMesh> umesh=mesh->buildUnstructured();//in general do nothing
-  int nbOfTuples=getNumberOfTuples(umesh);
+  mcIdType nbOfTuples=getNumberOfTuples(umesh);
   int spaceDim=mesh->getSpaceDimension();
   ret->alloc(nbOfTuples,spaceDim);
   const double *coords=umesh->getCoords()->begin();
-  const int *connI=umesh->getNodalConnectivityIndex()->getConstPointer();
-  const int *conn=umesh->getNodalConnectivity()->getConstPointer();
-  int nbCells=umesh->getNumberOfCells();
+  const mcIdType *connI=umesh->getNodalConnectivityIndex()->getConstPointer();
+  const mcIdType *conn=umesh->getNodalConnectivity()->getConstPointer();
+  mcIdType nbCells=umesh->getNumberOfCells();
   double *retPtr=ret->getPointer();
-  for(int i=0;i<nbCells;i++,connI++)
-    for(const int *w=conn+connI[0]+1;w!=conn+connI[1];w++)
+  for(mcIdType i=0;i<nbCells;i++,connI++)
+    for(const mcIdType *w=conn+connI[0]+1;w!=conn+connI[1];w++)
       if(*w>=0)
         retPtr=std::copy(coords+(*w)*spaceDim,coords+((*w)+1)*spaceDim,retPtr);
   return ret.retn();
@@ -2357,12 +2358,12 @@ void MEDCouplingFieldDiscretizationGaussNE::integral(const MEDCouplingMesh *mesh
 {
   if(!mesh || !arr)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::integral : input mesh or array is null !");
-  int nbOfCompo=arr->getNumberOfComponents();
+  std::size_t nbOfCompo=arr->getNumberOfComponents();
   std::fill(res,res+nbOfCompo,0.);
   //
   MCAuto<MEDCouplingFieldDouble> vol=mesh->getMeasureField(isWAbs);
   std::set<INTERP_KERNEL::NormalizedCellType> types=mesh->getAllGeoTypes();
-  MCAuto<DataArrayInt> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
+  MCAuto<DataArrayIdType> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
   nbOfNodesPerCell->computeOffsetsFull();
   const double *arrPtr=arr->begin(),*volPtr=vol->getArray()->begin();
   for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator it=types.begin();it!=types.end();it++)
@@ -2372,13 +2373,13 @@ void MEDCouplingFieldDiscretizationGaussNE::integral(const MEDCouplingMesh *mesh
       INTERP_KERNEL::AutoPtr<double> wArr2=new double[wArrSz];
       double sum=std::accumulate(wArr,wArr+wArrSz,0.);
       std::transform(wArr,wArr+wArrSz,(double *)wArr2,std::bind2nd(std::multiplies<double>(),1./sum));      
-      MCAuto<DataArrayInt> ids=mesh->giveCellsWithType(*it);
-      MCAuto<DataArrayInt> ids2=ids->buildExplicitArrByRanges(nbOfNodesPerCell);
-      const int *ptIds2=ids2->begin(),*ptIds=ids->begin();
-      int nbOfCellsWithCurGeoType=ids->getNumberOfTuples();
-      for(int i=0;i<nbOfCellsWithCurGeoType;i++,ptIds++,ptIds2+=wArrSz)
+      MCAuto<DataArrayIdType> ids=mesh->giveCellsWithType(*it);
+      MCAuto<DataArrayIdType> ids2=ids->buildExplicitArrByRanges(nbOfNodesPerCell);
+      const mcIdType *ptIds2=ids2->begin(),*ptIds=ids->begin();
+      mcIdType nbOfCellsWithCurGeoType=ids->getNumberOfTuples();
+      for(mcIdType i=0;i<nbOfCellsWithCurGeoType;i++,ptIds++,ptIds2+=wArrSz)
         {
-          for(int k=0;k<nbOfCompo;k++)
+          for(std::size_t k=0;k<nbOfCompo;k++)
             {
               double tmp=0.;
               for(std::size_t j=0;j<wArrSz;j++)
@@ -2394,61 +2395,61 @@ const double *MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometric
   switch(geoType)
   {
     case INTERP_KERNEL::NORM_POINT1:
-      lgth=(int)sizeof(FGP_POINT1)/sizeof(double);
+      lgth=sizeof(FGP_POINT1)/sizeof(double);
       return FGP_POINT1;
     case INTERP_KERNEL::NORM_SEG2:
-      lgth=(int)sizeof(FGP_SEG2)/sizeof(double);
+      lgth=sizeof(FGP_SEG2)/sizeof(double);
       return FGP_SEG2;
     case INTERP_KERNEL::NORM_SEG3:
-      lgth=(int)sizeof(FGP_SEG3)/sizeof(double);
+      lgth=sizeof(FGP_SEG3)/sizeof(double);
       return FGP_SEG3;
     case INTERP_KERNEL::NORM_SEG4:
-      lgth=(int)sizeof(FGP_SEG4)/sizeof(double);
+      lgth=sizeof(FGP_SEG4)/sizeof(double);
       return FGP_SEG4;
     case INTERP_KERNEL::NORM_TRI3:
-      lgth=(int)sizeof(FGP_TRI3)/sizeof(double);
+      lgth=sizeof(FGP_TRI3)/sizeof(double);
       return FGP_TRI3;
     case INTERP_KERNEL::NORM_TRI6:
-      lgth=(int)sizeof(FGP_TRI6)/sizeof(double);
+      lgth=sizeof(FGP_TRI6)/sizeof(double);
       return FGP_TRI6;
     case INTERP_KERNEL::NORM_TRI7:
-      lgth=(int)sizeof(FGP_TRI7)/sizeof(double);
+      lgth=sizeof(FGP_TRI7)/sizeof(double);
       return FGP_TRI7;
     case INTERP_KERNEL::NORM_QUAD4:
-      lgth=(int)sizeof(FGP_QUAD4)/sizeof(double);
+      lgth=sizeof(FGP_QUAD4)/sizeof(double);
       return FGP_QUAD4;
     case INTERP_KERNEL::NORM_QUAD8:
-      lgth=(int)sizeof(FGP_QUAD8)/sizeof(double);
+      lgth=sizeof(FGP_QUAD8)/sizeof(double);
       return FGP_QUAD8;
     case INTERP_KERNEL::NORM_QUAD9:
-      lgth=(int)sizeof(FGP_QUAD9)/sizeof(double);
+      lgth=sizeof(FGP_QUAD9)/sizeof(double);
       return FGP_QUAD9;
     case INTERP_KERNEL::NORM_TETRA4:
-      lgth=(int)sizeof(FGP_TETRA4)/sizeof(double);
+      lgth=sizeof(FGP_TETRA4)/sizeof(double);
       return FGP_TETRA4;
     case INTERP_KERNEL::NORM_TETRA10:
-      lgth=(int)sizeof(FGP_TETRA10)/sizeof(double);
+      lgth=sizeof(FGP_TETRA10)/sizeof(double);
       return FGP_TETRA10;
     case INTERP_KERNEL::NORM_PENTA6:
-      lgth=(int)sizeof(FGP_PENTA6)/sizeof(double);
+      lgth=sizeof(FGP_PENTA6)/sizeof(double);
       return FGP_PENTA6;
     case INTERP_KERNEL::NORM_PENTA15:
-      lgth=(int)sizeof(FGP_PENTA15)/sizeof(double);
+      lgth=sizeof(FGP_PENTA15)/sizeof(double);
       return FGP_PENTA15;
     case INTERP_KERNEL::NORM_HEXA8:
-      lgth=(int)sizeof(FGP_HEXA8)/sizeof(double);
+      lgth=sizeof(FGP_HEXA8)/sizeof(double);
       return FGP_HEXA8;
     case INTERP_KERNEL::NORM_HEXA20:
-      lgth=(int)sizeof(FGP_HEXA20)/sizeof(double);
+      lgth=sizeof(FGP_HEXA20)/sizeof(double);
       return FGP_HEXA20;
     case INTERP_KERNEL::NORM_HEXA27:
-      lgth=(int)sizeof(FGP_HEXA27)/sizeof(double);
+      lgth=sizeof(FGP_HEXA27)/sizeof(double);
       return FGP_HEXA27;
     case INTERP_KERNEL::NORM_PYRA5:
-      lgth=(int)sizeof(FGP_PYRA5)/sizeof(double);
+      lgth=sizeof(FGP_PYRA5)/sizeof(double);
       return FGP_PYRA5;
     case INTERP_KERNEL::NORM_PYRA13:
-      lgth=(int)sizeof(FGP_PYRA13)/sizeof(double);
+      lgth=sizeof(FGP_PYRA13)/sizeof(double);
       return FGP_PYRA13;
     default:
       throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometricType : only SEG[2,3,4], TRI[3,6,7], QUAD[4,9], TETRA[4,10], PENTA[6,15], HEXA[8,20,27], PYRA[5,13] supported !");
@@ -2463,58 +2464,58 @@ const double *MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricTy
       lgth=0;
       return 0;
     case INTERP_KERNEL::NORM_SEG2:
-      lgth=(int)sizeof(REF_SEG2)/sizeof(double);
+      lgth=sizeof(REF_SEG2)/sizeof(double);
       return REF_SEG2;
     case INTERP_KERNEL::NORM_SEG3:
-      lgth=(int)sizeof(REF_SEG3)/sizeof(double);
+      lgth=sizeof(REF_SEG3)/sizeof(double);
       return REF_SEG3;
     case INTERP_KERNEL::NORM_SEG4:
-      lgth=(int)sizeof(REF_SEG4)/sizeof(double);
+      lgth=sizeof(REF_SEG4)/sizeof(double);
       return REF_SEG4;
     case INTERP_KERNEL::NORM_TRI3:
-      lgth=(int)sizeof(REF_TRI3)/sizeof(double);
+      lgth=sizeof(REF_TRI3)/sizeof(double);
       return REF_TRI3;
     case INTERP_KERNEL::NORM_TRI6:
-      lgth=(int)sizeof(REF_TRI6)/sizeof(double);
+      lgth=sizeof(REF_TRI6)/sizeof(double);
       return REF_TRI6;
     case INTERP_KERNEL::NORM_TRI7:
-      lgth=(int)sizeof(REF_TRI7)/sizeof(double);
+      lgth=sizeof(REF_TRI7)/sizeof(double);
       return REF_TRI7;
     case INTERP_KERNEL::NORM_QUAD4:
-      lgth=(int)sizeof(REF_QUAD4)/sizeof(double);
+      lgth=sizeof(REF_QUAD4)/sizeof(double);
       return REF_QUAD4;
     case INTERP_KERNEL::NORM_QUAD8:
-      lgth=(int)sizeof(REF_QUAD8)/sizeof(double);
+      lgth=sizeof(REF_QUAD8)/sizeof(double);
       return REF_QUAD8;
     case INTERP_KERNEL::NORM_QUAD9:
-      lgth=(int)sizeof(REF_QUAD9)/sizeof(double);
+      lgth=sizeof(REF_QUAD9)/sizeof(double);
       return REF_QUAD9;
     case INTERP_KERNEL::NORM_TETRA4:
-      lgth=(int)sizeof(REF_TETRA4)/sizeof(double);
+      lgth=sizeof(REF_TETRA4)/sizeof(double);
       return REF_TETRA4;
     case INTERP_KERNEL::NORM_TETRA10:
-      lgth=(int)sizeof(REF_TETRA10)/sizeof(double);
+      lgth=sizeof(REF_TETRA10)/sizeof(double);
       return REF_TETRA10;
     case INTERP_KERNEL::NORM_PENTA6:
-      lgth=(int)sizeof(REF_PENTA6)/sizeof(double);
+      lgth=sizeof(REF_PENTA6)/sizeof(double);
       return REF_PENTA6;
     case INTERP_KERNEL::NORM_PENTA15:
-      lgth=(int)sizeof(REF_PENTA15)/sizeof(double);
+      lgth=sizeof(REF_PENTA15)/sizeof(double);
       return REF_PENTA15;
     case INTERP_KERNEL::NORM_HEXA8:
-      lgth=(int)sizeof(REF_HEXA8)/sizeof(double);
+      lgth=sizeof(REF_HEXA8)/sizeof(double);
       return REF_HEXA8;
     case INTERP_KERNEL::NORM_HEXA20:
-      lgth=(int)sizeof(REF_HEXA20)/sizeof(double);
+      lgth=sizeof(REF_HEXA20)/sizeof(double);
       return REF_HEXA20;
     case INTERP_KERNEL::NORM_HEXA27:
-      lgth=(int)sizeof(REF_HEXA27)/sizeof(double);
+      lgth=sizeof(REF_HEXA27)/sizeof(double);
       return REF_HEXA27;
     case INTERP_KERNEL::NORM_PYRA5:
-      lgth=(int)sizeof(REF_PYRA5)/sizeof(double);
+      lgth=sizeof(REF_PYRA5)/sizeof(double);
       return REF_PYRA5;
     case INTERP_KERNEL::NORM_PYRA13:
-      lgth=(int)sizeof(REF_PYRA13)/sizeof(double);
+      lgth=sizeof(REF_PYRA13)/sizeof(double);
       return REF_PYRA13;
     default:
       throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricType : only SEG[2,3,4], TRI[3,6,7], QUAD[4,8,9], TETRA[4,10], PENTA[6,15], HEXA[8,20,27], PYRA[5,13] supported !");
@@ -2532,92 +2533,92 @@ const double *MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType(IN
       }
     case INTERP_KERNEL::NORM_SEG2:
       {
-        lgth=(int)sizeof(LOC_SEG2)/sizeof(double);
+        lgth=sizeof(LOC_SEG2)/sizeof(double);
         return LOC_SEG2;
       }
     case INTERP_KERNEL::NORM_SEG3:
       {
-        lgth=(int)sizeof(LOC_SEG3)/sizeof(double);
+        lgth=sizeof(LOC_SEG3)/sizeof(double);
         return LOC_SEG3;
       }
     case INTERP_KERNEL::NORM_SEG4:
       {
-        lgth=(int)sizeof(LOC_SEG4)/sizeof(double);
+        lgth=sizeof(LOC_SEG4)/sizeof(double);
         return LOC_SEG4;
       }
     case INTERP_KERNEL::NORM_TRI3:
       {
-        lgth=(int)sizeof(LOC_TRI3)/sizeof(double);
+        lgth=sizeof(LOC_TRI3)/sizeof(double);
         return LOC_TRI3;
       }
     case INTERP_KERNEL::NORM_TRI6:
       {
-        lgth=(int)sizeof(LOC_TRI6)/sizeof(double);
+        lgth=sizeof(LOC_TRI6)/sizeof(double);
         return LOC_TRI6;
       }
     case INTERP_KERNEL::NORM_TRI7:
       {
-        lgth=(int)sizeof(LOC_TRI7)/sizeof(double);
+        lgth=sizeof(LOC_TRI7)/sizeof(double);
         return LOC_TRI7;
       }
     case INTERP_KERNEL::NORM_QUAD4:
       {
-        lgth=(int)sizeof(LOC_QUAD4)/sizeof(double);
+        lgth=sizeof(LOC_QUAD4)/sizeof(double);
         return LOC_QUAD4;
       }
     case INTERP_KERNEL::NORM_QUAD8:
       {
-        lgth=(int)sizeof(LOC_QUAD8)/sizeof(double);
+        lgth=sizeof(LOC_QUAD8)/sizeof(double);
         return LOC_QUAD8;
       }
     case INTERP_KERNEL::NORM_QUAD9:
       {
-        lgth=(int)sizeof(LOC_QUAD9)/sizeof(double);
+        lgth=sizeof(LOC_QUAD9)/sizeof(double);
         return LOC_QUAD9;
       }
     case INTERP_KERNEL::NORM_TETRA4:
       {
-        lgth=(int)sizeof(LOC_TETRA4)/sizeof(double);
+        lgth=sizeof(LOC_TETRA4)/sizeof(double);
         return LOC_TETRA4;
       }
     case INTERP_KERNEL::NORM_TETRA10:
       {
-        lgth=(int)sizeof(LOC_TETRA10)/sizeof(double);
+        lgth=sizeof(LOC_TETRA10)/sizeof(double);
         return LOC_TETRA10;
       }
     case INTERP_KERNEL::NORM_PENTA6:
       {
-        lgth=(int)sizeof(LOC_PENTA6)/sizeof(double);
+        lgth=sizeof(LOC_PENTA6)/sizeof(double);
         return LOC_PENTA6;
       }
     case INTERP_KERNEL::NORM_PENTA15:
       {
-        lgth=(int)sizeof(LOC_PENTA15)/sizeof(double);
+        lgth=sizeof(LOC_PENTA15)/sizeof(double);
         return LOC_PENTA15;
       }
     case INTERP_KERNEL::NORM_HEXA8:
       {
-        lgth=(int)sizeof(LOC_HEXA8)/sizeof(double);
+        lgth=sizeof(LOC_HEXA8)/sizeof(double);
         return LOC_HEXA8;
       }
     case INTERP_KERNEL::NORM_HEXA20:
       {
-        lgth=(int)sizeof(LOC_HEXA20)/sizeof(double);
+        lgth=sizeof(LOC_HEXA20)/sizeof(double);
         return LOC_HEXA20;
       }
     case INTERP_KERNEL::NORM_HEXA27:
       {
-        lgth=(int)sizeof(LOC_HEXA27)/sizeof(double);
+        lgth=sizeof(LOC_HEXA27)/sizeof(double);
         return LOC_HEXA27;
       }
     case INTERP_KERNEL::NORM_PYRA5:
       {
-        lgth=(int)sizeof(LOC_PYRA5)/sizeof(double);
+        lgth=sizeof(LOC_PYRA5)/sizeof(double);
         return LOC_PYRA5;
       }
     case INTERP_KERNEL::NORM_PYRA13:
       {
-        lgth=(int)sizeof(LOC_PYRA13)/sizeof(double);
+        lgth=sizeof(LOC_PYRA13)/sizeof(double);
         return LOC_PYRA13;
       }
     default:
@@ -2625,16 +2626,16 @@ const double *MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType(IN
   }
 }
 
-void MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                                               DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const
+void MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                                               DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::computeMeshRestrictionFromTupleIds : NULL input mesh !");
-  MCAuto<DataArrayInt> tmp=DataArrayInt::New(); tmp->alloc((int)std::distance(tupleIdsBg,tupleIdsEnd),1);
+  MCAuto<DataArrayIdType> tmp=DataArrayIdType::New(); tmp->alloc(std::distance(tupleIdsBg,tupleIdsEnd),1);
   std::copy(tupleIdsBg,tupleIdsEnd,tmp->getPointer());
   tmp->sort(true);
   tmp=tmp->buildUnique();
-  MCAuto<DataArrayInt> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
+  MCAuto<DataArrayIdType> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
   nbOfNodesPerCell->computeOffsetsFull();
   nbOfNodesPerCell->findIdsRangesInListOfIds(tmp,cellRestriction,trueTupleRestriction);
 }
@@ -2643,12 +2644,12 @@ void MEDCouplingFieldDiscretizationGaussNE::checkCompatibilityWithNature(NatureO
 {
 }
 
-double MEDCouplingFieldDiscretizationGaussNE::getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const
+double MEDCouplingFieldDiscretizationGaussNE::getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::getIJK : NULL input mesh !");
-  int offset=0;
-  for(int i=0;i<cellId;i++)
+  mcIdType offset=0;
+  for(mcIdType i=0;i<cellId;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
@@ -2659,7 +2660,7 @@ double MEDCouplingFieldDiscretizationGaussNE::getIJK(const MEDCouplingMesh *mesh
 
 void MEDCouplingFieldDiscretizationGaussNE::checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const
 {
-  std::size_t nbOfTuples(getNumberOfTuples(mesh));
+  mcIdType nbOfTuples(getNumberOfTuples(mesh));
   if(nbOfTuples!=da->getNumberOfTuples())
     {
       std::ostringstream oss; oss << "Invalid number of tuples in the array : expecting " << nbOfTuples << " !";
@@ -2677,8 +2678,8 @@ MEDCouplingFieldDouble *MEDCouplingFieldDiscretizationGaussNE::getMeasureField(c
   ret->setMesh(mesh);
   //
   std::set<INTERP_KERNEL::NormalizedCellType> types=mesh->getAllGeoTypes();
-  MCAuto<DataArrayInt> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
-  int nbTuples=nbOfNodesPerCell->accumulate(0);
+  MCAuto<DataArrayIdType> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
+  mcIdType nbTuples=nbOfNodesPerCell->accumulate((std::size_t)0);
   nbOfNodesPerCell->computeOffsetsFull();
   MCAuto<DataArrayDouble> arr=DataArrayDouble::New(); arr->alloc(nbTuples,1);
   ret->setArray(arr);
@@ -2690,11 +2691,11 @@ MEDCouplingFieldDouble *MEDCouplingFieldDiscretizationGaussNE::getMeasureField(c
       INTERP_KERNEL::AutoPtr<double> wArr2=new double[wArrSz];
       double sum=std::accumulate(wArr,wArr+wArrSz,0.);
       std::transform(wArr,wArr+wArrSz,(double *)wArr2,std::bind2nd(std::multiplies<double>(),1./sum));      
-      MCAuto<DataArrayInt> ids=mesh->giveCellsWithType(*it);
-      MCAuto<DataArrayInt> ids2=ids->buildExplicitArrByRanges(nbOfNodesPerCell);
-      const int *ptIds2=ids2->begin(),*ptIds=ids->begin();
-      int nbOfCellsWithCurGeoType=ids->getNumberOfTuples();
-      for(int i=0;i<nbOfCellsWithCurGeoType;i++,ptIds++)
+      MCAuto<DataArrayIdType> ids=mesh->giveCellsWithType(*it);
+      MCAuto<DataArrayIdType> ids2=ids->buildExplicitArrByRanges(nbOfNodesPerCell);
+      const mcIdType *ptIds2=ids2->begin(),*ptIds=ids->begin();
+      mcIdType nbOfCellsWithCurGeoType=ids->getNumberOfTuples();
+      for(mcIdType i=0;i<nbOfCellsWithCurGeoType;i++,ptIds++)
         for(std::size_t j=0;j<wArrSz;j++,ptIds2++)
           arrPtr[*ptIds2]=wArr2[j]*volPtr[*ptIds];
     }
@@ -2707,21 +2708,21 @@ void MEDCouplingFieldDiscretizationGaussNE::getValueOn(const DataArrayDouble *ar
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
 
-void MEDCouplingFieldDiscretizationGaussNE::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
+void MEDCouplingFieldDiscretizationGaussNE::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const
 {
   throw INTERP_KERNEL::Exception("getValueOnPos(i,j,k) : Not applicable for Gauss points !");
 }
 
-DataArrayDouble *MEDCouplingFieldDiscretizationGaussNE::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const
+DataArrayDouble *MEDCouplingFieldDiscretizationGaussNE::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const
 {
   throw INTERP_KERNEL::Exception("getValueOnMulti : Not implemented for Gauss NE !");
 }
 
-MEDCouplingMesh *MEDCouplingFieldDiscretizationGaussNE::buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationGaussNE::buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::buildSubMeshData : NULL input mesh !");
-  MCAuto<DataArrayInt> diSafe=computeTupleIdsToSelectFromCellIds(mesh,start,end);
+  MCAuto<DataArrayIdType> diSafe=computeTupleIdsToSelectFromCellIds(mesh,start,end);
   MCAuto<MEDCouplingMesh> ret=mesh->buildPart(start,end);
   di=diSafe.retn();
   return ret.retn();
@@ -2737,22 +2738,22 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationGaussNE::buildSubMeshData(const M
  *
  * \sa MEDCouplingFieldDiscretizationGauss::buildSubMeshData
  */
-MEDCouplingMesh *MEDCouplingFieldDiscretizationGaussNE::buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+MEDCouplingMesh *MEDCouplingFieldDiscretizationGaussNE::buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
 {
   if(stepCellIds!=1)//even for stepCellIds==-1 the output will not be a range
     return MEDCouplingFieldDiscretization::buildSubMeshDataRange(mesh,beginCellIds,endCellIds,stepCellIds,beginOut,endOut,stepOut,di);
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::buildSubMeshDataRange : NULL input mesh !");
-  int nbOfCells=mesh->getNumberOfCells();
+  mcIdType nbOfCells=mesh->getNumberOfCells();
   di=0; beginOut=0; endOut=0; stepOut=stepCellIds;
   const char msg[]="MEDCouplingFieldDiscretizationGaussNE::buildSubMeshDataRange : cell #";
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
       if(cm.isDynamic())
         { std::ostringstream oss; oss << msg << i << " presence of dynamic cell (polygons and polyedrons) ! Not implemented !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); }
-      int delta=cm.getNumberOfNodes();
+      mcIdType delta=cm.getNumberOfNodes();
       if(i<beginCellIds)
         beginOut+=delta;
       endOut+=delta;
@@ -2771,24 +2772,24 @@ MEDCouplingMesh *MEDCouplingFieldDiscretizationGaussNE::buildSubMeshDataRange(co
  * \return a newly allocated array containing ids to select into the DataArrayDouble of the field.
  * 
  */
-DataArrayInt *MEDCouplingFieldDiscretizationGaussNE::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const
+DataArrayIdType *MEDCouplingFieldDiscretizationGaussNE::computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationGaussNE::computeTupleIdsToSelectFromCellIds : null mesh !");
-  MCAuto<DataArrayInt> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
+  MCAuto<DataArrayIdType> nbOfNodesPerCell=mesh->computeNbOfNodesPerCell();
   nbOfNodesPerCell->computeOffsetsFull();
-  MCAuto<DataArrayInt> sel=DataArrayInt::New(); sel->useArray(startCellIds,false,DeallocType::CPP_DEALLOC,(int)std::distance(startCellIds,endCellIds),1);
+  MCAuto<DataArrayIdType> sel=DataArrayIdType::New(); sel->useArray(startCellIds,false,DeallocType::CPP_DEALLOC,std::distance(startCellIds,endCellIds),1);
   return sel->buildExplicitArrByRanges(nbOfNodesPerCell);
 }
 
 /*!
  * No implementation needed !
  */
-void MEDCouplingFieldDiscretizationGaussNE::renumberValuesOnNodes(double , const int *, int newNbOfNodes, DataArrayDouble *) const
+void MEDCouplingFieldDiscretizationGaussNE::renumberValuesOnNodes(double , const mcIdType *, mcIdType newNbOfNodes, DataArrayDouble *) const
 {
 }
 
-void MEDCouplingFieldDiscretizationGaussNE::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationGaussNE::renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const
 {
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
@@ -2798,7 +2799,7 @@ MCAuto<MEDCouplingFieldDiscretization> MEDCouplingFieldDiscretizationGaussNE::ag
   return EasyAggregate<MEDCouplingFieldDiscretizationGaussNE>(fds);
 }
 
-void MEDCouplingFieldDiscretizationGaussNE::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const
+void MEDCouplingFieldDiscretizationGaussNE::renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const
 {
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
@@ -2870,21 +2871,22 @@ void MEDCouplingFieldDiscretizationKriging::getValueOn(const DataArrayDouble *ar
   std::copy(res2->begin(),res2->end(),res);
 }
 
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfTargetPoints) const
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfTargetPoints) const
 {
   if(!arr || !arr->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationKriging::getValueOnMulti : input array is null or not allocated !");
-  std::size_t nbOfRows(getNumberOfMeshPlaces(mesh));
+  mcIdType nbOfRows=getNumberOfMeshPlaces(mesh);
   if(arr->getNumberOfTuples()!=nbOfRows)
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationKriging::getValueOnMulti : input array does not have correct number of tuples ! Excepted " << nbOfRows << " having " << arr->getNumberOfTuples() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  int nbCols(-1),nbCompo(arr->getNumberOfComponents());
+  mcIdType nbCols(-1);
+  std::size_t nbCompo=arr->getNumberOfComponents();
   MCAuto<DataArrayDouble> m(computeEvaluationMatrixOnGivenPts(mesh,loc,nbOfTargetPoints,nbCols));
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   ret->alloc(nbOfTargetPoints,nbCompo);
-  INTERP_KERNEL::matrixProduct(m->begin(),nbOfTargetPoints,nbCols,arr->begin(),nbOfRows,nbCompo,ret->getPointer());
+  INTERP_KERNEL::matrixProduct(m->begin(),nbOfTargetPoints,nbCols,arr->begin(),nbOfRows,ToIdType(nbCompo),ret->getPointer());
   return ret.retn();
 }
 
@@ -2903,13 +2905,14 @@ MCAuto<MEDCouplingFieldDiscretization> MEDCouplingFieldDiscretizationKriging::ag
  * 
  * \return the new result matrix to be deallocated by the caller.
  */
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, const double *loc, int nbOfTargetPoints, int& nbCols) const
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfTargetPoints, mcIdType& nbCols) const
 {
-  int isDrift(-1),nbRows(-1);
+  mcIdType isDrift(-1),nbRows(-1);
   MCAuto<DataArrayDouble> matrixInv(computeInverseMatrix(mesh,isDrift,nbRows));
   //
   MCAuto<DataArrayDouble> coords=getLocalizationOfDiscValues(mesh);
-  int nbOfPts(coords->getNumberOfTuples()),dimension(coords->getNumberOfComponents());
+  mcIdType nbOfPts(coords->getNumberOfTuples());
+  std::size_t dimension(coords->getNumberOfComponents());
   MCAuto<DataArrayDouble> locArr=DataArrayDouble::New();
   locArr->useArray(loc,false,DeallocType::CPP_DEALLOC,nbOfTargetPoints,dimension);
   nbCols=nbOfPts;
@@ -2921,12 +2924,12 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixO
   matrix3->alloc(nbOfTargetPoints*nbRows,1);
   double *work=matrix3->getPointer();
   const double *workCst(matrix2->begin()),*workCst2(loc);
-  for(int i=0;i<nbOfTargetPoints;i++,workCst+=nbOfPts,workCst2+=isDrift-1)
+  for(mcIdType i=0;i<nbOfTargetPoints;i++,workCst+=nbOfPts,workCst2+=isDrift-1)
     {
-      for(int j=0;j<nbOfPts;j++)
+      for(mcIdType j=0;j<nbOfPts;j++)
         work[i*nbRows+j]=workCst[j];
       work[i*nbRows+nbOfPts]=1.0;
-      for(int j=0;j<isDrift-1;j++)
+      for(mcIdType j=0;j<isDrift-1;j++)
         work[i*nbRows+(nbOfPts+1+j)]=workCst2[j];
     }
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
@@ -2935,7 +2938,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixO
   MCAuto<DataArrayDouble> ret2(DataArrayDouble::New());
   ret2->alloc(nbOfTargetPoints*nbOfPts,1);
   workCst=ret->begin(); work=ret2->getPointer();
-  for(int i=0;i<nbOfTargetPoints;i++,workCst+=nbRows)
+  for(mcIdType i=0;i<nbOfTargetPoints;i++,workCst+=nbRows)
     work=std::copy(workCst,workCst+nbOfPts,work);
   return ret2.retn();
 }
@@ -2949,7 +2952,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixO
  * \return the new result matrix to be deallocated by the caller.
  * \sa computeMatrix
  */
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeInverseMatrix(const MEDCouplingMesh *mesh, int& isDrift, int& matSz) const
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeInverseMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const
 {
   MCAuto<DataArrayDouble> matrixWithDrift(computeMatrix(mesh,isDrift,matSz));
   MCAuto<DataArrayDouble> matrixInv(DataArrayDouble::New());
@@ -2963,12 +2966,12 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeInverseMatrix(con
  * \return the new result matrix to be deallocated by the caller.
  * \sa computeInverseMatrix
  */
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeMatrix(const MEDCouplingMesh *mesh, int& isDrift, int& matSz) const
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const
 {
   if(!mesh)
       throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationKriging::computeMatrix : NULL input mesh !");
     MCAuto<DataArrayDouble> coords(getLocalizationOfDiscValues(mesh));
-    int nbOfPts(coords->getNumberOfTuples());
+    mcIdType nbOfPts(coords->getNumberOfTuples());
     MCAuto<DataArrayDouble> matrix(coords->buildEuclidianDistanceDenseMatrix());
     operateOnDenseMatrix(mesh->getSpaceDimension(),nbOfPts*nbOfPts,matrix->getPointer());
     // Drift
@@ -2987,9 +2990,9 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeMatrix(const MEDC
  *              Whatever the value of \a isDrift the number of tuples of returned DataArrayDouble  will be equal to \c arr->getNumberOfTuples() + \a isDrift.
  * \return a newly allocated array containing coefficients including or not drift coefficient at the end depending the value of \a isDrift parameter.
  */
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, int& isDrift) const
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, mcIdType& isDrift) const
 {
-  int nbRows(-1);
+  mcIdType nbRows(-1);
   MCAuto<DataArrayDouble> matrixInv(computeInverseMatrix(mesh,isDrift,nbRows));
   MCAuto<DataArrayDouble> KnewiK(DataArrayDouble::New());
   KnewiK->alloc(nbRows*1,1);
@@ -3005,7 +3008,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::computeVectorOfCoefficie
  * \param [in] nbOfElems is the result of the product of nb of rows and the nb of columns of matrix \a matrixPtr
  * \param [in,out] matrixPtr is the dense matrix whose on each values the operation will be applied
  */
-void MEDCouplingFieldDiscretizationKriging::operateOnDenseMatrix(int spaceDimension, int nbOfElems, double *matrixPtr) const
+void MEDCouplingFieldDiscretizationKriging::operateOnDenseMatrix(int spaceDimension, mcIdType nbOfElems, double *matrixPtr) const
 {
   switch(spaceDimension)
   {
@@ -3029,18 +3032,18 @@ void MEDCouplingFieldDiscretizationKriging::operateOnDenseMatrix(int spaceDimens
   }
 }
 
-void MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH3(int nbOfElems, double *matrixPtr)
+void MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH3(mcIdType nbOfElems, double *matrixPtr)
 {
-  for(int i=0;i<nbOfElems;i++)
+  for(mcIdType i=0;i<nbOfElems;i++)
     {
       double val=matrixPtr[i];
       matrixPtr[i]=val*val*val;
     }
 }
 
-void MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH2Ln(int nbOfElems, double *matrixPtr)
+void MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH2Ln(mcIdType nbOfElems, double *matrixPtr)
 {
-  for(int i=0;i<nbOfElems;i++)
+  for(mcIdType i=0;i<nbOfElems;i++)
     {
       double val=matrixPtr[i];
       if(val!=0.)
@@ -3056,21 +3059,22 @@ void MEDCouplingFieldDiscretizationKriging::OperateOnDenseMatrixH2Ln(int nbOfEle
  * \param [out] delta the delta of number of columns between returned dense matrix and input dense matrix \a matr. \a delta is equal to number of components of \a arr + 1.
  * \sa performDrift
  */
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr, int& delta)
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta)
 {
   if(!matr || !matr->isAllocated() || matr->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationKriging::PerformDriftRect : invalid input dense matrix ! Must be allocated not NULL and with exactly one component !");
   if(!arr || !arr->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationKriging::PerformDriftRect : invalid input array of coordiantes ! Must be allocated and not NULL !");
-  int spaceDimension(arr->getNumberOfComponents()),nbOfPts(arr->getNumberOfTuples()),nbOfEltInMatrx(matr->getNumberOfTuples());
-  delta=spaceDimension+1;
-  int nbOfCols(nbOfEltInMatrx/nbOfPts);
+  std::size_t spaceDimension(arr->getNumberOfComponents());
+  mcIdType nbOfPts(arr->getNumberOfTuples()),nbOfEltInMatrx(matr->getNumberOfTuples());
+  delta=ToIdType(spaceDimension)+1;
+  mcIdType nbOfCols(nbOfEltInMatrx/nbOfPts);
   if(nbOfEltInMatrx%nbOfPts!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationKriging::PerformDriftRect : size of input dense matrix and input arrays mismatch ! NbOfElems in matrix % nb of tuples in array must be equal to 0 !");
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfPts*(nbOfCols+delta));
   double *retPtr(ret->getPointer());
   const double *mPtr(matr->begin()),*aPtr(arr->begin());
-  for(int i=0;i<nbOfPts;i++,aPtr+=spaceDimension,mPtr+=nbOfCols)
+  for(mcIdType i=0;i<nbOfPts;i++,aPtr+=spaceDimension,mPtr+=nbOfCols)
     {
       retPtr=std::copy(mPtr,mPtr+nbOfCols,retPtr);
       *retPtr++=1.;
@@ -3083,7 +3087,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::PerformDriftRect(const D
  * \return a newly allocated array having \a isDrift more tuples than \a arr.
  * \sa computeVectorOfCoefficients
  */
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::PerformDriftOfVec(const DataArrayDouble *arr, int isDrift)
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::PerformDriftOfVec(const DataArrayDouble *arr, mcIdType isDrift)
 {
   if(!arr || !arr->isAllocated() || arr->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationKriging::PerformDriftOfVec : input array must be not NULL allocated and with one component !");
@@ -3107,11 +3111,11 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::PerformDriftOfVec(const
  * \return a newly allocated matrix bigger than input matrix \a matr.
  * \sa MEDCouplingFieldDiscretizationKriging::PerformDriftRect
  */
-DataArrayDouble *MEDCouplingFieldDiscretizationKriging::performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr, int& delta) const
+DataArrayDouble *MEDCouplingFieldDiscretizationKriging::performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta) const
 {
   std::size_t spaceDimension(arr->getNumberOfComponents());
-  delta=spaceDimension+1;
-  std::size_t szOfMatrix(arr->getNumberOfTuples());
+  delta=ToIdType(spaceDimension)+1;
+  mcIdType szOfMatrix(arr->getNumberOfTuples());
   if(szOfMatrix*szOfMatrix!=matr->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretizationKriging::performDrift : invalid size");
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
@@ -3119,7 +3123,7 @@ DataArrayDouble *MEDCouplingFieldDiscretizationKriging::performDrift(const DataA
   const double *srcWork=matr->getConstPointer();
   const double *srcWork2=arr->getConstPointer();
   double *destWork=ret->getPointer();
-  for(std::size_t i=0;i<szOfMatrix;i++)
+  for(mcIdType i=0;i<szOfMatrix;i++)
     {
       destWork=std::copy(srcWork,srcWork+szOfMatrix,destWork);
       srcWork+=szOfMatrix;
index 51736bc19f768883a01fff76cc13c0e629cd093c..da7a4ca3d15d077861f92da1cdef888e407d7a1c 100644 (file)
@@ -35,7 +35,7 @@
 namespace MEDCoupling
 {
   class DataArray;
-  class DataArrayInt;
+  class DataArrayIdType;
   class MEDCouplingMesh;
   class DataArrayDouble;
   class MEDCouplingFieldDouble;
@@ -57,61 +57,61 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *deepCopy() const;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clone() const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clonePart(const int *startCellIds, const int *endCellIds) const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clonePartRange(int beginCellIds, int endCellIds, int stepCellIds) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
     MEDCOUPLING_EXPORT virtual std::string getStringRepr() const = 0;
     MEDCOUPLING_EXPORT virtual const char *getRepr() const = 0;
-    MEDCOUPLING_EXPORT virtual int getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const = 0;
-    MEDCOUPLING_EXPORT virtual int getNumberOfTuples(const MEDCouplingMesh *mesh) const = 0;
-    MEDCOUPLING_EXPORT virtual int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const = 0;
     MEDCOUPLING_EXPORT virtual void normL1(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const;
     MEDCOUPLING_EXPORT virtual void normL2(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const;
     MEDCOUPLING_EXPORT virtual void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const;
     MEDCOUPLING_EXPORT virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const = 0;
-    MEDCOUPLING_EXPORT virtual void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                                       DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const = 0;
+    MEDCOUPLING_EXPORT virtual void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                                       DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const = 0;
     MEDCOUPLING_EXPORT virtual void checkCompatibilityWithNature(NatureOfField nat) const = 0;
-    MEDCOUPLING_EXPORT virtual void renumberCells(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT virtual void renumberCells(const mcIdType *old2NewBg, bool check=true);
     MEDCOUPLING_EXPORT virtual void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                          const int *old2NewBg, bool check) = 0;
-    MEDCOUPLING_EXPORT virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const;
+                                                          const mcIdType *old2NewBg, bool check) = 0;
+    MEDCOUPLING_EXPORT virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
     MEDCOUPLING_EXPORT virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const = 0;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const = 0;
     MEDCOUPLING_EXPORT virtual void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const = 0;
-    MEDCOUPLING_EXPORT virtual void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT virtual void renumberValuesOnNodes(double epsOnVals, const int *old2New, int newNbOfNodes, DataArrayDouble *arr) const = 0;
-    MEDCOUPLING_EXPORT virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const = 0;
-    MEDCOUPLING_EXPORT virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const = 0;
+    MEDCOUPLING_EXPORT virtual void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const = 0;
+    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const = 0;
+    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT virtual void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const = 0;
+    MEDCOUPLING_EXPORT virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const = 0;
+    MEDCOUPLING_EXPORT virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const = 0;
     MEDCOUPLING_EXPORT virtual MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const = 0;
-    MEDCOUPLING_EXPORT virtual void getSerializationIntArray(DataArrayInt *& arr) const;
-    MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT virtual void getSerializationIntArray(DataArrayIdType *& arr) const;
+    MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
     MEDCOUPLING_EXPORT virtual void finishUnserialization(const std::vector<double>& tinyInfo);
-    MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *& arr);
-    MEDCOUPLING_EXPORT virtual void checkForUnserialization(const std::vector<int>& tinyInfo, const DataArrayInt *arr);
+    MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr);
+    MEDCOUPLING_EXPORT virtual void checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr);
     MEDCOUPLING_EXPORT virtual void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
                                                                const std::vector<double>& gsCoo, const std::vector<double>& wg);
-    MEDCOUPLING_EXPORT virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector<double>& refCoo,
+    MEDCOUPLING_EXPORT virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
                                                                 const std::vector<double>& gsCoo, const std::vector<double>& wg);
     MEDCOUPLING_EXPORT virtual void clearGaussLocalizations();
-    MEDCOUPLING_EXPORT virtual MEDCouplingGaussLocalization& getGaussLocalization(int locId);
-    MEDCOUPLING_EXPORT virtual int getNbOfGaussLocalization() const;
-    MEDCOUPLING_EXPORT virtual int getGaussLocalizationIdOfOneCell(int cellId) const;
-    MEDCOUPLING_EXPORT virtual int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT virtual std::set<int> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT virtual void getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const;
-    MEDCOUPLING_EXPORT virtual const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId);
+    MEDCOUPLING_EXPORT virtual mcIdType getNbOfGaussLocalization() const;
+    MEDCOUPLING_EXPORT virtual mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
+    MEDCOUPLING_EXPORT virtual mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT virtual std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT virtual void getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const;
+    MEDCOUPLING_EXPORT virtual const MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId) const;
     MEDCOUPLING_EXPORT virtual void reprQuickOverview(std::ostream& stream) const = 0;
     MEDCOUPLING_EXPORT virtual ~MEDCouplingFieldDiscretization();
   protected:
     MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization();
-    MEDCOUPLING_EXPORT static void RenumberEntitiesFromO2NArr(double epsOnVals, const int *old2NewPtr, int newNbOfEntity, DataArrayDouble *arr, const std::string& msg);
-    MEDCOUPLING_EXPORT static void RenumberEntitiesFromN2OArr(const int *new2OldPtr, int new2OldSz, DataArrayDouble *arr, const std::string& msg);
+    MEDCOUPLING_EXPORT static void RenumberEntitiesFromO2NArr(double epsOnVals, const mcIdType *old2NewPtr, mcIdType newNbOfEntity, DataArrayDouble *arr, const std::string& msg);
+    MEDCOUPLING_EXPORT static void RenumberEntitiesFromN2OArr(const mcIdType *new2OldPtr, mcIdType new2OldSz, DataArrayDouble *arr, const std::string& msg);
     template<class FIELD_DISC>
     static MCAuto<MEDCouplingFieldDiscretization> EasyAggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds);
   protected:
@@ -127,28 +127,28 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT std::string getStringRepr() const;
     MEDCOUPLING_EXPORT const char *getRepr() const;
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
-    MEDCOUPLING_EXPORT int getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
-    MEDCOUPLING_EXPORT int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
     MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                  const int *old2NewBg, bool check);
+                                                  const mcIdType *old2NewBg, bool check);
     MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
     MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
-    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                               DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const;
+    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                               DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
     MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
     MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
-    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const int *old2New, int newNbOfNodes, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
     MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
   public:
     static const char REPR[];
@@ -158,24 +158,24 @@ namespace MEDCoupling
   class MEDCouplingFieldDiscretizationOnNodes : public MEDCouplingFieldDiscretization
   {
   public:
-    MEDCOUPLING_EXPORT int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT int getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
-    MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
     MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                  const int *old2NewBg, bool check);
+                                                  const mcIdType *old2NewBg, bool check);
     MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                               DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const;
+    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                               DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
     MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const int *old2New, int newNbOfNodes, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
   public:
-    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
+    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
   };
 
   class MEDCouplingFieldDiscretizationP1 : public MEDCouplingFieldDiscretizationOnNodes
@@ -189,14 +189,14 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
     MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
   public:
     static const char REPR[];
     static const TypeOfField TYPE;
   protected:
-    MEDCOUPLING_EXPORT void getValueInCell(const MEDCouplingMesh *mesh, int cellId, const DataArrayDouble *arr, const double *loc, double *res) const;
+    MEDCOUPLING_EXPORT void getValueInCell(const MEDCouplingMesh *mesh, mcIdType cellId, const DataArrayDouble *arr, const double *loc, double *res) const;
   };
 
   /*!
@@ -206,15 +206,15 @@ namespace MEDCoupling
   class MEDCouplingFieldDiscretizationPerCell : public MEDCouplingFieldDiscretization
   {
   public:
-    MEDCOUPLING_EXPORT const DataArrayInt *getArrayOfDiscIds() const;
-    MEDCOUPLING_EXPORT void setArrayOfDiscIds(const DataArrayInt *adids);
+    MEDCOUPLING_EXPORT const DataArrayIdType *getArrayOfDiscIds() const;
+    MEDCOUPLING_EXPORT void setArrayOfDiscIds(const DataArrayIdType *adids);
     MEDCOUPLING_EXPORT void checkNoOrphanCells() const;
-    MEDCOUPLING_EXPORT std::vector<DataArrayInt *> splitIntoSingleGaussDicrPerCellType(std::vector< int >& locIds) const;
+    MEDCOUPLING_EXPORT std::vector<DataArrayIdType *> splitIntoSingleGaussDicrPerCellType(std::vector< mcIdType >& locIds) const;
   protected:
     MEDCouplingFieldDiscretizationPerCell();
-    MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, const int *startCellIds, const int *endCellIds);
-    MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, int beginCellIds, int endCellIds, int stepCellIds);
-    MEDCouplingFieldDiscretizationPerCell(DataArrayInt *dpc);
+    MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, const mcIdType *startCellIds, const mcIdType *endCellIds);
+    MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds);
+    MEDCouplingFieldDiscretizationPerCell(DataArrayIdType *dpc);
     ~MEDCouplingFieldDiscretizationPerCell();
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
@@ -222,12 +222,12 @@ namespace MEDCoupling
     void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
     bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
-    void renumberCells(const int *old2NewBg, bool check);
+    void renumberCells(const mcIdType *old2NewBg, bool check);
   protected:
     void buildDiscrPerCellIfNecessary(const MEDCouplingMesh *mesh);
   protected:
     DataArrayIdType *_discr_per_cell;
-    static const int DFT_INVALID_LOCID_VALUE;
+    static const mcIdType DFT_INVALID_LOCID_VALUE;
   };
 
   class MEDCouplingFieldDiscretizationGauss : public MEDCouplingFieldDiscretizationPerCell
@@ -238,64 +238,64 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clone() const;
-    MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clonePart(const int *startCellIds, const int *endCellIds) const;
-    MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clonePartRange(int beginCellIds, int endCellIds, int stepCellIds) const;
+    MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+    MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
     MEDCOUPLING_EXPORT std::string getStringRepr() const;
     MEDCOUPLING_EXPORT const char *getRepr() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT int getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
-    MEDCOUPLING_EXPORT int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
     MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                  const int *old2NewBg, bool check);
+                                                  const mcIdType *old2NewBg, bool check);
     MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                               DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const;
+    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                               DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
     MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
     MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<double>& tinyInfo);
-    MEDCOUPLING_EXPORT void getSerializationIntArray(DataArrayInt *& arr) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *& arr);
-    MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<int>& tinyInfo, const DataArrayInt *arr);
-    MEDCOUPLING_EXPORT double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const;
+    MEDCOUPLING_EXPORT void getSerializationIntArray(DataArrayIdType *& arr) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr);
+    MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr);
+    MEDCOUPLING_EXPORT double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
     MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
     MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
-    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const int *old2New, int newNbOfNodes, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
     MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
     MEDCOUPLING_EXPORT void setGaussLocalizationOnType(const MEDCouplingMesh *mesh, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
                                                        const std::vector<double>& gsCoo, const std::vector<double>& wg);
-    MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const int *begin, const int *end, const std::vector<double>& refCoo,
+    MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
                                                         const std::vector<double>& gsCoo, const std::vector<double>& wg);
     MEDCOUPLING_EXPORT void clearGaussLocalizations();
-    MEDCOUPLING_EXPORT void setGaussLocalization(int locId, const MEDCouplingGaussLocalization& loc);
-    MEDCOUPLING_EXPORT void resizeLocalizationVector(int newSz);
-    MEDCOUPLING_EXPORT MEDCouplingGaussLocalization& getGaussLocalization(int locId);
-    MEDCOUPLING_EXPORT int getNbOfGaussLocalization() const;
-    MEDCOUPLING_EXPORT int getGaussLocalizationIdOfOneCell(int cellId) const;
-    MEDCOUPLING_EXPORT int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT std::set<int> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT void getCellIdsHavingGaussLocalization(int locId, std::vector<int>& cellIds) const;
-    MEDCOUPLING_EXPORT const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const;
-    MEDCOUPLING_EXPORT DataArrayInt *buildNbOfGaussPointPerCellField() const;
+    MEDCOUPLING_EXPORT void setGaussLocalization(mcIdType locId, const MEDCouplingGaussLocalization& loc);
+    MEDCOUPLING_EXPORT void resizeLocalizationVector(mcIdType newSz);
+    MEDCOUPLING_EXPORT MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId);
+    MEDCOUPLING_EXPORT mcIdType getNbOfGaussLocalization() const;
+    MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
+    MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT void getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const;
+    MEDCOUPLING_EXPORT const MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *buildNbOfGaussPointPerCellField() const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
   protected:
-    MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, const int *startCellIds=0, const int *endCellIds=0);
-    MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, int beginCellIds, int endCellIds, int stepCellIds);
-    MEDCouplingFieldDiscretizationGauss(DataArrayInt *dpc, const std::vector<MEDCouplingGaussLocalization>& loc):MEDCouplingFieldDiscretizationPerCell(dpc),_loc(loc) { }
+    MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, const mcIdType *startCellIds=0, const mcIdType *endCellIds=0);
+    MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds);
+    MEDCouplingFieldDiscretizationGauss(DataArrayIdType *dpc, const std::vector<MEDCouplingGaussLocalization>& loc):MEDCouplingFieldDiscretizationPerCell(dpc),_loc(loc) { }
     void zipGaussLocalizations();
-    int getOffsetOfCell(int cellId) const;
-    void checkLocalizationId(int locId) const;
-    void commonUnserialization(const std::vector<int>& tinyInfo);
+    mcIdType getOffsetOfCell(mcIdType cellId) const;
+    void checkLocalizationId(mcIdType locId) const;
+    void commonUnserialization(const std::vector<mcIdType>& tinyInfo);
   public:
     static const char REPR[];
     static const TypeOfField TYPE;
@@ -315,29 +315,29 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT std::string getStringRepr() const;
     MEDCOUPLING_EXPORT const char *getRepr() const;
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
-    MEDCOUPLING_EXPORT int getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
-    MEDCOUPLING_EXPORT int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
     MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
-                                                  const int *old2NewBg, bool check);
+                                                  const mcIdType *old2NewBg, bool check);
     MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
     MEDCOUPLING_EXPORT void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const;
-    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const int *tupleIdsBg, const int *tupleIdsEnd,
-                                                               DataArrayInt *&cellRestriction, DataArrayInt *&trueTupleRestriction) const;
+    MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+                                                               DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
     MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
-    MEDCOUPLING_EXPORT double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const;
+    MEDCOUPLING_EXPORT double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
     MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
     MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
-    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const int *start, const int *end, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const int *startCellIds, const int *endCellIds) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const int *old2New, int newNbOfNodes, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const int *old2New, int newSz, DataArrayDouble *arr) const;
-    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const int *new2old, int newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+    MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
     MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT static const double *GetWeightArrayFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth);
@@ -416,20 +416,20 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
     MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
   public://specific part
-    MEDCOUPLING_EXPORT DataArrayDouble *computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, const double *loc, int nbOfTargetPoints, int& nbCols) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *computeInverseMatrix(const MEDCouplingMesh *mesh, int& isDrift, int& matSz) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *computeMatrix(const MEDCouplingMesh *mesh, int& isDrift, int& matSz) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, int& isDrift) const;
-    MEDCOUPLING_EXPORT void operateOnDenseMatrix(int spaceDimension, int nbOfElems, double *matrixPtr) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr, int& delta) const;
-    MEDCOUPLING_EXPORT static void OperateOnDenseMatrixH3(int nbOfElems, double *matrixPtr);
-    MEDCOUPLING_EXPORT static void OperateOnDenseMatrixH2Ln(int nbOfElems, double *matrixPtr);
-    MEDCOUPLING_EXPORT static DataArrayDouble *PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr, int& delta);
-    MEDCOUPLING_EXPORT static DataArrayDouble *PerformDriftOfVec(const DataArrayDouble *arr, int isDrift);
+    MEDCOUPLING_EXPORT DataArrayDouble *computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfTargetPoints, mcIdType& nbCols) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *computeInverseMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *computeMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, mcIdType& isDrift) const;
+    MEDCOUPLING_EXPORT void operateOnDenseMatrix(int spaceDimension, mcIdType nbOfElems, double *matrixPtr) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta) const;
+    MEDCOUPLING_EXPORT static void OperateOnDenseMatrixH3(mcIdType nbOfElems, double *matrixPtr);
+    MEDCOUPLING_EXPORT static void OperateOnDenseMatrixH2Ln(mcIdType nbOfElems, double *matrixPtr);
+    MEDCOUPLING_EXPORT static DataArrayDouble *PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta);
+    MEDCOUPLING_EXPORT static DataArrayDouble *PerformDriftOfVec(const DataArrayDouble *arr, mcIdType isDrift);
   public:
     static const char REPR[];
     static const TypeOfField TYPE;
old mode 100644 (file)
new mode 100755 (executable)
index 3c877f2..b65b77a
@@ -212,21 +212,21 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::nodeToCellDiscretization() const
   MCAuto<MEDCouplingFieldDiscretizationP0> nsp(new MEDCouplingFieldDiscretizationP0);
   ret->setDiscretization(nsp);
   const MEDCouplingMesh *m(getMesh());//m is non empty thanks to checkConsistencyLight call
-  int nbCells(m->getNumberOfCells());
+  mcIdType nbCells=ToIdType(m->getNumberOfCells());
   std::vector<DataArrayDouble *> arrs(getArrays());
   std::size_t sz(arrs.size());
   std::vector< MCAuto<DataArrayDouble> > outArrsSafe(sz); std::vector<DataArrayDouble *> outArrs(sz);
   for(std::size_t j=0;j<sz;j++)
     {
-      int nbCompo(arrs[j]->getNumberOfComponents());
+      std::size_t nbCompo(arrs[j]->getNumberOfComponents());
       outArrsSafe[j]=DataArrayDouble::New(); outArrsSafe[j]->alloc(nbCells,nbCompo);
       outArrsSafe[j]->copyStringInfoFrom(*arrs[j]);
       outArrs[j]=outArrsSafe[j];
       double *pt(outArrsSafe[j]->getPointer());
       const double *srcPt(arrs[j]->begin());
-      for(int i=0;i<nbCells;i++,pt+=nbCompo)
+      for(mcIdType i=0;i<nbCells;i++,pt+=nbCompo)
         {
-          std::vector<int> nodeIds;
+          std::vector<mcIdType> nodeIds;
           m->getNodeIdsOfCell(i,nodeIds);
           std::fill(pt,pt+nbCompo,0.);
           std::size_t nbNodesInCell(nodeIds.size());
@@ -268,9 +268,9 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::cellToNodeDiscretization() const
   MCAuto<MEDCouplingFieldDiscretizationP1> nsp(new MEDCouplingFieldDiscretizationP1);
   ret->setDiscretization(nsp);
   const MEDCouplingMesh *m(getMesh());//m is non empty thanks to checkConsistencyLight call
-  MCAuto<DataArrayInt> rn(DataArrayInt::New()),rni(DataArrayInt::New());
+  MCAuto<DataArrayIdType> rn(DataArrayIdType::New()),rni(DataArrayIdType::New());
   m->getReverseNodalConnectivity(rn,rni);
-  MCAuto<DataArrayInt> rni2(rni->deltaShiftIndex());
+  MCAuto<DataArrayIdType> rni2(rni->deltaShiftIndex());
   MCAuto<DataArrayDouble> rni3(rni2->convertToDblArr()); rni2=0;
   std::vector<DataArrayDouble *> arrs(getArrays());
   std::size_t sz(arrs.size());
@@ -388,14 +388,14 @@ bool MEDCouplingFieldDouble::areCompatibleForMeld(const MEDCouplingFieldDouble *
  *  \ref  py_mcfielddouble_renumberNodes "Here is a Python example".
  *  \endif
  */
-void MEDCouplingFieldDouble::renumberNodes(const int *old2NewBg, double eps)
+void MEDCouplingFieldDouble::renumberNodes(const mcIdType *old2NewBg, double eps)
 {
   const MEDCouplingPointSet *meshC=dynamic_cast<const MEDCouplingPointSet *>(_mesh);
   if(!meshC)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply renumberNodes on it !");
-  int nbOfNodes=meshC->getNumberOfNodes();
+  mcIdType nbOfNodes=meshC->getNumberOfNodes();
   MCAuto<MEDCouplingPointSet> meshC2((MEDCouplingPointSet *)meshC->deepCopy());
-  int newNbOfNodes=*std::max_element(old2NewBg,old2NewBg+nbOfNodes)+1;
+  mcIdType newNbOfNodes=*std::max_element(old2NewBg,old2NewBg+nbOfNodes)+1;
   renumberNodesWithoutMesh(old2NewBg,newNbOfNodes,eps);
   meshC2->renumberNodes(old2NewBg,newNbOfNodes);
   setMesh(meshC2);
@@ -423,7 +423,7 @@ void MEDCouplingFieldDouble::renumberNodes(const int *old2NewBg, double eps)
  *  \throw If the spatial discretization of \a this field is NULL.
  *  \throw If values at merged nodes differ more than \a eps.
  */
-void MEDCouplingFieldDouble::renumberNodesWithoutMesh(const int *old2NewBg, int newNbOfNodes, double eps)
+void MEDCouplingFieldDouble::renumberNodesWithoutMesh(const mcIdType *old2NewBg, mcIdType newNbOfNodes, double eps)
 {
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("Expecting a spatial discretization to be able to operate a renumbering !");
@@ -441,13 +441,13 @@ void MEDCouplingFieldDouble::renumberNodesWithoutMesh(const int *old2NewBg, int
  *         vmin are not included in the result array.
  *  \param [in] vmax - an upper boundary of the range. Tuples with values more than \a
  *         vmax are not included in the result array.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of selected
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of selected
  *          tuples. The caller is to delete this array using decrRef() as it is no
  *          more needed.
  *  \throw If the data array is not set.
  *  \throw If \a this->getNumberOfComponents() != 1.
  */
-DataArrayInt *MEDCouplingFieldDouble::findIdsInRange(double vmin, double vmax) const
+DataArrayIdType *MEDCouplingFieldDouble::findIdsInRange(double vmin, double vmax) const
 {
   if(getArray()==0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::findIdsInRange : no default array set !");
@@ -547,7 +547,7 @@ double MEDCouplingFieldDouble::getMaxValue() const
       if(*iter)
         {
           isExistingArr=true;
-          int loc;
+          mcIdType loc;
           ret=std::max(ret,(*iter)->getMaxValue(loc));
         }
     }
@@ -559,30 +559,30 @@ double MEDCouplingFieldDouble::getMaxValue() const
 /*!
  * Returns the maximal value and all its locations within \a this scalar field.
  * Only the first of available data arrays is checked.
- *  \param [out] tupleIds - a new instance of DataArrayInt containing indices of
+ *  \param [out] tupleIds - a new instance of DataArrayIdType containing indices of
  *               tuples holding the maximal value. The caller is to delete it using
  *               decrRef() as it is no more needed.
  *  \return double - the maximal value among all values of the first array of \a this filed.
  *  \throw If \a this->getNumberOfComponents() != 1.
  *  \throw If there is an empty data array in \a this field.
  */
-double MEDCouplingFieldDouble::getMaxValue2(DataArrayInt*& tupleIds) const
+double MEDCouplingFieldDouble::getMaxValue2(DataArrayIdType*& tupleIds) const
 {
   std::vector<DataArrayDouble *> arrays;
   timeDiscr()->getArrays(arrays);
   double ret(-std::numeric_limits<double>::max());
   bool isExistingArr=false;
   tupleIds=0;
-  MCAuto<DataArrayInt> ret1;
+  MCAuto<DataArrayIdType> ret1;
   for(std::vector<DataArrayDouble *>::const_iterator iter=arrays.begin();iter!=arrays.end();iter++)
     {
       if(*iter)
         {
           isExistingArr=true;
-          DataArrayInt *tmp;
+          DataArrayIdType *tmp;
           ret=std::max(ret,(*iter)->getMaxValue2(tmp));
-          MCAuto<DataArrayInt> tmpSafe(tmp);
-          if(!((const DataArrayInt *)ret1))
+          MCAuto<DataArrayIdType> tmpSafe(tmp);
+          if(!((const DataArrayIdType *)ret1))
             ret1=tmpSafe;
         }
     }
@@ -611,7 +611,7 @@ double MEDCouplingFieldDouble::getMinValue() const
       if(*iter)
         {
           isExistingArr=true;
-          int loc;
+          mcIdType loc;
           ret=std::min(ret,(*iter)->getMinValue(loc));
         }
     }
@@ -623,30 +623,30 @@ double MEDCouplingFieldDouble::getMinValue() const
 /*!
  * Returns the minimal value and all its locations within \a this scalar field.
  * Only the first of available data arrays is checked.
- *  \param [out] tupleIds - a new instance of DataArrayInt containing indices of
+ *  \param [out] tupleIds - a new instance of DataArrayIdType containing indices of
  *               tuples holding the minimal value. The caller is to delete it using
  *               decrRef() as it is no more needed.
  *  \return double - the minimal value among all values of the first array of \a this filed.
  *  \throw If \a this->getNumberOfComponents() != 1.
  *  \throw If there is an empty data array in \a this field.
  */
-double MEDCouplingFieldDouble::getMinValue2(DataArrayInt*& tupleIds) const
+double MEDCouplingFieldDouble::getMinValue2(DataArrayIdType*& tupleIds) const
 {
   std::vector<DataArrayDouble *> arrays;
   timeDiscr()->getArrays(arrays);
   double ret(-std::numeric_limits<double>::max());
   bool isExistingArr=false;
   tupleIds=0;
-  MCAuto<DataArrayInt> ret1;
+  MCAuto<DataArrayIdType> ret1;
   for(std::vector<DataArrayDouble *>::const_iterator iter=arrays.begin();iter!=arrays.end();iter++)
     {
       if(*iter)
         {
           isExistingArr=true;
-          DataArrayInt *tmp;
+          DataArrayIdType *tmp;
           ret=std::max(ret,(*iter)->getMinValue2(tmp));
-          MCAuto<DataArrayInt> tmpSafe(tmp);
-          if(!((const DataArrayInt *)ret1))
+          MCAuto<DataArrayIdType> tmpSafe(tmp);
+          if(!((const DataArrayIdType *)ret1))
             ret1=tmpSafe;
         }
     }
@@ -701,11 +701,11 @@ void MEDCouplingFieldDouble::getWeightedAverageValue(double *res, bool isWAbs) c
   if(getArray()==0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::getWeightedAverageValue : no default array defined !");
   MCAuto<MEDCouplingFieldDouble> w=buildMeasureField(isWAbs);
-  double deno=w->getArray()->accumulate(0);
+  double deno=w->getArray()->accumulate((std::size_t)0);
   MCAuto<DataArrayDouble> arr=getArray()->deepCopy();
   arr->multiplyEqual(w->getArray());
   arr->accumulate(res);
-  int nCompo = getArray()->getNumberOfComponents();
+  std::size_t nCompo = getArray()->getNumberOfComponents();
   std::transform(res,res+nCompo,res,std::bind2nd(std::multiplies<double>(),1./deno));
 }
 
@@ -724,8 +724,8 @@ void MEDCouplingFieldDouble::getWeightedAverageValue(double *res, bool isWAbs) c
  */
 double MEDCouplingFieldDouble::getWeightedAverageValue(int compId, bool isWAbs) const
 {
-  int nbComps=getArray()->getNumberOfComponents();
-  if(compId<0 || compId>=nbComps)
+  std::size_t nbComps=getArray()->getNumberOfComponents();
+  if(compId<0 || compId>=ToIdType(nbComps))
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDouble::getWeightedAverageValue : Invalid compId specified : No such nb of components ! Should be in [0," << nbComps << ") !";
       throw INTERP_KERNEL::Exception(oss.str());
@@ -752,8 +752,8 @@ double MEDCouplingFieldDouble::normL1(int compId) const
     throw INTERP_KERNEL::Exception("No mesh underlying this field to perform normL1 !");
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform normL1 !");
-  int nbComps=getArray()->getNumberOfComponents();
-  if(compId<0 || compId>=nbComps)
+  std::size_t nbComps=getArray()->getNumberOfComponents();
+  if(compId<0 || compId>=ToIdType(nbComps))
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDouble::normL1 : Invalid compId specified : No such nb of components ! Should be in [0," << nbComps << ") !";
       throw INTERP_KERNEL::Exception(oss.str());
@@ -799,8 +799,8 @@ double MEDCouplingFieldDouble::normL2(int compId) const
     throw INTERP_KERNEL::Exception("No mesh underlying this field to perform normL2");
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform normL2 !");
-  int nbComps=getArray()->getNumberOfComponents();
-  if(compId<0 || compId>=nbComps)
+  std::size_t nbComps=getArray()->getNumberOfComponents();
+  if(compId<0 || compId>=ToIdType(nbComps))
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDouble::normL2 : Invalid compId specified : No such nb of components ! Should be in [0," << nbComps << ") !";
       throw INTERP_KERNEL::Exception(oss.str());
@@ -843,8 +843,8 @@ double MEDCouplingFieldDouble::normMax(int compId) const
 {
   if(getArray()==0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::normMax : no default array defined !");
-  int nbComps=getArray()->getNumberOfComponents();
-  if(compId<0 || compId>=nbComps)
+  std::size_t nbComps=getArray()->getNumberOfComponents();
+  if(compId<0 || compId>=ToIdType(nbComps))
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDouble::normMax : Invalid compId specified : No such nb of components ! Should be in [0," << nbComps << ") !";
       throw INTERP_KERNEL::Exception(oss.str());
@@ -891,8 +891,8 @@ double MEDCouplingFieldDouble::integral(int compId, bool isWAbs) const
     throw INTERP_KERNEL::Exception("No mesh underlying this field to perform integral");
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform integral !");
-  int nbComps=getArray()->getNumberOfComponents();
-  if(compId<0 || compId>=nbComps)
+  std::size_t nbComps=getArray()->getNumberOfComponents();
+  if(compId<0 || compId>=ToIdType(nbComps))
     {
       std::ostringstream oss; oss << "MEDCouplingFieldDouble::integral : Invalid compId specified : No such nb of components ! Should be in [0," << nbComps << ") !";
       throw INTERP_KERNEL::Exception(oss.str());
@@ -945,7 +945,7 @@ void MEDCouplingFieldDouble::integral(bool isWAbs, double *res) const
  *  \ref  py_mcfielddouble_getValueOnPos "Here is a Python example".
  *  \endif
  */
-void MEDCouplingFieldDouble::getValueOnPos(int i, int j, int k, double *res) const
+void MEDCouplingFieldDouble::getValueOnPos(mcIdType i, mcIdType j, mcIdType k, double *res) const
 {
   const DataArrayDouble *arr=timeDiscr()->getArray();
   if(!_mesh)
@@ -997,7 +997,7 @@ void MEDCouplingFieldDouble::getValueOn(const double *spaceLoc, double *res) con
  *  \ref  py_mcfielddouble_getValueOnMulti "Here is a Python example".
  *  \endif
  */
-DataArrayDouble *MEDCouplingFieldDouble::getValueOnMulti(const double *spaceLoc, int nbOfPoints) const
+DataArrayDouble *MEDCouplingFieldDouble::getValueOnMulti(const double *spaceLoc, mcIdType nbOfPoints) const
 {
   const DataArrayDouble *arr=timeDiscr()->getArray();
   if(!_mesh)
@@ -1034,7 +1034,7 @@ void MEDCouplingFieldDouble::getValueOn(const double *spaceLoc, double time, dou
   std::vector<double> res2;
   for(std::vector< const DataArrayDouble *>::const_iterator iter=arrs.begin();iter!=arrs.end();iter++)
     {
-      int sz=(int)res2.size();
+      std::size_t sz=res2.size();
       res2.resize(sz+(*iter)->getNumberOfComponents());
       _type->getValueOn(*iter,_mesh,spaceLoc,&res2[sz]);
     }
@@ -1077,7 +1077,7 @@ MEDCouplingFieldDouble &MEDCouplingFieldDouble::operator=(double value)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::operator= : no mesh defined !");
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform operator = !");
-  int nbOfTuple=_type->getNumberOfTuples(_mesh);
+  mcIdType nbOfTuple=_type->getNumberOfTuples(_mesh);
   timeDiscr()->setOrCreateUniformValueOnAllComponents(nbOfTuple,value);
   return *this;
 }
@@ -1288,7 +1288,7 @@ void MEDCouplingFieldDouble::applyFunc(int nbOfComp, double val)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::applyFunc : no mesh defined !");
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform applyFunc !");
-  int nbOfTuple=_type->getNumberOfTuples(_mesh);
+  mcIdType nbOfTuple=_type->getNumberOfTuples(_mesh);
   timeDiscr()->setUniformValue(nbOfTuple,nbOfComp,val);
 }
 
@@ -1497,7 +1497,7 @@ std::size_t MEDCouplingFieldDouble::getNumberOfComponents() const
  *  \throw If the spatial discretization is not fully defined.
  *  \sa MEDCouplingField::getNumberOfTuplesExpected
  */
-std::size_t MEDCouplingFieldDouble::getNumberOfTuples() const
+mcIdType MEDCouplingFieldDouble::getNumberOfTuples() const
 {
   if(!_mesh)
     throw INTERP_KERNEL::Exception("Impossible to retrieve number of tuples because no mesh specified !");
@@ -1513,7 +1513,7 @@ std::size_t MEDCouplingFieldDouble::getNumberOfTuples() const
  *  data array.
  *  \throw If the data array is not set.
  */
-std::size_t MEDCouplingFieldDouble::getNumberOfValues() const
+mcIdType MEDCouplingFieldDouble::getNumberOfValues() const
 {
   if(getArray()==0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::getNumberOfValues : No array specified !");
@@ -1561,7 +1561,7 @@ std::vector<const BigMemoryObject *> MEDCouplingFieldDouble::getDirectChildrenWi
  *         \ref MEDCoupling::ON_GAUSS_PT "ON_GAUSS_PT" or
  *         \ref MEDCoupling::ON_GAUSS_NE "ON_GAUSS_NE".
  */
-double MEDCouplingFieldDouble::getIJK(int cellId, int nodeIdInCell, int compoId) const
+double MEDCouplingFieldDouble::getIJK(mcIdType cellId, int nodeIdInCell, int compoId) const
 {
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform getIJK !");
@@ -1627,9 +1627,9 @@ void MEDCouplingFieldDouble::changeUnderlyingMesh(const MEDCouplingMesh *other,
 {
   if(_mesh==0 || other==0)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::changeUnderlyingMesh : is expected to operate on not null meshes !");
-  DataArrayInt *cellCor=0,*nodeCor=0;
+  DataArrayIdType *cellCor=0,*nodeCor=0;
   other->checkGeoEquivalWith(_mesh,levOfCheck,precOnMesh,cellCor,nodeCor);
-  MCAuto<DataArrayInt> cellCor2(cellCor),nodeCor2(nodeCor);
+  MCAuto<DataArrayIdType> cellCor2(cellCor),nodeCor2(nodeCor);
   if(cellCor)
     renumberCellsWithoutMesh(cellCor->getConstPointer(),false);
   if(nodeCor)
@@ -1708,8 +1708,8 @@ bool MEDCouplingFieldDouble::mergeNodes(double eps, double epsOnVals)
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform mergeNodes !");
   MCAuto<MEDCouplingPointSet> meshC2((MEDCouplingPointSet *)meshC->deepCopy());
   bool ret;
-  int ret2;
-  MCAuto<DataArrayInt> arr=meshC2->mergeNodes(eps,ret,ret2);
+  mcIdType ret2;
+  MCAuto<DataArrayIdType> arr=meshC2->mergeNodes(eps,ret,ret2);
   if(!ret)//no nodes have been merged.
     return ret;
   std::vector<DataArrayDouble *> arrays;
@@ -1747,8 +1747,8 @@ bool MEDCouplingFieldDouble::mergeNodesCenter(double eps, double epsOnVals)
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform mergeNodesCenter !");
   MCAuto<MEDCouplingPointSet> meshC2((MEDCouplingPointSet *)meshC->deepCopy());
   bool ret;
-  int ret2;
-  MCAuto<DataArrayInt> arr=meshC2->mergeNodesCenter(eps,ret,ret2);
+  mcIdType ret2;
+  MCAuto<DataArrayIdType> arr=meshC2->mergeNodesCenter(eps,ret,ret2);
   if(!ret)//no nodes have been merged.
     return ret;
   std::vector<DataArrayDouble *> arrays;
@@ -1783,8 +1783,8 @@ bool MEDCouplingFieldDouble::zipCoords(double epsOnVals)
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform zipCoords !");
   MCAuto<MEDCouplingPointSet> meshC2((MEDCouplingPointSet *)meshC->deepCopy());
-  int oldNbOfNodes=meshC2->getNumberOfNodes();
-  MCAuto<DataArrayInt> arr=meshC2->zipCoordsTraducer();
+  mcIdType oldNbOfNodes=meshC2->getNumberOfNodes();
+  MCAuto<DataArrayIdType> arr=meshC2->zipCoordsTraducer();
   if(meshC2->getNumberOfNodes()!=oldNbOfNodes)
     {
       std::vector<DataArrayDouble *> arrays;
@@ -1824,15 +1824,15 @@ bool MEDCouplingFieldDouble::zipConnectivity(int compType, double epsOnVals)
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform zipConnectivity !");
   MCAuto<MEDCouplingUMesh> meshC2((MEDCouplingUMesh *)meshC->deepCopy());
-  std::size_t oldNbOfCells(meshC2->getNumberOfCells());
-  MCAuto<DataArrayInt> arr=meshC2->zipConnectivityTraducer(compType);
+  mcIdType oldNbOfCells(meshC2->getNumberOfCells());
+  MCAuto<DataArrayIdType> arr=meshC2->zipConnectivityTraducer(compType);
   if(meshC2->getNumberOfCells()!=oldNbOfCells)
     {
       std::vector<DataArrayDouble *> arrays;
       timeDiscr()->getArrays(arrays);
       for(std::vector<DataArrayDouble *>::const_iterator iter=arrays.begin();iter!=arrays.end();iter++)
         if(*iter)
-          _type->renumberValuesOnCells(epsOnVals,meshC,arr->getConstPointer(),meshC2->getNumberOfCells(),*iter);
+          _type->renumberValuesOnCells(epsOnVals,meshC,arr->getConstPointer(),ToIdType(meshC2->getNumberOfCells()),*iter);
       setMesh(meshC2);
       return true;
     }
@@ -1855,11 +1855,11 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::extractSlice3D(const double *ori
   const MCAuto<MEDCouplingUMesh> umesh(mesh->buildUnstructured());
   MCAuto<MEDCouplingFieldDouble> ret(clone(false));
   ret->setMesh(umesh);
-  DataArrayInt *cellIds=0;
+  DataArrayIdType *cellIds=0;
   MCAuto<MEDCouplingUMesh> mesh2=umesh->buildSlice3D(origin,vec,eps,cellIds);
-  MCAuto<DataArrayInt> cellIds2=cellIds;
+  MCAuto<DataArrayIdType> cellIds2=cellIds;
   ret->setMesh(mesh2);
-  MCAuto<DataArrayInt> tupleIds=computeTupleIdsToSelectFromCellIds(cellIds->begin(),cellIds->end());
+  MCAuto<DataArrayIdType> tupleIds=computeTupleIdsToSelectFromCellIds(cellIds->begin(),cellIds->end());
   std::vector<DataArrayDouble *> arrays;
   timeDiscr()->getArrays(arrays);
   int i=0;
@@ -1898,17 +1898,17 @@ bool MEDCouplingFieldDouble::simplexize(int policy)
     throw INTERP_KERNEL::Exception("No underlying mesh on this field to perform simplexize !");
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform simplexize !");
-  int oldNbOfCells=_mesh->getNumberOfCells();
+  std::size_t oldNbOfCells=_mesh->getNumberOfCells();
   MCAuto<MEDCouplingMesh> meshC2(_mesh->deepCopy());
-  MCAuto<DataArrayInt> arr=meshC2->simplexize(policy);
-  int newNbOfCells=meshC2->getNumberOfCells();
+  MCAuto<DataArrayIdType> arr=meshC2->simplexize(policy);
+  std::size_t newNbOfCells=meshC2->getNumberOfCells();
   if(oldNbOfCells==newNbOfCells)
     return false;
   std::vector<DataArrayDouble *> arrays;
   timeDiscr()->getArrays(arrays);
   for(std::vector<DataArrayDouble *>::const_iterator iter=arrays.begin();iter!=arrays.end();iter++)
     if(*iter)
-      _type->renumberValuesOnCellsR(_mesh,arr->getConstPointer(),arr->getNbOfElems(),*iter);
+      _type->renumberValuesOnCellsR(_mesh,arr->getConstPointer(),ToIdType(arr->getNbOfElems()),*iter);
   setMesh(meshC2);
   return true;
 }
@@ -1922,7 +1922,7 @@ MCAuto<MEDCouplingFieldDouble> MEDCouplingFieldDouble::voronoize(double eps) con
   checkConsistencyLight();
   const MEDCouplingMesh *mesh(getMesh());
   INTERP_KERNEL::AutoCppPtr<Voronizer> vor;
-  int meshDim(mesh->getMeshDimension()),spaceDim(mesh->getSpaceDimension());
+  std::size_t meshDim(mesh->getMeshDimension()),spaceDim(mesh->getSpaceDimension());
   if(meshDim==1 && (spaceDim==1 || spaceDim==2 || spaceDim==3))
     vor=new Voronizer1D;
   else if(meshDim==2 && (spaceDim==2 || spaceDim==3))
@@ -1950,8 +1950,8 @@ MCAuto<MEDCouplingFieldDouble> MEDCouplingFieldDouble::convertQuadraticCellsToLi
         MCAuto<MEDCouplingUMesh> umesh(mesh->buildUnstructured());
         umesh=umesh->clone(false);
         umesh->convertQuadraticCellsToLinear();
-        MCAuto<DataArrayInt> o2n(umesh->zipCoordsTraducer());
-        MCAuto<DataArrayInt> n2o(o2n->invertArrayO2N2N2O(umesh->getNumberOfNodes()));
+        MCAuto<DataArrayIdType> o2n(umesh->zipCoordsTraducer());
+        MCAuto<DataArrayIdType> n2o(o2n->invertArrayO2N2N2O(umesh->getNumberOfNodes()));
         MCAuto<DataArrayDouble> arr(getArray()->selectByTupleIdSafe(n2o->begin(),n2o->end()));
         MCAuto<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(ON_NODES));
         ret->setArray(arr);
@@ -1988,17 +1988,17 @@ MCAuto<MEDCouplingFieldDouble> MEDCouplingFieldDouble::convertQuadraticCellsToLi
         if(!disc2)
           throw INTERP_KERNEL::Exception("convertQuadraticCellsToLinear : Not a ON_GAUSS_PT field");
         std::set<INTERP_KERNEL::NormalizedCellType> gt2(umesh->getAllGeoTypes());
-        std::vector< MCAuto<DataArrayInt> > cellIdsV;
+        std::vector< MCAuto<DataArrayIdType> > cellIdsV;
         std::vector< MCAuto<MEDCouplingUMesh> > meshesV;
         std::vector< MEDCouplingGaussLocalization > glV;
         bool isZipReq(false);
         for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator it=gt.begin();it!=gt.end();it++)
           {
             const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(*it));
-            MCAuto<DataArrayInt> cellIds(umesh->giveCellsWithType(*it));
+            MCAuto<DataArrayIdType> cellIds(umesh->giveCellsWithType(*it));
             cellIdsV.push_back(cellIds);
             MCAuto<MEDCouplingUMesh> part(umesh->buildPartOfMySelf(cellIds->begin(),cellIds->end()));
-            int id(disc2->getGaussLocalizationIdOfOneType(*it));
+            mcIdType id(disc2->getGaussLocalizationIdOfOneType(*it));
             const MEDCouplingGaussLocalization& gl(disc2->getGaussLocalization(id));
             if(!cm.isQuadratic())
               {
@@ -2019,8 +2019,8 @@ MCAuto<MEDCouplingFieldDouble> MEDCouplingFieldDouble::convertQuadraticCellsToLi
         {
           std::vector< const MEDCouplingUMesh * > meshesPtr(VecAutoToVecOfCstPt(meshesV));
           umesh=MEDCouplingUMesh::MergeUMeshesOnSameCoords(meshesPtr);
-          std::vector< const DataArrayInt * > zeCellIds(VecAutoToVecOfCstPt(cellIdsV));
-          MCAuto<DataArrayInt> zeIds(DataArrayInt::Aggregate(zeCellIds));
+          std::vector< const DataArrayIdType * > zeCellIds(VecAutoToVecOfCstPt(cellIdsV));
+          MCAuto<DataArrayIdType> zeIds(DataArrayIdType::Aggregate(zeCellIds));
           umesh->renumberCells(zeIds->begin());
           umesh->setName(mesh->getName());
         }
@@ -2284,7 +2284,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::maxPerTuple() const
  *  \param [in] dftValue - value assigned to new values added to \a this field.
  *  \throw If \a this is not allocated.
  */
-void MEDCouplingFieldDouble::changeNbOfComponents(int newNbOfComp, double dftValue)
+void MEDCouplingFieldDouble::changeNbOfComponents(std::size_t newNbOfComp, double dftValue)
 {
   timeDiscr()->changeNbOfComponents(newNbOfComp,dftValue);
 }
@@ -2301,7 +2301,7 @@ void MEDCouplingFieldDouble::changeNbOfComponents(int newNbOfComp, double dftVal
  *  \throw If a component index (\a i) is not valid: 
  *         \a i < 0 || \a i >= \a this->getNumberOfComponents().
  */
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::keepSelectedComponents(const std::vector<int>& compoIds) const
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::keepSelectedComponents(const std::vector<std::size_t>& compoIds) const
 {
   if(_type.isNull())
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform keepSelectedComponents !");
@@ -2313,7 +2313,6 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::keepSelectedComponents(const std
   return ret.retn();
 }
 
-
 /*!
  * Copy all components in a specified order from another field.
  * The number of tuples in \a this and the other field can be different.
@@ -2325,7 +2324,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::keepSelectedComponents(const std
  *  \throw If \a compoIds.size() != \a a->getNumberOfComponents().
  *  \throw If \a compoIds[i] < 0 or \a compoIds[i] > \a this->getNumberOfComponents().
  */
-void MEDCouplingFieldDouble::setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector<int>& compoIds)
+void MEDCouplingFieldDouble::setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector<std::size_t>& compoIds)
 {
   timeDiscr()->setSelectedComponents(f->timeDiscr(),compoIds);
 }
@@ -2402,7 +2401,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const std::vector<co
   for(;it!=a.end();it++)
     if(!ref->areCompatibleForMerge(*it))
       throw INTERP_KERNEL::Exception("Fields are not compatible. Unable to apply MergeFields on them! Check support mesh, field nature, and spatial and time discretisation.");
-  for(int i=0;i<(int)a.size();i++)
+  for(std::size_t i=0;i<a.size();i++)
     {
       if(!a[i])
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::MergeFields : presence of nullptr instance in input vector !");
@@ -2915,14 +2914,14 @@ MCAuto<MEDCouplingFieldDouble> MEDCouplingFieldDouble::voronoizeGen(const Voroni
       inpMeshBase=fieldToWO->getMesh();
       inpMesh=inpMeshBase->buildUnstructured();
     }
-  int nbCells(inpMesh->getNumberOfCells());
+  mcIdType nbCells(inpMesh->getNumberOfCells());
   const MEDCouplingFieldDiscretization *disc(fieldToWO->getDiscretization());
   const MEDCouplingFieldDiscretizationGauss *disc2(dynamic_cast<const MEDCouplingFieldDiscretizationGauss *>(disc));
   if(!disc2)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::voronoize2D : Not a ON_GAUSS_PT field");
-  int nbLocs(disc2->getNbOfGaussLocalization());
+  mcIdType nbLocs(disc2->getNbOfGaussLocalization());
   std::vector< MCAuto<MEDCouplingUMesh> > cells(nbCells);
-  for(int i=0;i<nbLocs;i++)
+  for(mcIdType i=0;i<nbLocs;i++)
     {
       const MEDCouplingGaussLocalization& gl(disc2->getGaussLocalization(i));
       if(gl.getDimension()!=vor->getDimension())
@@ -2935,15 +2934,15 @@ MCAuto<MEDCouplingFieldDouble> MEDCouplingFieldDouble::voronoizeGen(const Voroni
       MCAuto<MEDCouplingUMesh> coo3(MEDCouplingUMesh::Build0DMeshFromCoords(coo2));
       //
       MCAuto<MEDCouplingUMesh> vorCellsForCurDisc(vor->doIt(mesh,coo2,eps));
-      std::vector<int> ids;
+      std::vector<mcIdType> ids;
       MCAuto<DataArrayDouble> ptsInReal;
       disc2->getCellIdsHavingGaussLocalization(i,ids);
       {
         MCAuto<MEDCouplingUMesh> subMesh(inpMesh->buildPartOfMySelf(&ids[0],&ids[0]+ids.size()));
         ptsInReal=gl.localizePtsInRefCooForEachCell(vorCellsForCurDisc->getCoords(),subMesh);
       }
-      int nbPtsPerCell(vorCellsForCurDisc->getNumberOfNodes());
-      for(std::size_t j=0;j<ids.size();j++)
+      mcIdType nbPtsPerCell(vorCellsForCurDisc->getNumberOfNodes());
+      for(mcIdType j=0;j<ToIdType(ids.size());j++)
         {
           MCAuto<MEDCouplingUMesh> elt(vorCellsForCurDisc->clone(false));
           MCAuto<DataArrayDouble> coo4(ptsInReal->selectByTupleIdSafeSlice(j*nbPtsPerCell,(j+1)*nbPtsPerCell,1));
index 1ed1a122f9ad2bfc2a73cc39e3df776e3665a3c4..ee88df0b400b7fab26c105d5cc638b9ab64a1d94 100644 (file)
@@ -41,9 +41,9 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
     MEDCOUPLING_EXPORT bool areCompatibleForMerge(const MEDCouplingField *other) const;
     MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingFieldDouble *other) const;
-    MEDCOUPLING_EXPORT void renumberNodes(const int *old2NewBg, double eps=1e-15);
-    MEDCOUPLING_EXPORT void renumberNodesWithoutMesh(const int *old2NewBg, int newNbOfNodes, double eps=1e-15);
-    MEDCOUPLING_EXPORT DataArrayInt *findIdsInRange(double vmin, double vmax) const;
+    MEDCOUPLING_EXPORT void renumberNodes(const mcIdType *old2NewBg, double eps=1e-15);
+    MEDCOUPLING_EXPORT void renumberNodesWithoutMesh(const mcIdType *old2NewBg, mcIdType newNbOfNodes, double eps=1e-15);
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsInRange(double vmin, double vmax) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *deepCopy() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCpy) const;
@@ -51,13 +51,13 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *cellToNodeDiscretization() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldInt *convertToIntField() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldFloat *convertToFloatField() const;
-    MEDCOUPLING_EXPORT double getIJK(int cellId, int nodeIdInCell, int compoId) const;
+    MEDCOUPLING_EXPORT double getIJK(mcIdType cellId, int nodeIdInCell, int compoId) const;
     MEDCOUPLING_EXPORT double accumulate(int compId) const;
     MEDCOUPLING_EXPORT void accumulate(double *res) const;
     MEDCOUPLING_EXPORT double getMaxValue() const;
-    MEDCOUPLING_EXPORT double getMaxValue2(DataArrayInt*& tupleIds) const;
+    MEDCOUPLING_EXPORT double getMaxValue2(DataArrayIdType*& tupleIds) const;
     MEDCOUPLING_EXPORT double getMinValue() const;
-    MEDCOUPLING_EXPORT double getMinValue2(DataArrayInt*& tupleIds) const;
+    MEDCOUPLING_EXPORT double getMinValue2(DataArrayIdType*& tupleIds) const;
     MEDCOUPLING_EXPORT double getAverageValue() const;
     MEDCOUPLING_EXPORT double norm2() const;
     MEDCOUPLING_EXPORT void getWeightedAverageValue(double *res, bool isWAbs=true) const;
@@ -70,10 +70,10 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void normMax(double *res) const;
     MEDCOUPLING_EXPORT double integral(int compId, bool isWAbs) const;
     MEDCOUPLING_EXPORT void integral(bool isWAbs, double *res) const;
-    MEDCOUPLING_EXPORT void getValueOnPos(int i, int j, int k, double *res) const;
+    MEDCOUPLING_EXPORT void getValueOnPos(mcIdType i, mcIdType j, mcIdType k, double *res) const;
     MEDCOUPLING_EXPORT void getValueOn(const double *spaceLoc, double *res) const;
     MEDCOUPLING_EXPORT void getValueOn(const double *spaceLoc, double time, double *res) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const double *spaceLoc, int nbOfPoints) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const double *spaceLoc, mcIdType nbOfPoints) const;
     MEDCOUPLING_EXPORT void applyLin(double a, double b, int compoId);
     MEDCOUPLING_EXPORT void applyLin(double a, double b);
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble &operator=(double value);
@@ -90,8 +90,8 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void applyFuncFast32(const std::string& func);
     MEDCOUPLING_EXPORT void applyFuncFast64(const std::string& func);
     MEDCOUPLING_EXPORT std::size_t getNumberOfComponents() const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfTuples() const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfValues() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuples() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfValues() const;
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
@@ -116,9 +116,9 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *deviator() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *magnitude() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *maxPerTuple() const;
-    MEDCOUPLING_EXPORT void changeNbOfComponents(int newNbOfComp, double dftValue=0.);
-    MEDCOUPLING_EXPORT MEDCouplingFieldDouble *keepSelectedComponents(const std::vector<int>& compoIds) const;
-    MEDCOUPLING_EXPORT void setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector<int>& compoIds);
+    MEDCOUPLING_EXPORT void changeNbOfComponents(std::size_t newNbOfComp, double dftValue=0.);
+    MEDCOUPLING_EXPORT MEDCouplingFieldDouble *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const;
+    MEDCOUPLING_EXPORT void setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector<std::size_t>& compoIds);
     MEDCOUPLING_EXPORT void sortPerTuple(bool asc);
     MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
     MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MergeFields(const std::vector<const MEDCouplingFieldDouble *>& a);
index 8fbc9ef69a52081f2b838b443e3c5473867bf8e7..7fbbce57f7f5379e5c0eb3307e6b0ba0ce0a870c 100644 (file)
@@ -23,6 +23,7 @@
 #include "MEDCouplingFieldDouble.hxx"
 #include "MEDCouplingFieldTemplate.hxx"
 #include "MEDCouplingMesh.hxx"
+#include "MEDCouplingMemArray.txx"
 
 using namespace MEDCoupling;
 
index 42aa53538f68c9dbea7ce4f3a206f3805942d827..66637f2e3b3678a7a37d32edc95b0ae6930d1b18 100644 (file)
@@ -23,6 +23,7 @@
 #include "MEDCouplingFieldDouble.hxx"
 #include "MEDCouplingFieldTemplate.hxx"
 #include "MEDCouplingMesh.hxx"
+#include "MEDCouplingMemArray.txx"
 
 using namespace MEDCoupling;
 
index b1635504bad22d4cc71bb74b77e8221de6c94dcc..f9b22d3de0956cda9d6ad98ef92383273868143f 100644 (file)
@@ -46,9 +46,9 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual typename Traits<T>::FieldType *clone(bool recDeepCpy) const = 0;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT typename Traits<T>::FieldType *cloneWithMesh(bool recDeepCpy) const;
-    MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPart(const DataArrayInt *part) const;
-    MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPart(const int *partBg, const int *partEnd) const;
-    MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPartRange(int begin, int end, int step) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPart(const DataArrayIdType *part) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPart(const mcIdType *partBg, const mcIdType *partEnd) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPartRange(mcIdType begin, mcIdType end, mcIdType step) const;
     MEDCOUPLING_EXPORT void setArray(typename Traits<T>::ArrayType *array) { _time_discr->setArray(array,this); }
     MEDCOUPLING_EXPORT void setEndArray(typename Traits<T>::ArrayType *array) { _time_discr->setEndArray(array,this); }
     MEDCOUPLING_EXPORT const typename Traits<T>::ArrayType *getArray() const { return _time_discr->getArray(); }
@@ -74,7 +74,7 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT double getTime(int& iteration, int& order) const { return _time_discr->getTime(iteration,order); }
     MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const { return _time_discr->getStartTime(iteration,order); }
     MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const { return _time_discr->getEndTime(iteration,order); }
-    MEDCOUPLING_EXPORT T getIJ(int tupleId, int compoId) const { return getArray()->getIJ(tupleId,compoId); }
+    MEDCOUPLING_EXPORT T getIJ(mcIdType tupleId, std::size_t compoId) const { return getArray()->getIJ(tupleId,compoId); }
     MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec) const;
     MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec, std::string& reason) const;
     MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec) const;
@@ -88,16 +88,16 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool areCompatibleForDiv(const MEDCouplingField *other) const;
     MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingFieldT<T> *other);
     MEDCOUPLING_EXPORT void copyAllTinyAttrFrom(const MEDCouplingFieldT<T> *other);
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
-    MEDCOUPLING_EXPORT void renumberCellsWithoutMesh(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCellsWithoutMesh(const mcIdType *old2NewBg, bool check=true);
     //
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfoI, DataArrayInt *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays);
-    MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<int>& tinyInfoI, const DataArrayInt *dataInt, const std::vector<typename Traits<T>::ArrayType *>& arrays);
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays);
+    MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const DataArrayIdType *dataInt, const std::vector<typename Traits<T>::ArrayType *>& arrays);
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays) const;
     MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretizationTemplate<T> *timeDiscrSafe() const;
   protected:
     MEDCouplingTimeDiscretizationTemplate<T> *timeDiscrSafe();
index 7b8e53c4db7156542cf14c3337cfec67d0f6df36..c59c5c06957e7a93a9211e9bc3b6968557f67eb0 100644 (file)
@@ -228,7 +228,7 @@ namespace MEDCoupling
    *  \endif
    */
   template<class T>
-  void MEDCouplingFieldT<T>::renumberCells(const int *old2NewBg, bool check)
+  void MEDCouplingFieldT<T>::renumberCells(const mcIdType *old2NewBg, bool check)
   {
     renumberCellsWithoutMesh(old2NewBg,check);
     MCAuto<MEDCouplingMesh> m(_mesh->deepCopy());
@@ -259,7 +259,7 @@ namespace MEDCoupling
    *  \throw If mesh nature does not allow renumbering (e.g. structured mesh).
    */
   template<class T>
-  void MEDCouplingFieldT<T>::renumberCellsWithoutMesh(const int *old2NewBg, bool check)
+  void MEDCouplingFieldT<T>::renumberCellsWithoutMesh(const mcIdType *old2NewBg, bool check)
   {
     if(!_mesh)
       throw INTERP_KERNEL::Exception("Expecting a defined mesh to be able to operate a renumbering !");
@@ -368,10 +368,10 @@ namespace MEDCoupling
       {
         if(getArray()->isAllocated())
           {
-            int nbOfCompo=getArray()->getNumberOfComponents();
+            std::size_t nbOfCompo=getArray()->getNumberOfComponents();
             ret << Traits<T>::FieldTypeName << " default array has " << nbOfCompo << " components and " << getArray()->getNumberOfTuples() << " tuples.\n";
             ret << Traits<T>::FieldTypeName << " default array has following info on components : ";
-            for(int i=0;i<nbOfCompo;i++)
+            for(std::size_t i=0;i<nbOfCompo;i++)
               ret << "\"" << getArray()->getInfoOnComponent(i) << "\" ";
             ret << "\n";
           }
@@ -397,7 +397,7 @@ namespace MEDCoupling
         nat=MEDCouplingNatureOfField::GetRepr(_nature);
         stream << "Nature of field : " << nat << ".\n";
       }
-    catch(INTERP_KERNEL::Exception& e)
+    catch(INTERP_KERNEL::Exception&)
       {  }
     const MEDCouplingFieldDiscretization *fd(_type);
     if(!fd)
@@ -474,13 +474,13 @@ namespace MEDCoupling
    * \sa MEDCoupling::MEDCouplingFieldDouble::buildSubPart(const DataArrayInt *) const, MEDCouplingFieldDouble::buildSubPartRange
    */
   template<class T>
-  typename Traits<T>::FieldType *MEDCouplingFieldT<T>::buildSubPart(const int *partBg, const int *partEnd) const
+  typename Traits<T>::FieldType *MEDCouplingFieldT<T>::buildSubPart(const mcIdType *partBg, const mcIdType *partEnd) const
   {
     if(_type.isNull())
       throw INTERP_KERNEL::Exception("MEDCouplingFieldT::buildSubPart : Expecting a not NULL spatial discretization !");
-    DataArrayInt *arrSelect;
+    DataArrayIdType *arrSelect;
     MCAuto<MEDCouplingMesh> m=_type->buildSubMeshData(_mesh,partBg,partEnd,arrSelect);
-    MCAuto<DataArrayInt> arrSelect2(arrSelect);
+    MCAuto<DataArrayIdType> arrSelect2(arrSelect);
     MCAuto< typename Traits<T>::FieldType > ret(clone(false));//quick shallow copy.
     const MEDCouplingFieldDiscretization *disc=getDiscretization();
     if(disc)
@@ -490,8 +490,8 @@ namespace MEDCoupling
     timeDiscrSafe()->getArrays(arrays);
     std::vector<typename Traits<T>::ArrayType *> arrs;
     std::vector< MCAuto< typename Traits<T>::ArrayType > > arrsSafe;
-    const int *arrSelBg=arrSelect->begin();
-    const int *arrSelEnd=arrSelect->end();
+    const mcIdType *arrSelBg=arrSelect->begin();
+    const mcIdType *arrSelEnd=arrSelect->end();
     for(typename std::vector<typename Traits<T>::ArrayType *>::const_iterator iter=arrays.begin();iter!=arrays.end();iter++)
       {
         typename Traits<T>::ArrayType *arr(0);
@@ -534,7 +534,7 @@ namespace MEDCoupling
    *  \sa MEDCouplingFieldDouble::buildSubPartRange
    */
   template<class T>
-  typename Traits<T>::FieldType *MEDCouplingFieldT<T>::buildSubPart(const DataArrayInt *part) const
+  typename Traits<T>::FieldType *MEDCouplingFieldT<T>::buildSubPart(const DataArrayIdType *part) const
   {
     if(part==0)
       throw INTERP_KERNEL::Exception("MEDCouplingFieldT::buildSubPart : not empty array must be passed to this method !");
@@ -548,14 +548,14 @@ namespace MEDCoupling
    * \sa MEDCouplingFieldDouble::buildSubPart
    */
   template<class T>
-  typename Traits<T>::FieldType *MEDCouplingFieldT<T>::buildSubPartRange(int begin, int end, int step) const
+  typename Traits<T>::FieldType *MEDCouplingFieldT<T>::buildSubPartRange(mcIdType begin, mcIdType end, mcIdType step) const
   {
     if(_type.isNull())
       throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::buildSubPart : Expecting a not NULL spatial discretization !");
-    DataArrayInt *arrSelect;
-    int beginOut,endOut,stepOut;
+    DataArrayIdType *arrSelect;
+    mcIdType beginOut,endOut,stepOut;
     MCAuto<MEDCouplingMesh> m(_type->buildSubMeshDataRange(_mesh,begin,end,step,beginOut,endOut,stepOut,arrSelect));
-    MCAuto<DataArrayInt> arrSelect2(arrSelect);
+    MCAuto<DataArrayIdType> arrSelect2(arrSelect);
     MCAuto< typename Traits<T>::FieldType > ret(clone(false));//quick shallow copy.
     const MEDCouplingFieldDiscretization *disc=getDiscretization();
     if(disc)
@@ -572,8 +572,8 @@ namespace MEDCoupling
           {
             if(arrSelect)
               {
-                const int *arrSelBg=arrSelect->begin();
-                const int *arrSelEnd=arrSelect->end();
+                const mcIdType *arrSelBg=arrSelect->begin();
+                const mcIdType *arrSelEnd=arrSelect->end();
                 arr=(*iter)->selectByTupleIdSafe(arrSelBg,arrSelEnd);
               }
             else
@@ -619,19 +619,19 @@ namespace MEDCoupling
    * @param tinyInfo out parameter resized correctly after the call. The length of this vector is tiny.
    */
   template<class T>
-  void MEDCouplingFieldT<T>::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+  void MEDCouplingFieldT<T>::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
   {
     if(_type.isNull())
       throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform getTinySerializationIntInformation !");
     tinyInfo.clear();
-    tinyInfo.push_back((int)_type->getEnum());
-    tinyInfo.push_back((int)timeDiscrSafe()->getEnum());
-    tinyInfo.push_back((int)_nature);
+    tinyInfo.push_back(ToIdType(_type->getEnum()));
+    tinyInfo.push_back(ToIdType(timeDiscrSafe()->getEnum()));
+    tinyInfo.push_back(ToIdType(_nature));
     timeDiscrSafe()->getTinySerializationIntInformation(tinyInfo);
-    std::vector<int> tinyInfo2;
+    std::vector<mcIdType> tinyInfo2;
     _type->getTinySerializationIntInformation(tinyInfo2);
     tinyInfo.insert(tinyInfo.end(),tinyInfo2.begin(),tinyInfo2.end());
-    tinyInfo.push_back((int)tinyInfo2.size());
+    tinyInfo.push_back(ToIdType(tinyInfo2.size()));
   }
 
   /*!
@@ -660,18 +660,18 @@ namespace MEDCoupling
    * \sa checkForUnserialization
    */
   template<class T>
-  void MEDCouplingFieldT<T>::resizeForUnserialization(const std::vector<int>& tinyInfoI, DataArrayInt *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays)
+  void MEDCouplingFieldT<T>::resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays)
   {
     if(_type.isNull())
       throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform resizeForUnserialization !");
     dataInt=0;
-    std::vector<int> tinyInfoITmp(tinyInfoI);
-    int sz=tinyInfoITmp.back();
+    std::vector<mcIdType> tinyInfoITmp(tinyInfoI);
+    mcIdType sz=tinyInfoITmp.back();
     tinyInfoITmp.pop_back();
-    std::vector<int> tinyInfoITmp2(tinyInfoITmp.begin(),tinyInfoITmp.end()-sz);
-    std::vector<int> tinyInfoI2(tinyInfoITmp2.begin()+3,tinyInfoITmp2.end());
+    std::vector<mcIdType> tinyInfoITmp2(tinyInfoITmp.begin(),tinyInfoITmp.end()-sz);
+    std::vector<mcIdType> tinyInfoI2(tinyInfoITmp2.begin()+3,tinyInfoITmp2.end());
     timeDiscrSafe()->resizeForUnserialization(tinyInfoI2,arrays);
-    std::vector<int> tinyInfoITmp3(tinyInfoITmp.end()-sz,tinyInfoITmp.end());
+    std::vector<mcIdType> tinyInfoITmp3(tinyInfoITmp.end()-sz,tinyInfoITmp.end());
     _type->resizeForUnserialization(tinyInfoITmp3,dataInt);
   }
 
@@ -681,29 +681,29 @@ namespace MEDCoupling
    * \sa resizeForUnserialization
    */
   template<class T>
-  void MEDCouplingFieldT<T>::checkForUnserialization(const std::vector<int>& tinyInfoI, const DataArrayInt *dataInt, const std::vector<typename Traits<T>::ArrayType *>& arrays)
+  void MEDCouplingFieldT<T>::checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const DataArrayIdType *dataInt, const std::vector<typename Traits<T>::ArrayType *>& arrays)
   {
     if(_type.isNull())
       throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform resizeForUnserialization !");
-    std::vector<int> tinyInfoITmp(tinyInfoI);
-    int sz=tinyInfoITmp.back();
+    std::vector<mcIdType> tinyInfoITmp(tinyInfoI);
+    mcIdType sz=tinyInfoITmp.back();
     tinyInfoITmp.pop_back();
-    std::vector<int> tinyInfoITmp2(tinyInfoITmp.begin(),tinyInfoITmp.end()-sz);
-    std::vector<int> tinyInfoI2(tinyInfoITmp2.begin()+3,tinyInfoITmp2.end());
+    std::vector<mcIdType> tinyInfoITmp2(tinyInfoITmp.begin(),tinyInfoITmp.end()-sz);
+    std::vector<mcIdType> tinyInfoI2(tinyInfoITmp2.begin()+3,tinyInfoITmp2.end());
     timeDiscrSafe()->checkForUnserialization(tinyInfoI2,arrays);
-    std::vector<int> tinyInfoITmp3(tinyInfoITmp.end()-sz,tinyInfoITmp.end());
+    std::vector<mcIdType> tinyInfoITmp3(tinyInfoITmp.end()-sz,tinyInfoITmp.end());
     _type->checkForUnserialization(tinyInfoITmp3,dataInt);
   }
 
   template<class T>
-  void MEDCouplingFieldT<T>::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
+  void MEDCouplingFieldT<T>::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
   {
     if(_type.isNull())
       throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform finishUnserialization !");
-    std::vector<int> tinyInfoI2(tinyInfoI.begin()+3,tinyInfoI.end());
+    std::vector<mcIdType> tinyInfoI2(tinyInfoI.begin()+3,tinyInfoI.end());
     //
     std::vector<double> tmp(tinyInfoD);
-    int sz=(int)tinyInfoD.back();//very bad, lack of time to improve it
+    mcIdType sz=ToIdType(tinyInfoD.back());//very bad, lack of time to improve it
     tmp.pop_back();
     std::vector<double> tmp1(tmp.begin(),tmp.end()-sz);
     std::vector<double> tmp2(tmp.end()-sz,tmp.end());
@@ -711,7 +711,7 @@ namespace MEDCoupling
     timeDiscrSafe()->finishUnserialization(tinyInfoI2,tmp1,tinyInfoS);
     _nature=(NatureOfField)tinyInfoI[2];
     _type->finishUnserialization(tmp2);
-    int nbOfElemS=(int)tinyInfoS.size();
+    std::size_t nbOfElemS=tinyInfoS.size();
     _name=tinyInfoS[nbOfElemS-3];
     _desc=tinyInfoS[nbOfElemS-2];
     setTimeUnit(tinyInfoS[nbOfElemS-1]);
@@ -722,7 +722,7 @@ namespace MEDCoupling
    * The values returned must be consulted only in readonly mode.
    */
   template<class T>
-  void MEDCouplingFieldT<T>::serialize(DataArrayInt *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays) const
+  void MEDCouplingFieldT<T>::serialize(DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays) const
   {
     if(_type.isNull())
       throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform serialize !");
index 423593f40f98d59c9f20bd8cf3bd331d08273550..55b23cf0de3640ff0aaeb3203be171a8023e6a2c 100644 (file)
@@ -140,17 +140,17 @@ std::string MEDCouplingFieldTemplate::advancedRepr() const
   return simpleRepr();
 }
 
-void MEDCouplingFieldTemplate::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+void MEDCouplingFieldTemplate::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform getTinySerializationIntInformation !");
   tinyInfo.clear();
-  tinyInfo.push_back((int)_type->getEnum());
-  tinyInfo.push_back((int)_nature);
-  std::vector<int> tinyInfo2;
+  tinyInfo.push_back(ToIdType(_type->getEnum()));
+  tinyInfo.push_back(ToIdType(_nature));
+  std::vector<mcIdType> tinyInfo2;
   _type->getTinySerializationIntInformation(tinyInfo2);
   tinyInfo.insert(tinyInfo.end(),tinyInfo2.begin(),tinyInfo2.end());
-  tinyInfo.push_back((int)tinyInfo2.size());
+  tinyInfo.push_back(ToIdType(tinyInfo2.size()));
 }
 
 void MEDCouplingFieldTemplate::getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const
@@ -168,16 +168,16 @@ void MEDCouplingFieldTemplate::getTinySerializationStrInformation(std::vector<st
   tinyInfo.push_back(_desc);
 }
 
-void MEDCouplingFieldTemplate::resizeForUnserialization(const std::vector<int>& tinyInfoI, DataArrayInt *&dataInt)
+void MEDCouplingFieldTemplate::resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt)
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform resizeForUnserialization !");
   dataInt=0;
-  std::vector<int> tinyInfoITmp(tinyInfoI.begin()+2,tinyInfoI.end());
+  std::vector<mcIdType> tinyInfoITmp(tinyInfoI.begin()+2,tinyInfoI.end());
   _type->resizeForUnserialization(tinyInfoITmp,dataInt);
 }
 
-void MEDCouplingFieldTemplate::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
+void MEDCouplingFieldTemplate::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
 {
   if(!((const MEDCouplingFieldDiscretization *)_type))
     throw INTERP_KERNEL::Exception("No spatial discretization underlying this field to perform finishUnserialization !");
@@ -187,7 +187,7 @@ void MEDCouplingFieldTemplate::finishUnserialization(const std::vector<int>& tin
   _desc=tinyInfoS[1];
 }
 
-void MEDCouplingFieldTemplate::serialize(DataArrayInt *&dataInt) const
+void MEDCouplingFieldTemplate::serialize(DataArrayIdType *&dataInt) const
 {
   _type->getSerializationIntArray(dataInt);
 }
index c5c0986f563e15ed95b3697a36d112bf644ba256..082dcc36aa687ad0915e47bdbff4f7534dcc01df 100644 (file)
@@ -56,12 +56,12 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldTemplate> clone(bool recDeepCpy) const;
     //
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfoI, DataArrayInt *&dataInt);
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&dataInt) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt);
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&dataInt) const;
     //
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
   private:
index f5af4895b383b0f4c31873c8d9eed69538d6e93c..5572831aca0cd95fc3386b3de51f042e1734178e 100644 (file)
@@ -71,7 +71,7 @@ void MEDCouplingGaussLocalization::checkConsistencyLight() const
   int dim=cm.getDimension();
   if(!cm.isDynamic())
     {
-      if((int)_ref_coord.size()!=nbNodes*dim)
+      if(ToIdType(_ref_coord.size())!=nbNodes*dim)
         {
           std::ostringstream oss; oss << "Invalid size of refCoo : expecting to be : " << nbNodes << " (nbNodePerCell) * " << dim << " (dim) !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -160,9 +160,9 @@ double MEDCouplingGaussLocalization::getWeight(int gaussPtIdInCell, double newVa
  * push at the end of tinyInfo its basic serialization info. The size of pushed data is always the same.
  * @param tinyInfo inout parameter.
  */
-void MEDCouplingGaussLocalization::pushTinySerializationIntInfo(std::vector<int>& tinyInfo) const
+void MEDCouplingGaussLocalization::pushTinySerializationIntInfo(std::vector<mcIdType>& tinyInfo) const
 {
-  tinyInfo.push_back((int)_type);
+  tinyInfo.push_back(ToIdType(_type));
   tinyInfo.push_back(getNumberOfPtsInRefCell());
   tinyInfo.push_back(getNumberOfGaussPt());
 }
@@ -212,23 +212,23 @@ MCAuto<DataArrayDouble> MEDCouplingGaussLocalization::localizePtsInRefCooForEach
   ptsInRefCoo->checkAllocated();
   mesh->checkConsistencyLight();
   //
-  int nbCells(mesh->getNumberOfCells());
+  mcIdType nbCells=mesh->getNumberOfCells();
   const double *coords(mesh->getCoords()->begin());
-  const int *connI(mesh->getNodalConnectivityIndex()->begin()),*conn(mesh->getNodalConnectivity()->begin());
+  const mcIdType *connI(mesh->getNodalConnectivityIndex()->begin()),*conn(mesh->getNodalConnectivity()->begin());
   //
-  int nbPts(ptsInRefCoo->getNumberOfTuples());
+  mcIdType nbPts(ptsInRefCoo->getNumberOfTuples());
   INTERP_KERNEL::NormalizedCellType typ(getType());
   int dim(INTERP_KERNEL::CellModel::GetCellModel(typ).getDimension()),outDim(mesh->getSpaceDimension());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   ret->alloc(nbPts*nbCells,outDim);
   double *retPtr(ret->getPointer());
-  if(dim!=(int)ptsInRefCoo->getNumberOfComponents())
+  if(dim!=ToIdType(ptsInRefCoo->getNumberOfComponents()))
     throw INTERP_KERNEL::Exception("MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell : number of components of input coo is not equal to dim of element !");
   const std::vector<double>& wg(getWeights());
   INTERP_KERNEL::GaussCoords calculator;
   calculator.addGaussInfo(typ,dim, ptsInRefCoo->begin(),nbPts,&_ref_coord[0],getNumberOfPtsInRefCell());
   //
-  for(int i=0;i<nbCells;i++,retPtr+=nbPts*outDim)
+  for(mcIdType i=0;i<nbCells;i++,retPtr+=nbPts*outDim)
     calculator.calculateCoords(getType(),coords,outDim,conn+connI[i]+1,retPtr);
   return ret;
 }
@@ -240,13 +240,13 @@ MCAuto<MEDCouplingUMesh> MEDCouplingGaussLocalization::buildRefCell() const
 {
   MCAuto<DataArrayDouble> coo(DataArrayDouble::New());
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getType()));
-  if(getDimension()!=(int)cm.getDimension())
+  if(getDimension()!=ToIdType(cm.getDimension()))
     throw INTERP_KERNEL::Exception("BuildRefCell : dimension mistmatch !");
   coo->alloc(cm.getNumberOfNodes(),getDimension());
   std::copy(_ref_coord.begin(),_ref_coord.end(),coo->getPointer());
   MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New("",getType()));
   ret->setCoords(coo);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
   conn->alloc(cm.getNumberOfNodes(),1);
   conn->iota();
   ret->setNodalConnectivity(conn);
@@ -299,17 +299,17 @@ void MEDCouplingGaussLocalization::setWeights(const std::vector<double>& w)
 /*!
  * The format of 'tinyData' parameter is the same than pushed in method MEDCouplingGaussLocalization::pushTinySerializationIntInfo.
  */
-MEDCouplingGaussLocalization MEDCouplingGaussLocalization::BuildNewInstanceFromTinyInfo(int dim, const std::vector<int>& tinyData)
+MEDCouplingGaussLocalization MEDCouplingGaussLocalization::BuildNewInstanceFromTinyInfo(mcIdType dim, const std::vector<mcIdType>& tinyData)
 {
   std::vector<double> v1(dim*tinyData[1]),v2(dim*tinyData[2]),v3(tinyData[2]);
   return MEDCouplingGaussLocalization((INTERP_KERNEL::NormalizedCellType)tinyData[0],v1,v2,v3);
 }
 
-int MEDCouplingGaussLocalization::checkCoherencyOfRequest(int gaussPtIdInCell, int comp) const
+int MEDCouplingGaussLocalization::checkCoherencyOfRequest(mcIdType gaussPtIdInCell, int comp) const
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
   int dim=cm.getDimension();
-  int nbGsPts=getNumberOfGaussPt();
+  mcIdType nbGsPts=getNumberOfGaussPt();
   if(gaussPtIdInCell<0 || gaussPtIdInCell>=nbGsPts)
     throw INTERP_KERNEL::Exception("gaussPtIdInCell specified is invalid : must be in [0:nbGsPts) !");
   if(comp<0 || comp>=dim)
index 6cd8595990c92694d0b053c8fb3b0c22df341077..b88702df6f011827badc468efd4bbd6fb3dd8c3a 100644 (file)
@@ -48,7 +48,7 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT std::size_t getMemorySize() const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingGaussLocalization& other, double eps) const;
-    MEDCOUPLING_EXPORT void pushTinySerializationIntInfo(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void pushTinySerializationIntInfo(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void pushTinySerializationDblInfo(std::vector<double>& tinyInfo) const;
     MEDCOUPLING_EXPORT const double *fillWithValues(const double *vals);
     //
@@ -68,10 +68,10 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void setGaussCoords(const std::vector<double>& gsCoo);
     MEDCOUPLING_EXPORT void setWeights(const std::vector<double>& w);
     //
-    MEDCOUPLING_EXPORT static MEDCouplingGaussLocalization BuildNewInstanceFromTinyInfo(int dim, const std::vector<int>& tinyData);
+    MEDCOUPLING_EXPORT static MEDCouplingGaussLocalization BuildNewInstanceFromTinyInfo(mcIdType dim, const std::vector<mcIdType>& tinyData);
     MEDCOUPLING_EXPORT static bool AreAlmostEqual(const std::vector<double>& v1, const std::vector<double>& v2, double eps);
   private:
-    int checkCoherencyOfRequest(int gaussPtIdInCell, int comp) const;
+    int checkCoherencyOfRequest(mcIdType gaussPtIdInCell, int comp) const;
   private:
     INTERP_KERNEL::NormalizedCellType _type;
     std::vector<double> _ref_coord;
old mode 100644 (file)
new mode 100755 (executable)
index 73017d5..00d77cf
@@ -53,7 +53,7 @@ MEDCouplingIMesh *MEDCouplingIMesh::New()
   return new MEDCouplingIMesh;
 }
 
-MEDCouplingIMesh *MEDCouplingIMesh::New(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+MEDCouplingIMesh *MEDCouplingIMesh::New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                         const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop)
 {
   MCAuto<MEDCouplingIMesh> ret(new MEDCouplingIMesh);
@@ -88,17 +88,17 @@ const DataArrayDouble *MEDCouplingIMesh::getDirectAccessOfCoordsArrIfInStructure
  * \return MEDCouplingIMesh * - a newly alloacted object to be managed by the caller.
  * \throw if \a ghostLev < 0.
  */
-MEDCouplingIMesh *MEDCouplingIMesh::buildWithGhost(int ghostLev) const
+MEDCouplingIMesh *MEDCouplingIMesh::buildWithGhost(mcIdType ghostLev) const
 {
   if(ghostLev<0)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::buildWithGhost : the ghostLev must be >= 0 !");
   checkConsistencyLight();
   int spaceDim(getSpaceDimension());
   double origin[3],dxyz[3];
-  int structure[3];
+  mcIdType structure[3];
   for(int i=0;i<spaceDim;i++)
     {
-      origin[i]=_origin[i]-ghostLev*_dxyz[i];
+      origin[i]=_origin[i]-FromIdType<double>(ghostLev)*_dxyz[i];
       dxyz[i]=_dxyz[i];
       structure[i]=_structure[i]+2*ghostLev;
     }
@@ -107,26 +107,26 @@ MEDCouplingIMesh *MEDCouplingIMesh::buildWithGhost(int ghostLev) const
   return ret.retn();
 }
 
-void MEDCouplingIMesh::setNodeStruct(const int *nodeStrctStart, const int *nodeStrctStop)
+void MEDCouplingIMesh::setNodeStruct(const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop)
 {
   checkSpaceDimension();
-  int sz((int)std::distance(nodeStrctStart,nodeStrctStop));
+  mcIdType sz((mcIdType)std::distance(nodeStrctStart,nodeStrctStop));
   if(sz!=_space_dim)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::setNodeStruct : input vector of node structure has not the right size ! Or change space dimension before calling it !");
   std::copy(nodeStrctStart,nodeStrctStop,_structure);
   declareAsNew();
 }
 
-std::vector<int> MEDCouplingIMesh::getNodeStruct() const
+std::vector<mcIdType> MEDCouplingIMesh::getNodeStruct() const
 {
   checkSpaceDimension();
-  return std::vector<int>(_structure,_structure+_space_dim);
+  return std::vector<mcIdType>(_structure,_structure+_space_dim);
 }
 
 void MEDCouplingIMesh::setOrigin(const double *originStart, const double *originStop)
 {
   checkSpaceDimension();
-  int sz((int)std::distance(originStart,originStop));
+  mcIdType sz(ToIdType(std::distance(originStart,originStop)));
   if(sz!=_space_dim)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::setOrigin : input vector of origin vector has not the right size ! Or change space dimension before calling it !");
   std::copy(originStart,originStop,_origin);
@@ -142,7 +142,7 @@ std::vector<double> MEDCouplingIMesh::getOrigin() const
 void MEDCouplingIMesh::setDXYZ(const double *dxyzStart, const double *dxyzStop)
 {
   checkSpaceDimension();
-  int sz((int)std::distance(dxyzStart,dxyzStop));
+  mcIdType sz(ToIdType(std::distance(dxyzStart,dxyzStop)));
   if(sz!=_space_dim)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::setDXYZ : input vector of dxyz vector has not the right size ! Or change space dimension before calling it !");
   std::copy(dxyzStart,dxyzStop,_dxyz);
@@ -214,12 +214,12 @@ MEDCouplingCMesh *MEDCouplingIMesh::convertToCartesian() const
  * The origin of \a this will be not touched only spacing and node structure will be changed.
  * This method can be useful for AMR users.
  */
-void MEDCouplingIMesh::refineWithFactor(const std::vector<int>& factors)
+void MEDCouplingIMesh::refineWithFactor(const std::vector<mcIdType>& factors)
 {
-  if((int)factors.size()!=_space_dim)
+  if(ToIdType(factors.size())!=_space_dim)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::refineWithFactor : refinement factors must have size equal to spaceDim !");
   checkConsistencyLight();
-  std::vector<int> structure(_structure,_structure+3);
+  std::vector<mcIdType> structure(_structure,_structure+3);
   std::vector<double> dxyz(_dxyz,_dxyz+3);
   for(int i=0;i<_space_dim;i++)
     {
@@ -228,7 +228,7 @@ void MEDCouplingIMesh::refineWithFactor(const std::vector<int>& factors)
           std::ostringstream oss; oss << "MEDCouplingIMesh::refineWithFactor : factor for axis #" << i << " (" << factors[i] << ")is invalid ! Must be > 0 !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      int factAbs(std::abs(factors[i]));
+      mcIdType factAbs(std::abs(factors[i]));
       double fact2(1./(double)factors[i]);
       structure[i]=(_structure[i]-1)*factAbs+1;
       dxyz[i]=fact2*_dxyz[i];
@@ -248,14 +248,14 @@ void MEDCouplingIMesh::refineWithFactor(const std::vector<int>& factors)
 MEDCouplingIMesh *MEDCouplingIMesh::asSingleCell() const
 {
   checkConsistencyLight();
-  int spaceDim(getSpaceDimension()),nodeSt[3];
+  mcIdType spaceDim(getSpaceDimension()),nodeSt[3];
   double dxyz[3];
   for(int i=0;i<spaceDim;i++)
     {
       if(_structure[i]>=2)
         {
           nodeSt[i]=2;
-          dxyz[i]=(_structure[i]-1)*_dxyz[i];
+          dxyz[i]=double(_structure[i]-1)*_dxyz[i];
         }
       else
         {
@@ -281,24 +281,25 @@ MEDCouplingIMesh *MEDCouplingIMesh::asSingleCell() const
  *
  * \sa CondenseFineToCoarseGhost,SpreadCoarseToFine
  */
-void MEDCouplingIMesh::CondenseFineToCoarse(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA)
+void MEDCouplingIMesh::CondenseFineToCoarse(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA)
 {
   if(coarseSt.size()!=fineLocInCoarse.size() || coarseSt.size()!=facts.size())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarse : All input vectors (dimension) must have the same size !");
   if(!coarseDA || !coarseDA->isAllocated() || !fineDA || !fineDA->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarse : the parameters 1 or 3 are NULL or not allocated !");
-  int meshDim((int)coarseSt.size()),nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseSt)),nbOfTuplesInFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(fineLocInCoarse));
-  int nbCompo(fineDA->getNumberOfComponents());
-  if((int)coarseDA->getNumberOfComponents()!=nbCompo)
+  std::size_t meshDim(coarseSt.size());
+  mcIdType nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseSt)),nbOfTuplesInFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(fineLocInCoarse));
+  std::size_t nbCompo=fineDA->getNumberOfComponents();
+  if(coarseDA->getNumberOfComponents()!=nbCompo)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarse : the number of components of fine DA and coarse one mismatches !");
-  if(meshDim!=(int)fineLocInCoarse.size() || meshDim!=(int)facts.size())
+  if(meshDim!=fineLocInCoarse.size() || meshDim!=facts.size())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarse : the size of fineLocInCoarse (4th param) and facts (5th param) must be equal to the sier of coarseSt (2nd param) !");
   if(coarseDA->getNumberOfTuples()!=nbOfTuplesInCoarseExp)
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::CondenseFineToCoarse : Expecting " << nbOfTuplesInCoarseExp << " tuples having " << coarseDA->getNumberOfTuples() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  int nbTuplesFine(fineDA->getNumberOfTuples());
+  mcIdType nbTuplesFine(fineDA->getNumberOfTuples());
   if(nbOfTuplesInFineExp==0)
     {
       if(nbTuplesFine==0)
@@ -308,7 +309,7 @@ void MEDCouplingIMesh::CondenseFineToCoarse(const std::vector<int>& coarseSt, co
     }
   if(nbTuplesFine%nbOfTuplesInFineExp!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarse : Invalid nb of tuples in fine DataArray regarding its structure !");
-  int fact(std::accumulate(facts.begin(),facts.end(),1,std::multiplies<int>()));
+  mcIdType fact(std::accumulate(facts.begin(),facts.end(),1,std::multiplies<mcIdType>()));
   if(nbTuplesFine!=fact*nbOfTuplesInFineExp)
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::CondenseFineToCoarse : Invalid number of tuples ("  << nbTuplesFine << ") of fine dataarray is invalid ! Must be " << fact*nbOfTuplesInFineExp << "!";
@@ -318,16 +319,16 @@ void MEDCouplingIMesh::CondenseFineToCoarse(const std::vector<int>& coarseSt, co
   double *outPtr(coarseDA->getPointer());
   const double *inPtr(fineDA->begin());
   //
-  std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
   switch(meshDim)
   {
     case 1:
       {
-        int offset(fineLocInCoarse[0].first),fact0(facts[0]);
+        mcIdType offset(fineLocInCoarse[0].first),fact0(facts[0]);
         for(int i=0;i<dims[0];i++)
           {
             double *loc(outPtr+(offset+i)*nbCompo);
-            for(int ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
+            for(mcIdType ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
               {
                 if(ifact!=0)
                   std::transform(inPtr,inPtr+nbCompo,loc,loc,std::plus<double>());
@@ -339,15 +340,15 @@ void MEDCouplingIMesh::CondenseFineToCoarse(const std::vector<int>& coarseSt, co
       }
     case 2:
       {
-        int kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first),fact1(facts[1]),fact0(facts[0]);
+        mcIdType kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first),fact1(facts[1]),fact0(facts[0]);
         for(int j=0;j<dims[1];j++)
           {
-            for(int jfact=0;jfact<fact1;jfact++)
+            for(mcIdType jfact=0;jfact<fact1;jfact++)
               {
                 for(int i=0;i<dims[0];i++)
                   {
                     double *loc(outPtr+(kk+i)*nbCompo);
-                    for(int ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
+                    for(mcIdType ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
                       {
                         if(jfact!=0 || ifact!=0)
                           std::transform(inPtr,inPtr+nbCompo,loc,loc,std::plus<double>());
@@ -362,19 +363,19 @@ void MEDCouplingIMesh::CondenseFineToCoarse(const std::vector<int>& coarseSt, co
       }
     case 3:
       {
-        int kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first+coarseSt[0]*coarseSt[1]*fineLocInCoarse[2].first),fact2(facts[2]),fact1(facts[1]),fact0(facts[0]);
+        mcIdType kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first+coarseSt[0]*coarseSt[1]*fineLocInCoarse[2].first),fact2(facts[2]),fact1(facts[1]),fact0(facts[0]);
         for(int k=0;k<dims[2];k++)
           {
-            for(int kfact=0;kfact<fact2;kfact++)
+            for(mcIdType kfact=0;kfact<fact2;kfact++)
               {
                 for(int j=0;j<dims[1];j++)
                   {
-                    for(int jfact=0;jfact<fact1;jfact++)
+                    for(mcIdType jfact=0;jfact<fact1;jfact++)
                       {
                         for(int i=0;i<dims[0];i++)
                           {
                             double *loc(outPtr+(kk+i+j*coarseSt[0])*nbCompo);
-                            for(int ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
+                            for(mcIdType ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
                               {
                                 if(kfact!=0 || jfact!=0 || ifact!=0)
                                   std::transform(inPtr,inPtr+nbCompo,loc,loc,std::plus<double>());
@@ -408,7 +409,7 @@ void MEDCouplingIMesh::CondenseFineToCoarse(const std::vector<int>& coarseSt, co
  *
  * \sa CondenseFineToCoarse,SpreadCoarseToFineGhost
  */
-void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA, int ghostSize)
+void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA, mcIdType ghostSize)
 {
   if(ghostSize<0)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarseGhost : ghost level has to be >= 0 !");
@@ -416,12 +417,13 @@ void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<int>& coarseS
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarseGhost : All input vectors (dimension) must have the same size !");
   if(!coarseDA || !coarseDA->isAllocated() || !fineDA || !fineDA->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarseGhost : the parameters 1 or 3 are NULL or not allocated !");
-  std::vector<int> coarseStG(coarseSt.size()); std::transform(coarseSt.begin(),coarseSt.end(),coarseStG.begin(),std::bind2nd(std::plus<int>(),2*ghostSize));
-  int meshDim((int)coarseSt.size()),nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseStG));
-  int nbCompo(fineDA->getNumberOfComponents());
-  if((int)coarseDA->getNumberOfComponents()!=nbCompo)
+  std::vector<mcIdType> coarseStG(coarseSt.size()); std::transform(coarseSt.begin(),coarseSt.end(),coarseStG.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
+  std::size_t meshDim(coarseSt.size());
+  mcIdType nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseStG));
+  std::size_t nbCompo(fineDA->getNumberOfComponents());
+  if(coarseDA->getNumberOfComponents()!=nbCompo)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarseGhost : the number of components of fine DA and coarse one mismatches !");
-  if(meshDim!=(int)fineLocInCoarse.size() || meshDim!=(int)facts.size())
+  if(meshDim!=fineLocInCoarse.size() || meshDim!=facts.size())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::CondenseFineToCoarseGhost : the size of fineLocInCoarse (4th param) and facts (5th param) must be equal to the sier of coarseSt (2nd param) !");
   if(coarseDA->getNumberOfTuples()!=nbOfTuplesInCoarseExp)
     {
@@ -429,10 +431,10 @@ void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<int>& coarseS
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   //
-  std::vector<int> fineStG(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
-  std::transform(fineStG.begin(),fineStG.end(),facts.begin(),fineStG.begin(),std::multiplies<int>());
-  std::transform(fineStG.begin(),fineStG.end(),fineStG.begin(),std::bind2nd(std::plus<int>(),2*ghostSize));
-  int nbTuplesFine(fineDA->getNumberOfTuples()),nbTuplesFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(fineStG));
+  std::vector<mcIdType> fineStG(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  std::transform(fineStG.begin(),fineStG.end(),facts.begin(),fineStG.begin(),std::multiplies<mcIdType>());
+  std::transform(fineStG.begin(),fineStG.end(),fineStG.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
+  mcIdType nbTuplesFine(fineDA->getNumberOfTuples()),nbTuplesFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(fineStG));
   if(fineDA->getNumberOfTuples()!=nbTuplesFineExp)
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::CondenseFineToCoarseGhost : Expecting " << nbTuplesFineExp << " tuples in fine DataArray having " << nbTuplesFine << " !";
@@ -442,17 +444,17 @@ void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<int>& coarseS
   double *outPtr(coarseDA->getPointer());
   const double *inPtr(fineDA->begin());
   //
-  std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
   switch(meshDim)
   {
     case 1:
       {
-        int offset(fineLocInCoarse[0].first+ghostSize),fact0(facts[0]);
+        mcIdType offset(fineLocInCoarse[0].first+ghostSize),fact0(facts[0]);
         inPtr+=ghostSize*nbCompo;
         for(int i=0;i<dims[0];i++)
           {
             double *loc(outPtr+(offset+i)*nbCompo);
-            for(int ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
+            for(mcIdType ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
               {
                 if(ifact!=0)
                   std::transform(inPtr,inPtr+nbCompo,loc,loc,std::plus<double>());
@@ -464,18 +466,18 @@ void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<int>& coarseS
       }
     case 2:
       {
-        int nxwg(coarseSt[0]+2*ghostSize);
-        int kk(fineLocInCoarse[0].first+ghostSize+nxwg*(fineLocInCoarse[1].first+ghostSize)),fact1(facts[1]),fact0(facts[0]);
+        mcIdType nxwg(coarseSt[0]+2*ghostSize);
+        mcIdType kk(fineLocInCoarse[0].first+ghostSize+nxwg*(fineLocInCoarse[1].first+ghostSize)),fact1(facts[1]),fact0(facts[0]);
         inPtr+=(dims[0]*fact0+2*ghostSize)*ghostSize*nbCompo;
         for(int j=0;j<dims[1];j++)
           {
-             for(int jfact=0;jfact<fact1;jfact++)
+             for(mcIdType jfact=0;jfact<fact1;jfact++)
               {
                 inPtr+=ghostSize*nbCompo;
                 for(int i=0;i<dims[0];i++)
                   {
                     double *loc(outPtr+(kk+i)*nbCompo);
-                    for(int ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
+                    for(mcIdType ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
                       {
                         if(jfact!=0 || ifact!=0)
                           std::transform(inPtr,inPtr+nbCompo,loc,loc,std::plus<double>());
@@ -491,24 +493,24 @@ void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<int>& coarseS
       }
     case 3:
       {
-        int nxwg(coarseSt[0]+2*ghostSize),nxywg((coarseSt[0]+2*ghostSize)*(coarseSt[1]+2*ghostSize));
-        int kk(fineLocInCoarse[0].first+ghostSize+nxwg*(fineLocInCoarse[1].first+ghostSize)+nxywg*(fineLocInCoarse[2].first+ghostSize)),fact2(facts[2]),fact1(facts[1]),fact0(facts[0]);
+        mcIdType nxwg(coarseSt[0]+2*ghostSize),nxywg((coarseSt[0]+2*ghostSize)*(coarseSt[1]+2*ghostSize));
+        mcIdType kk(fineLocInCoarse[0].first+ghostSize+nxwg*(fineLocInCoarse[1].first+ghostSize)+nxywg*(fineLocInCoarse[2].first+ghostSize)),fact2(facts[2]),fact1(facts[1]),fact0(facts[0]);
         inPtr+=(dims[0]*fact0+2*ghostSize)*(dims[1]*fact1+2*ghostSize)*ghostSize*nbCompo;
         for(int k=0;k<dims[2];k++)
           {
-            for(int kfact=0;kfact<fact2;kfact++)
+            for(mcIdType kfact=0;kfact<fact2;kfact++)
               {
                 inPtr+=ghostSize*(dims[0]*fact0+2*ghostSize)*nbCompo;
                 for(int j=0;j<dims[1];j++)
                   {
-                    int kky(j*nxwg);
-                    for(int jfact=0;jfact<fact1;jfact++)
+                    mcIdType kky(j*nxwg);
+                    for(mcIdType jfact=0;jfact<fact1;jfact++)
                       {
                         inPtr+=ghostSize*nbCompo;
                         for(int i=0;i<dims[0];i++)
                           {
                             double *loc(outPtr+(kky+kk+i)*nbCompo);
-                            for(int ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
+                            for(mcIdType ifact=0;ifact<fact0;ifact++,inPtr+=nbCompo)
                               {
                                 if(kfact!=0 || jfact!=0 || ifact!=0)
                                   std::transform(inPtr,inPtr+nbCompo,loc,loc,std::plus<double>());
@@ -540,27 +542,28 @@ void MEDCouplingIMesh::CondenseFineToCoarseGhost(const std::vector<int>& coarseS
  * \param [in] facts The refinement coefficient per axis.
  * \sa SpreadCoarseToFineGhost, CondenseFineToCoarse
  */
-void MEDCouplingIMesh::SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts)
+void MEDCouplingIMesh::SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts)
 {
   if(coarseSt.size()!=fineLocInCoarse.size() || coarseSt.size()!=facts.size())
       throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFine : All input vectors (dimension) must have the same size !");
   if(!coarseDA || !coarseDA->isAllocated() || !fineDA || !fineDA->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFine : the parameters 1 or 3 are NULL or not allocated !");
-  int meshDim((int)coarseSt.size()),nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseSt)),nbOfTuplesInFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(fineLocInCoarse));
-  int nbCompo(fineDA->getNumberOfComponents());
-  if((int)coarseDA->getNumberOfComponents()!=nbCompo)
+  std::size_t meshDim(coarseSt.size());
+  mcIdType nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseSt)),nbOfTuplesInFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(fineLocInCoarse));
+  std::size_t nbCompo=fineDA->getNumberOfComponents();
+  if(coarseDA->getNumberOfComponents()!=nbCompo)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFine : the number of components of fine DA and coarse one mismatches !");
-  if(meshDim!=(int)fineLocInCoarse.size() || meshDim!=(int)facts.size())
+  if(meshDim!=fineLocInCoarse.size() || meshDim!=facts.size())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFine : the size of fineLocInCoarse (4th param) and facts (5th param) must be equal to the sier of coarseSt (2nd param) !");
   if(coarseDA->getNumberOfTuples()!=nbOfTuplesInCoarseExp)
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::SpreadCoarseToFine : Expecting " << nbOfTuplesInCoarseExp << " tuples having " << coarseDA->getNumberOfTuples() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  int nbTuplesFine(fineDA->getNumberOfTuples());
+  mcIdType nbTuplesFine(fineDA->getNumberOfTuples());
   if(nbTuplesFine%nbOfTuplesInFineExp!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFine : Invalid nb of tuples in fine DataArray regarding its structure !");
-  int fact(std::accumulate(facts.begin(),facts.end(),1,std::multiplies<int>()));
+  mcIdType fact(std::accumulate(facts.begin(),facts.end(),1,std::multiplies<mcIdType>()));
   if(nbTuplesFine!=fact*nbOfTuplesInFineExp)
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::SpreadCoarseToFine : Invalid number of tuples ("  << nbTuplesFine << ") of fine dataarray is invalid ! Must be " << fact*nbOfTuplesInFineExp << "!";
@@ -570,31 +573,31 @@ void MEDCouplingIMesh::SpreadCoarseToFine(const DataArrayDouble *coarseDA, const
   double *outPtr(fineDA->getPointer());
   const double *inPtr(coarseDA->begin());
   //
-  std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
   switch(meshDim)
   {
     case 1:
       {
-        int offset(fineLocInCoarse[0].first),fact0(facts[0]);
+        mcIdType offset(fineLocInCoarse[0].first),fact0(facts[0]);
         for(int i=0;i<dims[0];i++)
           {
             const double *loc(inPtr+(offset+i)*nbCompo);
-            for(int ifact=0;ifact<fact0;ifact++)
+            for(mcIdType ifact=0;ifact<fact0;ifact++)
               outPtr=std::copy(loc,loc+nbCompo,outPtr);
           }
         break;
       }
     case 2:
       {
-        int kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first),fact0(facts[0]),fact1(facts[1]);
+        mcIdType kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first),fact0(facts[0]),fact1(facts[1]);
         for(int j=0;j<dims[1];j++)
           {
-            for(int jfact=0;jfact<fact1;jfact++)
+            for(mcIdType jfact=0;jfact<fact1;jfact++)
               {
                 for(int i=0;i<dims[0];i++)
                   {
                     const double *loc(inPtr+(kk+i)*nbCompo);
-                    for(int ifact=0;ifact<fact0;ifact++)
+                    for(mcIdType ifact=0;ifact<fact0;ifact++)
                       outPtr=std::copy(loc,loc+nbCompo,outPtr);
                   }
               }
@@ -604,19 +607,19 @@ void MEDCouplingIMesh::SpreadCoarseToFine(const DataArrayDouble *coarseDA, const
       }
     case 3:
       {
-        int kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first+coarseSt[0]*coarseSt[1]*fineLocInCoarse[2].first),fact0(facts[0]),fact1(facts[2]),fact2(facts[2]);
+        mcIdType kk(fineLocInCoarse[0].first+coarseSt[0]*fineLocInCoarse[1].first+coarseSt[0]*coarseSt[1]*fineLocInCoarse[2].first),fact0(facts[0]),fact1(facts[2]),fact2(facts[2]);
         for(int k=0;k<dims[2];k++)
           {
-            for(int kfact=0;kfact<fact2;kfact++)
+            for(mcIdType kfact=0;kfact<fact2;kfact++)
               {
                 for(int j=0;j<dims[1];j++)
                   {
-                    for(int jfact=0;jfact<fact1;jfact++)
+                    for(mcIdType jfact=0;jfact<fact1;jfact++)
                       {
                         for(int i=0;i<dims[0];i++)
                           {
                             const double *loc(inPtr+(kk+i+j*coarseSt[0])*nbCompo);
-                            for(int ifact=0;ifact<fact0;ifact++)
+                            for(mcIdType ifact=0;ifact<fact0;ifact++)
                               outPtr=std::copy(loc,loc+nbCompo,outPtr);
                           }
                       }
@@ -643,7 +646,7 @@ void MEDCouplingIMesh::SpreadCoarseToFine(const DataArrayDouble *coarseDA, const
  *
  * \sa CondenseFineToCoarse, SpreadCoarseToFineGhostZone
  */
-void MEDCouplingIMesh::SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize)
+void MEDCouplingIMesh::SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize)
 {
   if(ghostSize<0)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhost : ghost level has to be >= 0 !");
@@ -651,12 +654,13 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA,
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhost : All input vectors (dimension) must have the same size !");
   if(!coarseDA || !coarseDA->isAllocated() || !fineDA || !fineDA->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhost : the parameters 1 or 3 are NULL or not allocated !");
-  std::vector<int> coarseStG(coarseSt.size()); std::transform(coarseSt.begin(),coarseSt.end(),coarseStG.begin(),std::bind2nd(std::plus<int>(),2*ghostSize));
-  int meshDim((int)coarseSt.size()),nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseStG));
-  int nbCompo(fineDA->getNumberOfComponents());
-  if((int)coarseDA->getNumberOfComponents()!=nbCompo)
+  std::vector<mcIdType> coarseStG(coarseSt.size()); std::transform(coarseSt.begin(),coarseSt.end(),coarseStG.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
+  std::size_t meshDim(coarseSt.size());
+  mcIdType nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseStG));
+  std::size_t nbCompo=fineDA->getNumberOfComponents();
+  if(coarseDA->getNumberOfComponents()!=nbCompo)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhost : the number of components of fine DA and coarse one mismatches !");
-  if(meshDim!=(int)fineLocInCoarse.size() || meshDim!=(int)facts.size())
+  if(meshDim!=fineLocInCoarse.size() || meshDim!=facts.size())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhost : the size of fineLocInCoarse (4th param) and facts (5th param) must be equal to the sier of coarseSt (2nd param) !");
   if(coarseDA->getNumberOfTuples()!=nbOfTuplesInCoarseExp)
     {
@@ -664,10 +668,10 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA,
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   //
-  std::vector<int> fineStG(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
-  std::transform(fineStG.begin(),fineStG.end(),facts.begin(),fineStG.begin(),std::multiplies<int>());
-  std::transform(fineStG.begin(),fineStG.end(),fineStG.begin(),std::bind2nd(std::plus<int>(),2*ghostSize));
-  int nbTuplesFine(fineDA->getNumberOfTuples()),nbTuplesFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(fineStG));
+  std::vector<mcIdType> fineStG(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  std::transform(fineStG.begin(),fineStG.end(),facts.begin(),fineStG.begin(),std::multiplies<mcIdType>());
+  std::transform(fineStG.begin(),fineStG.end(),fineStG.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
+  mcIdType nbTuplesFine(fineDA->getNumberOfTuples()),nbTuplesFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(fineStG));
   if(fineDA->getNumberOfTuples()!=nbTuplesFineExp)
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::SpreadCoarseToFineGhost : Expecting " << nbTuplesFineExp << " tuples in fine DataArray having " << nbTuplesFine << " !";
@@ -681,19 +685,19 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA,
   {
     case 1:
       {
-        std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
-        int offset(fineLocInCoarse[0].first+ghostSize-1),fact0(facts[0]);//offset is always >=0 thanks to the fact that ghostSize>=1 !
-        for(int i=0;i<ghostSize;i++)
+        std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+        mcIdType offset(fineLocInCoarse[0].first+ghostSize-1),fact0(facts[0]);//offset is always >=0 thanks to the fact that ghostSize>=1 !
+        for(mcIdType i=0;i<ghostSize;i++)
           outPtr=std::copy(inPtr+offset*nbCompo,inPtr+(offset+1)*nbCompo,outPtr);
         offset=fineLocInCoarse[0].first+ghostSize;
         for(int i=0;i<dims[0];i++)
           {
             const double *loc(inPtr+(offset+i)*nbCompo);
-            for(int ifact=0;ifact<fact0;ifact++)
+            for(mcIdType ifact=0;ifact<fact0;ifact++)
               outPtr=std::copy(loc,loc+nbCompo,outPtr);
           }
         offset=fineLocInCoarse[0].second+ghostSize;
-        for(int i=0;i<ghostSize;i++)
+        for(mcIdType i=0;i<ghostSize;i++)
           outPtr=std::copy(inPtr+offset*nbCompo,inPtr+(offset+1)*nbCompo,outPtr);
         break;
       }
@@ -704,17 +708,17 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA,
       }
     case 3:
       {
-        std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
-        int fact0(facts[0]),fact1(facts[1]),fact2(facts[2]);
-        int nxyWgCoarse((coarseSt[0]+2*ghostSize)*(coarseSt[1]+2*ghostSize)),nxyWgFine((dims[0]*fact0+2*ghostSize)*(dims[1]*fact1+2*ghostSize));
-        int offset((fineLocInCoarse[2].first+ghostSize-1)*nxyWgCoarse);//offset is always >=0 thanks to the fact that ghostSize>=1 !
-        for(int i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
+        std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+        mcIdType fact0(facts[0]),fact1(facts[1]),fact2(facts[2]);
+        mcIdType nxyWgCoarse((coarseSt[0]+2*ghostSize)*(coarseSt[1]+2*ghostSize)),nxyWgFine((dims[0]*fact0+2*ghostSize)*(dims[1]*fact1+2*ghostSize));
+        mcIdType offset((fineLocInCoarse[2].first+ghostSize-1)*nxyWgCoarse);//offset is always >=0 thanks to the fact that ghostSize>=1 !
+        for(mcIdType i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
           SpreadCoarseToFineGhost2D(inPtr+offset*nbCompo,outPtr,nbCompo,coarseSt,fineLocInCoarse,facts,ghostSize);
         offset+=nxyWgCoarse;
         for(int i=0;i<dims[2];i++,offset+=nxyWgCoarse)
-          for(int j=0;j<fact2;j++,outPtr+=nxyWgFine*nbCompo)
+          for(mcIdType j=0;j<fact2;j++,outPtr+=nxyWgFine*nbCompo)
             SpreadCoarseToFineGhost2D(inPtr+offset*nbCompo,outPtr,nbCompo,coarseSt,fineLocInCoarse,facts,ghostSize);
-        for(int i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
+        for(mcIdType i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
           SpreadCoarseToFineGhost2D(inPtr+offset*nbCompo,outPtr,nbCompo,coarseSt,fineLocInCoarse,facts,ghostSize);
         break;
       }
@@ -735,7 +739,7 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA,
  *
  * \sa SpreadCoarseToFineGhost
  */
-void MEDCouplingIMesh::SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize)
+void MEDCouplingIMesh::SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize)
 {
   if(ghostSize<0)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhostZone : ghost level has to be >= 0 !");
@@ -743,12 +747,13 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhostZone(const DataArrayDouble *coarse
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhostZone : All input vectors (dimension) must have the same size !");
   if(!coarseDA || !coarseDA->isAllocated() || !fineDA || !fineDA->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhostZone : the parameters 1 or 3 are NULL or not allocated !");
-  std::vector<int> coarseStG(coarseSt.size()); std::transform(coarseSt.begin(),coarseSt.end(),coarseStG.begin(),std::bind2nd(std::plus<int>(),2*ghostSize));
-  int meshDim((int)coarseSt.size()),nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseStG));
-  int nbCompo(fineDA->getNumberOfComponents());
-  if((int)coarseDA->getNumberOfComponents()!=nbCompo)
+  std::vector<mcIdType> coarseStG(coarseSt.size()); std::transform(coarseSt.begin(),coarseSt.end(),coarseStG.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
+  std::size_t meshDim(coarseSt.size());
+  mcIdType nbOfTuplesInCoarseExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(coarseStG));
+  std::size_t nbCompo=fineDA->getNumberOfComponents();
+  if(coarseDA->getNumberOfComponents()!=nbCompo)
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhostZone : the number of components of fine DA and coarse one mismatches !");
-  if(meshDim!=(int)fineLocInCoarse.size() || meshDim!=(int)facts.size())
+  if(meshDim!=fineLocInCoarse.size() || meshDim!=facts.size())
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::SpreadCoarseToFineGhostZone : the size of fineLocInCoarse (4th param) and facts (5th param) must be equal to the sier of coarseSt (2nd param) !");
   if(coarseDA->getNumberOfTuples()!=nbOfTuplesInCoarseExp)
     {
@@ -756,10 +761,10 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhostZone(const DataArrayDouble *coarse
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   //
-  std::vector<int> fineStG(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
-  std::transform(fineStG.begin(),fineStG.end(),facts.begin(),fineStG.begin(),std::multiplies<int>());
-  std::transform(fineStG.begin(),fineStG.end(),fineStG.begin(),std::bind2nd(std::plus<int>(),2*ghostSize));
-  int nbTuplesFine(fineDA->getNumberOfTuples()),nbTuplesFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(fineStG));
+  std::vector<mcIdType> fineStG(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  std::transform(fineStG.begin(),fineStG.end(),facts.begin(),fineStG.begin(),std::multiplies<mcIdType>());
+  std::transform(fineStG.begin(),fineStG.end(),fineStG.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
+  mcIdType nbTuplesFine(fineDA->getNumberOfTuples()),nbTuplesFineExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(fineStG));
   if(fineDA->getNumberOfTuples()!=nbTuplesFineExp)
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::SpreadCoarseToFineGhostZone : Expecting " << nbTuplesFineExp << " tuples in fine DataArray having " << nbTuplesFine << " !";
@@ -769,38 +774,38 @@ void MEDCouplingIMesh::SpreadCoarseToFineGhostZone(const DataArrayDouble *coarse
   double *outPtr(fineDA->getPointer());
   const double *inPtr(coarseDA->begin());
   //
-  std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
   switch(meshDim)
   {
     case 1:
       {
-        int offset(fineLocInCoarse[0].first+ghostSize-1),fact0(facts[0]);//offset is always >=0 thanks to the fact that ghostSize>=1 !
-        for(int i=0;i<ghostSize;i++)
+        mcIdType offset(fineLocInCoarse[0].first+ghostSize-1),fact0(facts[0]);//offset is always >=0 thanks to the fact that ghostSize>=1 !
+        for(mcIdType i=0;i<ghostSize;i++)
           outPtr=std::copy(inPtr+offset*nbCompo,inPtr+(offset+1)*nbCompo,outPtr);
         outPtr+=nbCompo*fact0*dims[0];
         offset=fineLocInCoarse[0].second+ghostSize;
-        for(int i=0;i<ghostSize;i++)
+        for(mcIdType i=0;i<ghostSize;i++)
           outPtr=std::copy(inPtr+offset*nbCompo,inPtr+(offset+1)*nbCompo,outPtr);
         break;
       }
     case 2:
       {
-        SpreadCoarseToFineGhostZone2D(inPtr,outPtr,nbCompo,coarseSt,fineLocInCoarse,facts,ghostSize);
+        SpreadCoarseToFineGhostZone2D(inPtr,outPtr,ToIdType(nbCompo),coarseSt,fineLocInCoarse,facts,ghostSize);
         break;
       }
     case 3:
       {
-        int fact0(facts[0]),fact1(facts[1]),fact2(facts[2]);
-        int nxyWgCoarse((coarseSt[0]+2*ghostSize)*(coarseSt[1]+2*ghostSize)),nxyWgFine((dims[0]*fact0+2*ghostSize)*(dims[1]*fact1+2*ghostSize));
-        int offset((fineLocInCoarse[2].first+ghostSize-1)*nxyWgCoarse);//offset is always >=0 thanks to the fact that ghostSize>=1 !
-        for(int i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
-          SpreadCoarseToFineGhost2D(inPtr+offset*nbCompo,outPtr,nbCompo,coarseSt,fineLocInCoarse,facts,ghostSize);
+        mcIdType fact0(facts[0]),fact1(facts[1]),fact2(facts[2]);
+        mcIdType nxyWgCoarse((coarseSt[0]+2*ghostSize)*(coarseSt[1]+2*ghostSize)),nxyWgFine((dims[0]*fact0+2*ghostSize)*(dims[1]*fact1+2*ghostSize));
+        mcIdType offset((fineLocInCoarse[2].first+ghostSize-1)*nxyWgCoarse);//offset is always >=0 thanks to the fact that ghostSize>=1 !
+        for(mcIdType i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
+          SpreadCoarseToFineGhost2D(inPtr+offset*nbCompo,outPtr,ToIdType(nbCompo),coarseSt,fineLocInCoarse,facts,ghostSize);
         offset+=nxyWgCoarse;
         for(int i=0;i<dims[2];i++,offset+=nxyWgCoarse)
-          for(int j=0;j<fact2;j++,outPtr+=nxyWgFine*nbCompo)
-            SpreadCoarseToFineGhostZone2D(inPtr+offset*nbCompo,outPtr,nbCompo,coarseSt,fineLocInCoarse,facts,ghostSize);
-        for(int i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
-          SpreadCoarseToFineGhost2D(inPtr+offset*nbCompo,outPtr,nbCompo,coarseSt,fineLocInCoarse,facts,ghostSize);
+          for(mcIdType j=0;j<fact2;j++,outPtr+=nxyWgFine*nbCompo)
+            SpreadCoarseToFineGhostZone2D(inPtr+offset*nbCompo,outPtr,ToIdType(nbCompo),coarseSt,fineLocInCoarse,facts,ghostSize);
+        for(mcIdType i=0;i<ghostSize;i++,outPtr+=nxyWgFine*nbCompo)
+          SpreadCoarseToFineGhost2D(inPtr+offset*nbCompo,outPtr,ToIdType(nbCompo),coarseSt,fineLocInCoarse,facts,ghostSize);
         break;
       }
     default:
@@ -921,7 +926,7 @@ bool MEDCouplingIMesh::isEqualWithoutConsideringStrInternal(const MEDCouplingMes
 }
 
 void MEDCouplingIMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                            DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
+                                            DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 {
   if(!isEqualWithoutConsideringStr(other,prec))
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::checkDeepEquivalWith : Meshes are not the same !");
@@ -932,7 +937,7 @@ void MEDCouplingIMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int ce
  * The user intend that the nodes are the same, so by construction of MEDCoupling::MEDCouplingIMesh, \a this and \a other are the same !
  */
 void MEDCouplingIMesh::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                       DataArrayInt *&cellCor) const
+                                                       DataArrayIdType *&cellCor) const
 {
   if(!isEqualWithoutConsideringStr(other,prec))
     throw INTERP_KERNEL::Exception("MEDCouplingIMesh::checkDeepEquivalOnSameNodesWith : Meshes are not the same !");
@@ -954,35 +959,35 @@ void MEDCouplingIMesh::checkConsistency(double eps) const
   checkConsistencyLight();
 }
 
-void MEDCouplingIMesh::getNodeGridStructure(int *res) const
+void MEDCouplingIMesh::getNodeGridStructure(mcIdType *res) const
 {
   checkSpaceDimension();
   std::copy(_structure,_structure+_space_dim,res);
 }
 
-std::vector<int> MEDCouplingIMesh::getNodeGridStructure() const
+std::vector<mcIdType> MEDCouplingIMesh::getNodeGridStructure() const
 {
   checkSpaceDimension();
-  std::vector<int> ret(_structure,_structure+_space_dim);
+  std::vector<mcIdType> ret(_structure,_structure+_space_dim);
   return ret;
 }
 
-MEDCouplingStructuredMesh *MEDCouplingIMesh::buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const
+MEDCouplingStructuredMesh *MEDCouplingIMesh::buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const
 {
   checkConsistencyLight();
   int dim(getSpaceDimension());
-  if(dim!=(int)cellPart.size())
+  if(dim!=ToIdType(cellPart.size()))
     {
       std::ostringstream oss; oss << "MEDCouplingIMesh::buildStructuredSubPart : the space dimension is " << dim << " and cell part size is " << cellPart.size() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   double retOrigin[3]={0.,0.,0.};
-  int retStruct[3]={0,0,0};
+  mcIdType retStruct[3]={0,0,0};
   MCAuto<MEDCouplingIMesh> ret(dynamic_cast<MEDCouplingIMesh *>(deepCopy()));
   for(int i=0;i<dim;i++)
     {
-      int startNode(cellPart[i].first),endNode(cellPart[i].second+1);
-      int myDelta(endNode-startNode);
+      mcIdType startNode(cellPart[i].first),endNode(cellPart[i].second+1);
+      mcIdType myDelta(endNode-startNode);
       if(startNode<0 || startNode>=_structure[i])
         {
           std::ostringstream oss; oss << "MEDCouplingIMesh::buildStructuredSubPart : At dimension #" << i << " the start node id is " << startNode << " it should be in [0," << _structure[i] << ") !";
@@ -993,7 +998,7 @@ MEDCouplingStructuredMesh *MEDCouplingIMesh::buildStructuredSubPart(const std::v
           std::ostringstream oss; oss << "MEDCouplingIMesh::buildStructuredSubPart : Along dimension #" << i << " the number of nodes is " << _structure[i] << ", and you are requesting for " << myDelta << " nodes wide range !" << std::endl;
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      retOrigin[i]=_origin[i]+startNode*_dxyz[i];
+      retOrigin[i]=_origin[i]+FromIdType<double>(startNode)*_dxyz[i];
       retStruct[i]=myDelta;
     }
   ret->setNodeStruct(retStruct,retStruct+dim);
@@ -1010,15 +1015,15 @@ int MEDCouplingIMesh::getSpaceDimension() const
   return _space_dim;
 }
 
-void MEDCouplingIMesh::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const
+void MEDCouplingIMesh::getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const
 {
-  int tmp[3];
+  mcIdType tmp[3];
   int spaceDim(getSpaceDimension());
   getSplitNodeValues(tmp);
-  int tmp2[3];
+  mcIdType tmp2[3];
   GetPosFromId(nodeId,spaceDim,tmp,tmp2);
   for(int j=0;j<spaceDim;j++)
-    coo.push_back(_origin[j]+_dxyz[j]*tmp2[j]);
+    coo.push_back(_origin[j]+_dxyz[j]*FromIdType<double>(tmp2[j]));
 }
 
 std::string MEDCouplingIMesh::simpleRepr() const
@@ -1054,7 +1059,7 @@ void MEDCouplingIMesh::getBoundingBox(double *bbox) const
   for(int idim=0; idim<dim; idim++)
     {
       bbox[2*idim]=_origin[idim];
-      int coeff(_structure[idim]);
+      mcIdType coeff(_structure[idim]);
       if(_structure[idim]<0)
         {
           std::ostringstream oss; oss << "MEDCouplingIMesh::getBoundingBox : on axis #" << idim << " number of nodes in structure is < 0 !";
@@ -1062,7 +1067,7 @@ void MEDCouplingIMesh::getBoundingBox(double *bbox) const
         }
       if(_structure[idim]>1)
         coeff=_structure[idim]-1;
-      bbox[2*idim+1]=_origin[idim]+_dxyz[idim]*coeff;
+      bbox[2*idim+1]=_origin[idim]+_dxyz[idim]*FromIdType<double>(coeff);
     }
 }
 
@@ -1082,7 +1087,7 @@ MEDCouplingFieldDouble *MEDCouplingIMesh::getMeasureField(bool isAbs) const
   checkConsistencyLight();
   std::string name="MeasureOfMesh_";
   name+=getName();
-  int nbelem(getNumberOfCells());
+  std::size_t nbelem=getNumberOfCells();
   MEDCouplingFieldDouble *field(MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME));
   field->setName(name);
   DataArrayDouble* array(DataArrayDouble::New());
@@ -1104,14 +1109,14 @@ MEDCouplingFieldDouble *MEDCouplingIMesh::getMeasureFieldOnNode(bool isAbs) cons
   //return 0;
 }
 
-int MEDCouplingIMesh::getCellContainingPoint(const double *pos, double eps) const
+mcIdType MEDCouplingIMesh::getCellContainingPoint(const double *pos, double eps) const
 {
-  int dim(getSpaceDimension()),ret(0),coeff(1);
-  for(int i=0;i<dim;i++)
+  mcIdType dim(getSpaceDimension()),ret(0),coeff(1);
+  for(mcIdType i=0;i<dim;i++)
     {
-      int nbOfCells(_structure[i]-1);
+      mcIdType nbOfCells(_structure[i]-1);
       double ref(pos[i]);
-      int tmp((int)((ref-_origin[i])/_dxyz[i]));
+      mcIdType tmp(ToIdType((ref-_origin[i])/_dxyz[i]));
       if(tmp>=0 && tmp<nbOfCells)
         {
           ret+=coeff*tmp;
@@ -1123,9 +1128,9 @@ int MEDCouplingIMesh::getCellContainingPoint(const double *pos, double eps) cons
   return ret;
 }
 
-void MEDCouplingIMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const
+void MEDCouplingIMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const
 {
-  int ret(getCellContainingPoint(pos,eps));
+  mcIdType ret(getCellContainingPoint(pos,eps));
   elts.push_back(ret);
 }
 
@@ -1182,17 +1187,18 @@ DataArrayDouble *MEDCouplingIMesh::getCoordinatesAndOwner() const
 {
   checkConsistencyLight();
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
-  int spaceDim(getSpaceDimension()),nbNodes(getNumberOfNodes());
+  int spaceDim(getSpaceDimension());
+  mcIdType nbNodes(getNumberOfNodes());
   ret->alloc(nbNodes,spaceDim);
   double *pt(ret->getPointer());
   ret->setInfoOnComponents(buildInfoOnComponents());
-  int tmp2[3],tmp[3];
+  mcIdType tmp2[3],tmp[3];
   getSplitNodeValues(tmp);
-  for(int i=0;i<nbNodes;i++)
+  for(mcIdType i=0;i<nbNodes;i++)
     {
       GetPosFromId(i,spaceDim,tmp,tmp2);
       for(int j=0;j<spaceDim;j++)
-        pt[i*spaceDim+j]=_dxyz[j]*tmp2[j]+_origin[j];
+        pt[i*spaceDim+j]=_dxyz[j]*FromIdType<double>(tmp2[j])+_origin[j];
     }
   return ret.retn();
 }
@@ -1209,18 +1215,19 @@ DataArrayDouble *MEDCouplingIMesh::computeCellCenterOfMass() const
 {
   checkConsistencyLight();
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
-  int spaceDim(getSpaceDimension()),nbCells(getNumberOfCells()),tmp[3],tmp2[3];
+  int spaceDim(getSpaceDimension());
+  mcIdType nbCells(ToIdType(getNumberOfCells())),tmp[3],tmp2[3];
   ret->alloc(nbCells,spaceDim);
   double *pt(ret->getPointer()),shiftOrigin[3];
   std::transform(_dxyz,_dxyz+spaceDim,shiftOrigin,std::bind2nd(std::multiplies<double>(),0.5));
   std::transform(_origin,_origin+spaceDim,shiftOrigin,shiftOrigin,std::plus<double>());
   getSplitCellValues(tmp);
   ret->setInfoOnComponents(buildInfoOnComponents());
-  for(int i=0;i<nbCells;i++)
+  for(mcIdType i=0;i<nbCells;i++)
     {
       GetPosFromId(i,spaceDim,tmp,tmp2);
       for(int j=0;j<spaceDim;j++)
-        pt[i*spaceDim+j]=_dxyz[j]*tmp2[j]+shiftOrigin[j];
+        pt[i*spaceDim+j]=_dxyz[j]*FromIdType<double>(tmp2[j])+shiftOrigin[j];
     }
   return ret.retn();
 }
@@ -1230,12 +1237,12 @@ DataArrayDouble *MEDCouplingIMesh::computeIsoBarycenterOfNodesPerCell() const
   return MEDCouplingIMesh::computeCellCenterOfMass();
 }
 
-void MEDCouplingIMesh::renumberCells(const int *old2NewBg, bool check)
+void MEDCouplingIMesh::renumberCells(const mcIdType *old2NewBg, bool check)
 {
   throw INTERP_KERNEL::Exception("Functionality of renumbering cell not available for IMesh !");
 }
 
-void MEDCouplingIMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingIMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
   int it,order;
   double time(getTime(it,order));
@@ -1255,29 +1262,29 @@ void MEDCouplingIMesh::getTinySerializationInformation(std::vector<double>& tiny
   tinyInfoD.insert(tinyInfoD.end(),_origin,_origin+3);
 }
 
-void MEDCouplingIMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCouplingIMesh::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
   a1->alloc(0,1);
   a2->alloc(0,1);
 }
 
-void MEDCouplingIMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCouplingIMesh::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
-  a1=DataArrayInt::New();
+  a1=DataArrayIdType::New();
   a1->alloc(0,1);
   a2=DataArrayDouble::New();
   a2->alloc(0,1);
 }
 
-void MEDCouplingIMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+void MEDCouplingIMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                        const std::vector<std::string>& littleStrings)
 {
   setName(littleStrings[0]);
   setDescription(littleStrings[1]);
   setTimeUnit(littleStrings[2]);
   setAxisUnit(littleStrings[3]);
-  setTime(tinyInfoD[0],tinyInfo[0],tinyInfo[1]);
-  _space_dim=tinyInfo[2];
+  setTime(tinyInfoD[0],FromIdType<int>(tinyInfo[0]),FromIdType<int>(tinyInfo[1]));
+  _space_dim=FromIdType<int>(tinyInfo[2]);
   _structure[0]=tinyInfo[3]; _structure[1]=tinyInfo[4]; _structure[2]=tinyInfo[5];
   _dxyz[0]=tinyInfoD[1]; _dxyz[1]=tinyInfoD[2]; _dxyz[2]=tinyInfoD[3];
   _origin[0]=tinyInfoD[4]; _origin[1]=tinyInfoD[5]; _origin[2]=tinyInfoD[6];
@@ -1314,12 +1321,12 @@ void MEDCouplingIMesh::reprQuickOverview(std::ostream& stream) const
     return ;
   stream << "\n";
   std::ostringstream stream0,stream1;
-  int nbNodes(1),nbCells(0);
+  mcIdType nbNodes(1),nbCells(0);
   bool isPb(false);
   for(int i=0;i<_space_dim;i++)
     {
-      char tmp('X'+i);
-      int tmpNodes(_structure[i]);
+      char tmp=(char)((int)('X')+i);
+      mcIdType tmpNodes(_structure[i]);
       stream1 << "- Axis " << tmp << " : " << tmpNodes << " nodes (orig=" << _origin[i] << ", inter=" << _dxyz[i] << ").";
       if(i!=_space_dim-1)
         stream1 << std::endl;
@@ -1358,7 +1365,7 @@ std::vector<std::string> MEDCouplingIMesh::buildInfoOnComponents() const
   for(int i=0;i<dim;i++)
     {
       std::ostringstream oss;
-      char tmp('X'+i); oss << tmp;
+      char tmp=(char)((int)('X')+i); oss << tmp;
       ret[i]=DataArray::BuildInfoFromVarAndUnit(oss.str(),_axis_unit);
     }
   return ret;
@@ -1407,95 +1414,95 @@ int MEDCouplingIMesh::FindIntRoot(int val, int order)
     }
 }
 
-void MEDCouplingIMesh::SpreadCoarseToFineGhost2D(const double *inPtr, double *outPtr, int nbCompo, const std::vector<int>& coarseSt, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize)
+void MEDCouplingIMesh::SpreadCoarseToFineGhost2D(const double *inPtr, double *outPtr, std::size_t nbCompo, const std::vector<mcIdType>& coarseSt, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize)
 {
   double *outPtrWork(outPtr);
-  std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
-  int nxwg(coarseSt[0]+2*ghostSize),fact0(facts[0]),fact1(facts[1]);
-  int kk(fineLocInCoarse[0].first+ghostSize-1+nxwg*(fineLocInCoarse[1].first+ghostSize-1));//kk is always >=0 thanks to the fact that ghostSize>=1 !
-  for(int jg=0;jg<ghostSize;jg++)
+  std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  mcIdType nxwg(coarseSt[0]+2*ghostSize),fact0(facts[0]),fact1(facts[1]);
+  mcIdType kk(fineLocInCoarse[0].first+ghostSize-1+nxwg*(fineLocInCoarse[1].first+ghostSize-1));//kk is always >=0 thanks to the fact that ghostSize>=1 !
+  for(mcIdType jg=0;jg<ghostSize;jg++)
     {
-      for(int ig=0;ig<ghostSize;ig++)
+      for(mcIdType ig=0;ig<ghostSize;ig++)
         outPtrWork=std::copy(inPtr+kk*nbCompo,inPtr+(kk+1)*nbCompo,outPtrWork);
-      int kk0(kk+1);
-      for(int ig=0;ig<dims[0];ig++,kk0++)
-        for(int ifact=0;ifact<fact0;ifact++)
+      mcIdType kk0(kk+1);
+      for(mcIdType ig=0;ig<dims[0];ig++,kk0++)
+        for(mcIdType ifact=0;ifact<fact0;ifact++)
           outPtrWork=std::copy(inPtr+(kk0)*nbCompo,inPtr+(kk0+1)*nbCompo,outPtrWork);
-      for(int ik=0;ik<ghostSize;ik++)
+      for(mcIdType ik=0;ik<ghostSize;ik++)
         outPtrWork=std::copy(inPtr+kk0*nbCompo,inPtr+(kk0+1)*nbCompo,outPtrWork);
     }
-  for(int j=0;j<dims[1];j++)
+  for(mcIdType j=0;j<dims[1];j++)
     {
       kk=fineLocInCoarse[0].first-1+ghostSize+nxwg*(fineLocInCoarse[1].first+ghostSize+j);
-      for(int jfact=0;jfact<fact1;jfact++)
+      for(mcIdType jfact=0;jfact<fact1;jfact++)
         {
-          for(int ig=0;ig<ghostSize;ig++)
+          for(mcIdType ig=0;ig<ghostSize;ig++)
             outPtrWork=std::copy(inPtr+kk*nbCompo,inPtr+(kk+1)*nbCompo,outPtrWork);
-          int kk0(kk+1);//1 not ghost. We make the hypothesis that factors is >= ghostlev
-          for(int i=0;i<dims[0];i++,kk0++)
+          mcIdType kk0(kk+1);//1 not ghost. We make the hypothesis that factors is >= ghostlev
+          for(mcIdType i=0;i<dims[0];i++,kk0++)
             {
               const double *loc(inPtr+kk0*nbCompo);
-              for(int ifact=0;ifact<fact0;ifact++)
+              for(mcIdType ifact=0;ifact<fact0;ifact++)
                 outPtrWork=std::copy(loc,loc+nbCompo,outPtrWork);
             }
-          for(int ig=0;ig<ghostSize;ig++)
+          for(mcIdType ig=0;ig<ghostSize;ig++)
             outPtrWork=std::copy(inPtr+kk0*nbCompo,inPtr+(kk0+1)*nbCompo,outPtrWork);
         }
     }
   kk=fineLocInCoarse[0].first+ghostSize-1+nxwg*(fineLocInCoarse[1].second+ghostSize);
-  for(int jg=0;jg<ghostSize;jg++)
+  for(mcIdType jg=0;jg<ghostSize;jg++)
     {
-      for(int ig=0;ig<ghostSize;ig++)
+      for(mcIdType ig=0;ig<ghostSize;ig++)
         outPtrWork=std::copy(inPtr+kk*nbCompo,inPtr+(kk+1)*nbCompo,outPtrWork);
-      int kk0(kk+1);
-      for(int ig=0;ig<dims[0];ig++,kk0++)
-        for(int ifact=0;ifact<fact0;ifact++)
+      mcIdType kk0(kk+1);
+      for(mcIdType ig=0;ig<dims[0];ig++,kk0++)
+        for(mcIdType ifact=0;ifact<fact0;ifact++)
           outPtrWork=std::copy(inPtr+(kk0)*nbCompo,inPtr+(kk0+1)*nbCompo,outPtrWork);
-      for(int ik=0;ik<ghostSize;ik++)
+      for(mcIdType ik=0;ik<ghostSize;ik++)
         outPtrWork=std::copy(inPtr+kk0*nbCompo,inPtr+(kk0+1)*nbCompo,outPtrWork);
     }
 }
 
-void MEDCouplingIMesh::SpreadCoarseToFineGhostZone2D(const double *inPtr, double *outPtr, int nbCompo, const std::vector<int>& coarseSt, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize)
+void MEDCouplingIMesh::SpreadCoarseToFineGhostZone2D(const double *inPtr, double *outPtr, std::size_t nbCompo, const std::vector<mcIdType>& coarseSt, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize)
 {
   double *outPtr2(outPtr);
-  std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
-  int nxwg(coarseSt[0]+2*ghostSize),fact0(facts[0]),fact1(facts[1]);
-  int kk(fineLocInCoarse[0].first+ghostSize-1+nxwg*(fineLocInCoarse[1].first+ghostSize-1));//kk is always >=0 thanks to the fact that ghostSize>=1 !
-  for(int jg=0;jg<ghostSize;jg++)
+  std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(fineLocInCoarse));
+  mcIdType nxwg(coarseSt[0]+2*ghostSize),fact0(facts[0]),fact1(facts[1]);
+  mcIdType kk(fineLocInCoarse[0].first+ghostSize-1+nxwg*(fineLocInCoarse[1].first+ghostSize-1));//kk is always >=0 thanks to the fact that ghostSize>=1 !
+  for(mcIdType jg=0;jg<ghostSize;jg++)
     {
-      for(int ig=0;ig<ghostSize;ig++)
+      for(mcIdType ig=0;ig<ghostSize;ig++)
         outPtr2=std::copy(inPtr+kk*nbCompo,inPtr+(kk+1)*nbCompo,outPtr2);
-      int kk0(kk+1);
-      for(int ig=0;ig<dims[0];ig++,kk0++)
-        for(int ifact=0;ifact<fact0;ifact++)
+      mcIdType kk0(kk+1);
+      for(mcIdType ig=0;ig<dims[0];ig++,kk0++)
+        for(mcIdType ifact=0;ifact<fact0;ifact++)
           outPtr2=std::copy(inPtr+(kk0)*nbCompo,inPtr+(kk0+1)*nbCompo,outPtr2);
-      for(int ik=0;ik<ghostSize;ik++)
+      for(mcIdType ik=0;ik<ghostSize;ik++)
         outPtr2=std::copy(inPtr+kk0*nbCompo,inPtr+(kk0+1)*nbCompo,outPtr2);
     }
-  for(int j=0;j<dims[1];j++)
+  for(mcIdType j=0;j<dims[1];j++)
     {
       kk=fineLocInCoarse[0].first-1+ghostSize+nxwg*(fineLocInCoarse[1].first+ghostSize+j);
-      for(int jfact=0;jfact<fact1;jfact++)
+      for(mcIdType jfact=0;jfact<fact1;jfact++)
         {
-          for(int ig=0;ig<ghostSize;ig++)
+          for(mcIdType ig=0;ig<ghostSize;ig++)
             outPtr2=std::copy(inPtr+kk*nbCompo,inPtr+(kk+1)*nbCompo,outPtr2);
-          int kk0(kk+1+dims[0]);//1 not ghost. We make the hypothesis that factors is >= ghostlev
+          mcIdType kk0(kk+1+dims[0]);//1 not ghost. We make the hypothesis that factors is >= ghostlev
           outPtr2+=fact0*nbCompo*dims[0];
-          for(int ig=0;ig<ghostSize;ig++)
+          for(mcIdType ig=0;ig<ghostSize;ig++)
             outPtr2=std::copy(inPtr+kk0*nbCompo,inPtr+(kk0+1)*nbCompo,outPtr2);
         }
     }
   kk=fineLocInCoarse[0].first+ghostSize-1+nxwg*(fineLocInCoarse[1].second+ghostSize);
-  for(int jg=0;jg<ghostSize;jg++)
+  for(mcIdType jg=0;jg<ghostSize;jg++)
     {
-      for(int ig=0;ig<ghostSize;ig++)
+      for(mcIdType ig=0;ig<ghostSize;ig++)
         outPtr2=std::copy(inPtr+kk*nbCompo,inPtr+(kk+1)*nbCompo,outPtr2);
-      int kk0(kk+1);
-      for(int ig=0;ig<dims[0];ig++,kk0++)
-        for(int ifact=0;ifact<fact0;ifact++)
+      mcIdType kk0(kk+1);
+      for(mcIdType ig=0;ig<dims[0];ig++,kk0++)
+        for(mcIdType ifact=0;ifact<fact0;ifact++)
           outPtr2=std::copy(inPtr+(kk0)*nbCompo,inPtr+(kk0+1)*nbCompo,outPtr2);
-      for(int ik=0;ik<ghostSize;ik++)
+      for(mcIdType ik=0;ik<ghostSize;ik++)
         outPtr2=std::copy(inPtr+kk0*nbCompo,inPtr+(kk0+1)*nbCompo,outPtr2);
     }
 }
index df0972e7b9efc20e2fdb5190e29d4085bf4f2707..51acdd9f76197f14c2ae1a3becbf265a1c6f6362 100644 (file)
@@ -32,12 +32,12 @@ namespace MEDCoupling
   {
   public:
     MEDCOUPLING_EXPORT static MEDCouplingIMesh *New();
-    MEDCOUPLING_EXPORT static MEDCouplingIMesh *New(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
+    MEDCOUPLING_EXPORT static MEDCouplingIMesh *New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
                                                     const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
     //
     MEDCOUPLING_EXPORT void setSpaceDimension(int spaceDim);
-    MEDCOUPLING_EXPORT void setNodeStruct(const int *nodeStrctStart, const int *nodeStrctStop);
-    MEDCOUPLING_EXPORT std::vector<int> getNodeStruct() const;
+    MEDCOUPLING_EXPORT void setNodeStruct(const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop);
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeStruct() const;
     MEDCOUPLING_EXPORT void setOrigin(const double *originStart, const double *originStop);
     MEDCOUPLING_EXPORT std::vector<double> getOrigin() const;
     MEDCOUPLING_EXPORT void setDXYZ(const double *dxyzStart, const double *dxyzStop);
@@ -46,18 +46,18 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT std::string getAxisUnit() const;
     MEDCOUPLING_EXPORT double getMeasureOfAnyCell() const;
     MEDCOUPLING_EXPORT MEDCouplingCMesh *convertToCartesian() const;
-    MEDCOUPLING_EXPORT void refineWithFactor(const std::vector<int>& factors);
+    MEDCOUPLING_EXPORT void refineWithFactor(const std::vector<mcIdType>& factors);
     MEDCOUPLING_EXPORT MEDCouplingIMesh *asSingleCell() const;
-    MEDCOUPLING_EXPORT static void CondenseFineToCoarse(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA);
-    MEDCOUPLING_EXPORT static void CondenseFineToCoarseGhost(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA, int ghostSize);
-    MEDCOUPLING_EXPORT static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts);
-    MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
-    MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
+    MEDCOUPLING_EXPORT static void CondenseFineToCoarse(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA);
+    MEDCOUPLING_EXPORT static void CondenseFineToCoarseGhost(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA, mcIdType ghostSize);
+    MEDCOUPLING_EXPORT static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts);
+    MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
+    MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
     //
     MEDCOUPLING_EXPORT MEDCouplingIMesh *deepCopy() const;
     MEDCOUPLING_EXPORT MEDCouplingIMesh *clone(bool recDeepCpy) const;
     MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
-    MEDCOUPLING_EXPORT MEDCouplingIMesh *buildWithGhost(int ghostLev) const;
+    MEDCOUPLING_EXPORT MEDCouplingIMesh *buildWithGhost(mcIdType ghostLev) const;
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
@@ -66,21 +66,21 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                 DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
+                                                 DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                            DataArrayInt *&cellCor) const;
+                                                            DataArrayIdType *&cellCor) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
     MEDCOUPLING_EXPORT int getSpaceDimension() const;
-    MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
+    MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
     MEDCOUPLING_EXPORT std::string simpleRepr() const;
     MEDCOUPLING_EXPORT std::string advancedRepr() const;
     // tools
     MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
-    MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const;
-    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const;
+    MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
+    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
     MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
     MEDCOUPLING_EXPORT void translate(const double *vector);
     MEDCOUPLING_EXPORT void scale(const double *point, double factor);
@@ -88,16 +88,16 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
     //some useful methods
-    MEDCOUPLING_EXPORT void getNodeGridStructure(int *res) const;
-    MEDCOUPLING_EXPORT std::vector<int> getNodeGridStructure() const;
-    MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const;
+    MEDCOUPLING_EXPORT void getNodeGridStructure(mcIdType *res) const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeGridStructure() const;
+    MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const;
     //serialisation-unserialization
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                             const std::vector<std::string>& littleStrings);
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
@@ -112,8 +112,8 @@ namespace MEDCoupling
     void checkSpaceDimension() const;
     static void CheckSpaceDimension(int spaceDim);
     static int FindIntRoot(int val, int order);
-    static void SpreadCoarseToFineGhost2D(const double *inPtr, double *outPtr, int nbCompo, const std::vector<int>& coarseSt, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
-    static void SpreadCoarseToFineGhostZone2D(const double *inPtr, double *outPtr, int nbCompo, const std::vector<int>& coarseSt, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
+    static void SpreadCoarseToFineGhost2D(const double *inPtr, double *outPtr, std::size_t nbCompo, const std::vector<mcIdType>& coarseSt, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
+    static void SpreadCoarseToFineGhostZone2D(const double *inPtr, double *outPtr, std::size_t nbCompo, const std::vector<mcIdType>& coarseSt, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
   private:
     int _space_dim;
     double _origin[3];
index afeabb2eb7ca425dc162a7c7b3f2b0ad161c3ca6..d4534d3d02014ea33ab3216e133a12716f9e5d20 100644 (file)
@@ -22,4 +22,4 @@
 
 using namespace MEDCoupling;
 
-template class MEDCoupling::MapKeyVal<int>;
+template class MEDCoupling::MapKeyVal<mcIdType, mcIdType>;
index 68b084a77ec7e80c10219bd9b148a9d5e25fccf1..395d56e490c9ac140c93d7faf5532f3ea37fb742 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "MEDCoupling.hxx"
 #include "MCAuto.hxx"
+#include "MCType.hxx"
 #include "MEDCouplingTimeLabel.hxx"
 #include "MEDCouplingRefCountObject.hxx"
 #include "InterpKernelException.hxx"
 
 namespace MEDCoupling
 {  
-  template<class T>
+  template<class ID, class T>
   class MapKeyVal : public RefCountObject, public TimeLabel
   {
   public:
-    static MCAuto< MapKeyVal<T> > New();
-    std::map<T,T>& data() { return _m; }
-    const std::map<T,T>& data() const { return _m; }
+    static MCAuto< MapKeyVal<ID, T> > New();
+    std::map<ID,T>& data() { return _m; }
+    const std::map<ID,T>& data() const { return _m; }
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject*> getDirectChildrenWithNull() const;
     void updateTime() const { }
@@ -45,10 +46,10 @@ namespace MEDCoupling
     MapKeyVal() { }
     ~MapKeyVal() { }
   private:
-    std::map<T,T> _m;
+    std::map<ID,T> _m;
   };
 
-  using MapII = MapKeyVal<int>;
+  using MapII = MapKeyVal<mcIdType, mcIdType>;
 }
 
 #endif
index 6248b4ee6030231db020634fecbaa83ad6186e79..fb8f0cc88ae5a24161540de231189b570fe6f9ab 100644 (file)
 
 namespace MEDCoupling
 {
-  template<class T>
-  MCAuto< MapKeyVal<T> > MapKeyVal<T>::New()
+  template<class ID, class T>
+  MCAuto< MapKeyVal<ID, T> > MapKeyVal<ID, T>::New()
   {
-    MCAuto< MapKeyVal<T> > ret(new MapKeyVal<T>);
+    MCAuto< MapKeyVal<ID, T> > ret(new MapKeyVal<ID, T>);
     return ret;
   }
   
-  template<class T>
-  std::size_t MapKeyVal<T>::getHeapMemorySizeWithoutChildren() const
+  template<class ID, class T>
+  std::size_t MapKeyVal<ID, T>::getHeapMemorySizeWithoutChildren() const
   {
-    return _m.size()*sizeof(std::pair<T,T>);
+    return _m.size()*sizeof(std::pair<ID, T>);
   }
   
-  template<class T>
-  std::vector<const BigMemoryObject*> MapKeyVal<T>::getDirectChildrenWithNull() const
+  template<class ID, class T>
+  std::vector<const BigMemoryObject*> MapKeyVal<ID, T>::getDirectChildrenWithNull() const
   {
     return std::vector<const BigMemoryObject*>();//not a bug no child. Leaf object !
   }
index b39cd225ebcd7e55b5920f9936808bd2b4602ab4..429ec16c61255701d1bfec7a8a87a9b03eac8cac 100644 (file)
@@ -46,7 +46,7 @@ using namespace MEDCoupling;
  * because the mesh is aggregated and potentially modified by rotate or translate method.
  * @param cell2DId Id of cell in mesh2D mesh where the computation of 1D mesh will be done.
  */
-MEDCouplingMappedExtrudedMesh *MEDCouplingMappedExtrudedMesh::New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId)
+MEDCouplingMappedExtrudedMesh *MEDCouplingMappedExtrudedMesh::New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId)
 {
   return new MEDCouplingMappedExtrudedMesh(mesh3D,mesh2D,cell2DId);
 }
@@ -98,7 +98,7 @@ void MEDCouplingMappedExtrudedMesh::copyTinyStringsFrom(const MEDCouplingMesh *o
   _mesh1D->copyTinyStringsFrom(otherC->_mesh1D);
 }
 
-MEDCouplingMappedExtrudedMesh::MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId)
+MEDCouplingMappedExtrudedMesh::MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId)
 try:_mesh2D(const_cast<MEDCouplingUMesh *>(mesh2D)),_mesh1D(MEDCouplingUMesh::New()),_mesh3D_ids(0),_cell_2D_id(cell2DId)
 {
   if(_mesh2D.isNotNull())
@@ -146,12 +146,12 @@ MEDCouplingMappedExtrudedMesh::MEDCouplingMappedExtrudedMesh(const MEDCouplingMa
     }
 }
 
-std::size_t MEDCouplingMappedExtrudedMesh::getNumberOfCells() const
+mcIdType MEDCouplingMappedExtrudedMesh::getNumberOfCells() const
 {
   return _mesh2D->getNumberOfCells()*_mesh1D->getNumberOfCells();
 }
 
-int MEDCouplingMappedExtrudedMesh::getNumberOfNodes() const
+mcIdType MEDCouplingMappedExtrudedMesh::getNumberOfNodes() const
 {
   return _mesh2D->getNumberOfNodes();
 }
@@ -235,27 +235,27 @@ bool MEDCouplingMappedExtrudedMesh::isEqualWithoutConsideringStr(const MEDCoupli
 }
 
 void MEDCouplingMappedExtrudedMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                   DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
+                                                   DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 {
   throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::checkDeepEquivalWith : not implemented yet !");
 }
 
 void MEDCouplingMappedExtrudedMesh::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                              DataArrayInt *&cellCor) const
+                                                              DataArrayIdType *&cellCor) const
 {
   throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::checkDeepEquivalOnSameNodesWith : not implemented yet !");
 }
 
-INTERP_KERNEL::NormalizedCellType MEDCouplingMappedExtrudedMesh::getTypeOfCell(std::size_t cellId) const
+INTERP_KERNEL::NormalizedCellType MEDCouplingMappedExtrudedMesh::getTypeOfCell(mcIdType cellId) const
 {
-  const int *ids(_mesh3D_ids->begin());
+  const mcIdType *ids(_mesh3D_ids->begin());
   std::size_t nbOf3DCells(_mesh3D_ids->getNumberOfTuples());
-  const int *where(std::find(ids,ids+nbOf3DCells,cellId));
+  const mcIdType *where(std::find(ids,ids+nbOf3DCells,cellId));
   if(where==ids+nbOf3DCells)
     throw INTERP_KERNEL::Exception("Invalid cellId specified >= getNumberOfCells() !");
   std::size_t nbOfCells2D(_mesh2D->getNumberOfCells());
   std::size_t locId((std::distance(ids,where))%nbOfCells2D);
-  INTERP_KERNEL::NormalizedCellType tmp(_mesh2D->getTypeOfCell(locId));
+  INTERP_KERNEL::NormalizedCellType tmp(_mesh2D->getTypeOfCell(ToIdType(locId)));
   return INTERP_KERNEL::CellModel::GetCellModel(tmp).getExtrudedType();
 }
 
@@ -268,65 +268,65 @@ std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingMappedExtrudedMesh::getAl
   return ret;
 }
 
-DataArrayInt *MEDCouplingMappedExtrudedMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+DataArrayIdType *MEDCouplingMappedExtrudedMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(type));
   INTERP_KERNEL::NormalizedCellType revExtTyp(cm.getReverseExtrudedType());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New());
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
   if(revExtTyp==INTERP_KERNEL::NORM_ERROR)
     {
       ret->alloc(0,1);
       return ret.retn();
     }
-  MCAuto<DataArrayInt> tmp(_mesh2D->giveCellsWithType(revExtTyp));
-  int nbOfLevs(_mesh1D->getNumberOfCells());
-  int nbOfCells2D(_mesh2D->getNumberOfCells());
-  int nbOfTuples(tmp->getNumberOfTuples());
+  MCAuto<DataArrayIdType> tmp(_mesh2D->giveCellsWithType(revExtTyp));
+  mcIdType nbOfLevs=_mesh1D->getNumberOfCells();
+  mcIdType nbOfCells2D=_mesh2D->getNumberOfCells();
+  mcIdType nbOfTuples(tmp->getNumberOfTuples());
   ret->alloc(nbOfLevs*nbOfTuples,1);
-  int *pt(ret->getPointer());
+  mcIdType *pt(ret->getPointer());
   for(int i=0;i<nbOfLevs;i++,pt+=nbOfTuples)
-    std::transform(tmp->begin(),tmp->end(),pt,std::bind2nd(std::plus<int>(),i*nbOfCells2D));
-  MCAuto<DataArrayInt> ret2(ret->renumberR(_mesh3D_ids->begin()));
+    std::transform(tmp->begin(),tmp->end(),pt,std::bind2nd(std::plus<mcIdType>(),i*nbOfCells2D));
+  MCAuto<DataArrayIdType> ret2(ret->renumberR(_mesh3D_ids->begin()));
   ret2->sort();
   return ret2.retn();
 }
 
-DataArrayInt *MEDCouplingMappedExtrudedMesh::computeNbOfNodesPerCell() const
+DataArrayIdType *MEDCouplingMappedExtrudedMesh::computeNbOfNodesPerCell() const
 {
-  MCAuto<DataArrayInt> ret2D(_mesh2D->computeNbOfNodesPerCell());
-  int nbOfLevs(_mesh1D->getNumberOfCells());
-  int nbOfCells2D(_mesh2D->getNumberOfCells());
-  MCAuto<DataArrayInt> ret3D(DataArrayInt::New()); ret3D->alloc(nbOfLevs*nbOfCells2D,1);
-  int *pt(ret3D->getPointer());
+  MCAuto<DataArrayIdType> ret2D(_mesh2D->computeNbOfNodesPerCell());
+  mcIdType nbOfLevs=_mesh1D->getNumberOfCells();
+  mcIdType nbOfCells2D=_mesh2D->getNumberOfCells();
+  MCAuto<DataArrayIdType> ret3D(DataArrayIdType::New()); ret3D->alloc(nbOfLevs*nbOfCells2D,1);
+  mcIdType *pt(ret3D->getPointer());
   for(int i=0;i<nbOfLevs;i++,pt+=nbOfCells2D)
     std::copy(ret2D->begin(),ret2D->end(),pt);
   ret3D->applyLin(2,0,0);
   return ret3D->renumberR(_mesh3D_ids->begin());
 }
 
-DataArrayInt *MEDCouplingMappedExtrudedMesh::computeNbOfFacesPerCell() const
+DataArrayIdType *MEDCouplingMappedExtrudedMesh::computeNbOfFacesPerCell() const
 {
-  MCAuto<DataArrayInt> ret2D(_mesh2D->computeNbOfNodesPerCell());
-  int nbOfLevs(_mesh1D->getNumberOfCells());
-  int nbOfCells2D(_mesh2D->getNumberOfCells());
-  MCAuto<DataArrayInt> ret3D(DataArrayInt::New()); ret3D->alloc(nbOfLevs*nbOfCells2D,1);
-  int *pt(ret3D->getPointer());
+  MCAuto<DataArrayIdType> ret2D(_mesh2D->computeNbOfNodesPerCell());
+  mcIdType nbOfLevs=_mesh1D->getNumberOfCells();
+  mcIdType nbOfCells2D=_mesh2D->getNumberOfCells();
+  MCAuto<DataArrayIdType> ret3D(DataArrayIdType::New()); ret3D->alloc(nbOfLevs*nbOfCells2D,1);
+  mcIdType *pt(ret3D->getPointer());
   for(int i=0;i<nbOfLevs;i++,pt+=nbOfCells2D)
     std::copy(ret2D->begin(),ret2D->end(),pt);
   ret3D->applyLin(2,2,0);
   return ret3D->renumberR(_mesh3D_ids->begin());
 }
 
-DataArrayInt *MEDCouplingMappedExtrudedMesh::computeEffectiveNbOfNodesPerCell() const
+DataArrayIdType *MEDCouplingMappedExtrudedMesh::computeEffectiveNbOfNodesPerCell() const
 {
   return computeNbOfNodesPerCell();
 }
 
-std::size_t MEDCouplingMappedExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+mcIdType MEDCouplingMappedExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
-  std::size_t ret(0);
-  std::size_t nbOfCells2D(_mesh2D->getNumberOfCells());
-  for(std::size_t i=0;i<nbOfCells2D;i++)
+  mcIdType ret(0);
+  mcIdType nbOfCells2D(_mesh2D->getNumberOfCells());
+  for(mcIdType i=0;i<nbOfCells2D;i++)
     {
       INTERP_KERNEL::NormalizedCellType t(_mesh2D->getTypeOfCell(i));
       if(INTERP_KERNEL::CellModel::GetCellModel(t).getExtrudedType()==type)
@@ -335,26 +335,26 @@ std::size_t MEDCouplingMappedExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNE
   return ret*_mesh1D->getNumberOfCells();
 }
 
-void MEDCouplingMappedExtrudedMesh::getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const
+void MEDCouplingMappedExtrudedMesh::getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const
 {
-  int nbOfCells2D(_mesh2D->getNumberOfCells());
-  int nbOfNodes2D(_mesh2D->getNumberOfNodes());
-  int locId(cellId%nbOfCells2D);
-  int lev(cellId/nbOfCells2D);
-  std::vector<int> tmp,tmp2;
+  mcIdType nbOfCells2D(_mesh2D->getNumberOfCells());
+  mcIdType nbOfNodes2D(_mesh2D->getNumberOfNodes());
+  mcIdType locId(cellId%nbOfCells2D);
+  mcIdType lev(cellId/nbOfCells2D);
+  std::vector<mcIdType> tmp,tmp2;
   _mesh2D->getNodeIdsOfCell(locId,tmp);
   tmp2=tmp;
-  std::transform(tmp.begin(),tmp.end(),tmp.begin(),std::bind2nd(std::plus<int>(),nbOfNodes2D*lev));
-  std::transform(tmp2.begin(),tmp2.end(),tmp2.begin(),std::bind2nd(std::plus<int>(),nbOfNodes2D*(lev+1)));
+  std::transform(tmp.begin(),tmp.end(),tmp.begin(),std::bind2nd(std::plus<mcIdType>(),nbOfNodes2D*lev));
+  std::transform(tmp2.begin(),tmp2.end(),tmp2.begin(),std::bind2nd(std::plus<mcIdType>(),nbOfNodes2D*(lev+1)));
   conn.insert(conn.end(),tmp.begin(),tmp.end());
   conn.insert(conn.end(),tmp2.begin(),tmp2.end());
 }
 
-void MEDCouplingMappedExtrudedMesh::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const
+void MEDCouplingMappedExtrudedMesh::getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const
 {
-  int nbOfNodes2D(_mesh2D->getNumberOfNodes());
-  int locId(nodeId%nbOfNodes2D);
-  int lev(nodeId/nbOfNodes2D);
+  mcIdType nbOfNodes2D(_mesh2D->getNumberOfNodes());
+  mcIdType locId(nodeId%nbOfNodes2D);
+  mcIdType lev(nodeId/nbOfNodes2D);
   std::vector<double> tmp,tmp2;
   _mesh2D->getCoordinatesOfNode(locId,tmp);
   tmp2=tmp;
@@ -415,17 +415,17 @@ void MEDCouplingMappedExtrudedMesh::getBoundingBox(double *bbox) const
   double bbox2D[6];
   _mesh2D->getBoundingBox(bbox2D);
   const double *nodes1D(_mesh1D->getCoords()->begin());
-  int nbOfNodes1D(_mesh1D->getNumberOfNodes());
+  mcIdType nbOfNodes1D(_mesh1D->getNumberOfNodes());
   double bbox1DMin[3],bbox1DMax[3],tmp[3];
   std::fill(bbox1DMin,bbox1DMin+3,std::numeric_limits<double>::max());
   std::fill(bbox1DMax,bbox1DMax+3,-(std::numeric_limits<double>::max()));
-  for(int i=0;i<nbOfNodes1D;i++)
+  for(mcIdType i=0;i<nbOfNodes1D;i++)
     {
       std::transform(nodes1D+3*i,nodes1D+3*(i+1),bbox1DMin,bbox1DMin,static_cast<const double& (*)(const double&, const double&)>(std::min<double>));
       std::transform(nodes1D+3*i,nodes1D+3*(i+1),bbox1DMax,bbox1DMax,static_cast<const double& (*)(const double&, const double&)>(std::max<double>));
     }
   std::transform(bbox1DMax,bbox1DMax+3,bbox1DMin,tmp,std::minus<double>());
-  int id=(int)std::distance(tmp,std::max_element(tmp,tmp+3));
+  mcIdType id=ToIdType(std::distance(tmp,std::max_element(tmp,tmp+3)));
   bbox[0]=bbox1DMin[0]; bbox[1]=bbox1DMax[0];
   bbox[2]=bbox1DMin[1]; bbox[3]=bbox1DMax[1];
   bbox[4]=bbox1DMin[2]; bbox[5]=bbox1DMax[2];
@@ -440,7 +440,7 @@ void MEDCouplingMappedExtrudedMesh::updateTime() const
     updateTimeWith(*_mesh1D);
 }
 
-void MEDCouplingMappedExtrudedMesh::renumberCells(const int *old2NewBg, bool check)
+void MEDCouplingMappedExtrudedMesh::renumberCells(const mcIdType *old2NewBg, bool check)
 {
   throw INTERP_KERNEL::Exception("Functionality of renumbering cells unavailable for ExtrudedMesh");
 }
@@ -454,7 +454,7 @@ MEDCouplingUMesh *MEDCouplingMappedExtrudedMesh::build3DUnstructuredMesh() const
   MCAuto<MEDCouplingUMesh> mesh2DZC(_mesh2D->deepCopyConnectivityOnly());
   mesh2DZC->zipCoords();
   MCAuto<MEDCouplingUMesh> ret(mesh2DZC->buildExtrudedMesh(_mesh1D,0));
-  const int *renum(_mesh3D_ids->begin());
+  const mcIdType *renum(_mesh3D_ids->begin());
   ret->renumberCells(renum,false);
   ret->setName(getName());
   return ret.retn();
@@ -476,16 +476,17 @@ MEDCouplingFieldDouble *MEDCouplingMappedExtrudedMesh::getMeasureField(bool) con
   MCAuto<MEDCouplingFieldDouble> ret2D(_mesh2D->getMeasureField(true)),ret1D(_mesh1D->getMeasureField(true));
   const double *ret2DPtr(ret2D->getArray()->begin());
   const double *ret1DPtr(ret1D->getArray()->begin());
-  int nbOf2DCells(_mesh2D->getNumberOfCells()),nbOf1DCells(_mesh1D->getNumberOfCells()),nbOf3DCells(nbOf2DCells*nbOf1DCells);
-  const int *renum(_mesh3D_ids->begin());
+  mcIdType nbOf2DCells=_mesh2D->getNumberOfCells(),
+    nbOf1DCells=_mesh1D->getNumberOfCells(),nbOf3DCells(nbOf2DCells*nbOf1DCells);
+  const mcIdType *renum(_mesh3D_ids->begin());
   MCAuto<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME));
   ret->setMesh(this);
   ret->synchronizeTimeWithMesh();
   MCAuto<DataArrayDouble> da(DataArrayDouble::New());
   da->alloc(nbOf3DCells,1);
   double *retPtr(da->getPointer());
-  for(int i=0;i<nbOf1DCells;i++)
-    for(int j=0;j<nbOf2DCells;j++)
+  for(mcIdType i=0;i<nbOf1DCells;i++)
+    for(mcIdType j=0;j<nbOf2DCells;j++)
       retPtr[renum[i*nbOf2DCells+j]]=ret2DPtr[j]*ret1DPtr[i];
   ret->setArray(da);
   ret->setName(name);
@@ -503,12 +504,12 @@ MEDCouplingFieldDouble *MEDCouplingMappedExtrudedMesh::buildOrthogonalField() co
   throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::buildOrthogonalField : This method has no sense for MEDCouplingMappedExtrudedMesh that is 3D !");
 }
 
-int MEDCouplingMappedExtrudedMesh::getCellContainingPoint(const double *pos, double eps) const
+mcIdType MEDCouplingMappedExtrudedMesh::getCellContainingPoint(const double *pos, double eps) const
 {
   throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::getCellContainingPoint : not implemented yet !");
 }
 
-void MEDCouplingMappedExtrudedMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const
+void MEDCouplingMappedExtrudedMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const
 {
   throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::getCellsContainingPoint : not implemented yet !");
 }
@@ -529,35 +530,35 @@ void MEDCouplingMappedExtrudedMesh::computeExtrusion(const MEDCouplingUMesh *mes
   if(mesh3D->getNumberOfCells()%_mesh2D->getNumberOfCells()!=0)
     throw INTERP_KERNEL::Exception(errMsg3);
   if(_mesh3D_ids.isNull())
-    _mesh3D_ids=DataArrayInt::New();
+    _mesh3D_ids=DataArrayIdType::New();
   if(_mesh1D.isNull())
     _mesh1D=MEDCouplingUMesh::New();
   computeExtrusionAlg(mesh3D);
 }
 
-void MEDCouplingMappedExtrudedMesh::build1DExtrusion(int idIn3DDesc, int newId, int nbOf1DLev, MEDCouplingUMesh *subMesh,
-                                               const int *desc3D, const int *descIndx3D,
-                                               const int *revDesc3D, const int *revDescIndx3D,
+void MEDCouplingMappedExtrudedMesh::build1DExtrusion(mcIdType idIn3DDesc, mcIdType newId, mcIdType nbOf1DLev, MEDCouplingUMesh *subMesh,
+                                               const mcIdType *desc3D, const mcIdType *descIndx3D,
+                                               const mcIdType *revDesc3D, const mcIdType *revDescIndx3D,
                                                bool computeMesh1D)
 {
-  int nbOf2DCells(_mesh2D->getNumberOfCells());
-  int start(revDescIndx3D[idIn3DDesc]);
-  int end(revDescIndx3D[idIn3DDesc+1]);
+  mcIdType nbOf2DCells=_mesh2D->getNumberOfCells();
+  mcIdType start(revDescIndx3D[idIn3DDesc]);
+  mcIdType end(revDescIndx3D[idIn3DDesc+1]);
   if(end-start!=1)
     {
       std::ostringstream ost; ost << "Invalid bases 2D mesh specified : 2D cell # " <<  idIn3DDesc;
       ost << " shared by more than 1 3D cell !!!";
       throw INTERP_KERNEL::Exception(ost.str().c_str());
     }
-  int current3DCell(revDesc3D[start]);
-  int current2DCell(idIn3DDesc);
-  int *mesh3DIDs(_mesh3D_ids->getPointer());
+  mcIdType current3DCell(revDesc3D[start]);
+  mcIdType current2DCell(idIn3DDesc);
+  mcIdType *mesh3DIDs(_mesh3D_ids->getPointer());
   mesh3DIDs[newId]=current3DCell;
-  const int *conn2D(subMesh->getNodalConnectivity()->begin());
-  const int *conn2DIndx(subMesh->getNodalConnectivityIndex()->begin());
-  for(int i=1;i<nbOf1DLev;i++)
+  const mcIdType *conn2D(subMesh->getNodalConnectivity()->begin());
+  const mcIdType *conn2DIndx(subMesh->getNodalConnectivityIndex()->begin());
+  for(mcIdType i=1;i<nbOf1DLev;i++)
     {
-      std::vector<int> conn(conn2D+conn2DIndx[current2DCell]+1,conn2D+conn2DIndx[current2DCell+1]);
+      std::vector<mcIdType> conn(conn2D+conn2DIndx[current2DCell]+1,conn2D+conn2DIndx[current2DCell+1]);
       std::sort(conn.begin(),conn.end());
       if(computeMesh1D)
         computeBaryCenterOfFace(conn,i-1);
@@ -579,7 +580,7 @@ void MEDCouplingMappedExtrudedMesh::build1DExtrusion(int idIn3DDesc, int newId,
     }
   if(computeMesh1D)
     {
-      std::vector<int> conn(conn2D+conn2DIndx[current2DCell]+1,conn2D+conn2DIndx[current2DCell+1]);
+      std::vector<mcIdType> conn(conn2D+conn2DIndx[current2DCell]+1,conn2D+conn2DIndx[current2DCell+1]);
       std::sort(conn.begin(),conn.end());
       computeBaryCenterOfFace(conn,nbOf1DLev-1);
       current2DCell=findOppositeFaceOf(current2DCell,current3DCell,conn,
@@ -591,22 +592,22 @@ void MEDCouplingMappedExtrudedMesh::build1DExtrusion(int idIn3DDesc, int newId,
     }
 }
 
-int MEDCouplingMappedExtrudedMesh::findOppositeFaceOf(int current2DCell, int current3DCell, const std::vector<int>& connSorted,
-                                                const int *desc3D, const int *descIndx3D,
-                                                const int *conn2D, const int *conn2DIndx)
+mcIdType MEDCouplingMappedExtrudedMesh::findOppositeFaceOf(mcIdType current2DCell, mcIdType current3DCell, const std::vector<mcIdType>& connSorted,
+                                                const mcIdType *desc3D, const mcIdType *descIndx3D,
+                                                const mcIdType *conn2D, const mcIdType *conn2DIndx)
 {
-  int start(descIndx3D[current3DCell]);
-  int end(descIndx3D[current3DCell+1]);
+  mcIdType start(descIndx3D[current3DCell]);
+  mcIdType end(descIndx3D[current3DCell+1]);
   bool found=false;
-  for(const int *candidate2D=desc3D+start;candidate2D!=desc3D+end && !found;candidate2D++)
+  for(const mcIdType *candidate2D=desc3D+start;candidate2D!=desc3D+end && !found;candidate2D++)
     {
       if(*candidate2D!=current2DCell)
         {
-          std::vector<int> conn2(conn2D+conn2DIndx[*candidate2D]+1,conn2D+conn2DIndx[*candidate2D+1]);
+          std::vector<mcIdType> conn2(conn2D+conn2DIndx[*candidate2D]+1,conn2D+conn2DIndx[*candidate2D+1]);
           std::sort(conn2.begin(),conn2.end());
-          std::list<int> intersect;
+          std::list<mcIdType> intersect;
           std::set_intersection(connSorted.begin(),connSorted.end(),conn2.begin(),conn2.end(),
-                                std::insert_iterator< std::list<int> >(intersect,intersect.begin()));
+                                std::insert_iterator< std::list<mcIdType> >(intersect,intersect.begin()));
           if(intersect.empty())
             return *candidate2D;
         }
@@ -616,33 +617,33 @@ int MEDCouplingMappedExtrudedMesh::findOppositeFaceOf(int current2DCell, int cur
   throw INTERP_KERNEL::Exception(ost.str().c_str());
 }
 
-void MEDCouplingMappedExtrudedMesh::computeBaryCenterOfFace(const std::vector<int>& nodalConnec, int lev1DId)
+void MEDCouplingMappedExtrudedMesh::computeBaryCenterOfFace(const std::vector<mcIdType>& nodalConnec, mcIdType lev1DId)
 {
   double *zoneToUpdate(_mesh1D->getCoords()->getPointer()+lev1DId*3);
   std::fill(zoneToUpdate,zoneToUpdate+3,0.);
   const double *coords(_mesh2D->getCoords()->begin());
-  for(std::vector<int>::const_iterator iter=nodalConnec.begin();iter!=nodalConnec.end();iter++)
+  for(std::vector<mcIdType>::const_iterator iter=nodalConnec.begin();iter!=nodalConnec.end();iter++)
     std::transform(zoneToUpdate,zoneToUpdate+3,coords+3*(*iter),zoneToUpdate,std::plus<double>());
-  std::transform(zoneToUpdate,zoneToUpdate+3,zoneToUpdate,std::bind2nd(std::multiplies<double>(),(double)(1./(int)nodalConnec.size())));
+  std::transform(zoneToUpdate,zoneToUpdate+3,zoneToUpdate,std::bind2nd(std::multiplies<double>(),(1./(double)nodalConnec.size())));
 }
 
-int MEDCouplingMappedExtrudedMesh::FindCorrespCellByNodalConn(const std::vector<int>& nodalConnec, const int *revNodalPtr, const int *revNodalIndxPtr)
+mcIdType MEDCouplingMappedExtrudedMesh::FindCorrespCellByNodalConn(const std::vector<mcIdType>& nodalConnec, const mcIdType *revNodalPtr, const mcIdType *revNodalIndxPtr)
 {
-  std::vector<int>::const_iterator iter=nodalConnec.begin();
-  std::set<int> s1(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1]);
+  std::vector<mcIdType>::const_iterator iter=nodalConnec.begin();
+  std::set<mcIdType> s1(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1]);
   iter++;
   for(;iter!=nodalConnec.end();iter++)
     {
-      std::set<int> s2(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1]);
-      std::set<int> s3;
-      std::set_intersection(s1.begin(),s1.end(),s2.begin(),s2.end(),std::insert_iterator< std::set<int> >(s3,s3.end()));
+      std::set<mcIdType> s2(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1]);
+      std::set<mcIdType> s3;
+      std::set_intersection(s1.begin(),s1.end(),s2.begin(),s2.end(),std::insert_iterator< std::set<mcIdType> >(s3,s3.end()));
       s1=s3;
     }
   if(s1.size()==1)
     return *(s1.begin());
   std::ostringstream ostr;
   ostr << "Cell with nodal connec : ";
-  std::copy(nodalConnec.begin(),nodalConnec.end(),std::ostream_iterator<int>(ostr," "));
+  std::copy(nodalConnec.begin(),nodalConnec.end(),std::ostream_iterator<mcIdType>(ostr," "));
   ostr << " is not part of mesh";
   throw INTERP_KERNEL::Exception(ostr.str().c_str());
 }
@@ -669,7 +670,7 @@ void MEDCouplingMappedExtrudedMesh::Project1DMeshes(const MEDCouplingUMesh *m1,
   m2r=m2->clone(true);
   m1r->changeSpaceDimension(1);
   m2r->changeSpaceDimension(1);
-  std::vector<int> c;
+  std::vector<mcIdType> c;
   std::vector<double> ref,ref2;
   m1->getNodeIdsOfCell(0,c);
   m1->getCoordinatesOfNode(c[0],ref);
@@ -699,34 +700,34 @@ void MEDCouplingMappedExtrudedMesh::scale(const double *point, double factor)
   _mesh1D->scale(point,factor);
 }
 
-std::vector<int> MEDCouplingMappedExtrudedMesh::getDistributionOfTypes() const
+std::vector<mcIdType> MEDCouplingMappedExtrudedMesh::getDistributionOfTypes() const
 {
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
 
-DataArrayInt *MEDCouplingMappedExtrudedMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+DataArrayIdType *MEDCouplingMappedExtrudedMesh::checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
 
-void MEDCouplingMappedExtrudedMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller) const
+void MEDCouplingMappedExtrudedMesh::splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller) const
 {
   throw INTERP_KERNEL::Exception("Not implemented yet !");
 }
 
-MEDCouplingMesh *MEDCouplingMappedExtrudedMesh::buildPart(const int *start, const int *end) const
+MEDCouplingMesh *MEDCouplingMappedExtrudedMesh::buildPart(const mcIdType *start, const mcIdType *end) const
 {
   // not implemented yet !
   return 0;
 }
 
-MEDCouplingMesh *MEDCouplingMappedExtrudedMesh::buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const
+MEDCouplingMesh *MEDCouplingMappedExtrudedMesh::buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const
 {
   // not implemented yet !
   return 0;
 }
 
-DataArrayInt *MEDCouplingMappedExtrudedMesh::simplexize(int policy)
+DataArrayIdType *MEDCouplingMappedExtrudedMesh::simplexize(int policy)
 {
   throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::simplexize : unavailable for such a type of mesh : Extruded !");
 }
@@ -743,18 +744,18 @@ DataArrayDouble *MEDCouplingMappedExtrudedMesh::getCoordinatesAndOwner() const
   const DataArrayDouble *arr1D(_mesh1D->getCoords());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   ret->alloc(getNumberOfNodes(),3);
-  int nbOf1DLev(_mesh1D->getNumberOfNodes());
-  int nbOf2DNodes(_mesh2D->getNumberOfNodes());
+  mcIdType nbOf1DLev(_mesh1D->getNumberOfNodes());
+  mcIdType nbOf2DNodes(_mesh2D->getNumberOfNodes());
   const double *ptSrc(arr2D->begin());
   double *pt(ret->getPointer());
   std::copy(ptSrc,ptSrc+3*nbOf2DNodes,pt);
-  for(int i=1;i<nbOf1DLev;i++)
+  for(mcIdType i=1;i<nbOf1DLev;i++)
     {
       std::copy(ptSrc,ptSrc+3*nbOf2DNodes,pt+3*i*nbOf2DNodes);
       double vec[3];
       std::copy(arr1D->begin()+3*i,arr1D->begin()+3*(i+1),vec);
       std::transform(arr1D->begin()+3*(i-1),arr1D->begin()+3*i,vec,vec,std::minus<double>());
-      for(int j=0;j<nbOf2DNodes;j++)
+      for(mcIdType j=0;j<nbOf2DNodes;j++)
         std::transform(vec,vec+3,pt+3*(i*nbOf2DNodes+j),pt+3*(i*nbOf2DNodes+j),std::plus<double>());
     }
   return ret.retn();
@@ -770,7 +771,7 @@ DataArrayDouble *MEDCouplingMappedExtrudedMesh::computeIsoBarycenterOfNodesPerCe
   throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::computeIsoBarycenterOfNodesPerCell: not yet implemented !");
 }
 
-void MEDCouplingMappedExtrudedMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const
+void MEDCouplingMappedExtrudedMesh::getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const
 {
   MCAuto<MEDCouplingUMesh> m(buildUnstructured());
   m->getReverseNodalConnectivity(revNodal,revNodalIndx);
@@ -779,11 +780,11 @@ void MEDCouplingMappedExtrudedMesh::getReverseNodalConnectivity(DataArrayInt *re
 void MEDCouplingMappedExtrudedMesh::computeExtrusionAlg(const MEDCouplingUMesh *mesh3D)
 {
   _mesh3D_ids->alloc(mesh3D->getNumberOfCells(),1);
-  int nbOf1DLev(mesh3D->getNumberOfCells()/_mesh2D->getNumberOfCells());
+  mcIdType nbOf1DLev=mesh3D->getNumberOfCells()/_mesh2D->getNumberOfCells();
   _mesh1D->setMeshDimension(1);
   _mesh1D->allocateCells(nbOf1DLev);
-  int tmpConn[2];
-  for(int i=0;i<nbOf1DLev;i++)
+  mcIdType tmpConn[2];
+  for(mcIdType i=0;i<nbOf1DLev;i++)
     {
       tmpConn[0]=i;
       tmpConn[1]=i+1;
@@ -794,21 +795,21 @@ void MEDCouplingMappedExtrudedMesh::computeExtrusionAlg(const MEDCouplingUMesh *
   myCoords->alloc(nbOf1DLev+1,3);
   _mesh1D->setCoords(myCoords);
   myCoords->decrRef();
-  MCAuto<DataArrayInt> desc(DataArrayInt::New()),descIndx(DataArrayInt::New()),revDesc(DataArrayInt::New()),revDescIndx(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc(DataArrayIdType::New()),descIndx(DataArrayIdType::New()),revDesc(DataArrayIdType::New()),revDescIndx(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> subMesh(mesh3D->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx));
-  MCAuto<DataArrayInt> revNodal2D(DataArrayInt::New()),revNodalIndx2D(DataArrayInt::New());
+  MCAuto<DataArrayIdType> revNodal2D(DataArrayIdType::New()),revNodalIndx2D(DataArrayIdType::New());
   subMesh->getReverseNodalConnectivity(revNodal2D,revNodalIndx2D);
-  const int *nodal2D(_mesh2D->getNodalConnectivity()->begin());
-  const int *nodal2DIndx(_mesh2D->getNodalConnectivityIndex()->begin());
-  const int *revNodal2DPtr(revNodal2D->begin());
-  const int *revNodalIndx2DPtr(revNodalIndx2D->begin());
-  const int *descP(desc->begin()),*descIndxP(descIndx->begin()),*revDescP(revDesc->begin()),*revDescIndxP(revDescIndx->begin());
+  const mcIdType *nodal2D(_mesh2D->getNodalConnectivity()->begin());
+  const mcIdType *nodal2DIndx(_mesh2D->getNodalConnectivityIndex()->begin());
+  const mcIdType *revNodal2DPtr(revNodal2D->begin());
+  const mcIdType *revNodalIndx2DPtr(revNodalIndx2D->begin());
+  const mcIdType *descP(desc->begin()),*descIndxP(descIndx->begin()),*revDescP(revDesc->begin()),*revDescIndxP(revDescIndx->begin());
   //
-  int nbOf2DCells(_mesh2D->getNumberOfCells());
-  for(int i=0;i<nbOf2DCells;i++)
+  mcIdType nbOf2DCells=_mesh2D->getNumberOfCells();
+  for(mcIdType i=0;i<nbOf2DCells;i++)
     {
-      int idInSubMesh;
-      std::vector<int> nodalConnec(nodal2D+nodal2DIndx[i]+1,nodal2D+nodal2DIndx[i+1]);
+      mcIdType idInSubMesh;
+      std::vector<mcIdType> nodalConnec(nodal2D+nodal2DIndx[i]+1,nodal2D+nodal2DIndx[i+1]);
       try
       {
           idInSubMesh=FindCorrespCellByNodalConn(nodalConnec,revNodal2DPtr,revNodalIndx2DPtr);
@@ -823,13 +824,13 @@ void MEDCouplingMappedExtrudedMesh::computeExtrusionAlg(const MEDCouplingUMesh *
     }
 }
 
-void MEDCouplingMappedExtrudedMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingMappedExtrudedMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
-  std::vector<int> tinyInfo1;
+  std::vector<mcIdType> tinyInfo1;
   std::vector<std::string> ls1;
   std::vector<double> ls3;
   _mesh2D->getTinySerializationInformation(ls3,tinyInfo1,ls1);
-  std::vector<int> tinyInfo2;
+  std::vector<mcIdType> tinyInfo2;
   std::vector<std::string> ls2;
   std::vector<double> ls4;
   _mesh1D->getTinySerializationInformation(ls4,tinyInfo2,ls2);
@@ -839,27 +840,27 @@ void MEDCouplingMappedExtrudedMesh::getTinySerializationInformation(std::vector<
   tinyInfo.insert(tinyInfo.end(),tinyInfo2.begin(),tinyInfo2.end());
   littleStrings.insert(littleStrings.end(),ls2.begin(),ls2.end());
   tinyInfo.push_back(_cell_2D_id);
-  tinyInfo.push_back((int)tinyInfo1.size());
+  tinyInfo.push_back(ToIdType(tinyInfo1.size()));
   tinyInfo.push_back(_mesh3D_ids->getNbOfElems());
   littleStrings.push_back(getName());
   littleStrings.push_back(getDescription());
 }
 
-void MEDCouplingMappedExtrudedMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCouplingMappedExtrudedMesh::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
   std::size_t sz=tinyInfo.size();
-  int sz1=tinyInfo[sz-2];
-  std::vector<int> ti1(tinyInfo.begin(),tinyInfo.begin()+sz1);
-  std::vector<int> ti2(tinyInfo.begin()+sz1,tinyInfo.end()-3);
+  mcIdType sz1=tinyInfo[sz-2];
+  std::vector<mcIdType> ti1(tinyInfo.begin(),tinyInfo.begin()+sz1);
+  std::vector<mcIdType> ti2(tinyInfo.begin()+sz1,tinyInfo.end()-3);
   MEDCouplingUMesh *um=MEDCouplingUMesh::New();
-  DataArrayInt *a1tmp=DataArrayInt::New();
+  DataArrayIdType *a1tmp=DataArrayIdType::New();
   DataArrayDouble *a2tmp=DataArrayDouble::New();
-  int la1=0,la2=0;
+  mcIdType la1=0,la2=0;
   std::vector<std::string> ls1,ls2;
   um->resizeForUnserialization(ti1,a1tmp,a2tmp,ls1);
   la1+=a1tmp->getNbOfElems(); la2+=a2tmp->getNbOfElems();
   a1tmp->decrRef(); a2tmp->decrRef();
-  a1tmp=DataArrayInt::New(); a2tmp=DataArrayDouble::New();
+  a1tmp=DataArrayIdType::New(); a2tmp=DataArrayDouble::New();
   um->resizeForUnserialization(ti2,a1tmp,a2tmp,ls2);
   la1+=a1tmp->getNbOfElems(); la2+=a2tmp->getNbOfElems();
   a1tmp->decrRef(); a2tmp->decrRef();
@@ -870,15 +871,15 @@ void MEDCouplingMappedExtrudedMesh::resizeForUnserialization(const std::vector<i
   littleStrings.resize(ls1.size()+ls2.size()+2);
 }
 
-void MEDCouplingMappedExtrudedMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCouplingMappedExtrudedMesh::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
-  a1=DataArrayInt::New(); a2=DataArrayDouble::New();
-  DataArrayInt *a1_1=0,*a1_2=0;
+  a1=DataArrayIdType::New(); a2=DataArrayDouble::New();
+  DataArrayIdType *a1_1=0,*a1_2=0;
   DataArrayDouble *a2_1=0,*a2_2=0;
   _mesh2D->serialize(a1_1,a2_1);
   _mesh1D->serialize(a1_2,a2_2);
   a1->alloc(a1_1->getNbOfElems()+a1_2->getNbOfElems()+_mesh3D_ids->getNbOfElems(),1);
-  int *ptri=a1->getPointer();
+  mcIdType *ptri=a1->getPointer();
   ptri=std::copy(a1_1->begin(),a1_1->begin()+a1_1->getNbOfElems(),ptri);
   a1_1->decrRef();
   ptri=std::copy(a1_2->begin(),a1_2->begin()+a1_2->getNbOfElems(),ptri);
@@ -892,18 +893,18 @@ void MEDCouplingMappedExtrudedMesh::serialize(DataArrayInt *&a1, DataArrayDouble
   a2_2->decrRef();
 }
 
-void MEDCouplingMappedExtrudedMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
+void MEDCouplingMappedExtrudedMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
 {
   setName(littleStrings[littleStrings.size()-2]);
   setDescription(littleStrings.back());
   std::size_t sz=tinyInfo.size();
-  int sz1=tinyInfo[sz-2];
+  mcIdType sz1=tinyInfo[sz-2];
   _cell_2D_id=tinyInfo[sz-3];
-  std::vector<int> ti1(tinyInfo.begin(),tinyInfo.begin()+sz1);
-  std::vector<int> ti2(tinyInfo.begin()+sz1,tinyInfo.end()-3);
-  DataArrayInt *a1tmp=DataArrayInt::New();
+  std::vector<mcIdType> ti1(tinyInfo.begin(),tinyInfo.begin()+sz1);
+  std::vector<mcIdType> ti2(tinyInfo.begin()+sz1,tinyInfo.end()-3);
+  DataArrayIdType *a1tmp=DataArrayIdType::New();
   DataArrayDouble *a2tmp=DataArrayDouble::New();
-  const int *a1Ptr=a1->begin();
+  const mcIdType *a1Ptr=a1->begin();
   const double *a2Ptr=a2->begin();
   _mesh2D=MEDCouplingUMesh::New();
   std::vector<std::string> ls1,ls2;
@@ -920,7 +921,7 @@ void MEDCouplingMappedExtrudedMesh::unserialization(const std::vector<double>& t
   ls2.clear();
   ls2.insert(ls2.end(),littleStrings.begin()+ls1.size(),littleStrings.end()-2);
   _mesh1D=MEDCouplingUMesh::New();
-  a1tmp=DataArrayInt::New(); a2tmp=DataArrayDouble::New();
+  a1tmp=DataArrayIdType::New(); a2tmp=DataArrayDouble::New();
   _mesh1D->resizeForUnserialization(ti2,a1tmp,a2tmp,ls1);
   std::copy(a2Ptr,a2Ptr+a2tmp->getNbOfElems(),a2tmp->getPointer());
   std::copy(a1Ptr,a1Ptr+a1tmp->getNbOfElems(),a1tmp->getPointer());
@@ -928,8 +929,8 @@ void MEDCouplingMappedExtrudedMesh::unserialization(const std::vector<double>& t
   _mesh1D->unserialization(d1,ti2,a1tmp,a2tmp,ls2);
   a1tmp->decrRef(); a2tmp->decrRef();
   //
-  _mesh3D_ids=DataArrayInt::New();
-  int szIds=(int)std::distance(a1Ptr,a1->begin()+a1->getNbOfElems());
+  _mesh3D_ids=DataArrayIdType::New();
+  mcIdType szIds=ToIdType(std::distance(a1Ptr,a1->begin()))+a1->getNbOfElems();
   _mesh3D_ids->alloc(szIds,1);
   std::copy(a1Ptr,a1Ptr+szIds,_mesh3D_ids->getPointer());
 }
index ec5d5da9eae2fc45083046793232e36cf2c144f7..c2fcadd14185a858d46a0e83145f03b7f6bf46c4 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace MEDCoupling
 {
-  class DataArrayInt;
+  class DataArrayIdType;
   class DataArrayDouble;
   class MEDCouplingUMesh;
   class MEDCouplingCMesh;
@@ -37,15 +37,15 @@ namespace MEDCoupling
   class MEDCouplingMappedExtrudedMesh : public MEDCouplingMesh
   {
   public:
-    MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId);
+    MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId);
     MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingCMesh *mesh3D);
     MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New();
     MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
-    MEDCOUPLING_EXPORT int getNumberOfNodes() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
     MEDCOUPLING_EXPORT int getSpaceDimension() const;
     MEDCOUPLING_EXPORT int getMeshDimension() const;
     MEDCOUPLING_EXPORT MEDCouplingMappedExtrudedMesh *deepCopy() const;
@@ -54,77 +54,77 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                 DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
+                                                 DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                            DataArrayInt *&cellCor) const;
-    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(std::size_t cellId) const;
+                                                            DataArrayIdType *&cellCor) const;
+    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
     MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
-    MEDCOUPLING_EXPORT DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT void getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const;
-    MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
+    MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
     MEDCOUPLING_EXPORT std::string simpleRepr() const;
     MEDCOUPLING_EXPORT std::string advancedRepr() const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
     MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
     MEDCOUPLING_EXPORT void updateTime() const;
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
     MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh2D() const { return _mesh2D.iAmATrollConstCast(); }
     MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh1D() const { return _mesh1D.iAmATrollConstCast(); }
-    MEDCOUPLING_EXPORT DataArrayInt *getMesh3DIds() const { return _mesh3D_ids.iAmATrollConstCast(); }
+    MEDCOUPLING_EXPORT DataArrayIdType *getMesh3DIds() const { return _mesh3D_ids.iAmATrollConstCast(); }
     MEDCOUPLING_EXPORT MEDCouplingUMesh *build3DUnstructuredMesh() const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
-    MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const;
-    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const;
-    MEDCOUPLING_EXPORT static int FindCorrespCellByNodalConn(const std::vector<int>& nodalConnec,
-                                                             const int *revNodalPtr, const int *revNodalIndxPtr);
+    MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
+    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+    MEDCOUPLING_EXPORT static mcIdType FindCorrespCellByNodalConn(const std::vector<mcIdType>& nodalConnec,
+                                                             const mcIdType *revNodalPtr, const mcIdType *revNodalIndxPtr);
     MEDCOUPLING_EXPORT static void Project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
                                                    MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v);
     MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
     MEDCOUPLING_EXPORT void translate(const double *vector);
     MEDCOUPLING_EXPORT void scale(const double *point, double factor);
-    MEDCOUPLING_EXPORT std::vector<int> getDistributionOfTypes() const;
-    MEDCOUPLING_EXPORT DataArrayInt *checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
-    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller=true) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const int *start, const int *end) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const;
-    MEDCOUPLING_EXPORT DataArrayInt *simplexize(int policy);
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
     MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
     MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const;
+    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
     //Serialization unserialisation
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                             const std::vector<std::string>& littleStrings);
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
-    MEDCOUPLING_EXPORT int get2DCellIdForExtrusion() const { return _cell_2D_id; }
+    MEDCOUPLING_EXPORT mcIdType get2DCellIdForExtrusion() const { return _cell_2D_id; }
   private:
-    MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId);
+    MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId);
     MEDCouplingMappedExtrudedMesh(const MEDCouplingCMesh *mesh3D);
     MEDCouplingMappedExtrudedMesh(const MEDCouplingMappedExtrudedMesh& other, bool deepCpy);
     MEDCouplingMappedExtrudedMesh();
     void computeExtrusion(const MEDCouplingUMesh *mesh3D);
     void computeExtrusionAlg(const MEDCouplingUMesh *mesh3D);
-    void build1DExtrusion(int idIn3DDesc, int newId, int nbOf1DLev, MEDCouplingUMesh *subMesh,
-                          const int *desc3D, const int *descIndx3D,
-                          const int *revDesc3D, const int *revDescIndx3D,
+    void build1DExtrusion(mcIdType idIn3DDesc, mcIdType newId, mcIdType nbOf1DLev, MEDCouplingUMesh *subMesh,
+                          const mcIdType *desc3D, const mcIdType *descIndx3D,
+                          const mcIdType *revDesc3D, const mcIdType *revDescIndx3D,
                           bool computeMesh1D);
-    int findOppositeFaceOf(int current2DCell, int current3DCell, const std::vector<int>& connSorted,
-                           const int *desc3D, const int *descIndx3D,
-                           const int *conn2D, const int *conn2DIndx);
-    void computeBaryCenterOfFace(const std::vector<int>& nodalConnec, int lev1DId);
+    mcIdType findOppositeFaceOf(mcIdType current2DCell, mcIdType current3DCell, const std::vector<mcIdType>& connSorted,
+                           const mcIdType *desc3D, const mcIdType *descIndx3D,
+                           const mcIdType *conn2D, const mcIdType *conn2DIndx);
+    void computeBaryCenterOfFace(const std::vector<mcIdType>& nodalConnec, mcIdType lev1DId);
     ~MEDCouplingMappedExtrudedMesh();
     void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
     std::string getVTKDataSetType() const;
old mode 100644 (file)
new mode 100755 (executable)
index 1045e26..35b6e1e
 
 using namespace MEDCoupling;
 
-DenseMatrix *DenseMatrix::New(int nbRows, int nbCols)
+DenseMatrix *DenseMatrix::New(mcIdType nbRows, mcIdType nbCols)
 {
   return new DenseMatrix(nbRows,nbCols);
 }
 
-DenseMatrix *DenseMatrix::New(DataArrayDouble *array, int nbRows, int nbCols)
+DenseMatrix *DenseMatrix::New(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols)
 {
   return new DenseMatrix(array,nbRows,nbCols);
 }
@@ -77,9 +77,9 @@ void DenseMatrix::updateTime() const
  *
  * \sa reShape
  */
-void DenseMatrix::reBuild(DataArrayDouble *array, int nbRows, int nbCols)
+void DenseMatrix::reBuild(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols)
 {
-  int nbr(getNumberOfRowsExt(nbRows)),nbc(getNumberOfColsExt(nbCols));
+  mcIdType nbr(getNumberOfRowsExt(nbRows)),nbc(getNumberOfColsExt(nbCols));
   CheckArraySizes(array,nbr,nbc);
   DataArrayDouble *data(_data);
   if(data!=array)
@@ -108,7 +108,7 @@ void DenseMatrix::reBuild(DataArrayDouble *array, int nbRows, int nbCols)
  * \throw if the \c nbRows*nbCols is not equal to \c this->getNbOfElems()
  * \sa reBuild
  */
-void DenseMatrix::reShape(int nbRows, int nbCols)
+void DenseMatrix::reShape(mcIdType nbRows, mcIdType nbCols)
 {
   if(nbRows<0 || nbCols<0)
     throw INTERP_KERNEL::Exception("DenseMatrix::reShape : number of rows and number of cols must be > 0 both !");
@@ -225,7 +225,7 @@ DenseMatrix *DenseMatrix::Multiply(const DenseMatrix *a1, const DenseMatrix *a2)
   if(!a1 || !a2)
     throw INTERP_KERNEL::Exception("DenseMatrix::Multiply : input matrices must be not NULL !");
   CheckCompatibleSizeForMul(a1,a2);
-  int nbr(a1->getNumberOfRows()),nbc(a2->getNumberOfCols());
+  mcIdType nbr(a1->getNumberOfRows()),nbc(a2->getNumberOfCols());
   MCAuto<DataArrayDouble> data(DataArrayDouble::New()); data->alloc(nbr*nbc,1);
   MCAuto<DenseMatrix> ret(DenseMatrix::New(data,a1->getNumberOfRows(),a2->getNumberOfCols()));
   INTERP_KERNEL::matrixProduct(a1->getData()->begin(),a1->getNumberOfRows(),a1->getNumberOfCols(),a2->getData()->begin(),a2->getNumberOfRows(),a2->getNumberOfCols(),data->getPointer());
@@ -246,21 +246,21 @@ DenseMatrix::~DenseMatrix()
 {
 }
 
-DenseMatrix::DenseMatrix(int nbRows, int nbCols):_nb_rows(nbRows),_nb_cols(nbCols),_data(DataArrayDouble::New())
+DenseMatrix::DenseMatrix(mcIdType nbRows, mcIdType nbCols):_nb_rows(nbRows),_nb_cols(nbCols),_data(DataArrayDouble::New())
 {
   if(_nb_rows<0 || _nb_cols<0)
     throw INTERP_KERNEL::Exception("constructor of DenseMatrix : number of rows and number of cols must be > 0 both !");
-  int nbOfTuples(_nb_rows*_nb_cols);
+  mcIdType nbOfTuples(_nb_rows*_nb_cols);
   _data->alloc(nbOfTuples,1);
 }
 
-DenseMatrix::DenseMatrix(DataArrayDouble *array, int nbRows, int nbCols):_nb_rows(nbRows),_nb_cols(nbCols)
+DenseMatrix::DenseMatrix(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols):_nb_rows(nbRows),_nb_cols(nbCols)
 {
   CheckArraySizes(array,_nb_rows,_nb_cols);
   _data=array; _data->incrRef();
 }
 
-int DenseMatrix::getNumberOfRowsExt(int nbRows) const
+mcIdType DenseMatrix::getNumberOfRowsExt(mcIdType nbRows) const
 {
   if(nbRows<-1)
     throw INTERP_KERNEL::Exception("DenseMatrix::getNumberOfRowsExt : invalid input must be >= -1 !");
@@ -270,7 +270,7 @@ int DenseMatrix::getNumberOfRowsExt(int nbRows) const
     return nbRows;
 }
 
-int DenseMatrix::getNumberOfColsExt(int nbCols) const
+mcIdType DenseMatrix::getNumberOfColsExt(mcIdType nbCols) const
 {
   if(nbCols<-1)
     throw INTERP_KERNEL::Exception("DenseMatrix::getNumberOfColsExt : invalid input must be >= -1 !");
@@ -290,7 +290,7 @@ void DenseMatrix::checkValidData() const
     throw INTERP_KERNEL::Exception("DenseMatrix::checkValidData : data has not 1 component !");
 }
 
-void DenseMatrix::CheckArraySizes(DataArrayDouble *array, int nbRows, int nbCols)
+void DenseMatrix::CheckArraySizes(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols)
 {
   if(nbRows<0 || nbCols<0)
     throw INTERP_KERNEL::Exception("constructor #2 of DenseMatrix : number of rows and number of cols must be > 0 both !");
@@ -298,8 +298,7 @@ void DenseMatrix::CheckArraySizes(DataArrayDouble *array, int nbRows, int nbCols
     throw INTERP_KERNEL::Exception("constructor #2 of DenseMatrix : input array is empty or not allocated !");
   if(array->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("constructor #2 of DenseMatrix : input array must have exactly one component !");
-  std::size_t nbr((std::size_t)nbRows),nbc((std::size_t)nbCols);
-  if(nbr*nbc!=array->getNbOfElems())
+  if(nbRows*nbCols!=array->getNbOfElems())
     throw INTERP_KERNEL::Exception("constructor #2 of DenseMatrix : the number of elems in input array is not equal to the product of nbRows and nbCols !");
 }
 
index c62272be1228738512797ffaef60d731bd0716d0..e999bf290aa78635b997325c0d412cddb7ea9709 100644 (file)
@@ -38,19 +38,19 @@ namespace MEDCoupling
   class DenseMatrix : public RefCountObject, public TimeLabel
   {
   public:
-    MEDCOUPLING_EXPORT static DenseMatrix *New(int nbRows, int nbCols);
-    MEDCOUPLING_EXPORT static DenseMatrix *New(DataArrayDouble *array, int nbRows, int nbCols);
+    MEDCOUPLING_EXPORT static DenseMatrix *New(mcIdType nbRows, mcIdType nbCols);
+    MEDCOUPLING_EXPORT static DenseMatrix *New(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols);
     MEDCOUPLING_EXPORT DenseMatrix *deepCopy() const;
     MEDCOUPLING_EXPORT DenseMatrix *shallowCpy() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     MEDCOUPLING_EXPORT void updateTime() const;
     //
-    MEDCOUPLING_EXPORT int getNumberOfRows() const { return _nb_rows; }
-    MEDCOUPLING_EXPORT int getNumberOfCols() const { return _nb_cols; }
-    MEDCOUPLING_EXPORT int getNbOfElems() const { return _nb_rows*_nb_cols; }
-    MEDCOUPLING_EXPORT void reBuild(DataArrayDouble *array, int nbRows=-1, int nbCols=-1);
-    MEDCOUPLING_EXPORT void reShape(int nbRows, int nbCols);
+    MEDCOUPLING_EXPORT mcIdType getNumberOfRows() const { return _nb_rows; }
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCols() const { return _nb_cols; }
+    MEDCOUPLING_EXPORT mcIdType getNbOfElems() const { return _nb_rows*_nb_cols; }
+    MEDCOUPLING_EXPORT void reBuild(DataArrayDouble *array, mcIdType nbRows=-1, mcIdType nbCols=-1);
+    MEDCOUPLING_EXPORT void reShape(mcIdType nbRows, mcIdType nbCols);
     MEDCOUPLING_EXPORT void transpose();
     //
     MEDCOUPLING_EXPORT bool isEqual(const DenseMatrix& other, double eps) const;
@@ -68,17 +68,17 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT DataArrayDouble *getData() { return _data; }
   private:
     ~DenseMatrix();
-    DenseMatrix(int nbRows, int nbCols);
-    DenseMatrix(DataArrayDouble *array, int nbRows, int nbCols);
-    int getNumberOfRowsExt(int nbRows) const;
-    int getNumberOfColsExt(int nbCols) const;
+    DenseMatrix(mcIdType nbRows, mcIdType nbCols);
+    DenseMatrix(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols);
+    mcIdType getNumberOfRowsExt(mcIdType nbRows) const;
+    mcIdType getNumberOfColsExt(mcIdType nbCols) const;
     void checkValidData() const;
-    static void CheckArraySizes(DataArrayDouble *array, int nbRows, int nbCols);
+    static void CheckArraySizes(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols);
     static void CheckSameSize(const DenseMatrix *a1, const DenseMatrix *a2);
     static void CheckCompatibleSizeForMul(const DenseMatrix *a1, const DenseMatrix *a2);
   private:
-    int _nb_rows;
-    int _nb_cols;
+    mcIdType _nb_rows;
+    mcIdType _nb_cols;
     MCAuto<DataArrayDouble> _data;
   };
 }
old mode 100644 (file)
new mode 100755 (executable)
index 9e7408f..50f1905
@@ -42,39 +42,39 @@ typedef double (*MYFUNCPTR)(double);
 
 using namespace MEDCoupling;
 
-template class MEDCoupling::MemArray<int>;
+template class MEDCoupling::MemArray<mcIdType>;
 template class MEDCoupling::MemArray<double>;
-template class MEDCoupling::DataArrayTemplate<int>;
+template class MEDCoupling::DataArrayTemplate<mcIdType>;
 template class MEDCoupling::DataArrayTemplate<double>;
-template class MEDCoupling::DataArrayTemplateClassic<int>;
+template class MEDCoupling::DataArrayTemplateClassic<mcIdType>;
 template class MEDCoupling::DataArrayTemplateClassic<double>;
 template class MEDCoupling::DataArrayTemplateFP<double>;
 template class MEDCoupling::DataArrayIterator<double>;
-template class MEDCoupling::DataArrayIterator<int>;
+template class MEDCoupling::DataArrayIterator<mcIdType>;
 template class MEDCoupling::DataArrayDiscrete<Int32>;
 template class MEDCoupling::DataArrayDiscreteSigned<Int32>;
 template class MEDCoupling::DataArrayDiscrete<Int64>;
 template class MEDCoupling::DataArrayDiscreteSigned<Int64>;
-template class MEDCoupling::DataArrayTuple<int>;
+template class MEDCoupling::DataArrayTuple<mcIdType>;
 template class MEDCoupling::DataArrayTuple<double>;
 template class MEDCoupling::DataArrayTuple<float>;
 
-template<int SPACEDIM>
-void DataArrayDouble::findCommonTuplesAlg(const double *bbox, int nbNodes, int limitNodeId, double prec, DataArrayInt *c, DataArrayInt *cI) const
+template<mcIdType SPACEDIM>
+void DataArrayDouble::findCommonTuplesAlg(const double *bbox, mcIdType nbNodes, mcIdType limitNodeId, double prec, DataArrayIdType *c, DataArrayIdType *cI) const
 {
   const double *coordsPtr=getConstPointer();
-  BBTreePts<SPACEDIM,int> myTree(bbox,0,0,nbNodes,prec);
+  BBTreePts<SPACEDIM,mcIdType> myTree(bbox,0,0,nbNodes,prec);
   std::vector<bool> isDone(nbNodes);
-  for(int i=0;i<nbNodes;i++)
+  for(mcIdType i=0;i<nbNodes;i++)
     {
       if(!isDone[i])
         {
-          std::vector<int> intersectingElems;
+          std::vector<mcIdType> intersectingElems;
           myTree.getElementsAroundPoint(coordsPtr+i*SPACEDIM,intersectingElems);
           if(intersectingElems.size()>1)
             {
-              std::vector<int> commonNodes;
-              for(std::vector<int>::const_iterator it=intersectingElems.begin();it!=intersectingElems.end();it++)
+              std::vector<mcIdType> commonNodes;
+              for(std::vector<mcIdType>::const_iterator it=intersectingElems.begin();it!=intersectingElems.end();it++)
                 if(*it!=i)
                   if(*it>=limitNodeId)
                     {
@@ -83,7 +83,7 @@ void DataArrayDouble::findCommonTuplesAlg(const double *bbox, int nbNodes, int l
                     }
               if(!commonNodes.empty())
                 {
-                  cI->pushBackSilent(cI->back()+(int)commonNodes.size()+1);
+                  cI->pushBackSilent(cI->back()+ToIdType(commonNodes.size())+1);
                   c->pushBackSilent(i);
                   c->insertAtTheEnd(commonNodes.begin(),commonNodes.end());
                 }
@@ -92,33 +92,33 @@ void DataArrayDouble::findCommonTuplesAlg(const double *bbox, int nbNodes, int l
     }
 }
 
-template<int SPACEDIM>
-void DataArrayDouble::FindTupleIdsNearTuplesAlg(const BBTreePts<SPACEDIM,int>& myTree, const double *pos, int nbOfTuples, double eps,
-                                                DataArrayInt *c, DataArrayInt *cI)
+template<mcIdType SPACEDIM>
+void DataArrayDouble::FindTupleIdsNearTuplesAlg(const BBTreePts<SPACEDIM,mcIdType>& myTree, const double *pos, mcIdType nbOfTuples, double eps,
+                                                DataArrayIdType *c, DataArrayIdType *cI)
 {
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
-      std::vector<int> intersectingElems;
+      std::vector<mcIdType> intersectingElems;
       myTree.getElementsAroundPoint(pos+i*SPACEDIM,intersectingElems);
-      std::vector<int> commonNodes;
-      for(std::vector<int>::const_iterator it=intersectingElems.begin();it!=intersectingElems.end();it++)
+      std::vector<mcIdType> commonNodes;
+      for(std::vector<mcIdType>::const_iterator it=intersectingElems.begin();it!=intersectingElems.end();it++)
         commonNodes.push_back(*it);
-      cI->pushBackSilent(cI->back()+(int)commonNodes.size());
+      cI->pushBackSilent(cI->back()+ToIdType(commonNodes.size()));
       c->insertAtTheEnd(commonNodes.begin(),commonNodes.end());
     }
 }
 
-template<int SPACEDIM>
-void DataArrayDouble::FindClosestTupleIdAlg(const BBTreePts<SPACEDIM,int>& myTree, double dist, const double *pos, int nbOfTuples, const double *thisPt, int thisNbOfTuples, int *res)
+template<mcIdType SPACEDIM>
+void DataArrayDouble::FindClosestTupleIdAlg(const BBTreePts<SPACEDIM,mcIdType>& myTree, double dist, const double *pos, mcIdType nbOfTuples, const double *thisPt, mcIdType thisNbOfTuples, mcIdType *res)
 {
   double distOpt(dist);
   const double *p(pos);
-  int *r(res);
-  for(int i=0;i<nbOfTuples;i++,p+=SPACEDIM,r++)
+  mcIdType *r(res);
+  for(mcIdType i=0;i<nbOfTuples;i++,p+=SPACEDIM,r++)
     {
       while(true)
         {
-          int elem=-1;
+          mcIdType elem=-1;
           double ret=myTree.getElementsAroundPoint2(p,distOpt,elem);
           if(ret!=std::numeric_limits<double>::max())
             {
@@ -132,7 +132,7 @@ void DataArrayDouble::FindClosestTupleIdAlg(const BBTreePts<SPACEDIM,int>& myTre
     }
 }
 
-int DataArray::EffectiveCircPerm(int nbOfShift, int nbOfTuples)
+mcIdType DataArray::EffectiveCircPerm(mcIdType nbOfShift, mcIdType nbOfTuples)
 {
   if(nbOfTuples<=0)
     throw INTERP_KERNEL::Exception("DataArray::EffectiveCircPerm : number of tuples is expected to be > 0 !");
@@ -142,7 +142,7 @@ int DataArray::EffectiveCircPerm(int nbOfShift, int nbOfTuples)
     }
   else
     {
-      int tmp(-nbOfShift);
+      mcIdType tmp(-nbOfShift);
       tmp=tmp%nbOfTuples;
       return nbOfTuples-tmp;
     }
@@ -191,9 +191,9 @@ void DataArray::copyStringInfoFrom(const DataArray& other)
   _info_on_compo=other._info_on_compo;
 }
 
-void DataArray::copyPartOfStringInfoFrom(const DataArray& other, const std::vector<int>& compoIds)
+void DataArray::copyPartOfStringInfoFrom(const DataArray& other, const std::vector<std::size_t>& compoIds)
 {
-  int nbOfCompoOth=other.getNumberOfComponents();
+  std::size_t nbOfCompoOth=other.getNumberOfComponents();
   std::size_t newNbOfCompo=compoIds.size();
   for(std::size_t i=0;i<newNbOfCompo;i++)
     if(compoIds[i]>=nbOfCompoOth || compoIds[i]<0)
@@ -202,23 +202,23 @@ void DataArray::copyPartOfStringInfoFrom(const DataArray& other, const std::vect
         throw INTERP_KERNEL::Exception(oss.str().c_str());
       }
   for(std::size_t i=0;i<newNbOfCompo;i++)
-    setInfoOnComponent((int)i,other.getInfoOnComponent(compoIds[i]));
+    setInfoOnComponent(i,other.getInfoOnComponent(compoIds[i]));
 }
 
-void DataArray::copyPartOfStringInfoFrom2(const std::vector<int>& compoIds, const DataArray& other)
+void DataArray::copyPartOfStringInfoFrom2(const std::vector<std::size_t>& compoIds, const DataArray& other)
 {
-  std::size_t nbOfCompo(getNumberOfComponents());
-  std::size_t partOfCompoToSet=compoIds.size();
-  if(partOfCompoToSet!=other.getNumberOfComponents())
+  if(compoIds.size()!=other.getNumberOfComponents())
     throw INTERP_KERNEL::Exception("Given compoIds has not the same size as number of components of given array !");
+  std::size_t partOfCompoToSet=compoIds.size();
+  std::size_t nbOfCompo=getNumberOfComponents();
   for(std::size_t i=0;i<partOfCompoToSet;i++)
-    if(compoIds[i]>=(int)nbOfCompo || compoIds[i]<0)
+    if(compoIds[i]>=nbOfCompo || compoIds[i]<0)
       {
         std::ostringstream oss; oss << "Specified component id is out of range (" << compoIds[i] << ") compared with nb of actual components (" << nbOfCompo << ")";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
       }
   for(std::size_t i=0;i<partOfCompoToSet;i++)
-    setInfoOnComponent(compoIds[i],other.getInfoOnComponent((int)i));
+    setInfoOnComponent(compoIds[i],other.getInfoOnComponent(i));
 }
 
 bool DataArray::areInfoEqualsIfNotWhy(const DataArray& other, std::string& reason) const
@@ -300,15 +300,15 @@ void DataArray::setInfoOnComponents(const std::vector<std::string>& info)
  *
  * \sa DataArrayDouble::setPartOfValues3, DataArrayInt::setPartOfValues3, DataArrayChar::setPartOfValues3.
  */
-void DataArray::setPartOfValuesBase3(const DataArray *aBase, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare)
+void DataArray::setPartOfValuesBase3(const DataArray *aBase, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare)
 {
   if(!aBase)
     throw INTERP_KERNEL::Exception("DataArray::setPartOfValuesBase3 : input aBase object is NULL !");
   DataArrayDouble *this1(dynamic_cast<DataArrayDouble *>(this));
-  DataArrayInt *this2(dynamic_cast<DataArrayInt *>(this));
+  DataArrayIdType *this2(dynamic_cast<DataArrayIdType *>(this));
   DataArrayChar *this3(dynamic_cast<DataArrayChar *>(this));
   const DataArrayDouble *a1(dynamic_cast<const DataArrayDouble *>(aBase));
-  const DataArrayInt *a2(dynamic_cast<const DataArrayInt *>(aBase));
+  const DataArrayIdType *a2(dynamic_cast<const DataArrayIdType *>(aBase));
   const DataArrayChar *a3(dynamic_cast<const DataArrayChar *>(aBase));
   if(this1 && a1)
     {
@@ -330,18 +330,18 @@ void DataArray::setPartOfValuesBase3(const DataArray *aBase, const int *bgTuples
 
 std::vector<std::string> DataArray::getVarsOnComponent() const
 {
-  int nbOfCompo=(int)_info_on_compo.size();
+  std::size_t nbOfCompo=_info_on_compo.size();
   std::vector<std::string> ret(nbOfCompo);
-  for(int i=0;i<nbOfCompo;i++)
+  for(std::size_t i=0;i<nbOfCompo;i++)
     ret[i]=getVarOnComponent(i);
   return ret;
 }
 
 std::vector<std::string> DataArray::getUnitsOnComponent() const
 {
-  int nbOfCompo=(int)_info_on_compo.size();
+  std::size_t nbOfCompo=_info_on_compo.size();
   std::vector<std::string> ret(nbOfCompo);
-  for(int i=0;i<nbOfCompo;i++)
+  for(std::size_t i=0;i<nbOfCompo;i++)
     ret[i]=getUnitOnComponent(i);
   return ret;
 }
@@ -354,13 +354,13 @@ std::vector<std::string> DataArray::getUnitsOnComponent() const
  *  \return std::string - a string containing the information on \a i-th component.
  *  \throw If \a i is not a valid component index.
  */
-std::string DataArray::getInfoOnComponent(int i) const
+std::string DataArray::getInfoOnComponent(std::size_t i) const
 {
-  if(i<(int)_info_on_compo.size() && i>=0)
+  if(i<_info_on_compo.size())
     return _info_on_compo[i];
   else
     {
-      std::ostringstream oss; oss << "DataArray::getInfoOnComponent : Specified component id is out of range (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
+      std::ostringstream oss; oss << "DataArray::getInfoOnComponent : Specified component id is out of range (" << i << ") compared with nb of actual components (" << _info_on_compo.size();
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }
@@ -377,15 +377,15 @@ std::string DataArray::getInfoOnComponent(int i) const
  *  \return std::string - a string containing the var information, or the full info.
  *  \throw If \a i is not a valid component index.
  */
-std::string DataArray::getVarOnComponent(int i) const
+std::string DataArray::getVarOnComponent(std::size_t i) const
 {
-  if(i<(int)_info_on_compo.size() && i>=0)
+  if(i<_info_on_compo.size())
     {
       return GetVarNameFromInfo(_info_on_compo[i]);
     }
   else
     {
-      std::ostringstream oss; oss << "DataArray::getVarOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
+      std::ostringstream oss; oss << "DataArray::getVarOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << _info_on_compo.size();
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }
@@ -402,15 +402,15 @@ std::string DataArray::getVarOnComponent(int i) const
  *  \return std::string - a string containing the unit information, if any, or "".
  *  \throw If \a i is not a valid component index.
  */
-std::string DataArray::getUnitOnComponent(int i) const
+std::string DataArray::getUnitOnComponent(std::size_t i) const
 {
-  if(i<(int)_info_on_compo.size() && i>=0)
+  if(i<_info_on_compo.size())
     {
       return GetUnitFromInfo(_info_on_compo[i]);
     }
   else
     {
-      std::ostringstream oss; oss << "DataArray::getUnitOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
+      std::ostringstream oss; oss << "DataArray::getUnitOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << _info_on_compo.size();
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }
@@ -510,14 +510,14 @@ DataArray *DataArray::Aggregate(const std::vector<const DataArray *>& arrs)
   if(arr2.empty())
     throw INTERP_KERNEL::Exception("DataArray::Aggregate : only null instance in input vector !");
   std::vector<const DataArrayDouble *> arrd;
-  std::vector<const DataArrayInt *> arri;
+  std::vector<const DataArrayIdType *> arri;
   std::vector<const DataArrayChar *> arrc;
   for(std::vector<const DataArray *>::const_iterator it=arr2.begin();it!=arr2.end();it++)
     {
       const DataArrayDouble *a=dynamic_cast<const DataArrayDouble *>(*it);
       if(a)
         { arrd.push_back(a); continue; }
-      const DataArrayInt *b=dynamic_cast<const DataArrayInt *>(*it);
+      const DataArrayIdType *b=dynamic_cast<const DataArrayIdType *>(*it);
       if(b)
         { arri.push_back(b); continue; }
       const DataArrayChar *c=dynamic_cast<const DataArrayChar *>(*it);
@@ -528,7 +528,7 @@ DataArray *DataArray::Aggregate(const std::vector<const DataArray *>& arrs)
   if(arr2.size()==arrd.size())
     return DataArrayDouble::Aggregate(arrd);
   if(arr2.size()==arri.size())
-    return DataArrayInt::Aggregate(arri);
+    return DataArrayIdType::Aggregate(arri);
   if(arr2.size()==arrc.size())
     return DataArrayChar::Aggregate(arrc);
   throw INTERP_KERNEL::Exception("DataArray::Aggregate : all input arrays must have the same type !");
@@ -543,13 +543,13 @@ DataArray *DataArray::Aggregate(const std::vector<const DataArray *>& arrs)
  *  \param [in] info - the string containing the information.
  *  \throw If \a i is not a valid component index.
  */
-void DataArray::setInfoOnComponent(int i, const std::string& info)
+void DataArray::setInfoOnComponent(std::size_t i, const std::string& info)
 {
-  if(i<(int)_info_on_compo.size() && i>=0)
+  if(i<_info_on_compo.size())
     _info_on_compo[i]=info;
   else
     {
-      std::ostringstream oss; oss << "DataArray::setInfoOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << (int) _info_on_compo.size();
+      std::ostringstream oss; oss << "DataArray::setInfoOnComponent : Specified component id is out of range  (" << i << ") compared with nb of actual components (" << _info_on_compo.size();
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }
@@ -581,25 +581,25 @@ void DataArray::setInfoAndChangeNbOfCompo(const std::vector<std::string>& info)
     _info_on_compo=info;
 }
 
-void DataArray::checkNbOfTuples(int nbOfTuples, const std::string& msg) const
+void DataArray::checkNbOfTuples(mcIdType nbOfTuples, const std::string& msg) const
 {
-  if((int)getNumberOfTuples()!=nbOfTuples)
+  if(getNumberOfTuples()!=nbOfTuples)
     {
       std::ostringstream oss; oss << msg << " : mismatch number of tuples : expected " <<  nbOfTuples << " having " << getNumberOfTuples() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }
 
-void DataArray::checkNbOfComps(int nbOfCompo, const std::string& msg) const
+void DataArray::checkNbOfComps(std::size_t nbOfCompo, const std::string& msg) const
 {
-  if((int)getNumberOfComponents()!=nbOfCompo)
+  if (getNumberOfComponents()!=nbOfCompo)
     {
       std::ostringstream oss; oss << msg << " : mismatch number of components : expected " << nbOfCompo << " having " << getNumberOfComponents() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }
 
-void DataArray::checkNbOfElems(std::size_t nbOfElems, const std::string& msg) const
+void DataArray::checkNbOfElems(mcIdType nbOfElems, const std::string& msg) const
 {
   if(getNbOfElems()!=nbOfElems)
     {
@@ -622,7 +622,7 @@ void DataArray::checkNbOfTuplesAndComp(const DataArray& other, const std::string
     }
 }
 
-void DataArray::checkNbOfTuplesAndComp(int nbOfTuples, int nbOfCompo, const std::string& msg) const
+void DataArray::checkNbOfTuplesAndComp(mcIdType nbOfTuples, std::size_t nbOfCompo, const std::string& msg) const
 {
   checkNbOfTuples(nbOfTuples,msg);
   checkNbOfComps(nbOfCompo,msg);
@@ -631,7 +631,7 @@ void DataArray::checkNbOfTuplesAndComp(int nbOfTuples, int nbOfCompo, const std:
 /*!
  * Simply this method checks that \b value is in [0,\b ref).
  */
-void DataArray::CheckValueInRange(int ref, int value, const std::string& msg)
+void DataArray::CheckValueInRange(mcIdType ref, mcIdType value, const std::string& msg)
 {
   if(value<0 || value>=ref)
     {
@@ -644,7 +644,7 @@ void DataArray::CheckValueInRange(int ref, int value, const std::string& msg)
  * This method checks that [\b start, \b end) is compliant with ref length \b value.
  * typically start in [0,\b value) and end in [0,\b value). If value==start and start==end, it is supported.
  */
-void DataArray::CheckValueInRangeEx(int value, int start, int end, const std::string& msg)
+void DataArray::CheckValueInRangeEx(mcIdType value, mcIdType start, mcIdType end, const std::string& msg)
 {
   if(start<0 || start>=value)
     {
@@ -661,7 +661,7 @@ void DataArray::CheckValueInRangeEx(int value, int start, int end, const std::st
     }
 }
 
-void DataArray::CheckClosingParInRange(int ref, int value, const std::string& msg)
+void DataArray::CheckClosingParInRange(mcIdType ref, mcIdType value, const std::string& msg)
 {
   if(value<0 || value>ref)
     {
@@ -688,95 +688,24 @@ void DataArray::CheckClosingParInRange(int ref, int value, const std::string& ms
  * \throw If \a nbOfSlices not > 0
  * \throw If \a sliceId not in [0,nbOfSlices)
  */
-void DataArray::GetSlice(int start, int stop, int step, int sliceId, int nbOfSlices, int& startSlice, int& stopSlice)
+void DataArray::GetSlice(mcIdType start, mcIdType stop, mcIdType step, mcIdType sliceId, mcIdType nbOfSlices, mcIdType& startSlice, mcIdType& stopSlice)
 {
-  if(nbOfSlices<=0)
-    {
-      std::ostringstream oss; oss << "DataArray::GetSlice : nbOfSlices (" << nbOfSlices << ") must be > 0 !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  if(sliceId<0 || sliceId>=nbOfSlices)
-    {
-      std::ostringstream oss; oss << "DataArray::GetSlice : sliceId (" << nbOfSlices << ") must be in [0 , nbOfSlices (" << nbOfSlices << ") ) !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  int nbElems=GetNumberOfItemGivenBESRelative(start,stop,step,"DataArray::GetSlice");
-  int minNbOfElemsPerSlice=nbElems/nbOfSlices;
-  startSlice=start+minNbOfElemsPerSlice*step*sliceId;
-  if(sliceId<nbOfSlices-1)
-    stopSlice=start+minNbOfElemsPerSlice*step*(sliceId+1);
-  else
-    stopSlice=stop;
+  DataArrayTools<mcIdType>::GetSlice(start, stop, step, sliceId, nbOfSlices, startSlice, stopSlice);
 }
 
-int DataArray::GetNumberOfItemGivenBES(int begin, int end, int step, const std::string& msg)
+mcIdType DataArray::GetNumberOfItemGivenBES(mcIdType begin, mcIdType end, mcIdType step, const std::string& msg)
 {
-  if(end<begin)
-    {
-      std::ostringstream oss; oss << msg << " : end before begin !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  if(end==begin)
-    return 0;
-  if(step<=0)
-    {
-      std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  return (end-1-begin)/step+1;
+  return DataArrayTools<mcIdType>::GetNumberOfItemGivenBES(begin, end, step, msg);
 }
 
-int DataArray::GetNumberOfItemGivenBESRelative(int begin, int end, int step, const std::string& msg)
+mcIdType DataArray::GetNumberOfItemGivenBESRelative(mcIdType begin, mcIdType end, mcIdType step, const std::string& msg)
 {
-  if(step==0)
-    throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBES : step=0 is not allowed !");
-  if(end<begin && step>0)
-    {
-      std::ostringstream oss; oss << msg << " : end before begin whereas step is positive !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  if(begin<end && step<0)
-    {
-      std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  if(begin!=end)
-    return (std::max(begin,end)-1-std::min(begin,end))/std::abs(step)+1;
-  else
-    return 0;
+  return DataArrayTools<mcIdType>::GetNumberOfItemGivenBESRelative(begin, end, step, msg);
 }
 
-int DataArray::GetPosOfItemGivenBESRelativeNoThrow(int value, int begin, int end, int step)
+mcIdType DataArray::GetPosOfItemGivenBESRelativeNoThrow(mcIdType value, mcIdType begin, mcIdType end, mcIdType step)
 {
-  if(step!=0)
-    {
-      if(step>0)
-        {
-          if(begin<=value && value<end)
-            {
-              if((value-begin)%step==0)
-                return (value-begin)/step;
-              else
-                return -1;
-            }
-          else
-            return -1;
-        }
-      else
-        {
-          if(begin>=value && value>end)
-            {
-              if((begin-value)%(-step)==0)
-                return (begin-value)/(-step);
-              else
-                return -1;
-            }
-          else
-            return -1;
-        }
-    }
-  else
-    return -1;
+  return DataArrayTools<mcIdType>::GetPosOfItemGivenBESRelativeNoThrow(value, begin, end, step);
 }
 
 /*!
@@ -858,7 +787,7 @@ bool DataArrayDouble::isMonotonic(bool increasing, double eps) const
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::isMonotonic : only supported with 'this' array with ONE component !");
-  int nbOfElements=getNumberOfTuples();
+  mcIdType nbOfElements(getNumberOfTuples());
   const double *ptr=getConstPointer();
   if(nbOfElements==0)
     return true;
@@ -866,7 +795,7 @@ bool DataArrayDouble::isMonotonic(bool increasing, double eps) const
   double absEps=fabs(eps);
   if(increasing)
     {
-      for(int i=1;i<nbOfElements;i++)
+      for(mcIdType i=1;i<nbOfElements;i++)
         {
           if(ptr[i]<(ref+absEps))
             return false;
@@ -876,7 +805,7 @@ bool DataArrayDouble::isMonotonic(bool increasing, double eps) const
     }
   else
     {
-      for(int i=1;i<nbOfElements;i++)
+      for(mcIdType i=1;i<nbOfElements;i++)
         {
           if(ptr[i]>(ref-absEps))
             return false;
@@ -886,7 +815,7 @@ bool DataArrayDouble::isMonotonic(bool increasing, double eps) const
     }
 }
 
-void DataArrayDouble::writeVTK(std::ostream& ofs, int indent, const std::string& nameInFile, DataArrayByte *byteArr) const
+void DataArrayDouble::writeVTK(std::ostream& ofs, mcIdType indent, const std::string& nameInFile, DataArrayByte *byteArr) const
 {
   static const char SPACE[4]={' ',' ',' ',' '};
   checkAllocated();
@@ -925,7 +854,8 @@ void DataArrayDouble::writeVTK(std::ostream& ofs, int indent, const std::string&
 
 void DataArrayDouble::reprCppStream(const std::string& varName, std::ostream& stream) const
 {
-  int nbTuples(getNumberOfTuples()),nbComp(getNumberOfComponents());
+  mcIdType nbTuples=getNumberOfTuples();
+  std::size_t nbComp=getNumberOfComponents();
   const double *data(getConstPointer());
   stream.precision(17);
   stream << "DataArrayDouble *" << varName << "=DataArrayDouble::New();" << std::endl;
@@ -953,7 +883,7 @@ void DataArrayDouble::reprQuickOverview(std::ostream& stream) const
       std::size_t nbOfCompo(_info_on_compo.size());
       if(nbOfCompo>=1)
         {
-          std::size_t nbOfTuples(getNumberOfTuples());
+          mcIdType nbOfTuples(getNumberOfTuples());
           stream << "Number of tuples : " << nbOfTuples << ". Number of components : " << nbOfCompo << "." << std::endl;
           reprQuickOverviewData(stream,MAX_NB_OF_BYTE_IN_REPR);
         }
@@ -967,18 +897,18 @@ void DataArrayDouble::reprQuickOverview(std::ostream& stream) const
 void DataArrayDouble::reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const
 {
   const double *data=begin();
-  int nbOfTuples=getNumberOfTuples();
-  int nbOfCompo=(int)_info_on_compo.size();
+  mcIdType nbOfTuples(getNumberOfTuples());
+  std::size_t nbOfCompo(_info_on_compo.size());
   std::ostringstream oss2; oss2 << "[";
   oss2.precision(17);
   std::string oss2Str(oss2.str());
   bool isFinished=true;
-  for(int i=0;i<nbOfTuples && isFinished;i++)
+  for(mcIdType i=0;i<nbOfTuples && isFinished;i++)
     {
       if(nbOfCompo>1)
         {
           oss2 << "(";
-          for(int j=0;j<nbOfCompo;j++,data++)
+          for(std::size_t j=0;j<nbOfCompo;j++,data++)
             {
               oss2 << *data;
               if(j!=nbOfCompo-1) oss2 << ", ";
@@ -1051,7 +981,7 @@ bool DataArrayDouble::isEqualWithoutConsideringStr(const DataArrayDouble& other,
  * \param [out] tupleIds - the tuple ids containing the same number of tuples than \a other has.
  * \sa DataArrayDouble::findCommonTuples
  */
-bool DataArrayDouble::areIncludedInMe(const DataArrayDouble *other, double prec, DataArrayInt *&tupleIds) const
+bool DataArrayDouble::areIncludedInMe(const DataArrayDouble *other, double prec, DataArrayIdType *&tupleIds) const
 {
   if(!other)
     throw INTERP_KERNEL::Exception("DataArrayDouble::areIncludedInMe : input array is NULL !");
@@ -1059,12 +989,12 @@ bool DataArrayDouble::areIncludedInMe(const DataArrayDouble *other, double prec,
   if(getNumberOfComponents()!=other->getNumberOfComponents())
     throw INTERP_KERNEL::Exception("DataArrayDouble::areIncludedInMe : the number of components does not match !");
   MCAuto<DataArrayDouble> a=DataArrayDouble::Aggregate(this,other);
-  DataArrayInt *c=0,*ci=0;
+  DataArrayIdType *c=0,*ci=0;
   a->findCommonTuples(prec,getNumberOfTuples(),c,ci);
-  MCAuto<DataArrayInt> cSafe(c),ciSafe(ci);
-  int newNbOfTuples=-1;
-  MCAuto<DataArrayInt> ids=DataArrayInt::ConvertIndexArrayToO2N(a->getNumberOfTuples(),c->begin(),ci->begin(),ci->end(),newNbOfTuples);
-  MCAuto<DataArrayInt> ret1=ids->selectByTupleIdSafeSlice(getNumberOfTuples(),a->getNumberOfTuples(),1);
+  MCAuto<DataArrayIdType> cSafe(c),ciSafe(ci);
+  mcIdType newNbOfTuples=-1;
+  MCAuto<DataArrayIdType> ids=DataArrayIdType::ConvertIndexArrayToO2N(a->getNumberOfTuples(),c->begin(),ci->begin(),ci->end(),newNbOfTuples);
+  MCAuto<DataArrayIdType> ret1=ids->selectByTupleIdSafeSlice(getNumberOfTuples(),a->getNumberOfTuples(),1);
   tupleIds=ret1.retn();
   return newNbOfTuples==getNumberOfTuples();
 }
@@ -1102,16 +1032,16 @@ bool DataArrayDouble::areIncludedInMe(const DataArrayDouble *other, double prec,
  *  \endif
  *  \sa DataArrayInt::ConvertIndexArrayToO2N(), DataArrayDouble::areIncludedInMe
  */
-void DataArrayDouble::findCommonTuples(double prec, int limitTupleId, DataArrayInt *&comm, DataArrayInt *&commIndex) const
+void DataArrayDouble::findCommonTuples(double prec, mcIdType limitTupleId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const
 {
   checkAllocated();
-  int nbOfCompo=getNumberOfComponents();
+  std::size_t nbOfCompo=getNumberOfComponents();
   if ((nbOfCompo<1) || (nbOfCompo>4)) //test before work
     throw INTERP_KERNEL::Exception("DataArrayDouble::findCommonTuples : Unexpected spacedim of coords. Must be 1, 2, 3 or 4.");
 
-  int nbOfTuples=getNumberOfTuples();
+  mcIdType nbOfTuples(getNumberOfTuples());
   //
-  MCAuto<DataArrayInt> c(DataArrayInt::New()),cI(DataArrayInt::New()); c->alloc(0,1); cI->pushBackSilent(0);
+  MCAuto<DataArrayIdType> c(DataArrayIdType::New()),cI(DataArrayIdType::New()); c->alloc(0,1); cI->pushBackSilent(0);
   switch(nbOfCompo)
   {
     case 4:
@@ -1143,18 +1073,18 @@ void DataArrayDouble::findCommonTuples(double prec, int limitTupleId, DataArrayI
  * \return the minimal distance between the two set of points \a this and \a other.
  * \sa DataArrayDouble::findClosestTupleId
  */
-double DataArrayDouble::minimalDistanceTo(const DataArrayDouble *other, int& thisTupleId, int& otherTupleId) const
+double DataArrayDouble::minimalDistanceTo(const DataArrayDouble *other, mcIdType& thisTupleId, mcIdType& otherTupleId) const
 {
-  MCAuto<DataArrayInt> part1=findClosestTupleId(other);
-  int nbOfCompo(getNumberOfComponents());
-  int otherNbTuples(other->getNumberOfTuples());
+  MCAuto<DataArrayIdType> part1=findClosestTupleId(other);
+  std::size_t nbOfCompo=getNumberOfComponents();
+  mcIdType otherNbTuples=other->getNumberOfTuples();
   const double *thisPt(begin()),*otherPt(other->begin());
-  const int *part1Pt(part1->begin());
+  const mcIdType *part1Pt(part1->begin());
   double ret=std::numeric_limits<double>::max();
-  for(int i=0;i<otherNbTuples;i++,part1Pt++,otherPt+=nbOfCompo)
+  for(mcIdType i=0;i<otherNbTuples;i++,part1Pt++,otherPt+=nbOfCompo)
     {
       double tmp(0.);
-      for(int j=0;j<nbOfCompo;j++)
+      for(std::size_t j=0;j<nbOfCompo;j++)
         tmp+=(otherPt[j]-thisPt[nbOfCompo*(*part1Pt)+j])*(otherPt[j]-thisPt[nbOfCompo*(*part1Pt)+j]);
       if(tmp<ret)
         { ret=tmp; thisTupleId=*part1Pt; otherTupleId=i; }
@@ -1170,7 +1100,7 @@ double DataArrayDouble::minimalDistanceTo(const DataArrayDouble *other, int& thi
  * \return a newly allocated (new object to be dealt by the caller) DataArrayInt having \c other->getNumberOfTuples() tuples and one components.
  * \sa DataArrayDouble::minimalDistanceTo
  */
-DataArrayInt *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other) const
+DataArrayIdType *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other) const
 {
   if(!other)
     throw INTERP_KERNEL::Exception("DataArrayDouble::findClosestTupleId : other instance is NULL !");
@@ -1182,9 +1112,9 @@ DataArrayInt *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other)
       oss << ", whereas number of components in other is " << other->getNumberOfComponents() << "! Should be equal !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  int nbOfTuples=other->getNumberOfTuples();
-  int thisNbOfTuples=getNumberOfTuples();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(nbOfTuples,1);
+  mcIdType nbOfTuples(other->getNumberOfTuples());
+  mcIdType thisNbOfTuples(getNumberOfTuples());
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(nbOfTuples,1);
   double bounds[6];
   getMinMaxPerComponent(bounds);
   switch(nbOfCompo)
@@ -1194,7 +1124,7 @@ DataArrayInt *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other)
         double xDelta(fabs(bounds[1]-bounds[0])),yDelta(fabs(bounds[3]-bounds[2])),zDelta(fabs(bounds[5]-bounds[4]));
         double delta=std::max(xDelta,yDelta); delta=std::max(delta,zDelta);
         double characSize=pow((delta*delta*delta)/((double)thisNbOfTuples),1./3.);
-        BBTreePts<3,int> myTree(begin(),0,0,getNumberOfTuples(),characSize*1e-12);
+        BBTreePts<3,mcIdType> myTree(begin(),0,0,getNumberOfTuples(),characSize*1e-12);
         FindClosestTupleIdAlg<3>(myTree,3.*characSize*characSize,other->begin(),nbOfTuples,begin(),thisNbOfTuples,ret->getPointer());
         break;
       }
@@ -1203,14 +1133,14 @@ DataArrayInt *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other)
         double xDelta(fabs(bounds[1]-bounds[0])),yDelta(fabs(bounds[3]-bounds[2]));
         double delta=std::max(xDelta,yDelta);
         double characSize=sqrt(delta/(double)thisNbOfTuples);
-        BBTreePts<2,int> myTree(begin(),0,0,getNumberOfTuples(),characSize*1e-12);
+        BBTreePts<2,mcIdType> myTree(begin(),0,0,getNumberOfTuples(),characSize*1e-12);
         FindClosestTupleIdAlg<2>(myTree,2.*characSize*characSize,other->begin(),nbOfTuples,begin(),thisNbOfTuples,ret->getPointer());
         break;
       }
     case 1:
       {
-        double characSize=fabs(bounds[1]-bounds[0])/thisNbOfTuples;
-        BBTreePts<1,int> myTree(begin(),0,0,getNumberOfTuples(),characSize*1e-12);
+        double characSize=fabs(bounds[1]-bounds[0])/FromIdType<double>(thisNbOfTuples);
+        BBTreePts<1,mcIdType> myTree(begin(),0,0,getNumberOfTuples(),characSize*1e-12);
         FindClosestTupleIdAlg<1>(myTree,1.*characSize*characSize,other->begin(),nbOfTuples,begin(),thisNbOfTuples,ret->getPointer());
         break;
       }
@@ -1232,13 +1162,14 @@ DataArrayInt *DataArrayDouble::findClosestTupleId(const DataArrayDouble *other)
  * \throw If \a this and \a otherBBoxFrmt have not the same number of components.
  * \throw If \a this and \a otherBBoxFrmt number of components is not even (BBox format).
  */
-DataArrayInt *DataArrayDouble::computeNbOfInteractionsWith(const DataArrayDouble *otherBBoxFrmt, double eps) const
+DataArrayIdType *DataArrayDouble::computeNbOfInteractionsWith(const DataArrayDouble *otherBBoxFrmt, double eps) const
 {
   if(!otherBBoxFrmt)
     throw INTERP_KERNEL::Exception("DataArrayDouble::computeNbOfInteractionsWith : input array is NULL !");
   if(!isAllocated() || !otherBBoxFrmt->isAllocated())
     throw INTERP_KERNEL::Exception("DataArrayDouble::computeNbOfInteractionsWith : this and input array must be allocated !");
-  std::size_t nbOfComp(getNumberOfComponents()),nbOfTuples(getNumberOfTuples());
+  std::size_t nbOfComp(getNumberOfComponents());
+  mcIdType nbOfTuples(getNumberOfTuples());
   if(nbOfComp!=otherBBoxFrmt->getNumberOfComponents())
     {
       std::ostringstream oss; oss << "DataArrayDouble::computeNbOfInteractionsWith : this number of components (" << nbOfComp << ") must be equal to the number of components of input array (" << otherBBoxFrmt->getNumberOfComponents() << ") !";
@@ -1249,29 +1180,29 @@ DataArrayInt *DataArrayDouble::computeNbOfInteractionsWith(const DataArrayDouble
       std::ostringstream oss; oss << "DataArrayDouble::computeNbOfInteractionsWith : Number of components (" << nbOfComp << ") is not even ! It should be to be compatible with bbox format !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(nbOfTuples,1);
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(nbOfTuples,1);
   const double *thisBBPtr(begin());
-  int *retPtr(ret->getPointer());
+  mcIdType *retPtr(ret->getPointer());
   switch(nbOfComp/2)
   {
     case 3:
       {
-        BBTree<3,int> bbt(otherBBoxFrmt->begin(),0,0,otherBBoxFrmt->getNumberOfTuples(),eps);
-        for(std::size_t i=0;i<nbOfTuples;i++,retPtr++,thisBBPtr+=nbOfComp)
+        BBTree<3,mcIdType> bbt(otherBBoxFrmt->begin(),0,0,otherBBoxFrmt->getNumberOfTuples(),eps);
+        for(mcIdType i=0;i<nbOfTuples;i++,retPtr++,thisBBPtr+=nbOfComp)
           *retPtr=bbt.getNbOfIntersectingElems(thisBBPtr);
         break;
       }
     case 2:
       {
-        BBTree<2,int> bbt(otherBBoxFrmt->begin(),0,0,otherBBoxFrmt->getNumberOfTuples(),eps);
-        for(std::size_t i=0;i<nbOfTuples;i++,retPtr++,thisBBPtr+=nbOfComp)
+        BBTree<2,mcIdType> bbt(otherBBoxFrmt->begin(),0,0,otherBBoxFrmt->getNumberOfTuples(),eps);
+        for(mcIdType i=0;i<nbOfTuples;i++,retPtr++,thisBBPtr+=nbOfComp)
           *retPtr=bbt.getNbOfIntersectingElems(thisBBPtr);
         break;
       }
     case 1:
       {
-        BBTree<1,int> bbt(otherBBoxFrmt->begin(),0,0,otherBBoxFrmt->getNumberOfTuples(),eps);
-        for(std::size_t i=0;i<nbOfTuples;i++,retPtr++,thisBBPtr+=nbOfComp)
+        BBTree<1,mcIdType> bbt(otherBBoxFrmt->begin(),0,0,otherBBoxFrmt->getNumberOfTuples(),eps);
+        for(mcIdType i=0;i<nbOfTuples;i++,retPtr++,thisBBPtr+=nbOfComp)
           *retPtr=bbt.getNbOfIntersectingElems(thisBBPtr);
         break;
       }
@@ -1302,14 +1233,14 @@ DataArrayInt *DataArrayDouble::computeNbOfInteractionsWith(const DataArrayDouble
  *  \ref py_mcdataarraydouble_getdifferentvalues "Here is a Python example".
  *  \endif
  */
-DataArrayDouble *DataArrayDouble::getDifferentValues(double prec, int limitTupleId) const
+DataArrayDouble *DataArrayDouble::getDifferentValues(double prec, mcIdType limitTupleId) const
 {
   checkAllocated();
-  DataArrayInt *c0=0,*cI0=0;
+  DataArrayIdType *c0=0,*cI0=0;
   findCommonTuples(prec,limitTupleId,c0,cI0);
-  MCAuto<DataArrayInt> c(c0),cI(cI0);
-  int newNbOfTuples=-1;
-  MCAuto<DataArrayInt> o2n=DataArrayInt::ConvertIndexArrayToO2N(getNumberOfTuples(),c0->begin(),cI0->begin(),cI0->end(),newNbOfTuples);
+  MCAuto<DataArrayIdType> c(c0),cI(cI0);
+  mcIdType newNbOfTuples=-1;
+  MCAuto<DataArrayIdType> o2n=DataArrayIdType::ConvertIndexArrayToO2N(getNumberOfTuples(),c0->begin(),cI0->begin(),cI0->end(),newNbOfTuples);
   return renumberAndReduce(o2n->getConstPointer(),newNbOfTuples);
 }
 
@@ -1328,22 +1259,21 @@ DataArrayDouble *DataArrayDouble::getDifferentValues(double prec, int limitTuple
  *  \ref py_mcdataarraydouble_setselectedcomponents "Here is a Python example".
  *  \endif
  */
-void DataArrayDouble::setSelectedComponents(const DataArrayDouble *a, const std::vector<int>& compoIds)
+void DataArrayDouble::setSelectedComponents(const DataArrayDouble *a, const std::vector<std::size_t>& compoIds)
 {
   if(!a)
     throw INTERP_KERNEL::Exception("DataArrayDouble::setSelectedComponents : input DataArrayDouble is NULL !");
   checkAllocated();
   copyPartOfStringInfoFrom2(compoIds,*a);
   std::size_t partOfCompoSz=compoIds.size();
-  int nbOfCompo=getNumberOfComponents();
-  int nbOfTuples=std::min(getNumberOfTuples(),a->getNumberOfTuples());
+  std::size_t nbOfCompo=getNumberOfComponents();
+  mcIdType nbOfTuples=std::min(getNumberOfTuples(),a->getNumberOfTuples());
   const double *ac=a->getConstPointer();
   double *nc=getPointer();
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     for(std::size_t j=0;j<partOfCompoSz;j++,ac++)
       nc[nbOfCompo*i+compoIds[j]]=*ac;
 }
-
 /*!
  * Checks if 0.0 value is present in \a this array. If it is the case, an exception
  * is thrown.
@@ -1352,7 +1282,7 @@ void DataArrayDouble::setSelectedComponents(const DataArrayDouble *a, const std:
 void DataArrayDouble::checkNoNullValues() const
 {
   const double *tmp=getConstPointer();
-  std::size_t nbOfElems=getNbOfElems();
+  mcIdType nbOfElems=getNbOfElems();
   const double *where=std::find(tmp,tmp+nbOfElems,0.);
   if(where!=tmp+nbOfElems)
     throw INTERP_KERNEL::Exception("A value 0.0 have been detected !");
@@ -1373,17 +1303,17 @@ void DataArrayDouble::checkNoNullValues() const
 void DataArrayDouble::getMinMaxPerComponent(double *bounds) const
 {
   checkAllocated();
-  int dim=getNumberOfComponents();
-  for (int idim=0; idim<dim; idim++)
+  std::size_t dim=getNumberOfComponents();
+  for (std::size_t idim=0; idim<dim; idim++)
     {
       bounds[idim*2]=std::numeric_limits<double>::max();
       bounds[idim*2+1]=-std::numeric_limits<double>::max();
     }
   const double *ptr=getConstPointer();
-  int nbOfTuples=getNumberOfTuples();
-  for(int i=0;i<nbOfTuples;i++)
+  mcIdType nbOfTuples=getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
-      for(int idim=0;idim<dim;idim++)
+      for(std::size_t idim=0;idim<dim;idim++)
         {
           if(bounds[idim*2]>ptr[i*dim+idim])
             {
@@ -1410,14 +1340,14 @@ DataArrayDouble *DataArrayDouble::computeBBoxPerTuple(double epsilon) const
 {
   checkAllocated();
   const double *dataPtr=getConstPointer();
-  int nbOfCompo=getNumberOfComponents();
-  int nbTuples=getNumberOfTuples();
+  std::size_t nbOfCompo=getNumberOfComponents();
+  mcIdType nbTuples=getNumberOfTuples();
   MCAuto<DataArrayDouble> bbox=DataArrayDouble::New();
   bbox->alloc(nbTuples,2*nbOfCompo);
   double *bboxPtr=bbox->getPointer();
-  for(int i=0;i<nbTuples;i++)
+  for(mcIdType i=0;i<nbTuples;i++)
     {
-      for(int j=0;j<nbOfCompo;j++)
+      for(std::size_t j=0;j<nbOfCompo;j++)
         {
           bboxPtr[2*nbOfCompo*i+2*j]=dataPtr[nbOfCompo*i+j]-epsilon;
           bboxPtr[2*nbOfCompo*i+2*j+1]=dataPtr[nbOfCompo*i+j]+epsilon;
@@ -1444,35 +1374,36 @@ DataArrayDouble *DataArrayDouble::computeBBoxPerTuple(double epsilon) const
  *
  * \sa MEDCouplingPointSet::getNodeIdsNearPoints, DataArrayDouble::getDifferentValues
  */
-void DataArrayDouble::computeTupleIdsNearTuples(const DataArrayDouble *other, double eps, DataArrayInt *& c, DataArrayInt *& cI) const
+void DataArrayDouble::computeTupleIdsNearTuples(const DataArrayDouble *other, double eps, DataArrayIdType *& c, DataArrayIdType *& cI) const
 {
   if(!other)
     throw INTERP_KERNEL::Exception("DataArrayDouble::computeTupleIdsNearTuples : input pointer other is null !");
   checkAllocated();
   other->checkAllocated();
-  int nbOfCompo=getNumberOfComponents();
-  int otherNbOfCompo=other->getNumberOfComponents();
+  std::size_t nbOfCompo=getNumberOfComponents();
+  std::size_t otherNbOfCompo=other->getNumberOfComponents();
   if(nbOfCompo!=otherNbOfCompo)
     throw INTERP_KERNEL::Exception("DataArrayDouble::computeTupleIdsNearTuples : number of components should be equal between this and other !");
-  int nbOfTuplesOther=other->getNumberOfTuples();
-  MCAuto<DataArrayInt> cArr(DataArrayInt::New()),cIArr(DataArrayInt::New()); cArr->alloc(0,1); cIArr->pushBackSilent(0);
+  mcIdType nbOfTuplesOther=other->getNumberOfTuples();
+  mcIdType nbOfTuples=getNumberOfTuples();
+  MCAuto<DataArrayIdType> cArr(DataArrayIdType::New()),cIArr(DataArrayIdType::New()); cArr->alloc(0,1); cIArr->pushBackSilent(0);
   switch(nbOfCompo)
   {
     case 3:
       {
-        BBTreePts<3,int> myTree(begin(),0,0,getNumberOfTuples(),eps);
+        BBTreePts<3,mcIdType> myTree(begin(),0,0,nbOfTuples,eps);
         FindTupleIdsNearTuplesAlg<3>(myTree,other->getConstPointer(),nbOfTuplesOther,eps,cArr,cIArr);
         break;
       }
     case 2:
       {
-        BBTreePts<2,int> myTree(begin(),0,0,getNumberOfTuples(),eps);
+        BBTreePts<2,mcIdType> myTree(begin(),0,0,nbOfTuples,eps);
         FindTupleIdsNearTuplesAlg<2>(myTree,other->getConstPointer(),nbOfTuplesOther,eps,cArr,cIArr);
         break;
       }
     case 1:
       {
-        BBTreePts<1,int> myTree(begin(),0,0,getNumberOfTuples(),eps);
+        BBTreePts<1,mcIdType> myTree(begin(),0,0,nbOfTuples,eps);
         FindTupleIdsNearTuplesAlg<1>(myTree,other->getConstPointer(),nbOfTuplesOther,eps,cArr,cIArr);
         break;
       }
@@ -1491,10 +1422,10 @@ void DataArrayDouble::computeTupleIdsNearTuples(const DataArrayDouble *other, do
 void DataArrayDouble::recenterForMaxPrecision(double eps)
 {
   checkAllocated();
-  int dim=getNumberOfComponents();
+  std::size_t dim=getNumberOfComponents();
   std::vector<double> bounds(2*dim);
   getMinMaxPerComponent(&bounds[0]);
-  for(int i=0;i<dim;i++)
+  for(std::size_t i=0;i<dim;i++)
     {
       double delta=bounds[2*i+1]-bounds[2*i];
       double offset=(bounds[2*i]+bounds[2*i+1])/2.;
@@ -1514,9 +1445,9 @@ void DataArrayDouble::recenterForMaxPrecision(double eps)
  *  \throw If \a this->getNumberOfComponents() != 1
  *  \throw If \a this->getNumberOfTuples() < 1
  */
-double DataArrayDouble::getMaxValue2(DataArrayInt*& tupleIds) const
+double DataArrayDouble::getMaxValue2(DataArrayIdType*& tupleIds) const
 {
-  int tmp;
+  mcIdType tmp;
   tupleIds=0;
   double ret=getMaxValue(tmp);
   tupleIds=findIdsInRange(ret,ret);
@@ -1532,9 +1463,9 @@ double DataArrayDouble::getMaxValue2(DataArrayInt*& tupleIds) const
  *  \throw If \a this->getNumberOfComponents() != 1
  *  \throw If \a this->getNumberOfTuples() < 1
  */
-double DataArrayDouble::getMinValue2(DataArrayInt*& tupleIds) const
+double DataArrayDouble::getMinValue2(DataArrayIdType*& tupleIds) const
 {
-  int tmp;
+  mcIdType tmp;
   tupleIds=0;
   double ret=getMinValue(tmp);
   tupleIds=findIdsInRange(ret,ret);
@@ -1550,15 +1481,15 @@ double DataArrayDouble::getMinValue2(DataArrayInt*& tupleIds) const
  * \throw If \a this is not allocated
  *
  */
-int DataArrayDouble::count(double value, double eps) const
+mcIdType DataArrayDouble::count(double value, double eps) const
 {
-  int ret=0;
+  mcIdType ret=0;
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::count : must be applied on DataArrayDouble with only one component, you can call 'rearrange' method before !");
   const double *vals=begin();
-  int nbOfTuples=getNumberOfTuples();
-  for(int i=0;i<nbOfTuples;i++,vals++)
+  mcIdType nbOfTuples=getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfTuples;i++,vals++)
     if(fabs(*vals-value)<=eps)
       ret++;
   return ret;
@@ -1574,12 +1505,12 @@ double DataArrayDouble::getAverageValue() const
 {
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::getAverageValue : must be applied on DataArrayDouble with only one component, you can call 'rearrange' method before !");
-  int nbOfTuples=getNumberOfTuples();
+  mcIdType nbOfTuples(getNumberOfTuples());
   if(nbOfTuples<=0)
     throw INTERP_KERNEL::Exception("DataArrayDouble::getAverageValue : array exists but number of tuples must be > 0 !");
   const double *vals=getConstPointer();
   double ret=std::accumulate(vals,vals+nbOfTuples,0.);
-  return ret/nbOfTuples;
+  return ret/FromIdType<double>(nbOfTuples);
 }
 
 /*!
@@ -1632,12 +1563,12 @@ double DataArrayDouble::normMax() const
 void DataArrayDouble::normMaxPerComponent(double * res) const
 {
   checkAllocated();
-  std::size_t nbOfTuples(getNumberOfTuples());
-  int nbOfCompos(getNumberOfComponents());
+  mcIdType nbOfTuples(getNumberOfTuples());
+  std::size_t nbOfCompos(getNumberOfComponents());
   std::fill(res, res+nbOfCompos, -1.0);
   const double *pt(getConstPointer());
-  for(std::size_t i=0;i<nbOfTuples;i++)
-    for (int j=0; j<nbOfCompos; j++, pt++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
+    for (std::size_t j=0; j<nbOfCompos; j++, pt++)
       {
         double val(std::abs(*pt));
         if(val>res[j])
@@ -1680,10 +1611,10 @@ void DataArrayDouble::accumulate(double *res) const
 {
   checkAllocated();
   const double *ptr=getConstPointer();
-  int nbTuple=getNumberOfTuples();
-  int nbComps=getNumberOfComponents();
+  mcIdType nbTuple(getNumberOfTuples());
+  std::size_t nbComps(getNumberOfComponents());
   std::fill(res,res+nbComps,0.);
-  for(int i=0;i<nbTuple;i++)
+  for(mcIdType i=0;i<nbTuple;i++)
     std::transform(ptr+i*nbComps,ptr+(i+1)*nbComps,res,res,std::plus<double>());
 }
 
@@ -1701,22 +1632,22 @@ void DataArrayDouble::accumulate(double *res) const
  * \return the min distance.
  * \sa MEDCouplingUMesh::distanceToPoint
  */
-double DataArrayDouble::distanceToTuple(const double *tupleBg, const double *tupleEnd, int& tupleId) const
+double DataArrayDouble::distanceToTuple(const double *tupleBg, const double *tupleEnd, mcIdType& tupleId) const
 {
   checkAllocated();
-  int nbTuple=getNumberOfTuples();
-  int nbComps=getNumberOfComponents();
-  if(nbComps!=(int)std::distance(tupleBg,tupleEnd))
+  mcIdType nbTuple(getNumberOfTuples());
+  std::size_t nbComps(getNumberOfComponents());
+  if(nbComps!=(std::size_t)std::distance(tupleBg,tupleEnd))
     { std::ostringstream oss; oss << "DataArrayDouble::distanceToTuple : size of input tuple is " << std::distance(tupleBg,tupleEnd) << " should be equal to the number of components in this : " << nbComps << " !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); }
   if(nbTuple==0)
     throw INTERP_KERNEL::Exception("DataArrayDouble::distanceToTuple : no tuple in this ! No distance to compute !");
   double ret0=std::numeric_limits<double>::max();
   tupleId=-1;
   const double *work=getConstPointer();
-  for(int i=0;i<nbTuple;i++)
+  for(mcIdType i=0;i<nbTuple;i++)
     {
       double val=0.;
-      for(int j=0;j<nbComps;j++,work++)
+      for(std::size_t j=0;j<nbComps;j++,work++)
         val+=(*work-tupleBg[j])*((*work-tupleBg[j]));
       if(val>=ret0)
         continue;
@@ -1734,16 +1665,16 @@ double DataArrayDouble::distanceToTuple(const double *tupleBg, const double *tup
  *  \throw If \a the condition ( 0 <= \a compId < \a this->getNumberOfComponents() ) is
  *         not respected.
  */
-double DataArrayDouble::accumulate(int compId) const
+double DataArrayDouble::accumulate(std::size_t compId) const
 {
   checkAllocated();
   const double *ptr=getConstPointer();
-  int nbTuple=getNumberOfTuples();
-  int nbComps=getNumberOfComponents();
-  if(compId<0 || compId>=nbComps)
+  mcIdType nbTuple(getNumberOfTuples());
+  std::size_t nbComps(getNumberOfComponents());
+  if(compId>=nbComps)
     throw INTERP_KERNEL::Exception("DataArrayDouble::accumulate : Invalid compId specified : No such nb of components !");
   double ret=0.;
-  for(int i=0;i<nbTuple;i++)
+  for(mcIdType i=0;i<nbTuple;i++)
     ret+=ptr[i*nbComps+compId];
   return ret;
 }
@@ -1765,29 +1696,29 @@ double DataArrayDouble::accumulate(int compId) const
  * \throw If there is an id in [ \a bgOfIndex, \a endOfIndex ) not in [0, \c this->getNumberOfTuples).
  * \throw If std::distance(bgOfIndex,endOfIndex)==0.
  */
-DataArrayDouble *DataArrayDouble::accumulatePerChunck(const int *bgOfIndex, const int *endOfIndex) const
+DataArrayDouble *DataArrayDouble::accumulatePerChunck(const mcIdType *bgOfIndex, const mcIdType *endOfIndex) const
 {
   if(!bgOfIndex || !endOfIndex)
     throw INTERP_KERNEL::Exception("DataArrayDouble::accumulatePerChunck : input pointer NULL !");
   checkAllocated();
-  int nbCompo=getNumberOfComponents();
-  int nbOfTuples=getNumberOfTuples();
-  int sz=(int)std::distance(bgOfIndex,endOfIndex);
+  std::size_t nbCompo(getNumberOfComponents());
+  mcIdType nbOfTuples(getNumberOfTuples());
+  std::size_t sz=std::distance(bgOfIndex,endOfIndex);
   if(sz<1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::accumulatePerChunck : invalid size of input index array !");
   sz--;
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New(); ret->alloc(sz,nbCompo);
-  const int *w=bgOfIndex;
+  const mcIdType *w=bgOfIndex;
   if(*w<0 || *w>=nbOfTuples)
     throw INTERP_KERNEL::Exception("DataArrayDouble::accumulatePerChunck : The first element of the input index not in [0,nbOfTuples) !");
   const double *srcPt=begin()+(*w)*nbCompo;
   double *tmp=ret->getPointer();
-  for(int i=0;i<sz;i++,tmp+=nbCompo,w++)
+  for(std::size_t i=0;i<sz;i++,tmp+=nbCompo,w++)
     {
       std::fill(tmp,tmp+nbCompo,0.);
       if(w[1]>=w[0])
         {
-          for(int j=w[0];j<w[1];j++,srcPt+=nbCompo)
+          for(mcIdType j=w[0];j<w[1];j++,srcPt+=nbCompo)
             {
               if(j>=0 && j<nbOfTuples)
                 std::transform(srcPt,srcPt+nbCompo,tmp,tmp,std::plus<double>());
@@ -1819,12 +1750,12 @@ MCAuto<DataArrayDouble> DataArrayDouble::cumSum() const
 {
   checkAllocated();
   checkNbOfComps(1,"DataArrayDouble::cumSum : this is expected to be single component");
-  int nbOfTuple(getNumberOfTuples());
+  mcIdType nbOfTuple(getNumberOfTuples());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfTuple+1,1);
   double *ptr(ret->getPointer());
   ptr[0]=0.;
   const double *thisPtr(begin());
-  for(int i=0;i<nbOfTuple;i++)
+  for(mcIdType i=0;i<nbOfTuple;i++)
     ptr[i+1]=ptr[i]+thisPtr[i];
   return ret;
 }
@@ -1843,15 +1774,15 @@ MCAuto<DataArrayDouble> DataArrayDouble::cumSum() const
 DataArrayDouble *DataArrayDouble::fromPolarToCart() const
 {
   checkAllocated();
-  int nbOfComp(getNumberOfComponents());
+  std::size_t nbOfComp(getNumberOfComponents());
   if(nbOfComp!=2)
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromPolarToCart : must be an array with exactly 2 components !");
-  int nbOfTuple(getNumberOfTuples());
+  mcIdType nbOfTuple(getNumberOfTuples());
   DataArrayDouble *ret(DataArrayDouble::New());
   ret->alloc(nbOfTuple,2);
   double *w(ret->getPointer());
   const double *wIn(getConstPointer());
-  for(int i=0;i<nbOfTuple;i++,w+=2,wIn+=2)
+  for(mcIdType i=0;i<nbOfTuple;i++,w+=2,wIn+=2)
     {
       w[0]=wIn[0]*cos(wIn[1]);
       w[1]=wIn[0]*sin(wIn[1]);
@@ -1874,15 +1805,15 @@ DataArrayDouble *DataArrayDouble::fromPolarToCart() const
 DataArrayDouble *DataArrayDouble::fromCylToCart() const
 {
   checkAllocated();
-  int nbOfComp(getNumberOfComponents());
+  std::size_t nbOfComp(getNumberOfComponents());
   if(nbOfComp!=3)
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromCylToCart : must be an array with exactly 3 components !");
-  int nbOfTuple(getNumberOfTuples());
+  mcIdType nbOfTuple(getNumberOfTuples());
   DataArrayDouble *ret(DataArrayDouble::New());
   ret->alloc(getNumberOfTuples(),3);
   double *w(ret->getPointer());
   const double *wIn(getConstPointer());
-  for(int i=0;i<nbOfTuple;i++,w+=3,wIn+=3)
+  for(mcIdType i=0;i<nbOfTuple;i++,w+=3,wIn+=3)
     {
       w[0]=wIn[0]*cos(wIn[1]);
       w[1]=wIn[0]*sin(wIn[1]);
@@ -1907,15 +1838,15 @@ DataArrayDouble *DataArrayDouble::fromCylToCart() const
 DataArrayDouble *DataArrayDouble::fromSpherToCart() const
 {
   checkAllocated();
-  int nbOfComp(getNumberOfComponents());
+  std::size_t nbOfComp(getNumberOfComponents());
   if(nbOfComp!=3)
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromSpherToCart : must be an array with exactly 3 components !");
-  int nbOfTuple(getNumberOfTuples());
+  mcIdType nbOfTuple(getNumberOfTuples());
   DataArrayDouble *ret(DataArrayDouble::New());
   ret->alloc(getNumberOfTuples(),3);
   double *w(ret->getPointer());
   const double *wIn(getConstPointer());
-  for(int i=0;i<nbOfTuple;i++,w+=3,wIn+=3)
+  for(mcIdType i=0;i<nbOfTuple;i++,w+=3,wIn+=3)
     {
       w[0]=wIn[0]*cos(wIn[2])*sin(wIn[1]);
       w[1]=wIn[0]*sin(wIn[2])*sin(wIn[1]);
@@ -1935,7 +1866,7 @@ DataArrayDouble *DataArrayDouble::fromSpherToCart() const
 DataArrayDouble *DataArrayDouble::cartesianize(MEDCouplingAxisType atOfThis) const
 {
   checkAllocated();
-  int nbOfComp(getNumberOfComponents());
+  std::size_t nbOfComp(getNumberOfComponents());
   MCAuto<DataArrayDouble> ret;
   switch(atOfThis)
     {
@@ -1983,13 +1914,14 @@ DataArrayDouble *DataArrayDouble::fromCartToPolar() const
 {
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   checkAllocated();
-  int nbOfComp(getNumberOfComponents()),nbTuples(getNumberOfTuples());
+  std::size_t nbOfComp(getNumberOfComponents());
+  mcIdType nbTuples(getNumberOfTuples());
   if(nbOfComp!=2)
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromCartToPolar : must be an array with exactly 2 components !");
   ret->alloc(nbTuples,2);
   double *retPtr(ret->getPointer());
   const double *ptr(begin());
-  for(int i=0;i<nbTuples;i++,ptr+=2,retPtr+=2)
+  for(mcIdType i=0;i<nbTuples;i++,ptr+=2,retPtr+=2)
     {
       retPtr[0]=sqrt(ptr[0]*ptr[0]+ptr[1]*ptr[1]);
       retPtr[1]=atan2(ptr[1],ptr[0]);
@@ -2006,13 +1938,14 @@ DataArrayDouble *DataArrayDouble::fromCartToCyl() const
 {
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   checkAllocated();
-  int nbOfComp(getNumberOfComponents()),nbTuples(getNumberOfTuples());
+  std::size_t nbOfComp(getNumberOfComponents());
+  mcIdType nbTuples(getNumberOfTuples());
   if(nbOfComp!=3)
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromCartToCyl : must be an array with exactly 3 components !");
   ret->alloc(nbTuples,3);
   double *retPtr(ret->getPointer());
   const double *ptr(begin());
-  for(int i=0;i<nbTuples;i++,ptr+=3,retPtr+=3)
+  for(mcIdType i=0;i<nbTuples;i++,ptr+=3,retPtr+=3)
     {
       retPtr[0]=sqrt(ptr[0]*ptr[0]+ptr[1]*ptr[1]);
       retPtr[1]=atan2(ptr[1],ptr[0]);
@@ -2029,13 +1962,14 @@ DataArrayDouble *DataArrayDouble::fromCartToSpher() const
 {
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   checkAllocated();
-  int nbOfComp(getNumberOfComponents()),nbTuples(getNumberOfTuples());
+  std::size_t nbOfComp(getNumberOfComponents());
+  mcIdType nbTuples(getNumberOfTuples());
   if(nbOfComp!=3)
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromCartToSpher : must be an array with exactly 3 components !");
   ret->alloc(nbTuples,3);
   double *retPtr(ret->getPointer());
   const double *ptr(begin());
-  for(int i=0;i<nbTuples;i++,ptr+=3,retPtr+=3)
+  for(mcIdType i=0;i<nbTuples;i++,ptr+=3,retPtr+=3)
     {
       retPtr[0]=sqrt(ptr[0]*ptr[0]+ptr[1]*ptr[1]+ptr[2]*ptr[2]);
       retPtr[1]=acos(ptr[2]/retPtr[0]);
@@ -2055,7 +1989,8 @@ DataArrayDouble *DataArrayDouble::fromCartToCylGiven(const DataArrayDouble *coor
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromCartToCylGiven : input coords are NULL !");
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   checkAllocated(); coords->checkAllocated();
-  std::size_t nbOfComp(getNumberOfComponents()),nbTuples(getNumberOfTuples());
+  std::size_t nbOfComp(getNumberOfComponents());
+  mcIdType nbTuples(getNumberOfTuples());
   if(nbOfComp!=3)
     throw INTERP_KERNEL::Exception("DataArrayDouble::fromCartToCylGiven : must be an array with exactly 3 components !");
   if(coords->getNumberOfComponents()!=3)
@@ -2069,7 +2004,7 @@ DataArrayDouble *DataArrayDouble::fromCartToCylGiven(const DataArrayDouble *coor
   double Ur[3],Uteta[3],Uz[3],*retPtr(ret->getPointer());
   const double *coo(coords->begin()),*vectField(begin());
   std::transform(vect,vect+3,Uz,std::bind2nd(std::multiplies<double>(),1./magOfVect));
-  for(int i=0;i<nbTuples;i++,vectField+=3,retPtr+=3,coo+=3)
+  for(mcIdType i=0;i<nbTuples;i++,vectField+=3,retPtr+=3,coo+=3)
     {
       std::transform(coo,coo+3,center,Ur,std::minus<double>());
       Uteta[0]=Uz[1]*Ur[2]-Uz[2]*Ur[1]; Uteta[1]=Uz[2]*Ur[0]-Uz[0]*Ur[2]; Uteta[2]=Uz[0]*Ur[1]-Uz[1]*Ur[0];
@@ -2096,15 +2031,15 @@ DataArrayDouble *DataArrayDouble::fromCartToCylGiven(const DataArrayDouble *coor
 DataArrayDouble *DataArrayDouble::doublyContractedProduct() const
 {
   checkAllocated();
-  int nbOfComp(getNumberOfComponents());
+  std::size_t nbOfComp(getNumberOfComponents());
   if(nbOfComp!=6)
     throw INTERP_KERNEL::Exception("DataArrayDouble::doublyContractedProduct : must be an array with exactly 6 components !");
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,1);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,dest++,src+=6)
+  for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=6)
     *dest=src[0]*src[0]+src[1]*src[1]+src[2]*src[2]+2.*src[3]*src[3]+2.*src[4]*src[4]+2.*src[5]*src[5];
   return ret;
 }
@@ -2123,22 +2058,22 @@ DataArrayDouble *DataArrayDouble::determinant() const
 {
   checkAllocated();
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,1);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
   switch(getNumberOfComponents())
   {
     case 6:
-      for(int i=0;i<nbOfTuple;i++,dest++,src+=6)
+      for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=6)
         *dest=src[0]*src[1]*src[2]+2.*src[4]*src[5]*src[3]-src[0]*src[4]*src[4]-src[2]*src[3]*src[3]-src[1]*src[5]*src[5];
       return ret;
     case 4:
-      for(int i=0;i<nbOfTuple;i++,dest++,src+=4)
+      for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=4)
         *dest=src[0]*src[3]-src[1]*src[2];
       return ret;
     case 9:
-      for(int i=0;i<nbOfTuple;i++,dest++,src+=9)
+      for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=9)
         *dest=src[0]*src[4]*src[8]+src[1]*src[5]*src[6]+src[2]*src[3]*src[7]-src[0]*src[5]*src[7]-src[1]*src[3]*src[8]-src[2]*src[4]*src[6];
       return ret;
     default:
@@ -2160,15 +2095,15 @@ DataArrayDouble *DataArrayDouble::determinant() const
 DataArrayDouble *DataArrayDouble::eigenValues() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp=getNumberOfComponents();
   if(nbOfComp!=6)
     throw INTERP_KERNEL::Exception("DataArrayDouble::eigenValues : must be an array with exactly 6 components !");
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,3);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,dest+=3,src+=6)
+  for(mcIdType i=0;i<nbOfTuple;i++,dest+=3,src+=6)
     INTERP_KERNEL::computeEigenValues6(src,dest);
   return ret;
 }
@@ -2186,19 +2121,19 @@ DataArrayDouble *DataArrayDouble::eigenValues() const
 DataArrayDouble *DataArrayDouble::eigenVectors() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp=getNumberOfComponents();
   if(nbOfComp!=6)
     throw INTERP_KERNEL::Exception("DataArrayDouble::eigenVectors : must be an array with exactly 6 components !");
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,9);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,src+=6)
+  for(mcIdType i=0;i<nbOfTuple;i++,src+=6)
     {
       double tmp[3];
       INTERP_KERNEL::computeEigenValues6(src,tmp);
-      for(int j=0;j<3;j++,dest+=3)
+      for(mcIdType j=0;j<3;j++,dest+=3)
         INTERP_KERNEL::computeEigenVectorForEigenValue6(src,tmp[j],1e-12,dest);
     }
   return ret;
@@ -2218,16 +2153,16 @@ DataArrayDouble *DataArrayDouble::eigenVectors() const
 DataArrayDouble *DataArrayDouble::inverse() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp=getNumberOfComponents();
   if(nbOfComp!=6 && nbOfComp!=9 && nbOfComp!=4)
     throw INTERP_KERNEL::Exception("DataArrayDouble::inversion : must be an array with 4,6 or 9 components !");
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,nbOfComp);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
   if(nbOfComp==6)
-    for(int i=0;i<nbOfTuple;i++,dest+=6,src+=6)
+    for(mcIdType i=0;i<nbOfTuple;i++,dest+=6,src+=6)
       {
         double det=src[0]*src[1]*src[2]+2.*src[4]*src[5]*src[3]-src[0]*src[4]*src[4]-src[2]*src[3]*src[3]-src[1]*src[5]*src[5];
         dest[0]=(src[1]*src[2]-src[4]*src[4])/det;
@@ -2238,7 +2173,7 @@ DataArrayDouble *DataArrayDouble::inverse() const
         dest[5]=(src[3]*src[4]-src[1]*src[5])/det;
       }
   else if(nbOfComp==4)
-    for(int i=0;i<nbOfTuple;i++,dest+=4,src+=4)
+    for(mcIdType i=0;i<nbOfTuple;i++,dest+=4,src+=4)
       {
         double det=src[0]*src[3]-src[1]*src[2];
         dest[0]=src[3]/det;
@@ -2247,7 +2182,7 @@ DataArrayDouble *DataArrayDouble::inverse() const
         dest[3]=src[0]/det;
       }
   else
-    for(int i=0;i<nbOfTuple;i++,dest+=9,src+=9)
+    for(mcIdType i=0;i<nbOfTuple;i++,dest+=9,src+=9)
       {
         double det=src[0]*src[4]*src[8]+src[1]*src[5]*src[6]+src[2]*src[3]*src[7]-src[0]*src[5]*src[7]-src[1]*src[3]*src[8]-src[2]*src[4]*src[6];
         dest[0]=(src[4]*src[8]-src[7]*src[5])/det;
@@ -2277,22 +2212,22 @@ DataArrayDouble *DataArrayDouble::inverse() const
 DataArrayDouble *DataArrayDouble::trace() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp=getNumberOfComponents();
   if(nbOfComp!=6 && nbOfComp!=9 && nbOfComp!=4)
     throw INTERP_KERNEL::Exception("DataArrayDouble::trace : must be an array with 4,6 or 9 components !");
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,1);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
   if(nbOfComp==6)
-    for(int i=0;i<nbOfTuple;i++,dest++,src+=6)
+    for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=6)
       *dest=src[0]+src[1]+src[2];
   else if(nbOfComp==4)
-    for(int i=0;i<nbOfTuple;i++,dest++,src+=4)
+    for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=4)
       *dest=src[0]+src[3];
   else
-    for(int i=0;i<nbOfTuple;i++,dest++,src+=9)
+    for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=9)
       *dest=src[0]+src[4]+src[8];
   return ret;
 }
@@ -2309,15 +2244,15 @@ DataArrayDouble *DataArrayDouble::trace() const
 DataArrayDouble *DataArrayDouble::deviator() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp=getNumberOfComponents();
   if(nbOfComp!=6)
     throw INTERP_KERNEL::Exception("DataArrayDouble::deviator : must be an array with exactly 6 components !");
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,6);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,dest+=6,src+=6)
+  for(mcIdType i=0;i<nbOfTuple;i++,dest+=6,src+=6)
     {
       double tr=(src[0]+src[1]+src[2])/3.;
       dest[0]=src[0]-tr;
@@ -2342,16 +2277,16 @@ DataArrayDouble *DataArrayDouble::deviator() const
 DataArrayDouble *DataArrayDouble::magnitude() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp=getNumberOfComponents();
   DataArrayDouble *ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret->alloc(nbOfTuple,1);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,dest++)
+  for(mcIdType i=0;i<nbOfTuple;i++,dest++)
     {
       double sum=0.;
-      for(int j=0;j<nbOfComp;j++,src++)
+      for(std::size_t j=0;j<nbOfComp;j++,src++)
         sum+=(*src)*(*src);
       *dest=sqrt(sum);
     }
@@ -2370,13 +2305,13 @@ DataArrayDouble *DataArrayDouble::magnitude() const
 DataArrayDouble *DataArrayDouble::maxPerTuple() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp(getNumberOfComponents());
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
-  int nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple(getNumberOfTuples());
   ret->alloc(nbOfTuple,1);
   const double *src=getConstPointer();
   double *dest=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,dest++,src+=nbOfComp)
+  for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=nbOfComp)
     *dest=*std::max_element(src,src+nbOfComp);
   return ret.retn();
 }
@@ -2394,21 +2329,21 @@ DataArrayDouble *DataArrayDouble::maxPerTuple() const
  *  \throw If \a this is not allocated.
  *  \sa DataArrayDouble::maxPerTuple
  */
-DataArrayDouble *DataArrayDouble::maxPerTupleWithCompoId(DataArrayInt* &compoIdOfMaxPerTuple) const
+DataArrayDouble *DataArrayDouble::maxPerTupleWithCompoId(DataArrayIdType* &compoIdOfMaxPerTuple) const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp(getNumberOfComponents());
   MCAuto<DataArrayDouble> ret0=DataArrayDouble::New();
-  MCAuto<DataArrayInt> ret1=DataArrayInt::New();
-  int nbOfTuple=getNumberOfTuples();
+  MCAuto<DataArrayIdType> ret1=DataArrayIdType::New();
+  mcIdType nbOfTuple=getNumberOfTuples();
   ret0->alloc(nbOfTuple,1); ret1->alloc(nbOfTuple,1);
   const double *src=getConstPointer();
-  double *dest=ret0->getPointer(); int *dest1=ret1->getPointer();
-  for(int i=0;i<nbOfTuple;i++,dest++,dest1++,src+=nbOfComp)
+  double *dest=ret0->getPointer(); mcIdType *dest1=ret1->getPointer();
+  for(mcIdType i=0;i<nbOfTuple;i++,dest++,dest1++,src+=nbOfComp)
     {
       const double *loc=std::max_element(src,src+nbOfComp);
       *dest=*loc;
-      *dest1=(int)std::distance(src,loc);
+      *dest1=ToIdType(std::distance(src,loc));
     }
   compoIdOfMaxPerTuple=ret1.retn();
   return ret0.retn();
@@ -2431,19 +2366,19 @@ DataArrayDouble *DataArrayDouble::maxPerTupleWithCompoId(DataArrayInt* &compoIdO
 DataArrayDouble *DataArrayDouble::buildEuclidianDistanceDenseMatrix() const
 {
   checkAllocated();
-  int nbOfComp=getNumberOfComponents();
-  int nbOfTuples=getNumberOfTuples();
+  std::size_t nbOfComp(getNumberOfComponents());
+  mcIdType nbOfTuples(getNumberOfTuples());
   const double *inData=getConstPointer();
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   ret->alloc(nbOfTuples*nbOfTuples,1);
   double *outData=ret->getPointer();
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
       outData[i*nbOfTuples+i]=0.;
-      for(int j=i+1;j<nbOfTuples;j++)
+      for(mcIdType j=i+1;j<nbOfTuples;j++)
         {
           double dist=0.;
-          for(int k=0;k<nbOfComp;k++)
+          for(std::size_t k=0;k<nbOfComp;k++)
             { double delta=inData[i*nbOfComp+k]-inData[j*nbOfComp+k]; dist+=delta*delta; }
           dist=sqrt(dist);
           outData[i*nbOfTuples+j]=dist;
@@ -2475,26 +2410,26 @@ DataArrayDouble *DataArrayDouble::buildEuclidianDistanceDenseMatrixWith(const Da
     throw INTERP_KERNEL::Exception("DataArrayDouble::buildEuclidianDistanceDenseMatrixWith : input parameter is null !");
   checkAllocated();
   other->checkAllocated();
-  int nbOfComp=getNumberOfComponents();
-  int otherNbOfComp=other->getNumberOfComponents();
+  std::size_t nbOfComp(getNumberOfComponents());
+  std::size_t otherNbOfComp(other->getNumberOfComponents());
   if(nbOfComp!=otherNbOfComp)
     {
       std::ostringstream oss; oss << "DataArrayDouble::buildEuclidianDistanceDenseMatrixWith : this nb of compo=" << nbOfComp << " and other nb of compo=" << otherNbOfComp << ". It should match !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  int nbOfTuples=getNumberOfTuples();
-  int otherNbOfTuples=other->getNumberOfTuples();
+  mcIdType nbOfTuples(getNumberOfTuples());
+  mcIdType otherNbOfTuples(other->getNumberOfTuples());
   const double *inData=getConstPointer();
   const double *inDataOther=other->getConstPointer();
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   ret->alloc(otherNbOfTuples*nbOfTuples,1);
   double *outData=ret->getPointer();
-  for(int i=0;i<otherNbOfTuples;i++,inDataOther+=nbOfComp)
+  for(mcIdType i=0;i<otherNbOfTuples;i++,inDataOther+=nbOfComp)
     {
-      for(int j=0;j<nbOfTuples;j++)
+      for(mcIdType j=0;j<nbOfTuples;j++)
         {
           double dist=0.;
-          for(int k=0;k<nbOfComp;k++)
+          for(std::size_t k=0;k<nbOfComp;k++)
             { double delta=inDataOther[k]-inData[j*nbOfComp+k]; dist+=delta*delta; }
           dist=sqrt(dist);
           outData[i*nbOfTuples+j]=dist;
@@ -2545,13 +2480,13 @@ void DataArrayDouble::sortPerTuple(bool asc)
 {
   checkAllocated();
   double *pt=getPointer();
-  int nbOfTuple=getNumberOfTuples();
-  int nbOfComp=getNumberOfComponents();
+  mcIdType nbOfTuple(getNumberOfTuples());
+  std::size_t nbOfComp(getNumberOfComponents());
   if(asc)
-    for(int i=0;i<nbOfTuple;i++,pt+=nbOfComp)
+    for(mcIdType i=0;i<nbOfTuple;i++,pt+=nbOfComp)
       std::sort(pt,pt+nbOfComp);
   else
-    for(int i=0;i<nbOfTuple;i++,pt+=nbOfComp)
+    for(mcIdType i=0;i<nbOfTuple;i++,pt+=nbOfComp)
       std::sort(pt,pt+nbOfComp,std::greater<double>());
   declareAsNew();
 }
@@ -2665,16 +2600,16 @@ void DataArrayDouble::applyRPow(double val)
  *  \throw If \a this is not allocated.
  *  \throw If \a func returns \a false.
  */
-DataArrayDouble *DataArrayDouble::applyFunc(int nbOfComp, FunctionToEvaluate func) const
+DataArrayDouble *DataArrayDouble::applyFunc(std::size_t nbOfComp, FunctionToEvaluate func) const
 {
   checkAllocated();
   DataArrayDouble *newArr=DataArrayDouble::New();
-  int nbOfTuples=getNumberOfTuples();
-  int oldNbOfComp=getNumberOfComponents();
+  mcIdType nbOfTuples(getNumberOfTuples());
+  std::size_t oldNbOfComp(getNumberOfComponents());
   newArr->alloc(nbOfTuples,nbOfComp);
   const double *ptr=getConstPointer();
   double *ptrToFill=newArr->getPointer();
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
       if(!func(ptr+i*oldNbOfComp,ptrToFill+i*nbOfComp))
         {
@@ -2704,7 +2639,7 @@ DataArrayDouble *DataArrayDouble::applyFunc(int nbOfComp, FunctionToEvaluate fun
  *  \throw If \a this is not allocated.
  *  \throw If computing \a func fails.
  */
-DataArrayDouble *DataArrayDouble::applyFunc(int nbOfComp, const std::string& func, bool isSafe) const
+DataArrayDouble *DataArrayDouble::applyFunc(std::size_t nbOfComp, const std::string& func, bool isSafe) const
 {
   INTERP_KERNEL::ExprParser expr(func);
   expr.parse();
@@ -2734,18 +2669,18 @@ DataArrayDouble *DataArrayDouble::applyFunc(int nbOfComp, const std::string& fun
  */
 DataArrayDouble *DataArrayDouble::applyFunc(const std::string& func, bool isSafe) const
 {
-  int nbOfComp(getNumberOfComponents());
+  std::size_t nbOfComp(getNumberOfComponents());
   if(nbOfComp<=0)
     throw INTERP_KERNEL::Exception("DataArrayDouble::applyFunc : output number of component must be > 0 !");
   checkAllocated();
-  int nbOfTuples(getNumberOfTuples());
+  mcIdType nbOfTuples(getNumberOfTuples());
   MCAuto<DataArrayDouble> newArr(DataArrayDouble::New());
   newArr->alloc(nbOfTuples,nbOfComp);
   INTERP_KERNEL::ExprParser expr(func);
   expr.parse();
   std::set<std::string> vars;
   expr.getTrueSetOfVars(vars);
-  if((int)vars.size()>1)
+  if(vars.size()>1)
     {
       std::ostringstream oss; oss << "DataArrayDouble::applyFunc : this method works only with at most one var func expression ! If you need to map comps on variables please use applyFuncCompo or applyFuncNamedCompo instead ! Vars in expr are : ";
       std::copy(vars.begin(),vars.end(),std::ostream_iterator<std::string>(oss," "));
@@ -2767,9 +2702,9 @@ DataArrayDouble *DataArrayDouble::applyFunc(const std::string& func, bool isSafe
   expr.prepareFastEvaluator();
   if(!isSafe)
     {
-      for(int i=0;i<nbOfTuples;i++)
+      for(mcIdType i=0;i<nbOfTuples;i++)
         {
-          for(int iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
+          for(std::size_t iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
             {
               buff=*ptr;
               expr.evaluateDoubleInternal(stck);
@@ -2780,9 +2715,9 @@ DataArrayDouble *DataArrayDouble::applyFunc(const std::string& func, bool isSafe
     }
   else
     {
-      for(int i=0;i<nbOfTuples;i++)
+      for(mcIdType i=0;i<nbOfTuples;i++)
         {
-          for(int iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
+          for(std::size_t iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
             {
               buff=*ptr;
               try
@@ -2819,16 +2754,16 @@ DataArrayDouble *DataArrayDouble::applyFunc(const std::string& func, bool isSafe
  */
 void DataArrayDouble::applyFuncOnThis(const std::string& func, bool isSafe)
 {
-  int nbOfComp(getNumberOfComponents());
+  std::size_t nbOfComp(getNumberOfComponents());
   if(nbOfComp<=0)
     throw INTERP_KERNEL::Exception("DataArrayDouble::applyFuncOnThis : output number of component must be > 0 !");
   checkAllocated();
-  int nbOfTuples(getNumberOfTuples());
+  mcIdType nbOfTuples(getNumberOfTuples());
   INTERP_KERNEL::ExprParser expr(func);
   expr.parse();
   std::set<std::string> vars;
   expr.getTrueSetOfVars(vars);
-  if((int)vars.size()>1)
+  if(vars.size()>1)
     {
       std::ostringstream oss; oss << "DataArrayDouble::applyFuncOnThis : this method works only with at most one var func expression ! If you need to map comps on variables please use applyFuncCompo or applyFuncNamedCompo instead ! Vars in expr are : ";
       std::copy(vars.begin(),vars.end(),std::ostream_iterator<std::string>(oss," "));
@@ -2852,9 +2787,9 @@ void DataArrayDouble::applyFuncOnThis(const std::string& func, bool isSafe)
   expr.prepareFastEvaluator();
   if(!isSafe)
     {
-      for(int i=0;i<nbOfTuples;i++)
+      for(mcIdType i=0;i<nbOfTuples;i++)
         {
-          for(int iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
+          for(std::size_t iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
             {
               buff=*ptr;
               expr.evaluateDoubleInternal(stck);
@@ -2865,9 +2800,9 @@ void DataArrayDouble::applyFuncOnThis(const std::string& func, bool isSafe)
     }
   else
     {
-      for(int i=0;i<nbOfTuples;i++)
+      for(mcIdType i=0;i<nbOfTuples;i++)
         {
-          for(int iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
+          for(std::size_t iComp=0;iComp<nbOfComp;iComp++,ptr++,ptrToFill++)
             {
               buff=*ptr;
               try
@@ -2905,7 +2840,7 @@ void DataArrayDouble::applyFuncOnThis(const std::string& func, bool isSafe)
  *  \throw If \a func contains vars that are not in \a this->getInfoOnComponent().
  *  \throw If computing \a func fails.
  */
-DataArrayDouble *DataArrayDouble::applyFuncCompo(int nbOfComp, const std::string& func, bool isSafe) const
+DataArrayDouble *DataArrayDouble::applyFuncCompo(std::size_t nbOfComp, const std::string& func, bool isSafe) const
 {
   return applyFuncNamedCompo(nbOfComp,getVarsOnComponent(),func,isSafe);
 }
@@ -2928,21 +2863,21 @@ DataArrayDouble *DataArrayDouble::applyFuncCompo(int nbOfComp, const std::string
  *  \throw If \a func contains vars not in \a varsOrder.
  *  \throw If computing \a func fails.
  */
-DataArrayDouble *DataArrayDouble::applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func, bool isSafe) const
+DataArrayDouble *DataArrayDouble::applyFuncNamedCompo(std::size_t nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func, bool isSafe) const
 {
   if(nbOfComp<=0)
     throw INTERP_KERNEL::Exception("DataArrayDouble::applyFuncNamedCompo : output number of component must be > 0 !");
   std::vector<std::string> varsOrder2(varsOrder);
-  int oldNbOfComp(getNumberOfComponents());
-  for(int i=(int)varsOrder.size();i<oldNbOfComp;i++)
+  std::size_t oldNbOfComp(getNumberOfComponents());
+  for(std::size_t i=varsOrder.size();i<oldNbOfComp;i++)
     varsOrder2.push_back(std::string());
   checkAllocated();
-  int nbOfTuples(getNumberOfTuples());
+  mcIdType nbOfTuples(getNumberOfTuples());
   INTERP_KERNEL::ExprParser expr(func);
   expr.parse();
   std::set<std::string> vars;
   expr.getTrueSetOfVars(vars);
-  if((int)vars.size()>oldNbOfComp)
+  if(vars.size()>oldNbOfComp)
     {
       std::ostringstream oss; oss << "The field has " << oldNbOfComp << " components and there are ";
       oss << vars.size() << " variables : ";
@@ -2954,15 +2889,15 @@ DataArrayDouble *DataArrayDouble::applyFuncNamedCompo(int nbOfComp, const std::v
   INTERP_KERNEL::AutoPtr<double> buff(new double[oldNbOfComp]);
   double *buffPtr(buff),*ptrToFill;
   std::vector<double> stck;
-  for(int iComp=0;iComp<nbOfComp;iComp++)
+  for(std::size_t iComp=0;iComp<nbOfComp;iComp++)
     {
-      expr.prepareExprEvaluationDouble(varsOrder2,oldNbOfComp,nbOfComp,iComp,buffPtr,buffPtr+oldNbOfComp);
+      expr.prepareExprEvaluationDouble(varsOrder2,(int)oldNbOfComp,(int)nbOfComp,(int)iComp,buffPtr,buffPtr+oldNbOfComp);
       expr.prepareFastEvaluator();
       const double *ptr(getConstPointer());
       ptrToFill=newArr->getPointer()+iComp;
       if(!isSafe)
         {
-          for(int i=0;i<nbOfTuples;i++,ptrToFill+=nbOfComp,ptr+=oldNbOfComp)
+          for(mcIdType i=0;i<nbOfTuples;i++,ptrToFill+=nbOfComp,ptr+=oldNbOfComp)
             {
               std::copy(ptr,ptr+oldNbOfComp,buffPtr);
               expr.evaluateDoubleInternal(stck);
@@ -2972,7 +2907,7 @@ DataArrayDouble *DataArrayDouble::applyFuncNamedCompo(int nbOfComp, const std::v
         }
       else
         {
-          for(int i=0;i<nbOfTuples;i++,ptrToFill+=nbOfComp,ptr+=oldNbOfComp)
+          for(mcIdType i=0;i<nbOfTuples;i++,ptrToFill+=nbOfComp,ptr+=oldNbOfComp)
             {
               std::copy(ptr,ptr+oldNbOfComp,buffPtr);
               try
@@ -3004,10 +2939,10 @@ void DataArrayDouble::applyFuncFast32(const std::string& func)
   *((void **)&funcPtr)=funcStr;//he he...
   //
   double *ptr=getPointer();
-  int nbOfComp=getNumberOfComponents();
-  int nbOfTuples=getNumberOfTuples();
-  int nbOfElems=nbOfTuples*nbOfComp;
-  for(int i=0;i<nbOfElems;i++,ptr++)
+  std::size_t nbOfComp=getNumberOfComponents();
+  mcIdType nbOfTuples=getNumberOfTuples();
+  std::size_t nbOfElems=nbOfTuples*nbOfComp;
+  for(std::size_t i=0;i<nbOfElems;i++,ptr++)
     *ptr=funcPtr(*ptr);
   declareAsNew();
 }
@@ -3022,10 +2957,10 @@ void DataArrayDouble::applyFuncFast64(const std::string& func)
   *((void **)&funcPtr)=funcStr;//he he...
   //
   double *ptr=getPointer();
-  int nbOfComp=getNumberOfComponents();
-  int nbOfTuples=getNumberOfTuples();
-  int nbOfElems=nbOfTuples*nbOfComp;
-  for(int i=0;i<nbOfElems;i++,ptr++)
+  std::size_t nbOfComp=getNumberOfComponents();
+  mcIdType nbOfTuples=getNumberOfTuples();
+  std::size_t nbOfElems=nbOfTuples*nbOfComp;
+  for(std::size_t i=0;i<nbOfElems;i++,ptr++)
     *ptr=funcPtr(*ptr);
   declareAsNew();
 }
@@ -3038,7 +2973,7 @@ MCAuto<DataArrayDouble> DataArrayDouble::symmetry3DPlane(const double point[3],
   checkAllocated();
   if(getNumberOfComponents()!=3)
     throw INTERP_KERNEL::Exception("DataArrayDouble::symmetry3DPlane : this is excepted to have 3 components !");
-  int nbTuples(getNumberOfTuples());
+  mcIdType nbTuples(getNumberOfTuples());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   ret->alloc(nbTuples,3);
   Symmetry3DPlane(point,normalVector,nbTuples,begin(),ret->getPointer());
@@ -3067,15 +3002,15 @@ DataArrayDoubleIterator *DataArrayDouble::iterator()
  *  \ref py_mcdataarraydouble_getidsinrange "Here is a Python example".
  *  \endif
  */
-DataArrayInt *DataArrayDouble::findIdsInRange(double vmin, double vmax) const
+DataArrayIdType *DataArrayDouble::findIdsInRange(double vmin, double vmax) const
 {
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::findIdsInRange : this must have exactly one component !");
   const double *cptr(begin());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  int nbOfTuples(getNumberOfTuples());
-  for(int i=0;i<nbOfTuples;i++,cptr++)
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+  mcIdType nbOfTuples(getNumberOfTuples());
+  for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
     if(*cptr>=vmin && *cptr<=vmax)
       ret->pushBackSilent(i);
   return ret.retn();
@@ -3093,15 +3028,15 @@ DataArrayInt *DataArrayDouble::findIdsInRange(double vmin, double vmax) const
  *
  *  \sa DataArrayDouble::findIdsInRange
  */
-DataArrayInt *DataArrayDouble::findIdsNotInRange(double vmin, double vmax) const
+DataArrayIdType *DataArrayDouble::findIdsNotInRange(double vmin, double vmax) const
 {
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::findIdsNotInRange : this must have exactly one component !");
   const double *cptr(begin());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  int nbOfTuples(getNumberOfTuples());
-  for(int i=0;i<nbOfTuples;i++,cptr++)
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+  mcIdType nbOfTuples(getNumberOfTuples());
+  for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
     if(*cptr<vmin || *cptr>vmax)
       ret->pushBackSilent(i);
   return ret.retn();
@@ -3153,8 +3088,8 @@ DataArrayDouble *DataArrayDouble::Aggregate(const std::vector<const DataArrayDou
     throw INTERP_KERNEL::Exception("DataArrayDouble::Aggregate : input list must contain at least one NON EMPTY DataArrayDouble !");
   std::vector<const DataArrayDouble *>::const_iterator it=a.begin();
   std::size_t nbOfComp((*it)->getNumberOfComponents());
-  int nbt=(*it++)->getNumberOfTuples();
-  for(int i=1;it!=a.end();it++,i++)
+  mcIdType nbt=(*it++)->getNumberOfTuples();
+  for(mcIdType i=1;it!=a.end();it++,i++)
     {
       if((*it)->getNumberOfComponents()!=nbOfComp)
         throw INTERP_KERNEL::Exception("DataArrayDouble::Aggregate : Nb of components mismatch for array aggregation !");
@@ -3194,14 +3129,14 @@ DataArrayDouble *DataArrayDouble::Dot(const DataArrayDouble *a1, const DataArray
   std::size_t nbOfComp(a1->getNumberOfComponents());
   if(nbOfComp!=a2->getNumberOfComponents())
     throw INTERP_KERNEL::Exception("Nb of components mismatch for array Dot !");
-  std::size_t nbOfTuple(a1->getNumberOfTuples());
+  mcIdType nbOfTuple(a1->getNumberOfTuples());
   if(nbOfTuple!=a2->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array Dot !");
   DataArrayDouble *ret=DataArrayDouble::New();
   ret->alloc(nbOfTuple,1);
   double *retPtr=ret->getPointer();
   const double *a1Ptr=a1->begin(),*a2Ptr(a2->begin());
-  for(std::size_t i=0;i<nbOfTuple;i++)
+  for(mcIdType i=0;i<nbOfTuple;i++)
     {
       double sum=0.;
       for(std::size_t j=0;j<nbOfComp;j++)
@@ -3239,14 +3174,14 @@ DataArrayDouble *DataArrayDouble::CrossProduct(const DataArrayDouble *a1, const
     throw INTERP_KERNEL::Exception("Nb of components mismatch for array crossProduct !");
   if(nbOfComp!=3)
     throw INTERP_KERNEL::Exception("Nb of components must be equal to 3 for array crossProduct !");
-  std::size_t nbOfTuple(a1->getNumberOfTuples());
+  mcIdType nbOfTuple(a1->getNumberOfTuples());
   if(nbOfTuple!=a2->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array crossProduct !");
   DataArrayDouble *ret=DataArrayDouble::New();
   ret->alloc(nbOfTuple,3);
   double *retPtr=ret->getPointer();
   const double *a1Ptr(a1->begin()),*a2Ptr(a2->begin());
-  for(std::size_t i=0;i<nbOfTuple;i++)
+  for(mcIdType i=0;i<nbOfTuple;i++)
     {
       retPtr[3*i]=a1Ptr[3*i+1]*a2Ptr[3*i+2]-a1Ptr[3*i+2]*a2Ptr[3*i+1];
       retPtr[3*i+1]=a1Ptr[3*i+2]*a2Ptr[3*i]-a1Ptr[3*i]*a2Ptr[3*i+2];
@@ -3276,7 +3211,7 @@ DataArrayDouble *DataArrayDouble::Max(const DataArrayDouble *a1, const DataArray
   std::size_t nbOfComp(a1->getNumberOfComponents());
   if(nbOfComp!=a2->getNumberOfComponents())
     throw INTERP_KERNEL::Exception("Nb of components mismatch for array Max !");
-  std::size_t nbOfTuple(a1->getNumberOfTuples());
+  mcIdType nbOfTuple(a1->getNumberOfTuples());
   if(nbOfTuple!=a2->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array Max !");
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
@@ -3310,7 +3245,7 @@ DataArrayDouble *DataArrayDouble::Min(const DataArrayDouble *a1, const DataArray
   std::size_t nbOfComp(a1->getNumberOfComponents());
   if(nbOfComp!=a2->getNumberOfComponents())
     throw INTERP_KERNEL::Exception("Nb of components mismatch for array min !");
-  std::size_t nbOfTuple(a1->getNumberOfTuples());
+  mcIdType nbOfTuple(a1->getNumberOfTuples());
   if(nbOfTuple!=a2->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array min !");
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
@@ -3342,10 +3277,10 @@ DataArrayDouble *DataArrayDouble::Pow(const DataArrayDouble *a1, const DataArray
 {
   if(!a1 || !a2)
     throw INTERP_KERNEL::Exception("DataArrayDouble::Pow : at least one of input instances is null !");
-  int nbOfTuple=a1->getNumberOfTuples();
-  int nbOfTuple2=a2->getNumberOfTuples();
-  int nbOfComp=a1->getNumberOfComponents();
-  int nbOfComp2=a2->getNumberOfComponents();
+  mcIdType nbOfTuple=a1->getNumberOfTuples();
+  mcIdType nbOfTuple2=a2->getNumberOfTuples();
+  std::size_t nbOfComp=a1->getNumberOfComponents();
+  std::size_t nbOfComp2=a2->getNumberOfComponents();
   if(nbOfTuple!=nbOfTuple2)
     throw INTERP_KERNEL::Exception("DataArrayDouble::Pow : number of tuples mismatches !");
   if(nbOfComp!=1 || nbOfComp2!=1)
@@ -3353,7 +3288,7 @@ DataArrayDouble *DataArrayDouble::Pow(const DataArrayDouble *a1, const DataArray
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New(); ret->alloc(nbOfTuple,1);
   const double *ptr1(a1->begin()),*ptr2(a2->begin());
   double *ptr=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,ptr1++,ptr2++,ptr++)
+  for(mcIdType i=0;i<nbOfTuple;i++,ptr1++,ptr2++,ptr++)
     {
       if(*ptr1>=0)
         {
@@ -3381,17 +3316,17 @@ void DataArrayDouble::powEqual(const DataArrayDouble *other)
 {
   if(!other)
     throw INTERP_KERNEL::Exception("DataArrayDouble::powEqual : input instance is null !");
-  int nbOfTuple=getNumberOfTuples();
-  int nbOfTuple2=other->getNumberOfTuples();
-  int nbOfComp=getNumberOfComponents();
-  int nbOfComp2=other->getNumberOfComponents();
+  mcIdType nbOfTuple=getNumberOfTuples();
+  mcIdType nbOfTuple2=other->getNumberOfTuples();
+  std::size_t nbOfComp=getNumberOfComponents();
+  std::size_t nbOfComp2=other->getNumberOfComponents();
   if(nbOfTuple!=nbOfTuple2)
     throw INTERP_KERNEL::Exception("DataArrayDouble::powEqual : number of tuples mismatches !");
   if(nbOfComp!=1 || nbOfComp2!=1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::powEqual : number of components of both arrays must be equal to 1 !");
   double *ptr=getPointer();
   const double *ptrc=other->begin();
-  for(int i=0;i<nbOfTuple;i++,ptrc++,ptr++)
+  for(mcIdType i=0;i<nbOfTuple;i++,ptrc++,ptr++)
     {
       if(*ptr>=0)
         *ptr=pow(*ptr,*ptrc);
@@ -3417,10 +3352,10 @@ std::vector<bool> DataArrayDouble::toVectorOfBool(double eps) const
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayDouble::toVectorOfBool : must be applied on single component array !");
-  int nbt(getNumberOfTuples());
+  mcIdType nbt(getNumberOfTuples());
   std::vector<bool> ret(nbt);
   const double *pt(begin());
-  for(int i=0;i<nbt;i++)
+  for(mcIdType i=0;i<nbt;i++)
     {
       if(fabs(pt[i])<eps)
         ret[i]=false;
@@ -3439,13 +3374,13 @@ std::vector<bool> DataArrayDouble::toVectorOfBool(double eps) const
  * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
  * Server side.
  */
-void DataArrayDouble::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+void DataArrayDouble::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
 {
   tinyInfo.resize(2);
   if(isAllocated())
     {
       tinyInfo[0]=getNumberOfTuples();
-      tinyInfo[1]=getNumberOfComponents();
+      tinyInfo[1]=ToIdType(getNumberOfComponents());
     }
   else
     {
@@ -3462,10 +3397,10 @@ void DataArrayDouble::getTinySerializationStrInformation(std::vector<std::string
 {
   if(isAllocated())
     {
-      int nbOfCompo=getNumberOfComponents();
+      std::size_t nbOfCompo(getNumberOfComponents());
       tinyInfo.resize(nbOfCompo+1);
       tinyInfo[0]=getName();
-      for(int i=0;i<nbOfCompo;i++)
+      for(std::size_t i=0;i<nbOfCompo;i++)
         tinyInfo[i+1]=getInfoOnComponent(i);
     }
   else
@@ -3479,10 +3414,10 @@ void DataArrayDouble::getTinySerializationStrInformation(std::vector<std::string
  * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
  * This method returns if a feeding is needed.
  */
-bool DataArrayDouble::resizeForUnserialization(const std::vector<int>& tinyInfoI)
+bool DataArrayDouble::resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI)
 {
-  int nbOfTuple=tinyInfoI[0];
-  int nbOfComp=tinyInfoI[1];
+  mcIdType nbOfTuple=tinyInfoI[0];
+  mcIdType nbOfComp=tinyInfoI[1];
   if(nbOfTuple!=-1 || nbOfComp!=-1)
     {
       alloc(nbOfTuple,nbOfComp);
@@ -3494,13 +3429,13 @@ bool DataArrayDouble::resizeForUnserialization(const std::vector<int>& tinyInfoI
 /*!
  * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
  */
-void DataArrayDouble::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS)
+void DataArrayDouble::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<std::string>& tinyInfoS)
 {
   setName(tinyInfoS[0]);
   if(isAllocated())
     {
-      int nbOfCompo=getNumberOfComponents();
-      for(int i=0;i<nbOfCompo;i++)
+      std::size_t nbOfCompo(getNumberOfComponents());
+      for(std::size_t i=0;i<nbOfCompo;i++)
         setInfoOnComponent(i,tinyInfoS[i+1]);
     }
 }
@@ -3509,7 +3444,7 @@ void DataArrayDouble::finishUnserialization(const std::vector<int>& tinyInfoI, c
  * Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in \a coordsIn
  * around an axe ( \a center, \a vect) and with angle \a angle.
  */
-void DataArrayDouble::Rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, const double *coordsIn, double *coordsOut)
+void DataArrayDouble::Rotate3DAlg(const double *center, const double *vect, double angle, mcIdType nbNodes, const double *coordsIn, double *coordsOut)
 {
   if(!center || !vect)
     throw INTERP_KERNEL::Exception("DataArrayDouble::Rotate3DAlg : null vector in input !");
@@ -3536,7 +3471,7 @@ void DataArrayDouble::Rotate3DAlg(const double *center, const double *vect, doub
   std::transform(matrix,matrix+9,matrixTmp,matrix,std::plus<double>());
   //rotation matrix computed.
   double tmp[3];
-  for(int i=0; i<nbNodes; i++)
+  for(mcIdType i=0; i<nbNodes; i++)
     {
       std::transform(coordsIn+i*3,coordsIn+(i+1)*3,center,tmp,std::minus<double>());
       coordsOut[i*3]=matrix[0]*tmp[0]+matrix[1]*tmp[1]+matrix[2]*tmp[2]+center[0];
@@ -3545,7 +3480,7 @@ void DataArrayDouble::Rotate3DAlg(const double *center, const double *vect, doub
     }
 }
 
-void DataArrayDouble::Symmetry3DPlane(const double point[3], const double normalVector[3], int nbNodes, const double *coordsIn, double *coordsOut)
+void DataArrayDouble::Symmetry3DPlane(const double point[3], const double normalVector[3], mcIdType nbNodes, const double *coordsIn, double *coordsOut)
 {
   double matrix[9],matrix2[9],matrix3[9];
   double vect[3],crossVect[3];
@@ -3560,17 +3495,17 @@ void DataArrayDouble::Symmetry3DPlane(const double point[3], const double normal
   matrix2[0]=vect[0]/nv; matrix2[1]=vect[1]/nv; matrix2[2]=vect[2]/nv;
   matrix2[3]=crossVect[0]/nc; matrix2[4]=crossVect[1]/nc; matrix2[5]=crossVect[2]/nc;
   matrix2[6]=normalVector[0]/ni; matrix2[7]=normalVector[1]/ni; matrix2[8]=normalVector[2]/ni;
-  for(int i=0;i<3;i++)
-    for(int j=0;j<3;j++)
+  for(mcIdType i=0;i<3;i++)
+    for(mcIdType j=0;j<3;j++)
       {
         double val(0.);
-        for(int k=0;k<3;k++)
+        for(mcIdType k=0;k<3;k++)
           val+=matrix[3*i+k]*matrix2[3*k+j];
         matrix3[3*i+j]=val;
       }
   //rotation matrix computed.
   double tmp[3];
-  for(int i=0; i<nbNodes; i++)
+  for(mcIdType i=0; i<nbNodes; i++)
     {
       std::transform(coordsIn+i*3,coordsIn+(i+1)*3,point,tmp,std::minus<double>());
       coordsOut[i*3]=matrix3[0]*tmp[0]+matrix3[1]*tmp[1]+matrix3[2]*tmp[2]+point[0];
@@ -3610,14 +3545,14 @@ void DataArrayDouble::ComputeIntegralOfSeg2IntoTri3(const double seg2[4], const
  * Low static method that operates 3D rotation of \a nbNodes 3D nodes whose coordinates are arranged in \a coords
  * around the center point \a center and with angle \a angle.
  */
-void DataArrayDouble::Rotate2DAlg(const double *center, double angle, int nbNodes, const double *coordsIn, double *coordsOut)
+void DataArrayDouble::Rotate2DAlg(const double *center, double angle, mcIdType nbNodes, const double *coordsIn, double *coordsOut)
 {
   double cosa=cos(angle);
   double sina=sin(angle);
   double matrix[4];
   matrix[0]=cosa; matrix[1]=-sina; matrix[2]=sina; matrix[3]=cosa;
   double tmp[2];
-  for(int i=0; i<nbNodes; i++)
+  for(mcIdType i=0; i<nbNodes; i++)
     {
       std::transform(coordsIn+i*2,coordsIn+(i+1)*2,center,tmp,std::minus<double>());
       coordsOut[i*2]=matrix[0]*tmp[0]+matrix[1]*tmp[1]+center[0];
@@ -3629,7 +3564,7 @@ DataArrayDoubleIterator::DataArrayDoubleIterator(DataArrayDouble *da):DataArrayI
 {
 }
 
-DataArrayDoubleTuple::DataArrayDoubleTuple(double *pt, int nbOfComp):DataArrayTuple<double>(pt,nbOfComp)
+DataArrayDoubleTuple::DataArrayDoubleTuple(double *pt, std::size_t nbOfComp):DataArrayTuple<double>(pt,nbOfComp)
 {
 }
 
@@ -3637,7 +3572,7 @@ DataArrayDoubleTuple::DataArrayDoubleTuple(double *pt, int nbOfComp):DataArrayTu
 std::string DataArrayDoubleTuple::repr() const
 {
   std::ostringstream oss; oss.precision(17); oss << "(";
-  for(int i=0;i<_nb_of_compo-1;i++)
+  for(std::size_t i=0;i<_nb_of_compo-1;i++)
     oss << _pt[i] << ", ";
   oss << _pt[_nb_of_compo-1] << ")";
   return oss.str();
@@ -3654,32 +3589,11 @@ double DataArrayDoubleTuple::doubleValue() const
  * This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
  * \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
  */
-DataArrayDouble *DataArrayDoubleTuple::buildDADouble(int nbOfTuples, int nbOfCompo) const
+DataArrayDouble *DataArrayDoubleTuple::buildDADouble(std::size_t nbOfTuples, std::size_t nbOfCompo) const
 {
   return this->buildDA(nbOfTuples,nbOfCompo);
 }
 
-/*!
- * Returns the only one value in \a this, if and only if number of elements
- * (nb of tuples * nb of components) is equal to 1, and that \a this is allocated.
- *  \return double - the sole value stored in \a this array.
- *  \throw If at least one of conditions stated above is not fulfilled.
- */
-int DataArrayInt::intValue() const
-{
-  if(isAllocated())
-    {
-      if(getNbOfElems()==1)
-        {
-          return *getConstPointer();
-        }
-      else
-        throw INTERP_KERNEL::Exception("DataArrayInt::intValue : DataArrayInt instance is allocated but number of elements is not equal to 1 !");
-    }
-  else
-    throw INTERP_KERNEL::Exception("DataArrayInt::intValue : DataArrayInt instance is not allocated !");
-}
-
 /*!
  * Returns a full copy of \a this. For more info on copying data arrays see
  * \ref MEDCouplingArrayBasicsCopyDeep.
@@ -3690,3386 +3604,78 @@ DataArrayInt32 *DataArrayInt32::deepCopy() const
   return new DataArrayInt32(*this);
 }
 
-/*!
- * Computes distribution of values of \a this one-dimensional array between given value
- * ranges (casts). This method is typically useful for entity number splitting by types,
- * for example. 
- *  \warning The values contained in \a arrBg should be sorted ascendently. No
- *           check of this is be done. If not, the result is not warranted. 
- *  \param [in] arrBg - the array of ascending values defining the value ranges. The i-th
- *         value of \a arrBg (\a arrBg[ i ]) gives the lowest value of the i-th range,
- *         and the greatest value of the i-th range equals to \a arrBg[ i+1 ] - 1. \a
- *         arrBg containing \a n values defines \a n-1 ranges. The last value of \a arrBg
- *         should be more than every value in \a this array.
- *  \param [in] arrEnd - specifies the end of the array \a arrBg, so that
- *              the last value of \a arrBg is \a arrEnd[ -1 ].
- *  \param [out] castArr - a new instance of DataArrayInt, of same size as \a this array
- *         (same number of tuples and components), the caller is to delete
- *         using decrRef() as it is no more needed.
- *         This array contains indices of ranges for every value of \a this array. I.e.
- *         the i-th value of \a castArr gives the index of range the i-th value of \a this
- *         belongs to. Or, in other words, this parameter contains for each tuple in \a
- *         this in which cast it holds.
- *  \param [out] rankInsideCast - a new instance of DataArrayInt, of same size as \a this
- *         array, the caller is to delete using decrRef() as it is no more needed.
- *         This array contains ranks of values of \a this array within ranges
- *         they belongs to. I.e. the i-th value of \a rankInsideCast gives the rank of
- *         the i-th value of \a this array within the \a castArr[ i ]-th range, to which
- *         the i-th value of \a this belongs to. Or, in other words, this param contains
- *         for each tuple its rank inside its cast. The rank is computed as difference
- *         between the value and the lowest value of range.
- *  \param [out] castsPresent - a new instance of DataArrayInt, containing indices of
- *         ranges (casts) to which at least one value of \a this array belongs.
- *         Or, in other words, this param contains the casts that \a this contains.
- *         The caller is to delete this array using decrRef() as it is no more needed.
- *
- * \b Example: If \a this contains [6,5,0,3,2,7,8,1,4] and \a arrBg contains [0,4,9] then
- *            the output of this method will be :
- * - \a castArr       : [1,1,0,0,0,1,1,0,1]
- * - \a rankInsideCast: [2,1,0,3,2,3,4,1,0]
- * - \a castsPresent  : [0,1]
- *
- * I.e. values of \a this array belong to 2 ranges: #0 and #1. Value 6 belongs to the
- * range #1 and its rank within this range is 2; etc.
- *
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If \a arrEnd - arrBg < 2.
- *  \throw If any value of \a this is not less than \a arrEnd[-1].
- */
-void DataArrayInt::splitByValueRange(const int *arrBg, const int *arrEnd,
-                                     DataArrayInt *& castArr, DataArrayInt *& rankInsideCast, DataArrayInt *& castsPresent) const
+DataArrayInt32Iterator *DataArrayInt32::iterator()
 {
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("Call splitByValueRange  method on DataArrayInt with only one component, you can call 'rearrange' method before !");
-  int nbOfTuples=getNumberOfTuples();
-  std::size_t nbOfCast=std::distance(arrBg,arrEnd);
-  if(nbOfCast<2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::splitByValueRange : The input array giving the cast range values should be of size >=2 !");
-  nbOfCast--;
-  const int *work=getConstPointer();
-  typedef std::reverse_iterator<const int *> rintstart;
-  rintstart bg(arrEnd);//OK no problem because size of 'arr' is greater or equal 2
-  rintstart end2(arrBg);
-  MCAuto<DataArrayInt> ret1=DataArrayInt::New();
-  MCAuto<DataArrayInt> ret2=DataArrayInt::New();
-  MCAuto<DataArrayInt> ret3=DataArrayInt::New();
-  ret1->alloc(nbOfTuples,1);
-  ret2->alloc(nbOfTuples,1);
-  int *ret1Ptr=ret1->getPointer();
-  int *ret2Ptr=ret2->getPointer();
-  std::set<std::size_t> castsDetected;
-  for(int i=0;i<nbOfTuples;i++)
-    {
-      rintstart res=std::find_if(bg,end2,std::bind2nd(std::less_equal<int>(), work[i]));
-      std::size_t pos=std::distance(bg,res);
-      std::size_t pos2=nbOfCast-pos;
-      if(pos2<nbOfCast)
-        {
-          ret1Ptr[i]=(int)pos2;
-          ret2Ptr[i]=work[i]-arrBg[pos2];
-          castsDetected.insert(pos2);
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::splitByValueRange : At rank #" << i << " the value is " << work[i] << " should be in [0," << *bg << ") !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  ret3->alloc((int)castsDetected.size(),1);
-  std::copy(castsDetected.begin(),castsDetected.end(),ret3->getPointer());
-  castArr=ret1.retn();
-  rankInsideCast=ret2.retn();
-  castsPresent=ret3.retn();
+  return new DataArrayInt32Iterator(this);
 }
 
-/*!
- * This method look at \a this if it can be considered as a range defined by the 3-tuple ( \a strt , \a sttoopp , \a stteepp ).
- * If false is returned the tuple must be ignored. If true is returned \a this can be considered by a range( \a strt , \a sttoopp , \a stteepp ).
- * This method works only if \a this is allocated and single component. If not an exception will be thrown.
- *
- * \param [out] strt - the start of the range (included) if true is returned.
- * \param [out] sttoopp - the end of the range (not included) if true is returned.
- * \param [out] stteepp - the step of the range if true is returned.
- * \return the verdict of the check.
- *
- * \sa DataArray::GetNumberOfItemGivenBES
- */
-bool DataArrayInt::isRange(int& strt, int& sttoopp, int& stteepp) const
+
+DataArrayInt32Iterator::DataArrayInt32Iterator(DataArrayInt32 *da):DataArrayIterator<Int32>(da)
 {
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::isRange : this must be single component array !");
-  int nbTuples(getNumberOfTuples());
-  if(nbTuples==0)
-    { strt=0; sttoopp=0; stteepp=1; return true; }
-  const int *pt(begin());
-  strt=*pt;
-  if(nbTuples==1)
-    { sttoopp=strt+1; stteepp=1; return true; }
-  strt=*pt; sttoopp=pt[nbTuples-1];
-  if(strt==sttoopp)
-    return false;
-  if(sttoopp>strt)
-    {
-      sttoopp++;
-      int a(sttoopp-1-strt),tmp(strt);
-      if(a%(nbTuples-1)!=0)
-        return false;
-      stteepp=a/(nbTuples-1);
-      for(int i=0;i<nbTuples;i++,tmp+=stteepp)
-        if(pt[i]!=tmp)
-          return false;
-      return true;
-    }
-  else
-    {
-      sttoopp--;
-      int a(strt-sttoopp-1),tmp(strt);
-      if(a%(nbTuples-1)!=0)
-        return false;
-      stteepp=-(a/(nbTuples-1));
-      for(int i=0;i<nbTuples;i++,tmp+=stteepp)
-        if(pt[i]!=tmp)
-          return false;
-      return true;
-    }
 }
 
-/*!
- * Creates a one-dimensional DataArrayInt (\a res) whose contents are computed from
- * values of \a this (\a a) and the given (\a indArr) arrays as follows:
- * \a res[ \a indArr[ \a a[ i ]]] = i. I.e. for each value in place i \a v = \a a[ i ],
- * new value in place \a indArr[ \a v ] is i.
- *  \param [in] indArrBg - the array holding indices within the result array to assign
- *         indices of values of \a this array pointing to values of \a indArrBg.
- *  \param [in] indArrEnd - specifies the end of the array \a indArrBg, so that
- *              the last value of \a indArrBg is \a indArrEnd[ -1 ].
- *  \return DataArrayInt * - the new instance of DataArrayInt.
- *          The caller is to delete this result array using decrRef() as it is no more
- *          needed.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If any value of \a this array is not a valid index for \a indArrBg array.
- *  \throw If any value of \a indArrBg is not a valid index for \a this array.
- */
-DataArrayInt *DataArrayInt::transformWithIndArrR(const int *indArrBg, const int *indArrEnd) const
+DataArrayInt32Tuple::DataArrayInt32Tuple(Int32 *pt, std::size_t nbOfComp):DataArrayTuple<Int32>(pt,nbOfComp)
 {
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("Call transformWithIndArrR method on DataArrayInt with only one component, you can call 'rearrange' method before !");
-  int nbElemsIn=(int)std::distance(indArrBg,indArrEnd);
-  int nbOfTuples=getNumberOfTuples();
-  const int *pt=getConstPointer();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(nbOfTuples,1);
-  ret->fillWithValue(-1);
-  int *tmp=ret->getPointer();
-  for(int i=0;i<nbOfTuples;i++,pt++)
-    {
-      if(*pt>=0 && *pt<nbElemsIn)
-        {
-          int pos=indArrBg[*pt];
-          if(pos>=0 && pos<nbOfTuples)
-            tmp[pos]=i;
-          else
-            {
-              std::ostringstream oss; oss << "DataArrayInt::transformWithIndArrR : error on tuple #" << i << " value of new pos is " << pos << " ( indArrBg[" << *pt << "]) ! Should be in [0," << nbOfTuples << ") !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::transformWithIndArrR : error on tuple #" << i << " value is " << *pt << " and indirectionnal array as a size equal to " << nbElemsIn << " !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  return ret.retn();
 }
 
-/*!
- * Creates a one-dimensional DataArrayInt of given length, whose contents are computed
- * from values of \a this array, which is supposed to contain a renumbering map in
- * "Old to New" mode. The result array contains a renumbering map in "New to Old" mode.
- * To know how to use the renumbering maps see \ref numbering.
- *  \param [in] newNbOfElem - the number of tuples in the result array.
- *  \return DataArrayInt * - the new instance of DataArrayInt.
- *          The caller is to delete this result array using decrRef() as it is no more
- *          needed.
- *
- *  \if ENABLE_EXAMPLES
- *  \ref cpp_mcdataarrayint_invertarrayo2n2n2o "Here is a C++ example".<br>
- *  \ref py_mcdataarrayint_invertarrayo2n2n2o  "Here is a Python example".
- *  \endif
- */
-DataArrayInt *DataArrayInt::invertArrayO2N2N2O(int newNbOfElem) const
-{
-  MCAuto<DataArrayInt> ret(DataArrayInt::New());
-  ret->alloc(newNbOfElem,1);
-  int nbOfOldNodes(this->getNumberOfTuples());
-  const int *old2New(begin());
-  int *pt(ret->getPointer());
-  for(int i=0;i!=nbOfOldNodes;i++)
-    {
-      int newp(old2New[i]);
-      if(newp!=-1)
-        {
-          if(newp>=0 && newp<newNbOfElem)
-            pt[newp]=i;
-          else
-            {
-              std::ostringstream oss; oss << "DataArrayInt::invertArrayO2N2N2O : At place #" << i << " the newplace is " << newp << " must be in [0," << newNbOfElem << ") !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-        }
-    }
-  return ret.retn();
+std::string DataArrayInt32Tuple::repr() const
+{
+  std::ostringstream oss; oss << "(";
+  for(std::size_t i=0;i<_nb_of_compo-1;i++)
+    oss << _pt[i] << ", ";
+  oss << _pt[_nb_of_compo-1] << ")";
+  return oss.str();
 }
 
-/*!
- * This method is similar to DataArrayInt::invertArrayO2N2N2O except that
- * Example : If \a this contains [0,1,2,0,3,4,5,4,6,4] this method will return [0,1,2,4,5,6,8] whereas DataArrayInt::invertArrayO2N2N2O returns [3,1,2,4,9,6,8]
- */
-DataArrayInt *DataArrayInt::invertArrayO2N2N2OBis(int newNbOfElem) const
-{
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(newNbOfElem,1);
-  int nbOfOldNodes=getNumberOfTuples();
-  const int *old2New=getConstPointer();
-  int *pt=ret->getPointer();
-  for(int i=nbOfOldNodes-1;i>=0;i--)
-    {
-      int newp(old2New[i]);
-      if(newp!=-1)
-        {
-          if(newp>=0 && newp<newNbOfElem)
-            pt[newp]=i;
-          else
-            {
-              std::ostringstream oss; oss << "DataArrayInt::invertArrayO2N2N2OBis : At place #" << i << " the newplace is " << newp << " must be in [0," << newNbOfElem << ") !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-        }
-    }
-  return ret.retn();
+Int32 DataArrayInt32Tuple::intValue() const
+{
+  return this->zeValue();
 }
 
 /*!
- * Creates a one-dimensional DataArrayInt of given length, whose contents are computed
- * from values of \a this array, which is supposed to contain a renumbering map in
- * "New to Old" mode. The result array contains a renumbering map in "Old to New" mode.
- * To know how to use the renumbering maps see \ref numbering.
- *  \param [in] newNbOfElem - the number of tuples in the result array.
- *  \return DataArrayInt * - the new instance of DataArrayInt.
- *          The caller is to delete this result array using decrRef() as it is no more
- *          needed.
- *
- *  \if ENABLE_EXAMPLES
- *  \ref cpp_mcdataarrayint_invertarrayn2o2o2n "Here is a C++ example".
- *
- *  \ref py_mcdataarrayint_invertarrayn2o2o2n "Here is a Python example".
- *  \sa invertArrayN2O2O2NOptimized
- *  \endif
+ * This method returns a newly allocated instance the caller should dealed with by a MEDCoupling::DataArrayInt::decrRef.
+ * This method performs \b no copy of data. The content is only referenced using MEDCoupling::DataArrayInt::useArray with ownership set to \b false.
+ * This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
+ * \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
  */
-DataArrayInt *DataArrayInt::invertArrayN2O2O2N(int oldNbOfElem) const
+DataArrayInt32 *DataArrayInt32Tuple::buildDAInt(std::size_t nbOfTuples, std::size_t nbOfCompo) const
 {
-  checkAllocated();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(oldNbOfElem,1);
-  const int *new2Old=getConstPointer();
-  int *pt=ret->getPointer();
-  std::fill(pt,pt+oldNbOfElem,-1);
-  int nbOfNewElems=getNumberOfTuples();
-  for(int i=0;i<nbOfNewElems;i++)
-    {
-      int v(new2Old[i]);
-      if(v>=0 && v<oldNbOfElem)
-        pt[v]=i;
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::invertArrayN2O2O2N : in new id #" << i << " old value is " << v << " expected to be in [0," << oldNbOfElem << ") !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  return ret.retn();
+  return this->buildDA(nbOfTuples,nbOfCompo);
 }
 
-/*!
- * Creates a map, whose contents are computed
- * from values of \a this array, which is supposed to contain a renumbering map in
- * "New to Old" mode. The result array contains a renumbering map in "Old to New" mode.
- * To know how to use the renumbering maps see \ref numbering.
- *  \param [in] newNbOfElem - the number of tuples in the result array.
- *  \return MapII  - the new instance of Map.
- *
- *  \if ENABLE_EXAMPLES
- *  \ref cpp_mcdataarrayint_invertarrayn2o2o2n "Here is a C++ example".
- *
- *  \ref py_mcdataarrayint_invertarrayn2o2o2n "Here is a Python example".
- *  \sa invertArrayN2O2O2N, giveN2OOptimized, MEDCouplingPointSet::renumberNodesInConn
- *  \endif
- */
-MCAuto< MapKeyVal<int> > DataArrayInt32::invertArrayN2O2O2NOptimized() const
+DataArrayInt64Iterator *DataArrayInt64::iterator()
 {
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt32::invertArrayN2O2O2NOptimized : single component expected !");
-  MCAuto< MapKeyVal<int> > ret(MapKeyVal<int>::New());
-  std::map<int,int>& m(ret->data());
-  const int *new2Old(begin());
-  std::size_t nbOfNewElems(this->getNumberOfTuples());
-  for(std::size_t i=0;i<nbOfNewElems;i++)
-    {
-      int v(new2Old[i]);
-      m[v]=i;
-    }
-  return ret;
+  return new DataArrayInt64Iterator(this);
 }
 
-/*!
- * Creates a map, whose contents are computed
- * from values of \a this array, which is supposed to contain a renumbering map in 
- * "New to Old" mode. The result array contains a renumbering map in "New to Old" mode as C++ map for performance reasons.
- *
- * \sa invertArrayN2O2O2NOptimized, MEDCouplingPointSet::renumberNodesInConn
- */
-MCAuto< MapKeyVal<int> > DataArrayInt32::giveN2OOptimized() const
+
+DataArrayInt64Iterator::DataArrayInt64Iterator(DataArrayInt64 *da):DataArrayIterator<Int64>(da)
 {
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt32::giveN2OOptimized : single component expected !");
-  MCAuto< MapKeyVal<int> > ret(MapKeyVal<int>::New());
-  std::map<int,int>& m(ret->data());
-  const int *new2Old(begin());
-  std::size_t nbOfNewElems(this->getNumberOfTuples());
-  for(std::size_t i=0;i<nbOfNewElems;i++)
-    {
-      int v(new2Old[i]);
-      m[i]=v;
-    }
-  return ret;
 }
 
-/*!
- * Returns a new DataArrayInt containing a renumbering map in "Old to New" mode.
- * This map, if applied to \a this array, would make it sorted. For example, if
- * \a this array contents are [9,10,0,6,4,11,3,7] then the contents of the result array
- * are [5,6,0,3,2,7,1,4]; if this result array (\a res) is used as an argument in call
- * \a this->renumber(\a res) then the returned array contains [0,3,4,6,7,9,10,11].
- * This method is useful for renumbering (in MED file for example). For more info
- * on renumbering see \ref numbering.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If there are equal values in \a this array.
- */
-DataArrayInt *DataArrayInt::checkAndPreparePermutation() const
+DataArrayInt64Tuple::DataArrayInt64Tuple(Int64 *pt, std::size_t nbOfComp):DataArrayTuple<Int64>(pt,nbOfComp)
 {
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::checkAndPreparePermutation : number of components must == 1 !");
-  int nbTuples=getNumberOfTuples();
-  const int *pt=getConstPointer();
-  int *pt2=CheckAndPreparePermutation(pt,pt+nbTuples);
-  DataArrayInt *ret=DataArrayInt::New();
-  ret->useArray(pt2,true,DeallocType::C_DEALLOC,nbTuples,1);
-  return ret;
 }
 
-/*!
- * This method tries to find the permutation to apply to the first input \a ids1 to obtain the same array (without considering strings information) the second
- * input array \a ids2.
- * \a ids1 and \a ids2 are expected to be both a list of ids (both with number of components equal to one) not sorted and with values that can be negative.
- * This method will throw an exception is no such permutation array can be obtained. It is typically the case if there is some ids in \a ids1 not in \a ids2 or
- * inversely.
- * In case of success both assertion will be true (no throw) :
- * \c ids1->renumber(ret)->isEqual(ids2) where \a ret is the return of this method.
- * \c ret->transformWithIndArr(ids2)->isEqual(ids1)
- *
- * \b Example:
- * - \a ids1 : [3,1,103,4,6,10,-7,205]
- * - \a ids2 : [-7,1,205,10,6,3,103,4]
- * - \a return is : [5,1,6,7,4,3,0,2] because ids2[5]==ids1[0], ids2[1]==ids1[1], ids2[6]==ids1[2]...
- *
- * \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- * \throw If either ids1 or ids2 is null not allocated or not with one components.
- *
- * \sa DataArrayInt32::findIdForEach
- */
-DataArrayInt *DataArrayInt::FindPermutationFromFirstToSecond(const DataArrayInt *ids1, const DataArrayInt *ids2)
-{
-  if(!ids1 || !ids2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two input arrays must be not null !");
-  if(!ids1->isAllocated() || !ids2->isAllocated())
-    throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two input arrays must be allocated !");
-  if(ids1->getNumberOfComponents()!=1 || ids2->getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two input arrays have exactly one component !");
-  if(ids1->getNumberOfTuples()!=ids2->getNumberOfTuples())
-    {
-      std::ostringstream oss; oss << "DataArrayInt::FindPermutationFromFirstToSecond : first array has " << ids1->getNumberOfTuples() << " tuples and the second one " << ids2->getNumberOfTuples() << " tuples ! No chance to find a permutation between the 2 arrays !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  MCAuto<DataArrayInt> p1(ids1->deepCopy());
-  MCAuto<DataArrayInt> p2(ids2->deepCopy());
-  p1->sort(true); p2->sort(true);
-  if(!p1->isEqualWithoutConsideringStr(*p2))
-    throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two arrays are not lying on same ids ! Impossible to find a permutation between the 2 arrays !");
-  p1=ids1->checkAndPreparePermutation();
-  p2=ids2->checkAndPreparePermutation();
-  p2=p2->invertArrayO2N2N2O(p2->getNumberOfTuples());
-  p2=p2->selectByTupleIdSafe(p1->begin(),p1->end());
-  return p2.retn();
+std::string DataArrayInt64Tuple::repr() const
+{
+  std::ostringstream oss; oss << "(";
+  for(std::size_t i=0;i<_nb_of_compo-1;i++)
+    oss << _pt[i] << ", ";
+  oss << _pt[_nb_of_compo-1] << ")";
+  return oss.str();
 }
 
-/*!
- * Returns two arrays describing a surjective mapping from \a this set of values (\a A)
- * onto a set of values of size \a targetNb (\a B). The surjective function is
- * \a B[ \a A[ i ]] = i. That is to say that for each \a id in [0,\a targetNb), where \a
- * targetNb < \a this->getNumberOfTuples(), there exists at least one tupleId (\a tid) so
- * that <em> this->getIJ( tid, 0 ) == id</em>. <br>
- * The first of out arrays returns indices of elements of \a this array, grouped by their
- * place in the set \a B. The second out array is the index of the first one; it shows how
- * many elements of \a A are mapped into each element of \a B. <br>
- * For more info on
- * mapping and its usage in renumbering see \ref numbering. <br>
- * \b Example:
- * - \a this: [0,3,2,3,2,2,1,2]
- * - \a targetNb: 4
- * - \a arr:  [0,  6,  2,4,5,7,  1,3]
- * - \a arrI: [0,1,2,6,8]
- *
- * This result means: <br>
- * the element of \a B 0 encounters within \a A once (\a arrI[ 0+1 ] - \a arrI[ 0 ]) and
- * its index within \a A is 0 ( \a arr[ 0:1 ] == \a arr[ \a arrI[ 0 ] : \a arrI[ 0+1 ]]);<br>
- * the element of \a B 2 encounters within \a A 4 times (\a arrI[ 2+1 ] - \a arrI[ 2 ]) and
- * its indices within \a A are [2,4,5,7] ( \a arr[ 2:6 ] == \a arr[ \a arrI[ 2 ] :
- * \a arrI[ 2+1 ]]); <br> etc.
- *  \param [in] targetNb - the size of the set \a B. \a targetNb must be equal or more
- *         than the maximal value of \a A.
- *  \param [out] arr - a new instance of DataArrayInt returning indices of
- *         elements of \a this, grouped by their place in the set \a B. The caller is to delete
- *         this array using decrRef() as it is no more needed.
- *  \param [out] arrI - a new instance of DataArrayInt returning size of groups of equal
- *         elements of \a this. The caller is to delete this array using decrRef() as it
- *         is no more needed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If any value in \a this is more or equal to \a targetNb.
- */
-void DataArrayInt::changeSurjectiveFormat(int targetNb, DataArrayInt *&arr, DataArrayInt *&arrI) const
+Int64 DataArrayInt64Tuple::intValue() const
 {
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::changeSurjectiveFormat : number of components must == 1 !");
-  int nbOfTuples=getNumberOfTuples();
-  MCAuto<DataArrayInt> ret(DataArrayInt::New());
-  MCAuto<DataArrayInt> retI(DataArrayInt::New());
-  retI->alloc(targetNb+1,1);
-  const int *input=getConstPointer();
-  std::vector< std::vector<int> > tmp(targetNb);
-  for(int i=0;i<nbOfTuples;i++)
-    {
-      int tmp2=input[i];
-      if(tmp2>=0 && tmp2<targetNb)
-        tmp[tmp2].push_back(i);
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::changeSurjectiveFormat : At pos " << i << " presence of element " << tmp2 << " ! should be in [0," << targetNb << ") !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  int *retIPtr=retI->getPointer();
-  *retIPtr=0;
-  for(std::vector< std::vector<int> >::const_iterator it1=tmp.begin();it1!=tmp.end();it1++,retIPtr++)
-    retIPtr[1]=retIPtr[0]+(int)((*it1).size());
-  if(nbOfTuples!=retI->getIJ(targetNb,0))
-    throw INTERP_KERNEL::Exception("DataArrayInt::changeSurjectiveFormat : big problem should never happen !");
-  ret->alloc(nbOfTuples,1);
-  int *retPtr=ret->getPointer();
-  for(std::vector< std::vector<int> >::const_iterator it1=tmp.begin();it1!=tmp.end();it1++)
-    retPtr=std::copy((*it1).begin(),(*it1).end(),retPtr);
-  arr=ret.retn();
-  arrI=retI.retn();
+  return this->zeValue();
 }
 
-
-/*!
- * Returns a new DataArrayInt containing a renumbering map in "Old to New" mode computed
- * from a zip representation of a surjective format (returned e.g. by
- * \ref MEDCoupling::DataArrayDouble::findCommonTuples() "DataArrayDouble::findCommonTuples()"
- * for example). The result array minimizes the permutation. <br>
- * For more info on renumbering see \ref numbering. <br>
- * \b Example: <br>
- * - \a nbOfOldTuples: 10
- * - \a arr          : [0,3, 5,7,9]
- * - \a arrIBg       : [0,2,5]
- * - \a newNbOfTuples: 7
- * - result array    : [0,1,2,0,3,4,5,4,6,4]
- *
- *  \param [in] nbOfOldTuples - number of tuples in the initial array \a arr.
- *  \param [in] arr - the array of tuple indices grouped by \a arrIBg array.
- *  \param [in] arrIBg - the array dividing all indices stored in \a arr into groups of
- *         (indices of) equal values. Its every element (except the last one) points to
- *         the first element of a group of equal values.
- *  \param [in] arrIEnd - specifies the end of \a arrIBg, so that the last element of \a
- *          arrIBg is \a arrIEnd[ -1 ].
- *  \param [out] newNbOfTuples - number of tuples after surjection application.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If any value of \a arr breaks condition ( 0 <= \a arr[ i ] < \a nbOfOldTuples ).
- */
-DataArrayInt *DataArrayInt::ConvertIndexArrayToO2N(int nbOfOldTuples, const int *arr, const int *arrIBg, const int *arrIEnd, int &newNbOfTuples)
-{
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(nbOfOldTuples,1);
-  int *pt=ret->getPointer();
-  std::fill(pt,pt+nbOfOldTuples,-1);
-  int nbOfGrps=((int)std::distance(arrIBg,arrIEnd))-1;
-  const int *cIPtr=arrIBg;
-  for(int i=0;i<nbOfGrps;i++)
-    pt[arr[cIPtr[i]]]=-(i+2);
-  int newNb=0;
-  for(int iNode=0;iNode<nbOfOldTuples;iNode++)
-    {
-      if(pt[iNode]<0)
-        {
-          if(pt[iNode]==-1)
-            pt[iNode]=newNb++;
-          else
-            {
-              int grpId=-(pt[iNode]+2);
-              for(int j=cIPtr[grpId];j<cIPtr[grpId+1];j++)
-                {
-                  if(arr[j]>=0 && arr[j]<nbOfOldTuples)
-                    pt[arr[j]]=newNb;
-                  else
-                    {
-                      std::ostringstream oss; oss << "DataArrayInt::ConvertIndexArrayToO2N : With element #" << j << " value is " << arr[j] << " should be in [0," << nbOfOldTuples << ") !";
-                      throw INTERP_KERNEL::Exception(oss.str().c_str());
-                    }
-                }
-              newNb++;
-            }
-        }
-    }
-  newNbOfTuples=newNb;
-  return ret.retn();
+DataArrayInt64 *DataArrayInt64Tuple::buildDAInt(std::size_t nbOfTuples, std::size_t nbOfCompo) const
+{
+  return this->buildDA(nbOfTuples,nbOfCompo);
 }
 
-/*!
- * Returns a new DataArrayInt containing a renumbering map in "New to Old" mode,
- * which if applied to \a this array would make it sorted ascendingly.
- * For more info on renumbering see \ref numbering. <br>
- * \b Example: <br>
- * - \a this: [2,0,1,1,0,1,2,0,1,1,0,0]
- * - result: [10,0,5,6,1,7,11,2,8,9,3,4]
- * - after applying result to \a this: [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2]
- *
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::buildPermArrPerLevel() const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildPermArrPerLevel : number of components must == 1 !");
-  int nbOfTuples=getNumberOfTuples();
-  const int *pt=getConstPointer();
-  std::map<int,int> m;
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(nbOfTuples,1);
-  int *opt=ret->getPointer();
-  for(int i=0;i<nbOfTuples;i++,pt++,opt++)
-    {
-      int val=*pt;
-      std::map<int,int>::iterator it=m.find(val);
-      if(it!=m.end())
-        {
-          *opt=(*it).second;
-          (*it).second++;
-        }
-      else
-        {
-          *opt=0;
-          m.insert(std::pair<int,int>(val,1));
-        }
-    }
-  int sum=0;
-  for(std::map<int,int>::iterator it=m.begin();it!=m.end();it++)
-    {
-      int vt=(*it).second;
-      (*it).second=sum;
-      sum+=vt;
-    }
-  pt=getConstPointer();
-  opt=ret->getPointer();
-  for(int i=0;i<nbOfTuples;i++,pt++,opt++)
-    *opt+=m[*pt];
-  //
-  return ret.retn();
-}
-
-/*!
- * Checks if \a this array has the given size, and if its contents is equal to an array filled with
- * iota(). This method is particularly useful for DataArrayInt instances that represent
- * a renumbering array, to check if there is a real need in renumbering.
- * This method checks than \a this can be considered as an identity mapping
- * of a set having \a sizeExpected elements into itself.
- *
- *  \param [in] sizeExpected - The number of elements expected.
- *  \return bool - \a true if \a this array contents == \a range( \a this->getNumberOfTuples())
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- */
-bool DataArrayInt::isIota(int sizeExpected) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    return false;
-  int nbOfTuples(getNumberOfTuples());
-  if(nbOfTuples!=sizeExpected)
-    return false;
-  const int *pt=getConstPointer();
-  for(int i=0;i<nbOfTuples;i++,pt++)
-    if(*pt!=i)
-      return false;
-  return true;
-}
-
-/*!
- * Checks if all values in \a this array are equal to \a val.
- *  \param [in] val - value to check equality of array values to.
- *  \return bool - \a true if all values are \a val.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1
- *  \sa DataArrayInt::checkUniformAndGuess
- */
-bool DataArrayInt::isUniform(int val) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::isUniform : must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
-  const int *w(begin()),*end2(end());
-  for(;w!=end2;w++)
-    if(*w!=val)
-      return false;
-  return true;
-}
-
-/*!
- * This method checks that \a this is uniform. If not and exception will be thrown.
- * In case of uniformity the corresponding value is returned.
- *
- * \return int - the unique value contained in this
- * \throw If \a this is not allocated.
- * \throw If \a this->getNumberOfComponents() != 1
- * \throw If \a this is not uniform.
- * \sa DataArrayInt::isUniform
- */
-int DataArrayInt::checkUniformAndGuess() const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::checkUniformAndGuess : must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
-  if(empty())
-    throw INTERP_KERNEL::Exception("DataArrayInt::checkUniformAndGuess : this is empty !");
-  const int *w(begin()),*end2(end());
-  int ret(*w);
-  for(;w!=end2;w++)
-    if(*w!=ret)
-      throw INTERP_KERNEL::Exception("DataArrayInt::checkUniformAndGuess : this is not uniform !");
-  return ret;
-}
-
-/*!
- * Checks if all values in \a this array are unique.
- *  \return bool - \a true if condition above is true
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1
- */
-bool DataArrayInt::hasUniqueValues() const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::hasOnlyUniqueValues: must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
-  std::size_t nbOfTuples(getNumberOfTuples());
-  std::set<int> s(begin(),end());  // in C++11, should use unordered_set (O(1) complexity)
-  if (s.size() != nbOfTuples)
-    return false;
-  return true;
-}
-
-/*!
- * Copy all components in a specified order from another DataArrayInt.
- * The specified components become the first ones in \a this array.
- * Both numerical and textual data is copied. The number of tuples in \a this and
- * the other array can be different.
- *  \param [in] a - the array to copy data from.
- *  \param [in] compoIds - sequence of zero based indices of components, data of which is
- *              to be copied.
- *  \throw If \a a is NULL.
- *  \throw If \a compoIds.size() != \a a->getNumberOfComponents().
- *  \throw If \a compoIds[i] < 0 or \a compoIds[i] > \a this->getNumberOfComponents().
- *
- *  \if ENABLE_EXAMPLES
- *  \ref py_mcdataarrayint_setselectedcomponents "Here is a Python example".
- *  \endif
- */
-void DataArrayInt::setSelectedComponents(const DataArrayInt *a, const std::vector<int>& compoIds)
-{
-  if(!a)
-    throw INTERP_KERNEL::Exception("DataArrayInt::setSelectedComponents : input DataArrayInt is NULL !");
-  checkAllocated();
-  a->checkAllocated();
-  copyPartOfStringInfoFrom2(compoIds,*a);
-  std::size_t partOfCompoSz=compoIds.size();
-  int nbOfCompo=getNumberOfComponents();
-  int nbOfTuples=std::min(getNumberOfTuples(),a->getNumberOfTuples());
-  const int *ac=a->getConstPointer();
-  int *nc=getPointer();
-  for(int i=0;i<nbOfTuples;i++)
-    for(std::size_t j=0;j<partOfCompoSz;j++,ac++)
-      nc[nbOfCompo*i+compoIds[j]]=*ac;
-}
-
-DataArrayIntIterator *DataArrayInt::iterator()
-{
-  return new DataArrayIntIterator(this);
-}
-
-/*!
- * Creates a new DataArrayInt containing IDs (indices) of tuples holding value \b not
- * equal to a given one.
- *  \param [in] val - the value to ignore within \a this.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::findIdsNotEqual(int val) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdsNotEqual : the array must have only one component, you can call 'rearrange' method before !");
-  const int *cptr(getConstPointer());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  int nbOfTuples=getNumberOfTuples();
-  for(int i=0;i<nbOfTuples;i++,cptr++)
-    if(*cptr!=val)
-      ret->pushBackSilent(i);
-  return ret.retn();
-}
-
-/*!
- * Creates a new DataArrayInt containing IDs (indices) of tuples holding tuple equal to those defined by [ \a tupleBg , \a tupleEnd )
- * This method is an extension of  DataArrayInt::findIdsEqual method.
- *
- *  \param [in] tupleBg - the begin (included) of the input tuple to find within \a this.
- *  \param [in] tupleEnd - the end (excluded) of the input tuple to find within \a this.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != std::distance(tupleBg,tupleEnd).
- * \throw If \a this->getNumberOfComponents() is equal to 0.
- * \sa DataArrayInt::findIdsEqual
- */
-DataArrayInt *DataArrayInt::findIdsEqualTuple(const int *tupleBg, const int *tupleEnd) const
-{
-  std::size_t nbOfCompoExp(std::distance(tupleBg,tupleEnd));
-  checkAllocated();
-  if(getNumberOfComponents()!=nbOfCompoExp)
-    {
-      std::ostringstream oss; oss << "DataArrayInt::findIdsEqualTuple : mismatch of number of components. Input tuple has " << nbOfCompoExp << " whereas this array has " << getNumberOfComponents() << " components !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  if(nbOfCompoExp==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdsEqualTuple : number of components should be > 0 !");
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  const int *bg(begin()),*end2(end()),*work(begin());
-  while(work!=end2)
-    {
-      work=std::search(work,end2,tupleBg,tupleEnd);
-      if(work!=end2)
-        {
-          std::size_t pos(std::distance(bg,work));
-          if(pos%nbOfCompoExp==0)
-            ret->pushBackSilent(pos/nbOfCompoExp);
-          work++;
-        }
-    }
-  return ret.retn();
-}
-
-/*!
- * This method finds for each element \a ELT in [valsBg,valsEnd) elements in \a this equal to it. Associated to ELT
- * this method will return the tuple id of last element found. If there is no element in \a this equal to ELT
- * an exception will be thrown.
- *
- * In case of success this[ret]==vals. Samely ret->transformWithIndArr(this->begin(),this->end())==vals.
- * Where \a vals is the [valsBg,valsEnd) array and \a ret the array returned by this method.
- * This method can be seen as an extension of FindPermutationFromFirstToSecond.
- * <br>
- * \b Example: <br>
- * - \a this: [17,27,2,10,-4,3,12,27,16]
- * - \a val : [3,16,-4,27,17]
- * - result: [5,8,4,7,0]
- *
- * \return - An array of size std::distance(valsBg,valsEnd)
- *
- * \sa DataArrayInt32::FindPermutationFromFirstToSecond
- */
-MCAuto<DataArrayInt32> DataArrayInt32::findIdForEach(const int *valsBg, const int *valsEnd) const
-{
-  MCAuto<DataArrayInt32> ret(DataArrayInt32::New());
-  std::size_t nbOfTuplesOut(std::distance(valsBg,valsEnd));
-  ret->alloc(nbOfTuplesOut,1);
-  MCAuto< MapKeyVal<int> > zeMap(invertArrayN2O2O2NOptimized());
-  const std::map<int,int>& dat(zeMap->data());
-  int *ptToFeed(ret->getPointer());
-  for(const int *pt=valsBg;pt!=valsEnd;pt++)
-    {
-      std::map<int,int>::const_iterator it(dat.find(*pt));
-      if(it!=dat.end())
-        *ptToFeed++=(*it).second;
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt32::findIdForEach : error for element at place " << std::distance(valsBg,pt);
-          oss << " of input array value is " << *pt << " which is not in this !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-  return ret;
-}
-
-/*!
- * Assigns \a newValue to all elements holding \a oldValue within \a this
- * one-dimensional array.
- *  \param [in] oldValue - the value to replace.
- *  \param [in] newValue - the value to assign.
- *  \return int - number of replacements performed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- */
-int DataArrayInt::changeValue(int oldValue, int newValue)
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::changeValue : the array must have only one component, you can call 'rearrange' method before !");
-  if(oldValue==newValue)
-    return 0;
-  int *start(getPointer()),*end2(start+getNbOfElems());
-  int ret(0);
-  for(int *val=start;val!=end2;val++)
-    {
-      if(*val==oldValue)
-        {
-          *val=newValue;
-          ret++;
-        }
-    }
-  if(ret>0)
-    declareAsNew();
-  return ret;
-}
-
-/*!
- * Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to
- * one of given values.
- *  \param [in] valsBg - an array of values to find within \a this array.
- *  \param [in] valsEnd - specifies the end of the array \a valsBg, so that
- *              the last value of \a valsBg is \a valsEnd[ -1 ].
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If \a this->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::findIdsEqualList(const int *valsBg, const int *valsEnd) const
-{
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdsEqualList : the array must have only one component, you can call 'rearrange' method before !");
-  std::set<int> vals2(valsBg,valsEnd);
-  const int *cptr(getConstPointer());
-  std::vector<int> res;
-  int nbOfTuples(getNumberOfTuples());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  for(int i=0;i<nbOfTuples;i++,cptr++)
-    if(vals2.find(*cptr)!=vals2.end())
-      ret->pushBackSilent(i);
-  return ret.retn();
-}
-
-/*!
- * Creates a new DataArrayInt containing IDs (indices) of tuples holding values \b not
- * equal to any of given values.
- *  \param [in] valsBg - an array of values to ignore within \a this array.
- *  \param [in] valsEnd - specifies the end of the array \a valsBg, so that
- *              the last value of \a valsBg is \a valsEnd[ -1 ].
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If \a this->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::findIdsNotEqualList(const int *valsBg, const int *valsEnd) const
-{
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdsNotEqualList : the array must have only one component, you can call 'rearrange' method before !");
-  std::set<int> vals2(valsBg,valsEnd);
-  const int *cptr=getConstPointer();
-  std::vector<int> res;
-  int nbOfTuples=getNumberOfTuples();
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  for(int i=0;i<nbOfTuples;i++,cptr++)
-    if(vals2.find(*cptr)==vals2.end())
-      ret->pushBackSilent(i);
-  return ret.retn();
-}
-
-/*!
- * This method is an extension of DataArrayInt::findIdFirstEqual method because this method works for DataArrayInt with
- * any number of components excepted 0 (an INTERP_KERNEL::Exception is thrown in this case).
- * This method searches in \b this is there is a tuple that matched the input parameter \b tupl.
- * If any the tuple id is returned. If not -1 is returned.
- *
- * This method throws an INTERP_KERNEL::Exception if the number of components in \b this mismatches with the size of
- * the input vector. An INTERP_KERNEL::Exception is thrown too if \b this is not allocated.
- *
- * \return tuple id where \b tupl is. -1 if no such tuple exists in \b this.
- * \sa DataArrayInt::findIdSequence, DataArrayInt::presenceOfTuple.
- */
-int DataArrayInt::findIdFirstEqualTuple(const std::vector<int>& tupl) const
-{
-  checkAllocated();
-  int nbOfCompo=getNumberOfComponents();
-  if(nbOfCompo==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdFirstEqualTuple : 0 components in 'this' !");
-  if(nbOfCompo!=(int)tupl.size())
-    {
-      std::ostringstream oss; oss << "DataArrayInt::findIdFirstEqualTuple : 'this' contains " << nbOfCompo << " components and searching for a tuple of length " << tupl.size() << " !";
-      throw INTERP_KERNEL::Exception(oss.str().c_str());
-    }
-  const int *cptr=getConstPointer();
-  std::size_t nbOfVals=getNbOfElems();
-  for(const int *work=cptr;work!=cptr+nbOfVals;)
-    {
-      work=std::search(work,cptr+nbOfVals,tupl.begin(),tupl.end());
-      if(work!=cptr+nbOfVals)
-        {
-          if(std::distance(cptr,work)%nbOfCompo!=0)
-            work++;
-          else
-            return std::distance(cptr,work)/nbOfCompo;
-        }
-    }
-  return -1;
-}
-
-/*!
- * This method searches the sequence specified in input parameter \b vals in \b this.
- * This works only for DataArrayInt having number of components equal to one (if not an INTERP_KERNEL::Exception will be thrown).
- * This method differs from DataArrayInt::findIdFirstEqualTuple in that the position is internal raw data is not considered here contrary to DataArrayInt::findIdFirstEqualTuple.
- * \sa DataArrayInt::findIdFirstEqualTuple
- */
-int DataArrayInt::findIdSequence(const std::vector<int>& vals) const
-{
-  checkAllocated();
-  int nbOfCompo=getNumberOfComponents();
-  if(nbOfCompo!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdSequence : works only for DataArrayInt instance with one component !");
-  const int *cptr=getConstPointer();
-  std::size_t nbOfVals=getNbOfElems();
-  const int *loc=std::search(cptr,cptr+nbOfVals,vals.begin(),vals.end());
-  if(loc!=cptr+nbOfVals)
-    return std::distance(cptr,loc);
-  return -1;
-}
-
-/*!
- * This method expects to be called when number of components of this is equal to one.
- * This method returns the tuple id, if it exists, of the first tuple equal to \b value.
- * If not any tuple contains \b value -1 is returned.
- * \sa DataArrayInt::presenceOfValue
- */
-int DataArrayInt::findIdFirstEqual(int value) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::presenceOfValue : the array must have only one component, you can call 'rearrange' method before !");
-  const int *cptr=getConstPointer();
-  int nbOfTuples=getNumberOfTuples();
-  const int *ret=std::find(cptr,cptr+nbOfTuples,value);
-  if(ret!=cptr+nbOfTuples)
-    return std::distance(cptr,ret);
-  return -1;
-}
-
-/*!
- * This method expects to be called when number of components of this is equal to one.
- * This method returns the tuple id, if it exists, of the first tuple so that the value is contained in \b vals.
- * If not any tuple contains one of the values contained in 'vals' -1 is returned.
- * \sa DataArrayInt::presenceOfValue
- */
-int DataArrayInt::findIdFirstEqual(const std::vector<int>& vals) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::presenceOfValue : the array must have only one component, you can call 'rearrange' method before !");
-  std::set<int> vals2(vals.begin(),vals.end());
-  const int *cptr=getConstPointer();
-  int nbOfTuples=getNumberOfTuples();
-  for(const int *w=cptr;w!=cptr+nbOfTuples;w++)
-    if(vals2.find(*w)!=vals2.end())
-      return std::distance(cptr,w);
-  return -1;
-}
-
-/*!
- * This method returns the number of values in \a this that are equals to input parameter \a value.
- * This method only works for single component array.
- *
- * \return a value in [ 0, \c this->getNumberOfTuples() )
- *
- * \throw If \a this is not allocated
- *
- */
-int DataArrayInt::count(int value) const
-{
-  int ret=0;
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::count : must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
-  const int *vals=begin();
-  int nbOfTuples=getNumberOfTuples();
-  for(int i=0;i<nbOfTuples;i++,vals++)
-    if(*vals==value)
-      ret++;
-  return ret;
-}
-
-/*!
- * This method is an extension of DataArrayInt::presenceOfValue method because this method works for DataArrayInt with
- * any number of components excepted 0 (an INTERP_KERNEL::Exception is thrown in this case).
- * This method searches in \b this is there is a tuple that matched the input parameter \b tupl.
- * This method throws an INTERP_KERNEL::Exception if the number of components in \b this mismatches with the size of
- * the input vector. An INTERP_KERNEL::Exception is thrown too if \b this is not allocated.
- * \sa DataArrayInt::findIdFirstEqualTuple
- */
-bool DataArrayInt::presenceOfTuple(const std::vector<int>& tupl) const
-{
-  return findIdFirstEqualTuple(tupl)!=-1;
-}
-
-
-/*!
- * Returns \a true if a given value is present within \a this one-dimensional array.
- *  \param [in] value - the value to find within \a this array.
- *  \return bool - \a true in case if \a value is present within \a this array.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \sa findIdFirstEqual()
- */
-bool DataArrayInt::presenceOfValue(int value) const
-{
-  return findIdFirstEqual(value)!=-1;
-}
-
-/*!
- * This method expects to be called when number of components of this is equal to one.
- * This method returns true if it exists a tuple so that the value is contained in \b vals.
- * If not any tuple contains one of the values contained in 'vals' false is returned.
- * \sa DataArrayInt::findIdFirstEqual
- */
-bool DataArrayInt::presenceOfValue(const std::vector<int>& vals) const
-{
-  return findIdFirstEqual(vals)!=-1;
-}
-
-/*!
- * Accumulates values of each component of \a this array.
- *  \param [out] res - an array of length \a this->getNumberOfComponents(), allocated
- *         by the caller, that is filled by this method with sum value for each
- *         component.
- *  \throw If \a this is not allocated.
- */
-void DataArrayInt::accumulate(int *res) const
-{
-  checkAllocated();
-  const int *ptr=getConstPointer();
-  int nbTuple=getNumberOfTuples();
-  int nbComps=getNumberOfComponents();
-  std::fill(res,res+nbComps,0);
-  for(int i=0;i<nbTuple;i++)
-    std::transform(ptr+i*nbComps,ptr+(i+1)*nbComps,res,res,std::plus<int>());
-}
-
-int DataArrayInt::accumulate(int compId) const
-{
-  checkAllocated();
-  const int *ptr=getConstPointer();
-  int nbTuple=getNumberOfTuples();
-  int nbComps=getNumberOfComponents();
-  if(compId<0 || compId>=nbComps)
-    throw INTERP_KERNEL::Exception("DataArrayInt::accumulate : Invalid compId specified : No such nb of components !");
-  int ret=0;
-  for(int i=0;i<nbTuple;i++)
-    ret+=ptr[i*nbComps+compId];
-  return ret;
-}
-
-/*!
- * This method accumulate using addition tuples in \a this using input index array [ \a bgOfIndex, \a endOfIndex ).
- * The returned array will have same number of components than \a this and number of tuples equal to
- * \c std::distance(bgOfIndex,endOfIndex) \b minus \b one.
- *
- * The input index array is expected to be ascendingly sorted in which the all referenced ids should be in [0, \c this->getNumberOfTuples).
- *
- * \param [in] bgOfIndex - begin (included) of the input index array.
- * \param [in] endOfIndex - end (excluded) of the input index array.
- * \return DataArrayInt * - the new instance having the same number of components than \a this.
- *
- * \throw If bgOfIndex or end is NULL.
- * \throw If input index array is not ascendingly sorted.
- * \throw If there is an id in [ \a bgOfIndex, \a endOfIndex ) not in [0, \c this->getNumberOfTuples).
- * \throw If std::distance(bgOfIndex,endOfIndex)==0.
- */
-DataArrayInt *DataArrayInt::accumulatePerChunck(const int *bgOfIndex, const int *endOfIndex) const
-{
-  if(!bgOfIndex || !endOfIndex)
-    throw INTERP_KERNEL::Exception("DataArrayInt::accumulatePerChunck : input pointer NULL !");
-  checkAllocated();
-  int nbCompo=getNumberOfComponents();
-  int nbOfTuples=getNumberOfTuples();
-  int sz=(int)std::distance(bgOfIndex,endOfIndex);
-  if(sz<1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::accumulatePerChunck : invalid size of input index array !");
-  sz--;
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(sz,nbCompo);
-  const int *w=bgOfIndex;
-  if(*w<0 || *w>=nbOfTuples)
-    throw INTERP_KERNEL::Exception("DataArrayInt::accumulatePerChunck : The first element of the input index not in [0,nbOfTuples) !");
-  const int *srcPt=begin()+(*w)*nbCompo;
-  int *tmp=ret->getPointer();
-  for(int i=0;i<sz;i++,tmp+=nbCompo,w++)
-    {
-      std::fill(tmp,tmp+nbCompo,0);
-      if(w[1]>=w[0])
-        {
-          for(int j=w[0];j<w[1];j++,srcPt+=nbCompo)
-            {
-              if(j>=0 && j<nbOfTuples)
-                std::transform(srcPt,srcPt+nbCompo,tmp,tmp,std::plus<int>());
-              else
-                {
-                  std::ostringstream oss; oss << "DataArrayInt::accumulatePerChunck : At rank #" << i << " the input index array points to id " << j << " should be in [0," << nbOfTuples << ") !";
-                  throw INTERP_KERNEL::Exception(oss.str().c_str());
-                }
-            }
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::accumulatePerChunck : At rank #" << i << " the input index array is not in ascendingly sorted.";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  ret->copyStringInfoFrom(*this);
-  return ret.retn();
-}
-
-/*!
- * Returns a new DataArrayInt by concatenating two given arrays, so that (1) the number
- * of tuples in the result array is <em> a1->getNumberOfTuples() + a2->getNumberOfTuples() -
- * offsetA2</em> and (2)
- * the number of component in the result array is same as that of each of given arrays.
- * First \a offsetA2 tuples of \a a2 are skipped and thus are missing from the result array.
- * Info on components is copied from the first of the given arrays. Number of components
- * in the given arrays must be the same.
- *  \param [in] a1 - an array to include in the result array.
- *  \param [in] a2 - another array to include in the result array.
- *  \param [in] offsetA2 - number of tuples of \a a2 to skip.
- *  \return DataArrayInt * - the new instance of DataArrayInt.
- *          The caller is to delete this result array using decrRef() as it is no more
- *          needed.
- *  \throw If either \a a1 or \a a2 is NULL.
- *  \throw If \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents().
- */
-DataArrayInt *DataArrayInt::Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
-{
-  if(!a1 || !a2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : input DataArrayInt instance is NULL !");
-  std::size_t nbOfComp(a1->getNumberOfComponents());
-  if(nbOfComp!=a2->getNumberOfComponents())
-    throw INTERP_KERNEL::Exception("Nb of components mismatch for array Aggregation !");
-  std::size_t nbOfTuple1(a1->getNumberOfTuples()),nbOfTuple2(a2->getNumberOfTuples());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New());
-  ret->alloc(nbOfTuple1+nbOfTuple2-offsetA2,nbOfComp);
-  int *pt=std::copy(a1->begin(),a1->end(),ret->getPointer());
-  std::copy(a2->getConstPointer()+offsetA2*nbOfComp,a2->getConstPointer()+nbOfTuple2*nbOfComp,pt);
-  ret->copyStringInfoFrom(*a1);
-  return ret.retn();
-}
-
-/*!
- * Returns a new DataArrayInt by concatenating all given arrays, so that (1) the number
- * of tuples in the result array is a sum of the number of tuples of given arrays and (2)
- * the number of component in the result array is same as that of each of given arrays.
- * Info on components is copied from the first of the given arrays. Number of components
- * in the given arrays must be  the same.
- * If the number of non null of elements in \a arr is equal to one the returned object is a copy of it
- * not the object itself.
- *  \param [in] arr - a sequence of arrays to include in the result array.
- *  \return DataArrayInt * - the new instance of DataArrayInt.
- *          The caller is to delete this result array using decrRef() as it is no more
- *          needed.
- *  \throw If all arrays within \a arr are NULL.
- *  \throw If getNumberOfComponents() of arrays within \a arr.
- */
-DataArrayInt *DataArrayInt::Aggregate(const std::vector<const DataArrayInt *>& arr)
-{
-  std::vector<const DataArrayInt *> a;
-  for(std::vector<const DataArrayInt *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
-    if(*it4)
-      a.push_back(*it4);
-  if(a.empty())
-    throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : input list must be NON EMPTY !");
-  std::vector<const DataArrayInt *>::const_iterator it=a.begin();
-  std::size_t nbOfComp((*it)->getNumberOfComponents()),nbt((*it++)->getNumberOfTuples());
-  for(int i=1;it!=a.end();it++,i++)
-    {
-      if((*it)->getNumberOfComponents()!=nbOfComp)
-        throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : Nb of components mismatch for array aggregation !");
-      nbt+=(*it)->getNumberOfTuples();
-    }
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(nbt,nbOfComp);
-  int *pt=ret->getPointer();
-  for(it=a.begin();it!=a.end();it++)
-    pt=std::copy((*it)->getConstPointer(),(*it)->getConstPointer()+(*it)->getNbOfElems(),pt);
-  ret->copyStringInfoFrom(*(a[0]));
-  return ret.retn();
-}
-
-/*!
- * This method takes as input a list of DataArrayInt instances \a arrs that represent each a packed index arrays.
- * A packed index array is an allocated array with one component, and at least one tuple. The first element
- * of each array in \a arrs must be 0. Each array in \a arrs is expected to be increasingly monotonic.
- * This method is useful for users that want to aggregate a pair of DataArrayInt representing an indexed data (typically nodal connectivity index in unstructured meshes.
- *
- * \return DataArrayInt * - a new object to be managed by the caller.
- */
-DataArrayInt *DataArrayInt::AggregateIndexes(const std::vector<const DataArrayInt *>& arrs)
-{
-  int retSz=1;
-  for(std::vector<const DataArrayInt *>::const_iterator it4=arrs.begin();it4!=arrs.end();it4++)
-    {
-      if(*it4)
-        {
-          (*it4)->checkAllocated();
-          if((*it4)->getNumberOfComponents()!=1)
-            {
-              std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a DataArrayInt instance with nb of compo != 1 at pos " << std::distance(arrs.begin(),it4) << " !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-          int nbTupl=(*it4)->getNumberOfTuples();
-          if(nbTupl<1)
-            {
-              std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a DataArrayInt instance with nb of tuples < 1 at pos " << std::distance(arrs.begin(),it4) << " !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-          if((*it4)->front()!=0)
-            {
-              std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a DataArrayInt instance with front value != 0 at pos " << std::distance(arrs.begin(),it4) << " !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-          retSz+=nbTupl-1;
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a null instance at pos " << std::distance(arrs.begin(),it4) << " !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  if(arrs.empty())
-    throw INTERP_KERNEL::Exception("DataArrayInt::AggregateIndexes : input list must be NON EMPTY !");
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(retSz,1);
-  int *pt=ret->getPointer(); *pt++=0;
-  for(std::vector<const DataArrayInt *>::const_iterator it=arrs.begin();it!=arrs.end();it++)
-    pt=std::transform((*it)->begin()+1,(*it)->end(),pt,std::bind2nd(std::plus<int>(),pt[-1]));
-  ret->copyStringInfoFrom(*(arrs[0]));
-  return ret.retn();
-}
-
-/*!
- * Returns in a single walk in \a this the min value and the max value in \a this.
- * \a this is expected to be single component array.
- *
- * \param [out] minValue - the min value in \a this.
- * \param [out] maxValue - the max value in \a this.
- *
- * \sa getMinValueInArray, getMinValue, getMaxValueInArray, getMaxValue
- */
-void DataArrayInt::getMinMaxValues(int& minValue, int& maxValue) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::getMinMaxValues : must be applied on DataArrayInt with only one component !");
-  int nbTuples(getNumberOfTuples());
-  const int *pt(begin());
-  minValue=std::numeric_limits<int>::max(); maxValue=-std::numeric_limits<int>::max();
-  for(int i=0;i<nbTuples;i++,pt++)
-    {
-      if(*pt<minValue)
-        minValue=*pt;
-      if(*pt>maxValue)
-        maxValue=*pt;
-    }
-}
-
-/*!
- * Modify all elements of \a this array, so that
- * an element _x_ becomes \f$ numerator / x \f$.
- *  \warning If an exception is thrown because of presence of 0 element in \a this
- *           array, all elements processed before detection of the zero element remain
- *           modified.
- *  \param [in] numerator - the numerator used to modify array elements.
- *  \throw If \a this is not allocated.
- *  \throw If there is an element equal to 0 in \a this array.
- */
-void DataArrayInt::applyInv(int numerator)
-{
-  checkAllocated();
-  int *ptr=getPointer();
-  std::size_t nbOfElems=getNbOfElems();
-  for(std::size_t i=0;i<nbOfElems;i++,ptr++)
-    {
-      if(*ptr!=0)
-        {
-          *ptr=numerator/(*ptr);
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::applyInv : presence of null value in tuple #" << i/getNumberOfComponents() << " component #" << i%getNumberOfComponents();
-          oss << " !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  declareAsNew();
-}
-
-/*!
- * Modify all elements of \a this array, so that
- * an element _x_ becomes \f$ x / val \f$.
- *  \param [in] val - the denominator used to modify array elements.
- *  \throw If \a this is not allocated.
- *  \throw If \a val == 0.
- */
-void DataArrayInt::applyDivideBy(int val)
-{
-  if(val==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::applyDivideBy : Trying to divide by 0 !");
-  checkAllocated();
-  int *ptr=getPointer();
-  std::size_t nbOfElems=getNbOfElems();
-  std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::divides<int>(),val));
-  declareAsNew();
-}
-
-/*!
- * Modify all elements of \a this array, so that
- * an element _x_ becomes  <em> x % val </em>.
- *  \param [in] val - the divisor used to modify array elements.
- *  \throw If \a this is not allocated.
- *  \throw If \a val <= 0.
- */
-void DataArrayInt::applyModulus(int val)
-{
-  if(val<=0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::applyDivideBy : Trying to operate modulus on value <= 0 !");
-  checkAllocated();
-  int *ptr=getPointer();
-  std::size_t nbOfElems=getNbOfElems();
-  std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::modulus<int>(),val));
-  declareAsNew();
-}
-
-/*!
- * This method works only on data array with one component.
- * This method returns a newly allocated array storing stored ascendantly tuple ids in \b this so that
- * this[*id] in [\b vmin,\b vmax)
- *
- * \param [in] vmin begin of range. This value is included in range (included).
- * \param [in] vmax end of range. This value is \b not included in range (excluded).
- * \return a newly allocated data array that the caller should deal with.
- *
- * \sa DataArrayInt::findIdsNotInRange , DataArrayInt::findIdsStricltyNegative
- */
-DataArrayInt *DataArrayInt::findIdsInRange(int vmin, int vmax) const
-{
-  InRange<int> ir(vmin,vmax);
-  MCAuto<DataArrayInt> ret(findIdsAdv(ir));
-  return ret.retn();
-}
-
-/*!
- * This method works only on data array with one component.
- * This method returns a newly allocated array storing stored ascendantly tuple ids in \b this so that
- * this[*id] \b not in [\b vmin,\b vmax)
- *
- * \param [in] vmin begin of range. This value is \b not included in range (excluded).
- * \param [in] vmax end of range. This value is included in range (included).
- * \return a newly allocated data array that the caller should deal with.
- *
- * \sa DataArrayInt::findIdsInRange , DataArrayInt::findIdsStricltyNegative
- */
-DataArrayInt *DataArrayInt::findIdsNotInRange(int vmin, int vmax) const
-{
-  NotInRange<int> nir(vmin,vmax);
-  MCAuto<DataArrayInt> ret(findIdsAdv(nir));
-  return ret.retn();
-}
-
-/*!
- * This method works only on data array with one component.
- * This method checks that all ids in \b this are in [ \b vmin, \b vmax ). If there is at least one element in \a this not in [ \b vmin, \b vmax ) an exception will be thrown.
- *
- * \param [in] vmin begin of range. This value is included in range (included).
- * \param [in] vmax end of range. This value is \b not included in range (excluded).
- * \return if all ids in \a this are so that (*this)[i]==i for all i in [ 0, \c this->getNumberOfTuples() ). */
-bool DataArrayInt::checkAllIdsInRange(int vmin, int vmax) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::checkAllIdsInRange : this must have exactly one component !");
-  int nbOfTuples=getNumberOfTuples();
-  bool ret=true;
-  const int *cptr=getConstPointer();
-  for(int i=0;i<nbOfTuples;i++,cptr++)
-    {
-      if(*cptr>=vmin && *cptr<vmax)
-        { ret=ret && *cptr==i; }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::checkAllIdsInRange : tuple #" << i << " has value " << *cptr << " should be in [" << vmin << "," << vmax << ") !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  return ret;
-}
-
-/*!
- * Modify all elements of \a this array, so that
- * an element _x_ becomes <em> val % x </em>.
- *  \warning If an exception is thrown because of presence of an element <= 0 in \a this
- *           array, all elements processed before detection of the zero element remain
- *           modified.
- *  \param [in] val - the divident used to modify array elements.
- *  \throw If \a this is not allocated.
- *  \throw If there is an element equal to or less than 0 in \a this array.
- */
-void DataArrayInt::applyRModulus(int val)
-{
-  checkAllocated();
-  int *ptr=getPointer();
-  std::size_t nbOfElems=getNbOfElems();
-  for(std::size_t i=0;i<nbOfElems;i++,ptr++)
-    {
-      if(*ptr>0)
-        {
-          *ptr=val%(*ptr);
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::applyRModulus : presence of value <=0 in tuple #" << i/getNumberOfComponents() << " component #" << i%getNumberOfComponents();
-          oss << " !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  declareAsNew();
-}
-
-/*!
- * Modify all elements of \a this array, so that
- * an element _x_ becomes <em> val ^ x </em>.
- *  \param [in] val - the value used to apply pow on all array elements.
- *  \throw If \a this is not allocated.
- *  \throw If \a val < 0.
- */
-void DataArrayInt::applyPow(int val)
-{
-  checkAllocated();
-  if(val<0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::applyPow : input pow in < 0 !");
-  int *ptr=getPointer();
-  std::size_t nbOfElems=getNbOfElems();
-  if(val==0)
-    {
-      std::fill(ptr,ptr+nbOfElems,1);
-      return ;
-    }
-  for(std::size_t i=0;i<nbOfElems;i++,ptr++)
-    {
-      int tmp=1;
-      for(int j=0;j<val;j++)
-        tmp*=*ptr;
-      *ptr=tmp;
-    }
-  declareAsNew();
-}
-
-/*!
- * Modify all elements of \a this array, so that
- * an element _x_ becomes \f$ val ^ x \f$.
- *  \param [in] val - the value used to apply pow on all array elements.
- *  \throw If \a this is not allocated.
- *  \throw If there is an element < 0 in \a this array.
- *  \warning If an exception is thrown because of presence of 0 element in \a this
- *           array, all elements processed before detection of the zero element remain
- *           modified.
- */
-void DataArrayInt::applyRPow(int val)
-{
-  checkAllocated();
-  int *ptr=getPointer();
-  std::size_t nbOfElems=getNbOfElems();
-  for(std::size_t i=0;i<nbOfElems;i++,ptr++)
-    {
-      if(*ptr>=0)
-        {
-          int tmp=1;
-          for(int j=0;j<*ptr;j++)
-            tmp*=val;
-          *ptr=tmp;
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::applyRPow : presence of negative value in tuple #" << i/getNumberOfComponents() << " component #" << i%getNumberOfComponents();
-          oss << " !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  declareAsNew();
-}
-
-/*!
- * Returns a new DataArrayInt which is a minimal partition of elements of \a groups.
- * The i-th item of the result array is an ID of a set of elements belonging to a
- * unique set of groups, which the i-th element is a part of. This set of elements
- * belonging to a unique set of groups is called \a family, so the result array contains
- * IDs of families each element belongs to.
- *
- * \b Example: if we have two groups of elements: \a group1 [0,4] and \a group2 [ 0,1,2 ],
- * then there are 3 families:
- * - \a family1 (with ID 1) contains element [0] belonging to ( \a group1 + \a group2 ),
- * - \a family2 (with ID 2) contains elements [4] belonging to ( \a group1 ),
- * - \a family3 (with ID 3) contains element [1,2] belonging to ( \a group2 ), <br>
- * and the result array contains IDs of families [ 1,3,3,0,2 ]. <br> Note a family ID 0 which
- * stands for the element #3 which is in none of groups.
- *
- *  \param [in] groups - sequence of groups of element IDs.
- *  \param [in] newNb - total number of elements; it must be more than max ID of element
- *         in \a groups.
- *  \param [out] fidsOfGroups - IDs of families the elements of each group belong to.
- *  \return DataArrayInt * - a new instance of DataArrayInt containing IDs of families
- *         each element with ID from range [0, \a newNb ) belongs to. The caller is to
- *         delete this array using decrRef() as it is no more needed.
- *  \throw If any element ID in \a groups violates condition ( 0 <= ID < \a newNb ).
- */
-DataArrayInt *DataArrayInt::MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups)
-{
-  std::vector<const DataArrayInt *> groups2;
-  for(std::vector<const DataArrayInt *>::const_iterator it4=groups.begin();it4!=groups.end();it4++)
-    if(*it4)
-      groups2.push_back(*it4);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(newNb,1);
-  int *retPtr=ret->getPointer();
-  std::fill(retPtr,retPtr+newNb,0);
-  int fid=1;
-  for(std::vector<const DataArrayInt *>::const_iterator iter=groups2.begin();iter!=groups2.end();iter++)
-    {
-      const int *ptr=(*iter)->getConstPointer();
-      std::size_t nbOfElem=(*iter)->getNbOfElems();
-      int sfid=fid;
-      for(int j=0;j<sfid;j++)
-        {
-          bool found=false;
-          for(std::size_t i=0;i<nbOfElem;i++)
-            {
-              if(ptr[i]>=0 && ptr[i]<newNb)
-                {
-                  if(retPtr[ptr[i]]==j)
-                    {
-                      retPtr[ptr[i]]=fid;
-                      found=true;
-                    }
-                }
-              else
-                {
-                  std::ostringstream oss; oss << "DataArrayInt::MakePartition : In group \"" << (*iter)->getName() << "\" in tuple #" << i << " value = " << ptr[i] << " ! Should be in [0," << newNb;
-                  oss << ") !";
-                  throw INTERP_KERNEL::Exception(oss.str().c_str());
-                }
-            }
-          if(found)
-            fid++;
-        }
-    }
-  fidsOfGroups.clear();
-  fidsOfGroups.resize(groups2.size());
-  int grId=0;
-  for(std::vector<const DataArrayInt *>::const_iterator iter=groups2.begin();iter!=groups2.end();iter++,grId++)
-    {
-      std::set<int> tmp;
-      const int *ptr=(*iter)->getConstPointer();
-      std::size_t nbOfElem=(*iter)->getNbOfElems();
-      for(const int *p=ptr;p!=ptr+nbOfElem;p++)
-        tmp.insert(retPtr[*p]);
-      fidsOfGroups[grId].insert(fidsOfGroups[grId].end(),tmp.begin(),tmp.end());
-    }
-  return ret.retn();
-}
-
-/*!
- * Returns a new DataArrayInt which contains all elements of given one-dimensional
- * arrays. The result array does not contain any duplicates and its values
- * are sorted in ascending order.
- *  \param [in] arr - sequence of DataArrayInt's to unite.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *         array using decrRef() as it is no more needed.
- *  \throw If any \a arr[i] is not allocated.
- *  \throw If \a arr[i]->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::BuildUnion(const std::vector<const DataArrayInt *>& arr)
-{
-  std::vector<const DataArrayInt *> a;
-  for(std::vector<const DataArrayInt *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
-    if(*it4)
-      a.push_back(*it4);
-  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
-    {
-      (*it)->checkAllocated();
-      if((*it)->getNumberOfComponents()!=1)
-        throw INTERP_KERNEL::Exception("DataArrayInt::BuildUnion : only single component allowed !");
-    }
-  //
-  std::set<int> r;
-  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
-    {
-      const int *pt=(*it)->getConstPointer();
-      int nbOfTuples=(*it)->getNumberOfTuples();
-      r.insert(pt,pt+nbOfTuples);
-    }
-  DataArrayInt *ret=DataArrayInt::New();
-  ret->alloc((int)r.size(),1);
-  std::copy(r.begin(),r.end(),ret->getPointer());
-  return ret;
-}
-
-/*!
- * Returns a new DataArrayInt which contains elements present in each of given one-dimensional
- * arrays. The result array does not contain any duplicates and its values
- * are sorted in ascending order.
- *  \param [in] arr - sequence of DataArrayInt's to intersect.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *         array using decrRef() as it is no more needed.
- *  \throw If any \a arr[i] is not allocated.
- *  \throw If \a arr[i]->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::BuildIntersection(const std::vector<const DataArrayInt *>& arr)
-{
-  std::vector<const DataArrayInt *> a;
-  for(std::vector<const DataArrayInt *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
-    if(*it4)
-      a.push_back(*it4);
-  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
-    {
-      (*it)->checkAllocated();
-      if((*it)->getNumberOfComponents()!=1)
-        throw INTERP_KERNEL::Exception("DataArrayInt::BuildIntersection : only single component allowed !");
-    }
-  //
-  std::set<int> r;
-  for(std::vector<const DataArrayInt *>::const_iterator it=a.begin();it!=a.end();it++)
-    {
-      const int *pt=(*it)->getConstPointer();
-      int nbOfTuples=(*it)->getNumberOfTuples();
-      std::set<int> s1(pt,pt+nbOfTuples);
-      if(it!=a.begin())
-        {
-          std::set<int> r2;
-          std::set_intersection(r.begin(),r.end(),s1.begin(),s1.end(),inserter(r2,r2.end()));
-          r=r2;
-        }
-      else
-        r=s1;
-    }
-  DataArrayInt *ret(DataArrayInt::New());
-  ret->alloc((int)r.size(),1);
-  std::copy(r.begin(),r.end(),ret->getPointer());
-  return ret;
-}
-
-/// @cond INTERNAL
-namespace MEDCouplingImpl
-{
-  class OpSwitchedOn
-  {
-  public:
-    OpSwitchedOn(int *pt):_pt(pt),_cnt(0) { }
-    void operator()(const bool& b) { if(b) *_pt++=_cnt; _cnt++; }
-  private:
-    int *_pt;
-    int _cnt;
-  };
-
-  class OpSwitchedOff
-  {
-  public:
-    OpSwitchedOff(int *pt):_pt(pt),_cnt(0) { }
-    void operator()(const bool& b) { if(!b) *_pt++=_cnt; _cnt++; }
-  private:
-    int *_pt;
-    int _cnt;
-  };
-}
-/// @endcond
-
-/*!
- * This method returns the list of ids in ascending mode so that v[id]==true.
- */
-DataArrayInt *DataArrayInt::BuildListOfSwitchedOn(const std::vector<bool>& v)
-{
-  int sz((int)std::count(v.begin(),v.end(),true));
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(sz,1);
-  std::for_each(v.begin(),v.end(),MEDCouplingImpl::OpSwitchedOn(ret->getPointer()));
-  return ret.retn();
-}
-
-/*!
- * This method returns the list of ids in ascending mode so that v[id]==false.
- */
-DataArrayInt *DataArrayInt::BuildListOfSwitchedOff(const std::vector<bool>& v)
-{
-  int sz((int)std::count(v.begin(),v.end(),false));
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(sz,1);
-  std::for_each(v.begin(),v.end(),MEDCouplingImpl::OpSwitchedOff(ret->getPointer()));
-  return ret.retn();
-}
-
-/*!
- * This method allows to put a vector of vector of integer into a more compact data structure (skyline).
- * This method is not available into python because no available optimized data structure available to map std::vector< std::vector<int> >.
- *
- * \param [in] v the input data structure to be translate into skyline format.
- * \param [out] data the first element of the skyline format. The user is expected to deal with newly allocated array.
- * \param [out] dataIndex the second element of the skyline format.
- */
-void DataArrayInt::PutIntoToSkylineFrmt(const std::vector< std::vector<int> >& v, DataArrayInt *& data, DataArrayInt *& dataIndex)
-{
-  int sz((int)v.size());
-  MCAuto<DataArrayInt> ret0(DataArrayInt::New()),ret1(DataArrayInt::New());
-  ret1->alloc(sz+1,1);
-  int *pt(ret1->getPointer()); *pt=0;
-  for(int i=0;i<sz;i++,pt++)
-    pt[1]=pt[0]+(int)v[i].size();
-  ret0->alloc(ret1->back(),1);
-  pt=ret0->getPointer();
-  for(int i=0;i<sz;i++)
-    pt=std::copy(v[i].begin(),v[i].end(),pt);
-  data=ret0.retn(); dataIndex=ret1.retn();
-}
-
-/*!
- * Returns a new DataArrayInt which contains a complement of elements of \a this
- * one-dimensional array. I.e. the result array contains all elements from the range [0,
- * \a nbOfElement) not present in \a this array.
- *  \param [in] nbOfElement - maximal size of the result array.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *         array using decrRef() as it is no more needed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If any element \a x of \a this array violates condition ( 0 <= \a x < \a
- *         nbOfElement ).
- */
-DataArrayInt *DataArrayInt::buildComplement(int nbOfElement) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildComplement : only single component allowed !");
-  std::vector<bool> tmp(nbOfElement);
-  const int *pt=getConstPointer();
-  int nbOfTuples=getNumberOfTuples();
-  for(const int *w=pt;w!=pt+nbOfTuples;w++)
-    if(*w>=0 && *w<nbOfElement)
-      tmp[*w]=true;
-    else
-      throw INTERP_KERNEL::Exception("DataArrayInt::buildComplement : an element is not in valid range : [0,nbOfElement) !");
-  int nbOfRetVal=(int)std::count(tmp.begin(),tmp.end(),false);
-  DataArrayInt *ret=DataArrayInt::New();
-  ret->alloc(nbOfRetVal,1);
-  int j=0;
-  int *retPtr=ret->getPointer();
-  for(int i=0;i<nbOfElement;i++)
-    if(!tmp[i])
-      retPtr[j++]=i;
-  return ret;
-}
-
-/*!
- * Returns a new DataArrayInt containing elements of \a this one-dimensional missing
- * from an \a other one-dimensional array.
- *  \param [in] other - a DataArrayInt containing elements not to include in the result array.
- *  \return DataArrayInt * - a new instance of DataArrayInt with one component. The
- *         caller is to delete this array using decrRef() as it is no more needed.
- *  \throw If \a other is NULL.
- *  \throw If \a other is not allocated.
- *  \throw If \a other->getNumberOfComponents() != 1.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \sa DataArrayInt::buildSubstractionOptimized()
- */
-DataArrayInt *DataArrayInt::buildSubstraction(const DataArrayInt *other) const
-{
-  if(!other)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : DataArrayInt pointer in input is NULL !");
-  checkAllocated();
-  other->checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed !");
-  if(other->getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed for other type !");
-  const int *pt=getConstPointer();
-  int nbOfTuples=getNumberOfTuples();
-  std::set<int> s1(pt,pt+nbOfTuples);
-  pt=other->getConstPointer();
-  nbOfTuples=other->getNumberOfTuples();
-  std::set<int> s2(pt,pt+nbOfTuples);
-  std::vector<int> r;
-  std::set_difference(s1.begin(),s1.end(),s2.begin(),s2.end(),std::back_insert_iterator< std::vector<int> >(r));
-  DataArrayInt *ret=DataArrayInt::New();
-  ret->alloc((int)r.size(),1);
-  std::copy(r.begin(),r.end(),ret->getPointer());
-  return ret;
-}
-
-/*!
- * \a this is expected to have one component and to be sorted ascendingly (as for \a other).
- * \a other is expected to be a part of \a this. If not DataArrayInt::buildSubstraction should be called instead.
- *
- * \param [in] other an array with one component and expected to be sorted ascendingly.
- * \ret list of ids in \a this but not in \a other.
- * \sa DataArrayInt::buildSubstraction
- */
-DataArrayInt *DataArrayInt::buildSubstractionOptimized(const DataArrayInt *other) const
-{
-  static const char *MSG="DataArrayInt::buildSubstractionOptimized : only single component allowed !";
-  if(!other) throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstractionOptimized : NULL input array !");
-  checkAllocated(); other->checkAllocated();
-  if(getNumberOfComponents()!=1) throw INTERP_KERNEL::Exception(MSG);
-  if(other->getNumberOfComponents()!=1) throw INTERP_KERNEL::Exception(MSG);
-  const int *pt1Bg(begin()),*pt1End(end()),*pt2Bg(other->begin()),*pt2End(other->end());
-  const int *work1(pt1Bg),*work2(pt2Bg);
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  for(;work1!=pt1End;work1++)
-    {
-      if(work2!=pt2End && *work1==*work2)
-        work2++;
-      else
-        ret->pushBackSilent(*work1);
-    }
-  return ret.retn();
-}
-
-
-/*!
- * Returns a new DataArrayInt which contains all elements of \a this and a given
- * one-dimensional arrays. The result array does not contain any duplicates
- * and its values are sorted in ascending order.
- *  \param [in] other - an array to unite with \a this one.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *         array using decrRef() as it is no more needed.
- *  \throw If \a this or \a other is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If \a other->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::buildUnion(const DataArrayInt *other) const
-{
-  std::vector<const DataArrayInt *>arrs(2);
-  arrs[0]=this; arrs[1]=other;
-  return BuildUnion(arrs);
-}
-
-
-/*!
- * Returns a new DataArrayInt which contains elements present in both \a this and a given
- * one-dimensional arrays. The result array does not contain any duplicates
- * and its values are sorted in ascending order.
- *  \param [in] other - an array to intersect with \a this one.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *         array using decrRef() as it is no more needed.
- *  \throw If \a this or \a other is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If \a other->getNumberOfComponents() != 1.
- */
-DataArrayInt *DataArrayInt::buildIntersection(const DataArrayInt *other) const
-{
-  std::vector<const DataArrayInt *>arrs(2);
-  arrs[0]=this; arrs[1]=other;
-  return BuildIntersection(arrs);
-}
-
-/*!
- * This method can be applied on allocated with one component DataArrayInt instance.
- * This method is typically relevant for sorted arrays. All consecutive duplicated items in \a this will appear only once in returned DataArrayInt instance.
- * Example : if \a this contains [1,2,2,3,3,3,3,4,5,5,7,7,7,19] the returned array will contain [1,2,3,4,5,7,19]
- *
- * \return a newly allocated array that contain the result of the unique operation applied on \a this.
- * \throw if \a this is not allocated or if \a this has not exactly one component.
- * \sa DataArrayInt::buildUniqueNotSorted
- */
-DataArrayInt *DataArrayInt::buildUnique() const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildUnique : only single component allowed !");
-  int nbOfTuples=getNumberOfTuples();
-  MCAuto<DataArrayInt> tmp=deepCopy();
-  int *data=tmp->getPointer();
-  int *last=std::unique(data,data+nbOfTuples);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(std::distance(data,last),1);
-  std::copy(data,last,ret->getPointer());
-  return ret.retn();
-}
-
-/*!
- * This method can be applied on allocated with one component DataArrayInt instance.
- * This method keep elements only once by keeping the same order in \a this that is not expected to be sorted.
- *
- * \return a newly allocated array that contain the result of the unique operation applied on \a this.
- *
- * \throw if \a this is not allocated or if \a this has not exactly one component.
- *
- * \sa DataArrayInt::buildUnique
- */
-DataArrayInt *DataArrayInt::buildUniqueNotSorted() const
-{
-  checkAllocated();
-    if(getNumberOfComponents()!=1)
-      throw INTERP_KERNEL::Exception("DataArrayInt::buildUniqueNotSorted : only single component allowed !");
-  int minVal,maxVal;
-  getMinMaxValues(minVal,maxVal);
-  std::vector<bool> b(maxVal-minVal+1,false);
-  const int *ptBg(begin()),*endBg(end());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  for(const int *pt=ptBg;pt!=endBg;pt++)
-    {
-      if(!b[*pt-minVal])
-        {
-          ret->pushBackSilent(*pt);
-          b[*pt-minVal]=true;
-        }
-    }
-  ret->copyStringInfoFrom(*this);
-  return ret.retn();
-}
-
-/*!
- * Returns a new DataArrayInt which contains size of every of groups described by \a this
- * "index" array. Such "index" array is returned for example by
- * \ref MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity
- * "MEDCouplingUMesh::buildDescendingConnectivity" and
- * \ref MEDCoupling::MEDCouplingUMesh::getNodalConnectivityIndex
- * "MEDCouplingUMesh::getNodalConnectivityIndex" etc.
- * This method performs the reverse operation of DataArrayInt::computeOffsetsFull.
- *  \return DataArrayInt * - a new instance of DataArrayInt, whose number of tuples
- *          equals to \a this->getNumberOfComponents() - 1, and number of components is 1.
- *          The caller is to delete this array using decrRef() as it is no more needed.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If \a this->getNumberOfTuples() < 2.
- *
- *  \b Example: <br>
- *         - this contains [1,3,6,7,7,9,15]
- *         - result array contains [2,3,1,0,2,6],
- *          where 2 = 3 - 1, 3 = 6 - 3, 1 = 7 - 6 etc.
- *
- * \sa DataArrayInt::computeOffsetsFull
- */
-DataArrayInt *DataArrayInt::deltaShiftIndex() const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : only single component allowed !");
-  int nbOfTuples=getNumberOfTuples();
-  if(nbOfTuples<2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : 1 tuple at least must be present in 'this' !");
-  const int *ptr=getConstPointer();
-  DataArrayInt *ret=DataArrayInt::New();
-  ret->alloc(nbOfTuples-1,1);
-  int *out=ret->getPointer();
-  std::transform(ptr+1,ptr+nbOfTuples,ptr,out,std::minus<int>());
-  return ret;
-}
-
-/*!
- * Modifies \a this one-dimensional array so that value of each element \a x
- * of \a this array (\a a) is computed as \f$ x_i = \sum_{j=0}^{i-1} a[ j ] \f$.
- * Or: for each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. Number of tuples
- * and components remains the same.<br>
- * This method is useful for allToAllV in MPI with contiguous policy. This method
- * differs from computeOffsetsFull() in that the number of tuples is \b not changed by
- * this one.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *
- *  \b Example: <br>
- *          - Before \a this contains [3,5,1,2,0,8]
- *          - After \a this contains  [0,3,8,9,11,11]<br>
- *          Note that the last element 19 = 11 + 8 is missing because size of \a this
- *          array is retained and thus there is no space to store the last element.
- */
-void DataArrayInt::computeOffsets()
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsets : only single component allowed !");
-  int nbOfTuples=getNumberOfTuples();
-  if(nbOfTuples==0)
-    return ;
-  int *work=getPointer();
-  int tmp=work[0];
-  work[0]=0;
-  for(int i=1;i<nbOfTuples;i++)
-    {
-      int tmp2=work[i];
-      work[i]=work[i-1]+tmp;
-      tmp=tmp2;
-    }
-  declareAsNew();
-}
-
-
-/*!
- * Modifies \a this one-dimensional array so that value of each element \a x
- * of \a this array (\a a) is computed as \f$ x_i = \sum_{j=0}^{i-1} a[ j ] \f$.
- * Or: for each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. Number
- * components remains the same and number of tuples is inceamented by one.<br>
- * This method is useful for allToAllV in MPI with contiguous policy. This method
- * differs from computeOffsets() in that the number of tuples is changed by this one.
- * This method performs the reverse operation of DataArrayInt::deltaShiftIndex.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *
- *  \b Example: <br>
- *          - Before \a this contains [3,5,1,2,0,8]
- *          - After \a this contains  [0,3,8,9,11,11,19]<br>
- * \sa DataArrayInt::deltaShiftIndex
- */
-void DataArrayInt::computeOffsetsFull()
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsetsFull : only single component allowed !");
-  int nbOfTuples=getNumberOfTuples();
-  int *ret=(int *)malloc((nbOfTuples+1)*sizeof(int));
-  const int *work=getConstPointer();
-  ret[0]=0;
-  for(int i=0;i<nbOfTuples;i++)
-    ret[i+1]=work[i]+ret[i];
-  useArray(ret,true,DeallocType::C_DEALLOC,nbOfTuples+1,1);
-  declareAsNew();
-}
-
-/*!
- * Returns two new DataArrayInt instances whose contents is computed from that of \a this and \a listOfIds arrays as follows.
- * \a this is expected to be an offset format ( as returned by DataArrayInt::computeOffsetsFull ) that is to say with one component
- * and ** sorted strictly increasingly **. \a listOfIds is expected to be sorted ascendingly (not strictly needed for \a listOfIds).
- * This methods searches in \a this, considered as a set of contiguous \c this->getNumberOfComponents() ranges, all ids in \a listOfIds
- * filling completely one of the ranges in \a this.
- *
- * \param [in] listOfIds a list of ids that has to be sorted ascendingly.
- * \param [out] rangeIdsFetched the range ids fetched
- * \param [out] idsInInputListThatFetch contains the list of ids in \a listOfIds that are \b fully included in a range in \a this. So
- *              \a idsInInputListThatFetch is a part of input \a listOfIds.
- *
- * \sa DataArrayInt::computeOffsetsFull
- *
- *  \b Example: <br>
- *          - \a this : [0,3,7,9,15,18]
- *          - \a listOfIds contains  [0,1,2,3,7,8,15,16,17]
- *          - \a rangeIdsFetched result array: [0,2,4]
- *          - \a idsInInputListThatFetch result array: [0,1,2,7,8,15,16,17]
- * In this example id 3 in input \a listOfIds is alone so it do not appear in output \a idsInInputListThatFetch.
- * <br>
- */
-void DataArrayInt::findIdsRangesInListOfIds(const DataArrayInt *listOfIds, DataArrayInt *& rangeIdsFetched, DataArrayInt *& idsInInputListThatFetch) const
-{
-  if(!listOfIds)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdsRangesInListOfIds : input list of ids is null !");
-  listOfIds->checkAllocated(); checkAllocated();
-  if(listOfIds->getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdsRangesInListOfIds : input list of ids must have exactly one component !");
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdsRangesInListOfIds : this must have exactly one component !");
-  MCAuto<DataArrayInt> ret0=DataArrayInt::New(); ret0->alloc(0,1);
-  MCAuto<DataArrayInt> ret1=DataArrayInt::New(); ret1->alloc(0,1);
-  const int *tupEnd(listOfIds->end()),*offBg(begin()),*offEnd(end()-1);
-  const int *tupPtr(listOfIds->begin()),*offPtr(offBg);
-  while(tupPtr!=tupEnd && offPtr!=offEnd)
-    {
-      if(*tupPtr==*offPtr)
-        {
-          int i=offPtr[0];
-          while(i<offPtr[1] && *tupPtr==i && tupPtr!=tupEnd) { i++; tupPtr++; }
-          if(i==offPtr[1])
-            {
-              ret0->pushBackSilent((int)std::distance(offBg,offPtr));
-              ret1->pushBackValsSilent(tupPtr-(offPtr[1]-offPtr[0]),tupPtr);
-              offPtr++;
-            }
-        }
-      else
-        { if(*tupPtr<*offPtr) tupPtr++; else offPtr++; }
-    }
-  rangeIdsFetched=ret0.retn();
-  idsInInputListThatFetch=ret1.retn();
-}
-
-/*!
- * Returns a new DataArrayInt whose contents is computed from that of \a this and \a
- * offsets arrays as follows. \a offsets is a one-dimensional array considered as an
- * "index" array of a "iota" array, thus, whose each element gives an index of a group
- * beginning within the "iota" array. And \a this is a one-dimensional array
- * considered as a selector of groups described by \a offsets to include into the result array.
- *  \throw If \a offsets is NULL.
- *  \throw If \a offsets is not allocated.
- *  \throw If \a offsets->getNumberOfComponents() != 1.
- *  \throw If \a offsets is not monotonically increasing.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If any element of \a this is not a valid index for \a offsets array.
- *
- *  \b Example: <br>
- *          - \a this: [0,2,3]
- *          - \a offsets: [0,3,6,10,14,20]
- *          - result array: [0,1,2,6,7,8,9,10,11,12,13] == <br>
- *            \c range(0,3) + \c range(6,10) + \c range(10,14) ==<br>
- *            \c range( \a offsets[ \a this[0] ], offsets[ \a this[0]+1 ]) +
- *            \c range( \a offsets[ \a this[1] ], offsets[ \a this[1]+1 ]) +
- *            \c range( \a offsets[ \a this[2] ], offsets[ \a this[2]+1 ])
- */
-DataArrayInt *DataArrayInt::buildExplicitArrByRanges(const DataArrayInt *offsets) const
-{
-  if(!offsets)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : DataArrayInt pointer in input is NULL !");
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : only single component allowed !");
-  offsets->checkAllocated();
-  if(offsets->getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : input array should have only single component !");
-  int othNbTuples=offsets->getNumberOfTuples()-1;
-  int nbOfTuples=getNumberOfTuples();
-  int retNbOftuples=0;
-  const int *work=getConstPointer();
-  const int *offPtr=offsets->getConstPointer();
-  for(int i=0;i<nbOfTuples;i++)
-    {
-      int val=work[i];
-      if(val>=0 && val<othNbTuples)
-        {
-          int delta=offPtr[val+1]-offPtr[val];
-          if(delta>=0)
-            retNbOftuples+=delta;
-          else
-            {
-              std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrByRanges : Tuple #" << val << " of offset array has a delta < 0 !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrByRanges : Tuple #" << i << " in this contains " << val;
-          oss << " whereas offsets array is of size " << othNbTuples+1 << " !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(retNbOftuples,1);
-  int *retPtr=ret->getPointer();
-  for(int i=0;i<nbOfTuples;i++)
-    {
-      int val=work[i];
-      int start=offPtr[val];
-      int off=offPtr[val+1]-start;
-      for(int j=0;j<off;j++,retPtr++)
-        *retPtr=start+j;
-    }
-  return ret.retn();
-}
-
-/*!
- * Returns a new DataArrayInt whose contents is computed using \a this that must be a
- * scaled array (monotonically increasing).
-from that of \a this and \a
- * offsets arrays as follows. \a offsets is a one-dimensional array considered as an
- * "index" array of a "iota" array, thus, whose each element gives an index of a group
- * beginning within the "iota" array. And \a this is a one-dimensional array
- * considered as a selector of groups described by \a offsets to include into the result array.
- *  \throw If \a  is NULL.
- *  \throw If \a this is not allocated.
- *  \throw If \a this->getNumberOfComponents() != 1.
- *  \throw If \a this->getNumberOfTuples() == 0.
- *  \throw If \a this is not monotonically increasing.
- *  \throw If any element of ids in ( \a bg \a stop \a step ) points outside the scale in \a this.
- *
- *  \b Example: <br>
- *          - \a bg , \a stop and \a step : (0,5,2)
- *          - \a this: [0,3,6,10,14,20]
- *          - result array: [0,0,0, 2,2,2,2, 4,4,4,4,4,4] == <br>
- */
-DataArrayInt *DataArrayInt::buildExplicitArrOfSliceOnScaledArr(int bg, int stop, int step) const
-{
-  if(!isAllocated())
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr : not allocated array !");
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr : number of components is expected to be equal to one !");
-  int nbOfTuples(getNumberOfTuples());
-  if(nbOfTuples==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr : number of tuples must be != 0 !");
-  const int *ids(begin());
-  int nbOfEltsInSlc(GetNumberOfItemGivenBESRelative(bg,stop,step,"DataArrayInt::buildExplicitArrOfSliceOnScaledArr")),sz(0),pos(bg);
-  for(int i=0;i<nbOfEltsInSlc;i++,pos+=step)
-    {
-      if(pos>=0 && pos<nbOfTuples-1)
-        {
-          int delta(ids[pos+1]-ids[pos]);
-          sz+=delta;
-          if(delta<0)
-            {
-              std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrOfSliceOnScaledArr : At pos #" << i << " of input slice, value is " << pos << " and at this pos this is not monotonically increasing !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrOfSliceOnScaledArr : At pos #" << i << " of input slice, value is " << pos << " should be in [0," << nbOfTuples-1 << ") !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(sz,1);
-  int *retPtr(ret->getPointer());
-  pos=bg;
-  for(int i=0;i<nbOfEltsInSlc;i++,pos+=step)
-    {
-      int delta(ids[pos+1]-ids[pos]);
-      for(int j=0;j<delta;j++,retPtr++)
-        *retPtr=pos;
-    }
-  return ret.retn();
-}
-
-/*!
- * Given in input ranges \a ranges, it returns a newly allocated DataArrayInt instance having one component and the same number of tuples than \a this.
- * For each tuple at place **i** in \a this it tells which is the first range in \a ranges that contains value \c this->getIJ(i,0) and put the result
- * in tuple **i** of returned DataArrayInt.
- * If ranges overlapped (in theory it should not) this method do not detect it and always returns the first range.
- *
- * For example if \a this contains : [1,24,7,8,10,17] and \a ranges contains [(0,3),(3,8),(8,15),(15,22),(22,30)]
- * The return DataArrayInt will contain : **[0,4,1,2,2,3]**
- *
- * \param [in] ranges typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is
- *             for lower value included and 2nd component is the upper value of corresponding range **excluded**.
- * \throw If offsets is a null pointer or does not have 2 components or if \a this is not allocated or \a this do not have exactly one component. To finish an exception
- *        is thrown if no ranges in \a ranges contains value in \a this.
- *
- * \sa DataArrayInt::findIdInRangeForEachTuple
- */
-DataArrayInt *DataArrayInt::findRangeIdForEachTuple(const DataArrayInt *ranges) const
-{
-  if(!ranges)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findRangeIdForEachTuple : null input pointer !");
-  if(ranges->getNumberOfComponents()!=2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findRangeIdForEachTuple : input DataArrayInt instance should have 2 components !");
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findRangeIdForEachTuple : this should have only one component !");
-  int nbTuples=getNumberOfTuples();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(nbTuples,1);
-  int nbOfRanges=ranges->getNumberOfTuples();
-  const int *rangesPtr=ranges->getConstPointer();
-  int *retPtr=ret->getPointer();
-  const int *inPtr=getConstPointer();
-  for(int i=0;i<nbTuples;i++,retPtr++)
-    {
-      int val=inPtr[i];
-      bool found=false;
-      for(int j=0;j<nbOfRanges && !found;j++)
-        if(val>=rangesPtr[2*j] && val<rangesPtr[2*j+1])
-          { *retPtr=j; found=true; }
-      if(found)
-        continue;
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::findRangeIdForEachTuple : tuple #" << i << " not found by any ranges !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  return ret.retn();
-}
-
-/*!
- * Given in input ranges \a ranges, it returns a newly allocated DataArrayInt instance having one component and the same number of tuples than \a this.
- * For each tuple at place **i** in \a this it tells which is the sub position of the first range in \a ranges that contains value \c this->getIJ(i,0) and put the result
- * in tuple **i** of returned DataArrayInt.
- * If ranges overlapped (in theory it should not) this method do not detect it and always returns the sub position of the first range.
- *
- * For example if \a this contains : [1,24,7,8,10,17] and \a ranges contains [(0,3),(3,8),(8,15),(15,22),(22,30)]
- * The return DataArrayInt will contain : **[1,2,4,0,2,2]**
- * This method is often called in pair with DataArrayInt::findRangeIdForEachTuple method.
- *
- * \param [in] ranges typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is
- *             for lower value included and 2nd component is the upper value of corresponding range **excluded**.
- * \throw If offsets is a null pointer or does not have 2 components or if \a this is not allocated or \a this do not have exactly one component. To finish an exception
- *        is thrown if no ranges in \a ranges contains value in \a this.
- * \sa DataArrayInt::findRangeIdForEachTuple
- */
-DataArrayInt *DataArrayInt::findIdInRangeForEachTuple(const DataArrayInt *ranges) const
-{
-  if(!ranges)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdInRangeForEachTuple : null input pointer !");
-  if(ranges->getNumberOfComponents()!=2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdInRangeForEachTuple : input DataArrayInt instance should have 2 components !");
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::findIdInRangeForEachTuple : this should have only one component !");
-  int nbTuples=getNumberOfTuples();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(nbTuples,1);
-  int nbOfRanges=ranges->getNumberOfTuples();
-  const int *rangesPtr=ranges->getConstPointer();
-  int *retPtr=ret->getPointer();
-  const int *inPtr=getConstPointer();
-  for(int i=0;i<nbTuples;i++,retPtr++)
-    {
-      int val=inPtr[i];
-      bool found=false;
-      for(int j=0;j<nbOfRanges && !found;j++)
-        if(val>=rangesPtr[2*j] && val<rangesPtr[2*j+1])
-          { *retPtr=val-rangesPtr[2*j]; found=true; }
-      if(found)
-        continue;
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::findIdInRangeForEachTuple : tuple #" << i << " not found by any ranges !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  return ret.retn();
-}
-
-/*!
- * \b WARNING this method is a \b non \a const \b method. This method works tuple by tuple. Each tuple is expected to be pairs (number of components must be equal to 2).
- * This method rearrange each pair in \a this so that, tuple with id \b tid will be after the call \c this->getIJ(tid,0)==this->getIJ(tid-1,1) and \c this->getIJ(tid,1)==this->getIJ(tid+1,0).
- * If it is impossible to reach such condition an exception will be thrown ! \b WARNING In case of throw \a this can be partially modified !
- * If this method has correctly worked, \a this will be able to be considered as a linked list.
- * This method does nothing if number of tuples is lower of equal to 1.
- *
- * This method is useful for users having an unstructured mesh having only SEG2 to rearrange internally the connectivity without any coordinates consideration.
- *
- * \sa MEDCouplingUMesh::orderConsecutiveCells1D, DataArrayInt::fromLinkedListOfPairToList
- */
-void DataArrayInt::sortEachPairToMakeALinkedList()
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::sortEachPairToMakeALinkedList : Only works on DataArrayInt instance with nb of components equal to 2 !");
-  int nbOfTuples(getNumberOfTuples());
-  if(nbOfTuples<=1)
-    return ;
-  int *conn(getPointer());
-  for(int i=1;i<nbOfTuples;i++,conn+=2)
-    {
-      if(i>1)
-        {
-          if(conn[2]==conn[3])
-            {
-              std::ostringstream oss; oss << "DataArrayInt::sortEachPairToMakeALinkedList : In the tuple #" << i << " presence of a pair filled with same ids !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-          if(conn[2]!=conn[1] && conn[3]==conn[1] && conn[2]!=conn[0])
-            std::swap(conn[2],conn[3]);
-          //not(conn[2]==conn[1] && conn[3]!=conn[1] && conn[3]!=conn[0])
-          if(conn[2]!=conn[1] || conn[3]==conn[1] || conn[3]==conn[0])
-            {
-              std::ostringstream oss; oss << "DataArrayInt::sortEachPairToMakeALinkedList : In the tuple #" << i << " something is invalid !";
-              throw INTERP_KERNEL::Exception(oss.str().c_str());
-            }
-        }
-      else
-        {
-          if(conn[0]==conn[1] || conn[2]==conn[3])
-            throw INTERP_KERNEL::Exception("DataArrayInt::sortEachPairToMakeALinkedList : In the 2 first tuples presence of a pair filled with same ids !");
-          int tmp[4];
-          std::set<int> s;
-          s.insert(conn,conn+4);
-          if(s.size()!=3)
-            throw INTERP_KERNEL::Exception("DataArrayInt::sortEachPairToMakeALinkedList : This can't be considered as a linked list regarding 2 first tuples !");
-          if(std::count(conn,conn+4,conn[0])==2)
-            {
-              tmp[0]=conn[1];
-              tmp[1]=conn[0];
-              tmp[2]=conn[0];
-              if(conn[2]==conn[0])
-                { tmp[3]=conn[3]; }
-              else
-                { tmp[3]=conn[2];}
-              std::copy(tmp,tmp+4,conn);
-            }
-          else
-            {//here we are sure to have (std::count(conn,conn+4,conn[1])==2)
-              if(conn[1]==conn[3])
-                std::swap(conn[2],conn[3]);
-            }
-        }
-    }
-}
-
-/*!
- * \a this is expected to be a correctly linked list of pairs.
- *
- * \sa DataArrayInt::sortEachPairToMakeALinkedList
- */
-MCAuto<DataArrayInt> DataArrayInt::fromLinkedListOfPairToList() const
-{
-  checkAllocated();
-  checkNbOfComps(2,"DataArrayInt::fromLinkedListOfPairToList : this is expected to have 2 components");
-  int nbTuples(getNumberOfTuples());
-  if(nbTuples<1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::fromLinkedListOfPairToList : no tuples in this ! Not a linked list !");
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(nbTuples+1,1);
-  const int *thisPtr(begin());
-  int *retPtr(ret->getPointer());
-  retPtr[0]=thisPtr[0];
-  for(int i=0;i<nbTuples;i++)
-    {
-      retPtr[i+1]=thisPtr[2*i+1];
-      if(i<nbTuples-1)
-        if(thisPtr[2*i+1]!=thisPtr[2*(i+1)+0])
-          {
-            std::ostringstream oss; oss << "DataArrayInt::fromLinkedListOfPairToList : this is not a proper linked list of pair. The link is broken between tuple #" << i << " and tuple #" << i+1 << " ! Call sortEachPairToMakeALinkedList ?";
-            throw INTERP_KERNEL::Exception(oss.str());
-          }
-    }
-  return ret;
-}
-
-/*!
- * This method returns all different values found in \a this. This method throws if \a this has not been allocated.
- * But the number of components can be different from one.
- * \return a newly allocated array (that should be dealt by the caller) containing different values in \a this.
- */
-DataArrayInt *DataArrayInt::getDifferentValues() const
-{
-  checkAllocated();
-  std::set<int> ret;
-  ret.insert(begin(),end());
-  MCAuto<DataArrayInt> ret2=DataArrayInt::New(); ret2->alloc((int)ret.size(),1);
-  std::copy(ret.begin(),ret.end(),ret2->getPointer());
-  return ret2.retn();
-}
-
-/*!
- * This method is a refinement of DataArrayInt::getDifferentValues because it returns not only different values in \a this but also, for each of
- * them it tells which tuple id have this id.
- * This method works only on arrays with one component (if it is not the case call DataArrayInt::rearrange(1) ).
- * This method returns two arrays having same size.
- * The instances of DataArrayInt in the returned vector have be specially allocated and computed by this method. Each of them should be dealt by the caller of this method.
- * Example : if this is equal to [1,0,1,2,0,2,2,-3,2] -> differentIds=[-3,0,1,2] and returned array will be equal to [[7],[1,4],[0,2],[3,5,6,8]]
- */
-std::vector<DataArrayInt *> DataArrayInt::partitionByDifferentValues(std::vector<int>& differentIds) const
-{
-  checkAllocated();
-  if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::partitionByDifferentValues : this should have only one component !");
-  int id=0;
-  std::map<int,int> m,m2,m3;
-  for(const int *w=begin();w!=end();w++)
-    m[*w]++;
-  differentIds.resize(m.size());
-  std::vector<DataArrayInt *> ret(m.size());
-  std::vector<int *> retPtr(m.size());
-  for(std::map<int,int>::const_iterator it=m.begin();it!=m.end();it++,id++)
-    {
-      m2[(*it).first]=id;
-      ret[id]=DataArrayInt::New();
-      ret[id]->alloc((*it).second,1);
-      retPtr[id]=ret[id]->getPointer();
-      differentIds[id]=(*it).first;
-    }
-  id=0;
-  for(const int *w=begin();w!=end();w++,id++)
-    {
-      retPtr[m2[*w]][m3[*w]++]=id;
-    }
-  return ret;
-}
-
-/*!
- * This method split ids in [0, \c this->getNumberOfTuples() ) using \a this array as a field of weight (>=0 each).
- * The aim of this method is to return a set of \a nbOfSlices chunk of contiguous ids as balanced as possible.
- *
- * \param [in] nbOfSlices - number of slices expected.
- * \return - a vector having a size equal to \a nbOfSlices giving the start (included) and the stop (excluded) of each chunks.
- *
- * \sa DataArray::GetSlice
- * \throw If \a this is not allocated or not with exactly one component.
- * \throw If an element in \a this if < 0.
- */
-std::vector< std::pair<int,int> > DataArrayInt::splitInBalancedSlices(int nbOfSlices) const
-{
-  if(!isAllocated() || getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::splitInBalancedSlices : this array should have number of components equal to one and must be allocated !");
-  if(nbOfSlices<=0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::splitInBalancedSlices : number of slices must be >= 1 !");
-  int sum(accumulate(0)),nbOfTuples(getNumberOfTuples());
-  int sumPerSlc(sum/nbOfSlices),pos(0);
-  const int *w(begin());
-  std::vector< std::pair<int,int> > ret(nbOfSlices);
-  for(int i=0;i<nbOfSlices;i++)
-    {
-      std::pair<int,int> p(pos,-1);
-      int locSum(0);
-      while(locSum<sumPerSlc && pos<nbOfTuples) { pos++; locSum+=*w++; }
-      if(i!=nbOfSlices-1)
-        p.second=pos;
-      else
-        p.second=nbOfTuples;
-      ret[i]=p;
-    }
-  return ret;
-}
-
-/*!
- * Returns a new DataArrayInt that is a modulus of two given arrays. There are 3
- * valid cases.
- * 1.  The arrays have same number of tuples and components. Then each value of
- *   the result array (_a_) is a division of the corresponding values of \a a1 and
- *   \a a2, i.e.: _a_ [ i, j ] = _a1_ [ i, j ] % _a2_ [ i, j ].
- * 2.  The arrays have same number of tuples and one array, say _a2_, has one
- *   component. Then
- *   _a_ [ i, j ] = _a1_ [ i, j ] % _a2_ [ i, 0 ].
- * 3.  The arrays have same number of components and one array, say _a2_, has one
- *   tuple. Then
- *   _a_ [ i, j ] = _a1_ [ i, j ] % _a2_ [ 0, j ].
- *
- * Info on components is copied either from the first array (in the first case) or from
- * the array with maximal number of elements (getNbOfElems()).
- *  \warning No check of division by zero is performed!
- *  \param [in] a1 - a dividend array.
- *  \param [in] a2 - a divisor array.
- *  \return DataArrayInt * - the new instance of DataArrayInt.
- *          The caller is to delete this result array using decrRef() as it is no more
- *          needed.
- *  \throw If either \a a1 or \a a2 is NULL.
- *  \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples() and
- *         \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
- *         none of them has number of tuples or components equal to 1.
- */
-DataArrayInt *DataArrayInt::Modulus(const DataArrayInt *a1, const DataArrayInt *a2)
-{
-  if(!a1 || !a2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::Modulus : input DataArrayInt instance is NULL !");
-  int nbOfTuple1=a1->getNumberOfTuples();
-  int nbOfTuple2=a2->getNumberOfTuples();
-  int nbOfComp1=a1->getNumberOfComponents();
-  int nbOfComp2=a2->getNumberOfComponents();
-  if(nbOfTuple2==nbOfTuple1)
-    {
-      if(nbOfComp1==nbOfComp2)
-        {
-          MCAuto<DataArrayInt> ret=DataArrayInt::New();
-          ret->alloc(nbOfTuple2,nbOfComp1);
-          std::transform(a1->begin(),a1->end(),a2->begin(),ret->getPointer(),std::modulus<int>());
-          ret->copyStringInfoFrom(*a1);
-          return ret.retn();
-        }
-      else if(nbOfComp2==1)
-        {
-          MCAuto<DataArrayInt> ret=DataArrayInt::New();
-          ret->alloc(nbOfTuple1,nbOfComp1);
-          const int *a2Ptr=a2->getConstPointer();
-          const int *a1Ptr=a1->getConstPointer();
-          int *res=ret->getPointer();
-          for(int i=0;i<nbOfTuple1;i++)
-            res=std::transform(a1Ptr+i*nbOfComp1,a1Ptr+(i+1)*nbOfComp1,res,std::bind2nd(std::modulus<int>(),a2Ptr[i]));
-          ret->copyStringInfoFrom(*a1);
-          return ret.retn();
-        }
-      else
-        {
-          a1->checkNbOfComps(nbOfComp2,"Nb of components mismatch for array Modulus !");
-          return 0;
-        }
-    }
-  else if(nbOfTuple2==1)
-    {
-      a1->checkNbOfComps(nbOfComp2,"Nb of components mismatch for array Modulus !");
-      MCAuto<DataArrayInt> ret=DataArrayInt::New();
-      ret->alloc(nbOfTuple1,nbOfComp1);
-      const int *a1ptr=a1->getConstPointer(),*a2ptr=a2->getConstPointer();
-      int *pt=ret->getPointer();
-      for(int i=0;i<nbOfTuple1;i++)
-        pt=std::transform(a1ptr+i*nbOfComp1,a1ptr+(i+1)*nbOfComp1,a2ptr,pt,std::modulus<int>());
-      ret->copyStringInfoFrom(*a1);
-      return ret.retn();
-    }
-  else
-    {
-      a1->checkNbOfTuples(nbOfTuple2,"Nb of tuples mismatch for array Modulus !");//will always throw an exception
-      return 0;
-    }
-}
-
-/*!
- * Modify \a this array so that each value becomes a modulus of division of this value by
- * a value of another DataArrayInt. There are 3 valid cases.
- * 1.  The arrays have same number of tuples and components. Then each value of
- *    \a this array is divided by the corresponding value of \a other one, i.e.:
- *   _a_ [ i, j ] %= _other_ [ i, j ].
- * 2.  The arrays have same number of tuples and \a other array has one component. Then
- *   _a_ [ i, j ] %= _other_ [ i, 0 ].
- * 3.  The arrays have same number of components and \a other array has one tuple. Then
- *   _a_ [ i, j ] %= _a2_ [ 0, j ].
- *
- *  \warning No check of division by zero is performed!
- *  \param [in] other - a divisor array.
- *  \throw If \a other is NULL.
- *  \throw If \a this->getNumberOfTuples() != \a other->getNumberOfTuples() and
- *         \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
- *         \a other has number of both tuples and components not equal to 1.
- */
-void DataArrayInt::modulusEqual(const DataArrayInt *other)
-{
-  if(!other)
-    throw INTERP_KERNEL::Exception("DataArrayInt::modulusEqual : input DataArrayInt instance is NULL !");
-  const char *msg="Nb of tuples mismatch for DataArrayInt::modulusEqual !";
-  checkAllocated(); other->checkAllocated();
-  int nbOfTuple=getNumberOfTuples();
-  int nbOfTuple2=other->getNumberOfTuples();
-  int nbOfComp=getNumberOfComponents();
-  int nbOfComp2=other->getNumberOfComponents();
-  if(nbOfTuple==nbOfTuple2)
-    {
-      if(nbOfComp==nbOfComp2)
-        {
-          std::transform(begin(),end(),other->begin(),getPointer(),std::modulus<int>());
-        }
-      else if(nbOfComp2==1)
-        {
-          if(nbOfComp2==nbOfComp)
-            {
-              int *ptr=getPointer();
-              const int *ptrc=other->getConstPointer();
-              for(int i=0;i<nbOfTuple;i++)
-                std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptr+i*nbOfComp,std::bind2nd(std::modulus<int>(),*ptrc++));
-            }
-          else
-            throw INTERP_KERNEL::Exception(msg);
-        }
-      else
-        throw INTERP_KERNEL::Exception(msg);
-    }
-  else if(nbOfTuple2==1)
-    {
-      int *ptr=getPointer();
-      const int *ptrc=other->getConstPointer();
-      for(int i=0;i<nbOfTuple;i++)
-        std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptrc,ptr+i*nbOfComp,std::modulus<int>());
-    }
-  else
-    throw INTERP_KERNEL::Exception(msg);
-  declareAsNew();
-}
-
-/*!
- * Returns a new DataArrayInt that is the result of pow of two given arrays. There are 3
- * valid cases.
- *
- *  \param [in] a1 - an array to pow up.
- *  \param [in] a2 - another array to sum up.
- *  \return DataArrayInt * - the new instance of DataArrayInt.
- *          The caller is to delete this result array using decrRef() as it is no more
- *          needed.
- *  \throw If either \a a1 or \a a2 is NULL.
- *  \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples()
- *  \throw If \a a1->getNumberOfComponents() != 1 or \a a2->getNumberOfComponents() != 1.
- *  \throw If there is a negative value in \a a2.
- */
-DataArrayInt *DataArrayInt::Pow(const DataArrayInt *a1, const DataArrayInt *a2)
-{
-  if(!a1 || !a2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::Pow : at least one of input instances is null !");
-  int nbOfTuple=a1->getNumberOfTuples();
-  int nbOfTuple2=a2->getNumberOfTuples();
-  int nbOfComp=a1->getNumberOfComponents();
-  int nbOfComp2=a2->getNumberOfComponents();
-  if(nbOfTuple!=nbOfTuple2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::Pow : number of tuples mismatches !");
-  if(nbOfComp!=1 || nbOfComp2!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::Pow : number of components of both arrays must be equal to 1 !");
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(nbOfTuple,1);
-  const int *ptr1(a1->begin()),*ptr2(a2->begin());
-  int *ptr=ret->getPointer();
-  for(int i=0;i<nbOfTuple;i++,ptr1++,ptr2++,ptr++)
-    {
-      if(*ptr2>=0)
-        {
-          int tmp=1;
-          for(int j=0;j<*ptr2;j++)
-            tmp*=*ptr1;
-          *ptr=tmp;
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::Pow : on tuple #" << i << " of a2 value is < 0 (" << *ptr2 << ") !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  return ret.retn();
-}
-
-/*!
- * Apply pow on values of another DataArrayInt to values of \a this one.
- *
- *  \param [in] other - an array to pow to \a this one.
- *  \throw If \a other is NULL.
- *  \throw If \a this->getNumberOfTuples() != \a other->getNumberOfTuples()
- *  \throw If \a this->getNumberOfComponents() != 1 or \a other->getNumberOfComponents() != 1
- *  \throw If there is a negative value in \a other.
- */
-void DataArrayInt::powEqual(const DataArrayInt *other)
-{
-  if(!other)
-    throw INTERP_KERNEL::Exception("DataArrayInt::powEqual : input instance is null !");
-  int nbOfTuple=getNumberOfTuples();
-  int nbOfTuple2=other->getNumberOfTuples();
-  int nbOfComp=getNumberOfComponents();
-  int nbOfComp2=other->getNumberOfComponents();
-  if(nbOfTuple!=nbOfTuple2)
-    throw INTERP_KERNEL::Exception("DataArrayInt::powEqual : number of tuples mismatches !");
-  if(nbOfComp!=1 || nbOfComp2!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::powEqual : number of components of both arrays must be equal to 1 !");
-  int *ptr=getPointer();
-  const int *ptrc=other->begin();
-  for(int i=0;i<nbOfTuple;i++,ptrc++,ptr++)
-    {
-      if(*ptrc>=0)
-        {
-          int tmp=1;
-          for(int j=0;j<*ptrc;j++)
-            tmp*=*ptr;
-          *ptr=tmp;
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::powEqual : on tuple #" << i << " of other value is < 0 (" << *ptrc << ") !";
-          throw INTERP_KERNEL::Exception(oss.str().c_str());
-        }
-    }
-  declareAsNew();
-}
-
-/*!
- * This method works on a pair input (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn
- * (\ref numbering-indirect).
- * This method returns the result of the extraction ( specified by a set of ids in [\b idsOfSelectBg , \b idsOfSelectEnd ) ).
- * The selection of extraction is done standardly in new2old format.
- * This method returns indexed arrays (\ref numbering-indirect) using 2 arrays (arrOut,arrIndexOut).
- *
- * \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
- * \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
- * \param [in] arrIn arr origin array from which the extraction will be done.
- * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
- * \param [out] arrOut the resulting array
- * \param [out] arrIndexOut the index array of the resulting array \b arrOut
- * \sa DataArrayInt::ExtractFromIndexedArraysSlice
- */
-void DataArrayInt::ExtractFromIndexedArrays(const int *idsOfSelectBg, const int *idsOfSelectEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                                DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut)
-{
-  if(!arrIn || !arrIndxIn)
-    throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : input pointer is NULL !");
-  arrIn->checkAllocated(); arrIndxIn->checkAllocated();
-  if(arrIn->getNumberOfComponents()!=1 || arrIndxIn->getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : input arrays must have exactly one component !");
-  std::size_t sz=std::distance(idsOfSelectBg,idsOfSelectEnd);
-  const int *arrInPtr=arrIn->begin();
-  const int *arrIndxPtr=arrIndxIn->begin();
-  int nbOfGrps=arrIndxIn->getNumberOfTuples()-1;
-  if(nbOfGrps<0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : The format of \"arrIndxIn\" is invalid ! Its nb of tuples should be >=1 !");
-  int maxSizeOfArr=arrIn->getNumberOfTuples();
-  MCAuto<DataArrayInt> arro=DataArrayInt::New();
-  MCAuto<DataArrayInt> arrIo=DataArrayInt::New();
-  arrIo->alloc((int)(sz+1),1);
-  const int *idsIt=idsOfSelectBg;
-  int *work=arrIo->getPointer();
-  *work++=0;
-  int lgth=0;
-  for(std::size_t i=0;i<sz;i++,work++,idsIt++)
-    {
-      if(*idsIt>=0 && *idsIt<nbOfGrps)
-        lgth+=arrIndxPtr[*idsIt+1]-arrIndxPtr[*idsIt];
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArrays : id located on pos #" << i << " value is " << *idsIt << " ! Must be in [0," << nbOfGrps << ") !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-      if(lgth>=work[-1])
-        *work=lgth;
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArrays : id located on pos #" << i << " value is " << *idsIt << " and at this pos arrIndxIn[" << *idsIt;
-          oss << "+1]-arrIndxIn[" << *idsIt << "] < 0 ! The input index array is bugged !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-  arro->alloc(lgth,1);
-  work=arro->getPointer();
-  idsIt=idsOfSelectBg;
-  for(std::size_t i=0;i<sz;i++,idsIt++)
-    {
-      if(arrIndxPtr[*idsIt]>=0 && arrIndxPtr[*idsIt+1]<=maxSizeOfArr)
-        work=std::copy(arrInPtr+arrIndxPtr[*idsIt],arrInPtr+arrIndxPtr[*idsIt+1],work);
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArrays : id located on pos #" << i << " value is " << *idsIt << " arrIndx[" << *idsIt << "] must be >= 0 and arrIndx[";
-          oss << *idsIt << "+1] <= " << maxSizeOfArr << " (the size of arrIn)!";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-  arrOut=arro.retn();
-  arrIndexOut=arrIo.retn();
-}
-
-/*!
- * This method works on a pair input (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn
- * (\ref numbering-indirect).
- * This method returns the result of the extraction ( specified by a set of ids with a slice given by \a idsOfSelectStart, \a idsOfSelectStop and \a idsOfSelectStep ).
- * The selection of extraction is done standardly in new2old format.
- * This method returns indexed arrays (\ref numbering-indirect) using 2 arrays (arrOut,arrIndexOut).
- *
- * \param [in] idsOfSelectStart begin of set of ids of the input extraction (included)
- * \param [in] idsOfSelectStop end of set of ids of the input extraction (excluded)
- * \param [in] idsOfSelectStep
- * \param [in] arrIn arr origin array from which the extraction will be done.
- * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
- * \param [out] arrOut the resulting array
- * \param [out] arrIndexOut the index array of the resulting array \b arrOut
- * \sa DataArrayInt::ExtractFromIndexedArrays
- */
-void DataArrayInt::ExtractFromIndexedArraysSlice(int idsOfSelectStart, int idsOfSelectStop, int idsOfSelectStep, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                                 DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut)
-{
-  if(!arrIn || !arrIndxIn)
-    throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArraysSlice : input pointer is NULL !");
-  arrIn->checkAllocated(); arrIndxIn->checkAllocated();
-  if(arrIn->getNumberOfComponents()!=1 || arrIndxIn->getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArraysSlice : input arrays must have exactly one component !");
-  int sz=DataArrayInt::GetNumberOfItemGivenBESRelative(idsOfSelectStart,idsOfSelectStop,idsOfSelectStep,"MEDCouplingUMesh::ExtractFromIndexedArraysSlice : Input slice ");
-  const int *arrInPtr=arrIn->begin();
-  const int *arrIndxPtr=arrIndxIn->begin();
-  int nbOfGrps=arrIndxIn->getNumberOfTuples()-1;
-  if(nbOfGrps<0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArraysSlice : The format of \"arrIndxIn\" is invalid ! Its nb of tuples should be >=1 !");
-  int maxSizeOfArr=arrIn->getNumberOfTuples();
-  MCAuto<DataArrayInt> arro=DataArrayInt::New();
-  MCAuto<DataArrayInt> arrIo=DataArrayInt::New();
-  arrIo->alloc((int)(sz+1),1);
-  int idsIt=idsOfSelectStart;
-  int *work=arrIo->getPointer();
-  *work++=0;
-  int lgth=0;
-  for(int i=0;i<sz;i++,work++,idsIt+=idsOfSelectStep)
-    {
-      if(idsIt>=0 && idsIt<nbOfGrps)
-        lgth+=arrIndxPtr[idsIt+1]-arrIndxPtr[idsIt];
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArraysSlice : id located on pos #" << i << " value is " << idsIt << " ! Must be in [0," << nbOfGrps << ") !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-      if(lgth>=work[-1])
-        *work=lgth;
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArraysSlice : id located on pos #" << i << " value is " << idsIt << " and at this pos arrIndxIn[" << idsIt;
-          oss << "+1]-arrIndxIn[" << idsIt << "] < 0 ! The input index array is bugged !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-  arro->alloc(lgth,1);
-  work=arro->getPointer();
-  idsIt=idsOfSelectStart;
-  for(int i=0;i<sz;i++,idsIt+=idsOfSelectStep)
-    {
-      if(arrIndxPtr[idsIt]>=0 && arrIndxPtr[idsIt+1]<=maxSizeOfArr)
-        work=std::copy(arrInPtr+arrIndxPtr[idsIt],arrInPtr+arrIndxPtr[idsIt+1],work);
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArraysSlice : id located on pos #" << i << " value is " << idsIt << " arrIndx[" << idsIt << "] must be >= 0 and arrIndx[";
-          oss << idsIt << "+1] <= " << maxSizeOfArr << " (the size of arrIn)!";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-  arrOut=arro.retn();
-  arrIndexOut=arrIo.retn();
-}
-
-/*!
- * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
- * This method builds an output pair (\b arrOut,\b arrIndexOut) that is a copy from \b arrIn for all cell ids \b not \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) and for
- * cellIds \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) a copy coming from the corresponding values in input pair (\b srcArr, \b srcArrIndex).
- * This method is an generalization of MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
- *
- * \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
- * \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
- * \param [in] arrIn arr origin array from which the extraction will be done.
- * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
- * \param [in] srcArr input array that will be used as source of copy for ids in [ \b idsOfSelectBg, \b idsOfSelectEnd )
- * \param [in] srcArrIndex index array of \b srcArr
- * \param [out] arrOut the resulting array
- * \param [out] arrIndexOut the index array of the resulting array \b arrOut
- *
- * \sa DataArrayInt::SetPartOfIndexedArraysSameIdx
- */
-void DataArrayInt::SetPartOfIndexedArrays(const int *idsOfSelectBg, const int *idsOfSelectEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                              const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex,
-                                              DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut)
-{
-  if(arrIn==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArrays : presence of null pointer in input parameter !");
-  MCAuto<DataArrayInt> arro=DataArrayInt::New();
-  MCAuto<DataArrayInt> arrIo=DataArrayInt::New();
-  int nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
-  std::vector<bool> v(nbOfTuples,true);
-  int offset=0;
-  const int *arrIndxInPtr=arrIndxIn->begin();
-  const int *srcArrIndexPtr=srcArrIndex->begin();
-  for(const int *it=idsOfSelectBg;it!=idsOfSelectEnd;it++,srcArrIndexPtr++)
-    {
-      if(*it>=0 && *it<nbOfTuples)
-        {
-          v[*it]=false;
-          offset+=(srcArrIndexPtr[1]-srcArrIndexPtr[0])-(arrIndxInPtr[*it+1]-arrIndxInPtr[*it]);
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArrays : On pos #" << std::distance(idsOfSelectBg,it) << " value is " << *it << " not in [0," << nbOfTuples << ") !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-  srcArrIndexPtr=srcArrIndex->begin();
-  arrIo->alloc(nbOfTuples+1,1);
-  arro->alloc(arrIn->getNumberOfTuples()+offset,1);
-  const int *arrInPtr=arrIn->begin();
-  const int *srcArrPtr=srcArr->begin();
-  int *arrIoPtr=arrIo->getPointer(); *arrIoPtr++=0;
-  int *arroPtr=arro->getPointer();
-  for(int ii=0;ii<nbOfTuples;ii++,arrIoPtr++)
-    {
-      if(v[ii])
-        {
-          arroPtr=std::copy(arrInPtr+arrIndxInPtr[ii],arrInPtr+arrIndxInPtr[ii+1],arroPtr);
-          *arrIoPtr=arrIoPtr[-1]+(arrIndxInPtr[ii+1]-arrIndxInPtr[ii]);
-        }
-      else
-        {
-          std::size_t pos=std::distance(idsOfSelectBg,std::find(idsOfSelectBg,idsOfSelectEnd,ii));
-          arroPtr=std::copy(srcArrPtr+srcArrIndexPtr[pos],srcArrPtr+srcArrIndexPtr[pos+1],arroPtr);
-          *arrIoPtr=arrIoPtr[-1]+(srcArrIndexPtr[pos+1]-srcArrIndexPtr[pos]);
-        }
-    }
-  arrOut=arro.retn();
-  arrIndexOut=arrIo.retn();
-}
-
-
-/*!
- * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
- * This method builds an output pair (\b arrOut,\b arrIndexOut) that is a copy from \b arrIn for all cell ids \b not \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) and for
- * cellIds \b in [\b idsOfSelectBg, \b idsOfSelectEnd) a copy coming from the corresponding values in input pair (\b srcArr, \b srcArrIndex).
- * This method is an generalization of DataArrayInt::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
- *
- * \param [in] start begin of set of ids of the input extraction (included)
- * \param [in] end end of set of ids of the input extraction (excluded)
- * \param [in] step step of the set of ids in range mode.
- * \param [in] arrIn arr origin array from which the extraction will be done.
- * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
- * \param [in] srcArr input array that will be used as source of copy for ids in [\b idsOfSelectBg, \b idsOfSelectEnd)
- * \param [in] srcArrIndex index array of \b srcArr
- * \param [out] arrOut the resulting array
- * \param [out] arrIndexOut the index array of the resulting array \b arrOut
- *
- * \sa DataArrayInt::SetPartOfIndexedArraysSameIdx DataArrayInt::SetPartOfIndexedArrays
- */
-void DataArrayInt::SetPartOfIndexedArraysSlice(int start, int end, int step, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                               const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex,
-                                               DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut)
-{
-  if(arrIn==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSlice : presence of null pointer in input parameter !");
-  MCAuto<DataArrayInt> arro=DataArrayInt::New();
-  MCAuto<DataArrayInt> arrIo=DataArrayInt::New();
-  int nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
-  int offset=0;
-  const int *arrIndxInPtr=arrIndxIn->begin();
-  const int *srcArrIndexPtr=srcArrIndex->begin();
-  int nbOfElemsToSet=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"DataArrayInt::SetPartOfIndexedArraysSlice : ");
-  int it=start;
-  for(int i=0;i<nbOfElemsToSet;i++,srcArrIndexPtr++,it+=step)
-    {
-      if(it>=0 && it<nbOfTuples)
-        offset+=(srcArrIndexPtr[1]-srcArrIndexPtr[0])-(arrIndxInPtr[it+1]-arrIndxInPtr[it]);
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSlice : On pos #" << i << " value is " << it << " not in [0," << nbOfTuples << ") !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-  srcArrIndexPtr=srcArrIndex->begin();
-  arrIo->alloc(nbOfTuples+1,1);
-  arro->alloc(arrIn->getNumberOfTuples()+offset,1);
-  const int *arrInPtr=arrIn->begin();
-  const int *srcArrPtr=srcArr->begin();
-  int *arrIoPtr=arrIo->getPointer(); *arrIoPtr++=0;
-  int *arroPtr=arro->getPointer();
-  for(int ii=0;ii<nbOfTuples;ii++,arrIoPtr++)
-    {
-      int pos=DataArray::GetPosOfItemGivenBESRelativeNoThrow(ii,start,end,step);
-      if(pos<0)
-        {
-          arroPtr=std::copy(arrInPtr+arrIndxInPtr[ii],arrInPtr+arrIndxInPtr[ii+1],arroPtr);
-          *arrIoPtr=arrIoPtr[-1]+(arrIndxInPtr[ii+1]-arrIndxInPtr[ii]);
-        }
-      else
-        {
-          arroPtr=std::copy(srcArrPtr+srcArrIndexPtr[pos],srcArrPtr+srcArrIndexPtr[pos+1],arroPtr);
-          *arrIoPtr=arrIoPtr[-1]+(srcArrIndexPtr[pos+1]-srcArrIndexPtr[pos]);
-        }
-    }
-  arrOut=arro.retn();
-  arrIndexOut=arrIo.retn();
-}
-
-
-/*!
- * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
- * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in \b arrIndxIn.
- *
- * \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
- * \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
- * \param [in,out] arrInOut arr origin array from which the extraction will be done.
- * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
- * \param [in] srcArr input array that will be used as source of copy for ids in [ \b idsOfSelectBg , \b idsOfSelectEnd )
- * \param [in] srcArrIndex index array of \b srcArr
- *
- * \sa DataArrayInt::SetPartOfIndexedArrays
- */
-void DataArrayInt::SetPartOfIndexedArraysSameIdx(const int *idsOfSelectBg, const int *idsOfSelectEnd, DataArrayInt *arrInOut, const DataArrayInt *arrIndxIn,
-                                                     const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex)
-{
-  if(arrInOut==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSameIdx : presence of null pointer in input parameter !");
-  int nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
-  const int *arrIndxInPtr=arrIndxIn->begin();
-  const int *srcArrIndexPtr=srcArrIndex->begin();
-  int *arrInOutPtr=arrInOut->getPointer();
-  const int *srcArrPtr=srcArr->begin();
-  for(const int *it=idsOfSelectBg;it!=idsOfSelectEnd;it++,srcArrIndexPtr++)
-    {
-      if(*it>=0 && *it<nbOfTuples)
-        {
-          if(srcArrIndexPtr[1]-srcArrIndexPtr[0]==arrIndxInPtr[*it+1]-arrIndxInPtr[*it])
-            std::copy(srcArrPtr+srcArrIndexPtr[0],srcArrPtr+srcArrIndexPtr[1],arrInOutPtr+arrIndxInPtr[*it]);
-          else
-            {
-              std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdx : On pos #" << std::distance(idsOfSelectBg,it) << " id (idsOfSelectBg[" << std::distance(idsOfSelectBg,it)<< "]) is " << *it << " arrIndxIn[id+1]-arrIndxIn[id]!=srcArrIndex[pos+1]-srcArrIndex[pos] !";
-              throw INTERP_KERNEL::Exception(oss.str());
-            }
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdx : On pos #" << std::distance(idsOfSelectBg,it) << " value is " << *it << " not in [0," << nbOfTuples << ") !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-}
-
-/*!
- * This method works on an input pair (\b arr, \b arrIndx) where \b arr indexes is in \b arrIndx.
- * This method will not impact the size of inout parameter \b arrIndx but the size of \b arr will be modified in case of suppression.
- *
- * \param [in] idsToRemoveBg begin of set of ids to remove in \b arr (included)
- * \param [in] idsToRemoveEnd end of set of ids to remove in \b arr (excluded)
- * \param [in,out] arr array in which the remove operation will be done.
- * \param [in,out] arrIndx array in the remove operation will modify
- * \param [in] offsetForRemoval (by default 0) offset so that for each i in [0,arrIndx->getNumberOfTuples()-1) removal process will be performed in the following range [arr+arrIndx[i]+offsetForRemoval,arr+arr[i+1])
- * \return true if \b arr and \b arrIndx have been modified, false if not.
- */
-bool DataArrayInt::RemoveIdsFromIndexedArrays(const int *idsToRemoveBg, const int *idsToRemoveEnd, DataArrayInt *arr, DataArrayInt *arrIndx, int offsetForRemoval)
-{
-  if(!arrIndx || !arr)
-    throw INTERP_KERNEL::Exception("DataArrayInt::RemoveIdsFromIndexedArrays : some input arrays are empty !");
-  if(offsetForRemoval<0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::RemoveIdsFromIndexedArrays : offsetForRemoval should be >=0 !");
-  std::set<int> s(idsToRemoveBg,idsToRemoveEnd);
-  int nbOfGrps=arrIndx->getNumberOfTuples()-1;
-  int *arrIPtr=arrIndx->getPointer();
-  *arrIPtr++=0;
-  int previousArrI=0;
-  const int *arrPtr=arr->begin();
-  std::vector<int> arrOut;//no utility to switch to DataArrayInt because copy always needed
-  for(int i=0;i<nbOfGrps;i++,arrIPtr++)
-    {
-      if(*arrIPtr-previousArrI>offsetForRemoval)
-        {
-          for(const int *work=arrPtr+previousArrI+offsetForRemoval;work!=arrPtr+*arrIPtr;work++)
-            {
-              if(s.find(*work)==s.end())
-                arrOut.push_back(*work);
-            }
-        }
-      previousArrI=*arrIPtr;
-      *arrIPtr=(int)arrOut.size();
-    }
-  if(arr->getNumberOfTuples()==arrOut.size())
-    return false;
-  arr->alloc((int)arrOut.size(),1);
-  std::copy(arrOut.begin(),arrOut.end(),arr->getPointer());
-  return true;
-}
-
-/*!
- * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
- * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in \b arrIndxIn.
- *
- * \param [in] start begin of set of ids of the input extraction (included)
- * \param [in] end end of set of ids of the input extraction (excluded)
- * \param [in] step step of the set of ids in range mode.
- * \param [in,out] arrInOut arr origin array from which the extraction will be done.
- * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
- * \param [in] srcArr input array that will be used as source of copy for ids in [\b idsOfSelectBg, \b idsOfSelectEnd)
- * \param [in] srcArrIndex index array of \b srcArr
- *
- * \sa DataArrayInt::SetPartOfIndexedArraysSlice DataArrayInt::SetPartOfIndexedArraysSameIdx
- */
-void DataArrayInt::SetPartOfIndexedArraysSameIdxSlice(int start, int end, int step, DataArrayInt *arrInOut, const DataArrayInt *arrIndxIn,
-                                                      const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex)
-{
-  if(arrInOut==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
-    throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : presence of null pointer in input parameter !");
-  int nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
-  const int *arrIndxInPtr=arrIndxIn->begin();
-  const int *srcArrIndexPtr=srcArrIndex->begin();
-  int *arrInOutPtr=arrInOut->getPointer();
-  const int *srcArrPtr=srcArr->begin();
-  int nbOfElemsToSet=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : ");
-  int it=start;
-  for(int i=0;i<nbOfElemsToSet;i++,srcArrIndexPtr++,it+=step)
-    {
-      if(it>=0 && it<nbOfTuples)
-        {
-          if(srcArrIndexPtr[1]-srcArrIndexPtr[0]==arrIndxInPtr[it+1]-arrIndxInPtr[it])
-            std::copy(srcArrPtr+srcArrIndexPtr[0],srcArrPtr+srcArrIndexPtr[1],arrInOutPtr+arrIndxInPtr[it]);
-          else
-            {
-              std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : On pos #" << i << " id (idsOfSelectBg[" << i << "]) is " << it << " arrIndxIn[id+1]-arrIndxIn[id]!=srcArrIndex[pos+1]-srcArrIndex[pos] !";
-              throw INTERP_KERNEL::Exception(oss.str());
-            }
-        }
-      else
-        {
-          std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : On pos #" << i << " value is " << it << " not in [0," << nbOfTuples << ") !";
-          throw INTERP_KERNEL::Exception(oss.str());
-        }
-    }
-}
-
-
-/*!
- * Returns a C array which is a renumbering map in "Old to New" mode for the input array.
- * This map, if applied to \a start array, would make it sorted. For example, if
- * \a start array contents are [9,10,0,6,4,11,3,7] then the contents of the result array is
- * [5,6,0,3,2,7,1,4].
- *  \param [in] start - pointer to the first element of the array for which the
- *         permutation map is computed.
- *  \param [in] end - pointer specifying the end of the array \a start, so that
- *         the last value of \a start is \a end[ -1 ].
- *  \return int * - the result permutation array that the caller is to delete as it is no
- *         more needed.
- *  \throw If there are equal values in the input array.
- */
-int *DataArrayInt::CheckAndPreparePermutation(const int *start, const int *end)
-{
-  std::size_t sz=std::distance(start,end);
-  int *ret=(int *)malloc(sz*sizeof(int));
-  int *work=new int[sz];
-  std::copy(start,end,work);
-  std::sort(work,work+sz);
-  if(std::unique(work,work+sz)!=work+sz)
-    {
-      delete [] work;
-      free(ret);
-      throw INTERP_KERNEL::Exception("Some elements are equals in the specified array !");
-    }
-  std::map<int,int> m;
-  for(int *workPt=work;workPt!=work+sz;workPt++)
-    m[*workPt]=(int)std::distance(work,workPt);
-  int *iter2=ret;
-  for(const int *iter=start;iter!=end;iter++,iter2++)
-    *iter2=m[*iter];
-  delete [] work;
-  return ret;
-}
-
-/*!
- * Returns a new DataArrayInt containing an arithmetic progression
- * that is equal to the sequence returned by Python \c range(\a begin,\a  end,\a  step )
- * function.
- *  \param [in] begin - the start value of the result sequence.
- *  \param [in] end - limiting value, so that every value of the result array is less than
- *              \a end.
- *  \param [in] step - specifies the increment or decrement.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
- *          array using decrRef() as it is no more needed.
- *  \throw If \a step == 0.
- *  \throw If \a end < \a begin && \a step > 0.
- *  \throw If \a end > \a begin && \a step < 0.
- */
-DataArrayInt *DataArrayInt::Range(int begin, int end, int step)
-{
-  int nbOfTuples=GetNumberOfItemGivenBESRelative(begin,end,step,"DataArrayInt::Range");
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  ret->alloc(nbOfTuples,1);
-  int *ptr=ret->getPointer();
-  if(step>0)
-    {
-      for(int i=begin;i<end;i+=step,ptr++)
-        *ptr=i;
-    }
-  else
-    {
-      for(int i=begin;i>end;i+=step,ptr++)
-        *ptr=i;
-    }
-  return ret.retn();
-}
-
-/*!
- * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
- * Server side.
- */
-void DataArrayInt::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
-{
-  tinyInfo.resize(2);
-  if(isAllocated())
-    {
-      tinyInfo[0]=getNumberOfTuples();
-      tinyInfo[1]=getNumberOfComponents();
-    }
-  else
-    {
-      tinyInfo[0]=-1;
-      tinyInfo[1]=-1;
-    }
-}
-
-/*!
- * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
- * Server side.
- */
-void DataArrayInt::getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const
-{
-  if(isAllocated())
-    {
-      int nbOfCompo=getNumberOfComponents();
-      tinyInfo.resize(nbOfCompo+1);
-      tinyInfo[0]=getName();
-      for(int i=0;i<nbOfCompo;i++)
-        tinyInfo[i+1]=getInfoOnComponent(i);
-    }
-  else
-    {
-      tinyInfo.resize(1);
-      tinyInfo[0]=getName();
-    }
-}
-
-/*!
- * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
- * This method returns if a feeding is needed.
- */
-bool DataArrayInt::resizeForUnserialization(const std::vector<int>& tinyInfoI)
-{
-  int nbOfTuple=tinyInfoI[0];
-  int nbOfComp=tinyInfoI[1];
-  if(nbOfTuple!=-1 || nbOfComp!=-1)
-    {
-      alloc(nbOfTuple,nbOfComp);
-      return true;
-    }
-  return false;
-}
-
-/*!
- * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
- * This method returns if a feeding is needed.
- */
-void DataArrayInt::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS)
-{
-  setName(tinyInfoS[0]);
-  if(isAllocated())
-    {
-      int nbOfCompo=tinyInfoI[1];
-      for(int i=0;i<nbOfCompo;i++)
-        setInfoOnComponent(i,tinyInfoS[i+1]);
-    }
-}
-
-DataArrayIntIterator::DataArrayIntIterator(DataArrayInt *da):DataArrayIterator<int>(da)
-{
-}
-
-DataArrayInt32Tuple::DataArrayInt32Tuple(int *pt, int nbOfComp):DataArrayTuple<int>(pt,nbOfComp)
-{
-}
-
-std::string DataArrayIntTuple::repr() const
-{
-  std::ostringstream oss; oss << "(";
-  for(int i=0;i<_nb_of_compo-1;i++)
-    oss << _pt[i] << ", ";
-  oss << _pt[_nb_of_compo-1] << ")";
-  return oss.str();
-}
-
-int DataArrayIntTuple::intValue() const
-{
-  return this->zeValue();
-}
-
-/*!
- * This method returns a newly allocated instance the caller should dealed with by a MEDCoupling::DataArrayInt::decrRef.
- * This method performs \b no copy of data. The content is only referenced using MEDCoupling::DataArrayInt::useArray with ownership set to \b false.
- * This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
- * \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
- */
-DataArrayInt *DataArrayIntTuple::buildDAInt(int nbOfTuples, int nbOfCompo) const
-{
-  return this->buildDA(nbOfTuples,nbOfCompo);
-}
 
 DataArrayInt64 *DataArrayInt64::deepCopy() const
 {
old mode 100644 (file)
new mode 100755 (executable)
index 15038c2..549f3ca
@@ -82,15 +82,15 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT T operator[](std::size_t id) const { return _pointer.getConstPointer()[id]; }
     MEDCOUPLING_EXPORT T& operator[](std::size_t id) { return _pointer.getPointer()[id]; }
     MEDCOUPLING_EXPORT bool isEqual(const MemArray<T>& other, T prec, std::string& reason) const;
-    MEDCOUPLING_EXPORT void repr(int sl, std::ostream& stream) const;
-    MEDCOUPLING_EXPORT bool reprHeader(int sl, std::ostream& stream) const;
-    MEDCOUPLING_EXPORT void reprZip(int sl, std::ostream& stream) const;
-    MEDCOUPLING_EXPORT void reprNotTooLong(int sl, std::ostream& stream) const;
+    MEDCOUPLING_EXPORT void repr(mcIdType sl, std::ostream& stream) const;
+    MEDCOUPLING_EXPORT bool reprHeader(mcIdType sl, std::ostream& stream) const;
+    MEDCOUPLING_EXPORT void reprZip(mcIdType sl, std::ostream& stream) const;
+    MEDCOUPLING_EXPORT void reprNotTooLong(mcIdType sl, std::ostream& stream) const;
     MEDCOUPLING_EXPORT void fillWithValue(const T& val);
-    MEDCOUPLING_EXPORT T *fromNoInterlace(int nbOfComp) const;
-    MEDCOUPLING_EXPORT T *toNoInterlace(int nbOfComp) const;
+    MEDCOUPLING_EXPORT T *fromNoInterlace(std::size_t nbOfComp) const;
+    MEDCOUPLING_EXPORT T *toNoInterlace(std::size_t nbOfComp) const;
     MEDCOUPLING_EXPORT void sort(bool asc);
-    MEDCOUPLING_EXPORT void reverse(int nbOfComp);
+    MEDCOUPLING_EXPORT void reverse(std::size_t nbOfComp);
     MEDCOUPLING_EXPORT void alloc(std::size_t nbOfElements);
     MEDCOUPLING_EXPORT void reserve(std::size_t newNbOfElements);
     MEDCOUPLING_EXPORT void reAlloc(std::size_t newNbOfElements);
@@ -125,7 +125,15 @@ namespace MEDCoupling
     void *_param_for_deallocator;
   };
 
-  class DataArrayInt32;
+  template <class T> class DataArrayTools
+  {
+  public:
+    MEDCOUPLING_EXPORT static void GetSlice(T start, T stop, T step, mcIdType sliceId, mcIdType nbOfSlices, T& startSlice, T& stopSlice);
+    MEDCOUPLING_EXPORT static mcIdType GetNumberOfItemGivenBES(T begin, T end, T step, const std::string& msg);
+    MEDCOUPLING_EXPORT static mcIdType GetNumberOfItemGivenBESRelative(T begin, T end, T step, const std::string& msg);
+    MEDCOUPLING_EXPORT static mcIdType GetPosOfItemGivenBESRelativeNoThrow(T value, T begin, T end, T step);
+  };
+
   class DataArrayByte;
 
   class DataArray : public RefCountObject, public TimeLabel
@@ -135,8 +143,8 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     MEDCOUPLING_EXPORT void setName(const std::string& name);
     MEDCOUPLING_EXPORT void copyStringInfoFrom(const DataArray& other);
-    MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom(const DataArray& other, const std::vector<int>& compoIds);
-    MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom2(const std::vector<int>& compoIds, const DataArray& other);
+    MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom(const DataArray& other, const std::vector<std::size_t>& compoIds);
+    MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom2(const std::vector<std::size_t>& compoIds, const DataArray& other);
     MEDCOUPLING_EXPORT bool areInfoEqualsIfNotWhy(const DataArray& other, std::string& reason) const;
     MEDCOUPLING_EXPORT bool areInfoEquals(const DataArray& other) const;
     MEDCOUPLING_EXPORT std::string cppRepr(const std::string& varName) const;
@@ -147,45 +155,45 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void setInfoAndChangeNbOfCompo(const std::vector<std::string>& info);
     MEDCOUPLING_EXPORT std::vector<std::string> getVarsOnComponent() const;
     MEDCOUPLING_EXPORT std::vector<std::string> getUnitsOnComponent() const;
-    MEDCOUPLING_EXPORT std::string getInfoOnComponent(int i) const;
-    MEDCOUPLING_EXPORT std::string getVarOnComponent(int i) const;
-    MEDCOUPLING_EXPORT std::string getUnitOnComponent(int i) const;
-    MEDCOUPLING_EXPORT void setInfoOnComponent(int i, const std::string& info);
+    MEDCOUPLING_EXPORT std::string getInfoOnComponent(std::size_t i) const;
+    MEDCOUPLING_EXPORT std::string getVarOnComponent(std::size_t i) const;
+    MEDCOUPLING_EXPORT std::string getUnitOnComponent(std::size_t i) const;
+    MEDCOUPLING_EXPORT void setInfoOnComponent(std::size_t i, const std::string& info);
     MEDCOUPLING_EXPORT std::size_t getNumberOfComponents() const { return _info_on_compo.size(); }
-    MEDCOUPLING_EXPORT void setPartOfValuesBase3(const DataArray *aBase, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
+    MEDCOUPLING_EXPORT void setPartOfValuesBase3(const DataArray *aBase, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true);
     MEDCOUPLING_EXPORT virtual void *getVoidStarPointer() = 0;
     MEDCOUPLING_EXPORT virtual DataArray *deepCopy() const = 0;
     MEDCOUPLING_EXPORT virtual DataArray *buildNewEmptyInstance() const = 0;
     MEDCOUPLING_EXPORT virtual bool isAllocated() const = 0;
     MEDCOUPLING_EXPORT virtual void checkAllocated() const = 0;
     MEDCOUPLING_EXPORT virtual void desallocate() = 0;
-    MEDCOUPLING_EXPORT virtual std::size_t getNumberOfTuples() const = 0;
-    MEDCOUPLING_EXPORT virtual std::size_t getNbOfElems() const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfTuples() const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNbOfElems() const = 0;
     MEDCOUPLING_EXPORT virtual std::size_t getNbOfElemAllocated() const = 0;
     MEDCOUPLING_EXPORT virtual void alloc(std::size_t nbOfTuple, std::size_t nbOfCompo=1) = 0;
     MEDCOUPLING_EXPORT virtual void reAlloc(std::size_t newNbOfTuple) = 0;
-    MEDCOUPLING_EXPORT virtual void renumberInPlace(const int *old2New) = 0;
-    MEDCOUPLING_EXPORT virtual void renumberInPlaceR(const int *new2Old) = 0;
-    MEDCOUPLING_EXPORT virtual void setContigPartOfSelectedValues(int tupleIdStart, const DataArray *aBase, const DataArrayInt32 *tuplesSelec) = 0;
-    MEDCOUPLING_EXPORT virtual void setContigPartOfSelectedValuesSlice(int tupleIdStart, const DataArray *aBase, int bg, int end2, int step) = 0;
-    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArray *keepSelectedComponents(const std::vector<int>& compoIds) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleId(const int *new2OldBg, const int *new2OldEnd) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleIdSafeSlice(int bg, int end2, int step) const = 0;
-    MEDCOUPLING_EXPORT virtual void rearrange(int newNbOfCompo) = 0;
-    MEDCOUPLING_EXPORT virtual void circularPermutation(int nbOfShift=1) = 0;
-    MEDCOUPLING_EXPORT virtual void circularPermutationPerTuple(int nbOfShift=1) = 0;
+    MEDCOUPLING_EXPORT virtual void renumberInPlace(const mcIdType *old2New) = 0;
+    MEDCOUPLING_EXPORT virtual void renumberInPlaceR(const mcIdType *new2Old) = 0;
+    MEDCOUPLING_EXPORT virtual void setContigPartOfSelectedValues(mcIdType tupleIdStart, const DataArray *aBase, const DataArrayIdType *tuplesSelec) = 0;
+    MEDCOUPLING_EXPORT virtual void setContigPartOfSelectedValuesSlice(mcIdType tupleIdStart, const DataArray *aBase, mcIdType bg, mcIdType end2, mcIdType step) = 0;
+    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArray *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArray *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const = 0;
+    MEDCOUPLING_EXPORT virtual void rearrange(std::size_t newNbOfCompo) = 0;
+    MEDCOUPLING_EXPORT virtual void circularPermutation(mcIdType nbOfShift=1) = 0;
+    MEDCOUPLING_EXPORT virtual void circularPermutationPerTuple(mcIdType nbOfShift=1) = 0;
     MEDCOUPLING_EXPORT virtual void reversePerTuple() = 0;
-    MEDCOUPLING_EXPORT void checkNbOfTuples(int nbOfTuples, const std::string& msg) const;
-    MEDCOUPLING_EXPORT void checkNbOfComps(int nbOfCompo, const std::string& msg) const;
+    MEDCOUPLING_EXPORT void checkNbOfTuples(mcIdType nbOfTuples, const std::string& msg) const;
+    MEDCOUPLING_EXPORT void checkNbOfComps(std::size_t nbOfCompo, const std::string& msg) const;
     MEDCOUPLING_EXPORT void checkNbOfTuplesAndComp(const DataArray& other, const std::string& msg) const;
-    MEDCOUPLING_EXPORT void checkNbOfTuplesAndComp(int nbOfTuples, int nbOfCompo, const std::string& msg) const;
-    MEDCOUPLING_EXPORT void checkNbOfElems(std::size_t nbOfElems, const std::string& msg) const;
-    MEDCOUPLING_EXPORT static void GetSlice(int start, int stop, int step, int sliceId, int nbOfSlices, int& startSlice, int& stopSlice);
-    MEDCOUPLING_EXPORT static int GetNumberOfItemGivenBES(int begin, int end, int step, const std::string& msg);
-    MEDCOUPLING_EXPORT static int GetNumberOfItemGivenBESRelative(int begin, int end, int step, const std::string& msg);
-    MEDCOUPLING_EXPORT static int GetPosOfItemGivenBESRelativeNoThrow(int value, int begin, int end, int step);
+    MEDCOUPLING_EXPORT void checkNbOfTuplesAndComp(mcIdType nbOfTuples, std::size_t nbOfCompo, const std::string& msg) const;
+    MEDCOUPLING_EXPORT void checkNbOfElems(mcIdType nbOfElems, const std::string& msg) const;
+    MEDCOUPLING_EXPORT static void GetSlice(mcIdType start, mcIdType stop, mcIdType step, mcIdType sliceId, mcIdType nbOfSlices, mcIdType& startSlice, mcIdType& stopSlice);
+    MEDCOUPLING_EXPORT static mcIdType GetNumberOfItemGivenBES(mcIdType begin, mcIdType end, mcIdType step, const std::string& msg);
+    MEDCOUPLING_EXPORT static mcIdType GetNumberOfItemGivenBESRelative(mcIdType begin, mcIdType end, mcIdType step, const std::string& msg);
+    MEDCOUPLING_EXPORT static mcIdType GetPosOfItemGivenBESRelativeNoThrow(mcIdType value, mcIdType begin, mcIdType end, mcIdType step);
     MEDCOUPLING_EXPORT static std::string GetVarNameFromInfo(const std::string& info);
     MEDCOUPLING_EXPORT static std::string GetUnitFromInfo(const std::string& info);
     MEDCOUPLING_EXPORT static std::string BuildInfoFromVarAndUnit(const std::string& var, const std::string& unit);
@@ -202,10 +210,10 @@ namespace MEDCoupling
     DataArray() { }
     ~DataArray() { }
   protected:
-    MEDCOUPLING_EXPORT static void CheckValueInRange(int ref, int value, const std::string& msg);
-    MEDCOUPLING_EXPORT static void CheckValueInRangeEx(int value, int start, int end, const std::string& msg);
-    MEDCOUPLING_EXPORT static void CheckClosingParInRange(int ref, int value, const std::string& msg);
-    MEDCOUPLING_EXPORT static int EffectiveCircPerm(int nbOfShift, int nbOfTuples);
+    MEDCOUPLING_EXPORT static void CheckValueInRange(mcIdType ref, mcIdType value, const std::string& msg);
+    MEDCOUPLING_EXPORT static void CheckValueInRangeEx(mcIdType value, mcIdType start, mcIdType end, const std::string& msg);
+    MEDCOUPLING_EXPORT static void CheckClosingParInRange(mcIdType ref, mcIdType value, const std::string& msg);
+    MEDCOUPLING_EXPORT static mcIdType EffectiveCircPerm(mcIdType nbOfShift, mcIdType nbOfTuples);
   protected:
     std::string _name;
     std::vector<std::string> _info_on_compo;
@@ -214,8 +222,6 @@ namespace MEDCoupling
 
 namespace MEDCoupling
 {
-  class DataArrayInt32;
-
   template<class T>
   class DataArrayTemplate : public DataArray
   {
@@ -228,8 +234,8 @@ namespace MEDCoupling
     std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT void updateTime() const { }
     //
-    MEDCOUPLING_EXPORT std::size_t getNumberOfTuples() const { return _info_on_compo.empty()?0:_mem.getNbOfElem()/getNumberOfComponents(); }
-    MEDCOUPLING_EXPORT std::size_t getNbOfElems() const { return _mem.getNbOfElem(); }
+    MEDCOUPLING_EXPORT mcIdType getNumberOfTuples() const { return ToIdType(_info_on_compo.empty()?0:_mem.getNbOfElem()/getNumberOfComponents()); }
+    MEDCOUPLING_EXPORT mcIdType getNbOfElems() const { return ToIdType(_mem.getNbOfElem()); }
     MEDCOUPLING_EXPORT bool empty() const;
     MEDCOUPLING_EXPORT void *getVoidStarPointer() { return getPointer(); }
     MEDCOUPLING_EXPORT const T *getConstPointer() const { return _mem.getConstPointer(); }
@@ -238,19 +244,19 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT T *rwBegin() { return getPointer(); }
     MEDCOUPLING_EXPORT T *rwEnd() { return getPointer()+getNbOfElems(); }
     MEDCOUPLING_EXPORT void alloc(std::size_t nbOfTuple, std::size_t nbOfCompo=1);
-    MEDCOUPLING_EXPORT void useArray(const T *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo);
-    MEDCOUPLING_EXPORT void useExternalArrayWithRWAccess(const T *array, int nbOfTuple, int nbOfCompo);
-    MEDCOUPLING_EXPORT T getIJSafe(int tupleId, int compoId) const;
-    MEDCOUPLING_EXPORT T getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; }
-    MEDCOUPLING_EXPORT void setIJ(int tupleId, int compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; declareAsNew(); }
-    MEDCOUPLING_EXPORT void setIJSilent(int tupleId, int compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; }
+    MEDCOUPLING_EXPORT void useArray(const T *array, bool ownership, DeallocType type, std::size_t nbOfTuple, std::size_t nbOfCompo);
+    MEDCOUPLING_EXPORT void useExternalArrayWithRWAccess(const T *array, std::size_t nbOfTuple, std::size_t nbOfCompo);
+    MEDCOUPLING_EXPORT T getIJSafe(std::size_t tupleId, std::size_t compoId) const;
+    MEDCOUPLING_EXPORT T getIJ(std::size_t tupleId, std::size_t compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; }
+    MEDCOUPLING_EXPORT void setIJ(std::size_t tupleId, std::size_t compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; declareAsNew(); }
+    MEDCOUPLING_EXPORT void setIJSilent(std::size_t tupleId, std::size_t compoId, T newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; }
     MEDCOUPLING_EXPORT T *getPointer() { return _mem.getPointer(); declareAsNew(); }
     MEDCOUPLING_EXPORT void pack() const;
     MEDCOUPLING_EXPORT bool isAllocated() const override;
     MEDCOUPLING_EXPORT void checkAllocated() const;
     MEDCOUPLING_EXPORT void desallocate();
     MEDCOUPLING_EXPORT void reserve(std::size_t nbOfElems);
-    MEDCOUPLING_EXPORT void rearrange(int newNbOfCompo);
+    MEDCOUPLING_EXPORT void rearrange(std::size_t newNbOfCompo);
     MEDCOUPLING_EXPORT void transpose();
     MEDCOUPLING_EXPORT void pushBackSilent(T val);
     MEDCOUPLING_EXPORT void pushBackValsSilent(const T *valsBg, const T *valsEnd);
@@ -258,45 +264,45 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT T front() const;
     MEDCOUPLING_EXPORT T back() const;
     MEDCOUPLING_EXPORT std::size_t getNbOfElemAllocated() const { return _mem.getNbOfElemAllocated(); }
-    MEDCOUPLING_EXPORT void allocIfNecessary(int nbOfTuple, int nbOfCompo);
+    MEDCOUPLING_EXPORT void allocIfNecessary(std::size_t nbOfTuple, std::size_t nbOfCompo);
     MEDCOUPLING_EXPORT void deepCopyFrom(const DataArrayTemplate<T>& other);
     MEDCOUPLING_EXPORT void reverse();
     MEDCOUPLING_EXPORT void fillWithValue(T val);
     MEDCOUPLING_EXPORT void reAlloc(std::size_t newNbOfTuple);
-    MEDCOUPLING_EXPORT void renumberInPlace(const int *old2New);
-    MEDCOUPLING_EXPORT void renumberInPlaceR(const int *new2Old);
+    MEDCOUPLING_EXPORT void renumberInPlace(const mcIdType *old2New);
+    MEDCOUPLING_EXPORT void renumberInPlaceR(const mcIdType *new2Old);
     MEDCOUPLING_EXPORT void sort(bool asc=true);
-    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *renumber(const int *old2New) const;
-    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *renumberR(const int *new2Old) const;
-    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *renumberAndReduce(const int *old2New, int newNbOfTuple) const;
-    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *changeNbOfComponents(int newNbOfComp, T dftValue) const;
-    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *subArray(int tupleIdBg, int tupleIdEnd=-1) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *renumber(const mcIdType *old2New) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *renumberR(const mcIdType *new2Old) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *renumberAndReduce(const mcIdType *old2New, mcIdType newNbOfTuple) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *changeNbOfComponents(std::size_t newNbOfComp, T dftValue) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *subArray(mcIdType tupleIdBg, mcIdType tupleIdEnd=-1) const;
     MEDCOUPLING_EXPORT MCAuto<typename Traits<T>::ArrayTypeCh> selectPartDef(const PartDefinition* pd) const;
-    MEDCOUPLING_EXPORT void circularPermutation(int nbOfShift=1);
-    MEDCOUPLING_EXPORT void circularPermutationPerTuple(int nbOfShift=1);
+    MEDCOUPLING_EXPORT void circularPermutation(mcIdType nbOfShift=1);
+    MEDCOUPLING_EXPORT void circularPermutationPerTuple(mcIdType nbOfShift=1);
     MEDCOUPLING_EXPORT void reversePerTuple();
-    MEDCOUPLING_EXPORT void setPartOfValues1(const typename Traits<T>::ArrayType *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
-    MEDCOUPLING_EXPORT void setPartOfValuesSimple1(T a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp);
-    MEDCOUPLING_EXPORT void setPartOfValues2(const typename Traits<T>::ArrayType *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true);
-    MEDCOUPLING_EXPORT void setPartOfValuesSimple2(T a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp);
-    MEDCOUPLING_EXPORT void setPartOfValues3(const typename Traits<T>::ArrayType *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
-    MEDCOUPLING_EXPORT void setPartOfValuesSimple3(T a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp);
-    MEDCOUPLING_EXPORT void setPartOfValues4(const typename Traits<T>::ArrayType *a, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp, bool strictCompoCompare=true);
-    MEDCOUPLING_EXPORT void setPartOfValuesSimple4(T a, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp);
-    MEDCOUPLING_EXPORT void setPartOfValuesAdv(const typename Traits<T>::ArrayType *a, const DataArrayInt32 *tuplesSelec);
-    MEDCOUPLING_EXPORT void setContigPartOfSelectedValues(int tupleIdStart, const DataArray *aBase, const DataArrayInt32 *tuplesSelec);
-    MEDCOUPLING_EXPORT void setContigPartOfSelectedValuesSlice(int tupleIdStart, const DataArray *aBase, int bg, int end2, int step);
-    MEDCOUPLING_EXPORT T getMaxValue(int& tupleId) const;
+    MEDCOUPLING_EXPORT void setPartOfValues1(const typename Traits<T>::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true);
+    MEDCOUPLING_EXPORT void setPartOfValuesSimple1(T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp);
+    MEDCOUPLING_EXPORT void setPartOfValues2(const typename Traits<T>::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare=true);
+    MEDCOUPLING_EXPORT void setPartOfValuesSimple2(T a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp);
+    MEDCOUPLING_EXPORT void setPartOfValues3(const typename Traits<T>::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true);
+    MEDCOUPLING_EXPORT void setPartOfValuesSimple3(T a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp);
+    MEDCOUPLING_EXPORT void setPartOfValues4(const typename Traits<T>::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare=true);
+    MEDCOUPLING_EXPORT void setPartOfValuesSimple4(T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp);
+    MEDCOUPLING_EXPORT void setPartOfValuesAdv(const typename Traits<T>::ArrayType *a, const DataArrayIdType *tuplesSelec);
+    MEDCOUPLING_EXPORT void setContigPartOfSelectedValues(mcIdType tupleIdStart, const DataArray *aBase, const DataArrayIdType *tuplesSelec);
+    MEDCOUPLING_EXPORT void setContigPartOfSelectedValuesSlice(mcIdType tupleIdStart, const DataArray *aBase, mcIdType bg, mcIdType end2, mcIdType step);
+    MEDCOUPLING_EXPORT T getMaxValue(mcIdType& tupleId) const;
     MEDCOUPLING_EXPORT T getMaxValueInArray() const;
     MEDCOUPLING_EXPORT T getMaxAbsValue(std::size_t& tupleId) const;
     MEDCOUPLING_EXPORT T getMaxAbsValueInArray() const;
-    MEDCOUPLING_EXPORT T getMinValue(int& tupleId) const;
+    MEDCOUPLING_EXPORT T getMinValue(mcIdType& tupleId) const;
     MEDCOUPLING_EXPORT T getMinValueInArray() const;
-    MEDCOUPLING_EXPORT void getTuple(int tupleId, T *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); }
+    MEDCOUPLING_EXPORT void getTuple(mcIdType tupleId, T *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); }
     template<class InputIterator>
     void insertAtTheEnd(InputIterator first, InputIterator last);
     MEDCOUPLING_EXPORT static void SetArrayIn(typename Traits<T>::ArrayType *newArray, typename Traits<T>::ArrayType* &arrayToSet);
-    MEDCOUPLING_EXPORT void writeOnPlace(std::size_t id, T element0, const T *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); }
+    MEDCOUPLING_EXPORT void writeOnPlace(std::size_t id, T element0, const T *others, mcIdType sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); }
     MEDCOUPLING_EXPORT void fillWithZero();
   public:
     MEDCOUPLING_EXPORT MemArray<T>& accessToMemArray() { return _mem; }
@@ -304,10 +310,10 @@ namespace MEDCoupling
   protected:
     typename Traits<T>::ArrayType *mySelectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const;
     typename Traits<T>::ArrayType *mySelectByTupleId(const DataArrayIdType& di) const;
-    typename Traits<T>::ArrayType *mySelectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const;
-    typename Traits<T>::ArrayType *myKeepSelectedComponents(const std::vector<int>& compoIds) const;
-    typename Traits<T>::ArrayType *mySelectByTupleIdSafeSlice(int bg, int end2, int step) const;
-    typename Traits<T>::ArrayType *mySelectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const;
+    typename Traits<T>::ArrayType *mySelectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const;
+    typename Traits<T>::ArrayType *myKeepSelectedComponents(const std::vector<std::size_t>& compoIds) const;
+    typename Traits<T>::ArrayType *mySelectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const;
+    typename Traits<T>::ArrayType *mySelectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const;
   protected:
     MemArray<T> _mem;
   };
@@ -317,9 +323,9 @@ namespace MEDCoupling
   {
   public:
     MEDCOUPLING_EXPORT MCAuto<DataArrayDouble> convertToDblArr() const;
-    MEDCOUPLING_EXPORT MCAuto<DataArrayInt32> convertToIntArr() const;
+    MEDCOUPLING_EXPORT MCAuto<DataArrayInt> convertToIntArr() const;
     MEDCOUPLING_EXPORT MCAuto<DataArrayFloat> convertToFloatArr() const;
-    MEDCOUPLING_EXPORT void applyLin(T a, T b, int compoId);
+    MEDCOUPLING_EXPORT void applyLin(T a, T b, std::size_t compoId);
     MEDCOUPLING_EXPORT void applyLin(T a, T b);
     MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *negate() const;
     MEDCOUPLING_EXPORT void addEqual(const typename Traits<T>::ArrayType *other);
@@ -332,15 +338,15 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT static typename Traits<T>::ArrayType *Multiply(const typename Traits<T>::ArrayType *a1, const typename Traits<T>::ArrayType *a2);
     MEDCOUPLING_EXPORT static typename Traits<T>::ArrayType *Meld(const typename Traits<T>::ArrayType *a1, const typename Traits<T>::ArrayType *a2);
     MEDCOUPLING_EXPORT static typename Traits<T>::ArrayType *Meld(const std::vector<const typename Traits<T>::ArrayType *>& arr);
-    MEDCOUPLING_EXPORT MCAuto<DataArrayInt32> findIdsGreaterOrEqualTo(T val) const;
-    MEDCOUPLING_EXPORT MCAuto<DataArrayInt32> findIdsGreaterThan(T val) const;
-    MEDCOUPLING_EXPORT MCAuto<DataArrayInt32> findIdsLowerOrEqualTo(T val) const;
-    MEDCOUPLING_EXPORT MCAuto<DataArrayInt32> findIdsLowerThan(T val) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsStrictlyNegative() const;
+    MEDCOUPLING_EXPORT MCAuto<DataArrayIdType> findIdsGreaterOrEqualTo(T val) const;
+    MEDCOUPLING_EXPORT MCAuto<DataArrayIdType> findIdsGreaterThan(T val) const;
+    MEDCOUPLING_EXPORT MCAuto<DataArrayIdType> findIdsLowerOrEqualTo(T val) const;
+    MEDCOUPLING_EXPORT MCAuto<DataArrayIdType> findIdsLowerThan(T val) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsStrictlyNegative() const;
     MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *fromNoInterlace() const;
     MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *toNoInterlace() const;
     MEDCOUPLING_EXPORT void meldWith(const typename Traits<T>::ArrayType *other);
-    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *duplicateEachTupleNTimes(int nbTimes) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *duplicateEachTupleNTimes(mcIdType nbTimes) const;
     MEDCOUPLING_EXPORT void aggregate(const typename Traits<T>::ArrayType *other);
     MEDCOUPLING_EXPORT void abs();
     MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *computeAbs() const;
@@ -361,7 +367,7 @@ namespace MEDCoupling
   protected:
     static typename Traits<T>::ArrayType *PerformCopyOrIncrRef(bool dCpy, const typename Traits<T>::ArrayType& self);
     template<class OP>
-    MCAuto<DataArrayInt32> findIdsAdv(const OP& op) const;
+    MCAuto<DataArrayIdType> findIdsAdv(const OP& op) const;
   private:
     template<class FCT>
     void somethingEqual(const typename Traits<T>::ArrayType *other);
@@ -385,11 +391,11 @@ namespace MEDCoupling
   public:// abstract method overload
     MEDCOUPLING_EXPORT DataArrayFloat *deepCopy() const;
     MEDCOUPLING_EXPORT DataArrayFloat *buildNewEmptyInstance() const { return DataArrayFloat::New(); }
-    MEDCOUPLING_EXPORT DataArrayFloat *selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const { return DataArrayTemplateFP<float>::mySelectByTupleRanges(ranges); }
-    MEDCOUPLING_EXPORT DataArrayFloat *keepSelectedComponents(const std::vector<int>& compoIds) const { return DataArrayTemplateFP<float>::myKeepSelectedComponents(compoIds); }
+    MEDCOUPLING_EXPORT DataArrayFloat *selectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const { return DataArrayTemplateFP<float>::mySelectByTupleRanges(ranges); }
+    MEDCOUPLING_EXPORT DataArrayFloat *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const { return DataArrayTemplateFP<float>::myKeepSelectedComponents(compoIds); }
     MEDCOUPLING_EXPORT DataArrayFloat *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
-    MEDCOUPLING_EXPORT DataArrayFloat *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplateFP<float>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
-    MEDCOUPLING_EXPORT DataArrayFloat *selectByTupleIdSafeSlice(int bg, int end2, int step) const { return DataArrayTemplateFP<float>::mySelectByTupleIdSafeSlice(bg,end2,step); }
+    MEDCOUPLING_EXPORT DataArrayFloat *selectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return DataArrayTemplateFP<float>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
+    MEDCOUPLING_EXPORT DataArrayFloat *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const { return DataArrayTemplateFP<float>::mySelectByTupleIdSafeSlice(bg,end2,step); }
     MEDCOUPLING_EXPORT void reprCppStream(const std::string& varName, std::ostream& stream) const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT void reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const;
@@ -417,7 +423,7 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT DataArrayDouble *buildNewEmptyInstance() const { return DataArrayDouble::New(); }
     MEDCOUPLING_EXPORT void checkMonotonic(bool increasing, double eps) const;
     MEDCOUPLING_EXPORT bool isMonotonic(bool increasing, double eps) const;
-    MEDCOUPLING_EXPORT void writeVTK(std::ostream& ofs, int indent, const std::string& nameInFile, DataArrayByte *byteArr) const;
+    MEDCOUPLING_EXPORT void writeVTK(std::ostream& ofs, mcIdType indent, const std::string& nameInFile, DataArrayByte *byteArr) const;
     MEDCOUPLING_EXPORT void reprCppStream(const std::string& varName, std::ostream& stream) const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT void reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const;
@@ -426,36 +432,36 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const DataArrayDouble& other, double prec) const;
     MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
     MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleId(const DataArrayIdType& di) const { return this->mySelectByTupleId(di); }
-    MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplateFP<double>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
-    MEDCOUPLING_EXPORT DataArrayDouble *keepSelectedComponents(const std::vector<int>& compoIds) const { return DataArrayTemplateFP<double>::myKeepSelectedComponents(compoIds); }
-    MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleIdSafeSlice(int bg, int end2, int step) const { return DataArrayTemplateFP<double>::mySelectByTupleIdSafeSlice(bg,end2,step); }
-    MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const { return DataArrayTemplateFP<double>::mySelectByTupleRanges(ranges); }
-    MEDCOUPLING_EXPORT bool areIncludedInMe(const DataArrayDouble *other, double prec, DataArrayInt32 *&tupleIds) const;
-    MEDCOUPLING_EXPORT void findCommonTuples(double prec, int limitTupleId, DataArrayInt32 *&comm, DataArrayInt32 *&commIndex) const;
-    MEDCOUPLING_EXPORT double minimalDistanceTo(const DataArrayDouble *other, int& thisTupleId, int& otherTupleId) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getDifferentValues(double prec, int limitTupleId=-1) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findClosestTupleId(const DataArrayDouble *other) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *computeNbOfInteractionsWith(const DataArrayDouble *otherBBoxFrmt, double eps) const;
-    MEDCOUPLING_EXPORT void setSelectedComponents(const DataArrayDouble *a, const std::vector<int>& compoIds);
+    MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return DataArrayTemplateFP<double>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
+    MEDCOUPLING_EXPORT DataArrayDouble *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const { return DataArrayTemplateFP<double>::myKeepSelectedComponents(compoIds); }
+    MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const { return DataArrayTemplateFP<double>::mySelectByTupleIdSafeSlice(bg,end2,step); }
+    MEDCOUPLING_EXPORT DataArrayDouble *selectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const { return DataArrayTemplateFP<double>::mySelectByTupleRanges(ranges); }
+    MEDCOUPLING_EXPORT bool areIncludedInMe(const DataArrayDouble *other, double prec, DataArrayIdType *&tupleIds) const;
+    MEDCOUPLING_EXPORT void findCommonTuples(double prec, mcIdType limitTupleId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const;
+    MEDCOUPLING_EXPORT double minimalDistanceTo(const DataArrayDouble *other, mcIdType& thisTupleId, mcIdType& otherTupleId) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getDifferentValues(double prec, mcIdType limitTupleId=-1) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findClosestTupleId(const DataArrayDouble *other) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfInteractionsWith(const DataArrayDouble *otherBBoxFrmt, double eps) const;
+    MEDCOUPLING_EXPORT void setSelectedComponents(const DataArrayDouble *a, const std::vector<std::size_t>& compoIds);
     MEDCOUPLING_EXPORT DataArrayDoubleIterator *iterator();
     MEDCOUPLING_EXPORT void checkNoNullValues() const;
     MEDCOUPLING_EXPORT void getMinMaxPerComponent(double *bounds) const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeBBoxPerTuple(double epsilon=0.0) const;
-    MEDCOUPLING_EXPORT void computeTupleIdsNearTuples(const DataArrayDouble *other, double eps, DataArrayInt32 *& c, DataArrayInt32 *& cI) const;
+    MEDCOUPLING_EXPORT void computeTupleIdsNearTuples(const DataArrayDouble *other, double eps, DataArrayIdType *& c, DataArrayIdType *& cI) const;
     MEDCOUPLING_EXPORT void recenterForMaxPrecision(double eps);
-    MEDCOUPLING_EXPORT double getMaxValue2(DataArrayInt32*& tupleIds) const;
-    MEDCOUPLING_EXPORT double getMinValue2(DataArrayInt32*& tupleIds) const;
-    MEDCOUPLING_EXPORT int count(double value, double eps) const;
+    MEDCOUPLING_EXPORT double getMaxValue2(DataArrayIdType*& tupleIds) const;
+    MEDCOUPLING_EXPORT double getMinValue2(DataArrayIdType*& tupleIds) const;
+    MEDCOUPLING_EXPORT mcIdType count(double value, double eps) const;
     MEDCOUPLING_EXPORT double getAverageValue() const;
     MEDCOUPLING_EXPORT double norm2() const;
     MEDCOUPLING_EXPORT double normMax() const;
     MEDCOUPLING_EXPORT void normMaxPerComponent(double * res) const;
     MEDCOUPLING_EXPORT double normMin() const;
     MEDCOUPLING_EXPORT void accumulate(double *res) const;
-    MEDCOUPLING_EXPORT double accumulate(int compId) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *accumulatePerChunck(const int *bgOfIndex, const int *endOfIndex) const;
+    MEDCOUPLING_EXPORT double accumulate(std::size_t compId) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *accumulatePerChunck(const mcIdType *bgOfIndex, const mcIdType *endOfIndex) const;
     MEDCOUPLING_EXPORT MCAuto<DataArrayDouble> cumSum() const;
-    MEDCOUPLING_EXPORT double distanceToTuple(const double *tupleBg, const double *tupleEnd, int& tupleId) const;
+    MEDCOUPLING_EXPORT double distanceToTuple(const double *tupleBg, const double *tupleEnd, mcIdType& tupleId) const;
     MEDCOUPLING_EXPORT DataArrayDouble *fromPolarToCart() const;
     MEDCOUPLING_EXPORT DataArrayDouble *fromCylToCart() const;
     MEDCOUPLING_EXPORT DataArrayDouble *fromSpherToCart() const;
@@ -473,7 +479,7 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT DataArrayDouble *deviator() const;
     MEDCOUPLING_EXPORT DataArrayDouble *magnitude() const;
     MEDCOUPLING_EXPORT DataArrayDouble *maxPerTuple() const;
-    MEDCOUPLING_EXPORT DataArrayDouble *maxPerTupleWithCompoId(DataArrayInt32* &compoIdOfMaxPerTuple) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *maxPerTupleWithCompoId(DataArrayIdType* &compoIdOfMaxPerTuple) const;
     MEDCOUPLING_EXPORT DataArrayDouble *buildEuclidianDistanceDenseMatrix() const;
     MEDCOUPLING_EXPORT DataArrayDouble *buildEuclidianDistanceDenseMatrixWith(const DataArrayDouble *other) const;
     MEDCOUPLING_EXPORT void asArcOfCircle(double center[2], double& radius, double& ang) const;
@@ -481,17 +487,17 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void applyInv(double numerator);
     MEDCOUPLING_EXPORT void applyPow(double val);
     MEDCOUPLING_EXPORT void applyRPow(double val);
-    MEDCOUPLING_EXPORT DataArrayDouble *applyFunc(int nbOfComp, FunctionToEvaluate func) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *applyFunc(int nbOfComp, const std::string& func, bool isSafe=true) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *applyFunc(std::size_t nbOfComp, FunctionToEvaluate func) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *applyFunc(std::size_t nbOfComp, const std::string& func, bool isSafe=true) const;
     MEDCOUPLING_EXPORT DataArrayDouble *applyFunc(const std::string& func, bool isSafe=true) const;
     MEDCOUPLING_EXPORT void applyFuncOnThis(const std::string& func, bool isSafe=true);
-    MEDCOUPLING_EXPORT DataArrayDouble *applyFuncCompo(int nbOfComp, const std::string& func, bool isSafe=true) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func, bool isSafe=true) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *applyFuncCompo(std::size_t nbOfComp, const std::string& func, bool isSafe=true) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *applyFuncNamedCompo(std::size_t nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func, bool isSafe=true) const;
     MEDCOUPLING_EXPORT void applyFuncFast32(const std::string& func);
     MEDCOUPLING_EXPORT void applyFuncFast64(const std::string& func);
     MEDCOUPLING_EXPORT MCAuto<DataArrayDouble> symmetry3DPlane(const double point[3], const double normalVector[3]) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsInRange(double vmin, double vmax) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsNotInRange(double vmin, double vmax) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsInRange(double vmin, double vmax) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsNotInRange(double vmin, double vmax) const;
     MEDCOUPLING_EXPORT static DataArrayDouble *Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2);
     MEDCOUPLING_EXPORT static DataArrayDouble *Aggregate(const std::vector<const DataArrayDouble *>& arr);
     MEDCOUPLING_EXPORT static DataArrayDouble *Dot(const DataArrayDouble *a1, const DataArrayDouble *a2);
@@ -501,34 +507,40 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT static DataArrayDouble *Pow(const DataArrayDouble *a1, const DataArrayDouble *a2);
     MEDCOUPLING_EXPORT void powEqual(const DataArrayDouble *other);
     MEDCOUPLING_EXPORT std::vector<bool> toVectorOfBool(double eps) const;
-    MEDCOUPLING_EXPORT static void Rotate2DAlg(const double *center, double angle, int nbNodes, const double *coordsIn, double *coordsOut);
-    MEDCOUPLING_EXPORT static void Rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, const double *coordsIn, double *coordsOut);
-    MEDCOUPLING_EXPORT static void Symmetry3DPlane(const double point[3], const double normalVector[3], int nbNodes, const double *coordsIn, double *coordsOut);
+    MEDCOUPLING_EXPORT static void Rotate2DAlg(const double *center, double angle, mcIdType nbNodes, const double *coordsIn, double *coordsOut);
+    MEDCOUPLING_EXPORT static void Rotate3DAlg(const double *center, const double *vect, double angle, mcIdType nbNodes, const double *coordsIn, double *coordsOut);
+    MEDCOUPLING_EXPORT static void Symmetry3DPlane(const double point[3], const double normalVector[3], mcIdType nbNodes, const double *coordsIn, double *coordsOut);
     MEDCOUPLING_EXPORT static void GiveBaseForPlane(const double normalVector[3], double baseOfPlane[9]);
     MEDCOUPLING_EXPORT static void ComputeIntegralOfSeg2IntoTri3(const double seg2[4], const double tri3[6], double coeffs[3], double& length);
   public:
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
-    MEDCOUPLING_EXPORT bool resizeForUnserialization(const std::vector<int>& tinyInfoI);
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
-  public:
-    template<int SPACEDIM>
-    void findCommonTuplesAlg(const double *bbox, int nbNodes, int limitNodeId, double prec, DataArrayInt32 *c, DataArrayInt32 *cI) const;
-    template<int SPACEDIM>
-    static void FindClosestTupleIdAlg(const BBTreePts<SPACEDIM,int>& myTree, double dist, const double *pos, int nbOfTuples, const double *thisPt, int thisNbOfTuples, int *res);
-    template<int SPACEDIM>
-    static void FindTupleIdsNearTuplesAlg(const BBTreePts<SPACEDIM,int>& myTree, const double *pos, int nbOfTuples, double eps,
-                                          DataArrayInt32 *c, DataArrayInt32 *cI);
+    MEDCOUPLING_EXPORT bool resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI);
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
+  public:
+    template<mcIdType SPACEDIM>
+    void findCommonTuplesAlg(const double *bbox, mcIdType nbNodes, mcIdType limitNodeId, double prec, DataArrayIdType *c, DataArrayIdType *cI) const;
+    template<mcIdType SPACEDIM>
+    static void FindClosestTupleIdAlg(const BBTreePts<SPACEDIM,mcIdType>& myTree, double dist, const double *pos, mcIdType nbOfTuples, const double *thisPt, mcIdType thisNbOfTuples, mcIdType *res);
+    template<mcIdType SPACEDIM>
+    static void FindTupleIdsNearTuplesAlg(const BBTreePts<SPACEDIM,mcIdType>& myTree, const double *pos, mcIdType nbOfTuples, double eps,
+                                          DataArrayIdType *c, DataArrayIdType *cI);
   private:
     ~DataArrayDouble() { }
     DataArrayDouble() { }
   };
+}
 
+namespace MEDCoupling
+{
   template<class T>
   class DataArrayDiscrete : public DataArrayTemplateClassic<T>
   {
   public:
-    MEDCOUPLING_EXPORT static typename Traits<T>::ArrayType *New();
+    typedef typename Traits<T>::ArrayType DataArrayType;
+  public:
+    MEDCOUPLING_EXPORT static DataArrayType *New();
+    MEDCOUPLING_EXPORT T intValue() const;
     MEDCOUPLING_EXPORT bool isEqual(const DataArrayDiscrete<T>& other) const;
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const DataArrayDiscrete<T>& other, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const DataArrayDiscrete<T>& other) const;
@@ -541,14 +553,126 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isMonotonic(bool increasing) const;
     MEDCOUPLING_EXPORT void checkStrictlyMonotonic(bool increasing) const;
     MEDCOUPLING_EXPORT bool isStrictlyMonotonic(bool increasing) const;
-    MEDCOUPLING_EXPORT int getHashCode() const;
+    MEDCOUPLING_EXPORT mcIdType getHashCode() const;
     MEDCOUPLING_EXPORT void reprCppStream(const std::string& varName, std::ostream& stream) const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     MEDCOUPLING_EXPORT void reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const;
-    MEDCOUPLING_EXPORT void writeVTK(std::ostream& ofs, int indent, const std::string& type, const std::string& nameInFile, DataArrayByte *byteArr) const;
+    MEDCOUPLING_EXPORT void writeVTK(std::ostream& ofs, mcIdType indent, const std::string& type, const std::string& nameInFile, DataArrayByte *byteArr) const;
     MEDCOUPLING_EXPORT void transformWithIndArr(const T *indArrBg, const T *indArrEnd);
-    MEDCOUPLING_EXPORT void transformWithIndArr(const MapKeyVal<T>& m);
+    MEDCOUPLING_EXPORT void transformWithIndArr(const MapKeyVal<T, T>& m);
     MEDCOUPLING_EXPORT DataArrayIdType *findIdsEqual(T val) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *transformWithIndArrR(const T *indArr2Bg, const T *indArrEnd) const;
+    MEDCOUPLING_EXPORT void splitByValueRange(const T *arrBg, const T *arrEnd,
+                                              DataArrayType *& castArr, DataArrayType *& rankInsideCast, DataArrayType *& castsPresent) const;
+    MEDCOUPLING_EXPORT bool isRange(T& strt, T& sttoopp, T& stteepp) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *invertArrayO2N2N2O(mcIdType newNbOfElem) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *invertArrayN2O2O2N(mcIdType oldNbOfElem) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *invertArrayO2N2N2OBis(mcIdType newNbOfElem) const;
+    MEDCOUPLING_EXPORT MCAuto< MapKeyVal<T, mcIdType> > invertArrayN2O2O2NOptimized() const;
+    MEDCOUPLING_EXPORT MCAuto< MapKeyVal<mcIdType, T> > giveN2OOptimized() const;
+    MEDCOUPLING_EXPORT MCAuto<DataArrayIdType> findIdForEach(const T *valsBg, const T *valsEnd) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *checkAndPreparePermutation() const;
+    MEDCOUPLING_EXPORT void changeSurjectiveFormat(T targetNb, DataArrayIdType *&arr, DataArrayIdType *&arrI) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *buildPermArrPerLevel() const;
+    MEDCOUPLING_EXPORT bool isIota(mcIdType sizeExpected) const;
+    MEDCOUPLING_EXPORT bool isUniform(T val) const;
+    MEDCOUPLING_EXPORT T checkUniformAndGuess() const;
+    MEDCOUPLING_EXPORT bool hasUniqueValues() const;
+    MEDCOUPLING_EXPORT void setSelectedComponents(const DataArrayType *a, const std::vector<std::size_t>& compoIds);
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsNotEqual(T val) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsEqualTuple(const T *tupleBg, const T *tupleEnd) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsEqualList(const T *valsBg, const T *valsEnd) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsNotEqualList(const T *valsBg, const T *valsEnd) const;
+    MEDCOUPLING_EXPORT mcIdType findIdFirstEqual(T value) const;
+    MEDCOUPLING_EXPORT mcIdType findIdFirstEqual(const std::vector<T>& vals) const;
+    MEDCOUPLING_EXPORT mcIdType findIdFirstEqualTuple(const std::vector<T>& tupl) const;
+    MEDCOUPLING_EXPORT mcIdType findIdSequence(const std::vector<T>& vals) const;
+    MEDCOUPLING_EXPORT mcIdType changeValue(T oldValue, T newValue);
+    MEDCOUPLING_EXPORT mcIdType count(T value) const;
+    MEDCOUPLING_EXPORT bool presenceOfTuple(const std::vector<T>& tupl) const;
+    MEDCOUPLING_EXPORT bool presenceOfValue(T value) const;
+    MEDCOUPLING_EXPORT bool presenceOfValue(const std::vector<T>& vals) const;
+    MEDCOUPLING_EXPORT void accumulate(T *res) const;
+    MEDCOUPLING_EXPORT T accumulate(std::size_t compId) const;
+    MEDCOUPLING_EXPORT DataArrayType *accumulatePerChunck(const mcIdType *bgOfIndex, const mcIdType *endOfIndex) const;
+    MEDCOUPLING_EXPORT void getMinMaxValues(T& minValue, T& maxValue) const;
+    MEDCOUPLING_EXPORT void applyInv(T numerator);
+    MEDCOUPLING_EXPORT void applyDivideBy(T val);
+    MEDCOUPLING_EXPORT void applyModulus(T val);
+    MEDCOUPLING_EXPORT void applyRModulus(T val);
+    MEDCOUPLING_EXPORT void applyPow(T val);
+    MEDCOUPLING_EXPORT void applyRPow(T val);
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsInRange(T vmin, T vmax) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsNotInRange(T vmin, T vmax) const;
+    MEDCOUPLING_EXPORT bool checkAllIdsInRange(T vmin, T vmax) const;
+    MEDCOUPLING_EXPORT static DataArrayType *Aggregate(const DataArrayType *a1, const DataArrayType *a2, T offsetA2);
+    MEDCOUPLING_EXPORT static DataArrayType *Aggregate(const std::vector<const DataArrayType *>& arr);
+    MEDCOUPLING_EXPORT static DataArrayType *AggregateIndexes(const std::vector<const DataArrayType *>& arrs);
+    MEDCOUPLING_EXPORT static DataArrayType *BuildUnion(const std::vector<const DataArrayType *>& arr);
+    MEDCOUPLING_EXPORT static DataArrayType *BuildIntersection(const std::vector<const DataArrayType *>& arr);
+    MEDCOUPLING_EXPORT static void PutIntoToSkylineFrmt(const std::vector< std::vector<T> >& v, DataArrayType *& data, DataArrayIdType *& dataIndex);
+    MEDCOUPLING_EXPORT DataArrayIdType *buildComplement(mcIdType nbOfElement) const;
+    MEDCOUPLING_EXPORT DataArrayType *buildSubstraction(const DataArrayType *other) const;
+    MEDCOUPLING_EXPORT DataArrayType *buildSubstractionOptimized(const DataArrayType *other) const;
+    MEDCOUPLING_EXPORT DataArrayType *buildUnion(const DataArrayType *other) const;
+    MEDCOUPLING_EXPORT DataArrayType *buildIntersection(const DataArrayType *other) const;
+    MEDCOUPLING_EXPORT DataArrayType *buildUnique() const;
+    MEDCOUPLING_EXPORT DataArrayType *buildUniqueNotSorted() const;
+    MEDCOUPLING_EXPORT DataArrayType *deltaShiftIndex() const;
+    MEDCOUPLING_EXPORT void computeOffsets();
+    MEDCOUPLING_EXPORT void computeOffsetsFull();
+    MEDCOUPLING_EXPORT void findIdsRangesInListOfIds(const DataArrayType *listOfIds, DataArrayIdType *& rangeIdsFetched, DataArrayType *& idsInInputListThatFetch) const;
+    MEDCOUPLING_EXPORT DataArrayType *buildExplicitArrByRanges(const DataArrayType *offsets) const;
+    MEDCOUPLING_EXPORT DataArrayType *buildExplicitArrOfSliceOnScaledArr(T begin, T stop, T step) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findRangeIdForEachTuple(const DataArrayType *ranges) const;
+    MEDCOUPLING_EXPORT DataArrayType *findIdInRangeForEachTuple(const DataArrayType *ranges) const;
+    MEDCOUPLING_EXPORT void sortEachPairToMakeALinkedList();
+    MEDCOUPLING_EXPORT MCAuto<DataArrayType> fromLinkedListOfPairToList() const;
+    MEDCOUPLING_EXPORT DataArrayType *getDifferentValues() const;
+    MEDCOUPLING_EXPORT std::vector<DataArrayIdType *> partitionByDifferentValues(std::vector<T>& differentIds) const;
+    MEDCOUPLING_EXPORT std::vector< std::pair<mcIdType,mcIdType> > splitInBalancedSlices(mcIdType nbOfSlices) const;
+    MEDCOUPLING_EXPORT static DataArrayType *Modulus(const DataArrayType *a1, const DataArrayType *a2);
+    MEDCOUPLING_EXPORT void modulusEqual(const DataArrayType *other);
+    MEDCOUPLING_EXPORT static DataArrayType *Pow(const DataArrayType *a1, const DataArrayType *a2);
+    MEDCOUPLING_EXPORT void powEqual(const DataArrayType *other);
+    //MEDCOUPLING_EXPORT MemArray<T>& accessToMemArray() { return _mem; }
+    //MEDCOUPLING_EXPORT const MemArray<T>& accessToMemArray() const { return _mem; }
+  public:
+    MEDCOUPLING_EXPORT static DataArrayIdType *FindPermutationFromFirstToSecond(const DataArrayType *ids1, const DataArrayType *ids2);
+    MEDCOUPLING_EXPORT static mcIdType *CheckAndPreparePermutation(const T *start, const T *end);
+    MEDCOUPLING_EXPORT static DataArrayType *BuildListOfSwitchedOn(const std::vector<bool>& v);
+    MEDCOUPLING_EXPORT static DataArrayType *BuildListOfSwitchedOff(const std::vector<bool>& v);
+    MEDCOUPLING_EXPORT static DataArrayIdType *ConvertIndexArrayToO2N(mcIdType nbOfOldTuples, const mcIdType *arr, const mcIdType *arrIBg, const mcIdType *arrIEnd, mcIdType &newNbOfTuples);
+    MEDCOUPLING_EXPORT static DataArrayIdType *MakePartition(const std::vector<const DataArrayType *>& groups, mcIdType newNb, std::vector< std::vector<mcIdType> >& fidsOfGroups);
+  public:
+    MEDCOUPLING_EXPORT static void ExtractFromIndexedArrays(const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd,
+                                                            const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                            DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut);
+    MEDCOUPLING_EXPORT static void ExtractFromIndexedArraysSlice(mcIdType idsOfSelectStart, mcIdType idsOfSelectStop, mcIdType idsOfSelectStep,
+                                                                 const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                                 DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut);
+    MEDCOUPLING_EXPORT static void SetPartOfIndexedArrays(const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd,
+                                                          const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                          const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex,
+                                                          DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut);
+    MEDCOUPLING_EXPORT static void SetPartOfIndexedArraysSlice(mcIdType start, mcIdType end, mcIdType step,
+                                                               const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                               const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex,
+                                                               DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut);
+    MEDCOUPLING_EXPORT static void SetPartOfIndexedArraysSameIdx(const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd,
+                                                                 DataArrayType *arrInOut, const DataArrayIdType *arrIndxIn,
+                                                                 const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex);
+    MEDCOUPLING_EXPORT static void SetPartOfIndexedArraysSameIdxSlice(mcIdType start, mcIdType end, mcIdType step,
+                                                                      DataArrayType *arrInOut, const DataArrayIdType *arrIndxIn,
+                                                                      const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex);
+    MEDCOUPLING_EXPORT static bool RemoveIdsFromIndexedArrays(const T *idsToRemoveBg, const T *idsToRemoveEnd,
+                                                              DataArrayType *arr, DataArrayIdType *arrIndx, mcIdType offsetForRemoval=0);
+    MEDCOUPLING_EXPORT static DataArrayType *Range(T begin, T end, T step);
+  public:
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
+    MEDCOUPLING_EXPORT bool resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI);
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
   protected:
     template<class ALG>
     void switchOnTupleAlg(T val, std::vector<bool>& vec, ALG algo) const;
@@ -571,153 +695,57 @@ namespace MEDCoupling
   {
     friend class DataArrayDiscrete<Int32>;
   public:
-    MEDCOUPLING_EXPORT int intValue() const;
     MEDCOUPLING_EXPORT DataArrayInt32 *deepCopy() const;//ok
     MEDCOUPLING_EXPORT DataArrayInt32 *buildNewEmptyInstance() const { return DataArrayInt32::New(); }//ok
-    MEDCOUPLING_EXPORT DataArrayInt32 *transformWithIndArrR(const int *indArr2Bg, const int *indArrEnd) const;
-    MEDCOUPLING_EXPORT void splitByValueRange(const int *arrBg, const int *arrEnd,
-                                              DataArrayInt32 *& castArr, DataArrayInt32 *& rankInsideCast, DataArrayInt32 *& castsPresent) const;
-    MEDCOUPLING_EXPORT bool isRange(int& strt, int& sttoopp, int& stteepp) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *invertArrayO2N2N2O(int newNbOfElem) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *invertArrayN2O2O2N(int oldNbOfElem) const;
-    MEDCOUPLING_EXPORT MCAuto< MapKeyVal<int> > invertArrayN2O2O2NOptimized() const;
-    MEDCOUPLING_EXPORT MCAuto< MapKeyVal<int> > giveN2OOptimized() const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *invertArrayO2N2N2OBis(int newNbOfElem) const;
+  public:
     MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
     MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleId(const DataArrayIdType& di) const { return this->mySelectByTupleId(di); }
-    MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplate<int>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
-    MEDCOUPLING_EXPORT DataArrayInt32 *keepSelectedComponents(const std::vector<int>& compoIds) const { return DataArrayTemplate<int>::myKeepSelectedComponents(compoIds); }
-    MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleIdSafeSlice(int bg, int end2, int step) const { return DataArrayTemplate<int>::mySelectByTupleIdSafeSlice(bg,end2,step); }
-    MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const { return DataArrayTemplate<int>::mySelectByTupleRanges(ranges); }
-    MEDCOUPLING_EXPORT DataArrayInt32 *checkAndPreparePermutation() const;
-    MEDCOUPLING_EXPORT static DataArrayInt32 *FindPermutationFromFirstToSecond(const DataArrayInt32 *ids1, const DataArrayInt32 *ids2);
-    MEDCOUPLING_EXPORT void changeSurjectiveFormat(int targetNb, DataArrayInt32 *&arr, DataArrayInt32 *&arrI) const;
-    MEDCOUPLING_EXPORT static DataArrayInt32 *ConvertIndexArrayToO2N(int nbOfOldTuples, const int *arr, const int *arrIBg, const int *arrIEnd, int &newNbOfTuples);
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildPermArrPerLevel() const;
-    MEDCOUPLING_EXPORT bool isIota(int sizeExpected) const;
-    MEDCOUPLING_EXPORT bool isUniform(int val) const;
-    MEDCOUPLING_EXPORT int checkUniformAndGuess() const;
-    MEDCOUPLING_EXPORT bool hasUniqueValues() const;
-    MEDCOUPLING_EXPORT void setSelectedComponents(const DataArrayInt32 *a, const std::vector<int>& compoIds);
+    MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
+    MEDCOUPLING_EXPORT DataArrayInt32 *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const { return this->myKeepSelectedComponents(compoIds); }
+    MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const { return this->mySelectByTupleIdSafeSlice(bg,end2,step); }
+    MEDCOUPLING_EXPORT DataArrayInt32 *selectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const { return this->mySelectByTupleRanges(ranges); }
+  public:
     MEDCOUPLING_EXPORT DataArrayInt32Iterator *iterator();
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsNotEqual(int val) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsEqualList(const int *valsBg, const int *valsEnd) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsNotEqualList(const int *valsBg, const int *valsEnd) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsEqualTuple(const int *tupleBg, const int *tupleEnd) const;
-    MEDCOUPLING_EXPORT MCAuto<DataArrayInt32> findIdForEach(const int *valsBg, const int *valsEnd) const;
-    MEDCOUPLING_EXPORT int changeValue(int oldValue, int newValue);
-    MEDCOUPLING_EXPORT int findIdFirstEqualTuple(const std::vector<int>& tupl) const;
-    MEDCOUPLING_EXPORT int findIdFirstEqual(int value) const;
-    MEDCOUPLING_EXPORT int findIdFirstEqual(const std::vector<int>& vals) const;
-    MEDCOUPLING_EXPORT int findIdSequence(const std::vector<int>& vals) const;
-    MEDCOUPLING_EXPORT bool presenceOfTuple(const std::vector<int>& tupl) const;
-    MEDCOUPLING_EXPORT bool presenceOfValue(int value) const;
-    MEDCOUPLING_EXPORT bool presenceOfValue(const std::vector<int>& vals) const;
-    MEDCOUPLING_EXPORT int count(int value) const;
-    MEDCOUPLING_EXPORT void accumulate(int *res) const;
-    MEDCOUPLING_EXPORT int accumulate(int compId) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *accumulatePerChunck(const int *bgOfIndex, const int *endOfIndex) const;
-    MEDCOUPLING_EXPORT void getMinMaxValues(int& minValue, int& maxValue) const;
-    MEDCOUPLING_EXPORT void applyInv(int numerator);
-    MEDCOUPLING_EXPORT void applyDivideBy(int val);
-    MEDCOUPLING_EXPORT void applyModulus(int val);
-    MEDCOUPLING_EXPORT void applyRModulus(int val);
-    MEDCOUPLING_EXPORT void applyPow(int val);
-    MEDCOUPLING_EXPORT void applyRPow(int val);
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsInRange(int vmin, int vmax) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdsNotInRange(int vmin, int vmax) const;
-    MEDCOUPLING_EXPORT bool checkAllIdsInRange(int vmin, int vmax) const;
-    MEDCOUPLING_EXPORT static DataArrayInt32 *Aggregate(const DataArrayInt32 *a1, const DataArrayInt32 *a2, int offsetA2);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *Aggregate(const std::vector<const DataArrayInt32 *>& arr);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *AggregateIndexes(const std::vector<const DataArrayInt32 *>& arrs);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *MakePartition(const std::vector<const DataArrayInt32 *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *BuildUnion(const std::vector<const DataArrayInt32 *>& arr);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *BuildIntersection(const std::vector<const DataArrayInt32 *>& arr);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *BuildListOfSwitchedOn(const std::vector<bool>& v);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *BuildListOfSwitchedOff(const std::vector<bool>& v);
-    MEDCOUPLING_EXPORT static void PutIntoToSkylineFrmt(const std::vector< std::vector<int> >& v, DataArrayInt32 *& data, DataArrayInt32 *& dataIndex);
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildComplement(int nbOfElement) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildSubstraction(const DataArrayInt32 *other) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildSubstractionOptimized(const DataArrayInt32 *other) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildUnion(const DataArrayInt32 *other) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildIntersection(const DataArrayInt32 *other) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildUnique() const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildUniqueNotSorted() const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *deltaShiftIndex() const;
-    MEDCOUPLING_EXPORT void computeOffsets();
-    MEDCOUPLING_EXPORT void computeOffsetsFull();
-    MEDCOUPLING_EXPORT void findIdsRangesInListOfIds(const DataArrayInt32 *listOfIds, DataArrayInt32 *& rangeIdsFetched, DataArrayInt32 *& idsInInputListThatFetch) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildExplicitArrByRanges(const DataArrayInt32 *offsets) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildExplicitArrOfSliceOnScaledArr(int begin, int stop, int step) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findRangeIdForEachTuple(const DataArrayInt32 *ranges) const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *findIdInRangeForEachTuple(const DataArrayInt32 *ranges) const;
-    MEDCOUPLING_EXPORT void sortEachPairToMakeALinkedList();
-    MEDCOUPLING_EXPORT MCAuto<DataArrayInt32> fromLinkedListOfPairToList() const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *getDifferentValues() const;
-    MEDCOUPLING_EXPORT std::vector<DataArrayInt32 *> partitionByDifferentValues(std::vector<int>& differentIds) const;
-    MEDCOUPLING_EXPORT std::vector< std::pair<int,int> > splitInBalancedSlices(int nbOfSlices) const;
-    MEDCOUPLING_EXPORT static DataArrayInt32 *Modulus(const DataArrayInt32 *a1, const DataArrayInt32 *a2);
-    MEDCOUPLING_EXPORT void modulusEqual(const DataArrayInt32 *other);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *Pow(const DataArrayInt32 *a1, const DataArrayInt32 *a2);
-    MEDCOUPLING_EXPORT void powEqual(const DataArrayInt32 *other);
-    MEDCOUPLING_EXPORT MemArray<int>& accessToMemArray() { return _mem; }
-    MEDCOUPLING_EXPORT const MemArray<int>& accessToMemArray() const { return _mem; }
-  public:
-    MEDCOUPLING_EXPORT static void ExtractFromIndexedArrays(const int *idsOfSelectBg, const int *idsOfSelectEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                                    DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut);
-    MEDCOUPLING_EXPORT static void ExtractFromIndexedArraysSlice(int idsOfSelectStart, int idsOfSelectStop, int idsOfSelectStep, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                                     DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut);
-    MEDCOUPLING_EXPORT static void SetPartOfIndexedArrays(const int *idsOfSelectBg, const int *idsOfSelectEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                                  const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex,
-                                                  DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut);
-    MEDCOUPLING_EXPORT static void SetPartOfIndexedArraysSlice(int start, int end, int step, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                                   const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex,
-                                                   DataArrayInt* &arrOut, DataArrayInt* &arrIndexOut);
-    MEDCOUPLING_EXPORT static void SetPartOfIndexedArraysSameIdx(const int *idsOfSelectBg, const int *idsOfSelectEnd, DataArrayInt *arrInOut, const DataArrayInt *arrIndxIn,
-                                                         const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex);
-    MEDCOUPLING_EXPORT static void SetPartOfIndexedArraysSameIdxSlice(int start, int end, int step, DataArrayInt *arrInOut, const DataArrayInt *arrIndxIn,
-                                                          const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex);
-    MEDCOUPLING_EXPORT static bool RemoveIdsFromIndexedArrays(const int *idsToRemoveBg, const int *idsToRemoveEnd, DataArrayInt *arr, DataArrayInt *arrIndx, int offsetForRemoval=0);
-    MEDCOUPLING_EXPORT static int *CheckAndPreparePermutation(const int *start, const int *end);
-    MEDCOUPLING_EXPORT static DataArrayInt32 *Range(int begin, int end, int step);
-  public:
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
-    MEDCOUPLING_EXPORT bool resizeForUnserialization(const std::vector<int>& tinyInfoI);
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
   private:
     ~DataArrayInt32() { }
     DataArrayInt32() { }
   };
 
-  class DataArrayInt64 : public DataArrayDiscrete<Int64>
+  class DataArrayInt64 : public DataArrayDiscreteSigned<Int64>
   {
     friend class DataArrayDiscrete<Int64>;
   public:
     MEDCOUPLING_EXPORT DataArrayInt64 *deepCopy() const;
     MEDCOUPLING_EXPORT DataArrayInt64 *buildNewEmptyInstance() const { return DataArrayInt64::New(); }//ok
+  public:
     MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
     MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleId(const DataArrayIdType& di) const { return this->mySelectByTupleId(di); }
-    MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplate<Int64>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
-    MEDCOUPLING_EXPORT DataArrayInt64 *keepSelectedComponents(const std::vector<int>& compoIds) const { return DataArrayTemplate<Int64>::myKeepSelectedComponents(compoIds); }
-    MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleIdSafeSlice(int bg, int end2, int step) const { return DataArrayTemplate<Int64>::mySelectByTupleIdSafeSlice(bg,end2,step); }
-    MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const { return DataArrayTemplate<Int64>::mySelectByTupleRanges(ranges); }
+    MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return DataArrayTemplate<Int64>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
+    MEDCOUPLING_EXPORT DataArrayInt64 *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const { return DataArrayTemplate<Int64>::myKeepSelectedComponents(compoIds); }
+    MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const { return DataArrayTemplate<Int64>::mySelectByTupleIdSafeSlice(bg,end2,step); }
+    MEDCOUPLING_EXPORT DataArrayInt64 *selectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const { return DataArrayTemplate<Int64>::mySelectByTupleRanges(ranges); }
+  public:
+    MEDCOUPLING_EXPORT DataArrayInt64Iterator *iterator();
   private:
     ~DataArrayInt64() { }
     DataArrayInt64() { }
   };
-  
+}
+
+namespace MEDCoupling
+{
+
   template<class T>
   template<class OP>
-  MCAuto<DataArrayInt> DataArrayTemplateClassic<T>::findIdsAdv(const OP& op) const
+  MCAuto<DataArrayIdType> DataArrayTemplateClassic<T>::findIdsAdv(const OP& op) const
   {
     this->checkAllocated();
     if(this->getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayInt::findIdsAdv : this must have exactly one component !");
     const T *cptr(this->begin());
-    MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-    int nbOfTuples(this->getNumberOfTuples());
-    for(int i=0;i<nbOfTuples;i++,cptr++)
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+    mcIdType nbOfTuples=this->getNumberOfTuples();
+    for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
       if(op(*cptr))
         ret->pushBackSilent(i);
     return ret;
@@ -727,7 +755,7 @@ namespace MEDCoupling
   {
   public:
     MEDCOUPLING_EXPORT virtual DataArrayChar *buildEmptySpecializedDAChar() const = 0;
-    MEDCOUPLING_EXPORT int getHashCode() const;
+    MEDCOUPLING_EXPORT mcIdType getHashCode() const;
     MEDCOUPLING_EXPORT bool isEqual(const DataArrayChar& other) const;
     MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const DataArrayChar& other, std::string& reason) const;
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const DataArrayChar& other) const;
@@ -736,22 +764,22 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT DataArrayInt *convertToIntArr() const;
     MEDCOUPLING_EXPORT DataArrayChar *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
     MEDCOUPLING_EXPORT DataArrayChar *selectByTupleId(const DataArrayIdType& di) const { return this->mySelectByTupleId(di); }
-    MEDCOUPLING_EXPORT DataArrayChar *selectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const { return DataArrayTemplate<char>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
-    MEDCOUPLING_EXPORT DataArrayChar *keepSelectedComponents(const std::vector<int>& compoIds) const { return DataArrayTemplate<char>::myKeepSelectedComponents(compoIds); }
-    MEDCOUPLING_EXPORT DataArrayChar *selectByTupleIdSafeSlice(int bg, int end2, int step) const { return DataArrayTemplate<char>::mySelectByTupleIdSafeSlice(bg,end2,step); }
+    MEDCOUPLING_EXPORT DataArrayChar *selectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return DataArrayTemplate<char>::mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
+    MEDCOUPLING_EXPORT DataArrayChar *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const { return DataArrayTemplate<char>::myKeepSelectedComponents(compoIds); }
+    MEDCOUPLING_EXPORT DataArrayChar *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const { return DataArrayTemplate<char>::mySelectByTupleIdSafeSlice(bg,end2,step); }
     MEDCOUPLING_EXPORT bool isUniform(char val) const;
     MEDCOUPLING_EXPORT void meldWith(const DataArrayChar *other);
-    MEDCOUPLING_EXPORT DataArray *selectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const { return DataArrayTemplate<char>::mySelectByTupleRanges(ranges); }
-    MEDCOUPLING_EXPORT DataArrayInt *findIdsEqual(char val) const;
-    MEDCOUPLING_EXPORT DataArrayInt *findIdsNotEqual(char val) const;
-    MEDCOUPLING_EXPORT int findIdSequence(const std::vector<char>& vals) const;
-    MEDCOUPLING_EXPORT int findIdFirstEqualTuple(const std::vector<char>& tupl) const;
-    MEDCOUPLING_EXPORT int findIdFirstEqual(char value) const;
-    MEDCOUPLING_EXPORT int findIdFirstEqual(const std::vector<char>& vals) const;
+    MEDCOUPLING_EXPORT DataArray *selectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const { return DataArrayTemplate<char>::mySelectByTupleRanges(ranges); }
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsEqual(char val) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsNotEqual(char val) const;
+    MEDCOUPLING_EXPORT mcIdType findIdSequence(const std::vector<char>& vals) const;
+    MEDCOUPLING_EXPORT mcIdType findIdFirstEqualTuple(const std::vector<char>& tupl) const;
+    MEDCOUPLING_EXPORT mcIdType findIdFirstEqual(char value) const;
+    MEDCOUPLING_EXPORT mcIdType findIdFirstEqual(const std::vector<char>& vals) const;
     MEDCOUPLING_EXPORT bool presenceOfTuple(const std::vector<char>& tupl) const;
     MEDCOUPLING_EXPORT bool presenceOfValue(char value) const;
     MEDCOUPLING_EXPORT bool presenceOfValue(const std::vector<char>& vals) const;
-    MEDCOUPLING_EXPORT DataArrayInt *findIdsInRange(char vmin, char vmax) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findIdsInRange(char vmin, char vmax) const;
     MEDCOUPLING_EXPORT static DataArrayChar *Aggregate(const DataArrayChar *a1, const DataArrayChar *a2);
     MEDCOUPLING_EXPORT static DataArrayChar *Aggregate(const std::vector<const DataArrayChar *>& arr);
     MEDCOUPLING_EXPORT static DataArrayChar *Meld(const DataArrayChar *a1, const DataArrayChar *a2);
@@ -759,10 +787,10 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT MemArray<char>& accessToMemArray() { return _mem; }
     MEDCOUPLING_EXPORT const MemArray<char>& accessToMemArray() const { return _mem; }
   public:
-    //MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    //MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     //MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
-    //MEDCOUPLING_EXPORT bool resizeForUnserialization(const std::vector<int>& tinyInfoI);
-    //MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
+    //MEDCOUPLING_EXPORT bool resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI);
+    //MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<std::string>& tinyInfoS);
   protected:
     DataArrayChar() { }
   };
@@ -832,26 +860,26 @@ namespace MEDCoupling
   private:
     typename Traits<T>::ArrayType *_da;
     T *_pt;
-    int _tuple_id;
-    int _nb_comp;
-    int _nb_tuple;
+    mcIdType _tuple_id;
+    std::size_t _nb_comp;
+    mcIdType _nb_tuple;
   };
 
   template<class T>
   class DataArrayTuple
   {
   public:
-    MEDCOUPLING_EXPORT DataArrayTuple(T *pt, int nbOfComp);
-    MEDCOUPLING_EXPORT std::string repr() const;
-    MEDCOUPLING_EXPORT int getNumberOfCompo() const { return _nb_of_compo; }
+    MEDCOUPLING_EXPORT DataArrayTuple(T *pt, std::size_t nbOfComp);
+    //MEDCOUPLING_EXPORT std::string repr() const;
+    MEDCOUPLING_EXPORT std::size_t getNumberOfCompo() const { return _nb_of_compo; }
     MEDCOUPLING_EXPORT const T *getConstPointer() const { return  _pt; }
     MEDCOUPLING_EXPORT T *getPointer() { return _pt; }
-    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *buildDA(int nbOfTuples, int nbOfCompo) const;
+    MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *buildDA(std::size_t nbOfTuples, std::size_t nbOfCompo) const;
   protected:
     T zeValue() const;
   protected:
     T *_pt;
-    int _nb_of_compo;
+    std::size_t _nb_of_compo;
   };
 
   class DataArrayDoubleTuple;
@@ -866,10 +894,10 @@ namespace MEDCoupling
   class DataArrayDoubleTuple : public DataArrayTuple<double>
   {
   public:
-    MEDCOUPLING_EXPORT DataArrayDoubleTuple(double *pt, int nbOfComp);
+    MEDCOUPLING_EXPORT DataArrayDoubleTuple(double *pt, std::size_t nbOfComp);
     MEDCOUPLING_EXPORT std::string repr() const;
     MEDCOUPLING_EXPORT double doubleValue() const;
-    MEDCOUPLING_EXPORT DataArrayDouble *buildDADouble(int nbOfTuples, int nbOfCompo) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *buildDADouble(std::size_t nbOfTuples, std::size_t nbOfCompo) const;
   };
 
   class DataArrayFloatTuple;
@@ -884,26 +912,42 @@ namespace MEDCoupling
   class DataArrayFloatTuple : public DataArrayTuple<float>
   {
   public:
-    MEDCOUPLING_EXPORT DataArrayFloatTuple(float *pt, int nbOfComp);
+    MEDCOUPLING_EXPORT DataArrayFloatTuple(float *pt, std::size_t nbOfComp);
     MEDCOUPLING_EXPORT std::string repr() const;
     MEDCOUPLING_EXPORT float floatValue() const;
-    MEDCOUPLING_EXPORT DataArrayFloat *buildDAFloat(int nbOfTuples, int nbOfCompo) const;
+    MEDCOUPLING_EXPORT DataArrayFloat *buildDAFloat(std::size_t nbOfTuples, std::size_t nbOfCompo) const;
   };
   
-  class DataArrayIntIterator : public DataArrayIterator<int>
+  class DataArrayInt32Iterator : public DataArrayIterator<Int32>
+  {
+  public:
+    MEDCOUPLING_EXPORT DataArrayInt32Iterator(DataArrayInt32 *da);
+    MEDCOUPLING_EXPORT ~DataArrayInt32Iterator() { }
+  };
+
+  class DataArrayInt64Iterator : public DataArrayIterator<Int64>
   {
   public:
-    MEDCOUPLING_EXPORT DataArrayIntIterator(DataArrayInt *da);
-    MEDCOUPLING_EXPORT ~DataArrayIntIterator() { }
+    MEDCOUPLING_EXPORT DataArrayInt64Iterator(DataArrayInt64 *da);
+    MEDCOUPLING_EXPORT ~DataArrayInt64Iterator() { }
   };
 
   class DataArrayInt32Tuple : public DataArrayTuple<Int32>
   {
   public:
-    MEDCOUPLING_EXPORT DataArrayInt32Tuple(int *pt, int nbOfComp);
+    MEDCOUPLING_EXPORT DataArrayInt32Tuple(Int32 *pt, std::size_t nbOfComp);
+    MEDCOUPLING_EXPORT std::string repr() const;
+    MEDCOUPLING_EXPORT Int32 intValue() const;
+    MEDCOUPLING_EXPORT DataArrayInt32 *buildDAInt(std::size_t nbOfTuples, std::size_t nbOfCompo) const;
+  };
+
+  class DataArrayInt64Tuple : public DataArrayTuple<Int64>
+  {
+  public:
+    MEDCOUPLING_EXPORT DataArrayInt64Tuple(Int64 *pt, std::size_t nbOfComp);
     MEDCOUPLING_EXPORT std::string repr() const;
-    MEDCOUPLING_EXPORT int intValue() const;
-    MEDCOUPLING_EXPORT DataArrayInt32 *buildDAInt(int nbOfTuples, int nbOfCompo) const;
+    MEDCOUPLING_EXPORT Int64 intValue() const;
+    MEDCOUPLING_EXPORT DataArrayInt64 *buildDAInt(std::size_t nbOfTuples, std::size_t nbOfCompo) const;
   };
 
   typedef DataArrayInt32Tuple DataArrayIntTuple;
@@ -919,24 +963,24 @@ namespace MEDCoupling
   private:
     DataArrayAsciiChar *_da;
     char *_pt;
-    int _tuple_id;
-    int _nb_comp;
-    int _nb_tuple;
+    mcIdType _tuple_id;
+    std::size_t _nb_comp;
+    mcIdType _nb_tuple;
   };
 
   class DataArrayAsciiCharTuple
   {
   public:
-    MEDCOUPLING_EXPORT DataArrayAsciiCharTuple(char *pt, int nbOfComp);
+    MEDCOUPLING_EXPORT DataArrayAsciiCharTuple(char *pt, std::size_t nbOfComp);
     MEDCOUPLING_EXPORT std::string repr() const;
-    MEDCOUPLING_EXPORT int getNumberOfCompo() const { return _nb_of_compo; }
+    MEDCOUPLING_EXPORT std::size_t getNumberOfCompo() const { return _nb_of_compo; }
     MEDCOUPLING_EXPORT const char *getConstPointer() const { return  _pt; }
     MEDCOUPLING_EXPORT char *getPointer() { return _pt; }
     MEDCOUPLING_EXPORT char asciiCharValue() const;
-    MEDCOUPLING_EXPORT DataArrayAsciiChar *buildDAAsciiChar(int nbOfTuples, int nbOfCompo) const;
+    MEDCOUPLING_EXPORT DataArrayAsciiChar *buildDAAsciiChar(std::size_t nbOfTuples, std::size_t nbOfCompo) const;
   private:
     char *_pt;
-    int _nb_of_compo;
+    std::size_t _nb_of_compo;
   };
   
   class DataArrayByteTuple;
@@ -950,24 +994,24 @@ namespace MEDCoupling
   private:
     DataArrayByte *_da;
     char *_pt;
-    int _tuple_id;
-    int _nb_comp;
-    int _nb_tuple;
+    mcIdType _tuple_id;
+    std::size_t _nb_comp;
+    mcIdType _nb_tuple;
   };
 
   class DataArrayByteTuple
   {
   public:
-    MEDCOUPLING_EXPORT DataArrayByteTuple(char *pt, int nbOfComp);
+    MEDCOUPLING_EXPORT DataArrayByteTuple(char *pt, std::size_t nbOfComp);
     MEDCOUPLING_EXPORT std::string repr() const;
-    MEDCOUPLING_EXPORT int getNumberOfCompo() const { return _nb_of_compo; }
+    MEDCOUPLING_EXPORT std::size_t getNumberOfCompo() const { return _nb_of_compo; }
     MEDCOUPLING_EXPORT const char *getConstPointer() const { return  _pt; }
     MEDCOUPLING_EXPORT char *getPointer() { return _pt; }
     MEDCOUPLING_EXPORT char byteValue() const;
-    MEDCOUPLING_EXPORT DataArrayByte *buildDAByte(int nbOfTuples, int nbOfCompo) const;
+    MEDCOUPLING_EXPORT DataArrayByte *buildDAByte(std::size_t nbOfTuples, std::size_t nbOfCompo) const;
   private:
     char *_pt;
-    int _nb_of_compo;
+    std::size_t _nb_of_compo;
   };
 }
 
@@ -993,7 +1037,7 @@ namespace MEDCoupling
   template<class InputIterator>
   void DataArrayTemplate<T>::insertAtTheEnd(InputIterator first, InputIterator last)
   {
-    int nbCompo(this->getNumberOfComponents());
+    std::size_t nbCompo(this->getNumberOfComponents());
     if(nbCompo==1)
       this->_mem.insertAtTheEnd(first,last);
     else if(nbCompo==0)
old mode 100644 (file)
new mode 100755 (executable)
index 570f0f8..e054290
@@ -28,6 +28,7 @@
 #include "MEDCouplingPartDefinition.hxx"
 #include "InterpKernelAutoPtr.hxx"
 #include "MCAuto.hxx"
+#include "MEDCouplingMap.txx"
 
 #include <sstream>
 #include <cstdlib>
@@ -161,7 +162,7 @@ namespace MEDCoupling
    * \return True if a not null pointer is present, False if not.
    */
   template<class T>
-  bool MemArray<T>::reprHeader(int sl, std::ostream& stream) const
+  bool MemArray<T>::reprHeader(mcIdType sl, std::ostream& stream) const
   {
     stream << "Number of tuples : ";
     if(!_pointer.isNull())
@@ -185,7 +186,7 @@ namespace MEDCoupling
    * \param [in] sl is typically the number of components
    */
   template<class T>
-  void MemArray<T>::repr(int sl, std::ostream& stream) const
+  void MemArray<T>::repr(mcIdType sl, std::ostream& stream) const
   {
     if(reprHeader(sl,stream))
       {
@@ -210,7 +211,7 @@ namespace MEDCoupling
    * \param [in] sl is typically the number of components
    */
   template<class T>
-  void MemArray<T>::reprZip(int sl, std::ostream& stream) const
+  void MemArray<T>::reprZip(mcIdType sl, std::ostream& stream) const
   {
     stream << "Number of tuples : ";
     if(!_pointer.isNull())
@@ -250,7 +251,7 @@ namespace MEDCoupling
    * \param [in] sl is typically the number of components
    */
   template<class T>
-  void MemArray<T>::reprNotTooLong(int sl, std::ostream& stream) const
+  void MemArray<T>::reprNotTooLong(mcIdType sl, std::ostream& stream) const
   {
     if(reprHeader(sl,stream))
       {
@@ -298,7 +299,7 @@ namespace MEDCoupling
   }
 
   template<class T>
-  T *MemArray<T>::fromNoInterlace(int nbOfComp) const
+  T *MemArray<T>::fromNoInterlace(std::size_t nbOfComp) const
   {
     if(nbOfComp<1)
       throw INTERP_KERNEL::Exception("MemArray<T>::fromNoInterlace : number of components must be > 0 !");
@@ -307,13 +308,13 @@ namespace MEDCoupling
     T *ret=(T*)malloc(_nb_of_elem*sizeof(T));
     T *w=ret;
     for(std::size_t i=0;i<nbOfTuples;i++)
-      for(int j=0;j<nbOfComp;j++,w++)
+      for(std::size_t j=0;j<nbOfComp;j++,w++)
         *w=pt[j*nbOfTuples+i];
     return ret;
   }
 
   template<class T>
-  T *MemArray<T>::toNoInterlace(int nbOfComp) const
+  T *MemArray<T>::toNoInterlace(std::size_t nbOfComp) const
   {
     if(nbOfComp<1)
       throw INTERP_KERNEL::Exception("MemArray<T>::toNoInterlace : number of components must be > 0 !");
@@ -321,7 +322,7 @@ namespace MEDCoupling
     std::size_t nbOfTuples=_nb_of_elem/nbOfComp;
     T *ret=(T*)malloc(_nb_of_elem*sizeof(T));
     T *w=ret;
-    for(int i=0;i<nbOfComp;i++)
+    for(std::size_t i=0;i<nbOfComp;i++)
       for(std::size_t j=0;j<nbOfTuples;j++,w++)
         *w=pt[j*nbOfComp+i];
     return ret;
@@ -342,7 +343,7 @@ namespace MEDCoupling
   }
 
   template<class T>
-  void MemArray<T>::reverse(int nbOfComp)
+  void MemArray<T>::reverse(std::size_t nbOfComp)
   {
     if(nbOfComp<1)
       throw INTERP_KERNEL::Exception("MemArray<T>::reverse : only supported with 'this' array with ONE or more than ONE component !");
@@ -358,7 +359,7 @@ namespace MEDCoupling
         std::size_t nbOfTuples=_nb_of_elem/nbOfComp;
         for(std::size_t i=0;i<nbOfTuples/2;i++,pt+=nbOfComp,pt2-=nbOfComp)
           {
-            for(int j=0;j<nbOfComp;j++)
+            for(std::size_t j=0;j<nbOfComp;j++)
               std::swap(pt[j],pt2[j]);
           }
       }
@@ -530,7 +531,7 @@ namespace MEDCoupling
   //////////////////////////////////
 
   template<class T>
-  DataArrayTuple<T>::DataArrayTuple(T *pt, int nbOfComp):_pt(pt),_nb_of_compo(nbOfComp)
+  DataArrayTuple<T>::DataArrayTuple(T *pt, std::size_t nbOfComp):_pt(pt),_nb_of_compo(nbOfComp)
   {
   }
   
@@ -543,7 +544,7 @@ namespace MEDCoupling
   }
   
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTuple<T>::buildDA(int nbOfTuples, int nbOfCompo) const
+  typename Traits<T>::ArrayType *DataArrayTuple<T>::buildDA(std::size_t nbOfTuples, std::size_t nbOfCompo) const
   {
     if((_nb_of_compo==nbOfCompo && nbOfTuples==1) || (_nb_of_compo==nbOfTuples && nbOfCompo==1))
     {
@@ -561,6 +562,106 @@ namespace MEDCoupling
   
   //////////////////////////////////
 
+  /*!
+   * This method is useful to slice work among a pool of threads or processes. \a begin, \a end \a step is the input whole slice of work to perform,
+   * typically it is a whole slice of tuples of DataArray or cells, nodes of a mesh...
+   *
+   * The input \a sliceId should be an id in [0, \a nbOfSlices) that specifies the slice of work.
+   *
+   * \param [in] start - the start of the input slice of the whole work to perform split into slices.
+   * \param [in] stop - the stop of the input slice of the whole work to perform split into slices.
+   * \param [in] step - the step (that can be <0) of the input slice of the whole work to perform split into slices.
+   * \param [in] sliceId - the slice id considered
+   * \param [in] nbOfSlices - the number of slices (typically the number of cores on which the work is expected to be sliced)
+   * \param [out] startSlice - the start of the slice considered
+   * \param [out] stopSlice - the stop of the slice consided
+   *
+   * \throw If \a step == 0
+   * \throw If \a nbOfSlices not > 0
+   * \throw If \a sliceId not in [0,nbOfSlices)
+   */
+  template <class T>
+  void DataArrayTools<T>::GetSlice(T start, T stop, T step, mcIdType sliceId, mcIdType nbOfSlices, T& startSlice, T& stopSlice)
+  {
+    if(nbOfSlices<=0)
+      {
+        std::ostringstream oss; oss << "DataArray::GetSlice : nbOfSlices (" << nbOfSlices << ") must be > 0 !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    if(sliceId<0 || sliceId>=nbOfSlices)
+      {
+        std::ostringstream oss; oss << "DataArray::GetSlice : sliceId (" << nbOfSlices << ") must be in [0 , nbOfSlices (" << nbOfSlices << ") ) !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    mcIdType nbElems=DataArrayTemplate<T>::GetNumberOfItemGivenBESRelative(start,stop,step,"DataArray::GetSlice");
+    mcIdType minNbOfElemsPerSlice=nbElems/nbOfSlices;
+    startSlice=start+minNbOfElemsPerSlice*step*sliceId;
+    if(sliceId<nbOfSlices-1)
+      stopSlice=start+minNbOfElemsPerSlice*step*(sliceId+1);
+    else
+      stopSlice=stop;
+  }
+
+  template <class T>
+  mcIdType DataArrayTools<T>::GetNumberOfItemGivenBES(T begin, T end, T step, const std::string& msg)
+  {
+    if(end<begin)
+      {
+        std::ostringstream oss; oss << msg << " : end before begin !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    if(end==begin)
+      return 0;
+    if(step<=0)
+      {
+        std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    return ToIdType((end-1-begin)/step+1);
+  }
+
+  template <class T>
+  mcIdType DataArrayTools<T>::GetNumberOfItemGivenBESRelative(T begin, T end, T step, const std::string& msg)
+  {
+    if(step==0)
+      throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBES : step=0 is not allowed !");
+    if(end<begin && step>0)
+      {
+        std::ostringstream oss; oss << msg << " : end before begin whereas step is positive !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    if(begin<end && step<0)
+      {
+        std::ostringstream oss; oss << msg << " : invalid step should be > 0 !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    if(begin!=end)
+      return ToIdType((std::max(begin,end)-1-std::min(begin,end))/std::abs(step)+1);
+    else
+      return 0;
+  }
+
+  template <class T>
+  mcIdType DataArrayTools<T>::GetPosOfItemGivenBESRelativeNoThrow(T value, T begin, T end, T step)
+  {
+    if (step == 0)
+      return -1;
+
+    if((step>0 && begin<=value && value<end) ||
+       (step<0 && begin>=value && value>end))
+    {
+      mcIdType id = ToIdType((value-begin)/step);
+      if (begin + step * id == value)
+        return id;
+      else
+        return -1;
+    }
+    else
+      return -1;
+  }
+
+  //////////////////////////////////
+
   template<class T>
   MCAuto< typename Traits<T>::ArrayTypeCh > DataArrayTemplate<T>::NewFromStdVector(const typename std::vector<T>& v)
   {
@@ -577,7 +678,7 @@ namespace MEDCoupling
   {
     checkAllocated();
     std::size_t sz(getNumberOfComponents());
-    int nbTuples(getNumberOfTuples());
+    mcIdType nbTuples(getNumberOfTuples());
     std::string name(getName());
     std::vector<std::string> compNames(getInfoOnComponents());
     std::vector< MCAuto< typename Traits<T>::ArrayTypeCh > > ret(sz);
@@ -589,7 +690,7 @@ namespace MEDCoupling
         part->setName(name);
         part->setInfoOnComponent(0,compNames[i]);
         T *otherPt(part->getPointer());
-        for(int j=0;j<nbTuples;j++)
+        for(mcIdType j=0;j<nbTuples;j++)
           otherPt[j]=thisPt[sz*j+i];
         ret[i]=part;
       }
@@ -633,18 +734,18 @@ namespace MEDCoupling
    *  \param [in] nbOfCompo - new number of components in \a this.
    */
   template<class T>
-  void DataArrayTemplate<T>::useArray(const T *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo)
+  void DataArrayTemplate<T>::useArray(const T *array, bool ownership, DeallocType type, std::size_t nbOfTuple, std::size_t nbOfCompo)
   {
     _info_on_compo.resize(nbOfCompo);
-    _mem.useArray(array,ownership,type,(std::size_t)nbOfTuple*nbOfCompo);
+    _mem.useArray(array,ownership,type,nbOfTuple*nbOfCompo);
     declareAsNew();
   }
   
   template<class T>
-  void DataArrayTemplate<T>::useExternalArrayWithRWAccess(const T *array, int nbOfTuple, int nbOfCompo)
+  void DataArrayTemplate<T>::useExternalArrayWithRWAccess(const T *array, std::size_t nbOfTuple, std::size_t nbOfCompo)
   {
     _info_on_compo.resize(nbOfCompo);
-    _mem.useExternalArrayWithRWAccess(array,(std::size_t)nbOfTuple*nbOfCompo);
+    _mem.useExternalArrayWithRWAccess(array,nbOfTuple*nbOfCompo);
     declareAsNew();
   }
 
@@ -661,15 +762,15 @@ namespace MEDCoupling
    *  \throw If condition <em>( 0 <= compoId < this->getNumberOfComponents() )</em> is violated.
    */
   template<class T>
-  T DataArrayTemplate<T>::getIJSafe(int tupleId, int compoId) const
+  T DataArrayTemplate<T>::getIJSafe(std::size_t tupleId, std::size_t compoId) const
   {
     checkAllocated();
-    if(tupleId<0 || tupleId>=getNumberOfTuples())
+    if(ToIdType(tupleId)>=getNumberOfTuples())
       {
         std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::getIJSafe : request for tupleId " << tupleId << " should be in [0," << getNumberOfTuples() << ") !";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
       }
-    if(compoId<0 || compoId>=(int)getNumberOfComponents())
+    if(compoId>=getNumberOfComponents())
       {
         std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::getIJSafe : request for compoId " << compoId << " should be in [0," << getNumberOfComponents() << ") !";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -735,7 +836,7 @@ namespace MEDCoupling
   template<class T>
   void DataArrayTemplate<T>::reserve(std::size_t nbOfElems)
   {
-    int nbCompo(getNumberOfComponents());
+    std::size_t nbCompo(getNumberOfComponents());
     if(nbCompo==1)
       {
         _mem.reserve(nbOfElems);
@@ -763,7 +864,7 @@ namespace MEDCoupling
   template<class T>
   void DataArrayTemplate<T>::pushBackSilent(T val)
   {
-    int nbCompo(getNumberOfComponents());
+    std::size_t nbCompo(getNumberOfComponents());
     if(nbCompo==1)
       _mem.pushBack(val);
     else if(nbCompo==0)
@@ -791,7 +892,7 @@ namespace MEDCoupling
   template<class T>
   void DataArrayTemplate<T>::pushBackValsSilent(const T *valsBg, const T *valsEnd)
   {
-    int nbCompo(getNumberOfComponents());
+    std::size_t nbCompo(getNumberOfComponents());
     if(nbCompo==1)
       _mem.insertAtTheEnd(valsBg,valsEnd);
     else if(nbCompo==0)
@@ -831,11 +932,11 @@ namespace MEDCoupling
    *  \throw If \a nbOfTuple < 0 or \a nbOfCompo < 0.
    */
   template<class T>
-  void DataArrayTemplate<T>::allocIfNecessary(int nbOfTuple, int nbOfCompo)
+  void DataArrayTemplate<T>::allocIfNecessary(std::size_t nbOfTuple, std::size_t nbOfCompo)
   {
     if(isAllocated())
       {
-        if(nbOfTuple!=getNumberOfTuples() || nbOfCompo!=(int)getNumberOfComponents())
+        if(ToIdType(nbOfTuple)!=getNumberOfTuples() || nbOfCompo!=getNumberOfComponents())
           alloc(nbOfTuple,nbOfCompo);
       }
     else
@@ -864,9 +965,10 @@ namespace MEDCoupling
   void DataArrayTemplate<T>::deepCopyFrom(const DataArrayTemplate<T>& other)
   {
     other.checkAllocated();
-    int nbOfTuples(other.getNumberOfTuples()),nbOfComp(other.getNumberOfComponents());
+    mcIdType nbOfTuples(other.getNumberOfTuples());
+    std::size_t nbOfComp(other.getNumberOfComponents());
     allocIfNecessary(nbOfTuples,nbOfComp);
-    std::size_t nbOfElems((std::size_t)nbOfTuples*nbOfComp);
+    std::size_t nbOfElems(nbOfTuples*nbOfComp);
     T *pt(getPointer());
     const T *ptI(other.begin());
     for(std::size_t i=0;i<nbOfElems;i++)
@@ -926,15 +1028,16 @@ namespace MEDCoupling
    *     giving a new position for i-th old value.
    */
   template<class T>
-  void DataArrayTemplate<T>::renumberInPlace(const int *old2New)
+  void DataArrayTemplate<T>::renumberInPlace(const mcIdType *old2New)
   {
     checkAllocated();
-    int nbTuples(getNumberOfTuples()),nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
+    std::size_t nbOfCompo(getNumberOfComponents());
     T *tmp(new T[nbTuples*nbOfCompo]);
     const T *iptr(begin());
-    for(int i=0;i<nbTuples;i++)
+    for(mcIdType i=0;i<nbTuples;i++)
       {
-        int v=old2New[i];
+        mcIdType v=old2New[i];
         if(v>=0 && v<nbTuples)
           std::copy(iptr+nbOfCompo*i,iptr+nbOfCompo*(i+1),tmp+nbOfCompo*v);
         else
@@ -960,15 +1063,16 @@ namespace MEDCoupling
    *          is to delete using decrRef() as it is no more needed.
    */
   template<class T>
-  void DataArrayTemplate<T>::renumberInPlaceR(const int *new2Old)
+  void DataArrayTemplate<T>::renumberInPlaceR(const mcIdType *new2Old)
   {
     checkAllocated();
-    int nbTuples(getNumberOfTuples()),nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
+    std::size_t nbOfCompo(getNumberOfComponents());
     T *tmp(new T[nbTuples*nbOfCompo]);
     const T *iptr(begin());
-    for(int i=0;i<nbTuples;i++)
+    for(mcIdType i=0;i<nbTuples;i++)
       {
-        int v=new2Old[i];
+        mcIdType v=new2Old[i];
         if(v>=0 && v<nbTuples)
           std::copy(iptr+nbOfCompo*v,iptr+nbOfCompo*(v+1),tmp+nbOfCompo*i);
         else
@@ -1014,17 +1118,18 @@ namespace MEDCoupling
    *  \throw If \a this is not allocated.
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::renumber(const int *old2New) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::renumber(const mcIdType *old2New) const
   {
     checkAllocated();
-    int nbTuples(getNumberOfTuples()),nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
+    std::size_t nbOfCompo(getNumberOfComponents());
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
     MCAuto< typename Traits<T>::ArrayType > ret(DynamicCastSafe<DataArray,typename Traits<T>::ArrayType>(ret0));
     ret->alloc(nbTuples,nbOfCompo);
     ret->copyStringInfoFrom(*this);
     const T *iptr(begin());
     T *optr(ret->getPointer());
-    for(int i=0;i<nbTuples;i++)
+    for(mcIdType i=0;i<nbTuples;i++)
       std::copy(iptr+nbOfCompo*i,iptr+nbOfCompo*(i+1),optr+nbOfCompo*old2New[i]);
     ret->copyStringInfoFrom(*this);
     return ret.retn();
@@ -1042,17 +1147,18 @@ namespace MEDCoupling
    *          is to delete using decrRef() as it is no more needed.
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::renumberR(const int *new2Old) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::renumberR(const mcIdType *new2Old) const
   {
     checkAllocated();
-    int nbTuples(getNumberOfTuples()),nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
+    std::size_t nbOfCompo(getNumberOfComponents());
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
     MCAuto< typename Traits<T>::ArrayType > ret(DynamicCastSafe<DataArray,typename Traits<T>::ArrayType>(ret0));
     ret->alloc(nbTuples,nbOfCompo);
     ret->copyStringInfoFrom(*this);
     const T *iptr(getConstPointer());
     T *optr(ret->getPointer());
-    for(int i=0;i<nbTuples;i++)
+    for(mcIdType i=0;i<nbTuples;i++)
       std::copy(iptr+nbOfCompo*new2Old[i],iptr+nbOfCompo*(new2Old[i]+1),optr+i*nbOfCompo);
     ret->copyStringInfoFrom(*this);
     return ret.retn();
@@ -1072,18 +1178,19 @@ namespace MEDCoupling
    *          is to delete using decrRef() as it is no more needed.
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::renumberAndReduce(const int *old2New, int newNbOfTuple) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::renumberAndReduce(const mcIdType *old2New, mcIdType newNbOfTuple) const
   {
     checkAllocated();
-    int nbTuples(getNumberOfTuples()),nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
+    std::size_t nbOfCompo(getNumberOfComponents());
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
     MCAuto< typename Traits<T>::ArrayType > ret(DynamicCastSafe<DataArray,typename Traits<T>::ArrayType>(ret0));
     ret->alloc(newNbOfTuple,nbOfCompo);
     const T *iptr=getConstPointer();
     T *optr=ret->getPointer();
-    for(int i=0;i<nbTuples;i++)
+    for(mcIdType i=0;i<nbTuples;i++)
       {
-        int w=old2New[i];
+        mcIdType w=old2New[i];
         if(w>=0)
           std::copy(iptr+i*nbOfCompo,iptr+(i+1)*nbOfCompo,optr+w*nbOfCompo);
       }
@@ -1119,7 +1226,7 @@ namespace MEDCoupling
     T *pt(ret->getPointer());
     const T *srcPt(getConstPointer());
     std::size_t i(0);
-    for(const int *w=new2OldBg;w!=new2OldEnd;w++,i++)
+    for(const mcIdType *w=new2OldBg;w!=new2OldEnd;w++,i++)
       std::copy(srcPt+(*w)*nbComp,srcPt+((*w)+1)*nbComp,pt+i*nbComp);
     ret->copyStringInfoFrom(*this);
     return ret.retn();
@@ -1140,9 +1247,9 @@ namespace MEDCoupling
     const SlicePartDefinition *spd(dynamic_cast<const SlicePartDefinition *>(pd));
     if(spd)
       {
-        int a,b,c;
+        mcIdType a,b,c;
         spd->getSlice(a,b,c);
-        if(a==0 && b==(int)getNumberOfTuples() && c==1)
+        if(a==0 && b==getNumberOfTuples() && c==1)
           {
             DataArrayTemplate<T> *directRet(const_cast<DataArrayTemplate<T> *>(this));
             directRet->incrRef();
@@ -1158,7 +1265,7 @@ namespace MEDCoupling
     const DataArrayPartDefinition *dpd(dynamic_cast<const DataArrayPartDefinition *>(pd));
     if(dpd)
       {
-        MCAuto<DataArrayInt> arr(dpd->toDAI());
+        MCAuto<DataArrayIdType> arr(dpd->toDAI());
         MCAuto<DataArray> ret2(selectByTupleIdSafe(arr->begin(),arr->end()));
         return DynamicCastSafe<DataArray,typename Traits<T>::ArrayTypeCh>(ret2);
         
@@ -1186,18 +1293,19 @@ namespace MEDCoupling
    *  \throw If \a new2OldEnd - \a new2OldBg > \a this->getNumberOfTuples().
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::mySelectByTupleIdSafe(const int *new2OldBg, const int *new2OldEnd) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::mySelectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const
   {
     checkAllocated();
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
     MCAuto< typename Traits<T>::ArrayType > ret(DynamicCastSafe<DataArray,typename Traits<T>::ArrayType>(ret0));
-    int nbComp(getNumberOfComponents()),oldNbOfTuples(getNumberOfTuples());
-    ret->alloc((int)std::distance(new2OldBg,new2OldEnd),nbComp);
+    std::size_t nbComp(getNumberOfComponents());
+    mcIdType oldNbOfTuples(getNumberOfTuples());
+    ret->alloc(std::distance(new2OldBg,new2OldEnd),nbComp);
     ret->copyStringInfoFrom(*this);
     T *pt(ret->getPointer());
     const T *srcPt(getConstPointer());
-    int i(0);
-    for(const int *w=new2OldBg;w!=new2OldEnd;w++,i++)
+    mcIdType i(0);
+    for(const mcIdType *w=new2OldBg;w!=new2OldEnd;w++,i++)
       if(*w>=0 && *w<oldNbOfTuples)
         std::copy(srcPt+(*w)*nbComp,srcPt+((*w)+1)*nbComp,pt+i*nbComp);
       else
@@ -1221,7 +1329,7 @@ namespace MEDCoupling
    *  \warning This method erases all (name and unit) component info set before!
    */
   template<class T>
-  void DataArrayTemplate<T>::rearrange(int newNbOfCompo)
+  void DataArrayTemplate<T>::rearrange(std::size_t newNbOfCompo)
   {
     checkAllocated();
     if(newNbOfCompo<1)
@@ -1235,7 +1343,7 @@ namespace MEDCoupling
         std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::rearrange : nbOfElems%newNbOfCompo!=0 !";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
       }
-    if(nbOfElems/newNbOfCompo>(std::size_t)std::numeric_limits<int>::max())
+    if(nbOfElems/newNbOfCompo>(std::size_t)std::numeric_limits<mcIdType>::max())
       {
         std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::rearrange : the rearrangement leads to too high number of tuples (> 2147483647) !";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -1259,8 +1367,7 @@ namespace MEDCoupling
   void DataArrayTemplate<T>::transpose()
   {
     checkAllocated();
-    int nbOfTuples(getNumberOfTuples());
-    rearrange(nbOfTuples);
+    rearrange(getNumberOfTuples());
   }
 
   /*!
@@ -1277,7 +1384,7 @@ namespace MEDCoupling
    *  \throw If \a this is not allocated.
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::changeNbOfComponents(int newNbOfComp, T dftValue) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::changeNbOfComponents(std::size_t newNbOfComp, T dftValue) const
   {
     checkAllocated();
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
@@ -1285,18 +1392,19 @@ namespace MEDCoupling
     ret->alloc(getNumberOfTuples(),newNbOfComp);
     const T *oldc(getConstPointer());
     T *nc(ret->getPointer());
-    int nbOfTuples(getNumberOfTuples()),oldNbOfComp(getNumberOfComponents());
-    int dim(std::min(oldNbOfComp,newNbOfComp));
-    for(int i=0;i<nbOfTuples;i++)
+    mcIdType nbOfTuples=getNumberOfTuples();
+    std::size_t oldNbOfComp=getNumberOfComponents();
+    std::size_t dim(std::min(oldNbOfComp,newNbOfComp));
+    for(mcIdType i=0;i<nbOfTuples;i++)
       {
-        int j=0;
+        std::size_t j=0;
         for(;j<dim;j++)
           nc[newNbOfComp*i+j]=oldc[i*oldNbOfComp+j];
         for(;j<newNbOfComp;j++)
           nc[newNbOfComp*i+j]=dftValue;
       }
     ret->setName(getName());
-    for(int i=0;i<dim;i++)
+    for(std::size_t i=0;i<dim;i++)
       ret->setInfoOnComponent(i,getInfoOnComponent(i));
     ret->setName(getName());
     return ret.retn();
@@ -1320,25 +1428,25 @@ namespace MEDCoupling
    *  \endif
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::myKeepSelectedComponents(const std::vector<int>& compoIds) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::myKeepSelectedComponents(const std::vector<std::size_t>& compoIds) const
   {
     checkAllocated();
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
     MCAuto< typename Traits<T>::ArrayType > ret(DynamicCastSafe<DataArray,typename Traits<T>::ArrayType>(ret0));
-    std::size_t newNbOfCompo(compoIds.size());
-    int oldNbOfCompo(getNumberOfComponents());
-    for(std::vector<int>::const_iterator it=compoIds.begin();it!=compoIds.end();it++)
+    std::size_t newNbOfCompo=compoIds.size();
+    std::size_t oldNbOfCompo=getNumberOfComponents();
+    for(std::vector<std::size_t>::const_iterator it=compoIds.begin();it!=compoIds.end();it++)
       if((*it)<0 || (*it)>=oldNbOfCompo)
         {
           std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::keepSelectedComponents : invalid requested component : " << *it << " whereas it should be in [0," << oldNbOfCompo << ") !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-    int nbOfTuples(getNumberOfTuples());
-    ret->alloc(nbOfTuples,(int)newNbOfCompo);
+    mcIdType nbOfTuples(getNumberOfTuples());
+    ret->alloc(nbOfTuples,newNbOfCompo);
     ret->copyPartOfStringInfoFrom(*this,compoIds);
     const T *oldc(getConstPointer());
     T *nc(ret->getPointer());
-    for(int i=0;i<nbOfTuples;i++)
+    for(mcIdType i=0;i<nbOfTuples;i++)
       for(std::size_t j=0;j<newNbOfCompo;j++,nc++)
         *nc=oldc[i*oldNbOfCompo+compoIds[j]];
     return ret.retn();
@@ -1360,10 +1468,10 @@ namespace MEDCoupling
    *  \sa DataArrayDouble::selectByTupleIdSafeSlice
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::subArray(int tupleIdBg, int tupleIdEnd) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::subArray(mcIdType tupleIdBg, mcIdType tupleIdEnd) const
   {
     checkAllocated();
-    int nbt(getNumberOfTuples());
+    mcIdType nbt=getNumberOfTuples();
     if(tupleIdBg<0)
       {
         std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::subArray : The tupleIdBg parameter must be greater than 0 !";
@@ -1374,7 +1482,7 @@ namespace MEDCoupling
         std::ostringstream oss; oss << Traits<T>::ArrayTypeName << ":subArray : The tupleIdBg parameter is greater than number of tuples !";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
       }
-    int trueEnd=tupleIdEnd;
+    mcIdType trueEnd=tupleIdEnd;
     if(tupleIdEnd!=-1)
       {
         if(tupleIdEnd>nbt)
@@ -1385,7 +1493,7 @@ namespace MEDCoupling
       }
     else
       trueEnd=nbt;
-    int nbComp(getNumberOfComponents());
+    std::size_t nbComp=getNumberOfComponents();
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
     MCAuto< typename Traits<T>::ArrayType > ret(DynamicCastSafe<DataArray,typename Traits<T>::ArrayType>(ret0));
     ret->alloc(trueEnd-tupleIdBg,nbComp);
@@ -1410,18 +1518,18 @@ namespace MEDCoupling
    *  \sa DataArrayDouble::subArray.
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::mySelectByTupleIdSafeSlice(int bg, int end2, int step) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::mySelectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const
   {
     checkAllocated();
     MCAuto<DataArray> ret0(buildNewEmptyInstance());
     MCAuto< typename Traits<T>::ArrayType > ret(DynamicCastSafe<DataArray,typename Traits<T>::ArrayType>(ret0));
-    int nbComp(getNumberOfComponents());
+    std::size_t nbComp(getNumberOfComponents());
     std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::selectByTupleIdSafeSlice : ";
-    int newNbOfTuples(GetNumberOfItemGivenBESRelative(bg,end2,step,oss.str()));
+    mcIdType newNbOfTuples(GetNumberOfItemGivenBESRelative(bg,end2,step,oss.str()));
     ret->alloc(newNbOfTuples,nbComp);
     T *pt(ret->getPointer());
     const T *srcPt(getConstPointer()+bg*nbComp);
-    for(int i=0;i<newNbOfTuples;i++,srcPt+=step*nbComp)
+    for(mcIdType i=0;i<newNbOfTuples;i++,srcPt+=step*nbComp)
       std::copy(srcPt,srcPt+nbComp,pt+i*nbComp);
     ret->copyStringInfoFrom(*this);
     return ret.retn();
@@ -1464,7 +1572,7 @@ namespace MEDCoupling
    *  \endif
    */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValues1(const typename Traits<T>::ArrayType *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare)
+  void DataArrayTemplate<T>::setPartOfValues1(const typename Traits<T>::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare)
   {
     if(!a)
       {
@@ -1474,13 +1582,14 @@ namespace MEDCoupling
     const char msg[]="DataArrayTemplate::setPartOfValues1";
     checkAllocated();
     a->checkAllocated();
-    int newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
-    int newNbOfComp(DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg));
-    int nbComp(getNumberOfComponents()),nbOfTuples(getNumberOfTuples());
+    mcIdType newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
+    mcIdType newNbOfComp(DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg));
+    std::size_t nbComp(getNumberOfComponents());
+    mcIdType nbOfTuples(getNumberOfTuples());
     DataArray::CheckValueInRangeEx(nbOfTuples,bgTuples,endTuples,"invalid tuple value");
-    DataArray::CheckValueInRangeEx(nbComp,bgComp,endComp,"invalid component value");
+    DataArray::CheckValueInRangeEx(ToIdType(nbComp),bgComp,endComp,"invalid component value");
     bool assignTech(true);
-    if(a->getNbOfElems()==(std::size_t)newNbOfTuples*newNbOfComp)
+    if(a->getNbOfElems()==newNbOfTuples*newNbOfComp)
       {
         if(strictCompoCompare)
           a->checkNbOfTuplesAndComp(newNbOfTuples,newNbOfComp,msg);
@@ -1494,16 +1603,16 @@ namespace MEDCoupling
     T *pt(getPointer()+bgTuples*nbComp+bgComp);
     if(assignTech)
       {
-        for(int i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
-          for(int j=0;j<newNbOfComp;j++,srcPt++)
+        for(mcIdType i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
+          for(mcIdType j=0;j<newNbOfComp;j++,srcPt++)
             pt[j*stepComp]=*srcPt;
       }
     else
       {
-        for(int i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
+        for(mcIdType i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
           {
             const T*srcPt2=srcPt;
-            for(int j=0;j<newNbOfComp;j++,srcPt2++)
+            for(mcIdType j=0;j<newNbOfComp;j++,srcPt2++)
               pt[j*stepComp]=*srcPt2;
           }
       }
@@ -1532,18 +1641,19 @@ namespace MEDCoupling
  *  \endif
  */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValuesSimple1(T a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp)
+  void DataArrayTemplate<T>::setPartOfValuesSimple1(T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp)
   {
     const char msg[]="DataArrayTemplate::setPartOfValuesSimple1";
     checkAllocated();
-    int newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
-    int newNbOfComp(DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg));
-    int nbComp(getNumberOfComponents()),nbOfTuples(getNumberOfTuples());
+    mcIdType newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
+    mcIdType newNbOfComp(DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg));
+    std::size_t nbComp(getNumberOfComponents());
+    mcIdType nbOfTuples(getNumberOfTuples());
     DataArray::CheckValueInRangeEx(nbOfTuples,bgTuples,endTuples,"invalid tuple value");
-    DataArray::CheckValueInRangeEx(nbComp,bgComp,endComp,"invalid component value");
+    DataArray::CheckValueInRangeEx(ToIdType(nbComp),bgComp,endComp,"invalid component value");
     T *pt=getPointer()+bgTuples*nbComp+bgComp;
-    for(int i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
-      for(int j=0;j<newNbOfComp;j++)
+    for(mcIdType i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
+      for(mcIdType j=0;j<newNbOfComp;j++)
         pt[j*stepComp]=a;
   }
   
@@ -1588,20 +1698,21 @@ namespace MEDCoupling
    *  \endif
    */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValues2(const typename Traits<T>::ArrayType *a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp, bool strictCompoCompare)
+  void DataArrayTemplate<T>::setPartOfValues2(const typename Traits<T>::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare)
   {
     if(!a)
       throw INTERP_KERNEL::Exception("DataArrayDouble::setPartOfValues2 : input DataArrayDouble is NULL !");
     const char msg[]="DataArrayTemplate::setPartOfValues2";
     checkAllocated();
     a->checkAllocated();
-    int nbComp(getNumberOfComponents()),nbOfTuples(getNumberOfTuples());
-    for(const int *z=bgComp;z!=endComp;z++)
-      DataArray::CheckValueInRange(nbComp,*z,"invalid component id");
-    int newNbOfTuples((int)std::distance(bgTuples,endTuples));
-    int newNbOfComp((int)std::distance(bgComp,endComp));
+    std::size_t nbComp(getNumberOfComponents());
+    mcIdType nbOfTuples(getNumberOfTuples());
+    for(const mcIdType *z=bgComp;z!=endComp;z++)
+      DataArray::CheckValueInRange(ToIdType(nbComp),*z,"invalid component id");
+    mcIdType newNbOfTuples(ToIdType(std::distance(bgTuples,endTuples)));
+    mcIdType newNbOfComp(ToIdType(std::distance(bgComp,endComp)));
     bool assignTech(true);
-    if(a->getNbOfElems()==(std::size_t)newNbOfTuples*newNbOfComp)
+    if(a->getNbOfElems()==newNbOfTuples*newNbOfComp)
       {
         if(strictCompoCompare)
           a->checkNbOfTuplesAndComp(newNbOfTuples,newNbOfComp,msg);
@@ -1615,10 +1726,10 @@ namespace MEDCoupling
     const T *srcPt(a->getConstPointer());
     if(assignTech)
       {    
-        for(const int *w=bgTuples;w!=endTuples;w++)
+        for(const mcIdType *w=bgTuples;w!=endTuples;w++)
           {
             DataArray::CheckValueInRange(nbOfTuples,*w,"invalid tuple id");
-            for(const int *z=bgComp;z!=endComp;z++,srcPt++)
+            for(const mcIdType *z=bgComp;z!=endComp;z++,srcPt++)
               {    
                 pt[(std::size_t)(*w)*nbComp+(*z)]=*srcPt;
               }
@@ -1626,11 +1737,11 @@ namespace MEDCoupling
       }
     else
       {
-        for(const int *w=bgTuples;w!=endTuples;w++)
+        for(const mcIdType *w=bgTuples;w!=endTuples;w++)
           {
             const T *srcPt2=srcPt;
             DataArray::CheckValueInRange(nbOfTuples,*w,"invalid tuple id");
-            for(const int *z=bgComp;z!=endComp;z++,srcPt2++)
+            for(const mcIdType *z=bgComp;z!=endComp;z++,srcPt2++)
               {    
                 pt[(std::size_t)(*w)*nbComp+(*z)]=*srcPt2;
               }
@@ -1661,15 +1772,16 @@ namespace MEDCoupling
    *  \endif
    */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValuesSimple2(T a, const int *bgTuples, const int *endTuples, const int *bgComp, const int *endComp)
+  void DataArrayTemplate<T>::setPartOfValuesSimple2(T a, const mcIdType *bgTuples, const mcIdType *endTuples, const mcIdType *bgComp, const mcIdType *endComp)
   {
     checkAllocated();
-    int nbComp(getNumberOfComponents()),nbOfTuples(getNumberOfTuples());
-    for(const int *z=bgComp;z!=endComp;z++)
-      DataArray::CheckValueInRange(nbComp,*z,"invalid component id");
+    std::size_t nbComp=getNumberOfComponents();
+    mcIdType nbOfTuples=getNumberOfTuples();
+    for(const mcIdType *z=bgComp;z!=endComp;z++)
+      DataArray::CheckValueInRange(ToIdType(nbComp),*z,"invalid component id");
     T *pt(getPointer());
-    for(const int *w=bgTuples;w!=endTuples;w++)
-      for(const int *z=bgComp;z!=endComp;z++)
+    for(const mcIdType *w=bgTuples;w!=endTuples;w++)
+      for(const mcIdType *z=bgComp;z!=endComp;z++)
         {
           DataArray::CheckValueInRange(nbOfTuples,*w,"invalid tuple id");
           pt[(std::size_t)(*w)*nbComp+(*z)]=a;
@@ -1723,20 +1835,20 @@ namespace MEDCoupling
    *  \endif
    */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValues3(const typename Traits<T>::ArrayType *a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare)
+  void DataArrayTemplate<T>::setPartOfValues3(const typename Traits<T>::ArrayType *a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare)
   {
     if(!a)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setPartOfValues3 : input DataArrayDouble is NULL !");
     const char msg[]="DataArrayTemplate::setPartOfValues3";
     checkAllocated();
     a->checkAllocated();
-    int newNbOfComp=DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg);
-    int nbComp=getNumberOfComponents();
-    int nbOfTuples=getNumberOfTuples();
-    DataArray::CheckValueInRangeEx(nbComp,bgComp,endComp,"invalid component value");
-    int newNbOfTuples=(int)std::distance(bgTuples,endTuples);
+    mcIdType newNbOfComp=DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg);
+    std::size_t nbComp(getNumberOfComponents());
+    mcIdType nbOfTuples(getNumberOfTuples());
+    DataArray::CheckValueInRangeEx(ToIdType(nbComp),bgComp,endComp,"invalid component value");
+    mcIdType newNbOfTuples=ToIdType(std::distance(bgTuples,endTuples));
     bool assignTech=true;
-    if(a->getNbOfElems()==(std::size_t)newNbOfTuples*newNbOfComp)
+    if(a->getNbOfElems()==newNbOfTuples*newNbOfComp)
       {
         if(strictCompoCompare)
           a->checkNbOfTuplesAndComp(newNbOfTuples,newNbOfComp,msg);
@@ -1750,8 +1862,8 @@ namespace MEDCoupling
     const T *srcPt(a->getConstPointer());
     if(assignTech)
       {
-        for(const int *w=bgTuples;w!=endTuples;w++)
-          for(int j=0;j<newNbOfComp;j++,srcPt++)
+        for(const mcIdType *w=bgTuples;w!=endTuples;w++)
+          for(mcIdType j=0;j<newNbOfComp;j++,srcPt++)
             {
               DataArray::CheckValueInRange(nbOfTuples,*w,"invalid tuple id");
               pt[(std::size_t)(*w)*nbComp+j*stepComp]=*srcPt;
@@ -1759,10 +1871,10 @@ namespace MEDCoupling
       }
     else
       {
-        for(const int *w=bgTuples;w!=endTuples;w++)
+        for(const mcIdType *w=bgTuples;w!=endTuples;w++)
           {
             const T *srcPt2=srcPt;
-            for(int j=0;j<newNbOfComp;j++,srcPt2++)
+            for(mcIdType j=0;j<newNbOfComp;j++,srcPt2++)
               {
                 DataArray::CheckValueInRange(nbOfTuples,*w,"invalid tuple id");
                 pt[(std::size_t)(*w)*nbComp+j*stepComp]=*srcPt2;
@@ -1798,16 +1910,17 @@ namespace MEDCoupling
    *  \endif
    */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValuesSimple3(T a, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp)
+  void DataArrayTemplate<T>::setPartOfValuesSimple3(T a, const mcIdType *bgTuples, const mcIdType *endTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp)
   {
     const char msg[]="DataArrayTemplate::setPartOfValuesSimple3";
     checkAllocated();
-    int newNbOfComp(DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg));
-    int nbComp(getNumberOfComponents()),nbOfTuples(getNumberOfTuples());
-    DataArray::CheckValueInRangeEx(nbComp,bgComp,endComp,"invalid component value");
+    std::size_t newNbOfComp(DataArray::GetNumberOfItemGivenBES(bgComp,endComp,stepComp,msg));
+    std::size_t nbComp(getNumberOfComponents());
+    mcIdType nbOfTuples(getNumberOfTuples());
+    DataArray::CheckValueInRangeEx(ToIdType(nbComp),bgComp,endComp,"invalid component value");
     T *pt(getPointer()+bgComp);
-    for(const int *w=bgTuples;w!=endTuples;w++)
-      for(int j=0;j<newNbOfComp;j++)
+    for(const mcIdType *w=bgTuples;w!=endTuples;w++)
+      for(std::size_t j=0;j<newNbOfComp;j++)
         {
           DataArray::CheckValueInRange(nbOfTuples,*w,"invalid tuple id");
           pt[(std::size_t)(*w)*nbComp+j*stepComp]=a;
@@ -1849,21 +1962,21 @@ namespace MEDCoupling
    *
    */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValues4(const typename Traits<T>::ArrayType *a, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp, bool strictCompoCompare)
+  void DataArrayTemplate<T>::setPartOfValues4(const typename Traits<T>::ArrayType *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp, bool strictCompoCompare)
   {if(!a)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setPartOfValues4 : input DataArrayTemplate is NULL !");
     const char msg[]="DataArrayTemplate::setPartOfValues4";
     checkAllocated();
     a->checkAllocated();
-    int newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
-    int newNbOfComp((int)std::distance(bgComp,endComp));
-    int nbComp(getNumberOfComponents());
-    for(const int *z=bgComp;z!=endComp;z++)
-      DataArray::CheckValueInRange(nbComp,*z,"invalid component id");
-    int nbOfTuples(getNumberOfTuples());
+    mcIdType newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
+    std::size_t newNbOfComp(std::distance(bgComp,endComp));
+    std::size_t nbComp(getNumberOfComponents());
+    for(const mcIdType *z=bgComp;z!=endComp;z++)
+      DataArray::CheckValueInRange(ToIdType(nbComp),*z,"invalid component id");
+    mcIdType nbOfTuples(getNumberOfTuples());
     DataArray::CheckValueInRangeEx(nbOfTuples,bgTuples,endTuples,"invalid tuple value");
     bool assignTech(true);
-    if(a->getNbOfElems()==(std::size_t)newNbOfTuples*newNbOfComp)
+    if(a->getNbOfElems()==ToIdType(newNbOfTuples*newNbOfComp))
       {
         if(strictCompoCompare)
           a->checkNbOfTuplesAndComp(newNbOfTuples,newNbOfComp,msg);
@@ -1877,35 +1990,35 @@ namespace MEDCoupling
     T *pt(getPointer()+bgTuples*nbComp);
     if(assignTech)
       {
-        for(int i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
-          for(const int *z=bgComp;z!=endComp;z++,srcPt++)
+        for(mcIdType i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
+          for(const mcIdType *z=bgComp;z!=endComp;z++,srcPt++)
             pt[*z]=*srcPt;
       }
     else
       {
-      for(int i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
+      for(mcIdType i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
         {
           const T *srcPt2(srcPt);
-          for(const int *z=bgComp;z!=endComp;z++,srcPt2++)
+          for(const mcIdType *z=bgComp;z!=endComp;z++,srcPt2++)
             pt[*z]=*srcPt2;
         }
       }
   }
 
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValuesSimple4(T a, int bgTuples, int endTuples, int stepTuples, const int *bgComp, const int *endComp)
+  void DataArrayTemplate<T>::setPartOfValuesSimple4(T a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, const mcIdType *bgComp, const mcIdType *endComp)
   {
     const char msg[]="DataArrayTemplate::setPartOfValuesSimple4";
     checkAllocated();
-    int newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
-    int nbComp(getNumberOfComponents());
-    for(const int *z=bgComp;z!=endComp;z++)
-      DataArray::CheckValueInRange(nbComp,*z,"invalid component id");
-    int nbOfTuples(getNumberOfTuples());
+    mcIdType newNbOfTuples(DataArray::GetNumberOfItemGivenBES(bgTuples,endTuples,stepTuples,msg));
+    std::size_t nbComp(getNumberOfComponents());
+    for(const mcIdType *z=bgComp;z!=endComp;z++)
+      DataArray::CheckValueInRange(ToIdType(nbComp),*z,"invalid component id");
+    mcIdType nbOfTuples(getNumberOfTuples());
     DataArray::CheckValueInRangeEx(nbOfTuples,bgTuples,endTuples,"invalid tuple value");
     T *pt=getPointer()+bgTuples*nbComp;
-    for(int i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
-      for(const int *z=bgComp;z!=endComp;z++)
+    for(mcIdType i=0;i<newNbOfTuples;i++,pt+=stepTuples*nbComp)
+      for(const mcIdType *z=bgComp;z!=endComp;z++)
         pt[*z]=a;
   }
   
@@ -1931,7 +2044,7 @@ namespace MEDCoupling
    *         the corresponding (\a this or \a a) array.
    */
   template<class T>
-  void DataArrayTemplate<T>::setPartOfValuesAdv(const typename Traits<T>::ArrayType *a, const DataArrayInt *tuplesSelec)
+  void DataArrayTemplate<T>::setPartOfValuesAdv(const typename Traits<T>::ArrayType *a, const DataArrayIdType *tuplesSelec)
   {
     if(!a || !tuplesSelec)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setPartOfValuesAdv : input DataArrayTemplate is NULL !");
@@ -1943,11 +2056,11 @@ namespace MEDCoupling
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setPartOfValuesAdv : This and a do not have the same number of components !");
     if(tuplesSelec->getNumberOfComponents()!=2)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setPartOfValuesAdv : Expecting to have a tuple selector DataArrayInt instance with exactly 2 components !");
-    int thisNt(getNumberOfTuples());
-    int aNt(a->getNumberOfTuples());
+    mcIdType thisNt(getNumberOfTuples());
+    mcIdType aNt(a->getNumberOfTuples());
     T *valsToSet(getPointer());
     const T *valsSrc(a->getConstPointer());
-    for(const int *tuple=tuplesSelec->begin();tuple!=tuplesSelec->end();tuple+=2)
+    for(const mcIdType *tuple=tuplesSelec->begin();tuple!=tuplesSelec->end();tuple+=2)
     {
       if(tuple[1]>=0 && tuple[1]<aNt)
         {
@@ -1993,7 +2106,7 @@ namespace MEDCoupling
    *         \a aBase array.
  */
   template<class T>
-  void DataArrayTemplate<T>::setContigPartOfSelectedValues(int tupleIdStart, const DataArray *aBase, const DataArrayInt *tuplesSelec)
+  void DataArrayTemplate<T>::setContigPartOfSelectedValues(mcIdType tupleIdStart, const DataArray *aBase, const DataArrayIdType *tuplesSelec)
   {
     if(!aBase || !tuplesSelec)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setContigPartOfSelectedValues : input DataArray is NULL !");
@@ -2008,14 +2121,14 @@ namespace MEDCoupling
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setContigPartOfSelectedValues : This and a do not have the same number of components !");
     if(tuplesSelec->getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setContigPartOfSelectedValues : Expecting to have a tuple selector DataArrayInt instance with exactly 1 component !");
-    int thisNt(getNumberOfTuples());
-    int aNt(a->getNumberOfTuples());
-    int nbOfTupleToWrite(tuplesSelec->getNumberOfTuples());
+    mcIdType thisNt(getNumberOfTuples());
+    mcIdType aNt(a->getNumberOfTuples());
+    mcIdType nbOfTupleToWrite(tuplesSelec->getNumberOfTuples());
     T *valsToSet(getPointer()+tupleIdStart*nbOfComp);
     if(tupleIdStart+nbOfTupleToWrite>thisNt)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setContigPartOfSelectedValues : invalid number range of values to write !");
     const T *valsSrc=a->getConstPointer();
-    for(const int *tuple=tuplesSelec->begin();tuple!=tuplesSelec->end();tuple++,valsToSet+=nbOfComp)
+    for(const mcIdType *tuple=tuplesSelec->begin();tuple!=tuplesSelec->end();tuple++,valsToSet+=nbOfComp)
       {
         if(*tuple>=0 && *tuple<aNt)
           {
@@ -2056,7 +2169,7 @@ namespace MEDCoupling
    *            for the array \a aBase.
    */
   template<class T>
-  void DataArrayTemplate<T>::setContigPartOfSelectedValuesSlice(int tupleIdStart, const DataArray *aBase, int bg, int end2, int step)
+  void DataArrayTemplate<T>::setContigPartOfSelectedValuesSlice(mcIdType tupleIdStart, const DataArray *aBase, mcIdType bg, mcIdType end2, mcIdType step)
   {
     if(!aBase)
       {
@@ -2070,17 +2183,18 @@ namespace MEDCoupling
     a->checkAllocated();
     std::size_t nbOfComp(getNumberOfComponents());
     const char msg[]="DataArrayDouble::setContigPartOfSelectedValuesSlice";
-    int nbOfTupleToWrite(DataArray::GetNumberOfItemGivenBES(bg,end2,step,msg));
+    mcIdType nbOfTupleToWrite(DataArray::GetNumberOfItemGivenBES(bg,end2,step,msg));
     if(nbOfComp!=a->getNumberOfComponents())
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setContigPartOfSelectedValuesSlice : This and a do not have the same number of components !");
-    int thisNt(getNumberOfTuples()),aNt(a->getNumberOfTuples());
+    mcIdType thisNt(getNumberOfTuples());
+    mcIdType aNt(a->getNumberOfTuples());
     T *valsToSet(getPointer()+tupleIdStart*nbOfComp);
     if(tupleIdStart+nbOfTupleToWrite>thisNt)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setContigPartOfSelectedValuesSlice : invalid number range of values to write !");
     if(end2>aNt)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::setContigPartOfSelectedValuesSlice : invalid range of values to read !");
     const T *valsSrc(a->getConstPointer()+bg*nbOfComp);
-    for(int i=0;i<nbOfTupleToWrite;i++,valsToSet+=nbOfComp,valsSrc+=step*nbOfComp)
+    for(mcIdType i=0;i<nbOfTupleToWrite;i++,valsToSet+=nbOfComp,valsSrc+=step*nbOfComp)
       {
         std::copy(valsSrc,valsSrc+nbOfComp,valsToSet);
       }
@@ -2099,10 +2213,11 @@ namespace MEDCoupling
    *  \throw If \a this is not allocated.
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplate<T>::mySelectByTupleRanges(const std::vector<std::pair<int,int> >& ranges) const
+  typename Traits<T>::ArrayType *DataArrayTemplate<T>::mySelectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const
   {
     checkAllocated();
-    int nbOfComp(getNumberOfComponents()),nbOfTuplesThis(getNumberOfTuples());
+    std::size_t nbOfComp(getNumberOfComponents());
+    mcIdType nbOfTuplesThis(getNumberOfTuples());
     if(ranges.empty())
       {
         MCAuto<DataArray> ret0(buildNewEmptyInstance());
@@ -2111,9 +2226,9 @@ namespace MEDCoupling
         ret->copyStringInfoFrom(*this);
         return ret.retn();
       }
-    int ref(ranges.front().first),nbOfTuples(0);
+    mcIdType ref(ranges.front().first),nbOfTuples(0);
     bool isIncreasing(true);
-    for(std::vector<std::pair<int,int> >::const_iterator it=ranges.begin();it!=ranges.end();it++)
+    for(std::vector<std::pair<mcIdType,mcIdType> >::const_iterator it=ranges.begin();it!=ranges.end();it++)
       {
         if((*it).first<=(*it).second)
           {
@@ -2146,7 +2261,7 @@ namespace MEDCoupling
     ret->copyStringInfoFrom(*this);
     const T *src(getConstPointer());
     T *work(ret->getPointer());
-    for(std::vector<std::pair<int,int> >::const_iterator it=ranges.begin();it!=ranges.end();it++)
+    for(std::vector<std::pair<mcIdType,mcIdType> >::const_iterator it=ranges.begin();it!=ranges.end();it++)
       work=std::copy(src+(*it).first*nbOfComp,src+(*it).second*nbOfComp,work);
     return ret.retn();
   }
@@ -2164,7 +2279,7 @@ namespace MEDCoupling
     checkAllocated();
     if(getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::front : number of components not equal to one !");
-    int nbOfTuples(getNumberOfTuples());
+    mcIdType nbOfTuples=getNumberOfTuples();
     if(nbOfTuples<1)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::front : number of tuples must be >= 1 !");
     return *(getConstPointer());
@@ -2183,7 +2298,7 @@ namespace MEDCoupling
     checkAllocated();
     if(getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::back : number of components not equal to one !");
-    int nbOfTuples(getNumberOfTuples());
+    mcIdType nbOfTuples=getNumberOfTuples();
     if(nbOfTuples<1)
       throw INTERP_KERNEL::Exception("DataArrayTemplate::back : number of tuples must be >= 1 !");
     return *(getConstPointer()+nbOfTuples-1);
@@ -2198,17 +2313,17 @@ namespace MEDCoupling
    *  \sa getMaxAbsValue, getMinValue
    */
   template<class T>
-  T DataArrayTemplate<T>::getMaxValue(int& tupleId) const
+  T DataArrayTemplate<T>::getMaxValue(mcIdType& tupleId) const
   {
     checkAllocated();
     if(getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayDouble::getMaxValue : must be applied on DataArrayDouble with only one component, you can call 'rearrange' method before or call 'getMaxValueInArray' method !");
-    int nbOfTuples(getNumberOfTuples());
+    mcIdType nbOfTuples=getNumberOfTuples();
     if(nbOfTuples<=0)
       throw INTERP_KERNEL::Exception("DataArrayDouble::getMaxValue : array exists but number of tuples must be > 0 !");
     const T *vals(getConstPointer());
     const T *loc(std::max_element(vals,vals+nbOfTuples));
-    tupleId=(int)std::distance(vals,loc);
+    tupleId=ToIdType(std::distance(vals,loc));
     return *loc;
   }
   
@@ -2240,22 +2355,22 @@ namespace MEDCoupling
     checkAllocated();
     if(getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayDouble::getMaxAbsValue : must be applied on DataArrayDouble with only one component, you can call 'rearrange' method before or call 'getMaxValueInArray' method !");
-    std::size_t nbTuples(this->getNumberOfTuples());
+    mcIdType nbTuples(this->getNumberOfTuples());
     if(nbTuples==0)
       throw INTERP_KERNEL::Exception("DataArrayTemplate<T>::getMaxAbsValue : empty array !");
     T ret((T)-1);
     tupleId=0;
     const T *pt(begin());
-    for(std::size_t i=0;i<nbTuples;i++,pt++)
+    for(mcIdType i=0;i<nbTuples;i++,pt++)
       {
-        T cand(std::abs(*pt));
+        T cand((T)std::abs(*pt));
         if(cand>ret)
           {
             ret=cand;
             tupleId=i;
           }
       }
-    return this->getIJ(tupleId,0);
+    return this->getIJ(ToIdType(tupleId),0);
   }
 
   /*!
@@ -2279,17 +2394,17 @@ namespace MEDCoupling
    *  \throw If \a this->getNumberOfTuples() < 1
    */
   template<class T>
-  T DataArrayTemplate<T>::getMinValue(int& tupleId) const
+  T DataArrayTemplate<T>::getMinValue(mcIdType& tupleId) const
   {
     checkAllocated();
     if(getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayDouble::getMinValue : must be applied on DataArrayDouble with only one component, you can call 'rearrange' method before call 'getMinValueInArray' method !");
-    int nbOfTuples(getNumberOfTuples());
+    mcIdType nbOfTuples=getNumberOfTuples();
     if(nbOfTuples<=0)
       throw INTERP_KERNEL::Exception("DataArrayDouble::getMinValue : array exists but number of tuples must be > 0 !");
     const T *vals(getConstPointer());
     const T *loc(std::min_element(vals,vals+nbOfTuples));
-    tupleId=(int)std::distance(vals,loc);
+    tupleId=ToIdType(std::distance(vals,loc));
     return *loc;
   }
   
@@ -2308,11 +2423,12 @@ namespace MEDCoupling
   }
   
   template<class T>
-  void DataArrayTemplate<T>::circularPermutation(int nbOfShift)
+  void DataArrayTemplate<T>::circularPermutation(mcIdType nbOfShift)
   {
     checkAllocated();
-    int nbOfCompo(getNumberOfComponents()),nbTuples(getNumberOfTuples());
-    int effNbSh(EffectiveCircPerm(nbOfShift,nbTuples));
+    std::size_t nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
+    mcIdType effNbSh(EffectiveCircPerm(nbOfShift,nbTuples));
     if(effNbSh==0)
       return ;
     T *work(getPointer());
@@ -2333,18 +2449,19 @@ namespace MEDCoupling
   }
   
   template<class T>
-  void DataArrayTemplate<T>::circularPermutationPerTuple(int nbOfShift)
+  void DataArrayTemplate<T>::circularPermutationPerTuple(mcIdType nbOfShift)
   {
     checkAllocated();
-    int nbOfCompo(getNumberOfComponents()),nbTuples(getNumberOfTuples());
-    int effNbSh(EffectiveCircPerm(nbOfShift,nbOfCompo));
+    std::size_t nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
+    mcIdType effNbSh(EffectiveCircPerm(nbOfShift,ToIdType(nbOfCompo)));
     if(effNbSh==0)
       return ;
     T *work(getPointer());
-    if(effNbSh<nbOfCompo-effNbSh)
+    if(effNbSh<ToIdType(nbOfCompo)-effNbSh)
       {
         typename INTERP_KERNEL::AutoPtr<T> buf(new T[effNbSh]);
-        for(int i=0;i<nbTuples;i++,work+=nbOfCompo)
+        for(mcIdType i=0;i<nbTuples;i++,work+=nbOfCompo)
           {
             std::copy(work,work+effNbSh,(T *)buf);
             std::copy(work+effNbSh,work+nbOfCompo,work);// ze big shift
@@ -2354,7 +2471,7 @@ namespace MEDCoupling
     else
       {
         typename INTERP_KERNEL::AutoPtr<T> buf(new T[nbOfCompo-effNbSh]);
-        for(int i=0;i<nbTuples;i++,work+=nbOfCompo)
+        for(mcIdType i=0;i<nbTuples;i++,work+=nbOfCompo)
           {
             std::copy(work+effNbSh,work+nbOfCompo,(T *)buf);
             std::copy(work,work+effNbSh,work+(nbOfCompo-effNbSh));// ze big shift
@@ -2362,7 +2479,7 @@ namespace MEDCoupling
           }
       }
     std::vector<std::string> sts(nbOfCompo);
-    for(int i=0;i<nbOfCompo;i++)
+    for(std::size_t i=0;i<nbOfCompo;i++)
       sts[i]=_info_on_compo[(i+effNbSh)%nbOfCompo];
     setInfoOnComponents(sts);
   }
@@ -2371,11 +2488,12 @@ namespace MEDCoupling
   void DataArrayTemplate<T>::reversePerTuple()
   {
     checkAllocated();
-    int nbOfCompo(getNumberOfComponents()),nbTuples(getNumberOfTuples());
+    std::size_t nbOfCompo(getNumberOfComponents());
+    mcIdType nbTuples(getNumberOfTuples());
     if(nbOfCompo<=1)
       return ;
     T *work(getPointer());
-    for(int i=0;i<nbTuples;i++,work+=nbOfCompo)
+    for(mcIdType i=0;i<nbTuples;i++,work+=nbOfCompo)
       std::reverse(work,work+nbOfCompo);
     std::reverse(_info_on_compo.begin(),_info_on_compo.end());
   }
@@ -2412,6 +2530,17 @@ namespace MEDCoupling
 
   //////////////////////////////
 
+  namespace
+  {
+    // local static function to copy arrays without warnings
+    template <class TIn, class TOut>
+    static void copyCast (const TIn *begin, const TIn *end, TOut* dest)
+    {
+      for (const TIn *src = begin; src != end; ++src, ++dest)
+        *dest=static_cast<TOut>(*src);
+    }
+  }
+
   template<class T>
   template<class U>
   MCAuto< typename Traits<U>::ArrayType > DataArrayTemplateClassic<T>::convertToOtherTypeOfArr() const
@@ -2423,9 +2552,8 @@ namespace MEDCoupling
     const T *src(this->begin());
     U *dest(ret->getPointer());
     // to make Visual C++ happy : instead of std::size_t nbOfVals=getNbOfElems(); std::copy(src,src+nbOfVals,dest);
-    //for(const T *src=this->begin();src!=this->end();src++,dest++)
-    //  *dest=(int)*src;
-    std::copy(src,src+nbOfVals,dest);
+    copyCast(src, src+nbOfVals, dest);
+    //std::copy(src,src+nbOfVals,dest);
     ret->copyStringInfoFrom(*this);
     return ret;
   }
@@ -2472,17 +2600,18 @@ namespace MEDCoupling
    *  \throw If \a this is not allocated, or \a compoId is not in [0,\c this->getNumberOfComponents() ).
    */
   template<class T>
-  void DataArrayTemplateClassic<T>::applyLin(T a, T b, int compoId)
+  void DataArrayTemplateClassic<T>::applyLin(T a, T b, std::size_t compoId)
   {
     this->checkAllocated();
-    T *ptr(this->getPointer()+compoId);
-    int nbOfComp(this->getNumberOfComponents()),nbOfTuple(this->getNumberOfTuples());
-    if(compoId<0 || compoId>=nbOfComp)
+    std::size_t nbOfComp=this->getNumberOfComponents();
+    if(compoId>=nbOfComp)
       {
         std::ostringstream oss; oss << "DataArrayDouble::applyLin : The compoId requested (" << compoId << ") is not valid ! Must be in [0," << nbOfComp << ") !";
         throw INTERP_KERNEL::Exception(oss.str().c_str());
       }
-    for(int i=0;i<nbOfTuple;i++,ptr+=nbOfComp)
+    T *ptr(this->getPointer()+compoId);
+    mcIdType nbOfTuple=this->getNumberOfTuples();
+    for(mcIdType i=0;i<nbOfTuple;i++,ptr+=nbOfComp)
       *ptr=a*(*ptr)+b;
     this->declareAsNew();
   }
@@ -2518,7 +2647,8 @@ namespace MEDCoupling
   {
     this->checkAllocated();
     MCAuto<typename Traits<T>::ArrayType> newArr(Traits<T>::ArrayType::New());
-    int nbOfTuples(this->getNumberOfTuples()),nbOfComp(this->getNumberOfComponents());
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    std::size_t nbOfComp(this->getNumberOfComponents());
     newArr->alloc(nbOfTuples,nbOfComp);
     const T *cptr(this->begin());
     std::transform(cptr,cptr+nbOfTuples*nbOfComp,newArr->getPointer(),std::negate<T>());
@@ -2535,8 +2665,10 @@ namespace MEDCoupling
     const char *msg="Nb of tuples mismatch for DataArrayDouble::multiplyEqual !";
     this->checkAllocated();
     other->checkAllocated();
-    int nbOfTuple(this->getNumberOfTuples()),nbOfTuple2(other->getNumberOfTuples());
-    int nbOfComp(this->getNumberOfComponents()),nbOfComp2(other->getNumberOfComponents());
+    mcIdType nbOfTuple(this->getNumberOfTuples());
+    mcIdType nbOfTuple2(other->getNumberOfTuples());
+    std::size_t nbOfComp(this->getNumberOfComponents());
+    std::size_t nbOfComp2(other->getNumberOfComponents());
     if(nbOfTuple==nbOfTuple2)
       {
         if(nbOfComp==nbOfComp2)
@@ -2547,7 +2679,7 @@ namespace MEDCoupling
           {
             T *ptr(this->getPointer());
             const T *ptrc(other->begin());
-            for(int i=0;i<nbOfTuple;i++)
+            for(mcIdType i=0;i<nbOfTuple;i++)
               std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptr+i*nbOfComp,std::bind2nd(FCT(),*ptrc++));
           }
         else
@@ -2559,7 +2691,7 @@ namespace MEDCoupling
           {
             T *ptr(this->getPointer());
             const T *ptrc(other->begin());
-            for(int i=0;i<nbOfTuple;i++)
+            for(mcIdType i=0;i<nbOfTuple;i++)
               std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptrc,ptr+i*nbOfComp,FCT());
           }
         else
@@ -2668,8 +2800,10 @@ namespace MEDCoupling
   {
     if(!a1 || !a2)
       throw INTERP_KERNEL::Exception("DivSub : input DataArrayDouble instance is NULL !");
-    int nbOfTuple1(a1->getNumberOfTuples()),nbOfTuple2(a2->getNumberOfTuples());
-    int nbOfComp1(a1->getNumberOfComponents()),nbOfComp2(a2->getNumberOfComponents());
+    mcIdType nbOfTuple1(a1->getNumberOfTuples());
+    mcIdType nbOfTuple2(a2->getNumberOfTuples());
+    std::size_t nbOfComp1(a1->getNumberOfComponents());
+    std::size_t nbOfComp2(a2->getNumberOfComponents());
     if(nbOfTuple2==nbOfTuple1)
       {
         if(nbOfComp1==nbOfComp2)
@@ -2686,7 +2820,7 @@ namespace MEDCoupling
             ret->alloc(nbOfTuple1,nbOfComp1);
             const T *a2Ptr(a2->begin()),*a1Ptr(a1->begin());
             T *res(ret->getPointer());
-            for(int i=0;i<nbOfTuple1;i++)
+            for(mcIdType i=0;i<nbOfTuple1;i++)
               res=std::transform(a1Ptr+i*nbOfComp1,a1Ptr+(i+1)*nbOfComp1,res,std::bind2nd(FCT(),a2Ptr[i]));
             ret->copyStringInfoFrom(*a1);
             return ret.retn();
@@ -2704,7 +2838,7 @@ namespace MEDCoupling
         ret->alloc(nbOfTuple1,nbOfComp1);
         const T *a1ptr=a1->begin(),*a2ptr(a2->begin());
         T *pt(ret->getPointer());
-        for(int i=0;i<nbOfTuple1;i++)
+        for(mcIdType i=0;i<nbOfTuple1;i++)
           pt=std::transform(a1ptr+i*nbOfComp1,a1ptr+(i+1)*nbOfComp1,a2ptr,pt,FCT());
         ret->copyStringInfoFrom(*a1);
         return ret.retn();
@@ -2784,8 +2918,10 @@ namespace MEDCoupling
   {
     if(!a1 || !a2)
       throw INTERP_KERNEL::Exception("DataArrayDouble::MulAdd : input DataArrayDouble instance is NULL !");
-    int nbOfTuple(a1->getNumberOfTuples()),nbOfTuple2(a2->getNumberOfTuples());
-    int nbOfComp(a1->getNumberOfComponents()),nbOfComp2(a2->getNumberOfComponents());
+    mcIdType nbOfTuple(a1->getNumberOfTuples());
+    mcIdType nbOfTuple2(a2->getNumberOfTuples());
+    std::size_t nbOfComp(a1->getNumberOfComponents());
+    std::size_t nbOfComp2(a2->getNumberOfComponents());
     MCAuto<typename Traits<T>::ArrayType> ret=0;
     if(nbOfTuple==nbOfTuple2)
       {
@@ -2798,7 +2934,7 @@ namespace MEDCoupling
           }
         else
           {
-            int nbOfCompMin,nbOfCompMax;
+            std::size_t nbOfCompMin,nbOfCompMax;
             const typename Traits<T>::ArrayType *aMin, *aMax;
             if(nbOfComp>nbOfComp2)
               {
@@ -2817,7 +2953,7 @@ namespace MEDCoupling
                 const T *aMinPtr(aMin->begin());
                 const T *aMaxPtr(aMax->begin());
                 T *res=ret->getPointer();
-                for(int i=0;i<nbOfTuple;i++)
+                for(mcIdType i=0;i<nbOfTuple;i++)
                   res=std::transform(aMaxPtr+i*nbOfCompMax,aMaxPtr+(i+1)*nbOfCompMax,res,std::bind2nd(FCT(),aMinPtr[i]));
                 ret->copyStringInfoFrom(*aMax);
               }
@@ -2829,14 +2965,14 @@ namespace MEDCoupling
       {
         if(nbOfComp==nbOfComp2)
           {
-            int nbOfTupleMax=std::max(nbOfTuple,nbOfTuple2);
+            mcIdType nbOfTupleMax=std::max(nbOfTuple,nbOfTuple2);
             const typename Traits<T>::ArrayType *aMin(nbOfTuple>nbOfTuple2?a2:a1);
             const typename Traits<T>::ArrayType *aMax(nbOfTuple>nbOfTuple2?a1:a2);
             const T *aMinPtr(aMin->begin()),*aMaxPtr(aMax->begin());
             ret=Traits<T>::ArrayType::New();
             ret->alloc(nbOfTupleMax,nbOfComp);
             T *res(ret->getPointer());
-            for(int i=0;i<nbOfTupleMax;i++)
+            for(mcIdType i=0;i<nbOfTupleMax;i++)
               res=std::transform(aMaxPtr+i*nbOfComp,aMaxPtr+(i+1)*nbOfComp,aMinPtr,res,FCT());
             ret->copyStringInfoFrom(*aMax);
           }
@@ -2984,36 +3120,36 @@ struct NotInRange
    * \sa DataArrayInt::findIdsInRange
    */
   template<class T>
-  DataArrayInt *DataArrayTemplateClassic<T>::findIdsStrictlyNegative() const
+  DataArrayIdType *DataArrayTemplateClassic<T>::findIdsStrictlyNegative() const
   {
     LowerThan<T> lt((T)0);
-    MCAuto<DataArrayInt> ret(findIdsAdv(lt));
+    MCAuto<DataArrayIdType> ret(findIdsAdv(lt));
     return ret.retn();
   }
   
   template<class T>
-  MCAuto<DataArrayInt> DataArrayTemplateClassic<T>::findIdsGreaterOrEqualTo(T val) const
+  MCAuto<DataArrayIdType> DataArrayTemplateClassic<T>::findIdsGreaterOrEqualTo(T val) const
   {
     GreatEqual<T> ge(val);
     return findIdsAdv(ge);
   }
   
   template<class T>
-  MCAuto<DataArrayInt> DataArrayTemplateClassic<T>::findIdsGreaterThan(T val) const
+  MCAuto<DataArrayIdType> DataArrayTemplateClassic<T>::findIdsGreaterThan(T val) const
   {
     GreaterThan<T> gt(val);
     return findIdsAdv(gt);
   }
   
   template<class T>
-  MCAuto<DataArrayInt> DataArrayTemplateClassic<T>::findIdsLowerOrEqualTo(T val) const
+  MCAuto<DataArrayIdType> DataArrayTemplateClassic<T>::findIdsLowerOrEqualTo(T val) const
   {
     LowerEqual<T> le(val);
     return findIdsAdv(le);
   }
   
   template<class T>
-  MCAuto<DataArrayInt> DataArrayTemplateClassic<T>::findIdsLowerThan(T val) const
+  MCAuto<DataArrayIdType> DataArrayTemplateClassic<T>::findIdsLowerThan(T val) const
   {
     LowerThan<T> lt(val);
     return findIdsAdv(lt);
@@ -3071,31 +3207,31 @@ struct NotInRange
     for(it=a.begin();it!=a.end();it++)
       (*it)->checkAllocated();
     it=a.begin();
-    std::size_t nbOfTuples((*it)->getNumberOfTuples());
-    std::vector<int> nbc(a.size());
+    mcIdType nbOfTuples((*it)->getNumberOfTuples());
+    std::vector<std::size_t> nbc(a.size());
     std::vector<const T *> pts(a.size());
     nbc[0]=(*it)->getNumberOfComponents();
     pts[0]=(*it++)->getConstPointer();
-    for(int i=1;it!=a.end();it++,i++)
+    for(mcIdType i=1;it!=a.end();it++,i++)
       {
         if(nbOfTuples!=(*it)->getNumberOfTuples())
           throw INTERP_KERNEL::Exception("DataArrayDouble::Meld : mismatch of number of tuples !");
         nbc[i]=(*it)->getNumberOfComponents();
         pts[i]=(*it)->getConstPointer();
       }
-    int totalNbOfComp=std::accumulate(nbc.begin(),nbc.end(),0);
+    std::size_t totalNbOfComp=std::accumulate(nbc.begin(),nbc.end(),(std::size_t)0);
     typename Traits<T>::ArrayType *ret(Traits<T>::ArrayType::New());
     ret->alloc(nbOfTuples,totalNbOfComp);
     T *retPtr(ret->getPointer());
-    for(std::size_t i=0;i<nbOfTuples;i++)
+    for(mcIdType i=0;i<nbOfTuples;i++)
       for(std::size_t j=0;j<a.size();j++)
         {
           retPtr=std::copy(pts[j],pts[j]+nbc[j],retPtr);
           pts[j]+=nbc[j];
         }
-    int k=0;
-    for(int i=0;i<(int)a.size();i++)
-      for(int j=0;j<nbc[i];j++,k++)
+    std::size_t k=0;
+    for(std::size_t i=0;i<a.size();i++)
+      for(std::size_t j=0;j<nbc[i];j++,k++)
         ret->setInfoOnComponent(k,a[i]->getInfoOnComponent(j));
     return ret;
   }
@@ -3161,21 +3297,22 @@ struct NotInRange
   {
     this->checkAllocated();
     other->checkAllocated();
-    std::size_t nbOfTuples(this->getNumberOfTuples());
+    mcIdType nbOfTuples(this->getNumberOfTuples());
     if(nbOfTuples!=other->getNumberOfTuples())
       throw INTERP_KERNEL::Exception("DataArrayDouble::meldWith : mismatch of number of tuples !");
-    int nbOfComp1(this->getNumberOfComponents()),nbOfComp2(other->getNumberOfComponents());
+    std::size_t nbOfComp1=this->getNumberOfComponents();
+    std::size_t nbOfComp2=other->getNumberOfComponents();
     T *newArr=(T *)malloc((nbOfTuples*(nbOfComp1+nbOfComp2))*sizeof(T));
     T *w=newArr;
     const T *inp1(this->begin()),*inp2(other->begin());
-    for(std::size_t i=0;i<nbOfTuples;i++,inp1+=nbOfComp1,inp2+=nbOfComp2)
+    for(mcIdType i=0;i<nbOfTuples;i++,inp1+=nbOfComp1,inp2+=nbOfComp2)
       {
         w=std::copy(inp1,inp1+nbOfComp1,w);
         w=std::copy(inp2,inp2+nbOfComp2,w);
       }
     this->useArray(newArr,true,DeallocType::C_DEALLOC,nbOfTuples,nbOfComp1+nbOfComp2);
-    std::vector<int> compIds(nbOfComp2);
-    for(int i=0;i<nbOfComp2;i++)
+    std::vector<std::size_t> compIds(nbOfComp2);
+    for(std::size_t i=0;i<nbOfComp2;i++)
       compIds[i]=nbOfComp1+i;
     this->copyPartOfStringInfoFrom2(compIds,*other);
   }
@@ -3188,21 +3325,21 @@ struct NotInRange
    * \throw if \a this is not allocated or if \a this has not number of components set to one or if \a nbTimes is lower than 1.
    */
   template<class T>
-  typename Traits<T>::ArrayType *DataArrayTemplateClassic<T>::duplicateEachTupleNTimes(int nbTimes) const
+  typename Traits<T>::ArrayType *DataArrayTemplateClassic<T>::duplicateEachTupleNTimes(mcIdType nbTimes) const
   {
     this->checkAllocated();
     if(this->getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayDouble::duplicateEachTupleNTimes : this should have only one component !");
     if(nbTimes<1)
       throw INTERP_KERNEL::Exception("DataArrayDouble::duplicateEachTupleNTimes : nb times should be >= 1 !");
-    int nbTuples(this->getNumberOfTuples());
+    mcIdType nbTuples=this->getNumberOfTuples();
     const T *inPtr(this->begin());
     MCAuto<typename Traits<T>::ArrayType> ret(Traits<T>::ArrayType::New()); ret->alloc(nbTimes*nbTuples,1);
     T *retPtr(ret->getPointer());
-    for(int i=0;i<nbTuples;i++,inPtr++)
+    for(mcIdType i=0;i<nbTuples;i++,inPtr++)
       {
         T val(*inPtr);
-        for(int j=0;j<nbTimes;j++,retPtr++)
+        for(mcIdType j=0;j<nbTimes;j++,retPtr++)
           *retPtr=val;
       }
     ret->copyStringInfoFrom(*this);
@@ -3253,8 +3390,8 @@ struct NotInRange
   {
     this->checkAllocated();
     MCAuto<typename Traits<T>::ArrayType> newArr(Traits<T>::ArrayType::New());
-    int nbOfTuples(this->getNumberOfTuples());
-    int nbOfComp(this->getNumberOfComponents());
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    std::size_t nbOfComp(this->getNumberOfComponents());
     newArr->alloc(nbOfTuples,nbOfComp);
     std::transform(this->begin(),this->end(),newArr->getPointer(),std::ptr_fun<T,T>(std::abs));
     newArr->copyStringInfoFrom(*this);
@@ -3288,12 +3425,13 @@ struct NotInRange
   typename Traits<T>::ArrayType *DataArrayTemplateClassic<T>::sumPerTuple() const
   {
     this->checkAllocated();
-    std::size_t nbOfComp(this->getNumberOfComponents()),nbOfTuple(this->getNumberOfTuples());
+    std::size_t nbOfComp(this->getNumberOfComponents());
+    mcIdType nbOfTuple(this->getNumberOfTuples());
     MCAuto<typename Traits<T>::ArrayType> ret(Traits<T>::ArrayType::New());
     ret->alloc(nbOfTuple,1);
     const T *src(this->begin());
     T *dest(ret->getPointer());
-    for(std::size_t i=0;i<nbOfTuple;i++,dest++,src+=nbOfComp)
+    for(mcIdType i=0;i<nbOfTuple;i++,dest++,src+=nbOfComp)
       *dest=std::accumulate(src,src+nbOfComp,(T)0);
     return ret.retn();
   }
@@ -3312,8 +3450,8 @@ struct NotInRange
     if(this->getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayDouble::iota : works only for arrays with only one component, you can call 'rearrange' method before !");
     T *ptr(this->getPointer());
-    std::size_t ntuples(this->getNumberOfTuples());
-    for(std::size_t i=0;i<ntuples;i++)
+    mcIdType ntuples(this->getNumberOfTuples());
+    for(mcIdType i=0;i<ntuples;i++)
       ptr[i]=init+(T)i;
     this->declareAsNew();
   }
@@ -3353,7 +3491,7 @@ struct NotInRange
   {
     DataArray::reprWithoutNameStream(stream);
     ImplReprTraits<T>::SetPrecision(stream);
-    this->_mem.repr(this->getNumberOfComponents(),stream);
+    this->_mem.repr(ToIdType(this->getNumberOfComponents()),stream);
   }
 
   template<class T>
@@ -3361,7 +3499,7 @@ struct NotInRange
   {
     DataArray::reprWithoutNameStream(stream);
     ImplReprTraits<T>::SetPrecision(stream);
-    this->_mem.reprZip(this->getNumberOfComponents(),stream);
+    this->_mem.reprZip(ToIdType(this->getNumberOfComponents()),stream);
   }
 
   template<class T>
@@ -3369,7 +3507,7 @@ struct NotInRange
   {
     DataArray::reprWithoutNameStream(stream);
     ImplReprTraits<T>::SetPrecision(stream);
-    this->_mem.reprNotTooLong(this->getNumberOfComponents(),stream);
+    this->_mem.reprNotTooLong(ToIdType(this->getNumberOfComponents()),stream);
   }
 
   /*!
@@ -3433,6 +3571,30 @@ struct NotInRange
     return true;
   }
 
+  /////////////////////////////////
+
+  /*!
+   * Returns the only one value in \a this, if and only if number of elements
+   * (nb of tuples * nb of components) is equal to 1, and that \a this is allocated.
+   *  \return double - the sole value stored in \a this array.
+   *  \throw If at least one of conditions stated above is not fulfilled.
+   */
+  template <class T>
+  T DataArrayDiscrete<T>::intValue() const
+  {
+    if(this->isAllocated())
+      {
+        if(this->getNbOfElems()==1)
+          {
+            return *this->getConstPointer();
+          }
+        else
+          throw INTERP_KERNEL::Exception("DataArrayInt::intValue : DataArrayInt instance is allocated but number of elements is not equal to 1 !");
+      }
+    else
+      throw INTERP_KERNEL::Exception("DataArrayInt::intValue : DataArrayInt instance is not allocated !");
+  }
+
   /*!
    * Equivalent to DataArrayInt::isEqual except that if false the reason of
    * mismatch is given.
@@ -3509,11 +3671,11 @@ struct NotInRange
     this->checkAllocated();
     if(this->getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayInt::switchOnTupleEqualTo : number of components of this should be equal to one !");
-    int nbOfTuples(this->getNumberOfTuples());
-    if(nbOfTuples!=(int)vec.size())
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    if(nbOfTuples!=ToIdType(vec.size()))
       throw INTERP_KERNEL::Exception("DataArrayInt::switchOnTupleEqualTo : number of tuples of this should be equal to size of input vector of bool !");
     const T *pt(this->begin());
-    for(int i=0;i<nbOfTuples;i++)
+    for(mcIdType i=0;i<nbOfTuples;i++)
       if(algo(pt[i],val))
         vec[i]=true;
   }
@@ -3571,7 +3733,7 @@ struct NotInRange
     this->checkAllocated();
     if(this->getNumberOfComponents()!=1 || other.getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayInt::buildPermutationArr : 'this' and 'other' have to have exactly ONE component !");
-    std::size_t nbTuple(this->getNumberOfTuples());
+    mcIdType nbTuple(this->getNumberOfTuples());
     other.checkAllocated();
     if(nbTuple!=other.getNumberOfTuples())
       throw INTERP_KERNEL::Exception("DataArrayInt::buildPermutationArr : 'this' and 'other' must have the same number of tuple !");
@@ -3579,14 +3741,14 @@ struct NotInRange
     ret->alloc(nbTuple,1);
     ret->fillWithValue(-1);
     const T *pt(this->begin());
-    std::map<int,mcIdType> mm;
-    for(std::size_t i=0;i<nbTuple;i++)
-      mm[pt[i]]=(mcIdType)i;
+    std::map<mcIdType,mcIdType> mm;
+    for(mcIdType i=0;i<nbTuple;i++)
+      mm[ToIdType(pt[i])]=i;
     pt=other.begin();
     mcIdType *retToFill(ret->getPointer());
-    for(std::size_t i=0;i<nbTuple;i++)
+    for(mcIdType i=0;i<nbTuple;i++)
       {
-        std::map<int,int>::const_iterator it=mm.find(pt[i]);
+        std::map<mcIdType,mcIdType>::const_iterator it=mm.find(ToIdType(pt[i]));
         if(it==mm.end())
           {
             std::ostringstream oss; oss << "DataArrayInt::buildPermutationArr : Arrays mismatch : element (" << pt[i] << ") in 'other' not findable in 'this' !";
@@ -3616,19 +3778,19 @@ struct NotInRange
     if(this->getNumberOfComponents()!=1 || partOfThis.getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("DataArrayInt::indicesOfSubPart : this and input array must be one component array !");
     this->checkAllocated(); partOfThis.checkAllocated();
-    std::size_t thisNbTuples(this->getNumberOfTuples()),nbTuples(partOfThis.getNumberOfTuples());
+    mcIdType thisNbTuples(this->getNumberOfTuples()),nbTuples(partOfThis.getNumberOfTuples());
     const T *thisPt(this->begin()),*pt(partOfThis.begin());
     MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
     ret->alloc(nbTuples,1);
     mcIdType *retPt(ret->getPointer());
-    std::map<int,mcIdType> m;
-    for(std::size_t i=0;i<thisNbTuples;i++,thisPt++)
-      m[*thisPt]=(mcIdType)i;
-    if(m.size()!=thisNbTuples)
+    std::map<mcIdType,mcIdType> m;
+    for(mcIdType i=0;i<thisNbTuples;i++,thisPt++)
+      m[ToIdType(*thisPt)]=i;
+    if(ToIdType(m.size())!=thisNbTuples)
       throw INTERP_KERNEL::Exception("DataArrayInt::indicesOfSubPart : some elements appears more than once !");
-    for(std::size_t i=0;i<nbTuples;i++,retPt++,pt++)
+    for(mcIdType i=0;i<nbTuples;i++,retPt++,pt++)
       {
-        std::map<int,mcIdType>::const_iterator it(m.find(*pt));
+        std::map<mcIdType,mcIdType>::const_iterator it(m.find(ToIdType(*pt)));
         if(it!=m.end())
           *retPt=(*it).second;
         else
@@ -3757,35 +3919,36 @@ struct NotInRange
   /*!
    * Returns an integer value characterizing \a this array, which is useful for a quick
    * comparison of many instances of DataArrayInt.
-   *  \return int - the hash value.
+   *  \return mcIdType - the hash value.
    *  \throw If \a this is not allocated.
    */
   template<class T>
-  int DataArrayDiscrete<T>::getHashCode() const
+  mcIdType DataArrayDiscrete<T>::getHashCode() const
   {
     this->checkAllocated();
-    std::size_t nbOfElems(this->getNbOfElems());
-    int ret=nbOfElems*65536;
-    int delta=3;
+    mcIdType nbOfElems=ToIdType(this->getNbOfElems());
+    mcIdType ret=nbOfElems*65536;
+    mcIdType delta=3;
     if(nbOfElems>48)
       delta=nbOfElems/8;
     T ret0(0);
     const T *pt(this->begin());
-    for(std::size_t i=0;i<nbOfElems;i+=delta)
+    for(mcIdType i=0;i<nbOfElems;i+=delta)
       ret0+=pt[i] & 0x1FFF;
-    return ret+ret0;
+    return ToIdType(ret+ret0);
   }
 
   template<class T>
   void DataArrayDiscrete<T>::reprCppStream(const std::string& varName, std::ostream& stream) const
   {
-    std::size_t nbTuples(this->getNumberOfTuples()),nbComp(this->getNumberOfComponents());
+    mcIdType nbTuples(this->getNumberOfTuples());
+    std::size_t nbComp(this->getNumberOfComponents());
     const T *data(this->getConstPointer());
     stream << Traits<T>::ArrayTypeName << " *" << varName << "=" << Traits<T>::ArrayTypeName << "::New();" << std::endl;
     if(nbTuples*nbComp>=1)
       {
-        stream << "const int " << varName << "Data[" << nbTuples*nbComp << "]={";
-        std::copy(data,data+nbTuples*nbComp-1,std::ostream_iterator<int>(stream,","));
+        stream << "const mcIdType " << varName << "Data[" << nbTuples*nbComp << "]={";
+        std::copy(data,data+nbTuples*nbComp-1,std::ostream_iterator<T>(stream,","));
         stream << data[nbTuples*nbComp-1] << "};" << std::endl;
         stream << varName << "->useArray(" << varName << "Data,false,CPP_DEALLOC," << nbTuples << "," << nbComp << ");" << std::endl;
       }
@@ -3807,7 +3970,7 @@ struct NotInRange
         std::size_t nbOfCompo(this->getNumberOfComponents());
         if(nbOfCompo>=1)
           {
-            std::size_t nbOfTuples(this->getNumberOfTuples());
+            mcIdType nbOfTuples(this->getNumberOfTuples());
             stream << "Number of tuples : " << nbOfTuples << ". Number of components : " << nbOfCompo << "." << std::endl;
             reprQuickOverviewData(stream,MAX_NB_OF_BYTE_IN_REPR);
           }
@@ -3822,16 +3985,17 @@ struct NotInRange
   void DataArrayDiscrete<T>::reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const
   {
     const T *data(this->begin());
-    std::size_t nbOfTuples(this->getNumberOfTuples()),nbOfCompo(this->getNumberOfComponents());
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    std::size_t nbOfCompo(this->getNumberOfComponents());
     std::ostringstream oss2; oss2 << "[";
     std::string oss2Str(oss2.str());
     bool isFinished=true;
-    for(int i=0;i<nbOfTuples && isFinished;i++)
+    for(mcIdType i=0;i<nbOfTuples && isFinished;i++)
       {
         if(nbOfCompo>1)
           {
             oss2 << "(";
-            for(int j=0;j<nbOfCompo;j++,data++)
+            for(std::size_t j=0;j<nbOfCompo;j++,data++)
               {
                 oss2 << *data;
                 if(j!=nbOfCompo-1) oss2 << ", ";
@@ -3854,7 +4018,7 @@ struct NotInRange
   }
 
   template<class T>
-  void DataArrayDiscrete<T>::writeVTK(std::ostream& ofs, int indent, const std::string& type, const std::string& nameInFile, DataArrayByte *byteArr) const
+  void DataArrayDiscrete<T>::writeVTK(std::ostream& ofs, mcIdType indent, const std::string& type, const std::string& nameInFile, DataArrayByte *byteArr) const
   {
     static const char SPACE[4]={' ',' ',' ',' '};
     this->checkAllocated();
@@ -3873,14 +4037,14 @@ struct NotInRange
         else if(std::string(type)=="Int8")
           {
             INTERP_KERNEL::AutoPtr<char> tmp(new char[this->getNbOfElems()]);
-            std::copy(this->begin(),this->end(),(char *)tmp);
+            copyCast(this->begin(),this->end(),(char *)tmp);
             byteArr->insertAtTheEnd((char *)tmp,(char *)tmp+this->getNbOfElems());
             byteArr->insertAtTheEnd(SPACE,SPACE+4);
           }
         else if(std::string(type)=="UInt8")
           {
             INTERP_KERNEL::AutoPtr<unsigned char> tmp(new unsigned char[this->getNbOfElems()]);
-            std::copy(this->begin(),this->end(),(unsigned char *)tmp);
+            copyCast(this->begin(),this->end(),(unsigned char *)tmp);
             byteArr->insertAtTheEnd((unsigned char *)tmp,(unsigned char *)tmp+this->getNbOfElems());
             byteArr->insertAtTheEnd(SPACE,SPACE+4);
           }
@@ -3894,7 +4058,7 @@ struct NotInRange
     else
       {
         ofs << " RangeMin=\"" << this->getMinValueInArray() << "\" RangeMax=\"" << this->getMaxValueInArray() << "\" format=\"ascii\">\n" << idt;
-        std::copy(this->begin(),this->end(),std::ostream_iterator<int>(ofs," "));
+        std::copy(this->begin(),this->end(),std::ostream_iterator<T>(ofs," "));
       }
       ofs << std::endl << idt << "</DataArray>\n";
   }
@@ -3918,9 +4082,10 @@ struct NotInRange
     this->checkAllocated();
     if(this->getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("Call transformWithIndArr method on DataArrayInt with only one component, you can call 'rearrange' method before !");
-    std::size_t nbElemsIn(std::distance(indArrBg,indArrEnd)),nbOfTuples(this->getNumberOfTuples());
+    mcIdType nbElemsIn=ToIdType(std::distance(indArrBg,indArrEnd));
+    mcIdType nbOfTuples(this->getNumberOfTuples());
     T *pt(this->getPointer());
-    for(std::size_t i=0;i<nbOfTuples;i++,pt++)
+    for(mcIdType i=0;i<nbOfTuples;i++,pt++)
       {
         if(*pt>=0 && *pt<nbElemsIn)
           *pt=indArrBg[*pt];
@@ -3934,15 +4099,15 @@ struct NotInRange
   }
 
   template<class T>
-  void DataArrayDiscrete<T>::transformWithIndArr(const MapKeyVal<T>& m)
+  void DataArrayDiscrete<T>::transformWithIndArr(const MapKeyVal<T, T>& m)
   {
     this->checkAllocated();
     if(this->getNumberOfComponents()!=1)
       throw INTERP_KERNEL::Exception("Call transformWithIndArr method on DataArrayInt with only one component, you can call 'rearrange' method before !");
     const typename std::map<T,T>& dat(m.data());
-    std::size_t nbOfTuples(this->getNumberOfTuples());
+    mcIdType nbOfTuples(this->getNumberOfTuples());
     T *pt(this->getPointer());
-    for(std::size_t i=0;i<nbOfTuples;i++,pt++)
+    for(mcIdType i=0;i<nbOfTuples;i++,pt++)
       {
         typename std::map<T,T>::const_iterator it(dat.find(*pt));
         if(it!=dat.end())
@@ -3974,15 +4139,3468 @@ struct NotInRange
       throw INTERP_KERNEL::Exception("DataArrayInt::findIdsEqual : the array must have only one component, you can call 'rearrange' method before !");
     const T *cptr(this->getConstPointer());
     MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
-    std::size_t nbOfTuples(this->getNumberOfTuples());
-    for(std::size_t i=0;i<nbOfTuples;i++,cptr++)
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
       if(*cptr==val)
         ret->pushBackSilent(ToIdType(i));
     return ret.retn();
   }
 
-  ////////////////////////////////////
+  /*!
+   * Creates a one-dimensional DataArrayInt (\a res) whose contents are computed from
+   * values of \a this (\a a) and the given (\a indArr) arrays as follows:
+   * \a res[ \a indArr[ \a a[ i ]]] = i. I.e. for each value in place i \a v = \a a[ i ],
+   * new value in place \a indArr[ \a v ] is i.
+   *  \param [in] indArrBg - the array holding indices within the result array to assign
+   *         indices of values of \a this array pointing to values of \a indArrBg.
+   *  \param [in] indArrEnd - specifies the end of the array \a indArrBg, so that
+   *              the last value of \a indArrBg is \a indArrEnd[ -1 ].
+   *  \return DataArrayInt * - the new instance of DataArrayInt.
+   *          The caller is to delete this result array using decrRef() as it is no more
+   *          needed.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If any value of \a this array is not a valid index for \a indArrBg array.
+   *  \throw If any value of \a indArrBg is not a valid index for \a this array.
+   */
+  template<class T>
+  DataArrayIdType *DataArrayDiscrete<T>::transformWithIndArrR(const T *indArrBg, const T *indArrEnd) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("Call transformWithIndArrR method on DataArrayInt with only one component, you can call 'rearrange' method before !");
+    mcIdType nbElemsIn=ToIdType(std::distance(indArrBg,indArrEnd));
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    const T *pt=this->getConstPointer();
+    MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+    ret->alloc(nbOfTuples,1);
+    ret->fillWithValue(-1);
+    mcIdType *tmp=ret->getPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++,pt++)
+      {
+        if(*pt>=0 && *pt<nbElemsIn)
+          {
+            T pos=indArrBg[*pt];
+            if(pos>=0 && pos<nbOfTuples)
+              tmp[ToIdType(pos)]=i;
+            else
+              {
+                std::ostringstream oss; oss << "DataArrayInt::transformWithIndArrR : error on tuple #" << i << " value of new pos is " << pos << " ( indArrBg[" << *pt << "]) ! Should be in [0," << nbOfTuples << ") !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::transformWithIndArrR : error on tuple #" << i << " value is " << *pt << " and indirectionnal array as a size equal to " << nbElemsIn << " !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Computes distribution of values of \a this one-dimensional array between given value
+   * ranges (casts). This method is typically useful for entity number splitting by types,
+   * for example. 
+   *  \warning The values contained in \a arrBg should be sorted ascendently. No
+   *           check of this is be done. If not, the result is not warranted. 
+   *  \param [in] arrBg - the array of ascending values defining the value ranges. The i-th
+   *         value of \a arrBg (\a arrBg[ i ]) gives the lowest value of the i-th range,
+   *         and the greatest value of the i-th range equals to \a arrBg[ i+1 ] - 1. \a
+   *         arrBg containing \a n values defines \a n-1 ranges. The last value of \a arrBg
+   *         should be more than every value in \a this array.
+   *  \param [in] arrEnd - specifies the end of the array \a arrBg, so that
+   *              the last value of \a arrBg is \a arrEnd[ -1 ].
+   *  \param [out] castArr - a new instance of DataArrayInt, of same size as \a this array
+   *         (same number of tuples and components), the caller is to delete
+   *         using decrRef() as it is no more needed.
+   *         This array contains indices of ranges for every value of \a this array. I.e.
+   *         the i-th value of \a castArr gives the index of range the i-th value of \a this
+   *         belongs to. Or, in other words, this parameter contains for each tuple in \a
+   *         this in which cast it holds.
+   *  \param [out] rankInsideCast - a new instance of DataArrayInt, of same size as \a this
+   *         array, the caller is to delete using decrRef() as it is no more needed.
+   *         This array contains ranks of values of \a this array within ranges
+   *         they belongs to. I.e. the i-th value of \a rankInsideCast gives the rank of
+   *         the i-th value of \a this array within the \a castArr[ i ]-th range, to which
+   *         the i-th value of \a this belongs to. Or, in other words, this param contains
+   *         for each tuple its rank inside its cast. The rank is computed as difference
+   *         between the value and the lowest value of range.
+   *  \param [out] castsPresent - a new instance of DataArrayInt, containing indices of
+   *         ranges (casts) to which at least one value of \a this array belongs.
+   *         Or, in other words, this param contains the casts that \a this contains.
+   *         The caller is to delete this array using decrRef() as it is no more needed.
+   *
+   * \b Example: If \a this contains [6,5,0,3,2,7,8,1,4] and \a arrBg contains [0,4,9] then
+   *            the output of this method will be :
+   * - \a castArr       : [1,1,0,0,0,1,1,0,1]
+   * - \a rankInsideCast: [2,1,0,3,2,3,4,1,0]
+   * - \a castsPresent  : [0,1]
+   *
+   * I.e. values of \a this array belong to 2 ranges: #0 and #1. Value 6 belongs to the
+   * range #1 and its rank within this range is 2; etc.
+   *
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If \a arrEnd - arrBg < 2.
+   *  \throw If any value of \a this is not less than \a arrEnd[-1].
+   */
+  template<class T>
+  void DataArrayDiscrete<T>::splitByValueRange(const T *arrBg, const T *arrEnd,
+                                               DataArrayType *& castArr, DataArrayType *& rankInsideCast, DataArrayType *& castsPresent) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("Call splitByValueRange  method on DataArrayInt with only one component, you can call 'rearrange' method before !");
+    mcIdType nbOfTuples=this->getNumberOfTuples();
+    std::size_t nbOfCast=std::distance(arrBg,arrEnd);
+    if(nbOfCast<2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::splitByValueRange : The input array giving the cast range values should be of size >=2 !");
+    nbOfCast--;
+    const T *work=this->getConstPointer();
+    typedef std::reverse_iterator<const T *> rintstart;
+    rintstart bg(arrEnd);//OK no problem because size of 'arr' is greater or equal 2
+    rintstart end2(arrBg);
+    MCAuto<DataArrayType> ret1=DataArrayType::New();
+    MCAuto<DataArrayType> ret2=DataArrayType::New();
+    MCAuto<DataArrayType> ret3=DataArrayType::New();
+    ret1->alloc(nbOfTuples,1);
+    ret2->alloc(nbOfTuples,1);
+    T *ret1Ptr=ret1->getPointer();
+    T *ret2Ptr=ret2->getPointer();
+    std::set<T> castsDetected;
+    for(mcIdType i=0;i<nbOfTuples;i++)
+      {
+        rintstart res=std::find_if(bg,end2,std::bind2nd(std::less_equal<T>(), work[i]));
+        std::size_t pos=std::distance(bg,res);
+        std::size_t pos2=nbOfCast-pos;
+        if(pos2<nbOfCast)
+          {
+            ret1Ptr[i]=static_cast<T>(pos2);
+            ret2Ptr[i]=work[i]-arrBg[pos2];
+            castsDetected.insert(ret1Ptr[i]);
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::splitByValueRange : At rank #" << i << " the value is " << work[i] << " should be in [0," << *bg << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    ret3->alloc(castsDetected.size(),1);
+    std::copy(castsDetected.begin(),castsDetected.end(),ret3->getPointer());
+    castArr=ret1.retn();
+    rankInsideCast=ret2.retn();
+    castsPresent=ret3.retn();
+  }
+
+  /*!
+   * This method look at \a this if it can be considered as a range defined by the 3-tuple ( \a strt , \a sttoopp , \a stteepp ).
+   * If false is returned the tuple must be ignored. If true is returned \a this can be considered by a range( \a strt , \a sttoopp , \a stteepp ).
+   * This method works only if \a this is allocated and single component. If not an exception will be thrown.
+   *
+   * \param [out] strt - the start of the range (included) if true is returned.
+   * \param [out] sttoopp - the end of the range (not included) if true is returned.
+   * \param [out] stteepp - the step of the range if true is returned.
+   * \return the verdict of the check.
+   *
+   * \sa DataArray::GetNumberOfItemGivenBES
+   */
+  template<class T>
+  bool DataArrayDiscrete<T>::isRange(T& strt, T& sttoopp, T& stteepp) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::isRange : this must be single component array !");
+    mcIdType nbTuples(this->getNumberOfTuples());
+    if(nbTuples==0)
+      { strt=0; sttoopp=0; stteepp=1; return true; }
+    const T *pt(this->begin());
+    strt=*pt;
+    if(nbTuples==1)
+      { sttoopp=strt+1; stteepp=1; return true; }
+    strt=*pt; sttoopp=pt[nbTuples-1];
+    if(strt==sttoopp)
+      return false;
+    if(sttoopp>strt)
+      {
+        sttoopp++;
+        T a(sttoopp-1-strt),tmp(strt);
+        if(a%(nbTuples-1)!=0)
+          return false;
+        stteepp=a/(FromIdType<T>(nbTuples)-1);
+        for(mcIdType i=0;i<nbTuples;i++,tmp+=stteepp)
+          if(pt[i]!=tmp)
+            return false;
+        return true;
+      }
+    else
+      {
+        sttoopp--;
+        T a(strt-sttoopp-1),tmp(strt);
+        if(a%(nbTuples-1)!=0)
+          return false;
+        stteepp=-(a/(FromIdType<T>(nbTuples)-1));
+        for(mcIdType i=0;i<nbTuples;i++,tmp+=stteepp)
+          if(pt[i]!=tmp)
+            return false;
+        return true;
+      }
+  }
+
+  /*!
+   * Creates a one-dimensional DataArrayInt of given length, whose contents are computed
+   * from values of \a this array, which is supposed to contain a renumbering map in
+   * "Old to New" mode. The result array contains a renumbering map in "New to Old" mode.
+   * To know how to use the renumbering maps see \ref numbering.
+   *  \param [in] newNbOfElem - the number of tuples in the result array.
+   *  \return DataArrayInt * - the new instance of DataArrayInt.
+   *          The caller is to delete this result array using decrRef() as it is no more
+   *          needed.
+   *
+   *  \if ENABLE_EXAMPLES
+   *  \ref cpp_mcdataarrayint_invertarrayo2n2n2o "Here is a C++ example".<br>
+   *  \ref py_mcdataarrayint_invertarrayo2n2n2o  "Here is a Python example".
+   *  \endif
+   */
+  template<class T>
+  DataArrayIdType * DataArrayDiscrete<T>::invertArrayO2N2N2O(mcIdType newNbOfElem) const
+  {
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
+    ret->alloc(newNbOfElem,1);
+    mcIdType nbOfOldNodes(this->getNumberOfTuples());
+    const T *old2New(this->begin());
+    mcIdType *pt(ret->getPointer());
+    for(mcIdType i=0;i!=nbOfOldNodes;i++)
+      {
+        T newp(old2New[i]);
+        if(newp!=-1)
+          {
+            if(newp>=0 && newp<newNbOfElem)
+              pt[newp]=i;
+            else
+              {
+                std::ostringstream oss; oss << "DataArrayInt::invertArrayO2N2N2O : At place #" << i << " the newplace is " << newp << " must be in [0," << newNbOfElem << ") !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Creates a one-dimensional DataArrayInt of given length, whose contents are computed
+   * from values of \a this array, which is supposed to contain a renumbering map in
+   * "New to Old" mode. The result array contains a renumbering map in "Old to New" mode.
+   * To know how to use the renumbering maps see \ref numbering.
+   *  \param [in] newNbOfElem - the number of tuples in the result array.
+   *  \return DataArrayInt * - the new instance of DataArrayInt.
+   *          The caller is to delete this result array using decrRef() as it is no more
+   *          needed.
+   *
+   *  \if ENABLE_EXAMPLES
+   *  \ref cpp_mcdataarrayint_invertarrayn2o2o2n "Here is a C++ example".
+   *
+   *  \ref py_mcdataarrayint_invertarrayn2o2o2n "Here is a Python example".
+   *  \sa invertArrayN2O2O2NOptimized
+   *  \endif
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::invertArrayN2O2O2N(mcIdType oldNbOfElem) const
+  {
+    this->checkAllocated();
+    MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+    ret->alloc(oldNbOfElem,1);
+    const T *new2Old=this->getConstPointer();
+    mcIdType *pt=ret->getPointer();
+    std::fill(pt,pt+oldNbOfElem,-1);
+    mcIdType nbOfNewElems(this->getNumberOfTuples());
+    for(mcIdType i=0;i<nbOfNewElems;i++)
+      {
+        T v(new2Old[i]);
+        if(v>=0 && v<oldNbOfElem)
+          pt[v]=i;
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::invertArrayN2O2O2N : in new id #" << i << " old value is " << v << " expected to be in [0," << oldNbOfElem << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * This method is similar to DataArrayInt::invertArrayO2N2N2O except that
+   * Example : If \a this contains [0,1,2,0,3,4,5,4,6,4] this method will return [0,1,2,4,5,6,8] whereas DataArrayInt::invertArrayO2N2N2O returns [3,1,2,4,9,6,8]
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::invertArrayO2N2N2OBis(mcIdType newNbOfElem) const
+  {
+    MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+    ret->alloc(newNbOfElem,1);
+    mcIdType nbOfOldNodes(this->getNumberOfTuples());
+    const T *old2New=this->getConstPointer();
+    mcIdType *pt=ret->getPointer();
+    for(mcIdType i=nbOfOldNodes-1;i>=0;i--)
+      {
+        T newp(old2New[i]);
+        if(newp!=-1)
+          {
+            if(newp>=0 && newp<newNbOfElem)
+              pt[newp]=i;
+            else
+              {
+                std::ostringstream oss; oss << "DataArrayInt::invertArrayO2N2N2OBis : At place #" << i << " the newplace is " << newp << " must be in [0," << newNbOfElem << ") !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Creates a map, whose contents are computed
+   * from values of \a this array, which is supposed to contain a renumbering map in
+   * "New to Old" mode. The result array contains a renumbering map in "Old to New" mode.
+   * To know how to use the renumbering maps see \ref numbering.
+   *  \param [in] newNbOfElem - the number of tuples in the result array.
+   *  \return MapII  - the new instance of Map.
+   *
+   *  \if ENABLE_EXAMPLES
+   *  \ref cpp_mcdataarrayint_invertarrayn2o2o2n "Here is a C++ example".
+   *
+   *  \ref py_mcdataarrayint_invertarrayn2o2o2n "Here is a Python example".
+   *  \sa invertArrayN2O2O2N, giveN2OOptimized, MEDCouplingPointSet::renumberNodesInConn
+   *  \endif
+   */
+  template <class T>
+  MCAuto< MapKeyVal<T, mcIdType> > DataArrayDiscrete<T>::invertArrayN2O2O2NOptimized() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::invertArrayN2O2O2NOptimized : single component expected !");
+    MCAuto< MapKeyVal<T, mcIdType> > ret(MapKeyVal<T, mcIdType>::New());
+    std::map<T, mcIdType>& m(ret->data());
+    const T *new2Old(this->begin());
+    mcIdType nbOfNewElems(this->getNumberOfTuples());
+    for(mcIdType i=0;i<nbOfNewElems;i++)
+      {
+        T v(new2Old[i]);
+        m[v]=i;
+      }
+    return ret;
+  }
+
+  /*!
+   * Creates a map, whose contents are computed
+   * from values of \a this array, which is supposed to contain a renumbering map in 
+   * "New to Old" mode. The result array contains a renumbering map in "New to Old" mode as C++ map for performance reasons.
+   *
+   * \sa invertArrayN2O2O2NOptimized, MEDCouplingPointSet::renumberNodesInConn
+   */
+  template <class T>
+  MCAuto< MapKeyVal<mcIdType, T> > DataArrayDiscrete<T>::giveN2OOptimized() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::giveN2OOptimized : single component expected !");
+    MCAuto< MapKeyVal<mcIdType, T> > ret(MapKeyVal<mcIdType, T>::New());
+    std::map<mcIdType,T>& m(ret->data());
+    const T *new2Old(this->begin());
+    mcIdType nbOfNewElems(this->getNumberOfTuples());
+    for(mcIdType i=0;i<nbOfNewElems;i++)
+      {
+        T v(new2Old[i]);
+        m[i]=v;
+      }
+    return ret;
+  }
+
+  /*!
+   * This method finds for each element \a ELT in [valsBg,valsEnd) elements in \a this equal to it. Associated to ELT
+   * this method will return the tuple id of last element found. If there is no element in \a this equal to ELT
+   * an exception will be thrown.
+   *
+   * In case of success this[ret]==vals. Samely ret->transformWithIndArr(this->begin(),this->end())==vals.
+   * Where \a vals is the [valsBg,valsEnd) array and \a ret the array returned by this method.
+   * This method can be seen as an extension of FindPermutationFromFirstToSecond.
+   * <br>
+   * \b Example: <br>
+   * - \a this: [17,27,2,10,-4,3,12,27,16]
+   * - \a val : [3,16,-4,27,17]
+   * - result: [5,8,4,7,0]
+   *
+   * \return - An array of size std::distance(valsBg,valsEnd)
+   *
+   * \sa DataArrayInt::FindPermutationFromFirstToSecond
+   */
+  template <class T>
+  MCAuto<DataArrayIdType> DataArrayDiscrete<T>::findIdForEach(const T *valsBg, const T *valsEnd) const
+  {
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
+    std::size_t nbOfTuplesOut(std::distance(valsBg,valsEnd));
+    ret->alloc(nbOfTuplesOut,1);
+    MCAuto< MapKeyVal<T, mcIdType> > zeMap(this->invertArrayN2O2O2NOptimized());
+    const std::map<T, mcIdType>& dat(zeMap->data());
+    mcIdType *ptToFeed(ret->getPointer());
+    for(const T *pt=valsBg;pt!=valsEnd;pt++)
+      {
+        typename std::map<T,mcIdType>::const_iterator it(dat.find(*pt));
+        if(it!=dat.end())
+          *ptToFeed++=(*it).second;
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::findIdForEach : error for element at place " << std::distance(valsBg,pt);
+            oss << " of input array value is " << *pt << " which is not in this !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+    return ret;
+  }
 
+  /*!
+   * Returns a new DataArrayInt containing a renumbering map in "Old to New" mode.
+   * This map, if applied to \a this array, would make it sorted. For example, if
+   * \a this array contents are [9,10,0,6,4,11,3,7] then the contents of the result array
+   * are [5,6,0,3,2,7,1,4]; if this result array (\a res) is used as an argument in call
+   * \a this->renumber(\a res) then the returned array contains [0,3,4,6,7,9,10,11].
+   * This method is useful for renumbering (in MED file for example). For more info
+   * on renumbering see \ref numbering.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If there are equal values in \a this array.
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::checkAndPreparePermutation() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::checkAndPreparePermutation : number of components must == 1 !");
+    mcIdType nbTuples(this->getNumberOfTuples());
+    const T *pt=this->getConstPointer();
+    mcIdType *pt2=this->CheckAndPreparePermutation(pt,pt+nbTuples);
+    DataArrayIdType *ret=DataArrayIdType::New();
+    ret->useArray(pt2,true,DeallocType::C_DEALLOC,nbTuples,1);
+    return ret;
+  }
+
+  /*!
+   * Returns two arrays describing a surjective mapping from \a this set of values (\a A)
+   * onto a set of values of size \a targetNb (\a B). The surjective function is
+   * \a B[ \a A[ i ]] = i. That is to say that for each \a id in [0,\a targetNb), where \a
+   * targetNb < \a this->getNumberOfTuples(), there exists at least one tupleId (\a tid) so
+   * that <em> this->getIJ( tid, 0 ) == id</em>. <br>
+   * The first of out arrays returns indices of elements of \a this array, grouped by their
+   * place in the set \a B. The second out array is the index of the first one; it shows how
+   * many elements of \a A are mapped into each element of \a B. <br>
+   * For more info on
+   * mapping and its usage in renumbering see \ref numbering. <br>
+   * \b Example:
+   * - \a this: [0,3,2,3,2,2,1,2]
+   * - \a targetNb: 4
+   * - \a arr:  [0,  6,  2,4,5,7,  1,3]
+   * - \a arrI: [0,1,2,6,8]
+   *
+   * This result means: <br>
+   * the element of \a B 0 encounters within \a A once (\a arrI[ 0+1 ] - \a arrI[ 0 ]) and
+   * its index within \a A is 0 ( \a arr[ 0:1 ] == \a arr[ \a arrI[ 0 ] : \a arrI[ 0+1 ]]);<br>
+   * the element of \a B 2 encounters within \a A 4 times (\a arrI[ 2+1 ] - \a arrI[ 2 ]) and
+   * its indices within \a A are [2,4,5,7] ( \a arr[ 2:6 ] == \a arr[ \a arrI[ 2 ] :
+   * \a arrI[ 2+1 ]]); <br> etc.
+   *  \param [in] targetNb - the size of the set \a B. \a targetNb must be equal or more
+   *         than the maximal value of \a A.
+   *  \param [out] arr - a new instance of DataArrayInt returning indices of
+   *         elements of \a this, grouped by their place in the set \a B. The caller is to delete
+   *         this array using decrRef() as it is no more needed.
+   *  \param [out] arrI - a new instance of DataArrayInt returning size of groups of equal
+   *         elements of \a this. The caller is to delete this array using decrRef() as it
+   *         is no more needed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If any value in \a this is more or equal to \a targetNb.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::changeSurjectiveFormat(T targetNb, DataArrayIdType *&arr, DataArrayIdType *&arrI) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::changeSurjectiveFormat : number of components must == 1 !");
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    const T *input=this->getConstPointer();
+    std::vector< std::vector<mcIdType> > tmp(targetNb);
+    for(mcIdType i=0;i<nbOfTuples;i++)
+      {
+        T tmp2=input[i];
+        if(tmp2>=0 && tmp2<targetNb)
+          tmp[tmp2].push_back(i);
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::changeSurjectiveFormat : At pos " << i << " presence of element " << tmp2 << " ! should be in [0," << targetNb << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+
+    MCAuto<DataArrayIdType> retI(DataArrayIdType::New());
+    retI->alloc(targetNb+1,1);
+    mcIdType *retIPtr=retI->getPointer();
+    *retIPtr=0;
+    for(std::vector< std::vector<mcIdType> >::const_iterator it1=tmp.begin();it1!=tmp.end();it1++,retIPtr++)
+      retIPtr[1]=retIPtr[0]+ToIdType((*it1).size());
+    if(nbOfTuples!=retI->getIJ(ToIdType(targetNb),0))
+      throw INTERP_KERNEL::Exception("DataArrayInt::changeSurjectiveFormat : big problem should never happen !");
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
+    ret->alloc(nbOfTuples,1);
+    mcIdType *retPtr=ret->getPointer();
+    for(std::vector< std::vector<mcIdType> >::const_iterator it1=tmp.begin();it1!=tmp.end();it1++)
+      retPtr=std::copy((*it1).begin(),(*it1).end(),retPtr);
+    arr=ret.retn();
+    arrI=retI.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt containing a renumbering map in "New to Old" mode,
+   * which if applied to \a this array would make it sorted ascendingly.
+   * For more info on renumbering see \ref numbering. <br>
+   * \b Example: <br>
+   * - \a this: [2,0,1,1,0,1,2,0,1,1,0,0]
+   * - result: [10,0,5,6,1,7,11,2,8,9,3,4]
+   * - after applying result to \a this: [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2]
+   *
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::buildPermArrPerLevel() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildPermArrPerLevel : number of components must == 1 !");
+    mcIdType nbOfTuples=this->getNumberOfTuples();
+    const T *pt=this->getConstPointer();
+    std::map<T,mcIdType> m;
+    MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+    ret->alloc(nbOfTuples,1);
+    mcIdType *opt=ret->getPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++,pt++,opt++)
+      {
+        T val=*pt;
+        typename std::map<T,mcIdType>::iterator it=m.find(val);
+        if(it!=m.end())
+          {
+            *opt=(*it).second;
+            (*it).second++;
+          }
+        else
+          {
+            *opt=0;
+            m.insert(std::pair<T,mcIdType>(val,1));
+          }
+      }
+    mcIdType sum=0;
+    for(typename std::map<T,mcIdType>::iterator it=m.begin();it!=m.end();it++)
+      {
+        mcIdType vt=(*it).second;
+        (*it).second=sum;
+        sum+=vt;
+      }
+    pt=this->getConstPointer();
+    opt=ret->getPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++,pt++,opt++)
+      *opt+=m[*pt];
+    //
+    return ret.retn();
+  }
+
+  /*!
+   * Checks if \a this array has the given size, and if its contents is equal to an array filled with
+   * iota(). This method is particularly useful for DataArrayInt instances that represent
+   * a renumbering array, to check if there is a real need in renumbering.
+   * This method checks than \a this can be considered as an identity mapping
+   * of a set having \a sizeExpected elements into itself.
+   *
+   *  \param [in] sizeExpected - The number of elements expected.
+   *  \return bool - \a true if \a this array contents == \a range( \a this->getNumberOfTuples())
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::isIota(mcIdType sizeExpected) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      return false;
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    if(nbOfTuples!=sizeExpected)
+      return false;
+    const T *pt=this->getConstPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++,pt++)
+      if(*pt!=i)
+        return false;
+    return true;
+  }
+
+  /*!
+   * Checks if all values in \a this array are equal to \a val.
+   *  \param [in] val - value to check equality of array values to.
+   *  \return bool - \a true if all values are \a val.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1
+   *  \sa DataArrayInt::checkUniformAndGuess
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::isUniform(T val) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::isUniform : must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
+    const T *w(this->begin()),*end2(this->end());
+    for(;w!=end2;w++)
+      if(*w!=val)
+        return false;
+    return true;
+  }
+
+  /*!
+   * This method checks that \a this is uniform. If not and exception will be thrown.
+   * In case of uniformity the corresponding value is returned.
+   *
+   * \return mcIdType - the unique value contained in this
+   * \throw If \a this is not allocated.
+   * \throw If \a this->getNumberOfComponents() != 1
+   * \throw If \a this is not uniform.
+   * \sa DataArrayInt::isUniform
+   */
+  template <class T>
+  T DataArrayDiscrete<T>::checkUniformAndGuess() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::checkUniformAndGuess : must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
+    if(this->empty())
+      throw INTERP_KERNEL::Exception("DataArrayInt::checkUniformAndGuess : this is empty !");
+    const T *w(this->begin()),*end2(this->end());
+    T ret(*w);
+    for(;w!=end2;w++)
+      if(*w!=ret)
+        throw INTERP_KERNEL::Exception("DataArrayInt::checkUniformAndGuess : this is not uniform !");
+    return ret;
+  }
+
+  /*!
+   * Checks if all values in \a this array are unique.
+   *  \return bool - \a true if condition above is true
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::hasUniqueValues() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::hasOnlyUniqueValues: must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
+    std::size_t nbOfElements(this->getNumberOfTuples());
+    std::set<T> s(this->begin(),this->end());  // in C++11, should use unordered_set (O(1) complexity)
+    if (s.size() != nbOfElements)
+      return false;
+    return true;
+  }
+
+  /*!
+   * Copy all components in a specified order from another DataArrayInt.
+   * The specified components become the first ones in \a this array.
+   * Both numerical and textual data is copied. The number of tuples in \a this and
+   * the other array can be different.
+   *  \param [in] a - the array to copy data from.
+   *  \param [in] compoIds - sequence of zero based indices of components, data of which is
+   *              to be copied.
+   *  \throw If \a a is NULL.
+   *  \throw If \a compoIds.size() != \a a->getNumberOfComponents().
+   *  \throw If \a compoIds[i] < 0 or \a compoIds[i] > \a this->getNumberOfComponents().
+   *
+   *  \if ENABLE_EXAMPLES
+   *  \ref py_mcdataarrayint_setselectedcomponents "Here is a Python example".
+   *  \endif
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::setSelectedComponents(const DataArrayType *a, const std::vector<std::size_t>& compoIds)
+  {
+    if(!a)
+      throw INTERP_KERNEL::Exception("DataArrayInt::setSelectedComponents : input DataArrayInt is NULL !");
+    this->checkAllocated();
+    a->checkAllocated();
+    this->copyPartOfStringInfoFrom2(compoIds,*a);
+    std::size_t partOfCompoSz=compoIds.size();
+    std::size_t nbOfCompo = this->getNumberOfComponents();
+    mcIdType nbOfTuples=std::min(this->getNumberOfTuples(),a->getNumberOfTuples());
+    const T *ac=a->getConstPointer();
+    T *nc=this->getPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++)
+      for(std::size_t j=0;j<partOfCompoSz;j++,ac++)
+        nc[nbOfCompo*i+compoIds[j]]=*ac;
+  }
+
+  /*!
+   * Creates a new DataArrayInt containing IDs (indices) of tuples holding value \b not
+   * equal to a given one.
+   *  \param [in] val - the value to ignore within \a this.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::findIdsNotEqual(T val) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdsNotEqual : the array must have only one component, you can call 'rearrange' method before !");
+    const T *cptr(this->getConstPointer());
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
+    ret->alloc(0,1);
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
+      if(*cptr!=val)
+        ret->pushBackSilent(i);
+    return ret.retn();
+  }
+  
+  /*!
+   * Creates a new DataArrayInt containing IDs (indices) of tuples holding tuple equal to those defined by [ \a tupleBg , \a tupleEnd )
+   * This method is an extension of  DataArrayInt::findIdsEqual method.
+   *
+   *  \param [in] tupleBg - the begin (included) of the input tuple to find within \a this.
+   *  \param [in] tupleEnd - the end (excluded) of the input tuple to find within \a this.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != std::distance(tupleBg,tupleEnd).
+   * \throw If \a this->getNumberOfComponents() is equal to 0.
+   * \sa DataArrayInt::findIdsEqual
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::findIdsEqualTuple(const T *tupleBg, const T *tupleEnd) const
+  {
+    std::size_t nbOfCompoExp=std::distance(tupleBg,tupleEnd);
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=nbOfCompoExp)
+      {
+        std::ostringstream oss; oss << "DataArrayInt::findIdsEqualTuple : mismatch of number of components. Input tuple has " << nbOfCompoExp << " whereas this array has " << this->getNumberOfComponents() << " components !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    if(nbOfCompoExp==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdsEqualTuple : number of components should be > 0 !");
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
+    ret->alloc(0,1);
+    const T *bg(this->begin()),*end2(this->end()),*work(this->begin());
+    while(work!=end2)
+      {
+        work=std::search(work,end2,tupleBg,tupleEnd);
+        if(work!=end2)
+          {
+            std::ptrdiff_t pos=std::distance(bg,work);
+            if(pos%nbOfCompoExp==0)
+              ret->pushBackSilent(ToIdType(pos/nbOfCompoExp));
+            work++;
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Creates a new DataArrayInt containing IDs (indices) of tuples holding value equal to
+   * one of given values.
+   *  \param [in] valsBg - an array of values to find within \a this array.
+   *  \param [in] valsEnd - specifies the end of the array \a valsBg, so that
+   *              the last value of \a valsBg is \a valsEnd[ -1 ].
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::findIdsEqualList(const T *valsBg, const T *valsEnd) const
+  {
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdsEqualList : the array must have only one component, you can call 'rearrange' method before !");
+    std::set<T> vals2(valsBg,valsEnd);
+    const T *cptr(this->getConstPointer());
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+    for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
+      if(vals2.find(*cptr)!=vals2.end())
+        ret->pushBackSilent(i);
+    return ret.retn();
+  }
+  
+  /*!
+   * Creates a new DataArrayInt containing IDs (indices) of tuples holding values \b not
+   * equal to any of given values.
+   *  \param [in] valsBg - an array of values to ignore within \a this array.
+   *  \param [in] valsEnd - specifies the end of the array \a valsBg, so that
+   *              the last value of \a valsBg is \a valsEnd[ -1 ].
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::findIdsNotEqualList(const T *valsBg, const T *valsEnd) const
+  {
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdsNotEqualList : the array must have only one component, you can call 'rearrange' method before !");
+    std::set<T> vals2(valsBg,valsEnd);
+    const T *cptr=this->getConstPointer();
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+    for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
+      if(vals2.find(*cptr)==vals2.end())
+        ret->pushBackSilent(i);
+    return ret.retn();
+  }
+
+  /*!
+   * This method expects to be called when number of components of this is equal to one.
+   * This method returns the tuple id, if it exists, of the first tuple equal to \b value.
+   * If not any tuple contains \b value -1 is returned.
+   * \sa DataArrayInt::presenceOfValue
+   */
+  template <class T>
+  mcIdType DataArrayDiscrete<T>::findIdFirstEqual(T value) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::presenceOfValue : the array must have only one component, you can call 'rearrange' method before !");
+    const T *cptr=this->getConstPointer();
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    const T *ret=std::find(cptr,cptr+nbOfTuples,value);
+    if(ret!=cptr+nbOfTuples)
+      return ToIdType(std::distance(cptr,ret));
+    return -1;
+  }
+  
+  /*!
+   * This method expects to be called when number of components of this is equal to one.
+   * This method returns the tuple id, if it exists, of the first tuple so that the value is contained in \b vals.
+   * If not any tuple contains one of the values contained in 'vals' -1 is returned.
+   * \sa DataArrayInt::presenceOfValue
+   */
+  template <class T>
+  mcIdType DataArrayDiscrete<T>::findIdFirstEqual(const std::vector<T>& vals) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::presenceOfValue : the array must have only one component, you can call 'rearrange' method before !");
+    std::set<T> vals2(vals.begin(),vals.end());
+    const T *cptr=this->getConstPointer();
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    for(const T *w=cptr;w!=cptr+nbOfTuples;w++)
+      if(vals2.find(*w)!=vals2.end())
+        return ToIdType(std::distance(cptr,w));
+    return -1;
+  }
+
+  /*!
+   * This method is an extension of DataArrayInt::findIdFirstEqual method because this method works for DataArrayInt with
+   * any number of components excepted 0 (an INTERP_KERNEL::Exception is thrown in this case).
+   * This method searches in \b this is there is a tuple that matched the input parameter \b tupl.
+   * If any the tuple id is returned. If not -1 is returned.
+   *
+   * This method throws an INTERP_KERNEL::Exception if the number of components in \b this mismatches with the size of
+   * the input vector. An INTERP_KERNEL::Exception is thrown too if \b this is not allocated.
+   *
+   * \return tuple id where \b tupl is. -1 if no such tuple exists in \b this.
+   * \sa DataArrayInt::findIdSequence, DataArrayInt::presenceOfTuple.
+   */
+  template <class T>
+  mcIdType DataArrayDiscrete<T>::findIdFirstEqualTuple(const std::vector<T>& tupl) const
+  {
+    this->checkAllocated();
+    std::size_t nbOfCompo(this->getNumberOfComponents());
+    if(nbOfCompo==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdFirstEqualTuple : 0 components in 'this' !");
+    if(nbOfCompo!=tupl.size())
+      {
+        std::ostringstream oss; oss << "DataArrayInt::findIdFirstEqualTuple : 'this' contains " << nbOfCompo << " components and searching for a tuple of length " << tupl.size() << " !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    const T *cptr=this->getConstPointer();
+    std::size_t nbOfVals=this->getNbOfElems();
+    for(const T *work=cptr;work!=cptr+nbOfVals;)
+      {
+        work=std::search(work,cptr+nbOfVals,tupl.begin(),tupl.end());
+        if(work!=cptr+nbOfVals)
+          {
+            if(std::distance(cptr,work)%nbOfCompo!=0)
+              work++;
+            else
+              return ToIdType (std::distance(cptr,work)/nbOfCompo);
+          }
+      }
+    return -1;
+  }
+
+  /*!
+   * This method searches the sequence specified in input parameter \b vals in \b this.
+   * This works only for DataArrayInt having number of components equal to one (if not an INTERP_KERNEL::Exception will be thrown).
+   * This method differs from DataArrayInt::findIdFirstEqualTuple in that the position is internal raw data is not considered here contrary to DataArrayInt::findIdFirstEqualTuple.
+   * \sa DataArrayInt::findIdFirstEqualTuple
+   */
+  template <class T>
+  mcIdType DataArrayDiscrete<T>::findIdSequence(const std::vector<T>& vals) const
+  {
+    this->checkAllocated();
+    std::size_t nbOfCompo=this->getNumberOfComponents();
+    if(nbOfCompo!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdSequence : works only for DataArrayInt instance with one component !");
+    const T *cptr=this->getConstPointer();
+    std::size_t nbOfVals=this->getNbOfElems();
+    const T *loc=std::search(cptr,cptr+nbOfVals,vals.begin(),vals.end());
+    if(loc!=cptr+nbOfVals)
+      return ToIdType(std::distance(cptr,loc));
+    return -1;
+  }
+
+  /*!
+   * Assigns \a newValue to all elements holding \a oldValue within \a this
+   * one-dimensional array.
+   *  \param [in] oldValue - the value to replace.
+   *  \param [in] newValue - the value to assign.
+   *  \return mcIdType - number of replacements performed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  mcIdType DataArrayDiscrete<T>::changeValue(T oldValue, T newValue)
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::changeValue : the array must have only one component, you can call 'rearrange' method before !");
+    if(oldValue==newValue)
+      return 0;
+    T *start(this->getPointer()),*end2(start+this->getNbOfElems());
+    mcIdType ret(0);
+    for(T *val=start;val!=end2;val++)
+      {
+        if(*val==oldValue)
+          {
+            *val=newValue;
+            ret++;
+          }
+      }
+    if(ret>0)
+      this->declareAsNew();
+    return ret;
+  }
+
+  /*!
+   * This method returns the number of values in \a this that are equals to input parameter \a value.
+   * This method only works for single component array.
+   *
+   * \return a value in [ 0, \c this->getNumberOfTuples() )
+   *
+   * \throw If \a this is not allocated
+   *
+   */
+  template <class T>
+  mcIdType DataArrayDiscrete<T>::count(T value) const
+  {
+    mcIdType ret=0;
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::count : must be applied on DataArrayInt with only one component, you can call 'rearrange' method before !");
+    const T *vals=this->begin();
+    std::size_t nbOfElements=this->getNumberOfTuples();
+    for(std::size_t i=0;i<nbOfElements;i++,vals++)
+      if(*vals==value)
+        ret++;
+    return ret;
+  }
+
+  /*!
+   * This method is an extension of DataArrayInt::presenceOfValue method because this method works for DataArrayInt with
+   * any number of components excepted 0 (an INTERP_KERNEL::Exception is thrown in this case).
+   * This method searches in \b this is there is a tuple that matched the input parameter \b tupl.
+   * This method throws an INTERP_KERNEL::Exception if the number of components in \b this mismatches with the size of
+   * the input vector. An INTERP_KERNEL::Exception is thrown too if \b this is not allocated.
+   * \sa DataArrayInt::findIdFirstEqualTuple
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::presenceOfTuple(const std::vector<T>& tupl) const
+  {
+    return this->findIdFirstEqualTuple(tupl)!=-1;
+  }
+  
+  
+  /*!
+   * Returns \a true if a given value is present within \a this one-dimensional array.
+   *  \param [in] value - the value to find within \a this array.
+   *  \return bool - \a true in case if \a value is present within \a this array.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \sa findIdFirstEqual()
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::presenceOfValue(T value) const
+  {
+    return this->findIdFirstEqual(value)!=-1;
+  }
+  
+  /*!
+   * This method expects to be called when number of components of this is equal to one.
+   * This method returns true if it exists a tuple so that the value is contained in \b vals.
+   * If not any tuple contains one of the values contained in 'vals' false is returned.
+   * \sa DataArrayInt::findIdFirstEqual
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::presenceOfValue(const std::vector<T>& vals) const
+  {
+    return this->findIdFirstEqual(vals)!=-1;
+  }
+
+  /*!
+   * Accumulates values of each component of \a this array.
+   *  \param [out] res - an array of length \a this->getNumberOfComponents(), allocated
+   *         by the caller, that is filled by this method with sum value for each
+   *         component.
+   *  \throw If \a this is not allocated.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::accumulate(T *res) const
+  {
+    this->checkAllocated();
+    const T *ptr=this->getConstPointer();
+    mcIdType nbTuple(this->getNumberOfTuples());
+    std::size_t nbComps(this->getNumberOfComponents());
+    std::fill(res,res+nbComps,0);
+    for(mcIdType i=0;i<nbTuple;i++)
+      std::transform(ptr+i*nbComps,ptr+(i+1)*nbComps,res,res,std::plus<T>());
+  }
+  
+  template <class T>
+  T DataArrayDiscrete<T>::accumulate(std::size_t compId) const
+  {
+    this->checkAllocated();
+    const T *ptr=this->getConstPointer();
+    mcIdType nbTuple(this->getNumberOfTuples());
+    std::size_t nbComps(this->getNumberOfComponents());
+    if(compId<0 || compId>=nbComps)
+      throw INTERP_KERNEL::Exception("DataArrayInt::accumulate : Invalid compId specified : No such nb of components !");
+    T ret=0;
+    for(mcIdType i=0;i<nbTuple;i++)
+      ret+=ptr[i*nbComps+compId];
+    return ret;
+  }
+
+  /*!
+   * This method accumulate using addition tuples in \a this using input index array [ \a bgOfIndex, \a endOfIndex ).
+   * The returned array will have same number of components than \a this and number of tuples equal to
+   * \c std::distance(bgOfIndex,endOfIndex) \b minus \b one.
+   *
+   * The input index array is expected to be ascendingly sorted in which the all referenced ids should be in [0, \c this->getNumberOfTuples).
+   *
+   * \param [in] bgOfIndex - begin (included) of the input index array.
+   * \param [in] endOfIndex - end (excluded) of the input index array.
+   * \return DataArrayInt * - the new instance having the same number of components than \a this.
+   *
+   * \throw If bgOfIndex or end is NULL.
+   * \throw If input index array is not ascendingly sorted.
+   * \throw If there is an id in [ \a bgOfIndex, \a endOfIndex ) not in [0, \c this->getNumberOfTuples).
+   * \throw If std::distance(bgOfIndex,endOfIndex)==0.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::accumulatePerChunck(const mcIdType *bgOfIndex, const mcIdType *endOfIndex) const
+  {
+    if(!bgOfIndex || !endOfIndex)
+      throw INTERP_KERNEL::Exception("DataArrayInt::accumulatePerChunck : input pointer NULL !");
+    this->checkAllocated();
+    std::size_t nbCompo(this->getNumberOfComponents());
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    mcIdType sz=ToIdType(std::distance(bgOfIndex,endOfIndex));
+    if(sz<1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::accumulatePerChunck : invalid size of input index array !");
+    sz--;
+    MCAuto<DataArrayType> ret=DataArrayType::New(); ret->alloc(sz,nbCompo);
+    const mcIdType *w=bgOfIndex;
+    if(*w<0 || *w>=nbOfTuples)
+      throw INTERP_KERNEL::Exception("DataArrayInt::accumulatePerChunck : The first element of the input index not in [0,nbOfTuples) !");
+    const T *srcPt=this->begin()+(*w)*nbCompo;
+    T *tmp=ret->getPointer();
+    for(mcIdType i=0;i<sz;i++,tmp+=nbCompo,w++)
+      {
+        std::fill(tmp,tmp+nbCompo,0);
+        if(w[1]>=w[0])
+          {
+            for(mcIdType j=w[0];j<w[1];j++,srcPt+=nbCompo)
+              {
+                if(j>=0 && j<nbOfTuples)
+                  std::transform(srcPt,srcPt+nbCompo,tmp,tmp,std::plus<T>());
+                else
+                  {
+                    std::ostringstream oss; oss << "DataArrayInt::accumulatePerChunck : At rank #" << i << " the input index array points to id " << j << " should be in [0," << nbOfTuples << ") !";
+                    throw INTERP_KERNEL::Exception(oss.str().c_str());
+                  }
+              }
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::accumulatePerChunck : At rank #" << i << " the input index array is not in ascendingly sorted.";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    ret->copyStringInfoFrom(*this);
+    return ret.retn();
+  }
+
+  /*!
+   * Returns in a single walk in \a this the min value and the max value in \a this.
+   * \a this is expected to be single component array.
+   *
+   * \param [out] minValue - the min value in \a this.
+   * \param [out] maxValue - the max value in \a this.
+   *
+   * \sa getMinValueInArray, getMinValue, getMaxValueInArray, getMaxValue
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::getMinMaxValues(T& minValue, T& maxValue) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::getMinMaxValues : must be applied on DataArrayInt with only one component !");
+    std::size_t nbElements(this->getNumberOfTuples());
+    const T *pt(this->begin());
+    minValue=std::numeric_limits<T>::max(); maxValue=-std::numeric_limits<T>::max();
+    for(std::size_t i=0;i<nbElements;i++,pt++)
+      {
+        if(*pt<minValue)
+          minValue=*pt;
+        if(*pt>maxValue)
+          maxValue=*pt;
+      }
+  }
+
+  /*!
+   * Modify all elements of \a this array, so that
+   * an element _x_ becomes \f$ numerator / x \f$.
+   *  \warning If an exception is thrown because of presence of 0 element in \a this
+   *           array, all elements processed before detection of the zero element remain
+   *           modified.
+   *  \param [in] numerator - the numerator used to modify array elements.
+   *  \throw If \a this is not allocated.
+   *  \throw If there is an element equal to 0 in \a this array.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::applyInv(T numerator)
+  {
+    this->checkAllocated();
+    T *ptr=this->getPointer();
+    std::size_t nbOfElems=this->getNbOfElems();
+    for(std::size_t i=0;i<nbOfElems;i++,ptr++)
+      {
+        if(*ptr!=0)
+          {
+            *ptr=numerator/(*ptr);
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::applyInv : presence of null value in tuple #" << i/(this->getNumberOfComponents()) << " component #" << i%(this->getNumberOfComponents());
+            oss << " !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    this->declareAsNew();
+  }
+
+  /*!
+   * Modify all elements of \a this array, so that
+   * an element _x_ becomes \f$ x / val \f$.
+   *  \param [in] val - the denominator used to modify array elements.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a val == 0.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::applyDivideBy(T val)
+  {
+    if(val==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::applyDivideBy : Trying to divide by 0 !");
+    this->checkAllocated();
+    T *ptr=this->getPointer();
+    std::size_t nbOfElems=this->getNbOfElems();
+    std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::divides<T>(),val));
+    this->declareAsNew();
+  }
+
+  /*!
+   * Modify all elements of \a this array, so that
+   * an element _x_ becomes  <em> x % val </em>.
+   *  \param [in] val - the divisor used to modify array elements.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a val <= 0.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::applyModulus(T val)
+  {
+    if(val<=0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::applyDivideBy : Trying to operate modulus on value <= 0 !");
+    this->checkAllocated();
+    T *ptr=this->getPointer();
+    std::size_t nbOfElems=this->getNbOfElems();
+    std::transform(ptr,ptr+nbOfElems,ptr,std::bind2nd(std::modulus<T>(),val));
+    this->declareAsNew();
+  }
+
+  /*!
+   * Modify all elements of \a this array, so that
+   * an element _x_ becomes <em> val % x </em>.
+   *  \warning If an exception is thrown because of presence of an element <= 0 in \a this
+   *           array, all elements processed before detection of the zero element remain
+   *           modified.
+   *  \param [in] val - the divident used to modify array elements.
+   *  \throw If \a this is not allocated.
+   *  \throw If there is an element equal to or less than 0 in \a this array.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::applyRModulus(T val)
+  {
+    this->checkAllocated();
+    T *ptr=this->getPointer();
+    std::size_t nbOfElems=this->getNbOfElems();
+    for(std::size_t i=0;i<nbOfElems;i++,ptr++)
+      {
+        if(*ptr>0)
+          {
+            *ptr=val%(*ptr);
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::applyRModulus : presence of value <=0 in tuple #" << i/(this->getNumberOfComponents()) << " component #" << i%(this->getNumberOfComponents());
+            oss << " !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    this->declareAsNew();
+  }
+
+  /*!
+   * Modify all elements of \a this array, so that
+   * an element _x_ becomes <em> val ^ x </em>.
+   *  \param [in] val - the value used to apply pow on all array elements.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a val < 0.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::applyPow(T val)
+  {
+    this->checkAllocated();
+    if(val<0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::applyPow : input pow in < 0 !");
+    T *ptr=this->getPointer();
+    std::size_t nbOfElems=this->getNbOfElems();
+    if(val==0)
+      {
+        std::fill(ptr,ptr+nbOfElems,1);
+        return ;
+      }
+    for(std::size_t i=0;i<nbOfElems;i++,ptr++)
+      {
+        T tmp=1;
+        for(T j=0;j<val;j++)
+          tmp*=*ptr;
+        *ptr=tmp;
+      }
+    this->declareAsNew();
+  }
+  
+  /*!
+   * Modify all elements of \a this array, so that
+   * an element _x_ becomes \f$ val ^ x \f$.
+   *  \param [in] val - the value used to apply pow on all array elements.
+   *  \throw If \a this is not allocated.
+   *  \throw If there is an element < 0 in \a this array.
+   *  \warning If an exception is thrown because of presence of 0 element in \a this
+   *           array, all elements processed before detection of the zero element remain
+   *           modified.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::applyRPow(T val)
+  {
+    this->checkAllocated();
+    T *ptr=this->getPointer();
+    std::size_t nbOfElems=this->getNbOfElems();
+    for(std::size_t i=0;i<nbOfElems;i++,ptr++)
+      {
+        if(*ptr>=0)
+          {
+            T tmp=1;
+            for(T j=0;j<*ptr;j++)
+              tmp*=val;
+            *ptr=tmp;
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::applyRPow : presence of negative value in tuple #" << i/(this->getNumberOfComponents()) << " component #" << i%(this->getNumberOfComponents());
+            oss << " !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    this->declareAsNew();
+  }
+
+  /*!
+   * This method works only on data array with one component.
+   * This method returns a newly allocated array storing stored ascendantly tuple ids in \b this so that
+   * this[*id] in [\b vmin,\b vmax)
+   *
+   * \param [in] vmin begin of range. This value is included in range (included).
+   * \param [in] vmax end of range. This value is \b not included in range (excluded).
+   * \return a newly allocated data array that the caller should deal with.
+   *
+   * \sa DataArrayInt::findIdsNotInRange , DataArrayInt::findIdsStricltyNegative
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::findIdsInRange(T vmin, T vmax) const
+  {
+    InRange<T> ir(vmin,vmax);
+    MCAuto<DataArrayIdType> ret(this->findIdsAdv(ir));
+    return ret.retn();
+  }
+  
+  /*!
+   * This method works only on data array with one component.
+   * This method returns a newly allocated array storing stored ascendantly tuple ids in \b this so that
+   * this[*id] \b not in [\b vmin,\b vmax)
+   *
+   * \param [in] vmin begin of range. This value is \b not included in range (excluded).
+   * \param [in] vmax end of range. This value is included in range (included).
+   * \return a newly allocated data array that the caller should deal with.
+   *
+   * \sa DataArrayInt::findIdsInRange , DataArrayInt::findIdsStricltyNegative
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::findIdsNotInRange(T vmin, T vmax) const
+  {
+    NotInRange<T> nir(vmin,vmax);
+    MCAuto<DataArrayIdType> ret(this->findIdsAdv(nir));
+    return ret.retn();
+  }
+
+  /*!
+   * This method works only on data array with one component.
+   * This method checks that all ids in \b this are in [ \b vmin, \b vmax ). If there is at least one element in \a this not in [ \b vmin, \b vmax ) an exception will be thrown.
+   *
+   * \param [in] vmin begin of range. This value is included in range (included).
+   * \param [in] vmax end of range. This value is \b not included in range (excluded).
+   * \return if all ids in \a this are so that (*this)[i]==i for all i in [ 0, \c this->getNumberOfTuples() ). */
+  template <class T>
+  bool DataArrayDiscrete<T>::checkAllIdsInRange(T vmin, T vmax) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::checkAllIdsInRange : this must have exactly one component !");
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    bool ret=true;
+    const T *cptr=this->getConstPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
+      {
+        if(*cptr>=vmin && *cptr<vmax)
+          { ret=ret && *cptr==i; }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::checkAllIdsInRange : tuple #" << i << " has value " << *cptr << " should be in [" << vmin << "," << vmax << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    return ret;
+  }
+
+  /*!
+   * Returns a new DataArrayInt which contains a complement of elements of \a this
+   * one-dimensional array. I.e. the result array contains all elements from the range [0,
+   * \a nbOfElement) not present in \a this array.
+   *  \param [in] nbOfElement - maximal size of the result array.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *         array using decrRef() as it is no more needed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If any element \a x of \a this array violates condition ( 0 <= \a x < \a
+   *         nbOfElement ).
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::buildComplement(mcIdType nbOfElement) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildComplement : only single component allowed !");
+    std::vector<bool> tmp(nbOfElement);
+    const T *pt=this->getConstPointer();
+    std::size_t nbOfElements=this->getNumberOfTuples();
+    for(const T *w=pt;w!=pt+nbOfElements;w++)
+      if(*w>=0 && *w<nbOfElement)
+        tmp[*w]=true;
+      else
+        throw INTERP_KERNEL::Exception("DataArrayInt::buildComplement : an element is not in valid range : [0,nbOfElement) !");
+    std::size_t nbOfRetVal=std::count(tmp.begin(),tmp.end(),false);
+    DataArrayIdType *ret=DataArrayIdType::New();
+    ret->alloc(nbOfRetVal,1);
+    mcIdType j=0;
+    mcIdType *retPtr=ret->getPointer();
+    for(mcIdType i=0;i<nbOfElement;i++)
+      if(!tmp[i])
+        retPtr[j++]=i;
+    return ret;
+  }
+
+  /*!
+   * Returns a new DataArrayInt containing elements of \a this one-dimensional missing
+   * from an \a other one-dimensional array.
+   *  \param [in] other - a DataArrayInt containing elements not to include in the result array.
+   *  \return DataArrayInt * - a new instance of DataArrayInt with one component. The
+   *         caller is to delete this array using decrRef() as it is no more needed.
+   *  \throw If \a other is NULL.
+   *  \throw If \a other is not allocated.
+   *  \throw If \a other->getNumberOfComponents() != 1.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \sa DataArrayInt::buildSubstractionOptimized()
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildSubstraction(const DataArrayType *other) const
+  {
+    if(!other)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : DataArrayInt pointer in input is NULL !");
+    this->checkAllocated();
+    other->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed !");
+    if(other->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstraction : only single component allowed for other type !");
+    const T *pt=this->getConstPointer();
+    std::size_t nbOfElements=this->getNumberOfTuples();
+    std::set<T> s1(pt,pt+nbOfElements);
+    pt=other->getConstPointer();
+    nbOfElements=other->getNumberOfTuples();
+    std::set<T> s2(pt,pt+nbOfElements);
+    std::vector<T> r;
+    std::set_difference(s1.begin(),s1.end(),s2.begin(),s2.end(),std::back_insert_iterator< std::vector<T> >(r));
+    DataArrayType *ret=DataArrayType::New();
+    ret->alloc(r.size(),1);
+    std::copy(r.begin(),r.end(),ret->getPointer());
+    return ret;
+  }
+
+  /*!
+   * \a this is expected to have one component and to be sorted ascendingly (as for \a other).
+   * \a other is expected to be a part of \a this. If not DataArrayInt::buildSubstraction should be called instead.
+   *
+   * \param [in] other an array with one component and expected to be sorted ascendingly.
+   * \ret list of ids in \a this but not in \a other.
+   * \sa DataArrayInt::buildSubstraction
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildSubstractionOptimized(const DataArrayType *other) const
+  {
+    static const char *MSG="DataArrayInt::buildSubstractionOptimized : only single component allowed !";
+    if(!other) throw INTERP_KERNEL::Exception("DataArrayInt::buildSubstractionOptimized : NULL input array !");
+    this->checkAllocated(); other->checkAllocated();
+    if(this->getNumberOfComponents()!=1) throw INTERP_KERNEL::Exception(MSG);
+    if(other->getNumberOfComponents()!=1) throw INTERP_KERNEL::Exception(MSG);
+    const T *pt1Bg(this->begin()),*pt1End(this->end()),*pt2Bg(other->begin()),*pt2End(other->end());
+    const T *work1(pt1Bg),*work2(pt2Bg);
+    MCAuto<DataArrayType> ret(DataArrayType::New()); ret->alloc(0,1);
+    for(;work1!=pt1End;work1++)
+      {
+        if(work2!=pt2End && *work1==*work2)
+          work2++;
+        else
+          ret->pushBackSilent(*work1);
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt which contains all elements of \a this and a given
+   * one-dimensional arrays. The result array does not contain any duplicates
+   * and its values are sorted in ascending order.
+   *  \param [in] other - an array to unite with \a this one.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *         array using decrRef() as it is no more needed.
+   *  \throw If \a this or \a other is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If \a other->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildUnion(const DataArrayType *other) const
+  {
+    std::vector<const DataArrayType *>arrs(2);
+    arrs[0]=dynamic_cast<const DataArrayType *>(this); arrs[1]=other;
+    return DataArrayDiscrete<T>::BuildUnion(arrs);
+  }
+
+  /*!
+   * Returns a new DataArrayInt which contains elements present in both \a this and a given
+   * one-dimensional arrays. The result array does not contain any duplicates
+   * and its values are sorted in ascending order.
+   *  \param [in] other - an array to intersect with \a this one.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *         array using decrRef() as it is no more needed.
+   *  \throw If \a this or \a other is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If \a other->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildIntersection(const DataArrayType *other) const
+  {
+    std::vector<const DataArrayType *>arrs(2);
+    arrs[0]=dynamic_cast<const DataArrayType *>(this); arrs[1]=other;
+    return DataArrayDiscrete<T>::BuildIntersection(arrs);
+  }
+
+  /*!
+   * This method can be applied on allocated with one component DataArrayInt instance.
+   * This method is typically relevant for sorted arrays. All consecutive duplicated items in \a this will appear only once in returned DataArrayInt instance.
+   * Example : if \a this contains [1,2,2,3,3,3,3,4,5,5,7,7,7,19] the returned array will contain [1,2,3,4,5,7,19]
+   *
+   * \return a newly allocated array that contain the result of the unique operation applied on \a this.
+   * \throw if \a this is not allocated or if \a this has not exactly one component.
+   * \sa DataArrayInt::buildUniqueNotSorted
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildUnique() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildUnique : only single component allowed !");
+    std::size_t nbOfElements=this->getNumberOfTuples();
+    MCAuto<DataArrayType> tmp=DataArrayType::New();
+    tmp->deepCopyFrom (*this);
+    T *data=tmp->getPointer();
+    T *last=std::unique(data,data+nbOfElements);
+    MCAuto<DataArrayType> ret=DataArrayType::New();
+    ret->alloc(std::distance(data,last),1);
+    std::copy(data,last,ret->getPointer());
+    return ret.retn();
+  }
+
+  /*!
+   * This method can be applied on allocated with one component DataArrayInt instance.
+   * This method keep elements only once by keeping the same order in \a this that is not expected to be sorted.
+   *
+   * \return a newly allocated array that contain the result of the unique operation applied on \a this.
+   *
+   * \throw if \a this is not allocated or if \a this has not exactly one component.
+   *
+   * \sa DataArrayInt::buildUnique
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildUniqueNotSorted() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildUniqueNotSorted : only single component allowed !");
+    T minVal,maxVal;
+    this->getMinMaxValues(minVal,maxVal);
+    std::vector<bool> b(maxVal-minVal+1,false);
+    const T *ptBg(this->begin()),*endBg(this->end());
+    MCAuto<DataArrayType> ret(DataArrayType::New()); ret->alloc(0,1);
+    for(const T *pt=ptBg;pt!=endBg;pt++)
+      {
+        if(!b[*pt-minVal])
+          {
+            ret->pushBackSilent(*pt);
+            b[*pt-minVal]=true;
+          }
+      }
+    ret->copyStringInfoFrom(*this);
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt which contains size of every of groups described by \a this
+   * "index" array. Such "index" array is returned for example by
+   * \ref MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity
+   * "MEDCouplingUMesh::buildDescendingConnectivity" and
+   * \ref MEDCoupling::MEDCouplingUMesh::getNodalConnectivityIndex
+   * "MEDCouplingUMesh::getNodalConnectivityIndex" etc.
+   * This method performs the reverse operation of DataArrayInt::computeOffsetsFull.
+   *  \return DataArrayInt * - a new instance of DataArrayInt, whose number of tuples
+   *          equals to \a this->getNumberOfComponents() - 1, and number of components is 1.
+   *          The caller is to delete this array using decrRef() as it is no more needed.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If \a this->getNumberOfTuples() < 2.
+   *
+   *  \b Example: <br>
+   *         - this contains [1,3,6,7,7,9,15]
+   *         - result array contains [2,3,1,0,2,6],
+   *          where 2 = 3 - 1, 3 = 6 - 3, 1 = 7 - 6 etc.
+   *
+   * \sa DataArrayInt::computeOffsetsFull
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::deltaShiftIndex() const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : only single component allowed !");
+    std::size_t nbOfElements=this->getNumberOfTuples();
+    if(nbOfElements<2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::deltaShiftIndex : 1 tuple at least must be present in 'this' !");
+    const T *ptr=this->getConstPointer();
+    DataArrayType *ret=DataArrayType::New();
+    ret->alloc(nbOfElements-1,1);
+    T *out=ret->getPointer();
+    std::transform(ptr+1,ptr+nbOfElements,ptr,out,std::minus<T>());
+    return ret;
+  }
+
+  /*!
+   * Modifies \a this one-dimensional array so that value of each element \a x
+   * of \a this array (\a a) is computed as \f$ x_i = \sum_{j=0}^{i-1} a[ j ] \f$.
+   * Or: for each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. Number of tuples
+   * and components remains the same.<br>
+   * This method is useful for allToAllV in MPI with contiguous policy. This method
+   * differs from computeOffsetsFull() in that the number of tuples is \b not changed by
+   * this one.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *
+   *  \b Example: <br>
+   *          - Before \a this contains [3,5,1,2,0,8]
+   *          - After \a this contains  [0,3,8,9,11,11]<br>
+   *          Note that the last element 19 = 11 + 8 is missing because size of \a this
+   *          array is retained and thus there is no space to store the last element.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::computeOffsets()
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsets : only single component allowed !");
+    std::size_t nbOfElements=this->getNumberOfTuples();
+    if(nbOfElements==0)
+      return ;
+    T *work=this->getPointer();
+    T tmp=work[0];
+    work[0]=0;
+    for(std::size_t i=1;i<nbOfElements;i++)
+      {
+        T tmp2=work[i];
+        work[i]=work[i-1]+tmp;
+        tmp=tmp2;
+      }
+    this->declareAsNew();
+  }
+
+  /*!
+   * Modifies \a this one-dimensional array so that value of each element \a x
+   * of \a this array (\a a) is computed as \f$ x_i = \sum_{j=0}^{i-1} a[ j ] \f$.
+   * Or: for each i>0 new[i]=new[i-1]+old[i-1] for i==0 new[i]=0. Number
+   * components remains the same and number of tuples is inceamented by one.<br>
+   * This method is useful for allToAllV in MPI with contiguous policy. This method
+   * differs from computeOffsets() in that the number of tuples is changed by this one.
+   * This method performs the reverse operation of DataArrayInt::deltaShiftIndex.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *
+   *  \b Example: <br>
+   *          - Before \a this contains [3,5,1,2,0,8]
+   *          - After \a this contains  [0,3,8,9,11,11,19]<br>
+   * \sa DataArrayInt::deltaShiftIndex
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::computeOffsetsFull()
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsetsFull : only single component allowed !");
+    std::size_t nbOfElements=this->getNumberOfTuples();
+    T *ret=(T *)malloc((nbOfElements+1)*sizeof(T));
+    const T *work=this->getConstPointer();
+    ret[0]=0;
+    for(std::size_t i=0;i<nbOfElements;i++)
+      ret[i+1]=work[i]+ret[i];
+    this->useArray(ret,true,DeallocType::C_DEALLOC,nbOfElements+1,1);
+    this->declareAsNew();
+  }
+
+  /*!
+   * Returns two new DataArrayInt instances whose contents is computed from that of \a this and \a listOfIds arrays as follows.
+   * \a this is expected to be an offset format ( as returned by DataArrayInt::computeOffsetsFull ) that is to say with one component
+   * and ** sorted strictly increasingly **. \a listOfIds is expected to be sorted ascendingly (not strictly needed for \a listOfIds).
+   * This methods searches in \a this, considered as a set of contiguous \c this->getNumberOfComponents() ranges, all ids in \a listOfIds
+   * filling completely one of the ranges in \a this.
+   *
+   * \param [in] listOfIds a list of ids that has to be sorted ascendingly.
+   * \param [out] rangeIdsFetched the range ids fetched
+   * \param [out] idsInInputListThatFetch contains the list of ids in \a listOfIds that are \b fully included in a range in \a this. So
+   *              \a idsInInputListThatFetch is a part of input \a listOfIds.
+   *
+   * \sa DataArrayInt::computeOffsetsFull
+   *
+   *  \b Example: <br>
+   *          - \a this : [0,3,7,9,15,18]
+   *          - \a listOfIds contains  [0,1,2,3,7,8,15,16,17]
+   *          - \a rangeIdsFetched result array: [0,2,4]
+   *          - \a idsInInputListThatFetch result array: [0,1,2,7,8,15,16,17]
+   * In this example id 3 in input \a listOfIds is alone so it do not appear in output \a idsInInputListThatFetch.
+   * <br>
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::findIdsRangesInListOfIds(const DataArrayType *listOfIds, DataArrayIdType *& rangeIdsFetched, DataArrayType *& idsInInputListThatFetch) const
+  {
+    if(!listOfIds)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdsRangesInListOfIds : input list of ids is null !");
+    listOfIds->checkAllocated(); this->checkAllocated();
+    if(listOfIds->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdsRangesInListOfIds : input list of ids must have exactly one component !");
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdsRangesInListOfIds : this must have exactly one component !");
+    MCAuto<DataArrayIdType> ret0=DataArrayIdType::New(); ret0->alloc(0,1);
+    MCAuto<DataArrayType> ret1=DataArrayType::New(); ret1->alloc(0,1);
+    const T *tupPtr(listOfIds->begin()), *tupEnd(listOfIds->end());
+    const T *offBg(this->begin()),*offEnd(this->end()-1);
+    const T *offPtr(offBg);
+    while(tupPtr!=tupEnd && offPtr!=offEnd)
+      {
+        if(*tupPtr==*offPtr)
+          {
+            T i=offPtr[0];
+            while(i<offPtr[1] && *tupPtr==i && tupPtr!=tupEnd) { i++; tupPtr++; }
+            if(i==offPtr[1])
+              {
+                ret0->pushBackSilent(ToIdType(std::distance(offBg,offPtr)));
+                ret1->pushBackValsSilent(tupPtr-(offPtr[1]-offPtr[0]),tupPtr);
+                offPtr++;
+              }
+          }
+        else
+          { if(*tupPtr<*offPtr) tupPtr++; else offPtr++; }
+      }
+    rangeIdsFetched=ret0.retn();
+    idsInInputListThatFetch=ret1.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt whose contents is computed from that of \a this and \a
+   * offsets arrays as follows. \a offsets is a one-dimensional array considered as an
+   * "index" array of a "iota" array, thus, whose each element gives an index of a group
+   * beginning within the "iota" array. And \a this is a one-dimensional array
+   * considered as a selector of groups described by \a offsets to include into the result array.
+   *  \throw If \a offsets is NULL.
+   *  \throw If \a offsets is not allocated.
+   *  \throw If \a offsets->getNumberOfComponents() != 1.
+   *  \throw If \a offsets is not monotonically increasing.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If any element of \a this is not a valid index for \a offsets array.
+   *
+   *  \b Example: <br>
+   *          - \a this: [0,2,3]
+   *          - \a offsets: [0,3,6,10,14,20]
+   *          - result array: [0,1,2,6,7,8,9,10,11,12,13] == <br>
+   *            \c range(0,3) + \c range(6,10) + \c range(10,14) ==<br>
+   *            \c range( \a offsets[ \a this[0] ], offsets[ \a this[0]+1 ]) +
+   *            \c range( \a offsets[ \a this[1] ], offsets[ \a this[1]+1 ]) +
+   *            \c range( \a offsets[ \a this[2] ], offsets[ \a this[2]+1 ])
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildExplicitArrByRanges(const DataArrayType *offsets) const
+  {
+    if(!offsets)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : DataArrayInt pointer in input is NULL !");
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : only single component allowed !");
+    offsets->checkAllocated();
+    if(offsets->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrByRanges : input array should have only single component !");
+    mcIdType othNbTuples=offsets->getNumberOfTuples()-1;
+    mcIdType nbOfTuples=this->getNumberOfTuples();
+    T retNbOftuples=0;
+    const T *work=this->getConstPointer();
+    const T *offPtr=offsets->getConstPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++)
+      {
+        T val=work[i];
+        if(val>=0 && val<othNbTuples)
+          {
+            T delta=offPtr[val+1]-offPtr[val];
+            if(delta>=0)
+              retNbOftuples+=delta;
+            else
+              {
+                std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrByRanges : Tuple #" << val << " of offset array has a delta < 0 !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrByRanges : Tuple #" << i << " in this contains " << val;
+            oss << " whereas offsets array is of size " << othNbTuples+1 << " !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    MCAuto<DataArrayType> ret=DataArrayType::New();
+    ret->alloc(retNbOftuples,1);
+    T *retPtr=ret->getPointer();
+    for(mcIdType i=0;i<nbOfTuples;i++)
+      {
+        T val=work[i];
+        T start=offPtr[val];
+        T off=offPtr[val+1]-start;
+        for(T j=0;j<off;j++,retPtr++)
+          *retPtr=start+j;
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt whose contents is computed using \a this that must be a
+   * scaled array (monotonically increasing).
+  from that of \a this and \a
+   * offsets arrays as follows. \a offsets is a one-dimensional array considered as an
+   * "index" array of a "iota" array, thus, whose each element gives an index of a group
+   * beginning within the "iota" array. And \a this is a one-dimensional array
+   * considered as a selector of groups described by \a offsets to include into the result array.
+   *  \throw If \a  is NULL.
+   *  \throw If \a this is not allocated.
+   *  \throw If \a this->getNumberOfComponents() != 1.
+   *  \throw If \a this->getNumberOfTuples() == 0.
+   *  \throw If \a this is not monotonically increasing.
+   *  \throw If any element of ids in ( \a bg \a stop \a step ) points outside the scale in \a this.
+   *
+   *  \b Example: <br>
+   *          - \a bg , \a stop and \a step : (0,5,2)
+   *          - \a this: [0,3,6,10,14,20]
+   *          - result array: [0,0,0, 2,2,2,2, 4,4,4,4,4,4] == <br>
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::buildExplicitArrOfSliceOnScaledArr(T bg, T stop, T step) const
+  {
+    if(!this->isAllocated())
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr : not allocated array !");
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr : number of components is expected to be equal to one !");
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    if(nbOfTuples==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr : number of tuples must be != 0 !");
+    const T *ids(this->begin());
+    mcIdType nbOfEltsInSlc=DataArrayTools<T>::GetNumberOfItemGivenBESRelative(bg,stop,step,"DataArrayInt::buildExplicitArrOfSliceOnScaledArr");
+    T sz(0),pos(bg);
+    for(mcIdType i=0;i<nbOfEltsInSlc;i++,pos+=step)
+      {
+        if(pos>=0 && pos<nbOfTuples-1)
+          {
+            T delta(ids[pos+1]-ids[pos]);
+            sz+=delta;
+            if(delta<0)
+              {
+                std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrOfSliceOnScaledArr : At pos #" << i << " of input slice, value is " << pos << " and at this pos this is not monotonically increasing !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::buildExplicitArrOfSliceOnScaledArr : At pos #" << i << " of input slice, value is " << pos << " should be in [0," << nbOfTuples-1 << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    MCAuto<DataArrayType> ret(DataArrayType::New()); ret->alloc(sz,1);
+    T *retPtr(ret->getPointer());
+    pos=bg;
+    for(mcIdType i=0;i<nbOfEltsInSlc;i++,pos+=step)
+      {
+        T delta(ids[pos+1]-ids[pos]);
+        for(T j=0;j<delta;j++,retPtr++)
+          *retPtr=pos;
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Given in input ranges \a ranges, it returns a newly allocated DataArrayInt instance having one component and the same number of tuples than \a this.
+   * For each tuple at place **i** in \a this it tells which is the first range in \a ranges that contains value \c this->getIJ(i,0) and put the result
+   * in tuple **i** of returned DataArrayInt.
+   * If ranges overlapped (in theory it should not) this method do not detect it and always returns the first range.
+   *
+   * For example if \a this contains : [1,24,7,8,10,17] and \a ranges contains [(0,3),(3,8),(8,15),(15,22),(22,30)]
+   * The return DataArrayInt will contain : **[0,4,1,2,2,3]**
+   *
+   * \param [in] ranges typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is
+   *             for lower value included and 2nd component is the upper value of corresponding range **excluded**.
+   * \throw If offsets is a null pointer or does not have 2 components or if \a this is not allocated or \a this do not have exactly one component. To finish an exception
+   *        is thrown if no ranges in \a ranges contains value in \a this.
+   *
+   * \sa DataArrayInt::findIdInRangeForEachTuple
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::findRangeIdForEachTuple(const DataArrayType *ranges) const
+  {
+    if(!ranges)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findRangeIdForEachTuple : null input pointer !");
+    if(ranges->getNumberOfComponents()!=2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findRangeIdForEachTuple : input DataArrayInt instance should have 2 components !");
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findRangeIdForEachTuple : this should have only one component !");
+    mcIdType nbTuples(this->getNumberOfTuples());
+    MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(nbTuples,1);
+    mcIdType nbOfRanges(ranges->getNumberOfTuples());
+    const T *rangesPtr=ranges->getConstPointer();
+    mcIdType *retPtr=ret->getPointer();
+    const T *inPtr=this->getConstPointer();
+    for(mcIdType i=0;i<nbTuples;i++,retPtr++)
+      {
+        T val=inPtr[i];
+        bool found=false;
+        for(mcIdType j=0;j<nbOfRanges && !found;j++)
+          if(val>=rangesPtr[2*j] && val<rangesPtr[2*j+1])
+            { *retPtr=j; found=true; }
+        if(found)
+          continue;
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::findRangeIdForEachTuple : tuple #" << i << " not found by any ranges !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Given in input ranges \a ranges, it returns a newly allocated DataArrayInt instance having one component and the same number of tuples than \a this.
+   * For each tuple at place **i** in \a this it tells which is the sub position of the first range in \a ranges that contains value \c this->getIJ(i,0) and put the result
+   * in tuple **i** of returned DataArrayInt.
+   * If ranges overlapped (in theory it should not) this method do not detect it and always returns the sub position of the first range.
+   *
+   * For example if \a this contains : [1,24,7,8,10,17] and \a ranges contains [(0,3),(3,8),(8,15),(15,22),(22,30)]
+   * The return DataArrayInt will contain : **[1,2,4,0,2,2]**
+   * This method is often called in pair with DataArrayInt::findRangeIdForEachTuple method.
+   *
+   * \param [in] ranges typically come from output of MEDCouplingUMesh::ComputeRangesFromTypeDistribution. Each range is specified like this : 1st component is
+   *             for lower value included and 2nd component is the upper value of corresponding range **excluded**.
+   * \throw If offsets is a null pointer or does not have 2 components or if \a this is not allocated or \a this do not have exactly one component. To finish an exception
+   *        is thrown if no ranges in \a ranges contains value in \a this.
+   * \sa DataArrayInt::findRangeIdForEachTuple
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::findIdInRangeForEachTuple(const DataArrayType *ranges) const
+  {
+    if(!ranges)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdInRangeForEachTuple : null input pointer !");
+    if(ranges->getNumberOfComponents()!=2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdInRangeForEachTuple : input DataArrayInt instance should have 2 components !");
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::findIdInRangeForEachTuple : this should have only one component !");
+    mcIdType nbTuples=this->getNumberOfTuples();
+    MCAuto<DataArrayType> ret=DataArrayType::New(); ret->alloc(nbTuples,1);
+    mcIdType nbOfRanges=ranges->getNumberOfTuples();
+    const T *rangesPtr=ranges->getConstPointer();
+    T *retPtr=ret->getPointer();
+    const T *inPtr=this->getConstPointer();
+    for(mcIdType i=0;i<nbTuples;i++,retPtr++)
+      {
+        T val=inPtr[i];
+        bool found=false;
+        for(mcIdType j=0;j<nbOfRanges && !found;j++)
+          if(val>=rangesPtr[2*j] && val<rangesPtr[2*j+1])
+            { *retPtr=val-rangesPtr[2*j]; found=true; }
+        if(found)
+          continue;
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::findIdInRangeForEachTuple : tuple #" << i << " not found by any ranges !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * \b WARNING this method is a \b non \a const \b method. This method works tuple by tuple. Each tuple is expected to be pairs (number of components must be equal to 2).
+   * This method rearrange each pair in \a this so that, tuple with id \b tid will be after the call \c this->getIJ(tid,0)==this->getIJ(tid-1,1) and \c this->getIJ(tid,1)==this->getIJ(tid+1,0).
+   * If it is impossible to reach such condition an exception will be thrown ! \b WARNING In case of throw \a this can be partially modified !
+   * If this method has correctly worked, \a this will be able to be considered as a linked list.
+   * This method does nothing if number of tuples is lower of equal to 1.
+   *
+   * This method is useful for users having an unstructured mesh having only SEG2 to rearrange internally the connectivity without any coordinates consideration.
+   *
+   * \sa MEDCouplingUMesh::orderConsecutiveCells1D, DataArrayInt::fromLinkedListOfPairToList
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::sortEachPairToMakeALinkedList()
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::sortEachPairToMakeALinkedList : Only works on DataArrayInt instance with nb of components equal to 2 !");
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    if(nbOfTuples<=1)
+      return ;
+    T *conn(this->getPointer());
+    for(mcIdType i=1;i<nbOfTuples;i++,conn+=2)
+      {
+        if(i>1)
+          {
+            if(conn[2]==conn[3])
+              {
+                std::ostringstream oss; oss << "DataArrayInt::sortEachPairToMakeALinkedList : In the tuple #" << i << " presence of a pair filled with same ids !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+            if(conn[2]!=conn[1] && conn[3]==conn[1] && conn[2]!=conn[0])
+              std::swap(conn[2],conn[3]);
+            //not(conn[2]==conn[1] && conn[3]!=conn[1] && conn[3]!=conn[0])
+            if(conn[2]!=conn[1] || conn[3]==conn[1] || conn[3]==conn[0])
+              {
+                std::ostringstream oss; oss << "DataArrayInt::sortEachPairToMakeALinkedList : In the tuple #" << i << " something is invalid !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+          }
+        else
+          {
+            if(conn[0]==conn[1] || conn[2]==conn[3])
+              throw INTERP_KERNEL::Exception("DataArrayInt::sortEachPairToMakeALinkedList : In the 2 first tuples presence of a pair filled with same ids !");
+            T tmp[4];
+            std::set<T> s;
+            s.insert(conn,conn+4);
+            if(s.size()!=3)
+              throw INTERP_KERNEL::Exception("DataArrayInt::sortEachPairToMakeALinkedList : This can't be considered as a linked list regarding 2 first tuples !");
+            if(std::count(conn,conn+4,conn[0])==2)
+              {
+                tmp[0]=conn[1];
+                tmp[1]=conn[0];
+                tmp[2]=conn[0];
+                if(conn[2]==conn[0])
+                  { tmp[3]=conn[3]; }
+                else
+                  { tmp[3]=conn[2];}
+                std::copy(tmp,tmp+4,conn);
+              }
+            else
+              {//here we are sure to have (std::count(conn,conn+4,conn[1])==2)
+                if(conn[1]==conn[3])
+                  std::swap(conn[2],conn[3]);
+              }
+          }
+      }
+  }
+
+  /*!
+   * \a this is expected to be a correctly linked list of pairs.
+   *
+   * \sa DataArrayInt::sortEachPairToMakeALinkedList
+   */
+  template <class T>
+  MCAuto<typename Traits<T>::ArrayType> DataArrayDiscrete<T>::fromLinkedListOfPairToList() const
+  {
+    this->checkAllocated();
+    this->checkNbOfComps(2,"DataArrayInt::fromLinkedListOfPairToList : this is expected to have 2 components");
+    mcIdType nbTuples(this->getNumberOfTuples());
+    if(nbTuples<1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::fromLinkedListOfPairToList : no tuples in this ! Not a linked list !");
+    MCAuto<DataArrayType> ret(DataArrayType::New()); ret->alloc(nbTuples+1,1);
+    const T *thisPtr(this->begin());
+    T *retPtr(ret->getPointer());
+    retPtr[0]=thisPtr[0];
+    for(mcIdType i=0;i<nbTuples;i++)
+      {
+        retPtr[i+1]=thisPtr[2*i+1];
+        if(i<nbTuples-1)
+          if(thisPtr[2*i+1]!=thisPtr[2*(i+1)+0])
+            {
+              std::ostringstream oss; oss << "DataArrayInt::fromLinkedListOfPairToList : this is not a proper linked list of pair. The link is broken between tuple #" << i << " and tuple #" << i+1 << " ! Call sortEachPairToMakeALinkedList ?";
+              throw INTERP_KERNEL::Exception(oss.str());
+            }
+      }
+    return ret;
+  }
+
+  /*!
+   * This method returns all different values found in \a this. This method throws if \a this has not been allocated.
+   * But the number of components can be different from one.
+   * \return a newly allocated array (that should be dealt by the caller) containing different values in \a this.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::getDifferentValues() const
+  {
+    this->checkAllocated();
+    std::set<T> ret;
+    ret.insert(this->begin(),this->end());
+    MCAuto<DataArrayType> ret2=DataArrayType::New();
+    ret2->alloc(ret.size(),1);
+    std::copy(ret.begin(),ret.end(),ret2->getPointer());
+    return ret2.retn();
+  }
+
+  /*!
+   * This method is a refinement of DataArrayInt::getDifferentValues because it returns not only different values in \a this but also, for each of
+   * them it tells which tuple id have this id.
+   * This method works only on arrays with one component (if it is not the case call DataArrayInt::rearrange(1) ).
+   * This method returns two arrays having same size.
+   * The instances of DataArrayInt in the returned vector have be specially allocated and computed by this method. Each of them should be dealt by the caller of this method.
+   * Example : if this is equal to [1,0,1,2,0,2,2,-3,2] -> differentIds=[-3,0,1,2] and returned array will be equal to [[7],[1,4],[0,2],[3,5,6,8]]
+   */
+  template <class T>
+  std::vector<DataArrayIdType *> DataArrayDiscrete<T>::partitionByDifferentValues(std::vector<T>& differentIds) const
+  {
+    this->checkAllocated();
+    if(this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::partitionByDifferentValues : this should have only one component !");
+    mcIdType id=0;
+    std::map<T,mcIdType> m,m2,m3;
+    for(const T *w=this->begin();w!=this->end();w++)
+      m[*w]++;
+    differentIds.resize(m.size());
+    std::vector<DataArrayIdType *> ret(m.size());
+    std::vector<mcIdType *> retPtr(m.size());
+    for(typename std::map<T,mcIdType>::const_iterator it=m.begin();it!=m.end();it++,id++)
+      {
+        m2[(*it).first]=id;
+        ret[id]=DataArrayIdType::New();
+        ret[id]->alloc((*it).second,1);
+        retPtr[id]=ret[id]->getPointer();
+        differentIds[id]=(*it).first;
+      }
+    id=0;
+    for(const T *w=this->begin();w!=this->end();w++,id++)
+      {
+        retPtr[m2[*w]][m3[*w]++]=id;
+      }
+    return ret;
+  }
+
+  /*!
+   * This method split ids in [0, \c this->getNumberOfTuples() ) using \a this array as a field of weight (>=0 each).
+   * The aim of this method is to return a set of \a nbOfSlices chunk of contiguous ids as balanced as possible.
+   *
+   * \param [in] nbOfSlices - number of slices expected.
+   * \return - a vector having a size equal to \a nbOfSlices giving the start (included) and the stop (excluded) of each chunks.
+   *
+   * \sa DataArray::GetSlice
+   * \throw If \a this is not allocated or not with exactly one component.
+   * \throw If an element in \a this if < 0.
+   */
+  template <class T>
+  std::vector< std::pair<mcIdType,mcIdType> > DataArrayDiscrete<T>::splitInBalancedSlices(mcIdType nbOfSlices) const
+  {
+    if(!this->isAllocated() || this->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::splitInBalancedSlices : this array should have number of components equal to one and must be allocated !");
+    if(nbOfSlices<=0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::splitInBalancedSlices : number of slices must be >= 1 !");
+    T sum(this->accumulate((std::size_t)0));
+    mcIdType nbOfTuples(this->getNumberOfTuples());
+    T sumPerSlc(sum/FromIdType<T>(nbOfSlices));
+    mcIdType pos(0);
+    const T *w(this->begin());
+    std::vector< std::pair<mcIdType,mcIdType> > ret(nbOfSlices);
+    for(mcIdType i=0;i<nbOfSlices;i++)
+      {
+        std::pair<mcIdType, mcIdType> p(pos,-1);
+        T locSum(0);
+        while(locSum<sumPerSlc && pos<nbOfTuples) { pos++; locSum+=*w++; }
+        if(i!=nbOfSlices-1)
+          p.second=pos;
+        else
+          p.second=nbOfTuples;
+        ret[i]=p;
+      }
+    return ret;
+  }
+
+  /*!
+   * Modify \a this array so that each value becomes a modulus of division of this value by
+   * a value of another DataArrayInt. There are 3 valid cases.
+   * 1.  The arrays have same number of tuples and components. Then each value of
+   *    \a this array is divided by the corresponding value of \a other one, i.e.:
+   *   _a_ [ i, j ] %= _other_ [ i, j ].
+   * 2.  The arrays have same number of tuples and \a other array has one component. Then
+   *   _a_ [ i, j ] %= _other_ [ i, 0 ].
+   * 3.  The arrays have same number of components and \a other array has one tuple. Then
+   *   _a_ [ i, j ] %= _a2_ [ 0, j ].
+   *
+   *  \warning No check of division by zero is performed!
+   *  \param [in] other - a divisor array.
+   *  \throw If \a other is NULL.
+   *  \throw If \a this->getNumberOfTuples() != \a other->getNumberOfTuples() and
+   *         \a this->getNumberOfComponents() != \a other->getNumberOfComponents() and
+   *         \a other has number of both tuples and components not equal to 1.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::modulusEqual(const DataArrayType *other)
+  {
+    if(!other)
+      throw INTERP_KERNEL::Exception("DataArrayInt::modulusEqual : input DataArrayInt instance is NULL !");
+    const char *msg="Nb of tuples mismatch for DataArrayInt::modulusEqual !";
+    this->checkAllocated(); other->checkAllocated();
+    mcIdType nbOfTuple(this->getNumberOfTuples());
+    mcIdType nbOfTuple2(other->getNumberOfTuples());
+    std::size_t nbOfComp(this->getNumberOfComponents());
+    std::size_t nbOfComp2(other->getNumberOfComponents());
+    if(nbOfTuple==nbOfTuple2)
+      {
+        if(nbOfComp==nbOfComp2)
+          {
+            std::transform(this->begin(),this->end(),other->begin(),this->getPointer(),std::modulus<T>());
+          }
+        else if(nbOfComp2==1)
+          {
+            if(nbOfComp2==nbOfComp)
+              {
+                T *ptr=this->getPointer();
+                const T *ptrc=other->getConstPointer();
+                for(mcIdType i=0;i<nbOfTuple;i++)
+                  std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptr+i*nbOfComp,std::bind2nd(std::modulus<T>(),*ptrc++));
+              }
+            else
+              throw INTERP_KERNEL::Exception(msg);
+          }
+        else
+          throw INTERP_KERNEL::Exception(msg);
+      }
+    else if(nbOfTuple2==1)
+      {
+        T *ptr=this->getPointer();
+        const T *ptrc=other->getConstPointer();
+        for(mcIdType i=0;i<nbOfTuple;i++)
+          std::transform(ptr+i*nbOfComp,ptr+(i+1)*nbOfComp,ptrc,ptr+i*nbOfComp,std::modulus<T>());
+      }
+    else
+      throw INTERP_KERNEL::Exception(msg);
+    this->declareAsNew();
+  }
+
+  /*!
+   * Apply pow on values of another DataArrayInt to values of \a this one.
+   *
+   *  \param [in] other - an array to pow to \a this one.
+   *  \throw If \a other is NULL.
+   *  \throw If \a this->getNumberOfTuples() != \a other->getNumberOfTuples()
+   *  \throw If \a this->getNumberOfComponents() != 1 or \a other->getNumberOfComponents() != 1
+   *  \throw If there is a negative value in \a other.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::powEqual(const DataArrayType *other)
+  {
+    if(!other)
+      throw INTERP_KERNEL::Exception("DataArrayInt::powEqual : input instance is null !");
+    mcIdType nbOfTuple=this->getNumberOfTuples();
+    mcIdType nbOfTuple2=other->getNumberOfTuples();
+    std::size_t nbOfComp=this->getNumberOfComponents();
+    std::size_t nbOfComp2=other->getNumberOfComponents();
+    if(nbOfTuple!=nbOfTuple2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::powEqual : number of tuples mismatches !");
+    if(nbOfComp!=1 || nbOfComp2!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::powEqual : number of components of both arrays must be equal to 1 !");
+    T *ptr=this->getPointer();
+    const T *ptrc=other->begin();
+    for(mcIdType i=0;i<nbOfTuple;i++,ptrc++,ptr++)
+      {
+        if(*ptrc>=0)
+          {
+            T tmp=1;
+            for(T j=0;j<*ptrc;j++)
+              tmp*=*ptr;
+            *ptr=tmp;
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::powEqual : on tuple #" << i << " of other value is < 0 (" << *ptrc << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    this->declareAsNew();
+  }
+
+  ////////////////////////////////////
+  /*!
+   * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
+   * Server side.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
+  {
+    tinyInfo.resize(2);
+    if(this->isAllocated())
+      {
+        tinyInfo[0]=this->getNumberOfTuples();
+        tinyInfo[1]=ToIdType(this->getNumberOfComponents());
+      }
+    else
+      {
+        tinyInfo[0]=-1;
+        tinyInfo[1]=-1;
+      }
+  }
+
+  /*!
+   * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
+   * Server side.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const
+  {
+    if(this->isAllocated())
+      {
+        std::size_t nbOfCompo(this->getNumberOfComponents());
+        tinyInfo.resize(nbOfCompo+1);
+        tinyInfo[0]=this->getName();
+        for(std::size_t i=0;i<nbOfCompo;i++)
+          tinyInfo[i+1]=this->getInfoOnComponent(i);
+      }
+    else
+      {
+        tinyInfo.resize(1);
+        tinyInfo[0]=this->getName();
+      }
+  }
+
+  /*!
+   * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
+   * This method returns if a feeding is needed.
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI)
+  {
+    mcIdType nbOfTuple=tinyInfoI[0];
+    mcIdType nbOfComp=tinyInfoI[1];
+    if(nbOfTuple!=-1 || nbOfComp!=-1)
+      {
+        this->alloc(nbOfTuple,nbOfComp);
+        return true;
+      }
+    return false;
+  }
+
+  /*!
+   * Useless method for end user. Only for MPI/Corba/File serialsation for multi arrays class.
+   * This method returns if a feeding is needed.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<std::string>& tinyInfoS)
+  {
+    this->setName(tinyInfoS[0]);
+    if(this->isAllocated())
+      {
+        mcIdType nbOfCompo=tinyInfoI[1];
+        for(mcIdType i=0;i<nbOfCompo;i++)
+          this->setInfoOnComponent(i,tinyInfoS[i+1]);
+      }
+  }
+
+  ////////////////////////////////////
+
+  /*!
+   * Returns a new DataArrayInt that is the result of pow of two given arrays. There are 3
+   * valid cases.
+   *
+   *  \param [in] a1 - an array to pow up.
+   *  \param [in] a2 - another array to sum up.
+   *  \return DataArrayInt * - the new instance of DataArrayInt.
+   *          The caller is to delete this result array using decrRef() as it is no more
+   *          needed.
+   *  \throw If either \a a1 or \a a2 is NULL.
+   *  \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples()
+   *  \throw If \a a1->getNumberOfComponents() != 1 or \a a2->getNumberOfComponents() != 1.
+   *  \throw If there is a negative value in \a a2.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::Pow(const DataArrayType *a1, const DataArrayType *a2)
+  {
+    if(!a1 || !a2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::Pow : at least one of input instances is null !");
+    mcIdType nbOfTuple=a1->getNumberOfTuples();
+    mcIdType nbOfTuple2=a2->getNumberOfTuples();
+    std::size_t nbOfComp=a1->getNumberOfComponents();
+    std::size_t nbOfComp2=a2->getNumberOfComponents();
+    if(nbOfTuple!=nbOfTuple2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::Pow : number of tuples mismatches !");
+    if(nbOfComp!=1 || nbOfComp2!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::Pow : number of components of both arrays must be equal to 1 !");
+    MCAuto<DataArrayType> ret=DataArrayType::New(); ret->alloc(nbOfTuple,1);
+    const T *ptr1(a1->begin()),*ptr2(a2->begin());
+    T *ptr=ret->getPointer();
+    for(mcIdType i=0;i<nbOfTuple;i++,ptr1++,ptr2++,ptr++)
+      {
+        if(*ptr2>=0)
+          {
+            T tmp=1;
+            for(T j=0;j<*ptr2;j++)
+              tmp*=*ptr1;
+            *ptr=tmp;
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::Pow : on tuple #" << i << " of a2 value is < 0 (" << *ptr2 << ") !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt that is a modulus of two given arrays. There are 3
+   * valid cases.
+   * 1.  The arrays have same number of tuples and components. Then each value of
+   *   the result array (_a_) is a division of the corresponding values of \a a1 and
+   *   \a a2, i.e.: _a_ [ i, j ] = _a1_ [ i, j ] % _a2_ [ i, j ].
+   * 2.  The arrays have same number of tuples and one array, say _a2_, has one
+   *   component. Then
+   *   _a_ [ i, j ] = _a1_ [ i, j ] % _a2_ [ i, 0 ].
+   * 3.  The arrays have same number of components and one array, say _a2_, has one
+   *   tuple. Then
+   *   _a_ [ i, j ] = _a1_ [ i, j ] % _a2_ [ 0, j ].
+   *
+   * Info on components is copied either from the first array (in the first case) or from
+   * the array with maximal number of elements (getNbOfElems()).
+   *  \warning No check of division by zero is performed!
+   *  \param [in] a1 - a dividend array.
+   *  \param [in] a2 - a divisor array.
+   *  \return DataArrayInt * - the new instance of DataArrayInt.
+   *          The caller is to delete this result array using decrRef() as it is no more
+   *          needed.
+   *  \throw If either \a a1 or \a a2 is NULL.
+   *  \throw If \a a1->getNumberOfTuples() != \a a2->getNumberOfTuples() and
+   *         \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents() and
+   *         none of them has number of tuples or components equal to 1.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::Modulus(const DataArrayType *a1, const DataArrayType *a2)
+  {
+    if(!a1 || !a2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::Modulus : input DataArrayInt instance is NULL !");
+    mcIdType nbOfTuple1(a1->getNumberOfTuples());
+    mcIdType nbOfTuple2(a2->getNumberOfTuples());
+    std::size_t nbOfComp1(a1->getNumberOfComponents());
+    std::size_t nbOfComp2(a2->getNumberOfComponents());
+    if(nbOfTuple2==nbOfTuple1)
+      {
+        if(nbOfComp1==nbOfComp2)
+          {
+            MCAuto<DataArrayType> ret=DataArrayType::New();
+            ret->alloc(nbOfTuple2,nbOfComp1);
+            std::transform(a1->begin(),a1->end(),a2->begin(),ret->getPointer(),std::modulus<T>());
+            ret->copyStringInfoFrom(*a1);
+            return ret.retn();
+          }
+        else if(nbOfComp2==1)
+          {
+            MCAuto<DataArrayType> ret=DataArrayType::New();
+            ret->alloc(nbOfTuple1,nbOfComp1);
+            const T *a2Ptr=a2->getConstPointer();
+            const T *a1Ptr=a1->getConstPointer();
+            T *res=ret->getPointer();
+            for(mcIdType i=0;i<nbOfTuple1;i++)
+              res=std::transform(a1Ptr+i*nbOfComp1,a1Ptr+(i+1)*nbOfComp1,res,std::bind2nd(std::modulus<T>(),a2Ptr[i]));
+            ret->copyStringInfoFrom(*a1);
+            return ret.retn();
+          }
+        else
+          {
+            a1->checkNbOfComps(nbOfComp2,"Nb of components mismatch for array Modulus !");
+            return 0;
+          }
+      }
+    else if(nbOfTuple2==1)
+      {
+        a1->checkNbOfComps(nbOfComp2,"Nb of components mismatch for array Modulus !");
+        MCAuto<DataArrayType> ret=DataArrayType::New();
+        ret->alloc(nbOfTuple1,nbOfComp1);
+        const T *a1ptr=a1->getConstPointer(),*a2ptr=a2->getConstPointer();
+        T *pt=ret->getPointer();
+        for(mcIdType i=0;i<nbOfTuple1;i++)
+          pt=std::transform(a1ptr+i*nbOfComp1,a1ptr+(i+1)*nbOfComp1,a2ptr,pt,std::modulus<T>());
+        ret->copyStringInfoFrom(*a1);
+        return ret.retn();
+      }
+    else
+      {
+        a1->checkNbOfTuples(nbOfTuple2,"Nb of tuples mismatch for array Modulus !");//will always throw an exception
+        return 0;
+      }
+  }
+
+  /*!
+   * This method tries to find the permutation to apply to the first input \a ids1 to obtain the same array (without considering strings information) the second
+   * input array \a ids2.
+   * \a ids1 and \a ids2 are expected to be both a list of ids (both with number of components equal to one) not sorted and with values that can be negative.
+   * This method will throw an exception is no such permutation array can be obtained. It is typically the case if there is some ids in \a ids1 not in \a ids2 or
+   * inversely.
+   * In case of success both assertion will be true (no throw) :
+   * \c ids1->renumber(ret)->isEqual(ids2) where \a ret is the return of this method.
+   * \c ret->transformWithIndArr(ids2)->isEqual(ids1)
+   *
+   * \b Example:
+   * - \a ids1 : [3,1,103,4,6,10,-7,205]
+   * - \a ids2 : [-7,1,205,10,6,3,103,4]
+   * - \a return is : [5,1,6,7,4,3,0,2] because ids2[5]==ids1[0], ids2[1]==ids1[1], ids2[6]==ids1[2]...
+   *
+   * \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   * \throw If either ids1 or ids2 is null not allocated or not with one components.
+   *
+   * \sa DataArrayInt::findIdForEach
+   */
+  template<class T>
+  DataArrayIdType *DataArrayDiscrete<T>::FindPermutationFromFirstToSecond(const DataArrayType *ids1, const DataArrayType *ids2)
+  {
+    if(!ids1 || !ids2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two input arrays must be not null !");
+    if(!ids1->isAllocated() || !ids2->isAllocated())
+      throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two input arrays must be allocated !");
+    if(ids1->getNumberOfComponents()!=1 || ids2->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two input arrays have exactly one component !");
+    if(ids1->getNumberOfTuples()!=ids2->getNumberOfTuples())
+      {
+        std::ostringstream oss; oss << "DataArrayInt::FindPermutationFromFirstToSecond : first array has " << ids1->getNumberOfTuples() << " tuples and the second one " << ids2->getNumberOfTuples() << " tuples ! No chance to find a permutation between the 2 arrays !";
+        throw INTERP_KERNEL::Exception(oss.str().c_str());
+      }
+    MCAuto<DataArrayType> c1(ids1->deepCopy());
+    MCAuto<DataArrayType> c2(ids2->deepCopy());
+    c1->sort(true); c2->sort(true);
+    if(!c1->isEqualWithoutConsideringStr(*c2))
+      throw INTERP_KERNEL::Exception("DataArrayInt::FindPermutationFromFirstToSecond : the two arrays are not lying on same ids ! Impossible to find a permutation between the 2 arrays !");
+    MCAuto<DataArrayIdType> p1=ids1->checkAndPreparePermutation();
+    MCAuto<DataArrayIdType> p2=ids2->checkAndPreparePermutation();
+    p2=p2->invertArrayO2N2N2O(p2->getNumberOfTuples());
+    p2=p2->selectByTupleIdSafe(p1->begin(),p1->end());
+    return p2.retn();
+  }
+
+  /*!
+   * Returns a C array which is a renumbering map in "Old to New" mode for the input array.
+   * This map, if applied to \a start array, would make it sorted. For example, if
+   * \a start array contents are [9,10,0,6,4,11,3,7] then the contents of the result array is
+   * [5,6,0,3,2,7,1,4].
+   *  \param [in] start - pointer to the first element of the array for which the
+   *         permutation map is computed.
+   *  \param [in] end - pointer specifying the end of the array \a start, so that
+   *         the last value of \a start is \a end[ -1 ].
+   *  \return mcIdType * - the result permutation array that the caller is to delete as it is no
+   *         more needed.
+   *  \throw If there are equal values in the input array.
+   */
+  template<class T>
+  mcIdType *DataArrayDiscrete<T>::CheckAndPreparePermutation(const T *start, const T *end)
+  {
+    std::size_t sz=std::distance(start,end);
+    mcIdType *ret=(mcIdType *)malloc(sz*sizeof(mcIdType));
+    T *work=new T[sz];
+    std::copy(start,end,work);
+    std::sort(work,work+sz);
+    if(std::unique(work,work+sz)!=work+sz)
+      {
+        delete [] work;
+        free(ret);
+        throw INTERP_KERNEL::Exception("Some elements are equals in the specified array !");
+      }
+    std::map<T,mcIdType> m;
+    for(T *workPt=work;workPt!=work+sz;workPt++)
+      m[*workPt]=ToIdType(std::distance(work,workPt));
+    mcIdType *iter2=ret;
+    for(const T *iter=start;iter!=end;iter++,iter2++)
+      *iter2=m[*iter];
+    delete [] work;
+    return ret;
+  }
+
+  /*!
+   * Returns a new DataArrayInt by concatenating two given arrays, so that (1) the number
+   * of tuples in the result array is <em> a1->getNumberOfTuples() + a2->getNumberOfTuples() -
+   * offsetA2</em> and (2)
+   * the number of component in the result array is same as that of each of given arrays.
+   * First \a offsetA2 tuples of \a a2 are skipped and thus are missing from the result array.
+   * Info on components is copied from the first of the given arrays. Number of components
+   * in the given arrays must be the same.
+   *  \param [in] a1 - an array to include in the result array.
+   *  \param [in] a2 - another array to include in the result array.
+   *  \param [in] offsetA2 - number of tuples of \a a2 to skip.
+   *  \return DataArrayInt * - the new instance of DataArrayInt.
+   *          The caller is to delete this result array using decrRef() as it is no more
+   *          needed.
+   *  \throw If either \a a1 or \a a2 is NULL.
+   *  \throw If \a a1->getNumberOfComponents() != \a a2->getNumberOfComponents().
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::Aggregate(const DataArrayType *a1, const DataArrayType *a2, T offsetA2)
+  {
+    if(!a1 || !a2)
+      throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : input DataArrayInt instance is NULL !");
+    std::size_t nbOfComp(a1->getNumberOfComponents());
+    if(nbOfComp!=a2->getNumberOfComponents())
+      throw INTERP_KERNEL::Exception("Nb of components mismatch for array Aggregation !");
+    mcIdType nbOfTuple1(a1->getNumberOfTuples()),nbOfTuple2(a2->getNumberOfTuples());
+    MCAuto<DataArrayType> ret(DataArrayType::New());
+    ret->alloc(nbOfTuple1+nbOfTuple2-offsetA2,nbOfComp);
+    T *pt=std::copy(a1->begin(),a1->end(),ret->getPointer());
+    std::copy(a2->getConstPointer()+offsetA2*nbOfComp,a2->getConstPointer()+nbOfTuple2*nbOfComp,pt);
+    ret->copyStringInfoFrom(*a1);
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt by concatenating all given arrays, so that (1) the number
+   * of tuples in the result array is a sum of the number of tuples of given arrays and (2)
+   * the number of component in the result array is same as that of each of given arrays.
+   * Info on components is copied from the first of the given arrays. Number of components
+   * in the given arrays must be  the same.
+   * If the number of non null of elements in \a arr is equal to one the returned object is a copy of it
+   * not the object itself.
+   *  \param [in] arr - a sequence of arrays to include in the result array.
+   *  \return DataArrayInt * - the new instance of DataArrayInt.
+   *          The caller is to delete this result array using decrRef() as it is no more
+   *          needed.
+   *  \throw If all arrays within \a arr are NULL.
+   *  \throw If getNumberOfComponents() of arrays within \a arr.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::Aggregate(const std::vector<const DataArrayType *>& arr)
+  {
+    std::vector<const DataArrayType *> a;
+    for(typename std::vector<const DataArrayType *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+      if(*it4)
+        a.push_back(*it4);
+    if(a.empty())
+      throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : input list must be NON EMPTY !");
+    typename std::vector<const DataArrayType *>::const_iterator it=a.begin();
+    std::size_t nbOfComp((*it)->getNumberOfComponents());
+    mcIdType nbt((*it++)->getNumberOfTuples());
+    for(;it!=a.end();it++)
+      {
+        if((*it)->getNumberOfComponents()!=nbOfComp)
+          throw INTERP_KERNEL::Exception("DataArrayInt::Aggregate : Nb of components mismatch for array aggregation !");
+        nbt+=(*it)->getNumberOfTuples();
+      }
+    MCAuto<DataArrayType> ret=DataArrayType::New();
+    ret->alloc(nbt,nbOfComp);
+    T *pt=ret->getPointer();
+    for(it=a.begin();it!=a.end();it++)
+      pt=std::copy((*it)->getConstPointer(),(*it)->getConstPointer()+(*it)->getNbOfElems(),pt);
+    ret->copyStringInfoFrom(*(a[0]));
+    return ret.retn();
+  }
+
+  /*!
+   * This method takes as input a list of DataArrayInt instances \a arrs that represent each a packed index arrays.
+   * A packed index array is an allocated array with one component, and at least one tuple. The first element
+   * of each array in \a arrs must be 0. Each array in \a arrs is expected to be increasingly monotonic.
+   * This method is useful for users that want to aggregate a pair of DataArrayInt representing an indexed data (typically nodal connectivity index in unstructured meshes.
+   *
+   * \return DataArrayInt * - a new object to be managed by the caller.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::AggregateIndexes(const std::vector<const DataArrayType *>& arrs)
+  {
+    mcIdType retSz=1;
+    for(typename std::vector<const DataArrayType *>::const_iterator it4=arrs.begin();it4!=arrs.end();it4++)
+      {
+        if(*it4)
+          {
+            (*it4)->checkAllocated();
+            if((*it4)->getNumberOfComponents()!=1)
+              {
+                std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a DataArrayInt instance with nb of compo != 1 at pos " << std::distance(arrs.begin(),it4) << " !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+            mcIdType nbTupl((*it4)->getNumberOfTuples());
+            if(nbTupl<1)
+              {
+                std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a DataArrayInt instance with nb of tuples < 1 at pos " << std::distance(arrs.begin(),it4) << " !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+            if((*it4)->front()!=0)
+              {
+                std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a DataArrayInt instance with front value != 0 at pos " << std::distance(arrs.begin(),it4) << " !";
+                throw INTERP_KERNEL::Exception(oss.str().c_str());
+              }
+            retSz+=nbTupl-1;
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::AggregateIndexes : presence of a null instance at pos " << std::distance(arrs.begin(),it4) << " !";
+            throw INTERP_KERNEL::Exception(oss.str().c_str());
+          }
+      }
+    if(arrs.empty())
+      throw INTERP_KERNEL::Exception("DataArrayInt::AggregateIndexes : input list must be NON EMPTY !");
+    MCAuto<DataArrayType> ret=DataArrayType::New();
+    ret->alloc(retSz,1);
+    T *pt=ret->getPointer(); *pt++=0;
+    for(typename std::vector<const DataArrayType *>::const_iterator it=arrs.begin();it!=arrs.end();it++)
+      pt=std::transform((*it)->begin()+1,(*it)->end(),pt,std::bind2nd(std::plus<T>(),pt[-1]));
+    ret->copyStringInfoFrom(*(arrs[0]));
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt which contains all elements of given one-dimensional
+   * arrays. The result array does not contain any duplicates and its values
+   * are sorted in ascending order.
+   *  \param [in] arr - sequence of DataArrayInt's to unite.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *         array using decrRef() as it is no more needed.
+   *  \throw If any \a arr[i] is not allocated.
+   *  \throw If \a arr[i]->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::BuildUnion(const std::vector<const DataArrayType *>& arr)
+  {
+    std::vector<const DataArrayType *> a;
+    for(typename std::vector<const DataArrayType *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+      if(*it4)
+        a.push_back(*it4);
+    for(typename std::vector<const DataArrayType *>::const_iterator it=a.begin();it!=a.end();it++)
+      {
+        (*it)->checkAllocated();
+        if((*it)->getNumberOfComponents()!=1)
+          throw INTERP_KERNEL::Exception("DataArrayInt::BuildUnion : only single component allowed !");
+      }
+    //
+    std::set<T> r;
+    for(typename std::vector<const DataArrayType *>::const_iterator it=a.begin();it!=a.end();it++)
+      {
+        const T *pt=(*it)->getConstPointer();
+        mcIdType nbOfTuples((*it)->getNumberOfTuples());
+        r.insert(pt,pt+nbOfTuples);
+      }
+    DataArrayType *ret=DataArrayType::New();
+    ret->alloc(r.size(),1);
+    std::copy(r.begin(),r.end(),ret->getPointer());
+    return ret;
+  }
+
+  /*!
+   * Returns a new DataArrayInt which contains elements present in each of given one-dimensional
+   * arrays. The result array does not contain any duplicates and its values
+   * are sorted in ascending order.
+   *  \param [in] arr - sequence of DataArrayInt's to intersect.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *         array using decrRef() as it is no more needed.
+   *  \throw If any \a arr[i] is not allocated.
+   *  \throw If \a arr[i]->getNumberOfComponents() != 1.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::BuildIntersection(const std::vector<const DataArrayType *>& arr)
+  {
+    std::vector<const DataArrayType *> a;
+    for(typename std::vector<const DataArrayType *>::const_iterator it4=arr.begin();it4!=arr.end();it4++)
+      if(*it4)
+        a.push_back(*it4);
+    for(typename std::vector<const DataArrayType *>::const_iterator it=a.begin();it!=a.end();it++)
+      {
+        (*it)->checkAllocated();
+        if((*it)->getNumberOfComponents()!=1)
+          throw INTERP_KERNEL::Exception("DataArrayInt::BuildIntersection : only single component allowed !");
+      }
+    //
+    std::set<T> r;
+    for(typename std::vector<const DataArrayType *>::const_iterator it=a.begin();it!=a.end();it++)
+      {
+        const T *pt=(*it)->getConstPointer();
+        mcIdType nbOfTuples((*it)->getNumberOfTuples());
+        std::set<T> s1(pt,pt+nbOfTuples);
+        if(it!=a.begin())
+          {
+            std::set<T> r2;
+            std::set_intersection(r.begin(),r.end(),s1.begin(),s1.end(),inserter(r2,r2.end()));
+            r=r2;
+          }
+        else
+          r=s1;
+      }
+    DataArrayType *ret(DataArrayType::New());
+    ret->alloc(r.size(),1);
+    std::copy(r.begin(),r.end(),ret->getPointer());
+    return ret;
+  }
+
+  /*!
+   * This method allows to put a vector of vector of integer into a more compact data structure (skyline).
+   * This method is not available into python because no available optimized data structure available to map std::vector< std::vector<mcIdType> >.
+   *
+   * \param [in] v the input data structure to be translate into skyline format.
+   * \param [out] data the first element of the skyline format. The user is expected to deal with newly allocated array.
+   * \param [out] dataIndex the second element of the skyline format.
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::PutIntoToSkylineFrmt(const std::vector< std::vector<T> >& v, DataArrayType *& data, DataArrayIdType *& dataIndex)
+  {
+    std::size_t sz(v.size());
+    MCAuto<DataArrayType> retDat(DataArrayType::New());
+    MCAuto<DataArrayIdType> retIdx(DataArrayIdType::New());
+    retIdx->alloc(sz+1,1);
+    mcIdType *ptid(retIdx->getPointer()); *ptid=0;
+    for(std::size_t i=0;i<sz;i++,ptid++)
+      ptid[1]=ptid[0]+ToIdType(v[i].size());
+    retDat->alloc(retIdx->back(),1);
+    T *pt=retDat->getPointer();
+    for(std::size_t i=0;i<sz;i++)
+      pt=std::copy(v[i].begin(),v[i].end(),pt);
+    data=retDat.retn(); dataIndex=retIdx.retn();
+  }
+
+  /*!
+   * This method works on a pair input (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn
+   * (\ref numbering-indirect).
+   * This method returns the result of the extraction ( specified by a set of ids in [\b idsOfSelectBg , \b idsOfSelectEnd ) ).
+   * The selection of extraction is done standardly in new2old format.
+   * This method returns indexed arrays (\ref numbering-indirect) using 2 arrays (arrOut,arrIndexOut).
+   *
+   * \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
+   * \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
+   * \param [in] arrIn arr origin array from which the extraction will be done.
+   * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
+   * \param [out] arrOut the resulting array
+   * \param [out] arrIndexOut the index array of the resulting array \b arrOut
+   * \sa DataArrayInt::ExtractFromIndexedArraysSlice
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::ExtractFromIndexedArrays(const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd,
+                                                      const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                      DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut)
+  {
+    if(!arrIn || !arrIndxIn)
+      throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : input pointer is NULL !");
+    arrIn->checkAllocated(); arrIndxIn->checkAllocated();
+    if(arrIn->getNumberOfComponents()!=1 || arrIndxIn->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : input arrays must have exactly one component !");
+    std::size_t sz=std::distance(idsOfSelectBg,idsOfSelectEnd);
+    const T *arrInPtr=arrIn->begin();
+    const mcIdType *arrIndxPtr=arrIndxIn->begin();
+    mcIdType nbOfGrps=arrIndxIn->getNumberOfTuples()-1;
+    if(nbOfGrps<0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : The format of \"arrIndxIn\" is invalid ! Its nb of tuples should be >=1 !");
+    mcIdType maxSizeOfArr(arrIn->getNumberOfTuples());
+    MCAuto<DataArrayType> arro=DataArrayType::New();
+    MCAuto<DataArrayIdType> arrIo=DataArrayIdType::New();
+    arrIo->alloc(sz+1,1);
+    const mcIdType *idsIt=idsOfSelectBg;
+    mcIdType *work=arrIo->getPointer();
+    *work++=0;
+    mcIdType lgth=0;
+    for(std::size_t i=0;i<sz;i++,work++,idsIt++)
+      {
+        if(*idsIt>=0 && *idsIt<nbOfGrps)
+          lgth+=arrIndxPtr[*idsIt+1]-arrIndxPtr[*idsIt];
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArrays : id located on pos #" << i << " value is " << *idsIt << " ! Must be in [0," << nbOfGrps << ") !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+        if(lgth>=work[-1])
+          *work=lgth;
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArrays : id located on pos #" << i << " value is " << *idsIt << " and at this pos arrIndxIn[" << *idsIt;
+            oss << "+1]-arrIndxIn[" << *idsIt << "] < 0 ! The input index array is bugged !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+    arro->alloc(lgth,1);
+    T *data=arro->getPointer();
+    idsIt=idsOfSelectBg;
+    for(std::size_t i=0;i<sz;i++,idsIt++)
+      {
+        if(arrIndxPtr[*idsIt]>=0 && arrIndxPtr[*idsIt+1]<=maxSizeOfArr)
+          data=std::copy(arrInPtr+arrIndxPtr[*idsIt],arrInPtr+arrIndxPtr[*idsIt+1],data);
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArrays : id located on pos #" << i << " value is " << *idsIt << " arrIndx[" << *idsIt << "] must be >= 0 and arrIndx[";
+            oss << *idsIt << "+1] <= " << maxSizeOfArr << " (the size of arrIn)!";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+    arrOut=arro.retn();
+    arrIndexOut=arrIo.retn();
+  }
+
+  /*!
+   * This method works on a pair input (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn
+   * (\ref numbering-indirect).
+   * This method returns the result of the extraction ( specified by a set of ids with a slice given by \a idsOfSelectStart, \a idsOfSelectStop and \a idsOfSelectStep ).
+   * The selection of extraction is done standardly in new2old format.
+   * This method returns indexed arrays (\ref numbering-indirect) using 2 arrays (arrOut,arrIndexOut).
+   *
+   * \param [in] idsOfSelectStart begin of set of ids of the input extraction (included)
+   * \param [in] idsOfSelectStop end of set of ids of the input extraction (excluded)
+   * \param [in] idsOfSelectStep
+   * \param [in] arrIn arr origin array from which the extraction will be done.
+   * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
+   * \param [out] arrOut the resulting array
+   * \param [out] arrIndexOut the index array of the resulting array \b arrOut
+   * \sa DataArrayInt::ExtractFromIndexedArrays
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::ExtractFromIndexedArraysSlice(mcIdType idsOfSelectStart, mcIdType idsOfSelectStop, mcIdType idsOfSelectStep,
+                                                           const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                           DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut)
+  {
+    if(!arrIn || !arrIndxIn)
+      throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArraysSlice : input pointer is NULL !");
+    arrIn->checkAllocated(); arrIndxIn->checkAllocated();
+    if(arrIn->getNumberOfComponents()!=1 || arrIndxIn->getNumberOfComponents()!=1)
+      throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArraysSlice : input arrays must have exactly one component !");
+    mcIdType sz=DataArray::GetNumberOfItemGivenBESRelative(idsOfSelectStart,idsOfSelectStop,idsOfSelectStep,"MEDCouplingUMesh::ExtractFromIndexedArraysSlice : Input slice ");
+    const T *arrInPtr=arrIn->begin();
+    const mcIdType *arrIndxPtr=arrIndxIn->begin();
+    mcIdType nbOfGrps=arrIndxIn->getNumberOfTuples()-1;
+    if(nbOfGrps<0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArraysSlice : The format of \"arrIndxIn\" is invalid ! Its nb of tuples should be >=1 !");
+    mcIdType maxSizeOfArr(arrIn->getNumberOfTuples());
+    MCAuto<DataArrayType> arro=DataArrayType::New();
+    MCAuto<DataArrayIdType> arrIo=DataArrayIdType::New();
+    arrIo->alloc(sz+1,1);
+    mcIdType idsIt=idsOfSelectStart;
+    mcIdType *work=arrIo->getPointer();
+    *work++=0;
+    mcIdType lgth=0;
+    for(mcIdType i=0;i<sz;i++,work++,idsIt+=idsOfSelectStep)
+      {
+        if(idsIt>=0 && idsIt<nbOfGrps)
+          lgth+=arrIndxPtr[idsIt+1]-arrIndxPtr[idsIt];
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArraysSlice : id located on pos #" << i << " value is " << idsIt << " ! Must be in [0," << nbOfGrps << ") !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+        if(lgth>=work[-1])
+          *work=lgth;
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArraysSlice : id located on pos #" << i << " value is " << idsIt << " and at this pos arrIndxIn[" << idsIt;
+            oss << "+1]-arrIndxIn[" << idsIt << "] < 0 ! The input index array is bugged !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+    arro->alloc(lgth,1);
+    T *data=arro->getPointer();
+    idsIt=idsOfSelectStart;
+    for(mcIdType i=0;i<sz;i++,idsIt+=idsOfSelectStep)
+      {
+        if(arrIndxPtr[idsIt]>=0 && arrIndxPtr[idsIt+1]<=maxSizeOfArr)
+          data=std::copy(arrInPtr+arrIndxPtr[idsIt],arrInPtr+arrIndxPtr[idsIt+1],data);
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::ExtractFromIndexedArraysSlice : id located on pos #" << i << " value is " << idsIt << " arrIndx[" << idsIt << "] must be >= 0 and arrIndx[";
+            oss << idsIt << "+1] <= " << maxSizeOfArr << " (the size of arrIn)!";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+    arrOut=arro.retn();
+    arrIndexOut=arrIo.retn();
+  }
+
+  /*!
+   * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
+   * This method builds an output pair (\b arrOut,\b arrIndexOut) that is a copy from \b arrIn for all cell ids \b not \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) and for
+   * cellIds \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) a copy coming from the corresponding values in input pair (\b srcArr, \b srcArrIndex).
+   * This method is an generalization of MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
+   *
+   * \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
+   * \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
+   * \param [in] arrIn arr origin array from which the extraction will be done.
+   * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
+   * \param [in] srcArr input array that will be used as source of copy for ids in [ \b idsOfSelectBg, \b idsOfSelectEnd )
+   * \param [in] srcArrIndex index array of \b srcArr
+   * \param [out] arrOut the resulting array
+   * \param [out] arrIndexOut the index array of the resulting array \b arrOut
+   *
+   * \sa DataArrayInt::SetPartOfIndexedArraysSameIdx
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::SetPartOfIndexedArrays(const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd,
+                                                    const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                    const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex,
+                                                    DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut)
+  {
+    if(arrIn==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArrays : presence of null pointer in input parameter !");
+    MCAuto<DataArrayType> arro=DataArrayType::New();
+    MCAuto<DataArrayIdType> arrIo=DataArrayIdType::New();
+    mcIdType nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
+    std::vector<bool> v(nbOfTuples,true);
+    mcIdType offset=0;
+    const mcIdType *arrIndxInPtr=arrIndxIn->begin();
+    const mcIdType *srcArrIndexPtr=srcArrIndex->begin();
+    for(const mcIdType *it=idsOfSelectBg;it!=idsOfSelectEnd;it++,srcArrIndexPtr++)
+      {
+        if(*it>=0 && *it<nbOfTuples)
+          {
+            v[*it]=false;
+            offset+=(srcArrIndexPtr[1]-srcArrIndexPtr[0])-(arrIndxInPtr[*it+1]-arrIndxInPtr[*it]);
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArrays : On pos #" << std::distance(idsOfSelectBg,it) << " value is " << *it << " not in [0," << nbOfTuples << ") !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+    srcArrIndexPtr=srcArrIndex->begin();
+    arrIo->alloc(nbOfTuples+1,1);
+    arro->alloc(arrIn->getNumberOfTuples()+offset,1);
+    const T *arrInPtr=arrIn->begin();
+    const T *srcArrPtr=srcArr->begin();
+    mcIdType *arrIoPtr=arrIo->getPointer(); *arrIoPtr++=0;
+    T *arroPtr=arro->getPointer();
+    for(mcIdType ii=0;ii<nbOfTuples;ii++,arrIoPtr++)
+      {
+        if(v[ii])
+          {
+            arroPtr=std::copy(arrInPtr+arrIndxInPtr[ii],arrInPtr+arrIndxInPtr[ii+1],arroPtr);
+            *arrIoPtr=arrIoPtr[-1]+(arrIndxInPtr[ii+1]-arrIndxInPtr[ii]);
+          }
+        else
+          {
+            std::size_t pos=std::distance(idsOfSelectBg,std::find(idsOfSelectBg,idsOfSelectEnd,ii));
+            arroPtr=std::copy(srcArrPtr+srcArrIndexPtr[pos],srcArrPtr+srcArrIndexPtr[pos+1],arroPtr);
+            *arrIoPtr=arrIoPtr[-1]+(srcArrIndexPtr[pos+1]-srcArrIndexPtr[pos]);
+          }
+      }
+    arrOut=arro.retn();
+    arrIndexOut=arrIo.retn();
+  }
+
+  /*!
+   * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
+   * This method builds an output pair (\b arrOut,\b arrIndexOut) that is a copy from \b arrIn for all cell ids \b not \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) and for
+   * cellIds \b in [\b idsOfSelectBg, \b idsOfSelectEnd) a copy coming from the corresponding values in input pair (\b srcArr, \b srcArrIndex).
+   * This method is an generalization of DataArrayInt::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
+   *
+   * \param [in] start begin of set of ids of the input extraction (included)
+   * \param [in] end end of set of ids of the input extraction (excluded)
+   * \param [in] step step of the set of ids in range mode.
+   * \param [in] arrIn arr origin array from which the extraction will be done.
+   * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
+   * \param [in] srcArr input array that will be used as source of copy for ids in [\b idsOfSelectBg, \b idsOfSelectEnd)
+   * \param [in] srcArrIndex index array of \b srcArr
+   * \param [out] arrOut the resulting array
+   * \param [out] arrIndexOut the index array of the resulting array \b arrOut
+   *
+   * \sa DataArrayInt::SetPartOfIndexedArraysSameIdx DataArrayInt::SetPartOfIndexedArrays
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::SetPartOfIndexedArraysSlice(mcIdType start, mcIdType end, mcIdType step,
+                                                         const DataArrayType *arrIn, const DataArrayIdType *arrIndxIn,
+                                                         const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex,
+                                                         DataArrayType* &arrOut, DataArrayIdType* &arrIndexOut)
+  {
+    if(arrIn==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSlice : presence of null pointer in input parameter !");
+    MCAuto<DataArrayType> arro=DataArrayType::New();
+    MCAuto<DataArrayIdType> arrIo=DataArrayIdType::New();
+    mcIdType nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
+    mcIdType offset=0;
+    const mcIdType *arrIndxInPtr=arrIndxIn->begin();
+    const mcIdType *srcArrIndexPtr=srcArrIndex->begin();
+    mcIdType nbOfElemsToSet=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"DataArrayInt::SetPartOfIndexedArraysSlice : ");
+    mcIdType it=start;
+    for(mcIdType i=0;i<nbOfElemsToSet;i++,srcArrIndexPtr++,it+=step)
+      {
+        if(it>=0 && it<nbOfTuples)
+          offset+=(srcArrIndexPtr[1]-srcArrIndexPtr[0])-(arrIndxInPtr[it+1]-arrIndxInPtr[it]);
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSlice : On pos #" << i << " value is " << it << " not in [0," << nbOfTuples << ") !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+    srcArrIndexPtr=srcArrIndex->begin();
+    arrIo->alloc(nbOfTuples+1,1);
+    arro->alloc(arrIn->getNumberOfTuples()+offset,1);
+    const T *arrInPtr=arrIn->begin();
+    const T *srcArrPtr=srcArr->begin();
+    mcIdType *arrIoPtr=arrIo->getPointer(); *arrIoPtr++=0;
+    T *arroPtr=arro->getPointer();
+    for(mcIdType ii=0;ii<nbOfTuples;ii++,arrIoPtr++)
+      {
+        mcIdType pos=DataArray::GetPosOfItemGivenBESRelativeNoThrow(ii,start,end,step);
+        if(pos<0)
+          {
+            arroPtr=std::copy(arrInPtr+arrIndxInPtr[ii],arrInPtr+arrIndxInPtr[ii+1],arroPtr);
+            *arrIoPtr=arrIoPtr[-1]+(arrIndxInPtr[ii+1]-arrIndxInPtr[ii]);
+          }
+        else
+          {
+            arroPtr=std::copy(srcArrPtr+srcArrIndexPtr[pos],srcArrPtr+srcArrIndexPtr[pos+1],arroPtr);
+            *arrIoPtr=arrIoPtr[-1]+(srcArrIndexPtr[pos+1]-srcArrIndexPtr[pos]);
+          }
+      }
+    arrOut=arro.retn();
+    arrIndexOut=arrIo.retn();
+  }
+
+  /*!
+   * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
+   * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in \b arrIndxIn.
+   *
+   * \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
+   * \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
+   * \param [in,out] arrInOut arr origin array from which the extraction will be done.
+   * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
+   * \param [in] srcArr input array that will be used as source of copy for ids in [ \b idsOfSelectBg , \b idsOfSelectEnd )
+   * \param [in] srcArrIndex index array of \b srcArr
+   *
+   * \sa DataArrayInt::SetPartOfIndexedArrays
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::SetPartOfIndexedArraysSameIdx(const mcIdType *idsOfSelectBg, const mcIdType *idsOfSelectEnd,
+                                                           DataArrayType *arrInOut, const DataArrayIdType *arrIndxIn,
+                                                           const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex)
+  {
+    if(arrInOut==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSameIdx : presence of null pointer in input parameter !");
+    mcIdType nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
+    const mcIdType *arrIndxInPtr=arrIndxIn->begin();
+    const mcIdType *srcArrIndexPtr=srcArrIndex->begin();
+    T *arrInOutPtr=arrInOut->getPointer();
+    const T *srcArrPtr=srcArr->begin();
+    for(const mcIdType *it=idsOfSelectBg;it!=idsOfSelectEnd;it++,srcArrIndexPtr++)
+      {
+        if(*it>=0 && *it<nbOfTuples)
+          {
+            if(srcArrIndexPtr[1]-srcArrIndexPtr[0]==arrIndxInPtr[*it+1]-arrIndxInPtr[*it])
+              std::copy(srcArrPtr+srcArrIndexPtr[0],srcArrPtr+srcArrIndexPtr[1],arrInOutPtr+arrIndxInPtr[*it]);
+            else
+              {
+                std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdx : On pos #" << std::distance(idsOfSelectBg,it) << " id (idsOfSelectBg[" << std::distance(idsOfSelectBg,it)<< "]) is " << *it << " arrIndxIn[id+1]-arrIndxIn[id]!=srcArrIndex[pos+1]-srcArrIndex[pos] !";
+                throw INTERP_KERNEL::Exception(oss.str());
+              }
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdx : On pos #" << std::distance(idsOfSelectBg,it) << " value is " << *it << " not in [0," << nbOfTuples << ") !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+  }
+
+  /*!
+   * This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
+   * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in \b arrIndxIn.
+   *
+   * \param [in] start begin of set of ids of the input extraction (included)
+   * \param [in] end end of set of ids of the input extraction (excluded)
+   * \param [in] step step of the set of ids in range mode.
+   * \param [in,out] arrInOut arr origin array from which the extraction will be done.
+   * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn
+   * \param [in] srcArr input array that will be used as source of copy for ids in [\b idsOfSelectBg, \b idsOfSelectEnd)
+   * \param [in] srcArrIndex index array of \b srcArr
+   *
+   * \sa DataArrayInt::SetPartOfIndexedArraysSlice DataArrayInt::SetPartOfIndexedArraysSameIdx
+   */
+  template <class T>
+  void DataArrayDiscrete<T>::SetPartOfIndexedArraysSameIdxSlice(mcIdType start, mcIdType end, mcIdType step,
+                                                                DataArrayType *arrInOut, const DataArrayIdType *arrIndxIn,
+                                                                const DataArrayType *srcArr, const DataArrayIdType *srcArrIndex)
+  {
+    if(arrInOut==0 || arrIndxIn==0 || srcArr==0 || srcArrIndex==0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : presence of null pointer in input parameter !");
+    mcIdType nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
+    const mcIdType *arrIndxInPtr=arrIndxIn->begin();
+    const mcIdType *srcArrIndexPtr=srcArrIndex->begin();
+    T *arrInOutPtr=arrInOut->getPointer();
+    const T *srcArrPtr=srcArr->begin();
+    mcIdType nbOfElemsToSet=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : ");
+    mcIdType it=start;
+    for(mcIdType i=0;i<nbOfElemsToSet;i++,srcArrIndexPtr++,it+=step)
+      {
+        if(it>=0 && it<nbOfTuples)
+          {
+            if(srcArrIndexPtr[1]-srcArrIndexPtr[0]==arrIndxInPtr[it+1]-arrIndxInPtr[it])
+              std::copy(srcArrPtr+srcArrIndexPtr[0],srcArrPtr+srcArrIndexPtr[1],arrInOutPtr+arrIndxInPtr[it]);
+            else
+              {
+                std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : On pos #" << i << " id (idsOfSelectBg[" << i << "]) is " << it << " arrIndxIn[id+1]-arrIndxIn[id]!=srcArrIndex[pos+1]-srcArrIndex[pos] !";
+                throw INTERP_KERNEL::Exception(oss.str());
+              }
+          }
+        else
+          {
+            std::ostringstream oss; oss << "DataArrayInt::SetPartOfIndexedArraysSameIdxSlice : On pos #" << i << " value is " << it << " not in [0," << nbOfTuples << ") !";
+            throw INTERP_KERNEL::Exception(oss.str());
+          }
+      }
+  }
+
+  /*!
+   * This method works on an input pair (\b arr, \b arrIndx) where \b arr indexes is in \b arrIndx.
+   * This method will not impact the size of inout parameter \b arrIndx but the size of \b arr will be modified in case of suppression.
+   *
+   * \param [in] idsToRemoveBg begin of set of ids to remove in \b arr (included)
+   * \param [in] idsToRemoveEnd end of set of ids to remove in \b arr (excluded)
+   * \param [in,out] arr array in which the remove operation will be done.
+   * \param [in,out] arrIndx array in the remove operation will modify
+   * \param [in] offsetForRemoval (by default 0) offset so that for each i in [0,arrIndx->getNumberOfTuples()-1) removal process will be performed in the following range [arr+arrIndx[i]+offsetForRemoval,arr+arr[i+1])
+   * \return true if \b arr and \b arrIndx have been modified, false if not.
+   */
+  template <class T>
+  bool DataArrayDiscrete<T>::RemoveIdsFromIndexedArrays(const T *idsToRemoveBg, const T *idsToRemoveEnd,
+                                                        DataArrayType *arr, DataArrayIdType *arrIndx, mcIdType offsetForRemoval)
+  {
+    if(!arrIndx || !arr)
+      throw INTERP_KERNEL::Exception("DataArrayInt::RemoveIdsFromIndexedArrays : some input arrays are empty !");
+    if(offsetForRemoval<0)
+      throw INTERP_KERNEL::Exception("DataArrayInt::RemoveIdsFromIndexedArrays : offsetForRemoval should be >=0 !");
+    std::set<T> s(idsToRemoveBg,idsToRemoveEnd);
+    mcIdType nbOfGrps=arrIndx->getNumberOfTuples()-1;
+    mcIdType *arrIPtr=arrIndx->getPointer();
+    *arrIPtr++=0;
+    mcIdType previousArrI=0;
+    const T *arrPtr=arr->begin();
+    std::vector<T> arrOut;//no utility to switch to DataArrayInt because copy always needed
+    for(mcIdType i=0;i<nbOfGrps;i++,arrIPtr++)
+      {
+        if(*arrIPtr-previousArrI>offsetForRemoval)
+          {
+            for(const T *work=arrPtr+previousArrI+offsetForRemoval;work!=arrPtr+*arrIPtr;work++)
+              {
+                if(s.find(*work)==s.end())
+                  arrOut.push_back(*work);
+              }
+          }
+        previousArrI=*arrIPtr;
+        *arrIPtr=ToIdType(arrOut.size());
+      }
+    if(arr->getNumberOfTuples()==ToIdType(arrOut.size()))
+      return false;
+    arr->alloc(arrOut.size(),1);
+    std::copy(arrOut.begin(),arrOut.end(),arr->getPointer());
+    return true;
+  }
+
+  /*!
+   * Returns a new DataArrayInt containing an arithmetic progression
+   * that is equal to the sequence returned by Python \c range(\a begin,\a  end,\a  step )
+   * function.
+   *  \param [in] begin - the start value of the result sequence.
+   *  \param [in] end - limiting value, so that every value of the result array is less than
+   *              \a end.
+   *  \param [in] step - specifies the increment or decrement.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If \a step == 0.
+   *  \throw If \a end < \a begin && \a step > 0.
+   *  \throw If \a end > \a begin && \a step < 0.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::Range(T begin, T end, T step)
+  {
+    mcIdType nbOfTuples=DataArrayTools<T>::GetNumberOfItemGivenBESRelative(begin,end,step,"DataArrayInt::Range");
+    MCAuto<DataArrayType> ret=DataArrayType::New();
+    ret->alloc(nbOfTuples,1);
+    T *ptr=ret->getPointer();
+    if(step>0)
+      {
+        for(T i=begin;i<end;i+=step,ptr++)
+          *ptr=i;
+      }
+    else
+      {
+        for(T i=begin;i>end;i+=step,ptr++)
+          *ptr=i;
+      }
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt containing a renumbering map in "Old to New" mode computed
+   * from a zip representation of a surjective format (returned e.g. by
+   * \ref MEDCoupling::DataArrayDouble::findCommonTuples() "DataArrayDouble::findCommonTuples()"
+   * for example). The result array minimizes the permutation. <br>
+   * For more info on renumbering see \ref numbering. <br>
+   * \b Example: <br>
+   * - \a nbOfOldTuples: 10
+   * - \a arr          : [0,3, 5,7,9]
+   * - \a arrIBg       : [0,2,5]
+   * - \a newNbOfTuples: 7
+   * - result array    : [0,1,2,0,3,4,5,4,6,4]
+   *
+   *  \param [in] nbOfOldTuples - number of tuples in the initial array \a arr.
+   *  \param [in] arr - the array of tuple indices grouped by \a arrIBg array.
+   *  \param [in] arrIBg - the array dividing all indices stored in \a arr into groups of
+   *         (indices of) equal values. Its every element (except the last one) points to
+   *         the first element of a group of equal values.
+   *  \param [in] arrIEnd - specifies the end of \a arrIBg, so that the last element of \a
+   *          arrIBg is \a arrIEnd[ -1 ].
+   *  \param [out] newNbOfTuples - number of tuples after surjection application.
+   *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete this
+   *          array using decrRef() as it is no more needed.
+   *  \throw If any value of \a arr breaks condition ( 0 <= \a arr[ i ] < \a nbOfOldTuples ).
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::ConvertIndexArrayToO2N(mcIdType nbOfOldTuples, const mcIdType *arr, const mcIdType *arrIBg, const mcIdType *arrIEnd, mcIdType &newNbOfTuples)
+  {
+    MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+    ret->alloc(nbOfOldTuples,1);
+    mcIdType *pt=ret->getPointer();
+    std::fill(pt,pt+nbOfOldTuples,-1);
+    mcIdType nbOfGrps=ToIdType(std::distance(arrIBg,arrIEnd))-1;
+    const mcIdType *cIPtr=arrIBg;
+    for(mcIdType i=0;i<nbOfGrps;i++)
+      pt[arr[cIPtr[i]]]=-(i+2);
+    mcIdType newNb=0;
+    for(mcIdType iNode=0;iNode<nbOfOldTuples;iNode++)
+      {
+        if(pt[iNode]<0)
+          {
+            if(pt[iNode]==-1)
+              pt[iNode]=newNb++;
+            else
+              {
+                mcIdType grpId=-(pt[iNode]+2);
+                for(mcIdType j=cIPtr[grpId];j<cIPtr[grpId+1];j++)
+                  {
+                    if(arr[j]>=0 && arr[j]<nbOfOldTuples)
+                      pt[arr[j]]=newNb;
+                    else
+                      {
+                        std::ostringstream oss; oss << "DataArrayInt::ConvertIndexArrayToO2N : With element #" << j << " value is " << arr[j] << " should be in [0," << nbOfOldTuples << ") !";
+                        throw INTERP_KERNEL::Exception(oss.str().c_str());
+                      }
+                  }
+                newNb++;
+              }
+          }
+      }
+    newNbOfTuples=newNb;
+    return ret.retn();
+  }
+
+  /*!
+   * Returns a new DataArrayInt which is a minimal partition of elements of \a groups.
+   * The i-th item of the result array is an ID of a set of elements belonging to a
+   * unique set of groups, which the i-th element is a part of. This set of elements
+   * belonging to a unique set of groups is called \a family, so the result array contains
+   * IDs of families each element belongs to.
+   *
+   * \b Example: if we have two groups of elements: \a group1 [0,4] and \a group2 [ 0,1,2 ],
+   * then there are 3 families:
+   * - \a family1 (with ID 1) contains element [0] belonging to ( \a group1 + \a group2 ),
+   * - \a family2 (with ID 2) contains elements [4] belonging to ( \a group1 ),
+   * - \a family3 (with ID 3) contains element [1,2] belonging to ( \a group2 ), <br>
+   * and the result array contains IDs of families [ 1,3,3,0,2 ]. <br> Note a family ID 0 which
+   * stands for the element #3 which is in none of groups.
+   *
+   *  \param [in] groups - sequence of groups of element IDs.
+   *  \param [in] newNb - total number of elements; it must be more than max ID of element
+   *         in \a groups.
+   *  \param [out] fidsOfGroups - IDs of families the elements of each group belong to.
+   *  \return DataArrayInt * - a new instance of DataArrayInt containing IDs of families
+   *         each element with ID from range [0, \a newNb ) belongs to. The caller is to
+   *         delete this array using decrRef() as it is no more needed.
+   *  \throw If any element ID in \a groups violates condition ( 0 <= ID < \a newNb ).
+   */
+  template <class T>
+  DataArrayIdType *DataArrayDiscrete<T>::MakePartition(const std::vector<const DataArrayType *>& groups, mcIdType newNb, std::vector< std::vector<mcIdType> >& fidsOfGroups)
+  {
+    std::vector<const DataArrayType *> groups2;
+    for(typename std::vector<const DataArrayType *>::const_iterator it4=groups.begin();it4!=groups.end();it4++)
+      if(*it4)
+        groups2.push_back(*it4);
+    MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+    ret->alloc(newNb,1);
+    mcIdType *retPtr=ret->getPointer();
+    std::fill(retPtr,retPtr+newNb,0);
+    mcIdType fid=1;
+    for(typename std::vector<const DataArrayType *>::const_iterator iter=groups2.begin();iter!=groups2.end();iter++)
+      {
+        const T *ptr=(*iter)->getConstPointer();
+        std::size_t nbOfElem=(*iter)->getNbOfElems();
+        mcIdType sfid=fid;
+        for(mcIdType j=0;j<sfid;j++)
+          {
+            bool found=false;
+            for(std::size_t i=0;i<nbOfElem;i++)
+              {
+                if(ptr[i]>=0 && ptr[i]<newNb)
+                  {
+                    if(retPtr[ptr[i]]==j)
+                      {
+                        retPtr[ptr[i]]=fid;
+                        found=true;
+                      }
+                  }
+                else
+                  {
+                    std::ostringstream oss; oss << "DataArrayInt::MakePartition : In group \"" << (*iter)->getName() << "\" in tuple #" << i << " value = " << ptr[i] << " ! Should be in [0," << newNb;
+                    oss << ") !";
+                    throw INTERP_KERNEL::Exception(oss.str().c_str());
+                  }
+              }
+            if(found)
+              fid++;
+          }
+      }
+    fidsOfGroups.clear();
+    fidsOfGroups.resize(groups2.size());
+    mcIdType grId=0;
+    for(typename std::vector<const DataArrayType *>::const_iterator iter=groups2.begin();iter!=groups2.end();iter++,grId++)
+      {
+        std::set<mcIdType> tmp;
+        const T *ptr=(*iter)->getConstPointer();
+        std::size_t nbOfElem=(*iter)->getNbOfElems();
+        for(const T *p=ptr;p!=ptr+nbOfElem;p++)
+          tmp.insert(retPtr[*p]);
+        fidsOfGroups[grId].insert(fidsOfGroups[grId].end(),tmp.begin(),tmp.end());
+      }
+    return ret.retn();
+  }
+
+}
+
+/// @cond INTERNAL
+namespace MEDCouplingImpl
+{
+  template <class T>
+  class OpSwitchedOn
+  {
+  public:
+    OpSwitchedOn(T *pt):_pt(pt),_cnt(0) { }
+    void operator()(const bool& b) { if(b) *_pt++=FromIdType<T>(_cnt); _cnt++; }
+  private:
+    T *_pt;
+    MEDCoupling::mcIdType _cnt;
+  };
+
+  template <class T>
+  class OpSwitchedOff
+  {
+  public:
+    OpSwitchedOff(T *pt):_pt(pt),_cnt(0) { }
+    void operator()(const bool& b) { if(!b) *_pt++=FromIdType<T>(_cnt); _cnt++; }
+  private:
+    T *_pt;
+    MEDCoupling::mcIdType _cnt;
+  };
+}
+/// @endcond
+
+namespace MEDCoupling
+{
+  /*!
+   * This method returns the list of ids in ascending mode so that v[id]==true.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::BuildListOfSwitchedOn(const std::vector<bool>& v)
+  {
+    std::size_t sz(std::count(v.begin(),v.end(),true));
+    MCAuto<DataArrayType> ret(DataArrayType::New()); ret->alloc(sz,1);
+    std::for_each(v.begin(),v.end(),MEDCouplingImpl::OpSwitchedOn<T>(ret->getPointer()));
+    return ret.retn();
+  }
+
+  /*!
+   * This method returns the list of ids in ascending mode so that v[id]==false.
+   */
+  template <class T>
+  typename Traits<T>::ArrayType *DataArrayDiscrete<T>::BuildListOfSwitchedOff(const std::vector<bool>& v)
+  {
+    std::size_t sz(std::count(v.begin(),v.end(),false));
+    MCAuto<DataArrayType> ret(DataArrayType::New()); ret->alloc(sz,1);
+    std::for_each(v.begin(),v.end(),MEDCouplingImpl::OpSwitchedOff<T>(ret->getPointer()));
+    return ret.retn();
+  }
+}
+
+namespace MEDCoupling
+{
   /*!
    * This method compares content of input vector \a v and \a this.
    * If for each id in \a this v[id]==True and for all other ids id2 not in \a this v[id2]==False, true is returned.
@@ -4002,7 +7620,7 @@ struct NotInRange
       throw INTERP_KERNEL::Exception("DataArrayInt::isFittingWith : number of components of this should be equal to one !");
     const T *w(this->begin()),*end2(this->end());
     T refVal=-std::numeric_limits<T>::max();
-    int i=0;
+    T i=0;
     std::vector<bool>::const_iterator it(v.begin());
     for(;it!=v.end();it++,i++)
       {
old mode 100644 (file)
new mode 100755 (executable)
index 36349e2..965794b
@@ -35,23 +35,23 @@ template class MEDCoupling::DataArrayTemplate<char>;
 
 /*!
  * Returns an integer value characterizing \a this array, which is useful for a quick
- * comparison of many instances of DataArrayInt.
- *  \return int - the hash value.
+ * comparison of many instances of DataArrayChar.
+ *  \return mcIdType - the hash value.
  *  \throw If \a this is not allocated.
  */
-int DataArrayChar::getHashCode() const
+mcIdType DataArrayChar::getHashCode() const
 {
   checkAllocated();
   std::size_t nbOfElems=getNbOfElems();
-  int ret=nbOfElems*65536;
-  int delta=3;
+  std::size_t ret=nbOfElems*65536;
+  std::size_t delta=3;
   if(nbOfElems>48)
     delta=nbOfElems/8;
-  int ret0=0;
+  mcIdType ret0=0;
   const char *pt=begin();
   for(std::size_t i=0;i<nbOfElems;i+=delta)
     ret0+=pt[i];
-  return ret+ret0;
+  return ToIdType(ret)+ret0;
 }
 
 /*!
@@ -113,9 +113,9 @@ std::string DataArrayChar::reprZip() const
 }
 
 /*!
- * Creates a new DataArrayInt and assigns all (textual and numerical) data of \a this
+ * Creates a new DataArrayIdType and assigns all (textual and numerical) data of \a this
  * array to the new one.
- *  \return DataArrayInt * - the new instance of DataArrayChar.
+ *  \return DataArrayIdType * - the new instance of DataArrayChar.
  */
 DataArrayInt *DataArrayChar::convertToIntArr() const
 {
@@ -142,7 +142,7 @@ bool DataArrayChar::isUniform(char val) const
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayChar::isUniform : must be applied on DataArrayChar with only one component, you can call 'rearrange' method before !");
-  int nbOfTuples=getNumberOfTuples();
+  mcIdType nbOfTuples=getNumberOfTuples();
   const char *w=getConstPointer();
   const char *end2=w+nbOfTuples;
   for(;w!=end2;w++)
@@ -171,52 +171,52 @@ void DataArrayChar::meldWith(const DataArrayChar *other)
     throw INTERP_KERNEL::Exception("DataArrayChar::meldWith : DataArrayChar pointer in input is NULL !");
   checkAllocated();
   other->checkAllocated();
-  int nbOfTuples=getNumberOfTuples();
+  mcIdType nbOfTuples=getNumberOfTuples();
   if(nbOfTuples!=other->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("DataArrayChar::meldWith : mismatch of number of tuples !");
-  int nbOfComp1=getNumberOfComponents();
-  int nbOfComp2=other->getNumberOfComponents();
+  std::size_t nbOfComp1=getNumberOfComponents();
+  std::size_t nbOfComp2=other->getNumberOfComponents();
   char *newArr=(char *)malloc(nbOfTuples*(nbOfComp1+nbOfComp2)*sizeof(char));
   char *w=newArr;
   const char *inp1=getConstPointer();
   const char *inp2=other->getConstPointer();
-  for(int i=0;i<nbOfTuples;i++,inp1+=nbOfComp1,inp2+=nbOfComp2)
+  for(mcIdType i=0;i<nbOfTuples;i++,inp1+=nbOfComp1,inp2+=nbOfComp2)
     {
       w=std::copy(inp1,inp1+nbOfComp1,w);
       w=std::copy(inp2,inp2+nbOfComp2,w);
     }
   useArray(newArr,true,DeallocType::C_DEALLOC,nbOfTuples,nbOfComp1+nbOfComp2);
-  std::vector<int> compIds(nbOfComp2);
-  for(int i=0;i<nbOfComp2;i++)
+  std::vector<std::size_t> compIds(nbOfComp2);
+  for(std::size_t i=0;i<nbOfComp2;i++)
     compIds[i]=nbOfComp1+i;
   copyPartOfStringInfoFrom2(compIds,*other);
 }
 
 /*!
- * Creates a new DataArrayChar containing IDs (indices) of tuples holding value equal to a
+ * Creates a new DataArrayIdType containing IDs (indices) of tuples holding value equal to a
  * given one.
  *  \param [in] val - the value to find within \a this.
- *  \return DataArrayChar * - a new instance of DataArrayChar. The caller is to delete this
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType. The caller is to delete this
  *          array using decrRef() as it is no more needed.
  *  \throw If \a this is not allocated.
  *  \throw If \a this->getNumberOfComponents() != 1.
  */
-DataArrayInt *DataArrayChar::findIdsEqual(char val) const
+DataArrayIdType *DataArrayChar::findIdsEqual(char val) const
 {
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayChar::findIdsEqual : the array must have only one component, you can call 'rearrange' method before !");
   const char *cptr=getConstPointer();
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  int nbOfTuples=getNumberOfTuples();
-  for(int i=0;i<nbOfTuples;i++,cptr++)
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+  mcIdType nbOfTuples=getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
     if(*cptr==val)
       ret->pushBackSilent(i);
   return ret.retn();
 }
 
 /*!
- * Creates a new DataArrayChar containing IDs (indices) of tuples holding value \b not
+ * Creates a new DataArrayIdType containing IDs (indices) of tuples holding value \b not
  * equal to a given one. 
  *  \param [in] val - the value to ignore within \a this.
  *  \return DataArrayChar * - a new instance of DataArrayChar. The caller is to delete this
@@ -224,15 +224,15 @@ DataArrayInt *DataArrayChar::findIdsEqual(char val) const
  *  \throw If \a this is not allocated.
  *  \throw If \a this->getNumberOfComponents() != 1.
  */
-DataArrayInt *DataArrayChar::findIdsNotEqual(char val) const
+DataArrayIdType *DataArrayChar::findIdsNotEqual(char val) const
 {
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayChar::findIdsNotEqual : the array must have only one component, you can call 'rearrange' method before !");
   const char *cptr=getConstPointer();
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  int nbOfTuples=getNumberOfTuples();
-  for(int i=0;i<nbOfTuples;i++,cptr++)
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+  mcIdType nbOfTuples=getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
     if(*cptr!=val)
       ret->pushBackSilent(i);
   return ret.retn();
@@ -244,17 +244,16 @@ DataArrayInt *DataArrayChar::findIdsNotEqual(char val) const
  * This method differs from DataArrayChar::findIdFirstEqualTuple in that the position is internal raw data is not considered here contrary to DataArrayChar::findIdFirstEqualTuple.
  * \sa DataArrayChar::findIdFirstEqualTuple
  */
-int DataArrayChar::findIdSequence(const std::vector<char>& vals) const
+mcIdType DataArrayChar::findIdSequence(const std::vector<char>& vals) const
 {
   checkAllocated();
-  int nbOfCompo=getNumberOfComponents();
-  if(nbOfCompo!=1)
+  if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayChar::findIdSequence : works only for DataArrayChar instance with one component !");
   const char *cptr=getConstPointer();
   std::size_t nbOfVals=getNbOfElems();
   const char *loc=std::search(cptr,cptr+nbOfVals,vals.begin(),vals.end());
   if(loc!=cptr+nbOfVals)
-    return std::distance(cptr,loc);
+    return ToIdType(std::distance(cptr,loc));
   return -1;
 }
 
@@ -270,13 +269,13 @@ int DataArrayChar::findIdSequence(const std::vector<char>& vals) const
  * \return tuple id where \b tupl is. -1 if no such tuple exists in \b this.
  * \sa DataArrayChar::findIdSequence.
  */
-int DataArrayChar::findIdFirstEqualTuple(const std::vector<char>& tupl) const
+mcIdType DataArrayChar::findIdFirstEqualTuple(const std::vector<char>& tupl) const
 {
   checkAllocated();
-  int nbOfCompo=getNumberOfComponents();
+  std::size_t nbOfCompo=getNumberOfComponents();
   if(nbOfCompo==0)
     throw INTERP_KERNEL::Exception("DataArrayChar::findIdFirstEqualTuple : 0 components in 'this' !");
-  if(nbOfCompo!=(int)tupl.size())
+  if(nbOfCompo!=tupl.size())
     {
       std::ostringstream oss; oss << "DataArrayChar::findIdFirstEqualTuple : 'this' contains " << nbOfCompo << " components and searching for a tuple of length " << tupl.size() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -291,7 +290,7 @@ int DataArrayChar::findIdFirstEqualTuple(const std::vector<char>& tupl) const
           if(std::distance(cptr,work)%nbOfCompo!=0)
             work++;
           else
-            return std::distance(cptr,work)/nbOfCompo;
+            return ToIdType(std::distance(cptr,work)/nbOfCompo);
         }
     }
   return -1;
@@ -340,16 +339,16 @@ bool DataArrayChar::presenceOfValue(const std::vector<char>& vals) const
  * If not any tuple contains \b value -1 is returned.
  * \sa DataArrayChar::presenceOfValue
  */
-int DataArrayChar::findIdFirstEqual(char value) const
+mcIdType DataArrayChar::findIdFirstEqual(char value) const
 {
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayChar::presenceOfValue : the array must have only one component, you can call 'rearrange' method before !");
   const char *cptr=getConstPointer();
-  int nbOfTuples=getNumberOfTuples();
+  mcIdType nbOfTuples=getNumberOfTuples();
   const char *ret=std::find(cptr,cptr+nbOfTuples,value);
   if(ret!=cptr+nbOfTuples)
-    return std::distance(cptr,ret);
+    return ToIdType(std::distance(cptr,ret));
   return -1;
 }
 
@@ -359,17 +358,17 @@ int DataArrayChar::findIdFirstEqual(char value) const
  * If not any tuple contains one of the values contained in 'vals' false is returned.
  * \sa DataArrayChar::presenceOfValue
  */
-int DataArrayChar::findIdFirstEqual(const std::vector<char>& vals) const
+mcIdType DataArrayChar::findIdFirstEqual(const std::vector<char>& vals) const
 {
   checkAllocated();
   if(getNumberOfComponents()!=1)
-    throw INTERP_KERNEL::Exception("DataArrayInt::presenceOfValue : the array must have only one component, you can call 'rearrange' method before !");
+    throw INTERP_KERNEL::Exception("DataArrayChar::findIdFirstEqual : the array must have only one component, you can call 'rearrange' method before !");
   std::set<char> vals2(vals.begin(),vals.end());
   const char *cptr=getConstPointer();
-  int nbOfTuples=getNumberOfTuples();
+  mcIdType nbOfTuples=getNumberOfTuples();
   for(const char *w=cptr;w!=cptr+nbOfTuples;w++)
     if(vals2.find(*w)!=vals2.end())
-      return std::distance(cptr,w);
+      return ToIdType(std::distance(cptr,w));
   return -1;
 }
 
@@ -382,15 +381,15 @@ int DataArrayChar::findIdFirstEqual(const std::vector<char>& vals) const
  * \param [in] vmax end of range. This value is \b not included in range.
  * \return a newly allocated data array that the caller should deal with.
  */
-DataArrayInt *DataArrayChar::findIdsInRange(char vmin, char vmax) const
+DataArrayIdType *DataArrayChar::findIdsInRange(char vmin, char vmax) const
 {
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayChar::findIdsInRange : this must have exactly one component !");
   const char *cptr=getConstPointer();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(0,1);
-  int nbOfTuples=getNumberOfTuples();
-  for(int i=0;i<nbOfTuples;i++,cptr++)
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(0,1);
+  mcIdType nbOfTuples=getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfTuples;i++,cptr++)
     if(*cptr>=vmin && *cptr<vmax)
       ret->pushBackSilent(i);
   return ret.retn();
@@ -444,8 +443,8 @@ DataArrayChar *DataArrayChar::Aggregate(const std::vector<const DataArrayChar *>
     throw INTERP_KERNEL::Exception("DataArrayChar::Aggregate : input list must be NON EMPTY !");
   std::vector<const DataArrayChar *>::const_iterator it=a.begin();
   std::size_t nbOfComp((*it)->getNumberOfComponents());
-  int nbt=(*it++)->getNumberOfTuples();
-  for(int i=1;it!=a.end();it++,i++)
+  mcIdType nbt=(*it++)->getNumberOfTuples();
+  for(;it!=a.end();it++)
     {
       if((*it)->getNumberOfComponents()!=nbOfComp)
         throw INTERP_KERNEL::Exception("DataArrayChar::Aggregate : Nb of components mismatch for array aggregation !");
@@ -510,31 +509,31 @@ DataArrayChar *DataArrayChar::Meld(const std::vector<const DataArrayChar *>& arr
   for(it=a.begin();it!=a.end();it++)
     (*it)->checkAllocated();
   it=a.begin();
-  int nbOfTuples=(*it)->getNumberOfTuples();
-  std::vector<int> nbc(a.size());
+  mcIdType nbOfTuples=(*it)->getNumberOfTuples();
+  std::vector<std::size_t> nbc(a.size());
   std::vector<const char *> pts(a.size());
   nbc[0]=(*it)->getNumberOfComponents();
   pts[0]=(*it++)->getConstPointer();
-  for(int i=1;it!=a.end();it++,i++)
+  for(std::size_t i=1;it!=a.end();it++,i++)
     {
       if(nbOfTuples!=(*it)->getNumberOfTuples())
         throw INTERP_KERNEL::Exception("DataArrayChar::meld : mismatch of number of tuples !");
       nbc[i]=(*it)->getNumberOfComponents();
       pts[i]=(*it)->getConstPointer();
     }
-  int totalNbOfComp=std::accumulate(nbc.begin(),nbc.end(),0);
+  std::size_t totalNbOfComp=std::accumulate(nbc.begin(),nbc.end(),(std::size_t)0);
   DataArrayChar *ret=a[0]->buildEmptySpecializedDAChar();
   ret->alloc(nbOfTuples,totalNbOfComp);
   char *retPtr=ret->getPointer();
-  for(int i=0;i<nbOfTuples;i++)
-    for(int j=0;j<(int)a.size();j++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
+    for(std::size_t j=0;j<a.size();j++)
       {
         retPtr=std::copy(pts[j],pts[j]+nbc[j],retPtr);
         pts[j]+=nbc[j];
       }
-  int k=0;
-  for(int i=0;i<(int)a.size();i++)
-    for(int j=0;j<nbc[i];j++,k++)
+  std::size_t k=0;
+  for(std::size_t i=0;i<a.size();i++)
+    for(std::size_t j=0;j<nbc[i];j++,k++)
       ret->setInfoOnComponent(k,a[i]->getInfoOnComponent(j));
   return ret;
 }
@@ -622,12 +621,12 @@ void DataArrayByte::reprZipStream(std::ostream& stream) const
 void DataArrayByte::reprWithoutNameStream(std::ostream& stream) const
 {
   DataArray::reprWithoutNameStream(stream);
-  if(_mem.reprHeader(getNumberOfComponents(),stream))
+  if(_mem.reprHeader(ToIdType(getNumberOfComponents()),stream))
     {
       const char *data=begin();
-      int nbOfTuples=getNumberOfTuples();
-      int nbCompo=getNumberOfComponents();
-      for(int i=0;i<nbOfTuples;i++,data+=nbCompo)
+      mcIdType nbOfTuples=getNumberOfTuples();
+      std::size_t nbCompo=getNumberOfComponents();
+      for(mcIdType i=0;i<nbOfTuples;i++,data+=nbCompo)
         {
           stream << "Tuple #" << i << " : ";
           std::copy(data,data+nbCompo,std::ostream_iterator<int>(stream," "));//it is not a bug int here not char because it is not ASCII here contrary to DataArrayAsciiChar
@@ -639,12 +638,13 @@ void DataArrayByte::reprWithoutNameStream(std::ostream& stream) const
 void DataArrayByte::reprZipWithoutNameStream(std::ostream& stream) const
 {
   DataArray::reprWithoutNameStream(stream);
-  _mem.reprZip(getNumberOfComponents(),stream);
+  _mem.reprZip(ToIdType(getNumberOfComponents()),stream);
 }
 
 void DataArrayByte::reprCppStream(const std::string& varName, std::ostream& stream) const
 {
-  int nbTuples=getNumberOfTuples(),nbComp=getNumberOfComponents();
+  mcIdType nbTuples=getNumberOfTuples();
+  std::size_t nbComp=getNumberOfComponents();
   const char *data=getConstPointer();
   stream << "DataArrayByte *" << varName << "=DataArrayByte::New();" << std::endl;
   if(nbTuples*nbComp>=1)
@@ -668,10 +668,10 @@ void DataArrayByte::reprQuickOverview(std::ostream& stream) const
   stream << "DataArrayByte C++ instance at " << this << ". ";
   if(isAllocated())
     {
-      int nbOfCompo=(int)_info_on_compo.size();
+      std::size_t nbOfCompo=_info_on_compo.size();
       if(nbOfCompo>=1)
         {
-          int nbOfTuples=getNumberOfTuples();
+          mcIdType nbOfTuples=getNumberOfTuples();
           stream << "Number of tuples : " << nbOfTuples << ". Number of components : " << nbOfCompo << "." << std::endl;
           reprQuickOverviewData(stream,MAX_NB_OF_BYTE_IN_REPR);
         }
@@ -685,17 +685,17 @@ void DataArrayByte::reprQuickOverview(std::ostream& stream) const
 void DataArrayByte::reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const
 {
   const char *data=begin();
-  int nbOfTuples=getNumberOfTuples();
-  int nbOfCompo=(int)_info_on_compo.size();
+  mcIdType nbOfTuples=getNumberOfTuples();
+  std::size_t nbOfCompo=_info_on_compo.size();
   std::ostringstream oss2; oss2 << "[";
   std::string oss2Str(oss2.str());
   bool isFinished=true;
-  for(int i=0;i<nbOfTuples && isFinished;i++)
+  for(mcIdType i=0;i<nbOfTuples && isFinished;i++)
     {
       if(nbOfCompo>1)
         {
           oss2 << "(";
-          for(int j=0;j<nbOfCompo;j++,data++)
+          for(std::size_t j=0;j<nbOfCompo;j++,data++)
             {
               oss2 << (int)*data;
               if(j!=nbOfCompo-1) oss2 << ", ";
@@ -735,10 +735,10 @@ std::vector<bool> DataArrayByte::toVectorOfBool() const
   checkAllocated();
   if(getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayByte::toVectorOfBool : this method can be used only if this has one component !");
-  int nbt(getNumberOfTuples());
+  mcIdType nbt(getNumberOfTuples());
   std::vector<bool> ret(nbt,false);
   const char *pt(begin());
-  for(int i=0;i<nbt;i++,pt++)
+  for(mcIdType i=0;i<nbt;i++,pt++)
     if(*pt!=0)
       ret[i]=true;
   return ret;
@@ -777,14 +777,14 @@ DataArrayByteTuple *DataArrayByteIterator::nextt()
     return 0;
 }
 
-DataArrayByteTuple::DataArrayByteTuple(char *pt, int nbOfComp):_pt(pt),_nb_of_compo(nbOfComp)
+DataArrayByteTuple::DataArrayByteTuple(char *pt, std::size_t nbOfComp):_pt(pt),_nb_of_compo(nbOfComp)
 {
 }
 
 std::string DataArrayByteTuple::repr() const
 {
   std::ostringstream oss; oss << "(";
-  for(int i=0;i<_nb_of_compo-1;i++)
+  for(std::size_t i=0;i<_nb_of_compo-1;i++)
     oss << (int)_pt[i] << ", ";
   oss << _pt[_nb_of_compo-1] << ")";
   return oss.str();
@@ -803,7 +803,7 @@ char DataArrayByteTuple::byteValue() const
  * This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
  * \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
  */
-DataArrayByte *DataArrayByteTuple::buildDAByte(int nbOfTuples, int nbOfCompo) const
+DataArrayByte *DataArrayByteTuple::buildDAByte(std::size_t nbOfTuples, std::size_t nbOfCompo) const
 {
   if((_nb_of_compo==nbOfCompo && nbOfTuples==1) || (_nb_of_compo==nbOfTuples && nbOfCompo==1))
     {
@@ -888,10 +888,10 @@ DataArrayAsciiChar::DataArrayAsciiChar(const std::vector<std::string>& vst, char
     nbCompo=std::max(nbCompo,(*it).length());
   if(nbCompo==0)
     throw INTERP_KERNEL::Exception("DataArrayAsciiChar constructor with vector of strings ! All strings in not empty vector are empty !");
-  int nbTuples=(int)vst.size();
-  alloc(nbTuples,(int)nbCompo);
+  std::size_t nbTuples=vst.size();
+  alloc(nbTuples,nbCompo);
   char *pt=getPointer();
-  for(int i=0;i<nbTuples;i++,pt+=nbCompo)
+  for(std::size_t i=0;i<nbTuples;i++,pt+=nbCompo)
     {
       const std::string& tmp=vst[i];
       std::size_t sz=tmp.length();
@@ -974,12 +974,12 @@ void DataArrayAsciiChar::reprZipStream(std::ostream& stream) const
 void DataArrayAsciiChar::reprWithoutNameStream(std::ostream& stream) const
 {
   DataArray::reprWithoutNameStream(stream);
-  if(_mem.reprHeader(getNumberOfComponents(),stream))
+  if(_mem.reprHeader(ToIdType(getNumberOfComponents()),stream))
     {
       const char *data=begin();
-      int nbOfTuples=getNumberOfTuples();
-      int nbCompo=getNumberOfComponents();
-      for(int i=0;i<nbOfTuples;i++,data+=nbCompo)
+      mcIdType nbOfTuples=getNumberOfTuples();
+      std::size_t nbCompo=getNumberOfComponents();
+      for(mcIdType i=0;i<nbOfTuples;i++,data+=nbCompo)
         {
           stream << "Tuple #" << i << " : \"";
           std::copy(data,data+nbCompo,std::ostream_iterator<char>(stream));
@@ -995,7 +995,8 @@ void DataArrayAsciiChar::reprZipWithoutNameStream(std::ostream& stream) const
 
 void DataArrayAsciiChar::reprCppStream(const std::string& varName, std::ostream& stream) const
 {
-  int nbTuples=getNumberOfTuples(),nbComp=getNumberOfComponents();
+  mcIdType nbTuples=getNumberOfTuples();
+  std::size_t nbComp=getNumberOfComponents();
   const char *data=getConstPointer();
   stream << "DataArrayAsciiChar *" << varName << "=DataArrayAsciiChar::New();" << std::endl;
   if(nbTuples*nbComp>=1)
@@ -1019,10 +1020,10 @@ void DataArrayAsciiChar::reprQuickOverview(std::ostream& stream) const
   stream << "DataArrayAsciiChar C++ instance at " << this << ". ";
   if(isAllocated())
     {
-      int nbOfCompo=(int)_info_on_compo.size();
+      std::size_t nbOfCompo=_info_on_compo.size();
       if(nbOfCompo>=1)
         {
-          int nbOfTuples=getNumberOfTuples();
+          mcIdType nbOfTuples=getNumberOfTuples();
           stream << "Number of tuples : " << nbOfTuples << ". Number of components : " << nbOfCompo << "." << std::endl;
           reprQuickOverviewData(stream,MAX_NB_OF_BYTE_IN_REPR);
         }
@@ -1036,27 +1037,27 @@ void DataArrayAsciiChar::reprQuickOverview(std::ostream& stream) const
 void DataArrayAsciiChar::reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const
 {
   const char *data=begin();
-  int nbOfTuples=getNumberOfTuples();
-  int nbOfCompo=(int)_info_on_compo.size();
+  mcIdType nbOfTuples=getNumberOfTuples();
+  std::size_t nbOfCompo=_info_on_compo.size();
   std::ostringstream oss2; oss2 << "[";
   std::string oss2Str(oss2.str());
   bool isFinished=true;
-  for(int i=0;i<nbOfTuples && isFinished;i++)
+  for(mcIdType i=0;i<nbOfTuples && isFinished;i++)
     {
       bool isAscii=true;
-      for(int j=0;j<nbOfCompo;j++)
+      for(std::size_t j=0;j<nbOfCompo;j++)
         if(data[j]<32) isAscii=false;
       if(isAscii)
         {
           oss2 << "\'";
-          for(int j=0;j<nbOfCompo;j++,data++)
+          for(std::size_t j=0;j<nbOfCompo;j++,data++)
             oss2 << *data;
           oss2 << "\'";
         }
       else
         {
           oss2 << "(";
-          for(int j=0;j<nbOfCompo;j++,data++)
+          for(std::size_t j=0;j<nbOfCompo;j++,data++)
             {
               oss2 << (int)*data;
               if(j!=nbOfCompo-1) oss2 << ", ";
@@ -1117,7 +1118,7 @@ DataArrayAsciiCharTuple *DataArrayAsciiCharIterator::nextt()
     return 0;
 }
 
-DataArrayAsciiCharTuple::DataArrayAsciiCharTuple(char *pt, int nbOfComp):_pt(pt),_nb_of_compo(nbOfComp)
+DataArrayAsciiCharTuple::DataArrayAsciiCharTuple(char *pt, std::size_t nbOfComp):_pt(pt),_nb_of_compo(nbOfComp)
 {
 }
 
@@ -1141,7 +1142,7 @@ char DataArrayAsciiCharTuple::asciiCharValue() const
  * This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
  * \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
  */
-DataArrayAsciiChar *DataArrayAsciiCharTuple::buildDAAsciiChar(int nbOfTuples, int nbOfCompo) const
+DataArrayAsciiChar *DataArrayAsciiCharTuple::buildDAAsciiChar(std::size_t nbOfTuples, std::size_t nbOfCompo) const
 {
   if((_nb_of_compo==nbOfCompo && nbOfTuples==1) || (_nb_of_compo==nbOfTuples && nbOfCompo==1))
     {
index fd5441f85843cf82f88d53438458fe4271e67e13..8465de034fe03b6429bb81bdf2cc7fa0bdfd4031 100644 (file)
@@ -40,7 +40,8 @@ DataArrayFloat *DataArrayFloat::deepCopy() const
 
 void DataArrayFloat::reprCppStream(const std::string& varName, std::ostream& stream) const
 {
-  int nbTuples(getNumberOfTuples()),nbComp(getNumberOfComponents());
+  mcIdType nbTuples(getNumberOfTuples());
+  std::size_t nbComp(getNumberOfComponents());
   const float *data(begin());
   stream.precision(7);
   stream << "DataArrayFloat *" << varName << "=DataArrayFloat::New();" << std::endl;
@@ -62,10 +63,10 @@ void DataArrayFloat::reprQuickOverview(std::ostream& stream) const
   stream << "DataArrayFloat C++ instance at " << this << ". ";
   if(isAllocated())
     {
-      int nbOfCompo=(int)_info_on_compo.size();
+      std::size_t nbOfCompo=_info_on_compo.size();
       if(nbOfCompo>=1)
         {
-          int nbOfTuples=getNumberOfTuples();
+          mcIdType nbOfTuples=getNumberOfTuples();
           stream << "Number of tuples : " << nbOfTuples << ". Number of components : " << nbOfCompo << "." << std::endl;
           reprQuickOverviewData(stream,MAX_NB_OF_BYTE_IN_REPR);
         }
@@ -79,18 +80,18 @@ void DataArrayFloat::reprQuickOverview(std::ostream& stream) const
 void DataArrayFloat::reprQuickOverviewData(std::ostream& stream, std::size_t maxNbOfByteInRepr) const
 {
   const float *data(begin());
-  int nbOfTuples(getNumberOfTuples());
-  int nbOfCompo=(int)_info_on_compo.size();
+  mcIdType nbOfTuples(getNumberOfTuples());
+  std::size_t nbOfCompo=_info_on_compo.size();
   std::ostringstream oss2; oss2 << "[";
   oss2.precision(7);
   std::string oss2Str(oss2.str());
   bool isFinished=true;
-  for(int i=0;i<nbOfTuples && isFinished;i++)
+  for(mcIdType i=0;i<nbOfTuples && isFinished;i++)
     {
       if(nbOfCompo>1)
         {
           oss2 << "(";
-          for(int j=0;j<nbOfCompo;j++,data++)
+          for(std::size_t j=0;j<nbOfCompo;j++,data++)
             {
               oss2 << *data;
               if(j!=nbOfCompo-1) oss2 << ", ";
@@ -140,14 +141,14 @@ DataArrayFloatIterator::DataArrayFloatIterator(DataArrayFloat *da):DataArrayIter
 {
 }
 
-DataArrayFloatTuple::DataArrayFloatTuple(float *pt, int nbOfComp):DataArrayTuple<float>(pt,nbOfComp)
+DataArrayFloatTuple::DataArrayFloatTuple(float *pt, std::size_t nbOfComp):DataArrayTuple<float>(pt,nbOfComp)
 {
 }
 
 std::string DataArrayFloatTuple::repr() const
 {
   std::ostringstream oss; oss.precision(7); oss << "(";
-  for(int i=0;i<_nb_of_compo-1;i++)
+  for(std::size_t i=0;i<_nb_of_compo-1;i++)
     oss << _pt[i] << ", ";
   oss << _pt[_nb_of_compo-1] << ")";
   return oss.str();
@@ -164,7 +165,7 @@ float DataArrayFloatTuple::floatValue() const
  * This method throws an INTERP_KERNEL::Exception is it is impossible to match sizes of \b this that is too say \b nbOfCompo=this->_nb_of_elem and \bnbOfTuples==1 or
  * \b nbOfCompo=1 and \bnbOfTuples==this->_nb_of_elem.
  */
-DataArrayFloat *DataArrayFloatTuple::buildDAFloat(int nbOfTuples, int nbOfCompo) const
+DataArrayFloat *DataArrayFloatTuple::buildDAFloat(std::size_t nbOfTuples, std::size_t nbOfCompo) const
 {
   return this->buildDA(nbOfTuples,nbOfCompo);
 }
old mode 100644 (file)
new mode 100755 (executable)
index af878fa..195a6f3
@@ -146,7 +146,7 @@ bool MEDCouplingMesh::isEqual(const MEDCouplingMesh *other, double prec) const
  * to be compared. An interpolation using MEDCouplingRemapper class should be then used.
  */
 void MEDCouplingMesh::checkGeoEquivalWith(const MEDCouplingMesh *other, int levOfCheck, double prec,
-                                          DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
+                                          DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 {
   cellCor=0;
   nodeCor=0;
@@ -195,28 +195,28 @@ void MEDCouplingMesh::checkGeoEquivalWith(const MEDCouplingMesh *other, int levO
  *  \param [in] partBg - the array of node ids.
  *  \param [in] partEnd - end of \a partBg, i.e. a pointer to a (last+1)-th element
  *          of \a partBg.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of found
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of found
  *          cells. The caller is to delete this array using decrRef() as it is no
  *          more needed.
  */
-DataArrayInt *MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds(const int *partBg, const int *partEnd) const
+DataArrayIdType *MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const
 {
-  std::vector<int> crest;
-  std::set<int> p(partBg,partEnd);
-  int nbOfCells=getNumberOfCells();
-  for(int i=0;i<nbOfCells;i++)
+  std::vector<mcIdType> crest;
+  std::set<mcIdType> p(partBg,partEnd);
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      std::vector<int> conn;
+      std::vector<mcIdType> conn;
       getNodeIdsOfCell(i,conn);
       bool cont=true;
-      for(std::vector<int>::const_iterator iter=conn.begin();iter!=conn.end() && cont;iter++)
+      for(std::vector<mcIdType>::const_iterator iter=conn.begin();iter!=conn.end() && cont;iter++)
         if(p.find(*iter)==p.end())
           cont=false;
       if(cont)
         crest.push_back(i);
     }
-  DataArrayInt *ret=DataArrayInt::New();
-  ret->alloc((int)crest.size(),1);
+  DataArrayIdType *ret=DataArrayIdType::New();
+  ret->alloc(crest.size(),1);
   std::copy(crest.begin(),crest.end(),ret->getPointer());
   return ret;
 }
@@ -259,7 +259,7 @@ bool MEDCouplingMesh::areCompatibleForMerge(const MEDCouplingMesh *other) const
  *
  * \sa MEDCouplingMesh::buildPart
  */
-MEDCouplingMesh *MEDCouplingMesh::buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const
+MEDCouplingMesh *MEDCouplingMesh::buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const
 {
   if(beginCellIds==0 && endCellIds==getNumberOfCells() && stepCellIds==1)
     {
@@ -269,7 +269,7 @@ MEDCouplingMesh *MEDCouplingMesh::buildPartRange(int beginCellIds, int endCellId
     }
   else
     {
-      MCAuto<DataArrayInt> cellIds=DataArrayInt::Range(beginCellIds,endCellIds,stepCellIds);
+      MCAuto<DataArrayIdType> cellIds=DataArrayIdType::Range(beginCellIds,endCellIds,stepCellIds);
       return buildPart(cellIds->begin(),cellIds->end());
     }
 }
@@ -279,9 +279,9 @@ MEDCouplingMesh *MEDCouplingMesh::buildPartRange(int beginCellIds, int endCellId
  *
  * \sa MEDCouplingMesh::buildPartAndReduceNodes
  */
-MEDCouplingMesh *MEDCouplingMesh::buildPartRangeAndReduceNodes(int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt*& arr) const
+MEDCouplingMesh *MEDCouplingMesh::buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const
 {
-  MCAuto<DataArrayInt> cellIds=DataArrayInt::Range(beginCellIds,endCellIds,stepCellIds);
+  MCAuto<DataArrayIdType> cellIds=DataArrayIdType::Range(beginCellIds,endCellIds,stepCellIds);
   return buildPartAndReduceNodes(cellIds->begin(),cellIds->end(),arr);
 }
 
@@ -572,12 +572,12 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingMesh::GetCorrespondingPolyType(INTE
  * \throw if type is dynamic as \c INTERP_KERNEL::NORM_POLYHED , \c INTERP_KERNEL::NORM_POLYGON , \c INTERP_KERNEL::NORM_QPOLYG
  * \throw if type is equal to \c INTERP_KERNEL::NORM_ERROR or to an unexisting geometric type.
  */
-int MEDCouplingMesh::GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type)
+mcIdType MEDCouplingMesh::GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type)
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
   if(cm.isDynamic())
     throw INTERP_KERNEL::Exception("MEDCouplingMesh::GetNumberOfNodesOfGeometricType : the input geometric type is dynamic ! Impossible to return a fixed number of nodes constituting it !");
-  return (int) cm.getNumberOfNodes();
+  return ToIdType( cm.getNumberOfNodes());
 }
 
 /*!
@@ -647,15 +647,15 @@ const char *MEDCouplingMesh::GetReprOfGeometricType(INTERP_KERNEL::NormalizedCel
  *  \ref  py_mcumesh_getCellsContainingPoints "Here is a Python example".
  *  \endif
  */
-void MEDCouplingMesh::getCellsContainingPoints(const double *pos, int nbOfPoints, double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const
+void MEDCouplingMesh::getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const
 {
-  eltsIndex=DataArrayInt::New(); elts=DataArrayInt::New(); eltsIndex->alloc(nbOfPoints+1,1); eltsIndex->setIJ(0,0,0); elts->alloc(0,1);
-  int *eltsIndexPtr(eltsIndex->getPointer());
+  eltsIndex=DataArrayIdType::New(); elts=DataArrayIdType::New(); eltsIndex->alloc(nbOfPoints+1,1); eltsIndex->setIJ(0,0,0); elts->alloc(0,1);
+  mcIdType *eltsIndexPtr(eltsIndex->getPointer());
   int spaceDim(getSpaceDimension());
   const double *work(pos);
-  for(int i=0;i<nbOfPoints;i++,work+=spaceDim)
+  for(mcIdType i=0;i<nbOfPoints;i++,work+=spaceDim)
     {
-      std::vector<int> ret;
+      std::vector<mcIdType> ret;
       getCellsContainingPoint(work,eps,ret);
       elts->insertAtTheEnd(ret.begin(),ret.end());
       eltsIndexPtr[i+1]=elts->getNumberOfTuples();
@@ -669,7 +669,7 @@ void MEDCouplingMesh::getCellsContainingPoints(const double *pos, int nbOfPoints
  * 
  * \sa MEDCouplingMesh::getCellsContainingPoints, MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss
  */
-void MEDCouplingMesh::getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, int nbOfPoints, double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const
+void MEDCouplingMesh::getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const
 {
   this->getCellsContainingPoints(pos,nbOfPoints,eps,elts,eltsIndex);
 }
index d892923018945f131ba4ad2cb1827bf74e13fbcd..02e3bfc27aaa9fcf8310476f8b1ff7c55cc7c567 100644 (file)
@@ -47,7 +47,7 @@ namespace MEDCoupling
     } MEDCouplingMeshType;
   // -- WARNING this enum must be synchronized with MEDCouplingCommon.i file ! --
 
-  class DataArrayInt;
+  class DataArrayIdType;
   class DataArrayByte;
   class DataArrayDouble;
   class MEDCouplingUMesh;
@@ -77,46 +77,46 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const = 0;
     MEDCOUPLING_EXPORT virtual void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                         DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const = 0;
+                                                         DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const = 0;
     MEDCOUPLING_EXPORT virtual void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                                    DataArrayInt *&cellCor) const = 0;
+                                                                    DataArrayIdType *&cellCor) const = 0;
     MEDCOUPLING_EXPORT virtual void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkGeoEquivalWith(const MEDCouplingMesh *other, int levOfCheck, double prec,
-                                                DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
+                                                DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
     //
     MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const = 0;
     MEDCOUPLING_EXPORT virtual void checkConsistency(double eps=1e-12) const = 0;
-    MEDCOUPLING_EXPORT virtual std::size_t getNumberOfCells() const = 0;
-    MEDCOUPLING_EXPORT virtual int getNumberOfNodes() const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfCells() const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfNodes() const = 0;
     MEDCOUPLING_EXPORT virtual int getSpaceDimension() const = 0;
     MEDCOUPLING_EXPORT virtual int getMeshDimension() const = 0;
     MEDCOUPLING_EXPORT virtual DataArrayDouble *getCoordinatesAndOwner() const = 0;
     MEDCOUPLING_EXPORT virtual DataArrayDouble *computeCellCenterOfMass() const = 0;
     MEDCOUPLING_EXPORT virtual DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *computeNbOfNodesPerCell() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *computeEffectiveNbOfNodesPerCell() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *computeNbOfFacesPerCell() const = 0;
-    MEDCOUPLING_EXPORT virtual std::size_t getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
-    MEDCOUPLING_EXPORT virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(std::size_t cellId) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *computeNbOfNodesPerCell() const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *computeEffectiveNbOfNodesPerCell() const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *computeNbOfFacesPerCell() const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
+    MEDCOUPLING_EXPORT virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const = 0;
     MEDCOUPLING_EXPORT virtual std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const = 0;
-    MEDCOUPLING_EXPORT virtual void getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *getCellIdsFullyIncludedInNodeIds(const int *partBg, const int *partEnd) const;
-    MEDCOUPLING_EXPORT virtual void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const = 0;
+    MEDCOUPLING_EXPORT virtual void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const;
+    MEDCOUPLING_EXPORT virtual void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const = 0;
     MEDCOUPLING_EXPORT virtual std::string simpleRepr() const = 0;
     MEDCOUPLING_EXPORT virtual std::string advancedRepr() const = 0;
     // tools
     MEDCOUPLING_EXPORT virtual const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const = 0;
-    MEDCOUPLING_EXPORT virtual std::vector<int> getDistributionOfTypes() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const = 0;
-    MEDCOUPLING_EXPORT virtual void splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller=true) const = 0;
+    MEDCOUPLING_EXPORT virtual std::vector<mcIdType> getDistributionOfTypes() const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const = 0;
+    MEDCOUPLING_EXPORT virtual void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const = 0;
     MEDCOUPLING_EXPORT virtual void getBoundingBox(double *bbox) const = 0;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const = 0;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const = 0;
-    MEDCOUPLING_EXPORT virtual int getCellContainingPoint(const double *pos, double eps) const = 0;
-    MEDCOUPLING_EXPORT virtual void getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const = 0;
-    MEDCOUPLING_EXPORT virtual void getCellsContainingPoints(const double *pos, int nbOfPoints, double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const;
-    MEDCOUPLING_EXPORT virtual void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, int nbOfPoints, double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const;
+    MEDCOUPLING_EXPORT virtual mcIdType getCellContainingPoint(const double *pos, double eps) const = 0;
+    MEDCOUPLING_EXPORT virtual void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const = 0;
+    MEDCOUPLING_EXPORT virtual void getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const;
+    MEDCOUPLING_EXPORT virtual void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, FunctionToEvaluate func) const;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, const std::string& func) const;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *fillFromAnalyticCompo(TypeOfField t, int nbOfComp, const std::string& func) const;
@@ -125,29 +125,29 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual void rotate(const double *center, const double *vector, double angle) = 0;
     MEDCOUPLING_EXPORT virtual void translate(const double *vector) = 0;
     MEDCOUPLING_EXPORT virtual void scale(const double *point, double factor) = 0;
-    MEDCOUPLING_EXPORT virtual void renumberCells(const int *old2NewBg, bool check=true) = 0;
+    MEDCOUPLING_EXPORT virtual void renumberCells(const mcIdType *old2NewBg, bool check=true) = 0;
     MEDCOUPLING_EXPORT virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPart(const int *start, const int *end) const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartRangeAndReduceNodes(int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt*& arr) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const = 0;
+    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const = 0;
+    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const;
     MEDCOUPLING_EXPORT virtual MEDCouplingUMesh *buildUnstructured() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *simplexize(int policy) = 0;
-    MEDCOUPLING_EXPORT virtual void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *simplexize(int policy) = 0;
+    MEDCOUPLING_EXPORT virtual void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const = 0;
     MEDCOUPLING_EXPORT virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const;
     MEDCOUPLING_EXPORT static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
     MEDCOUPLING_EXPORT static MEDCouplingMesh *MergeMeshes(std::vector<const MEDCouplingMesh *>& meshes);
     MEDCOUPLING_EXPORT static bool IsStaticGeometricType(INTERP_KERNEL::NormalizedCellType type);
     MEDCOUPLING_EXPORT static bool IsLinearGeometricType(INTERP_KERNEL::NormalizedCellType type);
     MEDCOUPLING_EXPORT static INTERP_KERNEL::NormalizedCellType GetCorrespondingPolyType(INTERP_KERNEL::NormalizedCellType type);
-    MEDCOUPLING_EXPORT static int GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
+    MEDCOUPLING_EXPORT static mcIdType GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
     MEDCOUPLING_EXPORT static int GetDimensionOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
     MEDCOUPLING_EXPORT static const char *GetReprOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
     //serialisation-unserialization
-    MEDCOUPLING_EXPORT virtual void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
-    MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const = 0;
-    MEDCOUPLING_EXPORT virtual void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const = 0;
-    MEDCOUPLING_EXPORT virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT virtual void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
+    MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const = 0;
+    MEDCOUPLING_EXPORT virtual void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const = 0;
+    MEDCOUPLING_EXPORT virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                                     const std::vector<std::string>& littleStrings) = 0;
     MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
     MEDCOUPLING_EXPORT std::string getVTKFileNameOf(const std::string& fileName) const;
index 8322da12f52491717b60507387ac2a62a8712971..bb7213e4f5b54f7470ed820bc45bf239f9be329d 100644 (file)
@@ -151,7 +151,7 @@ bool MEDCouplingMultiFields::isEqualWithoutConsideringStr(const MEDCouplingMulti
 
 const MEDCouplingFieldDouble *MEDCouplingMultiFields::getFieldWithId(int id) const
 {
-  if(id>=(int)_fs.size() || id < 0)
+  if(id>=ToIdType(_fs.size()) || id < 0)
     throw INTERP_KERNEL::Exception("MEDCouplingMultiFields::getFieldWithId : invalid id outside boundaries !");
   return _fs[id];
 }
@@ -170,7 +170,7 @@ int MEDCouplingMultiFields::getNumberOfFields() const
 
 const MEDCouplingFieldDouble *MEDCouplingMultiFields::getFieldAtPos(int id) const
 {
-  if(id<0 || id>=(int)_fs.size())
+  if(id<0 || id>=ToIdType(_fs.size()))
     {
       std::ostringstream oss; oss << "MEDCouplingMultiFields::getFieldAtPos : Invalid given pos : should be >=0 and < " << _fs.size() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -354,7 +354,7 @@ MEDCouplingMultiFields::MEDCouplingMultiFields(const MEDCouplingMultiFields& oth
                 tmp2[j]=0;
             }
           _fs[i]->setArrays(tmp2);
-          std::vector<int> tinyInfo;
+          std::vector<mcIdType> tinyInfo;
           std::vector<double> tinyInfo2;
           other._fs[i]->getTimeDiscretizationUnderGround()->getTinySerializationIntInformation2(tinyInfo);
           other._fs[i]->getTimeDiscretizationUnderGround()->getTinySerializationDbleInformation2(tinyInfo2);
@@ -367,7 +367,7 @@ MEDCouplingMultiFields::MEDCouplingMultiFields()
 {
 }
 
-void MEDCouplingMultiFields::getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const
+void MEDCouplingMultiFields::getTinySerializationInformation(std::vector<mcIdType>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const
 {
   std::vector<int> refs;
   std::vector<MEDCouplingMesh *> ms=getDifferentMeshes(refs);
@@ -376,70 +376,70 @@ void MEDCouplingMultiFields::getTinySerializationInformation(std::vector<int>& t
   std::vector<DataArrayDouble *> fs=getDifferentArrays(refs2);
   nbOfDiffArr=(int)fs.size();
   //
-  std::size_t sz=refs.size();//==_fs.size()
-  int sz2=0;
-  for(std::size_t i=0;i<sz;i++)
-    sz2+=(int)refs2[i].size();
+  mcIdType sz=ToIdType(refs.size());//==_fs.size()
+  mcIdType sz2=0;
+  for(mcIdType i=0;i<sz;i++)
+    sz2+=ToIdType(refs2[i].size());
   //
   tinyInfo2.clear();
   std::vector<int> doubleDaInd(sz);
   std::vector<int> timeDiscrInt;
   tinyInfo.resize(sz2+5*sz+3);
-  tinyInfo[0]=(int)sz;
+  tinyInfo[0]=sz;
   tinyInfo[1]=sz2;
-  for(std::size_t i=0;i<sz;i++)
+  for(mcIdType i=0;i<sz;i++)
     {
       std::vector<double> tmp;
-      std::vector<int> tmp2;
+      std::vector<mcIdType> tmp2;
       _fs[i]->getTimeDiscretizationUnderGround()->getTinySerializationDbleInformation2(tmp);
       _fs[i]->getTimeDiscretizationUnderGround()->getTinySerializationIntInformation2(tmp2);
-      tinyInfo[3*sz+3+i]=(int)tmp.size();
-      tinyInfo[4*sz+3+i]=(int)tmp2.size();
+      tinyInfo[3*sz+3+i]=ToIdType(tmp.size());
+      tinyInfo[4*sz+3+i]=ToIdType(tmp2.size());
       tinyInfo2.insert(tinyInfo2.end(),tmp.begin(),tmp.end());
       timeDiscrInt.insert(timeDiscrInt.end(),tmp2.begin(),tmp2.end());
     }
-  int sz3=(int)timeDiscrInt.size();
+  mcIdType sz3=ToIdType(timeDiscrInt.size());
   tinyInfo[2]=sz3;
   //
-  for(std::size_t i=0;i<sz;i++)
+  for(mcIdType i=0;i<sz;i++)
     tinyInfo[i+3]=refs[i];
-  for(std::size_t i=0;i<sz;i++)
-    tinyInfo[i+sz+3]=(int)refs2[i].size();
-  for(std::size_t i=0;i<sz;i++)
-    tinyInfo[i+2*sz+3]=(int)_fs[i]->getTimeDiscretization();
+  for(mcIdType i=0;i<sz;i++)
+    tinyInfo[i+sz+3]=ToIdType(refs2[i].size());
+  for(mcIdType i=0;i<sz;i++)
+    tinyInfo[i+2*sz+3]=ToIdType(_fs[i]->getTimeDiscretization());
   int k=0;
-  for(std::size_t i=0;i<sz;i++)
+  for(mcIdType i=0;i<sz;i++)
     for(std::vector<int>::const_iterator it=refs2[i].begin();it!=refs2[i].end();it++,k++)
       tinyInfo[5*sz+k+3]=*it;
   tinyInfo.insert(tinyInfo.end(),timeDiscrInt.begin(),timeDiscrInt.end());//tinyInfo has lgth==sz3+sz2+5*sz+3
 }
 
-void MEDCouplingMultiFields::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD,
+void MEDCouplingMultiFields::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD,
                                                    const std::vector<MEDCouplingFieldTemplate *>& ft, const std::vector<MEDCouplingMesh *>& ms,
                                                    const std::vector<DataArrayDouble *>& das)
 {
-  int sz=tinyInfoI[0];
+  mcIdType sz=tinyInfoI[0];
   _fs.resize(sz);
-  int sz2=tinyInfoI[1];
+  mcIdType sz2=tinyInfoI[1];
   // dealing with ft with no mesh set.
-  for(int i=0;i<sz;i++)
+  for(mcIdType i=0;i<sz;i++)
     {
-      int meshId=tinyInfoI[3+i];
+      mcIdType meshId=tinyInfoI[3+i];
       if(meshId!=-1)
         ft[i]->setMesh(ms[meshId]);
     }
   // dealing with fieldtemplate->fielddouble
-  int k=0;
-  int offI=0;
-  int offD=0;
-  for(int i=0;i<sz;i++)
+  mcIdType k=0;
+  mcIdType offI=0;
+  mcIdType offD=0;
+  for(mcIdType i=0;i<sz;i++)
     {
       _fs[i]=MEDCouplingFieldDouble::New(*ft[i],(TypeOfTimeDiscretization)tinyInfoI[2*sz+3+i]);
-      int sz3=tinyInfoI[sz+i+3];
+      mcIdType sz3=tinyInfoI[sz+i+3];
       std::vector<DataArrayDouble *> tmp(sz3);
-      for(int j=0;j<sz3;j++,k++)
+      for(mcIdType j=0;j<sz3;j++,k++)
         {
-          int daId=tinyInfoI[5*sz+k+3];
+          mcIdType daId=tinyInfoI[5*sz+k+3];
           if(daId!=-1)
             tmp[j]=das[daId];
           else
@@ -447,10 +447,10 @@ void MEDCouplingMultiFields::finishUnserialization(const std::vector<int>& tinyI
         }
       _fs[i]->setArrays(tmp);
       // time discr tiny info
-      int lgthI=tinyInfoI[4*sz+3+i];
-      int lgthD=tinyInfoI[3*sz+3+i];
+      mcIdType lgthI=tinyInfoI[4*sz+3+i];
+      mcIdType lgthD=tinyInfoI[3*sz+3+i];
       //
-      std::vector<int> tdInfoI(tinyInfoI.begin()+sz2+5*sz+3+offI,tinyInfoI.begin()+sz2+5*sz+3+offI+lgthI);
+      std::vector<mcIdType> tdInfoI(tinyInfoI.begin()+sz2+5*sz+3+offI,tinyInfoI.begin()+sz2+5*sz+3+offI+lgthI);
       std::vector<double> tdInfoD(tinyInfoD.begin()+offD,tinyInfoD.begin()+offD+lgthD);
       _fs[i]->getTimeDiscretizationUnderGround()->finishUnserialization2(tdInfoI,tdInfoD);
       //
index e7a82b402a7b2a372fbe0f5da9a3c64156e23933..9fe1d9a138c931a3e3ed05896fbd2e71ee5cc6a2 100644 (file)
@@ -24,6 +24,7 @@
 #include "MEDCouplingRefCountObject.hxx"
 #include "MEDCouplingTimeLabel.hxx"
 #include "MCAuto.hxx"
+#include "MCType.hxx"
 
 #include "InterpKernelException.hxx"
 
@@ -61,8 +62,8 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const;
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<mcIdType>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const;
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD,
                                                   const std::vector<MEDCouplingFieldTemplate *>& ft, const std::vector<MEDCouplingMesh *>& ms,
                                                   const std::vector<DataArrayDouble *>& das);
     MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const;
index 3b7584558e1c8dc184ab3bad80dc9beb7fa10cde..8b076f1d6f49d2a9f61789e840dccff6f80b7693 100644 (file)
@@ -34,7 +34,7 @@ class MEDCouplingNormalizedCartesianMesh
 public:
   static const int MY_SPACEDIM=SPACEDIM;
   static const int MY_MESHDIM=SPACEDIM;
-  typedef int MyConnType;
+  typedef mcIdType MyConnType;
   static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE;
 public:
   MEDCouplingNormalizedCartesianMesh(const MEDCoupling::MEDCouplingCMesh *mesh);
@@ -42,8 +42,8 @@ public:
   //INTERP_KERNEL::NormalizedCellType getTypeOfElement(int eltId) const;
   //int getNumberOfNodesOfElement(int eltId) const;
   //int getNumberOfNodes() const;
-  unsigned long getNumberOfElements() const;
-  unsigned long nbCellsAlongAxis(int axis) const;
+  mcIdType getNumberOfElements() const;
+  mcIdType nbCellsAlongAxis(int axis) const;
   const double * getCoordsAlongAxis(int axis) const;
   ~MEDCouplingNormalizedCartesianMesh();
 private:
index 72412782ca63260f9db24e11a64175b6ff00c868..7fe1ef1252188ad9013b84259791babc867767d0 100644 (file)
@@ -39,13 +39,13 @@ MEDCouplingNormalizedCartesianMesh<SPACEDIM>::~MEDCouplingNormalizedCartesianMes
 }
 
 template<int SPACEDIM>
-unsigned long MEDCouplingNormalizedCartesianMesh<SPACEDIM>::getNumberOfElements() const
+mcIdType MEDCouplingNormalizedCartesianMesh<SPACEDIM>::getNumberOfElements() const
 {
   return _mesh->getNumberOfCells();
 }
 
 template<int SPACEDIM>
-unsigned long MEDCouplingNormalizedCartesianMesh<SPACEDIM>::nbCellsAlongAxis(int axis) const
+mcIdType MEDCouplingNormalizedCartesianMesh<SPACEDIM>::nbCellsAlongAxis(int axis) const
 {
   return _mesh->getCoordsAt(axis)->getNumberOfTuples() - 1;
 }
index 919ae7b34c6a96e74806f5d2dcd11cf9c4dd8e4e..d97062f5d9bbdee28d745a330329553440a88d9a 100644 (file)
@@ -22,6 +22,7 @@
 #define __PARAMEDMEM_MEDCOUPLINGNORMALIZEDUNSTRUCTUREDMESH_HXX__
 
 #include "NormalizedUnstructuredMesh.hxx"
+#include "MCType.hxx"
 
 namespace MEDCoupling
 {
@@ -34,26 +35,26 @@ class MEDCouplingNormalizedUnstructuredMesh
 public:
   static const int MY_SPACEDIM=SPACEDIM;
   static const int MY_MESHDIM=MESHDIM;
-  typedef int MyConnType;
+  typedef mcIdType MyConnType;
   static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE;
 public:
   MEDCouplingNormalizedUnstructuredMesh(const MEDCoupling::MEDCouplingPointSet *mesh);
   void getBoundingBox(double *boundingBox) const;
-  INTERP_KERNEL::NormalizedCellType getTypeOfElement(int eltId) const;
-  int getNumberOfNodesOfElement(int eltId) const;
-  int getNumberOfElements() const;
-  int getNumberOfNodes() const;
-  const int *getConnectivityPtr() const;
+  INTERP_KERNEL::NormalizedCellType getTypeOfElement(mcIdType eltId) const;
+  mcIdType getNumberOfNodesOfElement(mcIdType eltId) const;
+  mcIdType getNumberOfElements() const;
+  mcIdType getNumberOfNodes() const;
+  const mcIdType *getConnectivityPtr() const;
   const double *getCoordinatesPtr() const;
-  const int *getConnectivityIndexPtr() const;
+  const mcIdType *getConnectivityIndexPtr() const;
   void releaseTempArrays();
   ~MEDCouplingNormalizedUnstructuredMesh();
 private:
   void prepare();
 private:
   const MEDCoupling::MEDCouplingPointSet *_mesh;
-  int *_conn_for_interp;
-  int *_conn_index_for_interp;
+  mcIdType *_conn_for_interp;
+  mcIdType *_conn_index_for_interp;
 };
 
 #endif
index 10d31c6a6d22d4fc7c1e69796196ad4a4e305b37..c9485e66983643e75c4d1d444310a5cfa96abd75 100644 (file)
@@ -48,11 +48,11 @@ void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getBoundingBox(dou
     }
   const MEDCoupling::DataArrayDouble *array=_mesh->getCoords();
   const double *ptr=array->getConstPointer();
-  int nbOfPts=array->getNbOfElems()/SPACEDIM;
+  mcIdType nbOfPts=ToIdType(array->getNbOfElems())/SPACEDIM;
   for(int j=0;j<SPACEDIM;j++)
     {
       const double *work=ptr+j;
-      for(int i=0;i<nbOfPts;i++,work+=SPACEDIM)
+      for(mcIdType i=0;i<nbOfPts;i++,work+=SPACEDIM)
         {
           if(boundingBox[j]>*work)
             boundingBox[j]=*work;
@@ -63,31 +63,31 @@ void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getBoundingBox(dou
 }
 
 template<int SPACEDIM,int MESHDIM>
-INTERP_KERNEL::NormalizedCellType MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getTypeOfElement(int eltId) const
+INTERP_KERNEL::NormalizedCellType MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getTypeOfElement(mcIdType eltId) const
 {
   return _mesh->getTypeOfCell(eltId);
 }
 
 template<int SPACEDIM,int MESHDIM>
-int MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getNumberOfNodesOfElement(int eltId) const
+mcIdType MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getNumberOfNodesOfElement(mcIdType eltId) const
 {
   return _mesh->getNumberOfNodesInCell(eltId);
 }
 
 template<int SPACEDIM,int MESHDIM>
-int MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getNumberOfElements() const
+mcIdType MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getNumberOfElements() const
 {
-  return _mesh->getNumberOfCells();
+  return ToIdType(_mesh->getNumberOfCells());
 }
 
 template<int SPACEDIM,int MESHDIM>
-int MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getNumberOfNodes() const
+mcIdType MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getNumberOfNodes() const
 {
   return _mesh->getNumberOfNodes();
 }
 
 template<int SPACEDIM,int MESHDIM>
-const int *MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getConnectivityPtr() const
+const mcIdType *MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getConnectivityPtr() const
 {
   return _conn_for_interp;
 }
@@ -100,7 +100,7 @@ const double *MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getCoordi
 }
 
 template<int SPACEDIM,int MESHDIM>
-const int *MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getConnectivityIndexPtr() const
+const mcIdType *MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::getConnectivityIndexPtr() const
 {
   return _conn_index_for_interp;
 }
@@ -129,18 +129,18 @@ void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::prepare()
   const MEDCoupling::MEDCouplingUMesh *m1(dynamic_cast<const MEDCoupling::MEDCouplingUMesh *>(_mesh));
   if(m1)
     {
-      int nbOfCell=m1->getNumberOfCells();
-      int initialConnSize=m1->getNodalConnectivity()->getNbOfElems();
-      _conn_for_interp=new int[initialConnSize-nbOfCell];
-      _conn_index_for_interp=new int[nbOfCell+1];
+      mcIdType nbOfCell=ToIdType(m1->getNumberOfCells());
+      mcIdType initialConnSize=ToIdType(m1->getNodalConnectivity()->getNbOfElems());
+      _conn_for_interp=new mcIdType[initialConnSize-nbOfCell];
+      _conn_index_for_interp=new mcIdType[nbOfCell+1];
       _conn_index_for_interp[0]=0;
-      const int *work_conn=m1->getNodalConnectivity()->getConstPointer()+1;
-      const int *work_conn_index=m1->getNodalConnectivityIndex()->getConstPointer();
-      int *work_conn_for_interp=_conn_for_interp;
-      int *work_conn_index_for_interp=_conn_index_for_interp;
-      for(int i=0;i<nbOfCell;i++)
+      const mcIdType *work_conn=m1->getNodalConnectivity()->getConstPointer()+1;
+      const mcIdType *work_conn_index=m1->getNodalConnectivityIndex()->getConstPointer();
+      mcIdType *work_conn_for_interp=_conn_for_interp;
+      mcIdType *work_conn_index_for_interp=_conn_index_for_interp;
+      for(mcIdType i=0;i<nbOfCell;i++)
         {
-          int nbOfValsToCopy=work_conn_index[1]-work_conn_index[0]-1;
+          mcIdType nbOfValsToCopy=work_conn_index[1]-work_conn_index[0]-1;
           work_conn_for_interp=std::copy(work_conn,work_conn+nbOfValsToCopy,work_conn_for_interp);
           work_conn_index_for_interp[1]=work_conn_index_for_interp[0]+nbOfValsToCopy;
           work_conn_index++;
@@ -152,23 +152,23 @@ void MEDCouplingNormalizedUnstructuredMesh<SPACEDIM,MESHDIM>::prepare()
   const MEDCoupling::MEDCoupling1DGTUMesh *m2(dynamic_cast<const MEDCoupling::MEDCoupling1DGTUMesh *>(_mesh));
   if(m2)
     {
-      int nbOfCell(m2->getNumberOfCells());
-      _conn_index_for_interp=new int[nbOfCell+1];
-      const int *conni(m2->getNodalConnectivityIndex()->begin());
+      mcIdType nbOfCell=ToIdType(m2->getNumberOfCells());
+      _conn_index_for_interp=new mcIdType[nbOfCell+1];
+      const mcIdType *conni(m2->getNodalConnectivityIndex()->begin());
       std::copy(conni,conni+nbOfCell+1,_conn_index_for_interp);
-      _conn_for_interp=new int[m2->getNodalConnectivity()->getNumberOfTuples()];
+      _conn_for_interp=new mcIdType[m2->getNodalConnectivity()->getNumberOfTuples()];
       std::copy(m2->getNodalConnectivity()->begin(),m2->getNodalConnectivity()->end(),_conn_for_interp);
       return ;
     }
   const MEDCoupling::MEDCoupling1SGTUMesh *m3(dynamic_cast<const MEDCoupling::MEDCoupling1SGTUMesh *>(_mesh));
   if(m3)
     {
-      int nbOfCell(m3->getNumberOfCells()),nbNodesPerCell(m3->getNumberOfNodesPerCell());
-      _conn_index_for_interp=new int[nbOfCell+1]; _conn_index_for_interp[0]=0;
-      int *work(_conn_index_for_interp);
-      for(int i=0;i<nbOfCell;i++,work++)
+      mcIdType nbOfCell=ToIdType(m3->getNumberOfCells()),nbNodesPerCell(m3->getNumberOfNodesPerCell());
+      _conn_index_for_interp=new mcIdType[nbOfCell+1]; _conn_index_for_interp[0]=0;
+      mcIdType *work(_conn_index_for_interp);
+      for(mcIdType i=0;i<nbOfCell;i++,work++)
         work[1]=work[0]+nbNodesPerCell;
-      _conn_for_interp=new int[m3->getNodalConnectivity()->getNumberOfTuples()];
+      _conn_for_interp=new mcIdType[m3->getNodalConnectivity()->getNumberOfTuples()];
       std::copy(m3->getNodalConnectivity()->begin(),m3->getNodalConnectivity()->end(),_conn_for_interp);
       return ;
     }
index ce270590ad4a2df0bfd48eb4edbe2094f3622dad..80538490efa8f1b3e8d7ad9e63f9ebc356ea704c 100644 (file)
 
 using namespace MEDCoupling;
 
-PartDefinition *PartDefinition::New(int start, int stop, int step)
+PartDefinition *PartDefinition::New(mcIdType start, mcIdType stop, mcIdType step)
 {
   return SlicePartDefinition::New(start,stop,step);
 }
 
-PartDefinition *PartDefinition::New(DataArrayInt *listOfIds)
+PartDefinition *PartDefinition::New(DataArrayIdType *listOfIds)
 {
   return DataArrayPartDefinition::New(listOfIds);
 }
 
-PartDefinition *PartDefinition::Unserialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI)
+PartDefinition *PartDefinition::Unserialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI)
 {
   if(tinyInt.empty())
     {
@@ -57,7 +57,7 @@ PartDefinition::~PartDefinition()
 {
 }
 
-DataArrayPartDefinition *DataArrayPartDefinition::New(DataArrayInt *listOfIds)
+DataArrayPartDefinition *DataArrayPartDefinition::New(DataArrayIdType *listOfIds)
 {
   return new DataArrayPartDefinition(listOfIds);
 }
@@ -75,7 +75,7 @@ bool DataArrayPartDefinition::isEqual(const PartDefinition *other, std::string&
       what="DataArrayPartDefinition::isEqual : other is not DataArrayPartDefinition !";
       return false;
     }
-  const DataArrayInt *arr0(_arr),*arr1(otherC->_arr);
+  const DataArrayIdType *arr0(_arr),*arr1(otherC->_arr);
   if(!arr0 && !arr1)
     return true;
   if((arr0 && !arr1) || (!arr0 && arr1))
@@ -95,13 +95,13 @@ bool DataArrayPartDefinition::isEqual(const PartDefinition *other, std::string&
 
 DataArrayPartDefinition *DataArrayPartDefinition::deepCopy() const
 {
-  const DataArrayInt *arr(_arr);
+  const DataArrayIdType *arr(_arr);
   if(!arr)
     throw INTERP_KERNEL::Exception("DataArrayPartDefinition::deepCopy : array is null !");
-  return DataArrayPartDefinition::New(const_cast<DataArrayInt *>(arr));
+  return DataArrayPartDefinition::New(const_cast<DataArrayIdType *>(arr));
 }
 
-int DataArrayPartDefinition::getNumberOfElems() const
+mcIdType DataArrayPartDefinition::getNumberOfElems() const
 {
   checkInternalArrayOK();
   return _arr->getNumberOfTuples();
@@ -124,7 +124,7 @@ PartDefinition *DataArrayPartDefinition::operator+(const PartDefinition& other)
 std::string DataArrayPartDefinition::getRepr() const
 {
   std::ostringstream oss; oss << "DataArray Part : ";
-  const DataArrayInt *arr(_arr);
+  const DataArrayIdType *arr(_arr);
   if(arr)
     arr->reprQuickOverview(oss);
   else
@@ -145,19 +145,19 @@ PartDefinition *DataArrayPartDefinition::composeWith(const PartDefinition *other
   const SlicePartDefinition *spd(dynamic_cast<const SlicePartDefinition *>(other));
   if(spd)
     {//special case for optim
-      int a(0),b(0),c(0);
+      mcIdType a(0),b(0),c(0);
       spd->getSlice(a,b,c);
       if(c==1)
         {
-          MCAuto<DataArrayInt> arr(DataArrayInt::New());
+          MCAuto<DataArrayIdType> arr(DataArrayIdType::New());
           arr->alloc(_arr->getNumberOfTuples(),1);
-          std::transform(_arr->begin(),_arr->end(),arr->getPointer(),std::bind2nd(std::plus<int>(),a));
+          std::transform(_arr->begin(),_arr->end(),arr->getPointer(),std::bind2nd(std::plus<mcIdType>(),a));
           return DataArrayPartDefinition::New(arr);
         }
     }
   //
-  MCAuto<DataArrayInt> arr1(other->toDAI());
-  MCAuto<DataArrayInt> arr2(arr1->selectByTupleIdSafe(_arr->begin(),_arr->end()));
+  MCAuto<DataArrayIdType> arr1(other->toDAI());
+  MCAuto<DataArrayIdType> arr2(arr1->selectByTupleIdSafe(_arr->begin(),_arr->end()));
   return DataArrayPartDefinition::New(arr2);
 }
 
@@ -174,7 +174,7 @@ void DataArrayPartDefinition::checkConsistencyLight() const
 PartDefinition *DataArrayPartDefinition::tryToSimplify() const
 {
   checkConsistencyLight();
-  int a(0),b(0),c(0);
+  mcIdType a(0),b(0),c(0);
   if(_arr->isRange(a,b,c))
     {
       return SlicePartDefinition::New(a,b,c);
@@ -187,21 +187,21 @@ PartDefinition *DataArrayPartDefinition::tryToSimplify() const
     }
 }
 
-void DataArrayPartDefinition::serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const
+void DataArrayPartDefinition::serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const
 {
   bigArraysI.push_back(_arr);
 }
 
-DataArrayInt *DataArrayPartDefinition::toDAI() const
+DataArrayIdType *DataArrayPartDefinition::toDAI() const
 {
   checkInternalArrayOK();
-  const DataArrayInt *arr(_arr);
-  DataArrayInt *arr2(const_cast<DataArrayInt *>(arr));
+  const DataArrayIdType *arr(_arr);
+  DataArrayIdType *arr2(const_cast<DataArrayIdType *>(arr));
   arr2->incrRef();
   return arr2;
 }
 
-DataArrayPartDefinition::DataArrayPartDefinition(DataArrayInt *listOfIds)
+DataArrayPartDefinition::DataArrayPartDefinition(DataArrayIdType *listOfIds)
 {
   CheckInternalArrayOK(listOfIds);
   _arr=listOfIds;
@@ -213,7 +213,7 @@ void DataArrayPartDefinition::checkInternalArrayOK() const
   CheckInternalArrayOK(_arr);
 }
 
-void DataArrayPartDefinition::CheckInternalArrayOK(const DataArrayInt *listOfIds)
+void DataArrayPartDefinition::CheckInternalArrayOK(const DataArrayIdType *listOfIds)
 {
   if(!listOfIds || !listOfIds->isAllocated() || listOfIds->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("DataArrayPartDefinition::CheckInternalArrayOK : Input list must be not null allocated and with one components !");
@@ -221,7 +221,7 @@ void DataArrayPartDefinition::CheckInternalArrayOK(const DataArrayInt *listOfIds
 
 void DataArrayPartDefinition::updateTime() const
 {
-  if((const DataArrayInt *)_arr)
+  if((const DataArrayIdType *)_arr)
     updateTimeWith(*_arr);
 }
 
@@ -232,22 +232,22 @@ std::size_t DataArrayPartDefinition::getHeapMemorySizeWithoutChildren() const
 
 std::vector<const BigMemoryObject *> DataArrayPartDefinition::getDirectChildrenWithNull() const
 {
-  std::vector<const BigMemoryObject *> ret(1,(const DataArrayInt *)_arr);
+  std::vector<const BigMemoryObject *> ret(1,(const DataArrayIdType *)_arr);
   return ret;
 }
 
 DataArrayPartDefinition *DataArrayPartDefinition::add1(const DataArrayPartDefinition *other) const
 {
-  MCAuto<DataArrayInt> a1(toDAI()),a2(other->toDAI());
-  MCAuto<DataArrayInt> a3(DataArrayInt::Aggregate(a1,a2,0));
+  MCAuto<DataArrayIdType> a1(toDAI()),a2(other->toDAI());
+  MCAuto<DataArrayIdType> a3(DataArrayIdType::Aggregate(a1,a2,0));
   a3->sort();
   return DataArrayPartDefinition::New(a3);
 }
 
 DataArrayPartDefinition *DataArrayPartDefinition::add2(const SlicePartDefinition *other) const
 {
-  MCAuto<DataArrayInt> a1(toDAI()),a2(other->toDAI());
-  MCAuto<DataArrayInt> a3(DataArrayInt::Aggregate(a1,a2,0));
+  MCAuto<DataArrayIdType> a1(toDAI()),a2(other->toDAI());
+  MCAuto<DataArrayIdType> a3(DataArrayIdType::Aggregate(a1,a2,0));
   a3->sort();
   return DataArrayPartDefinition::New(a3);
 }
@@ -256,7 +256,7 @@ DataArrayPartDefinition::~DataArrayPartDefinition()
 {
 }
 
-SlicePartDefinition *SlicePartDefinition::New(int start, int stop, int step)
+SlicePartDefinition *SlicePartDefinition::New(mcIdType start, mcIdType stop, mcIdType step)
 {
   return new SlicePartDefinition(start,stop,step);
 }
@@ -288,12 +288,12 @@ SlicePartDefinition *SlicePartDefinition::deepCopy() const
   return SlicePartDefinition::New(_start,_stop,_step);
 }
 
-DataArrayInt *SlicePartDefinition::toDAI() const
+DataArrayIdType *SlicePartDefinition::toDAI() const
 {
-  return DataArrayInt::Range(_start,_stop,_step);
+  return DataArrayIdType::Range(_start,_stop,_step);
 }
 
-int SlicePartDefinition::getNumberOfElems() const
+mcIdType SlicePartDefinition::getNumberOfElems() const
 {
   return DataArray::GetNumberOfItemGivenBES(_start,_stop,_step,"SlicePartDefinition::getNumberOfElems");
 }
@@ -322,8 +322,8 @@ PartDefinition *SlicePartDefinition::composeWith(const PartDefinition *other) co
     throw INTERP_KERNEL::Exception("SlicePartDefinition::composeWith : input PartDef must be not NULL !");
   checkConsistencyLight();
   other->checkConsistencyLight();
-  MCAuto<DataArrayInt> arr(other->toDAI());
-  MCAuto<DataArrayInt> arr1(arr->selectByTupleIdSafeSlice(_start,_stop,_step));
+  MCAuto<DataArrayIdType> arr(other->toDAI());
+  MCAuto<DataArrayIdType> arr1(arr->selectByTupleIdSafeSlice(_start,_stop,_step));
   return DataArrayPartDefinition::New(arr1);
 }
 
@@ -346,7 +346,7 @@ PartDefinition *SlicePartDefinition::tryToSimplify() const
   return ret;
 }
 
-void SlicePartDefinition::serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const
+void SlicePartDefinition::serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const
 {
   tinyInt.push_back(_start);
   tinyInt.push_back(_stop);
@@ -360,20 +360,20 @@ std::string SlicePartDefinition::getRepr() const
   return oss.str();
 }
 
-int SlicePartDefinition::getEffectiveStop() const
+mcIdType SlicePartDefinition::getEffectiveStop() const
 {
-  int nbElems(DataArray::GetNumberOfItemGivenBES(_start,_stop,_step,"SlicePartDefinition::getEffectiveStop"));
+  mcIdType nbElems(DataArray::GetNumberOfItemGivenBES(_start,_stop,_step,"SlicePartDefinition::getEffectiveStop"));
   return _start+nbElems*_step;
 }
 
-void SlicePartDefinition::getSlice(int& start, int& stop, int& step) const
+void SlicePartDefinition::getSlice(mcIdType& start, mcIdType& stop, mcIdType& step) const
 {
   start=_start;
   stop=_stop;
   step=_step;
 }
 
-SlicePartDefinition::SlicePartDefinition(int start, int stop, int step):_start(start),_stop(stop),_step(step)
+SlicePartDefinition::SlicePartDefinition(mcIdType start, mcIdType stop, mcIdType step):_start(start),_stop(stop),_step(step)
 {
 }
 
@@ -396,8 +396,8 @@ std::vector<const BigMemoryObject *> SlicePartDefinition::getDirectChildrenWithN
 
 DataArrayPartDefinition *SlicePartDefinition::add1(const DataArrayPartDefinition *other) const
 {
-  MCAuto<DataArrayInt> a1(toDAI()),a2(other->toDAI());
-  MCAuto<DataArrayInt> a3(DataArrayInt::Aggregate(a1,a2,0));
+  MCAuto<DataArrayIdType> a1(toDAI()),a2(other->toDAI());
+  MCAuto<DataArrayIdType> a3(DataArrayIdType::Aggregate(a1,a2,0));
   a3->sort();
   return DataArrayPartDefinition::New(a3);
 }
@@ -410,8 +410,8 @@ PartDefinition *SlicePartDefinition::add2(const SlicePartDefinition *other) cons
     }
   else
     {
-      MCAuto<DataArrayInt> a1(toDAI()),a2(other->toDAI());
-      MCAuto<DataArrayInt> a3(DataArrayInt::Aggregate(a1,a2,0));
+      MCAuto<DataArrayIdType> a1(toDAI()),a2(other->toDAI());
+      MCAuto<DataArrayIdType> a3(DataArrayIdType::Aggregate(a1,a2,0));
       a3->sort();
       return DataArrayPartDefinition::New(a3);
     }
index c675c8146b3fccdf3b4e43c4872da26bee732501..bb32ef9fad89152d54ebc77c7cd6acc8fb2a5625 100644 (file)
@@ -30,19 +30,19 @@ namespace MEDCoupling
   class PartDefinition : public RefCountObject, public TimeLabel
   {
   public:
-    MEDCOUPLING_EXPORT static PartDefinition *New(int start, int stop, int step);
-    MEDCOUPLING_EXPORT static PartDefinition *New(DataArrayInt *listOfIds);
-    MEDCOUPLING_EXPORT static PartDefinition *Unserialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI);
+    MEDCOUPLING_EXPORT static PartDefinition *New(mcIdType start, mcIdType stop, mcIdType step);
+    MEDCOUPLING_EXPORT static PartDefinition *New(DataArrayIdType *listOfIds);
+    MEDCOUPLING_EXPORT static PartDefinition *Unserialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI);
     MEDCOUPLING_EXPORT virtual bool isEqual(const PartDefinition *other, std::string& what) const = 0;
     MEDCOUPLING_EXPORT virtual PartDefinition *deepCopy() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *toDAI() const = 0;
-    MEDCOUPLING_EXPORT virtual int getNumberOfElems() const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *toDAI() const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfElems() const = 0;
     MEDCOUPLING_EXPORT virtual PartDefinition *operator+(const PartDefinition& other) const = 0;
     MEDCOUPLING_EXPORT virtual std::string getRepr() const = 0;
     MEDCOUPLING_EXPORT virtual PartDefinition *composeWith(const PartDefinition *other) const = 0;
     MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const = 0;
     MEDCOUPLING_EXPORT virtual PartDefinition *tryToSimplify() const = 0;
-    MEDCOUPLING_EXPORT virtual void serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const = 0;
+    MEDCOUPLING_EXPORT virtual void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const = 0;
   protected:
     virtual ~PartDefinition();
   };
@@ -52,21 +52,21 @@ namespace MEDCoupling
   class DataArrayPartDefinition : public PartDefinition
   {
   public:
-    MEDCOUPLING_EXPORT static DataArrayPartDefinition *New(DataArrayInt *listOfIds);
+    MEDCOUPLING_EXPORT static DataArrayPartDefinition *New(DataArrayIdType *listOfIds);
     MEDCOUPLING_EXPORT bool isEqual(const PartDefinition *other, std::string& what) const;
     MEDCOUPLING_EXPORT DataArrayPartDefinition *deepCopy() const;
-    MEDCOUPLING_EXPORT DataArrayInt *toDAI() const;
-    MEDCOUPLING_EXPORT int getNumberOfElems() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *toDAI() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfElems() const;
     MEDCOUPLING_EXPORT PartDefinition *operator+(const PartDefinition& other) const;
     MEDCOUPLING_EXPORT std::string getRepr() const;
     MEDCOUPLING_EXPORT PartDefinition *composeWith(const PartDefinition *other) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT PartDefinition *tryToSimplify() const;
-    MEDCOUPLING_EXPORT void serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const;
+    MEDCOUPLING_EXPORT void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
   private:
-    DataArrayPartDefinition(DataArrayInt *listOfIds);
+    DataArrayPartDefinition(DataArrayIdType *listOfIds);
     void checkInternalArrayOK() const;
-    static void CheckInternalArrayOK(const DataArrayInt *listOfIds);
+    static void CheckInternalArrayOK(const DataArrayIdType *listOfIds);
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
@@ -80,22 +80,22 @@ namespace MEDCoupling
   class SlicePartDefinition : public PartDefinition
   {
   public:
-    MEDCOUPLING_EXPORT static SlicePartDefinition *New(int start, int stop, int step);
+    MEDCOUPLING_EXPORT static SlicePartDefinition *New(mcIdType start, mcIdType stop, mcIdType step);
     MEDCOUPLING_EXPORT bool isEqual(const PartDefinition *other, std::string& what) const;
     MEDCOUPLING_EXPORT SlicePartDefinition *deepCopy() const;
-    MEDCOUPLING_EXPORT DataArrayInt *toDAI() const;
-    MEDCOUPLING_EXPORT int getNumberOfElems() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *toDAI() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfElems() const;
     MEDCOUPLING_EXPORT PartDefinition *operator+(const PartDefinition& other) const;
     MEDCOUPLING_EXPORT std::string getRepr() const;
     MEDCOUPLING_EXPORT PartDefinition *composeWith(const PartDefinition *other) const;
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT PartDefinition *tryToSimplify() const;
-    MEDCOUPLING_EXPORT void serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const;
+    MEDCOUPLING_EXPORT void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
     //specific method
-    MEDCOUPLING_EXPORT int getEffectiveStop() const;
-    MEDCOUPLING_EXPORT void getSlice(int& start, int& stop, int& step) const;
+    MEDCOUPLING_EXPORT mcIdType getEffectiveStop() const;
+    MEDCOUPLING_EXPORT void getSlice(mcIdType& start, mcIdType& stop, mcIdType& step) const;
   private:
-    SlicePartDefinition(int start, int stop, int step);
+    SlicePartDefinition(mcIdType start, mcIdType stop, mcIdType step);
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
old mode 100644 (file)
new mode 100755 (executable)
index c9c384d..007621f
@@ -52,7 +52,7 @@ MEDCouplingPointSet::~MEDCouplingPointSet()
     _coords->decrRef();
 }
 
-int MEDCouplingPointSet::getNumberOfNodes() const
+mcIdType MEDCouplingPointSet::getNumberOfNodes() const
 {
   if(_coords)
     return _coords->getNumberOfTuples();
@@ -63,7 +63,7 @@ int MEDCouplingPointSet::getNumberOfNodes() const
 int MEDCouplingPointSet::getSpaceDimension() const
 {
   if(_coords)
-    return _coords->getNumberOfComponents();
+    return (int)_coords->getNumberOfComponents();
   else
     throw INTERP_KERNEL::Exception("Unable to get space dimension because no coordinates specified !");
 }
@@ -228,15 +228,15 @@ bool MEDCouplingPointSet::areCoordsEqualWithoutConsideringStr(const MEDCouplingP
  *  \ref  py_mcpointset_getcoordinatesofnode "Here is a Python example".
  *  \endif
  */
-void MEDCouplingPointSet::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const
+void MEDCouplingPointSet::getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const
 {
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::getCoordinatesOfNode : no coordinates array set !");
-  int nbNodes=getNumberOfNodes();
+  mcIdType nbNodes=getNumberOfNodes();
   if(nodeId>=0 && nodeId<nbNodes)
     {
       const double *cooPtr=_coords->getConstPointer();
-      int spaceDim=getSpaceDimension();
+      std::size_t spaceDim=getSpaceDimension();
       coo.insert(coo.end(),cooPtr+spaceDim*nodeId,cooPtr+spaceDim*(nodeId+1));
     }
   else
@@ -256,17 +256,17 @@ void MEDCouplingPointSet::getCoordinatesOfNode(int nodeId, std::vector<double>&
  *              returned. Put -1 to this parameter to have all nodes returned.
  *  \param [out] areNodesMerged - is set to \a true if any coincident nodes found.
  *  \param [out] newNbOfNodes - returns number of unique nodes.
- *  \return DataArrayInt * - the permutation array in "Old to New" mode. For more 
+ *  \return DataArrayIdType * - the permutation array in "Old to New" mode. For more 
  *          info on "Old to New" mode see \ref numbering. The caller
  *          is to delete this array using decrRef() as it is no more needed.
  *  \throw If the coordinates array is not set.
  */
-DataArrayInt *MEDCouplingPointSet::buildPermArrayForMergeNode(double precision, int limitNodeId, bool& areNodesMerged, int& newNbOfNodes) const
+DataArrayIdType *MEDCouplingPointSet::buildPermArrayForMergeNode(double precision, mcIdType limitNodeId, bool& areNodesMerged, mcIdType& newNbOfNodes) const
 {
-  DataArrayInt *comm,*commI;
+  DataArrayIdType *comm,*commI;
   findCommonNodes(precision,limitNodeId,comm,commI);
-  int oldNbOfNodes=getNumberOfNodes();
-  MCAuto<DataArrayInt> ret=buildNewNumberingFromCommonNodesFormat(comm,commI,newNbOfNodes);
+  mcIdType oldNbOfNodes=getNumberOfNodes();
+  MCAuto<DataArrayIdType> ret=buildNewNumberingFromCommonNodesFormat(comm,commI,newNbOfNodes);
   areNodesMerged=(oldNbOfNodes!=newNbOfNodes);
   comm->decrRef();
   commI->decrRef();
@@ -299,7 +299,7 @@ DataArrayInt *MEDCouplingPointSet::buildPermArrayForMergeNode(double precision,
  *  \ref  py_mcpointset_findcommonnodes "Here is a Python example".
  *  \endif
  */
-void MEDCouplingPointSet::findCommonNodes(double prec, int limitNodeId, DataArrayInt *&comm, DataArrayInt *&commIndex) const
+void MEDCouplingPointSet::findCommonNodes(double prec, mcIdType limitNodeId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const
 {
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findCommonNodes : no coords specified !");
@@ -313,7 +313,7 @@ void MEDCouplingPointSet::findCommonNodes(double prec, int limitNodeId, DataArra
  *         behavior is not warranted.
  *  \param [in] eps - the lowest distance between a point and a node (using infinite norm) at which the node is
  *          not returned by this method.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of nodes
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of nodes
  *          close to the point. The caller is to delete this
  *          array using decrRef() as it is no more needed.
  *  \throw If the coordinates array is not set.
@@ -323,11 +323,11 @@ void MEDCouplingPointSet::findCommonNodes(double prec, int limitNodeId, DataArra
  *  \ref  py_mcpointset_getnodeidsnearpoint "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingPointSet::getNodeIdsNearPoint(const double *pos, double eps) const
+DataArrayIdType *MEDCouplingPointSet::getNodeIdsNearPoint(const double *pos, double eps) const
 {
-  DataArrayInt *c=0,*cI=0;
+  DataArrayIdType *c=0,*cI=0;
   getNodeIdsNearPoints(pos,1,eps,c,cI);
-  MCAuto<DataArrayInt> cITmp(cI);
+  MCAuto<DataArrayIdType> cITmp(cI);
   return c;
 }
 
@@ -358,11 +358,11 @@ DataArrayInt *MEDCouplingPointSet::getNodeIdsNearPoint(const double *pos, double
  *  \ref  py_mcpointset_getnodeidsnearpoints "Here is a Python example".
  *  \endif
  */
-void MEDCouplingPointSet::getNodeIdsNearPoints(const double *pos, int nbOfPoints, double eps, DataArrayInt *& c, DataArrayInt *& cI) const
+void MEDCouplingPointSet::getNodeIdsNearPoints(const double *pos, mcIdType nbOfPoints, double eps, DataArrayIdType *& c, DataArrayIdType *& cI) const
 {
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::getNodeIdsNearPoint : no coordiantes set !");
-  int spaceDim=getSpaceDimension();
+  std::size_t spaceDim=getSpaceDimension();
   MCAuto<DataArrayDouble> points=DataArrayDouble::New();
   points->useArray(pos,false,DeallocType::CPP_DEALLOC,nbOfPoints,spaceDim);
   _coords->computeTupleIdsNearTuples(points,eps,c,cI);
@@ -373,12 +373,12 @@ void MEDCouplingPointSet::getNodeIdsNearPoints(const double *pos, int nbOfPoints
  * @param commI in param in the same format than one returned by findCommonNodes method (\ref numbering-indirect).
  * @return the old to new correspondence array.
  */
-DataArrayInt *MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat(const DataArrayInt *comm, const DataArrayInt *commIndex,
-                                                                          int& newNbOfNodes) const
+DataArrayIdType *MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat(const DataArrayIdType *comm, const DataArrayIdType *commIndex,
+                                                                          mcIdType& newNbOfNodes) const
 {
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat : no coords specified !");
-  return DataArrayInt::ConvertIndexArrayToO2N(getNumberOfNodes(),comm->begin(),commIndex->begin(),commIndex->end(),newNbOfNodes);
+  return DataArrayIdType::ConvertIndexArrayToO2N(getNumberOfNodes(),comm->begin(),commIndex->begin(),commIndex->end(),newNbOfNodes);
 }
 
 /*!
@@ -398,7 +398,7 @@ DataArrayInt *MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat(const
  *  \ref  py_mcumesh_renumberNodes "Here is a Python example".
  *  \endif
  */
-void MEDCouplingPointSet::renumberNodes(const int *newNodeNumbers, int newNbOfNodes)
+void MEDCouplingPointSet::renumberNodes(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes)
 {
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::renumberNodes : no coords specified !");
@@ -426,24 +426,24 @@ void MEDCouplingPointSet::renumberNodes(const int *newNodeNumbers, int newNbOfNo
  *  \ref  py_mcumesh_renumberNodes "Here is a Python example".
  *  \endif
  */
-void MEDCouplingPointSet::renumberNodesCenter(const int *newNodeNumbers, int newNbOfNodes)
+void MEDCouplingPointSet::renumberNodesCenter(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes)
 {
   DataArrayDouble *newCoords=DataArrayDouble::New();
-  std::vector<int> div(newNbOfNodes);
-  int spaceDim=getSpaceDimension();
+  std::vector<mcIdType> div(newNbOfNodes);
+  std::size_t spaceDim=getSpaceDimension();
   newCoords->alloc(newNbOfNodes,spaceDim);
   newCoords->copyStringInfoFrom(*_coords);
   newCoords->fillWithZero();
-  int oldNbOfNodes=getNumberOfNodes();
+  mcIdType oldNbOfNodes=getNumberOfNodes();
   double *ptToFill=newCoords->getPointer();
   const double *oldCoordsPtr=_coords->getConstPointer();
-  for(int i=0;i<oldNbOfNodes;i++)
+  for(mcIdType i=0;i<oldNbOfNodes;i++)
     {
       std::transform(oldCoordsPtr+i*spaceDim,oldCoordsPtr+(i+1)*spaceDim,ptToFill+newNodeNumbers[i]*spaceDim,
                      ptToFill+newNodeNumbers[i]*spaceDim,std::plus<double>());
       div[newNodeNumbers[i]]++;
     }
-  for(int i=0;i<newNbOfNodes;i++)
+  for(mcIdType i=0;i<newNbOfNodes;i++)
     ptToFill=std::transform(ptToFill,ptToFill+spaceDim,ptToFill,std::bind2nd(std::multiplies<double>(),1./(double)div[i]));
   setCoords(newCoords);
   newCoords->decrRef();
@@ -480,7 +480,7 @@ void MEDCouplingPointSet::getBoundingBox(double *bbox) const
 void MEDCouplingPointSet::zipCoords()
 {
   checkFullyDefined();
-  DataArrayInt *traducer=zipCoordsTraducer();
+  DataArrayIdType *traducer=zipCoordsTraducer();
   traducer->decrRef();
 }
 
@@ -501,7 +501,7 @@ double MEDCouplingPointSet::getCaracteristicDimension() const
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::getCaracteristicDimension : Coordinates not set !");
   const double *coords=_coords->getConstPointer();
-  int nbOfValues=_coords->getNbOfElems();
+  std::size_t nbOfValues=_coords->getNbOfElems();
   return std::abs(*std::max_element(coords,coords+nbOfValues,MEDCouplingCompAbs()));
 }
 
@@ -543,7 +543,7 @@ void MEDCouplingPointSet::recenterForMaxPrecision(double eps)
  */
 void MEDCouplingPointSet::rotate(const double *center, const double *vector, double angle)
 {
-  int spaceDim=getSpaceDimension();
+  std::size_t spaceDim=getSpaceDimension();
   if(spaceDim==3)
     rotate3D(center,vector,angle);
   else if(spaceDim==2)
@@ -573,10 +573,10 @@ void MEDCouplingPointSet::translate(const double *vector)
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::translate : no coordinates set !");
   double *coords=_coords->getPointer();
-  int nbNodes=getNumberOfNodes();
-  int dim=getSpaceDimension();
-  for(int i=0; i<nbNodes; i++)
-    for(int idim=0; idim<dim;idim++)
+  mcIdType nbNodes=getNumberOfNodes();
+  std::size_t dim=getSpaceDimension();
+  for(mcIdType i=0; i<nbNodes; i++)
+    for(std::size_t idim=0; idim<dim;idim++)
       coords[i*dim+idim]+=vector[idim];
   _coords->declareAsNew();
   updateTime();
@@ -603,9 +603,9 @@ void MEDCouplingPointSet::scale(const double *point, double factor)
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::scale : no coordinates set !");
   double *coords=_coords->getPointer();
-  int nbNodes=getNumberOfNodes();
-  int dim=getSpaceDimension();
-  for(int i=0;i<nbNodes;i++)
+  mcIdType nbNodes=getNumberOfNodes();
+  std::size_t dim=getSpaceDimension();
+  for(mcIdType i=0;i<nbNodes;i++)
     {
       std::transform(coords+i*dim,coords+(i+1)*dim,point,coords+i*dim,std::minus<double>());
       std::transform(coords+i*dim,coords+(i+1)*dim,coords+i*dim,std::bind2nd(std::multiplies<double>(),factor));
@@ -671,7 +671,7 @@ void MEDCouplingPointSet::tryToShareSameCoords(const MEDCouplingPointSet& other,
  * \param [in] nodeIdsToDuplicateBg begin of node ids (included) to be duplicated in connectivity only
  * \param [in] nodeIdsToDuplicateEnd end of node ids (excluded) to be duplicated in connectivity only
  */
-void MEDCouplingPointSet::duplicateNodesInCoords(const int *nodeIdsToDuplicateBg, const int *nodeIdsToDuplicateEnd)
+void MEDCouplingPointSet::duplicateNodesInCoords(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd)
 {
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::duplicateNodesInCoords : no coords set !");
@@ -695,7 +695,7 @@ void MEDCouplingPointSet::duplicateNodesInCoords(const int *nodeIdsToDuplicateBg
  *  \throw If the magnitude of \a vec is zero.
  *  \throw If \a this->getSpaceDimension() != 3.
  */
-void MEDCouplingPointSet::findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector<int>& nodes) const
+void MEDCouplingPointSet::findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const
 {
   if(getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnPlane : Invalid spacedim to be applied on this ! Must be equal to 3 !");
@@ -703,13 +703,13 @@ void MEDCouplingPointSet::findNodesOnPlane(const double *pt, const double *vec,
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnPlane : NULL point pointer specified !");
   if(!vec)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnPlane : NULL vector pointer specified !");
-  int nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfNodes=getNumberOfNodes();
   double a=vec[0],b=vec[1],c=vec[2],d=-pt[0]*vec[0]-pt[1]*vec[1]-pt[2]*vec[2];
   double deno=sqrt(a*a+b*b+c*c);
   if(deno<std::numeric_limits<double>::min())
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnPlane : vector pointer specified has norm equal to 0. !");
   const double *work=_coords->getConstPointer();
-  for(int i=0;i<nbOfNodes;i++)
+  for(mcIdType i=0;i<nbOfNodes;i++)
     {
       if(std::abs(a*work[0]+b*work[1]+c*work[2]+d)/deno<eps)
         nodes.push_back(i);
@@ -734,29 +734,29 @@ void MEDCouplingPointSet::findNodesOnPlane(const double *pt, const double *vec,
  *  \throw If the magnitude of \a vec is zero.
  *  \throw If ( \a this->getSpaceDimension() != 3 && \a this->getSpaceDimension() != 2 ).
  */
-void MEDCouplingPointSet::findNodesOnLine(const double *pt, const double *vec, double eps, std::vector<int>& nodes) const
+void MEDCouplingPointSet::findNodesOnLine(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const
 {
-  int spaceDim=getSpaceDimension();
+  std::size_t spaceDim=getSpaceDimension();
   if(spaceDim!=2 && spaceDim!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnLine : Invalid spacedim to be applied on this ! Must be equal to 2 or 3 !");
   if(!pt)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnLine : NULL point pointer specified !");
   if(!vec)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnLine : NULL vector pointer specified !");
-  int nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfNodes=getNumberOfNodes();
   double den=0.;
-  for(int i=0;i<spaceDim;i++)
+  for(std::size_t i=0;i<spaceDim;i++)
     den+=vec[i]*vec[i];
   double deno=sqrt(den);
   if(deno<10.*eps)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::findNodesOnLine : Invalid given direction vector ! Norm is too small !");
   INTERP_KERNEL::AutoPtr<double> vecn=new double[spaceDim];
-  for(int i=0;i<spaceDim;i++)
+  for(std::size_t i=0;i<spaceDim;i++)
     vecn[i]=vec[i]/deno;
   const double *work=_coords->getConstPointer();
   if(spaceDim==2)
     {
-      for(int i=0;i<nbOfNodes;i++)
+      for(mcIdType i=0;i<nbOfNodes;i++)
         {
           if(std::abs(vecn[0]*(work[1]-pt[1])-vecn[1]*(work[0]-pt[0]))<eps)
             nodes.push_back(i);
@@ -765,7 +765,7 @@ void MEDCouplingPointSet::findNodesOnLine(const double *pt, const double *vec, d
     }
   else
     {
-      for(int i=0;i<nbOfNodes;i++)
+      for(mcIdType i=0;i<nbOfNodes;i++)
         {
           double a=vecn[0]*(work[1]-pt[1])-vecn[1]*(work[0]-pt[0]);
           double b=vecn[1]*(work[2]-pt[2])-vecn[2]*(work[1]-pt[1]);
@@ -853,7 +853,7 @@ MEDCouplingPointSet *MEDCouplingPointSet::BuildInstanceFromMeshType(MEDCouplingM
 /*!
  * First step of serialization process. Used by ParaMEDMEM and MEDCouplingCorba to transfert data between process.
  */
-void MEDCouplingPointSet::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingPointSet::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
   int it,order;
   double time=getTime(it,order);
@@ -894,7 +894,7 @@ void MEDCouplingPointSet::getTinySerializationInformation(std::vector<double>& t
 /*!
  * Third and final step of serialization process.
  */
-void MEDCouplingPointSet::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCouplingPointSet::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
   if(_coords)
     {
@@ -909,7 +909,7 @@ void MEDCouplingPointSet::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) con
  * Second step of serialization process.
  * @param tinyInfo must be equal to the result given by getTinySerializationInformation method.
  */
-void MEDCouplingPointSet::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCouplingPointSet::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
   if(tinyInfo[2]>=0 && tinyInfo[1]>=1)
     {
@@ -926,7 +926,7 @@ void MEDCouplingPointSet::resizeForUnserialization(const std::vector<int>& tinyI
  * Second and final unserialization process.
  * @param tinyInfo must be equal to the result given by getTinySerializationInformation method.
  */
-void MEDCouplingPointSet::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
+void MEDCouplingPointSet::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
 {
   if(tinyInfo[2]>=0 && tinyInfo[1]>=1)
     {
@@ -935,16 +935,16 @@ void MEDCouplingPointSet::unserialization(const std::vector<double>& tinyInfoD,
       setDescription(littleStrings[1]);
       a2->setName(littleStrings[2]);
       setTimeUnit(littleStrings[3]);
-      for(int i=0;i<tinyInfo[1];i++)
+      for(mcIdType i=0;i<tinyInfo[1];i++)
         getCoords()->setInfoOnComponent(i,littleStrings[i+4]);
-      setTime(tinyInfoD[0],tinyInfo[3],tinyInfo[4]);
+      setTime(tinyInfoD[0],FromIdType<int>(tinyInfo[3]),FromIdType<int>(tinyInfo[4]));
     }
   else
     {
       setName(littleStrings[0]);
       setDescription(littleStrings[1]);
       setTimeUnit(littleStrings[2]);
-      setTime(tinyInfoD[0],tinyInfo[3],tinyInfo[4]);
+      setTime(tinyInfoD[0],FromIdType<int>(tinyInfo[3]),FromIdType<int>(tinyInfo[4]));
     }
 }
 
@@ -1023,7 +1023,7 @@ bool MEDCouplingPointSet::intersectsBoundingBox(const INTERP_KERNEL::DirectedBou
 void MEDCouplingPointSet::rotate3D(const double *center, const double *vect, double angle)
 {
   double *coords(_coords->getPointer());
-  int nbNodes(getNumberOfNodes());
+  mcIdType nbNodes(getNumberOfNodes());
   DataArrayDouble::Rotate3DAlg(center,vect,angle,nbNodes,coords,coords);
 }
 
@@ -1034,11 +1034,11 @@ void MEDCouplingPointSet::rotate3D(const double *center, const double *vect, dou
  * \param [in] srcMesh - source mesh
  * \param [in] trgMesh - target mesh
  * \param [in] eps - precision of the detection
- * \return DataArrayInt * - An array that gives for each cell of \a trgMesh, how many cells in \a srcMesh (regarding the precision of detection \a eps) can interacts.
+ * \return DataArrayIdType * - An array that gives for each cell of \a trgMesh, how many cells in \a srcMesh (regarding the precision of detection \a eps) can interacts.
  * 
  * \throw If \a srcMesh and \a trgMesh have not the same space dimension.
  */
-DataArrayInt *MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps)
+DataArrayIdType *MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps)
 {
   if(!srcMesh || !trgMesh)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells : the input meshes must be not NULL !");
@@ -1056,7 +1056,7 @@ DataArrayInt *MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells(const MED
  *  \return MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to
  *         delete this mesh using decrRef() as it is no more needed. 
  */
-MEDCouplingMesh *MEDCouplingPointSet::buildPart(const int *start, const int *end) const
+MEDCouplingMesh *MEDCouplingPointSet::buildPart(const mcIdType *start, const mcIdType *end) const
 {
   return buildPartOfMySelf(start,end,true);
 }
@@ -1069,12 +1069,12 @@ MEDCouplingMesh *MEDCouplingPointSet::buildPart(const int *start, const int *end
  *  \param [in] start - an array of cell ids to include to the result mesh.
  *  \param [in] end - specifies the end of the array \a start, so that
  *              the last value of \a start is \a end[ -1 ].
- *  \param [out] arr - a new DataArrayInt that is the "Old to New" renumbering
+ *  \param [out] arr - a new DataArrayIdType that is the "Old to New" renumbering
  *         map. The caller is to delete this array using decrRef() as it is no more needed.
  *  \return MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to
  *         delete this mesh using decrRef() as it is no more needed. 
  */
-MEDCouplingMesh *MEDCouplingPointSet::buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const
+MEDCouplingMesh *MEDCouplingPointSet::buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const
 {
   MCAuto<MEDCouplingPointSet> ret=buildPartOfMySelf(start,end,true);
   arr=ret->zipCoordsTraducer();
@@ -1092,9 +1092,9 @@ MEDCouplingMesh *MEDCouplingPointSet::buildPartAndReduceNodes(const int *start,
  *
  * \sa MEDCouplingUMesh::buildPartOfMySelfSlice
  */
-MEDCouplingMesh *MEDCouplingPointSet::buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const
+MEDCouplingMesh *MEDCouplingPointSet::buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const
 {
-  if(beginCellIds==0 && endCellIds==getNumberOfCells() && stepCellIds==1)
+  if(beginCellIds==0 && endCellIds==ToIdType(getNumberOfCells()) && stepCellIds==1)
     {
       MEDCouplingMesh *ret(const_cast<MEDCouplingPointSet *>(this));
       ret->incrRef();
@@ -1116,7 +1116,7 @@ MEDCouplingMesh *MEDCouplingPointSet::buildPartRange(int beginCellIds, int endCe
  * 
  * \sa MEDCouplingUMesh::buildPartOfMySelfSlice
  */
-MEDCouplingMesh *MEDCouplingPointSet::buildPartRangeAndReduceNodes(int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt*& arr) const
+MEDCouplingMesh *MEDCouplingPointSet::buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const
 {
   MCAuto<MEDCouplingPointSet> ret(buildPartOfMySelfSlice(beginCellIds,endCellIds,stepCellIds,true));
   arr=ret->zipCoordsTraducer();
@@ -1129,7 +1129,7 @@ MEDCouplingMesh *MEDCouplingPointSet::buildPartRangeAndReduceNodes(int beginCell
 void MEDCouplingPointSet::rotate2D(const double *center, double angle)
 {
   double *coords(_coords->getPointer());
-  int nbNodes(getNumberOfNodes());
+  mcIdType nbNodes(getNumberOfNodes());
   DataArrayDouble::Rotate2DAlg(center,angle,nbNodes,coords,coords);
 }
 
@@ -1140,7 +1140,7 @@ class DummyClsMCPS
 public:
   static const int MY_SPACEDIM=3;
   static const int MY_MESHDIM=2;
-  typedef int MyConnType;
+  typedef mcIdType MyConnType;
   static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE;
 };
 
@@ -1152,21 +1152,21 @@ public:
  * If spaceDim==3 a projection will be done for each nodes on the middle plane containing these all nodes in [startConn;endConn).
  * And after each projected nodes are moved to Oxy plane in order to consider these nodes as 2D nodes.
  */
-void MEDCouplingPointSet::project2DCellOnXY(const int *startConn, const int *endConn, std::vector<double>& res) const
+void MEDCouplingPointSet::project2DCellOnXY(const mcIdType *startConn, const mcIdType *endConn, std::vector<double>& res) const
 {
   const double *coords(_coords->getConstPointer());
-  int spaceDim(getSpaceDimension());
-  for(const int *it=startConn;it!=endConn;it++)
+  std::size_t spaceDim(getSpaceDimension());
+  for(const mcIdType *it=startConn;it!=endConn;it++)
     res.insert(res.end(),coords+spaceDim*(*it),coords+spaceDim*(*it+1));
   if(spaceDim==2)
     return ;
   if(spaceDim==3)
     {
       std::vector<double> cpy(res);
-      int nbNodes=(int)std::distance(startConn,endConn);
-      INTERP_KERNEL::PlanarIntersector<DummyClsMCPS,int>::Projection(&res[0],&cpy[0],nbNodes,nbNodes,1.e-12,0./*max distance*/,-1./*min dot*/,0.,true);
+      mcIdType nbNodes=ToIdType(std::distance(startConn,endConn));
+      INTERP_KERNEL::PlanarIntersector<DummyClsMCPS,mcIdType>::Projection(&res[0],&cpy[0],nbNodes,nbNodes,1.e-12,0./*max distance*/,-1./*min dot*/,0.,true);
       res.resize(2*nbNodes);
-      for(int i=0;i<nbNodes;i++)
+      for(mcIdType i=0;i<nbNodes;i++)
         {
           res[2*i]=cpy[3*i];
           res[2*i+1]=cpy[3*i+1];
@@ -1204,11 +1204,11 @@ bool MEDCouplingPointSet::isButterfly2DCell(const std::vector<double>& res, bool
  * This method compares 2 cells coming from two unstructured meshes : \a this and \a other.
  * This method compares 2 cells having the same id 'cellId' in \a this and \a other.
  */
-bool MEDCouplingPointSet::areCellsFrom2MeshEqual(const MEDCouplingPointSet *other, int cellId, double prec) const
+bool MEDCouplingPointSet::areCellsFrom2MeshEqual(const MEDCouplingPointSet *other, mcIdType cellId, double prec) const
 {
   if(getTypeOfCell(cellId)!=other->getTypeOfCell(cellId))
     return false;
-  std::vector<int> c1,c2;
+  std::vector<mcIdType> c1,c2;
   getNodeIdsOfCell(cellId,c1);
   other->getNodeIdsOfCell(cellId,c2);
   std::size_t sz(c1.size());
@@ -1249,21 +1249,21 @@ void MEDCouplingPointSet::tryToShareSameCoordsPermute(const MEDCouplingPointSet&
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::tryToShareSameCoordsPermute : No coords specified in other !");
   if(!_coords)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::tryToShareSameCoordsPermute : No coords specified in this whereas there is any in other !");
-  int otherNbOfNodes=other.getNumberOfNodes();
+  mcIdType otherNbOfNodes=other.getNumberOfNodes();
   MCAuto<DataArrayDouble> newCoords=MergeNodesArray(&other,this);
   _coords->incrRef();
   MCAuto<DataArrayDouble> oldCoords=_coords;
   setCoords(newCoords);
   bool areNodesMerged;
-  int newNbOfNodes;
-  MCAuto<DataArrayInt> da=buildPermArrayForMergeNode(epsilon,otherNbOfNodes,areNodesMerged,newNbOfNodes);
+  mcIdType newNbOfNodes;
+  MCAuto<DataArrayIdType> da=buildPermArrayForMergeNode(epsilon,otherNbOfNodes,areNodesMerged,newNbOfNodes);
   if(!areNodesMerged)
     {
       setCoords(oldCoords);
       throw INTERP_KERNEL::Exception("MEDCouplingPointSet::tryToShareSameCoordsPermute fails : no nodes are mergeable with specified given epsilon !");
     }
-  int maxId=*std::max_element(da->getConstPointer(),da->getConstPointer()+otherNbOfNodes);
-  const int *pt=std::find_if(da->getConstPointer()+otherNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<int>(),maxId));
+  mcIdType maxId=*std::max_element(da->getConstPointer(),da->getConstPointer()+otherNbOfNodes);
+  const mcIdType *pt=std::find_if(da->getConstPointer()+otherNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<mcIdType>(),maxId));
   if(pt!=da->getConstPointer()+da->getNbOfElems())
     {
       setCoords(oldCoords);
@@ -1274,7 +1274,7 @@ void MEDCouplingPointSet::tryToShareSameCoordsPermute(const MEDCouplingPointSet&
   setCoords(coords);
 }
 
-MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelf(const int *begin, const int *end, bool keepCoords) const
+MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelf(const mcIdType *begin, const mcIdType *end, bool keepCoords) const
 {
   MCAuto<MEDCouplingPointSet> ret=buildPartOfMySelfKeepCoords(begin,end);
   if(!keepCoords)
@@ -1282,7 +1282,7 @@ MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelf(const int *begin, co
   return ret.retn();
 }
 
-MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelfSlice(int start, int end, int step, bool keepCoords) const
+MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords) const
 {
   MCAuto<MEDCouplingPointSet> ret=buildPartOfMySelfKeepCoordsSlice(start,end,step);
   if(!keepCoords)
@@ -1313,11 +1313,11 @@ MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelfSlice(int start, int
  *  \ref  py_mcumesh_buildPartOfMySelfNode "Here is a Python example".
  *  \endif
  */
-MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelfNode(const int *begin, const int *end, bool fullyIn) const
+MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelfNode(const mcIdType *begin, const mcIdType *end, bool fullyIn) const
 {
-  DataArrayInt *cellIdsKept=0;
+  DataArrayIdType *cellIdsKept=0;
   fillCellIdsToKeepFromNodeIds(begin,end,fullyIn,cellIdsKept);
-  MCAuto<DataArrayInt> cellIdsKept2(cellIdsKept);
+  MCAuto<DataArrayIdType> cellIdsKept2(cellIdsKept);
   return buildPartOfMySelf(cellIdsKept->begin(),cellIdsKept->end(),true);
 }
 
@@ -1340,7 +1340,7 @@ MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelfNode(const int *begin
  *  \param [in] startCellId - specifies the cell id at which search for equal cells
  *         starts. By default it is 0, which means that all cells in \a this will be
  *         scanned. 
- *  \return DataArrayInt - a new instance of DataArrayInt, of length \a
+ *  \return DataArrayIdType - a new instance of DataArrayIdType, of length \a
  *           this->getNumberOfCells() before call of this method. The caller is to
  *           delete this array using decrRef() as it is no more needed. 
  *  \throw If the coordinates array is not set.
@@ -1352,15 +1352,15 @@ MEDCouplingPointSet *MEDCouplingPointSet::buildPartOfMySelfNode(const int *begin
  *  \ref  py_mcumesh_zipConnectivityTraducer "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingPointSet::zipConnectivityTraducer(int compType, int startCellId)
+DataArrayIdType *MEDCouplingPointSet::zipConnectivityTraducer(int compType, mcIdType startCellId)
 {
-  DataArrayInt *commonCells=0,*commonCellsI=0;
+  DataArrayIdType *commonCells=0,*commonCellsI=0;
   findCommonCells(compType,startCellId,commonCells,commonCellsI);
-  MCAuto<DataArrayInt> commonCellsTmp(commonCells),commonCellsITmp(commonCellsI);
-  int newNbOfCells=-1;
-  MCAuto<DataArrayInt> ret=DataArrayInt::ConvertIndexArrayToO2N(getNumberOfCells(),commonCells->begin(),commonCellsI->begin(),
+  MCAuto<DataArrayIdType> commonCellsTmp(commonCells),commonCellsITmp(commonCellsI);
+  mcIdType newNbOfCells=-1;
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::ConvertIndexArrayToO2N(ToIdType(getNumberOfCells()),commonCells->begin(),commonCellsI->begin(),
                                                                                                           commonCellsI->end(),newNbOfCells);
-  MCAuto<DataArrayInt> ret2=ret->invertArrayO2N2N2O(newNbOfCells);
+  MCAuto<DataArrayIdType> ret2=ret->invertArrayO2N2N2O(newNbOfCells);
   MCAuto<MEDCouplingPointSet> self=buildPartOfMySelf(ret2->begin(),ret2->end(),true);
   shallowCopyConnectivityFrom(self);
   return ret.retn();
@@ -1374,7 +1374,7 @@ DataArrayInt *MEDCouplingPointSet::zipConnectivityTraducer(int compType, int sta
 bool MEDCouplingPointSet::areAllNodesFetched() const
 {
   checkFullyDefined();
-  int nbNodes(getNumberOfNodes());
+  mcIdType nbNodes(getNumberOfNodes());
   std::vector<bool> fetchedNodes(nbNodes,false);
   computeNodeIdsAlg(fetchedNodes);
   return std::find(fetchedNodes.begin(),fetchedNodes.end(),false)==fetchedNodes.end();
@@ -1411,7 +1411,7 @@ bool MEDCouplingPointSet::areAllNodesFetched() const
  *  \endif
  */
 void MEDCouplingPointSet::checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                               DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const
+                                               DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const
 {
   if(!other)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::checkDeepEquivalWith : input is null !");
@@ -1420,28 +1420,28 @@ void MEDCouplingPointSet::checkDeepEquivalWith(const MEDCouplingMesh *other, int
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::checkDeepEquivalWith : other is not a PointSet mesh !");
   MCAuto<MEDCouplingPointSet> m=dynamic_cast<MEDCouplingPointSet *>(mergeMyselfWith(otherC));
   bool areNodesMerged;
-  int newNbOfNodes;
-  int oldNbOfNodes=getNumberOfNodes();
-  MCAuto<DataArrayInt> da=m->buildPermArrayForMergeNode(prec,oldNbOfNodes,areNodesMerged,newNbOfNodes);
+  mcIdType newNbOfNodes;
+  mcIdType oldNbOfNodes=getNumberOfNodes();
+  MCAuto<DataArrayIdType> da=m->buildPermArrayForMergeNode(prec,oldNbOfNodes,areNodesMerged,newNbOfNodes);
   //mergeNodes
   if(!areNodesMerged && oldNbOfNodes != 0)
     throw INTERP_KERNEL::Exception("checkDeepEquivalWith : Nodes are incompatible ! ");
-  const int *pt=std::find_if(da->getConstPointer()+oldNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<int>(),oldNbOfNodes-1));
+  const mcIdType *pt=std::find_if(da->getConstPointer()+oldNbOfNodes,da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<mcIdType>(),oldNbOfNodes-1));
   if(pt!=da->getConstPointer()+da->getNbOfElems())
     throw INTERP_KERNEL::Exception("checkDeepEquivalWith : some nodes in other are not in this !");
   m->renumberNodes(da->getConstPointer(),newNbOfNodes);
   //
-  MCAuto<DataArrayInt> nodeCor2=da->subArray(oldNbOfNodes);
+  MCAuto<DataArrayIdType> nodeCor2=da->subArray(oldNbOfNodes);
   da=m->mergeNodes(prec,areNodesMerged,newNbOfNodes);
   //
   da=m->zipConnectivityTraducer(cellCompPol);
-  int nbCells=getNumberOfCells();
-  if (nbCells != other->getNumberOfCells())
+  mcIdType nbCells=ToIdType(getNumberOfCells());
+  if (nbCells != ToIdType(other->getNumberOfCells()))
     throw INTERP_KERNEL::Exception("checkDeepEquivalWith : some cells in other are not in this !");
-  int dan(da->getNumberOfTuples());
+  mcIdType dan(da->getNumberOfTuples());
   if (dan)
     {
-      MCAuto<DataArrayInt> da1(DataArrayInt::New()),da2(DataArrayInt::New());
+      MCAuto<DataArrayIdType> da1(DataArrayIdType::New()),da2(DataArrayIdType::New());
       da1->alloc(dan/2,1); da2->alloc(dan/2,1);
       std::copy(da->getConstPointer(), da->getConstPointer()+dan/2, da1->getPointer());
       std::copy(da->getConstPointer()+dan/2, da->getConstPointer()+dan, da2->getPointer());
@@ -1449,7 +1449,7 @@ void MEDCouplingPointSet::checkDeepEquivalWith(const MEDCouplingMesh *other, int
       if (!da1->isEqualWithoutConsideringStr(*da2))
         throw INTERP_KERNEL::Exception("checkDeepEquivalWith : some cells in other are not in this !");
     }
-  MCAuto<DataArrayInt> cellCor2=da->selectByTupleIdSafeSlice(nbCells,da->getNbOfElems(),1);
+  MCAuto<DataArrayIdType> cellCor2=da->selectByTupleIdSafeSlice(nbCells,ToIdType(da->getNbOfElems()),1);
   nodeCor=nodeCor2->isIota(nodeCor2->getNumberOfTuples())?0:nodeCor2.retn();
   cellCor=cellCor2->isIota(cellCor2->getNumberOfTuples())?0:cellCor2.retn();
 }
@@ -1477,7 +1477,7 @@ void MEDCouplingPointSet::checkDeepEquivalWith(const MEDCouplingMesh *other, int
  * \endif
  */
 void MEDCouplingPointSet::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                       DataArrayInt *&cellCor) const
+                                                       DataArrayIdType *&cellCor) const
 {
   if(!other)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::checkDeepEquivalOnSameNodesWith : input is null !");
@@ -1487,14 +1487,14 @@ void MEDCouplingPointSet::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh
   if(_coords!=otherC->_coords)
     throw INTERP_KERNEL::Exception("checkDeepEquivalOnSameNodesWith : meshes do not share the same coordinates ! Use tryToShareSameCoordinates or call checkDeepEquivalWith !");
   MCAuto<MEDCouplingPointSet> m=mergeMyselfWithOnSameCoords(otherC);
-  MCAuto<DataArrayInt> da=m->zipConnectivityTraducer(cellCompPol);
-  int maxId=*std::max_element(da->getConstPointer(),da->getConstPointer()+getNumberOfCells());
-  const int *pt=std::find_if(da->getConstPointer()+getNumberOfCells(),da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<int>(),maxId));
+  MCAuto<DataArrayIdType> da=m->zipConnectivityTraducer(cellCompPol);
+  mcIdType maxId=*std::max_element(da->getConstPointer(),da->getConstPointer()+getNumberOfCells());
+  const mcIdType *pt=std::find_if(da->getConstPointer()+getNumberOfCells(),da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<mcIdType>(),maxId));
   if(pt!=da->getConstPointer()+da->getNbOfElems())
     {
       throw INTERP_KERNEL::Exception("checkDeepEquivalOnSameNodesWith : some cells in other are not in this !");
     }
-  MCAuto<DataArrayInt> cellCor2=da->selectByTupleIdSafeSlice(getNumberOfCells(),da->getNbOfElems(),1);
+  MCAuto<DataArrayIdType> cellCor2=da->selectByTupleIdSafeSlice(ToIdType(getNumberOfCells()),ToIdType(da->getNbOfElems()),1);
   cellCor=cellCor2->isIota(cellCor2->getNumberOfTuples())?0:cellCor2.retn();
 }
 
@@ -1505,7 +1505,7 @@ void MEDCouplingPointSet::checkFastEquivalWith(const MEDCouplingMesh *other, dou
   const MEDCouplingPointSet *otherC=dynamic_cast<const MEDCouplingPointSet *>(other);
   if(!otherC)
     throw INTERP_KERNEL::Exception("MEDCouplingPointSet::checkFastEquivalWith : fails because other is not a pointset mesh !");
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=ToIdType(getNumberOfCells());
   if(nbOfCells<1)
     return ;
   bool status=true;
@@ -1523,7 +1523,7 @@ void MEDCouplingPointSet::checkFastEquivalWith(const MEDCouplingMesh *other, dou
  *  \param [in] fullyIn - if \c true, then cells whose all nodes are in the
  *         array \a begin are returned only, else cells whose any node is in the
  *         array \a begin are returned.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of found
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of found
  *         cells. The caller is to delete this array using decrRef() as it is no more
  *         needed. 
  *  \throw If the coordinates array is not set.
@@ -1537,9 +1537,9 @@ void MEDCouplingPointSet::checkFastEquivalWith(const MEDCouplingMesh *other, dou
  *  \ref  py_mcumesh_getCellIdsLyingOnNodes "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingPointSet::getCellIdsLyingOnNodes(const int *begin, const int *end, bool fullyIn) const
+DataArrayIdType *MEDCouplingPointSet::getCellIdsLyingOnNodes(const mcIdType *begin, const mcIdType *end, bool fullyIn) const
 {
-  DataArrayInt *cellIdsKept=0;
+  DataArrayIdType *cellIdsKept=0;
   fillCellIdsToKeepFromNodeIds(begin,end,fullyIn,cellIdsKept);
   cellIdsKept->setName(getName());
   return cellIdsKept;
@@ -1551,7 +1551,7 @@ DataArrayInt *MEDCouplingPointSet::getCellIdsLyingOnNodes(const int *begin, cons
  * as last input argument).
  *  \param [in] partBg - the array of node ids.
  *  \param [in] partEnd - a pointer to a (last+1)-th element of \a partBg.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of found
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of found
  *          cells. The caller is to delete this array using decrRef() as it is no
  *          more needed.
  *  \throw If the coordinates array is not set.
@@ -1565,7 +1565,7 @@ DataArrayInt *MEDCouplingPointSet::getCellIdsLyingOnNodes(const int *begin, cons
  *  \ref  py_mcumesh_getCellIdsFullyIncludedInNodeIds "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingPointSet::getCellIdsFullyIncludedInNodeIds(const int *partBg, const int *partEnd) const
+DataArrayIdType *MEDCouplingPointSet::getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const
 {
   return getCellIdsLyingOnNodes(partBg,partEnd,true);
 }
@@ -1574,7 +1574,7 @@ DataArrayInt *MEDCouplingPointSet::getCellIdsFullyIncludedInNodeIds(const int *p
  * Removes unused nodes (the node coordinates array is shorten) and returns an array
  * mapping between new and old node ids in "Old to New" mode. -1 values in the returned
  * array mean that the corresponding old node is no more used. 
- *  \return DataArrayInt * - a new instance of DataArrayInt of length \a
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType of length \a
  *           this->getNumberOfNodes() before call of this method. The caller is to
  *           delete this array using decrRef() as it is no more needed. 
  *  \throw If the coordinates array is not set.
@@ -1586,10 +1586,10 @@ DataArrayInt *MEDCouplingPointSet::getCellIdsFullyIncludedInNodeIds(const int *p
  *  \ref  py_mcumesh_zipCoordsTraducer "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingPointSet::zipCoordsTraducer()
+DataArrayIdType *MEDCouplingPointSet::zipCoordsTraducer()
 {
-  int newNbOfNodes=-1;
-  MCAuto<DataArrayInt> traducer=getNodeIdsInUse(newNbOfNodes);
+  mcIdType newNbOfNodes=-1;
+  MCAuto<DataArrayIdType> traducer=getNodeIdsInUse(newNbOfNodes);
   renumberNodes(traducer->getConstPointer(),newNbOfNodes);
   return traducer.retn();
 }
@@ -1601,7 +1601,7 @@ DataArrayInt *MEDCouplingPointSet::zipCoordsTraducer()
  *              considered not coincident.
  *  \param [out] areNodesMerged - is set to \c true if any coincident nodes removed.
  *  \param [out] newNbOfNodes - number of nodes remaining after the removal.
- *  \return DataArrayInt * - the permutation array in "Old to New" mode. For more 
+ *  \return DataArrayIdType * - the permutation array in "Old to New" mode. For more 
  *          info on "Old to New" mode see \ref numbering. The caller
  *          is to delete this array using decrRef() as it is no more needed.
  *  \throw If the coordinates array is not set.
@@ -1612,9 +1612,9 @@ DataArrayInt *MEDCouplingPointSet::zipCoordsTraducer()
  *  \ref  py_mcumesh_mergeNodes "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingPointSet::mergeNodes(double precision, bool& areNodesMerged, int& newNbOfNodes)
+DataArrayIdType *MEDCouplingPointSet::mergeNodes(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes)
 {
-  MCAuto<DataArrayInt> ret=buildPermArrayForMergeNode(precision,-1,areNodesMerged,newNbOfNodes);
+  MCAuto<DataArrayIdType> ret=buildPermArrayForMergeNode(precision,-1,areNodesMerged,newNbOfNodes);
   if(areNodesMerged)
     renumberNodes(ret->begin(),newNbOfNodes);
   return ret.retn();
@@ -1628,7 +1628,7 @@ DataArrayInt *MEDCouplingPointSet::mergeNodes(double precision, bool& areNodesMe
  *              considered not coincident.
  *  \param [out] areNodesMerged - is set to \c true if any coincident nodes removed.
  *  \param [out] newNbOfNodes - number of nodes remaining after the removal.
- *  \return DataArrayInt * - the permutation array in "Old to New" mode. For more 
+ *  \return DataArrayIdType * - the permutation array in "Old to New" mode. For more 
  *          info on "Old to New" mode see \ref numbering. The caller
  *          is to delete this array using decrRef() as it is no more needed.
  *  \throw If the coordinates array is not set.
@@ -1639,9 +1639,9 @@ DataArrayInt *MEDCouplingPointSet::mergeNodes(double precision, bool& areNodesMe
  *  \ref  py_mcumesh_mergeNodes "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingPointSet::mergeNodesCenter(double precision, bool& areNodesMerged, int& newNbOfNodes)
+DataArrayIdType *MEDCouplingPointSet::mergeNodesCenter(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes)
 {
-  DataArrayInt *ret=buildPermArrayForMergeNode(precision,-1,areNodesMerged,newNbOfNodes);
+  DataArrayIdType *ret=buildPermArrayForMergeNode(precision,-1,areNodesMerged,newNbOfNodes);
   if(areNodesMerged)
     renumberNodesCenter(ret->getConstPointer(),newNbOfNodes);
   return ret;
index 7d7d38e6388429cbfb38fe0cde975396756119ce..d76dc55c675c81957cc66e2860bbb56a19dd91a6 100644 (file)
@@ -35,7 +35,7 @@ namespace INTERP_KERNEL
 
 namespace MEDCoupling
 {
-  class DataArrayInt;
+  class DataArrayIdType;
   class DataArrayDouble;
   
   /*!
@@ -56,7 +56,7 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
-    MEDCOUPLING_EXPORT int getNumberOfNodes() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
     MEDCOUPLING_EXPORT int getSpaceDimension() const;
     MEDCOUPLING_EXPORT void setCoords(const DataArrayDouble *coords);
     MEDCOUPLING_EXPORT const DataArrayDouble *getCoords() const { return _coords; }
@@ -68,26 +68,26 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                 DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
+                                                 DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
     MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
-                                                            DataArrayInt *&cellCor) const;
+                                                            DataArrayIdType *&cellCor) const;
     MEDCOUPLING_EXPORT bool areCoordsEqualIfNotWhy(const MEDCouplingPointSet& other, double prec, std::string& reason) const;
     MEDCOUPLING_EXPORT bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const;
     MEDCOUPLING_EXPORT bool areCoordsEqualWithoutConsideringStr(const MEDCouplingPointSet& other, double prec) const;
     MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *deepCopyConnectivityOnly() const = 0;
     MEDCOUPLING_EXPORT virtual void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *mergeNodes(double precision, bool& areNodesMerged, int& newNbOfNodes);
-    MEDCOUPLING_EXPORT virtual DataArrayInt *mergeNodesCenter(double precision, bool& areNodesMerged, int& newNbOfNodes);
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *mergeNodes(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes);
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *mergeNodesCenter(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes);
     MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const = 0;
     MEDCOUPLING_EXPORT virtual void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const = 0;
-    MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
-    MEDCOUPLING_EXPORT DataArrayInt *buildPermArrayForMergeNode(double precision, int limitNodeId, bool& areNodesMerged, int& newNbOfNodes) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getNodeIdsNearPoint(const double *pos, double eps) const;
-    MEDCOUPLING_EXPORT void getNodeIdsNearPoints(const double *pos, int nbOfPoints, double eps, DataArrayInt *& c, DataArrayInt *& cI) const;
-    MEDCOUPLING_EXPORT void findCommonNodes(double prec, int limitNodeId, DataArrayInt *&comm, DataArrayInt *&commIndex) const;
-    MEDCOUPLING_EXPORT virtual void findCommonCells(int compType, int startCellId, DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr) const = 0;
-    MEDCOUPLING_EXPORT DataArrayInt *buildNewNumberingFromCommonNodesFormat(const DataArrayInt *comm, const DataArrayInt *commIndex,
-                                                                            int& newNbOfNodes) const;
+    MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *buildPermArrayForMergeNode(double precision, mcIdType limitNodeId, bool& areNodesMerged, mcIdType& newNbOfNodes) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsNearPoint(const double *pos, double eps) const;
+    MEDCOUPLING_EXPORT void getNodeIdsNearPoints(const double *pos, mcIdType nbOfPoints, double eps, DataArrayIdType *& c, DataArrayIdType *& cI) const;
+    MEDCOUPLING_EXPORT void findCommonNodes(double prec, mcIdType limitNodeId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const;
+    MEDCOUPLING_EXPORT virtual void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const = 0;
+    MEDCOUPLING_EXPORT DataArrayIdType *buildNewNumberingFromCommonNodesFormat(const DataArrayIdType *comm, const DataArrayIdType *commIndex,
+                                                                            mcIdType& newNbOfNodes) const;
     MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
     MEDCOUPLING_EXPORT void zipCoords();
     MEDCOUPLING_EXPORT double getCaracteristicDimension() const;
@@ -97,63 +97,63 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void scale(const double *point, double factor);
     MEDCOUPLING_EXPORT void changeSpaceDimension(int newSpaceDim, double dftVal=0.);
     MEDCOUPLING_EXPORT void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon);
-    MEDCOUPLING_EXPORT void duplicateNodesInCoords(const int *nodeIdsToDuplicateBg, const int *nodeIdsToDuplicateEnd);
+    MEDCOUPLING_EXPORT void duplicateNodesInCoords(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd);
     MEDCOUPLING_EXPORT virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon);
-    MEDCOUPLING_EXPORT void findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector<int>& nodes) const;
-    MEDCOUPLING_EXPORT void findNodesOnLine(const double *pt, const double *vec, double eps, std::vector<int>& nodes) const;
+    MEDCOUPLING_EXPORT void findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const;
+    MEDCOUPLING_EXPORT void findNodesOnLine(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const;
     MEDCOUPLING_EXPORT static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2);
     MEDCOUPLING_EXPORT static DataArrayDouble *MergeNodesArray(const std::vector<const MEDCouplingPointSet *>& ms);
     MEDCOUPLING_EXPORT static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type);
-    MEDCOUPLING_EXPORT static DataArrayInt *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps);
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const int *start, const int *end) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartRangeAndReduceNodes(int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt*& arr) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getCellIdsFullyIncludedInNodeIds(const int *partBg, const int *partEnd) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getCellIdsLyingOnNodes(const int *begin, const int *end, bool fullyIn) const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords=true) const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfSlice(int start, int end, int step, bool keepCoords=true) const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const int *begin, const int *end) const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const = 0;
-    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildFacePartOfMySelfNode(const int *start, const int *end, bool fullyIn) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *findBoundaryNodes() const = 0;
+    MEDCOUPLING_EXPORT static DataArrayIdType *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps);
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getCellIdsLyingOnNodes(const mcIdType *begin, const mcIdType *end, bool fullyIn) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelf(const mcIdType *start, const mcIdType *end, bool keepCoords=true) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords=true) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const = 0;
+    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const = 0;
+    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const;
+    MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildFacePartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *findBoundaryNodes() const = 0;
     MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const = 0;
-    MEDCOUPLING_EXPORT virtual int getNumberOfNodesInCell(int cellId) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *computeFetchedNodeIds() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *getNodeIdsInUse(int& nbrOfNodesInUse) const = 0;
-    MEDCOUPLING_EXPORT virtual void fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const = 0;
-    MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const int *newNodeNumbersO2N) = 0;
-    MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N) = 0;
-    MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const std::map<int,int>& newNodeNumbersO2N) = 0;
-    MEDCOUPLING_EXPORT virtual void renumberNodesWithOffsetInConn(int offset) = 0;
-    MEDCOUPLING_EXPORT virtual void renumberNodes(const int *newNodeNumbers, int newNbOfNodes);
-    MEDCOUPLING_EXPORT virtual void renumberNodesCenter(const int *newNodeNumbers, int newNbOfNodes);
-    MEDCOUPLING_EXPORT virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const = 0;
+    MEDCOUPLING_EXPORT virtual mcIdType getNumberOfNodesInCell(mcIdType cellId) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *computeFetchedNodeIds() const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const = 0;
+    MEDCOUPLING_EXPORT virtual void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const = 0;
+    MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const mcIdType *newNodeNumbersO2N) = 0;
+    MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N) = 0;
+    MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) = 0;
+    MEDCOUPLING_EXPORT virtual void renumberNodesWithOffsetInConn(mcIdType offset) = 0;
+    MEDCOUPLING_EXPORT virtual void renumberNodes(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes);
+    MEDCOUPLING_EXPORT virtual void renumberNodesCenter(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes);
+    MEDCOUPLING_EXPORT virtual bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const = 0;
     MEDCOUPLING_EXPORT virtual void invertOrientationOfAllCells() = 0;
     MEDCOUPLING_EXPORT virtual void checkFullyDefined() const = 0;
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
                                             const std::vector<std::string>& littleStrings);
     MEDCOUPLING_EXPORT virtual DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *getCellsInBoundingBox(const double *bbox, double eps) const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps) = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const = 0;
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps) = 0;
     MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *computeDiameterField() const = 0;
-    MEDCOUPLING_EXPORT virtual DataArrayInt *zipCoordsTraducer();
-    MEDCOUPLING_EXPORT virtual DataArrayInt *zipConnectivityTraducer(int compType, int startCellId=0);
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *zipCoordsTraducer();
+    MEDCOUPLING_EXPORT virtual DataArrayIdType *zipConnectivityTraducer(int compType, mcIdType startCellId=0);
     MEDCOUPLING_EXPORT virtual bool areAllNodesFetched() const;
     //tools
   public:
-    MEDCOUPLING_EXPORT bool areCellsFrom2MeshEqual(const MEDCouplingPointSet *other, int cellId, double prec) const;
+    MEDCOUPLING_EXPORT bool areCellsFrom2MeshEqual(const MEDCouplingPointSet *other, mcIdType cellId, double prec) const;
   protected:
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT static bool intersectsBoundingBox(const double* bb1, const double* bb2, int dim, double eps);
     MEDCOUPLING_EXPORT static bool intersectsBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bb1, const double* bb2, int dim, double eps);
     MEDCOUPLING_EXPORT void rotate2D(const double *center, double angle);
     MEDCOUPLING_EXPORT void rotate3D(const double *center, const double *vect, double angle);
-    MEDCOUPLING_EXPORT void project2DCellOnXY(const int *startConn, const int *endConn, std::vector<double>& res) const;
+    MEDCOUPLING_EXPORT void project2DCellOnXY(const mcIdType *startConn, const mcIdType *endConn, std::vector<double>& res) const;
     MEDCOUPLING_EXPORT static bool isButterfly2DCell(const std::vector<double>& res, bool isQuad, double eps);
   protected:
     DataArrayDouble *_coords;
old mode 100644 (file)
new mode 100755 (executable)
index 5b4d4cc..bc18d38
@@ -94,17 +94,17 @@ int MEDCouplingRemapper::prepareEx(const MEDCouplingFieldTemplate *src, const ME
     return prepareNotInterpKernelOnly();
 }
 
-void MEDCouplingRemapper::setCrudeMatrix(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const std::string& method, const std::vector<std::map<int,double> >& m)
+void MEDCouplingRemapper::setCrudeMatrix(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const std::string& method, const std::vector<std::map<mcIdType,double> >& m)
 {
   MCAuto<MEDCouplingFieldTemplate> src,target;
   BuildFieldTemplatesFrom(srcMesh,targetMesh,method,src,target);
   setCrudeMatrixEx(src,target,m);
 }
 
-void MEDCouplingRemapper::setCrudeMatrixEx(const MEDCouplingFieldTemplate *src, const MEDCouplingFieldTemplate *target, const std::vector<std::map<int,double> >& m)
+void MEDCouplingRemapper::setCrudeMatrixEx(const MEDCouplingFieldTemplate *src, const MEDCouplingFieldTemplate *target, const std::vector<std::map<mcIdType,double> >& m)
 {
   restartUsing(src,target);
-  if(m.size()!=target->getNumberOfTuplesExpected())
+  if(ToIdType(m.size())!=target->getNumberOfTuplesExpected())
     {
       std::ostringstream oss; oss << "MEDCouplingRemapper::setMatrixEx : input matrix has " << m.size() << " rows whereas there are " << target->getNumberOfTuplesExpected() << " expected !";
       throw INTERP_KERNEL::Exception(oss.str());
@@ -245,11 +245,11 @@ void MEDCouplingRemapper::reverseTransfer(MEDCouplingFieldDouble *srcField, cons
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   DataArrayDouble *array(srcField->getArray());
-  int trgNbOfCompo=targetField->getNumberOfComponents();
+  std::size_t trgNbOfCompo=targetField->getNumberOfComponents();
   if(array)
     {
       srcField->checkConsistencyLight();
-      if(trgNbOfCompo!=srcField->getNumberOfTuplesExpected())
+      if(ToIdType(trgNbOfCompo)!=srcField->getNumberOfTuplesExpected())
         throw INTERP_KERNEL::Exception("Number of components mismatch !");
     }
   else
@@ -261,7 +261,7 @@ void MEDCouplingRemapper::reverseTransfer(MEDCouplingFieldDouble *srcField, cons
   computeDeno(srcField->getNature(),srcField,targetField);
   double *resPointer(srcField->getArray()->getPointer());
   const double *inputPointer=targetField->getArray()->getConstPointer();
-  computeReverseProduct(inputPointer,trgNbOfCompo,dftValue,resPointer);
+  computeReverseProduct(inputPointer,(int)trgNbOfCompo,dftValue,resPointer);
 }
 
 /*!
@@ -419,7 +419,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUU()
   if(trgSpaceDim!=srcSpaceDim)
     if(trgSpaceDim!=-1 && srcSpaceDim!=-1)
       throw INTERP_KERNEL::Exception("Incoherent space dimension detected between target and source.");
-  int nbCols;
+  mcIdType nbCols;
   if(srcMeshDim==1 && trgMeshDim==1 && srcSpaceDim==1)
     {
       MEDCouplingNormalizedUnstructuredMesh<1,1> source_mesh_wrapper(src_mesh);
@@ -480,11 +480,11 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUU()
       MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(src_mesh);
       MEDCouplingNormalizedUnstructuredMesh<3,3> target_mesh_wrapper(target_mesh);
       INTERP_KERNEL::Interpolation3D1D interpolation(*this);
-      std::vector<std::map<int,double> > matrixTmp;
+      std::vector<std::map<mcIdType,double> > matrixTmp;
       std::string revMethod(BuildMethodFrom(trgMeth,srcMeth));
       nbCols=interpolation.interpolateMeshes(target_mesh_wrapper,source_mesh_wrapper,matrixTmp,revMethod);
       ReverseMatrix(matrixTmp,nbCols,_matrix);
-      nbCols=matrixTmp.size();
+      nbCols=ToIdType(matrixTmp.size());
     }
   else if(srcMeshDim==2 && trgMeshDim==1 && srcSpaceDim==2)
     {
@@ -500,19 +500,19 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUU()
           MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src_mesh);
           MEDCouplingNormalizedUnstructuredMesh<2,2> target_mesh_wrapper(target_mesh);
           INTERP_KERNEL::Interpolation2D1D interpolation(*this);
-          std::vector<std::map<int,double> > matrixTmp;
+          std::vector<std::map<mcIdType,double> > matrixTmp;
           std::string revMethod(BuildMethodFrom(trgMeth,srcMeth));
           nbCols=interpolation.interpolateMeshes(target_mesh_wrapper,source_mesh_wrapper,matrixTmp,revMethod);
           ReverseMatrix(matrixTmp,nbCols,_matrix);
-          nbCols=matrixTmp.size();
+          nbCols=ToIdType(matrixTmp.size());
           INTERP_KERNEL::Interpolation2D1D::DuplicateFacesType duplicateFaces=interpolation.retrieveDuplicateFaces();
           if(!duplicateFaces.empty())
             {
               std::ostringstream oss; oss << "An unexpected situation happened ! For the following 1D Cells are part of edges shared by 2D cells :\n";
-              for(std::map<int,std::set<int> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
+              for(std::map<mcIdType,std::set<mcIdType> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
                 {
                   oss << "1D Cell #" << (*it).first << " is part of common edge of following 2D cells ids : ";
-                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<int>(oss," "));
+                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<mcIdType>(oss," "));
                   oss << std::endl;
                 }
             }
@@ -525,11 +525,11 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUU()
           MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src_mesh);
           MEDCouplingNormalizedUnstructuredMesh<2,2> target_mesh_wrapper(target_mesh);
           INTERP_KERNEL::Interpolation2D interpolation(*this);
-          std::vector<std::map<int,double> > matrixTmp;
+          std::vector<std::map<mcIdType,double> > matrixTmp;
           std::string revMethod(BuildMethodFrom(trgMeth,srcMeth));
           nbCols=interpolation.interpolateMeshes(target_mesh_wrapper,source_mesh_wrapper,matrixTmp,revMethod);
           ReverseMatrix(matrixTmp,nbCols,_matrix);
-          nbCols=matrixTmp.size();
+          nbCols=ToIdType(matrixTmp.size());
         }
       else
         {
@@ -541,10 +541,10 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUU()
           if(!duplicateFaces.empty())
             {
               std::ostringstream oss; oss << "An unexpected situation happened ! For the following 1D Cells are part of edges shared by 2D cells :\n";
-              for(std::map<int,std::set<int> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
+              for(std::map<mcIdType,std::set<mcIdType> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
                 {
                   oss << "1D Cell #" << (*it).first << " is part of common edge of following 2D cells ids : ";
-                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<int>(oss," "));
+                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<mcIdType>(oss," "));
                   oss << std::endl;
                 }
             }
@@ -564,10 +564,10 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUU()
           if(!duplicateFaces.empty())
             {
               std::ostringstream oss; oss << "An unexpected situation happened ! For the following 2D Cells are part of edges shared by 3D cells :\n";
-              for(std::map<int,std::set<int> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
+              for(std::map<mcIdType,std::set<mcIdType> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
                 {
                   oss << "2D Cell #" << (*it).first << " is part of common face of following 3D cells ids : ";
-                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<int>(oss," "));
+                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<mcIdType>(oss," "));
                   oss << std::endl;
                 }
             }
@@ -587,19 +587,19 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUU()
           MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(src_mesh);
           MEDCouplingNormalizedUnstructuredMesh<3,3> target_mesh_wrapper(target_mesh);
           INTERP_KERNEL::Interpolation2D3D interpolation(*this);
-          std::vector<std::map<int,double> > matrixTmp;
+          std::vector<std::map<mcIdType,double> > matrixTmp;
           std::string revMethod(BuildMethodFrom(trgMeth,srcMeth));
           nbCols=interpolation.interpolateMeshes(target_mesh_wrapper,source_mesh_wrapper,matrixTmp,revMethod);
           ReverseMatrix(matrixTmp,nbCols,_matrix);
-          nbCols=matrixTmp.size();
+          nbCols=ToIdType(matrixTmp.size());
           INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType duplicateFaces=interpolation.retrieveDuplicateFaces();
           if(!duplicateFaces.empty())
             {
               std::ostringstream oss; oss << "An unexpected situation happened ! For the following 2D Cells are part of edges shared by 3D cells :\n";
-              for(std::map<int,std::set<int> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
+              for(std::map<mcIdType,std::set<mcIdType> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
                 {
                   oss << "2D Cell #" << (*it).first << " is part of common face of following 3D cells ids : ";
-                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<int>(oss," "));
+                  std::copy((*it).second.begin(),(*it).second.end(),std::ostream_iterator<mcIdType>(oss," "));
                   oss << std::endl;
                 }
             }
@@ -674,18 +674,18 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyEE()
   MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(src2D);
   MEDCouplingNormalizedUnstructuredMesh<2,2> target_mesh_wrapper(trg2D);
   INTERP_KERNEL::Interpolation2D interpolation2D(*this);
-  std::vector<std::map<int,double> > matrix2D;
-  int nbCols2D=interpolation2D.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,matrix2D,methC);
+  std::vector<std::map<mcIdType,double> > matrix2D;
+  mcIdType nbCols2D=interpolation2D.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,matrix2D,methC);
   MEDCouplingUMesh *s1D,*t1D;
   double v[3];
   MEDCouplingMappedExtrudedMesh::Project1DMeshes(src_mesh->getMesh1D(),target_mesh->getMesh1D(),getPrecision(),s1D,t1D,v);
   MEDCouplingNormalizedUnstructuredMesh<1,1> s1DWrapper(s1D);
   MEDCouplingNormalizedUnstructuredMesh<1,1> t1DWrapper(t1D);
-  std::vector<std::map<int,double> > matrix1D;
+  std::vector<std::map<mcIdType,double> > matrix1D;
   INTERP_KERNEL::Interpolation1D interpolation1D(*this);
   if(interpolation1D.getIntersectionType()==INTERP_KERNEL::Geometric2D)// For intersection type of 1D, Geometric2D do not deal with it ! -> make interpolation1D not inherite from this
     interpolation1D.setIntersectionType(INTERP_KERNEL::Triangulation);//
-  int nbCols1D=interpolation1D.interpolateMeshes(s1DWrapper,t1DWrapper,matrix1D,methC);
+  mcIdType nbCols1D=interpolation1D.interpolateMeshes(s1DWrapper,t1DWrapper,matrix1D,methC);
   s1D->decrRef();
   t1D->decrRef();
   buildFinalInterpolationMatrixByConvolution(matrix1D,matrix2D,src_mesh->getMesh3DIds()->getConstPointer(),nbCols2D,nbCols1D,
@@ -714,7 +714,7 @@ int MEDCouplingRemapper::prepareInterpKernelOnlyUC()
   const int trgMeshDim=target_mesh->getMeshDimension();
   if(srcMeshDim!=srcSpceDim || srcMeshDim!=trgMeshDim)
     throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareInterpKernelOnlyUC: space dimension of unstructured source mesh should be equal to mesh dimension of unstructured source mesh, and should also be equal to target cartesian dimension!");
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   switch(srcMeshDim)
   {
     case 1:
@@ -868,8 +868,8 @@ int MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss()
     throw INTERP_KERNEL::Exception("MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss : The intersection type is not supported ! Only PointLocator is supported for Gauss->Gauss interpolation ! Please invoke setIntersectionType(PointLocator) on the MEDCouplingRemapper instance !");
   MCAuto<DataArrayDouble> trgLoc=_target_ft->getLocalizationOfDiscr();
   const double *trgLocPtr=trgLoc->begin();
-  int trgSpaceDim=trgLoc->getNumberOfComponents();
-  MCAuto<DataArrayInt> srcOffsetArr=_src_ft->getDiscretization()->getOffsetArr(_src_ft->getMesh());
+  mcIdType trgSpaceDim=ToIdType(trgLoc->getNumberOfComponents());
+  MCAuto<DataArrayIdType> srcOffsetArr=_src_ft->getDiscretization()->getOffsetArr(_src_ft->getMesh());
   if(trgSpaceDim!=_src_ft->getMesh()->getSpaceDimension())
     {
       std::ostringstream oss; oss << "MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss : space dimensions mismatch between source and target !";
@@ -877,27 +877,27 @@ int MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss()
       oss << _src_ft->getMesh()->getSpaceDimension() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  const int *srcOffsetArrPtr=srcOffsetArr->begin();
+  const mcIdType *srcOffsetArrPtr=srcOffsetArr->begin();
   MCAuto<DataArrayDouble> srcLoc=_src_ft->getLocalizationOfDiscr();
   const double *srcLocPtr=srcLoc->begin();
-  MCAuto<DataArrayInt> eltsArr,eltsIndexArr;
-  int trgNbOfGaussPts=trgLoc->getNumberOfTuples();
+  MCAuto<DataArrayIdType> eltsArr,eltsIndexArr;
+  mcIdType trgNbOfGaussPts=trgLoc->getNumberOfTuples();
   _matrix.resize(trgNbOfGaussPts);
   _src_ft->getMesh()->getCellsContainingPointsLinearPartOnlyOnNonDynType(trgLoc->begin(),trgNbOfGaussPts,getPrecision(),eltsArr,eltsIndexArr);
-  const int *elts(eltsArr->begin()),*eltsIndex(eltsIndexArr->begin());
-  MCAuto<DataArrayInt> nbOfSrcCellsShTrgPts(eltsIndexArr->deltaShiftIndex());
-  MCAuto<DataArrayInt> ids0=nbOfSrcCellsShTrgPts->findIdsNotEqual(0);
-  for(const int *trgId=ids0->begin();trgId!=ids0->end();trgId++)
+  const mcIdType *elts(eltsArr->begin()),*eltsIndex(eltsIndexArr->begin());
+  MCAuto<DataArrayIdType> nbOfSrcCellsShTrgPts(eltsIndexArr->deltaShiftIndex());
+  MCAuto<DataArrayIdType> ids0=nbOfSrcCellsShTrgPts->findIdsNotEqual(0);
+  for(const mcIdType *trgId=ids0->begin();trgId!=ids0->end();trgId++)
     {
       const double *ptTrg=trgLocPtr+trgSpaceDim*(*trgId);
-      int srcCellId=elts[eltsIndex[*trgId]];
+      mcIdType srcCellId=elts[eltsIndex[*trgId]];
       double dist=std::numeric_limits<double>::max();
-      int srcEntry=-1;
-      for(int srcId=srcOffsetArrPtr[srcCellId];srcId<srcOffsetArrPtr[srcCellId+1];srcId++)
+      mcIdType srcEntry=-1;
+      for(mcIdType srcId=srcOffsetArrPtr[srcCellId];srcId<srcOffsetArrPtr[srcCellId+1];srcId++)
         {
           const double *ptSrc=srcLocPtr+trgSpaceDim*srcId;
           double tmp=0.;
-          for(int i=0;i<trgSpaceDim;i++)
+          for(mcIdType i=0;i<trgSpaceDim;i++)
             tmp+=(ptTrg[i]-ptSrc[i])*(ptTrg[i]-ptSrc[i]);
           if(tmp<dist)
             { dist=tmp; srcEntry=srcId; }
@@ -906,11 +906,11 @@ int MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss()
     }
   if(ids0->getNumberOfTuples()!=trgNbOfGaussPts)
     {
-      MCAuto<DataArrayInt> orphanTrgIds=nbOfSrcCellsShTrgPts->findIdsEqual(0);
+      MCAuto<DataArrayIdType> orphanTrgIds=nbOfSrcCellsShTrgPts->findIdsEqual(0);
       MCAuto<DataArrayDouble> orphanTrg=trgLoc->selectByTupleId(orphanTrgIds->begin(),orphanTrgIds->end());
-      MCAuto<DataArrayInt> srcIdPerTrg=srcLoc->findClosestTupleId(orphanTrg);
-      const int *srcIdPerTrgPtr=srcIdPerTrg->begin();
-      for(const int *orphanTrgId=orphanTrgIds->begin();orphanTrgId!=orphanTrgIds->end();orphanTrgId++,srcIdPerTrgPtr++)
+      MCAuto<DataArrayIdType> srcIdPerTrg=srcLoc->findClosestTupleId(orphanTrg);
+      const mcIdType *srcIdPerTrgPtr=srcIdPerTrg->begin();
+      for(const mcIdType *orphanTrgId=orphanTrgIds->begin();orphanTrgId!=orphanTrgIds->end();orphanTrgId++,srcIdPerTrgPtr++)
         _matrix[*orphanTrgId][*srcIdPerTrgPtr]=2.;
     }
   _deno_multiply.clear();
@@ -1074,7 +1074,7 @@ void MEDCouplingRemapper::transferUnderground(const MEDCouplingFieldDouble *srcF
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   DataArrayDouble *array(targetField->getArray());
-  int srcNbOfCompo(srcField->getNumberOfComponents());
+  std::size_t srcNbOfCompo(srcField->getNumberOfComponents());
   if(array)
     {
       targetField->checkConsistencyLight();
@@ -1092,7 +1092,7 @@ void MEDCouplingRemapper::transferUnderground(const MEDCouplingFieldDouble *srcF
   computeDeno(srcField->getNature(),srcField,targetField);
   double *resPointer(targetField->getArray()->getPointer());
   const double *inputPointer(srcField->getArray()->getConstPointer());
-  computeProduct(inputPointer,srcNbOfCompo,isDftVal,dftValue,resPointer);
+  computeProduct(inputPointer,(int)srcNbOfCompo,isDftVal,dftValue,resPointer);
 }
 
 void MEDCouplingRemapper::computeDeno(NatureOfField nat, const MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *trgField)
@@ -1108,7 +1108,7 @@ void MEDCouplingRemapper::computeDeno(NatureOfField nat, const MEDCouplingFieldD
 void MEDCouplingRemapper::computeDenoFromScratch(NatureOfField nat, const MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *trgField)
 {
   _nature_of_deno=nat;
-  _time_deno_update=getTimeOfThis();
+  std::size_t _time_deno_update=getTimeOfThis();
   switch(_nature_of_deno)
   {
     case IntensiveMaximum:
@@ -1133,8 +1133,8 @@ void MEDCouplingRemapper::computeDenoFromScratch(NatureOfField nat, const MEDCou
             denoPtr2[0]=std::accumulate(denoRPtr,denoRPtr+denoR->getNumberOfTuples(),0.);
           }
         int idx=0;
-        for(std::vector<std::map<int,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
-          for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+        for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
+          for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
             {
               _deno_multiply[idx][(*iter2).first]=denoPtr[(*iter2).first];
               _deno_reverse_multiply[(*iter2).first][idx]=denoRPtr[idx];
@@ -1164,9 +1164,9 @@ void MEDCouplingRemapper::computeDenoFromScratch(NatureOfField nat, const MEDCou
             double *denoPtr2=deno->getArray()->getPointer();
             denoPtr2[0]=std::accumulate(denoRPtr,denoRPtr+denoR->getNumberOfTuples(),0.);
           }
-        int idx=0;
-        for(std::vector<std::map<int,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
-          for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+        mcIdType idx=0;
+        for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
+          for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
             {
               _deno_multiply[idx][(*iter2).first]=denoPtr[idx];
               _deno_reverse_multiply[(*iter2).first][idx]=denoRPtr[(*iter2).first];
@@ -1184,7 +1184,7 @@ void MEDCouplingRemapper::computeProduct(const double *inputPointer, int inputNb
 {
   int idx=0;
   double *tmp=new double[inputNbOfCompo];
-  for(std::vector<std::map<int,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
     {
       if((*iter1).empty())
         {
@@ -1194,8 +1194,8 @@ void MEDCouplingRemapper::computeProduct(const double *inputPointer, int inputNb
         }
       else
         std::fill(resPointer+idx*inputNbOfCompo,resPointer+(idx+1)*inputNbOfCompo,0.);
-      std::map<int,double>::const_iterator iter3=_deno_multiply[idx].begin();
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++,iter3++)
+      std::map<mcIdType,double>::const_iterator iter3=_deno_multiply[idx].begin();
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++,iter3++)
         {
           std::transform(inputPointer+(*iter2).first*inputNbOfCompo,inputPointer+((*iter2).first+1)*inputNbOfCompo,tmp,std::bind2nd(std::multiplies<double>(),(*iter2).second/(*iter3).second));
           std::transform(tmp,tmp+inputNbOfCompo,resPointer+idx*inputNbOfCompo,resPointer+idx*inputNbOfCompo,std::plus<double>());
@@ -1207,12 +1207,12 @@ void MEDCouplingRemapper::computeProduct(const double *inputPointer, int inputNb
 void MEDCouplingRemapper::computeReverseProduct(const double *inputPointer, int inputNbOfCompo, double dftValue, double *resPointer)
 {
   std::vector<bool> isReached(_deno_reverse_multiply.size(),false);
-  int idx=0;
+  mcIdType idx=0;
   double *tmp=new double[inputNbOfCompo];
   std::fill(resPointer,resPointer+inputNbOfCompo*_deno_reverse_multiply.size(),0.);
-  for(std::vector<std::map<int,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=_matrix.begin();iter1!=_matrix.end();iter1++,idx++)
     {
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         {
           isReached[(*iter2).first]=true;
           std::transform(inputPointer+idx*inputNbOfCompo,inputPointer+(idx+1)*inputNbOfCompo,tmp,std::bind2nd(std::multiplies<double>(),(*iter2).second/_deno_reverse_multiply[(*iter2).first][idx]));
@@ -1226,81 +1226,81 @@ void MEDCouplingRemapper::computeReverseProduct(const double *inputPointer, int
       std::fill(resPointer+idx*inputNbOfCompo,resPointer+(idx+1)*inputNbOfCompo,dftValue);
 }
 
-void MEDCouplingRemapper::ReverseMatrix(const std::vector<std::map<int,double> >& matIn, int nbColsMatIn, std::vector<std::map<int,double> >& matOut)
+void MEDCouplingRemapper::ReverseMatrix(const std::vector<std::map<mcIdType,double> >& matIn, mcIdType nbColsMatIn, std::vector<std::map<mcIdType,double> >& matOut)
 {
   matOut.resize(nbColsMatIn);
-  int id=0;
-  for(std::vector<std::map<int,double> >::const_iterator iter1=matIn.begin();iter1!=matIn.end();iter1++,id++)
-    for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+  mcIdType id=0;
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=matIn.begin();iter1!=matIn.end();iter1++,id++)
+    for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
       matOut[(*iter2).first][id]=(*iter2).second;
 }
 
-void MEDCouplingRemapper::ComputeRowSumAndColSum(const std::vector<std::map<int,double> >& matrixDeno,
-                                                 std::vector<std::map<int,double> >& deno, std::vector<std::map<int,double> >& denoReverse)
+void MEDCouplingRemapper::ComputeRowSumAndColSum(const std::vector<std::map<mcIdType,double> >& matrixDeno,
+                                                 std::vector<std::map<mcIdType,double> >& deno, std::vector<std::map<mcIdType,double> >& denoReverse)
 {
-  std::map<int,double> values;
-  int idx=0;
-  for(std::vector<std::map<int,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
+  std::map<mcIdType,double> values;
+  mcIdType idx=0;
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
     {
       double sum=0.;
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         {
           sum+=(*iter2).second;
           values[(*iter2).first]+=(*iter2).second;
         }
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         deno[idx][(*iter2).first]=sum;
     }
   idx=0;
-  for(std::vector<std::map<int,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
     {
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         denoReverse[(*iter2).first][idx]=values[(*iter2).first];
     }
 }
 
-void MEDCouplingRemapper::ComputeColSumAndRowSum(const std::vector<std::map<int,double> >& matrixDeno,
-                                                 std::vector<std::map<int,double> >& deno, std::vector<std::map<int,double> >& denoReverse)
+void MEDCouplingRemapper::ComputeColSumAndRowSum(const std::vector<std::map<mcIdType,double> >& matrixDeno,
+                                                 std::vector<std::map<mcIdType,double> >& deno, std::vector<std::map<mcIdType,double> >& denoReverse)
 {
-  std::map<int,double> values;
-  int idx=0;
-  for(std::vector<std::map<int,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
+  std::map<mcIdType,double> values;
+  mcIdType idx=0;
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
     {
       double sum=0.;
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         {
           sum+=(*iter2).second;
           values[(*iter2).first]+=(*iter2).second;
         }
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         denoReverse[(*iter2).first][idx]=sum;
     }
   idx=0;
-  for(std::vector<std::map<int,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=matrixDeno.begin();iter1!=matrixDeno.end();iter1++,idx++)
     {
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         deno[idx][(*iter2).first]=values[(*iter2).first];
     }
 }
 
-void MEDCouplingRemapper::buildFinalInterpolationMatrixByConvolution(const std::vector< std::map<int,double> >& m1D,
-                                                                     const std::vector< std::map<int,double> >& m2D,
-                                                                     const int *corrCellIdSrc, int nbOf2DCellsSrc, int nbOf1DCellsSrc,
-                                                                     const int *corrCellIdTrg)
+void MEDCouplingRemapper::buildFinalInterpolationMatrixByConvolution(const std::vector< std::map<mcIdType,double> >& m1D,
+                                                                     const std::vector< std::map<mcIdType,double> >& m2D,
+                                                                     const mcIdType *corrCellIdSrc, mcIdType nbOf2DCellsSrc, mcIdType nbOf1DCellsSrc,
+                                                                     const mcIdType *corrCellIdTrg)
 {
-  int nbOf2DCellsTrg=m2D.size();
-  int nbOf1DCellsTrg=m1D.size();
-  int nbOf3DCellsTrg=nbOf2DCellsTrg*nbOf1DCellsTrg;
+  mcIdType nbOf2DCellsTrg=ToIdType(m2D.size());
+  mcIdType nbOf1DCellsTrg=ToIdType(m1D.size());
+  mcIdType nbOf3DCellsTrg=nbOf2DCellsTrg*nbOf1DCellsTrg;
   _matrix.resize(nbOf3DCellsTrg);
-  int id2R=0;
-  for(std::vector< std::map<int,double> >::const_iterator iter2R=m2D.begin();iter2R!=m2D.end();iter2R++,id2R++)
+  mcIdType id2R=0;
+  for(std::vector< std::map<mcIdType,double> >::const_iterator iter2R=m2D.begin();iter2R!=m2D.end();iter2R++,id2R++)
     {
-      for(std::map<int,double>::const_iterator iter2C=(*iter2R).begin();iter2C!=(*iter2R).end();iter2C++)
+      for(std::map<mcIdType,double>::const_iterator iter2C=(*iter2R).begin();iter2C!=(*iter2R).end();iter2C++)
         {
-          int id1R=0;
-          for(std::vector< std::map<int,double> >::const_iterator iter1R=m1D.begin();iter1R!=m1D.end();iter1R++,id1R++)
+          mcIdType id1R=0;
+          for(std::vector< std::map<mcIdType,double> >::const_iterator iter1R=m1D.begin();iter1R!=m1D.end();iter1R++,id1R++)
             {
-              for(std::map<int,double>::const_iterator iter1C=(*iter1R).begin();iter1C!=(*iter1R).end();iter1C++)
+              for(std::map<mcIdType,double>::const_iterator iter1C=(*iter1R).begin();iter1C!=(*iter1R).end();iter1C++)
                 {
                   _matrix[corrCellIdTrg[id1R*nbOf2DCellsTrg+id2R]][corrCellIdSrc[(*iter1C).first*nbOf2DCellsSrc+(*iter2C).first]]=(*iter1C).second*((*iter2C).second);
                 }
@@ -1309,19 +1309,19 @@ void MEDCouplingRemapper::buildFinalInterpolationMatrixByConvolution(const std::
     }
 }
 
-void MEDCouplingRemapper::PrintMatrix(const std::vector<std::map<int,double> >& m)
+void MEDCouplingRemapper::PrintMatrix(const std::vector<std::map<mcIdType,double> >& m)
 {
-  int id=0;
-  for(std::vector<std::map<int,double> >::const_iterator iter1=m.begin();iter1!=m.end();iter1++,id++)
+  mcIdType id=0;
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=m.begin();iter1!=m.end();iter1++,id++)
     {
       std::cout << "Target Cell # " << id << " : ";
-      for(std::map<int,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
+      for(std::map<mcIdType,double>::const_iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         std::cout << "(" << (*iter2).first << "," << (*iter2).second << "), ";
       std::cout << std::endl;
     }
 }
 
-const std::vector<std::map<int,double> >& MEDCouplingRemapper::getCrudeMatrix() const
+const std::vector<std::map<mcIdType,double> >& MEDCouplingRemapper::getCrudeMatrix() const
 {
   return _matrix;
 }
@@ -1329,9 +1329,9 @@ const std::vector<std::map<int,double> >& MEDCouplingRemapper::getCrudeMatrix()
 /*!
  * Returns the number of columns of matrix returned by MEDCouplingRemapper::getCrudeMatrix method.
  */
-int MEDCouplingRemapper::getNumberOfColsOfMatrix() const
+mcIdType MEDCouplingRemapper::getNumberOfColsOfMatrix() const
 {
-  return (int)_deno_reverse_multiply.size();
+  return ToIdType(_deno_reverse_multiply.size());
 }
 
 /*!
@@ -1349,12 +1349,12 @@ int MEDCouplingRemapper::getNumberOfColsOfMatrix() const
 int MEDCouplingRemapper::nullifiedTinyCoeffInCrudeMatrixAbs(double maxValAbs)
 {
   int ret=0;
-  std::vector<std::map<int,double> > matrixNew(_matrix.size());
-  int i=0;
-  for(std::vector<std::map<int,double> >::const_iterator it1=_matrix.begin();it1!=_matrix.end();it1++,i++)
+  std::vector<std::map<mcIdType,double> > matrixNew(_matrix.size());
+  mcIdType i=0;
+  for(std::vector<std::map<mcIdType,double> >::const_iterator it1=_matrix.begin();it1!=_matrix.end();it1++,i++)
     {
-      std::map<int,double>& rowNew=matrixNew[i];
-      for(std::map<int,double>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+      std::map<mcIdType,double>& rowNew=matrixNew[i];
+      for(std::map<mcIdType,double>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
         {
           if(fabs((*it2).second)>maxValAbs)
             rowNew[(*it2).first]=(*it2).second;
@@ -1398,8 +1398,8 @@ int MEDCouplingRemapper::nullifiedTinyCoeffInCrudeMatrix(double scaleFactor)
 double MEDCouplingRemapper::getMaxValueInCrudeMatrix() const
 {
   double ret=0.;
-  for(std::vector<std::map<int,double> >::const_iterator it1=_matrix.begin();it1!=_matrix.end();it1++)
-    for(std::map<int,double>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator it1=_matrix.begin();it1!=_matrix.end();it1++)
+    for(std::map<mcIdType,double>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
       if(fabs((*it2).second)>ret)
         ret=fabs((*it2).second);
   return ret;
index 39343614194a20458f8c43a19d07cb5445468e54..5d840c98df32bc6bcf89b071c53ccff3f6a8509d 100644 (file)
@@ -57,8 +57,8 @@ namespace MEDCoupling
     MEDCOUPLINGREMAPPER_EXPORT ~MEDCouplingRemapper();
     MEDCOUPLINGREMAPPER_EXPORT int prepare(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const std::string& method);
     MEDCOUPLINGREMAPPER_EXPORT int prepareEx(const MEDCouplingFieldTemplate *src, const MEDCouplingFieldTemplate *target);
-    MEDCOUPLINGREMAPPER_EXPORT void setCrudeMatrix(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const std::string& method, const std::vector<std::map<int,double> >& m);
-    MEDCOUPLINGREMAPPER_EXPORT void setCrudeMatrixEx(const MEDCouplingFieldTemplate *src, const MEDCouplingFieldTemplate *target, const std::vector<std::map<int,double> >& m);
+    MEDCOUPLINGREMAPPER_EXPORT void setCrudeMatrix(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const std::string& method, const std::vector<std::map<mcIdType,double> >& m);
+    MEDCOUPLINGREMAPPER_EXPORT void setCrudeMatrixEx(const MEDCouplingFieldTemplate *src, const MEDCouplingFieldTemplate *target, const std::vector<std::map<mcIdType,double> >& m);
     MEDCOUPLINGREMAPPER_EXPORT void transfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField, double dftValue);
     MEDCOUPLINGREMAPPER_EXPORT void partialTransfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField);
     MEDCOUPLINGREMAPPER_EXPORT void reverseTransfer(MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *targetField, double dftValue);
@@ -74,9 +74,9 @@ namespace MEDCoupling
     MEDCOUPLINGREMAPPER_EXPORT int nullifiedTinyCoeffInCrudeMatrix(double scaleFactor);
     MEDCOUPLINGREMAPPER_EXPORT double getMaxValueInCrudeMatrix() const;
   public:
-    MEDCOUPLINGREMAPPER_EXPORT const std::vector<std::map<int,double> >& getCrudeMatrix() const;
-    MEDCOUPLINGREMAPPER_EXPORT int getNumberOfColsOfMatrix() const;
-    MEDCOUPLINGREMAPPER_EXPORT static void PrintMatrix(const std::vector<std::map<int,double> >& m);
+    MEDCOUPLINGREMAPPER_EXPORT const std::vector<std::map<mcIdType,double> >& getCrudeMatrix() const;
+    MEDCOUPLINGREMAPPER_EXPORT mcIdType getNumberOfColsOfMatrix() const;
+    MEDCOUPLINGREMAPPER_EXPORT static void PrintMatrix(const std::vector<std::map<mcIdType,double> >& m);
     MEDCOUPLINGREMAPPER_EXPORT static std::string BuildMethodFrom(const std::string& meth1, const std::string& meth2);
     MEDCOUPLINGREMAPPER_EXPORT void BuildFieldTemplatesFrom(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const std::string& method, MCAuto<MEDCouplingFieldTemplate>& src, MCAuto<MEDCouplingFieldTemplate>& target);
   private:
@@ -103,16 +103,16 @@ namespace MEDCoupling
     void computeDenoFromScratch(NatureOfField nat, const MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *trgField);
     void computeProduct(const double *inputPointer, int inputNbOfCompo, bool isDftVal, double dftValue, double *resPointer);
     void computeReverseProduct(const double *inputPointer, int inputNbOfCompo, double dftValue, double *resPointer);
-    void buildFinalInterpolationMatrixByConvolution(const std::vector< std::map<int,double> >& m1D,
-                                                    const std::vector< std::map<int,double> >& m2D,
-                                                    const int *corrCellIdSrc, int nbOf2DCellsSrc, int nbOf1DCellsSrc,
-                                                    const int *corrCellIdTrg);
-    static void ReverseMatrix(const std::vector<std::map<int,double> >& matIn, int nbColsMatIn,
-                              std::vector<std::map<int,double> >& matOut);
-    static void ComputeRowSumAndColSum(const std::vector<std::map<int,double> >& matrixDeno,
-                                       std::vector<std::map<int,double> >& deno, std::vector<std::map<int,double> >& denoReverse);
-    static void ComputeColSumAndRowSum(const std::vector<std::map<int,double> >& matrixDeno,
-                                       std::vector<std::map<int,double> >& deno, std::vector<std::map<int,double> >& denoReverse);
+    void buildFinalInterpolationMatrixByConvolution(const std::vector< std::map<mcIdType,double> >& m1D,
+                                                    const std::vector< std::map<mcIdType,double> >& m2D,
+                                                    const mcIdType *corrCellIdSrc, mcIdType nbOf2DCellsSrc, mcIdType nbOf1DCellsSrc,
+                                                    const mcIdType *corrCellIdTrg);
+    static void ReverseMatrix(const std::vector<std::map<mcIdType,double> >& matIn, mcIdType nbColsMatIn,
+                              std::vector<std::map<mcIdType,double> >& matOut);
+    static void ComputeRowSumAndColSum(const std::vector<std::map<mcIdType,double> >& matrixDeno,
+                                       std::vector<std::map<mcIdType,double> >& deno, std::vector<std::map<mcIdType,double> >& denoReverse);
+    static void ComputeColSumAndRowSum(const std::vector<std::map<mcIdType,double> >& matrixDeno,
+                                       std::vector<std::map<mcIdType,double> >& deno, std::vector<std::map<mcIdType,double> >& denoReverse);
   private:
     MCAuto<MEDCouplingFieldTemplate> _src_ft;
     MCAuto<MEDCouplingFieldTemplate> _target_ft;
old mode 100644 (file)
new mode 100755 (executable)
index d4a8c91..dcbb24a
@@ -26,7 +26,7 @@
 using namespace MEDCoupling;
 
 MEDCouplingSkyLineArray::MEDCouplingSkyLineArray():
-  _super_index( DataArrayInt::New() ), _index( DataArrayInt::New() ), _values( DataArrayInt::New() )
+  _super_index( DataArrayIdType::New() ), _index( DataArrayIdType::New() ), _values( DataArrayIdType::New() )
 {
 }
 
@@ -39,8 +39,8 @@ MEDCouplingSkyLineArray* MEDCouplingSkyLineArray::New()
   return new MEDCouplingSkyLineArray();
 }
 
-MEDCouplingSkyLineArray* MEDCouplingSkyLineArray::New( const std::vector<int>& index,
-                                                       const std::vector<int>& value )
+MEDCouplingSkyLineArray* MEDCouplingSkyLineArray::New( const std::vector<mcIdType>& index,
+                                                       const std::vector<mcIdType>& value )
 {
   MEDCouplingSkyLineArray * ret = new MEDCouplingSkyLineArray();
   ret->_index->reserve( index.size() );
@@ -50,7 +50,7 @@ MEDCouplingSkyLineArray* MEDCouplingSkyLineArray::New( const std::vector<int>& i
   return ret;
 }
 
-MEDCouplingSkyLineArray* MEDCouplingSkyLineArray::New( DataArrayInt* index, DataArrayInt* value )
+MEDCouplingSkyLineArray* MEDCouplingSkyLineArray::New( DataArrayIdType* index, DataArrayIdType* value )
 {
   MEDCouplingSkyLineArray* ret = new MEDCouplingSkyLineArray();
   ret->set(index, value);
@@ -70,19 +70,19 @@ MEDCouplingSkyLineArray* MEDCouplingSkyLineArray::New( const MEDCouplingSkyLineA
  * polyhedrons or polygons).
  * The input arrays are deep copied, contrary to the other ctors.
  */
-MEDCouplingSkyLineArray * MEDCouplingSkyLineArray::BuildFromPolyhedronConn( const DataArrayInt* c, const DataArrayInt* cI )
+MEDCouplingSkyLineArray * MEDCouplingSkyLineArray::BuildFromPolyhedronConn( const DataArrayIdType* c, const DataArrayIdType* cI )
 {
   using namespace std;
 
   MEDCouplingSkyLineArray* ret = new MEDCouplingSkyLineArray();
 
-  const int * cP(c->begin()), * cIP(cI->begin());
-  int prev = -1;
-  if ((int)c->getNbOfElems() != *(cI->end()-1))
+  const mcIdType * cP(c->begin()), * cIP(cI->begin());
+  mcIdType prev = -1;
+  if (c->getNbOfElems() != *(cI->end()-1))
     throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::BuildFromDynamicConn: misformatted connectivity (wrong nb of tuples)!");
-  for (std::size_t i=0; i < cI->getNbOfElems(); i++)
+  for (mcIdType i=0; i < cI->getNbOfElems(); i++)
     {
-      int j = cIP[i];
+      mcIdType j = cIP[i];
       if (cIP[i] < prev)
         throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::BuildFromDynamicConn: misformatted connectivity (indices not monotonic ascending)!");
       prev = cIP[i];
@@ -91,29 +91,29 @@ MEDCouplingSkyLineArray * MEDCouplingSkyLineArray::BuildFromPolyhedronConn( cons
           throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::BuildFromDynamicConn: connectivity containing other types than POLYHED!");
     }
 
-  vector<int> superIdx, idx, vals;
-  int cnt = 0, cnt2 = 0;
+  vector<mcIdType> superIdx, idx, vals;
+  mcIdType cnt = 0, cnt2 = 0;
   superIdx.reserve(cI->getNbOfElems());
   superIdx.push_back(0);
   idx.push_back(0);
   vals.resize(c->getNbOfElems()); // too much because of the type and the -1, but still better than push_back().
-  for (std::size_t i=0; i < cI->getNbOfElems()-1; i++)
+  for (mcIdType i=0; i < cI->getNbOfElems()-1; i++)
     {
-      int start = cIP[i]+1, end = cIP[i+1];
-      int * work = vals.data() + cnt;
-      const int * w = cP+start;
-      const int * w2 = find(w, cP+end, -1);
+      mcIdType start = cIP[i]+1, end = cIP[i+1];
+      mcIdType * work = vals.data() + cnt;
+      const mcIdType * w = cP+start;
+      const mcIdType * w2 = find(w, cP+end, -1);
       while (w2 != cP+end)
         {
           copy(w, w2, work);
-          int d = distance(w, w2);
+          mcIdType d = ToIdType(distance(w, w2));
           cnt += d; work +=d;
           idx.push_back(cnt); cnt2++;
           w = w2+1;  // skip the -1
           w2 = find(w, cP+end, -1);
         }
       copy(w, cP+end, work);
-      cnt += distance(w, cP+end);
+      cnt += ToIdType(distance(w, cP+end));
       idx.push_back(cnt); cnt2++;
       superIdx.push_back(cnt2);
     }
@@ -131,30 +131,30 @@ MEDCouplingSkyLineArray * MEDCouplingSkyLineArray::BuildFromPolyhedronConn( cons
  * Convert a three-level SkyLineArray into a polyhedral connectivity.
  * The super-packs are interpreted as cell description, and the packs represent the face connectivity.
  */
-void MEDCouplingSkyLineArray::convertToPolyhedronConn( MCAuto<DataArrayInt>& c,  MCAuto<DataArrayInt>& cI) const
+void MEDCouplingSkyLineArray::convertToPolyhedronConn( MCAuto<DataArrayIdType>& c,  MCAuto<DataArrayIdType>& cI) const
 {
   // TODO: in this case an iterator would be nice
   using namespace std;
 
   checkSuperIndex("convertToPolyhedronConn");
 
-  const int * siP(_super_index->begin()), * iP(_index->begin()), *vP(_values->begin());
-  int cnt = 0;
+  const mcIdType * siP(_super_index->begin()), * iP(_index->begin()), *vP(_values->begin());
+  mcIdType cnt = 0;
   cI->alloc(_super_index->getNbOfElems(),1);  // same number of super packs as number of cells
-  int * cIVecP(cI->getPointer());
-  MCAuto <DataArrayInt> dsi = _index->deltaShiftIndex();
-  int sz = dsi->accumulate(0) + dsi->getNbOfElems();  // think about it: one slot for the type, -1 at the end of each face of the cell
+  mcIdType * cIVecP(cI->getPointer());
+  MCAuto <DataArrayIdType> dsi = _index->deltaShiftIndex();
+  mcIdType sz = dsi->accumulate((std::size_t)0) + ToIdType(dsi->getNbOfElems());  // think about it: one slot for the type, -1 at the end of each face of the cell
   c->alloc(sz, 1);
-  int * cVecP(c->getPointer());
+  mcIdType * cVecP(c->getPointer());
 
-  for ( std::size_t i=0; i < _super_index->getNbOfElems()-1; i++)
+  for ( mcIdType i=0; i < _super_index->getNbOfElems()-1; i++)
      {
        cIVecP[i]= cnt;
-       int endId = siP[i+1];
+       mcIdType endId = siP[i+1];
        cVecP[cnt++] = INTERP_KERNEL::NORM_POLYHED;
-       for (int j=siP[i]; j < endId; j++)
+       for (mcIdType j=siP[i]; j < endId; j++)
          {
-           int startId2 = iP[j], endId2 = iP[j+1];
+           mcIdType startId2 = iP[j], endId2 = iP[j+1];
            copy(vP+startId2, vP+endId2, cVecP+cnt);
            cnt += endId2-startId2;
            if(j != endId-1)
@@ -179,36 +179,36 @@ std::vector<const BigMemoryObject *> MEDCouplingSkyLineArray::getDirectChildrenW
 }
 
 
-void MEDCouplingSkyLineArray::set( DataArrayInt* index, DataArrayInt* value )
+void MEDCouplingSkyLineArray::set( DataArrayIdType* index, DataArrayIdType* value )
 {
   _index=index;
   _values=value;
-  if ( (DataArrayInt*)_index ) _index->incrRef();
-  else                         _index = DataArrayInt::New();
-  if ( (DataArrayInt*)_values ) _values->incrRef();
-  else                         _values = DataArrayInt::New();
+  if ( (DataArrayIdType*)_index ) _index->incrRef();
+  else                            _index = DataArrayIdType::New();
+  if ( (DataArrayIdType*)_values ) _values->incrRef();
+  else                             _values = DataArrayIdType::New();
 }
 
-void MEDCouplingSkyLineArray::set3( DataArrayInt* superIndex, DataArrayInt* index, DataArrayInt* value )
+void MEDCouplingSkyLineArray::set3( DataArrayIdType* superIndex, DataArrayIdType* index, DataArrayIdType* value )
 {
   _super_index=superIndex;
-  if ( (DataArrayInt*)_super_index ) _super_index->incrRef();
-  else                         _super_index = DataArrayInt::New();
+  if ( (DataArrayIdType*)_super_index ) _super_index->incrRef();
+  else                                  _super_index = DataArrayIdType::New();
   set(index, value);
 }
 
-DataArrayInt* MEDCouplingSkyLineArray::getSuperIndexArray() const
+DataArrayIdType* MEDCouplingSkyLineArray::getSuperIndexArray() const
 {
   return const_cast<MEDCouplingSkyLineArray*>(this)->_super_index;
 }
 
 
-DataArrayInt* MEDCouplingSkyLineArray::getIndexArray() const
+DataArrayIdType* MEDCouplingSkyLineArray::getIndexArray() const
 {
   return const_cast<MEDCouplingSkyLineArray*>(this)->_index;
 }
 
-DataArrayInt* MEDCouplingSkyLineArray::getValuesArray() const
+DataArrayIdType* MEDCouplingSkyLineArray::getValuesArray() const
 {
   return const_cast<MEDCouplingSkyLineArray*>(this)->_values;
 }
@@ -223,9 +223,9 @@ void MEDCouplingSkyLineArray::checkSuperIndex(const std::string& func) const
     }
 }
 
-void MEDCouplingSkyLineArray::validSuperIndex(const std::string& func, int superIndex) const
+void MEDCouplingSkyLineArray::validSuperIndex(const std::string& func, mcIdType superIndex) const
 {
-  if(superIndex < 0 || superIndex >= (int)_super_index->getNbOfElems())
+  if(superIndex < 0 || superIndex >= _super_index->getNbOfElems())
     {
       std::ostringstream oss;
       oss << "MEDCouplingSkyLineArray::" << func <<  ": invalid super index!";
@@ -233,9 +233,9 @@ void MEDCouplingSkyLineArray::validSuperIndex(const std::string& func, int super
     }
 }
 
-void MEDCouplingSkyLineArray::validIndex(const std::string& func, int idx) const
+void MEDCouplingSkyLineArray::validIndex(const std::string& func, mcIdType idx) const
 {
-  if(idx < 0 || idx >= (int)_index->getNbOfElems())
+  if(idx < 0 || idx >= _index->getNbOfElems())
     {
       std::ostringstream oss;
       oss << "MEDCouplingSkyLineArray::" << func <<  ": invalid index!";
@@ -243,11 +243,11 @@ void MEDCouplingSkyLineArray::validIndex(const std::string& func, int idx) const
     }
 }
 
-void MEDCouplingSkyLineArray::validSuperIndexAndIndex(const std::string& func, int superIndex, int index) const
+void MEDCouplingSkyLineArray::validSuperIndexAndIndex(const std::string& func, mcIdType superIndex, mcIdType index) const
 {
   validSuperIndex(func, superIndex);
-  int idx = _super_index->begin()[superIndex] + index;
-  if(idx < 0 || idx >= (int)_index->getNbOfElems())
+  mcIdType idx = _super_index->begin()[superIndex] + index;
+  if(idx < 0 || idx >= _index->getNbOfElems())
     {
       std::ostringstream oss;
       oss << "MEDCouplingSkyLineArray::" << func <<  ": invalid index!";
@@ -259,7 +259,7 @@ std::string MEDCouplingSkyLineArray::simpleRepr() const
 {
   std::ostringstream oss;
   oss << "MEDCouplingSkyLineArray (" << this << ")" << std::endl;
-  MCAuto<DataArrayInt> super_index = _super_index->deepCopy();
+  MCAuto<DataArrayIdType> super_index = _super_index->deepCopy();
   if (_super_index->getNbOfElems())
     oss << "   Nb of super-packs: " << getSuperNumberOf() << std::endl;
   else
@@ -275,7 +275,7 @@ std::string MEDCouplingSkyLineArray::simpleRepr() const
     {
       oss << "   Super-indices:" << std::endl;
       oss << "   ";
-      const int * i = _super_index->begin();
+      const mcIdType * i = _super_index->begin();
       for ( ; i != _super_index->end(); ++i )
         oss << *i << " ";
       oss << std::endl;
@@ -283,16 +283,16 @@ std::string MEDCouplingSkyLineArray::simpleRepr() const
 
   oss << "   Indices:" << std::endl;
   oss << "   ";
-  const int * i = _index->begin();
+  const mcIdType * i = _index->begin();
   for ( ; i != _index->end(); ++i )
     oss << *i << " ";
   oss << std::endl;
   oss << "   Values:" << std::endl;
   oss << "     ";
-  const int * v = _values->begin();
-  int cnt = 0, cntI = 0;
+  const mcIdType * v = _values->begin();
+  mcIdType cnt = 0, cntI = 0;
   i = _index->begin();
-  for ( const int * si = super_index->begin()+1; v != _values->end(); ++v, ++cnt )
+  for ( const mcIdType * si = super_index->begin()+1; v != _values->end(); ++v, ++cnt )
     {
       if ( cnt == *i )
         {
@@ -315,12 +315,12 @@ std::string MEDCouplingSkyLineArray::simpleRepr() const
 /**
  * For a 2- or 3-level SkyLine array, return a copy of the absolute pack with given identifier.
  */
-void MEDCouplingSkyLineArray::getSimplePackSafe(const int absolutePackId, std::vector<int> & pack) const
+void MEDCouplingSkyLineArray::getSimplePackSafe(const mcIdType absolutePackId, std::vector<mcIdType> & pack) const
 {
-  if(absolutePackId < 0 || absolutePackId >= (int)_index->getNbOfElems())
+  if(absolutePackId < 0 || absolutePackId >= _index->getNbOfElems())
     throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::getPackSafe: invalid index!");
-  const int * iP(_index->begin()), *vP(_values->begin());
-  int sz = iP[absolutePackId+1]-iP[absolutePackId];
+  const mcIdType * iP(_index->begin()), *vP(_values->begin());
+  mcIdType sz = iP[absolutePackId+1]-iP[absolutePackId];
   pack.resize(sz);
   std::copy(vP+iP[absolutePackId], vP+iP[absolutePackId+1],pack.begin());
 }
@@ -328,11 +328,11 @@ void MEDCouplingSkyLineArray::getSimplePackSafe(const int absolutePackId, std::v
 /**
  * Same as getPackSafe, but directly returns a pointer to the internal data with the size of the pack.
  */
-const int * MEDCouplingSkyLineArray::getSimplePackSafePtr(const int absolutePackId, int & packSize) const
+const mcIdType * MEDCouplingSkyLineArray::getSimplePackSafePtr(const mcIdType absolutePackId, mcIdType & packSize) const
 {
-  if(absolutePackId < 0 || absolutePackId >= (int)_index->getNbOfElems())
+  if(absolutePackId < 0 || absolutePackId >= _index->getNbOfElems())
     throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::getPackSafe: invalid index!");
-  const int * iP(_index->begin()), *vP(_values->begin());
+  const mcIdType * iP(_index->begin()), *vP(_values->begin());
   packSize = iP[absolutePackId+1]-iP[absolutePackId];
   return vP+iP[absolutePackId];
 }
@@ -344,30 +344,30 @@ const int * MEDCouplingSkyLineArray::getSimplePackSafePtr(const int absolutePack
  * \param[in] superPackIndices the list of super-packs that should be inspected
  * \param[in] packBg the pack that the function is looking for in each of the provided super-pack
  * \param[in] packEnd the pack that the function is looking for in each of the provided super-pack
- * \param[out] a vector of int, having the same size as superPackIndices and containing for each inspected super-pack
+ * \param[out] a vector of mcIdType, having the same size as superPackIndices and containing for each inspected super-pack
  * the index of the first matching pack, or -1 if none found.
  */
-void MEDCouplingSkyLineArray::findPackIds(const std::vector<int> & superPackIndices,
-                                          const int *packBg, const int *packEnd,
-                                          std::vector<int>& out) const
+void MEDCouplingSkyLineArray::findPackIds(const std::vector<mcIdType> & superPackIndices,
+                                          const mcIdType *packBg, const mcIdType *packEnd,
+                                          std::vector<mcIdType>& out) const
 {
   using namespace std;
 
   checkSuperIndex("findPackIds");
 
-  int packSz = std::distance(packBg, packEnd);
+  mcIdType packSz = ToIdType(std::distance(packBg, packEnd));
   if (!packSz)
     throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::findPackIds: void pack!");
 
   out.resize(superPackIndices.size());
-  int i = 0;
-  const int * siP(_super_index->begin()), * iP(_index->begin()), *vP(_values->begin());
-  for(vector<int>::const_iterator it=superPackIndices.begin(); it!=superPackIndices.end(); ++it, i++)
+  mcIdType i = 0;
+  const mcIdType * siP(_super_index->begin()), * iP(_index->begin()), *vP(_values->begin());
+  for(vector<mcIdType>::const_iterator it=superPackIndices.begin(); it!=superPackIndices.end(); ++it, i++)
     {
       out[i] = -1;
-      const int sPackIdx = *it;
+      const mcIdType sPackIdx = *it;
       // for each pack
-      for (int idx=siP[sPackIdx], j=0; idx < siP[sPackIdx+1]; idx++, j++)
+      for (mcIdType idx=siP[sPackIdx], j=0; idx < siP[sPackIdx+1]; idx++, j++)
         {
           if (packSz == (iP[idx+1] - iP[idx]))
             if (equal(&vP[iP[idx]], &vP[iP[idx+1]], packBg))
@@ -384,41 +384,41 @@ void MEDCouplingSkyLineArray::findPackIds(const std::vector<int> & superPackIndi
  * \param[in] superIdx is the super-pack number
  * \param[in] idx is the pack index inside the super-pack 'superIdx'.
  */
-void MEDCouplingSkyLineArray::deletePack(const int superIdx, const int idx)
+void MEDCouplingSkyLineArray::deletePack(const mcIdType superIdx, const mcIdType idx)
 {
   checkSuperIndex("deletePack");
   validSuperIndexAndIndex("deletePack", superIdx, idx);
 
-  int * vP = _values->getPointer();
-  int * siP(_super_index->getPointer()), *iP(_index->getPointer());
-  const int start = iP[siP[superIdx]+idx], end = iP[siP[superIdx]+idx+1];
+  mcIdType * vP = _values->getPointer();
+  mcIdType * siP(_super_index->getPointer()), *iP(_index->getPointer());
+  const mcIdType start = iP[siP[superIdx]+idx], end = iP[siP[superIdx]+idx+1];
   // _values
   std::copy(vP+end, vP+_values->getNbOfElems(), vP+start);
   _values->reAlloc(_values->getNbOfElems() - (end-start));
 
   // _index
-  int nt = _index->getNbOfElems();
+  mcIdType nt = _index->getNbOfElems();
   std::copy(iP+siP[superIdx]+idx+1, iP+nt, iP+siP[superIdx]+idx);
   _index->reAlloc(nt-1); iP = _index->getPointer();  // better not forget this ...
-  for(int ii = siP[superIdx]+idx; ii < nt-1; ii++)
+  for(mcIdType ii = siP[superIdx]+idx; ii < nt-1; ii++)
     iP[ii] -= (end-start);
 
   // _super_index
-  for(int ii = superIdx+1; ii < (int)_super_index->getNbOfElems(); ii++)
+  for(mcIdType ii = superIdx+1; ii < _super_index->getNbOfElems(); ii++)
     (siP[ii])--;
 }
 
-void MEDCouplingSkyLineArray::deleteSimplePack(const int idx)
+void MEDCouplingSkyLineArray::deleteSimplePack(const mcIdType idx)
 {
   validIndex("deleteSimplePack", idx);
   
-  int* iP(_index->getPointer());
-  const int start(iP[idx]), end(iP[idx+1]);
+  mcIdType* iP(_index->getPointer());
+  const mcIdType start(iP[idx]), end(iP[idx+1]);
 
   // _values
-  int initValSz( _values->getNbOfElems() );
-  int deltaSz( start-end );  // should be negative
-  int *vP(_values->getPointer());
+  mcIdType initValSz=_values->getNbOfElems();
+  mcIdType deltaSz( start-end );  // should be negative
+  mcIdType *vP(_values->getPointer());
   if (deltaSz < 0)
     {
       std::copy(vP+end, vP+initValSz, vP+start);
@@ -427,45 +427,45 @@ void MEDCouplingSkyLineArray::deleteSimplePack(const int idx)
   else
     throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::deleteSimplePack");
   // _index
-  int nt(_index->getNbOfElems());
+  mcIdType nt=_index->getNbOfElems();
   std::copy(iP+idx+1, iP+nt, iP+idx);
-  for(int ii = idx; ii < nt-1; ii++)
+  for(mcIdType ii = idx; ii < nt-1; ii++)
     iP[ii] += deltaSz;
   _index->reAlloc(nt-1);
 }
 
-void MEDCouplingSkyLineArray::replaceSimplePacks(const DataArrayInt* idx, const std::vector<const DataArrayInt*>& packs)
+void MEDCouplingSkyLineArray::replaceSimplePacks(const DataArrayIdType* idx, const std::vector<const DataArrayIdType*>& packs)
 {    
   if (idx->empty())
     return;
     
-  for (const int * id = idx->begin(); id != idx->end(); id++)
+  for (const mcIdType * id = idx->begin(); id != idx->end(); id++)
     validIndex("deleteSimplePacks", *id);
     
-  if (idx->getNbOfElems() != packs.size())
+  if (idx->getNbOfElems() != ToIdType( packs.size()))
     throw INTERP_KERNEL::Exception("MEDCouplingSkyLineArray::deleteSimplePacks: size of list of pack is incorrect");
     
-  // copy _index, _values into a deque<set<int>>
-  std::deque< std::set<int> > valuesByIdx;
-  int* vP(_values->getPointer());
-  int* iP(_index->getPointer());
-  std::size_t nt ( _index->getNbOfElems() );
-  for (int ii = 0; ii < nt-1; ii++)
-    valuesByIdx.push_back(std::set<int>(vP+iP[ii], vP+iP[ii+1]));
+  // copy _index, _values into a deque<set<mcIdType>>
+  std::deque< std::set<mcIdType> > valuesByIdx;
+  mcIdType* vP(_values->getPointer());
+  mcIdType* iP(_index->getPointer());
+  mcIdType nt = _index->getNbOfElems();
+  for (mcIdType ii = 0; ii < nt-1; ii++)
+    valuesByIdx.push_back(std::set<mcIdType>(vP+iP[ii], vP+iP[ii+1]));
     
-  // modify the deque<set<int>> according to idx and packs
-  int ii(0);
-  for (const int *id = idx->begin(); id != idx->end(); id++)
+  // modify the deque<set<mcIdType>> according to idx and packs
+  mcIdType ii(0);
+  for (const mcIdType *id = idx->begin(); id != idx->end(); id++)
     {
-      valuesByIdx[*id] = std::set<int>(packs[ii]->begin(), packs[ii]->end());
+      valuesByIdx[*id] = std::set<mcIdType>(packs[ii]->begin(), packs[ii]->end());
       ii++;
     }
-  // copy back the deque<set<int>> into _index, _values
-  int valSz(0);
+  // copy back the deque<set<mcIdType>> into _index, _values
+  mcIdType valSz(0);
   *iP = 0;
-  for (std::deque< std::set<int> >::const_iterator values=valuesByIdx.begin();values!=valuesByIdx.end();values++)
+  for (std::deque< std::set<mcIdType> >::const_iterator values=valuesByIdx.begin();values!=valuesByIdx.end();values++)
     {
-      valSz += (*values).size();
+      valSz += ToIdType((*values).size());
       *(++iP) = valSz;
     }
   _values->reAlloc(valSz);
@@ -478,21 +478,21 @@ void MEDCouplingSkyLineArray::replaceSimplePacks(const DataArrayInt* idx, const
     }
 }
 
-void MEDCouplingSkyLineArray::deleteSimplePacks(const DataArrayInt* idx)
+void MEDCouplingSkyLineArray::deleteSimplePacks(const DataArrayIdType* idx)
 {    
   for (auto id = idx->begin(); id != idx->end(); id++)
     validIndex("deleteSimplePacks", *id);
   
-  std::set<int> packsToDelete(idx->begin(), idx->end());
+  std::set<mcIdType> packsToDelete(idx->begin(), idx->end());
     
   // _values
-  int* iP(_index->getPointer());
-  int initValSz = _values->getNbOfElems();
-  int *vP(_values->getPointer());
-  int end_prec(0),start_prec(0);
-  for(std::set<int>::const_iterator ii=packsToDelete.begin();ii!=packsToDelete.end();ii++)
+  mcIdType* iP(_index->getPointer());
+  mcIdType initValSz = _values->getNbOfElems();
+  mcIdType *vP(_values->getPointer());
+  mcIdType end_prec(0),start_prec(0);
+  for(std::set<mcIdType>::const_iterator ii=packsToDelete.begin();ii!=packsToDelete.end();ii++)
     {
-      int start = iP[*ii];
+      mcIdType start = iP[*ii];
       if (end_prec != 0)
         std::copy(vP+end_prec, vP+start, vP+start_prec);
       start_prec += start-end_prec;
@@ -503,17 +503,17 @@ void MEDCouplingSkyLineArray::deleteSimplePacks(const DataArrayInt* idx)
   _values->reAlloc(initValSz-(end_prec-start_prec));
     
   // _index
-  int nt = _index->getNbOfElems();
-  int offset = 0;
+  mcIdType nt = _index->getNbOfElems();
+  mcIdType offset = 0;
   end_prec = 0;
   start_prec = 0;
-  int deleted = 0;
-  for(std::set<int>::const_iterator ii=packsToDelete.begin();ii!=packsToDelete.end();ii++)
+  mcIdType deleted = 0;
+  for(std::set<mcIdType>::const_iterator ii=packsToDelete.begin();ii!=packsToDelete.end();ii++)
     {
       if (end_prec != 0)
         {
           std::copy(iP+end_prec, iP+*ii, iP+start_prec);
-          for (int i=start_prec; i<*ii; i++)
+          for (mcIdType i=start_prec; i<*ii; i++)
             iP[i] -= offset;
         }
       offset += iP[*ii+1] - iP[*ii];
@@ -524,7 +524,7 @@ void MEDCouplingSkyLineArray::deleteSimplePacks(const DataArrayInt* idx)
   if (end_prec != 0)
     {
       std::copy(iP+end_prec, iP+nt, iP+start_prec);
-      for (int i=start_prec; i<nt; i++)
+      for (mcIdType i=start_prec; i<nt; i++)
         iP[i] -= offset;
     }
   _index->reAlloc(nt-deleted);
@@ -533,34 +533,34 @@ void MEDCouplingSkyLineArray::deleteSimplePacks(const DataArrayInt* idx)
 /**!
  * Insert a new pack in super-pack at index 'superIdx'. The pack is inserted at the end of the pack list of the chosen super-pack.
  */
-void MEDCouplingSkyLineArray::pushBackPack(const int superIdx, const int * packBg, const int * packEnd)
+void MEDCouplingSkyLineArray::pushBackPack(const mcIdType superIdx, const mcIdType * packBg, const mcIdType * packEnd)
 {
   using namespace std;
 
   checkSuperIndex("pushBackPack");
   validSuperIndex("pushBackPack", superIdx);
 
-  int *siP(_super_index->getPointer()), *iP(_index->getPointer());
-  const int sz(distance(packBg, packEnd));
+  mcIdType *siP(_super_index->getPointer()), *iP(_index->getPointer());
+  const mcIdType sz(ToIdType(distance(packBg, packEnd)));
 
   // _values
   _values->reAlloc(_values->getNbOfElems()+sz);
-  int * vPE(_values->getPointer()+_values->getNbOfElems());
-  int *vP(_values->getPointer());
+  mcIdType * vPE(_values->getPointer()+_values->getNbOfElems());
+  mcIdType *vP(_values->getPointer());
   copy(vP+iP[siP[superIdx+1]], vPE-sz, vP+iP[siP[superIdx+1]]+sz);
   // insert pack
   copy(packBg, packEnd, vP+iP[siP[superIdx+1]]);
 
   // _index
-  int nt = _index->getNbOfElems();
+  mcIdType nt = ToIdType(_index->getNbOfElems());
   _index->reAlloc(nt+1); iP = _index->getPointer();
   copy(iP+siP[superIdx+1]+1, iP+nt, iP+siP[superIdx+1]+2);
   iP[siP[superIdx+1]+1] = iP[siP[superIdx+1]] + sz;
-  for(int ii = siP[superIdx+1]+2; ii < nt+1; ii++)
+  for(mcIdType ii = siP[superIdx+1]+2; ii < nt+1; ii++)
     iP[ii] += sz;
 
   // _super_index
-  for(int ii = superIdx+1; ii < (int)_super_index->getNbOfElems(); ii++)
+  for(mcIdType ii = superIdx+1; ii < _super_index->getNbOfElems(); ii++)
     (siP[ii])++;
 }
 
@@ -568,22 +568,22 @@ void MEDCouplingSkyLineArray::pushBackPack(const int superIdx, const int * packB
  * Replace pack with absolute index 'idx' with the provided new pack. Function can be used either
  * for 2-level SkyLine or 3-level SkyLine.
  */
-void MEDCouplingSkyLineArray::replaceSimplePack(const int idx, const int * packBg, const int * packEnd)
+void MEDCouplingSkyLineArray::replaceSimplePack(const mcIdType idx, const mcIdType * packBg, const mcIdType * packEnd)
 {
   validIndex("replaceSimplePack", idx);
 
-  int * iP(_index->getPointer());
-  int newSz = std::distance(packBg, packEnd);
-  const int start = iP[idx], end = iP[idx+1];
+  mcIdType * iP(_index->getPointer());
+  mcIdType newSz = ToIdType(std::distance(packBg, packEnd));
+  const mcIdType start = iP[idx], end = iP[idx+1];
 
   // _values
-  int initValSz = _values->getNbOfElems();
-  int deltaSz = newSz-(end-start);  // can be negative
+  mcIdType initValSz = _values->getNbOfElems();
+  mcIdType deltaSz = newSz-(end-start);  // can be negative
   if (deltaSz)
     {
       if (deltaSz > 0)
         _values->reAlloc(initValSz+deltaSz);
-      int *vP(_values->getPointer());
+      mcIdType *vP(_values->getPointer());
       std::copy(vP+end, vP+initValSz, vP+end+deltaSz);
       if (deltaSz < 0)
         _values->reAlloc(initValSz+deltaSz);
@@ -593,7 +593,7 @@ void MEDCouplingSkyLineArray::replaceSimplePack(const int idx, const int * packB
   std::copy(packBg, packEnd, _values->getPointer()+start);
 
   // _index
-  for(int ii = idx+1; ii < (int)_index->getNbOfElems(); ii++)
+  for(mcIdType ii = idx+1; ii < _index->getNbOfElems(); ii++)
     iP[ii] += deltaSz;
 }
 
@@ -601,23 +601,23 @@ void MEDCouplingSkyLineArray::replaceSimplePack(const int idx, const int * packB
  * Replace pack with super index 'superIdx' and index 'idx' with the provided new pack.
  * Function can be used only for 3-level SkyLine.
  */
-void MEDCouplingSkyLineArray::replacePack(const int superIdx, const int idx, const int *packBg, const int *packEnd)
+void MEDCouplingSkyLineArray::replacePack(const mcIdType superIdx, const mcIdType idx, const mcIdType *packBg, const mcIdType *packEnd)
 {
   checkSuperIndex("replacePack");
   validSuperIndexAndIndex("replacePack", superIdx, idx);
 
-  int * siP(_super_index->getPointer()), *iP(_index->getPointer());
-  int newSz = std::distance(packBg, packEnd);
-  const int start = iP[siP[superIdx]+idx], end = iP[siP[superIdx]+idx+1];
+  mcIdType * siP(_super_index->getPointer()), *iP(_index->getPointer());
+  mcIdType newSz = ToIdType(std::distance(packBg, packEnd));
+  const mcIdType start = iP[siP[superIdx]+idx], end = iP[siP[superIdx]+idx+1];
 
   // _values
-  int initValSz = _values->getNbOfElems();
-  int deltaSz = newSz-(end-start);  // can be negative
+  mcIdType initValSz = _values->getNbOfElems();
+  mcIdType deltaSz = newSz-(end-start);  // can be negative
   if (deltaSz)
     {
       if (deltaSz > 0)
         _values->reAlloc(initValSz+deltaSz);
-      int *vP(_values->getPointer());
+      mcIdType *vP(_values->getPointer());
       std::copy(vP+end, vP+initValSz, vP+end+deltaSz);
       if (deltaSz < 0)
         _values->reAlloc(initValSz+deltaSz);
@@ -627,6 +627,6 @@ void MEDCouplingSkyLineArray::replacePack(const int superIdx, const int idx, con
   std::copy(packBg, packEnd, _values->getPointer()+start);
 
   // _index
-  for(int ii = siP[superIdx]+idx+1; ii < (int)_index->getNbOfElems(); ii++)
+  for(mcIdType ii = siP[superIdx]+idx+1; ii < _index->getNbOfElems(); ii++)
     iP[ii] += deltaSz;
 }
index 665e7a870356aa751fd6551694dc0471d1332de2..f8afb84a19c0448c6070638b0ac8dac280843246 100644 (file)
@@ -58,57 +58,57 @@ namespace MEDCoupling
   {
   public:
     static MEDCouplingSkyLineArray * New();
-    static MEDCouplingSkyLineArray * New( const std::vector<int>& index, const std::vector<int>& value);
-    static MEDCouplingSkyLineArray * New( DataArrayInt* index, DataArrayInt* value );
+    static MEDCouplingSkyLineArray * New( const std::vector<mcIdType>& index, const std::vector<mcIdType>& value);
+    static MEDCouplingSkyLineArray * New( DataArrayIdType* index, DataArrayIdType* value );
     static MEDCouplingSkyLineArray * New( const MEDCouplingSkyLineArray & other );
 
-    static MEDCouplingSkyLineArray * BuildFromPolyhedronConn( const DataArrayInt* c, const DataArrayInt* cI );
+    static MEDCouplingSkyLineArray * BuildFromPolyhedronConn( const DataArrayIdType* c, const DataArrayIdType* cI );
 
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
 
-    void set( DataArrayInt* index, DataArrayInt* value );
-    void set3( DataArrayInt* superIndex, DataArrayInt* index, DataArrayInt* value );
+    void set( DataArrayIdType* index, DataArrayIdType* value );
+    void set3( DataArrayIdType* superIndex, DataArrayIdType* index, DataArrayIdType* value );
 
-    int getSuperNumberOf()   const { return _super_index->getNbOfElems()-1; }
-    int getNumberOf() const { return _index->getNbOfElems()-1; }
-    int getLength()   const { return _values->getNbOfElems(); }
+    mcIdType getSuperNumberOf()   const { return ToIdType(_super_index->getNbOfElems())-1; }
+    mcIdType getNumberOf() const { return ToIdType(_index->getNbOfElems())-1; }
+    mcIdType getLength()   const { return ToIdType(_values->getNbOfElems()); }
 
-    const int* getSuperIndex() const { return _super_index->begin(); }
-    const int* getIndex() const { return _index->begin(); }
-    const int* getValues() const { return _values->begin(); }
+    const mcIdType* getSuperIndex() const { return _super_index->begin(); }
+    const mcIdType* getIndex() const { return _index->begin(); }
+    const mcIdType* getValues() const { return _values->begin(); }
 
-    DataArrayInt* getSuperIndexArray() const;
-    DataArrayInt* getIndexArray() const;
-    DataArrayInt* getValuesArray() const;
+    DataArrayIdType* getSuperIndexArray() const;
+    DataArrayIdType* getIndexArray() const;
+    DataArrayIdType* getValuesArray() const;
 
     std::string simpleRepr() const;
 
-    void getSimplePackSafe(const int absolutePackId, std::vector<int> & pack) const;
-    const int * getSimplePackSafePtr(const int absolutePackId, int & packSize) const;
-    void findPackIds(const std::vector<int> & superPackIndices, const int *packBg, const int *packEnd,
-                     std::vector<int>& out) const;
+    void getSimplePackSafe(const mcIdType absolutePackId, std::vector<mcIdType> & pack) const;
+    const mcIdType * getSimplePackSafePtr(const mcIdType absolutePackId, mcIdType & packSize) const;
+    void findPackIds(const std::vector<mcIdType> & superPackIndices, const mcIdType *packBg, const mcIdType *packEnd,
+                     std::vector<mcIdType>& out) const;
 
-    void deletePack(const int superIdx, const int idx);
-    void deleteSimplePack(const int idx);
-    void pushBackPack(const int superIdx, const int * packBg, const int * packEnd);
+    void deletePack(const mcIdType superIdx, const mcIdType idx);
+    void deleteSimplePack(const mcIdType idx);
+    void pushBackPack(const mcIdType superIdx, const mcIdType * packBg, const mcIdType * packEnd);
 
-    void replaceSimplePack(const int idx, const int * packBg, const int * packEnd);
-    void replacePack(const int superIdx, const int idx, const int * packBg, const int * packEnd);
+    void replaceSimplePack(const mcIdType idx, const mcIdType * packBg, const mcIdType * packEnd);
+    void replacePack(const mcIdType superIdx, const mcIdType idx, const mcIdType * packBg, const mcIdType * packEnd);
 
-    void deleteSimplePacks(const DataArrayInt* idx);
-    void replaceSimplePacks(const DataArrayInt* idx, const std::vector<const DataArrayInt*>& packs);
+    void deleteSimplePacks(const DataArrayIdType* idx);
+    void replaceSimplePacks(const DataArrayIdType* idx, const std::vector<const DataArrayIdType*>& packs);
     
-    void convertToPolyhedronConn( MCAuto<DataArrayInt>& c,  MCAuto<DataArrayInt>& cI) const;
+    void convertToPolyhedronConn( MCAuto<DataArrayIdType>& c,  MCAuto<DataArrayIdType>& cI) const;
 
   private:
     MEDCouplingSkyLineArray();
     ~MEDCouplingSkyLineArray();
 
     void checkSuperIndex(const std::string& func) const;
-    void validSuperIndex(const std::string& func, int superIndex) const;
-    void validIndex(const std::string& func, int index) const;
-    void validSuperIndexAndIndex(const std::string& func, int superIndex, int index) const;
+    void validSuperIndex(const std::string& func, mcIdType superIndex) const;
+    void validIndex(const std::string& func, mcIdType index) const;
+    void validSuperIndexAndIndex(const std::string& func, mcIdType superIndex, mcIdType index) const;
 
     MCAuto<DataArrayIdType> _super_index;
     MCAuto<DataArrayIdType> _index;
old mode 100644 (file)
new mode 100755 (executable)
index bdb9cdb..69f68ac
@@ -56,7 +56,7 @@ bool MEDCouplingStructuredMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, do
   return MEDCouplingMesh::isEqualIfNotWhy(other,prec,reason);
 }
 
-INTERP_KERNEL::NormalizedCellType MEDCouplingStructuredMesh::getTypeOfCell(std::size_t cellId) const
+INTERP_KERNEL::NormalizedCellType MEDCouplingStructuredMesh::getTypeOfCell(mcIdType cellId) const
 {
   return GetGeoTypeGivenMeshDimension(getMeshDimension());
 }
@@ -85,9 +85,9 @@ std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingStructuredMesh::getAllGeo
   return ret2;
 }
 
-std::size_t MEDCouplingStructuredMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+mcIdType MEDCouplingStructuredMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
-  std::size_t ret(getNumberOfCells());
+  mcIdType ret(getNumberOfCells());
   if(type==getTypeOfCell(0))
     return ret;
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getTypeOfCell(0)));
@@ -95,9 +95,9 @@ std::size_t MEDCouplingStructuredMesh::getNumberOfCellsWithType(INTERP_KERNEL::N
   throw INTERP_KERNEL::Exception(oss.str().c_str());
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+DataArrayIdType *MEDCouplingStructuredMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   if(getTypeOfCell(0)==type)
     {
       ret->alloc(getNumberOfCells(),1);
@@ -108,23 +108,23 @@ DataArrayInt *MEDCouplingStructuredMesh::giveCellsWithType(INTERP_KERNEL::Normal
   return ret.retn();
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::computeNbOfNodesPerCell() const
+DataArrayIdType *MEDCouplingStructuredMesh::computeNbOfNodesPerCell() const
 {
-  int nbCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  std::size_t nbCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbCells,1);
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(getTypeOfCell(0));
-  ret->fillWithValue((int)cm.getNumberOfNodes());
+  ret->fillWithValue(ToIdType(cm.getNumberOfNodes()));
   return ret.retn();
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::computeNbOfFacesPerCell() const
+DataArrayIdType *MEDCouplingStructuredMesh::computeNbOfFacesPerCell() const
 {
-  int nbCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  std::size_t nbCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbCells,1);
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(getTypeOfCell(0));
-  ret->fillWithValue((int)cm.getNumberOfSons());
+  ret->fillWithValue(ToIdType(cm.getNumberOfSons()));
   return ret.retn();
 }
 
@@ -133,20 +133,20 @@ DataArrayInt *MEDCouplingStructuredMesh::computeNbOfFacesPerCell() const
  * will be counted only once here whereas it will be counted several times in MEDCouplingMesh::computeNbOfNodesPerCell method.
  * Here for structured mesh it returns exactly as MEDCouplingStructuredMesh::computeNbOfNodesPerCell does.
  *
- * \return DataArrayInt * - new object to be deallocated by the caller.
+ * \return DataArrayIdType * - new object to be deallocated by the caller.
  */
-DataArrayInt *MEDCouplingStructuredMesh::computeEffectiveNbOfNodesPerCell() const
+DataArrayIdType *MEDCouplingStructuredMesh::computeEffectiveNbOfNodesPerCell() const
 {
   return computeNbOfNodesPerCell();
 }
 
-void MEDCouplingStructuredMesh::getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const
+void MEDCouplingStructuredMesh::getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const
 {
   int meshDim=getMeshDimension();
-  int tmpCell[3],tmpNode[3];
+  mcIdType tmpCell[3],tmpNode[3];
   getSplitCellValues(tmpCell);
   getSplitNodeValues(tmpNode);
-  int tmp2[3];
+  mcIdType tmp2[3];
   GetPosFromId(cellId,meshDim,tmpCell,tmp2);
   switch(meshDim)
   {
@@ -173,9 +173,9 @@ void MEDCouplingStructuredMesh::getNodeIdsOfCell(std::size_t cellId, std::vector
  */
 int MEDCouplingStructuredMesh::getMeshDimension() const
 {
-  std::vector<int> ngs(getNodeGridStructure());
+  std::vector<mcIdType> ngs(getNodeGridStructure());
   int ret(0),pos(0);
-  for(std::vector<int>::const_iterator it=ngs.begin();it!=ngs.end();it++,pos++)
+  for(std::vector<mcIdType>::const_iterator it=ngs.begin();it!=ngs.end();it++,pos++)
     {
       if(*it<=0)
         {
@@ -195,11 +195,11 @@ int MEDCouplingStructuredMesh::getMeshDimension() const
  */
 int MEDCouplingStructuredMesh::getSpaceDimensionOnNodeStruct() const
 {
-  std::vector<int> nodeStr(getNodeGridStructure());
+  std::vector<mcIdType> nodeStr(getNodeGridStructure());
   int spd1(0),pos(0);
-  for(std::vector<int>::const_iterator it=nodeStr.begin();it!=nodeStr.end();it++,pos++)
+  for(std::vector<mcIdType>::const_iterator it=nodeStr.begin();it!=nodeStr.end();it++,pos++)
     {
-      int elt(*it);
+      mcIdType elt(*it);
       if(elt<=0)
         {
           std::ostringstream oss; oss << "MEDCouplingStructuredMesh::getSpaceDimensionOnNodeStruct : At pos #" << pos << " value of node grid structure is " << *it << " ! must be >=1 !";
@@ -210,36 +210,36 @@ int MEDCouplingStructuredMesh::getSpaceDimensionOnNodeStruct() const
   return spd1;
 }
 
-void MEDCouplingStructuredMesh::getSplitCellValues(int *res) const
+void MEDCouplingStructuredMesh::getSplitCellValues(mcIdType *res) const
 {
-  std::vector<int> strct(getCellGridStructure());
-  std::vector<int> ret(MEDCouplingStructuredMesh::GetSplitVectFromStruct(strct));
+  std::vector<mcIdType> strct(getCellGridStructure());
+  std::vector<mcIdType> ret(MEDCouplingStructuredMesh::GetSplitVectFromStruct(strct));
   std::copy(ret.begin(),ret.end(),res);
 }
 
-void MEDCouplingStructuredMesh::getSplitNodeValues(int *res) const
+void MEDCouplingStructuredMesh::getSplitNodeValues(mcIdType *res) const
 {
-  std::vector<int> strct(getNodeGridStructure());
-  std::vector<int> ret(MEDCouplingStructuredMesh::GetSplitVectFromStruct(strct));
+  std::vector<mcIdType> strct(getNodeGridStructure());
+  std::vector<mcIdType> ret(MEDCouplingStructuredMesh::GetSplitVectFromStruct(strct));
   std::copy(ret.begin(),ret.end(),res);
 }
 
 /*!
  * This method returns the number of cells of unstructured sub level mesh, without building it.
  */
-int MEDCouplingStructuredMesh::getNumberOfCellsOfSubLevelMesh() const
+mcIdType MEDCouplingStructuredMesh::getNumberOfCellsOfSubLevelMesh() const
 {
-  std::vector<int> cgs(getCellGridStructure());
+  std::vector<mcIdType> cgs(getCellGridStructure());
   return GetNumberOfCellsOfSubLevelMesh(cgs,getMeshDimension());
 }
 
 /*!
  * See MEDCouplingUMesh::getDistributionOfTypes for more information
  */
-std::vector<int> MEDCouplingStructuredMesh::getDistributionOfTypes() const
+std::vector<mcIdType> MEDCouplingStructuredMesh::getDistributionOfTypes() const
 {
   //only one type of cell
-  std::vector<int> ret(3);
+  std::vector<mcIdType> ret(3);
   ret[0]=getTypeOfCell(0);
   ret[1]=getNumberOfCells();
   ret[2]=-1; //ret[3*k+2]==-1 because it has no sense here
@@ -252,12 +252,12 @@ std::vector<int> MEDCouplingStructuredMesh::getDistributionOfTypes() const
  *
  * See MEDCouplingUMesh::checkTypeConsistencyAndContig for more information
  */
-DataArrayInt *MEDCouplingStructuredMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+DataArrayIdType *MEDCouplingStructuredMesh::checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(code.size()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : invalid input code should be exactly of size 3 !");
-  if(code[0]!=(int)getTypeOfCell(0))
+  if(code[0]!=ToIdType(getTypeOfCell(0)))
     {
       std::ostringstream oss; oss << "MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : Mismatch of geometric type ! Asking for " << code[0] << " whereas the geometric type is \a this is " << getTypeOfCell(0) << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -275,15 +275,15 @@ DataArrayInt *MEDCouplingStructuredMesh::checkTypeConsistencyAndContig(const std
   if(code[2]!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : single geo type mesh ! 0 or -1 is expected at pos #2 of input code !");
   if(idsPerType.size()!=1)
-    throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : input code points to DataArrayInt #0 whereas the size of idsPerType is not equal to 1 !");
-  const DataArrayInt *pfl=idsPerType[0];
+    throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : input code points to DataArrayIdType #0 whereas the size of idsPerType is not equal to 1 !");
+  const DataArrayIdType *pfl=idsPerType[0];
   if(!pfl)
-    throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : the input code points to a NULL DataArrayInt at rank 0 !");
+    throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : the input code points to a NULL DataArrayIdType at rank 0 !");
   if(pfl->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::checkTypeConsistencyAndContig : input profile should have exactly one component !");
   pfl->checkAllIdsInRange(0,nbOfCells);
   pfl->incrRef();
-  return const_cast<DataArrayInt *>(pfl);
+  return const_cast<DataArrayIdType *>(pfl);
 }
 
 /*!
@@ -310,16 +310,16 @@ DataArrayInt *MEDCouplingStructuredMesh::checkTypeConsistencyAndContig(const std
  *          - After \a code contains [NORM_...,nbCells,0], \a idsInPflPerType [[0,1]] and \a idsPerType is [[1,2]] <br>
 
  */
-void MEDCouplingStructuredMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller) const
+void MEDCouplingStructuredMesh::splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller) const
 {
   if(!profile || !profile->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::splitProfilePerType : input profile is NULL or not allocated !");
   if(profile->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::splitProfilePerType : input profile should have exactly one component !");
-  int nbTuples(profile->getNumberOfTuples());
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbTuples(profile->getNumberOfTuples());
+  mcIdType nbOfCells=getNumberOfCells();
   code.resize(3); idsInPflPerType.resize(1);
-  code[0]=(int)getTypeOfCell(0); code[1]=nbOfCells;
+  code[0]=ToIdType(getTypeOfCell(0)); code[1]=nbOfCells;
   idsInPflPerType.resize(1);
   if(smartPflKiller && profile->isIota(nbOfCells))
     {
@@ -333,7 +333,7 @@ void MEDCouplingStructuredMesh::splitProfilePerType(const DataArrayInt *profile,
   profile->checkAllIdsInRange(0,nbOfCells);
   idsPerType.resize(1);
   idsPerType[0]=profile->deepCopy();
-  idsInPflPerType[0]=DataArrayInt::Range(0,nbTuples,1);
+  idsInPflPerType[0]=DataArrayIdType::Range(0,nbTuples,1);
 }
 
 /*!
@@ -352,9 +352,9 @@ MEDCoupling1SGTUMesh *MEDCouplingStructuredMesh::build1SGTUnstructured() const
   if((meshDim<0 || meshDim>3) || (spaceDim<0 || spaceDim>3))
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::build1SGTUnstructured : meshdim and spacedim must be in [1,2,3] !");
   MCAuto<DataArrayDouble> coords(getCoordinatesAndOwner());
-  int ns[3];
+  mcIdType ns[3];
   getNodeGridStructure(ns);
-  MCAuto<DataArrayInt> conn(Build1GTNodalConnectivity(ns,ns+spaceDim));
+  MCAuto<DataArrayIdType> conn(Build1GTNodalConnectivity(ns,ns+spaceDim));
   MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(getName(),GetGeoTypeGivenMeshDimension(meshDim)));
   ret->setNodalConnectivity(conn); ret->setCoords(coords);
   try
@@ -375,9 +375,9 @@ MEDCoupling1SGTUMesh *MEDCouplingStructuredMesh::build1SGTSubLevelMesh() const
   if(meshDim<1 || meshDim>3)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::build1SGTSubLevelMesh : meshdim must be in [2,3] !");
   MCAuto<DataArrayDouble> coords(getCoordinatesAndOwner());
-  int ns[3];
+  mcIdType ns[3];
   getNodeGridStructure(ns);
-  MCAuto<DataArrayInt> conn(Build1GTNodalConnectivityOfSubLevelMesh(ns,ns+meshDim));
+  MCAuto<DataArrayIdType> conn(Build1GTNodalConnectivityOfSubLevelMesh(ns,ns+meshDim));
   MCAuto<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(getName(),GetGeoTypeGivenMeshDimension(meshDim-1)));
   ret->setNodalConnectivity(conn); ret->setCoords(coords);
   return ret.retn();
@@ -409,26 +409,26 @@ MEDCouplingUMesh *MEDCouplingStructuredMesh::buildUnstructured() const
  *  \return MEDCouplingMesh * - a new instance of MEDCouplingUMesh. The caller is to
  *         delete this mesh using decrRef() as it is no more needed.
  */
-MEDCouplingMesh *MEDCouplingStructuredMesh::buildPart(const int *start, const int *end) const
+MEDCouplingMesh *MEDCouplingStructuredMesh::buildPart(const mcIdType *start, const mcIdType *end) const
 {
   MCAuto<MEDCouplingUMesh> um(buildUnstructured());
   return um->buildPart(start,end);
 }
 
-MEDCouplingMesh *MEDCouplingStructuredMesh::buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const
+MEDCouplingMesh *MEDCouplingStructuredMesh::buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const
 {
-  std::vector<int> cgs(getCellGridStructure());
-  std::vector< std::pair<int,int> > cellPartFormat,nodePartFormat;
+  std::vector<mcIdType> cgs(getCellGridStructure());
+  std::vector< std::pair<mcIdType,mcIdType> > cellPartFormat,nodePartFormat;
   if(IsPartStructured(start,end,cgs,cellPartFormat))
     {
       MCAuto<MEDCouplingStructuredMesh> ret(buildStructuredSubPart(cellPartFormat));
       nodePartFormat=cellPartFormat;
-      for(std::vector< std::pair<int,int> >::iterator it=nodePartFormat.begin();it!=nodePartFormat.end();it++)
+      for(std::vector< std::pair<mcIdType,mcIdType> >::iterator it=nodePartFormat.begin();it!=nodePartFormat.end();it++)
         (*it).second++;
-      MCAuto<DataArrayInt> tmp1(BuildExplicitIdsFrom(getNodeGridStructure(),nodePartFormat));
-      MCAuto<DataArrayInt> tmp2(DataArrayInt::New()); tmp2->alloc(getNumberOfNodes(),1);
+      MCAuto<DataArrayIdType> tmp1(BuildExplicitIdsFrom(getNodeGridStructure(),nodePartFormat));
+      MCAuto<DataArrayIdType> tmp2(DataArrayIdType::New()); tmp2->alloc(getNumberOfNodes(),1);
       tmp2->fillWithValue(-1);
-      MCAuto<DataArrayInt> tmp3(DataArrayInt::New()); tmp3->alloc(tmp1->getNumberOfTuples(),1); tmp3->iota(0);
+      MCAuto<DataArrayIdType> tmp3(DataArrayIdType::New()); tmp3->alloc(tmp1->getNumberOfTuples(),1); tmp3->iota(0);
       tmp2->setPartOfValues3(tmp3,tmp1->begin(),tmp1->end(),0,1,1);
       arr=tmp2.retn();
       return ret.retn();
@@ -440,7 +440,7 @@ MEDCouplingMesh *MEDCouplingStructuredMesh::buildPartAndReduceNodes(const int *s
     }
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::simplexize(int policy)
+DataArrayIdType *MEDCouplingStructuredMesh::simplexize(int policy)
 {
   throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::simplexize : not available for Cartesian mesh !");
 }
@@ -459,19 +459,19 @@ MEDCouplingFieldDouble *MEDCouplingStructuredMesh::buildOrthogonalField() const
     throw INTERP_KERNEL::Exception("Expected a MEDCouplingStructuredMesh with meshDim == 2 !");
   MCAuto<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME));
   MCAuto<DataArrayDouble> array(DataArrayDouble::New());
-  int nbOfCells(getNumberOfCells());
+  mcIdType nbOfCells=getNumberOfCells();
   array->alloc(nbOfCells,3);
   double *vals(array->getPointer());
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     { vals[3*i]=0.; vals[3*i+1]=0.; vals[3*i+2]=1.; }
   ret->setArray(array);
   ret->setMesh(this);
   return ret.retn();
 }
 
-void MEDCouplingStructuredMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const
+void MEDCouplingStructuredMesh::getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const
 {
-  std::vector<int> ngs(getNodeGridStructure());
+  std::vector<mcIdType> ngs(getNodeGridStructure());
   int dim(getSpaceDimension());
   switch(dim)
   {
@@ -486,18 +486,18 @@ void MEDCouplingStructuredMesh::getReverseNodalConnectivity(DataArrayInt *revNod
   }
 }
 
-void MEDCouplingStructuredMesh::GetReverseNodalConnectivity1(const std::vector<int>& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx)
+void MEDCouplingStructuredMesh::GetReverseNodalConnectivity1(const std::vector<mcIdType>& ngs, DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx)
 {
-  int nbNodes(ngs[0]);
+  mcIdType nbNodes(ngs[0]);
   revNodalIndx->alloc(nbNodes+1,1);
   if(nbNodes==0)
     { revNodal->alloc(0,1); revNodalIndx->setIJ(0,0,0); return ; }
   if(nbNodes==1)
     { revNodal->alloc(1,1); revNodal->setIJ(0,0,0); revNodalIndx->setIJ(0,0,0); revNodalIndx->setIJ(1,0,1); return ; }
   revNodal->alloc(2*(nbNodes-1),1);
-  int *rn(revNodal->getPointer()),*rni(revNodalIndx->getPointer());
+  mcIdType *rn(revNodal->getPointer()),*rni(revNodalIndx->getPointer());
   *rni++=0; *rni=1; *rn++=0;
-  for(int i=1;i<nbNodes-1;i++,rni++)
+  for(mcIdType i=1;i<nbNodes-1;i++,rni++)
     {
       rn[0]=i-1; rn[1]=i;
       rni[1]=rni[0]+2;
@@ -506,32 +506,32 @@ void MEDCouplingStructuredMesh::GetReverseNodalConnectivity1(const std::vector<i
   rn[0]=nbNodes-2; rni[1]=rni[0]+1;
 }
 
-void MEDCouplingStructuredMesh::GetReverseNodalConnectivity2(const std::vector<int>& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx)
+void MEDCouplingStructuredMesh::GetReverseNodalConnectivity2(const std::vector<mcIdType>& ngs, DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx)
 {
-  int nbNodesX(ngs[0]),nbNodesY(ngs[1]);
-  int nbNodes(nbNodesX*nbNodesY);
+  mcIdType nbNodesX(ngs[0]),nbNodesY(ngs[1]);
+  mcIdType nbNodes(nbNodesX*nbNodesY);
   if(nbNodesX==0 || nbNodesY==0)
     { revNodal->alloc(0,1); revNodalIndx->setIJ(0,0,0); return ; }
   if(nbNodesX==1 || nbNodesY==1)
-    { std::vector<int> ngs2(1); ngs2[0]=std::max(nbNodesX,nbNodesY); return GetReverseNodalConnectivity1(ngs2,revNodal,revNodalIndx); }
+    { std::vector<mcIdType> ngs2(1); ngs2[0]=std::max(nbNodesX,nbNodesY); return GetReverseNodalConnectivity1(ngs2,revNodal,revNodalIndx); }
   revNodalIndx->alloc(nbNodes+1,1);
-  int nbCellsX(nbNodesX-1),nbCellsY(nbNodesY-1);
+  mcIdType nbCellsX(nbNodesX-1),nbCellsY(nbNodesY-1);
   revNodal->alloc(4*(nbNodesX-2)*(nbNodesY-2)+2*2*(nbNodesX-2)+2*2*(nbNodesY-2)+4,1);
-  int *rn(revNodal->getPointer()),*rni(revNodalIndx->getPointer());
+  mcIdType *rn(revNodal->getPointer()),*rni(revNodalIndx->getPointer());
   *rni++=0; *rni=1; *rn++=0;
-  for(int i=1;i<nbNodesX-1;i++,rni++,rn+=2)
+  for(mcIdType i=1;i<nbNodesX-1;i++,rni++,rn+=2)
     {
       rn[0]=i-1; rn[1]=i;
       rni[1]=rni[0]+2;
     }
   rni[1]=rni[0]+1; *rn++=nbCellsX-1;
   rni++;
-  for(int j=1;j<nbNodesY-1;j++)
+  for(mcIdType j=1;j<nbNodesY-1;j++)
     {
-      int off(nbCellsX*(j-1)),off2(nbCellsX*j);
+      mcIdType off(nbCellsX*(j-1)),off2(nbCellsX*j);
       rni[1]=rni[0]+2; rn[0]=off; rn[1]=off2;
       rni++; rn+=2;
-      for(int i=1;i<nbNodesX-1;i++,rni++,rn+=4)
+      for(mcIdType i=1;i<nbNodesX-1;i++,rni++,rn+=4)
         {
           rn[0]=i-1+off; rn[1]=i+off; rn[2]=i-1+off2; rn[3]=i+off2;
           rni[1]=rni[0]+4;
@@ -539,10 +539,10 @@ void MEDCouplingStructuredMesh::GetReverseNodalConnectivity2(const std::vector<i
       rni[1]=rni[0]+2; rn[0]=off+nbCellsX-1; rn[1]=off2+nbCellsX-1;
       rni++; rn+=2;
     }
-  int off3(nbCellsX*(nbCellsY-1));
+  mcIdType off3(nbCellsX*(nbCellsY-1));
   rni[1]=rni[0]+1;
   rni++; *rn++=off3;
-  for(int i=1;i<nbNodesX-1;i++,rni++,rn+=2)
+  for(mcIdType i=1;i<nbNodesX-1;i++,rni++,rn+=2)
     {
       rn[0]=i-1+off3; rn[1]=i+off3;
       rni[1]=rni[0]+2;
@@ -550,16 +550,16 @@ void MEDCouplingStructuredMesh::GetReverseNodalConnectivity2(const std::vector<i
   rni[1]=rni[0]+1; rn[0]=nbCellsX*nbCellsY-1;
 }
 
-void MEDCouplingStructuredMesh::GetReverseNodalConnectivity3(const std::vector<int>& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx)
+void MEDCouplingStructuredMesh::GetReverseNodalConnectivity3(const std::vector<mcIdType>& ngs, DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx)
 {
-  int nbNodesX(ngs[0]),nbNodesY(ngs[1]),nbNodesZ(ngs[2]);
-  int nbNodes(nbNodesX*nbNodesY*nbNodesZ);
+  mcIdType nbNodesX(ngs[0]),nbNodesY(ngs[1]),nbNodesZ(ngs[2]);
+  mcIdType nbNodes(nbNodesX*nbNodesY*nbNodesZ);
   if(nbNodesX==0 || nbNodesY==0 || nbNodesZ==0)
     { revNodal->alloc(0,1); revNodalIndx->setIJ(0,0,0); return ; }
   if(nbNodesX==1 || nbNodesY==1 || nbNodesZ==1)
     {
-      std::vector<int> ngs2(2);
-      int pos(0);
+      std::vector<mcIdType> ngs2(2);
+      mcIdType pos(0);
       bool pass(false);
       for(int i=0;i<3;i++)
         {
@@ -575,21 +575,21 @@ void MEDCouplingStructuredMesh::GetReverseNodalConnectivity3(const std::vector<i
       return GetReverseNodalConnectivity2(ngs2,revNodal,revNodalIndx);
     }
   revNodalIndx->alloc(nbNodes+1,1);
-  int nbCellsX(nbNodesX-1),nbCellsY(nbNodesY-1),nbCellsZ(nbNodesZ-1);
+  mcIdType nbCellsX(nbNodesX-1),nbCellsY(nbNodesY-1),nbCellsZ(nbNodesZ-1);
   revNodal->alloc(8*(nbNodesX-2)*(nbNodesY-2)*(nbNodesZ-2)+4*(2*(nbNodesX-2)*(nbNodesY-2)+2*(nbNodesX-2)*(nbNodesZ-2)+2*(nbNodesY-2)*(nbNodesZ-2))+2*4*(nbNodesX-2)+2*4*(nbNodesY-2)+2*4*(nbNodesZ-2)+8,1);
-  int *rn(revNodal->getPointer()),*rni(revNodalIndx->getPointer());
+  mcIdType *rn(revNodal->getPointer()),*rni(revNodalIndx->getPointer());
   *rni=0;
-  for(int k=0;k<nbNodesZ;k++)
+  for(mcIdType k=0;k<nbNodesZ;k++)
     {
       bool factZ(k!=0 && k!=nbNodesZ-1);
-      int offZ0((k-1)*nbCellsX*nbCellsY),offZ1(k*nbCellsX*nbCellsY);
-      for(int j=0;j<nbNodesY;j++)
+      mcIdType offZ0((k-1)*nbCellsX*nbCellsY),offZ1(k*nbCellsX*nbCellsY);
+      for(mcIdType j=0;j<nbNodesY;j++)
         {
           bool factYZ(factZ && (j!=0 && j!=nbNodesY-1));
-          int off00((j-1)*nbCellsX+offZ0),off01(j*nbCellsX+offZ0),off10((j-1)*nbCellsX+offZ1),off11(j*nbCellsX+offZ1);
-          for(int i=0;i<nbNodesX;i++,rni++)
+          mcIdType off00((j-1)*nbCellsX+offZ0),off01(j*nbCellsX+offZ0),off10((j-1)*nbCellsX+offZ1),off11(j*nbCellsX+offZ1);
+          for(mcIdType i=0;i<nbNodesX;i++,rni++)
             {
-              int fact(factYZ && (i!=0 && i!=nbNodesX-1));
+              mcIdType fact(factYZ && (i!=0 && i!=nbNodesX-1));
               if(fact)
                 {//most of points fall in this part of code
                   rn[0]=off00+i-1; rn[1]=off00+i; rn[2]=off01+i-1; rn[3]=off01+i;
@@ -599,7 +599,7 @@ void MEDCouplingStructuredMesh::GetReverseNodalConnectivity3(const std::vector<i
                 }
               else
                 {
-                  int *rnRef(rn);
+                  mcIdType *rnRef(rn);
                   if(k>=1 && j>=1 && i>=1)
                     *rn++=off00+i-1;
                   if(k>=1 && j>=1 && i<nbCellsX)
@@ -617,7 +617,7 @@ void MEDCouplingStructuredMesh::GetReverseNodalConnectivity3(const std::vector<i
                     *rn++=off11+i-1;
                   if(k<nbCellsZ && j<nbCellsY && i<nbCellsX)
                     *rn++=off11+i;
-                  rni[1]=rni[0]+(int)(std::distance(rnRef,rn));
+                  rni[1]=rni[0]+ToIdType(std::distance(rnRef,rn));
                 }
             }
         }
@@ -625,17 +625,17 @@ void MEDCouplingStructuredMesh::GetReverseNodalConnectivity3(const std::vector<i
 }
 
 /*!
- * \return DataArrayInt * - newly allocated instance of nodal connectivity compatible for MEDCoupling1SGTMesh instance
+ * \return DataArrayIdType * - newly allocated instance of nodal connectivity compatible for MEDCoupling1SGTMesh instance
  */
-DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity(const int *nodeStBg, const int *nodeStEnd)
+DataArrayIdType *MEDCouplingStructuredMesh::Build1GTNodalConnectivity(const mcIdType *nodeStBg, const mcIdType *nodeStEnd)
 {
-  int zippedNodeSt[3];
-  int dim(ZipNodeStructure(nodeStBg,nodeStEnd,zippedNodeSt));
+  mcIdType zippedNodeSt[3];
+  mcIdType dim(ZipNodeStructure(nodeStBg,nodeStEnd,zippedNodeSt));
   switch(dim)
   {
     case 0:
       {
-        MCAuto<DataArrayInt> conn(DataArrayInt::New());
+        MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
         conn->alloc(1,1); conn->setIJ(0,0,0);
         return conn.retn();
       }
@@ -650,7 +650,7 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity(const int *no
   }
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh(const int *nodeStBg, const int *nodeStEnd)
+DataArrayIdType *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh(const mcIdType *nodeStBg, const mcIdType *nodeStEnd)
 {
   std::size_t dim(std::distance(nodeStBg,nodeStEnd));
   switch(dim)
@@ -666,46 +666,46 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh
 
 /*!
  * This method returns the list of ids sorted ascendingly of entities that are in the corner in ghost zone.
- * The ids are returned in a newly created DataArrayInt having a single component.
+ * The ids are returned in a newly created DataArrayIdType having a single component.
  *
  * \param [in] st - The structure \b without ghost cells.
  * \param [in] ghostLev - The size of the ghost zone (>=0)
- * \return DataArrayInt * - The DataArray containing all the ids the caller is to deallocate.
+ * \return DataArrayIdType * - The DataArray containing all the ids the caller is to deallocate.
  */
-DataArrayInt *MEDCouplingStructuredMesh::ComputeCornersGhost(const std::vector<int>& st, int ghostLev)
+DataArrayIdType *MEDCouplingStructuredMesh::ComputeCornersGhost(const std::vector<mcIdType>& st, mcIdType ghostLev)
 {
   if(ghostLev<0)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ComputeCornersGhost : ghost lev must be >= 0 !");
   std::size_t dim(st.size());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New());
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
   switch(dim)
   {
     case 1:
       {
         ret->alloc(2*ghostLev,1);
-        int *ptr(ret->getPointer());
-        for(int i=0;i<ghostLev;i++,ptr++)
+        mcIdType *ptr(ret->getPointer());
+        for(mcIdType i=0;i<ghostLev;i++,ptr++)
           *ptr=i;
-        int offset(st[0]);
+        mcIdType offset(st[0]);
         if(offset<0)
           throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ComputeCornersGhost : element in 1D structure must be >= 0 !");
-        for(int i=0;i<ghostLev;i++,ptr++)
+        for(mcIdType i=0;i<ghostLev;i++,ptr++)
           *ptr=offset+ghostLev+i;
         break;
       }
     case 2:
       {
-        int offsetX(st[0]),offsetY(st[1]);
+        mcIdType offsetX(st[0]),offsetY(st[1]);
         if(offsetX<0 || offsetY<0)
           throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ComputeCornersGhost : elements in 2D structure must be >= 0 !");
         ret->alloc(4*ghostLev,1);
-        int *ptr(ret->getPointer());
-        for(int i=0;i<ghostLev;i++)
+        mcIdType *ptr(ret->getPointer());
+        for(mcIdType i=0;i<ghostLev;i++)
           {
             *ptr++=i*(2*ghostLev+offsetX+1);
             *ptr++=offsetX+2*ghostLev-1+i*(2*ghostLev+offsetX-1);
           }
-        for(int i=0;i<ghostLev;i++)
+        for(mcIdType i=0;i<ghostLev;i++)
           {
             *ptr++=(2*ghostLev+offsetX)*(offsetY+ghostLev)+ghostLev-1+i*(2*ghostLev+offsetX-1);
             *ptr++=(2*ghostLev+offsetX)*(offsetY+ghostLev)+offsetX+ghostLev+i*(2*ghostLev+offsetX+1);
@@ -714,21 +714,21 @@ DataArrayInt *MEDCouplingStructuredMesh::ComputeCornersGhost(const std::vector<i
       }
     case 3:
       {
-        int offsetX(st[0]),offsetY(st[1]),offsetZ(st[2]);
+        mcIdType offsetX(st[0]),offsetY(st[1]),offsetZ(st[2]);
         if(offsetX<0 || offsetY<0 || offsetZ<0)
           throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ComputeCornersGhost : elements in 3D structure must be >= 0 !");
         ret->alloc(8*ghostLev,1);
-        int *ptr(ret->getPointer());
-        int zeOffsetZ((offsetX+2*ghostLev)*(offsetY+2*ghostLev));
-        for(int i=0;i<ghostLev;i++)
+        mcIdType *ptr(ret->getPointer());
+        mcIdType zeOffsetZ((offsetX+2*ghostLev)*(offsetY+2*ghostLev));
+        for(mcIdType i=0;i<ghostLev;i++)
           {
             *ptr++=i*(2*ghostLev+offsetX+1)+i*zeOffsetZ;
             *ptr++=offsetX+2*ghostLev-1+i*(2*ghostLev+offsetX-1)+i*zeOffsetZ;
             *ptr++=(2*ghostLev+offsetX)*(offsetY+ghostLev)+ghostLev-1+(ghostLev-i-1)*(2*ghostLev+offsetX-1)+i*zeOffsetZ;
             *ptr++=(2*ghostLev+offsetX)*(offsetY+ghostLev)+offsetX+ghostLev+(ghostLev-i-1)*(2*ghostLev+offsetX+1)+i*zeOffsetZ;
           }
-        int j(0),zeOffsetZ2(zeOffsetZ*(offsetZ+ghostLev));
-        for(int i=ghostLev-1;i>=0;i--,j++)
+        mcIdType j(0),zeOffsetZ2(zeOffsetZ*(offsetZ+ghostLev));
+        for(mcIdType i=ghostLev-1;i>=0;i--,j++)
           {
             *ptr++=i*(2*ghostLev+offsetX+1)+j*zeOffsetZ+zeOffsetZ2;
             *ptr++=offsetX+2*ghostLev-1+i*(2*ghostLev+offsetX-1)+j*zeOffsetZ+zeOffsetZ2;
@@ -749,13 +749,13 @@ DataArrayInt *MEDCouplingStructuredMesh::ComputeCornersGhost(const std::vector<i
  *
  * \sa BuildExplicitIdsFrom,IsPartStructured
  */
-int MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(const std::vector< std::pair<int,int> >& partCompactFormat)
+mcIdType MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
-  int ret(1);
+  mcIdType ret(1);
   std::size_t ii(0);
-  for(std::vector< std::pair<int,int> >::const_iterator it=partCompactFormat.begin();it!=partCompactFormat.end();it++,ii++)
+  for(std::vector< std::pair<mcIdType,mcIdType> >::const_iterator it=partCompactFormat.begin();it!=partCompactFormat.end();it++,ii++)
     {
-      int a((*it).first),b((*it).second);
+      mcIdType a((*it).first),b((*it).second);
       if(a<0 || b<0 || b-a<0)
         {
           std::ostringstream oss; oss << "MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt : invalid input at dimension " << ii << " !";
@@ -766,9 +766,9 @@ int MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(const std::
   return ret;
 }
 
-int MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(const std::vector<int>& st)
+mcIdType MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(const std::vector<mcIdType>& st)
 {
-  int ret(1);
+  mcIdType ret(1);
   bool isFetched(false);
   for(std::size_t i=0;i<st.size();i++)
     {
@@ -780,13 +780,13 @@ int MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(const std::vector<in
   return isFetched?ret:0;
 }
 
-void MEDCouplingStructuredMesh::FindTheWidestAxisOfGivenRangeInCompactFrmt(const std::vector< std::pair<int,int> >& partCompactFormat, int& axisId, int& sizeOfRange)
+void MEDCouplingStructuredMesh::FindTheWidestAxisOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, int& axisId, mcIdType& sizeOfRange)
 {
-    int dim((int)partCompactFormat.size());
-    int ret(-1);
+    mcIdType dim(ToIdType(partCompactFormat.size()));
+    mcIdType ret(-1);
     for(int i=0;i<dim;i++)
       {
-        int curDelta(partCompactFormat[i].second-partCompactFormat[i].first);
+        mcIdType curDelta(partCompactFormat[i].second-partCompactFormat[i].first);
         if(curDelta<0)
           {
             std::ostringstream oss; oss << "MEDCouplingStructuredMesh::FindTheWidestAxisOfGivenRangeInCompactFrmt : at axis #" << i << " the range is invalid (first value < second value) !";
@@ -814,14 +814,14 @@ void MEDCouplingStructuredMesh::FindTheWidestAxisOfGivenRangeInCompactFrmt(const
  * \param [out] reducedCrit - The reduction of \a criterion on \a partCompactFormat.
  * \return - The number of True in \a st (that is equal to those in \a reducedCrit)
  */
-int MEDCouplingStructuredMesh::FindMinimalPartOf(int minPatchLgth, const std::vector<int>& st, const std::vector<bool>& crit, std::vector<bool>& reducedCrit, std::vector< std::pair<int,int> >& partCompactFormat)
+mcIdType MEDCouplingStructuredMesh::FindMinimalPartOf(mcIdType minPatchLgth, const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector<bool>& reducedCrit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
   if(minPatchLgth<0)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindMinimalPartOf : the input minPatchLgth has to be >=0 !");
-  if((int)crit.size()!=DeduceNumberOfGivenStructure(st))
+  if(ToIdType(crit.size())!=DeduceNumberOfGivenStructure(st))
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindMinimalPartOf : size of vector of boolean is invalid regarding the declared structure !");
-  int ret(-1);
-  switch((int)st.size())
+  mcIdType ret(-1);
+  switch(st.size())
   {
     case 1:
       {
@@ -841,13 +841,13 @@ int MEDCouplingStructuredMesh::FindMinimalPartOf(int minPatchLgth, const std::ve
     default:
       throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindMinimalPartOf : only dimension 1, 2 and 3 are supported actually !");
   }
-  std::vector<int> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(partCompactFormat));
-  int i(0);
-  for(std::vector< std::pair<int,int> >::iterator it=partCompactFormat.begin();it!=partCompactFormat.end();it++,i++)
+  std::vector<mcIdType> dims(MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(partCompactFormat));
+  mcIdType i(0);
+  for(std::vector< std::pair<mcIdType,mcIdType> >::iterator it=partCompactFormat.begin();it!=partCompactFormat.end();it++,i++)
     {
       if(st[i]<minPatchLgth)
         throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindMinimalPartOf : the input patch is tinier than the min length constraint !");
-      int start((*it).first),stop((*it).second),middle((start+stop)/2);
+      mcIdType start((*it).first),stop((*it).second),middle((start+stop)/2);
       if(stop-start<minPatchLgth)
         {
           (*it).first=middle-minPatchLgth/2;
@@ -873,39 +873,39 @@ int MEDCouplingStructuredMesh::FindMinimalPartOf(int minPatchLgth, const std::ve
  * This method considers \a crit input parameter as a matrix having dimensions specified by \a st. This method returns for each axis
  * the signature, that is to say the number of elems equal to true in \a crit along this axis.
  */
-std::vector< std::vector<int> > MEDCouplingStructuredMesh::ComputeSignaturePerAxisOf(const std::vector<int>& st, const std::vector<bool>& crit)
+std::vector< std::vector<mcIdType> > MEDCouplingStructuredMesh::ComputeSignaturePerAxisOf(const std::vector<mcIdType>& st, const std::vector<bool>& crit)
 {
-  int dim((int)st.size());
-  std::vector< std::vector<int> > ret(dim);
+  std::size_t dim(st.size());
+  std::vector< std::vector<mcIdType> > ret(dim);
   switch(dim)
   {
     case 1:
       {
-        int nx(st[0]);
+        mcIdType nx(st[0]);
         ret[0].resize(nx);
-        std::vector<int>& retX(ret[0]);
-        for(int i=0;i<nx;i++)
+        std::vector<mcIdType>& retX(ret[0]);
+        for(mcIdType i=0;i<nx;i++)
           retX[i]=crit[i]?1:0;
         break;
       }
     case 2:
       {
-        int nx(st[0]),ny(st[1]);
+        mcIdType nx(st[0]),ny(st[1]);
         ret[0].resize(nx); ret[1].resize(ny);
-        std::vector<int>& retX(ret[0]);
-        for(int i=0;i<nx;i++)
+        std::vector<mcIdType>& retX(ret[0]);
+        for(mcIdType i=0;i<nx;i++)
           {
-            int cnt(0);
-            for(int j=0;j<ny;j++)
+            mcIdType cnt(0);
+            for(mcIdType j=0;j<ny;j++)
               if(crit[j*nx+i])
                 cnt++;
             retX[i]=cnt;
           }
-        std::vector<int>& retY(ret[1]);
-        for(int j=0;j<ny;j++)
+        std::vector<mcIdType>& retY(ret[1]);
+        for(mcIdType j=0;j<ny;j++)
           {
-            int cnt(0);
-            for(int i=0;i<nx;i++)
+            mcIdType cnt(0);
+            for(mcIdType i=0;i<nx;i++)
               if(crit[j*nx+i])
                 cnt++;
             retY[j]=cnt;
@@ -914,42 +914,42 @@ std::vector< std::vector<int> > MEDCouplingStructuredMesh::ComputeSignaturePerAx
       }
     case 3:
       {
-        int nx(st[0]),ny(st[1]),nz(st[2]);
+        mcIdType nx(st[0]),ny(st[1]),nz(st[2]);
         ret[0].resize(nx); ret[1].resize(ny); ret[2].resize(nz);
-        std::vector<int>& retX(ret[0]);
-        for(int i=0;i<nx;i++)
+        std::vector<mcIdType>& retX(ret[0]);
+        for(mcIdType i=0;i<nx;i++)
           {
-            int cnt(0);
-            for(int k=0;k<nz;k++)
+            mcIdType cnt(0);
+            for(mcIdType k=0;k<nz;k++)
               {
-                int offz(k*nx*ny+i);
-                for(int j=0;j<ny;j++)
+                mcIdType offz(k*nx*ny+i);
+                for(mcIdType j=0;j<ny;j++)
                   if(crit[offz+j*nx])
                     cnt++;
               }
             retX[i]=cnt;
           }
-        std::vector<int>& retY(ret[1]);
-        for(int j=0;j<ny;j++)
+        std::vector<mcIdType>& retY(ret[1]);
+        for(mcIdType j=0;j<ny;j++)
           {
-            int cnt(0),offy(j*nx);
-            for(int k=0;k<nz;k++)
+            mcIdType cnt(0),offy(j*nx);
+            for(mcIdType k=0;k<nz;k++)
               {
-                int offz(k*nx*ny+offy);
-                for(int i=0;i<nx;i++)
+                mcIdType offz(k*nx*ny+offy);
+                for(mcIdType i=0;i<nx;i++)
                   if(crit[offz+i])
                     cnt++;
               }
             retY[j]=cnt;
           }
-        std::vector<int>& retZ(ret[2]);
-        for(int k=0;k<nz;k++)
+        std::vector<mcIdType>& retZ(ret[2]);
+        for(mcIdType k=0;k<nz;k++)
           {
-            int cnt(0),offz(k*nx*ny);
-            for(int j=0;j<ny;j++)
+            mcIdType cnt(0),offz(k*nx*ny);
+            for(mcIdType j=0;j<ny;j++)
               {
-                int offy(offz+j*nx);
-                for(int i=0;i<nx;i++)
+                mcIdType offy(offz+j*nx);
+                for(mcIdType i=0;i<nx;i++)
                   if(crit[offy+i])
                     cnt++;
               }
@@ -963,13 +963,13 @@ std::vector< std::vector<int> > MEDCouplingStructuredMesh::ComputeSignaturePerAx
   return ret;
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity1D(const int *nodeStBg)
+DataArrayIdType *MEDCouplingStructuredMesh::Build1GTNodalConnectivity1D(const mcIdType *nodeStBg)
 {
-  std::size_t nbOfCells(*nodeStBg-1);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
+  mcIdType nbOfCells=*nodeStBg-1;
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
   conn->alloc(2*nbOfCells,1);
-  int *cp=conn->getPointer();
-  for(std::size_t i=0;i<nbOfCells;i++)
+  mcIdType *cp=conn->getPointer();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       cp[2*i+0]=i;
       cp[2*i+1]=i+1;
@@ -977,15 +977,15 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity1D(const int *
   return conn.retn();
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity2D(const int *nodeStBg)
+DataArrayIdType *MEDCouplingStructuredMesh::Build1GTNodalConnectivity2D(const mcIdType *nodeStBg)
 {
-  std::size_t n1(nodeStBg[0]-1),n2(nodeStBg[1]-1);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
+  mcIdType n1(nodeStBg[0]-1),n2(nodeStBg[1]-1);
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
   conn->alloc(4*n1*n2,1);
-  int *cp(conn->getPointer());
+  mcIdType *cp(conn->getPointer());
   std::size_t pos(0);
-  for(std::size_t j=0;j<n2;j++)
-    for(std::size_t i=0;i<n1;i++,pos++)
+  for(mcIdType j=0;j<n2;j++)
+    for(mcIdType i=0;i<n1;i++,pos++)
       {
         cp[4*pos+0]=i+1+j*(n1+1);
         cp[4*pos+1]=i+j*(n1+1);
@@ -995,18 +995,18 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity2D(const int *
   return conn.retn();
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity3D(const int *nodeStBg)
+DataArrayIdType *MEDCouplingStructuredMesh::Build1GTNodalConnectivity3D(const mcIdType *nodeStBg)
 {
-  std::size_t n1(nodeStBg[0]-1),n2(nodeStBg[1]-1),n3(nodeStBg[2]-1);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
+  mcIdType n1(nodeStBg[0]-1),n2(nodeStBg[1]-1),n3(nodeStBg[2]-1);
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
   conn->alloc(8*n1*n2*n3,1);
-  int *cp(conn->getPointer());
+  mcIdType *cp(conn->getPointer());
   std::size_t pos(0);
-  for(std::size_t k=0;k<n3;k++)
-    for(std::size_t j=0;j<n2;j++)
-      for(std::size_t i=0;i<n1;i++,pos++)
+  for(mcIdType k=0;k<n3;k++)
+    for(mcIdType j=0;j<n2;j++)
+      for(mcIdType i=0;i<n1;i++,pos++)
         {
-          int tmp=(n1+1)*(n2+1);
+          mcIdType tmp=(n1+1)*(n2+1);
           cp[8*pos+0]=i+1+j*(n1+1)+k*tmp;
           cp[8*pos+1]=i+j*(n1+1)+k*tmp;
           cp[8*pos+2]=i+(j+1)*(n1+1)+k*tmp;
@@ -1019,28 +1019,28 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity3D(const int *
   return conn.retn();
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh3D(const int *nodeStBg)
+DataArrayIdType *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh3D(const mcIdType *nodeStBg)
 {
-  std::vector<int> ngs(3);
-  int n0(nodeStBg[0]-1),n1(nodeStBg[1]-1),n2(nodeStBg[2]-1); ngs[0]=n0; ngs[1]=n1; ngs[2]=n2;
-  int off0(nodeStBg[0]),off1(nodeStBg[0]*nodeStBg[1]);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
+  std::vector<mcIdType> ngs(3);
+  mcIdType n0(nodeStBg[0]-1),n1(nodeStBg[1]-1),n2(nodeStBg[2]-1); ngs[0]=n0; ngs[1]=n1; ngs[2]=n2;
+  mcIdType off0(nodeStBg[0]),off1(nodeStBg[0]*nodeStBg[1]);
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
   conn->alloc(4*GetNumberOfCellsOfSubLevelMesh(ngs,3));
-  int *cp(conn->getPointer());
+  mcIdType *cp(conn->getPointer());
   //X
-  for(int i=0;i<nodeStBg[0];i++)
-    for(int j=0;j<n1;j++)
-      for(int k=0;k<n2;k++,cp+=4)
+  for(mcIdType i=0;i<nodeStBg[0];i++)
+    for(mcIdType j=0;j<n1;j++)
+      for(mcIdType k=0;k<n2;k++,cp+=4)
         { cp[0]=k*off1+j*off0+i; cp[1]=(k+1)*off1+j*off0+i; cp[2]=(k+1)*off1+(j+1)*off0+i; cp[3]=k*off1+(j+1)*off0+i; }
   //Y
-  for(int j=0;j<nodeStBg[1];j++)
-    for(int i=0;i<n0;i++)
-      for(int k=0;k<n2;k++,cp+=4)
+  for(mcIdType j=0;j<nodeStBg[1];j++)
+    for(mcIdType i=0;i<n0;i++)
+      for(mcIdType k=0;k<n2;k++,cp+=4)
         { cp[0]=k*off1+j*off0+i; cp[1]=(k+1)*off1+j*off0+i; cp[2]=(k+1)*off1+j*off0+(i+1); cp[3]=k*off1+j*off0+(i+1); }
   //Z
-  for(int k=0;k<nodeStBg[2];k++)
-    for(int i=0;i<n0;i++)
-      for(int j=0;j<n1;j++,cp+=4)
+  for(mcIdType k=0;k<nodeStBg[2];k++)
+    for(mcIdType i=0;i<n0;i++)
+      for(mcIdType j=0;j<n1;j++,cp+=4)
         { cp[0]=k*off1+j*off0+i; cp[1]=k*off1+j*off0+(i+1); cp[2]=k*off1+(j+1)*off0+(i+1); cp[3]=k*off1+(j+1)*off0+i; }
   return conn.retn();
 }
@@ -1048,13 +1048,13 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh
 /*!
  * \sa MEDCouplingStructuredMesh::FindMinimalPartOf
  */
-int MEDCouplingStructuredMesh::FindMinimalPartOf1D(const std::vector<int>& st, const std::vector<bool>& crit, std::vector< std::pair<int,int> >& partCompactFormat)
+mcIdType MEDCouplingStructuredMesh::FindMinimalPartOf1D(const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
   if(st.size()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindMinimalPartOf1D : the input size of st must be equal to 1 !");
-  int nxMin(std::numeric_limits<int>::max()),nxMax(-std::numeric_limits<int>::max());
-  int nx(st[0]),ret(0);
-  for(int i=0;i<nx;i++)
+  mcIdType nxMin(std::numeric_limits<mcIdType>::max()),nxMax(-std::numeric_limits<mcIdType>::max());
+  mcIdType nx(st[0]),ret(0);
+  for(mcIdType i=0;i<nx;i++)
     {
       if(crit[i])
         {
@@ -1081,15 +1081,15 @@ int MEDCouplingStructuredMesh::FindMinimalPartOf1D(const std::vector<int>& st, c
 /*!
  * \sa MEDCouplingStructuredMesh::FindMinimalPartOf
  */
-int MEDCouplingStructuredMesh::FindMinimalPartOf2D(const std::vector<int>& st, const std::vector<bool>& crit, std::vector< std::pair<int,int> >& partCompactFormat)
+mcIdType MEDCouplingStructuredMesh::FindMinimalPartOf2D(const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
   if(st.size()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindMinimalPartOf2D : the input size of st must be equal to 2 !");
-  int nxMin(std::numeric_limits<int>::max()),nxMax(-std::numeric_limits<int>::max()),nyMin(std::numeric_limits<int>::max()),nyMax(-std::numeric_limits<int>::max());
-  int it(0),nx(st[0]),ny(st[1]);
-  int ret(0);
-  for(int i=0;i<ny;i++)
-    for(int j=0;j<nx;j++,it++)
+  mcIdType nxMin(std::numeric_limits<mcIdType>::max()),nxMax(-std::numeric_limits<mcIdType>::max()),nyMin(std::numeric_limits<mcIdType>::max()),nyMax(-std::numeric_limits<mcIdType>::max());
+  mcIdType it(0),nx(st[0]),ny(st[1]);
+  mcIdType ret(0);
+  for(mcIdType i=0;i<ny;i++)
+    for(mcIdType j=0;j<nx;j++,it++)
       {
         if(crit[it])
           {
@@ -1118,16 +1118,16 @@ int MEDCouplingStructuredMesh::FindMinimalPartOf2D(const std::vector<int>& st, c
 /*!
  * \sa MEDCouplingStructuredMesh::FindMinimalPartOf
  */
-int MEDCouplingStructuredMesh::FindMinimalPartOf3D(const std::vector<int>& st, const std::vector<bool>& crit, std::vector< std::pair<int,int> >& partCompactFormat)
+mcIdType MEDCouplingStructuredMesh::FindMinimalPartOf3D(const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
   if(st.size()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindMinimalPartOf3D : the input size of st must be equal to 3 !");
-  int nxMin(std::numeric_limits<int>::max()),nxMax(-std::numeric_limits<int>::max()),nyMin(std::numeric_limits<int>::max()),nyMax(-std::numeric_limits<int>::max()),nzMin(std::numeric_limits<int>::max()),nzMax(-std::numeric_limits<int>::max());
-  int it(0),nx(st[0]),ny(st[1]),nz(st[2]);
-  int ret(0);
-  for(int i=0;i<nz;i++)
-    for(int j=0;j<ny;j++)
-      for(int k=0;k<nx;k++,it++)
+  mcIdType nxMin(std::numeric_limits<mcIdType>::max()),nxMax(-std::numeric_limits<mcIdType>::max()),nyMin(std::numeric_limits<mcIdType>::max()),nyMax(-std::numeric_limits<mcIdType>::max()),nzMin(std::numeric_limits<mcIdType>::max()),nzMax(-std::numeric_limits<mcIdType>::max());
+  mcIdType it(0),nx(st[0]),ny(st[1]),nz(st[2]);
+  mcIdType ret(0);
+  for(mcIdType i=0;i<nz;i++)
+    for(mcIdType j=0;j<ny;j++)
+      for(mcIdType k=0;k<nx;k++,it++)
         {
           if(crit[it])
             {
@@ -1161,18 +1161,18 @@ int MEDCouplingStructuredMesh::FindMinimalPartOf3D(const std::vector<int>& st, c
  * the meshDimension (or the zipped spaceDimension).
  *
  * \param [out] zipNodeSt - The zipped node structure
- * \return int - the
+ * \return mcIdType - the
  */
-int MEDCouplingStructuredMesh::ZipNodeStructure(const int *nodeStBg, const int *nodeStEnd, int zipNodeSt[3])
+int MEDCouplingStructuredMesh::ZipNodeStructure(const mcIdType *nodeStBg, const mcIdType *nodeStEnd, mcIdType zipNodeSt[3])
 {
-  int spaceDim((int)std::distance(nodeStBg,nodeStEnd));
+  std::size_t spaceDim(std::distance(nodeStBg,nodeStEnd));
   if(spaceDim>3 || spaceDim<1)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ZipNodeStructure : spaceDim must in [1,2,3] !");
   zipNodeSt[0]=0; zipNodeSt[1]=0; zipNodeSt[2]=0;
   int zippedI(0);
-  for(int i=0;i<spaceDim;i++)
+  for(std::size_t i=0;i<spaceDim;i++)
     {
-      int elt(nodeStBg[i]);
+      mcIdType elt(nodeStBg[i]);
       if(elt<1)
         {
           std::ostringstream oss; oss << "MEDCouplingStructuredMesh::ZipNodeStructure : the input nodal structure at pos#" << i << "(" << nodeStBg[i] << ") is invalid !";
@@ -1184,21 +1184,21 @@ int MEDCouplingStructuredMesh::ZipNodeStructure(const int *nodeStBg, const int *
   return zippedI;
 }
 
-DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh2D(const int *nodeStBg)
+DataArrayIdType *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh2D(const mcIdType *nodeStBg)
 {
-  std::vector<int> ngs(2);
-  int n0(nodeStBg[0]-1),n1(nodeStBg[1]-1); ngs[0]=n0; ngs[1]=n1;
-  int off0(nodeStBg[0]);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
+  std::vector<mcIdType> ngs(2);
+  mcIdType n0(nodeStBg[0]-1),n1(nodeStBg[1]-1); ngs[0]=n0; ngs[1]=n1;
+  mcIdType off0(nodeStBg[0]);
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New());
   conn->alloc(2*GetNumberOfCellsOfSubLevelMesh(ngs,2));
-  int *cp(conn->getPointer());
+  mcIdType *cp(conn->getPointer());
   //X
-  for(int i=0;i<nodeStBg[0];i++)
-    for(int j=0;j<n1;j++,cp+=2)
+  for(mcIdType i=0;i<nodeStBg[0];i++)
+    for(mcIdType j=0;j<n1;j++,cp+=2)
       { cp[0]=j*off0+i; cp[1]=(j+1)*off0+i; }
   //Y
-  for(int j=0;j<nodeStBg[1];j++)
-    for(int i=0;i<n0;i++,cp+=2)
+  for(mcIdType j=0;j<nodeStBg[1];j++)
+    for(mcIdType i=0;i<n0;i++,cp+=2)
       { cp[0]=j*off0+i; cp[1]=j*off0+(i+1); }
   return conn.retn();
 }
@@ -1209,15 +1209,15 @@ DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh
  *  \param [in] i - a index of node coordinates array along X axis.
  *  \param [in] j - a index of node coordinates array along Y axis.
  *  \param [in] k - a index of node coordinates array along Z axis.
- *  \return int - a cell id in \a this mesh.
+ *  \return mcIdType - a cell id in \a this mesh.
  */
-int MEDCouplingStructuredMesh::getCellIdFromPos(int i, int j, int k) const
+mcIdType MEDCouplingStructuredMesh::getCellIdFromPos(mcIdType i, mcIdType j, mcIdType k) const
 {
-  int tmp[3]={i,j,k};
-  int tmp2[3];
-  int meshDim(getMeshDimension());
+  mcIdType tmp[3]={i,j,k};
+  mcIdType tmp2[3];
+  mcIdType meshDim(getMeshDimension());
   getSplitCellValues(tmp2);
-  std::transform(tmp,tmp+meshDim,tmp2,tmp,std::multiplies<int>());
+  std::transform(tmp,tmp+meshDim,tmp2,tmp,std::multiplies<mcIdType>());
   return std::accumulate(tmp,tmp+meshDim,0);
 }
 
@@ -1226,28 +1226,28 @@ int MEDCouplingStructuredMesh::getCellIdFromPos(int i, int j, int k) const
  *  \param [in] i - a index of node coordinates array along X axis.
  *  \param [in] j - a index of node coordinates array along Y axis.
  *  \param [in] k - a index of node coordinates array along Z axis.
- *  \return int - a node id in \a this mesh.
+ *  \return mcIdType - a node id in \a this mesh.
  */
-int MEDCouplingStructuredMesh::getNodeIdFromPos(int i, int j, int k) const
+mcIdType MEDCouplingStructuredMesh::getNodeIdFromPos(mcIdType i, mcIdType j, mcIdType k) const
 {
-  int tmp[3]={i,j,k};
-  int tmp2[3];
-  int spaceDim(getSpaceDimension());
+  mcIdType tmp[3]={i,j,k};
+  mcIdType tmp2[3];
+  mcIdType spaceDim(getSpaceDimension());
   getSplitNodeValues(tmp2);
-  std::transform(tmp,tmp+spaceDim,tmp2,tmp,std::multiplies<int>());
+  std::transform(tmp,tmp+spaceDim,tmp2,tmp,std::multiplies<mcIdType>());
   return std::accumulate(tmp,tmp+spaceDim,0);
 }
 
 
-std::size_t MEDCouplingStructuredMesh::getNumberOfCells() const
+mcIdType MEDCouplingStructuredMesh::getNumberOfCells() const
 {
-  std::vector<int> ngs(getNodeGridStructure());
-  std::size_t ret(1);
+  std::vector<mcIdType> ngs(getNodeGridStructure());
+  mcIdType ret(1);
   bool isCatched(false);
   std::size_t ii(0);
-  for(std::vector<int>::const_iterator it=ngs.begin();it!=ngs.end();it++,ii++)
+  for(std::vector<mcIdType>::const_iterator it=ngs.begin();it!=ngs.end();it++,ii++)
     {
-      int elt(*it);
+      mcIdType elt(*it);
       if(elt<=0)
         {
           std::ostringstream oss; oss << "MEDCouplingStructuredMesh::getNumberOfCells : at pos #" << ii << " the number of nodes in nodeStructure is " << *it << " ! Must be > 0 !";
@@ -1262,11 +1262,11 @@ std::size_t MEDCouplingStructuredMesh::getNumberOfCells() const
   return isCatched?ret:0;
 }
 
-int MEDCouplingStructuredMesh::getNumberOfNodes() const
+mcIdType MEDCouplingStructuredMesh::getNumberOfNodes() const
 {
-  std::vector<int> ngs(getNodeGridStructure());
-  int ret(1);
-  for(std::vector<int>::const_iterator it=ngs.begin();it!=ngs.end();it++)
+  std::vector<mcIdType> ngs(getNodeGridStructure());
+  mcIdType ret(1);
+  for(std::vector<mcIdType>::const_iterator it=ngs.begin();it!=ngs.end();it++)
     ret*=*it;
   return ret;
 }
@@ -1278,18 +1278,18 @@ int MEDCouplingStructuredMesh::getNumberOfNodes() const
  * \return - A vector of size this->getMeshDimension()
  * \throw if \a cellId not in [ 0, this->getNumberOfCells() )
  */
-std::vector<int> MEDCouplingStructuredMesh::getLocationFromCellId(int cellId) const
+std::vector<mcIdType> MEDCouplingStructuredMesh::getLocationFromCellId(mcIdType cellId) const
 {
   int meshDim(getMeshDimension());
-  std::vector<int> ret(meshDim);
-  std::vector<int> struc(getCellGridStructure());
-  int nbCells(std::accumulate(struc.begin(),struc.end(),1,std::multiplies<int>()));
+  std::vector<mcIdType> ret(meshDim);
+  std::vector<mcIdType> struc(getCellGridStructure());
+  mcIdType nbCells(std::accumulate(struc.begin(),struc.end(),1,std::multiplies<mcIdType>()));
   if(cellId<0 || cellId>=nbCells)
     {
       std::ostringstream oss; oss << "MEDCouplingStructuredMesh::getLocationFromCellId : Input cell id (" << cellId << ") is invalid ! Should be in [0," << nbCells << ") !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  std::vector<int> spt(GetSplitVectFromStruct(struc));
+  std::vector<mcIdType> spt(GetSplitVectFromStruct(struc));
   GetPosFromId(cellId,meshDim,&spt[0],&ret[0]);
   return ret;
 }
@@ -1301,37 +1301,37 @@ std::vector<int> MEDCouplingStructuredMesh::getLocationFromCellId(int cellId) co
  * \return - A vector of size this->getSpaceDimension()
  * \throw if \a cellId not in [ 0, this->getNumberOfNodes() )
  */
-std::vector<int> MEDCouplingStructuredMesh::getLocationFromNodeId(int nodeId) const
+std::vector<mcIdType> MEDCouplingStructuredMesh::getLocationFromNodeId(mcIdType nodeId) const
 {
   int spaceDim(getSpaceDimension());
-  std::vector<int> ret(spaceDim);
-  std::vector<int> struc(getNodeGridStructure());
-  int nbNodes(std::accumulate(struc.begin(),struc.end(),1,std::multiplies<int>()));
+  std::vector<mcIdType> ret(spaceDim);
+  std::vector<mcIdType> struc(getNodeGridStructure());
+  mcIdType nbNodes(std::accumulate(struc.begin(),struc.end(),1,std::multiplies<mcIdType>()));
   if(nodeId<0 || nodeId>=nbNodes)
     {
       std::ostringstream oss; oss << "MEDCouplingStructuredMesh::getLocationFromNodeId : Input node id (" << nodeId << ") is invalid ! Should be in [0," << nbNodes << ") !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  std::vector<int> spt(GetSplitVectFromStruct(struc));
+  std::vector<mcIdType> spt(GetSplitVectFromStruct(struc));
   GetPosFromId(nodeId,spaceDim,&spt[0],&ret[0]);
   return ret;
 }
 
-void MEDCouplingStructuredMesh::GetPosFromId(int eltId, int meshDim, const int *split, int *res)
+void MEDCouplingStructuredMesh::GetPosFromId(mcIdType eltId, int meshDim, const mcIdType *split, mcIdType *res)
 {
-  int work(eltId);
+  mcIdType work(eltId);
   for(int i=meshDim-1;i>=0;i--)
     {
-      int pos=work/split[i];
+      mcIdType pos=work/split[i];
       work=work%split[i];
       res[i]=pos;
     }
 }
 
-std::vector<int> MEDCouplingStructuredMesh::getCellGridStructure() const
+std::vector<mcIdType> MEDCouplingStructuredMesh::getCellGridStructure() const
 {
-  std::vector<int> ret(getNodeGridStructure());
-  std::transform(ret.begin(),ret.end(),ret.begin(),std::bind2nd(std::plus<int>(),-1));
+  std::vector<mcIdType> ret(getNodeGridStructure());
+  std::transform(ret.begin(),ret.end(),ret.begin(),std::bind2nd(std::plus<mcIdType>(),-1));
   return ret;
 }
 
@@ -1340,7 +1340,7 @@ std::vector<int> MEDCouplingStructuredMesh::getCellGridStructure() const
  */
 double MEDCouplingStructuredMesh::computeSquareness() const
 {
-  std::vector<int> cgs(getCellGridStructure());
+  std::vector<mcIdType> cgs(getCellGridStructure());
   if(cgs.empty())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::computeSquareness : empty mesh !");
   std::size_t dim(cgs.size());
@@ -1348,7 +1348,7 @@ double MEDCouplingStructuredMesh::computeSquareness() const
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::computeSquareness : A segment cannot be square !");
   if(dim<4)
     {
-      int minAx(cgs[0]),maxAx(cgs[0]);
+      mcIdType minAx(cgs[0]),maxAx(cgs[0]);
       for(std::size_t i=1;i<dim;i++)
         {
           minAx=std::min(minAx,cgs[i]);
@@ -1363,14 +1363,14 @@ double MEDCouplingStructuredMesh::computeSquareness() const
  * Given a struct \a strct it returns a split vector [1,strct[0],strct[0]*strct[1]...]
  * This decomposition allows to quickly find i,j,k given a global id.
  */
-std::vector<int> MEDCouplingStructuredMesh::GetSplitVectFromStruct(const std::vector<int>& strct)
+std::vector<mcIdType> MEDCouplingStructuredMesh::GetSplitVectFromStruct(const std::vector<mcIdType>& strct)
 {
-  int spaceDim((int)strct.size());
-  std::vector<int> res(spaceDim);
-  for(int l=0;l<spaceDim;l++)
+  std::size_t spaceDim(strct.size());
+  std::vector<mcIdType> res(spaceDim);
+  for(std::size_t l=0;l<spaceDim;l++)
     {
-      int val=1;
-      for(int p=0;p<spaceDim-l-1;p++)
+      mcIdType val=1;
+      for(std::size_t p=0;p<spaceDim-l-1;p++)
         val*=strct[p];
       res[spaceDim-l-1]=val;
     }
@@ -1383,13 +1383,13 @@ std::vector<int> MEDCouplingStructuredMesh::GetSplitVectFromStruct(const std::ve
  *
  * \sa MEDCouplingStructuredMesh::BuildExplicitIdsFrom, MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt
  */
-bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int *stopIds, const std::vector<int>& st, std::vector< std::pair<int,int> >& partCompactFormat)
+bool MEDCouplingStructuredMesh::IsPartStructured(const mcIdType *startIds, const mcIdType *stopIds, const std::vector<mcIdType>& st, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
   int dim((int)st.size());
   partCompactFormat.resize(dim);
   if(dim<1 || dim>3)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::isPartStructured : input structure must be of dimension in [1,2,3] !");
-  std::vector<int> tmp2(dim),tmp(dim),tmp3(dim),tmp4(dim); tmp2[0]=1;
+  std::vector<mcIdType> tmp2(dim),tmp(dim),tmp3(dim),tmp4(dim); tmp2[0]=1;
   for(int i=1;i<dim;i++)
     tmp2[i]=tmp2[i-1]*st[i-1];
   std::size_t sz(std::distance(startIds,stopIds));
@@ -1408,7 +1408,7 @@ bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int
       return true;
     }
   GetPosFromId(startIds[sz-1],dim,&tmp2[0],&tmp3[0]);
-  int szExp(1);
+  mcIdType szExp(1);
   for(int i=0;i<dim;i++)
     {
       if(tmp3[i]<0 || tmp3[i]>=st[i])
@@ -1419,20 +1419,20 @@ bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int
         return false;
       szExp*=tmp4[i];
     }
-  if(szExp!=(int)sz)
+  if(szExp!=ToIdType(sz))
     return false;
-  const int *w(startIds);
+  const mcIdType *w(startIds);
   switch(dim)
   {
     case 3:
       {
-        for(int i=0;i<tmp4[2];i++)
+        for(mcIdType i=0;i<tmp4[2];i++)
           {
-            int a=tmp2[2]*(partCompactFormat[2].first+i);
-            for(int j=0;j<tmp4[1];j++)
+            mcIdType a=tmp2[2]*(partCompactFormat[2].first+i);
+            for(mcIdType j=0;j<tmp4[1];j++)
               {
-                int b=tmp2[1]*(partCompactFormat[1].first+j);
-                for(int k=0;k<tmp4[0];k++,w++)
+                mcIdType b=tmp2[1]*(partCompactFormat[1].first+j);
+                for(mcIdType k=0;k<tmp4[0];k++,w++)
                   {
                     if(partCompactFormat[0].first+k+b+a!=*w)
                       return false;
@@ -1443,10 +1443,10 @@ bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int
       }
     case 2:
       {
-        for(int j=0;j<tmp4[1];j++)
+        for(mcIdType j=0;j<tmp4[1];j++)
           {
-            int b=tmp2[1]*(partCompactFormat[1].first+j);
-            for(int k=0;k<tmp4[0];k++,w++)
+            mcIdType b=tmp2[1]*(partCompactFormat[1].first+j);
+            for(mcIdType k=0;k<tmp4[0];k++,w++)
               {
                 if(partCompactFormat[0].first+k+b!=*w)
                   return false;
@@ -1456,7 +1456,7 @@ bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int
       }
     case 1:
       {
-        for(int k=0;k<tmp4[0];k++,w++)
+        for(mcIdType k=0;k<tmp4[0];k++,w++)
           {
             if(partCompactFormat[0].first+k!=*w)
               return false;
@@ -1475,9 +1475,9 @@ bool MEDCouplingStructuredMesh::IsPartStructured(const int *startIds, const int
  * \throw if an axis range is so that max<min
  * \sa GetCompactFrmtFromDimensions
  */
-std::vector<int> MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(const std::vector< std::pair<int,int> >& partCompactFormat)
+std::vector<mcIdType> MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
-  std::vector<int> ret(partCompactFormat.size());
+  std::vector<mcIdType> ret(partCompactFormat.size());
   for(std::size_t i=0;i<partCompactFormat.size();i++)
     {
       if(partCompactFormat[i].first>partCompactFormat[i].second)
@@ -1496,10 +1496,10 @@ std::vector<int> MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(const s
  * \throw if there is an axis in \a dims that is < 0.
  * \sa GetDimensionsFromCompactFrmt, ChangeReferenceFromGlobalOfCompactFrmt, ChangeReferenceToGlobalOfCompactFrmt
  */
-std::vector< std::pair<int,int> > MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(const std::vector<int>& dims)
+std::vector< std::pair<mcIdType,mcIdType> > MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(const std::vector<mcIdType>& dims)
 {
   std::size_t sz(dims.size());
-  std::vector< std::pair<int,int> > ret(sz);
+  std::vector< std::pair<mcIdType,mcIdType> > ret(sz);
   for(std::size_t i=0;i<sz;i++)
     {
       if(dims[i]<0)
@@ -1519,12 +1519,12 @@ std::vector< std::pair<int,int> > MEDCouplingStructuredMesh::GetCompactFrmtFromD
  *
  * \sa AreRangesIntersect
  */
-std::vector< std::pair<int,int> > MEDCouplingStructuredMesh::IntersectRanges(const std::vector< std::pair<int,int> >& r1, const std::vector< std::pair<int,int> >& r2)
+std::vector< std::pair<mcIdType,mcIdType> > MEDCouplingStructuredMesh::IntersectRanges(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2)
 {
   std::size_t sz(r1.size());
   if(sz!=r2.size())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::IntersectRanges : the two ranges must have the same dimension !");
-  std::vector< std::pair<int,int> > ret(sz);
+  std::vector< std::pair<mcIdType,mcIdType> > ret(sz);
   for(std::size_t i=0;i<sz;i++)
     {
       if(r1[i].first>r1[i].second)
@@ -1553,7 +1553,7 @@ std::vector< std::pair<int,int> > MEDCouplingStructuredMesh::IntersectRanges(con
  *
  * \sa IntersectRanges
  */
-bool MEDCouplingStructuredMesh::AreRangesIntersect(const std::vector< std::pair<int,int> >& r1, const std::vector< std::pair<int,int> >& r2)
+bool MEDCouplingStructuredMesh::AreRangesIntersect(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2)
 {
   std::size_t sz(r1.size());
   if(sz!=r2.size())
@@ -1579,7 +1579,7 @@ bool MEDCouplingStructuredMesh::AreRangesIntersect(const std::vector< std::pair<
 }
 
 /*!
- * This method is close to BuildExplicitIdsFrom except that instead of returning a DataArrayInt instance containing explicit ids it
+ * This method is close to BuildExplicitIdsFrom except that instead of returning a DataArrayIdType instance containing explicit ids it
  * enable elems in the vector of booleans (for performance reasons). As it is method for performance, this method is \b not
  * available in python.
  *
@@ -1589,24 +1589,24 @@ bool MEDCouplingStructuredMesh::AreRangesIntersect(const std::vector< std::pair<
  *
  * \sa MEDCouplingStructuredMesh::BuildExplicitIdsFrom, ExtractFieldOfBoolFrom
  */
-void MEDCouplingStructuredMesh::SwitchOnIdsFrom(const std::vector<int>& st, const std::vector< std::pair<int,int> >& partCompactFormat, std::vector<bool>& vectToSwitchOn)
+void MEDCouplingStructuredMesh::SwitchOnIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& vectToSwitchOn)
 {
   if(st.size()!=partCompactFormat.size())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::SwitchOnIdsFrom : input arrays must have the same size !");
-  if((int)vectToSwitchOn.size()!=DeduceNumberOfGivenStructure(st))
+  if(ToIdType(vectToSwitchOn.size())!=DeduceNumberOfGivenStructure(st))
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::SwitchOnIdsFrom : invalid size of input vector of boolean regarding the structure !");
-  std::vector<int> dims(GetDimensionsFromCompactFrmt(partCompactFormat));
+  std::vector<mcIdType> dims(GetDimensionsFromCompactFrmt(partCompactFormat));
   switch(st.size())
   {
     case 3:
       {
-        for(int i=0;i<dims[2];i++)
+        for(mcIdType i=0;i<dims[2];i++)
           {
-            int a=(partCompactFormat[2].first+i)*st[0]*st[1];
-            for(int j=0;j<dims[1];j++)
+            mcIdType a=(partCompactFormat[2].first+i)*st[0]*st[1];
+            for(mcIdType j=0;j<dims[1];j++)
               {
-                int b=(partCompactFormat[1].first+j)*st[0];
-                for(int k=0;k<dims[0];k++)
+                mcIdType b=(partCompactFormat[1].first+j)*st[0];
+                for(mcIdType k=0;k<dims[0];k++)
                   vectToSwitchOn[partCompactFormat[0].first+k+b+a]=true;
               }
           }
@@ -1614,17 +1614,17 @@ void MEDCouplingStructuredMesh::SwitchOnIdsFrom(const std::vector<int>& st, cons
       }
     case 2:
       {
-        for(int j=0;j<dims[1];j++)
+        for(mcIdType j=0;j<dims[1];j++)
           {
-            int b=(partCompactFormat[1].first+j)*st[0];
-            for(int k=0;k<dims[0];k++)
+            mcIdType b=(partCompactFormat[1].first+j)*st[0];
+            for(mcIdType k=0;k<dims[0];k++)
               vectToSwitchOn[partCompactFormat[0].first+k+b]=true;
           }
         break;
       }
     case 1:
       {
-        for(int k=0;k<dims[0];k++)
+        for(mcIdType k=0;k<dims[0];k++)
           vectToSwitchOn[partCompactFormat[0].first+k]=true;
         break;
       }
@@ -1645,27 +1645,27 @@ void MEDCouplingStructuredMesh::SwitchOnIdsFrom(const std::vector<int>& st, cons
  *
  * \sa MEDCouplingStructuredMesh::BuildExplicitIdsFrom, SwitchOnIdsFrom, ExtractFieldOfDoubleFrom
  */
-void MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom(const std::vector<int>& st, const std::vector<bool>& fieldOfBool, const std::vector< std::pair<int,int> >& partCompactFormat, std::vector<bool>& fieldOut)
+void MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom(const std::vector<mcIdType>& st, const std::vector<bool>& fieldOfBool, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& fieldOut)
 {
   if(st.size()!=partCompactFormat.size())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom : input arrays must have the same size !");
-  if((int)fieldOfBool.size()!=DeduceNumberOfGivenStructure(st))
+  if(ToIdType(fieldOfBool.size())!=DeduceNumberOfGivenStructure(st))
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom : invalid size of input field of boolean regarding the structure !");
-  std::vector<int> dims(GetDimensionsFromCompactFrmt(partCompactFormat));
-  int nbOfTuplesOfOutField(DeduceNumberOfGivenStructure(dims));
+  std::vector<mcIdType> dims(GetDimensionsFromCompactFrmt(partCompactFormat));
+  mcIdType nbOfTuplesOfOutField(DeduceNumberOfGivenStructure(dims));
   fieldOut.resize(nbOfTuplesOfOutField);
-  int it(0);
+  mcIdType it(0);
   switch(st.size())
   {
     case 3:
       {
-        for(int i=0;i<dims[2];i++)
+        for(mcIdType i=0;i<dims[2];i++)
           {
-            int a=(partCompactFormat[2].first+i)*st[0]*st[1];
-            for(int j=0;j<dims[1];j++)
+            mcIdType a=(partCompactFormat[2].first+i)*st[0]*st[1];
+            for(mcIdType j=0;j<dims[1];j++)
               {
-                int b=(partCompactFormat[1].first+j)*st[0];
-                for(int k=0;k<dims[0];k++)
+                mcIdType b=(partCompactFormat[1].first+j)*st[0];
+                for(mcIdType k=0;k<dims[0];k++)
                   fieldOut[it++]=fieldOfBool[partCompactFormat[0].first+k+b+a];
               }
           }
@@ -1673,17 +1673,17 @@ void MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom(const std::vector<int>& s
       }
     case 2:
       {
-        for(int j=0;j<dims[1];j++)
+        for(mcIdType j=0;j<dims[1];j++)
           {
-            int b=(partCompactFormat[1].first+j)*st[0];
-            for(int k=0;k<dims[0];k++)
+            mcIdType b=(partCompactFormat[1].first+j)*st[0];
+            for(mcIdType k=0;k<dims[0];k++)
               fieldOut[it++]=fieldOfBool[partCompactFormat[0].first+k+b];
           }
         break;
       }
     case 1:
       {
-        for(int k=0;k<dims[0];k++)
+        for(mcIdType k=0;k<dims[0];k++)
           fieldOut[it++]=fieldOfBool[partCompactFormat[0].first+k];
         break;
       }
@@ -1703,7 +1703,7 @@ void MEDCouplingStructuredMesh::ExtractFieldOfBoolFrom(const std::vector<int>& s
  *
  * \sa MEDCouplingStructuredMesh::BuildExplicitIdsFrom, SwitchOnIdsFrom, ExtractFieldOfBoolFrom
  */
-DataArrayDouble *MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(const std::vector<int>& st, const DataArrayDouble *fieldOfDbl, const std::vector< std::pair<int,int> >& partCompactFormat)
+DataArrayDouble *MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(const std::vector<mcIdType>& st, const DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
   if(!fieldOfDbl || !fieldOfDbl->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom : input array of double is NULL or not allocated!");
@@ -1711,8 +1711,9 @@ DataArrayDouble *MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(const std::
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom : input arrays must have the same size !");
   if(fieldOfDbl->getNumberOfTuples()!=DeduceNumberOfGivenStructure(st))
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom : invalid size of input array of double regarding the structure !");
-  std::vector<int> dims(GetDimensionsFromCompactFrmt(partCompactFormat));
-  int nbOfTuplesOfOutField(DeduceNumberOfGivenStructure(dims)),nbComp(fieldOfDbl->getNumberOfComponents());
+  std::vector<mcIdType> dims(GetDimensionsFromCompactFrmt(partCompactFormat));
+  mcIdType nbOfTuplesOfOutField(DeduceNumberOfGivenStructure(dims));
+  std::size_t nbComp(fieldOfDbl->getNumberOfComponents());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfTuplesOfOutField,nbComp);
   ret->copyStringInfoFrom(*fieldOfDbl);
   double *ptRet(ret->getPointer());
@@ -1721,13 +1722,13 @@ DataArrayDouble *MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(const std::
   {
     case 3:
       {
-        for(int i=0;i<dims[2];i++)
+        for(mcIdType i=0;i<dims[2];i++)
           {
-            int a=(partCompactFormat[2].first+i)*st[0]*st[1];
-            for(int j=0;j<dims[1];j++)
+            mcIdType a=(partCompactFormat[2].first+i)*st[0]*st[1];
+            for(mcIdType j=0;j<dims[1];j++)
               {
-                int b=(partCompactFormat[1].first+j)*st[0];
-                for(int k=0;k<dims[0];k++)
+                mcIdType b=(partCompactFormat[1].first+j)*st[0];
+                for(mcIdType k=0;k<dims[0];k++)
                   ptRet=std::copy(fieldOfDblPtr+(partCompactFormat[0].first+k+b+a)*nbComp,fieldOfDblPtr+(partCompactFormat[0].first+k+b+a+1)*nbComp,ptRet);
               }
           }
@@ -1735,17 +1736,17 @@ DataArrayDouble *MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(const std::
       }
     case 2:
       {
-        for(int j=0;j<dims[1];j++)
+        for(mcIdType j=0;j<dims[1];j++)
           {
-            int b=(partCompactFormat[1].first+j)*st[0];
-            for(int k=0;k<dims[0];k++)
+            mcIdType b=(partCompactFormat[1].first+j)*st[0];
+            for(mcIdType k=0;k<dims[0];k++)
               ptRet=std::copy(fieldOfDblPtr+(partCompactFormat[0].first+k+b)*nbComp,fieldOfDblPtr+(partCompactFormat[0].first+k+b+1)*nbComp,ptRet);
           }
         break;
       }
     case 1:
       {
-        for(int k=0;k<dims[0];k++)
+        for(mcIdType k=0;k<dims[0];k++)
           ptRet=std::copy(fieldOfDblPtr+(partCompactFormat[0].first+k)*nbComp,fieldOfDblPtr+(partCompactFormat[0].first+k+1)*nbComp,ptRet);
         break;
       }
@@ -1763,9 +1764,9 @@ DataArrayDouble *MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(const std::
  * \param [in] partCompactFormat - the specification of the part.
  * \param [in] other - the array that will be used to fill \a fieldOfDbl.
  */
-void MEDCouplingStructuredMesh::AssignPartOfFieldOfDoubleUsing(const std::vector<int>& st, DataArrayDouble *fieldOfDbl, const std::vector< std::pair<int,int> >& partCompactFormat, const DataArrayDouble *other)
+void MEDCouplingStructuredMesh::AssignPartOfFieldOfDoubleUsing(const std::vector<mcIdType>& st, DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, const DataArrayDouble *other)
 {//to be optimized
-  std::vector<int> facts(st.size(),1.);
+  std::vector<mcIdType> facts(st.size(),1);
   MEDCouplingIMesh::CondenseFineToCoarse(st,other,partCompactFormat,facts,fieldOfDbl);
 }
 
@@ -1777,7 +1778,7 @@ void MEDCouplingStructuredMesh::AssignPartOfFieldOfDoubleUsing(const std::vector
  *
  * \sa ChangeReferenceToGlobalOfCompactFrmt, BuildExplicitIdsFrom, SwitchOnIdsFrom, ExtractFieldOfBoolFrom, ExtractFieldOfDoubleFrom
  */
-void MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(const std::vector< std::pair<int,int> >& bigInAbs, const std::vector< std::pair<int,int> >& partOfBigInAbs, std::vector< std::pair<int,int> >& partOfBigRelativeToBig, bool check)
+void MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, bool check)
 {
   std::size_t dim(bigInAbs.size());
   if(dim!=partOfBigInAbs.size())
@@ -1816,7 +1817,7 @@ void MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(const std
  *
  * \sa ChangeReferenceFromGlobalOfCompactFrmt
  */
-void MEDCouplingStructuredMesh::ChangeReferenceToGlobalOfCompactFrmt(const std::vector< std::pair<int,int> >& bigInAbs, const std::vector< std::pair<int,int> >& partOfBigRelativeToBig, std::vector< std::pair<int,int> >& partOfBigInAbs, bool check)
+void MEDCouplingStructuredMesh::ChangeReferenceToGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, bool check)
 {
   std::size_t dim(bigInAbs.size());
   if(dim!=partOfBigRelativeToBig.size())
@@ -1855,12 +1856,12 @@ void MEDCouplingStructuredMesh::ChangeReferenceToGlobalOfCompactFrmt(const std::
  *
  * \sa FindTranslationFrom
  */
-std::vector< std::pair<int,int> > MEDCouplingStructuredMesh::TranslateCompactFrmt(const std::vector< std::pair<int,int> >& part, const std::vector<int>& translation)
+std::vector< std::pair<mcIdType,mcIdType> > MEDCouplingStructuredMesh::TranslateCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& part, const std::vector<mcIdType>& translation)
 {
   std::size_t sz(part.size());
   if(translation.size()!=sz)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::TranslateCompactFrmt : the sizes are not equal !");
-  std::vector< std::pair<int,int> > ret(sz);
+  std::vector< std::pair<mcIdType,mcIdType> > ret(sz);
   for(std::size_t i=0;i<sz;i++)
     {
       ret[i].first=part[i].first+translation[i];
@@ -1872,12 +1873,12 @@ std::vector< std::pair<int,int> > MEDCouplingStructuredMesh::TranslateCompactFrm
 /*!
  * \sa TranslateCompactFrmt
  */
-std::vector<int> MEDCouplingStructuredMesh::FindTranslationFrom(const std::vector< std::pair<int,int> >& startingFrom, const std::vector< std::pair<int,int> >& goingTo)
+std::vector<mcIdType> MEDCouplingStructuredMesh::FindTranslationFrom(const std::vector< std::pair<mcIdType,mcIdType> >& startingFrom, const std::vector< std::pair<mcIdType,mcIdType> >& goingTo)
 {
   std::size_t sz(startingFrom.size());
   if(goingTo.size()!=sz)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::FindTranslationFrom : the sizes are not equal !");
-  std::vector< int > ret(sz);
+  std::vector< mcIdType > ret(sz);
   for(std::size_t i=0;i<sz;i++)
     {
       ret[i]=goingTo[i].first-startingFrom[i].first;
@@ -1889,15 +1890,15 @@ std::vector<int> MEDCouplingStructuredMesh::FindTranslationFrom(const std::vecto
  * This method builds the explicit entity array from the structure in \a st and the range in \a partCompactFormat.
  * If the range contains invalid values regarding structure an exception will be thrown.
  *
- * \return DataArrayInt * - a new object.
+ * \return DataArrayIdType * - a new object.
  * \sa MEDCouplingStructuredMesh::IsPartStructured, MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt, SwitchOnIdsFrom, ExtractFieldOfBoolFrom, ExtractFieldOfDoubleFrom, MultiplyPartOf
  */
-DataArrayInt *MEDCouplingStructuredMesh::BuildExplicitIdsFrom(const std::vector<int>& st, const std::vector< std::pair<int,int> >& partCompactFormat)
+DataArrayIdType *MEDCouplingStructuredMesh::BuildExplicitIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat)
 {
   if(st.size()!=partCompactFormat.size())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::BuildExplicitIdsFrom : input arrays must have the same size !");
-  int nbOfItems(1);
-  std::vector<int> dims(st.size());
+  mcIdType nbOfItems(1);
+  std::vector<mcIdType> dims(st.size());
   for(std::size_t i=0;i<st.size();i++)
     {
       if(partCompactFormat[i].first<0 || partCompactFormat[i].first>st[i])
@@ -1909,20 +1910,20 @@ DataArrayInt *MEDCouplingStructuredMesh::BuildExplicitIdsFrom(const std::vector<
       dims[i]=partCompactFormat[i].second-partCompactFormat[i].first;
       nbOfItems*=dims[i];
     }
-  MCAuto<DataArrayInt> ret(DataArrayInt::New());
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
   ret->alloc(nbOfItems,1);
-  int *pt(ret->getPointer());
+  mcIdType *pt(ret->getPointer());
   switch(st.size())
   {
     case 3:
       {
-        for(int i=0;i<dims[2];i++)
+        for(mcIdType i=0;i<dims[2];i++)
           {
-            int a=(partCompactFormat[2].first+i)*st[0]*st[1];
-            for(int j=0;j<dims[1];j++)
+            mcIdType a=(partCompactFormat[2].first+i)*st[0]*st[1];
+            for(mcIdType j=0;j<dims[1];j++)
               {
-                int b=(partCompactFormat[1].first+j)*st[0];
-                for(int k=0;k<dims[0];k++,pt++)
+                mcIdType b=(partCompactFormat[1].first+j)*st[0];
+                for(mcIdType k=0;k<dims[0];k++,pt++)
                   *pt=partCompactFormat[0].first+k+b+a;
               }
           }
@@ -1930,17 +1931,17 @@ DataArrayInt *MEDCouplingStructuredMesh::BuildExplicitIdsFrom(const std::vector<
       }
     case 2:
       {
-        for(int j=0;j<dims[1];j++)
+        for(mcIdType j=0;j<dims[1];j++)
           {
-            int b=(partCompactFormat[1].first+j)*st[0];
-            for(int k=0;k<dims[0];k++,pt++)
+            mcIdType b=(partCompactFormat[1].first+j)*st[0];
+            for(mcIdType k=0;k<dims[0];k++,pt++)
               *pt=partCompactFormat[0].first+k+b;
           }
         break;
       }
     case 1:
       {
-        for(int k=0;k<dims[0];k++,pt++)
+        for(mcIdType k=0;k<dims[0];k++,pt++)
           *pt=partCompactFormat[0].first+k;
         break;
       }
@@ -1960,13 +1961,13 @@ DataArrayInt *MEDCouplingStructuredMesh::BuildExplicitIdsFrom(const std::vector<
  *
  * \sa BuildExplicitIdsFrom
  */
-void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<int>& st, const std::vector< std::pair<int,int> >& part, double factor, DataArrayDouble *da)
+void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, double factor, DataArrayDouble *da)
 {
   if(!da || !da->isAllocated())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::MultiplyPartOf : DataArrayDouble instance must be not NULL and allocated !");
   if(st.size()!=part.size())
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::MultiplyPartOf : input arrays must have the same size !");
-  std::vector<int> dims(st.size());
+  std::vector<mcIdType> dims(st.size());
   for(std::size_t i=0;i<st.size();i++)
     {
       if(part[i].first<0 || part[i].first>st[i])
@@ -1977,7 +1978,8 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<int>& st, const
         throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::MultiplyPartOf : invalid input range 3 !");
       dims[i]=part[i].second-part[i].first;
     }
-  int nbOfTuplesExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(st)),nbCompo(da->getNumberOfComponents());
+  mcIdType nbOfTuplesExp(MEDCouplingStructuredMesh::DeduceNumberOfGivenStructure(st));
+  std::size_t nbCompo(da->getNumberOfComponents());
   if(da->getNumberOfTuples()!=nbOfTuplesExp)
     {
       std::ostringstream oss; oss << "MEDCouplingStructuredMesh::MultiplyPartOf : invalid nb of tuples ! Expected " << nbOfTuplesExp << " having " << da->getNumberOfTuples() << " !";
@@ -1988,15 +1990,15 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<int>& st, const
   {
     case 3:
       {
-        for(int i=0;i<dims[2];i++)
+        for(mcIdType i=0;i<dims[2];i++)
           {
-            int a=(part[2].first+i)*st[0]*st[1];
-            for(int j=0;j<dims[1];j++)
+            mcIdType a=(part[2].first+i)*st[0]*st[1];
+            for(mcIdType j=0;j<dims[1];j++)
               {
-                int b=(part[1].first+j)*st[0];
-                for(int k=0;k<dims[0];k++)
+                mcIdType b=(part[1].first+j)*st[0];
+                for(mcIdType k=0;k<dims[0];k++)
                   {
-                    int offset(part[0].first+k+b+a);
+                    mcIdType offset(part[0].first+k+b+a);
                     std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind2nd(std::multiplies<double>(),factor));
                   }
               }
@@ -2005,12 +2007,12 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<int>& st, const
       }
     case 2:
       {
-        for(int j=0;j<dims[1];j++)
+        for(mcIdType j=0;j<dims[1];j++)
           {
-            int b=(part[1].first+j)*st[0];
-            for(int k=0;k<dims[0];k++)
+            mcIdType b=(part[1].first+j)*st[0];
+            for(mcIdType k=0;k<dims[0];k++)
               {
-                int offset(part[0].first+k+b);
+                mcIdType offset(part[0].first+k+b);
                 std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind2nd(std::multiplies<double>(),factor));
               }
           }
@@ -2018,9 +2020,9 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<int>& st, const
       }
     case 1:
       {
-        for(int k=0;k<dims[0];k++)
+        for(mcIdType k=0;k<dims[0];k++)
           {
-            int offset(part[0].first+k);
+            mcIdType offset(part[0].first+k);
             std::transform(pt+nbCompo*offset,pt+nbCompo*(offset+1),pt+nbCompo*offset,std::bind2nd(std::multiplies<double>(),factor));
           }
         break;
@@ -2041,10 +2043,10 @@ void MEDCouplingStructuredMesh::MultiplyPartOf(const std::vector<int>& st, const
  *
  * \sa MultiplyPartOf, PutInGhostFormat
  */
-void MEDCouplingStructuredMesh::MultiplyPartOfByGhost(const std::vector<int>& st, const std::vector< std::pair<int,int> >& part, int ghostSize, double factor, DataArrayDouble *da)
+void MEDCouplingStructuredMesh::MultiplyPartOfByGhost(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, mcIdType ghostSize, double factor, DataArrayDouble *da)
 {
-  std::vector<int> stWG;
-  std::vector< std::pair<int,int> > partWG;
+  std::vector<mcIdType> stWG;
+  std::vector< std::pair<mcIdType,mcIdType> > partWG;
   PutInGhostFormat(ghostSize,st,part,stWG,partWG);
   MultiplyPartOf(stWG,partWG,factor,da);
 }
@@ -2060,7 +2062,7 @@ void MEDCouplingStructuredMesh::MultiplyPartOfByGhost(const std::vector<int>& st
  *
  * \sa MultiplyPartOf, PutInGhostFormat
  */
-void MEDCouplingStructuredMesh::PutInGhostFormat(int ghostSize, const std::vector<int>& st, const std::vector< std::pair<int,int> >& part, std::vector<int>& stWithGhost, std::vector< std::pair<int,int> >&partWithGhost)
+void MEDCouplingStructuredMesh::PutInGhostFormat(mcIdType ghostSize, const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, std::vector<mcIdType>& stWithGhost, std::vector< std::pair<mcIdType,mcIdType> >&partWithGhost)
 {
   if(ghostSize<0)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::PutInGhostFormat : ghost size must be >= 0 !");
@@ -2071,7 +2073,7 @@ void MEDCouplingStructuredMesh::PutInGhostFormat(int ghostSize, const std::vecto
     if(part[i].first<0 || part[i].first>part[i].second || part[i].second>st[i])
       throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::PutInGhostFormat : the specified part is invalid ! The begin must be >= 0 and <= end ! The end must be <= to the size at considered dimension !");
   stWithGhost.resize(st.size());
-  std::transform(st.begin(),st.end(),stWithGhost.begin(),std::bind2nd(std::plus<int>(),2*ghostSize));
+  std::transform(st.begin(),st.end(),stWithGhost.begin(),std::bind2nd(std::plus<mcIdType>(),2*ghostSize));
   partWithGhost=part;
   ApplyGhostOnCompactFrmt(partWithGhost,ghostSize);
 }
@@ -2080,7 +2082,7 @@ void MEDCouplingStructuredMesh::PutInGhostFormat(int ghostSize, const std::vecto
  * \param [in,out] partBeforeFact - the part of a image mesh in compact format that will be put in ghost reference.
  * \param [in] ghostSize - the ghost size of zone for all axis.
  */
-void MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, int ghostSize)
+void MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, mcIdType ghostSize)
 {
   if(ghostSize<0)
     throw INTERP_KERNEL::Exception("MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt : ghost size must be >= 0 !");
@@ -2092,12 +2094,12 @@ void MEDCouplingStructuredMesh::ApplyGhostOnCompactFrmt(std::vector< std::pair<i
     }
 }
 
-int MEDCouplingStructuredMesh::GetNumberOfCellsOfSubLevelMesh(const std::vector<int>& cgs, int mdim)
+mcIdType MEDCouplingStructuredMesh::GetNumberOfCellsOfSubLevelMesh(const std::vector<mcIdType>& cgs, int mdim)
 {
-  int ret(0);
+  mcIdType ret(0);
   for(int i=0;i<mdim;i++)
     {
-      int locRet(1);
+      mcIdType locRet(1);
       for(int j=0;j<mdim;j++)
         if(j!=i)
           locRet*=cgs[j];
index 143ac294e33347faeb79ca44293fc10f8702f18b..2982f9e64e515c5e05e9cbc0c91916286b161e21 100644 (file)
@@ -31,90 +31,90 @@ namespace MEDCoupling
   class MEDCouplingStructuredMesh : public MEDCouplingMesh
   {
   public:
-    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(std::size_t cellId) const;
+    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
     MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT std::vector<int> getLocationFromCellId(int cellId) const;
-    MEDCOUPLING_EXPORT std::vector<int> getLocationFromNodeId(int nodeId) const;
-    MEDCOUPLING_EXPORT static void GetPosFromId(int eltId, int meshDim, const int *split, int *res);
-    MEDCOUPLING_EXPORT static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension(int meshDim);
-    MEDCOUPLING_EXPORT void getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getLocationFromCellId(mcIdType cellId) const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getLocationFromNodeId(mcIdType nodeId) const;
+    MEDCOUPLING_EXPORT static void GetPosFromId(mcIdType eltId, int meshDim, const mcIdType *split, mcIdType *res);
+    MEDCOUPLING_EXPORT static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension( int meshDim);
+    MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
     //tools
-    MEDCOUPLING_EXPORT std::vector<int> getDistributionOfTypes() const;
-    MEDCOUPLING_EXPORT DataArrayInt *checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
-    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller=true) const;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
     MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *build1SGTUnstructured() const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const int *start, const int *end) const;
-    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const;
-    MEDCOUPLING_EXPORT DataArrayInt *simplexize(int policy);
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
+    MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
-    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const;
+    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
     //some useful methods
     MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *build1SGTSubLevelMesh() const;
-    MEDCOUPLING_EXPORT int getCellIdFromPos(int i, int j, int k) const;
-    MEDCOUPLING_EXPORT int getNodeIdFromPos(int i, int j, int k) const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
-    MEDCOUPLING_EXPORT int getNumberOfNodes() const;
+    MEDCOUPLING_EXPORT mcIdType getCellIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
+    MEDCOUPLING_EXPORT mcIdType getNodeIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
     MEDCOUPLING_EXPORT int getMeshDimension() const;
-    MEDCOUPLING_EXPORT int getNumberOfCellsOfSubLevelMesh() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsOfSubLevelMesh() const;
     MEDCOUPLING_EXPORT int getSpaceDimensionOnNodeStruct() const;
-    MEDCOUPLING_EXPORT virtual void getNodeGridStructure(int *res) const = 0;
-    MEDCOUPLING_EXPORT virtual void getSplitCellValues(int *res) const;
-    MEDCOUPLING_EXPORT virtual void getSplitNodeValues(int *res) const;
-    MEDCOUPLING_EXPORT virtual std::vector<int> getNodeGridStructure() const = 0;
-    MEDCOUPLING_EXPORT std::vector<int> getCellGridStructure() const;
+    MEDCOUPLING_EXPORT virtual void getNodeGridStructure(mcIdType *res) const = 0;
+    MEDCOUPLING_EXPORT virtual void getSplitCellValues(mcIdType *res) const;
+    MEDCOUPLING_EXPORT virtual void getSplitNodeValues(mcIdType *res) const;
+    MEDCOUPLING_EXPORT virtual std::vector<mcIdType> getNodeGridStructure() const = 0;
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getCellGridStructure() const;
     MEDCOUPLING_EXPORT double computeSquareness() const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const = 0;
-    MEDCOUPLING_EXPORT static std::vector<int> GetSplitVectFromStruct(const std::vector<int>& strct);
-    MEDCOUPLING_EXPORT static bool IsPartStructured(const int *startIds, const int *stopIds, const std::vector<int>& st, std::vector< std::pair<int,int> >& partCompactFormat);
-    MEDCOUPLING_EXPORT static std::vector<int> GetDimensionsFromCompactFrmt(const std::vector< std::pair<int,int> >& partCompactFormat);
-    MEDCOUPLING_EXPORT static std::vector< std::pair<int,int> > GetCompactFrmtFromDimensions(const std::vector<int>& dims);
-    MEDCOUPLING_EXPORT static std::vector< std::pair<int,int> > IntersectRanges(const std::vector< std::pair<int,int> >& r1, const std::vector< std::pair<int,int> >& r2);
-    MEDCOUPLING_EXPORT static bool AreRangesIntersect(const std::vector< std::pair<int,int> >& r1, const std::vector< std::pair<int,int> >& r2);
-    MEDCOUPLING_EXPORT static void SwitchOnIdsFrom(const std::vector<int>& st, const std::vector< std::pair<int,int> >& partCompactFormat, std::vector<bool>& vectToSwitchOn);
-    MEDCOUPLING_EXPORT static void ExtractFieldOfBoolFrom(const std::vector<int>& st, const std::vector<bool>& fieldOfBool, const std::vector< std::pair<int,int> >& partCompactFormat, std::vector<bool>& fieldOut);
-    MEDCOUPLING_EXPORT static DataArrayDouble *ExtractFieldOfDoubleFrom(const std::vector<int>& st, const DataArrayDouble *fieldOfDbl, const std::vector< std::pair<int,int> >& partCompactFormat);
-    MEDCOUPLING_EXPORT static void AssignPartOfFieldOfDoubleUsing(const std::vector<int>& st, DataArrayDouble *fieldOfDbl, const std::vector< std::pair<int,int> >& partCompactFormat, const DataArrayDouble *other);
-    MEDCOUPLING_EXPORT static void ChangeReferenceFromGlobalOfCompactFrmt(const std::vector< std::pair<int,int> >& bigInAbs, const std::vector< std::pair<int,int> >& partOfBigInAbs, std::vector< std::pair<int,int> >& partOfBigRelativeToBig, bool check=true);
-    MEDCOUPLING_EXPORT static void ChangeReferenceToGlobalOfCompactFrmt(const std::vector< std::pair<int,int> >& bigInAbs, const std::vector< std::pair<int,int> >& partOfBigRelativeToBig, std::vector< std::pair<int,int> >& partOfBigInAbs, bool check=true);
-    MEDCOUPLING_EXPORT static std::vector< std::pair<int,int> > TranslateCompactFrmt(const std::vector< std::pair<int,int> >& part, const std::vector<int>& translation);
-    MEDCOUPLING_EXPORT static std::vector<int> FindTranslationFrom(const std::vector< std::pair<int,int> >& startingFrom, const std::vector< std::pair<int,int> >& goingTo);
-    MEDCOUPLING_EXPORT static DataArrayInt *BuildExplicitIdsFrom(const std::vector<int>& st, const std::vector< std::pair<int,int> >& partCompactFormat);
-    MEDCOUPLING_EXPORT static void MultiplyPartOf(const std::vector<int>& st, const std::vector< std::pair<int,int> >& part, double factor, DataArrayDouble *da);
-    MEDCOUPLING_EXPORT static void MultiplyPartOfByGhost(const std::vector<int>& st, const std::vector< std::pair<int,int> >& part, int ghostSize, double factor, DataArrayDouble *da);
-    MEDCOUPLING_EXPORT static void PutInGhostFormat(int ghostSize, const std::vector<int>& st, const std::vector< std::pair<int,int> >& part, std::vector<int>& stWithGhost, std::vector< std::pair<int,int> >&partWithGhost);
-    MEDCOUPLING_EXPORT static void ApplyGhostOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, int ghostSize);
-    MEDCOUPLING_EXPORT static DataArrayInt *Build1GTNodalConnectivity(const int *nodeStBg, const int *nodeStEnd);
-    MEDCOUPLING_EXPORT static DataArrayInt *Build1GTNodalConnectivityOfSubLevelMesh(const int *nodeStBg, const int *nodeStEnd);
-    MEDCOUPLING_EXPORT static DataArrayInt *ComputeCornersGhost(const std::vector<int>& st, int ghostLev);
-    MEDCOUPLING_EXPORT static int DeduceNumberOfGivenRangeInCompactFrmt(const std::vector< std::pair<int,int> >& partCompactFormat);
-    MEDCOUPLING_EXPORT static int DeduceNumberOfGivenStructure(const std::vector<int>& st);
-    MEDCOUPLING_EXPORT static void FindTheWidestAxisOfGivenRangeInCompactFrmt(const std::vector< std::pair<int,int> >& partCompactFormat, int& axisId, int& sizeOfRange);
-    MEDCOUPLING_EXPORT static int FindMinimalPartOf(int minPatchLgth, const std::vector<int>& st, const std::vector<bool>& crit, std::vector<bool>& reducedCrit, std::vector< std::pair<int,int> >& partCompactFormat);
-    MEDCOUPLING_EXPORT static std::vector< std::vector<int> > ComputeSignaturePerAxisOf(const std::vector<int>& st, const std::vector<bool>& crit);
+    MEDCOUPLING_EXPORT virtual MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const = 0;
+    MEDCOUPLING_EXPORT static std::vector<mcIdType> GetSplitVectFromStruct(const std::vector<mcIdType>& strct);
+    MEDCOUPLING_EXPORT static bool IsPartStructured(const mcIdType *startIds, const mcIdType *stopIds, const std::vector<mcIdType>& st, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    MEDCOUPLING_EXPORT static std::vector<mcIdType> GetDimensionsFromCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    MEDCOUPLING_EXPORT static std::vector< std::pair<mcIdType,mcIdType> > GetCompactFrmtFromDimensions(const std::vector<mcIdType>& dims);
+    MEDCOUPLING_EXPORT static std::vector< std::pair<mcIdType,mcIdType> > IntersectRanges(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2);
+    MEDCOUPLING_EXPORT static bool AreRangesIntersect(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2);
+    MEDCOUPLING_EXPORT static void SwitchOnIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& vectToSwitchOn);
+    MEDCOUPLING_EXPORT static void ExtractFieldOfBoolFrom(const std::vector<mcIdType>& st, const std::vector<bool>& fieldOfBool, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& fieldOut);
+    MEDCOUPLING_EXPORT static DataArrayDouble *ExtractFieldOfDoubleFrom(const std::vector<mcIdType>& st, const DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    MEDCOUPLING_EXPORT static void AssignPartOfFieldOfDoubleUsing(const std::vector<mcIdType>& st, DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, const DataArrayDouble *other);
+    MEDCOUPLING_EXPORT static void ChangeReferenceFromGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, bool check=true);
+    MEDCOUPLING_EXPORT static void ChangeReferenceToGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, bool check=true);
+    MEDCOUPLING_EXPORT static std::vector< std::pair<mcIdType,mcIdType> > TranslateCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& part, const std::vector<mcIdType>& translation);
+    MEDCOUPLING_EXPORT static std::vector<mcIdType> FindTranslationFrom(const std::vector< std::pair<mcIdType,mcIdType> >& startingFrom, const std::vector< std::pair<mcIdType,mcIdType> >& goingTo);
+    MEDCOUPLING_EXPORT static DataArrayIdType *BuildExplicitIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    MEDCOUPLING_EXPORT static void MultiplyPartOf(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, double factor, DataArrayDouble *da);
+    MEDCOUPLING_EXPORT static void MultiplyPartOfByGhost(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, mcIdType ghostSize, double factor, DataArrayDouble *da);
+    MEDCOUPLING_EXPORT static void PutInGhostFormat(mcIdType ghostSize, const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, std::vector<mcIdType>& stWithGhost, std::vector< std::pair<mcIdType,mcIdType> >&partWithGhost);
+    MEDCOUPLING_EXPORT static void ApplyGhostOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, mcIdType ghostSize);
+    MEDCOUPLING_EXPORT static DataArrayIdType *Build1GTNodalConnectivity(const mcIdType *nodeStBg, const mcIdType *nodeStEnd);
+    MEDCOUPLING_EXPORT static DataArrayIdType *Build1GTNodalConnectivityOfSubLevelMesh(const mcIdType *nodeStBg, const mcIdType *nodeStEnd);
+    MEDCOUPLING_EXPORT static DataArrayIdType *ComputeCornersGhost(const std::vector<mcIdType>& st, mcIdType ghostLev);
+    MEDCOUPLING_EXPORT static mcIdType DeduceNumberOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    MEDCOUPLING_EXPORT static mcIdType DeduceNumberOfGivenStructure(const std::vector<mcIdType>& st);
+    MEDCOUPLING_EXPORT static void FindTheWidestAxisOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, int& axisId, mcIdType& sizeOfRange);
+    MEDCOUPLING_EXPORT static mcIdType FindMinimalPartOf(mcIdType minPatchLgth, const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector<bool>& reducedCrit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    MEDCOUPLING_EXPORT static std::vector< std::vector<mcIdType> > ComputeSignaturePerAxisOf(const std::vector<mcIdType>& st, const std::vector<bool>& crit);
   private:
-    static int GetNumberOfCellsOfSubLevelMesh(const std::vector<int>& cgs, int mdim);
-    static void GetReverseNodalConnectivity1(const std::vector<int>& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx);
-    static void GetReverseNodalConnectivity2(const std::vector<int>& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx);
-    static void GetReverseNodalConnectivity3(const std::vector<int>& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx);
-    static DataArrayInt *Build1GTNodalConnectivity1D(const int *nodeStBg);
-    static DataArrayInt *Build1GTNodalConnectivity2D(const int *nodeStBg);
-    static DataArrayInt *Build1GTNodalConnectivity3D(const int *nodeStBg);
-    static DataArrayInt *Build1GTNodalConnectivityOfSubLevelMesh2D(const int *nodeStBg);
-    static DataArrayInt *Build1GTNodalConnectivityOfSubLevelMesh3D(const int *nodeStBg);
-    static int FindMinimalPartOf1D(const std::vector<int>& st, const std::vector<bool>& crit, std::vector< std::pair<int,int> >& partCompactFormat);
-    static int FindMinimalPartOf2D(const std::vector<int>& st, const std::vector<bool>& crit, std::vector< std::pair<int,int> >& partCompactFormat);
-    static int FindMinimalPartOf3D(const std::vector<int>& st, const std::vector<bool>& crit, std::vector< std::pair<int,int> >& partCompactFormat);
+    static mcIdType GetNumberOfCellsOfSubLevelMesh(const std::vector<mcIdType>& cgs, int mdim);
+    static void GetReverseNodalConnectivity1(const std::vector<mcIdType>& ngs, DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx);
+    static void GetReverseNodalConnectivity2(const std::vector<mcIdType>& ngs, DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx);
+    static void GetReverseNodalConnectivity3(const std::vector<mcIdType>& ngs, DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx);
+    static DataArrayIdType *Build1GTNodalConnectivity1D(const mcIdType *nodeStBg);
+    static DataArrayIdType *Build1GTNodalConnectivity2D(const mcIdType *nodeStBg);
+    static DataArrayIdType *Build1GTNodalConnectivity3D(const mcIdType *nodeStBg);
+    static DataArrayIdType *Build1GTNodalConnectivityOfSubLevelMesh2D(const mcIdType *nodeStBg);
+    static DataArrayIdType *Build1GTNodalConnectivityOfSubLevelMesh3D(const mcIdType *nodeStBg);
+    static mcIdType FindMinimalPartOf1D(const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    static mcIdType FindMinimalPartOf2D(const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+    static mcIdType FindMinimalPartOf3D(const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
   protected:
-    static int ZipNodeStructure(const int *nodeStBg, const int *nodeStEnd, int zipNodeSt[3]);
+    static int ZipNodeStructure(const mcIdType *nodeStBg, const mcIdType *nodeStEnd, mcIdType zipNodeSt[3]);
   protected:
     MEDCOUPLING_EXPORT MEDCouplingStructuredMesh();
     MEDCOUPLING_EXPORT MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCpy);
index 7e041ce71963a35ccaa5bd6cfd9f0f6b7106f78d..8e213bfd08dec89f495ea8d75e84226562c55258 100644 (file)
@@ -343,7 +343,7 @@ MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::maxPerTuple() cons
   return ret;
 }
 
-MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::keepSelectedComponents(const std::vector<int>& compoIds) const
+MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::keepSelectedComponents(const std::vector<std::size_t>& compoIds) const
 {
   std::vector<DataArrayDouble *> arrays;
   getArrays(arrays);
@@ -362,7 +362,7 @@ MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::keepSelectedCompon
   return ret;
 }
 
-void MEDCouplingTimeDiscretization::setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<int>& compoIds)
+void MEDCouplingTimeDiscretization::setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<std::size_t>& compoIds)
 {
   std::vector<DataArrayDouble *> arrays1,arrays2;
   getArrays(arrays1);
@@ -378,7 +378,7 @@ void MEDCouplingTimeDiscretization::setSelectedComponents(const MEDCouplingTimeD
     }
 }
 
-void MEDCouplingTimeDiscretization::changeNbOfComponents(int newNbOfComp, double dftValue)
+void MEDCouplingTimeDiscretization::changeNbOfComponents(std::size_t newNbOfComp, double dftValue)
 {
   std::vector<DataArrayDouble *> arrays;
   getArrays(arrays);
@@ -405,7 +405,7 @@ void MEDCouplingTimeDiscretization::sortPerTuple(bool asc)
     }
 }
 
-void MEDCouplingTimeDiscretization::setUniformValue(int nbOfTuple, int nbOfCompo, double value)
+void MEDCouplingTimeDiscretization::setUniformValue(mcIdType nbOfTuple, int nbOfCompo, double value)
 {
   std::vector<DataArrayDouble *> arrays;
   getArrays(arrays);
@@ -430,7 +430,7 @@ void MEDCouplingTimeDiscretization::setUniformValue(int nbOfTuple, int nbOfCompo
   setArrays(arrays3,0);
 }
 
-void MEDCouplingTimeDiscretization::setOrCreateUniformValueOnAllComponents(int nbOfTuple, double value)
+void MEDCouplingTimeDiscretization::setOrCreateUniformValueOnAllComponents(mcIdType nbOfTuple, double value)
 {
   std::vector<DataArrayDouble *> arrays;
   getArrays(arrays);
@@ -1168,12 +1168,12 @@ void MEDCouplingNoTimeLabel::setEndTime(double time, int iteration, int order)
   throw INTERP_KERNEL::Exception(EXCEPTION_MSG);
 }
 
-void MEDCouplingNoTimeLabel::getValueOnTime(int eltId, double time, double *value) const
+void MEDCouplingNoTimeLabel::getValueOnTime(mcIdType eltId, double time, double *value) const
 {
   throw INTERP_KERNEL::Exception(EXCEPTION_MSG);
 }
 
-void MEDCouplingNoTimeLabel::getValueOnDiscTime(int eltId, int iteration, int order, double *value) const
+void MEDCouplingNoTimeLabel::getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const
 {
   throw INTERP_KERNEL::Exception(EXCEPTION_MSG);
 }
@@ -1181,7 +1181,7 @@ void MEDCouplingNoTimeLabel::getValueOnDiscTime(int eltId, int iteration, int or
 /*!
  * idem getTinySerializationIntInformation except that it is for multi field fetch
  */
-void MEDCouplingNoTimeLabel::getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const
+void MEDCouplingNoTimeLabel::getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const
 {
   tinyInfo.clear();
 }
@@ -1198,7 +1198,7 @@ void MEDCouplingNoTimeLabel::getTinySerializationDbleInformation2(std::vector<do
 /*!
  * idem finishUnserialization except that it is for multi field fetch
  */
-void MEDCouplingNoTimeLabel::finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD)
+void MEDCouplingNoTimeLabel::finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD)
 {
   _time_tolerance=tinyInfoD[0];
 }
@@ -1230,7 +1230,7 @@ void MEDCouplingWithTimeStep::synchronizeTimeWith(const MEDCouplingMesh *mesh)
   setTimeUnit(tUnit);
 }
 
-void MEDCouplingWithTimeStep::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+void MEDCouplingWithTimeStep::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
 {
   MEDCouplingTimeDiscretization::getTinySerializationIntInformation(tinyInfo);
   tinyInfo.push_back(_tk.getIteration());
@@ -1243,18 +1243,18 @@ void MEDCouplingWithTimeStep::getTinySerializationDbleInformation(std::vector<do
   tinyInfo.push_back(_tk.getTimeValue());
 }
 
-void MEDCouplingWithTimeStep::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
+void MEDCouplingWithTimeStep::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
 {
   MEDCouplingTimeDiscretization::finishUnserialization(tinyInfoI,tinyInfoD,tinyInfoS);
   _tk.setTimeValue(tinyInfoD[1]);
-  _tk.setIteration(tinyInfoI[2]);
-  _tk.setOrder(tinyInfoI[3]);
+  _tk.setIteration(FromIdType<int>(tinyInfoI[2]));
+  _tk.setOrder(FromIdType<int>(tinyInfoI[3]));
 }
 
 /*!
  * idem getTinySerializationIntInformation except that it is for multi field fetch
  */
-void MEDCouplingWithTimeStep::getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const
+void MEDCouplingWithTimeStep::getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const
 {
   tinyInfo.resize(2);
   tinyInfo[0]=_tk.getIteration();
@@ -1274,10 +1274,10 @@ void MEDCouplingWithTimeStep::getTinySerializationDbleInformation2(std::vector<d
 /*!
  * idem finishUnserialization except that it is for multi field fetch
  */
-void MEDCouplingWithTimeStep::finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD)
+void MEDCouplingWithTimeStep::finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD)
 {
-  _tk.setIteration(tinyInfoI[0]);
-  _tk.setOrder(tinyInfoI[1]);
+  _tk.setIteration(FromIdType<int>(tinyInfoI[0]));
+  _tk.setOrder(FromIdType<int>(tinyInfoI[1]));
   _time_tolerance=tinyInfoD[0];
   _tk.setTimeValue(tinyInfoD[1]);
 }
@@ -1593,7 +1593,7 @@ void MEDCouplingWithTimeStep::getValueForTime(double time, const std::vector<dou
   std::copy(vals.begin(),vals.end(),res);
 }
 
-void MEDCouplingWithTimeStep::getValueOnTime(int eltId, double time, double *value) const
+void MEDCouplingWithTimeStep::getValueOnTime(mcIdType eltId, double time, double *value) const
 {
   if(std::fabs(time-_tk.getTimeValue())<=_time_tolerance)
     if(_array)
@@ -1604,7 +1604,7 @@ void MEDCouplingWithTimeStep::getValueOnTime(int eltId, double time, double *val
     throw INTERP_KERNEL::Exception(EXCEPTION_MSG);
 }
 
-void MEDCouplingWithTimeStep::getValueOnDiscTime(int eltId, int iteration, int order, double *value) const
+void MEDCouplingWithTimeStep::getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const
 {
   if(_tk.getIteration()==iteration && _tk.getOrder()==order)
     if(_array)
@@ -1629,7 +1629,7 @@ void MEDCouplingConstOnTimeInterval::copyTinyAttrFrom(const MEDCouplingTimeDiscr
   _end.copyFrom(otherC->_end);
 }
 
-void MEDCouplingConstOnTimeInterval::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+void MEDCouplingConstOnTimeInterval::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
 {
   MEDCouplingTimeDiscretization::getTinySerializationIntInformation(tinyInfo);
   tinyInfo.push_back(_start.getIteration());
@@ -1645,21 +1645,21 @@ void MEDCouplingConstOnTimeInterval::getTinySerializationDbleInformation(std::ve
   tinyInfo.push_back(_end.getTimeValue());
 }
 
-void MEDCouplingConstOnTimeInterval::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
+void MEDCouplingConstOnTimeInterval::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
 {
   MEDCouplingTimeDiscretization::finishUnserialization(tinyInfoI,tinyInfoD,tinyInfoS);
   _start.setTimeValue(tinyInfoD[1]);
   _end.setTimeValue(tinyInfoD[2]);
-  _start.setIteration(tinyInfoI[2]);
-  _start.setOrder(tinyInfoI[3]);
-  _end.setIteration(tinyInfoI[4]);
-  _end.setOrder(tinyInfoI[5]);
+  _start.setIteration(FromIdType<int>(tinyInfoI[2]));
+  _start.setOrder(FromIdType<int>(tinyInfoI[3]));
+  _end.setIteration(FromIdType<int>(tinyInfoI[4]));
+  _end.setOrder(FromIdType<int>(tinyInfoI[5]));
 }
 
 /*!
  * idem getTinySerializationIntInformation except that it is for multi field fetch
  */
-void MEDCouplingConstOnTimeInterval::getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const
+void MEDCouplingConstOnTimeInterval::getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const
 {
   tinyInfo.resize(4);
   tinyInfo[0]=_start.getIteration();
@@ -1682,12 +1682,12 @@ void MEDCouplingConstOnTimeInterval::getTinySerializationDbleInformation2(std::v
 /*!
  * idem finishUnserialization except that it is for multi field fetch
  */
-void MEDCouplingConstOnTimeInterval::finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD)
+void MEDCouplingConstOnTimeInterval::finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD)
 {
-  _start.setIteration(tinyInfoI[0]);
-  _start.setOrder(tinyInfoI[1]);
-  _end.setIteration(tinyInfoI[2]);
-  _end.setOrder(tinyInfoI[3]);
+  _start.setIteration(FromIdType<int>(tinyInfoI[0]));
+  _start.setOrder(FromIdType<int>(tinyInfoI[1]));
+  _end.setIteration(FromIdType<int>(tinyInfoI[2]));
+  _end.setOrder(FromIdType<int>(tinyInfoI[3]));
   _time_tolerance=tinyInfoD[0];
   _start.setTimeValue(tinyInfoD[1]);
   _end.setTimeValue(tinyInfoD[2]);
@@ -1812,7 +1812,7 @@ bool MEDCouplingConstOnTimeInterval::isEqualWithoutConsideringStr(const MEDCoupl
   return MEDCouplingTimeDiscretization::isEqualWithoutConsideringStr(other,prec);
 }
 
-void MEDCouplingConstOnTimeInterval::getValueOnTime(int eltId, double time, double *value) const
+void MEDCouplingConstOnTimeInterval::getValueOnTime(mcIdType eltId, double time, double *value) const
 {
   if(time>_start.getTimeValue()-_time_tolerance && time<_end.getTimeValue()+_time_tolerance)
     if(_array)
@@ -1823,7 +1823,7 @@ void MEDCouplingConstOnTimeInterval::getValueOnTime(int eltId, double time, doub
     throw INTERP_KERNEL::Exception(EXCEPTION_MSG);
 }
 
-void MEDCouplingConstOnTimeInterval::getValueOnDiscTime(int eltId, int iteration, int order, double *value) const
+void MEDCouplingConstOnTimeInterval::getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const
 {
   if(iteration>=_start.getIteration() && iteration<=_end.getIteration())
     if(_array)
@@ -2229,7 +2229,7 @@ void MEDCouplingTwoTimeSteps::setEndArray(DataArrayDouble *array, TimeLabel *own
     }
 }
 
-void MEDCouplingTwoTimeSteps::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+void MEDCouplingTwoTimeSteps::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
 {
   MEDCouplingTimeDiscretization::getTinySerializationIntInformation(tinyInfo);
   tinyInfo.push_back(_start.getIteration());
@@ -2239,7 +2239,7 @@ void MEDCouplingTwoTimeSteps::getTinySerializationIntInformation(std::vector<int
   if(_end_array)
     {
       tinyInfo.push_back(_end_array->getNumberOfTuples());
-      tinyInfo.push_back(_end_array->getNumberOfComponents());
+      tinyInfo.push_back(ToIdType(_end_array->getNumberOfComponents()));
     }
   else
     {
@@ -2257,14 +2257,14 @@ void MEDCouplingTwoTimeSteps::getTinySerializationDbleInformation(std::vector<do
 
 void MEDCouplingTwoTimeSteps::getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const
 {
-  int nbOfCompo=_array->getNumberOfComponents();
-  for(int i=0;i<nbOfCompo;i++)
+  std::size_t nbOfCompo=_array->getNumberOfComponents();
+  for(std::size_t i=0;i<nbOfCompo;i++)
     tinyInfo.push_back(_array->getInfoOnComponent(i));
-  for(int i=0;i<nbOfCompo;i++)
+  for(std::size_t i=0;i<nbOfCompo;i++)
     tinyInfo.push_back(_end_array->getInfoOnComponent(i));
 }
 
-void MEDCouplingTwoTimeSteps::resizeForUnserialization(const std::vector<int>& tinyInfoI, std::vector<DataArrayDouble *>& arrays)
+void MEDCouplingTwoTimeSteps::resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<DataArrayDouble *>& arrays)
 {
   arrays.resize(2);
   if(_array!=0)
@@ -2289,7 +2289,7 @@ void MEDCouplingTwoTimeSteps::resizeForUnserialization(const std::vector<int>& t
   arrays[1]=arr;
 }
 
-void MEDCouplingTwoTimeSteps::checkForUnserialization(const std::vector<int>& tinyInfoI, const std::vector<DataArrayDouble *>& arrays)
+void MEDCouplingTwoTimeSteps::checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<DataArrayDouble *>& arrays)
 {
   static const char MSG[]="MEDCouplingTimeDiscretization::checkForUnserialization : arrays in input is expected to have size two !";
   if(arrays.size()!=2)
@@ -2315,21 +2315,21 @@ void MEDCouplingTwoTimeSteps::checkForUnserialization(const std::vector<int>& ti
     }
 }
 
-void MEDCouplingTwoTimeSteps::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
+void MEDCouplingTwoTimeSteps::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
 {
   MEDCouplingTimeDiscretization::finishUnserialization(tinyInfoI,tinyInfoD,tinyInfoS);
   _start.setTimeValue(tinyInfoD[1]);
   _end.setTimeValue(tinyInfoD[2]);
-  _start.setIteration(tinyInfoI[2]);
-  _start.setOrder(tinyInfoI[3]);
-  _end.setIteration(tinyInfoI[4]);
-  _end.setOrder(tinyInfoI[5]);
+  _start.setIteration(FromIdType<int>(tinyInfoI[2]));
+  _start.setOrder(FromIdType<int>(tinyInfoI[3]));
+  _end.setIteration(FromIdType<int>(tinyInfoI[4]));
+  _end.setOrder(FromIdType<int>(tinyInfoI[5]));
 }
 
 /*!
  * idem getTinySerializationIntInformation except that it is for multi field fetch
  */
-void MEDCouplingTwoTimeSteps::getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const
+void MEDCouplingTwoTimeSteps::getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const
 {
   tinyInfo.resize(4);
   tinyInfo[0]=_start.getIteration();
@@ -2352,12 +2352,12 @@ void MEDCouplingTwoTimeSteps::getTinySerializationDbleInformation2(std::vector<d
 /*!
  * idem finishUnserialization except that it is for multi field fetch
  */
-void MEDCouplingTwoTimeSteps::finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD)
+void MEDCouplingTwoTimeSteps::finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD)
 {
-  _start.setIteration(tinyInfoI[0]);
-  _start.setOrder(tinyInfoI[1]);
-  _end.setIteration(tinyInfoI[2]);
-  _end.setOrder(tinyInfoI[3]);
+  _start.setIteration(FromIdType<int>(tinyInfoI[0]));
+  _start.setOrder(FromIdType<int>(tinyInfoI[1]));
+  _end.setIteration(FromIdType<int>(tinyInfoI[2]));
+  _end.setOrder(FromIdType<int>(tinyInfoI[3]));
   _time_tolerance=tinyInfoD[0];
   _start.setTimeValue(tinyInfoD[1]);
   _end.setTimeValue(tinyInfoD[2]);
@@ -2459,8 +2459,8 @@ bool MEDCouplingLinearTime::areStrictlyCompatibleForDiv(const MEDCouplingTimeDis
     return true;
   if(_end_array==0 || otherC->_end_array==0)
     return false;
-  int nbC1=_end_array->getNumberOfComponents();
-  int nbC2=otherC->_end_array->getNumberOfComponents();
+  std::size_t nbC1=_end_array->getNumberOfComponents();
+  std::size_t nbC2=otherC->_end_array->getNumberOfComponents();
   if(nbC1!=nbC2 && nbC2!=1)
     return false;
   return true;
@@ -2487,15 +2487,14 @@ void MEDCouplingLinearTime::getValueForTime(double time, const std::vector<doubl
   std::transform(tmp.begin(),tmp.end(),res,res,std::plus<double>());
 }
 
-void MEDCouplingLinearTime::getValueOnTime(int eltId, double time, double *value) const
+void MEDCouplingLinearTime::getValueOnTime(mcIdType eltId, double time, double *value) const
 {
   double alpha=(_end.getTimeValue()-time)/(_end.getTimeValue()-_start.getTimeValue());
-  int nbComp;
   if(_array)
     _array->getTuple(eltId,value);
   else
     throw INTERP_KERNEL::Exception("No start array existing.");
-  nbComp=_array->getNumberOfComponents();
+  std::size_t nbComp=_array->getNumberOfComponents();
   std::transform(value,value+nbComp,value,std::bind2nd(std::multiplies<double>(),alpha));
   std::vector<double> tmp(nbComp);
   if(_end_array)
@@ -2506,7 +2505,7 @@ void MEDCouplingLinearTime::getValueOnTime(int eltId, double time, double *value
   std::transform(tmp.begin(),tmp.end(),value,value,std::plus<double>());
 }
 
-void MEDCouplingLinearTime::getValueOnDiscTime(int eltId, int iteration, int order, double *value) const
+void MEDCouplingLinearTime::getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const
 {
   if(iteration==_start.getIteration() && order==_start.getOrder())
     {
index 8e7379d972506a5d66fa796018c459ff597b3d3c..3a1d7b33d8c3b09f0acda33be7270c762f6f8a23 100644 (file)
@@ -99,12 +99,12 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
     MEDCOUPLING_EXPORT virtual bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
     MEDCOUPLING_EXPORT virtual ~MEDCouplingTimeDiscretizationTemplate();
-    MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
     MEDCOUPLING_EXPORT virtual void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
-    MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<int>& tinyInfoI, std::vector<typename Traits<T>::ArrayType *>& arrays);
-    MEDCOUPLING_EXPORT virtual void checkForUnserialization(const std::vector<int>& tinyInfoI, const std::vector<typename Traits<T>::ArrayType *>& arrays);
-    MEDCOUPLING_EXPORT virtual void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+    MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<typename Traits<T>::ArrayType *>& arrays);
+    MEDCOUPLING_EXPORT virtual void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<typename Traits<T>::ArrayType *>& arrays);
+    MEDCOUPLING_EXPORT virtual void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
   protected:
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationTemplate();
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationTemplate(const MEDCouplingTimeDiscretizationTemplate<T>& other, bool deepCopy);
@@ -167,17 +167,17 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual void divideEqual(const MEDCouplingTimeDiscretization *other) = 0;
     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const = 0;
     MEDCOUPLING_EXPORT virtual void powEqual(const MEDCouplingTimeDiscretization *other) = 0;
-    MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const = 0;
+    MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const = 0;
     MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const = 0;
-    MEDCOUPLING_EXPORT virtual void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD) = 0;
+    MEDCOUPLING_EXPORT virtual void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD) = 0;
     MEDCOUPLING_EXPORT virtual void checkNoTimePresence() const = 0;
     MEDCOUPLING_EXPORT virtual void checkTimePresence(double time) const = 0;
     MEDCOUPLING_EXPORT virtual std::vector< const DataArrayDouble *> getArraysForTime(double time) const = 0;
     MEDCOUPLING_EXPORT virtual void getValueForTime(double time, const std::vector<double>& vals, double *res) const = 0;
     MEDCOUPLING_EXPORT virtual bool isBefore(const MEDCouplingTimeDiscretization *other) const;
     MEDCOUPLING_EXPORT virtual bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const;
-    MEDCOUPLING_EXPORT virtual void getValueOnTime(int eltId, double time, double *value) const = 0;
-    MEDCOUPLING_EXPORT virtual void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const = 0;
+    MEDCOUPLING_EXPORT virtual void getValueOnTime(mcIdType eltId, double time, double *value) const = 0;
+    MEDCOUPLING_EXPORT virtual void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const = 0;
     //
     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *computeVectorFieldCyl(const DataArrayDouble *coords, const double center[3], const double vect[3]) const;
     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *doublyContractedProduct() const;
@@ -190,12 +190,12 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *magnitude() const;
     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *negate() const;
     MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *maxPerTuple() const;
-    MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *keepSelectedComponents(const std::vector<int>& compoIds) const;
-    MEDCOUPLING_EXPORT virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<int>& compoIds);
-    MEDCOUPLING_EXPORT virtual void changeNbOfComponents(int newNbOfComp, double dftValue);
+    MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const;
+    MEDCOUPLING_EXPORT virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<std::size_t>& compoIds);
+    MEDCOUPLING_EXPORT virtual void changeNbOfComponents(std::size_t newNbOfComp, double dftValue);
     MEDCOUPLING_EXPORT virtual void sortPerTuple(bool asc);
-    MEDCOUPLING_EXPORT virtual void setUniformValue(int nbOfTuple, int nbOfCompo, double value);
-    MEDCOUPLING_EXPORT virtual void setOrCreateUniformValueOnAllComponents(int nbOfTuple, double value);
+    MEDCOUPLING_EXPORT virtual void setUniformValue(mcIdType nbOfTuple, int nbOfCompo, double value);
+    MEDCOUPLING_EXPORT virtual void setOrCreateUniformValueOnAllComponents(mcIdType nbOfTuple, double value);
     MEDCOUPLING_EXPORT virtual void applyLin(double a, double b, int compoId);
     MEDCOUPLING_EXPORT virtual void applyLin(double a, double b);
     MEDCOUPLING_EXPORT virtual void applyFunc(int nbOfComp, FunctionToEvaluate func);
@@ -311,11 +311,11 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void setEndTimeValue(double time);
     MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order);
     MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order);
-    MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const;
-    MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const;
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
+    MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD);
+    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
   public:
     static const TypeOfTimeDiscretization DISCRETIZATION=NO_TIME;
     MEDCOUPLING_EXPORT static const char REPR[];
@@ -357,12 +357,12 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
     MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD);
+    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
     MEDCOUPLING_EXPORT void checkNoTimePresence() const;
     MEDCOUPLING_EXPORT void checkTimePresence(double time) const;
@@ -378,8 +378,8 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void setEndTimeValue(double time) { _tk.setTimeValue(time); }
     MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
     MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
-    MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const;
-    MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const;
+    MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
+    MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
   public:
     static const TypeOfTimeDiscretization DISCRETIZATION=ONE_TIME;
     MEDCOUPLING_EXPORT static const char REPR[];
@@ -396,12 +396,12 @@ namespace MEDCoupling
   public:
     MEDCOUPLING_EXPORT MEDCouplingConstOnTimeInterval();
     MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD);
+    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
     MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
     MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
@@ -412,8 +412,8 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
     MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
     MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
-    MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const;
-    MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const;
+    MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
+    MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
     MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
     MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh);
     MEDCOUPLING_EXPORT std::string getStringRepr() const;
@@ -488,15 +488,15 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void setEndOrder(int order) { _end.setOrder(order); }
     MEDCOUPLING_EXPORT void setStartTimeValue(double time) { _start.setTimeValue(time); }
     MEDCOUPLING_EXPORT void setEndTimeValue(double time) { _end.setTimeValue(time); }
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfoI, std::vector<DataArrayDouble *>& arrays);
-    MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<int>& tinyInfoI, const std::vector<DataArrayDouble *>& arrays);
-    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
-    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<int>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<DataArrayDouble *>& arrays);
+    MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<DataArrayDouble *>& arrays);
+    MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+    MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
     MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD);
+    MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
     MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
     MEDCOUPLING_EXPORT void setArrays(const std::vector<DataArrayDouble *>& arrays, TimeLabel *owner);
   protected:
@@ -523,8 +523,8 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
     MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
     MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
-    MEDCOUPLING_EXPORT void getValueOnTime(int eltId, double time, double *value) const;
-    MEDCOUPLING_EXPORT void getValueOnDiscTime(int eltId, int iteration, int order, double *value) const;
+    MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
+    MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
     MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
index e66822e8741e2f466075da73c8a213363e2cb629..d17900a4de25dc94dc9d4a4cbd28009977ed5069 100644 (file)
@@ -148,8 +148,8 @@ namespace MEDCoupling
       return true;
     if(_array==0 || other->_array==0)
       return false;
-    int nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents());
-    int nbMin(std::min(nbC1,nbC2));
+    std::size_t nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents());
+    std::size_t nbMin(std::min(nbC1,nbC2));
     if(nbC1!=nbC2 && nbMin!=1)
       return false;
     return true;
@@ -164,7 +164,7 @@ namespace MEDCoupling
       return true;
     if(_array==0 || other->_array==0)
       return false;
-    int nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents());
+    std::size_t nbC1(_array->getNumberOfComponents()),nbC2(other->_array->getNumberOfComponents());
     if(nbC1!=nbC2 && nbC2!=1)
       return false;
     return true;
@@ -225,12 +225,12 @@ namespace MEDCoupling
   }
   
   template<class T>
-  void MEDCouplingTimeDiscretizationTemplate<T>::getTinySerializationIntInformation(std::vector<int>& tinyInfo) const
+  void MEDCouplingTimeDiscretizationTemplate<T>::getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const
   {
     if(_array)
       {
         tinyInfo.push_back(_array->getNumberOfTuples());
-        tinyInfo.push_back(_array->getNumberOfComponents());
+        tinyInfo.push_back(ToIdType(_array->getNumberOfComponents()));
       }
     else
       {
@@ -248,13 +248,13 @@ namespace MEDCoupling
   template<class T>
   void MEDCouplingTimeDiscretizationTemplate<T>::getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const
   {
-    int nbOfCompo(_array->getNumberOfComponents());
-    for(int i=0;i<nbOfCompo;i++)
+    std::size_t nbOfCompo(_array->getNumberOfComponents());
+    for(std::size_t i=0;i<nbOfCompo;i++)
       tinyInfo.push_back(_array->getInfoOnComponent(i));
   }
   
   template<class T>
-  void MEDCouplingTimeDiscretizationTemplate<T>::resizeForUnserialization(const std::vector<int>& tinyInfoI, std::vector<typename Traits<T>::ArrayType *>& arrays)
+  void MEDCouplingTimeDiscretizationTemplate<T>::resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<typename Traits<T>::ArrayType *>& arrays)
   {
     arrays.resize(1);
     if(_array!=0)
@@ -270,7 +270,7 @@ namespace MEDCoupling
   }
   
   template<class T>
-  void MEDCouplingTimeDiscretizationTemplate<T>::checkForUnserialization(const std::vector<int>& tinyInfoI, const std::vector<typename Traits<T>::ArrayType *>& arrays)
+  void MEDCouplingTimeDiscretizationTemplate<T>::checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<typename Traits<T>::ArrayType *>& arrays)
   {
     static const char MSG[]="MEDCouplingTimeDiscretization::checkForUnserialization : arrays in input is expected to have size one !";
     if(arrays.size()!=1)
@@ -289,11 +289,11 @@ namespace MEDCoupling
   }
   
   template<class T>
-  void MEDCouplingTimeDiscretizationTemplate<T>::finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
+  void MEDCouplingTimeDiscretizationTemplate<T>::finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS)
   {
     _time_tolerance=tinyInfoD[0];
-    int nbOfCompo=_array->getNumberOfComponents();
-    for(int i=0;i<nbOfCompo;i++)
+    std::size_t nbOfCompo=_array->getNumberOfComponents();
+    for(std::size_t i=0;i<nbOfCompo;i++)
       _array->setInfoOnComponent(i,tinyInfoS[i]);
   }
   
index e5961fe9ac00c28969fa58cf73df7cdec4d91a27..9d10b48fa0ace35f974ea98c0afc647dc6bd3bf8 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "MEDCoupling.hxx"
 #include "MCType.hxx"
+#include <vector>
 
 namespace MEDCoupling
 {
@@ -42,8 +43,13 @@ namespace MEDCoupling
   class MEDCouplingFieldFloat;
   class MEDCouplingFieldInt;
   class DataArrayInt32Tuple;
+  class DataArrayInt64Tuple;
   class DataArrayFloatTuple;
   class DataArrayDoubleTuple;
+  class DataArrayByteTuple;
+  class DataArrayInt32Iterator;
+  class DataArrayInt64Iterator;
+  class DataArrayByteIterator;
   
   template<>
   struct MEDCOUPLING_EXPORT Traits<double>
@@ -83,6 +89,7 @@ namespace MEDCoupling
     typedef DataArrayInt32 ArrayTypeCh;
     typedef MEDCouplingFieldInt FieldType;
     typedef DataArrayInt32Tuple ArrayTuple;
+    typedef DataArrayInt32Iterator IteratorType;
   };
 
   template<>
@@ -96,7 +103,8 @@ namespace MEDCoupling
     typedef DataArrayInt64 ArrayType;
     typedef DataArrayInt64 ArrayTypeCh;
     //typedef MEDCouplingFieldInt64 FieldType;
-    //typedef DataArrayInt64Tuple ArrayTuple;
+    typedef DataArrayInt64Tuple ArrayTuple;
+    typedef DataArrayInt64Iterator IteratorType;
   };
 
   template<>
@@ -105,6 +113,8 @@ namespace MEDCoupling
     static const char ArrayTypeName[];
     typedef DataArrayByte ArrayTypeCh;
     typedef DataArrayChar ArrayType;
+    typedef DataArrayByteTuple ArrayTuple;
+    typedef DataArrayByteIterator IteratorType;
   };
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 5b5ca72..05eaf26
@@ -57,7 +57,7 @@ double MEDCouplingUMesh::EPS_FOR_POLYH_ORIENTATION=1.e-14;
 
 /// @cond INTERNAL
 const INTERP_KERNEL::NormalizedCellType MEDCouplingUMesh::MEDMEM_ORDER[N_MEDMEM_ORDER] = { INTERP_KERNEL::NORM_POINT1, INTERP_KERNEL::NORM_SEG2, INTERP_KERNEL::NORM_SEG3, INTERP_KERNEL::NORM_SEG4, INTERP_KERNEL::NORM_POLYL, INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_TRI6, INTERP_KERNEL::NORM_TRI7, INTERP_KERNEL::NORM_QUAD8, INTERP_KERNEL::NORM_QUAD9, INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_QPOLYG, INTERP_KERNEL::NORM_TETRA4, INTERP_KERNEL::NORM_PYRA5, INTERP_KERNEL::NORM_PENTA6, INTERP_KERNEL::NORM_HEXA8, INTERP_KERNEL::NORM_HEXGP12, INTERP_KERNEL::NORM_TETRA10, INTERP_KERNEL::NORM_PYRA13, INTERP_KERNEL::NORM_PENTA15, INTERP_KERNEL::NORM_PENTA18, INTERP_KERNEL::NORM_HEXA20, INTERP_KERNEL::NORM_HEXA27, INTERP_KERNEL::NORM_POLYHED };
-const int MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[INTERP_KERNEL::NORM_MAXTYPE+1]={1,3,21,5,9,7,22,34,23,28,-1,-1,-1,-1,10,14,13,-1,12,-1,24,-1,16,27,-1,26,-1,29,32,-1,25,42,36,4};
+const mcIdType MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[INTERP_KERNEL::NORM_MAXTYPE+1]={1,3,21,5,9,7,22,34,23,28,-1,-1,-1,-1,10,14,13,-1,12,-1,24,-1,16,27,-1,26,-1,29,32,-1,25,42,36,4};
 /// @endcond
 
 MEDCouplingUMesh *MEDCouplingUMesh::New()
@@ -108,7 +108,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::deepCopyConnectivityOnly() const
 {
   checkConnectivityFullyDefined();
   MCAuto<MEDCouplingUMesh> ret=clone(false);
-  MCAuto<DataArrayInt> c(getNodalConnectivity()->deepCopy()),ci(getNodalConnectivityIndex()->deepCopy());
+  MCAuto<DataArrayIdType> c(getNodalConnectivity()->deepCopy()),ci(getNodalConnectivityIndex()->deepCopy());
   ret->setConnectivity(c,ci);
   return ret.retn();
 }
@@ -176,7 +176,7 @@ void MEDCouplingUMesh::checkConsistencyLight() const
     MEDCouplingPointSet::checkConsistencyLight();
   for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iter=_types.begin();iter!=_types.end();iter++)
     {
-      if((int)INTERP_KERNEL::CellModel::GetCellModel(*iter).getDimension()!=_mesh_dim)
+      if(ToIdType(INTERP_KERNEL::CellModel::GetCellModel(*iter).getDimension())!=_mesh_dim)
         {
           std::ostringstream message;
           message << "Mesh invalid because dimension is " << _mesh_dim << " and there is presence of cell(s) with type " << (*iter);
@@ -227,22 +227,22 @@ void MEDCouplingUMesh::checkConsistency(double eps) const
   if(_mesh_dim==-1)
     return ;
   int meshDim=getMeshDimension();
-  int nbOfNodes=getNumberOfNodes();
-  int nbOfCells=getNumberOfCells();
-  const int *ptr=_nodal_connec->getConstPointer();
-  const int *ptrI=_nodal_connec_index->getConstPointer();
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *ptr=_nodal_connec->getConstPointer();
+  const mcIdType *ptrI=_nodal_connec_index->getConstPointer();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)ptr[ptrI[i]]);
-      if((int)cm.getDimension()!=meshDim)
+      if(ToIdType(cm.getDimension())!=meshDim)
         {
           std::ostringstream oss;
           oss << "MEDCouplingUMesh::checkConsistency : cell << #" << i<< " with type Type " << cm.getRepr() << " in 'this' whereas meshdim == " << meshDim << " !";
           throw INTERP_KERNEL::Exception(oss.str());
         }
-      int nbOfNodesInCell=ptrI[i+1]-ptrI[i]-1;
+      mcIdType nbOfNodesInCell=ptrI[i+1]-ptrI[i]-1;
       if(!cm.isDynamic())
-        if(nbOfNodesInCell!=(int)cm.getNumberOfNodes())
+        if(nbOfNodesInCell!=ToIdType(cm.getNumberOfNodes()))
           {
             std::ostringstream oss;
             oss << "MEDCouplingUMesh::checkConsistency : cell #" << i << " with static Type '" << cm.getRepr() << "' has " <<  cm.getNumberOfNodes();
@@ -257,9 +257,9 @@ void MEDCouplingUMesh::checkConsistency(double eps) const
             oss << " nodes. This should be even, and greater or equal than 4!! Looks very bad!";
             throw INTERP_KERNEL::Exception(oss.str());
           }
-      for(const int *w=ptr+ptrI[i]+1;w!=ptr+ptrI[i+1];w++)
+      for(const mcIdType *w=ptr+ptrI[i]+1;w!=ptr+ptrI[i+1];w++)
         {
-          int nodeId=*w;
+          mcIdType nodeId=*w;
           if(nodeId>=0)
             {
               if(nodeId>=nbOfNodes)
@@ -313,7 +313,7 @@ void MEDCouplingUMesh::setMeshDimension(int meshDim)
  *  \ref medcouplingpyexamplesUmeshStdBuild1 "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::allocateCells(int nbOfCells)
+void MEDCouplingUMesh::allocateCells(mcIdType nbOfCells)
 {
   if(nbOfCells<0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::allocateCells : the input number of cells should be >= 0 !");
@@ -325,10 +325,10 @@ void MEDCouplingUMesh::allocateCells(int nbOfCells)
     {
       _nodal_connec->decrRef();
     }
-  _nodal_connec_index=DataArrayInt::New();
+  _nodal_connec_index=DataArrayIdType::New();
   _nodal_connec_index->reserve(nbOfCells+1);
   _nodal_connec_index->pushBackSilent(0);
-  _nodal_connec=DataArrayInt::New();
+  _nodal_connec=DataArrayIdType::New();
   _nodal_connec->reserve(2*nbOfCells);
   _types.clear();
   declareAsNew();
@@ -346,22 +346,22 @@ void MEDCouplingUMesh::allocateCells(int nbOfCells)
  *  \ref medcouplingpyexamplesUmeshStdBuild1 "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, const int *nodalConnOfCell)
+void MEDCouplingUMesh::insertNextCell(INTERP_KERNEL::NormalizedCellType type, mcIdType size, const mcIdType *nodalConnOfCell)
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
   if(_nodal_connec_index==0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::insertNextCell : nodal connectivity not set ! invoke allocateCells before calling insertNextCell !");
-  if((int)cm.getDimension()==_mesh_dim)
+  if(ToIdType(cm.getDimension())==_mesh_dim)
     {
       if(!cm.isDynamic())
-        if(size!=(int)cm.getNumberOfNodes())
+        if(size!=ToIdType(cm.getNumberOfNodes()))
           {
             std::ostringstream oss; oss << "MEDCouplingUMesh::insertNextCell : Trying to push a " << cm.getRepr() << " cell with a size of " << size;
             oss << " ! Expecting " << cm.getNumberOfNodes() << " !";
             throw INTERP_KERNEL::Exception(oss.str());
           }
-      int idx=_nodal_connec_index->back();
-      int val=idx+size+1;
+      mcIdType idx=_nodal_connec_index->back();
+      mcIdType val=idx+size+1;
       _nodal_connec_index->pushBackSilent(val);
       _nodal_connec->writeOnPlace(idx,type,nodalConnOfCell,size);
       _types.insert(type);
@@ -439,14 +439,14 @@ std::vector<INTERP_KERNEL::NormalizedCellType> MEDCouplingUMesh::getAllGeoTypesS
 {
   std::vector<INTERP_KERNEL::NormalizedCellType> ret;
   checkConnectivityFullyDefined();
-  int nbOfCells(getNumberOfCells());
+  mcIdType nbOfCells=getNumberOfCells();
   if(nbOfCells==0)
     return ret;
   if(getNodalConnectivityArrayLen()<1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getAllGeoTypesSorted : the connectivity in this seems invalid !");
-  const int *c(_nodal_connec->begin()),*ci(_nodal_connec_index->begin());
+  const mcIdType *c(_nodal_connec->begin()),*ci(_nodal_connec_index->begin());
   ret.push_back((INTERP_KERNEL::NormalizedCellType)c[*ci++]);
-  for(int i=1;i<nbOfCells;i++,ci++)
+  for(mcIdType i=1;i<nbOfCells;i++,ci++)
     if(ret.back()!=((INTERP_KERNEL::NormalizedCellType)c[*ci]))
       ret.push_back((INTERP_KERNEL::NormalizedCellType)c[*ci]);
   return ret;
@@ -588,36 +588,36 @@ void MEDCouplingUMesh::checkFastEquivalWith(const MEDCouplingMesh *other, double
  * \ref  py_mcumesh_getReverseNodalConnectivity "Here is a Python example".
  * \endif
  */
-void MEDCouplingUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const
+void MEDCouplingUMesh::getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const
 {
   checkFullyDefined();
-  int nbOfNodes(getNumberOfNodes());
-  int *revNodalIndxPtr=(int *)malloc((nbOfNodes+1)*sizeof(int));
+  mcIdType nbOfNodes(getNumberOfNodes());
+  mcIdType *revNodalIndxPtr=(mcIdType *)malloc((nbOfNodes+1)*sizeof(mcIdType));
   revNodalIndx->useArray(revNodalIndxPtr,true,DeallocType::C_DEALLOC,nbOfNodes+1,1);
   std::fill(revNodalIndxPtr,revNodalIndxPtr+nbOfNodes+1,0);
-  const int *conn(_nodal_connec->begin()),*connIndex(_nodal_connec_index->begin());
-  int nbOfCells(getNumberOfCells()),nbOfEltsInRevNodal(0);
-  for(int eltId=0;eltId<nbOfCells;eltId++)
+  const mcIdType *conn(_nodal_connec->begin()),*connIndex(_nodal_connec_index->begin());
+  mcIdType nbOfCells(getNumberOfCells()),nbOfEltsInRevNodal(0);
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++)
     {
-      const int *strtNdlConnOfCurCell(conn+connIndex[eltId]+1),*endNdlConnOfCurCell(conn+connIndex[eltId+1]);
-      for(const int *iter=strtNdlConnOfCurCell;iter!=endNdlConnOfCurCell;iter++)
+      const mcIdType *strtNdlConnOfCurCell(conn+connIndex[eltId]+1),*endNdlConnOfCurCell(conn+connIndex[eltId+1]);
+      for(const mcIdType *iter=strtNdlConnOfCurCell;iter!=endNdlConnOfCurCell;iter++)
         if(*iter>=0)//for polyhedrons
           {
             nbOfEltsInRevNodal++;
             revNodalIndxPtr[(*iter)+1]++;
           }
     }
-  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<int>());
-  int *revNodalPtr=(int *)malloc((nbOfEltsInRevNodal)*sizeof(int));
+  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<mcIdType>());
+  mcIdType *revNodalPtr=(mcIdType *)malloc(nbOfEltsInRevNodal*sizeof(mcIdType));
   revNodal->useArray(revNodalPtr,true,DeallocType::C_DEALLOC,nbOfEltsInRevNodal,1);
   std::fill(revNodalPtr,revNodalPtr+nbOfEltsInRevNodal,-1);
-  for(int eltId=0;eltId<nbOfCells;eltId++)
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++)
     {
-      const int *strtNdlConnOfCurCell=conn+connIndex[eltId]+1;
-      const int *endNdlConnOfCurCell=conn+connIndex[eltId+1];
-      for(const int *iter=strtNdlConnOfCurCell;iter!=endNdlConnOfCurCell;iter++)
+      const mcIdType *strtNdlConnOfCurCell=conn+connIndex[eltId]+1;
+      const mcIdType *endNdlConnOfCurCell=conn+connIndex[eltId+1];
+      for(const mcIdType *iter=strtNdlConnOfCurCell;iter!=endNdlConnOfCurCell;iter++)
         if(*iter>=0)//for polyhedrons
-          *std::find_if(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1],std::bind2nd(std::equal_to<int>(),-1))=eltId;
+          *std::find_if(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1],std::bind2nd(std::equal_to<mcIdType>(),-1))=eltId;
     }
 }
 
@@ -665,7 +665,7 @@ void MEDCouplingUMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataA
  *  \endif
  * \sa buildDescendingConnectivity2()
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivity(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const
 {
   return buildDescendingConnectivityGen<MinusOneSonsGenerator>(desc,descIndx,revDesc,revDescIndx,MEDCouplingFastNbrer);
 }
@@ -677,7 +677,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivity(DataArrayInt *de
  * This method returns 4 arrays and a mesh as MEDCouplingUMesh::buildDescendingConnectivity does.
  * \sa MEDCouplingUMesh::buildDescendingConnectivity
  */
-MEDCouplingUMesh *MEDCouplingUMesh::explode3DMeshTo1D(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const
+MEDCouplingUMesh *MEDCouplingUMesh::explode3DMeshTo1D(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const
 {
   checkFullyDefined();
   if(getMeshDimension()!=3)
@@ -691,7 +691,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::explode3DMeshTo1D(DataArrayInt *desc, DataAr
  * 
  * \sa explode3DMeshTo1D, buildDescendingConnectiviy
  */
-MEDCouplingUMesh *MEDCouplingUMesh::explodeMeshIntoMicroEdges(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const
+MEDCouplingUMesh *MEDCouplingUMesh::explodeMeshIntoMicroEdges(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const
 {
    checkFullyDefined();
    switch(getMeshDimension())
@@ -756,7 +756,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::explodeMeshIntoMicroEdges(DataArrayInt *desc
  *  \endif
  * \sa buildDescendingConnectivity()
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivity2(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivity2(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const
 {
   return buildDescendingConnectivityGen<MinusOneSonsGenerator>(desc,descIndx,revDesc,revDescIndx,MEDCouplingOrientationSensitiveNbrer);
 }
@@ -777,18 +777,18 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivity2(DataArrayInt *d
  * \param [out] neighborsIndx is an array of size this->getNumberOfCells()+1 newly allocated and should be
  * dealt by the caller. This arrays allow to use the first output parameter \b neighbors (\ref numbering-indirect).
  */
-void MEDCouplingUMesh::computeNeighborsOfCells(DataArrayInt *&neighbors, DataArrayInt *&neighborsIndx) const
+void MEDCouplingUMesh::computeNeighborsOfCells(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIndx) const
 {
-  MCAuto<DataArrayInt> desc=DataArrayInt::New();
-  MCAuto<DataArrayInt> descIndx=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDesc=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDescIndx=DataArrayInt::New();
+  MCAuto<DataArrayIdType> desc=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> descIndx=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDesc=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDescIndx=DataArrayIdType::New();
   MCAuto<MEDCouplingUMesh> meshDM1=buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   meshDM1=0;
   ComputeNeighborsOfCellsAdv(desc,descIndx,revDesc,revDescIndx,neighbors,neighborsIndx);
 }
 
-void MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne(const DataArrayInt *nodeNeigh, const DataArrayInt *nodeNeighI, MCAuto<DataArrayInt>& cellNeigh, MCAuto<DataArrayInt>& cellNeighIndex) const
+void MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne(const DataArrayIdType *nodeNeigh, const DataArrayIdType *nodeNeighI, MCAuto<DataArrayIdType>& cellNeigh, MCAuto<DataArrayIdType>& cellNeighIndex) const
 {
   if(!nodeNeigh || !nodeNeighI)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne : null pointer !");
@@ -797,13 +797,13 @@ void MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne(const DataArrayInt *n
   nodeNeigh->checkNbOfComps(1,"MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne : node neigh");
   nodeNeighI->checkNbOfComps(1,"MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne : node neigh index");
   nodeNeighI->checkNbOfTuples(1+getNumberOfNodes(),"MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne : invalid length");
-  int nbCells(getNumberOfCells());
-  const int *c(_nodal_connec->begin()),*ci(_nodal_connec_index->begin()),*ne(nodeNeigh->begin()),*nei(nodeNeighI->begin());
-  cellNeigh=DataArrayInt::New(); cellNeigh->alloc(0,1); cellNeighIndex=DataArrayInt::New(); cellNeighIndex->alloc(1,1); cellNeighIndex->setIJ(0,0,0);
-  for(int i=0;i<nbCells;i++)
+  mcIdType nbCells=getNumberOfCells();
+  const mcIdType *c(_nodal_connec->begin()),*ci(_nodal_connec_index->begin()),*ne(nodeNeigh->begin()),*nei(nodeNeighI->begin());
+  cellNeigh=DataArrayIdType::New(); cellNeigh->alloc(0,1); cellNeighIndex=DataArrayIdType::New(); cellNeighIndex->alloc(1,1); cellNeighIndex->setIJ(0,0,0);
+  for(mcIdType i=0;i<nbCells;i++)
     {
-      std::set<int> s;
-      for(const int *it=c+ci[i]+1;it!=c+ci[i+1];it++)
+      std::set<mcIdType> s;
+      for(const mcIdType *it=c+ci[i]+1;it!=c+ci[i+1];it++)
         if(*it>=0)
           s.insert(ne+nei[*it],ne+nei[*it+1]);
       s.erase(i);
@@ -832,27 +832,27 @@ void MEDCouplingUMesh::computeCellNeighborhoodFromNodesOne(const DataArrayInt *n
  *                        parameter allows to select the right part in this array. The number of tuples is equal to the last values in \b neighborsIndx.
  * \param [out] neighborsIndx is an array of size this->getNumberOfCells()+1 newly allocated and should be dealt by the caller. This arrays allow to use the first output parameter \b neighbors.
  */
-void MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(const DataArrayInt *desc, const DataArrayInt *descIndx, const DataArrayInt *revDesc, const DataArrayInt *revDescIndx,
-                                                  DataArrayInt *&neighbors, DataArrayInt *&neighborsIndx)
+void MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(const DataArrayIdType *desc, const DataArrayIdType *descIndx, const DataArrayIdType *revDesc, const DataArrayIdType *revDescIndx,
+                                                  DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIndx)
 {
   if(!desc || !descIndx || !revDesc || !revDescIndx)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ComputeNeighborsOfCellsAdv some input array is empty !");
-  const int *descPtr=desc->begin();
-  const int *descIPtr=descIndx->begin();
-  const int *revDescPtr=revDesc->begin();
-  const int *revDescIPtr=revDescIndx->begin();
+  const mcIdType *descPtr=desc->begin();
+  const mcIdType *descIPtr=descIndx->begin();
+  const mcIdType *revDescPtr=revDesc->begin();
+  const mcIdType *revDescIPtr=revDescIndx->begin();
   //
-  int nbCells=descIndx->getNumberOfTuples()-1;
-  MCAuto<DataArrayInt> out0=DataArrayInt::New();
-  MCAuto<DataArrayInt> out1=DataArrayInt::New(); out1->alloc(nbCells+1,1);
-  int *out1Ptr=out1->getPointer();
+  mcIdType nbCells=descIndx->getNumberOfTuples()-1;
+  MCAuto<DataArrayIdType> out0=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> out1=DataArrayIdType::New(); out1->alloc(nbCells+1,1);
+  mcIdType *out1Ptr=out1->getPointer();
   *out1Ptr++=0;
   out0->reserve(desc->getNumberOfTuples());
-  for(int i=0;i<nbCells;i++,descIPtr++,out1Ptr++)
+  for(mcIdType i=0;i<nbCells;i++,descIPtr++,out1Ptr++)
     {
-      for(const int *w1=descPtr+descIPtr[0];w1!=descPtr+descIPtr[1];w1++)
+      for(const mcIdType *w1=descPtr+descIPtr[0];w1!=descPtr+descIPtr[1];w1++)
         {
-          std::set<int> s(revDescPtr+revDescIPtr[*w1],revDescPtr+revDescIPtr[(*w1)+1]);
+          std::set<mcIdType> s(revDescPtr+revDescIPtr[*w1],revDescPtr+revDescIPtr[(*w1)+1]);
           s.erase(i);
           out0->insertAtTheEnd(s.begin(),s.end());
         }
@@ -865,11 +865,11 @@ void MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(const DataArrayInt *desc, cons
 /*!
  * Explodes \a this into edges whatever its dimension.
  */
-MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::explodeIntoEdges(MCAuto<DataArrayInt>& desc, MCAuto<DataArrayInt>& descIndex, MCAuto<DataArrayInt>& revDesc, MCAuto<DataArrayInt>& revDescIndx) const
+MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::explodeIntoEdges(MCAuto<DataArrayIdType>& desc, MCAuto<DataArrayIdType>& descIndex, MCAuto<DataArrayIdType>& revDesc, MCAuto<DataArrayIdType>& revDescIndx) const
 {
   checkFullyDefined();
   int mdim(getMeshDimension());
-  desc=DataArrayInt::New(); descIndex=DataArrayInt::New(); revDesc=DataArrayInt::New(); revDescIndx=DataArrayInt::New();
+  desc=DataArrayIdType::New(); descIndex=DataArrayIdType::New(); revDesc=DataArrayIdType::New(); revDescIndx=DataArrayIdType::New();
   MCAuto<MEDCouplingUMesh> mesh1D;
   switch(mdim)
   {
@@ -908,11 +908,11 @@ MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::explodeIntoEdges(MCAuto<DataArrayInt>
  *
  * \sa MEDCouplingUMesh::computeEnlargedNeighborsOfNodes
  */
-void MEDCouplingUMesh::computeNeighborsOfNodes(DataArrayInt *&neighbors, DataArrayInt *&neighborsIdx) const
+void MEDCouplingUMesh::computeNeighborsOfNodes(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx) const
 {
   checkFullyDefined();
-  int mdim(getMeshDimension()),nbNodes(getNumberOfNodes());
-  MCAuto<DataArrayInt> desc(DataArrayInt::New()),descIndx(DataArrayInt::New()),revDesc(DataArrayInt::New()),revDescIndx(DataArrayInt::New());
+  mcIdType mdim(getMeshDimension()),nbNodes(getNumberOfNodes());
+  MCAuto<DataArrayIdType> desc(DataArrayIdType::New()),descIndx(DataArrayIdType::New()),revDesc(DataArrayIdType::New()),revDescIndx(DataArrayIdType::New());
   MCConstAuto<MEDCouplingUMesh> mesh1D;
   switch(mdim)
   {
@@ -936,15 +936,15 @@ void MEDCouplingUMesh::computeNeighborsOfNodes(DataArrayInt *&neighbors, DataArr
         throw INTERP_KERNEL::Exception("MEDCouplingUMesh::computeNeighborsOfNodes : Mesh dimension supported are [3,2,1] !");
       }
   }
-  desc=DataArrayInt::New(); descIndx=DataArrayInt::New(); revDesc=0; revDescIndx=0;
+  desc=DataArrayIdType::New(); descIndx=DataArrayIdType::New(); revDesc=0; revDescIndx=0;
   mesh1D->getReverseNodalConnectivity(desc,descIndx);
-  MCAuto<DataArrayInt> ret0(DataArrayInt::New());
+  MCAuto<DataArrayIdType> ret0(DataArrayIdType::New());
   ret0->alloc(desc->getNumberOfTuples(),1);
-  int *r0Pt(ret0->getPointer());
-  const int *c1DPtr(mesh1D->getNodalConnectivity()->begin()),*rn(desc->begin()),*rni(descIndx->begin());
-  for(int i=0;i<nbNodes;i++,rni++)
+  mcIdType *r0Pt(ret0->getPointer());
+  const mcIdType *c1DPtr(mesh1D->getNodalConnectivity()->begin()),*rn(desc->begin()),*rni(descIndx->begin());
+  for(mcIdType i=0;i<nbNodes;i++,rni++)
     {
-      for(const int *oneDCellIt=rn+rni[0];oneDCellIt!=rn+rni[1];oneDCellIt++)
+      for(const mcIdType *oneDCellIt=rn+rni[0];oneDCellIt!=rn+rni[1];oneDCellIt++)
         *r0Pt++=c1DPtr[3*(*oneDCellIt)+1]==i?c1DPtr[3*(*oneDCellIt)+2]:c1DPtr[3*(*oneDCellIt)+1];
     }
   neighbors=ret0.retn();
@@ -958,38 +958,38 @@ void MEDCouplingUMesh::computeNeighborsOfNodes(DataArrayInt *&neighbors, DataArr
  *
  * \sa MEDCouplingUMesh::computeNeighborsOfNodes
  */
-void MEDCouplingUMesh::computeEnlargedNeighborsOfNodes(MCAuto<DataArrayInt> &neighbors, MCAuto<DataArrayInt>& neighborsIdx) const
+void MEDCouplingUMesh::computeEnlargedNeighborsOfNodes(MCAuto<DataArrayIdType> &neighbors, MCAuto<DataArrayIdType>& neighborsIdx) const
 {
   checkFullyDefined();
-  int nbOfNodes(getNumberOfNodes());
-  const int *conn(_nodal_connec->begin()),*connIndex(_nodal_connec_index->begin());
-  int nbOfCells(getNumberOfCells());
-  std::vector< std::set<int> > st0(nbOfNodes);
-  for(int eltId=0;eltId<nbOfCells;eltId++)
-    {
-      const int *strtNdlConnOfCurCell(conn+connIndex[eltId]+1),*endNdlConnOfCurCell(conn+connIndex[eltId+1]);
-      std::set<int> s(strtNdlConnOfCurCell,endNdlConnOfCurCell); s.erase(-1); //for polyhedrons
-      for(std::set<int>::const_iterator iter2=s.begin();iter2!=s.end();iter2++)
+  mcIdType nbOfNodes(getNumberOfNodes());
+  const mcIdType *conn(_nodal_connec->begin()),*connIndex(_nodal_connec_index->begin());
+  mcIdType nbOfCells=getNumberOfCells();
+  std::vector< std::set<mcIdType> > st0(nbOfNodes);
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++)
+    {
+      const mcIdType *strtNdlConnOfCurCell(conn+connIndex[eltId]+1),*endNdlConnOfCurCell(conn+connIndex[eltId+1]);
+      std::set<mcIdType> s(strtNdlConnOfCurCell,endNdlConnOfCurCell); s.erase(-1); //for polyhedrons
+      for(std::set<mcIdType>::const_iterator iter2=s.begin();iter2!=s.end();iter2++)
         st0[*iter2].insert(s.begin(),s.end());
     }
-  neighborsIdx=DataArrayInt::New(); neighborsIdx->alloc(nbOfNodes+1,1); neighborsIdx->setIJ(0,0,0);
+  neighborsIdx=DataArrayIdType::New(); neighborsIdx->alloc(nbOfNodes+1,1); neighborsIdx->setIJ(0,0,0);
   {
-    int *neighIdx(neighborsIdx->getPointer());
-    for(std::vector< std::set<int> >::const_iterator it=st0.begin();it!=st0.end();it++,neighIdx++)
+    mcIdType *neighIdx(neighborsIdx->getPointer());
+    for(std::vector< std::set<mcIdType> >::const_iterator it=st0.begin();it!=st0.end();it++,neighIdx++)
       {
         if ((*it).empty())
           neighIdx[1]=neighIdx[0];
         else
-          neighIdx[1]=neighIdx[0]+(*it).size()-1;
+          neighIdx[1]=neighIdx[0]+ToIdType((*it).size())-1;
       }
   }
-  neighbors=DataArrayInt::New(); neighbors->alloc(neighborsIdx->back(),1);
+  neighbors=DataArrayIdType::New(); neighbors->alloc(neighborsIdx->back(),1);
   {
-    const int *neighIdx(neighborsIdx->begin());
-    int *neigh(neighbors->getPointer()),nodeId(0);
-    for(std::vector< std::set<int> >::const_iterator it=st0.begin();it!=st0.end();it++,neighIdx++,nodeId++)
+    const mcIdType *neighIdx(neighborsIdx->begin());
+    mcIdType *neigh(neighbors->getPointer()),nodeId(0);
+    for(std::vector< std::set<mcIdType> >::const_iterator it=st0.begin();it!=st0.end();it++,neighIdx++,nodeId++)
       {
-        std::set<int> s(*it); s.erase(nodeId);
+        std::set<mcIdType> s(*it); s.erase(nodeId);
         std::copy(s.begin(),s.end(),neigh+*neighIdx);
       }
   }
@@ -1018,18 +1018,18 @@ void MEDCouplingUMesh::computeEnlargedNeighborsOfNodes(MCAuto<DataArrayInt> &nei
  *  \ref  py_mcumesh_convertToPolyTypes "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::convertToPolyTypes(const int *cellIdsToConvertBg, const int *cellIdsToConvertEnd)
+void MEDCouplingUMesh::convertToPolyTypes(const mcIdType *cellIdsToConvertBg, const mcIdType *cellIdsToConvertEnd)
 {
   checkFullyDefined();
   int dim=getMeshDimension();
   if(dim<2 || dim>3)
     throw INTERP_KERNEL::Exception("Invalid mesh dimension : must be 2 or 3 !");
-  int nbOfCells(getNumberOfCells());
+  mcIdType nbOfCells=getNumberOfCells();
   if(dim==2)
     {
-      const int *connIndex=_nodal_connec_index->begin();
-      int *conn=_nodal_connec->getPointer();
-      for(const int *iter=cellIdsToConvertBg;iter!=cellIdsToConvertEnd;iter++)
+      const mcIdType *connIndex=_nodal_connec_index->begin();
+      mcIdType *conn=_nodal_connec->getPointer();
+      for(const mcIdType *iter=cellIdsToConvertBg;iter!=cellIdsToConvertEnd;iter++)
         {
           if(*iter>=0 && *iter<nbOfCells)
             {
@@ -1049,11 +1049,11 @@ void MEDCouplingUMesh::convertToPolyTypes(const int *cellIdsToConvertBg, const i
     }
   else
     {
-      int *connIndex(_nodal_connec_index->getPointer());
-      const int *connOld(_nodal_connec->getConstPointer());
-      MCAuto<DataArrayInt> connNew(DataArrayInt::New()),connNewI(DataArrayInt::New()); connNew->alloc(0,1); connNewI->alloc(1,1); connNewI->setIJ(0,0,0);
+      mcIdType *connIndex(_nodal_connec_index->getPointer());
+      const mcIdType *connOld(_nodal_connec->getConstPointer());
+      MCAuto<DataArrayIdType> connNew(DataArrayIdType::New()),connNewI(DataArrayIdType::New()); connNew->alloc(0,1); connNewI->alloc(1,1); connNewI->setIJ(0,0,0);
       std::vector<bool> toBeDone(nbOfCells,false);
-      for(const int *iter=cellIdsToConvertBg;iter!=cellIdsToConvertEnd;iter++)
+      for(const mcIdType *iter=cellIdsToConvertBg;iter!=cellIdsToConvertEnd;iter++)
         {
           if(*iter>=0 && *iter<nbOfCells)
             toBeDone[*iter]=true;
@@ -1064,16 +1064,16 @@ void MEDCouplingUMesh::convertToPolyTypes(const int *cellIdsToConvertBg, const i
               throw INTERP_KERNEL::Exception(oss.str());
             }
         }
-      for(int cellId=0;cellId<nbOfCells;cellId++)
+      for(mcIdType cellId=0;cellId<nbOfCells;cellId++)
         {
-          int pos(connIndex[cellId]),posP1(connIndex[cellId+1]);
-          int lgthOld(posP1-pos-1);
+          mcIdType pos(connIndex[cellId]),posP1(connIndex[cellId+1]);
+          mcIdType lgthOld(posP1-pos-1);
           if(toBeDone[cellId])
             {
               const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)connOld[pos]);
               unsigned nbOfFaces(cm.getNumberOfSons2(connOld+pos+1,lgthOld));
-              int *tmp(new int[nbOfFaces*lgthOld+1]);
-              int *work=tmp; *work++=INTERP_KERNEL::NORM_POLYHED;
+              mcIdType *tmp(new mcIdType[nbOfFaces*lgthOld+1]);
+              mcIdType *work=tmp; *work++=INTERP_KERNEL::NORM_POLYHED;
               for(unsigned j=0;j<nbOfFaces;j++)
                 {
                   INTERP_KERNEL::NormalizedCellType type;
@@ -1083,7 +1083,7 @@ void MEDCouplingUMesh::convertToPolyTypes(const int *cellIdsToConvertBg, const i
                 }
               std::size_t newLgth(std::distance(tmp,work)-1);//-1 for last -1
               connNew->pushBackValsSilent(tmp,tmp+newLgth);
-              connNewI->pushBackSilent(connNewI->back()+(int)newLgth);
+              connNewI->pushBackSilent(connNewI->back()+ToIdType(newLgth));
               delete [] tmp;
             }
           else
@@ -1109,11 +1109,11 @@ void MEDCouplingUMesh::convertToPolyTypes(const int *cellIdsToConvertBg, const i
  */
 void MEDCouplingUMesh::convertAllToPoly()
 {
-  int nbOfCells=getNumberOfCells();
-  std::vector<int> cellIds(nbOfCells);
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nbOfCells=getNumberOfCells();
+  std::vector<mcIdType> cellIds(nbOfCells);
+  for(mcIdType i=0;i<nbOfCells;i++)
     cellIds[i]=i;
-  convertToPolyTypes(&cellIds[0],&cellIds[0]+cellIds.size());
+  convertToPolyTypes(&cellIds[0],&cellIds[0]+ToIdType(cellIds.size()));
 }
 
 /*!
@@ -1148,14 +1148,14 @@ void MEDCouplingUMesh::convertExtrudedPolyhedra()
   checkFullyDefined();
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertExtrudedPolyhedra works on umeshes with meshdim equal to 3 and spaceDim equal to 3 too!");
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> newCi=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> newCi=DataArrayIdType::New();
   newCi->alloc(nbOfCells+1,1);
-  int *newci=newCi->getPointer();
-  const int *ci=_nodal_connec_index->getConstPointer();
-  const int *c=_nodal_connec->getConstPointer();
+  mcIdType *newci=newCi->getPointer();
+  const mcIdType *ci=_nodal_connec_index->getConstPointer();
+  const mcIdType *c=_nodal_connec->getConstPointer();
   newci[0]=0;
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)c[ci[i]];
       if(type==INTERP_KERNEL::NORM_POLYHED)
@@ -1171,16 +1171,16 @@ void MEDCouplingUMesh::convertExtrudedPolyhedra()
               std::ostringstream oss; oss << "MEDCouplingUMesh::convertExtrudedPolyhedra : cell # " << i << " is a polhedron with 1 face but there is a mismatch of number of nodes in face should be even !";
               throw INTERP_KERNEL::Exception(oss.str());
             }
-          int n1=(int)(n2/2);
+          mcIdType n1=ToIdType(n2/2);
           newci[i+1]=7*n1+2+newci[i];//6*n1 (nodal length) + n1+2 (number of faces) - 1 (number of '-1' separator is equal to number of faces -1) + 1 (for cell type)
         }
       else
         newci[i+1]=(ci[i+1]-ci[i])+newci[i];
     }
-  MCAuto<DataArrayInt> newC=DataArrayInt::New();
+  MCAuto<DataArrayIdType> newC=DataArrayIdType::New();
   newC->alloc(newci[nbOfCells],1);
-  int *newc=newC->getPointer();
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType *newc=newC->getPointer();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)c[ci[i]];
       if(type==INTERP_KERNEL::NORM_POLYHED)
@@ -1229,38 +1229,38 @@ bool MEDCouplingUMesh::unPolyze()
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::unPolyze works on umeshes with meshdim equals to 0, 1 2 or 3 !");
   if(mdim<=1)
     return false;
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(nbOfCells<1)
     return false;
-  int initMeshLgth=getNodalConnectivityArrayLen();
-  int *conn=_nodal_connec->getPointer();
-  int *index=_nodal_connec_index->getPointer();
-  int posOfCurCell=0;
-  int newPos=0;
-  int lgthOfCurCell;
+  mcIdType initMeshLgth=getNodalConnectivityArrayLen();
+  mcIdType *conn=_nodal_connec->getPointer();
+  mcIdType *index=_nodal_connec_index->getPointer();
+  mcIdType posOfCurCell=0;
+  mcIdType newPos=0;
+  mcIdType lgthOfCurCell;
   bool ret=false;
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       lgthOfCurCell=index[i+1]-posOfCurCell;
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[posOfCurCell];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
       INTERP_KERNEL::NormalizedCellType newType=INTERP_KERNEL::NORM_ERROR;
-      int newLgth;
+      mcIdType newLgth;
       if(cm.isDynamic())
         {
           switch(cm.getDimension())
           {
             case 2:
               {
-                INTERP_KERNEL::AutoPtr<int> tmp=new int[lgthOfCurCell-1];
-                std::copy(conn+posOfCurCell+1,conn+posOfCurCell+lgthOfCurCell,(int *)tmp);
+                INTERP_KERNEL::AutoPtr<mcIdType> tmp=new mcIdType[lgthOfCurCell-1];
+                std::copy(conn+posOfCurCell+1,conn+posOfCurCell+lgthOfCurCell,(mcIdType *)tmp);
                 newType=INTERP_KERNEL::CellSimplify::tryToUnPoly2D(cm.isQuadratic(),tmp,lgthOfCurCell-1,conn+newPos+1,newLgth);
                 break;
               }
             case 3:
               {
-                int nbOfFaces,lgthOfPolyhConn;
-                INTERP_KERNEL::AutoPtr<int> zipFullReprOfPolyh=INTERP_KERNEL::CellSimplify::getFullPolyh3DCell(type,conn+posOfCurCell+1,lgthOfCurCell-1,nbOfFaces,lgthOfPolyhConn);
+                mcIdType nbOfFaces,lgthOfPolyhConn;
+                INTERP_KERNEL::AutoPtr<mcIdType> zipFullReprOfPolyh=INTERP_KERNEL::CellSimplify::getFullPolyh3DCell(type,conn+posOfCurCell+1,lgthOfCurCell-1,nbOfFaces,lgthOfPolyhConn);
                 newType=INTERP_KERNEL::CellSimplify::tryToUnPoly3D(zipFullReprOfPolyh,nbOfFaces,lgthOfPolyhConn,conn+newPos+1,newLgth);
                 break;
               }
@@ -1307,19 +1307,19 @@ void MEDCouplingUMesh::simplifyPolyhedra(double eps)
   MCAuto<DataArrayDouble> coords=getCoords()->deepCopy();
   coords->recenterForMaxPrecision(eps);
   //
-  int nbOfCells=getNumberOfCells();
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *index=_nodal_connec_index->getConstPointer();
-  MCAuto<DataArrayInt> connINew=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *index=_nodal_connec_index->getConstPointer();
+  MCAuto<DataArrayIdType> connINew=DataArrayIdType::New();
   connINew->alloc(nbOfCells+1,1);
-  int *connINewPtr=connINew->getPointer(); *connINewPtr++=0;
-  MCAuto<DataArrayInt> connNew=DataArrayInt::New(); connNew->alloc(0,1);
-  MCAuto<DataArrayInt> E_Fi(DataArrayInt::New()), E_F(DataArrayInt::New()), F_Ei(DataArrayInt::New()), F_E(DataArrayInt::New());
+  mcIdType *connINewPtr=connINew->getPointer(); *connINewPtr++=0;
+  MCAuto<DataArrayIdType> connNew=DataArrayIdType::New(); connNew->alloc(0,1);
+  MCAuto<DataArrayIdType> E_Fi(DataArrayIdType::New()), E_F(DataArrayIdType::New()), F_Ei(DataArrayIdType::New()), F_E(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> m_faces(buildDescendingConnectivity(E_F, E_Fi, F_E, F_Ei));
   bool changed=false;
-  for(int i=0;i<nbOfCells;i++,connINewPtr++)
+  for(mcIdType i=0;i<nbOfCells;i++,connINewPtr++)
     {
-      if(conn[index[i]]==(int)INTERP_KERNEL::NORM_POLYHED)
+      if(conn[index[i]]==ToIdType(INTERP_KERNEL::NORM_POLYHED))
         {
           SimplifyPolyhedronCell(eps,coords, i,connNew, m_faces, E_Fi, E_F, F_Ei, F_E);
           changed=true;
@@ -1335,19 +1335,19 @@ void MEDCouplingUMesh::simplifyPolyhedra(double eps)
 /*!
  * This method returns all node ids used in the connectivity of \b this. The data array returned has to be dealt by the caller.
  * The returned node ids are sorted ascendingly. This method is close to MEDCouplingUMesh::getNodeIdsInUse except
- * the format of the returned DataArrayInt instance.
+ * the format of the returned DataArrayIdType instance.
  *
- * \return a newly allocated DataArrayInt sorted ascendingly of fetched node ids.
+ * \return a newly allocated DataArrayIdType sorted ascendingly of fetched node ids.
  * \sa MEDCouplingUMesh::getNodeIdsInUse, areAllNodesFetched
  */
-DataArrayInt *MEDCouplingUMesh::computeFetchedNodeIds() const
+DataArrayIdType *MEDCouplingUMesh::computeFetchedNodeIds() const
 {
   checkConnectivityFullyDefined();
-  const int *maxEltPt(std::max_element(_nodal_connec->begin(),_nodal_connec->end()));
-  int maxElt(maxEltPt==_nodal_connec->end()?0:std::abs(*maxEltPt)+1);
+  const mcIdType *maxEltPt(std::max_element(_nodal_connec->begin(),_nodal_connec->end()));
+  mcIdType maxElt(maxEltPt==_nodal_connec->end()?0:std::abs(*maxEltPt)+1);
   std::vector<bool> retS(maxElt,false);
   computeNodeIdsAlg(retS);
-  return DataArrayInt::BuildListOfSwitchedOn(retS);
+  return DataArrayIdType::BuildListOfSwitchedOn(retS);
 }
 
 /*!
@@ -1356,10 +1356,11 @@ DataArrayInt *MEDCouplingUMesh::computeFetchedNodeIds() const
  */
 void MEDCouplingUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const
 {
-  int nbOfNodes((int)nodeIdsInUse.size()),nbOfCells(getNumberOfCells());
-  const int *connIndex(_nodal_connec_index->getConstPointer()),*conn(_nodal_connec->getConstPointer());
-  for(int i=0;i<nbOfCells;i++)
-    for(int j=connIndex[i]+1;j<connIndex[i+1];j++)
+  mcIdType nbOfNodes=ToIdType(nodeIdsInUse.size()),
+           nbOfCells=getNumberOfCells();
+  const mcIdType *connIndex(_nodal_connec_index->getConstPointer()),*conn(_nodal_connec->getConstPointer());
+  for(mcIdType i=0;i<nbOfCells;i++)
+    for(mcIdType j=connIndex[i]+1;j<connIndex[i+1];j++)
       if(conn[j]>=0)
         {
           if(conn[j]<nbOfNodes)
@@ -1377,8 +1378,8 @@ void MEDCouplingUMesh::computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const
 struct MEDCouplingAccVisit
 {
   MEDCouplingAccVisit():_new_nb_of_nodes(0) { }
-  int operator()(int val) { if(val!=-1) return _new_nb_of_nodes++; else return -1; }
-  int _new_nb_of_nodes;
+  mcIdType operator()(mcIdType val) { if(val!=-1) return _new_nb_of_nodes++; else return -1; }
+  mcIdType _new_nb_of_nodes;
 };
 
 /// @endcond
@@ -1388,7 +1389,7 @@ struct MEDCouplingAccVisit
  * by excluding the unused nodes, for which the array holds -1. The result array is
  * a mapping in "Old to New" mode.
  *  \param [out] nbrOfNodesInUse - number of node ids present in the nodal connectivity.
- *  \return DataArrayInt * - a new instance of DataArrayInt. Its length is \a
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType. Its length is \a
  *          this->getNumberOfNodes(). It holds for each node of \a this mesh either -1
  *          if the node is unused or a new id else. The caller is to delete this
  *          array using decrRef() as it is no more needed.
@@ -1402,19 +1403,19 @@ struct MEDCouplingAccVisit
  *  \endif
  * \sa computeFetchedNodeIds, computeNodeIdsAlg()
  */
-DataArrayInt *MEDCouplingUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
+DataArrayIdType *MEDCouplingUMesh::getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const
 {
   nbrOfNodesInUse=-1;
-  int nbOfNodes(getNumberOfNodes());
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfNodes(getNumberOfNodes());
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfNodes,1);
-  int *traducer=ret->getPointer();
+  mcIdType *traducer=ret->getPointer();
   std::fill(traducer,traducer+nbOfNodes,-1);
-  int nbOfCells=getNumberOfCells();
-  const int *connIndex=_nodal_connec_index->getConstPointer();
-  const int *conn=_nodal_connec->getConstPointer();
-  for(int i=0;i<nbOfCells;i++)
-    for(int j=connIndex[i]+1;j<connIndex[i+1];j++)
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *connIndex=_nodal_connec_index->getConstPointer();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  for(mcIdType i=0;i<nbOfCells;i++)
+    for(mcIdType j=connIndex[i]+1;j<connIndex[i+1];j++)
       if(conn[j]>=0)
         {
           if(conn[j]<nbOfNodes)
@@ -1425,7 +1426,7 @@ DataArrayInt *MEDCouplingUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
               throw INTERP_KERNEL::Exception(oss.str());
             }
         }
-  nbrOfNodesInUse=(int)std::count(traducer,traducer+nbOfNodes,1);
+  nbrOfNodesInUse=ToIdType(std::count(traducer,traducer+nbOfNodes,1));
   std::transform(traducer,traducer+nbOfNodes,traducer,MEDCouplingAccVisit());
   return ret.retn();
 }
@@ -1439,21 +1440,21 @@ DataArrayInt *MEDCouplingUMesh::getNodeIdsInUse(int& nbrOfNodesInUse) const
  * \return a newly allocated array
  * \sa MEDCouplingUMesh::computeEffectiveNbOfNodesPerCell
  */
-DataArrayInt *MEDCouplingUMesh::computeNbOfNodesPerCell() const
+DataArrayIdType *MEDCouplingUMesh::computeNbOfNodesPerCell() const
 {
   checkConnectivityFullyDefined();
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
-  int *retPtr=ret->getPointer();
-  const int *conn=getNodalConnectivity()->getConstPointer();
-  const int *connI=getNodalConnectivityIndex()->getConstPointer();
-  for(int i=0;i<nbOfCells;i++,retPtr++)
+  mcIdType *retPtr=ret->getPointer();
+  const mcIdType *conn=getNodalConnectivity()->getConstPointer();
+  const mcIdType *connI=getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType i=0;i<nbOfCells;i++,retPtr++)
     {
-      if(conn[connI[i]]!=(int)INTERP_KERNEL::NORM_POLYHED)
+      if(conn[connI[i]]!=ToIdType(INTERP_KERNEL::NORM_POLYHED))
         *retPtr=connI[i+1]-connI[i]-1;
       else
-        *retPtr=connI[i+1]-connI[i]-1-std::count(conn+connI[i]+1,conn+connI[i+1],-1);
+        *retPtr=connI[i+1]-connI[i]-1-ToIdType(std::count(conn+connI[i]+1,conn+connI[i+1],-1));
     }
   return ret.retn();
 }
@@ -1462,27 +1463,27 @@ DataArrayInt *MEDCouplingUMesh::computeNbOfNodesPerCell() const
  * This method computes effective number of nodes per cell. That is to say nodes appearing several times in nodal connectivity of a cell,
  * will be counted only once here whereas it will be counted several times in MEDCouplingUMesh::computeNbOfNodesPerCell method.
  *
- * \return DataArrayInt * - new object to be deallocated by the caller.
+ * \return DataArrayIdType * - new object to be deallocated by the caller.
  * \sa MEDCouplingUMesh::computeNbOfNodesPerCell
  */
-DataArrayInt *MEDCouplingUMesh::computeEffectiveNbOfNodesPerCell() const
+DataArrayIdType *MEDCouplingUMesh::computeEffectiveNbOfNodesPerCell() const
 {
   checkConnectivityFullyDefined();
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
-  int *retPtr=ret->getPointer();
-  const int *conn=getNodalConnectivity()->getConstPointer();
-  const int *connI=getNodalConnectivityIndex()->getConstPointer();
-  for(int i=0;i<nbOfCells;i++,retPtr++)
-    {
-      std::set<int> s(conn+connI[i]+1,conn+connI[i+1]);
-      if(conn[connI[i]]!=(int)INTERP_KERNEL::NORM_POLYHED)
-        *retPtr=(int)s.size();
+  mcIdType *retPtr=ret->getPointer();
+  const mcIdType *conn=getNodalConnectivity()->getConstPointer();
+  const mcIdType *connI=getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType i=0;i<nbOfCells;i++,retPtr++)
+    {
+      std::set<mcIdType> s(conn+connI[i]+1,conn+connI[i+1]);
+      if(conn[connI[i]]!=ToIdType(INTERP_KERNEL::NORM_POLYHED))
+        *retPtr=ToIdType(s.size());
       else
         {
           s.erase(-1);
-          *retPtr=(int)s.size();
+          *retPtr=ToIdType(s.size());
         }
     }
   return ret.retn();
@@ -1494,16 +1495,16 @@ DataArrayInt *MEDCouplingUMesh::computeEffectiveNbOfNodesPerCell() const
  *
  * \return a newly allocated array
  */
-DataArrayInt *MEDCouplingUMesh::computeNbOfFacesPerCell() const
+DataArrayIdType *MEDCouplingUMesh::computeNbOfFacesPerCell() const
 {
   checkConnectivityFullyDefined();
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
-  int *retPtr=ret->getPointer();
-  const int *conn=getNodalConnectivity()->getConstPointer();
-  const int *connI=getNodalConnectivityIndex()->getConstPointer();
-  for(int i=0;i<nbOfCells;i++,retPtr++,connI++)
+  mcIdType *retPtr=ret->getPointer();
+  const mcIdType *conn=getNodalConnectivity()->getConstPointer();
+  const mcIdType *connI=getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType i=0;i<nbOfCells;i++,retPtr++,connI++)
     {
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[*connI]);
       *retPtr=cm.getNumberOfSons2(conn+connI[0]+1,connI[1]-connI[0]-1);
@@ -1515,7 +1516,7 @@ DataArrayInt *MEDCouplingUMesh::computeNbOfFacesPerCell() const
  * Removes unused nodes (the node coordinates array is shorten) and returns an array
  * mapping between new and old node ids in "Old to New" mode. -1 values in the returned
  * array mean that the corresponding old node is no more used.
- *  \return DataArrayInt * - a new instance of DataArrayInt of length \a
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType of length \a
  *           this->getNumberOfNodes() before call of this method. The caller is to
  *           delete this array using decrRef() as it is no more needed.
  *  \throw If the coordinates array is not set.
@@ -1528,7 +1529,7 @@ DataArrayInt *MEDCouplingUMesh::computeNbOfFacesPerCell() const
  *  \ref  py_mcumesh_zipCoordsTraducer "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingUMesh::zipCoordsTraducer()
+DataArrayIdType *MEDCouplingUMesh::zipCoordsTraducer()
 {
   return MEDCouplingPointSet::zipCoordsTraducer();
 }
@@ -1537,7 +1538,7 @@ DataArrayInt *MEDCouplingUMesh::zipCoordsTraducer()
  * This method stands if 'cell1' and 'cell2' are equals regarding 'compType' policy.
  * The semantic of 'compType' is specified in MEDCouplingPointSet::zipConnectivityTraducer method.
  */
-int MEDCouplingUMesh::AreCellsEqual(const int *conn, const int *connI, int cell1, int cell2, int compType)
+int MEDCouplingUMesh::AreCellsEqual(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2, int compType)
 {
   switch(compType)
   {
@@ -1558,7 +1559,7 @@ int MEDCouplingUMesh::AreCellsEqual(const int *conn, const int *connI, int cell1
 /*!
  * This method is the last step of the MEDCouplingPointSet::zipConnectivityTraducer with policy 0.
  */
-int MEDCouplingUMesh::AreCellsEqualPolicy0(const int *conn, const int *connI, int cell1, int cell2)
+int MEDCouplingUMesh::AreCellsEqualPolicy0(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2)
 {
   if(connI[cell1+1]-connI[cell1]==connI[cell2+1]-connI[cell2])
     return std::equal(conn+connI[cell1]+1,conn+connI[cell1+1],conn+connI[cell2]+1)?1:0;
@@ -1568,9 +1569,9 @@ int MEDCouplingUMesh::AreCellsEqualPolicy0(const int *conn, const int *connI, in
 /*!
  * This method is the last step of the MEDCouplingPointSet::zipConnectivityTraducer with policy 1.
  */
-int MEDCouplingUMesh::AreCellsEqualPolicy1(const int *conn, const int *connI, int cell1, int cell2)
+int MEDCouplingUMesh::AreCellsEqualPolicy1(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2)
 {
-  int sz=connI[cell1+1]-connI[cell1];
+  mcIdType sz=connI[cell1+1]-connI[cell1];
   if(sz==connI[cell2+1]-connI[cell2])
     {
       if(conn[connI[cell1]]==conn[connI[cell2]])
@@ -1581,11 +1582,11 @@ int MEDCouplingUMesh::AreCellsEqualPolicy1(const int *conn, const int *connI, in
             {
               if(dim!=1)
                 {
-                  int sz1=2*(sz-1);
-                  INTERP_KERNEL::AutoPtr<int> tmp=new int[sz1];
-                  int *work=std::copy(conn+connI[cell1]+1,conn+connI[cell1+1],(int *)tmp);
+                  mcIdType sz1=2*(sz-1);
+                  INTERP_KERNEL::AutoPtr<mcIdType> tmp=new mcIdType[sz1];
+                  mcIdType *work=std::copy(conn+connI[cell1]+1,conn+connI[cell1+1],(mcIdType *)tmp);
                   std::copy(conn+connI[cell1]+1,conn+connI[cell1+1],work);
-                  work=std::search((int *)tmp,(int *)tmp+sz1,conn+connI[cell2]+1,conn+connI[cell2+1]);
+                  work=std::search((mcIdType *)tmp,(mcIdType *)tmp+sz1,conn+connI[cell2]+1,conn+connI[cell2+1]);
                   return work!=tmp+sz1?1:0;
                 }
               else
@@ -1601,14 +1602,14 @@ int MEDCouplingUMesh::AreCellsEqualPolicy1(const int *conn, const int *connI, in
 /*!
  * This method is the last step of the MEDCouplingPointSet::zipConnectivityTraducer with policy 2.
  */
-int MEDCouplingUMesh::AreCellsEqualPolicy2(const int *conn, const int *connI, int cell1, int cell2)
+int MEDCouplingUMesh::AreCellsEqualPolicy2(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2)
 {
   if(connI[cell1+1]-connI[cell1]==connI[cell2+1]-connI[cell2])
     {
       if(conn[connI[cell1]]==conn[connI[cell2]])
         {
-          std::set<int> s1(conn+connI[cell1]+1,conn+connI[cell1+1]);
-          std::set<int> s2(conn+connI[cell2]+1,conn+connI[cell2+1]);
+          std::set<mcIdType> s1(conn+connI[cell1]+1,conn+connI[cell1+1]);
+          std::set<mcIdType> s2(conn+connI[cell2]+1,conn+connI[cell2+1]);
           return s1==s2?1:0;
         }
     }
@@ -1618,12 +1619,12 @@ int MEDCouplingUMesh::AreCellsEqualPolicy2(const int *conn, const int *connI, in
 /*!
  * This method is less restrictive than AreCellsEqualPolicy2. Here the geometric type is absolutely not taken into account !
  */
-int MEDCouplingUMesh::AreCellsEqualPolicy2NoType(const int *conn, const int *connI, int cell1, int cell2)
+int MEDCouplingUMesh::AreCellsEqualPolicy2NoType(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2)
 {
   if(connI[cell1+1]-connI[cell1]==connI[cell2+1]-connI[cell2])
     {
-      std::set<int> s1(conn+connI[cell1]+1,conn+connI[cell1+1]);
-      std::set<int> s2(conn+connI[cell2]+1,conn+connI[cell2+1]);
+      std::set<mcIdType> s1(conn+connI[cell1]+1,conn+connI[cell1+1]);
+      std::set<mcIdType> s2(conn+connI[cell2]+1,conn+connI[cell2+1]);
       return s1==s2?1:0;
     }
   return 0;
@@ -1632,9 +1633,9 @@ int MEDCouplingUMesh::AreCellsEqualPolicy2NoType(const int *conn, const int *con
 /*!
  * This method is the last step of the MEDCouplingPointSet::zipConnectivityTraducer with policy 7.
  */
-int MEDCouplingUMesh::AreCellsEqualPolicy7(const int *conn, const int *connI, int cell1, int cell2)
+int MEDCouplingUMesh::AreCellsEqualPolicy7(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2)
 {
-  int sz=connI[cell1+1]-connI[cell1];
+  mcIdType sz=connI[cell1+1]-connI[cell1];
   if(sz==connI[cell2+1]-connI[cell2])
     {
       if(conn[connI[cell1]]==conn[connI[cell2]])
@@ -1645,17 +1646,17 @@ int MEDCouplingUMesh::AreCellsEqualPolicy7(const int *conn, const int *connI, in
             {
               if(dim!=1)
                 {
-                  int sz1=2*(sz-1);
-                  INTERP_KERNEL::AutoPtr<int> tmp=new int[sz1];
-                  int *work=std::copy(conn+connI[cell1]+1,conn+connI[cell1+1],(int *)tmp);
+                  mcIdType sz1=2*(sz-1);
+                  INTERP_KERNEL::AutoPtr<mcIdType> tmp=new mcIdType[sz1];
+                  mcIdType *work=std::copy(conn+connI[cell1]+1,conn+connI[cell1+1],(mcIdType *)tmp);
                   std::copy(conn+connI[cell1]+1,conn+connI[cell1+1],work);
-                  work=std::search((int *)tmp,(int *)tmp+sz1,conn+connI[cell2]+1,conn+connI[cell2+1]);
+                  work=std::search((mcIdType *)tmp,(mcIdType *)tmp+sz1,conn+connI[cell2]+1,conn+connI[cell2+1]);
                   if(work!=tmp+sz1)
                     return 1;
                   else
                     {
-                      std::reverse_iterator<int *> it1((int *)tmp+sz1);
-                      std::reverse_iterator<int *> it2((int *)tmp);
+                      std::reverse_iterator<mcIdType *> it1((mcIdType *)tmp+sz1);
+                      std::reverse_iterator<mcIdType *> it2((mcIdType *)tmp);
                       if(std::search(it1,it2,conn+connI[cell2]+1,conn+connI[cell2+1])!=it2)
                         return 2;
                       else
@@ -1670,8 +1671,8 @@ int MEDCouplingUMesh::AreCellsEqualPolicy7(const int *conn, const int *connI, in
                     return 1;
                   if(!cm.isQuadratic())
                     {
-                      std::reverse_iterator<const int *> it1(conn+connI[cell1+1]);
-                      std::reverse_iterator<const int *> it2(conn+connI[cell1]+1);
+                      std::reverse_iterator<const mcIdType *> it1(conn+connI[cell1+1]);
+                      std::reverse_iterator<const mcIdType *> it2(conn+connI[cell1]+1);
                       if(std::equal(it1,it2,conn+connI[cell2]+1))
                         return 2;
                       return 0;
@@ -1709,33 +1710,33 @@ int MEDCouplingUMesh::AreCellsEqualPolicy7(const int *conn, const int *connI, in
  * \return the correspondence array old to new in a newly allocated array.
  *
  */
-void MEDCouplingUMesh::findCommonCells(int compType, int startCellId, DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr) const
+void MEDCouplingUMesh::findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const
 {
-  MCAuto<DataArrayInt> revNodal=DataArrayInt::New(),revNodalI=DataArrayInt::New();
+  MCAuto<DataArrayIdType> revNodal=DataArrayIdType::New(),revNodalI=DataArrayIdType::New();
   getReverseNodalConnectivity(revNodal,revNodalI);
   FindCommonCellsAlg(compType,startCellId,_nodal_connec,_nodal_connec_index,revNodal,revNodalI,commonCellsArr,commonCellsIArr);
 }
 
-void MEDCouplingUMesh::FindCommonCellsAlg(int compType, int startCellId, const DataArrayInt *nodal, const DataArrayInt *nodalI, const DataArrayInt *revNodal, const DataArrayInt *revNodalI,
-                                          DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr)
+void MEDCouplingUMesh::FindCommonCellsAlg(int compType, mcIdType startCellId, const DataArrayIdType *nodal, const DataArrayIdType *nodalI, const DataArrayIdType *revNodal, const DataArrayIdType *revNodalI,
+                                          DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr)
 {
-  MCAuto<DataArrayInt> commonCells=DataArrayInt::New(),commonCellsI=DataArrayInt::New(); commonCells->alloc(0,1);
-  int nbOfCells=nodalI->getNumberOfTuples()-1;
+  MCAuto<DataArrayIdType> commonCells=DataArrayIdType::New(),commonCellsI=DataArrayIdType::New(); commonCells->alloc(0,1);
+  mcIdType nbOfCells=nodalI->getNumberOfTuples()-1;
   commonCellsI->reserve(1); commonCellsI->pushBackSilent(0);
-  const int *revNodalPtr=revNodal->getConstPointer(),*revNodalIPtr=revNodalI->getConstPointer();
-  const int *connPtr=nodal->getConstPointer(),*connIPtr=nodalI->getConstPointer();
+  const mcIdType *revNodalPtr=revNodal->getConstPointer(),*revNodalIPtr=revNodalI->getConstPointer();
+  const mcIdType *connPtr=nodal->getConstPointer(),*connIPtr=nodalI->getConstPointer();
   std::vector<bool> isFetched(nbOfCells,false);
   if(startCellId==0)
     {
-      for(int i=0;i<nbOfCells;i++)
+      for(mcIdType i=0;i<nbOfCells;i++)
         {
           if(!isFetched[i])
             {
-              const int *connOfNode=std::find_if(connPtr+connIPtr[i]+1,connPtr+connIPtr[i+1],std::bind2nd(std::not_equal_to<int>(),-1));
-              std::vector<int> v,v2;
+              const mcIdType *connOfNode=std::find_if(connPtr+connIPtr[i]+1,connPtr+connIPtr[i+1],std::bind2nd(std::not_equal_to<mcIdType>(),-1));
+              std::vector<mcIdType> v,v2;
               if(connOfNode!=connPtr+connIPtr[i+1])
                 {
-                  const int *locRevNodal=std::find(revNodalPtr+revNodalIPtr[*connOfNode],revNodalPtr+revNodalIPtr[*connOfNode+1],i);
+                  const mcIdType *locRevNodal=std::find(revNodalPtr+revNodalIPtr[*connOfNode],revNodalPtr+revNodalIPtr[*connOfNode+1],i);
                   v2.insert(v2.end(),locRevNodal,revNodalPtr+revNodalIPtr[*connOfNode+1]);
                   connOfNode++;
                 }
@@ -1743,17 +1744,17 @@ void MEDCouplingUMesh::FindCommonCellsAlg(int compType, int startCellId, const D
                 if(*connOfNode>=0)
                   {
                     v=v2;
-                    const int *locRevNodal=std::find(revNodalPtr+revNodalIPtr[*connOfNode],revNodalPtr+revNodalIPtr[*connOfNode+1],i);
-                    std::vector<int>::iterator it=std::set_intersection(v.begin(),v.end(),locRevNodal,revNodalPtr+revNodalIPtr[*connOfNode+1],v2.begin());
+                    const mcIdType *locRevNodal=std::find(revNodalPtr+revNodalIPtr[*connOfNode],revNodalPtr+revNodalIPtr[*connOfNode+1],i);
+                    std::vector<mcIdType>::iterator it=std::set_intersection(v.begin(),v.end(),locRevNodal,revNodalPtr+revNodalIPtr[*connOfNode+1],v2.begin());
                     v2.resize(std::distance(v2.begin(),it));
                   }
               if(v2.size()>1)
                 {
                   if(AreCellsEqualInPool(v2,compType,connPtr,connIPtr,commonCells))
                     {
-                      int pos=commonCellsI->back();
+                      mcIdType pos=commonCellsI->back();
                       commonCellsI->pushBackSilent(commonCells->getNumberOfTuples());
-                      for(const int *it=commonCells->begin()+pos;it!=commonCells->end();it++)
+                      for(const mcIdType *it=commonCells->begin()+pos;it!=commonCells->end();it++)
                         isFetched[*it]=true;
                     }
                 }
@@ -1762,12 +1763,12 @@ void MEDCouplingUMesh::FindCommonCellsAlg(int compType, int startCellId, const D
     }
   else
     {
-      for(int i=startCellId;i<nbOfCells;i++)
+      for(mcIdType i=startCellId;i<nbOfCells;i++)
         {
           if(!isFetched[i])
             {
-              const int *connOfNode=std::find_if(connPtr+connIPtr[i]+1,connPtr+connIPtr[i+1],std::bind2nd(std::not_equal_to<int>(),-1));
-              std::vector<int> v,v2;
+              const mcIdType *connOfNode=std::find_if(connPtr+connIPtr[i]+1,connPtr+connIPtr[i+1],std::bind2nd(std::not_equal_to<mcIdType>(),-1));
+              std::vector<mcIdType> v,v2;
               if(connOfNode!=connPtr+connIPtr[i+1])
                 {
                   v2.insert(v2.end(),revNodalPtr+revNodalIPtr[*connOfNode],revNodalPtr+revNodalIPtr[*connOfNode+1]);
@@ -1777,16 +1778,16 @@ void MEDCouplingUMesh::FindCommonCellsAlg(int compType, int startCellId, const D
                 if(*connOfNode>=0)
                   {
                     v=v2;
-                    std::vector<int>::iterator it=std::set_intersection(v.begin(),v.end(),revNodalPtr+revNodalIPtr[*connOfNode],revNodalPtr+revNodalIPtr[*connOfNode+1],v2.begin());
+                    std::vector<mcIdType>::iterator it=std::set_intersection(v.begin(),v.end(),revNodalPtr+revNodalIPtr[*connOfNode],revNodalPtr+revNodalIPtr[*connOfNode+1],v2.begin());
                     v2.resize(std::distance(v2.begin(),it));
                   }
               if(v2.size()>1)
                 {
                   if(AreCellsEqualInPool(v2,compType,connPtr,connIPtr,commonCells))
                     {
-                      int pos=commonCellsI->back();
+                      mcIdType pos=commonCellsI->back();
                       commonCellsI->pushBackSilent(commonCells->getNumberOfTuples());
-                      for(const int *it=commonCells->begin()+pos;it!=commonCells->end();it++)
+                      for(const mcIdType *it=commonCells->begin()+pos;it!=commonCells->end();it++)
                         isFetched[*it]=true;
                     }
                 }
@@ -1807,7 +1808,7 @@ void MEDCouplingUMesh::FindCommonCellsAlg(int compType, int startCellId, const D
  *  \param [in] other - the mesh to compare with.
  *  \param [in] compType - specifies a cell comparison technique. For meaning of its
  *         valid values [0,1,2], see zipConnectivityTraducer().
- *  \param [out] arr - a new instance of DataArrayInt returning correspondence
+ *  \param [out] arr - a new instance of DataArrayIdType returning correspondence
  *         between cells of the two meshes. It contains \a other->getNumberOfCells()
  *         values. The caller is to delete this array using
  *         decrRef() as it is no more needed.
@@ -1821,10 +1822,10 @@ void MEDCouplingUMesh::FindCommonCellsAlg(int compType, int startCellId, const D
  *  \sa checkDeepEquivalOnSameNodesWith()
  *  \sa checkGeoEquivalWith()
  */
-bool MEDCouplingUMesh::areCellsIncludedIn(const MEDCouplingUMesh *other, int compType, DataArrayInt *& arr) const
+bool MEDCouplingUMesh::areCellsIncludedIn(const MEDCouplingUMesh *other, int compType, DataArrayIdType *& arr) const
 {
   MCAuto<MEDCouplingUMesh> mesh=MergeUMeshesOnSameCoords(this,other);
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   static const int possibleCompType[]={0,1,2};
   if(std::find(possibleCompType,possibleCompType+sizeof(possibleCompType)/sizeof(int),compType)==possibleCompType+sizeof(possibleCompType)/sizeof(int))
     {
@@ -1833,10 +1834,10 @@ bool MEDCouplingUMesh::areCellsIncludedIn(const MEDCouplingUMesh *other, int com
       oss << " !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  MCAuto<DataArrayInt> o2n=mesh->zipConnectivityTraducer(compType,nbOfCells);
+  MCAuto<DataArrayIdType> o2n=mesh->zipConnectivityTraducer(compType,nbOfCells);
   arr=o2n->subArray(nbOfCells);
   arr->setName(other->getName());
-  int tmp;
+  mcIdType tmp;
   if(other->getNumberOfCells()==0)
     return true;
   return arr->getMaxValue(tmp)<nbOfCells;
@@ -1852,29 +1853,29 @@ bool MEDCouplingUMesh::areCellsIncludedIn(const MEDCouplingUMesh *other, int com
  * \param arr is an output parameter that returns a \b newly created instance. This array is of size 'other->getNumberOfCells()'.
  * \return If \a other is fully included in 'this 'true is returned. If not false is returned.
  */
-bool MEDCouplingUMesh::areCellsIncludedInPolicy7(const MEDCouplingUMesh *other, DataArrayInt *& arr) const
+bool MEDCouplingUMesh::areCellsIncludedInPolicy7(const MEDCouplingUMesh *other, DataArrayIdType *& arr) const
 {
   MCAuto<MEDCouplingUMesh> mesh=MergeUMeshesOnSameCoords(this,other);
-  DataArrayInt *commonCells=0,*commonCellsI=0;
-  int thisNbCells=getNumberOfCells();
+  DataArrayIdType *commonCells=0,*commonCellsI=0;
+  mcIdType thisNbCells=getNumberOfCells();
   mesh->findCommonCells(7,thisNbCells,commonCells,commonCellsI);
-  MCAuto<DataArrayInt> commonCellsTmp(commonCells),commonCellsITmp(commonCellsI);
-  const int *commonCellsPtr=commonCells->getConstPointer(),*commonCellsIPtr=commonCellsI->getConstPointer();
-  int otherNbCells=other->getNumberOfCells();
-  MCAuto<DataArrayInt> arr2=DataArrayInt::New();
+  MCAuto<DataArrayIdType> commonCellsTmp(commonCells),commonCellsITmp(commonCellsI);
+  const mcIdType *commonCellsPtr=commonCells->getConstPointer(),*commonCellsIPtr=commonCellsI->getConstPointer();
+  mcIdType otherNbCells=other->getNumberOfCells();
+  MCAuto<DataArrayIdType> arr2=DataArrayIdType::New();
   arr2->alloc(otherNbCells,1);
   arr2->fillWithZero();
-  int *arr2Ptr=arr2->getPointer();
-  int nbOfCommon=commonCellsI->getNumberOfTuples()-1;
-  for(int i=0;i<nbOfCommon;i++)
+  mcIdType *arr2Ptr=arr2->getPointer();
+  mcIdType nbOfCommon=commonCellsI->getNumberOfTuples()-1;
+  for(mcIdType i=0;i<nbOfCommon;i++)
     {
-      int start=commonCellsPtr[commonCellsIPtr[i]];
+      mcIdType start=commonCellsPtr[commonCellsIPtr[i]];
       if(start<thisNbCells)
         {
-          for(int j=commonCellsIPtr[i]+1;j!=commonCellsIPtr[i+1];j++)
+          for(mcIdType j=commonCellsIPtr[i]+1;j!=commonCellsIPtr[i+1];j++)
             {
-              int sig=commonCellsPtr[j]>0?1:-1;
-              int val=std::abs(commonCellsPtr[j])-1;
+              mcIdType sig=commonCellsPtr[j]>0?1:-1;
+              mcIdType val=std::abs(commonCellsPtr[j])-1;
               if(val>=thisNbCells)
                 arr2Ptr[val-thisNbCells]=sig*(start+1);
             }
@@ -1914,13 +1915,13 @@ MEDCouplingUMesh *MEDCouplingUMesh::mergeMyselfWithOnSameCoords(const MEDCouplin
  * \warning This method modifies can generate an unstructured mesh whose cells are not sorted by geometric type order.
  * In view of the MED file writing, a renumbering of cells of returned unstructured mesh (using MEDCouplingUMesh::sortCellsInMEDFileFrmt) should be necessary.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfSlice(int start, int end, int step, bool keepCoords) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords) const
 {
   if(getMeshDimension()!=-1)
     return static_cast<MEDCouplingUMesh *>(MEDCouplingPointSet::buildPartOfMySelfSlice(start,end,step,keepCoords));
   else
     {
-      int newNbOfCells=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCouplingUMesh::buildPartOfMySelfSlice for -1 dimension mesh ");
+      mcIdType newNbOfCells=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCouplingUMesh::buildPartOfMySelfSlice for -1 dimension mesh ");
       if(newNbOfCells!=1)
         throw INTERP_KERNEL::Exception("-1D mesh has only one cell !");
       if(start!=0)
@@ -1953,7 +1954,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfSlice(int start, int end, i
  *  \ref  py_mcumesh_buildPartOfMySelf "Here is a Python example".
  *  \endif
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelf(const int *begin, const int *end, bool keepCoords) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelf(const mcIdType *begin, const mcIdType *end, bool keepCoords) const
 {
   if(getMeshDimension()!=-1)
     return static_cast<MEDCouplingUMesh *>(MEDCouplingPointSet::buildPartOfMySelf(begin,end,keepCoords));
@@ -1980,7 +1981,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelf(const int *begin, const in
  * \param [in] otherOnSameCoordsThanThis an another mesh with same meshdimension than \b this with exactly the same number of cells than cell ids list in [\b cellIdsBg, \b cellIdsEnd ).
  *             Coordinate pointer of \b this and those of \b otherOnSameCoordsThanThis must be the same
  */
-void MEDCouplingUMesh::setPartOfMySelf(const int *cellIdsBg, const int *cellIdsEnd, const MEDCouplingUMesh& otherOnSameCoordsThanThis)
+void MEDCouplingUMesh::setPartOfMySelf(const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const MEDCouplingUMesh& otherOnSameCoordsThanThis)
 {
   checkConnectivityFullyDefined();
   otherOnSameCoordsThanThis.checkConnectivityFullyDefined();
@@ -1992,19 +1993,19 @@ void MEDCouplingUMesh::setPartOfMySelf(const int *cellIdsBg, const int *cellIdsE
       oss << ", whereas other mesh dimension is set equal to " << otherOnSameCoordsThanThis.getMeshDimension() << " !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  std::size_t nbOfCellsToModify(std::distance(cellIdsBg,cellIdsEnd));
+  mcIdType nbOfCellsToModify( ToIdType((std::distance(cellIdsBg,cellIdsEnd))));
   if(nbOfCellsToModify!=otherOnSameCoordsThanThis.getNumberOfCells())
     {
       std::ostringstream oss; oss << "MEDCouplingUMesh::setPartOfMySelf : cells ids length (" <<  nbOfCellsToModify << ") do not match the number of cells of other mesh (" << otherOnSameCoordsThanThis.getNumberOfCells() << ") !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  std::size_t nbOfCells(getNumberOfCells());
+  mcIdType nbOfCells(getNumberOfCells());
   bool easyAssign(true);
-  const int *connI(_nodal_connec_index->begin());
-  const int *connIOther=otherOnSameCoordsThanThis._nodal_connec_index->begin();
-  for(const int *it=cellIdsBg;it!=cellIdsEnd && easyAssign;it++,connIOther++)
+  const mcIdType *connI(_nodal_connec_index->begin());
+  const mcIdType *connIOther=otherOnSameCoordsThanThis._nodal_connec_index->begin();
+  for(const mcIdType *it=cellIdsBg;it!=cellIdsEnd && easyAssign;it++,connIOther++)
     {
-      if(*it>=0 && *it<(int)nbOfCells)
+      if(*it>=0 && *it<nbOfCells)
         {
           easyAssign=(connIOther[1]-connIOther[0])==(connI[*it+1]-connI[*it]);
         }
@@ -2016,20 +2017,20 @@ void MEDCouplingUMesh::setPartOfMySelf(const int *cellIdsBg, const int *cellIdsE
     }
   if(easyAssign)
     {
-      DataArrayInt::SetPartOfIndexedArraysSameIdx(cellIdsBg,cellIdsEnd,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index);
+      DataArrayIdType::SetPartOfIndexedArraysSameIdx(cellIdsBg,cellIdsEnd,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index);
       computeTypes();
     }
   else
     {
-      DataArrayInt *arrOut=0,*arrIOut=0;
-      DataArrayInt::SetPartOfIndexedArrays(cellIdsBg,cellIdsEnd,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index,
+      DataArrayIdType *arrOut=0,*arrIOut=0;
+      DataArrayIdType::SetPartOfIndexedArrays(cellIdsBg,cellIdsEnd,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index,
                                                arrOut,arrIOut);
-      MCAuto<DataArrayInt> arrOutAuto(arrOut),arrIOutAuto(arrIOut);
+      MCAuto<DataArrayIdType> arrOutAuto(arrOut),arrIOutAuto(arrIOut);
       setConnectivity(arrOut,arrIOut,true);
     }
 }
 
-void MEDCouplingUMesh::setPartOfMySelfSlice(int start, int end, int step, const MEDCouplingUMesh& otherOnSameCoordsThanThis)
+void MEDCouplingUMesh::setPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, const MEDCouplingUMesh& otherOnSameCoordsThanThis)
 {
   checkConnectivityFullyDefined();
   otherOnSameCoordsThanThis.checkConnectivityFullyDefined();
@@ -2041,18 +2042,18 @@ void MEDCouplingUMesh::setPartOfMySelfSlice(int start, int end, int step, const
       oss << ", whereas other mesh dimension is set equal to " << otherOnSameCoordsThanThis.getMeshDimension() << " !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  int nbOfCellsToModify=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCouplingUMesh::setPartOfMySelfSlice : ");
-  if(nbOfCellsToModify!=(int)otherOnSameCoordsThanThis.getNumberOfCells())
+  mcIdType nbOfCellsToModify=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCouplingUMesh::setPartOfMySelfSlice : ");
+  if(nbOfCellsToModify!=otherOnSameCoordsThanThis.getNumberOfCells())
     {
       std::ostringstream oss; oss << "MEDCouplingUMesh::setPartOfMySelfSlice : cells ids length (" <<  nbOfCellsToModify << ") do not match the number of cells of other mesh (" << otherOnSameCoordsThanThis.getNumberOfCells() << ") !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   bool easyAssign=true;
-  const int *connI=_nodal_connec_index->getConstPointer();
-  const int *connIOther=otherOnSameCoordsThanThis._nodal_connec_index->getConstPointer();
-  int it=start;
-  for(int i=0;i<nbOfCellsToModify && easyAssign;i++,it+=step,connIOther++)
+  const mcIdType *connI=_nodal_connec_index->getConstPointer();
+  const mcIdType *connIOther=otherOnSameCoordsThanThis._nodal_connec_index->getConstPointer();
+  mcIdType it=start;
+  for(mcIdType i=0;i<nbOfCellsToModify && easyAssign;i++,it+=step,connIOther++)
     {
       if(it>=0 && it<nbOfCells)
         {
@@ -2066,15 +2067,15 @@ void MEDCouplingUMesh::setPartOfMySelfSlice(int start, int end, int step, const
     }
   if(easyAssign)
     {
-      DataArrayInt::SetPartOfIndexedArraysSameIdxSlice(start,end,step,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index);
+      DataArrayIdType::SetPartOfIndexedArraysSameIdxSlice(start,end,step,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index);
       computeTypes();
     }
   else
     {
-      DataArrayInt *arrOut=0,*arrIOut=0;
-      DataArrayInt::SetPartOfIndexedArraysSlice(start,end,step,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index,
+      DataArrayIdType *arrOut=0,*arrIOut=0;
+      DataArrayIdType::SetPartOfIndexedArraysSlice(start,end,step,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index,
                                                 arrOut,arrIOut);
-      MCAuto<DataArrayInt> arrOutAuto(arrOut),arrIOutAuto(arrIOut);
+      MCAuto<DataArrayIdType> arrOutAuto(arrOut),arrIOutAuto(arrIOut);
       setConnectivity(arrOut,arrIOut,true);
     }
 }
@@ -2104,10 +2105,10 @@ void MEDCouplingUMesh::setPartOfMySelfSlice(int start, int end, int step, const
  *  \ref  py_mcumesh_buildFacePartOfMySelfNode "Here is a Python example".
  *  \endif
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildFacePartOfMySelfNode(const int *begin, const int *end, bool fullyIn) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildFacePartOfMySelfNode(const mcIdType *begin, const mcIdType *end, bool fullyIn) const
 {
-  MCAuto<DataArrayInt> desc,descIndx,revDesc,revDescIndx;
-  desc=DataArrayInt::New(); descIndx=DataArrayInt::New(); revDesc=DataArrayInt::New(); revDescIndx=DataArrayInt::New();
+  MCAuto<DataArrayIdType> desc,descIndx,revDesc,revDescIndx;
+  desc=DataArrayIdType::New(); descIndx=DataArrayIdType::New(); revDesc=DataArrayIdType::New(); revDescIndx=DataArrayIdType::New();
   MCAuto<MEDCouplingUMesh> subMesh=buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   desc=0; descIndx=0; revDesc=0; revDescIndx=0;
   return static_cast<MEDCouplingUMesh*>(subMesh->buildPartOfMySelfNode(begin,end,fullyIn));
@@ -2131,19 +2132,19 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildFacePartOfMySelfNode(const int *begin,
  */
 MEDCouplingUMesh *MEDCouplingUMesh::buildBoundaryMesh(bool keepCoords) const
 {
-  DataArrayInt *desc=DataArrayInt::New();
-  DataArrayInt *descIndx=DataArrayInt::New();
-  DataArrayInt *revDesc=DataArrayInt::New();
-  DataArrayInt *revDescIndx=DataArrayInt::New();
+  DataArrayIdType *desc=DataArrayIdType::New();
+  DataArrayIdType *descIndx=DataArrayIdType::New();
+  DataArrayIdType *revDesc=DataArrayIdType::New();
+  DataArrayIdType *revDescIndx=DataArrayIdType::New();
   //
   MCAuto<MEDCouplingUMesh> meshDM1=buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   revDesc->decrRef();
   desc->decrRef();
   descIndx->decrRef();
-  int nbOfCells=meshDM1->getNumberOfCells();
-  const int *revDescIndxC=revDescIndx->getConstPointer();
-  std::vector<int> boundaryCells;
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nbOfCells=meshDM1->getNumberOfCells();
+  const mcIdType *revDescIndxC=revDescIndx->getConstPointer();
+  std::vector<mcIdType> boundaryCells;
+  for(mcIdType i=0;i<nbOfCells;i++)
     if(revDescIndxC[i+1]-revDescIndxC[i]==1)
       boundaryCells.push_back(i);
   revDescIndx->decrRef();
@@ -2152,35 +2153,35 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildBoundaryMesh(bool keepCoords) const
 }
 
 /*!
- * This method returns a newly created DataArrayInt instance containing ids of cells located in boundary.
+ * This method returns a newly created DataArrayIdType instance containing ids of cells located in boundary.
  * A cell is detected to be on boundary if it contains one or more than one face having only one father.
  * This method makes the assumption that \a this is fully defined (coords,connectivity). If not an exception will be thrown.
  */
-DataArrayInt *MEDCouplingUMesh::findCellIdsOnBoundary() const
+DataArrayIdType *MEDCouplingUMesh::findCellIdsOnBoundary() const
 {
   checkFullyDefined();
-  MCAuto<DataArrayInt> desc=DataArrayInt::New();
-  MCAuto<DataArrayInt> descIndx=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDesc=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDescIndx=DataArrayInt::New();
+  MCAuto<DataArrayIdType> desc=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> descIndx=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDesc=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDescIndx=DataArrayIdType::New();
   //
   buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx)->decrRef();
-  desc=(DataArrayInt*)0; descIndx=(DataArrayInt*)0;
+  desc=(DataArrayIdType*)0; descIndx=(DataArrayIdType*)0;
   //
-  MCAuto<DataArrayInt> tmp=revDescIndx->deltaShiftIndex();
-  MCAuto<DataArrayInt> faceIds=tmp->findIdsEqual(1); tmp=(DataArrayInt*)0;
-  const int *revDescPtr=revDesc->getConstPointer();
-  const int *revDescIndxPtr=revDescIndx->getConstPointer();
-  int nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> tmp=revDescIndx->deltaShiftIndex();
+  MCAuto<DataArrayIdType> faceIds=tmp->findIdsEqual(1); tmp=(DataArrayIdType*)0;
+  const mcIdType *revDescPtr=revDesc->getConstPointer();
+  const mcIdType *revDescIndxPtr=revDescIndx->getConstPointer();
+  mcIdType nbOfCells=getNumberOfCells();
   std::vector<bool> ret1(nbOfCells,false);
-  int sz=0;
-  for(const int *pt=faceIds->begin();pt!=faceIds->end();pt++)
+  mcIdType sz=0;
+  for(const mcIdType *pt=faceIds->begin();pt!=faceIds->end();pt++)
     if(!ret1[revDescPtr[revDescIndxPtr[*pt]]])
       { ret1[revDescPtr[revDescIndxPtr[*pt]]]=true; sz++; }
   //
-  DataArrayInt *ret2=DataArrayInt::New();
+  DataArrayIdType *ret2=DataArrayIdType::New();
   ret2->alloc(sz,1);
-  int *ret2Ptr=ret2->getPointer();
+  mcIdType *ret2Ptr=ret2->getPointer();
   sz=0;
   for(std::vector<bool>::const_iterator it=ret1.begin();it!=ret1.end();it++,sz++)
     if(*it)
@@ -2207,7 +2208,7 @@ DataArrayInt *MEDCouplingUMesh::findCellIdsOnBoundary() const
  * \param [out] cellIdsRk1 a newly allocated array containing the cell ids of s1 \b indexed into the \b cellIdsRk0 subset. To get the absolute ids of s1, simply invoke
  *              cellIdsRk1->transformWithIndArr(cellIdsRk0->begin(),cellIdsRk0->end());
  */
-void MEDCouplingUMesh::findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayInt *&cellIdsRk0, DataArrayInt *&cellIdsRk1) const
+void MEDCouplingUMesh::findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *&cellIdsRk0, DataArrayIdType *&cellIdsRk1) const
 {
   if(getCoords()!=otherDimM1OnSameCoords.getCoords())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::findCellIdsLyingOn : coordinates pointer are not the same ! Use tryToShareSameCoords method !");
@@ -2215,21 +2216,21 @@ void MEDCouplingUMesh::findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSa
   otherDimM1OnSameCoords.checkConnectivityFullyDefined();
   if(getMeshDimension()-1!=otherDimM1OnSameCoords.getMeshDimension())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::findCellIdsLyingOn : invalid mesh dimension of input mesh regarding meshdimesion of this !");
-  MCAuto<DataArrayInt> fetchedNodeIds1=otherDimM1OnSameCoords.computeFetchedNodeIds();
-  MCAuto<DataArrayInt> s0arr=getCellIdsLyingOnNodes(fetchedNodeIds1->begin(),fetchedNodeIds1->end(),false);
+  MCAuto<DataArrayIdType> fetchedNodeIds1=otherDimM1OnSameCoords.computeFetchedNodeIds();
+  MCAuto<DataArrayIdType> s0arr=getCellIdsLyingOnNodes(fetchedNodeIds1->begin(),fetchedNodeIds1->end(),false);
   MCAuto<MEDCouplingUMesh> thisPart=static_cast<MEDCouplingUMesh *>(buildPartOfMySelf(s0arr->begin(),s0arr->end(),true));
-  MCAuto<DataArrayInt> descThisPart=DataArrayInt::New(),descIThisPart=DataArrayInt::New(),revDescThisPart=DataArrayInt::New(),revDescIThisPart=DataArrayInt::New();
+  MCAuto<DataArrayIdType> descThisPart=DataArrayIdType::New(),descIThisPart=DataArrayIdType::New(),revDescThisPart=DataArrayIdType::New(),revDescIThisPart=DataArrayIdType::New();
   MCAuto<MEDCouplingUMesh> thisPartConsti=thisPart->buildDescendingConnectivity(descThisPart,descIThisPart,revDescThisPart,revDescIThisPart);
-  const int *revDescThisPartPtr=revDescThisPart->getConstPointer(),*revDescIThisPartPtr=revDescIThisPart->getConstPointer();
-  DataArrayInt *idsOtherInConsti=0;
+  const mcIdType *revDescThisPartPtr=revDescThisPart->getConstPointer(),*revDescIThisPartPtr=revDescIThisPart->getConstPointer();
+  DataArrayIdType *idsOtherInConsti=0;
   bool b=thisPartConsti->areCellsIncludedIn(&otherDimM1OnSameCoords,2,idsOtherInConsti);
-  MCAuto<DataArrayInt> idsOtherInConstiAuto(idsOtherInConsti);
+  MCAuto<DataArrayIdType> idsOtherInConstiAuto(idsOtherInConsti);
   if(!b)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::findCellIdsLyingOn : the given mdim-1 mesh in other is not a constituent of this !");
-  std::set<int> s1;
-  for(const int *idOther=idsOtherInConsti->begin();idOther!=idsOtherInConsti->end();idOther++)
+  std::set<mcIdType> s1;
+  for(const mcIdType *idOther=idsOtherInConsti->begin();idOther!=idsOtherInConsti->end();idOther++)
     s1.insert(revDescThisPartPtr+revDescIThisPartPtr[*idOther],revDescThisPartPtr+revDescIThisPartPtr[*idOther+1]);
-  MCAuto<DataArrayInt> s1arr_renum1=DataArrayInt::New(); s1arr_renum1->alloc((int)s1.size(),1); std::copy(s1.begin(),s1.end(),s1arr_renum1->getPointer());
+  MCAuto<DataArrayIdType> s1arr_renum1=DataArrayIdType::New(); s1arr_renum1->alloc(s1.size(),1); std::copy(s1.begin(),s1.end(),s1arr_renum1->getPointer());
   s1arr_renum1->sort();
   cellIdsRk0=s0arr.retn();
   //cellIdsRk1=s_renum1.retn();
@@ -2244,21 +2245,21 @@ void MEDCouplingUMesh::findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSa
  */
 MEDCouplingUMesh *MEDCouplingUMesh::computeSkin() const
 {
-  MCAuto<DataArrayInt> desc=DataArrayInt::New();
-  MCAuto<DataArrayInt> descIndx=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDesc=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDescIndx=DataArrayInt::New();
+  MCAuto<DataArrayIdType> desc=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> descIndx=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDesc=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDescIndx=DataArrayIdType::New();
   //
   MCAuto<MEDCouplingUMesh> meshDM1=buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   revDesc=0; desc=0; descIndx=0;
-  MCAuto<DataArrayInt> revDescIndx2=revDescIndx->deltaShiftIndex();
-  MCAuto<DataArrayInt> part=revDescIndx2->findIdsEqual(1);
+  MCAuto<DataArrayIdType> revDescIndx2=revDescIndx->deltaShiftIndex();
+  MCAuto<DataArrayIdType> part=revDescIndx2->findIdsEqual(1);
   return static_cast<MEDCouplingUMesh *>(meshDM1->buildPartOfMySelf(part->begin(),part->end(),true));
 }
 
 /*!
  * Finds nodes lying on the boundary of \a this mesh.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of found
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of found
  *          nodes. The caller is to delete this array using decrRef() as it is no
  *          more needed.
  *  \throw If the coordinates array is not set.
@@ -2269,7 +2270,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::computeSkin() const
  *  \ref  py_mcumesh_findBoundaryNodes "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingUMesh::findBoundaryNodes() const
+DataArrayIdType *MEDCouplingUMesh::findBoundaryNodes() const
 {
   MCAuto<MEDCouplingUMesh> skin=computeSkin();
   return skin->computeFetchedNodeIds();
@@ -2292,14 +2293,14 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildUnstructured() const
  *             parameter is altered during the call.
  * \param [out] nodeIdsToDuplicate node ids needed to be duplicated following the algorithm explain above.
  * \param [out] cellIdsNeededToBeRenum cell ids in \b this in which the renumber of nodes should be performed.
- * \param [out] cellIdsNotModified cell ids int \b this that lies on \b otherDimM1OnSameCoords mesh whose connectivity do \b not need to be modified as it is the case for \b cellIdsNeededToBeRenum.
+ * \param [out] cellIdsNotModified cell ids mcIdType \b this that lies on \b otherDimM1OnSameCoords mesh whose connectivity do \b not need to be modified as it is the case for \b cellIdsNeededToBeRenum.
  *
  * \warning This method modifies param \b otherDimM1OnSameCoords (for speed reasons).
  */
-void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayInt *& nodeIdsToDuplicate,
-                                            DataArrayInt *& cellIdsNeededToBeRenum, DataArrayInt *& cellIdsNotModified) const
+void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *& nodeIdsToDuplicate,
+                                            DataArrayIdType *& cellIdsNeededToBeRenum, DataArrayIdType *& cellIdsNotModified) const
 {
-  typedef MCAuto<DataArrayInt> DAInt;
+  typedef MCAuto<DataArrayIdType> DAInt;
   typedef MCAuto<MEDCouplingUMesh> MCUMesh;
 
   checkFullyDefined();
@@ -2310,7 +2311,7 @@ void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1On
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::findNodesToDuplicate : the mesh given in other parameter must have this->getMeshDimension()-1 !");
 
   // Checking star-shaped M1 group:
-  DAInt dt0=DataArrayInt::New(),dit0=DataArrayInt::New(),rdt0=DataArrayInt::New(),rdit0=DataArrayInt::New();
+  DAInt dt0=DataArrayIdType::New(),dit0=DataArrayIdType::New(),rdt0=DataArrayIdType::New(),rdit0=DataArrayIdType::New();
   MCUMesh meshM2 = otherDimM1OnSameCoords.buildDescendingConnectivity(dt0, dit0, rdt0, rdit0);
   DAInt dsi = rdit0->deltaShiftIndex();
   DAInt idsTmp0 = dsi->findIdsNotInRange(-1, 3);
@@ -2323,7 +2324,7 @@ void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1On
   MCUMesh meshM2Part = static_cast<MEDCouplingUMesh *>(meshM2->buildPartOfMySelf(xtremIdsM2->begin(), xtremIdsM2->end(),true));
   DAInt xtrem = meshM2Part->computeFetchedNodeIds();
   // Remove from the list points on the boundary of the M0 mesh (those need duplication!)
-  dt0=DataArrayInt::New(),dit0=DataArrayInt::New(),rdt0=DataArrayInt::New(),rdit0=DataArrayInt::New();
+  dt0=DataArrayIdType::New(),dit0=DataArrayIdType::New(),rdt0=DataArrayIdType::New(),rdit0=DataArrayIdType::New();
   MCUMesh m0desc = buildDescendingConnectivity(dt0, dit0, rdt0, rdit0); dt0=0; dit0=0; rdt0=0;
   dsi = rdit0->deltaShiftIndex();
   DAInt boundSegs = dsi->findIdsEqual(1);   // boundary segs/faces of the M0 mesh
@@ -2333,10 +2334,10 @@ void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1On
   DAInt notDup = 0;
   if (getMeshDimension() == 3)
     {
-      DAInt dnu1=DataArrayInt::New(), dnu2=DataArrayInt::New(), dnu3=DataArrayInt::New(), dnu4=DataArrayInt::New();
+      DAInt dnu1=DataArrayIdType::New(), dnu2=DataArrayIdType::New(), dnu3=DataArrayIdType::New(), dnu4=DataArrayIdType::New();
       MCUMesh m0descSkinDesc = m0descSkin->buildDescendingConnectivity(dnu1, dnu2, dnu3, dnu4);
       dnu1=0;dnu2=0;dnu3=0;dnu4=0;
-      DataArrayInt * corresp=0;
+      DataArrayIdType * corresp=0;
       meshM2->areCellsIncludedIn(m0descSkinDesc,2,corresp);
       DAInt validIds = corresp->findIdsInRange(0, meshM2->getNumberOfCells());
       corresp->decrRef();
@@ -2360,23 +2361,23 @@ void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1On
 
   //
   MCUMesh m0Part2=static_cast<MEDCouplingUMesh *>(buildPartOfMySelf(cellsAroundGroup->begin(),cellsAroundGroup->end(),true));
-  int nCells2 = m0Part2->getNumberOfCells();
-  DAInt desc00=DataArrayInt::New(),descI00=DataArrayInt::New(),revDesc00=DataArrayInt::New(),revDescI00=DataArrayInt::New();
+  mcIdType nCells2 = m0Part2->getNumberOfCells();
+  DAInt desc00=DataArrayIdType::New(),descI00=DataArrayIdType::New(),revDesc00=DataArrayIdType::New(),revDescI00=DataArrayIdType::New();
   MCUMesh m01=m0Part2->buildDescendingConnectivity(desc00,descI00,revDesc00,revDescI00);
 
   // Neighbor information of the mesh without considering the crack (serves to count how many connex pieces it is made of)
-  DataArrayInt *tmp00=0,*tmp11=0;
+  DataArrayIdType *tmp00=0,*tmp11=0;
   MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(desc00,descI00,revDesc00,revDescI00, tmp00, tmp11);
   DAInt neighInit00(tmp00);
   DAInt neighIInit00(tmp11);
   // Neighbor information of the mesh WITH the crack (some neighbors are removed):
-  DataArrayInt *idsTmp=0;
+  DataArrayIdType *idsTmp=0;
   m01->areCellsIncludedIn(&otherDimM1OnSameCoords,2,idsTmp);
   DAInt ids(idsTmp);
   // In the neighbor information remove the connection between high dimension cells and its low level constituents which are part
   // of the frontier given in parameter (i.e. the cells of low dimension from the group delimiting the crack):
-  DataArrayInt::RemoveIdsFromIndexedArrays(ids->begin(),ids->end(),desc00,descI00);
-  DataArrayInt *tmp0=0,*tmp1=0;
+  DataArrayIdType::RemoveIdsFromIndexedArrays(ids->begin(),ids->end(),desc00,descI00);
+  DataArrayIdType *tmp0=0,*tmp1=0;
   // Compute the neighbor of each cell in m0Part2, taking into account the broken link above. Two
   // cells on either side of the crack (defined by the mesh of low dimension) are not neighbor anymore.
   ComputeNeighborsOfCellsAdv(desc00,descI00,revDesc00,revDescI00,tmp0,tmp1);
@@ -2384,11 +2385,11 @@ void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1On
   DAInt neighI00(tmp1);
 
   // For each initial connex part of the sub-mesh (or said differently for each independent crack):
-  int seed = 0, nIter = 0;
-  int nIterMax = nCells2+1; // Safety net for the loop
-  DAInt hitCells = DataArrayInt::New(); hitCells->alloc(nCells2);
+  mcIdType seed = 0, nIter = 0;
+  mcIdType nIterMax = nCells2+1; // Safety net for the loop
+  DAInt hitCells = DataArrayIdType::New(); hitCells->alloc(nCells2);
   hitCells->fillWithValue(-1);
-  DAInt cellsToModifyConn0_torenum = DataArrayInt::New();
+  DAInt cellsToModifyConn0_torenum = DataArrayIdType::New();
   cellsToModifyConn0_torenum->alloc(0,1);
   while (nIter < nIterMax)
     {
@@ -2396,14 +2397,14 @@ void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1On
       if (!t->getNumberOfTuples())
         break;
       // Connex zone without the crack (to compute the next seed really)
-      int dnu;
+      mcIdType dnu;
       DAInt connexCheck = MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(&seed, &seed+1, neighInit00,neighIInit00, -1, dnu);
-      std::size_t cnt(0);
-      for (int * ptr = connexCheck->getPointer(); cnt < connexCheck->getNumberOfTuples(); ptr++, cnt++)
+      mcIdType cnt(0);
+      for (mcIdType * ptr = connexCheck->getPointer(); cnt < connexCheck->getNumberOfTuples(); ptr++, cnt++)
         hitCells->setIJ(*ptr,0,1);
       // Connex zone WITH the crack (to identify cells lying on either part of the crack)
       DAInt spreadZone = MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(&seed, &seed+1, neigh00,neighI00, -1, dnu);
-      cellsToModifyConn0_torenum = DataArrayInt::Aggregate(cellsToModifyConn0_torenum, spreadZone, 0);
+      cellsToModifyConn0_torenum = DataArrayIdType::Aggregate(cellsToModifyConn0_torenum, spreadZone, 0);
       // Compute next seed, i.e. a cell in another connex part, which was not covered by the previous iterations
       DAInt comple = cellsToModifyConn0_torenum->buildComplement(nCells2);
       DAInt nonHitCells = hitCells->findIdsEqual(-1);
@@ -2439,9 +2440,9 @@ void MEDCouplingUMesh::findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1On
  * \param [in] nodeIdsToDuplicateBg begin of node ids (included) to be duplicated in connectivity only
  * \param [in] nodeIdsToDuplicateEnd end of node ids (excluded) to be duplicated in connectivity only
  */
-void MEDCouplingUMesh::duplicateNodes(const int *nodeIdsToDuplicateBg, const int *nodeIdsToDuplicateEnd)
+void MEDCouplingUMesh::duplicateNodes(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd)
 {
-  int nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfNodes=getNumberOfNodes();
   duplicateNodesInCoords(nodeIdsToDuplicateBg,nodeIdsToDuplicateEnd);
   duplicateNodesInConn(nodeIdsToDuplicateBg,nodeIdsToDuplicateEnd,nbOfNodes);
 }
@@ -2454,16 +2455,16 @@ void MEDCouplingUMesh::duplicateNodes(const int *nodeIdsToDuplicateBg, const int
  *
  * \sa renumberNodesInConn
  */
-void MEDCouplingUMesh::renumberNodesWithOffsetInConn(int offset)
+void MEDCouplingUMesh::renumberNodesWithOffsetInConn(mcIdType offset)
 {
   checkConnectivityFullyDefined();
-  int *conn(getNodalConnectivity()->getPointer());
-  const int *connIndex(getNodalConnectivityIndex()->getConstPointer());
-  int nbOfCells(getNumberOfCells());
-  for(int i=0;i<nbOfCells;i++)
-    for(int iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
+  mcIdType *conn(getNodalConnectivity()->getPointer());
+  const mcIdType *connIndex(getNodalConnectivityIndex()->getConstPointer());
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells;i++)
+    for(mcIdType iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
       {
-        int& node=conn[iconn];
+        mcIdType& node=conn[iconn];
         if(node>=0)//avoid polyhedron separator
           {
             node+=offset;
@@ -2474,23 +2475,23 @@ void MEDCouplingUMesh::renumberNodesWithOffsetInConn(int offset)
 }
 
 /*!
- *  Same than renumberNodesInConn(const int *) except that here the format of old-to-new traducer is using map instead
+ *  Same than renumberNodesInConn(const mcIdType *) except that here the format of old-to-new traducer is using map instead
  *  of array. This method is dedicated for renumbering from a big set of nodes the a tiny set of nodes which is the case during extraction
  *  of a big mesh.
  */
-void MEDCouplingUMesh::renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N)
+void MEDCouplingUMesh::renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N)
 {
-  this->renumberNodesInConnT< INTERP_KERNEL::HashMap<int,int> >(newNodeNumbersO2N);
+  this->renumberNodesInConnT< INTERP_KERNEL::HashMap<mcIdType,mcIdType> >(newNodeNumbersO2N);
 }
 
 /*!
- *  Same than renumberNodesInConn(const int *) except that here the format of old-to-new traducer is using map instead
+ *  Same than renumberNodesInConn(const mcIdType *) except that here the format of old-to-new traducer is using map instead
  *  of array. This method is dedicated for renumbering from a big set of nodes the a tiny set of nodes which is the case during extraction
  *  of a big mesh.
  */
-void MEDCouplingUMesh::renumberNodesInConn(const std::map<int,int>& newNodeNumbersO2N)
+void MEDCouplingUMesh::renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N)
 {
-  this->renumberNodesInConnT< std::map<int,int> >(newNodeNumbersO2N);
+  this->renumberNodesInConnT< std::map<mcIdType,mcIdType> >(newNodeNumbersO2N);
 }
 
 /*!
@@ -2508,16 +2509,16 @@ void MEDCouplingUMesh::renumberNodesInConn(const std::map<int,int>& newNodeNumbe
  *  \ref  py_mcumesh_renumberNodesInConn "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::renumberNodesInConn(const int *newNodeNumbersO2N)
+void MEDCouplingUMesh::renumberNodesInConn(const mcIdType *newNodeNumbersO2N)
 {
   checkConnectivityFullyDefined();
-  int *conn=getNodalConnectivity()->getPointer();
-  const int *connIndex=getNodalConnectivityIndex()->getConstPointer();
-  int nbOfCells(getNumberOfCells());
-  for(int i=0;i<nbOfCells;i++)
-    for(int iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
+  mcIdType *conn=getNodalConnectivity()->getPointer();
+  const mcIdType *connIndex=getNodalConnectivityIndex()->getConstPointer();
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells;i++)
+    for(mcIdType iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
       {
-        int& node=conn[iconn];
+        mcIdType& node=conn[iconn];
         if(node>=0)//avoid polyhedron separator
           {
             node=newNodeNumbersO2N[node];
@@ -2534,16 +2535,16 @@ void MEDCouplingUMesh::renumberNodesInConn(const int *newNodeNumbersO2N)
  *
  * \param [in] delta specifies the shift size applied to nodeId in nodal connectivity in \b this.
  */
-void MEDCouplingUMesh::shiftNodeNumbersInConn(int delta)
+void MEDCouplingUMesh::shiftNodeNumbersInConn(mcIdType delta)
 {
   checkConnectivityFullyDefined();
-  int *conn=getNodalConnectivity()->getPointer();
-  const int *connIndex=getNodalConnectivityIndex()->getConstPointer();
-  int nbOfCells=getNumberOfCells();
-  for(int i=0;i<nbOfCells;i++)
-    for(int iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
+  mcIdType *conn=getNodalConnectivity()->getPointer();
+  const mcIdType *connIndex=getNodalConnectivityIndex()->getConstPointer();
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells;i++)
+    for(mcIdType iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
       {
-        int& node=conn[iconn];
+        mcIdType& node=conn[iconn];
         if(node>=0)//avoid polyhedron separator
           {
             node+=delta;
@@ -2569,23 +2570,23 @@ void MEDCouplingUMesh::shiftNodeNumbersInConn(int delta)
  * \param [in] nodeIdsToDuplicateEnd end of node ids (excluded) to be duplicated in connectivity only
  * \param [in] offset the offset applied to all node ids in connectivity that are in [ \a nodeIdsToDuplicateBg, \a nodeIdsToDuplicateEnd ).
  */
-void MEDCouplingUMesh::duplicateNodesInConn(const int *nodeIdsToDuplicateBg, const int *nodeIdsToDuplicateEnd, int offset)
+void MEDCouplingUMesh::duplicateNodesInConn(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd, mcIdType offset)
 {
   checkConnectivityFullyDefined();
-  std::map<int,int> m;
-  int val=offset;
-  for(const int *work=nodeIdsToDuplicateBg;work!=nodeIdsToDuplicateEnd;work++,val++)
+  std::map<mcIdType,mcIdType> m;
+  mcIdType val=offset;
+  for(const mcIdType *work=nodeIdsToDuplicateBg;work!=nodeIdsToDuplicateEnd;work++,val++)
     m[*work]=val;
-  int *conn=getNodalConnectivity()->getPointer();
-  const int *connIndex=getNodalConnectivityIndex()->getConstPointer();
-  int nbOfCells=getNumberOfCells();
-  for(int i=0;i<nbOfCells;i++)
-    for(int iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
+  mcIdType *conn=getNodalConnectivity()->getPointer();
+  const mcIdType *connIndex=getNodalConnectivityIndex()->getConstPointer();
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells;i++)
+    for(mcIdType iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
       {
-        int& node=conn[iconn];
+        mcIdType& node=conn[iconn];
         if(node>=0)//avoid polyhedron separator
           {
-            std::map<int,int>::iterator it=m.find(node);
+            std::map<mcIdType,mcIdType>::iterator it=m.find(node);
             if(it!=m.end())
               node=(*it).second;
           }
@@ -2610,34 +2611,34 @@ void MEDCouplingUMesh::duplicateNodesInConn(const int *nodeIdsToDuplicateBg, con
  * \param [in] old2NewBg is expected to be a dynamically allocated pointer of size at least equal to this->getNumberOfCells()
  * \param check
  */
-void MEDCouplingUMesh::renumberCells(const int *old2NewBg, bool check)
+void MEDCouplingUMesh::renumberCells(const mcIdType *old2NewBg, bool check)
 {
   checkConnectivityFullyDefined();
-  int nbCells=getNumberOfCells();
-  const int *array=old2NewBg;
+  mcIdType nbCells=getNumberOfCells();
+  const mcIdType *array=old2NewBg;
   if(check)
-    array=DataArrayInt::CheckAndPreparePermutation(old2NewBg,old2NewBg+nbCells);
+    array=DataArrayIdType::CheckAndPreparePermutation(old2NewBg,old2NewBg+nbCells);
   //
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connI=_nodal_connec_index->getConstPointer();
-  MCAuto<DataArrayInt> o2n=DataArrayInt::New(); o2n->useArray(array,false,DeallocType::C_DEALLOC,nbCells,1);
-  MCAuto<DataArrayInt> n2o=o2n->invertArrayO2N2N2O(nbCells);
-  const int *n2oPtr=n2o->begin();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connI=_nodal_connec_index->getConstPointer();
+  MCAuto<DataArrayIdType> o2n=DataArrayIdType::New(); o2n->useArray(array,false,DeallocType::C_DEALLOC,nbCells,1);
+  MCAuto<DataArrayIdType> n2o=o2n->invertArrayO2N2N2O(nbCells);
+  const mcIdType *n2oPtr=n2o->begin();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
   newConn->alloc(_nodal_connec->getNumberOfTuples(),_nodal_connec->getNumberOfComponents());
   newConn->copyStringInfoFrom(*_nodal_connec);
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New();
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New();
   newConnI->alloc(_nodal_connec_index->getNumberOfTuples(),_nodal_connec_index->getNumberOfComponents());
   newConnI->copyStringInfoFrom(*_nodal_connec_index);
   //
-  int *newC=newConn->getPointer();
-  int *newCI=newConnI->getPointer();
-  int loc=0;
+  mcIdType *newC=newConn->getPointer();
+  mcIdType *newCI=newConnI->getPointer();
+  mcIdType loc=0;
   newCI[0]=loc;
-  for(int i=0;i<nbCells;i++)
+  for(mcIdType i=0;i<nbCells;i++)
     {
-      int pos=n2oPtr[i];
-      int nbOfElts=connI[pos+1]-connI[pos];
+      mcIdType pos=n2oPtr[i];
+      mcIdType nbOfElts=connI[pos+1]-connI[pos];
       newC=std::copy(conn+connI[pos],conn+connI[pos+1],newC);
       loc+=nbOfElts;
       newCI[i+1]=loc;
@@ -2645,7 +2646,7 @@ void MEDCouplingUMesh::renumberCells(const int *old2NewBg, bool check)
   //
   setConnectivity(newConn,newConnI);
   if(check)
-    free(const_cast<int *>(array));
+    free(const_cast<mcIdType *>(array));
 }
 
 /*!
@@ -2656,7 +2657,7 @@ void MEDCouplingUMesh::renumberCells(const int *old2NewBg, bool check)
  *  \param [in] eps - a factor used to increase size of the bounding box of cell
  *         before comparing it with \a bbox. This factor is multiplied by the maximal
  *         extent of the bounding box of cell to produce an addition to this bounding box.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids for found
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids for found
  *         cells. The caller is to delete this array using decrRef() as it is no more
  *         needed.
  *  \throw If the coordinates array is not set.
@@ -2667,9 +2668,9 @@ void MEDCouplingUMesh::renumberCells(const int *old2NewBg, bool check)
  *  \ref  py_mcumesh_getCellsInBoundingBox "Here is a Python example".
  *  \endif
  */
-DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const double *bbox, double eps) const
+DataArrayIdType *MEDCouplingUMesh::getCellsInBoundingBox(const double *bbox, double eps) const
 {
-  MCAuto<DataArrayInt> elems=DataArrayInt::New(); elems->alloc(0,1);
+  MCAuto<DataArrayIdType> elems=DataArrayIdType::New(); elems->alloc(0,1);
   if(getMeshDimension()==-1)
     {
       elems->pushBackSilent(0);
@@ -2677,11 +2678,11 @@ DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const double *bbox, double
     }
   int dim=getSpaceDimension();
   INTERP_KERNEL::AutoPtr<double> elem_bb=new double[2*dim];
-  const int* conn      = getNodalConnectivity()->getConstPointer();
-  const int* conn_index= getNodalConnectivityIndex()->getConstPointer();
+  const mcIdType* conn      = getNodalConnectivity()->getConstPointer();
+  const mcIdType* conn_index= getNodalConnectivityIndex()->getConstPointer();
   const double* coords = getCoords()->getConstPointer();
-  int nbOfCells=getNumberOfCells();
-  for ( int ielem=0; ielem<nbOfCells;ielem++ )
+  mcIdType nbOfCells=getNumberOfCells();
+  for ( mcIdType ielem=0; ielem<nbOfCells;ielem++ )
     {
       for (int i=0; i<dim; i++)
         {
@@ -2689,9 +2690,9 @@ DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const double *bbox, double
           elem_bb[i*2+1]=-std::numeric_limits<double>::max();
         }
 
-      for (int inode=conn_index[ielem]+1; inode<conn_index[ielem+1]; inode++)//+1 due to offset of cell type.
+      for (mcIdType inode=conn_index[ielem]+1; inode<conn_index[ielem+1]; inode++)//+1 due to offset of cell type.
         {
-          int node= conn[inode];
+          mcIdType node= conn[inode];
           if(node>=0)//avoid polyhedron separator
             {
               for (int idim=0; idim<dim; idim++)
@@ -2718,9 +2719,9 @@ DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const double *bbox, double
  * Warning 'elems' is incremented during the call so if elems is not empty before call returned elements will be
  * added in 'elems' parameter.
  */
-DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps)
+DataArrayIdType *MEDCouplingUMesh::getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps)
 {
-  MCAuto<DataArrayInt> elems=DataArrayInt::New(); elems->alloc(0,1);
+  MCAuto<DataArrayIdType> elems=DataArrayIdType::New(); elems->alloc(0,1);
   if(getMeshDimension()==-1)
     {
       elems->pushBackSilent(0);
@@ -2728,11 +2729,11 @@ DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const INTERP_KERNEL::Direc
     }
   int dim=getSpaceDimension();
   INTERP_KERNEL::AutoPtr<double> elem_bb=new double[2*dim];
-  const int* conn      = getNodalConnectivity()->getConstPointer();
-  const int* conn_index= getNodalConnectivityIndex()->getConstPointer();
+  const mcIdType* conn      = getNodalConnectivity()->getConstPointer();
+  const mcIdType* conn_index= getNodalConnectivityIndex()->getConstPointer();
   const double* coords = getCoords()->getConstPointer();
-  int nbOfCells=getNumberOfCells();
-  for ( int ielem=0; ielem<nbOfCells;ielem++ )
+  mcIdType nbOfCells=getNumberOfCells();
+  for ( mcIdType ielem=0; ielem<nbOfCells;ielem++ )
     {
       for (int i=0; i<dim; i++)
         {
@@ -2740,9 +2741,9 @@ DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const INTERP_KERNEL::Direc
           elem_bb[i*2+1]=-std::numeric_limits<double>::max();
         }
 
-      for (int inode=conn_index[ielem]+1; inode<conn_index[ielem+1]; inode++)//+1 due to offset of cell type.
+      for (mcIdType inode=conn_index[ielem]+1; inode<conn_index[ielem+1]; inode++)//+1 due to offset of cell type.
         {
-          int node= conn[inode];
+          mcIdType node= conn[inode];
           if(node>=0)//avoid polyhedron separator
             {
               for (int idim=0; idim<dim; idim++)
@@ -2770,9 +2771,9 @@ DataArrayInt *MEDCouplingUMesh::getCellsInBoundingBox(const INTERP_KERNEL::Direc
  *  \return INTERP_KERNEL::NormalizedCellType - enumeration item describing the cell type.
  *  \throw If \a cellId is invalid. Valid range is [0, \a this->getNumberOfCells() ).
  */
-INTERP_KERNEL::NormalizedCellType MEDCouplingUMesh::getTypeOfCell(std::size_t cellId) const
+INTERP_KERNEL::NormalizedCellType MEDCouplingUMesh::getTypeOfCell(mcIdType cellId) const
 {
-  const int *ptI(_nodal_connec_index->begin()),*pt(_nodal_connec->begin());
+  const mcIdType *ptI(_nodal_connec_index->begin()),*pt(_nodal_connec->begin());
   if(cellId<_nodal_connec_index->getNbOfElems()-1)
     return (INTERP_KERNEL::NormalizedCellType) pt[ptI[cellId]];
   else
@@ -2791,20 +2792,20 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingUMesh::getTypeOfCell(std::size_t ce
  * \param [in] type the geometric type
  * \return cell ids in this having geometric type \a type.
  */
-DataArrayInt *MEDCouplingUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+DataArrayIdType *MEDCouplingUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
 
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(0,1);
   checkConnectivityFullyDefined();
-  int nbCells=getNumberOfCells();
+  mcIdType nbCells=getNumberOfCells();
   int mdim=getMeshDimension();
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
-  if(mdim!=(int)cm.getDimension())
+  if(mdim!=ToIdType(cm.getDimension()))
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::giveCellsWithType : Mismatch between mesh dimension and dimension of the cell !");
-  const int *ptI=_nodal_connec_index->getConstPointer();
-  const int *pt=_nodal_connec->getConstPointer();
-  for(int i=0;i<nbCells;i++)
+  const mcIdType *ptI=_nodal_connec_index->getConstPointer();
+  const mcIdType *pt=_nodal_connec->getConstPointer();
+  for(mcIdType i=0;i<nbCells;i++)
     {
       if((INTERP_KERNEL::NormalizedCellType)pt[ptI[i]]==type)
         ret->pushBackSilent(i);
@@ -2815,11 +2816,11 @@ DataArrayInt *MEDCouplingUMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellT
 /*!
  * Returns nb of cells having the geometric type \a type. No throw if no cells in \a this has the geometric type \a type.
  */
-std::size_t MEDCouplingUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+mcIdType MEDCouplingUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
 {
-  const int *ptI(_nodal_connec_index->begin()),*pt(_nodal_connec->begin());
-  std::size_t nbOfCells(getNumberOfCells()),ret(0);
-  for(std::size_t i=0;i<nbOfCells;i++)
+  const mcIdType *ptI(_nodal_connec_index->begin()),*pt(_nodal_connec->begin());
+  mcIdType nbOfCells(getNumberOfCells()),ret(0);
+  for(mcIdType i=0;i<nbOfCells;i++)
     if((INTERP_KERNEL::NormalizedCellType) pt[ptI[i]]==type)
       ret++;
   return ret;
@@ -2834,10 +2835,10 @@ std::size_t MEDCouplingUMesh::getNumberOfCellsWithType(INTERP_KERNEL::Normalized
  *         cleared before the appending.
  *  \throw If \a cellId is invalid. Valid range is [0, \a this->getNumberOfCells() ).
  */
-void MEDCouplingUMesh::getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const
+void MEDCouplingUMesh::getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const
 {
-  const int *ptI(_nodal_connec_index->begin()),*pt(_nodal_connec->begin());
-  for(const int *w=pt+ptI[cellId]+1;w!=pt+ptI[cellId+1];w++)
+  const mcIdType *ptI(_nodal_connec_index->begin()),*pt(_nodal_connec->begin());
+  for(const mcIdType *w=pt+ptI[cellId]+1;w!=pt+ptI[cellId+1];w++)
     if(*w>=0)
       conn.push_back(*w);
 }
@@ -2938,17 +2939,17 @@ std::string MEDCouplingUMesh::reprConnectivityOfThis() const
  * This method analyzes the 3 arrays of \a this. For each the following behaviour is done : if the array is null a newly one is created
  * with number of tuples set to 0, if not the array is taken as this in the returned instance.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildSetInstanceFromThis(int spaceDim) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildSetInstanceFromThis(std::size_t spaceDim) const
 {
   int mdim=getMeshDimension();
   if(mdim<0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSetInstanceFromThis : invalid mesh dimension ! Should be >= 0 !");
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),mdim);
-  MCAuto<DataArrayInt> tmp1,tmp2;
+  MCAuto<DataArrayIdType> tmp1,tmp2;
   bool needToCpyCT=true;
   if(!_nodal_connec)
     {
-      tmp1=DataArrayInt::New(); tmp1->alloc(0,1);
+      tmp1=DataArrayIdType::New(); tmp1->alloc(0,1);
       needToCpyCT=false;
     }
   else
@@ -2958,7 +2959,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildSetInstanceFromThis(int spaceDim) const
     }
   if(!_nodal_connec_index)
     {
-      tmp2=DataArrayInt::New(); tmp2->alloc(1,1); tmp2->setIJ(0,0,0);
+      tmp2=DataArrayIdType::New(); tmp2->alloc(1,1); tmp2->setIJ(0,0,0);
       needToCpyCT=false;
     }
   else
@@ -2979,14 +2980,14 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildSetInstanceFromThis(int spaceDim) const
   return ret.retn();
 }
 
-int MEDCouplingUMesh::getNumberOfNodesInCell(int cellId) const
+mcIdType MEDCouplingUMesh::getNumberOfNodesInCell(mcIdType cellId) const
 {
-  const int *ptI=_nodal_connec_index->getConstPointer();
-  const int *pt=_nodal_connec->getConstPointer();
+  const mcIdType *ptI=_nodal_connec_index->getConstPointer();
+  const mcIdType *pt=_nodal_connec->getConstPointer();
   if(pt[ptI[cellId]]!=INTERP_KERNEL::NORM_POLYHED)
     return ptI[cellId+1]-ptI[cellId]-1;
   else
-    return (int)std::count_if(pt+ptI[cellId]+1,pt+ptI[cellId+1],std::bind2nd(std::not_equal_to<int>(),-1));
+    return ToIdType(std::count_if(pt+ptI[cellId]+1,pt+ptI[cellId+1],std::bind2nd(std::not_equal_to<mcIdType>(),-1)));
 }
 
 /*!
@@ -3000,13 +3001,13 @@ int MEDCouplingUMesh::getNumberOfNodesInCell(int cellId) const
  *  \throw If the nodal connectivity of cells is not defined.
  *  \sa getAllGeoTypes()
  */
-std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingUMesh::getTypesOfPart(const int *begin, const int *end) const
+std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingUMesh::getTypesOfPart(const mcIdType *begin, const mcIdType *end) const
 {
   checkFullyDefined();
   std::set<INTERP_KERNEL::NormalizedCellType> ret;
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connIndex=_nodal_connec_index->getConstPointer();
-  for(const int *w=begin;w!=end;w++)
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connIndex=_nodal_connec_index->getConstPointer();
+  for(const mcIdType *w=begin;w!=end;w++)
     ret.insert((INTERP_KERNEL::NormalizedCellType)conn[connIndex[*w]]);
   return ret;
 }
@@ -3022,10 +3023,10 @@ std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingUMesh::getTypesOfPart(con
  *  \param [in] isComputingTypes - if \c true, the set of types constituting \a this
  *         mesh is updated.
  */
-void MEDCouplingUMesh::setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes)
+void MEDCouplingUMesh::setConnectivity(DataArrayIdType *conn, DataArrayIdType *connIndex, bool isComputingTypes)
 {
-  DataArrayInt::SetArrayIn(conn,_nodal_connec);
-  DataArrayInt::SetArrayIn(connIndex,_nodal_connec_index);
+  DataArrayIdType::SetArrayIn(conn,_nodal_connec);
+  DataArrayIdType::SetArrayIn(connIndex,_nodal_connec_index);
   if(isComputingTypes)
     computeTypes();
   declareAsNew();
@@ -3065,10 +3066,10 @@ void MEDCouplingUMesh::computeTypes()
 
 /*!
  * Returns a number of cells constituting \a this mesh.
- *  \return int - the number of cells in \a this mesh.
+ *  \return mcIdType - the number of cells in \a this mesh.
  *  \throw If the nodal connectivity of cells is not defined.
  */
-std::size_t MEDCouplingUMesh::getNumberOfCells() const
+mcIdType MEDCouplingUMesh::getNumberOfCells() const
 {
   if(_nodal_connec_index)
     return _nodal_connec_index->getNumberOfTuples()-1;
@@ -3096,9 +3097,9 @@ int MEDCouplingUMesh::getMeshDimension() const
  * Returns a length of the nodal connectivity array.
  * This method is for test reason. Normally the integer returned is not useable by
  * user.  For more info see \ref MEDCouplingUMeshNodalConnectivity.
- *  \return int - the length of the nodal connectivity array.
+ *  \return mcIdType - the length of the nodal connectivity array.
  */
-int MEDCouplingUMesh::getNodalConnectivityArrayLen() const
+mcIdType MEDCouplingUMesh::getNodalConnectivityArrayLen() const
 {
   return _nodal_connec->getNbOfElems();
 }
@@ -3106,10 +3107,10 @@ int MEDCouplingUMesh::getNodalConnectivityArrayLen() const
 /*!
  * First step of serialization process. Used by ParaMEDMEM and MEDCouplingCorba to transfert data between process.
  */
-void MEDCouplingUMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
+void MEDCouplingUMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const
 {
   MEDCouplingPointSet::getTinySerializationInformation(tinyInfoD,tinyInfo,littleStrings);
-  tinyInfo.push_back(getMeshDimension());
+  tinyInfo.push_back(ToIdType(getMeshDimension()));
   tinyInfo.push_back(getNumberOfCells());
   if(_nodal_connec)
     tinyInfo.push_back(getNodalConnectivityArrayLen());
@@ -3120,7 +3121,7 @@ void MEDCouplingUMesh::getTinySerializationInformation(std::vector<double>& tiny
 /*!
  * First step of unserialization process.
  */
-bool MEDCouplingUMesh::isEmptyMesh(const std::vector<int>& tinyInfo) const
+bool MEDCouplingUMesh::isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const
 {
   return tinyInfo[6]<=0;
 }
@@ -3132,7 +3133,7 @@ bool MEDCouplingUMesh::isEmptyMesh(const std::vector<int>& tinyInfo) const
  * \param a2
  * \param littleStrings
  */
-void MEDCouplingUMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
+void MEDCouplingUMesh::resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const
 {
   MEDCouplingPointSet::resizeForUnserialization(tinyInfo,a1,a2,littleStrings);
   if(tinyInfo[5]!=-1)
@@ -3142,16 +3143,16 @@ void MEDCouplingUMesh::resizeForUnserialization(const std::vector<int>& tinyInfo
 /*!
  * Third and final step of serialization process.
  */
-void MEDCouplingUMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
+void MEDCouplingUMesh::serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const
 {
   MEDCouplingPointSet::serialize(a1,a2);
   if(getMeshDimension()>-1)
     {
-      a1=DataArrayInt::New();
+      a1=DataArrayIdType::New();
       a1->alloc(getNodalConnectivityArrayLen()+getNumberOfCells()+1,1);
-      int *ptA1=a1->getPointer();
-      const int *conn=getNodalConnectivity()->getConstPointer();
-      const int *index=getNodalConnectivityIndex()->getConstPointer();
+      mcIdType *ptA1=a1->getPointer();
+      const mcIdType *conn=getNodalConnectivity()->getConstPointer();
+      const mcIdType *index=getNodalConnectivityIndex()->getConstPointer();
       ptA1=std::copy(index,index+getNumberOfCells()+1,ptA1);
       std::copy(conn,conn+getNodalConnectivityArrayLen(),ptA1);
     }
@@ -3163,18 +3164,18 @@ void MEDCouplingUMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const
  * Second and final unserialization process.
  * \param tinyInfo must be equal to the result given by getTinySerializationInformation method.
  */
-void MEDCouplingUMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
+void MEDCouplingUMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings)
 {
   MEDCouplingPointSet::unserialization(tinyInfoD,tinyInfo,a1,a2,littleStrings);
-  setMeshDimension(tinyInfo[5]);
+  setMeshDimension(FromIdType<int>(tinyInfo[5]));
   if(tinyInfo[7]!=-1)
     {
       // Connectivity
-      const int *recvBuffer=a1->getConstPointer();
-      MCAuto<DataArrayInt> myConnecIndex=DataArrayInt::New();
+      const mcIdType *recvBuffer=a1->getConstPointer();
+      MCAuto<DataArrayIdType> myConnecIndex=DataArrayIdType::New();
       myConnecIndex->alloc(tinyInfo[6]+1,1);
       std::copy(recvBuffer,recvBuffer+tinyInfo[6]+1,myConnecIndex->getPointer());
-      MCAuto<DataArrayInt> myConnec=DataArrayInt::New();
+      MCAuto<DataArrayIdType> myConnec=DataArrayIdType::New();
       myConnec->alloc(tinyInfo[7],1);
       std::copy(recvBuffer+tinyInfo[6]+1,recvBuffer+tinyInfo[6]+1+tinyInfo[7],myConnec->getPointer());
       setConnectivity(myConnec, myConnecIndex);
@@ -3199,7 +3200,7 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getMeasureField(bool isAbs) const
 {
   std::string name="MeasureOfMesh_";
   name+=getName();
-  int nbelem=getNumberOfCells();
+  mcIdType nbelem=getNumberOfCells();
   MCAuto<MEDCouplingFieldDouble> field=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   field->setName(name);
   MCAuto<DataArrayDouble> array=DataArrayDouble::New();
@@ -3210,17 +3211,17 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getMeasureField(bool isAbs) const
   field->synchronizeTimeWithMesh();
   if(getMeshDimension()!=-1)
     {
-      int ipt;
+      mcIdType ipt;
       INTERP_KERNEL::NormalizedCellType type;
       int dim_space=getSpaceDimension();
       const double *coords=getCoords()->getConstPointer();
-      const int *connec=getNodalConnectivity()->getConstPointer();
-      const int *connec_index=getNodalConnectivityIndex()->getConstPointer();
-      for(int iel=0;iel<nbelem;iel++)
+      const mcIdType *connec=getNodalConnectivity()->getConstPointer();
+      const mcIdType *connec_index=getNodalConnectivityIndex()->getConstPointer();
+      for(mcIdType iel=0;iel<nbelem;iel++)
         {
           ipt=connec_index[iel];
           type=(INTERP_KERNEL::NormalizedCellType)connec[ipt];
-          area_vol[iel]=INTERP_KERNEL::computeVolSurfOfCell2<int,INTERP_KERNEL::ALL_C_MODE>(type,connec+ipt+1,connec_index[iel+1]-ipt-1,coords,dim_space);
+          area_vol[iel]=INTERP_KERNEL::computeVolSurfOfCell2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(type,connec+ipt+1,connec_index[iel+1]-ipt-1,coords,dim_space);
         }
       if(isAbs)
         std::transform(area_vol,area_vol+nbelem,area_vol,std::ptr_fun<double,double>(fabs));
@@ -3252,28 +3253,28 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getMeasureField(bool isAbs) const
  *  \endif
  *  \sa getMeasureField()
  */
-DataArrayDouble *MEDCouplingUMesh::getPartMeasureField(bool isAbs, const int *begin, const int *end) const
+DataArrayDouble *MEDCouplingUMesh::getPartMeasureField(bool isAbs, const mcIdType *begin, const mcIdType *end) const
 {
   std::string name="PartMeasureOfMesh_";
   name+=getName();
-  int nbelem=(int)std::distance(begin,end);
+  std::size_t nbelem=std::distance(begin,end);
   MCAuto<DataArrayDouble> array=DataArrayDouble::New();
   array->setName(name);
   array->alloc(nbelem,1);
   double *area_vol=array->getPointer();
   if(getMeshDimension()!=-1)
     {
-      int ipt;
+      mcIdType ipt;
       INTERP_KERNEL::NormalizedCellType type;
       int dim_space=getSpaceDimension();
       const double *coords=getCoords()->getConstPointer();
-      const int *connec=getNodalConnectivity()->getConstPointer();
-      const int *connec_index=getNodalConnectivityIndex()->getConstPointer();
-      for(const int *iel=begin;iel!=end;iel++)
+      const mcIdType *connec=getNodalConnectivity()->getConstPointer();
+      const mcIdType *connec_index=getNodalConnectivityIndex()->getConstPointer();
+      for(const mcIdType *iel=begin;iel!=end;iel++)
         {
           ipt=connec_index[*iel];
           type=(INTERP_KERNEL::NormalizedCellType)connec[ipt];
-          *area_vol++=INTERP_KERNEL::computeVolSurfOfCell2<int,INTERP_KERNEL::ALL_C_MODE>(type,connec+ipt+1,connec_index[*iel+1]-ipt-1,coords,dim_space);
+          *area_vol++=INTERP_KERNEL::computeVolSurfOfCell2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(type,connec+ipt+1,connec_index[*iel+1]-ipt-1,coords,dim_space);
         }
       if(isAbs)
         std::transform(array->getPointer(),area_vol,array->getPointer(),std::ptr_fun<double,double>(fabs));
@@ -3305,10 +3306,10 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getMeasureFieldOnNode(bool isAbs) cons
   MCAuto<MEDCouplingFieldDouble> tmp=getMeasureField(isAbs);
   std::string name="MeasureOnNodeOfMesh_";
   name+=getName();
-  int nbNodes=getNumberOfNodes();
+  mcIdType nbNodes=getNumberOfNodes();
   MCAuto<DataArrayDouble> nnpc;
   {
-    MCAuto<DataArrayInt> tmp(computeNbOfNodesPerCell());
+    MCAuto<DataArrayIdType> tmp(computeNbOfNodesPerCell());
     nnpc=tmp->convertToDblArr();
   }
   std::for_each(nnpc->rwBegin(),nnpc->rwEnd(),[](double& v) { v=1./v; });
@@ -3319,13 +3320,13 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getMeasureFieldOnNode(bool isAbs) cons
   double *valsToFill=array->getPointer();
   std::fill(valsToFill,valsToFill+nbNodes,0.);
   const double *values=tmp->getArray()->getConstPointer();
-  MCAuto<DataArrayInt> da=DataArrayInt::New();
-  MCAuto<DataArrayInt> daInd=DataArrayInt::New();
+  MCAuto<DataArrayIdType> da=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> daInd=DataArrayIdType::New();
   getReverseNodalConnectivity(da,daInd);
-  const int *daPtr=da->getConstPointer();
-  const int *daIPtr=daInd->getConstPointer();
-  for(int i=0;i<nbNodes;i++)
-    for(const int *cell=daPtr+daIPtr[i];cell!=daPtr+daIPtr[i+1];cell++)
+  const mcIdType *daPtr=da->getConstPointer();
+  const mcIdType *daIPtr=daInd->getConstPointer();
+  for(mcIdType i=0;i<nbNodes;i++)
+    for(const mcIdType *cell=daPtr+daIPtr[i];cell!=daPtr+daIPtr[i+1];cell++)
       valsToFill[i]+=nnpcPtr[*cell]*values[*cell];
   ret->setMesh(this);
   ret->setArray(array);
@@ -3355,12 +3356,12 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildOrthogonalField() const
     throw INTERP_KERNEL::Exception("Expected a umesh with ( meshDim == 2 spaceDim == 2 or 3 ) or ( meshDim == 1 spaceDim == 2 ) !");
   MCAuto<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   MCAuto<DataArrayDouble> array=DataArrayDouble::New();
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   int nbComp=getMeshDimension()+1;
   array->alloc(nbOfCells,nbComp);
   double *vals=array->getPointer();
-  const int *connI=_nodal_connec_index->getConstPointer();
-  const int *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connI=_nodal_connec_index->getConstPointer();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
   const double *coords=_coords->getConstPointer();
   if(getMeshDimension()==2)
     {
@@ -3368,9 +3369,9 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildOrthogonalField() const
         {
           MCAuto<DataArrayDouble> loc=computeCellCenterOfMass();
           const double *locPtr=loc->getConstPointer();
-          for(int i=0;i<nbOfCells;i++,vals+=3)
+          for(mcIdType i=0;i<nbOfCells;i++,vals+=3)
             {
-              int offset=connI[i];
+              mcIdType offset=connI[i];
               INTERP_KERNEL::crossprod<3>(locPtr+3*i,coords+3*conn[offset+1],coords+3*conn[offset+2],vals);
               double n=INTERP_KERNEL::norm<3>(vals);
               std::transform(vals,vals+3,vals,std::bind2nd(std::multiplies<double>(),1./n));
@@ -3380,16 +3381,16 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildOrthogonalField() const
         {
           MCAuto<MEDCouplingFieldDouble> isAbs=getMeasureField(false);
           const double *isAbsPtr=isAbs->getArray()->begin();
-          for(int i=0;i<nbOfCells;i++,isAbsPtr++)
+          for(mcIdType i=0;i<nbOfCells;i++,isAbsPtr++)
             { vals[3*i]=0.; vals[3*i+1]=0.; vals[3*i+2]=*isAbsPtr>0.?1.:-1.; }
         }
     }
   else//meshdimension==1
     {
       double tmp[2];
-      for(int i=0;i<nbOfCells;i++)
+      for(mcIdType i=0;i<nbOfCells;i++)
         {
-          int offset=connI[i];
+          mcIdType offset=connI[i];
           std::transform(coords+2*conn[offset+2],coords+2*conn[offset+2]+2,coords+2*conn[offset+1],tmp,std::minus<double>());
           double n=INTERP_KERNEL::norm<2>(tmp);
           std::transform(tmp,tmp+2,tmp,std::bind2nd(std::multiplies<double>(),1./n));
@@ -3428,7 +3429,7 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildOrthogonalField() const
  *  \ref  py_mcumesh_buildPartOrthogonalField "Here is a Python example".
  *  \endif
  */
-MEDCouplingFieldDouble *MEDCouplingUMesh::buildPartOrthogonalField(const int *begin, const int *end) const
+MEDCouplingFieldDouble *MEDCouplingUMesh::buildPartOrthogonalField(const mcIdType *begin, const mcIdType *end) const
 {
   if((getMeshDimension()!=2) && (getMeshDimension()!=1 || getSpaceDimension()!=2))
     throw INTERP_KERNEL::Exception("Expected a umesh with ( meshDim == 2 spaceDim == 2 or 3 ) or ( meshDim == 1 spaceDim == 2 ) !");
@@ -3436,10 +3437,10 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildPartOrthogonalField(const int *be
   MCAuto<DataArrayDouble> array=DataArrayDouble::New();
   std::size_t nbelems=std::distance(begin,end);
   int nbComp=getMeshDimension()+1;
-  array->alloc((int)nbelems,nbComp);
+  array->alloc(nbelems,nbComp);
   double *vals=array->getPointer();
-  const int *connI=_nodal_connec_index->getConstPointer();
-  const int *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connI=_nodal_connec_index->getConstPointer();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
   const double *coords=_coords->getConstPointer();
   if(getMeshDimension()==2)
     {
@@ -3447,9 +3448,9 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildPartOrthogonalField(const int *be
         {
           MCAuto<DataArrayDouble> loc=getPartBarycenterAndOwner(begin,end);
           const double *locPtr=loc->getConstPointer();
-          for(const int *i=begin;i!=end;i++,vals+=3,locPtr+=3)
+          for(const mcIdType *i=begin;i!=end;i++,vals+=3,locPtr+=3)
             {
-              int offset=connI[*i];
+              mcIdType offset=connI[*i];
               INTERP_KERNEL::crossprod<3>(locPtr,coords+3*conn[offset+1],coords+3*conn[offset+2],vals);
               double n=INTERP_KERNEL::norm<3>(vals);
               std::transform(vals,vals+3,vals,std::bind2nd(std::multiplies<double>(),1./n));
@@ -3464,9 +3465,9 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildPartOrthogonalField(const int *be
   else//meshdimension==1
     {
       double tmp[2];
-      for(const int *i=begin;i!=end;i++)
+      for(const mcIdType *i=begin;i!=end;i++)
         {
-          int offset=connI[*i];
+          mcIdType offset=connI[*i];
           std::transform(coords+2*conn[offset+2],coords+2*conn[offset+2]+2,coords+2*conn[offset+1],tmp,std::minus<double>());
           double n=INTERP_KERNEL::norm<2>(tmp);
           std::transform(tmp,tmp+2,tmp,std::bind2nd(std::multiplies<double>(),1./n));
@@ -3500,14 +3501,14 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildDirectionVectorField() const
     throw INTERP_KERNEL::Exception("Expected a umesh with only NORM_SEG2 type of elements for buildDirectionVectorField !");
   MCAuto<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   MCAuto<DataArrayDouble> array=DataArrayDouble::New();
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   int spaceDim=getSpaceDimension();
   array->alloc(nbOfCells,spaceDim);
   double *pt=array->getPointer();
   const double *coo=getCoords()->getConstPointer();
-  std::vector<int> conn;
+  std::vector<mcIdType> conn;
   conn.reserve(2);
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       conn.resize(0);
       getNodeIdsOfCell(i,conn);
@@ -3521,7 +3522,7 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildDirectionVectorField() const
 
 /*!
  * Creates a 2D mesh by cutting \a this 3D mesh with a plane. In addition to the mesh,
- * returns a new DataArrayInt, of length equal to the number of 2D cells in the result
+ * returns a new DataArrayIdType, of length equal to the number of 2D cells in the result
  * mesh, holding, for each cell in the result mesh, an id of a 3D cell it comes
  * from. If a result face is shared by two 3D cells, then the face in included twice in
  * the result mesh.
@@ -3529,7 +3530,7 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildDirectionVectorField() const
  *  \param [in] vec - 3 components of a vector normal to the plane. Vector magnitude
  *         must be greater than 1e-6.
  *  \param [in] eps - half-thickness of the plane.
- *  \param [out] cellIds - a new instance of DataArrayInt holding ids of 3D cells
+ *  \param [out] cellIds - a new instance of DataArrayIdType holding ids of 3D cells
  *         producing correspondent 2D cells. The caller is to delete this array
  *         using decrRef() as it is no more needed.
  *  \return MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. This mesh does
@@ -3542,38 +3543,38 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::buildDirectionVectorField() const
  *  \throw If the plane does not intersect any 3D cell of \a this mesh.
  *  \throw If \a this includes quadratic cells.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildSlice3D(const double *origin, const double *vec, double eps, DataArrayInt *&cellIds) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildSlice3D(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const
 {
   checkFullyDefined();
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSlice3D works on umeshes with meshdim equal to 3 and spaceDim equal to 3 too!");
-  MCAuto<DataArrayInt> candidates=getCellIdsCrossingPlane(origin,vec,eps);
+  MCAuto<DataArrayIdType> candidates=getCellIdsCrossingPlane(origin,vec,eps);
   if(candidates->empty())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSlice3D : No 3D cells in this intercepts the specified plane considering bounding boxes !");
-  std::vector<int> nodes;
-  DataArrayInt *cellIds1D=0;
+  std::vector<mcIdType> nodes;
+  DataArrayIdType *cellIds1D=0;
   MCAuto<MEDCouplingUMesh> subMesh=static_cast<MEDCouplingUMesh*>(buildPartOfMySelf(candidates->begin(),candidates->end(),false));
   subMesh->findNodesOnPlane(origin,vec,eps,nodes);
-  MCAuto<DataArrayInt> desc1=DataArrayInt::New(),desc2=DataArrayInt::New();
-  MCAuto<DataArrayInt> descIndx1=DataArrayInt::New(),descIndx2=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDesc1=DataArrayInt::New(),revDesc2=DataArrayInt::New();
-  MCAuto<DataArrayInt> revDescIndx1=DataArrayInt::New(),revDescIndx2=DataArrayInt::New();
+  MCAuto<DataArrayIdType> desc1=DataArrayIdType::New(),desc2=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> descIndx1=DataArrayIdType::New(),descIndx2=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDesc1=DataArrayIdType::New(),revDesc2=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> revDescIndx1=DataArrayIdType::New(),revDescIndx2=DataArrayIdType::New();
   MCAuto<MEDCouplingUMesh> mDesc2=subMesh->buildDescendingConnectivity(desc2,descIndx2,revDesc2,revDescIndx2);//meshDim==2 spaceDim==3
   revDesc2=0; revDescIndx2=0;
   MCAuto<MEDCouplingUMesh> mDesc1=mDesc2->buildDescendingConnectivity(desc1,descIndx1,revDesc1,revDescIndx1);//meshDim==1 spaceDim==3
   revDesc1=0; revDescIndx1=0;
   mDesc1->fillCellIdsToKeepFromNodeIds(&nodes[0],&nodes[0]+nodes.size(),true,cellIds1D);
-  MCAuto<DataArrayInt> cellIds1DTmp(cellIds1D);
+  MCAuto<DataArrayIdType> cellIds1DTmp(cellIds1D);
   //
-  std::vector<int> cut3DCurve(mDesc1->getNumberOfCells(),-2);
-  for(const int *it=cellIds1D->begin();it!=cellIds1D->end();it++)
+  std::vector<mcIdType> cut3DCurve(mDesc1->getNumberOfCells(),-2);
+  for(const mcIdType *it=cellIds1D->begin();it!=cellIds1D->end();it++)
     cut3DCurve[*it]=-1;
   mDesc1->split3DCurveWithPlane(origin,vec,eps,cut3DCurve);
-  std::vector< std::pair<int,int> > cut3DSurf(mDesc2->getNumberOfCells());
+  std::vector< std::pair<mcIdType,mcIdType> > cut3DSurf(mDesc2->getNumberOfCells());
   AssemblyForSplitFrom3DCurve(cut3DCurve,nodes,mDesc2->getNodalConnectivity()->getConstPointer(),mDesc2->getNodalConnectivityIndex()->getConstPointer(),
                               mDesc1->getNodalConnectivity()->getConstPointer(),mDesc1->getNodalConnectivityIndex()->getConstPointer(),
                               desc1->getConstPointer(),descIndx1->getConstPointer(),cut3DSurf);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New()),cellIds2(DataArrayInt::New());
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()),connI(DataArrayIdType::New()),cellIds2(DataArrayIdType::New());
   connI->pushBackSilent(0); conn->alloc(0,1); cellIds2->alloc(0,1);
   subMesh->assemblyForSplitFrom3DSurf(cut3DSurf,desc2->getConstPointer(),descIndx2->getConstPointer(),conn,connI,cellIds2);
   if(cellIds2->empty())
@@ -3587,14 +3588,14 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildSlice3D(const double *origin, const dou
 
 /*!
  * Creates an 1D mesh by cutting \a this 2D mesh in 3D space with a plane. In
-addition to the mesh, returns a new DataArrayInt, of length equal to the number of 1D cells in the result mesh, holding, for each cell in the result mesh, an id of a 2D cell it comes
+addition to the mesh, returns a new DataArrayIdType, of length equal to the number of 1D cells in the result mesh, holding, for each cell in the result mesh, an id of a 2D cell it comes
 from. If a result segment is shared by two 2D cells, then the segment in included twice in
 the result mesh.
  *  \param [in] origin - 3 components of a point defining location of the plane.
  *  \param [in] vec - 3 components of a vector normal to the plane. Vector magnitude
  *         must be greater than 1e-6.
  *  \param [in] eps - half-thickness of the plane.
- *  \param [out] cellIds - a new instance of DataArrayInt holding ids of faces
+ *  \param [out] cellIds - a new instance of DataArrayIdType holding ids of faces
  *         producing correspondent segments. The caller is to delete this array
  *         using decrRef() as it is no more needed.
  *  \return MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. This is an 1D
@@ -3608,54 +3609,54 @@ the result mesh.
  *  \throw If the plane does not intersect any 2D cell of \a this mesh.
  *  \throw If \a this includes quadratic cells.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildSlice3DSurf(const double *origin, const double *vec, double eps, DataArrayInt *&cellIds) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildSlice3DSurf(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const
 {
   checkFullyDefined();
   if(getMeshDimension()!=2 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSlice3DSurf works on umeshes with meshdim equal to 2 and spaceDim equal to 3 !");
-  MCAuto<DataArrayInt> candidates(getCellIdsCrossingPlane(origin,vec,eps));
+  MCAuto<DataArrayIdType> candidates(getCellIdsCrossingPlane(origin,vec,eps));
   if(candidates->empty())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSlice3DSurf : No 3D surf cells in this intercepts the specified plane considering bounding boxes !");
-  std::vector<int> nodes;
-  DataArrayInt *cellIds1D(0);
+  std::vector<mcIdType> nodes;
+  DataArrayIdType *cellIds1D(0);
   MCAuto<MEDCouplingUMesh> subMesh(buildPartOfMySelf(candidates->begin(),candidates->end(),false));
   subMesh->findNodesOnPlane(origin,vec,eps,nodes);
-  MCAuto<DataArrayInt> desc1(DataArrayInt::New()),descIndx1(DataArrayInt::New()),revDesc1(DataArrayInt::New()),revDescIndx1(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc1(DataArrayIdType::New()),descIndx1(DataArrayIdType::New()),revDesc1(DataArrayIdType::New()),revDescIndx1(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> mDesc1(subMesh->buildDescendingConnectivity(desc1,descIndx1,revDesc1,revDescIndx1));//meshDim==1 spaceDim==3
   mDesc1->fillCellIdsToKeepFromNodeIds(&nodes[0],&nodes[0]+nodes.size(),true,cellIds1D);
-  MCAuto<DataArrayInt> cellIds1DTmp(cellIds1D);
+  MCAuto<DataArrayIdType> cellIds1DTmp(cellIds1D);
   //
-  std::vector<int> cut3DCurve(mDesc1->getNumberOfCells(),-2);
-  for(const int *it=cellIds1D->begin();it!=cellIds1D->end();it++)
+  std::vector<mcIdType> cut3DCurve(mDesc1->getNumberOfCells(),-2);
+  for(const mcIdType *it=cellIds1D->begin();it!=cellIds1D->end();it++)
     cut3DCurve[*it]=-1;
   mDesc1->split3DCurveWithPlane(origin,vec,eps,cut3DCurve);
-  int ncellsSub=subMesh->getNumberOfCells();
-  std::vector< std::pair<int,int> > cut3DSurf(ncellsSub);
+  mcIdType ncellsSub=subMesh->getNumberOfCells();
+  std::vector< std::pair<mcIdType,mcIdType> > cut3DSurf(ncellsSub);
   AssemblyForSplitFrom3DCurve(cut3DCurve,nodes,subMesh->getNodalConnectivity()->getConstPointer(),subMesh->getNodalConnectivityIndex()->getConstPointer(),
                               mDesc1->getNodalConnectivity()->getConstPointer(),mDesc1->getNodalConnectivityIndex()->getConstPointer(),
                               desc1->getConstPointer(),descIndx1->getConstPointer(),cut3DSurf);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New()),cellIds2(DataArrayInt::New()); connI->pushBackSilent(0);
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()),connI(DataArrayIdType::New()),cellIds2(DataArrayIdType::New()); connI->pushBackSilent(0);
   conn->alloc(0,1);
-  const int *nodal=subMesh->getNodalConnectivity()->getConstPointer();
-  const int *nodalI=subMesh->getNodalConnectivityIndex()->getConstPointer();
-  for(int i=0;i<ncellsSub;i++)
+  const mcIdType *nodal=subMesh->getNodalConnectivity()->getConstPointer();
+  const mcIdType *nodalI=subMesh->getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType i=0;i<ncellsSub;i++)
     {
       if(cut3DSurf[i].first!=-1 && cut3DSurf[i].second!=-1)
         {
           if(cut3DSurf[i].first!=-2)
             {
-              conn->pushBackSilent((int)INTERP_KERNEL::NORM_SEG2); conn->pushBackSilent(cut3DSurf[i].first); conn->pushBackSilent(cut3DSurf[i].second);
+              conn->pushBackSilent(ToIdType(INTERP_KERNEL::NORM_SEG2)); conn->pushBackSilent(cut3DSurf[i].first); conn->pushBackSilent(cut3DSurf[i].second);
               connI->pushBackSilent(conn->getNumberOfTuples());
               cellIds2->pushBackSilent(i);
             }
           else
             {
-              int cellId3DSurf=cut3DSurf[i].second;
-              int offset=nodalI[cellId3DSurf]+1;
-              int nbOfEdges=nodalI[cellId3DSurf+1]-offset;
-              for(int j=0;j<nbOfEdges;j++)
+              mcIdType cellId3DSurf=cut3DSurf[i].second;
+              mcIdType offset=nodalI[cellId3DSurf]+1;
+              mcIdType nbOfEdges=nodalI[cellId3DSurf+1]-offset;
+              for(mcIdType j=0;j<nbOfEdges;j++)
                 {
-                  conn->pushBackSilent((int)INTERP_KERNEL::NORM_SEG2); conn->pushBackSilent(nodal[offset+j]); conn->pushBackSilent(nodal[offset+(j+1)%nbOfEdges]);
+                  conn->pushBackSilent(ToIdType(INTERP_KERNEL::NORM_SEG2)); conn->pushBackSilent(nodal[offset+j]); conn->pushBackSilent(nodal[offset+(j+1)%nbOfEdges]);
                   connI->pushBackSilent(conn->getNumberOfTuples());
                   cellIds2->pushBackSilent(cellId3DSurf);
                 }
@@ -3679,52 +3680,52 @@ MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::clipSingle3DCellByPlane(const double
   if(getNumberOfCells()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::clipSingle3DCellByPlane works only on mesh containing exactly one cell !");
   //
-  std::vector<int> nodes;
+  std::vector<mcIdType> nodes;
   findNodesOnPlane(origin,vec,eps,nodes);
-  MCAuto<DataArrayInt> desc1(DataArrayInt::New()),desc2(DataArrayInt::New()),descIndx1(DataArrayInt::New()),descIndx2(DataArrayInt::New()),revDesc1(DataArrayInt::New()),revDesc2(DataArrayInt::New()),revDescIndx1(DataArrayInt::New()),revDescIndx2(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc1(DataArrayIdType::New()),desc2(DataArrayIdType::New()),descIndx1(DataArrayIdType::New()),descIndx2(DataArrayIdType::New()),revDesc1(DataArrayIdType::New()),revDesc2(DataArrayIdType::New()),revDescIndx1(DataArrayIdType::New()),revDescIndx2(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> mDesc2(buildDescendingConnectivity(desc2,descIndx2,revDesc2,revDescIndx2));//meshDim==2 spaceDim==3
   revDesc2=0; revDescIndx2=0;
   MCAuto<MEDCouplingUMesh> mDesc1(mDesc2->buildDescendingConnectivity(desc1,descIndx1,revDesc1,revDescIndx1));//meshDim==1 spaceDim==3
   revDesc1=0; revDescIndx1=0;
-  DataArrayInt *cellIds1D(0);
+  DataArrayIdType *cellIds1D(0);
   mDesc1->fillCellIdsToKeepFromNodeIds(&nodes[0],&nodes[0]+nodes.size(),true,cellIds1D);
-  MCAuto<DataArrayInt> cellIds1DTmp(cellIds1D);
-  std::vector<int> cut3DCurve(mDesc1->getNumberOfCells(),-2);
-  for(const int *it=cellIds1D->begin();it!=cellIds1D->end();it++)
+  MCAuto<DataArrayIdType> cellIds1DTmp(cellIds1D);
+  std::vector<mcIdType> cut3DCurve(mDesc1->getNumberOfCells(),-2);
+  for(const mcIdType *it=cellIds1D->begin();it!=cellIds1D->end();it++)
     cut3DCurve[*it]=-1;
   bool sameNbNodes;
   {
-    int oldNbNodes(mDesc1->getNumberOfNodes());
+    mcIdType oldNbNodes(mDesc1->getNumberOfNodes());
     mDesc1->split3DCurveWithPlane(origin,vec,eps,cut3DCurve);
     sameNbNodes=(mDesc1->getNumberOfNodes()==oldNbNodes);
   }
-  std::vector< std::pair<int,int> > cut3DSurf(mDesc2->getNumberOfCells());
+  std::vector< std::pair<mcIdType,mcIdType> > cut3DSurf(mDesc2->getNumberOfCells());
   AssemblyForSplitFrom3DCurve(cut3DCurve,nodes,mDesc2->getNodalConnectivity()->begin(),mDesc2->getNodalConnectivityIndex()->begin(),
                               mDesc1->getNodalConnectivity()->begin(),mDesc1->getNodalConnectivityIndex()->begin(),
                               desc1->begin(),descIndx1->begin(),cut3DSurf);
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()),connI(DataArrayIdType::New());
   connI->pushBackSilent(0); conn->alloc(0,1);
   {
-    MCAuto<DataArrayInt> cellIds2(DataArrayInt::New()); cellIds2->alloc(0,1);
+    MCAuto<DataArrayIdType> cellIds2(DataArrayIdType::New()); cellIds2->alloc(0,1);
     assemblyForSplitFrom3DSurf(cut3DSurf,desc2->begin(),descIndx2->begin(),conn,connI,cellIds2);
     if(cellIds2->empty())
       throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSlice3D : No 3D cells in this intercepts the specified plane !");
   }
-  std::vector<std::vector<int> > res;
+  std::vector<std::vector<mcIdType> > res;
   buildSubCellsFromCut(cut3DSurf,desc2->begin(),descIndx2->begin(),mDesc1->getCoords()->begin(),eps,res);
   std::size_t sz(res.size());
-  if(res.size()==mDesc1->getNumberOfCells() && sameNbNodes)
+  if(ToIdType(res.size())==mDesc1->getNumberOfCells() && sameNbNodes)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::clipSingle3DCellByPlane : cell is not clipped !");
   for(std::size_t i=0;i<sz;i++)
     {
-      conn->pushBackSilent((int)INTERP_KERNEL::NORM_POLYGON);
+      conn->pushBackSilent(ToIdType(INTERP_KERNEL::NORM_POLYGON));
       conn->insertAtTheEnd(res[i].begin(),res[i].end());
       connI->pushBackSilent(conn->getNumberOfTuples());
     }
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::New("",2));
   ret->setCoords(mDesc1->getCoords());
   ret->setConnectivity(conn,connI,true);
-  int nbCellsRet(ret->getNumberOfCells());
+  mcIdType nbCellsRet(ret->getNumberOfCells());
   //
   MCAuto<DataArrayDouble> vec2(DataArrayDouble::New()); vec2->alloc(1,3); std::copy(vec,vec+3,vec2->getPointer());
   MCAuto<MEDCouplingFieldDouble> ortho(ret->buildOrthogonalField());
@@ -3740,13 +3741,13 @@ MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::clipSingle3DCellByPlane(const double
   vec2->setPartOfValuesSimple1(vec[0],0,nbCellsRet,1,0,1,1); vec2->setPartOfValuesSimple1(vec[1],0,nbCellsRet,1,1,2,1); vec2->setPartOfValuesSimple1(vec[2],0,nbCellsRet,1,2,3,1);
   MCAuto<DataArrayDouble> dott2(DataArrayDouble::Dot(occm,vec2));
   //
-  const int *cPtr(ret->getNodalConnectivity()->begin()),*ciPtr(ret->getNodalConnectivityIndex()->begin());
+  const mcIdType *cPtr(ret->getNodalConnectivity()->begin()),*ciPtr(ret->getNodalConnectivityIndex()->begin());
   MCAuto<MEDCouplingUMesh> ret2(MEDCouplingUMesh::New("Clip3D",3));
   ret2->setCoords(mDesc1->getCoords());
-  MCAuto<DataArrayInt> conn2(DataArrayInt::New()),conn2I(DataArrayInt::New());
+  MCAuto<DataArrayIdType> conn2(DataArrayIdType::New()),conn2I(DataArrayIdType::New());
   conn2I->pushBackSilent(0); conn2->alloc(0,1);
-  std::vector<int> cell0(1,(int)INTERP_KERNEL::NORM_POLYHED);
-  std::vector<int> cell1(1,(int)INTERP_KERNEL::NORM_POLYHED);
+  std::vector<mcIdType> cell0(1,ToIdType(INTERP_KERNEL::NORM_POLYHED));
+  std::vector<mcIdType> cell1(1,ToIdType(INTERP_KERNEL::NORM_POLYHED));
   if(dott->getIJ(0,0)>0)
     {
       cell0.insert(cell0.end(),cPtr+1,cPtr+ciPtr[1]);
@@ -3757,7 +3758,7 @@ MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::clipSingle3DCellByPlane(const double
       cell1.insert(cell1.end(),cPtr+1,cPtr+ciPtr[1]);
       std::reverse_copy(cPtr+1,cPtr+ciPtr[1],std::inserter(cell0,cell0.end()));
     }
-  for(int i=1;i<nbCellsRet;i++)
+  for(mcIdType i=1;i<nbCellsRet;i++)
     {
       if(dott2->getIJ(i,0)<0)
         {
@@ -3792,7 +3793,7 @@ MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::clipSingle3DCellByPlane(const double
  *  \param [in] vec - 3 components of a vector normal to the plane. Vector magnitude
  *         must be greater than 1e-6.
  *  \param [in] eps - half-thickness of the plane.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of the found
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of the found
  *         cells. The caller is to delete this array using decrRef() as it is no more
  *         needed.
  *  \throw If the coordinates array is not set.
@@ -3801,7 +3802,7 @@ MCAuto<MEDCouplingUMesh> MEDCouplingUMesh::clipSingle3DCellByPlane(const double
  *  \throw If magnitude of \a vec is less than 1e-6.
  *  \sa buildSlice3D()
  */
-DataArrayInt *MEDCouplingUMesh::getCellIdsCrossingPlane(const double *origin, const double *vec, double eps) const
+DataArrayIdType *MEDCouplingUMesh::getCellIdsCrossingPlane(const double *origin, const double *vec, double eps) const
 {
   checkFullyDefined();
   if(getSpaceDimension()!=3)
@@ -3812,7 +3813,7 @@ DataArrayInt *MEDCouplingUMesh::getCellIdsCrossingPlane(const double *origin, co
   double vec2[3];
   vec2[0]=vec[1]; vec2[1]=-vec[0]; vec2[2]=0.;//vec2 is the result of cross product of vec with (0,0,1)
   double angle=acos(vec[2]/normm);
-  MCAuto<DataArrayInt> cellIds;
+  MCAuto<DataArrayIdType> cellIds;
   double bbox[6];
   if(angle>eps)
     {
@@ -3846,12 +3847,12 @@ bool MEDCouplingUMesh::isContiguous1D() const
 {
   if(getMeshDimension()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::isContiguous1D : this method has a sense only for 1D mesh !");
-  int nbCells=getNumberOfCells();
+  mcIdType nbCells=getNumberOfCells();
   if(nbCells<1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::isContiguous1D : this method has a sense for non empty mesh !");
-  const int *connI(_nodal_connec_index->begin()),*conn(_nodal_connec->begin());
-  int ref=conn[connI[0]+2];
-  for(int i=1;i<nbCells;i++)
+  const mcIdType *connI(_nodal_connec_index->begin()),*conn(_nodal_connec->begin());
+  mcIdType ref=conn[connI[0]+2];
+  for(mcIdType i=1;i<nbCells;i++)
     {
       if(conn[connI[i]+1]!=ref)
         return false;
@@ -3879,7 +3880,7 @@ void MEDCouplingUMesh::project1D(const double *pt, const double *v, double eps,
   MCAuto<MEDCouplingFieldDouble> f=buildDirectionVectorField();
   const double *fPtr=f->getArray()->getConstPointer();
   double tmp[3];
-  for(std::size_t i=0;i<getNumberOfCells();i++)
+  for(mcIdType i=0;i<getNumberOfCells();i++)
     {
       const double *tmp1=fPtr+3*i;
       tmp[0]=tmp1[1]*v[2]-tmp1[2]*v[1];
@@ -3891,7 +3892,7 @@ void MEDCouplingUMesh::project1D(const double *pt, const double *v, double eps,
         throw INTERP_KERNEL::Exception("UMesh::Projection 1D failed !");
     }
   const double *coo=getCoords()->getConstPointer();
-  for(int i=0;i<getNumberOfNodes();i++)
+  for(mcIdType i=0;i<getNumberOfNodes();i++)
     {
       std::transform(coo+i*3,coo+i*3+3,pt,tmp,std::minus<double>());
       std::transform(tmp,tmp+3,v,tmp,std::multiplies<double>());
@@ -3920,7 +3921,7 @@ void MEDCouplingUMesh::project1D(const double *pt, const double *v, double eps,
  * dimension - 1.
  * \sa DataArrayDouble::distanceToTuple, MEDCouplingUMesh::distanceToPoints
  */
-double MEDCouplingUMesh::distanceToPoint(const double *ptBg, const double *ptEnd, int& cellId) const
+double MEDCouplingUMesh::distanceToPoint(const double *ptBg, const double *ptEnd, mcIdType& cellId) const
 {
   int meshDim=getMeshDimension(),spaceDim=getSpaceDimension();
   if(meshDim!=spaceDim-1)
@@ -3928,12 +3929,12 @@ double MEDCouplingUMesh::distanceToPoint(const double *ptBg, const double *ptEnd
   if(meshDim!=2 && meshDim!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::distanceToPoint : only mesh dimension 2 and 1 are implemented !");
   checkFullyDefined();
-  if((int)std::distance(ptBg,ptEnd)!=spaceDim)
+  if(ToIdType(std::distance(ptBg,ptEnd))!=spaceDim)
     { std::ostringstream oss; oss << "MEDCouplingUMesh::distanceToPoint : input point has to have dimension equal to the space dimension of this (" << spaceDim << ") !"; throw INTERP_KERNEL::Exception(oss.str()); }
-  DataArrayInt *ret1=0;
+  DataArrayIdType *ret1=0;
   MCAuto<DataArrayDouble> pts=DataArrayDouble::New(); pts->useArray(ptBg,false,DeallocType::C_DEALLOC,1,spaceDim);
   MCAuto<DataArrayDouble> ret0=distanceToPoints(pts,ret1);
-  MCAuto<DataArrayInt> ret1Safe(ret1);
+  MCAuto<DataArrayIdType> ret1Safe(ret1);
   cellId=*ret1Safe->begin();
   return *ret0->begin();
 }
@@ -3959,7 +3960,7 @@ double MEDCouplingUMesh::distanceToPoint(const double *ptBg, const double *ptEnd
  * \throw if mesh dimension of \a this is not equal to space dimension - 1.
  * \sa DataArrayDouble::distanceToTuple, MEDCouplingUMesh::distanceToPoint
  */
-DataArrayDouble *MEDCouplingUMesh::distanceToPoints(const DataArrayDouble *pts, DataArrayInt *& cellIds) const
+DataArrayDouble *MEDCouplingUMesh::distanceToPoints(const DataArrayDouble *pts, DataArrayIdType *& cellIds) const
 {
   if(!pts)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::distanceToPoints : input points pointer is NULL !");
@@ -3969,20 +3970,20 @@ DataArrayDouble *MEDCouplingUMesh::distanceToPoints(const DataArrayDouble *pts,
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::distanceToPoints works only for spaceDim=meshDim+1 !");
   if(meshDim!=2 && meshDim!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::distanceToPoints : only mesh dimension 2 and 1 are implemented !");
-  if((int)pts->getNumberOfComponents()!=spaceDim)
+  if(ToIdType(pts->getNumberOfComponents())!=spaceDim)
     {
       std::ostringstream oss; oss << "MEDCouplingUMesh::distanceToPoints : input pts DataArrayDouble has " << pts->getNumberOfComponents() << " components whereas it should be equal to " << spaceDim << " (mesh spaceDimension) !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
   checkFullyDefined();
-  int nbCells=getNumberOfCells();
+  mcIdType nbCells=getNumberOfCells();
   if(nbCells==0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::distanceToPoints : no cells in this !");
-  int nbOfPts=pts->getNumberOfTuples();
+  mcIdType nbOfPts=pts->getNumberOfTuples();
   MCAuto<DataArrayDouble> ret0=DataArrayDouble::New(); ret0->alloc(nbOfPts,1);
-  MCAuto<DataArrayInt> ret1=DataArrayInt::New(); ret1->alloc(nbOfPts,1);
-  const int *nc=_nodal_connec->begin(),*ncI=_nodal_connec_index->begin(); const double *coords=_coords->begin();
-  double *ret0Ptr=ret0->getPointer(); int *ret1Ptr=ret1->getPointer(); const double *ptsPtr=pts->begin();
+  MCAuto<DataArrayIdType> ret1=DataArrayIdType::New(); ret1->alloc(nbOfPts,1);
+  const mcIdType *nc=_nodal_connec->begin(),*ncI=_nodal_connec_index->begin(); const double *coords=_coords->begin();
+  double *ret0Ptr=ret0->getPointer(); mcIdType *ret1Ptr=ret1->getPointer(); const double *ptsPtr=pts->begin();
   MCAuto<DataArrayDouble> bboxArr(getBoundingBoxForBBTree());
   const double *bbox(bboxArr->begin());
   switch(spaceDim)
@@ -3990,10 +3991,10 @@ DataArrayDouble *MEDCouplingUMesh::distanceToPoints(const DataArrayDouble *pts,
     case 3:
       {
         BBTreeDst<3> myTree(bbox,0,0,nbCells);
-        for(int i=0;i<nbOfPts;i++,ret0Ptr++,ret1Ptr++,ptsPtr+=3)
+        for(mcIdType i=0;i<nbOfPts;i++,ret0Ptr++,ret1Ptr++,ptsPtr+=3)
           {
             double x=std::numeric_limits<double>::max();
-            std::vector<int> elems;
+            std::vector<mcIdType> elems;
             myTree.getMinDistanceOfMax(ptsPtr,x);
             myTree.getElemsWhoseMinDistanceToPtSmallerThan(ptsPtr,x,elems);
             DistanceToPoint3DSurfAlg(ptsPtr,&elems[0],&elems[0]+elems.size(),coords,nc,ncI,*ret0Ptr,*ret1Ptr);
@@ -4003,10 +4004,10 @@ DataArrayDouble *MEDCouplingUMesh::distanceToPoints(const DataArrayDouble *pts,
     case 2:
       {
         BBTreeDst<2> myTree(bbox,0,0,nbCells);
-        for(int i=0;i<nbOfPts;i++,ret0Ptr++,ret1Ptr++,ptsPtr+=2)
+        for(mcIdType i=0;i<nbOfPts;i++,ret0Ptr++,ret1Ptr++,ptsPtr+=2)
           {
             double x=std::numeric_limits<double>::max();
-            std::vector<int> elems;
+            std::vector<mcIdType> elems;
             myTree.getMinDistanceOfMax(ptsPtr,x);
             myTree.getElemsWhoseMinDistanceToPtSmallerThan(ptsPtr,x,elems);
             DistanceToPoint2DCurveAlg(ptsPtr,&elems[0],&elems[0]+elems.size(),coords,nc,ncI,*ret0Ptr,*ret1Ptr);
@@ -4034,14 +4035,14 @@ DataArrayDouble *MEDCouplingUMesh::distanceToPoints(const DataArrayDouble *pts,
  *          faster.
  *  \param [in] pos - array of coordinates of the ball central point.
  *  \param [in] eps - ball radius.
- *  \return int - a smallest id of cells being in contact with the ball, -1 in case
+ *  \return mcIdType - a smallest id of cells being in contact with the ball, -1 in case
  *         if there are no such cells.
  *  \throw If the coordinates array is not set.
  *  \throw If \a this->getMeshDimension() != \a this->getSpaceDimension().
  */
-int MEDCouplingUMesh::getCellContainingPoint(const double *pos, double eps) const
+mcIdType MEDCouplingUMesh::getCellContainingPoint(const double *pos, double eps) const
 {
-  std::vector<int> elts;
+  std::vector<mcIdType> elts;
   getCellsContainingPoint(pos,eps,elts);
   if(elts.empty())
     return -1;
@@ -4067,16 +4068,16 @@ int MEDCouplingUMesh::getCellContainingPoint(const double *pos, double eps) cons
  *  \ref  py_mcumesh_getCellsContainingPoint "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const
+void MEDCouplingUMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const
 {
-  MCAuto<DataArrayInt> eltsUg,eltsIndexUg;
+  MCAuto<DataArrayIdType> eltsUg,eltsIndexUg;
   getCellsContainingPoints(pos,1,eps,eltsUg,eltsIndexUg);
   elts.clear(); elts.insert(elts.end(),eltsUg->begin(),eltsUg->end());
 }
 
-void MEDCouplingUMesh::getCellsContainingPointsZeAlg(const double *pos, int nbOfPoints, double eps,
-                                                     MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex,
-                                                     std::function<bool(INTERP_KERNEL::NormalizedCellType,int)> sensibilityTo2DQuadraticLinearCellsFunc) const
+void MEDCouplingUMesh::getCellsContainingPointsZeAlg(const double *pos, mcIdType nbOfPoints, double eps,
+                                                     MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex,
+                                                     std::function<bool(INTERP_KERNEL::NormalizedCellType,mcIdType)> sensibilityTo2DQuadraticLinearCellsFunc) const
 {
   int spaceDim(getSpaceDimension()),mDim(getMeshDimension());
   if(spaceDim==3)
@@ -4142,8 +4143,8 @@ void MEDCouplingUMesh::getCellsContainingPointsZeAlg(const double *pos, int nbOf
  *  \ref  py_mcumesh_getCellsContainingPoints "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::getCellsContainingPoints(const double *pos, int nbOfPoints, double eps,
-                                                MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const
+void MEDCouplingUMesh::getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps,
+                                                MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const
 {
   auto yesImSensibleTo2DQuadraticLinearCellsFunc([](INTERP_KERNEL::NormalizedCellType ct, int mdim) { return INTERP_KERNEL::CellModel::GetCellModel(ct).isQuadratic() && mdim == 2; } );
   this->getCellsContainingPointsZeAlg(pos,nbOfPoints,eps,elts,eltsIndex,yesImSensibleTo2DQuadraticLinearCellsFunc);
@@ -4156,9 +4157,9 @@ void MEDCouplingUMesh::getCellsContainingPoints(const double *pos, int nbOfPoint
  * 
  * \sa MEDCouplingUMesh::getCellsContainingPoints, MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss
  */
-void MEDCouplingUMesh::getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, int nbOfPoints, double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const
+void MEDCouplingUMesh::getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const
 {
-  auto noImNotSensibleTo2DQuadraticLinearCellsFunc([](INTERP_KERNEL::NormalizedCellType,int) { return false; } );
+  auto noImNotSensibleTo2DQuadraticLinearCellsFunc([](INTERP_KERNEL::NormalizedCellType,mcIdType) { return false; } );
   this->getCellsContainingPointsZeAlg(pos,nbOfPoints,eps,elts,eltsIndex,noImNotSensibleTo2DQuadraticLinearCellsFunc);
 }
 
@@ -4172,7 +4173,7 @@ void MEDCouplingUMesh::getCellsContainingPointsLinearPartOnlyOnNonDynType(const
  *  \throw If \a this->getMeshDimension() != 2.
  *  \throw If \a this->getSpaceDimension() != 2 && \a this->getSpaceDimension() != 3.
  */
-void MEDCouplingUMesh::checkButterflyCells(std::vector<int>& cells, double eps) const
+void MEDCouplingUMesh::checkButterflyCells(std::vector<mcIdType>& cells, double eps) const
 {
   const char msg[]="Butterfly detection work only for 2D cells with spaceDim==2 or 3!";
   if(getMeshDimension()!=2)
@@ -4180,14 +4181,14 @@ void MEDCouplingUMesh::checkButterflyCells(std::vector<int>& cells, double eps)
   int spaceDim=getSpaceDimension();
   if(spaceDim!=2 && spaceDim!=3)
     throw INTERP_KERNEL::Exception(msg);
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connI=_nodal_connec_index->getConstPointer();
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connI=_nodal_connec_index->getConstPointer();
+  mcIdType nbOfCells=getNumberOfCells();
   std::vector<double> cell2DinS2;
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int offset=connI[i];
-      int nbOfNodesForCell=connI[i+1]-offset-1;
+      mcIdType offset=connI[i];
+      mcIdType nbOfNodesForCell=connI[i+1]-offset-1;
       if(nbOfNodesForCell<=3)
         continue;
       bool isQuad=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[offset]).isQuadratic();
@@ -4213,26 +4214,26 @@ void MEDCouplingUMesh::checkButterflyCells(std::vector<int>& cells, double eps)
  * \return a newly allocated array containing cellIds that have been modified if any. If no cells have been impacted by this method NULL is returned.
  * \sa MEDCouplingUMesh::colinearize2D
  */
-DataArrayInt *MEDCouplingUMesh::convexEnvelop2D()
+DataArrayIdType *MEDCouplingUMesh::convexEnvelop2D()
 {
   if(getMeshDimension()!=2 || getSpaceDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convexEnvelop2D  works only for meshDim=2 and spaceDim=2 !");
   checkFullyDefined();
   const double *coords=getCoords()->getConstPointer();
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> nodalConnecIndexOut=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> nodalConnecIndexOut=DataArrayIdType::New();
   nodalConnecIndexOut->alloc(nbOfCells+1,1);
-  MCAuto<DataArrayInt> nodalConnecOut(DataArrayInt::New());
-  int *workIndexOut=nodalConnecIndexOut->getPointer();
+  MCAuto<DataArrayIdType> nodalConnecOut(DataArrayIdType::New());
+  mcIdType *workIndexOut=nodalConnecIndexOut->getPointer();
   *workIndexOut=0;
-  const int *nodalConnecIn=_nodal_connec->getConstPointer();
-  const int *nodalConnecIndexIn=_nodal_connec_index->getConstPointer();
+  const mcIdType *nodalConnecIn=_nodal_connec->getConstPointer();
+  const mcIdType *nodalConnecIndexIn=_nodal_connec_index->getConstPointer();
   std::set<INTERP_KERNEL::NormalizedCellType> types;
-  MCAuto<DataArrayInt> isChanged(DataArrayInt::New());
+  MCAuto<DataArrayIdType> isChanged(DataArrayIdType::New());
   isChanged->alloc(0,1);
-  for(int i=0;i<nbOfCells;i++,workIndexOut++)
+  for(mcIdType i=0;i<nbOfCells;i++,workIndexOut++)
     {
-      int pos=nodalConnecOut->getNumberOfTuples();
+      mcIdType pos=nodalConnecOut->getNumberOfTuples();
       if(BuildConvexEnvelopOf2DCellJarvis(coords,nodalConnecIn+nodalConnecIndexIn[i],nodalConnecIn+nodalConnecIndexIn[i+1],nodalConnecOut))
         isChanged->pushBackSilent(i);
       types.insert((INTERP_KERNEL::NormalizedCellType)nodalConnecOut->getIJ(pos,0));
@@ -4278,7 +4279,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMesh(const MEDCouplingUMesh *me
       else
         throw INTERP_KERNEL::Exception("Invalid 2D mesh and 1D mesh because 2D mesh has quadratic cells and 1D is not fully quadratic !");
     }
-  int oldNbOfNodes(getNumberOfNodes());
+  mcIdType oldNbOfNodes(getNumberOfNodes());
   MCAuto<DataArrayDouble> newCoords;
   switch(policy)
   {
@@ -4312,8 +4313,8 @@ bool MEDCouplingUMesh::isFullyQuadratic() const
 {
   checkFullyDefined();
   bool ret=true;
-  int nbOfCells=getNumberOfCells();
-  for(int i=0;i<nbOfCells && ret;i++)
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells && ret;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
@@ -4332,8 +4333,8 @@ bool MEDCouplingUMesh::isPresenceOfQuadratic() const
 {
   checkFullyDefined();
   bool ret=false;
-  int nbOfCells=getNumberOfCells();
-  for(int i=0;i<nbOfCells && !ret;i++)
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells && !ret;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
@@ -4351,10 +4352,10 @@ bool MEDCouplingUMesh::isPresenceOfQuadratic() const
 void MEDCouplingUMesh::convertQuadraticCellsToLinear()
 {
   checkFullyDefined();
-  int nbOfCells(getNumberOfCells());
-  int delta=0;
-  const int *iciptr=_nodal_connec_index->begin();
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType delta=0;
+  const mcIdType *iciptr=_nodal_connec_index->begin();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=getTypeOfCell(i);
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
@@ -4370,14 +4371,14 @@ void MEDCouplingUMesh::convertQuadraticCellsToLinear()
     }
   if(delta==0)
     return ;
-  MCAuto<DataArrayInt> newConn(DataArrayInt::New()),newConnI(DataArrayInt::New());
-  const int *icptr(_nodal_connec->begin());
+  MCAuto<DataArrayIdType> newConn(DataArrayIdType::New()),newConnI(DataArrayIdType::New());
+  const mcIdType *icptr(_nodal_connec->begin());
   newConn->alloc(getNodalConnectivityArrayLen()-delta,1);
   newConnI->alloc(nbOfCells+1,1);
-  int *ocptr(newConn->getPointer()),*ociptr(newConnI->getPointer());
+  mcIdType *ocptr(newConn->getPointer()),*ociptr(newConnI->getPointer());
   *ociptr=0;
   _types.clear();
-  for(int i=0;i<nbOfCells;i++,ociptr++)
+  for(mcIdType i=0;i<nbOfCells;i++,ociptr++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)icptr[iciptr[i]];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
@@ -4392,10 +4393,10 @@ void MEDCouplingUMesh::convertQuadraticCellsToLinear()
           INTERP_KERNEL::NormalizedCellType typel=cm.getLinearType();
           _types.insert(typel);
           const INTERP_KERNEL::CellModel& cml=INTERP_KERNEL::CellModel::GetCellModel(typel);
-          int newNbOfNodes=cml.getNumberOfNodes();
+          mcIdType newNbOfNodes=cml.getNumberOfNodes();
           if(cml.isDynamic())
             newNbOfNodes=(iciptr[i+1]-iciptr[i]-1)/2;
-          *ocptr++=(int)typel;
+          *ocptr++=ToIdType(typel);
           ocptr=std::copy(icptr+iciptr[i]+1,icptr+iciptr[i]+newNbOfNodes+1,ocptr);
           ociptr[1]=ociptr[0]+newNbOfNodes+1;
         }
@@ -4413,19 +4414,19 @@ void MEDCouplingUMesh::convertQuadraticCellsToLinear()
  *
  * \param [in] conversionType specifies the type of conversion expected. Only 0 (default) and 1 are supported presently. 0 those that creates the 'most' simple
  *             corresponding quadratic cells. 1 is those creating the 'most' complex.
- * \return a newly created DataArrayInt instance that the caller should deal with containing cell ids of converted cells.
+ * \return a newly created DataArrayIdType instance that the caller should deal with containing cell ids of converted cells.
  *
  * \throw if \a this is not fully defined. It throws too if \a conversionType is not in [0,1].
  *
  * \sa MEDCouplingUMesh::convertQuadraticCellsToLinear
  */
-DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic(int conversionType)
+DataArrayIdType *MEDCouplingUMesh::convertLinearCellsToQuadratic(int conversionType)
 {
-  DataArrayInt *conn=0,*connI=0;
+  DataArrayIdType *conn=0,*connI=0;
   DataArrayDouble *coords=0;
   std::set<INTERP_KERNEL::NormalizedCellType> types;
   checkFullyDefined();
-  MCAuto<DataArrayInt> ret,connSafe,connISafe;
+  MCAuto<DataArrayIdType> ret,connSafe,connISafe;
   MCAuto<DataArrayDouble> coordsSafe;
   int meshDim=getMeshDimension();
   switch(conversionType)
@@ -4530,8 +4531,8 @@ void MEDCouplingUMesh::tessellate2D(double eps)
  *
  * \sa buildDescendingConnectivity2
  */
-void MEDCouplingUMesh::splitSomeEdgesOf2DMesh(const DataArrayInt *nodeIdsToAdd, const DataArrayInt *nodeIdsIndexToAdd, const DataArrayInt *edgeIdsToBeSplit,
-                                              const MEDCouplingUMesh *mesh1Desc, const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *revDesc, const DataArrayInt *revDescI)
+void MEDCouplingUMesh::splitSomeEdgesOf2DMesh(const DataArrayIdType *nodeIdsToAdd, const DataArrayIdType *nodeIdsIndexToAdd, const DataArrayIdType *edgeIdsToBeSplit,
+                                              const MEDCouplingUMesh *mesh1Desc, const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *revDesc, const DataArrayIdType *revDescI)
 {
   if(!nodeIdsToAdd || !nodeIdsIndexToAdd || !edgeIdsToBeSplit || !mesh1Desc || !desc || !descI || !revDesc || !revDescI)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::splitSomeEdgesOf2DMesh : input pointers must be not NULL !");
@@ -4540,9 +4541,9 @@ void MEDCouplingUMesh::splitSomeEdgesOf2DMesh(const DataArrayInt *nodeIdsToAdd,
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::splitSomeEdgesOf2DMesh : this must have spacedim=meshdim=2 !");
   if(mesh1Desc->getSpaceDimension()!=2 || mesh1Desc->getMeshDimension()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::splitSomeEdgesOf2DMesh : mesh1Desc must be the explosion of this with spaceDim=2 and meshDim = 1 !");
-  //DataArrayInt *out0(0),*outi0(0);
+  //DataArrayIdType *out0(0),*outi0(0);
   //MEDCouplingUMesh::ExtractFromIndexedArrays(idsInDesc2DToBeRefined->begin(),idsInDesc2DToBeRefined->end(),dd3,dd4,out0,outi0);
-  //MCAuto<DataArrayInt> out0s(out0),outi0s(outi0);
+  //MCAuto<DataArrayIdType> out0s(out0),outi0s(outi0);
   //out0s=out0s->buildUnique(); out0s->sort(true);
 }
 #endif
@@ -4563,7 +4564,7 @@ void MEDCouplingUMesh::splitSomeEdgesOf2DMesh(const DataArrayInt *nodeIdsToAdd,
  * - INTERP_KERNEL::PLANAR_FACE_6 - to split HEXA8  into 6 TETRA4 (for 3D mesh only - see INTERP_KERNEL::SplittingPolicy for an image).
  *
  *
- *  \return DataArrayInt * - a new instance of DataArrayInt holding, for each new cell,
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding, for each new cell,
  *          an id of old cell producing it. The caller is to delete this array using
  *         decrRef() as it is no more needed.
  *
@@ -4574,7 +4575,7 @@ void MEDCouplingUMesh::splitSomeEdgesOf2DMesh(const DataArrayInt *nodeIdsToAdd,
  *  \throw If the nodal connectivity of cells is not defined.
  * \sa MEDCouplingUMesh::tetrahedrize, MEDCoupling1SGTUMesh::sortHexa8EachOther
  */
-DataArrayInt *MEDCouplingUMesh::simplexize(int policy)
+DataArrayIdType *MEDCouplingUMesh::simplexize(int policy)
 {
   switch(policy)
   {
@@ -4582,9 +4583,9 @@ DataArrayInt *MEDCouplingUMesh::simplexize(int policy)
       return simplexizePol0();
     case 1:
       return simplexizePol1();
-    case (int) INTERP_KERNEL::PLANAR_FACE_5:
+    case INTERP_KERNEL::PLANAR_FACE_5:
         return simplexizePlanarFace5();
-    case (int) INTERP_KERNEL::PLANAR_FACE_6:
+    case INTERP_KERNEL::PLANAR_FACE_6:
         return simplexizePlanarFace6();
     default:
       throw INTERP_KERNEL::Exception("MEDCouplingUMesh::simplexize : unrecognized policy ! Must be :\n  - 0 or 1 (only available for meshdim=2) \n  - PLANAR_FACE_5, PLANAR_FACE_6  (only for meshdim=3)");
@@ -4611,10 +4612,10 @@ bool MEDCouplingUMesh::areOnlySimplexCells() const
   int mdim=getMeshDimension();
   if(mdim<1 || mdim>3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::areOnlySimplexCells : only available with meshes having a meshdim 1, 2 or 3 !");
-  int nbCells=getNumberOfCells();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  for(int i=0;i<nbCells;i++)
+  mcIdType nbCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  for(mcIdType i=0;i<nbCells;i++)
     {
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
       if(!cm.isSimplex())
@@ -4641,20 +4642,20 @@ void MEDCouplingUMesh::convertDegeneratedCells()
   checkFullyDefined();
   if(getMeshDimension()<=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertDegeneratedCells works on umeshes with meshdim equals to 2 or 3 !");
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(nbOfCells<1)
     return ;
-  int initMeshLgth=getNodalConnectivityArrayLen();
-  int *conn=_nodal_connec->getPointer();
-  int *index=_nodal_connec_index->getPointer();
-  int posOfCurCell=0;
-  int newPos=0;
-  int lgthOfCurCell;
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType initMeshLgth=getNodalConnectivityArrayLen();
+  mcIdType *conn=_nodal_connec->getPointer();
+  mcIdType *index=_nodal_connec_index->getPointer();
+  mcIdType posOfCurCell=0;
+  mcIdType newPos=0;
+  mcIdType lgthOfCurCell;
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       lgthOfCurCell=index[i+1]-posOfCurCell;
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[posOfCurCell];
-      int newLgth;
+      mcIdType newLgth;
       INTERP_KERNEL::NormalizedCellType newType=INTERP_KERNEL::CellSimplify::simplifyDegeneratedCell(type,conn+posOfCurCell+1,lgthOfCurCell-1,
                                                                                                      conn+newPos+1,newLgth);
       conn[newPos]=newType;
@@ -4673,29 +4674,29 @@ void MEDCouplingUMesh::convertDegeneratedCells()
  *   - for a linear cell, all points in the connectivity are equal
  *   - for a quadratic cell, either the above, or a quadratic polygon with two (linear) points and two
  *   identical quadratic points
- * \return a new instance of DataArrayInt holding ids of removed cells. The caller is to delete
+ * \return a new instance of DataArrayIdType holding ids of removed cells. The caller is to delete
  *      this array using decrRef() as it is no more needed.
  */
-DataArrayInt *MEDCouplingUMesh::convertDegeneratedCellsAndRemoveFlatOnes()
+DataArrayIdType *MEDCouplingUMesh::convertDegeneratedCellsAndRemoveFlatOnes()
 {
   checkFullyDefined();
   if(getMeshDimension()<=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertDegeneratedCells works on umeshes with meshdim equals to 2 or 3 !");
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
   if(nbOfCells<1)
     return ret.retn();
-  int initMeshLgth=getNodalConnectivityArrayLen();
-  int *conn=_nodal_connec->getPointer();
-  int *index=_nodal_connec_index->getPointer();
-  int posOfCurCell=0;
-  int newPos=0;
-  int lgthOfCurCell, nbDelCells(0);
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType initMeshLgth=getNodalConnectivityArrayLen();
+  mcIdType *conn=_nodal_connec->getPointer();
+  mcIdType *index=_nodal_connec_index->getPointer();
+  mcIdType posOfCurCell=0;
+  mcIdType newPos=0;
+  mcIdType lgthOfCurCell, nbDelCells(0);
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       lgthOfCurCell=index[i+1]-posOfCurCell;
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[posOfCurCell];
-      int newLgth;
+      mcIdType newLgth;
       INTERP_KERNEL::NormalizedCellType newType=INTERP_KERNEL::CellSimplify::simplifyDegeneratedCell(type,conn+posOfCurCell+1,lgthOfCurCell-1,
                                                                                                      conn+newPos+1,newLgth);
       // Shall we delete the cell if it is completely degenerated:
@@ -4715,7 +4716,7 @@ DataArrayInt *MEDCouplingUMesh::convertDegeneratedCellsAndRemoveFlatOnes()
     }
   if(newPos!=initMeshLgth)
     _nodal_connec->reAlloc(newPos);
-  const int nCellDel=ret->getNumberOfTuples();
+  const mcIdType nCellDel=ret->getNumberOfTuples();
   if (nCellDel)
     _nodal_connec_index->reAlloc(nbOfCells-nCellDel+1);
   computeTypes();
@@ -4732,7 +4733,7 @@ bool MEDCouplingUMesh::removeDegenerated1DCells()
   if(getMeshDimension()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::removeDegenerated1DCells works on umeshes with meshdim equals to 1 !");
   std::size_t nbCells(getNumberOfCells()),newSize(0),newSize2(0);
-  const int *conn(getNodalConnectivity()->begin()),*conni(getNodalConnectivityIndex()->begin());
+  const mcIdType *conn(getNodalConnectivity()->begin()),*conni(getNodalConnectivityIndex()->begin());
   {
     for(std::size_t i=0;i<nbCells;i++)
       {
@@ -4754,8 +4755,8 @@ bool MEDCouplingUMesh::removeDegenerated1DCells()
   }
   if(newSize==nbCells)//no cells has been removed -> do nothing
     return false;
-  MCAuto<DataArrayInt> newConn(DataArrayInt::New()),newConnI(DataArrayInt::New()); newConnI->alloc(newSize+1,1); newConn->alloc(newSize2,1);
-  int *newConnPtr(newConn->getPointer()),*newConnIPtr(newConnI->getPointer()); newConnIPtr[0]=0;
+  MCAuto<DataArrayIdType> newConn(DataArrayIdType::New()),newConnI(DataArrayIdType::New()); newConnI->alloc(newSize+1,1); newConn->alloc(newSize2,1);
+  mcIdType *newConnPtr(newConn->getPointer()),*newConnIPtr(newConnI->getPointer()); newConnIPtr[0]=0;
   for(std::size_t i=0;i<nbCells;i++)
     {
       if(conn[conni[i]+1]!=conn[conni[i]+2])
@@ -4787,15 +4788,15 @@ bool MEDCouplingUMesh::removeDegenerated1DCells()
  *  \ref  py_mcumesh_are2DCellsNotCorrectlyOriented "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::are2DCellsNotCorrectlyOriented(const double *vec, bool polyOnly, std::vector<int>& cells) const
+void MEDCouplingUMesh::are2DCellsNotCorrectlyOriented(const double *vec, bool polyOnly, std::vector<mcIdType>& cells) const
 {
   if(getMeshDimension()!=2 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply are2DCellsNotCorrectlyOriented on it : must be meshDim==2 and spaceDim==3 !");
-  int nbOfCells=getNumberOfCells();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coordsPtr=_coords->begin();
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
       if(!polyOnly || (type==INTERP_KERNEL::NORM_POLYGON || type==INTERP_KERNEL::NORM_QPOLYG))
@@ -4829,11 +4830,12 @@ void MEDCouplingUMesh::orientCorrectly2DCells(const double *vec, bool polyOnly)
 {
   if(getMeshDimension()!=2 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply orientCorrectly2DCells on it : must be meshDim==2 and spaceDim==3 !");
-  int nbOfCells(getNumberOfCells()),*conn(_nodal_connec->getPointer());
-  const int *connI(_nodal_connec_index->begin());
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType *conn(_nodal_connec->getPointer());
+  const mcIdType *connI(_nodal_connec_index->begin());
   const double *coordsPtr(_coords->begin());
   bool isModified(false);
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
       if(!polyOnly || (type==INTERP_KERNEL::NORM_POLYGON || type==INTERP_KERNEL::NORM_QPOLYG))
@@ -4862,11 +4864,12 @@ void MEDCouplingUMesh::changeOrientationOfCells()
   int mdim(getMeshDimension());
   if(mdim!=2 && mdim!=1)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply changeOrientationOfCells on it : must be meshDim==2 or meshDim==1 !");
-  int nbOfCells(getNumberOfCells()),*conn(_nodal_connec->getPointer());
-  const int *connI(_nodal_connec_index->begin());
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType *conn(_nodal_connec->getPointer());
+  const mcIdType *connI(_nodal_connec_index->begin());
   if(mdim==2)
     {//2D
-      for(int i=0;i<nbOfCells;i++)
+      for(mcIdType i=0;i<nbOfCells;i++)
         {
           INTERP_KERNEL::NormalizedCellType type((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
           const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(type));
@@ -4875,7 +4878,7 @@ void MEDCouplingUMesh::changeOrientationOfCells()
     }
   else
     {//1D
-      for(int i=0;i<nbOfCells;i++)
+      for(mcIdType i=0;i<nbOfCells;i++)
         {
           INTERP_KERNEL::NormalizedCellType type((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
           const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(type));
@@ -4899,15 +4902,15 @@ void MEDCouplingUMesh::changeOrientationOfCells()
  *  \ref  py_mcumesh_arePolyhedronsNotCorrectlyOriented "Here is a Python example".
  *  \endif
  */
-void MEDCouplingUMesh::arePolyhedronsNotCorrectlyOriented(std::vector<int>& cells) const
+void MEDCouplingUMesh::arePolyhedronsNotCorrectlyOriented(std::vector<mcIdType>& cells) const
 {
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply arePolyhedronsNotCorrectlyOriented on it : must be meshDim==3 and spaceDim==3 !");
-  int nbOfCells=getNumberOfCells();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coordsPtr=_coords->begin();
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
       if(type==INTERP_KERNEL::NORM_POLYHED)
@@ -4937,11 +4940,11 @@ void MEDCouplingUMesh::orientCorrectlyPolyhedrons()
 {
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply orientCorrectlyPolyhedrons on it : must be meshDim==3 and spaceDim==3 !");
-  int nbOfCells=getNumberOfCells();
-  int *conn=_nodal_connec->getPointer();
-  const int *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType *conn=_nodal_connec->getPointer();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coordsPtr=_coords->begin();
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
       if(type==INTERP_KERNEL::NORM_POLYHED)
@@ -4970,13 +4973,13 @@ void MEDCouplingUMesh::invertOrientationOfAllCells()
 {
   checkConnectivityFullyDefined();
   std::set<INTERP_KERNEL::NormalizedCellType> gts(getAllGeoTypes());
-  int *conn(_nodal_connec->getPointer());
-  const int *conni(_nodal_connec_index->begin());
+  mcIdType *conn(_nodal_connec->getPointer());
+  const mcIdType *conni(_nodal_connec_index->begin());
   for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator gt=gts.begin();gt!=gts.end();gt++)
     {
       INTERP_KERNEL::AutoCppPtr<INTERP_KERNEL::OrientationInverter> oi(INTERP_KERNEL::OrientationInverter::BuildInstanceFrom(*gt));
-      MCAuto<DataArrayInt> cwt(giveCellsWithType(*gt));
-      for(const int *it=cwt->begin();it!=cwt->end();it++)
+      MCAuto<DataArrayIdType> cwt(giveCellsWithType(*gt));
+      for(const mcIdType *it=cwt->begin();it!=cwt->end();it++)
         oi->operate(conn+conni[*it]+1,conn+conni[*it+1]);
     }
   updateTime();
@@ -4987,7 +4990,7 @@ void MEDCouplingUMesh::invertOrientationOfAllCells()
  * INTERP_KERNEL::NORM_PENTA6, INTERP_KERNEL::NORM_HEXGP12 etc) to respect the MED convention
  * according to which the first facet of the cell should be oriented to have the normal vector
  * pointing out of cell.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding ids of fixed
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding ids of fixed
  *         cells. The caller is to delete this array using decrRef() as it is no more
  *         needed.
  *  \throw If \a this->getMeshDimension() != 3.
@@ -5001,7 +5004,7 @@ void MEDCouplingUMesh::invertOrientationOfAllCells()
  *  \endif
  * \sa MEDCouplingUMesh::findAndCorrectBadOriented3DCells
  */
-DataArrayInt *MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells()
+DataArrayIdType *MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells()
 {
   const char msg[]="check3DCellsWellOriented detection works only for 3D cells !";
   if(getMeshDimension()!=3)
@@ -5010,12 +5013,12 @@ DataArrayInt *MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells()
   if(spaceDim!=3)
     throw INTERP_KERNEL::Exception(msg);
   //
-  int nbOfCells=getNumberOfCells();
-  int *conn=_nodal_connec->getPointer();
-  const int *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType *conn=_nodal_connec->getPointer();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coo=getCoords()->begin();
-  MCAuto<DataArrayInt> cells(DataArrayInt::New()); cells->alloc(0,1);
-  for(int i=0;i<nbOfCells;i++)
+  MCAuto<DataArrayIdType> cells(DataArrayIdType::New()); cells->alloc(0,1);
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
       if(cm.isExtruded() && !cm.isDynamic() && !cm.isQuadratic())
@@ -5035,19 +5038,19 @@ DataArrayInt *MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells()
  * This method works only if \a this is a 3D mesh, that is to say a mesh with mesh dimension 3 and a space dimension 3.
  * This method makes the hypothesis that \a this a coherent that is to say MEDCouplingUMesh::checkConsistency should throw no exception.
  *
- * \return a newly allocated int array with one components containing cell ids renumbered to fit the convention of MED (MED file and MEDCoupling)
+ * \return a newly allocated mcIdType array with one components containing cell ids renumbered to fit the convention of MED (MED file and MEDCoupling)
  * \sa MEDCouplingUMesh::orientCorrectlyPolyhedrons,
  */
-DataArrayInt *MEDCouplingUMesh::findAndCorrectBadOriented3DCells()
+DataArrayIdType *MEDCouplingUMesh::findAndCorrectBadOriented3DCells()
 {
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply findAndCorrectBadOriented3DCells on it : must be meshDim==3 and spaceDim==3 !");
-  int nbOfCells=getNumberOfCells();
-  int *conn=_nodal_connec->getPointer();
-  const int *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType *conn=_nodal_connec->getPointer();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coordsPtr=_coords->begin();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(0,1);
-  for(int i=0;i<nbOfCells;i++)
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(0,1);
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
       switch(type)
@@ -5109,10 +5112,10 @@ void MEDCouplingUMesh::getFastAveragePlaneOfThis(double *vec, double *pos) const
 {
   if(getMeshDimension()!=2 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("Invalid mesh to apply getFastAveragePlaneOfThis on it : must be meshDim==2 and spaceDim==3 !");
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coordsPtr=_coords->begin();
-  INTERP_KERNEL::areaVectorOfPolygon<int,INTERP_KERNEL::ALL_C_MODE>(conn+1,connI[1]-connI[0]-1,coordsPtr,vec);
+  INTERP_KERNEL::areaVectorOfPolygon<mcIdType,INTERP_KERNEL::ALL_C_MODE>(conn+1,connI[1]-connI[0]-1,coordsPtr,vec);
   std::copy(coordsPtr+3*conn[1],coordsPtr+3*conn[1]+3,pos);
 }
 
@@ -5150,16 +5153,16 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getEdgeRatioField() const
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getEdgeRatioField : MeshDimension must be equal to 2 or 3 !");
   MCAuto<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   ret->setMesh(this);
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   MCAuto<DataArrayDouble> arr=DataArrayDouble::New();
   arr->alloc(nbOfCells,1);
   double *pt=arr->getPointer();
   ret->setArray(arr);//In case of throw to avoid mem leaks arr will be used after decrRef.
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coo=_coords->begin();
   double tmp[12];
-  for(int i=0;i<nbOfCells;i++,pt++)
+  for(mcIdType i=0;i<nbOfCells;i++,pt++)
     {
       INTERP_KERNEL::NormalizedCellType t=(INTERP_KERNEL::NormalizedCellType)*conn;
       switch(t)
@@ -5222,16 +5225,16 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getAspectRatioField() const
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getAspectRatioField : MeshDimension must be equal to 2 or 3 !");
   MCAuto<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   ret->setMesh(this);
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   MCAuto<DataArrayDouble> arr=DataArrayDouble::New();
   arr->alloc(nbOfCells,1);
   double *pt=arr->getPointer();
   ret->setArray(arr);//In case of throw to avoid mem leaks arr will be used after decrRef.
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coo=_coords->begin();
   double tmp[12];
-  for(int i=0;i<nbOfCells;i++,pt++)
+  for(mcIdType i=0;i<nbOfCells;i++,pt++)
     {
       INTERP_KERNEL::NormalizedCellType t=(INTERP_KERNEL::NormalizedCellType)*conn;
       switch(t)
@@ -5303,16 +5306,16 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getWarpField() const
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getWarpField : MeshDimension must be equal to 2 !");
   MCAuto<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   ret->setMesh(this);
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   MCAuto<DataArrayDouble> arr=DataArrayDouble::New();
   arr->alloc(nbOfCells,1);
   double *pt=arr->getPointer();
   ret->setArray(arr);//In case of throw to avoid mem leaks arr will be used after decrRef.
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coo=_coords->begin();
   double tmp[12];
-  for(int i=0;i<nbOfCells;i++,pt++)
+  for(mcIdType i=0;i<nbOfCells;i++,pt++)
     {
       INTERP_KERNEL::NormalizedCellType t=(INTERP_KERNEL::NormalizedCellType)*conn;
       switch(t)
@@ -5370,16 +5373,16 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::getSkewField() const
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getSkewField : MeshDimension must be equal to 2 !");
   MCAuto<MEDCouplingFieldDouble> ret=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   ret->setMesh(this);
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   MCAuto<DataArrayDouble> arr=DataArrayDouble::New();
   arr->alloc(nbOfCells,1);
   double *pt=arr->getPointer();
   ret->setArray(arr);//In case of throw to avoid mem leaks arr will be used after decrRef.
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coo=_coords->begin();
   double tmp[12];
-  for(int i=0;i<nbOfCells;i++,pt++)
+  for(mcIdType i=0;i<nbOfCells;i++,pt++)
     {
       INTERP_KERNEL::NormalizedCellType t=(INTERP_KERNEL::NormalizedCellType)*conn;
       switch(t)
@@ -5414,13 +5417,14 @@ MEDCouplingFieldDouble *MEDCouplingUMesh::computeDiameterField() const
   ret->setMesh(this);
   std::set<INTERP_KERNEL::NormalizedCellType> types;
   ComputeAllTypesInternal(types,_nodal_connec,_nodal_connec_index);
-  int spaceDim(getSpaceDimension()),nbCells(getNumberOfCells());
+  int spaceDim(getSpaceDimension());
+  mcIdType nbCells(getNumberOfCells());
   MCAuto<DataArrayDouble> arr(DataArrayDouble::New());
   arr->alloc(nbCells,1);
   for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator it=types.begin();it!=types.end();it++)
     {
       INTERP_KERNEL::AutoCppPtr<INTERP_KERNEL::DiameterCalculator> dc(INTERP_KERNEL::CellModel::GetCellModel(*it).buildInstanceOfDiameterCalulator(spaceDim));
-      MCAuto<DataArrayInt> cellIds(giveCellsWithType(*it));
+      MCAuto<DataArrayIdType> cellIds(giveCellsWithType(*it));
       dc->computeForListOfCellIdsUMeshFrmt(cellIds->begin(),cellIds->end(),_nodal_connec_index->begin(),_nodal_connec->begin(),getCoords()->begin(),arr->getPointer());
     }
   ret->setArray(arr);
@@ -5475,23 +5479,24 @@ DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree(double arcDetEps) con
 DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTreeFast() const
 {
   checkFullyDefined();
-  int spaceDim(getSpaceDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
+  int spaceDim(getSpaceDimension());
+  mcIdType nbOfCells(getNumberOfCells()), nbOfNodes(getNumberOfNodes());
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
   double *bbox(ret->getPointer());
-  for(int i=0;i<nbOfCells*spaceDim;i++)
+  for(mcIdType i=0;i<nbOfCells*spaceDim;i++)
     {
       bbox[2*i]=std::numeric_limits<double>::max();
       bbox[2*i+1]=-std::numeric_limits<double>::max();
     }
   const double *coordsPtr(_coords->begin());
-  const int *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
-  for(int i=0;i<nbOfCells;i++)
+  const mcIdType *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int offset=connI[i]+1;
-      int nbOfNodesForCell(connI[i+1]-offset),kk(0);
-      for(int j=0;j<nbOfNodesForCell;j++)
+      mcIdType offset=connI[i]+1;
+      mcIdType nbOfNodesForCell(connI[i+1]-offset),kk(0);
+      for(mcIdType j=0;j<nbOfNodesForCell;j++)
         {
-          int nodeId=conn[offset+j];
+          mcIdType nodeId=conn[offset+j];
           if(nodeId>=0 && nodeId<nbOfNodes)
             {
               for(int k=0;k<spaceDim;k++)
@@ -5529,22 +5534,23 @@ DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arc
   checkFullyDefined();
   INTERP_KERNEL::QuadraticPlanarPrecision arcPrec(arcDetEps);
 
-  int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
+  int spaceDim(getSpaceDimension()),mDim(getMeshDimension());
+  mcIdType nbOfCells=getNumberOfCells();
   if(spaceDim!=2 || mDim!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic : This method should be applied on mesh with mesh dimension equal to 2 and space dimension also equal to 2!");
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
   double *bbox(ret->getPointer());
   const double *coords(_coords->begin());
-  const int *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
-  for(int i=0;i<nbOfCells;i++,bbox+=4,connI++)
+  const mcIdType *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
+  for(mcIdType i=0;i<nbOfCells;i++,bbox+=4,connI++)
     {
       const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[*connI]));
-      int sz(connI[1]-connI[0]-1);
+      mcIdType sz(connI[1]-connI[0]-1);
       std::vector<INTERP_KERNEL::Node *> nodes(sz);
       INTERP_KERNEL::QuadraticPolygon *pol(0);
-      for(int j=0;j<sz;j++)
+      for(mcIdType j=0;j<sz;j++)
         {
-          int nodeId(conn[*connI+1+j]);
+          mcIdType nodeId(conn[*connI+1+j]);
           nodes[j]=new INTERP_KERNEL::Node(coords[nodeId*2],coords[nodeId*2+1]);
         }
       if(!cm.isQuadratic())
@@ -5573,23 +5579,24 @@ DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arc
 DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(double arcDetEps) const
 {
   checkFullyDefined();
-  int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
+  int spaceDim(getSpaceDimension()),mDim(getMeshDimension());
+  mcIdType nbOfCells=getNumberOfCells();
   if(spaceDim!=2 || mDim!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic : This method should be applied on mesh with mesh dimension equal to 1 and space dimension also equal to 2!");
   INTERP_KERNEL::QuadraticPlanarPrecision arcPrec(arcDetEps);
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
   double *bbox(ret->getPointer());
   const double *coords(_coords->begin());
-  const int *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
-  for(int i=0;i<nbOfCells;i++,bbox+=4,connI++)
+  const mcIdType *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
+  for(mcIdType i=0;i<nbOfCells;i++,bbox+=4,connI++)
     {
       const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[*connI]));
-      int sz(connI[1]-connI[0]-1);
+      mcIdType sz(connI[1]-connI[0]-1);
       std::vector<INTERP_KERNEL::Node *> nodes(sz);
       INTERP_KERNEL::Edge *edge(0);
-      for(int j=0;j<sz;j++)
+      for(mcIdType j=0;j<sz;j++)
         {
-          int nodeId(conn[*connI+1+j]);
+          mcIdType nodeId(conn[*connI+1+j]);
           nodes[j]=new INTERP_KERNEL::Node(coords[nodeId*2],coords[nodeId*2+1]);
         }
       if(!cm.isQuadratic())
@@ -5609,21 +5616,21 @@ namespace MEDCouplingImpl
   class ConnReader
   {
   public:
-    ConnReader(const int *c, int val):_conn(c),_val(val) { }
-    bool operator() (const int& pos) { return _conn[pos]!=_val; }
+    ConnReader(const mcIdType *c, mcIdType val):_conn(c),_val(val) { }
+    bool operator() (const mcIdType& pos) { return _conn[pos]!=_val; }
   private:
-    const int *_conn;
-    int _val;
+    const mcIdType *_conn;
+    mcIdType _val;
   };
 
   class ConnReader2
   {
   public:
-    ConnReader2(const int *c, int val):_conn(c),_val(val) { }
-    bool operator() (const int& pos) { return _conn[pos]==_val; }
+    ConnReader2(const mcIdType *c, mcIdType val):_conn(c),_val(val) { }
+    bool operator() (const mcIdType& pos) { return _conn[pos]==_val; }
   private:
-    const int *_conn;
-    int _val;
+    const mcIdType *_conn;
+    mcIdType _val;
   };
 }
 
@@ -5637,15 +5644,15 @@ namespace MEDCouplingImpl
  * For every k in [0,n] ret[3*k+2]==-1 because it has no sense here.
  * This parameter is kept only for compatibility with other method listed above.
  */
-std::vector<int> MEDCouplingUMesh::getDistributionOfTypes() const
+std::vector<mcIdType> MEDCouplingUMesh::getDistributionOfTypes() const
 {
   checkConnectivityFullyDefined();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  const int *work=connI;
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  const mcIdType *work=connI;
+  mcIdType nbOfCells=getNumberOfCells();
   std::size_t n=getAllGeoTypes().size();
-  std::vector<int> ret(3*n,-1); //ret[3*k+2]==-1 because it has no sense here
+  std::vector<mcIdType> ret(3*n,-1); //ret[3*k+2]==-1 because it has no sense here
   std::set<INTERP_KERNEL::NormalizedCellType> types;
   for(std::size_t i=0;work!=connI+nbOfCells;i++)
     {
@@ -5658,8 +5665,8 @@ std::vector<int> MEDCouplingUMesh::getDistributionOfTypes() const
         }
       types.insert(typ);
       ret[3*i]=typ;
-      const int *work2=std::find_if(work+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,typ));
-      ret[3*i+1]=(int)std::distance(work,work2);
+      const mcIdType *work2=std::find_if(work+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,typ));
+      ret[3*i+1]=ToIdType(std::distance(work,work2));
       work=work2;
     }
   return ret;
@@ -5680,9 +5687,9 @@ std::vector<int> MEDCouplingUMesh::getDistributionOfTypes() const
  *
  * If all geometric types in \a code are exactly those in \a this null pointer is returned.
  * If it exists a geometric type in \a this \b not in \a code \b no exception is thrown
- * and a DataArrayInt instance is returned that the user has the responsibility to deallocate.
+ * and a DataArrayIdType instance is returned that the user has the responsibility to deallocate.
  */
-DataArrayInt *MEDCouplingUMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
+DataArrayIdType *MEDCouplingUMesh::checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const
 {
   if(code.empty())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::checkTypeConsistencyAndContig : code is empty, should not !");
@@ -5691,7 +5698,7 @@ DataArrayInt *MEDCouplingUMesh::checkTypeConsistencyAndContig(const std::vector<
   if(sz%3!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::checkTypeConsistencyAndContig : code size is NOT %3 !");
   std::vector<INTERP_KERNEL::NormalizedCellType> types;
-  int nb=0;
+  mcIdType nb=0;
   bool isNoPflUsed=true;
   for(std::size_t i=0;i<n;i++)
     if(std::find(types.begin(),types.end(),(INTERP_KERNEL::NormalizedCellType)code[3*i])==types.end())
@@ -5711,35 +5718,35 @@ DataArrayInt *MEDCouplingUMesh::checkTypeConsistencyAndContig(const std::vector<
       if(types.size()==_types.size())
         return 0;
     }
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   ret->alloc(nb,1);
-  int *retPtr=ret->getPointer();
-  const int *connI=_nodal_connec_index->begin();
-  const int *conn=_nodal_connec->begin();
-  int nbOfCells=getNumberOfCells();
-  const int *i=connI;
+  mcIdType *retPtr=ret->getPointer();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  const mcIdType *conn=_nodal_connec->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *i=connI;
   int kk=0;
   for(std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator it=types.begin();it!=types.end();it++,kk++)
     {
-      i=std::find_if(i,connI+nbOfCells,MEDCouplingImpl::ConnReader2(conn,(int)(*it)));
-      int offset=(int)std::distance(connI,i);
-      const int *j=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,(int)(*it)));
-      int nbOfCellsOfCurType=(int)std::distance(i,j);
+      i=std::find_if(i,connI+nbOfCells,MEDCouplingImpl::ConnReader2(conn,ToIdType((*it))));
+      mcIdType offset=ToIdType(std::distance(connI,i));
+      const mcIdType *j=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,ToIdType((*it))));
+      mcIdType nbOfCellsOfCurType=ToIdType(std::distance(i,j));
       if(code[3*kk+2]==-1)
-        for(int k=0;k<nbOfCellsOfCurType;k++)
+        for(mcIdType k=0;k<nbOfCellsOfCurType;k++)
           *retPtr++=k+offset;
       else
         {
-          int idInIdsPerType=code[3*kk+2];
-          if(idInIdsPerType>=0 && idInIdsPerType<(int)idsPerType.size())
+          mcIdType idInIdsPerType=code[3*kk+2];
+          if(idInIdsPerType>=0 && idInIdsPerType<ToIdType(idsPerType.size()))
             {
-              const DataArrayInt *zePfl=idsPerType[idInIdsPerType];
+              const DataArrayIdType *zePfl=idsPerType[idInIdsPerType];
               if(zePfl)
                 {
                   zePfl->checkAllocated();
                   if(zePfl->getNumberOfComponents()==1)
                     {
-                      for(const int *k=zePfl->begin();k!=zePfl->end();k++,retPtr++)
+                      for(const mcIdType *k=zePfl->begin();k!=zePfl->end();k++,retPtr++)
                         {
                           if(*k>=0 && *k<nbOfCellsOfCurType)
                             *retPtr=(*k)+offset;
@@ -5783,19 +5790,19 @@ DataArrayInt *MEDCouplingUMesh::checkTypeConsistencyAndContig(const std::vector<
  *              This vector can be empty in case of all geometric type cells are fully covered in ascending in the given input \a profile.
  * \throw if \a profile has not exactly one component. It throws too, if \a profile contains some values not in [0,getNumberOfCells()) or if \a this is not fully defined
  */
-void MEDCouplingUMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller) const
+void MEDCouplingUMesh::splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller) const
 {
   if(!profile)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::splitProfilePerType : input profile is NULL !");
   if(profile->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::splitProfilePerType : input profile should have exactly one component !");
   checkConnectivityFullyDefined();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
   std::vector<INTERP_KERNEL::NormalizedCellType> types;
-  std::vector<int> typeRangeVals(1);
-  for(const int *i=connI;i!=connI+nbOfCells;)
+  std::vector<mcIdType> typeRangeVals(1);
+  for(const mcIdType *i=connI;i!=connI+nbOfCells;)
     {
       INTERP_KERNEL::NormalizedCellType curType=(INTERP_KERNEL::NormalizedCellType)conn[*i];
       if(std::find(types.begin(),types.end(),curType)!=types.end())
@@ -5803,33 +5810,33 @@ void MEDCouplingUMesh::splitProfilePerType(const DataArrayInt *profile, std::vec
           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::splitProfilePerType : current mesh is not sorted by type !");
         }
       types.push_back(curType);
-      i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,(int)curType));
-      typeRangeVals.push_back((int)std::distance(connI,i));
+      i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,ToIdType(curType)));
+      typeRangeVals.push_back(ToIdType(std::distance(connI,i)));
     }
   //
-  DataArrayInt *castArr=0,*rankInsideCast=0,*castsPresent=0;
+  DataArrayIdType *castArr=0,*rankInsideCast=0,*castsPresent=0;
   profile->splitByValueRange(&typeRangeVals[0],&typeRangeVals[0]+typeRangeVals.size(),castArr,rankInsideCast,castsPresent);
-  MCAuto<DataArrayInt> tmp0=castArr;
-  MCAuto<DataArrayInt> tmp1=rankInsideCast;
-  MCAuto<DataArrayInt> tmp2=castsPresent;
+  MCAuto<DataArrayIdType> tmp0=castArr;
+  MCAuto<DataArrayIdType> tmp1=rankInsideCast;
+  MCAuto<DataArrayIdType> tmp2=castsPresent;
   //
-  int nbOfCastsFinal=castsPresent->getNumberOfTuples();
+  mcIdType nbOfCastsFinal=castsPresent->getNumberOfTuples();
   code.resize(3*nbOfCastsFinal);
-  std::vector< MCAuto<DataArrayInt> > idsInPflPerType2;
-  std::vector< MCAuto<DataArrayInt> > idsPerType2;
-  for(int i=0;i<nbOfCastsFinal;i++)
+  std::vector< MCAuto<DataArrayIdType> > idsInPflPerType2;
+  std::vector< MCAuto<DataArrayIdType> > idsPerType2;
+  for(mcIdType i=0;i<nbOfCastsFinal;i++)
     {
-      int castId=castsPresent->getIJ(i,0);
-      MCAuto<DataArrayInt> tmp3=castArr->findIdsEqual(castId);
+      mcIdType castId=castsPresent->getIJ(i,0);
+      MCAuto<DataArrayIdType> tmp3=castArr->findIdsEqual(castId);
       idsInPflPerType2.push_back(tmp3);
-      code[3*i]=(int)types[castId];
+      code[3*i]=ToIdType(types[castId]);
       code[3*i+1]=tmp3->getNumberOfTuples();
-      MCAuto<DataArrayInt> tmp4=rankInsideCast->selectByTupleId(tmp3->begin(),tmp3->begin()+tmp3->getNumberOfTuples());
+      MCAuto<DataArrayIdType> tmp4=rankInsideCast->selectByTupleId(tmp3->begin(),tmp3->begin()+tmp3->getNumberOfTuples());
       if(!smartPflKiller || !tmp4->isIota(typeRangeVals[castId+1]-typeRangeVals[castId]))
         {
           tmp4->copyStringInfoFrom(*profile);
           idsPerType2.push_back(tmp4);
-          code[3*i+2]=(int)idsPerType2.size()-1;
+          code[3*i+2]=ToIdType(idsPerType2.size())-1;
         }
       else
         {
@@ -5840,7 +5847,7 @@ void MEDCouplingUMesh::splitProfilePerType(const DataArrayInt *profile, std::vec
   idsInPflPerType.resize(sz2);
   for(std::size_t i=0;i<sz2;i++)
     {
-      DataArrayInt *locDa=idsInPflPerType2[i];
+      DataArrayIdType *locDa=idsInPflPerType2[i];
       locDa->incrRef();
       idsInPflPerType[i]=locDa;
     }
@@ -5848,7 +5855,7 @@ void MEDCouplingUMesh::splitProfilePerType(const DataArrayInt *profile, std::vec
   idsPerType.resize(sz);
   for(std::size_t i=0;i<sz;i++)
     {
-      DataArrayInt *locDa=idsPerType2[i];
+      DataArrayIdType *locDa=idsPerType2[i];
       locDa->incrRef();
       idsPerType[i]=locDa;
     }
@@ -5860,7 +5867,7 @@ void MEDCouplingUMesh::splitProfilePerType(const DataArrayInt *profile, std::vec
  * The following equality should be verified 'nM1LevMesh->getMeshDimension()==this->getMeshDimension()-1'
  * This method returns 5+2 elements. 'desc', 'descIndx', 'revDesc', 'revDescIndx' and 'meshnM1' behaves exactly as MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity except the content as described after. The returned array specifies the n-1 mesh reordered by type as MEDMEM does. 'nM1LevMeshIds' contains the ids in returned 'meshnM1'. Finally 'meshnM1Old2New' contains numbering old2new that is to say the cell #k in coarse 'nM1LevMesh' will have the number ret[k] in returned mesh 'nM1LevMesh' MEDMEM reordered.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh, DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *&revDesc, DataArrayInt *&revDescIndx, DataArrayInt *& nM1LevMeshIds, DataArrayInt *&meshnM1Old2New) const
+MEDCouplingUMesh *MEDCouplingUMesh::emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh, DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *&revDesc, DataArrayIdType *&revDescIndx, DataArrayIdType *& nM1LevMeshIds, DataArrayIdType *&meshnM1Old2New) const
 {
   checkFullyDefined();
   nM1LevMesh->checkFullyDefined();
@@ -5868,20 +5875,20 @@ MEDCouplingUMesh *MEDCouplingUMesh::emulateMEDMEMBDC(const MEDCouplingUMesh *nM1
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::emulateMEDMEMBDC : The mesh passed as first argument should have a meshDim equal to this->getMeshDimension()-1 !" );
   if(_coords!=nM1LevMesh->getCoords())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::emulateMEDMEMBDC : 'this' and mesh in first argument should share the same coords : Use tryToShareSameCoords method !");
-  MCAuto<DataArrayInt> tmp0=DataArrayInt::New();
-  MCAuto<DataArrayInt> tmp1=DataArrayInt::New();
+  MCAuto<DataArrayIdType> tmp0=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> tmp1=DataArrayIdType::New();
   MCAuto<MEDCouplingUMesh> ret1=buildDescendingConnectivity(desc,descIndx,tmp0,tmp1);
-  MCAuto<DataArrayInt> ret0=ret1->sortCellsInMEDFileFrmt();
+  MCAuto<DataArrayIdType> ret0=ret1->sortCellsInMEDFileFrmt();
   desc->transformWithIndArr(ret0->begin(),ret0->begin()+ret0->getNbOfElems());
   MCAuto<MEDCouplingUMesh> tmp=MEDCouplingUMesh::New();
   tmp->setConnectivity(tmp0,tmp1);
   tmp->renumberCells(ret0->begin(),false);
   revDesc=tmp->getNodalConnectivity();
   revDescIndx=tmp->getNodalConnectivityIndex();
-  DataArrayInt *ret=0;
+  DataArrayIdType *ret=0;
   if(!ret1->areCellsIncludedIn(nM1LevMesh,2,ret))
     {
-      int tmp2;
+      mcIdType tmp2;
       ret->getMaxValue(tmp2);
       ret->decrRef();
       std::ostringstream oss; oss << "MEDCouplingUMesh::emulateMEDMEMBDC : input N-1 mesh present a cell not in descending mesh ... Id of cell is " << tmp2 << " !";
@@ -5901,14 +5908,14 @@ MEDCouplingUMesh *MEDCouplingUMesh::emulateMEDMEMBDC(const MEDCouplingUMesh *nM1
  * Permutes the nodal connectivity arrays so that the cells are sorted by type, which is
  * necessary for writing the mesh to MED file. Additionally returns a permutation array
  * in "Old to New" mode.
- *  \return DataArrayInt * - a new instance of DataArrayInt. The caller is to delete
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType. The caller is to delete
  *          this array using decrRef() as it is no more needed.
  *  \throw If the nodal connectivity of cells is not defined.
  */
-DataArrayInt *MEDCouplingUMesh::sortCellsInMEDFileFrmt()
+DataArrayIdType *MEDCouplingUMesh::sortCellsInMEDFileFrmt()
 {
   checkConnectivityFullyDefined();
-  MCAuto<DataArrayInt> ret=getRenumArrForMEDFileFrmt();
+  MCAuto<DataArrayIdType> ret=getRenumArrForMEDFileFrmt();
   renumberCells(ret->begin(),false);
   return ret.retn();
 }
@@ -5920,17 +5927,17 @@ DataArrayInt *MEDCouplingUMesh::sortCellsInMEDFileFrmt()
 bool MEDCouplingUMesh::checkConsecutiveCellTypes() const
 {
   checkFullyDefined();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
   std::set<INTERP_KERNEL::NormalizedCellType> types;
-  for(const int *i=connI;i!=connI+nbOfCells;)
+  for(const mcIdType *i=connI;i!=connI+nbOfCells;)
     {
       INTERP_KERNEL::NormalizedCellType curType=(INTERP_KERNEL::NormalizedCellType)conn[*i];
       if(types.find(curType)!=types.end())
         return false;
       types.insert(curType);
-      i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,(int)curType));
+      i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,ToIdType(curType)));
     }
   return true;
 }
@@ -5955,30 +5962,30 @@ bool MEDCouplingUMesh::checkConsecutiveCellTypesForMEDFileFrmt() const
 bool MEDCouplingUMesh::checkConsecutiveCellTypesAndOrder(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const
 {
   checkFullyDefined();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
   if(nbOfCells==0)
     return true;
-  int lastPos=-1;
+  mcIdType lastPos=-1;
   std::set<INTERP_KERNEL::NormalizedCellType> sg;
-  for(const int *i=connI;i!=connI+nbOfCells;)
+  for(const mcIdType *i=connI;i!=connI+nbOfCells;)
     {
       INTERP_KERNEL::NormalizedCellType curType=(INTERP_KERNEL::NormalizedCellType)conn[*i];
       const INTERP_KERNEL::NormalizedCellType *isTypeExists=std::find(orderBg,orderEnd,curType);
       if(isTypeExists!=orderEnd)
         {
-          int pos=(int)std::distance(orderBg,isTypeExists);
+          mcIdType pos=ToIdType(std::distance(orderBg,isTypeExists));
           if(pos<=lastPos)
             return false;
           lastPos=pos;
-          i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,(int)curType));
+          i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,ToIdType(curType)));
         }
       else
         {
           if(sg.find(curType)==sg.end())
             {
-              i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,(int)curType));
+              i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,ToIdType(curType)));
               sg.insert(curType);
             }
           else
@@ -5989,29 +5996,29 @@ bool MEDCouplingUMesh::checkConsecutiveCellTypesAndOrder(const INTERP_KERNEL::No
 }
 
 /*!
- * This method returns 2 newly allocated DataArrayInt instances. The first is an array of size 'this->getNumberOfCells()' with one component,
+ * This method returns 2 newly allocated DataArrayIdType instances. The first is an array of size 'this->getNumberOfCells()' with one component,
  * that tells for each cell the pos of its type in the array on type given in input parameter. The 2nd output parameter is an array with the same
  * number of tuples than input type array and with one component. This 2nd output array gives type by type the number of occurrence of type in 'this'.
  */
-DataArrayInt *MEDCouplingUMesh::getLevArrPerCellTypes(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayInt *&nbPerType) const
+DataArrayIdType *MEDCouplingUMesh::getLevArrPerCellTypes(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayIdType *&nbPerType) const
 {
   checkConnectivityFullyDefined();
-  int nbOfCells=getNumberOfCells();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  MCAuto<DataArrayInt> tmpa=DataArrayInt::New();
-  MCAuto<DataArrayInt> tmpb=DataArrayInt::New();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  MCAuto<DataArrayIdType> tmpa=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> tmpb=DataArrayIdType::New();
   tmpa->alloc(nbOfCells,1);
-  tmpb->alloc((int)std::distance(orderBg,orderEnd),1);
+  tmpb->alloc(std::distance(orderBg,orderEnd),1);
   tmpb->fillWithZero();
-  int *tmp=tmpa->getPointer();
-  int *tmp2=tmpb->getPointer();
-  for(const int *i=connI;i!=connI+nbOfCells;i++)
+  mcIdType *tmp=tmpa->getPointer();
+  mcIdType *tmp2=tmpb->getPointer();
+  for(const mcIdType *i=connI;i!=connI+nbOfCells;i++)
     {
       const INTERP_KERNEL::NormalizedCellType *where=std::find(orderBg,orderEnd,(INTERP_KERNEL::NormalizedCellType)conn[*i]);
       if(where!=orderEnd)
         {
-          int pos=(int)std::distance(orderBg,where);
+          mcIdType pos=ToIdType(std::distance(orderBg,where));
           tmp2[pos]++;
           tmp[std::distance(connI,i)]=pos;
         }
@@ -6034,7 +6041,7 @@ DataArrayInt *MEDCouplingUMesh::getLevArrPerCellTypes(const INTERP_KERNEL::Norma
  *
  * \sa MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec, MEDCouplingUMesh::sortCellsInMEDFileFrmt.
  */
-DataArrayInt *MEDCouplingUMesh::getRenumArrForMEDFileFrmt() const
+DataArrayIdType *MEDCouplingUMesh::getRenumArrForMEDFileFrmt() const
 {
   return getRenumArrForConsecutiveCellTypesSpec(MEDMEM_ORDER,MEDMEM_ORDER+N_MEDMEM_ORDER);
 }
@@ -6045,10 +6052,10 @@ DataArrayInt *MEDCouplingUMesh::getRenumArrForMEDFileFrmt() const
  * The mesh after this call to MEDCouplingMesh::renumberCells will pass the test of MEDCouplingUMesh::checkConsecutiveCellTypesAndOrder with the same inputs.
  * The returned array minimizes the permutations that is to say the order of cells inside same geometric type remains the same.
  */
-DataArrayInt *MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const
+DataArrayIdType *MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const
 {
-  DataArrayInt *nbPerType=0;
-  MCAuto<DataArrayInt> tmpa=getLevArrPerCellTypes(orderBg,orderEnd,nbPerType);
+  DataArrayIdType *nbPerType=0;
+  MCAuto<DataArrayIdType> tmpa=getLevArrPerCellTypes(orderBg,orderEnd,nbPerType);
   nbPerType->decrRef();
   return tmpa->buildPermArrPerLevel();
 }
@@ -6061,29 +6068,29 @@ DataArrayInt *MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec(const INT
  *
  * \return the array giving the correspondence old to new.
  */
-DataArrayInt *MEDCouplingUMesh::rearrange2ConsecutiveCellTypes()
+DataArrayIdType *MEDCouplingUMesh::rearrange2ConsecutiveCellTypes()
 {
   checkFullyDefined();
   computeTypes();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
   std::vector<INTERP_KERNEL::NormalizedCellType> types;
-  for(const int *i=connI;i!=connI+nbOfCells && (types.size()!=_types.size());)
+  for(const mcIdType *i=connI;i!=connI+nbOfCells && (types.size()!=_types.size());)
     if(std::find(types.begin(),types.end(),(INTERP_KERNEL::NormalizedCellType)conn[*i])==types.end())
       {
         INTERP_KERNEL::NormalizedCellType curType=(INTERP_KERNEL::NormalizedCellType)conn[*i];
         types.push_back(curType);
         for(i++;i!=connI+nbOfCells && (INTERP_KERNEL::NormalizedCellType)conn[*i]==curType;i++);
       }
-  DataArrayInt *ret=DataArrayInt::New();
+  DataArrayIdType *ret=DataArrayIdType::New();
   ret->alloc(nbOfCells,1);
-  int *retPtr=ret->getPointer();
+  mcIdType *retPtr=ret->getPointer();
   std::fill(retPtr,retPtr+nbOfCells,-1);
-  int newCellId=0;
+  mcIdType newCellId=0;
   for(std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iter=types.begin();iter!=types.end();iter++)
     {
-      for(const int *i=connI;i!=connI+nbOfCells;i++)
+      for(const mcIdType *i=connI;i!=connI+nbOfCells;i++)
         if((INTERP_KERNEL::NormalizedCellType)conn[*i]==(*iter))
           retPtr[std::distance(connI,i)]=newCellId++;
     }
@@ -6099,19 +6106,19 @@ DataArrayInt *MEDCouplingUMesh::rearrange2ConsecutiveCellTypes()
 std::vector<MEDCouplingUMesh *> MEDCouplingUMesh::splitByType() const
 {
   checkConnectivityFullyDefined();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
   std::vector<MEDCouplingUMesh *> ret;
-  for(const int *i=connI;i!=connI+nbOfCells;)
+  for(const mcIdType *i=connI;i!=connI+nbOfCells;)
     {
       INTERP_KERNEL::NormalizedCellType curType=(INTERP_KERNEL::NormalizedCellType)conn[*i];
-      int beginCellId=(int)std::distance(connI,i);
-      i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,(int)curType));
-      int endCellId=(int)std::distance(connI,i);
-      int sz=endCellId-beginCellId;
-      int *cells=new int[sz];
-      for(int j=0;j<sz;j++)
+      mcIdType beginCellId=ToIdType(std::distance(connI,i));
+      i=std::find_if(i+1,connI+nbOfCells,MEDCouplingImpl::ConnReader(conn,ToIdType(curType)));
+      mcIdType endCellId=ToIdType(std::distance(connI,i));
+      mcIdType sz=endCellId-beginCellId;
+      mcIdType *cells=new mcIdType[sz];
+      for(mcIdType j=0;j<sz;j++)
         cells[j]=beginCellId+j;
       MEDCouplingUMesh *m=(MEDCouplingUMesh *)buildPartOfMySelf(cells,cells+sz,true);
       delete [] cells;
@@ -6141,7 +6148,7 @@ MEDCoupling1GTUMesh *MEDCouplingUMesh::convertIntoSingleGeoTypeMesh() const
   MEDCoupling1SGTUMesh *retC=dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh*)ret);
   if(retC)
     {
-      MCAuto<DataArrayInt> c=convertNodalConnectivityToStaticGeoTypeMesh();
+      MCAuto<DataArrayIdType> c=convertNodalConnectivityToStaticGeoTypeMesh();
       retC->setNodalConnectivity(c);
     }
   else
@@ -6149,15 +6156,15 @@ MEDCoupling1GTUMesh *MEDCouplingUMesh::convertIntoSingleGeoTypeMesh() const
       MEDCoupling1DGTUMesh *retD=dynamic_cast<MEDCoupling1DGTUMesh *>((MEDCoupling1GTUMesh*)ret);
       if(!retD)
         throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertIntoSingleGeoTypeMesh : Internal error !");
-      DataArrayInt *c=0,*ci=0;
+      DataArrayIdType *c=0,*ci=0;
       convertNodalConnectivityToDynamicGeoTypeMesh(c,ci);
-      MCAuto<DataArrayInt> cs(c),cis(ci);
+      MCAuto<DataArrayIdType> cs(c),cis(ci);
       retD->setNodalConnectivity(cs,cis);
     }
   return ret.retn();
 }
 
-DataArrayInt *MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh() const
+DataArrayIdType *MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh() const
 {
   checkConnectivityFullyDefined();
   if(_types.size()!=1)
@@ -6170,15 +6177,15 @@ DataArrayInt *MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh() co
       oss << "this type is dynamic ! Only static geometric type is possible for that type ! call convertNodalConnectivityToDynamicGeoTypeMesh instead !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  int nbCells=getNumberOfCells();
-  int typi=(int)typ;
-  int nbNodesPerCell=(int)cm.getNumberOfNodes();
-  MCAuto<DataArrayInt> connOut=DataArrayInt::New(); connOut->alloc(nbCells*nbNodesPerCell,1);
-  int *outPtr=connOut->getPointer();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  mcIdType nbCells=getNumberOfCells();
+  mcIdType typi=ToIdType(typ);
+  mcIdType nbNodesPerCell=ToIdType(cm.getNumberOfNodes());
+  MCAuto<DataArrayIdType> connOut=DataArrayIdType::New(); connOut->alloc(nbCells*nbNodesPerCell,1);
+  mcIdType *outPtr=connOut->getPointer();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   nbNodesPerCell++;
-  for(int i=0;i<nbCells;i++,connI++)
+  for(mcIdType i=0;i<nbCells;i++,connI++)
     {
       if(conn[connI[0]]==typi && connI[1]-connI[0]==nbNodesPerCell)
         outPtr=std::copy(conn+connI[0]+1,conn+connI[1],outPtr);
@@ -6197,24 +6204,25 @@ DataArrayInt *MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh() co
  * \param nodalConn
  * \param nodalConnI
  */
-void MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndex) const
+void MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndex) const
 {
   static const char msg0[]="MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh : nodal connectivity in this are invalid ! Call checkConsistency !";
   checkConnectivityFullyDefined();
   if(_types.size()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh : current mesh does not contain exactly one geometric type !");
-  int nbCells=getNumberOfCells(),lgth=_nodal_connec->getNumberOfTuples();
+  mcIdType nbCells=getNumberOfCells(),
+           lgth=_nodal_connec->getNumberOfTuples();
   if(lgth<nbCells)
     throw INTERP_KERNEL::Exception(msg0);
-  MCAuto<DataArrayInt> c(DataArrayInt::New()),ci(DataArrayInt::New());
+  MCAuto<DataArrayIdType> c(DataArrayIdType::New()),ci(DataArrayIdType::New());
   c->alloc(lgth-nbCells,1); ci->alloc(nbCells+1,1);
-  int *cp(c->getPointer()),*cip(ci->getPointer());
-  const int *incp(_nodal_connec->begin()),*incip(_nodal_connec_index->begin());
+  mcIdType *cp(c->getPointer()),*cip(ci->getPointer());
+  const mcIdType *incp(_nodal_connec->begin()),*incip(_nodal_connec_index->begin());
   cip[0]=0;
-  for(int i=0;i<nbCells;i++,cip++,incip++)
+  for(mcIdType i=0;i<nbCells;i++,cip++,incip++)
     {
-      int strt(incip[0]+1),stop(incip[1]);//+1 to skip geo type
-      int delta(stop-strt);
+      mcIdType strt(incip[0]+1),stop(incip[1]);//+1 to skip geo type
+      mcIdType delta(stop-strt);
       if(delta>=1)
         {
           if((strt>=0 && strt<lgth) && (stop>=0 && stop<=lgth))
@@ -6238,16 +6246,16 @@ void MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayInt
  *
  * \param [in] ms meshes with same mesh dimension lying on the same coords and sorted by type following de the same geometric type order than
  *                those specified in MEDCouplingUMesh::sortCellsInMEDFileFrmt method.
- * \param [out] szOfCellGrpOfSameType is a newly allocated DataArrayInt instance whose number of tuples is equal to the number of chunks of same geotype
+ * \param [out] szOfCellGrpOfSameType is a newly allocated DataArrayIdType instance whose number of tuples is equal to the number of chunks of same geotype
  *              in all meshes in \b ms. The accumulation of all values of this array is equal to the number of cells of returned mesh.
- * \param [out] idInMsOfCellGrpOfSameType is a newly allocated DataArrayInt instance having the same size than \b szOfCellGrpOfSameType. This
+ * \param [out] idInMsOfCellGrpOfSameType is a newly allocated DataArrayIdType instance having the same size than \b szOfCellGrpOfSameType. This
  *              output array gives for each chunck of same type the corresponding mesh id in \b ms.
  * \return A newly allocated unstructured mesh that is the result of the aggregation on same coords of all meshes in \b ms. This returned mesh
  *         is sorted by type following the geo cell types order of MEDCouplingUMesh::sortCellsInMEDFileFrmt method.
  */
 MEDCouplingUMesh *MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& ms,
-                                                                            DataArrayInt *&szOfCellGrpOfSameType,
-                                                                            DataArrayInt *&idInMsOfCellGrpOfSameType)
+                                                                            DataArrayIdType *&szOfCellGrpOfSameType,
+                                                                            DataArrayIdType *&idInMsOfCellGrpOfSameType)
 {
   std::vector<const MEDCouplingUMesh *> ms2;
   for(std::vector<const MEDCouplingUMesh *>::const_iterator it=ms.begin();it!=ms.end();it++)
@@ -6265,8 +6273,8 @@ MEDCouplingUMesh *MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(cons
   //
   std::vector<const MEDCouplingUMesh *> m1ssmSingle;
   std::vector< MCAuto<MEDCouplingUMesh> > m1ssmSingleAuto;
-  int fake=0,rk=0;
-  MCAuto<DataArrayInt> ret1(DataArrayInt::New()),ret2(DataArrayInt::New());
+  mcIdType fake=0,rk=0;
+  MCAuto<DataArrayIdType> ret1(DataArrayIdType::New()),ret2(DataArrayIdType::New());
   ret1->alloc(0,1); ret2->alloc(0,1);
   for(std::vector<const MEDCouplingUMesh *>::const_iterator it=ms2.begin();it!=ms2.end();it++,rk++)
     {
@@ -6286,9 +6294,9 @@ MEDCouplingUMesh *MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(cons
         }
     }
   MCAuto<MEDCouplingUMesh> m1ssmSingle2=MEDCouplingUMesh::MergeUMeshesOnSameCoords(m1ssmSingle);
-  MCAuto<DataArrayInt> renum=m1ssmSingle2->sortCellsInMEDFileFrmt();
+  MCAuto<DataArrayIdType> renum=m1ssmSingle2->sortCellsInMEDFileFrmt();
   std::vector<const MEDCouplingUMesh *> m1ssmfinal(m1ssm.size());
-  for(std::size_t i=0;i<m1ssm.size();i++)
+  for(mcIdType i=0;i<ToIdType(m1ssm.size());i++)
     m1ssmfinal[renum->getIJ(i,0)]=m1ssm[i];
   MCAuto<MEDCouplingUMesh> ret0=MEDCouplingUMesh::MergeUMeshesOnSameCoords(m1ssmfinal);
   szOfCellGrpOfSameType=ret1->renumber(renum->begin());
@@ -6297,16 +6305,16 @@ MEDCouplingUMesh *MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(cons
 }
 
 /*!
- * This method returns a newly created DataArrayInt instance.
+ * This method returns a newly created DataArrayIdType instance.
  * This method retrieves cell ids in [ \a begin, \a end ) that have the type \a type.
  */
-DataArrayInt *MEDCouplingUMesh::keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, const int *begin, const int *end) const
+DataArrayIdType *MEDCouplingUMesh::keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, const mcIdType *begin, const mcIdType *end) const
 {
   checkFullyDefined();
-  const int *conn=_nodal_connec->begin();
-  const int *connIndex=_nodal_connec_index->begin();
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
-  for(const int *w=begin;w!=end;w++)
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connIndex=_nodal_connec_index->begin();
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
+  for(const mcIdType *w=begin;w!=end;w++)
     if((INTERP_KERNEL::NormalizedCellType)conn[connIndex[*w]]==type)
       ret->pushBackSilent(*w);
   return ret.retn();
@@ -6316,28 +6324,28 @@ DataArrayInt *MEDCouplingUMesh::keepCellIdsByType(INTERP_KERNEL::NormalizedCellT
  * This method makes the assumption that da->getNumberOfTuples()<this->getNumberOfCells(). This method makes the assumption that ids contained in 'da'
  * are in [0:getNumberOfCells())
  */
-DataArrayInt *MEDCouplingUMesh::convertCellArrayPerGeoType(const DataArrayInt *da) const
+DataArrayIdType *MEDCouplingUMesh::convertCellArrayPerGeoType(const DataArrayIdType *da) const
 {
   checkFullyDefined();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
-  int nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
+  mcIdType nbOfCells=getNumberOfCells();
   std::set<INTERP_KERNEL::NormalizedCellType> types(getAllGeoTypes());
-  int *tmp=new int[nbOfCells];
+  mcIdType *tmp=new mcIdType[nbOfCells];
   for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iter=types.begin();iter!=types.end();iter++)
     {
-      int j=0;
-      for(const int *i=connI;i!=connI+nbOfCells;i++)
+      mcIdType j=0;
+      for(const mcIdType *i=connI;i!=connI+nbOfCells;i++)
         if((INTERP_KERNEL::NormalizedCellType)conn[*i]==(*iter))
           tmp[std::distance(connI,i)]=j++;
     }
-  DataArrayInt *ret=DataArrayInt::New();
+  DataArrayIdType *ret=DataArrayIdType::New();
   ret->alloc(da->getNumberOfTuples(),da->getNumberOfComponents());
   ret->copyStringInfoFrom(*da);
-  int *retPtr=ret->getPointer();
-  const int *daPtr=da->begin();
-  int nbOfElems=da->getNbOfElems();
-  for(int k=0;k<nbOfElems;k++)
+  mcIdType *retPtr=ret->getPointer();
+  const mcIdType *daPtr=da->begin();
+  mcIdType nbOfElems=da->getNbOfElems();
+  for(mcIdType k=0;k<nbOfElems;k++)
     retPtr[k]=tmp[daPtr[k]];
   delete [] tmp;
   return ret;
@@ -6349,11 +6357,11 @@ DataArrayInt *MEDCouplingUMesh::convertCellArrayPerGeoType(const DataArrayInt *d
  * cells whose ids is in 'idsPerGeoType' array.
  * This method conserves coords and name of mesh.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, const int *idsPerGeoTypeBg, const int *idsPerGeoTypeEnd) const
+MEDCouplingUMesh *MEDCouplingUMesh::keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, const mcIdType *idsPerGeoTypeBg, const mcIdType *idsPerGeoTypeEnd) const
 {
-  std::vector<int> code=getDistributionOfTypes();
+  std::vector<mcIdType> code=getDistributionOfTypes();
   std::size_t nOfTypesInThis=code.size()/3;
-  int sz=0,szOfType=0;
+  mcIdType sz=0,szOfType=0;
   for(std::size_t i=0;i<nOfTypesInThis;i++)
     {
       if(code[3*i]!=type)
@@ -6361,23 +6369,23 @@ MEDCouplingUMesh *MEDCouplingUMesh::keepSpecifiedCells(INTERP_KERNEL::Normalized
       else
         szOfType=code[3*i+1];
     }
-  for(const int *work=idsPerGeoTypeBg;work!=idsPerGeoTypeEnd;work++)
+  for(const mcIdType *work=idsPerGeoTypeBg;work!=idsPerGeoTypeEnd;work++)
     if(*work<0 || *work>=szOfType)
       {
         std::ostringstream oss; oss << "MEDCouplingUMesh::keepSpecifiedCells : Request on type " << type << " at place #" << std::distance(idsPerGeoTypeBg,work) << " value " << *work;
         oss << ". It should be in [0," << szOfType << ") !";
         throw INTERP_KERNEL::Exception(oss.str());
       }
-  MCAuto<DataArrayInt> idsTokeep=DataArrayInt::New(); idsTokeep->alloc(sz+(int)std::distance(idsPerGeoTypeBg,idsPerGeoTypeEnd),1);
-  int *idsPtr=idsTokeep->getPointer();
-  int offset=0;
+  MCAuto<DataArrayIdType> idsTokeep=DataArrayIdType::New(); idsTokeep->alloc(sz+std::distance(idsPerGeoTypeBg,idsPerGeoTypeEnd),1);
+  mcIdType *idsPtr=idsTokeep->getPointer();
+  mcIdType offset=0;
   for(std::size_t i=0;i<nOfTypesInThis;i++)
     {
       if(code[3*i]!=type)
-        for(int j=0;j<code[3*i+1];j++)
+        for(mcIdType j=0;j<code[3*i+1];j++)
           *idsPtr++=offset+j;
       else
-        idsPtr=std::transform(idsPerGeoTypeBg,idsPerGeoTypeEnd,idsPtr,std::bind2nd(std::plus<int>(),offset));
+        idsPtr=std::transform(idsPerGeoTypeBg,idsPerGeoTypeEnd,idsPtr,std::bind2nd(std::plus<mcIdType>(),offset));
       offset+=code[3*i+1];
     }
   MCAuto<MEDCouplingUMesh> ret=static_cast<MEDCouplingUMesh *>(buildPartOfMySelf(idsTokeep->begin(),idsTokeep->end(),true));
@@ -6391,11 +6399,11 @@ MEDCouplingUMesh *MEDCouplingUMesh::keepSpecifiedCells(INTERP_KERNEL::Normalized
  */
 std::vector<bool> MEDCouplingUMesh::getQuadraticStatus() const
 {
-  int ncell=getNumberOfCells();
+  mcIdType ncell=getNumberOfCells();
   std::vector<bool> ret(ncell);
-  const int *cI=getNodalConnectivityIndex()->begin();
-  const int *c=getNodalConnectivity()->begin();
-  for(int i=0;i<ncell;i++)
+  const mcIdType *cI=getNodalConnectivityIndex()->begin();
+  const mcIdType *c=getNodalConnectivity()->begin();
+  for(mcIdType i=0;i<ncell;i++)
     {
       INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType)c[cI[i]];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
@@ -6434,17 +6442,17 @@ DataArrayDouble *MEDCouplingUMesh::computeCellCenterOfMass() const
 {
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   int spaceDim=getSpaceDimension();
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   ret->alloc(nbOfCells,spaceDim);
   ret->copyStringInfoFrom(*getCoords());
   double *ptToFill=ret->getPointer();
-  const int *nodal=_nodal_connec->begin();
-  const int *nodalI=_nodal_connec_index->begin();
+  const mcIdType *nodal=_nodal_connec->begin();
+  const mcIdType *nodalI=_nodal_connec_index->begin();
   const double *coor=_coords->begin();
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)nodal[nodalI[i]];
-      INTERP_KERNEL::computeBarycenter2<int,INTERP_KERNEL::ALL_C_MODE>(type,nodal+nodalI[i]+1,nodalI[i+1]-nodalI[i]-1,coor,spaceDim,ptToFill);
+      INTERP_KERNEL::computeBarycenter2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(type,nodal+nodalI[i]+1,nodalI[i+1]-nodalI[i]-1,coor,spaceDim,ptToFill);
       ptToFill+=spaceDim;
     }
   return ret.retn();
@@ -6487,20 +6495,20 @@ DataArrayDouble *MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell() const
   checkFullyDefined();
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
   int spaceDim=getSpaceDimension();
-  int nbOfCells=getNumberOfCells();
-  int nbOfNodes=getNumberOfNodes();
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType nbOfNodes=getNumberOfNodes();
   ret->alloc(nbOfCells,spaceDim);
   double *ptToFill=ret->getPointer();
-  const int *nodal=_nodal_connec->begin();
-  const int *nodalI=_nodal_connec_index->begin();
+  const mcIdType *nodal=_nodal_connec->begin();
+  const mcIdType *nodalI=_nodal_connec_index->begin();
   const double *coor=_coords->begin();
-  for(int i=0;i<nbOfCells;i++,ptToFill+=spaceDim)
+  for(mcIdType i=0;i<nbOfCells;i++,ptToFill+=spaceDim)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)nodal[nodalI[i]];
       std::fill(ptToFill,ptToFill+spaceDim,0.);
       if(type!=INTERP_KERNEL::NORM_POLYHED)
         {
-          for(const int *conn=nodal+nodalI[i]+1;conn!=nodal+nodalI[i+1];conn++)
+          for(const mcIdType *conn=nodal+nodalI[i]+1;conn!=nodal+nodalI[i+1];conn++)
             {
               if(*conn>=0 && *conn<nbOfNodes)
                 std::transform(coor+spaceDim*conn[0],coor+spaceDim*(conn[0]+1),ptToFill,ptToFill,std::plus<double>());
@@ -6510,7 +6518,7 @@ DataArrayDouble *MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell() const
                   throw INTERP_KERNEL::Exception(oss.str());
                 }
             }
-          int nbOfNodesInCell=nodalI[i+1]-nodalI[i]-1;
+          mcIdType nbOfNodesInCell=nodalI[i+1]-nodalI[i]-1;
           if(nbOfNodesInCell>0)
             std::transform(ptToFill,ptToFill+spaceDim,ptToFill,std::bind2nd(std::multiplies<double>(),1./(double)nbOfNodesInCell));
           else
@@ -6521,9 +6529,9 @@ DataArrayDouble *MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell() const
         }
       else
         {
-          std::set<int> s(nodal+nodalI[i]+1,nodal+nodalI[i+1]);
+          std::set<mcIdType> s(nodal+nodalI[i]+1,nodal+nodalI[i+1]);
           s.erase(-1);
-          for(std::set<int>::const_iterator it=s.begin();it!=s.end();it++)
+          for(std::set<mcIdType>::const_iterator it=s.begin();it!=s.end();it++)
             {
               if(*it>=0 && *it<nbOfNodes)
                 std::transform(coor+spaceDim*(*it),coor+spaceDim*((*it)+1),ptToFill,ptToFill,std::plus<double>());
@@ -6564,21 +6572,21 @@ DataArrayDouble *MEDCouplingUMesh::computeIsoBarycenterOfNodesPerCell() const
  *  \ref  py_mcumesh_getPartBarycenterAndOwner "Here is a Python example".
  *  \endif
  */
-DataArrayDouble *MEDCouplingUMesh::getPartBarycenterAndOwner(const int *begin, const int *end) const
+DataArrayDouble *MEDCouplingUMesh::getPartBarycenterAndOwner(const mcIdType *begin, const mcIdType *end) const
 {
   DataArrayDouble *ret=DataArrayDouble::New();
   int spaceDim=getSpaceDimension();
-  int nbOfTuple=(int)std::distance(begin,end);
+  std::size_t nbOfTuple=std::distance(begin,end);
   ret->alloc(nbOfTuple,spaceDim);
   double *ptToFill=ret->getPointer();
   double *tmp=new double[spaceDim];
-  const int *nodal=_nodal_connec->begin();
-  const int *nodalI=_nodal_connec_index->begin();
+  const mcIdType *nodal=_nodal_connec->begin();
+  const mcIdType *nodalI=_nodal_connec_index->begin();
   const double *coor=_coords->begin();
-  for(const int *w=begin;w!=end;w++)
+  for(const mcIdType *w=begin;w!=end;w++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)nodal[nodalI[*w]];
-      INTERP_KERNEL::computeBarycenter2<int,INTERP_KERNEL::ALL_C_MODE>(type,nodal+nodalI[*w]+1,nodalI[*w+1]-nodalI[*w]-1,coor,spaceDim,ptToFill);
+      INTERP_KERNEL::computeBarycenter2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(type,nodal+nodalI[*w]+1,nodalI[*w+1]-nodalI[*w]-1,coor,spaceDim,ptToFill);
       ptToFill+=spaceDim;
     }
   delete [] tmp;
@@ -6600,14 +6608,15 @@ DataArrayDouble *MEDCouplingUMesh::getPartBarycenterAndOwner(const int *begin, c
 DataArrayDouble *MEDCouplingUMesh::computePlaneEquationOf3DFaces() const
 {
   MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
-  int nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType nbOfNodes(getNumberOfNodes());
   if(getSpaceDimension()!=3 || getMeshDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::computePlaneEquationOf3DFaces : This method must be applied on a mesh having meshDimension equal 2 and a spaceDimension equal to 3 !");
   ret->alloc(nbOfCells,4);
   double *retPtr(ret->getPointer());
-  const int *nodal(_nodal_connec->begin()),*nodalI(_nodal_connec_index->begin());
+  const mcIdType *nodal(_nodal_connec->begin()),*nodalI(_nodal_connec_index->begin());
   const double *coor(_coords->begin());
-  for(int i=0;i<nbOfCells;i++,nodalI++,retPtr+=4)
+  for(mcIdType i=0;i<nbOfCells;i++,nodalI++,retPtr+=4)
     {
       double matrix[16]={0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0},matrix2[16];
       if(nodalI[1]-nodalI[0]>=4)
@@ -6622,7 +6631,7 @@ DataArrayDouble *MEDCouplingUMesh::computePlaneEquationOf3DFaces() const
           double aa_norm(sqrt(aa[0]*aa[0]+aa[1]*aa[1]+aa[2]*aa[2])),bb_norm(sqrt(bb[0]*bb[0]+bb[1]*bb[1]+bb[2]*bb[2]));
           for(int j=0;j<3;j++)
             {
-              int nodeId(nodal[nodalI[0]+1+j]);
+              mcIdType nodeId(nodal[nodalI[0]+1+j]);
               if(nodeId>=0 && nodeId<nbOfNodes)
                 std::copy(coor+nodeId*3,coor+(nodeId+1)*3,matrix+4*j);
               else
@@ -6645,9 +6654,9 @@ DataArrayDouble *MEDCouplingUMesh::computePlaneEquationOf3DFaces() const
                 }
               //
               double dd[3]={0.,0.,0.};
-              for(int offset=nodalI[0]+1;offset<nodalI[1];offset++)
+              for(mcIdType offset=nodalI[0]+1;offset<nodalI[1];offset++)
                 std::transform(coor+3*nodal[offset],coor+3*(nodal[offset]+1),dd,dd,std::plus<double>());
-              int nbOfNodesInCell(nodalI[1]-nodalI[0]-1);
+              mcIdType nbOfNodesInCell(nodalI[1]-nodalI[0]-1);
               std::transform(dd,dd+3,dd,std::bind2nd(std::multiplies<double>(),1./(double)nbOfNodesInCell));
               std::copy(dd,dd+3,matrix+4*2);
               INTERP_KERNEL::inverseMatrix(matrix,4,matrix2);
@@ -6677,13 +6686,13 @@ MEDCouplingUMesh *MEDCouplingUMesh::Build0DMeshFromCoords(DataArrayDouble *da)
   if(name.empty())
     ret->setName("Mesh");
   ret->setCoords(da);
-  int nbOfTuples(da->getNumberOfTuples());
-  MCAuto<DataArrayInt> c(DataArrayInt::New()),cI(DataArrayInt::New());
+  mcIdType nbOfTuples(da->getNumberOfTuples());
+  MCAuto<DataArrayIdType> c(DataArrayIdType::New()),cI(DataArrayIdType::New());
   c->alloc(2*nbOfTuples,1);
   cI->alloc(nbOfTuples+1,1);
-  int *cp(c->getPointer()),*cip(cI->getPointer());
+  mcIdType *cp(c->getPointer()),*cip(cI->getPointer());
   *cip++=0;
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
       *cp++=INTERP_KERNEL::NORM_POINT1;
       *cp++=i;
@@ -6769,7 +6778,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshes(const std::vector<const MEDCoup
       const MEDCouplingUMesh *cur=a[i];
       const DataArrayDouble *coo=cur->getCoords();
       if(coo)
-        spaceDim=coo->getNumberOfComponents();
+        spaceDim=int(coo->getNumberOfComponents());
     }
   if(spaceDim==-3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::MergeUMeshes : no spaceDim specified ! unable to perform merge !");
@@ -6831,8 +6840,8 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesOnSameCoords(const std::vector<c
   const DataArrayDouble *coords=meshes.front()->getCoords();
   int meshDim=meshes.front()->getMeshDimension();
   std::vector<const MEDCouplingUMesh *>::const_iterator iter=meshes.begin();
-  int meshLgth=0;
-  int meshIndexLgth=0;
+  mcIdType meshLgth=0;
+  mcIdType meshIndexLgth=0;
   for(;iter!=meshes.end();iter++)
     {
       if(coords!=(*iter)->getCoords())
@@ -6842,22 +6851,22 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesOnSameCoords(const std::vector<c
       meshLgth+=(*iter)->getNodalConnectivityArrayLen();
       meshIndexLgth+=(*iter)->getNumberOfCells();
     }
-  MCAuto<DataArrayInt> nodal=DataArrayInt::New();
+  MCAuto<DataArrayIdType> nodal=DataArrayIdType::New();
   nodal->alloc(meshLgth,1);
-  int *nodalPtr=nodal->getPointer();
-  MCAuto<DataArrayInt> nodalIndex=DataArrayInt::New();
+  mcIdType *nodalPtr=nodal->getPointer();
+  MCAuto<DataArrayIdType> nodalIndex=DataArrayIdType::New();
   nodalIndex->alloc(meshIndexLgth+1,1);
-  int *nodalIndexPtr=nodalIndex->getPointer();
-  int offset=0;
+  mcIdType *nodalIndexPtr=nodalIndex->getPointer();
+  mcIdType offset=0;
   for(iter=meshes.begin();iter!=meshes.end();iter++)
     {
-      const int *nod=(*iter)->getNodalConnectivity()->begin();
-      const int *index=(*iter)->getNodalConnectivityIndex()->begin();
-      int nbOfCells=(*iter)->getNumberOfCells();
-      int meshLgth2=(*iter)->getNodalConnectivityArrayLen();
+      const mcIdType *nod=(*iter)->getNodalConnectivity()->begin();
+      const mcIdType *index=(*iter)->getNodalConnectivityIndex()->begin();
+      mcIdType nbOfCells=(*iter)->getNumberOfCells();
+      mcIdType meshLgth2=(*iter)->getNodalConnectivityArrayLen();
       nodalPtr=std::copy(nod,nod+meshLgth2,nodalPtr);
       if(iter!=meshes.begin())
-        nodalIndexPtr=std::transform(index+1,index+nbOfCells+1,nodalIndexPtr,std::bind2nd(std::plus<int>(),offset));
+        nodalIndexPtr=std::transform(index+1,index+nbOfCells+1,nodalIndexPtr,std::bind2nd(std::plus<mcIdType>(),offset));
       else
         nodalIndexPtr=std::copy(index,index+nbOfCells+1,nodalIndexPtr);
       offset+=meshLgth2;
@@ -6879,7 +6888,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesOnSameCoords(const std::vector<c
  *  \param [in] meshes - a vector of meshes (MEDCouplingUMesh) to concatenate.
  *  \param [in] compType - specifies a cell comparison technique. For meaning of its
  *          valid values [0,1,2], see zipConnectivityTraducer().
- *  \param [in,out] corr - an array of DataArrayInt, of the same size as \a
+ *  \param [in,out] corr - an array of DataArrayIdType, of the same size as \a
  *          meshes. The *i*-th array describes cell ids mapping for \a meshes[ *i* ]
  *          mesh. The caller is to delete each of the arrays using decrRef() as it is
  *          no more needed.
@@ -6894,19 +6903,19 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesOnSameCoords(const std::vector<c
  *  \throw If the nodal connectivity of cells of any of \a meshes is not defined.
  *  \throw If the nodal connectivity any of \a meshes includes an invalid id.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::FuseUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayInt *>& corr)
+MEDCouplingUMesh *MEDCouplingUMesh::FuseUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayIdType *>& corr)
 {
   //All checks are delegated to MergeUMeshesOnSameCoords
   MCAuto<MEDCouplingUMesh> ret=MergeUMeshesOnSameCoords(meshes);
-  MCAuto<DataArrayInt> o2n=ret->zipConnectivityTraducer(compType);
+  MCAuto<DataArrayIdType> o2n=ret->zipConnectivityTraducer(compType);
   corr.resize(meshes.size());
   std::size_t nbOfMeshes=meshes.size();
-  int offset=0;
-  const int *o2nPtr=o2n->begin();
+  mcIdType offset=0;
+  const mcIdType *o2nPtr=o2n->begin();
   for(std::size_t i=0;i<nbOfMeshes;i++)
     {
-      DataArrayInt *tmp=DataArrayInt::New();
-      int curNbOfCells=meshes[i]->getNumberOfCells();
+      DataArrayIdType *tmp=DataArrayIdType::New();
+      mcIdType curNbOfCells=meshes[i]->getNumberOfCells();
       tmp->alloc(curNbOfCells,1);
       std::copy(o2nPtr+offset,o2nPtr+offset+curNbOfCells,tmp->getPointer());
       offset+=curNbOfCells;
@@ -6960,11 +6969,11 @@ void MEDCouplingUMesh::PutUMeshesOnSameAggregatedCoords(const std::vector<MEDCou
     }
   MCAuto<DataArrayDouble> res=DataArrayDouble::Aggregate(coords);
   std::vector<MEDCouplingUMesh *>::const_iterator it=meshes.begin();
-  int offset=(*it)->getNumberOfNodes();
+  mcIdType offset=(*it)->getNumberOfNodes();
   (*it++)->setCoords(res);
   for(;it!=meshes.end();it++)
     {
-      int oldNumberOfNodes=(*it)->getNumberOfNodes();
+      mcIdType oldNumberOfNodes=(*it)->getNumberOfNodes();
       (*it)->setCoords(res);
       (*it)->shiftNodeNumbersInConn(offset);
       offset+=oldNumberOfNodes;
@@ -7007,12 +7016,12 @@ void MEDCouplingUMesh::MergeNodesOnUMeshesSharingSameCoords(const std::vector<ME
   if(!coo)
     return;
   //
-  DataArrayInt *comm,*commI;
+  DataArrayIdType *comm,*commI;
   coo->findCommonTuples(eps,-1,comm,commI);
-  MCAuto<DataArrayInt> tmp1(comm),tmp2(commI);
-  int oldNbOfNodes=coo->getNumberOfTuples();
-  int newNbOfNodes;
-  MCAuto<DataArrayInt> o2n=DataArrayInt::ConvertIndexArrayToO2N(oldNbOfNodes,comm->begin(),commI->begin(),commI->end(),newNbOfNodes);
+  MCAuto<DataArrayIdType> tmp1(comm),tmp2(commI);
+  mcIdType oldNbOfNodes=coo->getNumberOfTuples();
+  mcIdType newNbOfNodes;
+  MCAuto<DataArrayIdType> o2n=DataArrayIdType::ConvertIndexArrayToO2N(oldNbOfNodes,comm->begin(),commI->begin(),commI->end(),newNbOfNodes);
   if(oldNbOfNodes==newNbOfNodes)
     return ;
   MCAuto<DataArrayDouble> newCoords=coo->renumberAndReduce(o2n->begin(),newNbOfNodes);
@@ -7027,7 +7036,7 @@ void MEDCouplingUMesh::MergeNodesOnUMeshesSharingSameCoords(const std::vector<ME
 /*!
  * This static operates only for coords in 3D. The polygon is specified by its connectivity nodes in [ \a begin , \a end ).
  */
-bool MEDCouplingUMesh::IsPolygonWellOriented(bool isQuadratic, const double *vec, const int *begin, const int *end, const double *coords)
+bool MEDCouplingUMesh::IsPolygonWellOriented(bool isQuadratic, const double *vec, const mcIdType *begin, const mcIdType *end, const double *coords)
 {
   std::size_t i, ip1;
   double v[3]={0.,0.,0.};
@@ -7046,7 +7055,7 @@ bool MEDCouplingUMesh::IsPolygonWellOriented(bool isQuadratic, const double *vec
       // Same algorithm as above but also using intermediate quadratic points.
       // (taking only linear points might lead to issues if the linearized version of the
       // polygon is not convex or self-intersecting ... see testCellOrientation4)
-      int hsz = sz/2;
+      std::size_t hsz = sz/2;
       for(std::size_t j=0;j<sz;j++)
         {
           if (j%2)  // current point i is quadratic, next point i+1 is standard
@@ -7071,50 +7080,50 @@ bool MEDCouplingUMesh::IsPolygonWellOriented(bool isQuadratic, const double *vec
 /*!
  * The polyhedron is specified by its connectivity nodes in [ \a begin , \a end ).
  */
-bool MEDCouplingUMesh::IsPolyhedronWellOriented(const int *begin, const int *end, const double *coords)
+bool MEDCouplingUMesh::IsPolyhedronWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords)
 {
-  std::vector<std::pair<int,int> > edges;
+  std::vector<std::pair<mcIdType,mcIdType> > edges;
   std::size_t nbOfFaces=std::count(begin,end,-1)+1;
-  const int *bgFace=begin;
+  const mcIdType *bgFace=begin;
   for(std::size_t i=0;i<nbOfFaces;i++)
     {
-      const int *endFace=std::find(bgFace+1,end,-1);
+      const mcIdType *endFace=std::find(bgFace+1,end,-1);
       std::size_t nbOfEdgesInFace=std::distance(bgFace,endFace);
       for(std::size_t j=0;j<nbOfEdgesInFace;j++)
         {
-          std::pair<int,int> p1(bgFace[j],bgFace[(j+1)%nbOfEdgesInFace]);
+          std::pair<mcIdType,mcIdType> p1(bgFace[j],bgFace[(j+1)%nbOfEdgesInFace]);
           if(std::find(edges.begin(),edges.end(),p1)!=edges.end())
             return false;
           edges.push_back(p1);
         }
       bgFace=endFace+1;
     }
-  return INTERP_KERNEL::calculateVolumeForPolyh2<int,INTERP_KERNEL::ALL_C_MODE>(begin,(int)std::distance(begin,end),coords)>-EPS_FOR_POLYH_ORIENTATION;
+  return INTERP_KERNEL::calculateVolumeForPolyh2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(begin,ToIdType(std::distance(begin,end)),coords)>-EPS_FOR_POLYH_ORIENTATION;
 }
 
 /*!
  * The 3D extruded static cell (PENTA6,HEXA8,HEXAGP12...) its connectivity nodes in [ \a begin , \a end ).
  */
-bool MEDCouplingUMesh::Is3DExtrudedStaticCellWellOriented(const int *begin, const int *end, const double *coords)
+bool MEDCouplingUMesh::Is3DExtrudedStaticCellWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords)
 {
   double vec0[3],vec1[3];
   std::size_t sz=std::distance(begin,end);
   if(sz%2!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Is3DExtrudedStaticCellWellOriented : the length of nodal connectivity of extruded cell is not even !");
-  int nbOfNodes=(int)sz/2;
-  INTERP_KERNEL::areaVectorOfPolygon<int,INTERP_KERNEL::ALL_C_MODE>(begin,nbOfNodes,coords,vec0);
+  mcIdType nbOfNodes=ToIdType(sz/2);
+  INTERP_KERNEL::areaVectorOfPolygon<mcIdType,INTERP_KERNEL::ALL_C_MODE>(begin,nbOfNodes,coords,vec0);
   const double *pt0=coords+3*begin[0];
   const double *pt1=coords+3*begin[nbOfNodes];
   vec1[0]=pt1[0]-pt0[0]; vec1[1]=pt1[1]-pt0[1]; vec1[2]=pt1[2]-pt0[2];
   return (vec0[0]*vec1[0]+vec0[1]*vec1[1]+vec0[2]*vec1[2])<0.;
 }
 
-void MEDCouplingUMesh::CorrectExtrudedStaticCell(int *begin, int *end)
+void MEDCouplingUMesh::CorrectExtrudedStaticCell(mcIdType *begin, mcIdType *end)
 {
   std::size_t sz=std::distance(begin,end);
-  INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
+  INTERP_KERNEL::AutoPtr<mcIdType> tmp=new mcIdType[sz];
   std::size_t nbOfNodes(sz/2);
-  std::copy(begin,end,(int *)tmp);
+  std::copy(begin,end,(mcIdType *)tmp);
   for(std::size_t j=1;j<nbOfNodes;j++)
     {
       begin[j]=tmp[nbOfNodes-j];
@@ -7122,7 +7131,7 @@ void MEDCouplingUMesh::CorrectExtrudedStaticCell(int *begin, int *end)
     }
 }
 
-bool MEDCouplingUMesh::IsTetra4WellOriented(const int *begin, const int *end, const double *coords)
+bool MEDCouplingUMesh::IsTetra4WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords)
 {
   std::size_t sz=std::distance(begin,end);
   if(sz!=4)
@@ -7133,13 +7142,13 @@ bool MEDCouplingUMesh::IsTetra4WellOriented(const int *begin, const int *end, co
   return ((vec0[1]*vec1[2]-vec0[2]*vec1[1])*(pt3[0]-pt0[0])+(vec0[2]*vec1[0]-vec0[0]*vec1[2])*(pt3[1]-pt0[1])+(vec0[0]*vec1[1]-vec0[1]*vec1[0])*(pt3[2]-pt0[2]))<0;
 }
 
-bool MEDCouplingUMesh::IsPyra5WellOriented(const int *begin, const int *end, const double *coords)
+bool MEDCouplingUMesh::IsPyra5WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords)
 {
   std::size_t sz=std::distance(begin,end);
   if(sz!=5)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::IsPyra5WellOriented : Pyra5 cell with not 5 nodes ! Call checkConsistency !");
   double vec0[3];
-  INTERP_KERNEL::areaVectorOfPolygon<int,INTERP_KERNEL::ALL_C_MODE>(begin,4,coords,vec0);
+  INTERP_KERNEL::areaVectorOfPolygon<mcIdType,INTERP_KERNEL::ALL_C_MODE>(begin,4,coords,vec0);
   const double *pt0=coords+3*begin[0],*pt1=coords+3*begin[4];
   return (vec0[0]*(pt1[0]-pt0[0])+vec0[1]*(pt1[1]-pt0[1])+vec0[2]*(pt1[2]-pt0[2]))<0.;
 }
@@ -7155,74 +7164,74 @@ bool MEDCouplingUMesh::IsPyra5WellOriented(const int *begin, const int *end, con
  * \param [in] end end of nodal connectivity of a single polyhedron cell (excluded)
  * \param [out] res the result is put at the end of the vector without any alteration of the data.
  */
-void MEDCouplingUMesh::SimplifyPolyhedronCell(double eps, const DataArrayDouble *coords, int index, DataArrayInt *res, MEDCouplingUMesh *faces,
-                                              DataArrayInt *E_Fi, DataArrayInt *E_F, DataArrayInt *F_Ei, DataArrayInt *F_E)
+void MEDCouplingUMesh::SimplifyPolyhedronCell(double eps, const DataArrayDouble *coords, mcIdType index, DataArrayIdType *res, MEDCouplingUMesh *faces,
+                                              DataArrayIdType *E_Fi, DataArrayIdType *E_F, DataArrayIdType *F_Ei, DataArrayIdType *F_E)
 {
-  int nbFaces = E_Fi->getIJ(index + 1, 0) - E_Fi->getIJ(index, 0);
+  mcIdType nbFaces = E_Fi->getIJ(index + 1, 0) - E_Fi->getIJ(index, 0);
   MCAuto<DataArrayDouble> v=DataArrayDouble::New(); v->alloc(nbFaces,3);
   double *vPtr=v->getPointer();
   MCAuto<DataArrayDouble> p=DataArrayDouble::New(); p->alloc(nbFaces,2);
   double *pPtr=p->getPointer();
-  int *e_fi = E_Fi->getPointer(), *e_f = E_F->getPointer(), *f_ei = F_Ei->getPointer(), *f_e = F_E->getPointer();
-  const int *f_idx = faces->getNodalConnectivityIndex()->getPointer(), *f_cnn = faces->getNodalConnectivity()->getPointer();
-  for(int i=0;i<nbFaces;i++,vPtr+=3,pPtr++)
+  mcIdType *e_fi = E_Fi->getPointer(), *e_f = E_F->getPointer(), *f_ei = F_Ei->getPointer(), *f_e = F_E->getPointer();
+  const mcIdType *f_idx = faces->getNodalConnectivityIndex()->getPointer(), *f_cnn = faces->getNodalConnectivity()->getPointer();
+  for(mcIdType i=0;i<nbFaces;i++,vPtr+=3,pPtr++)
     {
-      int face = e_f[e_fi[index] + i];
+      mcIdType face = e_f[e_fi[index] + i];
       ComputeVecAndPtOfFace(eps, coords->begin(), f_cnn + f_idx[face] + 1, f_cnn + f_idx[face + 1], vPtr, pPtr);
       // to differentiate faces going to different cells:
       pPtr++, *pPtr = 0;
-      for (int j = f_ei[face]; j < f_ei[face + 1]; j++)
-        *pPtr += f_e[j];
+      for (mcIdType j = f_ei[face]; j < f_ei[face + 1]; j++)
+        *pPtr += FromIdType<double>(f_e[j]);
     }
   pPtr=p->getPointer(); vPtr=v->getPointer();
-  DataArrayInt *comm1=0,*commI1=0;
+  DataArrayIdType *comm1=0,*commI1=0;
   v->findCommonTuples(eps,-1,comm1,commI1);
-  for (int i = 0; i < nbFaces; i++)
+  for (mcIdType i = 0; i < nbFaces; i++)
     if (comm1->findIdFirstEqual(i) < 0)
       {
         comm1->pushBackSilent(i);
         commI1->pushBackSilent(comm1->getNumberOfTuples());
       }
-  MCAuto<DataArrayInt> comm1Auto(comm1),commI1Auto(commI1);
-  const int *comm1Ptr=comm1->begin();
-  const int *commI1Ptr=commI1->begin();
-  int nbOfGrps1=commI1Auto->getNumberOfTuples()-1;
-  res->pushBackSilent((int)INTERP_KERNEL::NORM_POLYHED);
+  MCAuto<DataArrayIdType> comm1Auto(comm1),commI1Auto(commI1);
+  const mcIdType *comm1Ptr=comm1->begin();
+  const mcIdType *commI1Ptr=commI1->begin();
+  mcIdType nbOfGrps1=commI1Auto->getNumberOfTuples()-1;
+  res->pushBackSilent(ToIdType(INTERP_KERNEL::NORM_POLYHED));
   //
-  for(int i=0;i<nbOfGrps1;i++)
+  for(mcIdType i=0;i<nbOfGrps1;i++)
     {
-      int vecId=comm1Ptr[commI1Ptr[i]];
+      mcIdType vecId=comm1Ptr[commI1Ptr[i]];
       MCAuto<DataArrayDouble> tmpgrp2=p->selectByTupleId(comm1Ptr+commI1Ptr[i],comm1Ptr+commI1Ptr[i+1]);
-      DataArrayInt *comm2=0,*commI2=0;
+      DataArrayIdType *comm2=0,*commI2=0;
       tmpgrp2->findCommonTuples(eps,-1,comm2,commI2);
-      for (int j = 0; j < commI1Ptr[i+1] - commI1Ptr[i]; j++)
+      for (mcIdType j = 0; j < commI1Ptr[i+1] - commI1Ptr[i]; j++)
         if (comm2->findIdFirstEqual(j) < 0)
           {
             comm2->pushBackSilent(j);
             commI2->pushBackSilent(comm2->getNumberOfTuples());
           }
-      MCAuto<DataArrayInt> comm2Auto(comm2),commI2Auto(commI2);
-      const int *comm2Ptr=comm2->begin();
-      const int *commI2Ptr=commI2->begin();
-      int nbOfGrps2=commI2Auto->getNumberOfTuples()-1;
-      for(int j=0;j<nbOfGrps2;j++)
+      MCAuto<DataArrayIdType> comm2Auto(comm2),commI2Auto(commI2);
+      const mcIdType *comm2Ptr=comm2->begin();
+      const mcIdType *commI2Ptr=commI2->begin();
+      mcIdType nbOfGrps2=commI2Auto->getNumberOfTuples()-1;
+      for(mcIdType j=0;j<nbOfGrps2;j++)
         {
           if(commI2Ptr[j+1] == commI2Ptr[j] + 1)
             {
-              int face = e_f[e_fi[index] + comm1Ptr[commI1Ptr[i] + comm2Ptr[commI2Ptr[j]]]]; //hmmm
+              mcIdType face = e_f[e_fi[index] + comm1Ptr[commI1Ptr[i] + comm2Ptr[commI2Ptr[j]]]]; //hmmm
               res->insertAtTheEnd(f_cnn + f_idx[face] + 1, f_cnn + f_idx[face + 1]);
               res->pushBackSilent(-1);
             }
           else
             {
-              int pointId=comm1Ptr[commI1Ptr[i]+comm2Ptr[commI2Ptr[j]]];
-              MCAuto<DataArrayInt> ids2=comm2->selectByTupleIdSafeSlice(commI2Ptr[j],commI2Ptr[j+1],1);
+              mcIdType pointId=comm1Ptr[commI1Ptr[i]+comm2Ptr[commI2Ptr[j]]];
+              MCAuto<DataArrayIdType> ids2=comm2->selectByTupleIdSafeSlice(commI2Ptr[j],commI2Ptr[j+1],1);
               ids2->transformWithIndArr(comm1Ptr+commI1Ptr[i],comm1Ptr+commI1Ptr[i+1]);
               ids2->transformWithIndArr(e_f + e_fi[index], e_f + e_fi[index + 1]);
               MCAuto<MEDCouplingUMesh> mm3=static_cast<MEDCouplingUMesh *>(faces->buildPartOfMySelf(ids2->begin(),ids2->end(),true));
-              MCAuto<DataArrayInt> idsNodeTmp=mm3->zipCoordsTraducer();
-              MCAuto<DataArrayInt> idsNode=idsNodeTmp->invertArrayO2N2N2O(mm3->getNumberOfNodes());
-              const int *idsNodePtr=idsNode->begin();
+              MCAuto<DataArrayIdType> idsNodeTmp=mm3->zipCoordsTraducer();
+              MCAuto<DataArrayIdType> idsNode=idsNodeTmp->invertArrayO2N2N2O(mm3->getNumberOfNodes());
+              const mcIdType *idsNodePtr=idsNode->begin();
               double center[3]; center[0]=pPtr[2*pointId]*vPtr[3*vecId]; center[1]=pPtr[2*pointId]*vPtr[3*vecId+1]; center[2]=pPtr[2*pointId]*vPtr[3*vecId+2];
               double vec[3]; vec[0]=vPtr[3*vecId+1]; vec[1]=-vPtr[3*vecId]; vec[2]=0.;
               double norm=vec[0]*vec[0]+vec[1]*vec[1]+vec[2]*vec[2];
@@ -7233,13 +7242,13 @@ void MEDCouplingUMesh::SimplifyPolyhedronCell(double eps, const DataArrayDouble
                 }
               mm3->changeSpaceDimension(2);
               MCAuto<MEDCouplingUMesh> mm4=mm3->buildSpreadZonesWithPoly();
-              const int *conn4=mm4->getNodalConnectivity()->begin();
-              const int *connI4=mm4->getNodalConnectivityIndex()->begin();
-              int nbOfCells=mm4->getNumberOfCells();
-              for(int k=0;k<nbOfCells;k++)
+              const mcIdType *conn4=mm4->getNodalConnectivity()->begin();
+              const mcIdType *connI4=mm4->getNodalConnectivityIndex()->begin();
+              mcIdType nbOfCells=mm4->getNumberOfCells();
+              for(mcIdType k=0;k<nbOfCells;k++)
                 {
                   int l=0;
-                  for(const int *work=conn4+connI4[k]+1;work!=conn4+connI4[k+1];work++,l++)
+                  for(const mcIdType *work=conn4+connI4[k]+1;work!=conn4+connI4[k+1];work++,l++)
                     res->pushBackSilent(idsNodePtr[*work]);
                   res->pushBackSilent(-1);
                 }
@@ -7260,7 +7269,7 @@ void MEDCouplingUMesh::SimplifyPolyhedronCell(double eps, const DataArrayDouble
  * \param [out] v the normalized vector of size 3
  * \param [out] p the pos of plane
  */
-void MEDCouplingUMesh::ComputeVecAndPtOfFace(double eps, const double *coords, const int *begin, const int *end, double *v, double *p)
+void MEDCouplingUMesh::ComputeVecAndPtOfFace(double eps, const double *coords, const mcIdType *begin, const mcIdType *end, double *v, double *p)
 {
   std::size_t nbPoints=std::distance(begin,end);
   if(nbPoints<3)
@@ -7306,15 +7315,15 @@ void MEDCouplingUMesh::ComputeVecAndPtOfFace(double eps, const double *coords, c
  * This method tries to obtain a well oriented polyhedron.
  * If the algorithm fails, an exception will be thrown.
  */
-void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(int *begin, int *end, const double *coords)
+void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(mcIdType *begin, mcIdType *end, const double *coords)
 {
-  std::list< std::pair<int,int> > edgesOK,edgesFinished;
+  std::list< std::pair<mcIdType,mcIdType> > edgesOK,edgesFinished;
   std::size_t nbOfFaces=std::count(begin,end,-1)+1;
   std::vector<bool> isPerm(nbOfFaces,false);//field on faces False: I don't know, True : oriented
   isPerm[0]=true;
-  int *bgFace=begin,*endFace=std::find(begin+1,end,-1);
+  mcIdType *bgFace=begin,*endFace=std::find(begin+1,end,-1);
   std::size_t nbOfEdgesInFace=std::distance(bgFace,endFace);
-  for(std::size_t l=0;l<nbOfEdgesInFace;l++) { std::pair<int,int> p1(bgFace[l],bgFace[(l+1)%nbOfEdgesInFace]); edgesOK.push_back(p1); }
+  for(std::size_t l=0;l<nbOfEdgesInFace;l++) { std::pair<mcIdType,mcIdType> p1(bgFace[l],bgFace[(l+1)%nbOfEdgesInFace]); edgesOK.push_back(p1); }
   //
   while(std::find(isPerm.begin(),isPerm.end(),false)!=isPerm.end())
     {
@@ -7329,8 +7338,8 @@ void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(int *begin, int *end, c
               bool b;
               for(std::size_t j=0;j<nbOfEdgesInFace;j++)
                 {
-                  std::pair<int,int> p1(bgFace[j],bgFace[(j+1)%nbOfEdgesInFace]);
-                  std::pair<int,int> p2(p1.second,p1.first);
+                  std::pair<mcIdType,mcIdType> p1(bgFace[j],bgFace[(j+1)%nbOfEdgesInFace]);
+                  std::pair<mcIdType,mcIdType> p2(p1.second,p1.first);
                   bool b1=std::find(edgesOK.begin(),edgesOK.end(),p1)!=edgesOK.end();
                   bool b2=std::find(edgesOK.begin(),edgesOK.end(),p2)!=edgesOK.end();
                   if(b1 || b2) { b=b2; isPerm[i]=true; smthChanged++; break; }
@@ -7341,13 +7350,13 @@ void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(int *begin, int *end, c
                     std::reverse(bgFace+1,endFace);
                   for(std::size_t j=0;j<nbOfEdgesInFace;j++)
                     {
-                      std::pair<int,int> p1(bgFace[j],bgFace[(j+1)%nbOfEdgesInFace]);
-                      std::pair<int,int> p2(p1.second,p1.first);
+                      std::pair<mcIdType,mcIdType> p1(bgFace[j],bgFace[(j+1)%nbOfEdgesInFace]);
+                      std::pair<mcIdType,mcIdType> p2(p1.second,p1.first);
                       if(std::find(edgesOK.begin(),edgesOK.end(),p1)!=edgesOK.end())
                         { std::ostringstream oss; oss << "Face #" << j << " of polyhedron looks bad !"; throw INTERP_KERNEL::Exception(oss.str()); }
                       if(std::find(edgesFinished.begin(),edgesFinished.end(),p1)!=edgesFinished.end() || std::find(edgesFinished.begin(),edgesFinished.end(),p2)!=edgesFinished.end())
                         { std::ostringstream oss; oss << "Face #" << j << " of polyhedron looks bad !"; throw INTERP_KERNEL::Exception(oss.str()); }
-                      std::list< std::pair<int,int> >::iterator it=std::find(edgesOK.begin(),edgesOK.end(),p2);
+                      std::list< std::pair<mcIdType,mcIdType> >::iterator it=std::find(edgesOK.begin(),edgesOK.end(),p2);
                       if(it!=edgesOK.end())
                         {
                           edgesOK.erase(it);
@@ -7365,7 +7374,7 @@ void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(int *begin, int *end, c
     }
   if(!edgesOK.empty())
     { throw INTERP_KERNEL::Exception("The polyhedron looks too bad to be repaired : Some edges are shared only once !"); }
-  if(INTERP_KERNEL::calculateVolumeForPolyh2<int,INTERP_KERNEL::ALL_C_MODE>(begin,(int)std::distance(begin,end),coords)<-EPS_FOR_POLYH_ORIENTATION)
+  if(INTERP_KERNEL::calculateVolumeForPolyh2<mcIdType,INTERP_KERNEL::ALL_C_MODE>(begin,ToIdType(std::distance(begin,end)),coords)<-EPS_FOR_POLYH_ORIENTATION)
     {//not lucky ! The first face was not correctly oriented : reorient all faces...
       bgFace=begin;
       for(std::size_t i=0;i<nbOfFaces;i++)
@@ -7384,16 +7393,16 @@ void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(int *begin, int *end, c
  *
  * \return a newly allocated array containing the connectivity of a polygon type enum included (NORM_POLYGON in pos#0)
  */
-DataArrayInt *MEDCouplingUMesh::buildUnionOf2DMesh() const
+DataArrayIdType *MEDCouplingUMesh::buildUnionOf2DMesh() const
 {
   if(getMeshDimension()!=2 || getSpaceDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildUnionOf2DMesh : meshdimension, spacedimension must be equal to 2 !");
   MCAuto<MEDCouplingUMesh> skin(computeSkin());
-  int oldNbOfNodes(skin->getNumberOfNodes());
-  MCAuto<DataArrayInt> o2n(skin->zipCoordsTraducer());
-  int nbOfNodesExpected(skin->getNumberOfNodes());
-  MCAuto<DataArrayInt> n2o(o2n->invertArrayO2N2N2O(oldNbOfNodes));
-  int nbCells(skin->getNumberOfCells());
+  mcIdType oldNbOfNodes(skin->getNumberOfNodes());
+  MCAuto<DataArrayIdType> o2n(skin->zipCoordsTraducer());
+  mcIdType nbOfNodesExpected(skin->getNumberOfNodes());
+  MCAuto<DataArrayIdType> n2o(o2n->invertArrayO2N2N2O(oldNbOfNodes));
+  mcIdType nbCells=skin->getNumberOfCells();
   if(nbCells==nbOfNodesExpected)
     return buildUnionOf2DMeshLinear(skin,n2o);
   else if(2*nbCells==nbOfNodesExpected)
@@ -7408,20 +7417,20 @@ DataArrayInt *MEDCouplingUMesh::buildUnionOf2DMesh() const
  *
  * \return a newly allocated array containing the connectivity of a polygon type enum included (NORM_POLYHED in pos#0)
  */
-DataArrayInt *MEDCouplingUMesh::buildUnionOf3DMesh() const
+DataArrayIdType *MEDCouplingUMesh::buildUnionOf3DMesh() const
 {
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildUnionOf3DMesh : meshdimension, spacedimension must be equal to 2 !");
   MCAuto<MEDCouplingUMesh> m=computeSkin();
-  const int *conn=m->getNodalConnectivity()->begin();
-  const int *connI=m->getNodalConnectivityIndex()->begin();
-  int nbOfCells=m->getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(m->getNodalConnectivity()->getNumberOfTuples(),1);
-  int *work=ret->getPointer();  *work++=INTERP_KERNEL::NORM_POLYHED;
+  const mcIdType *conn=m->getNodalConnectivity()->begin();
+  const mcIdType *connI=m->getNodalConnectivityIndex()->begin();
+  mcIdType nbOfCells=m->getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(m->getNodalConnectivity()->getNumberOfTuples(),1);
+  mcIdType *work=ret->getPointer();  *work++=INTERP_KERNEL::NORM_POLYHED;
   if(nbOfCells<1)
     return ret.retn();
   work=std::copy(conn+connI[0]+1,conn+connI[1],work);
-  for(int i=1;i<nbOfCells;i++)
+  for(mcIdType i=1;i<nbOfCells;i++)
     {
       *work++=-1;
       work=std::copy(conn+connI[i]+1,conn+connI[i+1],work);
@@ -7444,19 +7453,19 @@ MEDCouplingSkyLineArray* MEDCouplingUMesh::generateGraph() const
   checkConnectivityFullyDefined();
 
   int meshDim = this->getMeshDimension();
-  MEDCoupling::DataArrayInt* indexr=MEDCoupling::DataArrayInt::New();
-  MEDCoupling::DataArrayInt* revConn=MEDCoupling::DataArrayInt::New();
+  MEDCoupling::DataArrayIdType* indexr=MEDCoupling::DataArrayIdType::New();
+  MEDCoupling::DataArrayIdType* revConn=MEDCoupling::DataArrayIdType::New();
   this->getReverseNodalConnectivity(revConn,indexr);
-  const int* indexr_ptr=indexr->begin();
-  const int* revConn_ptr=revConn->begin();
+  const mcIdType* indexr_ptr=indexr->begin();
+  const mcIdType* revConn_ptr=revConn->begin();
 
-  const MEDCoupling::DataArrayInt* index;
-  const MEDCoupling::DataArrayInt* conn;
+  const MEDCoupling::DataArrayIdType* index;
+  const MEDCoupling::DataArrayIdType* conn;
   conn=this->getNodalConnectivity(); // it includes a type as the 1st element!!!
   index=this->getNodalConnectivityIndex();
-  int nbCells=this->getNumberOfCells();
-  const int* index_ptr=index->begin();
-  const int* conn_ptr=conn->begin();
+  mcIdType nbCells=this->getNumberOfCells();
+  const mcIdType* index_ptr=index->begin();
+  const mcIdType* conn_ptr=conn->begin();
 
   //creating graph arcs (cell to cell relations)
   //arcs are stored in terms of (index,value) notation
@@ -7468,25 +7477,25 @@ MEDCouplingSkyLineArray* MEDCouplingUMesh::generateGraph() const
   //warning here one node have less than or equal effective number of cell with it
   //but cell could have more than effective nodes
   //because other equals nodes in other domain (with other global inode)
-  std::vector <int> cell2cell_index(nbCells+1,0);
-  std::vector <int> cell2cell;
+  std::vector <mcIdType> cell2cell_index(nbCells+1,0);
+  std::vector <mcIdType> cell2cell;
   cell2cell.reserve(3*nbCells);
 
-  for (int icell=0; icell<nbCells;icell++)
+  for (mcIdType icell=0; icell<nbCells;icell++)
     {
-      std::map<int,int > counter;
-      for (int iconn=index_ptr[icell]+1; iconn<index_ptr[icell+1];iconn++)
+      std::map<mcIdType,mcIdType > counter;
+      for (mcIdType iconn=index_ptr[icell]+1; iconn<index_ptr[icell+1];iconn++)
         {
-          int inode=conn_ptr[iconn];
-          for (int iconnr=indexr_ptr[inode]; iconnr<indexr_ptr[inode+1];iconnr++)
+          mcIdType inode=conn_ptr[iconn];
+          for (mcIdType iconnr=indexr_ptr[inode]; iconnr<indexr_ptr[inode+1];iconnr++)
             {
-              int icell2=revConn_ptr[iconnr];
-              std::map<int,int>::iterator iter=counter.find(icell2);
+              mcIdType icell2=revConn_ptr[iconnr];
+              std::map<mcIdType,mcIdType>::iterator iter=counter.find(icell2);
               if (iter!=counter.end()) (iter->second)++;
               else counter.insert(std::make_pair(icell2,1));
             }
         }
-      for (std::map<int,int>::const_iterator iter=counter.begin();
+      for (std::map<mcIdType,mcIdType>::const_iterator iter=counter.begin();
            iter!=counter.end(); iter++)
         if (iter->second >= meshDim)
           {
@@ -7497,7 +7506,7 @@ MEDCouplingSkyLineArray* MEDCouplingUMesh::generateGraph() const
   indexr->decrRef();
   revConn->decrRef();
   cell2cell_index[0]=0;
-  for (int icell=0; icell<nbCells;icell++)
+  for (mcIdType icell=0; icell<nbCells;icell++)
     cell2cell_index[icell+1]=cell2cell_index[icell]+cell2cell_index[icell+1];
 
   //filling up index and value to create skylinearray structure
@@ -7508,7 +7517,7 @@ MEDCouplingSkyLineArray* MEDCouplingUMesh::generateGraph() const
 
 void MEDCouplingUMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const
 {
-  int nbOfCells=getNumberOfCells();
+  mcIdType nbOfCells=getNumberOfCells();
   if(nbOfCells<=0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::writeVTK : the unstructured mesh has no cells !");
   ofs << "  <" << getVTKDataSetType() << ">\n";
@@ -7527,15 +7536,15 @@ void MEDCouplingUMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData
     }
   ofs << "      </Points>\n";
   ofs << "      <Cells>\n";
-  const int *cPtr=_nodal_connec->begin();
-  const int *cIPtr=_nodal_connec_index->begin();
-  MCAuto<DataArrayInt> faceoffsets=DataArrayInt::New(); faceoffsets->alloc(nbOfCells,1);
-  MCAuto<DataArrayInt> types=DataArrayInt::New(); types->alloc(nbOfCells,1);
-  MCAuto<DataArrayInt> offsets=DataArrayInt::New(); offsets->alloc(nbOfCells,1);
-  MCAuto<DataArrayInt> connectivity=DataArrayInt::New(); connectivity->alloc(_nodal_connec->getNumberOfTuples()-nbOfCells,1);
-  int *w1=faceoffsets->getPointer(),*w2=types->getPointer(),*w3=offsets->getPointer(),*w4=connectivity->getPointer();
-  int szFaceOffsets=0,szConn=0;
-  for(int i=0;i<nbOfCells;i++,w1++,w2++,w3++)
+  const mcIdType *cPtr=_nodal_connec->begin();
+  const mcIdType *cIPtr=_nodal_connec_index->begin();
+  MCAuto<DataArrayIdType> faceoffsets=DataArrayIdType::New(); faceoffsets->alloc(nbOfCells,1);
+  MCAuto<DataArrayIdType> types=DataArrayIdType::New(); types->alloc(nbOfCells,1);
+  MCAuto<DataArrayIdType> offsets=DataArrayIdType::New(); offsets->alloc(nbOfCells,1);
+  MCAuto<DataArrayIdType> connectivity=DataArrayIdType::New(); connectivity->alloc(_nodal_connec->getNumberOfTuples()-nbOfCells,1);
+  mcIdType *w1=faceoffsets->getPointer(),*w2=types->getPointer(),*w3=offsets->getPointer(),*w4=connectivity->getPointer();
+  mcIdType szFaceOffsets=0,szConn=0;
+  for(mcIdType i=0;i<nbOfCells;i++,w1++,w2++,w3++)
     {
       *w2=cPtr[cIPtr[i]];
       if((INTERP_KERNEL::NormalizedCellType)cPtr[cIPtr[i]]!=INTERP_KERNEL::NORM_POLYHED)
@@ -7546,39 +7555,40 @@ void MEDCouplingUMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData
         }
       else
         {
-          int deltaFaceOffset=cIPtr[i+1]-cIPtr[i]+1;
+          mcIdType deltaFaceOffset=cIPtr[i+1]-cIPtr[i]+1;
           *w1=szFaceOffsets+deltaFaceOffset; szFaceOffsets+=deltaFaceOffset;
-          std::set<int> c(cPtr+cIPtr[i]+1,cPtr+cIPtr[i+1]); c.erase(-1);
-          *w3=szConn+(int)c.size(); szConn+=(int)c.size();
+          std::set<mcIdType> c(cPtr+cIPtr[i]+1,cPtr+cIPtr[i+1]); c.erase(-1);
+          *w3=szConn+ToIdType(c.size()); szConn+=ToIdType(c.size());
           w4=std::copy(c.begin(),c.end(),w4);
         }
     }
   types->transformWithIndArr(MEDCOUPLING2VTKTYPETRADUCER,MEDCOUPLING2VTKTYPETRADUCER+INTERP_KERNEL::NORM_MAXTYPE+1);
   types->writeVTK(ofs,8,"UInt8","types",byteData);
-  offsets->writeVTK(ofs,8,"Int32","offsets",byteData);
+  std::string vtkTypeName = Traits<mcIdType>::VTKReprStr;
+  offsets->writeVTK(ofs,8,vtkTypeName,"offsets",byteData);
   if(szFaceOffsets!=0)
     {//presence of Polyhedra
       connectivity->reAlloc(szConn);
-      faceoffsets->writeVTK(ofs,8,"Int32","faceoffsets",byteData);
-      MCAuto<DataArrayInt> faces=DataArrayInt::New(); faces->alloc(szFaceOffsets,1);
+      faceoffsets->writeVTK(ofs,8,vtkTypeName,"faceoffsets",byteData);
+      MCAuto<DataArrayIdType> faces=DataArrayIdType::New(); faces->alloc(szFaceOffsets,1);
       w1=faces->getPointer();
-      for(int i=0;i<nbOfCells;i++)
+      for(mcIdType i=0;i<nbOfCells;i++)
         if((INTERP_KERNEL::NormalizedCellType)cPtr[cIPtr[i]]==INTERP_KERNEL::NORM_POLYHED)
           {
-            int nbFaces=std::count(cPtr+cIPtr[i]+1,cPtr+cIPtr[i+1],-1)+1;
+            mcIdType nbFaces=ToIdType(std::count(cPtr+cIPtr[i]+1,cPtr+cIPtr[i+1],-1))+1;
             *w1++=nbFaces;
-            const int *w6=cPtr+cIPtr[i]+1,*w5=0;
-            for(int j=0;j<nbFaces;j++)
+            const mcIdType *w6=cPtr+cIPtr[i]+1,*w5=0;
+            for(mcIdType j=0;j<nbFaces;j++)
               {
                 w5=std::find(w6,cPtr+cIPtr[i+1],-1);
-                *w1++=(int)std::distance(w6,w5);
+                *w1++=ToIdType(std::distance(w6,w5));
                 w1=std::copy(w6,w5,w1);
                 w6=w5+1;
               }
           }
-      faces->writeVTK(ofs,8,"Int32","faces",byteData);
+      faces->writeVTK(ofs,8,vtkTypeName,"faces",byteData);
     }
-  connectivity->writeVTK(ofs,8,"Int32","connectivity",byteData);
+  connectivity->writeVTK(ofs,8,vtkTypeName,"connectivity",byteData);
   ofs << "      </Cells>\n";
   ofs << "    </Piece>\n";
   ofs << "  </" << getVTKDataSetType() << ">\n";
@@ -7602,8 +7612,8 @@ void MEDCouplingUMesh::reprQuickOverview(std::ostream& stream) const
     { stream << std::endl << "Nodal connectivity NOT set !"; return ; }
   if(!_nodal_connec_index->isAllocated())
     { stream << std::endl << "Nodal connectivity set but not allocated !"; return ; }
-  int lgth=_nodal_connec_index->getNumberOfTuples();
-  int cpt=_nodal_connec_index->getNumberOfComponents();
+  mcIdType lgth=_nodal_connec_index->getNumberOfTuples();
+  std::size_t cpt=_nodal_connec_index->getNumberOfComponents();
   if(cpt!=1 || lgth<1)
     return ;
   stream << std::endl << "Number of cells : " << lgth-1 << ".";
@@ -7625,54 +7635,54 @@ std::string MEDCouplingUMesh::getVTKFileExtension() const
  * Provides a renumbering of the cells of this (which has to be a piecewise connected 1D line), so that
  * the segments of the line are indexed in consecutive order (i.e. cells \a i and \a i+1 are neighbors).
  * This doesn't modify the mesh. This method only works using nodal connectivity consideration. Coordinates of nodes are ignored here.
- * The caller is to deal with the resulting DataArrayInt.
+ * The caller is to deal with the resulting DataArrayIdType.
  *  \throw If the coordinate array is not set.
  *  \throw If the nodal connectivity of the cells is not defined.
  *  \throw If m1 is not a mesh of dimension 2, or m1 is not a mesh of dimension 1
  *  \throw If m2 is not a (piecewise) line (i.e. if a point has more than 2 adjacent segments)
  *
- * \sa DataArrayInt::sortEachPairToMakeALinkedList
+ * \sa DataArrayIdType::sortEachPairToMakeALinkedList
  */
-DataArrayInt *MEDCouplingUMesh::orderConsecutiveCells1D() const
+DataArrayIdType *MEDCouplingUMesh::orderConsecutiveCells1D() const
 {
   checkFullyDefined();
   if(getMeshDimension()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::orderConsecutiveCells1D works on unstructured mesh with meshdim = 1 !");
 
   // Check that this is a line (and not a more complex 1D mesh) - each point is used at most by 2 segments:
-  MCAuto<DataArrayInt> _d(DataArrayInt::New()),_dI(DataArrayInt::New());
-  MCAuto<DataArrayInt> _rD(DataArrayInt::New()),_rDI(DataArrayInt::New());
+  MCAuto<DataArrayIdType> _d(DataArrayIdType::New()),_dI(DataArrayIdType::New());
+  MCAuto<DataArrayIdType> _rD(DataArrayIdType::New()),_rDI(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> m_points(buildDescendingConnectivity(_d, _dI, _rD, _rDI));
-  const int *d(_d->begin()), *dI(_dI->begin());
-  const int *rD(_rD->begin()), *rDI(_rDI->begin());
-  MCAuto<DataArrayInt> _dsi(_rDI->deltaShiftIndex());
-  const int * dsi(_dsi->begin());
-  MCAuto<DataArrayInt> dsii = _dsi->findIdsNotInRange(0,3);
+  const mcIdType *d(_d->begin()), *dI(_dI->begin());
+  const mcIdType *rD(_rD->begin()), *rDI(_rDI->begin());
+  MCAuto<DataArrayIdType> _dsi(_rDI->deltaShiftIndex());
+  const mcIdType * dsi(_dsi->begin());
+  MCAuto<DataArrayIdType> dsii = _dsi->findIdsNotInRange(0,3);
   m_points=0;
   if (dsii->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::orderConsecutiveCells1D only work with a mesh being a (piecewise) connected line!");
 
-  int nc(getNumberOfCells());
-  MCAuto<DataArrayInt> result(DataArrayInt::New());
+  mcIdType nc=getNumberOfCells();
+  MCAuto<DataArrayIdType> result(DataArrayIdType::New());
   result->alloc(nc,1);
 
   // set of edges not used so far
-  std::set<int> edgeSet;
-  for (int i=0; i<nc; edgeSet.insert(i), i++);
+  std::set<mcIdType> edgeSet;
+  for (mcIdType i=0; i<nc; edgeSet.insert(i), i++);
 
-  int startSeg=0;
-  int newIdx=0;
+  mcIdType startSeg=0;
+  mcIdType newIdx=0;
   // while we have points with only one neighbor segments
   do
     {
-      std::list<int> linePiece;
+      std::list<mcIdType> linePiece;
       // fills a list of consecutive segment linked to startSeg. This can go forward or backward.
       for (int direction=0;direction<2;direction++) // direction=0 --> forward, direction=1 --> backward
         {
           // Fill the list forward (resp. backward) from the start segment:
-          int activeSeg = startSeg;
-          int prevPointId = -20;
-          int ptId;
+          mcIdType activeSeg = startSeg;
+          mcIdType prevPointId = -20;
+          mcIdType ptId;
           while (!edgeSet.empty())
             {
               if (!(direction == 1 && prevPointId==-20)) // prevent adding twice startSeg
@@ -7684,18 +7694,18 @@ DataArrayInt *MEDCouplingUMesh::orderConsecutiveCells1D() const
                   edgeSet.erase(activeSeg);
                 }
 
-              int ptId1 = d[dI[activeSeg]], ptId2 = d[dI[activeSeg]+1];
+              mcIdType ptId1 = d[dI[activeSeg]], ptId2 = d[dI[activeSeg]+1];
               ptId = direction ? (ptId1 == prevPointId ? ptId2 : ptId1) : (ptId2 == prevPointId ? ptId1 : ptId2);
               if (dsi[ptId] == 1) // hitting the end of the line
                 break;
               prevPointId = ptId;
-              int seg1 = rD[rDI[ptId]], seg2 = rD[rDI[ptId]+1];
+              mcIdType seg1 = rD[rDI[ptId]], seg2 = rD[rDI[ptId]+1];
               activeSeg = (seg1 == activeSeg) ? seg2 : seg1;
             }
         }
       // Done, save final piece into DA:
       std::copy(linePiece.begin(), linePiece.end(), result->getPointer()+newIdx);
-      newIdx += linePiece.size();
+      newIdx += ToIdType(linePiece.size());
 
       // identify next valid start segment (one which is not consumed)
       if(!edgeSet.empty())
@@ -7715,7 +7725,7 @@ DataArrayInt *MEDCouplingUMesh::orderConsecutiveCells1D() const
  * \b WARNING : is returned value is different from 0 a call to MEDCouplingUMesh::mergeNodes is necessary to
  * avoid to have a non conform mesh.
  *
- * \return int - the number of new nodes created (in most of cases 0).
+ * \return mcIdType - the number of new nodes created (in most of cases 0).
  *
  * \throw If \a this is not coherent.
  * \throw If \a this has not spaceDim equal to 2.
@@ -7723,7 +7733,7 @@ DataArrayInt *MEDCouplingUMesh::orderConsecutiveCells1D() const
  * \throw If some subcells needed to be split are orphan.
  * \sa MEDCouplingUMesh::conformize2D
  */
-int MEDCouplingUMesh::split2DCells(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *midOpt, const DataArrayInt *midOptI)
+mcIdType MEDCouplingUMesh::split2DCells(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI, const DataArrayIdType *midOpt, const DataArrayIdType *midOptI)
 {
   if(!desc || !descI || !subNodesInSeg || !subNodesInSegI)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split2DCells : the 4 first arrays must be not null !");
@@ -7750,7 +7760,7 @@ int MEDCouplingUMesh::split2DCells(const DataArrayInt *desc, const DataArrayInt
  *
  * \return false if the input connectivity represents already the convex hull, true if the input cell needs to be reordered.
  */
-bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, const int *nodalConnBg, const int *nodalConnEnd, DataArrayInt *nodalConnecOut)
+bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, DataArrayIdType *nodalConnecOut)
 {
   std::size_t sz=std::distance(nodalConnBg,nodalConnEnd);
   if(sz>=4)
@@ -7758,8 +7768,8 @@ bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, co
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)*nodalConnBg);
       if(cm.getDimension()==2)
         {
-          const int *node=nodalConnBg+1;
-          int startNode=*node++;
+          const mcIdType *node=nodalConnBg+1;
+          mcIdType startNode=*node++;
           double refX=coords[2*startNode];
           for(;node!=nodalConnEnd;node++)
             {
@@ -7769,14 +7779,14 @@ bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, co
                   refX=coords[2*startNode];
                 }
             }
-          std::vector<int> tmpOut; tmpOut.reserve(sz); tmpOut.push_back(startNode);
+          std::vector<mcIdType> tmpOut; tmpOut.reserve(sz); tmpOut.push_back(startNode);
           refX=1e300;
           double tmp1;
           double tmp2[2];
           double angle0=-M_PI/2;
           //
-          int nextNode=-1;
-          int prevNode=-1;
+          mcIdType nextNode=-1;
+          mcIdType prevNode=-1;
           double resRef;
           double angleNext=0.;
           while(nextNode!=startNode)
@@ -7811,8 +7821,8 @@ bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, co
                   tmpOut.push_back(nextNode);
                 }
             }
-          std::vector<int> tmp3(2*(sz-1));
-          std::vector<int>::iterator it=std::copy(nodalConnBg+1,nodalConnEnd,tmp3.begin());
+          std::vector<mcIdType> tmp3(2*(sz-1));
+          std::vector<mcIdType>::iterator it=std::copy(nodalConnBg+1,nodalConnEnd,tmp3.begin());
           std::copy(nodalConnBg+1,nodalConnEnd,it);
           if(std::search(tmp3.begin(),tmp3.end(),tmpOut.begin(),tmpOut.end())!=tmp3.end())
             {
@@ -7826,7 +7836,7 @@ bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, co
             }
           else
             {
-              nodalConnecOut->pushBackSilent((int)INTERP_KERNEL::NORM_POLYGON);
+              nodalConnecOut->pushBackSilent(ToIdType(INTERP_KERNEL::NORM_POLYGON));
               nodalConnecOut->insertAtTheEnd(tmpOut.begin(),tmpOut.end());
               return true;
             }
@@ -7841,7 +7851,7 @@ bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, co
 /*!
  * This method works on a pair input (\b arrIn, \b arrIndxIn) where \b arr indexes is in \b arrIndxIn.
  * This method expects that these two input arrays come from the output of MEDCouplingUMesh::computeNeighborsOfCells method.
- * This method start from id 0 that will be contained in output DataArrayInt. It searches then all neighbors of id0 looking at arrIn[arrIndxIn[0]:arrIndxIn[0+1]].
+ * This method start from id 0 that will be contained in output DataArrayIdType. It searches then all neighbors of id0 looking at arrIn[arrIndxIn[0]:arrIndxIn[0+1]].
  * Then it is repeated recursively until either all ids are fetched or no more ids are reachable step by step.
  * A negative value in \b arrIn means that it is ignored.
  * This method is useful to see if a mesh is contiguous regarding its connectivity. If it is not the case the size of returned array is different from arrIndxIn->getNumberOfTuples()-1.
@@ -7851,16 +7861,16 @@ bool MEDCouplingUMesh::BuildConvexEnvelopOf2DCellJarvis(const double *coords, co
  * \return a newly allocated DataArray that stores all ids fetched by the gradually spread process.
  * \sa MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed, MEDCouplingUMesh::partitionBySpreadZone
  */
-DataArrayInt *MEDCouplingUMesh::ComputeSpreadZoneGradually(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn)
+DataArrayIdType *MEDCouplingUMesh::ComputeSpreadZoneGradually(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn)
 {
-  int seed=0,nbOfDepthPeelingPerformed=0;
+  mcIdType seed=0,nbOfDepthPeelingPerformed=0;
   return ComputeSpreadZoneGraduallyFromSeed(&seed,&seed+1,arrIn,arrIndxIn,-1,nbOfDepthPeelingPerformed);
 }
 
 /*!
  * This method works on a pair input (\b arrIn, \b arrIndxIn) where \b arr indexes is in \b arrIndxIn.
  * This method expects that these two input arrays come from the output of MEDCouplingUMesh::computeNeighborsOfCells method.
- * This method start from id 0 that will be contained in output DataArrayInt. It searches then all neighbors of id0 regarding arrIn[arrIndxIn[0]:arrIndxIn[0+1]].
+ * This method start from id 0 that will be contained in output DataArrayIdType. It searches then all neighbors of id0 regarding arrIn[arrIndxIn[0]:arrIndxIn[0+1]].
  * Then it is repeated recursively until either all ids are fetched or no more ids are reachable step by step.
  * A negative value in \b arrIn means that it is ignored.
  * This method is useful to see if a mesh is contiguous regarding its connectivity. If it is not the case the size of returned array is different from arrIndxIn->getNumberOfTuples()-1.
@@ -7873,15 +7883,15 @@ DataArrayInt *MEDCouplingUMesh::ComputeSpreadZoneGradually(const DataArrayInt *a
  * \return a newly allocated DataArray that stores all ids fetched by the gradually spread process.
  * \sa MEDCouplingUMesh::partitionBySpreadZone
  */
-DataArrayInt *MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(const int *seedBg, const int *seedEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn, int nbOfDepthPeeling, int& nbOfDepthPeelingPerformed)
+DataArrayIdType *MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(const mcIdType *seedBg, const mcIdType *seedEnd, const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn, mcIdType nbOfDepthPeeling, mcIdType& nbOfDepthPeelingPerformed)
 {
   nbOfDepthPeelingPerformed=0;
   if(!arrIndxIn)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed : arrIndxIn input pointer is NULL !");
-  int nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
+  mcIdType nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
   if(nbOfTuples<=0)
     {
-      DataArrayInt *ret=DataArrayInt::New(); ret->alloc(0,1);
+      DataArrayIdType *ret=DataArrayIdType::New(); ret->alloc(0,1);
       return ret;
     }
   //
@@ -7907,17 +7917,17 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildSpreadZonesWithPoly() const
   int spaceDim=getSpaceDimension();
   if(mdim!=spaceDim)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSpreadZonesWithPoly : meshdimension and spacedimension do not match !");
-  std::vector<DataArrayInt *> partition=partitionBySpreadZone();
-  std::vector< MCAuto<DataArrayInt> > partitionAuto; partitionAuto.reserve(partition.size());
-  std::copy(partition.begin(),partition.end(),std::back_insert_iterator<std::vector< MCAuto<DataArrayInt> > >(partitionAuto));
+  std::vector<DataArrayIdType *> partition=partitionBySpreadZone();
+  std::vector< MCAuto<DataArrayIdType> > partitionAuto; partitionAuto.reserve(partition.size());
+  std::copy(partition.begin(),partition.end(),std::back_insert_iterator<std::vector< MCAuto<DataArrayIdType> > >(partitionAuto));
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),mdim);
   ret->setCoords(getCoords());
-  ret->allocateCells((int)partition.size());
+  ret->allocateCells(ToIdType(partition.size()));
   //
-  for(std::vector<DataArrayInt *>::const_iterator it=partition.begin();it!=partition.end();it++)
+  for(std::vector<DataArrayIdType *>::const_iterator it=partition.begin();it!=partition.end();it++)
     {
       MCAuto<MEDCouplingUMesh> tmp=static_cast<MEDCouplingUMesh *>(buildPartOfMySelf((*it)->begin(),(*it)->end(),true));
-      MCAuto<DataArrayInt> cell;
+      MCAuto<DataArrayIdType> cell;
       switch(mdim)
       {
         case 2:
@@ -7942,56 +7952,56 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildSpreadZonesWithPoly() const
  * This method only needs a well defined connectivity. Coordinates are not considered here.
  * This method returns a vector of \b newly allocated arrays that the caller has to deal with.
  */
-std::vector<DataArrayInt *> MEDCouplingUMesh::partitionBySpreadZone() const
+std::vector<DataArrayIdType *> MEDCouplingUMesh::partitionBySpreadZone() const
 {
-  DataArrayInt *neigh=0,*neighI=0;
+  DataArrayIdType *neigh=0,*neighI=0;
   computeNeighborsOfCells(neigh,neighI);
-  MCAuto<DataArrayInt> neighAuto(neigh),neighIAuto(neighI);
+  MCAuto<DataArrayIdType> neighAuto(neigh),neighIAuto(neighI);
   return PartitionBySpreadZone(neighAuto,neighIAuto);
 }
 
-std::vector<DataArrayInt *> MEDCouplingUMesh::PartitionBySpreadZone(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn)
+std::vector<DataArrayIdType *> MEDCouplingUMesh::PartitionBySpreadZone(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn)
 {
   if(!arrIn || !arrIndxIn)
     throw INTERP_KERNEL::Exception("PartitionBySpreadZone : null input pointers !");
   arrIn->checkAllocated(); arrIndxIn->checkAllocated();
-  int nbOfTuples(arrIndxIn->getNumberOfTuples());
+  mcIdType nbOfTuples(arrIndxIn->getNumberOfTuples());
   if(arrIn->getNumberOfComponents()!=1 || arrIndxIn->getNumberOfComponents()!=1 || nbOfTuples<1)
     throw INTERP_KERNEL::Exception("PartitionBySpreadZone : invalid arrays in input !");
-  int nbOfCellsCur(nbOfTuples-1);
-  std::vector<DataArrayInt *> ret;
+  mcIdType nbOfCellsCur(nbOfTuples-1);
+  std::vector<DataArrayIdType *> ret;
   if(nbOfCellsCur<=0)
     return ret;
   std::vector<bool> fetchedCells(nbOfCellsCur,false);
-  std::vector< MCAuto<DataArrayInt> > ret2;
-  int seed=0;
+  std::vector< MCAuto<DataArrayIdType> > ret2;
+  mcIdType seed=0;
   while(seed<nbOfCellsCur)
     {
-      int nbOfPeelPerformed=0;
+      mcIdType nbOfPeelPerformed=0;
       ret2.push_back(ComputeSpreadZoneGraduallyFromSeedAlg(fetchedCells,&seed,&seed+1,arrIn,arrIndxIn,-1,nbOfPeelPerformed));
-      seed=(int)std::distance(fetchedCells.begin(),std::find(fetchedCells.begin()+seed,fetchedCells.end(),false));
+      seed=ToIdType(std::distance(fetchedCells.begin(),std::find(fetchedCells.begin()+seed,fetchedCells.end(),false)));
     }
-  for(std::vector< MCAuto<DataArrayInt> >::iterator it=ret2.begin();it!=ret2.end();it++)
+  for(std::vector< MCAuto<DataArrayIdType> >::iterator it=ret2.begin();it!=ret2.end();it++)
     ret.push_back((*it).retn());
   return ret;
 }
 
 /*!
  * This method returns given a distribution of cell type (returned for example by MEDCouplingUMesh::getDistributionOfTypes method and customized after) a
- * newly allocated DataArrayInt instance with 2 components ready to be interpreted as input of DataArrayInt::findRangeIdForEachTuple method.
+ * newly allocated DataArrayIdType instance with 2 components ready to be interpreted as input of DataArrayIdType::findRangeIdForEachTuple method.
  *
  * \param [in] code a code with the same format than those returned by MEDCouplingUMesh::getDistributionOfTypes except for the code[3*k+2] that should contain start id of chunck.
- * \return a newly allocated DataArrayInt to be managed by the caller.
+ * \return a newly allocated DataArrayIdType to be managed by the caller.
  * \throw In case of \a code has not the right format (typically of size 3*n)
  */
-DataArrayInt *MEDCouplingUMesh::ComputeRangesFromTypeDistribution(const std::vector<int>& code)
+DataArrayIdType *MEDCouplingUMesh::ComputeRangesFromTypeDistribution(const std::vector<mcIdType>& code)
 {
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
   std::size_t nb=code.size()/3;
   if(code.size()%3!=0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ComputeRangesFromTypeDistribution : invalid input code !");
-  ret->alloc((int)nb,2);
-  int *retPtr=ret->getPointer();
+  ret->alloc(nb,2);
+  mcIdType *retPtr=ret->getPointer();
   for(std::size_t i=0;i<nb;i++,retPtr+=2)
     {
       retPtr[0]=code[3*i+2];
@@ -8012,7 +8022,7 @@ DataArrayInt *MEDCouplingUMesh::ComputeRangesFromTypeDistribution(const std::vec
  * \param [in] policy - the policy of splitting that must be in (PLANAR_FACE_5, PLANAR_FACE_6, GENERAL_24, GENERAL_48). The policy will be used only for INTERP_KERNEL::NORM_HEXA8 cells.
  *                      For all other cells, the splitting policy will be ignored. See INTERP_KERNEL::SplittingPolicy for the images.
  * \param [out] nbOfAdditionalPoints - number of nodes added to \c this->_coords. If > 0 a new coordinates object will be constructed result of the aggregation of the old one and the new points added.
- * \param [out] n2oCells - A new instance of DataArrayInt holding, for each new cell,
+ * \param [out] n2oCells - A new instance of DataArrayIdType holding, for each new cell,
  *          an id of old cell producing it. The caller is to delete this array using
  *         decrRef() as it is no more needed.
  * \return MEDCoupling1SGTUMesh * - the mesh containing only INTERP_KERNEL::NORM_TETRA4 cells.
@@ -8024,34 +8034,35 @@ DataArrayInt *MEDCouplingUMesh::ComputeRangesFromTypeDistribution(const std::vec
  * \throw If \a this is not fully constituted with linear 3D cells.
  * \sa MEDCouplingUMesh::simplexize, MEDCoupling1SGTUMesh::sortHexa8EachOther
  */
-MEDCoupling1SGTUMesh *MEDCouplingUMesh::tetrahedrize(int policy, DataArrayInt *& n2oCells, int& nbOfAdditionalPoints) const
+MEDCoupling1SGTUMesh *MEDCouplingUMesh::tetrahedrize(int policy, DataArrayIdType *& n2oCells, mcIdType& nbOfAdditionalPoints) const
 {
   INTERP_KERNEL::SplittingPolicy pol((INTERP_KERNEL::SplittingPolicy)policy);
   checkConnectivityFullyDefined();
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::tetrahedrize : only available for mesh with meshdim == 3 and spacedim == 3 !");
-  int nbOfCells(getNumberOfCells()),nbNodes(getNumberOfNodes());
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType nbNodes(getNumberOfNodes());
   MCAuto<MEDCoupling1SGTUMesh> ret0(MEDCoupling1SGTUMesh::New(getName(),INTERP_KERNEL::NORM_TETRA4));
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(nbOfCells,1);
-  int *retPt(ret->getPointer());
-  MCAuto<DataArrayInt> newConn(DataArrayInt::New()); newConn->alloc(0,1);
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(nbOfCells,1);
+  mcIdType *retPt(ret->getPointer());
+  MCAuto<DataArrayIdType> newConn(DataArrayIdType::New()); newConn->alloc(0,1);
   MCAuto<DataArrayDouble> addPts(DataArrayDouble::New()); addPts->alloc(0,1);
-  const int *oldc(_nodal_connec->begin());
-  const int *oldci(_nodal_connec_index->begin());
+  const mcIdType *oldc(_nodal_connec->begin());
+  const mcIdType *oldci(_nodal_connec_index->begin());
   const double *coords(_coords->begin());
-  for(int i=0;i<nbOfCells;i++,oldci++,retPt++)
+  for(mcIdType i=0;i<nbOfCells;i++,oldci++,retPt++)
     {
-      std::vector<int> a; std::vector<double> b;
+      std::vector<mcIdType> a; std::vector<double> b;
       INTERP_KERNEL::SplitIntoTetras(pol,(INTERP_KERNEL::NormalizedCellType)oldc[oldci[0]],oldc+oldci[0]+1,oldc+oldci[1],coords,a,b);
-      std::size_t nbOfTet(a.size()/4); *retPt=(int)nbOfTet;
-      const int *aa(&a[0]);
+      std::size_t nbOfTet(a.size()/4); *retPt=ToIdType(nbOfTet);
+      const mcIdType *aa(&a[0]);
       if(!b.empty())
         {
-          for(std::vector<int>::iterator it=a.begin();it!=a.end();it++)
+          for(std::vector<mcIdType>::iterator it=a.begin();it!=a.end();it++)
             if(*it<0)
               *it=(-(*(it))-1+nbNodes);
           addPts->insertAtTheEnd(b.begin(),b.end());
-          nbNodes+=(int)b.size()/3;
+          nbNodes+=ToIdType(b.size()/3);
         }
       for(std::size_t j=0;j<nbOfTet;j++,aa+=4)
         newConn->insertAtTheEnd(aa,aa+4);
@@ -8093,7 +8104,7 @@ MEDCouplingUMeshCellIterator::~MEDCouplingUMeshCellIterator()
     delete _cell;
 }
 
-MEDCouplingUMeshCellIterator::MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh, MEDCouplingUMeshCell *itc, int bg, int end):_mesh(mesh),_cell(itc),
+MEDCouplingUMeshCellIterator::MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end):_mesh(mesh),_cell(itc),
     _own_cell(false),_cell_id(bg-1),
     _nb_cell(end)
 {
@@ -8130,7 +8141,7 @@ MEDCouplingUMeshCellByTypeEntry::~MEDCouplingUMeshCellByTypeEntry()
     _mesh->decrRef();
 }
 
-MEDCouplingUMeshCellEntry::MEDCouplingUMeshCellEntry(MEDCouplingUMesh *mesh,  INTERP_KERNEL::NormalizedCellType type, MEDCouplingUMeshCell *itc, int bg, int end):_mesh(mesh),_type(type),
+MEDCouplingUMeshCellEntry::MEDCouplingUMeshCellEntry(MEDCouplingUMesh *mesh,  INTERP_KERNEL::NormalizedCellType type, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end):_mesh(mesh),_type(type),
     _itc(itc),
     _bg(bg),_end(end)
 {
@@ -8149,7 +8160,7 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingUMeshCellEntry::getType() const
   return _type;
 }
 
-int MEDCouplingUMeshCellEntry::getNumberOfElems() const
+mcIdType MEDCouplingUMeshCellEntry::getNumberOfElems() const
 {
   return _end-_bg;
 }
@@ -8177,13 +8188,13 @@ MEDCouplingUMeshCellByTypeIterator::~MEDCouplingUMeshCellByTypeIterator()
 
 MEDCouplingUMeshCellEntry *MEDCouplingUMeshCellByTypeIterator::nextt()
 {
-  const int *c=_mesh->getNodalConnectivity()->begin();
-  const int *ci=_mesh->getNodalConnectivityIndex()->begin();
+  const mcIdType *c=_mesh->getNodalConnectivity()->begin();
+  const mcIdType *ci=_mesh->getNodalConnectivityIndex()->begin();
   if(_cell_id<_nb_cell)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)c[ci[_cell_id]];
-      int nbOfElems=(int)std::distance(ci+_cell_id,std::find_if(ci+_cell_id,ci+_nb_cell,MEDCouplingImpl::ConnReader(c,type)));
-      int startId=_cell_id;
+      mcIdType nbOfElems=ToIdType(std::distance(ci+_cell_id,std::find_if(ci+_cell_id,ci+_nb_cell,MEDCouplingImpl::ConnReader(c,type))));
+      mcIdType startId=_cell_id;
       _cell_id+=nbOfElems;
       return new MEDCouplingUMeshCellEntry(_mesh,type,_cell,startId,_cell_id);
     }
@@ -8216,7 +8227,7 @@ std::string MEDCouplingUMeshCell::repr() const
     {
       std::ostringstream oss; oss << "Cell Type " << INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)_conn[0]).getRepr();
       oss << " : ";
-      std::copy(_conn+1,_conn+_conn_lgth,std::ostream_iterator<int>(oss," "));
+      std::copy(_conn+1,_conn+_conn_lgth,std::ostream_iterator<mcIdType>(oss," "));
       return oss.str();
     }
   else
@@ -8231,7 +8242,7 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingUMeshCell::getType() const
     return INTERP_KERNEL::NORM_ERROR;
 }
 
-const int *MEDCouplingUMeshCell::getAllConn(int& lgth) const
+const mcIdType *MEDCouplingUMeshCell::getAllConn(mcIdType& lgth) const
 {
   lgth=_conn_lgth;
   if(_conn_lgth!=NOTICABLE_FIRST_VAL)
index 25fb72c8d6eb2939a8062e1bf70b06cfc8f3023d..87a1c9a7d8a2c9d08013e9119fe22ff39805a2ed 100644 (file)
@@ -58,125 +58,125 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void checkConsistencyLight() const;
     MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
     MEDCOUPLING_EXPORT void setMeshDimension(int meshDim);
-    MEDCOUPLING_EXPORT void allocateCells(int nbOfCells=0);
-    MEDCOUPLING_EXPORT void insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, const int *nodalConnOfCell);
+    MEDCOUPLING_EXPORT void allocateCells(mcIdType nbOfCells=0);
+    MEDCOUPLING_EXPORT void insertNextCell(INTERP_KERNEL::NormalizedCellType type, mcIdType size, const mcIdType *nodalConnOfCell);
     MEDCOUPLING_EXPORT void finishInsertingCells();
     MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator *cellIterator();
     MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeEntry *cellsByType();
     MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
     MEDCOUPLING_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypesSorted() const;
-    MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getTypesOfPart(const int *begin, const int *end) const;
-    MEDCOUPLING_EXPORT void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true);
-    MEDCOUPLING_EXPORT const DataArrayInt *getNodalConnectivity() const { return _nodal_connec; }
-    MEDCOUPLING_EXPORT const DataArrayInt *getNodalConnectivityIndex() const { return _nodal_connec_index; }
-    MEDCOUPLING_EXPORT DataArrayInt *getNodalConnectivity() { return _nodal_connec; }
-    MEDCOUPLING_EXPORT DataArrayInt *getNodalConnectivityIndex() { return _nodal_connec_index; }
-    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(std::size_t cellId) const;
-    MEDCOUPLING_EXPORT DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    MEDCOUPLING_EXPORT void getNodeIdsOfCell(std::size_t cellId, std::vector<int>& conn) const;
+    MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getTypesOfPart(const mcIdType *begin, const mcIdType *end) const;
+    MEDCOUPLING_EXPORT void setConnectivity(DataArrayIdType *conn, DataArrayIdType *connIndex, bool isComputingTypes=true);
+    MEDCOUPLING_EXPORT const DataArrayIdType *getNodalConnectivity() const { return _nodal_connec; }
+    MEDCOUPLING_EXPORT const DataArrayIdType *getNodalConnectivityIndex() const { return _nodal_connec_index; }
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivity() { return _nodal_connec; }
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivityIndex() { return _nodal_connec_index; }
+    MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
     MEDCOUPLING_EXPORT std::string simpleRepr() const;
     MEDCOUPLING_EXPORT std::string advancedRepr() const;
     MEDCOUPLING_EXPORT std::string cppRepr() const;
     MEDCOUPLING_EXPORT std::string reprConnectivityOfThis() const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSetInstanceFromThis(int spaceDim) const;
-    MEDCOUPLING_EXPORT int getNumberOfNodesInCell(int cellId) const;
-    MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
     MEDCOUPLING_EXPORT int getMeshDimension() const;
-    MEDCOUPLING_EXPORT int getNodalConnectivityArrayLen() const;
+    MEDCOUPLING_EXPORT mcIdType getNodalConnectivityArrayLen() const;
     MEDCOUPLING_EXPORT void computeTypes();
     //! size of returned tinyInfo must be always the same.
-    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<int>& tinyInfo) const;
-    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
-    MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const;
-    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
+    MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
+    MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+    MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+    MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
     MEDCOUPLING_EXPORT std::string getVTKDataSetType() const;
     MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
     MEDCOUPLING_EXPORT void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
     MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
     //tools
-    MEDCOUPLING_EXPORT static int AreCellsEqual(const int *conn, const int *connI, int cell1, int cell2, int compType);
-    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy0(const int *conn, const int *connI, int cell1, int cell2);
-    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy1(const int *conn, const int *connI, int cell1, int cell2);
-    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy2(const int *conn, const int *connI, int cell1, int cell2);
-    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy2NoType(const int *conn, const int *connI, int cell1, int cell2);
-    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy7(const int *conn, const int *connI, int cell1, int cell2);
-    MEDCOUPLING_EXPORT void convertToPolyTypes(const int *cellIdsToConvertBg, const int *cellIdsToConvertEnd);
+    MEDCOUPLING_EXPORT static int AreCellsEqual(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2, int compType);
+    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy0(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy1(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy2(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy2NoType(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+    MEDCOUPLING_EXPORT static int AreCellsEqualPolicy7(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+    MEDCOUPLING_EXPORT void convertToPolyTypes(const mcIdType *cellIdsToConvertBg, const mcIdType *cellIdsToConvertEnd);
     MEDCOUPLING_EXPORT void convertAllToPoly();
     MEDCOUPLING_EXPORT void convertExtrudedPolyhedra();
     MEDCOUPLING_EXPORT bool unPolyze();
     MEDCOUPLING_EXPORT void simplifyPolyhedra(double eps);
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSpreadZonesWithPoly() const;
-    MEDCOUPLING_EXPORT std::vector<DataArrayInt *> partitionBySpreadZone() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeFetchedNodeIds() const;
-    MEDCOUPLING_EXPORT DataArrayInt *getNodeIdsInUse(int& nbrOfNodesInUse) const;
+    MEDCOUPLING_EXPORT std::vector<DataArrayIdType *> partitionBySpreadZone() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeFetchedNodeIds() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
     MEDCOUPLING_EXPORT void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayInt *zipCoordsTraducer();
-    MEDCOUPLING_EXPORT void findCommonCells(int compType, int startCellId, DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr) const;
-    MEDCOUPLING_EXPORT bool areCellsIncludedIn(const MEDCouplingUMesh *other, int compType, DataArrayInt *& arr) const;
-    MEDCOUPLING_EXPORT bool areCellsIncludedInPolicy7(const MEDCouplingUMesh *other, DataArrayInt *& arr) const;
-    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const;
-    MEDCOUPLING_EXPORT MCAuto<MEDCouplingUMesh> explodeIntoEdges(MCAuto<DataArrayInt>& desc, MCAuto<DataArrayInt>& descIndex, MCAuto<DataArrayInt>& revDesc, MCAuto<DataArrayInt>& revDescIndx) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *explode3DMeshTo1D(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
-    MEDCOUPLING_EXPORT void computeNeighborsOfCells(DataArrayInt *&neighbors, DataArrayInt *&neighborsIdx) const;
-    MEDCOUPLING_EXPORT void computeCellNeighborhoodFromNodesOne(const DataArrayInt *nodeNeigh, const DataArrayInt *nodeNeighI, MCAuto<DataArrayInt>& cellNeigh, MCAuto<DataArrayInt>& cellNeighIndex) const;
-    MEDCOUPLING_EXPORT static void ComputeNeighborsOfCellsAdv(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *revDesc, const DataArrayInt *revDescI,
-                                                              DataArrayInt *&neighbors, DataArrayInt *&neighborsIdx);
-    MEDCOUPLING_EXPORT void computeNeighborsOfNodes(DataArrayInt *&neighbors, DataArrayInt *&neighborsIdx) const;
-    MEDCOUPLING_EXPORT void computeEnlargedNeighborsOfNodes(MCAuto<DataArrayInt> &neighbors, MCAuto<DataArrayInt>& neighborsIdx) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *zipCoordsTraducer();
+    MEDCOUPLING_EXPORT void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const;
+    MEDCOUPLING_EXPORT bool areCellsIncludedIn(const MEDCouplingUMesh *other, int compType, DataArrayIdType *& arr) const;
+    MEDCOUPLING_EXPORT bool areCellsIncludedInPolicy7(const MEDCouplingUMesh *other, DataArrayIdType *& arr) const;
+    MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
+    MEDCOUPLING_EXPORT MCAuto<MEDCouplingUMesh> explodeIntoEdges(MCAuto<DataArrayIdType>& desc, MCAuto<DataArrayIdType>& descIndex, MCAuto<DataArrayIdType>& revDesc, MCAuto<DataArrayIdType>& revDescIndx) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *explode3DMeshTo1D(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildDescendingConnectivity(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+    MEDCOUPLING_EXPORT void computeNeighborsOfCells(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx) const;
+    MEDCOUPLING_EXPORT void computeCellNeighborhoodFromNodesOne(const DataArrayIdType *nodeNeigh, const DataArrayIdType *nodeNeighI, MCAuto<DataArrayIdType>& cellNeigh, MCAuto<DataArrayIdType>& cellNeighIndex) const;
+    MEDCOUPLING_EXPORT static void ComputeNeighborsOfCellsAdv(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *revDesc, const DataArrayIdType *revDescI,
+                                                              DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx);
+    MEDCOUPLING_EXPORT void computeNeighborsOfNodes(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx) const;
+    MEDCOUPLING_EXPORT void computeEnlargedNeighborsOfNodes(MCAuto<DataArrayIdType> &neighbors, MCAuto<DataArrayIdType>& neighborsIdx) const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildPartOfMySelf(const int *begin, const int *end, bool keepCoords=true) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildPartOfMySelfSlice(int start, int end, int step, bool keepCoords=true) const;
-    MEDCOUPLING_EXPORT void setPartOfMySelf(const int *cellIdsBg, const int *cellIdsEnd, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
-    MEDCOUPLING_EXPORT void setPartOfMySelfSlice(int start, int end, int step, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildFacePartOfMySelfNode(const int *begin, const int *end, bool fullyIn) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildPartOfMySelf(const mcIdType *begin, const mcIdType *end, bool keepCoords=true) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords=true) const;
+    MEDCOUPLING_EXPORT void setPartOfMySelf(const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
+    MEDCOUPLING_EXPORT void setPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildFacePartOfMySelfNode(const mcIdType *begin, const mcIdType *end, bool fullyIn) const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
-    MEDCOUPLING_EXPORT DataArrayInt *findBoundaryNodes() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findBoundaryNodes() const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *buildBoundaryMesh(bool keepCoords) const;
-    MEDCOUPLING_EXPORT DataArrayInt *findCellIdsOnBoundary() const;
-    MEDCOUPLING_EXPORT void findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayInt *&cellIdsRk0, DataArrayInt *&cellIdsRk1) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *findCellIdsOnBoundary() const;
+    MEDCOUPLING_EXPORT void findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *&cellIdsRk0, DataArrayIdType *&cellIdsRk1) const;
     MEDCOUPLING_EXPORT MEDCouplingUMesh *computeSkin() const;
-    MEDCOUPLING_EXPORT void findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayInt *& nodeIdsToDuplicate,
-                                                 DataArrayInt *& cellIdsNeededToBeRenum, DataArrayInt *& cellIdsNotModified) const;
-    MEDCOUPLING_EXPORT void duplicateNodes(const int *nodeIdsToDuplicateBg, const int *nodeIdsToDuplicateEnd);
-    MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(int offset);
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<int,int>& newNodeNumbersO2N);
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const int *newNodeNumbersO2N);
-    MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<int,int>& newNodeNumbersO2N) override;
-    MEDCOUPLING_EXPORT void shiftNodeNumbersInConn(int delta);
-    MEDCOUPLING_EXPORT void duplicateNodesInConn(const int *nodeIdsToDuplicateBg, const int *nodeIdsToDuplicateEnd, int offset);
-    MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
-    MEDCOUPLING_EXPORT DataArrayInt *getCellsInBoundingBox(const double *bbox, double eps) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
+    MEDCOUPLING_EXPORT void findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *& nodeIdsToDuplicate,
+                                                 DataArrayIdType *& cellIdsNeededToBeRenum, DataArrayIdType *& cellIdsNotModified) const;
+    MEDCOUPLING_EXPORT void duplicateNodes(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd);
+    MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(mcIdType offset);
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
+    MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
+    MEDCOUPLING_EXPORT void shiftNodeNumbersInConn(mcIdType delta);
+    MEDCOUPLING_EXPORT void duplicateNodesInConn(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd, mcIdType offset);
+    MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
+    MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getPartMeasureField(bool isAbs, const int *begin, const int *end) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getPartMeasureField(bool isAbs, const mcIdType *begin, const mcIdType *end) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
-    MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildPartOrthogonalField(const int *begin, const int *end) const;
+    MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildPartOrthogonalField(const mcIdType *begin, const mcIdType *end) const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildDirectionVectorField() const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSlice3D(const double *origin, const double *vec, double eps, DataArrayInt *&cellIds) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSlice3DSurf(const double *origin, const double *vec, double eps, DataArrayInt *&cellIds) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSlice3D(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSlice3DSurf(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const;
     MEDCOUPLING_EXPORT MCAuto<MEDCouplingUMesh> clipSingle3DCellByPlane(const double origin[3], const double vec[3], double eps) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getCellIdsCrossingPlane(const double *origin, const double *vec, double eps) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getCellIdsCrossingPlane(const double *origin, const double *vec, double eps) const;
     MEDCOUPLING_EXPORT bool isContiguous1D() const;
     MEDCOUPLING_EXPORT void project1D(const double *pt, const double *v, double eps, double *res) const;
-    MEDCOUPLING_EXPORT double distanceToPoint(const double *ptBg, const double *ptEnd, int& cellId) const;
-    MEDCOUPLING_EXPORT DataArrayDouble *distanceToPoints(const DataArrayDouble *pts, DataArrayInt *& cellIds) const;
-    MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const;
-    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const;
-    MEDCOUPLING_EXPORT void getCellsContainingPoints(const double *pos, int nbOfPoints, double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const override;
-    MEDCOUPLING_EXPORT void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, int nbOfPoints, double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex) const override;
-    MEDCOUPLING_EXPORT void checkButterflyCells(std::vector<int>& cells, double eps=1e-12) const;
-    MEDCOUPLING_EXPORT DataArrayInt *convexEnvelop2D();
-    MEDCOUPLING_EXPORT DataArrayInt *findAndCorrectBadOriented3DExtrudedCells();
-    MEDCOUPLING_EXPORT DataArrayInt *findAndCorrectBadOriented3DCells();
+    MEDCOUPLING_EXPORT double distanceToPoint(const double *ptBg, const double *ptEnd, mcIdType& cellId) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *distanceToPoints(const DataArrayDouble *pts, DataArrayIdType *& cellIds) const;
+    MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
+    MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+    MEDCOUPLING_EXPORT void getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const override;
+    MEDCOUPLING_EXPORT void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const override;
+    MEDCOUPLING_EXPORT void checkButterflyCells(std::vector<mcIdType>& cells, double eps=1e-12) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *convexEnvelop2D();
+    MEDCOUPLING_EXPORT DataArrayIdType *findAndCorrectBadOriented3DExtrudedCells();
+    MEDCOUPLING_EXPORT DataArrayIdType *findAndCorrectBadOriented3DCells();
     MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
     MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTreeFast() const;
     MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const;
@@ -185,22 +185,22 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT bool isFullyQuadratic() const;
     MEDCOUPLING_EXPORT bool isPresenceOfQuadratic() const;
     MEDCOUPLING_EXPORT void convertQuadraticCellsToLinear();
-    MEDCOUPLING_EXPORT DataArrayInt *convertLinearCellsToQuadratic(int conversionType=0);
+    MEDCOUPLING_EXPORT DataArrayIdType *convertLinearCellsToQuadratic(int conversionType=0);
     MEDCOUPLING_EXPORT void tessellate2D(double eps);
-    MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *tetrahedrize(int policy, DataArrayInt *& n2oCells, int& nbOfAdditionalPoints) const;
-    MEDCOUPLING_EXPORT DataArrayInt *simplexize(int policy);
+    MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *tetrahedrize(int policy, DataArrayIdType *& n2oCells, mcIdType& nbOfAdditionalPoints) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
     MEDCOUPLING_EXPORT bool areOnlySimplexCells() const;
     MEDCOUPLING_EXPORT void convertDegeneratedCells();
-    MEDCOUPLING_EXPORT DataArrayInt *convertDegeneratedCellsAndRemoveFlatOnes();
+    MEDCOUPLING_EXPORT DataArrayIdType *convertDegeneratedCellsAndRemoveFlatOnes();
     MEDCOUPLING_EXPORT bool removeDegenerated1DCells();
-    MEDCOUPLING_EXPORT void are2DCellsNotCorrectlyOriented(const double *vec, bool polyOnly, std::vector<int>& cells) const;
+    MEDCOUPLING_EXPORT void are2DCellsNotCorrectlyOriented(const double *vec, bool polyOnly, std::vector<mcIdType>& cells) const;
     MEDCOUPLING_EXPORT void orientCorrectly2DCells(const double *vec, bool polyOnly);
     MEDCOUPLING_EXPORT void changeOrientationOfCells();
-    MEDCOUPLING_EXPORT void arePolyhedronsNotCorrectlyOriented(std::vector<int>& cells) const;
+    MEDCOUPLING_EXPORT void arePolyhedronsNotCorrectlyOriented(std::vector<mcIdType>& cells) const;
     MEDCOUPLING_EXPORT void orientCorrectlyPolyhedrons();
     MEDCOUPLING_EXPORT void invertOrientationOfAllCells();
     MEDCOUPLING_EXPORT void getFastAveragePlaneOfThis(double *vec, double *pos) const;
-    MEDCOUPLING_EXPORT void attractSeg3MidPtsAroundNodes(double ratio, const int *nodeIdsBg, const int *nodeIdsEnd);
+    MEDCOUPLING_EXPORT void attractSeg3MidPtsAroundNodes(double ratio, const mcIdType *nodeIdsBg, const mcIdType *nodeIdsEnd);
     //Mesh quality
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getEdgeRatioField() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getAspectRatioField() const;
@@ -208,72 +208,72 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getSkewField() const;
     MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeDiameterField() const;
     //utilities for MED File RW
-    MEDCOUPLING_EXPORT std::vector<int> getDistributionOfTypes() const;
-    MEDCOUPLING_EXPORT DataArrayInt *checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
-    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType, bool smartPflKiller=true) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh, DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *&revDesc, DataArrayInt *&revDescIndx, DataArrayInt *& nM1LevMeshIds, DataArrayInt *&meshnM1Old2New) const;
-    MEDCOUPLING_EXPORT DataArrayInt *sortCellsInMEDFileFrmt();
+    MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+    MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh, DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *&revDesc, DataArrayIdType *&revDescIndx, DataArrayIdType *& nM1LevMeshIds, DataArrayIdType *&meshnM1Old2New) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *sortCellsInMEDFileFrmt();
     MEDCOUPLING_EXPORT bool checkConsecutiveCellTypes() const;
     MEDCOUPLING_EXPORT bool checkConsecutiveCellTypesForMEDFileFrmt() const;
     MEDCOUPLING_EXPORT bool checkConsecutiveCellTypesAndOrder(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getLevArrPerCellTypes(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayInt *&nbPerType) const;
-    MEDCOUPLING_EXPORT DataArrayInt *getRenumArrForMEDFileFrmt() const;
-    MEDCOUPLING_EXPORT DataArrayInt *getRenumArrForConsecutiveCellTypesSpec(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const;
-    MEDCOUPLING_EXPORT DataArrayInt *rearrange2ConsecutiveCellTypes();
+    MEDCOUPLING_EXPORT DataArrayIdType *getLevArrPerCellTypes(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayIdType *&nbPerType) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getRenumArrForMEDFileFrmt() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *getRenumArrForConsecutiveCellTypesSpec(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *rearrange2ConsecutiveCellTypes();
     MEDCOUPLING_EXPORT std::vector<MEDCouplingUMesh *> splitByType() const;
     MEDCOUPLING_EXPORT MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const;
-    MEDCOUPLING_EXPORT DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const;
-    MEDCOUPLING_EXPORT void convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayInt *&nodalConn, DataArrayInt *&nodalConnIndex) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *convertNodalConnectivityToStaticGeoTypeMesh() const;
+    MEDCOUPLING_EXPORT void convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndex) const;
     MEDCOUPLING_EXPORT static MEDCouplingUMesh *AggregateSortedByTypeMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& ms,
-                                                                                        DataArrayInt *&szOfCellGrpOfSameType,
-                                                                                        DataArrayInt *&idInMsOfCellGrpOfSameType);
-    MEDCOUPLING_EXPORT DataArrayInt *keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, const int *begin, const int *end) const;
-    MEDCOUPLING_EXPORT DataArrayInt *convertCellArrayPerGeoType(const DataArrayInt *da) const;
-    MEDCOUPLING_EXPORT MEDCouplingUMesh *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, const int *idsPerGeoTypeBg, const int *idsPerGeoTypeEnd) const;
+                                                                                        DataArrayIdType *&szOfCellGrpOfSameType,
+                                                                                        DataArrayIdType *&idInMsOfCellGrpOfSameType);
+    MEDCOUPLING_EXPORT DataArrayIdType *keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, const mcIdType *begin, const mcIdType *end) const;
+    MEDCOUPLING_EXPORT DataArrayIdType *convertCellArrayPerGeoType(const DataArrayIdType *da) const;
+    MEDCOUPLING_EXPORT MEDCouplingUMesh *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, const mcIdType *idsPerGeoTypeBg, const mcIdType *idsPerGeoTypeEnd) const;
     MEDCOUPLING_EXPORT std::vector<bool> getQuadraticStatus() const;
     //
     MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMassWithPrecision(double eps) const;
     MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    MEDCOUPLING_EXPORT DataArrayDouble *getPartBarycenterAndOwner(const int *begin, const int *end) const;
+    MEDCOUPLING_EXPORT DataArrayDouble *getPartBarycenterAndOwner(const mcIdType *begin, const mcIdType *end) const;
     MEDCOUPLING_EXPORT DataArrayDouble *computePlaneEquationOf3DFaces() const;
-    MEDCOUPLING_EXPORT DataArrayInt *conformize2D(double eps);
-    MEDCOUPLING_EXPORT DataArrayInt *colinearize2D(double eps);
-    MEDCOUPLING_EXPORT DataArrayInt *colinearizeKeepingConform2D(double eps);
-    MEDCOUPLING_EXPORT DataArrayInt *conformize3D(double eps);
-    MEDCOUPLING_EXPORT int split2DCells(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *midOpt=0, const DataArrayInt *midOptI=0);
+    MEDCOUPLING_EXPORT DataArrayIdType *conformize2D(double eps);
+    MEDCOUPLING_EXPORT DataArrayIdType *colinearize2D(double eps);
+    MEDCOUPLING_EXPORT DataArrayIdType *colinearizeKeepingConform2D(double eps);
+    MEDCOUPLING_EXPORT DataArrayIdType *conformize3D(double eps);
+    MEDCOUPLING_EXPORT mcIdType split2DCells(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI, const DataArrayIdType *midOpt=0, const DataArrayIdType *midOptI=0);
     MEDCOUPLING_EXPORT static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da);
     MEDCOUPLING_EXPORT static MCAuto<MEDCouplingUMesh> Build1DMeshFromCoords(DataArrayDouble *da);
     MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
     MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(const std::vector<const MEDCouplingUMesh *>& a);
     MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
     MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes);
-    MEDCOUPLING_EXPORT static MEDCouplingUMesh *FuseUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayInt *>& corr);
+    MEDCOUPLING_EXPORT static MEDCouplingUMesh *FuseUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayIdType *>& corr);
     MEDCOUPLING_EXPORT static void PutUMeshesOnSameAggregatedCoords(const std::vector<MEDCouplingUMesh *>& meshes);
     MEDCOUPLING_EXPORT static void MergeNodesOnUMeshesSharingSameCoords(const std::vector<MEDCouplingUMesh *>& meshes, double eps);
-    MEDCOUPLING_EXPORT static bool IsPolygonWellOriented(bool isQuadratic, const double *vec, const int *begin, const int *end, const double *coords);
-    MEDCOUPLING_EXPORT static bool IsPolyhedronWellOriented(const int *begin, const int *end, const double *coords);
-    MEDCOUPLING_EXPORT static bool Is3DExtrudedStaticCellWellOriented(const int *begin, const int *end, const double *coords);
-    MEDCOUPLING_EXPORT static void CorrectExtrudedStaticCell(int *begin, int *end);
-    MEDCOUPLING_EXPORT static bool IsTetra4WellOriented(const int *begin, const int *end, const double *coords);
-    MEDCOUPLING_EXPORT static bool IsPyra5WellOriented(const int *begin, const int *end, const double *coords);
-    MEDCOUPLING_EXPORT static void SimplifyPolyhedronCell(double eps, const DataArrayDouble *coords, int index, DataArrayInt *res, MEDCouplingUMesh *faces,
-                                                          DataArrayInt *E_Fi, DataArrayInt *E_F, DataArrayInt *F_Ei, DataArrayInt *F_E);
-    MEDCOUPLING_EXPORT static void ComputeVecAndPtOfFace(double eps, const double *coords, const int *begin, const int *end, double *v, double *p);
-    MEDCOUPLING_EXPORT static void TryToCorrectPolyhedronOrientation(int *begin, int *end, const double *coords);
-    MEDCOUPLING_EXPORT static MEDCouplingUMesh *Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, DataArrayInt *&cellNb1, DataArrayInt *&cellNb2);
+    MEDCOUPLING_EXPORT static bool IsPolygonWellOriented(bool isQuadratic, const double *vec, const mcIdType *begin, const mcIdType *end, const double *coords);
+    MEDCOUPLING_EXPORT static bool IsPolyhedronWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+    MEDCOUPLING_EXPORT static bool Is3DExtrudedStaticCellWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+    MEDCOUPLING_EXPORT static void CorrectExtrudedStaticCell(mcIdType *begin, mcIdType *end);
+    MEDCOUPLING_EXPORT static bool IsTetra4WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+    MEDCOUPLING_EXPORT static bool IsPyra5WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+    MEDCOUPLING_EXPORT static void SimplifyPolyhedronCell(double eps, const DataArrayDouble *coords, mcIdType index, DataArrayIdType *res, MEDCouplingUMesh *faces,
+                                                          DataArrayIdType *E_Fi, DataArrayIdType *E_F, DataArrayIdType *F_Ei, DataArrayIdType *F_E);
+    MEDCOUPLING_EXPORT static void ComputeVecAndPtOfFace(double eps, const double *coords, const mcIdType *begin, const mcIdType *end, double *v, double *p);
+    MEDCOUPLING_EXPORT static void TryToCorrectPolyhedronOrientation(mcIdType *begin, mcIdType *end, const double *coords);
+    MEDCOUPLING_EXPORT static MEDCouplingUMesh *Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, DataArrayIdType *&cellNb1, DataArrayIdType *&cellNb2);
     MEDCOUPLING_EXPORT static void Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D, const MEDCouplingUMesh *mesh1D,
-                                                             double eps, MEDCouplingUMesh *&splitMesh2D, MEDCouplingUMesh *&splitMesh1D, DataArrayInt *&cellIdInMesh2D, DataArrayInt *&cellIdInMesh1D);
-    MEDCOUPLING_EXPORT static bool BuildConvexEnvelopOf2DCellJarvis(const double *coords, const int *nodalConnBg, const int *nodalConnEnd, DataArrayInt *nodalConnecOut);
-    MEDCOUPLING_EXPORT static std::vector<DataArrayInt *> PartitionBySpreadZone(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn);
-    MEDCOUPLING_EXPORT static DataArrayInt *ComputeSpreadZoneGradually(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn);
-    MEDCOUPLING_EXPORT static DataArrayInt *ComputeSpreadZoneGraduallyFromSeed(const int *seedBg, const int *seedEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn, int nbOfDepthPeeling, int& nbOfDepthPeelingPerformed);
-    MEDCOUPLING_EXPORT static void FindCommonCellsAlg(int compType, int startCellId, const DataArrayInt *nodal, const DataArrayInt *nodalI, const DataArrayInt *revNodal, const DataArrayInt *revNodalI,
-                                                      DataArrayInt *& commonCellsArr, DataArrayInt *& commonCellsIArr);
-    MEDCOUPLING_EXPORT DataArrayInt *buildUnionOf2DMesh() const;
-    MEDCOUPLING_EXPORT DataArrayInt *buildUnionOf3DMesh() const;
-    MEDCOUPLING_EXPORT DataArrayInt *orderConsecutiveCells1D() const;
+                                                             double eps, MEDCouplingUMesh *&splitMesh2D, MEDCouplingUMesh *&splitMesh1D, DataArrayIdType *&cellIdInMesh2D, DataArrayIdType *&cellIdInMesh1D);
+    MEDCOUPLING_EXPORT static bool BuildConvexEnvelopOf2DCellJarvis(const double *coords, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, DataArrayIdType *nodalConnecOut);
+    MEDCOUPLING_EXPORT static std::vector<DataArrayIdType *> PartitionBySpreadZone(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn);
+    MEDCOUPLING_EXPORT static DataArrayIdType *ComputeSpreadZoneGradually(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn);
+    MEDCOUPLING_EXPORT static DataArrayIdType *ComputeSpreadZoneGraduallyFromSeed(const mcIdType *seedBg, const mcIdType *seedEnd, const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn, mcIdType nbOfDepthPeeling, mcIdType& nbOfDepthPeelingPerformed);
+    MEDCOUPLING_EXPORT static void FindCommonCellsAlg(int compType, mcIdType startCellId, const DataArrayIdType *nodal, const DataArrayIdType *nodalI, const DataArrayIdType *revNodal, const DataArrayIdType *revNodalI,
+                                                      DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr);
+    MEDCOUPLING_EXPORT DataArrayIdType *buildUnionOf2DMesh() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *buildUnionOf3DMesh() const;
+    MEDCOUPLING_EXPORT DataArrayIdType *orderConsecutiveCells1D() const;
     MEDCOUPLING_EXPORT MEDCouplingSkyLineArray* generateGraph() const;
   private: // all private methods are impl in MEDCouplingUMesh_internal.cxx
 
@@ -284,82 +284,82 @@ namespace MEDCoupling
     void checkConnectivityFullyDefined() const;
     void reprConnectivityOfThisLL(std::ostringstream& stream) const;
     //tools
-    DataArrayInt *simplexizePol0();
-    DataArrayInt *simplexizePol1();
-    DataArrayInt *simplexizePlanarFace5();
-    DataArrayInt *simplexizePlanarFace6();
+    DataArrayIdType *simplexizePol0();
+    DataArrayIdType *simplexizePol1();
+    DataArrayIdType *simplexizePlanarFace5();
+    DataArrayIdType *simplexizePlanarFace6();
     void tessellate2DInternal(double eps);
     void tessellate2DCurveInternal(double eps);
-    void subDivide2DMesh(const int *nodeSubdived, const int *nodeIndxSubdived, const int *desc, const int *descIndex);
-    void fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const;
-    void split3DCurveWithPlane(const double *origin, const double *vec, double eps, std::vector<int>& cut3DCurve);
-    MEDCouplingUMesh *buildExtrudedMeshFromThisLowLev(int nbOfNodesOf1Lev, bool isQuad) const;
+    void subDivide2DMesh(const mcIdType *nodeSubdived, const mcIdType *nodeIndxSubdived, const mcIdType *desc, const mcIdType *descIndex);
+    void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const;
+    void split3DCurveWithPlane(const double *origin, const double *vec, double eps, std::vector<mcIdType>& cut3DCurve);
+    MEDCouplingUMesh *buildExtrudedMeshFromThisLowLev(mcIdType nbOfNodesOf1Lev, bool isQuad) const;
     DataArrayDouble *fillExtCoordsUsingTranslation(const MEDCouplingUMesh *mesh1D, bool isQuad) const;
     DataArrayDouble *fillExtCoordsUsingTranslAndAutoRotation(const MEDCouplingUMesh *mesh1D, bool isQuad) const;
     DataArrayDouble *fillExtCoordsUsingTranslAndAutoRotation2D(const MEDCouplingUMesh *mesh1D, bool isQuad) const;
     DataArrayDouble *fillExtCoordsUsingTranslAndAutoRotation3D(const MEDCouplingUMesh *mesh1D, bool isQuad) const;
-    static bool AreCellsEqualInPool(const std::vector<int>& candidates, int compType, const int *conn, const int *connI, DataArrayInt *result) ;
-    MEDCouplingUMesh *buildPartOfMySelfKeepCoords(const int *begin, const int *end) const;
-    MEDCouplingUMesh *buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const;
-    DataArrayInt *convertLinearCellsToQuadratic1D0(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
-    DataArrayInt *convertLinearCellsToQuadratic2DAnd3D0(const MEDCouplingUMesh *m1D, const DataArrayInt *desc, const DataArrayInt *descI, DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
-    DataArrayInt *convertLinearCellsToQuadratic2D0(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
-    DataArrayInt *convertLinearCellsToQuadratic2D1(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
-    DataArrayInt *convertLinearCellsToQuadratic3D0(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
-    DataArrayInt *convertLinearCellsToQuadratic3D1(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
-    DataArrayInt *buildUnionOf2DMeshLinear(const MEDCouplingUMesh *skin, const DataArrayInt *n2o) const;
-    DataArrayInt *buildUnionOf2DMeshQuadratic(const MEDCouplingUMesh *skin, const DataArrayInt *n2o) const;
+    static bool AreCellsEqualInPool(const std::vector<mcIdType>& candidates, int compType, const mcIdType *conn, const mcIdType *connI, DataArrayIdType *result) ;
+    MEDCouplingUMesh *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const;
+    MEDCouplingUMesh *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const;
+    DataArrayIdType *convertLinearCellsToQuadratic1D0(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
+    DataArrayIdType *convertLinearCellsToQuadratic2DAnd3D0(const MEDCouplingUMesh *m1D, const DataArrayIdType *desc, const DataArrayIdType *descI, DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
+    DataArrayIdType *convertLinearCellsToQuadratic2D0(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
+    DataArrayIdType *convertLinearCellsToQuadratic2D1(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
+    DataArrayIdType *convertLinearCellsToQuadratic3D0(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
+    DataArrayIdType *convertLinearCellsToQuadratic3D1(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const;
+    DataArrayIdType *buildUnionOf2DMeshLinear(const MEDCouplingUMesh *skin, const DataArrayIdType *n2o) const;
+    DataArrayIdType *buildUnionOf2DMeshQuadratic(const MEDCouplingUMesh *skin, const DataArrayIdType *n2o) const;
     template<int SPACEDIM>
-    void getCellsContainingPointsAlg(const double *coords, const double *pos, int nbOfPoints,
-                                     double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex, std::function<bool(INTERP_KERNEL::NormalizedCellType,int)> sensibilityTo2DQuadraticLinearCellsFunc) const;
-    void getCellsContainingPointsZeAlg(const double *pos, int nbOfPoints, double eps,
-                                       MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex,
-                                       std::function<bool(INTERP_KERNEL::NormalizedCellType,int)> sensibilityTo2DQuadraticLinearCellsFunc) const;
+    void getCellsContainingPointsAlg(const double *coords, const double *pos, mcIdType nbOfPoints,
+                                     double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex, std::function<bool(INTERP_KERNEL::NormalizedCellType,int)> sensibilityTo2DQuadraticLinearCellsFunc) const;
+    void getCellsContainingPointsZeAlg(const double *pos, mcIdType nbOfPoints, double eps,
+                                       MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex,
+                                       std::function<bool(INTERP_KERNEL::NormalizedCellType,mcIdType)> sensibilityTo2DQuadraticLinearCellsFunc) const;
 /// @cond INTERNAL
     static MEDCouplingUMesh *MergeUMeshesLL(const std::vector<const MEDCouplingUMesh *>& a);
-    typedef int (*DimM1DescNbrer)(int id, unsigned nb, const INTERP_KERNEL::CellModel& cm, bool compute, const int *conn1, const int *conn2);
+    typedef mcIdType (*DimM1DescNbrer)(mcIdType id, mcIdType nb, const INTERP_KERNEL::CellModel& cm, bool compute, const mcIdType *conn1, const mcIdType *conn2);
     template<class SonsGenerator>
-    MEDCouplingUMesh *buildDescendingConnectivityGen(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx, DimM1DescNbrer nbrer) const;
-    static void DistanceToPoint3DSurfAlg(const double *pt, const int *cellIdsBg, const int *cellIdsEnd, const double *coords, const int *nc, const int *ncI, double& ret0, int& cellId);
-    static void DistanceToPoint2DCurveAlg(const double *pt, const int *cellIdsBg, const int *cellIdsEnd, const double *coords, const int *nc, const int *ncI, double& ret0, int& cellId);
-    static DataArrayInt *ComputeSpreadZoneGraduallyFromSeedAlg(std::vector<bool>& fetched, const int *seedBg, const int *seedEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn, int nbOfDepthPeeling, int& nbOfDepthPeelingPerformed);
-    static void FillInCompact3DMode(int spaceDim, int nbOfNodesInCell, const int *conn, const double *coo, double *zipFrmt);
-    static void AppendExtrudedCell(const int *connBg, const int *connEnd, int nbOfNodesPerLev, bool isQuad, std::vector<int>& ret);
-    static void Intersect1DMeshes(const MEDCouplingUMesh *m1Desc, const MEDCouplingUMesh *m2Desc, double eps, std::vector< std::vector<int> >& intersectEdge1, std::vector< std::vector<int> >& colinear2, std::vector< std::vector<int> >& subDiv2, std::vector<double>& addCoo, std::map<int,int>& mergedNodes);
+    MEDCouplingUMesh *buildDescendingConnectivityGen(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx, DimM1DescNbrer nbrer) const;
+    static void DistanceToPoint3DSurfAlg(const double *pt, const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const double *coords, const mcIdType *nc, const mcIdType *ncI, double& ret0, mcIdType& cellId);
+    static void DistanceToPoint2DCurveAlg(const double *pt, const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const double *coords, const mcIdType *nc, const mcIdType *ncI, double& ret0, mcIdType& cellId);
+    static DataArrayIdType *ComputeSpreadZoneGraduallyFromSeedAlg(std::vector<bool>& fetched, const mcIdType *seedBg, const mcIdType *seedEnd, const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn, mcIdType nbOfDepthPeeling, mcIdType& nbOfDepthPeelingPerformed);
+    static void FillInCompact3DMode(int spaceDim, mcIdType nbOfNodesInCell, const mcIdType *conn, const double *coo, double *zipFrmt);
+    static void AppendExtrudedCell(const mcIdType *connBg, const mcIdType *connEnd, mcIdType nbOfNodesPerLev, bool isQuad, std::vector<mcIdType>& ret);
+    static void Intersect1DMeshes(const MEDCouplingUMesh *m1Desc, const MEDCouplingUMesh *m2Desc, double eps, std::vector< std::vector<mcIdType> >& intersectEdge1, std::vector< std::vector<mcIdType> >& colinear2, std::vector< std::vector<mcIdType> >& subDiv2, std::vector<double>& addCoo, std::map<mcIdType,mcIdType>& mergedNodes);
     static void IntersectDescending2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
-                                            std::vector< std::vector<int> >& intersectEdge1, std::vector< std::vector<int> >& colinear2, std::vector< std::vector<int> >& subDiv2,
-                                            MEDCouplingUMesh *& m1Desc, DataArrayInt *&desc1, DataArrayInt *&descIndx1, DataArrayInt *&revDesc1, DataArrayInt *&revDescIndx1,
+                                            std::vector< std::vector<mcIdType> >& intersectEdge1, std::vector< std::vector<mcIdType> >& colinear2, std::vector< std::vector<mcIdType> >& subDiv2,
+                                            MEDCouplingUMesh *& m1Desc, DataArrayIdType *&desc1, DataArrayIdType *&descIndx1, DataArrayIdType *&revDesc1, DataArrayIdType *&revDescIndx1,
                                             std::vector<double>& addCoo,
-                                            MEDCouplingUMesh *& m2Desc, DataArrayInt *&desc2, DataArrayInt *&descIndx2, DataArrayInt *&revDesc2, DataArrayInt *&revDescIndx2);
-    static void BuildIntersectEdges(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, const std::vector<double>& addCoo, const std::vector< std::vector<int> >& subDiv, std::vector< std::vector<int> >& intersectEdge);
-    static void BuildIntersecting2DCellsFromEdges(double eps, const MEDCouplingUMesh *m1, const int *desc1, const int *descIndx1, const std::vector<std::vector<int> >& intesctEdges1, const std::vector< std::vector<int> >& colinear2,
-                                                  const MEDCouplingUMesh *m2, const int *desc2, const int *descIndx2, const std::vector<std::vector<int> >& intesctEdges2,
+                                            MEDCouplingUMesh *& m2Desc, DataArrayIdType *&desc2, DataArrayIdType *&descIndx2, DataArrayIdType *&revDesc2, DataArrayIdType *&revDescIndx2);
+    static void BuildIntersectEdges(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, const std::vector<double>& addCoo, const std::vector< std::vector<mcIdType> >& subDiv, std::vector< std::vector<mcIdType> >& intersectEdge);
+    static void BuildIntersecting2DCellsFromEdges(double eps, const MEDCouplingUMesh *m1, const mcIdType *desc1, const mcIdType *descIndx1, const std::vector<std::vector<mcIdType> >& intesctEdges1, const std::vector< std::vector<mcIdType> >& colinear2,
+                                                  const MEDCouplingUMesh *m2, const mcIdType *desc2, const mcIdType *descIndx2, const std::vector<std::vector<mcIdType> >& intesctEdges2,
                                                   const std::vector<double>& addCoords,
-                                                  std::vector<double>& addCoordsQuadratic, std::vector<int>& cr, std::vector<int>& crI, std::vector<int>& cNb1, std::vector<int>& cNb2);
-    static void AssemblyForSplitFrom3DCurve(const std::vector<int>& cut3DCurve, std::vector<int>& nodesOnPlane, const int *nodal3DSurf, const int *nodalIndx3DSurf,
-                                              const int *nodal3DCurve, const int *nodalIndx3DCurve,
-                                              const int *desc, const int *descIndx, std::vector< std::pair<int,int> >& cut3DSurf);
-    void assemblyForSplitFrom3DSurf(const std::vector< std::pair<int,int> >& cut3DSurf,
-                                    const int *desc, const int *descIndx, DataArrayInt *nodalRes, DataArrayInt *nodalResIndx, DataArrayInt *cellIds) const;
-    void buildSubCellsFromCut(const std::vector< std::pair<int,int> >& cut3DSurf, const int *desc, const int *descIndx, const double *coords, double eps, std::vector<std::vector<int> >& res) const;
-    void split2DCellsLinear(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI);
-    int split2DCellsQuadratic(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *mid, const DataArrayInt *midI);
-    static bool Colinearize2DCell(const double *coords, const int *connBg, const int *connEnd, int offset, const std::map<int, bool>& forbiddenPoints, DataArrayInt *newConnOfCell, DataArrayDouble *appendedCoords);
-    static void ComputeAllTypesInternal(std::set<INTERP_KERNEL::NormalizedCellType>& types, const DataArrayInt *nodalConnec, const DataArrayInt *nodalConnecIndex);
-    static bool OrderPointsAlongLine(const double * coo, int startNode, int endNode,
-                                                const int * c, const int * cI, const int *idsBg, const int *endBg,
-                                                std::vector<int> & pointIds, std::vector<int> & hitSegs);
-    static void ReplaceEdgeInFace(const int * sIdxConn, const int * sIdxConnE, int startNode, int endNode,
-                                      const std::vector<int>& insidePoints, std::vector<int>& modifiedFace);
-    void attractSeg3MidPtsAroundNodesUnderground(double ratio, const int *nodeIdsBg, const int *nodeIdsEnd);
-    DataArrayInt *internalColinearize2D(double eps, bool stayConform);
+                                                  std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& cr, std::vector<mcIdType>& crI, std::vector<mcIdType>& cNb1, std::vector<mcIdType>& cNb2);
+    static void AssemblyForSplitFrom3DCurve(const std::vector<mcIdType>& cut3DCurve, std::vector<mcIdType>& nodesOnPlane, const mcIdType *nodal3DSurf, const mcIdType *nodalIndx3DSurf,
+                                              const mcIdType *nodal3DCurve, const mcIdType *nodalIndx3DCurve,
+                                              const mcIdType *desc, const mcIdType *descIndx, std::vector< std::pair<mcIdType,mcIdType> >& cut3DSurf);
+    void assemblyForSplitFrom3DSurf(const std::vector< std::pair<mcIdType,mcIdType> >& cut3DSurf,
+                                    const mcIdType *desc, const mcIdType *descIndx, DataArrayIdType *nodalRes, DataArrayIdType *nodalResIndx, DataArrayIdType *cellIds) const;
+    void buildSubCellsFromCut(const std::vector< std::pair<mcIdType,mcIdType> >& cut3DSurf, const mcIdType *desc, const mcIdType *descIndx, const double *coords, double eps, std::vector<std::vector<mcIdType> >& res) const;
+    void split2DCellsLinear(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI);
+    mcIdType split2DCellsQuadratic(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI, const DataArrayIdType *mid, const DataArrayIdType *midI);
+    static bool Colinearize2DCell(const double *coords, const mcIdType *connBg, const mcIdType *connEnd, mcIdType offset, const std::map<mcIdType, bool>& forbiddenPoints, DataArrayIdType *newConnOfCell, DataArrayDouble *appendedCoords);
+    static void ComputeAllTypesInternal(std::set<INTERP_KERNEL::NormalizedCellType>& types, const DataArrayIdType *nodalConnec, const DataArrayIdType *nodalConnecIndex);
+    static bool OrderPointsAlongLine(const double * coo, mcIdType startNode, mcIdType endNode,
+                                                const mcIdType * c, const mcIdType * cI, const mcIdType *idsBg, const mcIdType *endBg,
+                                                std::vector<mcIdType> & pointIds, std::vector<mcIdType> & hitSegs);
+    static void ReplaceEdgeInFace(const mcIdType * sIdxConn, const mcIdType * sIdxConnE, mcIdType startNode, mcIdType endNode,
+                                      const std::vector<mcIdType>& insidePoints, std::vector<mcIdType>& modifiedFace);
+    void attractSeg3MidPtsAroundNodesUnderground(double ratio, const mcIdType *nodeIdsBg, const mcIdType *nodeIdsEnd);
+    DataArrayIdType *internalColinearize2D(double eps, bool stayConform);
     template<class MAPCLS>
     void renumberNodesInConnT(const MAPCLS& newNodeNumbersO2N);
   public:
-    MEDCOUPLING_EXPORT static DataArrayInt *ComputeRangesFromTypeDistribution(const std::vector<int>& code);
+    MEDCOUPLING_EXPORT static DataArrayIdType *ComputeRangesFromTypeDistribution(const std::vector<mcIdType>& code);
     MEDCOUPLING_EXPORT static const int N_MEDMEM_ORDER=25;
     MEDCOUPLING_EXPORT static const INTERP_KERNEL::NormalizedCellType MEDMEM_ORDER[N_MEDMEM_ORDER];
-    MEDCOUPLING_EXPORT static const int MEDCOUPLING2VTKTYPETRADUCER[INTERP_KERNEL::NORM_MAXTYPE+1];
+    MEDCOUPLING_EXPORT static const mcIdType MEDCOUPLING2VTKTYPETRADUCER[INTERP_KERNEL::NORM_MAXTYPE+1];
     /// @endcond
   private:
     int _mesh_dim;
@@ -376,15 +376,15 @@ namespace MEDCoupling
   {
   public:
     MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh);
-    MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh, MEDCouplingUMeshCell *itc, int bg, int end);
+    MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end);
     MEDCOUPLING_EXPORT ~MEDCouplingUMeshCellIterator();
     MEDCOUPLING_EXPORT MEDCouplingUMeshCell *nextt();
   private:
     MEDCouplingUMesh *_mesh;
     MEDCouplingUMeshCell *_cell;
     bool _own_cell;
-    int _cell_id;
-    int _nb_cell;
+    mcIdType _cell_id;
+    mcIdType _nb_cell;
   };
 
   class MEDCouplingUMeshCellByTypeIterator;
@@ -402,17 +402,17 @@ namespace MEDCoupling
   class MEDCouplingUMeshCellEntry
   {
   public:
-    MEDCOUPLING_EXPORT MEDCouplingUMeshCellEntry(MEDCouplingUMesh *mesh,  INTERP_KERNEL::NormalizedCellType type, MEDCouplingUMeshCell *itc, int bg, int end);
+    MEDCOUPLING_EXPORT MEDCouplingUMeshCellEntry(MEDCouplingUMesh *mesh,  INTERP_KERNEL::NormalizedCellType type, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end);
     MEDCOUPLING_EXPORT ~MEDCouplingUMeshCellEntry();
     MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getType() const;
-    MEDCOUPLING_EXPORT int getNumberOfElems() const;
+    MEDCOUPLING_EXPORT mcIdType getNumberOfElems() const;
     MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator *iterator();
   private:
     MEDCouplingUMesh *_mesh;
     INTERP_KERNEL::NormalizedCellType _type;
     MEDCouplingUMeshCell *_itc;
-    int _bg;
-    int _end;
+    mcIdType _bg;
+    mcIdType _end;
   };
 
   class MEDCouplingUMeshCellByTypeIterator
@@ -424,8 +424,8 @@ namespace MEDCoupling
   private:
     MEDCouplingUMesh *_mesh;
     MEDCouplingUMeshCell *_cell;
-    int _cell_id;
-    int _nb_cell;
+    mcIdType _cell_id;
+    mcIdType _nb_cell;
   };
 
   class MEDCouplingUMeshCell
@@ -435,11 +435,11 @@ namespace MEDCoupling
     MEDCOUPLING_EXPORT void next();
     MEDCOUPLING_EXPORT std::string repr() const;
     MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getType() const;
-    MEDCOUPLING_EXPORT const int *getAllConn(int& lgth) const;
+    MEDCOUPLING_EXPORT const mcIdType *getAllConn(mcIdType& lgth) const;
   private:
-    int *_conn;
-    int *_conn_indx;
-    int _conn_lgth;
+    mcIdType *_conn;
+    mcIdType *_conn_indx;
+    mcIdType _conn_lgth;
     static const int NOTICABLE_FIRST_VAL=-7;
   };
 }
index 581cd29ca331e2fc16e23d9121678a856ed272dc..b2cf017e66604c0484ae37903109f919cbda779a 100644 (file)
@@ -27,13 +27,13 @@ template<class MAPCLS>
 void MEDCoupling::MEDCouplingUMesh::renumberNodesInConnT(const MAPCLS& newNodeNumbersO2N)
 {
   checkConnectivityFullyDefined();
-  int *conn(getNodalConnectivity()->getPointer());
-  const int *connIndex(getNodalConnectivityIndex()->getConstPointer());
-  int nbOfCells(getNumberOfCells());
-  for(int i=0;i<nbOfCells;i++)
-    for(int iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
+  mcIdType *conn(getNodalConnectivity()->getPointer());
+  const mcIdType *connIndex(getNodalConnectivityIndex()->getConstPointer());
+  mcIdType nbOfCells=ToIdType(getNumberOfCells());
+  for(mcIdType i=0;i<nbOfCells;i++)
+    for(mcIdType iconn=connIndex[i]+1;iconn!=connIndex[i+1];iconn++)
       {
-        int& node=conn[iconn];
+        mcIdType& node=conn[iconn];
         if(node>=0)//avoid polyhedron separator
           {
             auto it(newNodeNumbersO2N.find(node));
old mode 100644 (file)
new mode 100755 (executable)
index 37640b5..4b6b75a
@@ -74,10 +74,10 @@ void MEDCouplingUMesh::reprConnectivityOfThisLL(std::ostringstream& stream) cons
 {
   if(_nodal_connec!=0 && _nodal_connec_index!=0)
     {
-      int nbOfCells=getNumberOfCells();
-      const int *c=_nodal_connec->getConstPointer();
-      const int *ci=_nodal_connec_index->getConstPointer();
-      for(int i=0;i<nbOfCells;i++)
+      mcIdType nbOfCells=getNumberOfCells();
+      const mcIdType *c=_nodal_connec->getConstPointer();
+      const mcIdType *ci=_nodal_connec_index->getConstPointer();
+      for(mcIdType i=0;i<nbOfCells;i++)
         {
           const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)c[ci[i]]);
           stream << "Cell #" << i << " " << cm.getRepr() << " : ";
@@ -93,32 +93,32 @@ void MEDCouplingUMesh::reprConnectivityOfThisLL(std::ostringstream& stream) cons
 /*!
  * This method implements policy 0 of virtual method MEDCoupling::MEDCouplingUMesh::simplexize.
  */
-DataArrayInt *MEDCouplingUMesh::simplexizePol0()
+DataArrayIdType *MEDCouplingUMesh::simplexizePol0()
 {
   checkConnectivityFullyDefined();
   if(getMeshDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::simplexizePol0 : this policy is only available for mesh with meshdim == 2 !");
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  int nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_QUAD4);
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  mcIdType nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_QUAD4);
   ret->alloc(nbOfCells+nbOfCutCells,1);
   if(nbOfCutCells==0) { ret->iota(0); return ret.retn(); }
-  int *retPt=ret->getPointer();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New();
+  mcIdType *retPt=ret->getPointer();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New();
   newConnI->alloc(nbOfCells+nbOfCutCells+1,1);
   newConn->alloc(getNodalConnectivityArrayLen()+3*nbOfCutCells,1);
-  int *pt=newConn->getPointer();
-  int *ptI=newConnI->getPointer();
+  mcIdType *pt=newConn->getPointer();
+  mcIdType *ptI=newConnI->getPointer();
   ptI[0]=0;
-  const int *oldc=_nodal_connec->begin();
-  const int *ci=_nodal_connec_index->begin();
-  for(int i=0;i<nbOfCells;i++,ci++)
+  const mcIdType *oldc=_nodal_connec->begin();
+  const mcIdType *ci=_nodal_connec_index->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,ci++)
     {
       if((INTERP_KERNEL::NormalizedCellType)oldc[ci[0]]==INTERP_KERNEL::NORM_QUAD4)
         {
-          const int tmp[8]={(int)INTERP_KERNEL::NORM_TRI3,oldc[ci[0]+1],oldc[ci[0]+2],oldc[ci[0]+3],
-            (int)INTERP_KERNEL::NORM_TRI3,oldc[ci[0]+1],oldc[ci[0]+3],oldc[ci[0]+4]};
+          const mcIdType tmp[8]={ToIdType(INTERP_KERNEL::NORM_TRI3),oldc[ci[0]+1],oldc[ci[0]+2],oldc[ci[0]+3],
+                                 ToIdType(INTERP_KERNEL::NORM_TRI3),oldc[ci[0]+1],oldc[ci[0]+3],oldc[ci[0]+4]};
           pt=std::copy(tmp,tmp+8,pt);
           ptI[1]=ptI[0]+4;
           ptI[2]=ptI[0]+8;
@@ -146,32 +146,32 @@ DataArrayInt *MEDCouplingUMesh::simplexizePol0()
 /*!
  * This method implements policy 1 of virtual method MEDCoupling::MEDCouplingUMesh::simplexize.
  */
-DataArrayInt *MEDCouplingUMesh::simplexizePol1()
+DataArrayIdType *MEDCouplingUMesh::simplexizePol1()
 {
   checkConnectivityFullyDefined();
   if(getMeshDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::simplexizePol0 : this policy is only available for mesh with meshdim == 2 !");
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  int nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_QUAD4);
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  mcIdType nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_QUAD4);
   ret->alloc(nbOfCells+nbOfCutCells,1);
   if(nbOfCutCells==0) { ret->iota(0); return ret.retn(); }
-  int *retPt=ret->getPointer();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New();
+  mcIdType *retPt=ret->getPointer();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New();
   newConnI->alloc(nbOfCells+nbOfCutCells+1,1);
   newConn->alloc(getNodalConnectivityArrayLen()+3*nbOfCutCells,1);
-  int *pt=newConn->getPointer();
-  int *ptI=newConnI->getPointer();
+  mcIdType *pt=newConn->getPointer();
+  mcIdType *ptI=newConnI->getPointer();
   ptI[0]=0;
-  const int *oldc=_nodal_connec->begin();
-  const int *ci=_nodal_connec_index->begin();
-  for(int i=0;i<nbOfCells;i++,ci++)
+  const mcIdType *oldc=_nodal_connec->begin();
+  const mcIdType *ci=_nodal_connec_index->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,ci++)
     {
       if((INTERP_KERNEL::NormalizedCellType)oldc[ci[0]]==INTERP_KERNEL::NORM_QUAD4)
         {
-          const int tmp[8]={(int)INTERP_KERNEL::NORM_TRI3,oldc[ci[0]+1],oldc[ci[0]+2],oldc[ci[0]+4],
-            (int)INTERP_KERNEL::NORM_TRI3,oldc[ci[0]+2],oldc[ci[0]+3],oldc[ci[0]+4]};
+          const mcIdType tmp[8]={ToIdType(INTERP_KERNEL::NORM_TRI3),oldc[ci[0]+1],oldc[ci[0]+2],oldc[ci[0]+4],
+                                 ToIdType(INTERP_KERNEL::NORM_TRI3),oldc[ci[0]+2],oldc[ci[0]+3],oldc[ci[0]+4]};
           pt=std::copy(tmp,tmp+8,pt);
           ptI[1]=ptI[0]+4;
           ptI[2]=ptI[0]+8;
@@ -199,33 +199,33 @@ DataArrayInt *MEDCouplingUMesh::simplexizePol1()
 /*!
  * This method implements policy INTERP_KERNEL::PLANAR_FACE_5 of virtual method MEDCoupling::MEDCouplingUMesh::simplexize.
  */
-DataArrayInt *MEDCouplingUMesh::simplexizePlanarFace5()
+DataArrayIdType *MEDCouplingUMesh::simplexizePlanarFace5()
 {
   checkConnectivityFullyDefined();
   if(getMeshDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::simplexizePlanarFace5 : this policy is only available for mesh with meshdim == 3 !");
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  int nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8);
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  mcIdType nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8);
   ret->alloc(nbOfCells+4*nbOfCutCells,1);
   if(nbOfCutCells==0) { ret->iota(0); return ret.retn(); }
-  int *retPt=ret->getPointer();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New();
+  mcIdType *retPt=ret->getPointer();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New();
   newConnI->alloc(nbOfCells+4*nbOfCutCells+1,1);
   newConn->alloc(getNodalConnectivityArrayLen()+16*nbOfCutCells,1);//21
-  int *pt=newConn->getPointer();
-  int *ptI=newConnI->getPointer();
+  mcIdType *pt=newConn->getPointer();
+  mcIdType *ptI=newConnI->getPointer();
   ptI[0]=0;
-  const int *oldc=_nodal_connec->begin();
-  const int *ci=_nodal_connec_index->begin();
-  for(int i=0;i<nbOfCells;i++,ci++)
+  const mcIdType *oldc=_nodal_connec->begin();
+  const mcIdType *ci=_nodal_connec_index->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,ci++)
     {
       if((INTERP_KERNEL::NormalizedCellType)oldc[ci[0]]==INTERP_KERNEL::NORM_HEXA8)
         {
           for(int j=0;j<5;j++,pt+=5,ptI++)
             {
-              pt[0]=(int)INTERP_KERNEL::NORM_TETRA4;
+              pt[0]=ToIdType(INTERP_KERNEL::NORM_TETRA4);
               pt[1]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_5_WO[4*j+0]+1]; pt[2]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_5_WO[4*j+1]+1]; pt[3]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_5_WO[4*j+2]+1]; pt[4]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_5_WO[4*j+3]+1];
               *retPt++=i;
               ptI[1]=ptI[0]+5;
@@ -251,33 +251,33 @@ DataArrayInt *MEDCouplingUMesh::simplexizePlanarFace5()
 /*!
  * This method implements policy INTERP_KERNEL::PLANAR_FACE_6 of virtual method MEDCoupling::MEDCouplingUMesh::simplexize.
  */
-DataArrayInt *MEDCouplingUMesh::simplexizePlanarFace6()
+DataArrayIdType *MEDCouplingUMesh::simplexizePlanarFace6()
 {
   checkConnectivityFullyDefined();
   if(getMeshDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::simplexizePlanarFace6 : this policy is only available for mesh with meshdim == 3 !");
-  int nbOfCells=getNumberOfCells();
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  int nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8);
+  mcIdType nbOfCells=getNumberOfCells();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  mcIdType nbOfCutCells=getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8);
   ret->alloc(nbOfCells+5*nbOfCutCells,1);
   if(nbOfCutCells==0) { ret->iota(0); return ret.retn(); }
-  int *retPt=ret->getPointer();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New();
+  mcIdType *retPt=ret->getPointer();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New();
   newConnI->alloc(nbOfCells+5*nbOfCutCells+1,1);
   newConn->alloc(getNodalConnectivityArrayLen()+21*nbOfCutCells,1);
-  int *pt=newConn->getPointer();
-  int *ptI=newConnI->getPointer();
+  mcIdType *pt=newConn->getPointer();
+  mcIdType *ptI=newConnI->getPointer();
   ptI[0]=0;
-  const int *oldc=_nodal_connec->begin();
-  const int *ci=_nodal_connec_index->begin();
-  for(int i=0;i<nbOfCells;i++,ci++)
+  const mcIdType *oldc=_nodal_connec->begin();
+  const mcIdType *ci=_nodal_connec_index->begin();
+  for(mcIdType i=0;i<nbOfCells;i++,ci++)
     {
       if((INTERP_KERNEL::NormalizedCellType)oldc[ci[0]]==INTERP_KERNEL::NORM_HEXA8)
         {
           for(int j=0;j<6;j++,pt+=5,ptI++)
             {
-              pt[0]=(int)INTERP_KERNEL::NORM_TETRA4;
+              pt[0]=ToIdType(INTERP_KERNEL::NORM_TETRA4);
               pt[1]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_6_WO[4*j+0]+1]; pt[2]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_6_WO[4*j+1]+1]; pt[3]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_6_WO[4*j+2]+1]; pt[4]=oldc[ci[0]+INTERP_KERNEL::SPLIT_NODES_6_WO[4*j+3]+1];
               *retPt++=i;
               ptI[1]=ptI[0]+5;
@@ -322,7 +322,7 @@ void MEDCouplingUMesh::tessellate2DInternal(double eps)
   double epsa=fabs(eps);
   if(epsa<std::numeric_limits<double>::min())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::tessellate2DInternal : epsilon is null ! Please specify a higher epsilon. If too tiny it can lead to a huge amount of nodes and memory !");
-  MCAuto<DataArrayInt> desc1(DataArrayInt::New()),descIndx1(DataArrayInt::New()),revDesc1(DataArrayInt::New()),revDescIndx1(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc1(DataArrayIdType::New()),descIndx1(DataArrayIdType::New()),revDesc1(DataArrayIdType::New()),revDescIndx1(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> mDesc(buildDescendingConnectivity2(desc1,descIndx1,revDesc1,revDescIndx1));
   revDesc1=0; revDescIndx1=0;
   mDesc->tessellate2D(eps);
@@ -349,21 +349,21 @@ void MEDCouplingUMesh::tessellate2DCurveInternal(double eps)
   if(epsa<std::numeric_limits<double>::min())
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::tessellate2DCurveInternal : epsilon is null ! Please specify a higher epsilon. If too tiny it can lead to a huge amount of nodes and memory !");
   INTERP_KERNEL::QuadraticPlanarPrecision arcPrec(1.e-10);  // RAII
-  int nbCells=getNumberOfCells();
-  int nbNodes=getNumberOfNodes();
-  const int *conn=_nodal_connec->begin();
-  const int *connI=_nodal_connec_index->begin();
+  mcIdType nbCells=getNumberOfCells();
+  mcIdType nbNodes=getNumberOfNodes();
+  const mcIdType *conn=_nodal_connec->begin();
+  const mcIdType *connI=_nodal_connec_index->begin();
   const double *coords=_coords->begin();
   std::vector<double> addCoo;
-  std::vector<int> newConn;//no direct DataArrayInt because interface with Geometric2D
-  MCAuto<DataArrayInt> newConnI(DataArrayInt::New());
+  std::vector<mcIdType> newConn;//no direct DataArrayIdType because interface with Geometric2D
+  MCAuto<DataArrayIdType> newConnI(DataArrayIdType::New());
   newConnI->alloc(nbCells+1,1);
-  int *newConnIPtr=newConnI->getPointer();
+  mcIdType *newConnIPtr=newConnI->getPointer();
   *newConnIPtr=0;
-  int tmp1[3];
+  mcIdType tmp1[3];
   INTERP_KERNEL::Node *tmp2[3];
   std::set<INTERP_KERNEL::NormalizedCellType> types;
-  for(int i=0;i<nbCells;i++,newConnIPtr++)
+  for(mcIdType i=0;i<nbCells;i++,newConnIPtr++)
     {
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
       if(cm.isQuadratic())
@@ -378,7 +378,7 @@ void MEDCouplingUMesh::tessellate2DCurveInternal(double eps)
               eac->tesselate(tmp1,nbNodes,epsa,newConn,addCoo);
               types.insert((INTERP_KERNEL::NormalizedCellType)newConn[newConnIPtr[0]]);
               delete eac;
-              newConnIPtr[1]=(int)newConn.size();
+              newConnIPtr[1]=ToIdType(newConn.size());
             }
           else
             {
@@ -395,16 +395,16 @@ void MEDCouplingUMesh::tessellate2DCurveInternal(double eps)
           newConnIPtr[1]=newConnIPtr[0]+3;
         }
     }
-  if(addCoo.empty() && newConn.size()==_nodal_connec->getNumberOfTuples())//nothing happens during tessellation : no update needed
+  if(addCoo.empty() && ToIdType(newConn.size())==_nodal_connec->getNumberOfTuples())//nothing happens during tessellation : no update needed
     return ;
   _types=types;
-  DataArrayInt::SetArrayIn(newConnI,_nodal_connec_index);
-  MCAuto<DataArrayInt> newConnArr=DataArrayInt::New();
-  newConnArr->alloc((int)newConn.size(),1);
+  DataArrayIdType::SetArrayIn(newConnI,_nodal_connec_index);
+  MCAuto<DataArrayIdType> newConnArr=DataArrayIdType::New();
+  newConnArr->alloc(newConn.size(),1);
   std::copy(newConn.begin(),newConn.end(),newConnArr->getPointer());
-  DataArrayInt::SetArrayIn(newConnArr,_nodal_connec);
+  DataArrayIdType::SetArrayIn(newConnArr,_nodal_connec);
   MCAuto<DataArrayDouble> newCoords=DataArrayDouble::New();
-  newCoords->alloc(nbNodes+((int)addCoo.size())/2,2);
+  newCoords->alloc(nbNodes+addCoo.size()/2,2);
   double *work=std::copy(_coords->begin(),_coords->end(),newCoords->getPointer());
   std::copy(addCoo.begin(),addCoo.end(),work);
   DataArrayDouble::SetArrayIn(newCoords,_coords);
@@ -420,34 +420,34 @@ void MEDCouplingUMesh::tessellate2DCurveInternal(double eps)
  * \param desc is descending connectivity in format specified in MEDCouplingUMesh::buildDescendingConnectivity2
  * \param descIndex is descending connectivity index in format specified in MEDCouplingUMesh::buildDescendingConnectivity2
  */
-void MEDCouplingUMesh::subDivide2DMesh(const int *nodeSubdived, const int *nodeIndxSubdived, const int *desc, const int *descIndex)
+void MEDCouplingUMesh::subDivide2DMesh(const mcIdType *nodeSubdived, const mcIdType *nodeIndxSubdived, const mcIdType *desc, const mcIdType *descIndex)
 {
   checkFullyDefined();
   if(getMeshDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::subDivide2DMesh : works only on umesh with meshdim==2 !");
-  int nbOfCells=getNumberOfCells();
-  int *connI=_nodal_connec_index->getPointer();
-  int newConnLgth=0;
-  for(int i=0;i<nbOfCells;i++,connI++)
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType *connI=_nodal_connec_index->getPointer();
+  mcIdType newConnLgth=0;
+  for(mcIdType i=0;i<nbOfCells;i++,connI++)
     {
-      int offset=descIndex[i];
-      int nbOfEdges=descIndex[i+1]-offset;
+      mcIdType offset=descIndex[i];
+      mcIdType nbOfEdges=descIndex[i+1]-offset;
       //
       bool ddirect=desc[offset+nbOfEdges-1]>0;
-      int eedgeId=std::abs(desc[offset+nbOfEdges-1])-1;
-      int ref=ddirect?nodeSubdived[nodeIndxSubdived[eedgeId+1]-1]:nodeSubdived[nodeIndxSubdived[eedgeId]+1];
-      for(int j=0;j<nbOfEdges;j++)
+      mcIdType eedgeId=std::abs(desc[offset+nbOfEdges-1])-1;
+      mcIdType ref=ddirect?nodeSubdived[nodeIndxSubdived[eedgeId+1]-1]:nodeSubdived[nodeIndxSubdived[eedgeId]+1];
+      for(mcIdType j=0;j<nbOfEdges;j++)
         {
           bool direct=desc[offset+j]>0;
-          int edgeId=std::abs(desc[offset+j])-1;
+          mcIdType edgeId=std::abs(desc[offset+j])-1;
           if(!INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)nodeSubdived[nodeIndxSubdived[edgeId]]).isQuadratic())
             {
-              int id1=nodeSubdived[nodeIndxSubdived[edgeId]+1];
-              int id2=nodeSubdived[nodeIndxSubdived[edgeId+1]-1];
-              int ref2=direct?id1:id2;
+              mcIdType id1=nodeSubdived[nodeIndxSubdived[edgeId]+1];
+              mcIdType id2=nodeSubdived[nodeIndxSubdived[edgeId+1]-1];
+              mcIdType ref2=direct?id1:id2;
               if(ref==ref2)
                 {
-                  int nbOfSubNodes=nodeIndxSubdived[edgeId+1]-nodeIndxSubdived[edgeId]-1;
+                  mcIdType nbOfSubNodes=nodeIndxSubdived[edgeId+1]-nodeIndxSubdived[edgeId]-1;
                   newConnLgth+=nbOfSubNodes-1;
                   ref=direct?id2:id1;
                 }
@@ -466,29 +466,29 @@ void MEDCouplingUMesh::subDivide2DMesh(const int *nodeSubdived, const int *nodeI
       connI[1]=newConnLgth;
     }
   //
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New();
   newConn->alloc(newConnLgth,1);
-  int *work=newConn->getPointer();
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType *work=newConn->getPointer();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
       *work++=INTERP_KERNEL::NORM_POLYGON;
-      int offset=descIndex[i];
-      int nbOfEdges=descIndex[i+1]-offset;
-      for(int j=0;j<nbOfEdges;j++)
+      mcIdType offset=descIndex[i];
+      mcIdType nbOfEdges=descIndex[i+1]-offset;
+      for(mcIdType j=0;j<nbOfEdges;j++)
         {
           bool direct=desc[offset+j]>0;
-          int edgeId=std::abs(desc[offset+j])-1;
+          mcIdType edgeId=std::abs(desc[offset+j])-1;
           if(direct)
             work=std::copy(nodeSubdived+nodeIndxSubdived[edgeId]+1,nodeSubdived+nodeIndxSubdived[edgeId+1]-1,work);
           else
             {
-              int nbOfSubNodes=nodeIndxSubdived[edgeId+1]-nodeIndxSubdived[edgeId]-1;
-              std::reverse_iterator<const int *> it(nodeSubdived+nodeIndxSubdived[edgeId+1]);
+              mcIdType nbOfSubNodes=nodeIndxSubdived[edgeId+1]-nodeIndxSubdived[edgeId]-1;
+              std::reverse_iterator<const mcIdType *> it(nodeSubdived+nodeIndxSubdived[edgeId+1]);
               work=std::copy(it,it+nbOfSubNodes-1,work);
             }
         }
     }
-  DataArrayInt::SetArrayIn(newConn,_nodal_connec);
+  DataArrayIdType::SetArrayIn(newConn,_nodal_connec);
   _types.clear();
   if(nbOfCells>0)
     _types.insert(INTERP_KERNEL::NORM_POLYGON);
@@ -505,23 +505,23 @@ void MEDCouplingUMesh::subDivide2DMesh(const int *nodeSubdived, const int *nodeI
  * \param [in] fullyIn input that specifies if all node ids must be in [ \a begin,\a end ) array to consider cell to be in.
  * \param [in,out] cellIdsKeptArr array where all candidate cell ids are put at the end.
  */
-void MEDCouplingUMesh::fillCellIdsToKeepFromNodeIds(const int *begin, const int *end, bool fullyIn, DataArrayInt *&cellIdsKeptArr) const
+void MEDCouplingUMesh::fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const
 {
-  MCAuto<DataArrayInt> cellIdsKept=DataArrayInt::New(); cellIdsKept->alloc(0,1);
+  MCAuto<DataArrayIdType> cellIdsKept=DataArrayIdType::New(); cellIdsKept->alloc(0,1);
   checkConnectivityFullyDefined();
-  int tmp=-1;
-  int sz=getNodalConnectivity()->getMaxValue(tmp); sz=std::max(sz,0)+1;
+  mcIdType tmp=-1;
+  mcIdType sz=getNodalConnectivity()->getMaxValue(tmp); sz=std::max(sz,ToIdType(0))+1;
   std::vector<bool> fastFinder(sz,false);
-  for(const int *work=begin;work!=end;work++)
+  for(const mcIdType *work=begin;work!=end;work++)
     if(*work>=0 && *work<sz)
       fastFinder[*work]=true;
-  int nbOfCells=getNumberOfCells();
-  const int *conn=getNodalConnectivity()->getConstPointer();
-  const int *connIndex=getNodalConnectivityIndex()->getConstPointer();
-  for(int i=0;i<nbOfCells;i++)
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *conn=getNodalConnectivity()->getConstPointer();
+  const mcIdType *connIndex=getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int ref=0,nbOfHit=0;
-      for(const int *work2=conn+connIndex[i]+1;work2!=conn+connIndex[i+1];work2++)
+      mcIdType ref=0,nbOfHit=0;
+      for(const mcIdType *work2=conn+connIndex[i]+1;work2!=conn+connIndex[i+1];work2++)
         if(*work2>=0)
           {
             ref++;
@@ -545,29 +545,29 @@ void MEDCouplingUMesh::fillCellIdsToKeepFromNodeIds(const int *begin, const int
  * if cut3DCurve[i]==-1, it means that cell#i has been already detected to be fully part of plane defined by ('origin','vec').
  * This method will throw an exception if \a this contains a non linear segment.
  */
-void MEDCouplingUMesh::split3DCurveWithPlane(const double *origin, const double *vec, double eps, std::vector<int>& cut3DCurve)
+void MEDCouplingUMesh::split3DCurveWithPlane(const double *origin, const double *vec, double eps, std::vector<mcIdType>& cut3DCurve)
 {
   checkFullyDefined();
   if(getMeshDimension()!=1 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split3DCurveWithPlane works on umeshes with meshdim equal to 1 and spaceDim equal to 3 !");
-  int ncells=getNumberOfCells();
-  int nnodes=getNumberOfNodes();
+  mcIdType ncells=getNumberOfCells();
+  mcIdType nnodes=getNumberOfNodes();
   double vec2[3],vec3[3],vec4[3];
   double normm=sqrt(vec[0]*vec[0]+vec[1]*vec[1]+vec[2]*vec[2]);
   if(normm<1e-6)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::split3DCurveWithPlane : parameter 'vec' should have a norm2 greater than 1e-6 !");
   vec2[0]=vec[0]/normm; vec2[1]=vec[1]/normm; vec2[2]=vec[2]/normm;
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connI=_nodal_connec_index->getConstPointer();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connI=_nodal_connec_index->getConstPointer();
   const double *coo=_coords->getConstPointer();
   std::vector<double> addCoo;
-  for(int i=0;i<ncells;i++)
+  for(mcIdType i=0;i<ncells;i++)
     {
-      if(conn[connI[i]]==(int)INTERP_KERNEL::NORM_SEG2)
+      if(conn[connI[i]]==ToIdType(INTERP_KERNEL::NORM_SEG2))
         {
           if(cut3DCurve[i]==-2)
             {
-              int st=conn[connI[i]+1],endd=conn[connI[i]+2];
+              mcIdType st=conn[connI[i]+1],endd=conn[connI[i]+2];
               vec3[0]=coo[3*endd]-coo[3*st]; vec3[1]=coo[3*endd+1]-coo[3*st+1]; vec3[2]=coo[3*endd+2]-coo[3*st+2];
               double normm2=sqrt(vec3[0]*vec3[0]+vec3[1]*vec3[1]+vec3[2]*vec3[2]);
               double colin=std::abs((vec3[0]*vec2[0]+vec3[1]*vec2[1]+vec3[2]*vec2[2])/normm2);
@@ -578,7 +578,7 @@ void MEDCouplingUMesh::split3DCurveWithPlane(const double *origin, const double
                   double pos=-(vec4[0]*vec2[0]+vec4[1]*vec2[1]+vec4[2]*vec2[2])/((vec3[0]*vec2[0]+vec3[1]*vec2[1]+vec3[2]*vec2[2]));
                   if(pos>eps && pos<1-eps)
                     {
-                      int nNode=((int)addCoo.size())/3;
+                      mcIdType nNode=ToIdType(addCoo.size())/3;
                       vec4[0]=st2[0]+pos*vec3[0]; vec4[1]=st2[1]+pos*vec3[1]; vec4[2]=st2[2]+pos*vec3[2];
                       addCoo.insert(addCoo.end(),vec4,vec4+3);
                       cut3DCurve[i]=nnodes+nNode;
@@ -591,7 +591,7 @@ void MEDCouplingUMesh::split3DCurveWithPlane(const double *origin, const double
     }
   if(!addCoo.empty())
     {
-      int newNbOfNodes=nnodes+((int)addCoo.size())/3;
+      mcIdType newNbOfNodes=nnodes+ToIdType(addCoo.size())/3;
       MCAuto<DataArrayDouble> coo2=DataArrayDouble::New();
       coo2->alloc(newNbOfNodes,3);
       double *tmp=coo2->getPointer();
@@ -608,22 +608,22 @@ void MEDCouplingUMesh::split3DCurveWithPlane(const double *origin, const double
  */
 DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslation(const MEDCouplingUMesh *mesh1D, bool isQuad) const
 {
-  int oldNbOfNodes=getNumberOfNodes();
-  int nbOf1DCells=mesh1D->getNumberOfCells();
-  int spaceDim=getSpaceDimension();
+  mcIdType oldNbOfNodes=getNumberOfNodes();
+  mcIdType nbOf1DCells=ToIdType(mesh1D->getNumberOfCells());
+  std::size_t spaceDim=getSpaceDimension();
   DataArrayDouble *ret=DataArrayDouble::New();
   std::vector<bool> isQuads;
-  int nbOfLevsInVec=isQuad?2*nbOf1DCells+1:nbOf1DCells+1;
+  mcIdType nbOfLevsInVec=isQuad?2*nbOf1DCells+1:nbOf1DCells+1;
   ret->alloc(oldNbOfNodes*nbOfLevsInVec,spaceDim);
   double *retPtr=ret->getPointer();
   const double *coords=getCoords()->getConstPointer();
   double *work=std::copy(coords,coords+spaceDim*oldNbOfNodes,retPtr);
-  std::vector<int> v;
+  std::vector<mcIdType> v;
   std::vector<double> c;
   double vec[3];
   v.reserve(3);
   c.reserve(6);
-  for(int i=0;i<nbOf1DCells;i++)
+  for(mcIdType i=0;i<nbOf1DCells;i++)
     {
       v.resize(0);
       mesh1D->getNodeIdsOfCell(i,v);
@@ -631,7 +631,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslation(const MEDCoupli
       mesh1D->getCoordinatesOfNode(v[isQuad?2:1],c);
       mesh1D->getCoordinatesOfNode(v[0],c);
       std::transform(c.begin(),c.begin()+spaceDim,c.begin()+spaceDim,vec,std::minus<double>());
-      for(int j=0;j<oldNbOfNodes;j++)
+      for(mcIdType j=0;j<oldNbOfNodes;j++)
         work=std::transform(vec,vec+spaceDim,retPtr+spaceDim*(i*oldNbOfNodes+j),work,std::plus<double>());
       if(isQuad)
         {
@@ -639,7 +639,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslation(const MEDCoupli
           mesh1D->getCoordinatesOfNode(v[1],c);
           mesh1D->getCoordinatesOfNode(v[0],c);
           std::transform(c.begin(),c.begin()+spaceDim,c.begin()+spaceDim,vec,std::minus<double>());
-          for(int j=0;j<oldNbOfNodes;j++)
+          for(mcIdType j=0;j<oldNbOfNodes;j++)
             work=std::transform(vec,vec+spaceDim,retPtr+spaceDim*(i*oldNbOfNodes+j),work,std::plus<double>());
         }
     }
@@ -670,12 +670,12 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation2D(con
 {
   if(isQuad)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation2D : not implemented for quadratic cells !");
-  int oldNbOfNodes=getNumberOfNodes();
-  int nbOf1DCells=mesh1D->getNumberOfCells();
+  mcIdType oldNbOfNodes=getNumberOfNodes();
+  mcIdType nbOf1DCells=ToIdType(mesh1D->getNumberOfCells());
   if(nbOf1DCells<2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation2D : impossible to detect any angle of rotation ! Change extrusion policy 1->0 !");
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
-  int nbOfLevsInVec=nbOf1DCells+1;
+  mcIdType nbOfLevsInVec=nbOf1DCells+1;
   ret->alloc(oldNbOfNodes*nbOfLevsInVec,2);
   double *retPtr=ret->getPointer();
   retPtr=std::copy(getCoords()->getConstPointer(),getCoords()->getConstPointer()+getCoords()->getNbOfElems(),retPtr);
@@ -683,9 +683,9 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation2D(con
   MCAuto<DataArrayDouble> tmp2=getCoords()->deepCopy();
   tmp->setCoords(tmp2);
   const double *coo1D=mesh1D->getCoords()->getConstPointer();
-  const int *conn1D=mesh1D->getNodalConnectivity()->getConstPointer();
-  const int *connI1D=mesh1D->getNodalConnectivityIndex()->getConstPointer();
-  for(int i=1;i<nbOfLevsInVec;i++)
+  const mcIdType *conn1D=mesh1D->getNodalConnectivity()->getConstPointer();
+  const mcIdType *connI1D=mesh1D->getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType i=1;i<nbOfLevsInVec;i++)
     {
       const double *begin=coo1D+2*conn1D[connI1D[i-1]+1];
       const double *end=coo1D+2*conn1D[connI1D[i-1]+2];
@@ -714,12 +714,12 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D(con
 {
   if(isQuad)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D : not implemented for quadratic cells !");
-  int oldNbOfNodes=getNumberOfNodes();
-  int nbOf1DCells=mesh1D->getNumberOfCells();
+  mcIdType oldNbOfNodes=getNumberOfNodes();
+  mcIdType nbOf1DCells=ToIdType(mesh1D->getNumberOfCells());
   if(nbOf1DCells<2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D : impossible to detect any angle of rotation ! Change extrusion policy 1->0 !");
   MCAuto<DataArrayDouble> ret=DataArrayDouble::New();
-  int nbOfLevsInVec=nbOf1DCells+1;
+  mcIdType nbOfLevsInVec=nbOf1DCells+1;
   ret->alloc(oldNbOfNodes*nbOfLevsInVec,3);
   double *retPtr=ret->getPointer();
   retPtr=std::copy(getCoords()->getConstPointer(),getCoords()->getConstPointer()+getCoords()->getNbOfElems(),retPtr);
@@ -727,9 +727,9 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D(con
   MCAuto<DataArrayDouble> tmp2=getCoords()->deepCopy();
   tmp->setCoords(tmp2);
   const double *coo1D=mesh1D->getCoords()->getConstPointer();
-  const int *conn1D=mesh1D->getNodalConnectivity()->getConstPointer();
-  const int *connI1D=mesh1D->getNodalConnectivityIndex()->getConstPointer();
-  for(int i=1;i<nbOfLevsInVec;i++)
+  const mcIdType *conn1D=mesh1D->getNodalConnectivity()->getConstPointer();
+  const mcIdType *connI1D=mesh1D->getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType i=1;i<nbOfLevsInVec;i++)
     {
       const double *begin=coo1D+3*conn1D[connI1D[i-1]+1];
       const double *end=coo1D+3*conn1D[connI1D[i-1]+2];
@@ -777,35 +777,35 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D(con
  * the coords sorted slice by slice.
  * \param isQuad specifies presence of quadratic cells.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMeshFromThisLowLev(int nbOfNodesOf1Lev, bool isQuad) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMeshFromThisLowLev(mcIdType nbOfNodesOf1Lev, bool isQuad) const
 {
-  int nbOf1DCells(getNumberOfNodes()/nbOfNodesOf1Lev-1);
-  int nbOf2DCells(getNumberOfCells());
-  int nbOf3DCells(nbOf2DCells*nbOf1DCells);
+  mcIdType nbOf1DCells(getNumberOfNodes()/nbOfNodesOf1Lev-1);
+  mcIdType nbOf2DCells=getNumberOfCells();
+  mcIdType nbOf3DCells(nbOf2DCells*nbOf1DCells);
   MEDCouplingUMesh *ret(MEDCouplingUMesh::New("Extruded",getMeshDimension()+1));
-  const int *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
-  MCAuto<DataArrayInt> newConn(DataArrayInt::New()),newConnI(DataArrayInt::New());
+  const mcIdType *conn(_nodal_connec->begin()),*connI(_nodal_connec_index->begin());
+  MCAuto<DataArrayIdType> newConn(DataArrayIdType::New()),newConnI(DataArrayIdType::New());
   newConnI->alloc(nbOf3DCells+1,1);
-  int *newConnIPtr(newConnI->getPointer());
+  mcIdType *newConnIPtr(newConnI->getPointer());
   *newConnIPtr++=0;
-  std::vector<int> newc;
-  for(int j=0;j<nbOf2DCells;j++)
+  std::vector<mcIdType> newc;
+  for(mcIdType j=0;j<nbOf2DCells;j++)
     {
       AppendExtrudedCell(conn+connI[j],conn+connI[j+1],nbOfNodesOf1Lev,isQuad,newc);
-      *newConnIPtr++=(int)newc.size();
+      *newConnIPtr++=ToIdType(newc.size());
     }
-  newConn->alloc((int)(newc.size())*nbOf1DCells,1);
-  int *newConnPtr(newConn->getPointer());
-  int deltaPerLev(isQuad?2*nbOfNodesOf1Lev:nbOfNodesOf1Lev);
+  newConn->alloc(newc.size()*nbOf1DCells,1);
+  mcIdType *newConnPtr(newConn->getPointer());
+  mcIdType deltaPerLev(isQuad?2*nbOfNodesOf1Lev:nbOfNodesOf1Lev);
   newConnIPtr=newConnI->getPointer();
-  for(int iz=0;iz<nbOf1DCells;iz++)
+  for(mcIdType iz=0;iz<nbOf1DCells;iz++)
     {
       if(iz!=0)
-        std::transform(newConnIPtr+1,newConnIPtr+1+nbOf2DCells,newConnIPtr+1+iz*nbOf2DCells,std::bind2nd(std::plus<int>(),newConnIPtr[iz*nbOf2DCells]));
-      const int *posOfTypeOfCell(newConnIPtr);
-      for(std::vector<int>::const_iterator iter=newc.begin();iter!=newc.end();iter++,newConnPtr++)
+        std::transform(newConnIPtr+1,newConnIPtr+1+nbOf2DCells,newConnIPtr+1+iz*nbOf2DCells,std::bind2nd(std::plus<mcIdType>(),newConnIPtr[iz*nbOf2DCells]));
+      const mcIdType *posOfTypeOfCell(newConnIPtr);
+      for(std::vector<mcIdType>::const_iterator iter=newc.begin();iter!=newc.end();iter++,newConnPtr++)
         {
-          int icell((int)(iter-newc.begin()));//std::distance unfortunately cannot been called here in C++98
+          mcIdType icell(ToIdType(iter-newc.begin()));//std::distance unfortunately cannot been called here in C++98
           if(icell!=*posOfTypeOfCell)
             {
               if(*iter!=-1)
@@ -834,13 +834,13 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMeshFromThisLowLev(int nbOfNode
  * If in 'candidates' pool -1 value is considered as an empty value.
  * WARNING this method returns only ONE set of result !
  */
-bool MEDCouplingUMesh::AreCellsEqualInPool(const std::vector<int>& candidates, int compType, const int *conn, const int *connI, DataArrayInt *result)
+bool MEDCouplingUMesh::AreCellsEqualInPool(const std::vector<mcIdType>& candidates, int compType, const mcIdType *conn, const mcIdType *connI, DataArrayIdType *result)
 {
   if(candidates.size()<1)
     return false;
   bool ret=false;
-  std::vector<int>::const_iterator iter=candidates.begin();
-  int start=(*iter++);
+  std::vector<mcIdType>::const_iterator iter=candidates.begin();
+  mcIdType start=(*iter++);
   for(;iter!=candidates.end();iter++)
     {
       int status=AreCellsEqual(conn,connI,start,*iter,compType);
@@ -865,20 +865,20 @@ bool MEDCouplingUMesh::AreCellsEqualInPool(const std::vector<int>& candidates, i
  * Keeps from \a this only cells which constituing point id are in the ids specified by [ \a begin,\a end ).
  * The return newly allocated mesh will share the same coordinates as \a this.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoords(const int *begin, const int *end) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const
 {
   checkConnectivityFullyDefined();
-  int ncell=getNumberOfCells();
+  mcIdType ncell=getNumberOfCells();
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New();
   ret->_mesh_dim=_mesh_dim;
   ret->setCoords(_coords);
   std::size_t nbOfElemsRet=std::distance(begin,end);
-  int *connIndexRet=(int *)malloc((nbOfElemsRet+1)*sizeof(int));
+  mcIdType *connIndexRet=(mcIdType *)malloc((nbOfElemsRet+1)*sizeof(mcIdType));
   connIndexRet[0]=0;
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connIndex=_nodal_connec_index->getConstPointer();
-  int newNbring=0;
-  for(const int *work=begin;work!=end;work++,newNbring++)
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connIndex=_nodal_connec_index->getConstPointer();
+  mcIdType newNbring=0;
+  for(const mcIdType *work=begin;work!=end;work++,newNbring++)
     {
       if(*work>=0 && *work<ncell)
         connIndexRet[newNbring+1]=connIndexRet[newNbring]+connIndex[*work+1]-connIndex[*work];
@@ -889,18 +889,18 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoords(const int *begin
           throw INTERP_KERNEL::Exception(oss.str());
         }
     }
-  int *connRet=(int *)malloc(connIndexRet[nbOfElemsRet]*sizeof(int));
-  int *connRetWork=connRet;
+  mcIdType *connRet=(mcIdType *)malloc(connIndexRet[nbOfElemsRet]*sizeof(mcIdType));
+  mcIdType *connRetWork=connRet;
   std::set<INTERP_KERNEL::NormalizedCellType> types;
-  for(const int *work=begin;work!=end;work++)
+  for(const mcIdType *work=begin;work!=end;work++)
     {
       types.insert((INTERP_KERNEL::NormalizedCellType)conn[connIndex[*work]]);
       connRetWork=std::copy(conn+connIndex[*work],conn+connIndex[*work+1],connRetWork);
     }
-  MCAuto<DataArrayInt> connRetArr=DataArrayInt::New();
+  MCAuto<DataArrayIdType> connRetArr=DataArrayIdType::New();
   connRetArr->useArray(connRet,true,DeallocType::C_DEALLOC,connIndexRet[nbOfElemsRet],1);
-  MCAuto<DataArrayInt> connIndexRetArr=DataArrayInt::New();
-  connIndexRetArr->useArray(connIndexRet,true,DeallocType::C_DEALLOC,(int)nbOfElemsRet+1,1);
+  MCAuto<DataArrayIdType> connIndexRetArr=DataArrayIdType::New();
+  connIndexRetArr->useArray(connIndexRet,true,DeallocType::C_DEALLOC,nbOfElemsRet+1,1);
   ret->setConnectivity(connRetArr,connIndexRetArr,false);
   ret->_types=types;
   ret->copyTinyInfoFrom(this);
@@ -911,20 +911,20 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoords(const int *begin
  * This is the low algorithm of MEDCouplingUMesh::buildPartOfMySelfSlice.
  * CellIds are given using range specified by a start an end and step.
  */
-MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const
 {
   checkFullyDefined();
-  int ncell=getNumberOfCells();
+  mcIdType ncell=getNumberOfCells();
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New();
   ret->_mesh_dim=_mesh_dim;
   ret->setCoords(_coords);
-  int newNbOfCells=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCouplingUMesh::buildPartOfMySelfKeepCoordsSlice : ");
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New(); newConnI->alloc(newNbOfCells+1,1);
-  int *newConnIPtr=newConnI->getPointer(); *newConnIPtr=0;
-  int work=start;
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connIndex=_nodal_connec_index->getConstPointer();
-  for(int i=0;i<newNbOfCells;i++,newConnIPtr++,work+=step)
+  mcIdType newNbOfCells=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCouplingUMesh::buildPartOfMySelfKeepCoordsSlice : ");
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New(); newConnI->alloc(newNbOfCells+1,1);
+  mcIdType *newConnIPtr=newConnI->getPointer(); *newConnIPtr=0;
+  mcIdType work=start;
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connIndex=_nodal_connec_index->getConstPointer();
+  for(mcIdType i=0;i<newNbOfCells;i++,newConnIPtr++,work+=step)
     {
       if(work>=0 && work<ncell)
         {
@@ -936,11 +936,11 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoordsSlice(int start,
           throw INTERP_KERNEL::Exception(oss.str());
         }
     }
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(newConnIPtr[0],1);
-  int *newConnPtr=newConn->getPointer();
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(newConnIPtr[0],1);
+  mcIdType *newConnPtr=newConn->getPointer();
   std::set<INTERP_KERNEL::NormalizedCellType> types;
   work=start;
-  for(int i=0;i<newNbOfCells;i++,newConnIPtr++,work+=step)
+  for(mcIdType i=0;i<newNbOfCells;i++,newConnIPtr++,work+=step)
     {
       types.insert((INTERP_KERNEL::NormalizedCellType)conn[connIndex[work]]);
       newConnPtr=std::copy(conn+connIndex[work],conn+connIndex[work+1],newConnPtr);
@@ -952,12 +952,12 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoordsSlice(int start,
 }
 
 
-int MEDCouplingFastNbrer(int id, unsigned nb, const INTERP_KERNEL::CellModel& cm, bool compute, const int *conn1, const int *conn2)
+mcIdType MEDCouplingFastNbrer(mcIdType id, mcIdType nb, const INTERP_KERNEL::CellModel& cm, bool compute, const mcIdType *conn1, const mcIdType *conn2)
 {
   return id;
 }
 
-int MEDCouplingOrientationSensitiveNbrer(int id, unsigned nb, const INTERP_KERNEL::CellModel& cm, bool compute, const int *conn1, const int *conn2)
+mcIdType MEDCouplingOrientationSensitiveNbrer(mcIdType id, mcIdType nb, const INTERP_KERNEL::CellModel& cm, bool compute, const mcIdType *conn1, const mcIdType *conn2)
 {
   if(!compute)
     return id+1;
@@ -973,27 +973,27 @@ int MEDCouplingOrientationSensitiveNbrer(int id, unsigned nb, const INTERP_KERNE
 
 /*!
  * Implements \a conversionType 0 for meshes with meshDim = 1, of MEDCouplingUMesh::convertLinearCellsToQuadratic method.
- * \return a newly created DataArrayInt instance that the caller should deal with containing cell ids of converted cells.
+ * \return a newly created DataArrayIdType instance that the caller should deal with containing cell ids of converted cells.
  * \sa MEDCouplingUMesh::convertLinearCellsToQuadratic.
  */
-DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic1D0(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
+DataArrayIdType *MEDCouplingUMesh::convertLinearCellsToQuadratic1D0(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
 {
   MCAuto<DataArrayDouble> bary=computeCellCenterOfMass();
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(0,1);
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(0,1);
-  int nbOfCells=getNumberOfCells();
-  int nbOfNodes=getNumberOfNodes();
-  const int *cPtr=_nodal_connec->begin();
-  const int *icPtr=_nodal_connec_index->begin();
-  int lastVal=0,offset=nbOfNodes;
-  for(int i=0;i<nbOfCells;i++,icPtr++)
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(0,1);
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(0,1);
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType nbOfNodes=getNumberOfNodes();
+  const mcIdType *cPtr=_nodal_connec->begin();
+  const mcIdType *icPtr=_nodal_connec_index->begin();
+  mcIdType lastVal=0,offset=nbOfNodes;
+  for(mcIdType i=0;i<nbOfCells;i++,icPtr++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)cPtr[*icPtr];
       if(type==INTERP_KERNEL::NORM_SEG2)
         {
           types.insert(INTERP_KERNEL::NORM_SEG3);
-          newConn->pushBackSilent((int)INTERP_KERNEL::NORM_SEG3);
+          newConn->pushBackSilent(ToIdType(INTERP_KERNEL::NORM_SEG3));
           newConn->pushBackValsSilent(cPtr+icPtr[0]+1,cPtr+icPtr[0]+3);
           newConn->pushBackSilent(offset++);
           lastVal+=4;
@@ -1013,26 +1013,26 @@ DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic1D0(DataArrayInt *&
   return ret.retn();
 }
 
-DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic2DAnd3D0(const MEDCouplingUMesh *m1D, const DataArrayInt *desc, const DataArrayInt *descI, DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
+DataArrayIdType *MEDCouplingUMesh::convertLinearCellsToQuadratic2DAnd3D0(const MEDCouplingUMesh *m1D, const DataArrayIdType *desc, const DataArrayIdType *descI, DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
 {
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(0,1);
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(0,1);
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(0,1);
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(0,1);
   //
-  const int *descPtr(desc->begin()),*descIPtr(descI->begin());
-  DataArrayInt *conn1D=0,*conn1DI=0;
+  const mcIdType *descPtr(desc->begin()),*descIPtr(descI->begin());
+  DataArrayIdType *conn1D=0,*conn1DI=0;
   std::set<INTERP_KERNEL::NormalizedCellType> types1D;
   DataArrayDouble *coordsTmp=0;
-  MCAuto<DataArrayInt> ret1D=m1D->convertLinearCellsToQuadratic1D0(conn1D,conn1DI,coordsTmp,types1D); ret1D=0;
+  MCAuto<DataArrayIdType> ret1D=m1D->convertLinearCellsToQuadratic1D0(conn1D,conn1DI,coordsTmp,types1D); ret1D=0;
   MCAuto<DataArrayDouble> coordsTmpSafe(coordsTmp);
-  MCAuto<DataArrayInt> conn1DSafe(conn1D),conn1DISafe(conn1DI);
-  const int *c1DPtr=conn1D->begin();
-  const int *c1DIPtr=conn1DI->begin();
-  int nbOfCells=getNumberOfCells();
-  const int *cPtr=_nodal_connec->begin();
-  const int *icPtr=_nodal_connec_index->begin();
-  int lastVal=0;
-  for(int i=0;i<nbOfCells;i++,icPtr++,descIPtr++)
+  MCAuto<DataArrayIdType> conn1DSafe(conn1D),conn1DISafe(conn1DI);
+  const mcIdType *c1DPtr=conn1D->begin();
+  const mcIdType *c1DIPtr=conn1DI->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *cPtr=_nodal_connec->begin();
+  const mcIdType *icPtr=_nodal_connec_index->begin();
+  mcIdType lastVal=0;
+  for(mcIdType i=0;i<nbOfCells;i++,icPtr++,descIPtr++)
     {
       INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType)cPtr[*icPtr];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
@@ -1041,7 +1041,7 @@ DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic2DAnd3D0(const MEDC
           INTERP_KERNEL::NormalizedCellType typ2=cm.getQuadraticType();
           types.insert(typ2); newConn->pushBackSilent(typ2);
           newConn->pushBackValsSilent(cPtr+icPtr[0]+1,cPtr+icPtr[1]);
-          for(const int *d=descPtr+descIPtr[0];d!=descPtr+descIPtr[1];d++)
+          for(const mcIdType *d=descPtr+descIPtr[0];d!=descPtr+descIPtr[1];d++)
             newConn->pushBackSilent(c1DPtr[c1DIPtr[*d]+3]);
           lastVal+=(icPtr[1]-icPtr[0])+(descIPtr[1]-descIPtr[0]);
           newConnI->pushBackSilent(lastVal);
@@ -1061,40 +1061,41 @@ DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic2DAnd3D0(const MEDC
 
 /*!
  * Implements \a conversionType 0 for meshes with meshDim = 2, of MEDCouplingUMesh::convertLinearCellsToQuadratic method.
- * \return a newly created DataArrayInt instance that the caller should deal with containing cell ids of converted cells.
+ * \return a newly created DataArrayIdType instance that the caller should deal with containing cell ids of converted cells.
  * \sa MEDCouplingUMesh::convertLinearCellsToQuadratic.
  */
-DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic2D0(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
+DataArrayIdType *MEDCouplingUMesh::convertLinearCellsToQuadratic2D0(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
 {
-  MCAuto<DataArrayInt> desc(DataArrayInt::New()),descI(DataArrayInt::New()),tmp2(DataArrayInt::New()),tmp3(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc(DataArrayIdType::New()),descI(DataArrayIdType::New()),tmp2(DataArrayIdType::New()),tmp3(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> m1D=buildDescendingConnectivity(desc,descI,tmp2,tmp3); tmp2=0; tmp3=0;
   return convertLinearCellsToQuadratic2DAnd3D0(m1D,desc,descI,conn,connI,coords,types);
 }
 
-DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic2D1(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
+DataArrayIdType *MEDCouplingUMesh::convertLinearCellsToQuadratic2D1(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
 {
-  MCAuto<DataArrayInt> desc(DataArrayInt::New()),descI(DataArrayInt::New()),tmp2(DataArrayInt::New()),tmp3(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc(DataArrayIdType::New()),descI(DataArrayIdType::New()),tmp2(DataArrayIdType::New()),tmp3(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> m1D=buildDescendingConnectivity(desc,descI,tmp2,tmp3); tmp2=0; tmp3=0;
   //
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(0,1);
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(0,1);
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(0,1);
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(0,1);
   //
   MCAuto<DataArrayDouble> bary=computeCellCenterOfMass();
-  const int *descPtr(desc->begin()),*descIPtr(descI->begin());
-  DataArrayInt *conn1D=0,*conn1DI=0;
+  const mcIdType *descPtr(desc->begin()),*descIPtr(descI->begin());
+  DataArrayIdType *conn1D=0,*conn1DI=0;
   std::set<INTERP_KERNEL::NormalizedCellType> types1D;
   DataArrayDouble *coordsTmp=0;
-  MCAuto<DataArrayInt> ret1D=m1D->convertLinearCellsToQuadratic1D0(conn1D,conn1DI,coordsTmp,types1D); ret1D=0;
+  MCAuto<DataArrayIdType> ret1D=m1D->convertLinearCellsToQuadratic1D0(conn1D,conn1DI,coordsTmp,types1D); ret1D=0;
   MCAuto<DataArrayDouble> coordsTmpSafe(coordsTmp);
-  MCAuto<DataArrayInt> conn1DSafe(conn1D),conn1DISafe(conn1DI);
-  const int *c1DPtr=conn1D->begin();
-  const int *c1DIPtr=conn1DI->begin();
-  int nbOfCells=getNumberOfCells();
-  const int *cPtr=_nodal_connec->begin();
-  const int *icPtr=_nodal_connec_index->begin();
-  int lastVal=0,offset=coordsTmpSafe->getNumberOfTuples();
-  for(int i=0;i<nbOfCells;i++,icPtr++,descIPtr++)
+  MCAuto<DataArrayIdType> conn1DSafe(conn1D),conn1DISafe(conn1DI);
+  const mcIdType *c1DPtr=conn1D->begin();
+  const mcIdType *c1DIPtr=conn1DI->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *cPtr=_nodal_connec->begin();
+  const mcIdType *icPtr=_nodal_connec_index->begin();
+  mcIdType lastVal=0;
+  mcIdType offset=coordsTmpSafe->getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfCells;i++,icPtr++,descIPtr++)
     {
       INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType)cPtr[*icPtr];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
@@ -1103,7 +1104,7 @@ DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic2D1(DataArrayInt *&
           INTERP_KERNEL::NormalizedCellType typ2=cm.getQuadraticType2();
           types.insert(typ2); newConn->pushBackSilent(typ2);
           newConn->pushBackValsSilent(cPtr+icPtr[0]+1,cPtr+icPtr[1]);
-          for(const int *d=descPtr+descIPtr[0];d!=descPtr+descIPtr[1];d++)
+          for(const mcIdType *d=descPtr+descIPtr[0];d!=descPtr+descIPtr[1];d++)
             newConn->pushBackSilent(c1DPtr[c1DIPtr[*d]+3]);
           newConn->pushBackSilent(offset+ret->getNumberOfTuples());
           lastVal+=(icPtr[1]-icPtr[0])+(descIPtr[1]-descIPtr[0])+1;
@@ -1125,44 +1126,45 @@ DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic2D1(DataArrayInt *&
 
 /*!
  * Implements \a conversionType 0 for meshes with meshDim = 3, of MEDCouplingUMesh::convertLinearCellsToQuadratic method.
- * \return a newly created DataArrayInt instance that the caller should deal with containing cell ids of converted cells.
+ * \return a newly created DataArrayIdType instance that the caller should deal with containing cell ids of converted cells.
  * \sa MEDCouplingUMesh::convertLinearCellsToQuadratic.
  */
-DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic3D0(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
+DataArrayIdType *MEDCouplingUMesh::convertLinearCellsToQuadratic3D0(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
 {
-  MCAuto<DataArrayInt> desc(DataArrayInt::New()),descI(DataArrayInt::New()),tmp2(DataArrayInt::New()),tmp3(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc(DataArrayIdType::New()),descI(DataArrayIdType::New()),tmp2(DataArrayIdType::New()),tmp3(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> m1D=explode3DMeshTo1D(desc,descI,tmp2,tmp3); tmp2=0; tmp3=0;
   return convertLinearCellsToQuadratic2DAnd3D0(m1D,desc,descI,conn,connI,coords,types);
 }
 
-DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic3D1(DataArrayInt *&conn, DataArrayInt *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
+DataArrayIdType *MEDCouplingUMesh::convertLinearCellsToQuadratic3D1(DataArrayIdType *&conn, DataArrayIdType *&connI, DataArrayDouble *& coords, std::set<INTERP_KERNEL::NormalizedCellType>& types) const
 {
-  MCAuto<DataArrayInt> desc2(DataArrayInt::New()),desc2I(DataArrayInt::New()),tmp2(DataArrayInt::New()),tmp3(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc2(DataArrayIdType::New()),desc2I(DataArrayIdType::New()),tmp2(DataArrayIdType::New()),tmp3(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> m2D=buildDescendingConnectivityGen<MinusOneSonsGeneratorBiQuadratic>(desc2,desc2I,tmp2,tmp3,MEDCouplingFastNbrer); tmp2=0; tmp3=0;
-  MCAuto<DataArrayInt> desc1(DataArrayInt::New()),desc1I(DataArrayInt::New()),tmp4(DataArrayInt::New()),tmp5(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc1(DataArrayIdType::New()),desc1I(DataArrayIdType::New()),tmp4(DataArrayIdType::New()),tmp5(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> m1D=explode3DMeshTo1D(desc1,desc1I,tmp4,tmp5); tmp4=0; tmp5=0;
   //
-  MCAuto<DataArrayInt> newConn=DataArrayInt::New(); newConn->alloc(0,1);
-  MCAuto<DataArrayInt> newConnI=DataArrayInt::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(),ret2=DataArrayInt::New(); ret->alloc(0,1); ret2->alloc(0,1);
+  MCAuto<DataArrayIdType> newConn=DataArrayIdType::New(); newConn->alloc(0,1);
+  MCAuto<DataArrayIdType> newConnI=DataArrayIdType::New(); newConnI->alloc(1,1); newConnI->setIJ(0,0,0);
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(),ret2=DataArrayIdType::New(); ret->alloc(0,1); ret2->alloc(0,1);
   //
   MCAuto<DataArrayDouble> bary=computeCellCenterOfMass();
-  const int *descPtr(desc1->begin()),*descIPtr(desc1I->begin()),*desc2Ptr(desc2->begin()),*desc2IPtr(desc2I->begin());
-  DataArrayInt *conn1D=0,*conn1DI=0,*conn2D=0,*conn2DI=0;
+  const mcIdType *descPtr(desc1->begin()),*descIPtr(desc1I->begin()),*desc2Ptr(desc2->begin()),*desc2IPtr(desc2I->begin());
+  DataArrayIdType *conn1D=0,*conn1DI=0,*conn2D=0,*conn2DI=0;
   std::set<INTERP_KERNEL::NormalizedCellType> types1D,types2D;
   DataArrayDouble *coordsTmp=0,*coordsTmp2=0;
-  MCAuto<DataArrayInt> ret1D=m1D->convertLinearCellsToQuadratic1D0(conn1D,conn1DI,coordsTmp,types1D); ret1D=DataArrayInt::New(); ret1D->alloc(0,1);
-  MCAuto<DataArrayInt> conn1DSafe(conn1D),conn1DISafe(conn1DI);
+  MCAuto<DataArrayIdType> ret1D=m1D->convertLinearCellsToQuadratic1D0(conn1D,conn1DI,coordsTmp,types1D); ret1D=DataArrayIdType::New(); ret1D->alloc(0,1);
+  MCAuto<DataArrayIdType> conn1DSafe(conn1D),conn1DISafe(conn1DI);
   MCAuto<DataArrayDouble> coordsTmpSafe(coordsTmp);
-  MCAuto<DataArrayInt> ret2D=m2D->convertLinearCellsToQuadratic2D1(conn2D,conn2DI,coordsTmp2,types2D); ret2D=DataArrayInt::New(); ret2D->alloc(0,1);
+  MCAuto<DataArrayIdType> ret2D=m2D->convertLinearCellsToQuadratic2D1(conn2D,conn2DI,coordsTmp2,types2D); ret2D=DataArrayIdType::New(); ret2D->alloc(0,1);
   MCAuto<DataArrayDouble> coordsTmp2Safe(coordsTmp2);
-  MCAuto<DataArrayInt> conn2DSafe(conn2D),conn2DISafe(conn2DI);
-  const int *c1DPtr=conn1D->begin(),*c1DIPtr=conn1DI->begin(),*c2DPtr=conn2D->begin(),*c2DIPtr=conn2DI->begin();
-  int nbOfCells=getNumberOfCells();
-  const int *cPtr=_nodal_connec->begin();
-  const int *icPtr=_nodal_connec_index->begin();
-  int lastVal=0,offset=coordsTmpSafe->getNumberOfTuples();
-  for(int i=0;i<nbOfCells;i++,icPtr++,descIPtr++,desc2IPtr++)
+  MCAuto<DataArrayIdType> conn2DSafe(conn2D),conn2DISafe(conn2DI);
+  const mcIdType *c1DPtr=conn1D->begin(),*c1DIPtr=conn1DI->begin(),*c2DPtr=conn2D->begin(),*c2DIPtr=conn2DI->begin();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *cPtr=_nodal_connec->begin();
+  const mcIdType *icPtr=_nodal_connec_index->begin();
+  mcIdType lastVal=0;
+  mcIdType offset=coordsTmpSafe->getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfCells;i++,icPtr++,descIPtr++,desc2IPtr++)
     {
       INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType)cPtr[*icPtr];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
@@ -1176,12 +1178,12 @@ DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic3D1(DataArrayInt *&
             }
           types.insert(typ2); newConn->pushBackSilent(typ2);
           newConn->pushBackValsSilent(cPtr+icPtr[0]+1,cPtr+icPtr[1]);
-          for(const int *d=descPtr+descIPtr[0];d!=descPtr+descIPtr[1];d++)
+          for(const mcIdType *d=descPtr+descIPtr[0];d!=descPtr+descIPtr[1];d++)
             newConn->pushBackSilent(c1DPtr[c1DIPtr[*d]+3]);
-          for(const int *d=desc2Ptr+desc2IPtr[0];d!=desc2Ptr+desc2IPtr[1];d++)
+          for(const mcIdType *d=desc2Ptr+desc2IPtr[0];d!=desc2Ptr+desc2IPtr[1];d++)
             {
-              int nodeId2=c2DPtr[c2DIPtr[(*d)+1]-1];
-              int tmpPos=newConn->getNumberOfTuples();
+              mcIdType nodeId2=c2DPtr[c2DIPtr[(*d)+1]-1];
+              mcIdType tmpPos=newConn->getNumberOfTuples();
               newConn->pushBackSilent(nodeId2);
               ret2D->pushBackSilent(nodeId2); ret1D->pushBackSilent(tmpPos);
             }
@@ -1198,48 +1200,48 @@ DataArrayInt *MEDCouplingUMesh::convertLinearCellsToQuadratic3D1(DataArrayInt *&
           newConn->pushBackValsSilent(cPtr+icPtr[0],cPtr+icPtr[1]);
         }
     }
-  MCAuto<DataArrayInt> diffRet2D=ret2D->getDifferentValues();
-  MCAuto<DataArrayInt> o2nRet2D=diffRet2D->invertArrayN2O2O2N(coordsTmp2Safe->getNumberOfTuples());
+  MCAuto<DataArrayIdType> diffRet2D=ret2D->getDifferentValues();
+  MCAuto<DataArrayIdType> o2nRet2D=diffRet2D->invertArrayN2O2O2N(coordsTmp2Safe->getNumberOfTuples());
   coordsTmp2Safe=coordsTmp2Safe->selectByTupleId(diffRet2D->begin(),diffRet2D->end());
   MCAuto<DataArrayDouble> tmp=bary->selectByTupleIdSafe(ret->begin(),ret->end());
   std::vector<const DataArrayDouble *> v(3); v[0]=coordsTmpSafe; v[1]=coordsTmp2Safe; v[2]=tmp;
-  int *c=newConn->getPointer();
-  const int *cI(newConnI->begin());
-  for(const int *elt=ret1D->begin();elt!=ret1D->end();elt++)
+  mcIdType *c=newConn->getPointer();
+  const mcIdType *cI(newConnI->begin());
+  for(const mcIdType *elt=ret1D->begin();elt!=ret1D->end();elt++)
     c[*elt]=o2nRet2D->getIJ(c[*elt],0)+offset;
   offset=coordsTmp2Safe->getNumberOfTuples();
-  for(const int *elt=ret->begin();elt!=ret->end();elt++)
+  for(const mcIdType *elt=ret->begin();elt!=ret->end();elt++)
     c[cI[(*elt)+1]-1]+=offset;
   coords=DataArrayDouble::Aggregate(v); conn=newConn.retn(); connI=newConnI.retn();
   return ret.retn();
 }
 
-DataArrayInt *MEDCouplingUMesh::buildUnionOf2DMeshLinear(const MEDCouplingUMesh *skin, const DataArrayInt *n2o) const
+DataArrayIdType *MEDCouplingUMesh::buildUnionOf2DMeshLinear(const MEDCouplingUMesh *skin, const DataArrayIdType *n2o) const
 {
-  int nbOfNodesExpected(skin->getNumberOfNodes());
-  const int *n2oPtr(n2o->begin());
-  MCAuto<DataArrayInt> revNodal(DataArrayInt::New()),revNodalI(DataArrayInt::New());
+  mcIdType nbOfNodesExpected(skin->getNumberOfNodes());
+  const mcIdType *n2oPtr(n2o->begin());
+  MCAuto<DataArrayIdType> revNodal(DataArrayIdType::New()),revNodalI(DataArrayIdType::New());
   skin->getReverseNodalConnectivity(revNodal,revNodalI);
-  const int *revNodalPtr(revNodal->begin()),*revNodalIPtr(revNodalI->begin());
-  const int *nodalPtr(skin->getNodalConnectivity()->begin());
-  const int *nodalIPtr(skin->getNodalConnectivityIndex()->begin());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(nbOfNodesExpected+1,1);
-  int *work(ret->getPointer());  *work++=INTERP_KERNEL::NORM_POLYGON;
+  const mcIdType *revNodalPtr(revNodal->begin()),*revNodalIPtr(revNodalI->begin());
+  const mcIdType *nodalPtr(skin->getNodalConnectivity()->begin());
+  const mcIdType *nodalIPtr(skin->getNodalConnectivityIndex()->begin());
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(nbOfNodesExpected+1,1);
+  mcIdType *work(ret->getPointer());  *work++=INTERP_KERNEL::NORM_POLYGON;
   if(nbOfNodesExpected<1)
     return ret.retn();
-  int prevCell(0),prevNode(nodalPtr[nodalIPtr[0]+1]);
+  mcIdType prevCell(0),prevNode(nodalPtr[nodalIPtr[0]+1]);
   *work++=n2oPtr[prevNode];
-  for(int i=1;i<nbOfNodesExpected;i++)
+  for(mcIdType i=1;i<nbOfNodesExpected;i++)
     {
       if(nodalIPtr[prevCell+1]-nodalIPtr[prevCell]==3)
         {
-          std::set<int> conn(nodalPtr+nodalIPtr[prevCell]+1,nodalPtr+nodalIPtr[prevCell]+3);
+          std::set<mcIdType> conn(nodalPtr+nodalIPtr[prevCell]+1,nodalPtr+nodalIPtr[prevCell]+3);
           conn.erase(prevNode);
           if(conn.size()==1)
             {
-              int curNode(*(conn.begin()));
+              mcIdType curNode(*(conn.begin()));
               *work++=n2oPtr[curNode];
-              std::set<int> shar(revNodalPtr+revNodalIPtr[curNode],revNodalPtr+revNodalIPtr[curNode+1]);
+              std::set<mcIdType> shar(revNodalPtr+revNodalIPtr[curNode],revNodalPtr+revNodalIPtr[curNode+1]);
               shar.erase(prevCell);
               if(shar.size()==1)
                 {
@@ -1258,37 +1260,37 @@ DataArrayInt *MEDCouplingUMesh::buildUnionOf2DMeshLinear(const MEDCouplingUMesh
   return ret.retn();
 }
 
-DataArrayInt *MEDCouplingUMesh::buildUnionOf2DMeshQuadratic(const MEDCouplingUMesh *skin, const DataArrayInt *n2o) const
+DataArrayIdType *MEDCouplingUMesh::buildUnionOf2DMeshQuadratic(const MEDCouplingUMesh *skin, const DataArrayIdType *n2o) const
 {
-  int nbOfNodesExpected(skin->getNumberOfNodes());
-  int nbOfTurn(nbOfNodesExpected/2);
-  const int *n2oPtr(n2o->begin());
-  MCAuto<DataArrayInt> revNodal(DataArrayInt::New()),revNodalI(DataArrayInt::New());
+  mcIdType nbOfNodesExpected(skin->getNumberOfNodes());
+  mcIdType nbOfTurn(nbOfNodesExpected/2);
+  const mcIdType *n2oPtr(n2o->begin());
+  MCAuto<DataArrayIdType> revNodal(DataArrayIdType::New()),revNodalI(DataArrayIdType::New());
   skin->getReverseNodalConnectivity(revNodal,revNodalI);
-  const int *revNodalPtr(revNodal->begin()),*revNodalIPtr(revNodalI->begin());
-  const int *nodalPtr(skin->getNodalConnectivity()->begin());
-  const int *nodalIPtr(skin->getNodalConnectivityIndex()->begin());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(nbOfNodesExpected+1,1);
-  int *work(ret->getPointer());  *work++=INTERP_KERNEL::NORM_QPOLYG;
+  const mcIdType *revNodalPtr(revNodal->begin()),*revNodalIPtr(revNodalI->begin());
+  const mcIdType *nodalPtr(skin->getNodalConnectivity()->begin());
+  const mcIdType *nodalIPtr(skin->getNodalConnectivityIndex()->begin());
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(nbOfNodesExpected+1,1);
+  mcIdType *work(ret->getPointer());  *work++=INTERP_KERNEL::NORM_QPOLYG;
   if(nbOfNodesExpected<1)
     return ret.retn();
-  int prevCell(0),prevNode(nodalPtr[nodalIPtr[0]+1]);
+  mcIdType prevCell(0),prevNode(nodalPtr[nodalIPtr[0]+1]);
   *work=n2oPtr[prevNode]; work[nbOfTurn]=n2oPtr[nodalPtr[nodalIPtr[0]+3]]; work++;
-  for(int i=1;i<nbOfTurn;i++)
+  for(mcIdType i=1;i<nbOfTurn;i++)
     {
       if(nodalIPtr[prevCell+1]-nodalIPtr[prevCell]==4)
         {
-          std::set<int> conn(nodalPtr+nodalIPtr[prevCell]+1,nodalPtr+nodalIPtr[prevCell]+3);
+          std::set<mcIdType> conn(nodalPtr+nodalIPtr[prevCell]+1,nodalPtr+nodalIPtr[prevCell]+3);
           conn.erase(prevNode);
           if(conn.size()==1)
             {
-              int curNode(*(conn.begin()));
+              mcIdType curNode(*(conn.begin()));
               *work=n2oPtr[curNode];
-              std::set<int> shar(revNodalPtr+revNodalIPtr[curNode],revNodalPtr+revNodalIPtr[curNode+1]);
+              std::set<mcIdType> shar(revNodalPtr+revNodalIPtr[curNode],revNodalPtr+revNodalIPtr[curNode+1]);
               shar.erase(prevCell);
               if(shar.size()==1)
                 {
-                  int curCell(*(shar.begin()));
+                  mcIdType curCell(*(shar.begin()));
                   work[nbOfTurn]=n2oPtr[nodalPtr[nodalIPtr[curCell]+3]];
                   prevCell=curCell;
                   prevNode=curNode;
@@ -1312,13 +1314,13 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesLL(const std::vector<const MEDCo
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::MergeUMeshes : input array must be NON EMPTY !");
   std::vector<const MEDCouplingUMesh *>::const_iterator it=a.begin();
   int meshDim=(*it)->getMeshDimension();
-  int nbOfCells=(*it)->getNumberOfCells();
-  int meshLgth=(*it++)->getNodalConnectivityArrayLen();
+  mcIdType nbOfCells=ToIdType((*it)->getNumberOfCells());
+  mcIdType meshLgth=(*it++)->getNodalConnectivityArrayLen();
   for(;it!=a.end();it++)
     {
       if(meshDim!=(*it)->getMeshDimension())
         throw INTERP_KERNEL::Exception("Mesh dimensions mismatches, MergeUMeshes impossible !");
-      nbOfCells+=(*it)->getNumberOfCells();
+      nbOfCells+=ToIdType((*it)->getNumberOfCells());
       meshLgth+=(*it)->getNodalConnectivityArrayLen();
     }
   std::vector<const MEDCouplingPointSet *> aps(a.size());
@@ -1326,24 +1328,24 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesLL(const std::vector<const MEDCo
   MCAuto<DataArrayDouble> pts=MergeNodesArray(aps);
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New("merge",meshDim);
   ret->setCoords(pts);
-  MCAuto<DataArrayInt> c=DataArrayInt::New();
+  MCAuto<DataArrayIdType> c=DataArrayIdType::New();
   c->alloc(meshLgth,1);
-  int *cPtr=c->getPointer();
-  MCAuto<DataArrayInt> cI=DataArrayInt::New();
+  mcIdType *cPtr=c->getPointer();
+  MCAuto<DataArrayIdType> cI=DataArrayIdType::New();
   cI->alloc(nbOfCells+1,1);
-  int *cIPtr=cI->getPointer();
+  mcIdType *cIPtr=cI->getPointer();
   *cIPtr++=0;
-  int offset=0;
-  int offset2=0;
+  mcIdType offset=0;
+  mcIdType offset2=0;
   for(it=a.begin();it!=a.end();it++)
     {
-      int curNbOfCell=(*it)->getNumberOfCells();
-      const int *curCI=(*it)->_nodal_connec_index->begin();
-      const int *curC=(*it)->_nodal_connec->begin();
-      cIPtr=std::transform(curCI+1,curCI+curNbOfCell+1,cIPtr,std::bind2nd(std::plus<int>(),offset));
-      for(int j=0;j<curNbOfCell;j++)
+      mcIdType curNbOfCell=ToIdType((*it)->getNumberOfCells());
+      const mcIdType *curCI=(*it)->_nodal_connec_index->begin();
+      const mcIdType *curC=(*it)->_nodal_connec->begin();
+      cIPtr=std::transform(curCI+1,curCI+curNbOfCell+1,cIPtr,std::bind2nd(std::plus<mcIdType>(),offset));
+      for(mcIdType j=0;j<curNbOfCell;j++)
         {
-          const int *src=curC+curCI[j];
+          const mcIdType *src=curC+curCI[j];
           *cPtr++=*src++;
           for(;src!=curC+curCI[j+1];src++,cPtr++)
             {
@@ -1372,11 +1374,11 @@ MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesLL(const std::vector<const MEDCo
  * \param [out] cellId that corresponds to minimal distance. If the closer node is not linked to any cell in \a this -1 is returned.
  * \sa MEDCouplingUMesh::distanceToPoint, MEDCouplingUMesh::distanceToPoints
  */
-void MEDCouplingUMesh::DistanceToPoint3DSurfAlg(const double *pt, const int *cellIdsBg, const int *cellIdsEnd, const double *coords, const int *nc, const int *ncI, double& ret0, int& cellId)
+void MEDCouplingUMesh::DistanceToPoint3DSurfAlg(const double *pt, const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const double *coords, const mcIdType *nc, const mcIdType *ncI, double& ret0, mcIdType& cellId)
 {
   cellId=-1;
   ret0=std::numeric_limits<double>::max();
-  for(const int *zeCell=cellIdsBg;zeCell!=cellIdsEnd;zeCell++)
+  for(const mcIdType *zeCell=cellIdsBg;zeCell!=cellIdsEnd;zeCell++)
     {
       switch((INTERP_KERNEL::NormalizedCellType)nc[ncI[*zeCell]])
       {
@@ -1411,11 +1413,11 @@ void MEDCouplingUMesh::DistanceToPoint3DSurfAlg(const double *pt, const int *cel
  * \param [out] cellId that corresponds to minimal distance. If the closer node is not linked to any cell in \a this -1 is returned.
  * \sa MEDCouplingUMesh::distanceToPoint, MEDCouplingUMesh::distanceToPoints
  */
-void MEDCouplingUMesh::DistanceToPoint2DCurveAlg(const double *pt, const int *cellIdsBg, const int *cellIdsEnd, const double *coords, const int *nc, const int *ncI, double& ret0, int& cellId)
+void MEDCouplingUMesh::DistanceToPoint2DCurveAlg(const double *pt, const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const double *coords, const mcIdType *nc, const mcIdType *ncI, double& ret0, mcIdType& cellId)
 {
   cellId=-1;
   ret0=std::numeric_limits<double>::max();
-  for(const int *zeCell=cellIdsBg;zeCell!=cellIdsEnd;zeCell++)
+  for(const mcIdType *zeCell=cellIdsBg;zeCell!=cellIdsEnd;zeCell++)
     {
       switch((INTERP_KERNEL::NormalizedCellType)nc[ncI[*zeCell]])
       {
@@ -1433,42 +1435,42 @@ void MEDCouplingUMesh::DistanceToPoint2DCurveAlg(const double *pt, const int *ce
       }
     }
 }
-DataArrayInt *MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeedAlg(std::vector<bool>& fetched, const int *seedBg, const int *seedEnd, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn, int nbOfDepthPeeling, int& nbOfDepthPeelingPerformed)
+DataArrayIdType *MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeedAlg(std::vector<bool>& fetched, const mcIdType *seedBg, const mcIdType *seedEnd, const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn, mcIdType nbOfDepthPeeling, mcIdType& nbOfDepthPeelingPerformed)
 {
   nbOfDepthPeelingPerformed=0;
   if(!seedBg || !seedEnd || !arrIn || !arrIndxIn)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeedAlg : some input pointer is NULL !");
-  int nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
+  mcIdType nbOfTuples=arrIndxIn->getNumberOfTuples()-1;
   std::vector<bool> fetched2(nbOfTuples,false);
   int i=0;
-  for(const int *seedElt=seedBg;seedElt!=seedEnd;seedElt++,i++)
+  for(const mcIdType *seedElt=seedBg;seedElt!=seedEnd;seedElt++,i++)
     {
       if(*seedElt>=0 && *seedElt<nbOfTuples)
         { fetched[*seedElt]=true; fetched2[*seedElt]=true; }
       else
         { std::ostringstream oss; oss << "MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeedAlg : At pos #" << i << " of seeds value is " << *seedElt << "! Should be in [0," << nbOfTuples << ") !"; throw INTERP_KERNEL::Exception(oss.str()); }
     }
-  const int *arrInPtr=arrIn->begin();
-  const int *arrIndxPtr=arrIndxIn->begin();
-  int targetNbOfDepthPeeling=nbOfDepthPeeling!=-1?nbOfDepthPeeling:std::numeric_limits<int>::max();
-  std::vector<int> idsToFetch1(seedBg,seedEnd);
-  std::vector<int> idsToFetch2;
-  std::vector<int> *idsToFetch=&idsToFetch1;
-  std::vector<int> *idsToFetchOther=&idsToFetch2;
+  const mcIdType *arrInPtr=arrIn->begin();
+  const mcIdType *arrIndxPtr=arrIndxIn->begin();
+  mcIdType targetNbOfDepthPeeling=nbOfDepthPeeling!=-1?nbOfDepthPeeling:std::numeric_limits<mcIdType>::max();
+  std::vector<mcIdType> idsToFetch1(seedBg,seedEnd);
+  std::vector<mcIdType> idsToFetch2;
+  std::vector<mcIdType> *idsToFetch=&idsToFetch1;
+  std::vector<mcIdType> *idsToFetchOther=&idsToFetch2;
   while(!idsToFetch->empty() && nbOfDepthPeelingPerformed<targetNbOfDepthPeeling)
     {
-      for(std::vector<int>::const_iterator it=idsToFetch->begin();it!=idsToFetch->end();it++)
-        for(const int *it2=arrInPtr+arrIndxPtr[*it];it2!=arrInPtr+arrIndxPtr[*it+1];it2++)
+      for(std::vector<mcIdType>::const_iterator it=idsToFetch->begin();it!=idsToFetch->end();it++)
+        for(const mcIdType *it2=arrInPtr+arrIndxPtr[*it];it2!=arrInPtr+arrIndxPtr[*it+1];it2++)
           if(!fetched[*it2])
             { fetched[*it2]=true; fetched2[*it2]=true; idsToFetchOther->push_back(*it2); }
       std::swap(idsToFetch,idsToFetchOther);
       idsToFetchOther->clear();
       nbOfDepthPeelingPerformed++;
     }
-  int lgth=(int)std::count(fetched2.begin(),fetched2.end(),true);
+  mcIdType lgth=ToIdType(std::count(fetched2.begin(),fetched2.end(),true));
   i=0;
-  MCAuto<DataArrayInt> ret=DataArrayInt::New(); ret->alloc(lgth,1);
-  int *retPtr=ret->getPointer();
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New(); ret->alloc(lgth,1);
+  mcIdType *retPtr=ret->getPointer();
   for(std::vector<bool>::const_iterator it=fetched2.begin();it!=fetched2.end();it++,i++)
     if(*it)
       *retPtr++=i;
@@ -1479,7 +1481,7 @@ DataArrayInt *MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeedAlg(std::vecto
  * This method put in zip format into parameter 'zipFrmt' in full interlace mode.
  * This format is often asked by INTERP_KERNEL algorithms to avoid many indirections into coordinates array.
  */
-void MEDCouplingUMesh::FillInCompact3DMode(int spaceDim, int nbOfNodesInCell, const int *conn, const double *coo, double *zipFrmt)
+void MEDCouplingUMesh::FillInCompact3DMode(int spaceDim, mcIdType nbOfNodesInCell, const mcIdType *conn, const double *coo, double *zipFrmt)
 {
   double *w=zipFrmt;
   if(spaceDim==3)
@@ -1503,12 +1505,12 @@ void MEDCouplingUMesh::FillInCompact3DMode(int spaceDim, int nbOfNodesInCell, co
  * \param isQuad specifies the policy of connectivity.
  * @ret in/out parameter in which the result will be append
  */
-void MEDCouplingUMesh::AppendExtrudedCell(const int *connBg, const int *connEnd, int nbOfNodesPerLev, bool isQuad, std::vector<int>& ret)
+void MEDCouplingUMesh::AppendExtrudedCell(const mcIdType *connBg, const mcIdType *connEnd, mcIdType nbOfNodesPerLev, bool isQuad, std::vector<mcIdType>& ret)
 {
   INTERP_KERNEL::NormalizedCellType flatType=(INTERP_KERNEL::NormalizedCellType)connBg[0];
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(flatType);
   ret.push_back(cm.getExtrudedType());
-  int deltaz=isQuad?2*nbOfNodesPerLev:nbOfNodesPerLev;
+  mcIdType deltaz=isQuad?2*nbOfNodesPerLev:nbOfNodesPerLev;
   switch(flatType)
   {
     case INTERP_KERNEL::NORM_POINT1:
@@ -1519,38 +1521,38 @@ void MEDCouplingUMesh::AppendExtrudedCell(const int *connBg, const int *connEnd,
       }
     case INTERP_KERNEL::NORM_SEG2:
       {
-        int conn[4]={connBg[1],connBg[2],connBg[2]+deltaz,connBg[1]+deltaz};
+        mcIdType conn[4]={connBg[1],connBg[2],connBg[2]+deltaz,connBg[1]+deltaz};
         ret.insert(ret.end(),conn,conn+4);
         break;
       }
     case INTERP_KERNEL::NORM_SEG3:
       {
-        int conn[8]={connBg[1],connBg[3],connBg[3]+deltaz,connBg[1]+deltaz,connBg[2],connBg[3]+nbOfNodesPerLev,connBg[2]+deltaz,connBg[1]+nbOfNodesPerLev};
+        mcIdType conn[8]={connBg[1],connBg[3],connBg[3]+deltaz,connBg[1]+deltaz,connBg[2],connBg[3]+nbOfNodesPerLev,connBg[2]+deltaz,connBg[1]+nbOfNodesPerLev};
         ret.insert(ret.end(),conn,conn+8);
         break;
       }
     case INTERP_KERNEL::NORM_QUAD4:
       {
-        int conn[8]={connBg[1],connBg[2],connBg[3],connBg[4],connBg[1]+deltaz,connBg[2]+deltaz,connBg[3]+deltaz,connBg[4]+deltaz};
+        mcIdType conn[8]={connBg[1],connBg[2],connBg[3],connBg[4],connBg[1]+deltaz,connBg[2]+deltaz,connBg[3]+deltaz,connBg[4]+deltaz};
         ret.insert(ret.end(),conn,conn+8);
         break;
       }
     case INTERP_KERNEL::NORM_TRI3:
       {
-        int conn[6]={connBg[1],connBg[2],connBg[3],connBg[1]+deltaz,connBg[2]+deltaz,connBg[3]+deltaz};
+        mcIdType conn[6]={connBg[1],connBg[2],connBg[3],connBg[1]+deltaz,connBg[2]+deltaz,connBg[3]+deltaz};
         ret.insert(ret.end(),conn,conn+6);
         break;
       }
     case INTERP_KERNEL::NORM_TRI6:
       {
-        int conn[15]={connBg[1],connBg[2],connBg[3],connBg[1]+deltaz,connBg[2]+deltaz,connBg[3]+deltaz,connBg[4],connBg[5],connBg[6],connBg[4]+deltaz,connBg[5]+deltaz,connBg[6]+deltaz,
+        mcIdType conn[15]={connBg[1],connBg[2],connBg[3],connBg[1]+deltaz,connBg[2]+deltaz,connBg[3]+deltaz,connBg[4],connBg[5],connBg[6],connBg[4]+deltaz,connBg[5]+deltaz,connBg[6]+deltaz,
           connBg[1]+nbOfNodesPerLev,connBg[2]+nbOfNodesPerLev,connBg[3]+nbOfNodesPerLev};
         ret.insert(ret.end(),conn,conn+15);
         break;
       }
     case INTERP_KERNEL::NORM_QUAD8:
       {
-        int conn[20]={
+        mcIdType conn[20]={
           connBg[1],connBg[2],connBg[3],connBg[4],connBg[1]+deltaz,connBg[2]+deltaz,connBg[3]+deltaz,connBg[4]+deltaz,
           connBg[5],connBg[6],connBg[7],connBg[8],connBg[5]+deltaz,connBg[6]+deltaz,connBg[7]+deltaz,connBg[8]+deltaz,
           connBg[1]+nbOfNodesPerLev,connBg[2]+nbOfNodesPerLev,connBg[3]+nbOfNodesPerLev,connBg[4]+nbOfNodesPerLev
@@ -1560,17 +1562,17 @@ void MEDCouplingUMesh::AppendExtrudedCell(const int *connBg, const int *connEnd,
       }
     case INTERP_KERNEL::NORM_POLYGON:
       {
-        std::back_insert_iterator< std::vector<int> > ii(ret);
+        std::back_insert_iterator< std::vector<mcIdType> > ii(ret);
         std::copy(connBg+1,connEnd,ii);
         *ii++=-1;
-        std::reverse_iterator<const int *> rConnBg(connEnd);
-        std::reverse_iterator<const int *> rConnEnd(connBg+1);
-        std::transform(rConnBg,rConnEnd,ii,std::bind2nd(std::plus<int>(),deltaz));
+        std::reverse_iterator<const mcIdType *> rConnBg(connEnd);
+        std::reverse_iterator<const mcIdType *> rConnEnd(connBg+1);
+        std::transform(rConnBg,rConnEnd,ii,std::bind2nd(std::plus<mcIdType>(),deltaz));
         std::size_t nbOfRadFaces=std::distance(connBg+1,connEnd);
         for(std::size_t i=0;i<nbOfRadFaces;i++)
           {
             *ii++=-1;
-            int conn[4]={connBg[(i+1)%nbOfRadFaces+1],connBg[i+1],connBg[i+1]+deltaz,connBg[(i+1)%nbOfRadFaces+1]+deltaz};
+            mcIdType conn[4]={connBg[(i+1)%nbOfRadFaces+1],connBg[i+1],connBg[i+1]+deltaz,connBg[(i+1)%nbOfRadFaces+1]+deltaz};
             std::copy(conn,conn+4,ii);
           }
         break;
@@ -1595,22 +1597,22 @@ void MEDCouplingUMesh::AppendExtrudedCell(const int *connBg, const int *connEnd,
  * \param [in] descIndx is the descending connectivity index 3DSurf->3DCurve
  * \param [out] cut3DSuf input/output param.
  */
-void MEDCouplingUMesh::AssemblyForSplitFrom3DCurve(const std::vector<int>& cut3DCurve, std::vector<int>& nodesOnPlane, const int *nodal3DSurf, const int *nodalIndx3DSurf,
-                                                   const int *nodal3DCurve, const int *nodalIndx3DCurve,
-                                                   const int *desc, const int *descIndx,
-                                                   std::vector< std::pair<int,int> >& cut3DSurf)
+void MEDCouplingUMesh::AssemblyForSplitFrom3DCurve(const std::vector<mcIdType>& cut3DCurve, std::vector<mcIdType>& nodesOnPlane, const mcIdType *nodal3DSurf, const mcIdType *nodalIndx3DSurf,
+                                                   const mcIdType *nodal3DCurve, const mcIdType *nodalIndx3DCurve,
+                                                   const mcIdType *desc, const mcIdType *descIndx,
+                                                   std::vector< std::pair<mcIdType,mcIdType> >& cut3DSurf)
 {
-  std::set<int> nodesOnP(nodesOnPlane.begin(),nodesOnPlane.end());
-  int nbOf3DSurfCell=(int)cut3DSurf.size();
-  for(int i=0;i<nbOf3DSurfCell;i++)
+  std::set<mcIdType> nodesOnP(nodesOnPlane.begin(),nodesOnPlane.end());
+  mcIdType nbOf3DSurfCell=ToIdType(cut3DSurf.size());
+  for(mcIdType i=0;i<nbOf3DSurfCell;i++)
     {
-      std::vector<int> res;
-      int offset=descIndx[i];
-      int nbOfSeg=descIndx[i+1]-offset;
-      for(int j=0;j<nbOfSeg;j++)
+      std::vector<mcIdType> res;
+      mcIdType offset=descIndx[i];
+      mcIdType nbOfSeg=descIndx[i+1]-offset;
+      for(mcIdType j=0;j<nbOfSeg;j++)
         {
-          int edgeId=desc[offset+j];
-          int status=cut3DCurve[edgeId];
+          mcIdType edgeId=desc[offset+j];
+          mcIdType status=cut3DCurve[edgeId];
           if(status!=-2)
             {
               if(status>-1)
@@ -1632,8 +1634,8 @@ void MEDCouplingUMesh::AssemblyForSplitFrom3DCurve(const std::vector<int>& cut3D
         case 1:
         case 0:
           {
-            std::set<int> s1(nodal3DSurf+nodalIndx3DSurf[i]+1,nodal3DSurf+nodalIndx3DSurf[i+1]);
-            std::set_intersection(nodesOnP.begin(),nodesOnP.end(),s1.begin(),s1.end(),std::back_insert_iterator< std::vector<int> >(res));
+            std::set<mcIdType> s1(nodal3DSurf+nodalIndx3DSurf[i]+1,nodal3DSurf+nodalIndx3DSurf[i+1]);
+            std::set_intersection(nodesOnP.begin(),nodesOnP.end(),s1.begin(),s1.end(),std::back_insert_iterator< std::vector<mcIdType> >(res));
             if(res.size()==2)
               {
                 cut3DSurf[i].first=res[0]; cut3DSurf[i].second=res[1];
@@ -1646,7 +1648,7 @@ void MEDCouplingUMesh::AssemblyForSplitFrom3DCurve(const std::vector<int>& cut3D
           }
         default:
           {// case when plane is on a multi colinear edge of a polyhedron
-            if((int)res.size()==2*nbOfSeg)
+            if(ToIdType(res.size())==2*nbOfSeg)
               {
                 cut3DSurf[i].first=-2; cut3DSurf[i].second=i;
               }
@@ -1667,25 +1669,25 @@ void MEDCouplingUMesh::AssemblyForSplitFrom3DCurve(const std::vector<int>& cut3D
  * \param desc is the descending connectivity 3D->3DSurf
  * \param descIndx is the descending connectivity index 3D->3DSurf
  */
-void MEDCouplingUMesh::assemblyForSplitFrom3DSurf(const std::vector< std::pair<int,int> >& cut3DSurf,
-                                                  const int *desc, const int *descIndx,
-                                                  DataArrayInt *nodalRes, DataArrayInt *nodalResIndx, DataArrayInt *cellIds) const
+void MEDCouplingUMesh::assemblyForSplitFrom3DSurf(const std::vector< std::pair<mcIdType,mcIdType> >& cut3DSurf,
+                                                  const mcIdType *desc, const mcIdType *descIndx,
+                                                  DataArrayIdType *nodalRes, DataArrayIdType *nodalResIndx, DataArrayIdType *cellIds) const
 {
   checkFullyDefined();
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::assemblyForSplitFrom3DSurf works on umeshes with meshdim equal to 3 and spaceDim equal to 3 too!");
-  const int *nodal3D(_nodal_connec->begin()),*nodalIndx3D(_nodal_connec_index->begin());
-  int nbOfCells(getNumberOfCells());
-  for(int i=0;i<nbOfCells;i++)
+  const mcIdType *nodal3D(_nodal_connec->begin()),*nodalIndx3D(_nodal_connec_index->begin());
+  mcIdType nbOfCells=getNumberOfCells();
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      std::map<int, std::set<int> > m;
-      int offset=descIndx[i];
-      int nbOfFaces=descIndx[i+1]-offset;
-      int start=-1;
-      int end=-1;
+      std::map<mcIdType, std::set<mcIdType> > m;
+      mcIdType offset=descIndx[i];
+      mcIdType nbOfFaces=descIndx[i+1]-offset;
+      mcIdType start=-1;
+      mcIdType end=-1;
       for(int j=0;j<nbOfFaces;j++)
         {
-          const std::pair<int,int>& p=cut3DSurf[desc[offset+j]];
+          const std::pair<mcIdType,mcIdType>& p=cut3DSurf[desc[offset+j]];
           if(p.first!=-1 && p.second!=-1)
             {
               if(p.first!=-2)
@@ -1697,8 +1699,8 @@ void MEDCouplingUMesh::assemblyForSplitFrom3DSurf(const std::vector< std::pair<i
               else
                 {
                   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)nodal3D[nodalIndx3D[i]]);
-                  int sz=nodalIndx3D[i+1]-nodalIndx3D[i]-1;
-                  INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
+                  mcIdType sz=nodalIndx3D[i+1]-nodalIndx3D[i]-1;
+                  INTERP_KERNEL::AutoPtr<mcIdType> tmp=new mcIdType[sz];
                   INTERP_KERNEL::NormalizedCellType cmsId;
                   unsigned nbOfNodesSon=cm.fillSonCellNodalConnectivity2(j,nodal3D+nodalIndx3D[i]+1,sz,tmp,cmsId);
                   start=tmp[0]; end=tmp[nbOfNodesSon-1];
@@ -1712,18 +1714,18 @@ void MEDCouplingUMesh::assemblyForSplitFrom3DSurf(const std::vector< std::pair<i
         }
       if(m.empty())
         continue;
-      std::vector<int> conn(1,(int)INTERP_KERNEL::NORM_POLYGON);
-      int prev=end;
+      std::vector<mcIdType> conn(1,ToIdType(INTERP_KERNEL::NORM_POLYGON));
+      mcIdType prev=end;
       while(end!=start)
         {
-          std::map<int, std::set<int> >::const_iterator it=m.find(start);
-          const std::set<int>& s=(*it).second;
-          std::set<int> s2; s2.insert(prev);
-          std::set<int> s3;
+          std::map<mcIdType, std::set<mcIdType> >::const_iterator it=m.find(start);
+          const std::set<mcIdType>& s=(*it).second;
+          std::set<mcIdType> s2; s2.insert(prev);
+          std::set<mcIdType> s3;
           std::set_difference(s.begin(),s.end(),s2.begin(),s2.end(),inserter(s3,s3.begin()));
           if(s3.size()==1)
             {
-              int val=*s3.begin();
+              mcIdType val=*s3.begin();
               conn.push_back(start);
               prev=start;
               start=val;
@@ -1742,15 +1744,15 @@ void MEDCouplingUMesh::assemblyForSplitFrom3DSurf(const std::vector< std::pair<i
 }
 
 
-void MEDCouplingUMesh::ComputeAllTypesInternal(std::set<INTERP_KERNEL::NormalizedCellType>& types, const DataArrayInt *nodalConnec, const DataArrayInt *nodalConnecIndex)
+void MEDCouplingUMesh::ComputeAllTypesInternal(std::set<INTERP_KERNEL::NormalizedCellType>& types, const DataArrayIdType *nodalConnec, const DataArrayIdType *nodalConnecIndex)
 {
   if(nodalConnec && nodalConnecIndex)
     {
       types.clear();
-      const int *conn(nodalConnec->begin()),*connIndex(nodalConnecIndex->begin());
-      int nbOfElem(nodalConnecIndex->getNbOfElems()-1);
+      const mcIdType *conn(nodalConnec->begin()),*connIndex(nodalConnecIndex->begin());
+      mcIdType nbOfElem=ToIdType(nodalConnecIndex->getNbOfElems())-1;
       if(nbOfElem>0)
-        for(const int *pt=connIndex;pt!=connIndex+nbOfElem;pt++)
+        for(const mcIdType *pt=connIndex;pt!=connIndex+nbOfElem;pt++)
           types.insert((INTERP_KERNEL::NormalizedCellType)conn[*pt]);
     }
 }
@@ -1768,7 +1770,7 @@ void MEDCouplingUMesh::ComputeAllTypesInternal(std::set<INTERP_KERNEL::Normalize
  * \throw if there is a point in [\a nodeIdsBg, \a nodeIdsEnd ) that is a mid point of a seg3
  * \warning in case of throw the coordinates may be partially modified before the exception arises
  */
-void MEDCouplingUMesh::attractSeg3MidPtsAroundNodes(double ratio, const int *nodeIdsBg, const int *nodeIdsEnd)
+void MEDCouplingUMesh::attractSeg3MidPtsAroundNodes(double ratio, const mcIdType *nodeIdsBg, const mcIdType *nodeIdsEnd)
 {
   checkFullyDefined();
   int mdim(getMeshDimension());
@@ -1776,7 +1778,7 @@ void MEDCouplingUMesh::attractSeg3MidPtsAroundNodes(double ratio, const int *nod
     {
       MCAuto<MEDCouplingUMesh> edges;
       {
-        MCAuto<DataArrayInt> a,b,c,d;
+        MCAuto<DataArrayIdType> a,b,c,d;
         edges=this->explodeIntoEdges(a,b,c,d);
       }
       return edges->attractSeg3MidPtsAroundNodesUnderground(ratio,nodeIdsBg,nodeIdsEnd);
@@ -1789,21 +1791,21 @@ void MEDCouplingUMesh::attractSeg3MidPtsAroundNodes(double ratio, const int *nod
 /*!
  * \a this is expected to have meshdim==1.
  */
-void MEDCouplingUMesh::attractSeg3MidPtsAroundNodesUnderground(double ratio, const int *nodeIdsBg, const int *nodeIdsEnd)
+void MEDCouplingUMesh::attractSeg3MidPtsAroundNodesUnderground(double ratio, const mcIdType *nodeIdsBg, const mcIdType *nodeIdsEnd)
 {
   int spaceDim(getSpaceDimension());
   double *coords(getCoords()->getPointer());
   auto nbNodes(getNumberOfNodes());
-  auto nbCells(getNumberOfCells());
+  std::size_t nbCells(getNumberOfCells());
   std::vector<bool> fastFinder(nbNodes,false);
   for(auto work=nodeIdsBg;work!=nodeIdsEnd;work++)
     if(*work>=0 && *work<nbNodes)
       fastFinder[*work]=true;
-  MCAuto<DataArrayInt> cellsIds(getCellIdsLyingOnNodes(nodeIdsBg,nodeIdsEnd,false));
-  const int *nc(_nodal_connec->begin()),*nci(_nodal_connec_index->begin());
-  for(auto cellId=0;cellId<nbCells;cellId++,nci++)
+  MCAuto<DataArrayIdType> cellsIds(getCellIdsLyingOnNodes(nodeIdsBg,nodeIdsEnd,false));
+  const mcIdType *nc(_nodal_connec->begin()),*nci(_nodal_connec_index->begin());
+  for(std::size_t cellId=0;cellId<nbCells;cellId++,nci++)
     {
-      const int *isSelected(std::find_if(nc+nci[0]+1,nc+nci[1],[&fastFinder](int v) { return fastFinder[v]; }));
+      const mcIdType *isSelected(std::find_if(nc+nci[0]+1,nc+nci[1],[&fastFinder](mcIdType v) { return fastFinder[v]; }));
       if(isSelected!=nc+nci[1])
         {
           if((INTERP_KERNEL::NormalizedCellType)nc[nci[0]]==INTERP_KERNEL::NORM_SEG3 && nci[1]-nci[0]==4)
index 703a2a923fca9cdaa6962dbe2a75c4e705953dd4..e0850ec20a14d5da8a0b9c4818195d3d77d2194c 100644 (file)
@@ -24,8 +24,8 @@ class MinusOneSonsGenerator
 {
 public:
   MinusOneSonsGenerator(const INTERP_KERNEL::CellModel& cm):_cm(cm) { }
-  unsigned getNumberOfSons2(const int *conn, int lgth) const { return _cm.getNumberOfSons2(conn,lgth); }
-  unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillSonCellNodalConnectivity2(sonId,nodalConn,lgth,sonNodalConn,typeOfSon); }
+  unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const { return _cm.getNumberOfSons2(conn,lgth); }
+  unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillSonCellNodalConnectivity2(sonId,nodalConn,lgth,sonNodalConn,typeOfSon); }
   static const int DELTA=1;
 private:
   const INTERP_KERNEL::CellModel& _cm;
@@ -35,8 +35,8 @@ class MinusOneSonsGeneratorBiQuadratic
 {
 public:
   MinusOneSonsGeneratorBiQuadratic(const INTERP_KERNEL::CellModel& cm):_cm(cm) { }
-  unsigned getNumberOfSons2(const int *conn, int lgth) const { return _cm.getNumberOfSons2(conn,lgth); }
-  unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillSonCellNodalConnectivity4(sonId,nodalConn,lgth,sonNodalConn,typeOfSon); }
+  unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const { return _cm.getNumberOfSons2(conn,lgth); }
+  unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillSonCellNodalConnectivity4(sonId,nodalConn,lgth,sonNodalConn,typeOfSon); }
   static const int DELTA=1;
 private:
   const INTERP_KERNEL::CellModel& _cm;
@@ -46,8 +46,8 @@ class MinusTwoSonsGenerator
 {
 public:
   MinusTwoSonsGenerator(const INTERP_KERNEL::CellModel& cm):_cm(cm) { }
-  unsigned getNumberOfSons2(const int *conn, int lgth) const { return _cm.getNumberOfEdgesIn3D(conn,lgth); }
-  unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillSonEdgesNodalConnectivity3D(sonId,nodalConn,lgth,sonNodalConn,typeOfSon); }
+  unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const { return _cm.getNumberOfEdgesIn3D(conn,lgth); }
+  unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillSonEdgesNodalConnectivity3D(sonId,nodalConn,lgth,sonNodalConn,typeOfSon); }
   static const int DELTA=2;
 private:
   const INTERP_KERNEL::CellModel& _cm;
@@ -57,8 +57,8 @@ class MicroEdgesGenerator2D
 {
 public:
   MicroEdgesGenerator2D(const INTERP_KERNEL::CellModel& cm):_cm(cm) { }
-  unsigned getNumberOfSons2(const int *conn, int lgth) const { return _cm.getNumberOfMicroEdges(); }
-  unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillMicroEdgeNodalConnectivity(sonId,nodalConn,sonNodalConn,typeOfSon); }
+  unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const { return _cm.getNumberOfMicroEdges(); }
+  unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillMicroEdgeNodalConnectivity(sonId,nodalConn,sonNodalConn,typeOfSon); }
   static const int DELTA=1;
 private:
   const INTERP_KERNEL::CellModel& _cm;
@@ -68,15 +68,15 @@ class MicroEdgesGenerator3D
 {
 public:
   MicroEdgesGenerator3D(const INTERP_KERNEL::CellModel& cm):_cm(cm) { }
-  unsigned getNumberOfSons2(const int *conn, int lgth) const { return _cm.getNumberOfMicroEdges(); }
-  unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillMicroEdgeNodalConnectivity(sonId,nodalConn,sonNodalConn,typeOfSon); }
+  unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const { return _cm.getNumberOfMicroEdges(); }
+  unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, INTERP_KERNEL::NormalizedCellType& typeOfSon) const { return _cm.fillMicroEdgeNodalConnectivity(sonId,nodalConn,sonNodalConn,typeOfSon); }
   static const int DELTA=2;
 private:
   const INTERP_KERNEL::CellModel& _cm;
 };
 
-int MEDCouplingFastNbrer(int id, unsigned nb, const INTERP_KERNEL::CellModel& cm, bool compute, const int *conn1, const int *conn2);
-int MEDCouplingOrientationSensitiveNbrer(int id, unsigned nb, const INTERP_KERNEL::CellModel& cm, bool compute, const int *conn1, const int *conn2);
+mcIdType MEDCouplingFastNbrer(mcIdType id, mcIdType nb, const INTERP_KERNEL::CellModel& cm, bool compute, const mcIdType *conn1, const mcIdType *conn2);
+mcIdType MEDCouplingOrientationSensitiveNbrer(mcIdType id, mcIdType nb, const INTERP_KERNEL::CellModel& cm, bool compute, const mcIdType *conn1, const mcIdType *conn2);
 
 namespace MEDCoupling
 {
@@ -86,35 +86,35 @@ namespace MEDCoupling
   public:
     static const int MY_SPACEDIM=SPACEDIMM;
     static const int MY_MESHDIM=8;
-    typedef int MyConnType;
+    typedef mcIdType MyConnType;
     static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE;
     // begin
     // useless, but for windows compilation ...
     const double* getCoordinatesPtr() const { return 0; }
-    const int* getConnectivityPtr() const { return 0; }
-    const int* getConnectivityIndexPtr() const { return 0; }
-    INTERP_KERNEL::NormalizedCellType getTypeOfElement(int) const { return (INTERP_KERNEL::NormalizedCellType)0; }
+    const MyConnType* getConnectivityPtr() const { return 0; }
+    const MyConnType* getConnectivityIndexPtr() const { return 0; }
+    INTERP_KERNEL::NormalizedCellType getTypeOfElement(MyConnType) const { return (INTERP_KERNEL::NormalizedCellType)0; }
     // end
   };
 }
 
 template<int SPACEDIM>
-void MEDCouplingUMesh::getCellsContainingPointsAlg(const double *coords, const double *pos, int nbOfPoints,
-                                                   double eps, MCAuto<DataArrayInt>& elts, MCAuto<DataArrayInt>& eltsIndex, std::function<bool(INTERP_KERNEL::NormalizedCellType,int)> sensibilityTo2DQuadraticLinearCellsFunc) const
+void MEDCouplingUMesh::getCellsContainingPointsAlg(const double *coords, const double *pos, mcIdType nbOfPoints,
+                                                   double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex, std::function<bool(INTERP_KERNEL::NormalizedCellType,int)> sensibilityTo2DQuadraticLinearCellsFunc) const
 {
   // Override precision for this method only:
   INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
 
-  elts=DataArrayInt::New(); eltsIndex=DataArrayInt::New(); eltsIndex->alloc(nbOfPoints+1,1); eltsIndex->setIJ(0,0,0); elts->alloc(0,1);
-  int *eltsIndexPtr(eltsIndex->getPointer());
+  elts=DataArrayIdType::New(); eltsIndex=DataArrayIdType::New(); eltsIndex->alloc(nbOfPoints+1,1); eltsIndex->setIJ(0,0,0); elts->alloc(0,1);
+  mcIdType *eltsIndexPtr(eltsIndex->getPointer());
   MCAuto<DataArrayDouble> bboxArr(getBoundingBoxForBBTree(eps));
   const double *bbox(bboxArr->begin());
-  int nbOfCells=getNumberOfCells();
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connI=_nodal_connec_index->getConstPointer();
+  mcIdType nbOfCells=getNumberOfCells();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connI=_nodal_connec_index->getConstPointer();
   double bb[2*SPACEDIM];
-  BBTree<SPACEDIM,int> myTree(&bbox[0],0,0,nbOfCells,-eps);
-  for(int i=0;i<nbOfPoints;i++)
+  BBTree<SPACEDIM,mcIdType> myTree(&bbox[0],0,0,nbOfCells,-eps);
+  for(mcIdType i=0;i<nbOfPoints;i++)
     {
       eltsIndexPtr[i+1]=eltsIndexPtr[i];
       for(int j=0;j<SPACEDIM;j++)
@@ -122,11 +122,11 @@ void MEDCouplingUMesh::getCellsContainingPointsAlg(const double *coords, const d
           bb[2*j]=pos[SPACEDIM*i+j];
           bb[2*j+1]=pos[SPACEDIM*i+j];
         }
-      std::vector<int> candidates;
+      std::vector<mcIdType> candidates;
       myTree.getIntersectingElems(bb,candidates);
-      for(std::vector<int>::const_iterator iter=candidates.begin();iter!=candidates.end();iter++)
+      for(std::vector<mcIdType>::const_iterator iter=candidates.begin();iter!=candidates.end();iter++)
         {
-          int sz(connI[(*iter)+1]-connI[*iter]-1);
+          mcIdType sz(connI[(*iter)+1]-connI[*iter]-1);
           INTERP_KERNEL::NormalizedCellType ct((INTERP_KERNEL::NormalizedCellType)conn[connI[*iter]]);
           bool status(false);
           // [ABN] : point locator algorithms are only properly working for linear cells.
@@ -138,9 +138,9 @@ void MEDCouplingUMesh::getCellsContainingPointsAlg(const double *coords, const d
                 throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getCellsContainingPointsAlg : not implemented yet for POLYGON and QPOLYGON in spaceDim 3 !");
               std::vector<INTERP_KERNEL::Node *> nodes(sz);
               INTERP_KERNEL::QuadraticPolygon *pol(0);
-              for(int j=0;j<sz;j++)
+              for(mcIdType j=0;j<sz;j++)
                 {
-                  int nodeId(conn[connI[*iter]+1+j]);
+                  mcIdType nodeId(conn[connI[*iter]+1+j]);
                   nodes[j]=new INTERP_KERNEL::Node(coords[nodeId*SPACEDIM],coords[nodeId*SPACEDIM+1]);
                 }
               if(!INTERP_KERNEL::CellModel::GetCellModel(ct).isQuadratic())
@@ -167,32 +167,32 @@ void MEDCouplingUMesh::getCellsContainingPointsAlg(const double *coords, const d
  * For speed reasons no check of this will be done.
  */
 template<class SonsGenerator>
-MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivityGen(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx, DimM1DescNbrer nbrer) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivityGen(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx, DimM1DescNbrer nbrer) const
 {
   if(!desc || !descIndx || !revDesc || !revDescIndx)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildDescendingConnectivityGen : present of a null pointer in input !");
   checkConnectivityFullyDefined();
-  int nbOfCells=getNumberOfCells();
-  int nbOfNodes=getNumberOfNodes();
-  MCAuto<DataArrayInt> revNodalIndx=DataArrayInt::New(); revNodalIndx->alloc(nbOfNodes+1,1); revNodalIndx->fillWithZero();
-  int *revNodalIndxPtr=revNodalIndx->getPointer();
-  const int *conn=_nodal_connec->getConstPointer();
-  const int *connIndex=_nodal_connec_index->getConstPointer();
+  mcIdType nbOfCells=getNumberOfCells();
+  mcIdType nbOfNodes=getNumberOfNodes();
+  MCAuto<DataArrayIdType> revNodalIndx=DataArrayIdType::New(); revNodalIndx->alloc(nbOfNodes+1,1); revNodalIndx->fillWithZero();
+  mcIdType *revNodalIndxPtr=revNodalIndx->getPointer();
+  const mcIdType *conn=_nodal_connec->getConstPointer();
+  const mcIdType *connIndex=_nodal_connec_index->getConstPointer();
   std::string name="Mesh constituent of "; name+=getName();
   MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(name,getMeshDimension()-SonsGenerator::DELTA);
   ret->setCoords(getCoords());
   ret->allocateCells(2*nbOfCells);
   descIndx->alloc(nbOfCells+1,1);
-  MCAuto<DataArrayInt> revDesc2(DataArrayInt::New()); revDesc2->reserve(2*nbOfCells);
-  int *descIndxPtr=descIndx->getPointer(); *descIndxPtr++=0;
-  for(int eltId=0;eltId<nbOfCells;eltId++,descIndxPtr++)
+  MCAuto<DataArrayIdType> revDesc2(DataArrayIdType::New()); revDesc2->reserve(2*nbOfCells);
+  mcIdType *descIndxPtr=descIndx->getPointer(); *descIndxPtr++=0;
+  for(mcIdType eltId=0;eltId<nbOfCells;eltId++,descIndxPtr++)
     {
-      int pos=connIndex[eltId];
-      int posP1=connIndex[eltId+1];
+      mcIdType pos=connIndex[eltId];
+      mcIdType posP1=connIndex[eltId+1];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[pos]);
       SonsGenerator sg(cm);
       unsigned nbOfSons=sg.getNumberOfSons2(conn+pos+1,posP1-pos-1);
-      INTERP_KERNEL::AutoPtr<int> tmp=new int[posP1-pos];
+      INTERP_KERNEL::AutoPtr<mcIdType> tmp=new mcIdType[posP1-pos];
       for(unsigned i=0;i<nbOfSons;i++)
         {
           INTERP_KERNEL::NormalizedCellType cmsId;
@@ -203,44 +203,44 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivityGen(DataArrayInt
           ret->insertNextCell(cmsId,nbOfNodesSon,tmp);
           revDesc2->pushBackSilent(eltId);
         }
-      descIndxPtr[0]=descIndxPtr[-1]+(int)nbOfSons;
+      descIndxPtr[0]=descIndxPtr[-1]+ToIdType(nbOfSons);
     }
-  int nbOfCellsM1=ret->getNumberOfCells();
-  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<int>());
-  MCAuto<DataArrayInt> revNodal=DataArrayInt::New(); revNodal->alloc(revNodalIndx->back(),1);
+  mcIdType nbOfCellsM1=ret->getNumberOfCells();
+  std::transform(revNodalIndxPtr+1,revNodalIndxPtr+nbOfNodes+1,revNodalIndxPtr,revNodalIndxPtr+1,std::plus<mcIdType>());
+  MCAuto<DataArrayIdType> revNodal=DataArrayIdType::New(); revNodal->alloc(revNodalIndx->back(),1);
   std::fill(revNodal->getPointer(),revNodal->getPointer()+revNodalIndx->back(),-1);
-  int *revNodalPtr=revNodal->getPointer();
-  const int *connM1=ret->getNodalConnectivity()->getConstPointer();
-  const int *connIndexM1=ret->getNodalConnectivityIndex()->getConstPointer();
-  for(int eltId=0;eltId<nbOfCellsM1;eltId++)
+  mcIdType *revNodalPtr=revNodal->getPointer();
+  const mcIdType *connM1=ret->getNodalConnectivity()->getConstPointer();
+  const mcIdType *connIndexM1=ret->getNodalConnectivityIndex()->getConstPointer();
+  for(mcIdType eltId=0;eltId<nbOfCellsM1;eltId++)
     {
-      const int *strtNdlConnOfCurCell=connM1+connIndexM1[eltId]+1;
-      const int *endNdlConnOfCurCell=connM1+connIndexM1[eltId+1];
-      for(const int *iter=strtNdlConnOfCurCell;iter!=endNdlConnOfCurCell;iter++)
+      const mcIdType *strtNdlConnOfCurCell=connM1+connIndexM1[eltId]+1;
+      const mcIdType *endNdlConnOfCurCell=connM1+connIndexM1[eltId+1];
+      for(const mcIdType *iter=strtNdlConnOfCurCell;iter!=endNdlConnOfCurCell;iter++)
         if(*iter>=0)//for polyhedrons
-          *std::find_if(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1],std::bind2nd(std::equal_to<int>(),-1))=eltId;
+          *std::find_if(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1],std::bind2nd(std::equal_to<mcIdType>(),-1))=eltId;
     }
   //
-  DataArrayInt *commonCells=0,*commonCellsI=0;
+  DataArrayIdType *commonCells=0,*commonCellsI=0;
   FindCommonCellsAlg(3,0,ret->getNodalConnectivity(),ret->getNodalConnectivityIndex(),revNodal,revNodalIndx,commonCells,commonCellsI);
-  MCAuto<DataArrayInt> commonCellsTmp(commonCells),commonCellsITmp(commonCellsI);
-  const int *commonCellsPtr(commonCells->getConstPointer()),*commonCellsIPtr(commonCellsI->getConstPointer());
-  int newNbOfCellsM1=-1;
-  MCAuto<DataArrayInt> o2nM1=DataArrayInt::ConvertIndexArrayToO2N(nbOfCellsM1,commonCells->begin(),
+  MCAuto<DataArrayIdType> commonCellsTmp(commonCells),commonCellsITmp(commonCellsI);
+  const mcIdType *commonCellsPtr(commonCells->getConstPointer()),*commonCellsIPtr(commonCellsI->getConstPointer());
+  mcIdType newNbOfCellsM1=-1;
+  MCAuto<DataArrayIdType> o2nM1=DataArrayIdType::ConvertIndexArrayToO2N(nbOfCellsM1,commonCells->begin(),
                                                                                                             commonCellsI->begin(),commonCellsI->end(),newNbOfCellsM1);
   std::vector<bool> isImpacted(nbOfCellsM1,false);
-  for(const int *work=commonCellsI->begin();work!=commonCellsI->end()-1;work++)
-    for(int work2=work[0];work2!=work[1];work2++)
+  for(const mcIdType *work=commonCellsI->begin();work!=commonCellsI->end()-1;work++)
+    for(mcIdType work2=work[0];work2!=work[1];work2++)
       isImpacted[commonCellsPtr[work2]]=true;
-  const int *o2nM1Ptr=o2nM1->getConstPointer();
-  MCAuto<DataArrayInt> n2oM1=o2nM1->invertArrayO2N2N2OBis(newNbOfCellsM1);
-  const int *n2oM1Ptr=n2oM1->getConstPointer();
+  const mcIdType *o2nM1Ptr=o2nM1->getConstPointer();
+  MCAuto<DataArrayIdType> n2oM1=o2nM1->invertArrayO2N2N2OBis(newNbOfCellsM1);
+  const mcIdType *n2oM1Ptr=n2oM1->getConstPointer();
   MCAuto<MEDCouplingUMesh> ret2=static_cast<MEDCouplingUMesh *>(ret->buildPartOfMySelf(n2oM1->begin(),n2oM1->end(),true));
   ret2->copyTinyInfoFrom(this);
   desc->alloc(descIndx->back(),1);
-  int *descPtr=desc->getPointer();
+  mcIdType *descPtr=desc->getPointer();
   const INTERP_KERNEL::CellModel& cmsDft=INTERP_KERNEL::CellModel::GetCellModel(INTERP_KERNEL::NORM_POINT1);
-  for(int i=0;i<nbOfCellsM1;i++,descPtr++)
+  for(mcIdType i=0;i<nbOfCellsM1;i++,descPtr++)
     {
       if(!isImpacted[i])
         *descPtr=nbrer(o2nM1Ptr[i],0,cmsDft,false,0,0);
@@ -257,11 +257,11 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivityGen(DataArrayInt
     }
   revDesc->reserve(newNbOfCellsM1);
   revDescIndx->alloc(newNbOfCellsM1+1,1);
-  int *revDescIndxPtr=revDescIndx->getPointer(); *revDescIndxPtr++=0;
-  const int *revDesc2Ptr=revDesc2->getConstPointer();
-  for(int i=0;i<newNbOfCellsM1;i++,revDescIndxPtr++)
+  mcIdType *revDescIndxPtr=revDescIndx->getPointer(); *revDescIndxPtr++=0;
+  const mcIdType *revDesc2Ptr=revDesc2->getConstPointer();
+  for(mcIdType i=0;i<newNbOfCellsM1;i++,revDescIndxPtr++)
     {
-      int oldCellIdM1=n2oM1Ptr[i];
+      mcIdType oldCellIdM1=n2oM1Ptr[i];
       if(!isImpacted[oldCellIdM1])
         {
           revDesc->pushBackSilent(revDesc2Ptr[oldCellIdM1]);
@@ -269,7 +269,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildDescendingConnectivityGen(DataArrayInt
         }
       else
         {
-          for(int j=commonCellsIPtr[0];j<commonCellsIPtr[1];j++)
+          for(mcIdType j=commonCellsIPtr[0];j<commonCellsIPtr[1];j++)
             revDesc->pushBackSilent(revDesc2Ptr[commonCellsPtr[j]]);
           revDescIndxPtr[0]=revDescIndxPtr[-1]+commonCellsIPtr[1]-commonCellsIPtr[0];
           commonCellsIPtr++;
index f2df4a04f65a43147a8eccf7317918d586efdb1c..cdac34c4a6048a17ad4903636da0692342af5295 100644 (file)
@@ -50,13 +50,13 @@ using namespace MEDCoupling;
 
 /// @cond INTERNAL
 
-int InternalAddPoint(const INTERP_KERNEL::Edge *e, int id, const double *coo, int startId, int endId, DataArrayDouble& addCoo, int& nodesCnter)
+mcIdType InternalAddPoint(const INTERP_KERNEL::Edge *e, mcIdType id, const double *coo, mcIdType startId, mcIdType endId, DataArrayDouble& addCoo, mcIdType& nodesCnter)
 {
   if(id!=-1)
     return id;
   else
     {
-      int ret(nodesCnter++);
+      mcIdType ret(nodesCnter++);
       double newPt[2];
       e->getMiddleOfPoints(coo+2*startId,coo+2*endId,newPt);
       addCoo.insertAtTheEnd(newPt,newPt+2);
@@ -64,13 +64,13 @@ int InternalAddPoint(const INTERP_KERNEL::Edge *e, int id, const double *coo, in
     }
 }
 
-int InternalAddPointOriented(const INTERP_KERNEL::Edge *e, int id, const double *coo, int startId, int endId, DataArrayDouble& addCoo, int& nodesCnter)
+mcIdType InternalAddPointOriented(const INTERP_KERNEL::Edge *e, mcIdType id, const double *coo, mcIdType startId, mcIdType endId, DataArrayDouble& addCoo, mcIdType& nodesCnter)
 {
   if(id!=-1)
     return id;
   else
     {
-      int ret(nodesCnter++);
+      mcIdType ret(nodesCnter++);
       double newPt[2];
       e->getMiddleOfPointsOriented(coo+2*startId,coo+2*endId,newPt);
       addCoo.insertAtTheEnd(newPt,newPt+2);
@@ -79,17 +79,17 @@ int InternalAddPointOriented(const INTERP_KERNEL::Edge *e, int id, const double
 }
 
 
-void EnterTheResultOf2DCellFirst(const INTERP_KERNEL::Edge *e, int start, int stp, int nbOfEdges, bool linOrArc, const double *coords, const int *connBg, int offset, DataArrayInt *newConnOfCell, DataArrayDouble *appendedCoords, std::vector<int>& middles)
+void EnterTheResultOf2DCellFirst(const INTERP_KERNEL::Edge *e, int start, int stp, int nbOfEdges, bool linOrArc, const double *coords, const mcIdType *connBg, mcIdType offset, DataArrayIdType *newConnOfCell, DataArrayDouble *appendedCoords, std::vector<mcIdType>& middles)
 {
-  int tmp[3];
+  mcIdType tmp[3];
   int trueStart(start>=0?start:nbOfEdges+start);
-  tmp[0]=linOrArc?(int)INTERP_KERNEL::NORM_QPOLYG:(int)INTERP_KERNEL::NORM_POLYGON; tmp[1]=connBg[trueStart]; tmp[2]=connBg[stp];
+  tmp[0]=ToIdType(linOrArc?INTERP_KERNEL::NORM_QPOLYG:INTERP_KERNEL::NORM_POLYGON); tmp[1]=connBg[trueStart]; tmp[2]=connBg[stp];
   newConnOfCell->insertAtTheEnd(tmp,tmp+3);
   if(linOrArc)
     {
       if(stp-start>1)
         {
-          int tmp2(0),tmp3(appendedCoords->getNumberOfTuples()/2);
+          mcIdType tmp2(0),tmp3(appendedCoords->getNumberOfTuples()/2);
           InternalAddPointOriented(e,-1,coords,tmp[1],tmp[2],*appendedCoords,tmp2);
           middles.push_back(tmp3+offset);
         }
@@ -98,15 +98,15 @@ void EnterTheResultOf2DCellFirst(const INTERP_KERNEL::Edge *e, int start, int st
     }
 }
 
-void EnterTheResultOf2DCellMiddle(const INTERP_KERNEL::Edge *e, int start, int stp, int nbOfEdges, bool linOrArc, const double *coords, const int *connBg, int offset, DataArrayInt *newConnOfCell, DataArrayDouble *appendedCoords, std::vector<int>& middles)
+void EnterTheResultOf2DCellMiddle(const INTERP_KERNEL::Edge *e, int start, int stp, int nbOfEdges, bool linOrArc, const double *coords, const mcIdType *connBg, mcIdType offset, DataArrayIdType *newConnOfCell, DataArrayDouble *appendedCoords, std::vector<mcIdType>& middles)
 {
-  int tmpSrt(newConnOfCell->back()),tmpEnd(connBg[stp]);
+  mcIdType tmpSrt(newConnOfCell->back()),tmpEnd(connBg[stp]);
   newConnOfCell->pushBackSilent(tmpEnd);
   if(linOrArc)
     {
       if(stp-start>1)
         {
-          int tmp2(0),tmp3(appendedCoords->getNumberOfTuples()/2);
+          mcIdType tmp2(0),tmp3(appendedCoords->getNumberOfTuples()/2);
           InternalAddPointOriented(e,-1,coords,tmpSrt,tmpEnd,*appendedCoords,tmp2);
           middles.push_back(tmp3+offset);
         }
@@ -115,15 +115,15 @@ void EnterTheResultOf2DCellMiddle(const INTERP_KERNEL::Edge *e, int start, int s
     }
 }
 
-void EnterTheResultOf2DCellEnd(const INTERP_KERNEL::Edge *e, int start, int stp, int nbOfEdges, bool linOrArc, const double *coords, const int *connBg, int offset, DataArrayInt *newConnOfCell, DataArrayDouble *appendedCoords, std::vector<int>& middles)
+void EnterTheResultOf2DCellEnd(const INTERP_KERNEL::Edge *e, int start, int stp, int nbOfEdges, bool linOrArc, const double *coords, const mcIdType *connBg, mcIdType offset, DataArrayIdType *newConnOfCell, DataArrayDouble *appendedCoords, std::vector<mcIdType>& middles)
 {
   // only the quadratic point to deal with:
   if(linOrArc)
     {
       if(stp-start>1)  // if we are covering more than one segment we need to create a new mid point
         {
-          int tmpSrt(connBg[start]),tmpEnd(connBg[stp % nbOfEdges]);  // % to handle last seg.
-          int tmp2(0),tmp3(appendedCoords->getNumberOfTuples()/2);
+          mcIdType tmpSrt(connBg[start]),tmpEnd(connBg[stp % nbOfEdges]);  // % to handle last seg.
+          mcIdType tmp2(0),tmp3(appendedCoords->getNumberOfTuples()/2);
           InternalAddPointOriented(e,-1,coords,tmpSrt,tmpEnd,*appendedCoords,tmp2);
           middles.push_back(tmp3+offset);
         }
@@ -132,20 +132,20 @@ void EnterTheResultOf2DCellEnd(const INTERP_KERNEL::Edge *e, int start, int stp,
     }
 }
 
-void IKGeo2DInternalMapper2(INTERP_KERNEL::Node *n, const std::map<MCAuto<INTERP_KERNEL::Node>,int>& m, int forbVal0, int forbVal1, std::vector<int>& isect)
+void IKGeo2DInternalMapper2(INTERP_KERNEL::Node *n, const std::map<MCAuto<INTERP_KERNEL::Node>,mcIdType>& m, mcIdType forbVal0, mcIdType forbVal1, std::vector<mcIdType>& isect)
 {
   MCAuto<INTERP_KERNEL::Node> nTmp(n); nTmp->incrRef();
-  std::map<MCAuto<INTERP_KERNEL::Node>,int>::const_iterator it(m.find(nTmp));
+  std::map<MCAuto<INTERP_KERNEL::Node>,mcIdType>::const_iterator it(m.find(nTmp));
   if(it==m.end())
     throw INTERP_KERNEL::Exception("Internal error in remapping !");
-  int v((*it).second);
+  mcIdType v((*it).second);
   if(v==forbVal0 || v==forbVal1)
     return ;
   if(std::find(isect.begin(),isect.end(),v)==isect.end())
     isect.push_back(v);
 }
 
-bool IKGeo2DInternalMapper(const INTERP_KERNEL::ComposedEdge& c, const std::map<MCAuto<INTERP_KERNEL::Node>,int>& m, int forbVal0, int forbVal1, std::vector<int>& isect)
+bool IKGeo2DInternalMapper(const INTERP_KERNEL::ComposedEdge& c, const std::map<MCAuto<INTERP_KERNEL::Node>,mcIdType>& m, mcIdType forbVal0, mcIdType forbVal1, std::vector<mcIdType>& isect)
 {
   int sz(c.size());
   if(sz<=1)
@@ -166,7 +166,7 @@ bool IKGeo2DInternalMapper(const INTERP_KERNEL::ComposedEdge& c, const std::map<
 namespace MEDCoupling
 {
 
-  INTERP_KERNEL::Edge *MEDCouplingUMeshBuildQPFromEdge2(INTERP_KERNEL::NormalizedCellType typ, const int *bg, const double *coords2D, std::map< MCAuto<INTERP_KERNEL::Node>,int>& m)
+  INTERP_KERNEL::Edge *MEDCouplingUMeshBuildQPFromEdge2(INTERP_KERNEL::NormalizedCellType typ, const mcIdType *bg, const double *coords2D, std::map< MCAuto<INTERP_KERNEL::Node>,mcIdType>& m)
   {
     INTERP_KERNEL::Edge *ret(0);
     MCAuto<INTERP_KERNEL::Node> n0(new INTERP_KERNEL::Node(coords2D[2*bg[0]],coords2D[2*bg[0]+1])),n1(new INTERP_KERNEL::Node(coords2D[2*bg[1]],coords2D[2*bg[1]+1]));
@@ -198,7 +198,7 @@ namespace MEDCoupling
     return ret;
   }
 
-  INTERP_KERNEL::Edge *MEDCouplingUMeshBuildQPFromEdge(INTERP_KERNEL::NormalizedCellType typ, std::map<int, INTERP_KERNEL::NodeWithUsage >& mapp2, const int *bg)
+  INTERP_KERNEL::Edge *MEDCouplingUMeshBuildQPFromEdge(INTERP_KERNEL::NormalizedCellType typ, std::map<mcIdType, INTERP_KERNEL::NodeWithUsage >& mapp2, const mcIdType *bg)
   {
     INTERP_KERNEL::Edge *ret=0;
 
@@ -240,29 +240,29 @@ namespace MEDCoupling
    * The input mesh 'mDesc' must be so that mDim==1 and spaceDim==2.
    * 'mapp' returns a mapping between local numbering in submesh (represented by a Node*) and the global node numbering in 'mDesc'.
    */
-  INTERP_KERNEL::QuadraticPolygon *MEDCouplingUMeshBuildQPFromMesh(const MEDCouplingUMesh *mDesc, const std::vector<int>& candidates,
-                                                                   std::map<INTERP_KERNEL::Node *,int>& mapp)
+  INTERP_KERNEL::QuadraticPolygon *MEDCouplingUMeshBuildQPFromMesh(const MEDCouplingUMesh *mDesc, const std::vector<mcIdType>& candidates,
+                                                                   std::map<INTERP_KERNEL::Node *,mcIdType>& mapp)
   {
     mapp.clear();
-    std::map<int, INTERP_KERNEL::NodeWithUsage > mapp2;  // the last var is a flag specifying if node is an extreme node of the seg (LINEAR) or only a middle for SEG3 (QUADRATIC_ONLY).
+    std::map<mcIdType, INTERP_KERNEL::NodeWithUsage > mapp2;  // the last var is a flag specifying if node is an extreme node of the seg (LINEAR) or only a middle for SEG3 (QUADRATIC_ONLY).
     const double *coo=mDesc->getCoords()->getConstPointer();
-    const int *c=mDesc->getNodalConnectivity()->getConstPointer();
-    const int *cI=mDesc->getNodalConnectivityIndex()->getConstPointer();
-    std::set<int> s;
-    for(std::vector<int>::const_iterator it=candidates.begin();it!=candidates.end();it++)
+    const mcIdType *c=mDesc->getNodalConnectivity()->getConstPointer();
+    const mcIdType *cI=mDesc->getNodalConnectivityIndex()->getConstPointer();
+    std::set<mcIdType> s;
+    for(std::vector<mcIdType>::const_iterator it=candidates.begin();it!=candidates.end();it++)
       s.insert(c+cI[*it]+1,c+cI[(*it)+1]);
-    for(std::set<int>::const_iterator it2=s.begin();it2!=s.end();it2++)
+    for(std::set<mcIdType>::const_iterator it2=s.begin();it2!=s.end();it2++)
       {
         INTERP_KERNEL::Node *n=new INTERP_KERNEL::Node(coo[2*(*it2)],coo[2*(*it2)+1]);
         mapp2[*it2]=INTERP_KERNEL::NodeWithUsage(n,INTERP_KERNEL::USAGE_UNKNOWN);
       }
     INTERP_KERNEL::QuadraticPolygon *ret=new INTERP_KERNEL::QuadraticPolygon;
-    for(std::vector<int>::const_iterator it=candidates.begin();it!=candidates.end();it++)
+    for(std::vector<mcIdType>::const_iterator it=candidates.begin();it!=candidates.end();it++)
       {
         INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType)c[cI[*it]];
         ret->pushBack(MEDCouplingUMeshBuildQPFromEdge(typ,mapp2,c+cI[*it]+1));
       }
-    for(std::map<int, INTERP_KERNEL::NodeWithUsage >::const_iterator it2=mapp2.begin();it2!=mapp2.end();it2++)
+    for(std::map<mcIdType, INTERP_KERNEL::NodeWithUsage >::const_iterator it2=mapp2.begin();it2!=mapp2.end();it2++)
       {
         if((*it2).second.second == INTERP_KERNEL::USAGE_LINEAR)
           mapp[(*it2).second.first]=(*it2).first;
@@ -271,24 +271,24 @@ namespace MEDCoupling
     return ret;
   }
 
-  INTERP_KERNEL::QuadraticPolygon *MEDCouplingUMeshBuildQPFromMeshWithTree(const MEDCouplingUMesh *mDesc, const std::vector<int>& candidates,
-                                                                   std::map<INTERP_KERNEL::Node *,int>& mapp,
-                                                                   const BBTreePts<2,int> & nodeTree,
-                                                                   const std::map<int, INTERP_KERNEL::Node *>& mapRev)
+  INTERP_KERNEL::QuadraticPolygon *MEDCouplingUMeshBuildQPFromMeshWithTree(const MEDCouplingUMesh *mDesc, const std::vector<mcIdType>& candidates,
+                                                                   std::map<INTERP_KERNEL::Node *,mcIdType>& mapp,
+                                                                   const BBTreePts<2,mcIdType> & nodeTree,
+                                                                   const std::map<mcIdType, INTERP_KERNEL::Node *>& mapRev)
   {
     mapp.clear();
-    std::map<int, INTERP_KERNEL::NodeWithUsage > mapp2;  // the last var is a flag specifying if node is an extreme node of the seg (LINEAR) or only a middle for SEG3 (QUADRATIC_ONLY).
+    std::map<mcIdType, INTERP_KERNEL::NodeWithUsage > mapp2;  // the last var is a flag specifying if node is an extreme node of the seg (LINEAR) or only a middle for SEG3 (QUADRATIC_ONLY).
     const double *coo=mDesc->getCoords()->getConstPointer();
-    const int *c=mDesc->getNodalConnectivity()->getConstPointer();
-    const int *cI=mDesc->getNodalConnectivityIndex()->getConstPointer();
-    std::set<int> s;
-    for(std::vector<int>::const_iterator it=candidates.begin();it!=candidates.end();it++)
+    const mcIdType *c=mDesc->getNodalConnectivity()->getConstPointer();
+    const mcIdType *cI=mDesc->getNodalConnectivityIndex()->getConstPointer();
+    std::set<mcIdType> s;
+    for(std::vector<mcIdType>::const_iterator it=candidates.begin();it!=candidates.end();it++)
       s.insert(c+cI[*it]+1,c+cI[(*it)+1]);
-    for(std::set<int>::const_iterator it2=s.begin();it2!=s.end();it2++)
+    for(std::set<mcIdType>::const_iterator it2=s.begin();it2!=s.end();it2++)
       {
         INTERP_KERNEL::Node *n;
         // Look for a potential node to merge
-        std::vector<int> candNode;
+        std::vector<mcIdType> candNode;
         nodeTree.getElementsAroundPoint(coo+2*(*it2), candNode);
         if (candNode.size() > 2)
           throw INTERP_KERNEL::Exception("MEDCouplingUMesh::MEDCouplingUMeshBuildQPFromMeshWithTree(): some nodes are not properly merged (within eps) in input mesh!");
@@ -308,12 +308,12 @@ namespace MEDCoupling
         mapp2[*it2]=INTERP_KERNEL::NodeWithUsage(n,INTERP_KERNEL::USAGE_UNKNOWN);
       }
     INTERP_KERNEL::QuadraticPolygon *ret=new INTERP_KERNEL::QuadraticPolygon;
-    for(std::vector<int>::const_iterator it=candidates.begin();it!=candidates.end();it++)
+    for(std::vector<mcIdType>::const_iterator it=candidates.begin();it!=candidates.end();it++)
       {
         INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType)c[cI[*it]];
         ret->pushBack(MEDCouplingUMeshBuildQPFromEdge(typ,mapp2,c+cI[*it]+1));  // this call will set quad points to false in the map
       }
-    for(std::map<int, INTERP_KERNEL::NodeWithUsage >::const_iterator it2=mapp2.begin();it2!=mapp2.end();it2++)
+    for(std::map<mcIdType, INTERP_KERNEL::NodeWithUsage >::const_iterator it2=mapp2.begin();it2!=mapp2.end();it2++)
       {
         if((*it2).second.second == INTERP_KERNEL::USAGE_LINEAR)
           mapp[(*it2).second.first]=(*it2).first;
@@ -322,16 +322,16 @@ namespace MEDCoupling
     return ret;
   }
 
-  INTERP_KERNEL::Node *MEDCouplingUMeshBuildQPNode(int nodeId, const double *coo1, int offset1, const double *coo2, int offset2, const std::vector<double>& addCoo)
+  INTERP_KERNEL::Node *MEDCouplingUMeshBuildQPNode(mcIdType nodeId, const double *coo1, mcIdType offset1, const double *coo2, mcIdType offset2, const std::vector<double>& addCoo)
   {
     if(nodeId>=offset2)
       {
-        int locId=nodeId-offset2;
+        mcIdType locId=nodeId-offset2;
         return new INTERP_KERNEL::Node(addCoo[2*locId],addCoo[2*locId+1]);
       }
     if(nodeId>=offset1)
       {
-        int locId=nodeId-offset1;
+        mcIdType locId=nodeId-offset1;
         return new INTERP_KERNEL::Node(coo2[2*locId],coo2[2*locId+1]);
       }
     return new INTERP_KERNEL::Node(coo1[2*nodeId],coo1[2*nodeId+1]);
@@ -340,16 +340,16 @@ namespace MEDCoupling
   /**
    * Construct a mapping between set of Nodes and the standard MEDCoupling connectivity format (c, cI).
    */
-  void MEDCouplingUMeshBuildQPFromMesh3(const double *coo1, int offset1, const double *coo2, int offset2, const std::vector<double>& addCoo,
-                                        const int *desc1Bg, const int *desc1End, const std::vector<std::vector<int> >& intesctEdges1,
-                                        /*output*/std::map<INTERP_KERNEL::Node *,int>& mapp, std::map<int,INTERP_KERNEL::Node *>& mappRev)
+  void MEDCouplingUMeshBuildQPFromMesh3(const double *coo1, mcIdType offset1, const double *coo2, mcIdType offset2, const std::vector<double>& addCoo,
+                                        const mcIdType *desc1Bg, const mcIdType *desc1End, const std::vector<std::vector<mcIdType> >& intesctEdges1,
+                                        /*output*/std::map<INTERP_KERNEL::Node *,mcIdType>& mapp, std::map<mcIdType,INTERP_KERNEL::Node *>& mappRev)
   {
-    for(const int *desc1=desc1Bg;desc1!=desc1End;desc1++)
+    for(const mcIdType *desc1=desc1Bg;desc1!=desc1End;desc1++)
       {
-        int eltId1=abs(*desc1)-1;
-        for(std::vector<int>::const_iterator it1=intesctEdges1[eltId1].begin();it1!=intesctEdges1[eltId1].end();it1++)
+        mcIdType eltId1=std::abs(*desc1)-1;
+        for(std::vector<mcIdType>::const_iterator it1=intesctEdges1[eltId1].begin();it1!=intesctEdges1[eltId1].end();it1++)
           {
-            std::map<int,INTERP_KERNEL::Node *>::const_iterator it=mappRev.find(*it1);
+            std::map<mcIdType,INTERP_KERNEL::Node *>::const_iterator it=mappRev.find(*it1);
             if(it==mappRev.end())
               {
                 INTERP_KERNEL::Node *node=MEDCouplingUMeshBuildQPNode(*it1,coo1,offset1,coo2,offset2,addCoo);
@@ -368,28 +368,28 @@ namespace MEDCoupling
  * \a appendedCoords is a DataArrayDouble instance with number of components equal to one (even if the items are pushed by pair).
  * \param forbiddenPoints the list of points that should not be removed in the process
  */
-bool MEDCouplingUMesh::Colinearize2DCell(const double *coords, const int *connBg, const int *connEnd, int offset,
-                                         const std::map<int, bool>& forbiddenPoints,
-                                         DataArrayInt *newConnOfCell, DataArrayDouble *appendedCoords)
+bool MEDCouplingUMesh::Colinearize2DCell(const double *coords, const mcIdType *connBg, const mcIdType *connEnd, mcIdType offset,
+                                         const std::map<mcIdType, bool>& forbiddenPoints,
+                                         DataArrayIdType *newConnOfCell, DataArrayDouble *appendedCoords)
 {
   std::size_t sz(std::distance(connBg,connEnd));
   if(sz<3)//3 because 2+1(for the cell type) and 2 is the minimal number of edges of 2D cell.
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Colinearize2DCell : the input cell has invalid format !");
   sz--;
-  INTERP_KERNEL::AutoPtr<int> tmpConn(new int[sz]);
-  INTERP_KERNEL::AutoPtr<int> tmpConn2(new int[sz]);
+  INTERP_KERNEL::AutoPtr<mcIdType> tmpConn(new mcIdType[sz]);
+  INTERP_KERNEL::AutoPtr<mcIdType> tmpConn2(new mcIdType[sz]);
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)connBg[0]));
-  unsigned nbs(cm.getNumberOfSons2(connBg+1,sz));
+  unsigned nbs(cm.getNumberOfSons2(connBg+1,ToIdType(sz)));
   unsigned nbOfHit(0); // number of fusions operated
   int posBaseElt(0),posEndElt(0),nbOfTurn(0);
-  const unsigned int maxNbOfHit = cm.isQuadratic() ? nbs-2 : nbs-3;  // a quad cell is authorized to end up with only two edges, a linear one has to keep 3 at least
+  const std::size_t maxNbOfHit = cm.isQuadratic() ? nbs-2 : nbs-3;  // a quad cell is authorized to end up with only two edges, a linear one has to keep 3 at least
   INTERP_KERNEL::NormalizedCellType typeOfSon;
-  std::vector<int> middles;
+  std::vector<mcIdType> middles;
   bool ret(false);
   for(;(nbOfTurn+nbOfHit)<nbs;nbOfTurn++)
     {
-      cm.fillSonCellNodalConnectivity2(posBaseElt,connBg+1,sz,tmpConn,typeOfSon);
-      std::map<MCAuto<INTERP_KERNEL::Node>,int> m;
+      cm.fillSonCellNodalConnectivity2(posBaseElt,connBg+1,ToIdType(sz),tmpConn,typeOfSon);
+      std::map<MCAuto<INTERP_KERNEL::Node>,mcIdType> m;
       INTERP_KERNEL::Edge *e(MEDCouplingUMeshBuildQPFromEdge2(typeOfSon,tmpConn,coords,m));
       posEndElt = posBaseElt+1;
 
@@ -399,9 +399,9 @@ bool MEDCouplingUMesh::Colinearize2DCell(const double *coords, const int *connBg
         {
           for(unsigned i=1;i<nbs && nbOfHit<maxNbOfHit;i++) // 2nd condition is to avoid ending with a cell with one single edge
             {
-              cm.fillSonCellNodalConnectivity2(nbs-i,connBg+1,sz,tmpConn2,typeOfSon);
+              cm.fillSonCellNodalConnectivity2(nbs-i,connBg+1,ToIdType(sz),tmpConn2,typeOfSon);
               // Identify common point:
-              int commPoint = std::find((int *)tmpConn, tmpConn+2, tmpConn2[0]) != tmpConn+2 ? tmpConn2[0] : tmpConn2[1];
+              mcIdType commPoint = std::find((mcIdType *)tmpConn, tmpConn+2, tmpConn2[0]) != tmpConn+2 ? tmpConn2[0] : tmpConn2[1];
               auto itE(forbiddenPoints.end());
               if (forbiddenPoints.find(commPoint) != itE) // is the junction point in the list of points we can not remove?
                 break;
@@ -419,16 +419,16 @@ bool MEDCouplingUMesh::Colinearize2DCell(const double *coords, const int *connBg
               if(!isColinear)
                 break;
               // Update last connectivity
-              std::copy((int *)tmpConn2, tmpConn2+sz, (int *)tmpConn);
+              std::copy((mcIdType *)tmpConn2, tmpConn2+sz, (mcIdType *)tmpConn);
             }
         }
       // Now move forward:
       const unsigned fwdStart = (nbOfTurn == 0 ? 0 : posBaseElt);  // the first element to be inspected going forward
       for(unsigned j=fwdStart+1;j<nbs && nbOfHit<maxNbOfHit;j++)  // 2nd condition is to avoid ending with a cell with one single edge
         {
-          cm.fillSonCellNodalConnectivity2((int)j,connBg+1,sz,tmpConn2,typeOfSon); // get edge #j's connectivity
+          cm.fillSonCellNodalConnectivity2(j,connBg+1,ToIdType(sz),tmpConn2,typeOfSon); // get edge #j's connectivity
           // Identify common point:
-          int commPoint = std::find((int *)tmpConn, tmpConn+2, tmpConn2[0]) != tmpConn+2 ? tmpConn2[0] : tmpConn2[1];
+          mcIdType commPoint = std::find((mcIdType *)tmpConn, tmpConn+2, tmpConn2[0]) != tmpConn+2 ? tmpConn2[0] : tmpConn2[1];
           auto itE(forbiddenPoints.end());
           if (forbiddenPoints.find(commPoint) != itE) // is the junction point in the list of points we can not remove?
             break;
@@ -446,19 +446,19 @@ bool MEDCouplingUMesh::Colinearize2DCell(const double *coords, const int *connBg
           if(!isColinear)
               break;
           // Update last connectivity
-          std::copy((int *)tmpConn2, tmpConn2+sz, (int *)tmpConn);
+          std::copy((mcIdType *)tmpConn2, tmpConn2+sz, (mcIdType *)tmpConn);
         }
       //push [posBaseElt,posEndElt) in newConnOfCell using e
       // The if clauses below are (voluntary) not mutually exclusive: on a quad cell with 2 edges, the end of the connectivity is also its beginning!
       if(nbOfTurn==0)
         // at the beginning of the connectivity (insert type)
-        EnterTheResultOf2DCellFirst(e,posBaseElt,posEndElt,(int)nbs,cm.isQuadratic(),coords,connBg+1,offset,newConnOfCell,appendedCoords,middles);
+        EnterTheResultOf2DCellFirst(e,posBaseElt,posEndElt,nbs,cm.isQuadratic(),coords,connBg+1,offset,newConnOfCell,appendedCoords,middles);
       else if((nbOfHit+nbOfTurn) != (nbs-1))
         // in the middle
-        EnterTheResultOf2DCellMiddle(e,posBaseElt,posEndElt,(int)nbs,cm.isQuadratic(),coords,connBg+1,offset,newConnOfCell,appendedCoords,middles);
+        EnterTheResultOf2DCellMiddle(e,posBaseElt,posEndElt,nbs,cm.isQuadratic(),coords,connBg+1,offset,newConnOfCell,appendedCoords,middles);
       if ((nbOfHit+nbOfTurn) == (nbs-1))
         // at the end (only quad points to deal with)
-        EnterTheResultOf2DCellEnd(e,posBaseElt,posEndElt,(int)nbs,cm.isQuadratic(),coords,connBg+1,offset,newConnOfCell,appendedCoords,middles);
+        EnterTheResultOf2DCellEnd(e,posBaseElt,posEndElt,nbs,cm.isQuadratic(),coords,connBg+1,offset,newConnOfCell,appendedCoords,middles);
       posBaseElt=posEndElt;
       e->decrRef();
     }
@@ -469,14 +469,14 @@ bool MEDCouplingUMesh::Colinearize2DCell(const double *coords, const int *connBg
 
 
 
-bool IsColinearOfACellOf(const std::vector< std::vector<int> >& intersectEdge1, const std::vector<int>& candidates, int start, int stop, int& retVal)
+bool IsColinearOfACellOf(const std::vector< std::vector<mcIdType> >& intersectEdge1, const std::vector<mcIdType>& candidates, mcIdType start, mcIdType stop, mcIdType& retVal)
 {
   if(candidates.empty())
     return false;
-  for(std::vector<int>::const_iterator it=candidates.begin();it!=candidates.end();it++)
+  for(std::vector<mcIdType>::const_iterator it=candidates.begin();it!=candidates.end();it++)
     {
-      const std::vector<int>& pool(intersectEdge1[*it]);
-      int tmp[2]; tmp[0]=start; tmp[1]=stop;
+      const std::vector<mcIdType>& pool(intersectEdge1[*it]);
+      mcIdType tmp[2]; tmp[0]=start; tmp[1]=stop;
       if(std::search(pool.begin(),pool.end(),tmp,tmp+2)!=pool.end())
         {
           retVal=*it+1;
@@ -508,37 +508,37 @@ bool IsColinearOfACellOf(const std::vector< std::vector<int> >& intersectEdge1,
  */
 void MEDCouplingUMesh::BuildIntersectEdges(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2,
                                            const std::vector<double>& addCoo,
-                                           const std::vector< std::vector<int> >& subDiv, std::vector< std::vector<int> >& intersectEdge)
+                                           const std::vector< std::vector<mcIdType> >& subDiv, std::vector< std::vector<mcIdType> >& intersectEdge)
 {
-  int offset1=m1->getNumberOfNodes();
-  int ncell2=m2->getNumberOfCells();
-  const int *c=m2->getNodalConnectivity()->begin();
-  const int *cI=m2->getNodalConnectivityIndex()->begin();
+  mcIdType offset1=m1->getNumberOfNodes();
+  mcIdType ncell2=m2->getNumberOfCells();
+  const mcIdType *c=m2->getNodalConnectivity()->begin();
+  const mcIdType *cI=m2->getNodalConnectivityIndex()->begin();
   const double *coo=m2->getCoords()->begin();
   const double *cooBis=m1->getCoords()->begin();
-  int offset2=offset1+m2->getNumberOfNodes();
+  mcIdType offset2=offset1+m2->getNumberOfNodes();
   intersectEdge.resize(ncell2);
-  for(int i=0;i<ncell2;i++,cI++)
+  for(mcIdType i=0;i<ncell2;i++,cI++)
     {
-      const std::vector<int>& divs=subDiv[i];
-      int nnode=cI[1]-cI[0]-1;
-      std::map<int, INTERP_KERNEL::NodeWithUsage > mapp2;
-      std::map<INTERP_KERNEL::Node *, int> mapp22;
-      for(int j=0;j<nnode;j++)
+      const std::vector<mcIdType>& divs=subDiv[i];
+      mcIdType nnode=cI[1]-cI[0]-1;
+      std::map<mcIdType, INTERP_KERNEL::NodeWithUsage > mapp2;
+      std::map<INTERP_KERNEL::Node *, mcIdType> mapp22;
+      for(mcIdType j=0;j<nnode;j++)
         {
           INTERP_KERNEL::Node *nn=new INTERP_KERNEL::Node(coo[2*c[(*cI)+j+1]],coo[2*c[(*cI)+j+1]+1]);
-          int nnid=c[(*cI)+j+1];
+          mcIdType nnid=c[(*cI)+j+1];
           mapp2[nnid]=INTERP_KERNEL::NodeWithUsage(nn,INTERP_KERNEL::USAGE_UNKNOWN);
           mapp22[nn]=nnid+offset1;
         }
       INTERP_KERNEL::Edge *e=MEDCouplingUMeshBuildQPFromEdge((INTERP_KERNEL::NormalizedCellType)c[*cI],mapp2,c+(*cI)+1);
-      for(std::map<int, INTERP_KERNEL::NodeWithUsage >::const_iterator it=mapp2.begin();it!=mapp2.end();it++)
+      for(std::map<mcIdType, INTERP_KERNEL::NodeWithUsage >::const_iterator it=mapp2.begin();it!=mapp2.end();it++)
         ((*it).second.first)->decrRef();
       std::vector<INTERP_KERNEL::Node *> addNodes(divs.size());
-      std::map<INTERP_KERNEL::Node *,int> mapp3;
+      std::map<INTERP_KERNEL::Node *,mcIdType> mapp3;
       for(std::size_t j=0;j<divs.size();j++)
         {
-          int id=divs[j];
+          mcIdType id=divs[j];
           INTERP_KERNEL::Node *tmp=0;
           if(id<offset1)
             tmp=new INTERP_KERNEL::Node(cooBis[2*id],cooBis[2*id+1]);
@@ -556,35 +556,35 @@ void MEDCouplingUMesh::BuildIntersectEdges(const MEDCouplingUMesh *m1, const MED
     }
 }
 
-MEDCouplingUMesh *BuildMesh1DCutFrom(const MEDCouplingUMesh *mesh1D, const std::vector< std::vector<int> >& intersectEdge2, const DataArrayDouble *coords1, const std::vector<double>& addCoo, const std::map<int,int>& mergedNodes, const std::vector< std::vector<int> >& colinear2, const std::vector< std::vector<int> >& intersectEdge1,
-                                     MCAuto<DataArrayInt>& idsInRetColinear, MCAuto<DataArrayInt>& idsInMesh1DForIdsInRetColinear)
+MEDCouplingUMesh *BuildMesh1DCutFrom(const MEDCouplingUMesh *mesh1D, const std::vector< std::vector<mcIdType> >& intersectEdge2, const DataArrayDouble *coords1, const std::vector<double>& addCoo, const std::map<mcIdType,mcIdType>& mergedNodes, const std::vector< std::vector<mcIdType> >& colinear2, const std::vector< std::vector<mcIdType> >& intersectEdge1,
+                                     MCAuto<DataArrayIdType>& idsInRetColinear, MCAuto<DataArrayIdType>& idsInMesh1DForIdsInRetColinear)
 {
-  idsInRetColinear=DataArrayInt::New(); idsInRetColinear->alloc(0,1);
-  idsInMesh1DForIdsInRetColinear=DataArrayInt::New(); idsInMesh1DForIdsInRetColinear->alloc(0,1);
-  int nCells(mesh1D->getNumberOfCells());
-  if(nCells!=(int)intersectEdge2.size())
+  idsInRetColinear=DataArrayIdType::New(); idsInRetColinear->alloc(0,1);
+  idsInMesh1DForIdsInRetColinear=DataArrayIdType::New(); idsInMesh1DForIdsInRetColinear->alloc(0,1);
+  mcIdType nCells=mesh1D->getNumberOfCells();
+  if(nCells!=ToIdType(intersectEdge2.size()))
     throw INTERP_KERNEL::Exception("BuildMesh1DCutFrom : internal error # 1 !");
   const DataArrayDouble *coo2(mesh1D->getCoords());
-  const int *c(mesh1D->getNodalConnectivity()->begin()),*ci(mesh1D->getNodalConnectivityIndex()->begin());
+  const mcIdType *c(mesh1D->getNodalConnectivity()->begin()),*ci(mesh1D->getNodalConnectivityIndex()->begin());
   const double *coo2Ptr(coo2->begin());
-  int offset1(coords1->getNumberOfTuples());
-  int offset2(offset1+coo2->getNumberOfTuples());
-  int offset3(offset2+addCoo.size()/2);
+  mcIdType offset1(coords1->getNumberOfTuples());
+  mcIdType offset2(offset1+coo2->getNumberOfTuples());
+  mcIdType offset3(offset2+ToIdType(addCoo.size())/2);
   std::vector<double> addCooQuad;
-  MCAuto<DataArrayInt> cOut(DataArrayInt::New()),ciOut(DataArrayInt::New()); cOut->alloc(0,1); ciOut->alloc(1,1); ciOut->setIJ(0,0,0);
-  int tmp[4],cicnt(0),kk(0);
-  for(int i=0;i<nCells;i++)
+  MCAuto<DataArrayIdType> cOut(DataArrayIdType::New()),ciOut(DataArrayIdType::New()); cOut->alloc(0,1); ciOut->alloc(1,1); ciOut->setIJ(0,0,0);
+  mcIdType tmp[4],cicnt(0),kk(0);
+  for(mcIdType i=0;i<nCells;i++)
     {
-      std::map<MCAuto<INTERP_KERNEL::Node>,int> m;
+      std::map<MCAuto<INTERP_KERNEL::Node>,mcIdType> m;
       INTERP_KERNEL::Edge *e(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)c[ci[i]],c+ci[i]+1,coo2Ptr,m));
-      const std::vector<int>& subEdges(intersectEdge2[i]);
-      int nbSubEdge(subEdges.size()/2);
-      for(int j=0;j<nbSubEdge;j++,kk++)
+      const std::vector<mcIdType>& subEdges(intersectEdge2[i]);
+      mcIdType nbSubEdge=ToIdType(subEdges.size()/2);
+      for(mcIdType j=0;j<nbSubEdge;j++,kk++)
         {
           MCAuto<INTERP_KERNEL::Node> n1(MEDCouplingUMeshBuildQPNode(subEdges[2*j],coords1->begin(),offset1,coo2Ptr,offset2,addCoo)),n2(MEDCouplingUMeshBuildQPNode(subEdges[2*j+1],coords1->begin(),offset1,coo2Ptr,offset2,addCoo));
           MCAuto<INTERP_KERNEL::Edge> e2(e->buildEdgeLyingOnMe(n1,n2));
           INTERP_KERNEL::Edge *e2Ptr(e2);
-          std::map<int,int>::const_iterator itm;
+          std::map<mcIdType,mcIdType>::const_iterator itm;
           if(dynamic_cast<INTERP_KERNEL::EdgeArcCircle *>(e2Ptr))
             {
               tmp[0]=INTERP_KERNEL::NORM_SEG3;
@@ -592,7 +592,7 @@ MEDCouplingUMesh *BuildMesh1DCutFrom(const MEDCouplingUMesh *mesh1D, const std::
               tmp[1]=itm!=mergedNodes.end()?(*itm).second:subEdges[2*j];
               itm=mergedNodes.find(subEdges[2*j+1]);
               tmp[2]=itm!=mergedNodes.end()?(*itm).second:subEdges[2*j+1];
-              tmp[3]=offset3+(int)addCooQuad.size()/2;
+              tmp[3]=offset3+ToIdType(addCooQuad.size()/2);
               double tmp2[2];
               e2->getBarycenter(tmp2); addCooQuad.insert(addCooQuad.end(),tmp2,tmp2+2);
               cicnt+=4;
@@ -610,7 +610,7 @@ MEDCouplingUMesh *BuildMesh1DCutFrom(const MEDCouplingUMesh *mesh1D, const std::
               cOut->insertAtTheEnd(tmp,tmp+3);
               ciOut->pushBackSilent(cicnt);
             }
-          int tmp00;
+          mcIdType tmp00;
           if(IsColinearOfACellOf(intersectEdge1,colinear2[i],tmp[1],tmp[2],tmp00))
             {
               idsInRetColinear->pushBackSilent(kk);
@@ -622,8 +622,8 @@ MEDCouplingUMesh *BuildMesh1DCutFrom(const MEDCouplingUMesh *mesh1D, const std::
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::New(mesh1D->getName(),1));
   ret->setConnectivity(cOut,ciOut,true);
   MCAuto<DataArrayDouble> arr3(DataArrayDouble::New());
-  arr3->useArray(&addCoo[0],false,DeallocType::C_DEALLOC,(int)addCoo.size()/2,2);
-  MCAuto<DataArrayDouble> arr4(DataArrayDouble::New()); arr4->useArray(&addCooQuad[0],false,DeallocType::C_DEALLOC,(int)addCooQuad.size()/2,2);
+  arr3->useArray(&addCoo[0],false,DeallocType::C_DEALLOC,addCoo.size()/2,2);
+  MCAuto<DataArrayDouble> arr4(DataArrayDouble::New()); arr4->useArray(&addCooQuad[0],false,DeallocType::C_DEALLOC,addCooQuad.size()/2,2);
   std::vector<const DataArrayDouble *> coordss(4);
   coordss[0]=coords1; coordss[1]=mesh1D->getCoords(); coordss[2]=arr3; coordss[3]=arr4;
   MCAuto<DataArrayDouble> arr(DataArrayDouble::Aggregate(coordss));
@@ -631,12 +631,12 @@ MEDCouplingUMesh *BuildMesh1DCutFrom(const MEDCouplingUMesh *mesh1D, const std::
   return ret.retn();
 }
 
-MEDCouplingUMesh *BuildRefined2DCellLinear(const DataArrayDouble *coords, const int *descBg, const int *descEnd, const std::vector< std::vector<int> >& intersectEdge1)
+MEDCouplingUMesh *BuildRefined2DCellLinear(const DataArrayDouble *coords, const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector<mcIdType> >& intersectEdge1)
 {
-  std::vector<int> allEdges;
-  for(const int *it2(descBg);it2!=descEnd;it2++)
+  std::vector<mcIdType> allEdges;
+  for(const mcIdType *it2(descBg);it2!=descEnd;it2++)
     {
-      const std::vector<int>& edge1(intersectEdge1[std::abs(*it2)-1]);
+      const std::vector<mcIdType>& edge1(intersectEdge1[std::abs(*it2)-1]);
       if(*it2>0)
         allEdges.insert(allEdges.end(),edge1.begin(),edge1.end());
       else
@@ -649,31 +649,31 @@ MEDCouplingUMesh *BuildRefined2DCellLinear(const DataArrayDouble *coords, const
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::New("",2));
   ret->setCoords(coords);
   ret->allocateCells(1);
-  std::vector<int> connOut(nbOfEdgesOf2DCellSplit);
+  std::vector<mcIdType> connOut(nbOfEdgesOf2DCellSplit);
   for(std::size_t kk=0;kk<nbOfEdgesOf2DCellSplit;kk++)
     connOut[kk]=allEdges[2*kk];
-  ret->insertNextCell(INTERP_KERNEL::NORM_POLYGON,connOut.size(),&connOut[0]);
+  ret->insertNextCell(INTERP_KERNEL::NORM_POLYGON,ToIdType(connOut.size()),&connOut[0]);
   return ret.retn();
 }
 
-MEDCouplingUMesh *BuildRefined2DCellQuadratic(const DataArrayDouble *coords, const MEDCouplingUMesh *mesh2D, int cellIdInMesh2D, const int *descBg, const int *descEnd, const std::vector< std::vector<int> >& intersectEdge1)
+MEDCouplingUMesh *BuildRefined2DCellQuadratic(const DataArrayDouble *coords, const MEDCouplingUMesh *mesh2D, mcIdType cellIdInMesh2D, const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector<mcIdType> >& intersectEdge1)
 {
-  const int *c(mesh2D->getNodalConnectivity()->begin()),*ci(mesh2D->getNodalConnectivityIndex()->begin());
+  const mcIdType *c(mesh2D->getNodalConnectivity()->begin()),*ci(mesh2D->getNodalConnectivityIndex()->begin());
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)c[ci[cellIdInMesh2D]]));
-  std::size_t ii(0);
+  int ii(0);
   unsigned sz(cm.getNumberOfSons2(c+ci[cellIdInMesh2D]+1,ci[cellIdInMesh2D+1]-ci[cellIdInMesh2D]-1));
   if(sz!=std::distance(descBg,descEnd))
     throw INTERP_KERNEL::Exception("BuildRefined2DCellQuadratic : internal error 1 !");
-  INTERP_KERNEL::AutoPtr<int> tmpPtr(new int[ci[cellIdInMesh2D+1]-ci[cellIdInMesh2D]]);
-  std::vector<int> allEdges,centers;
+  INTERP_KERNEL::AutoPtr<mcIdType> tmpPtr(new mcIdType[ci[cellIdInMesh2D+1]-ci[cellIdInMesh2D]]);
+  std::vector<mcIdType> allEdges,centers;
   const double *coordsPtr(coords->begin());
   MCAuto<DataArrayDouble> addCoo(DataArrayDouble::New()); addCoo->alloc(0,1);
-  int offset(coords->getNumberOfTuples());
-  for(const int *it2(descBg);it2!=descEnd;it2++,ii++)
+  mcIdType offset(coords->getNumberOfTuples());
+  for(const mcIdType *it2(descBg);it2!=descEnd;it2++,ii++)
     {
       INTERP_KERNEL::NormalizedCellType typeOfSon;
       cm.fillSonCellNodalConnectivity2(ii,c+ci[cellIdInMesh2D]+1,ci[cellIdInMesh2D+1]-ci[cellIdInMesh2D]-1,tmpPtr,typeOfSon);
-      const std::vector<int>& edge1(intersectEdge1[std::abs(*it2)-1]);
+      const std::vector<mcIdType>& edge1(intersectEdge1[std::abs(*it2)-1]);
       if(*it2>0)
         allEdges.insert(allEdges.end(),edge1.begin(),edge1.end());
       else
@@ -682,11 +682,11 @@ MEDCouplingUMesh *BuildRefined2DCellQuadratic(const DataArrayDouble *coords, con
         centers.push_back(tmpPtr[2]);//special case where no subsplit of edge -> reuse the original center.
       else
         {//the current edge has been subsplit -> create corresponding centers.
-          std::size_t nbOfCentersToAppend(edge1.size()/2);
-          std::map< MCAuto<INTERP_KERNEL::Node>,int> m;
+          mcIdType nbOfCentersToAppend=ToIdType(edge1.size()/2);
+          std::map< MCAuto<INTERP_KERNEL::Node>,mcIdType> m;
           MCAuto<INTERP_KERNEL::Edge> ee(MEDCouplingUMeshBuildQPFromEdge2(typeOfSon,tmpPtr,coordsPtr,m));
-          std::vector<int>::const_iterator it3(allEdges.end()-edge1.size());
-          for(std::size_t k=0;k<nbOfCentersToAppend;k++)
+          std::vector<mcIdType>::const_iterator it3(allEdges.end()-edge1.size());
+          for(mcIdType k=0;k<nbOfCentersToAppend;k++)
             {
               double tmpp[2];
               const double *aa(coordsPtr+2*(*it3++));
@@ -711,11 +711,11 @@ MEDCouplingUMesh *BuildRefined2DCellQuadratic(const DataArrayDouble *coords, con
       ret->setCoords(addCoo);
     }
   ret->allocateCells(1);
-  std::vector<int> connOut(nbOfEdgesOf2DCellSplit);
+  std::vector<mcIdType> connOut(nbOfEdgesOf2DCellSplit);
   for(std::size_t kk=0;kk<nbOfEdgesOf2DCellSplit;kk++)
     connOut[kk]=allEdges[2*kk];
   connOut.insert(connOut.end(),centers.begin(),centers.end());
-  ret->insertNextCell(INTERP_KERNEL::NORM_QPOLYG,connOut.size(),&connOut[0]);
+  ret->insertNextCell(INTERP_KERNEL::NORM_QPOLYG,ToIdType(connOut.size()),&connOut[0]);
   return ret.retn();
 }
 
@@ -725,7 +725,7 @@ MEDCouplingUMesh *BuildRefined2DCellQuadratic(const DataArrayDouble *coords, con
  *
  * \param [in] mesh2D - The origin 2D mesh. \b Warning \b coords are not those of \a mesh2D. But mesh2D->getCoords()==coords[:mesh2D->getNumberOfNodes()]
  */
-MEDCouplingUMesh *BuildRefined2DCell(const DataArrayDouble *coords, const MEDCouplingUMesh *mesh2D, int cellIdInMesh2D, const int *descBg, const int *descEnd, const std::vector< std::vector<int> >& intersectEdge1)
+MEDCouplingUMesh *BuildRefined2DCell(const DataArrayDouble *coords, const MEDCouplingUMesh *mesh2D, mcIdType cellIdInMesh2D, const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector<mcIdType> >& intersectEdge1)
 {
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(mesh2D->getTypeOfCell(cellIdInMesh2D)));
   if(!cm.isQuadratic())
@@ -734,7 +734,7 @@ MEDCouplingUMesh *BuildRefined2DCell(const DataArrayDouble *coords, const MEDCou
     return BuildRefined2DCellQuadratic(coords,mesh2D,cellIdInMesh2D,descBg,descEnd,intersectEdge1);
 }
 
-void AddCellInMesh2D(MEDCouplingUMesh *mesh2D, const std::vector<int>& conn, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edges)
+void AddCellInMesh2D(MEDCouplingUMesh *mesh2D, const std::vector<mcIdType>& conn, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edges)
 {
   bool isQuad(false);
   for(std::vector< MCAuto<INTERP_KERNEL::Edge> >::const_iterator it=edges.begin();it!=edges.end();it++)
@@ -744,25 +744,25 @@ void AddCellInMesh2D(MEDCouplingUMesh *mesh2D, const std::vector<int>& conn, con
         isQuad=true;
     }
   if(!isQuad)
-    mesh2D->insertNextCell(INTERP_KERNEL::NORM_POLYGON,conn.size(),&conn[0]);
+    mesh2D->insertNextCell(INTERP_KERNEL::NORM_POLYGON,ToIdType(conn.size()),&conn[0]);
   else
     {
       const double *coo(mesh2D->getCoords()->begin());
       std::size_t sz(conn.size());
       std::vector<double> addCoo;
-      std::vector<int> conn2(conn);
-      int offset(mesh2D->getNumberOfNodes());
+      std::vector<mcIdType> conn2(conn);
+      mcIdType offset(mesh2D->getNumberOfNodes());
       for(std::size_t i=0;i<sz;i++)
         {
           double tmp[2];
           edges[(i+1)%sz]->getMiddleOfPoints(coo+2*conn[i],coo+2*conn[(i+1)%sz],tmp);// tony a chier i+1 -> i
           addCoo.insert(addCoo.end(),tmp,tmp+2);
-          conn2.push_back(offset+(int)i);
+          conn2.push_back(offset+ToIdType(i));
         }
       mesh2D->getCoords()->rearrange(1);
       mesh2D->getCoords()->pushBackValsSilent(&addCoo[0],&addCoo[0]+addCoo.size());
       mesh2D->getCoords()->rearrange(2);
-      mesh2D->insertNextCell(INTERP_KERNEL::NORM_QPOLYG,conn2.size(),&conn2[0]);
+      mesh2D->insertNextCell(INTERP_KERNEL::NORM_QPOLYG,ToIdType(conn2.size()),&conn2[0]);
     }
 }
 
@@ -772,23 +772,23 @@ void AddCellInMesh2D(MEDCouplingUMesh *mesh2D, const std::vector<int>& conn, con
  * This method cuts in 2 parts the input 2D cell given using boundaries description (\a edge1Bis and \a edge1BisPtr) using
  * a set of edges defined in \a splitMesh1D.
  */
-void BuildMesh2DCutInternal2(const MEDCouplingUMesh *splitMesh1D, const std::vector<int>& edge1Bis, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edge1BisPtr,
-                             std::vector< std::vector<int> >& out0, std::vector< std::vector< MCAuto<INTERP_KERNEL::Edge> > >& out1)
+void BuildMesh2DCutInternal2(const MEDCouplingUMesh *splitMesh1D, const std::vector<mcIdType>& edge1Bis, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edge1BisPtr,
+                             std::vector< std::vector<mcIdType> >& out0, std::vector< std::vector< MCAuto<INTERP_KERNEL::Edge> > >& out1)
 {
   std::size_t nb(edge1Bis.size()/2);
   std::size_t nbOfEdgesOf2DCellSplit(nb/2);
-  int iEnd(splitMesh1D->getNumberOfCells());
+  mcIdType iEnd=splitMesh1D->getNumberOfCells();
   if(iEnd==0)
     throw INTERP_KERNEL::Exception("BuildMesh2DCutInternal2 : internal error ! input 1D mesh must have at least one cell !");
   std::size_t ii,jj;
-  const int *cSplitPtr(splitMesh1D->getNodalConnectivity()->begin()),*ciSplitPtr(splitMesh1D->getNodalConnectivityIndex()->begin());
+  const mcIdType *cSplitPtr(splitMesh1D->getNodalConnectivity()->begin()),*ciSplitPtr(splitMesh1D->getNodalConnectivityIndex()->begin());
   for(ii=0;ii<nb && edge1Bis[2*ii]!=cSplitPtr[ciSplitPtr[0]+1];ii++);
   for(jj=ii;jj<nb && edge1Bis[2*jj+1]!=cSplitPtr[ciSplitPtr[iEnd-1]+2];jj++);
   //
   if(jj==nb)
     {//the edges splitMesh1D[iStart:iEnd] does not fully cut the current 2D cell -> single output cell
       out0.resize(1); out1.resize(1);
-      std::vector<int>& connOut(out0[0]);
+      std::vector<mcIdType>& connOut(out0[0]);
       connOut.resize(nbOfEdgesOf2DCellSplit);
       std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr(out1[0]);
       edgesPtr.resize(nbOfEdgesOf2DCellSplit);
@@ -802,25 +802,25 @@ void BuildMesh2DCutInternal2(const MEDCouplingUMesh *splitMesh1D, const std::vec
     {
       // [i,iEnd[ contains the
       out0.resize(2); out1.resize(2);
-      std::vector<int>& connOutLeft(out0[0]);
-      std::vector<int>& connOutRight(out0[1]);//connOutLeft should end with edge1Bis[2*ii] and connOutRight should end with edge1Bis[2*jj+1]
+      std::vector<mcIdType>& connOutLeft(out0[0]);
+      std::vector<mcIdType>& connOutRight(out0[1]);//connOutLeft should end with edge1Bis[2*ii] and connOutRight should end with edge1Bis[2*jj+1]
       std::vector< MCAuto<INTERP_KERNEL::Edge> >& eleft(out1[0]);
       std::vector< MCAuto<INTERP_KERNEL::Edge> >& eright(out1[1]);
       for(std::size_t k=ii;k<jj+1;k++)
         { connOutLeft.push_back(edge1Bis[2*k+1]); eleft.push_back(edge1BisPtr[2*k+1]); }
       std::vector< MCAuto<INTERP_KERNEL::Edge> > ees(iEnd);
-      for(int ik=0;ik<iEnd;ik++)
+      for(mcIdType ik=0;ik<iEnd;ik++)
         {
-          std::map< MCAuto<INTERP_KERNEL::Node>,int> m;
+          std::map< MCAuto<INTERP_KERNEL::Node>,mcIdType> m;
           MCAuto<INTERP_KERNEL::Edge> ee(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)cSplitPtr[ciSplitPtr[ik]],cSplitPtr+ciSplitPtr[ik]+1,splitMesh1D->getCoords()->begin(),m));
           ees[ik]=ee;
         }
-      for(int ik=iEnd-1;ik>=0;ik--)
+      for(mcIdType ik=iEnd-1;ik>=0;ik--)
         connOutLeft.push_back(cSplitPtr[ciSplitPtr[ik]+1]);
       for(std::size_t k=jj+1;k<nbOfEdgesOf2DCellSplit+ii;k++)
         { connOutRight.push_back(edge1Bis[2*k+1]); eright.push_back(edge1BisPtr[2*k+1]); }
       eleft.insert(eleft.end(),ees.rbegin(),ees.rend());
-      for(int ik=0;ik<iEnd;ik++)
+      for(mcIdType ik=0;ik<iEnd;ik++)
         connOutRight.push_back(cSplitPtr[ciSplitPtr[ik]+2]);
       eright.insert(eright.end(),ees.begin(),ees.end());
     }
@@ -830,16 +830,16 @@ struct CellInfo
 {
 public:
   CellInfo() { }
-  CellInfo(const std::vector<int>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr);
+  CellInfo(const std::vector<mcIdType>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr);
 public:
-  std::vector<int> _edges;
+  std::vector<mcIdType> _edges;
   std::vector< MCAuto<INTERP_KERNEL::Edge> > _edges_ptr;
 };
 
-CellInfo::CellInfo(const std::vector<int>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr)
+CellInfo::CellInfo(const std::vector<mcIdType>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr)
 {
   std::size_t nbe(edges.size());
-  std::vector<int> edges2(2*nbe); std::vector< MCAuto<INTERP_KERNEL::Edge> > edgesPtr2(2*nbe);
+  std::vector<mcIdType> edges2(2*nbe); std::vector< MCAuto<INTERP_KERNEL::Edge> > edgesPtr2(2*nbe);
   for(std::size_t i=0;i<nbe;i++)
     {
       edges2[2*i]=edges[i]; edges2[2*i+1]=edges[(i+1)%nbe];
@@ -853,24 +853,24 @@ CellInfo::CellInfo(const std::vector<int>& edges, const std::vector< MCAuto<INTE
 class EdgeInfo
 {
 public:
-  EdgeInfo(int istart, int iend, const MCAuto<MEDCouplingUMesh>& mesh):_istart(istart),_iend(iend),_mesh(mesh),_left(-7),_right(-7) { }
-  EdgeInfo(int istart, int iend, int pos, const MCAuto<INTERP_KERNEL::Edge>& edge):_istart(istart),_iend(iend),_edge(edge),_left(pos),_right(pos+1) { }
-  bool isInMyRange(int pos) const { return pos>=_istart && pos<_iend; }
-  void somethingHappendAt(int pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight);
-  void feedEdgeInfoAt(double eps, const MEDCouplingUMesh *mesh2D, int offset, int neighbors[2]) const;
+  EdgeInfo(mcIdType istart, mcIdType iend, const MCAuto<MEDCouplingUMesh>& mesh):_istart(istart),_iend(iend),_mesh(mesh),_left(-7),_right(-7) { }
+  EdgeInfo(mcIdType istart, mcIdType iend, mcIdType pos, const MCAuto<INTERP_KERNEL::Edge>& edge):_istart(istart),_iend(iend),_edge(edge),_left(pos),_right(pos+1) { }
+  bool isInMyRange(mcIdType pos) const { return pos>=_istart && pos<_iend; }
+  void somethingHappendAt(mcIdType pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight);
+  void feedEdgeInfoAt(double eps, const MEDCouplingUMesh *mesh2D, mcIdType offset, mcIdType neighbors[2]) const;
 private:
-  int _istart;
-  int _iend;
+  mcIdType _istart;
+  mcIdType _iend;
   MCAuto<MEDCouplingUMesh> _mesh;
   MCAuto<INTERP_KERNEL::Edge> _edge;
-  int _left;    // index (local numbering) of the left 2D cell bordering the edge '_edge'
-  int _right;   // same as above, right side.
+  mcIdType _left;    // index (local numbering) of the left 2D cell bordering the edge '_edge'
+  mcIdType _right;   // same as above, right side.
 };
 
 /*
  * Update indices of left and right 2D cell bordering the current edge.
  */
-void EdgeInfo::somethingHappendAt(int pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight)
+void EdgeInfo::somethingHappendAt(mcIdType pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight)
 {
   const MEDCouplingUMesh *mesh(_mesh);
   if(mesh)
@@ -913,7 +913,7 @@ void EdgeInfo::somethingHappendAt(int pos, const std::vector< MCAuto<INTERP_KERN
     }
 }
 
-void EdgeInfo::feedEdgeInfoAt(double eps, const MEDCouplingUMesh *mesh2D, int offset, int neighbors[2]) const
+void EdgeInfo::feedEdgeInfoAt(double eps, const MEDCouplingUMesh *mesh2D, mcIdType offset, mcIdType neighbors[2]) const
 {
   const MEDCouplingUMesh *mesh(_mesh);
   if(!mesh)
@@ -930,7 +930,7 @@ void EdgeInfo::feedEdgeInfoAt(double eps, const MEDCouplingUMesh *mesh2D, int of
       else
         {
           MCAuto<DataArrayDouble> barys(mesh->computeCellCenterOfMass());
-          int cellId(mesh2D->getCellContainingPoint(barys->begin(),eps));
+          mcIdType cellId(mesh2D->getCellContainingPoint(barys->begin(),eps));
           if(cellId==-1)
             throw INTERP_KERNEL::Exception("EdgeInfo::feedEdgeInfoAt : internal error !");
           neighbors[0]=offset+cellId; neighbors[1]=offset+cellId;
@@ -941,32 +941,32 @@ void EdgeInfo::feedEdgeInfoAt(double eps, const MEDCouplingUMesh *mesh2D, int of
 class VectorOfCellInfo
 {
 public:
-  VectorOfCellInfo(const std::vector<int>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr);
+  VectorOfCellInfo(const std::vector<mcIdType>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr);
   std::size_t size() const { return _pool.size(); }
-  int getPositionOf(double eps, const MEDCouplingUMesh *mesh) const;
-  void setMeshAt(std::size_t pos, const MCAuto<MEDCouplingUMesh>& mesh, int istart, int iend, const MCAuto<MEDCouplingUMesh>& mesh1DInCase, const std::vector< std::vector<int> >& edges, const std::vector< std::vector< MCAuto<INTERP_KERNEL::Edge> > >& edgePtrs);
-  const std::vector<int>& getConnOf(int pos) const { return get(pos)._edges; }
-  const std::vector< MCAuto<INTERP_KERNEL::Edge> >& getEdgePtrOf(int pos) const { return get(pos)._edges_ptr; }
+  mcIdType getPositionOf(double eps, const MEDCouplingUMesh *mesh) const;
+  void setMeshAt(mcIdType pos, const MCAuto<MEDCouplingUMesh>& mesh, mcIdType istart, mcIdType iend, const MCAuto<MEDCouplingUMesh>& mesh1DInCase, const std::vector< std::vector<mcIdType> >& edges, const std::vector< std::vector< MCAuto<INTERP_KERNEL::Edge> > >& edgePtrs);
+  const std::vector<mcIdType>& getConnOf(mcIdType pos) const { return get(pos)._edges; }
+  const std::vector< MCAuto<INTERP_KERNEL::Edge> >& getEdgePtrOf(mcIdType pos) const { return get(pos)._edges_ptr; }
   MCAuto<MEDCouplingUMesh> getZeMesh() const { return _ze_mesh; }
-  void feedEdgeInfoAt(double eps, int pos, int offset, int neighbors[2]) const;
+  void feedEdgeInfoAt(double eps, mcIdType pos, mcIdType offset, mcIdType neighbors[2]) const;
 private:
-  int getZePosOfEdgeGivenItsGlobalId(int pos) const;
-  void updateEdgeInfo(int pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight);
-  const CellInfo& get(int pos) const;
-  CellInfo& get(int pos);
+  mcIdType getZePosOfEdgeGivenItsGlobalId(mcIdType pos) const;
+  void updateEdgeInfo(mcIdType pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight);
+  const CellInfo& get(mcIdType pos) const;
+  CellInfo& get(mcIdType pos);
 private:
-  std::vector<CellInfo> _pool;         // for a newly created 2D cell, the list of edges (int) and edges ptr constiuing it
+  std::vector<CellInfo> _pool;         // for a newly created 2D cell, the list of edges ToIdType( and edges ptr constiuing it
   MCAuto<MEDCouplingUMesh> _ze_mesh;   // the aggregated mesh
   std::vector<EdgeInfo> _edge_info;    // for each new edge added when cuting the 2D cell, the information on left and right bordering 2D cell
 };
 
-VectorOfCellInfo::VectorOfCellInfo(const std::vector<int>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr):_pool(1)
+VectorOfCellInfo::VectorOfCellInfo(const std::vector<mcIdType>& edges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& edgesPtr):_pool(1)
 {
   _pool[0]._edges=edges;
   _pool[0]._edges_ptr=edgesPtr;
 }
 
-int VectorOfCellInfo::getPositionOf(double eps, const MEDCouplingUMesh *mesh) const
+mcIdType VectorOfCellInfo::getPositionOf(double eps, const MEDCouplingUMesh *mesh) const
 {
   if(_pool.empty())
     throw INTERP_KERNEL::Exception("VectorOfCellSplitter::getPositionOf : empty !");
@@ -979,8 +979,8 @@ int VectorOfCellInfo::getPositionOf(double eps, const MEDCouplingUMesh *mesh) co
   return zeMesh->getCellContainingPoint(barys->begin(),eps);
 }
 
-void VectorOfCellInfo::setMeshAt(std::size_t pos, const MCAuto<MEDCouplingUMesh>& mesh, int istart, int iend,
-                                 const MCAuto<MEDCouplingUMesh>& mesh1DInCase, const std::vector< std::vector<int> >& edges,
+void VectorOfCellInfo::setMeshAt(mcIdType pos, const MCAuto<MEDCouplingUMesh>& mesh, mcIdType istart, mcIdType iend,
+                                 const MCAuto<MEDCouplingUMesh>& mesh1DInCase, const std::vector< std::vector<mcIdType> >& edges,
                                  const std::vector< std::vector< MCAuto<INTERP_KERNEL::Edge> > >& edgePtrs)
 {
   get(pos);//to check pos
@@ -993,11 +993,11 @@ void VectorOfCellInfo::setMeshAt(std::size_t pos, const MCAuto<MEDCouplingUMesh>
     _edge_info.push_back(EdgeInfo(istart,iend,pos,edgePtrs[0].back()));
   //
   std::vector<CellInfo> pool(_pool.size()-1+sz);
-  for(std::size_t i=0;i<pos;i++)
+  for(mcIdType i=0;i<pos;i++)
     pool[i]=_pool[i];
   for(std::size_t j=0;j<sz;j++)
     pool[pos+j]=CellInfo(edges[j],edgePtrs[j]);
-  for(int i=pos+1;i<(int)_pool.size();i++)
+  for(std::size_t i=pos+1;i<_pool.size();i++)
     pool[i+sz-1]=_pool[i];
   _pool=pool;
   //
@@ -1028,16 +1028,16 @@ void VectorOfCellInfo::setMeshAt(std::size_t pos, const MCAuto<MEDCouplingUMesh>
   _ze_mesh=MEDCouplingUMesh::MergeUMeshesOnSameCoords(ms2);
 }
 
-void VectorOfCellInfo::feedEdgeInfoAt(double eps, int pos, int offset, int neighbors[2]) const
+void VectorOfCellInfo::feedEdgeInfoAt(double eps, mcIdType pos, mcIdType offset, mcIdType neighbors[2]) const
 {
   _edge_info[getZePosOfEdgeGivenItsGlobalId(pos)].feedEdgeInfoAt(eps,_ze_mesh,offset,neighbors);
 }
 
-int VectorOfCellInfo::getZePosOfEdgeGivenItsGlobalId(int pos) const
+mcIdType VectorOfCellInfo::getZePosOfEdgeGivenItsGlobalId(mcIdType pos) const
 {
   if(pos<0)
     throw INTERP_KERNEL::Exception("VectorOfCellInfo::getZePosOfEdgeGivenItsGlobalId : invalid id ! Must be >=0 !");
-  int ret(0);
+  mcIdType ret(0);
   for(std::vector<EdgeInfo>::const_iterator it=_edge_info.begin();it!=_edge_info.end();it++,ret++)
     {
       if((*it).isInMyRange(pos))
@@ -1046,7 +1046,7 @@ int VectorOfCellInfo::getZePosOfEdgeGivenItsGlobalId(int pos) const
   throw INTERP_KERNEL::Exception("VectorOfCellInfo::getZePosOfEdgeGivenItsGlobalId : invalid id !");
 }
 
-void VectorOfCellInfo::updateEdgeInfo(int pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight)
+void VectorOfCellInfo::updateEdgeInfo(mcIdType pos, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newLeft, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& newRight)
 {
   get(pos);//to perform the sanity check;
   if(_edge_info.empty())
@@ -1056,16 +1056,16 @@ void VectorOfCellInfo::updateEdgeInfo(int pos, const std::vector< MCAuto<INTERP_
     _edge_info[i].somethingHappendAt(pos,newLeft,newRight);
 }
 
-const CellInfo& VectorOfCellInfo::get(int pos) const
+const CellInfo& VectorOfCellInfo::get(mcIdType pos) const
 {
-  if(pos<0 || pos>=(int)_pool.size())
+  if(pos<0 || pos>=ToIdType(_pool.size()))
     throw INTERP_KERNEL::Exception("VectorOfCellSplitter::get const : invalid pos !");
   return _pool[pos];
 }
 
-CellInfo& VectorOfCellInfo::get(int pos)
+CellInfo& VectorOfCellInfo::get(mcIdType pos)
 {
-  if(pos<0 || pos>=(int)_pool.size())
+  if(pos<0 || pos>=ToIdType(_pool.size()))
     throw INTERP_KERNEL::Exception("VectorOfCellSplitter::get : invalid pos !");
   return _pool[pos];
 }
@@ -1081,36 +1081,36 @@ CellInfo& VectorOfCellInfo::get(int pos)
  *
  * \param [in] allEdges a list of pairs (beginNode, endNode). Represents all edges (already cut) in the single 2D cell being handled here. Linked with \a allEdgesPtr to get the equation of edge.
  */
-MEDCouplingUMesh *BuildMesh2DCutInternal(double eps, MEDCouplingUMesh *splitMesh1D, const std::vector<int>& allEdges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& allEdgesPtr, int offset,
-                                         MCAuto<DataArrayInt>& idsLeftRight)
+MEDCouplingUMesh *BuildMesh2DCutInternal(double eps, MEDCouplingUMesh *splitMesh1D, const std::vector<mcIdType>& allEdges, const std::vector< MCAuto<INTERP_KERNEL::Edge> >& allEdgesPtr, mcIdType offset,
+                                         MCAuto<DataArrayIdType>& idsLeftRight)
 {
-  int nbCellsInSplitMesh1D(splitMesh1D->getNumberOfCells());
+  mcIdType nbCellsInSplitMesh1D=splitMesh1D->getNumberOfCells();
   if(nbCellsInSplitMesh1D==0)
     throw INTERP_KERNEL::Exception("BuildMesh2DCutInternal : internal error ! input 1D mesh must have at least one cell !");
-  const int *cSplitPtr(splitMesh1D->getNodalConnectivity()->begin()),*ciSplitPtr(splitMesh1D->getNodalConnectivityIndex()->begin());
+  const mcIdType *cSplitPtr(splitMesh1D->getNodalConnectivity()->begin()),*ciSplitPtr(splitMesh1D->getNodalConnectivityIndex()->begin());
   std::size_t nb(allEdges.size()),jj;
   if(nb%2!=0)
     throw INTERP_KERNEL::Exception("BuildMesh2DCutFrom : internal error 2 !");
-  std::vector<int> edge1Bis(nb*2);
+  std::vector<mcIdType> edge1Bis(nb*2);
   std::vector< MCAuto<INTERP_KERNEL::Edge> > edge1BisPtr(nb*2);
   std::copy(allEdges.begin(),allEdges.end(),edge1Bis.begin());
   std::copy(allEdges.begin(),allEdges.end(),edge1Bis.begin()+nb);
   std::copy(allEdgesPtr.begin(),allEdgesPtr.end(),edge1BisPtr.begin());
   std::copy(allEdgesPtr.begin(),allEdgesPtr.end(),edge1BisPtr.begin()+nb);
   //
-  idsLeftRight=DataArrayInt::New(); idsLeftRight->alloc(nbCellsInSplitMesh1D*2); idsLeftRight->fillWithValue(-2); idsLeftRight->rearrange(2);
-  int *idsLeftRightPtr(idsLeftRight->getPointer());
+  idsLeftRight=DataArrayIdType::New(); idsLeftRight->alloc(nbCellsInSplitMesh1D*2); idsLeftRight->fillWithValue(-2); idsLeftRight->rearrange(2);
+  mcIdType *idsLeftRightPtr(idsLeftRight->getPointer());
   VectorOfCellInfo pool(edge1Bis,edge1BisPtr);
 
   // Compute contiguous parts of splitMesh1D. We can not make the full assumption that segments are consecutive in the connectivity
   // (even if the user correctly called orderConsecutiveCells1D()). Indeed the tool might be a closed line whose junction point is in
   // splitMesh1D. There can be only one such a point, and if this happens this is necessarily at the start
   // of the connectivity.
-  MCAuto <DataArrayInt> renumb(DataArrayInt::New());
+  MCAuto <DataArrayIdType> renumb(DataArrayIdType::New());
   renumb->alloc(nbCellsInSplitMesh1D,1);
-  const int * renumbP(renumb->begin());
+  const mcIdType * renumbP(renumb->begin());
 
-  int i, first=cSplitPtr[1];
+  mcIdType i, first=cSplitPtr[1];
   // Follow 1D line backward as long as it is connected:
   for (i=nbCellsInSplitMesh1D-1; cSplitPtr[ciSplitPtr[i]+2] == first; i--)
     first=cSplitPtr[ciSplitPtr[i]+1];
@@ -1132,9 +1132,9 @@ MEDCouplingUMesh *BuildMesh2DCutInternal(double eps, MEDCouplingUMesh *splitMesh
   // pool. The neighbourhood information detained by pool._edge_info is also updated so that left and right
   // adjacent 2D cell of a 1D piece is kept up to date.
   // And so on and so forth.
-  for(int iStart=0;iStart<nbCellsInSplitMesh1D;)
+  for(mcIdType iStart=0;iStart<nbCellsInSplitMesh1D;)
     {// split [0:nbCellsInSplitMesh1D) in contiguous parts [iStart:iEnd)
-      int iEnd(iStart);
+      mcIdType iEnd(iStart);
       for(;iEnd<nbCellsInSplitMesh1D;)
         {
           for(jj=0;jj<nb && edge1Bis[2*jj+1]!=cSplitPtr[ciSplitPtr[iEnd]+2];jj++);
@@ -1147,13 +1147,13 @@ MEDCouplingUMesh *BuildMesh2DCutInternal(double eps, MEDCouplingUMesh *splitMesh
         iEnd++;
 
       MCAuto<MEDCouplingUMesh> partOfSplitMesh1D(static_cast<MEDCouplingUMesh *>(splitMesh1D->buildPartOfMySelfSlice(iStart,iEnd,1,true)));
-      int pos(pool.getPositionOf(eps,partOfSplitMesh1D));
+      mcIdType pos(pool.getPositionOf(eps,partOfSplitMesh1D));
       //
       MCAuto<MEDCouplingUMesh>retTmp(MEDCouplingUMesh::New("",2));
       retTmp->setCoords(splitMesh1D->getCoords());
       retTmp->allocateCells();
 
-      std::vector< std::vector<int> > out0;
+      std::vector< std::vector<mcIdType> > out0;
       std::vector< std::vector< MCAuto<INTERP_KERNEL::Edge> > > out1;
 
       BuildMesh2DCutInternal2(partOfSplitMesh1D,pool.getConnOf(pos),pool.getEdgePtrOf(pos),out0,out1);
@@ -1163,7 +1163,7 @@ MEDCouplingUMesh *BuildMesh2DCutInternal(double eps, MEDCouplingUMesh *splitMesh
       //
       iStart=iEnd;
     }
-  for(int mm=0;mm<nbCellsInSplitMesh1D;mm++)
+  for(mcIdType mm=0;mm<nbCellsInSplitMesh1D;mm++)
     pool.feedEdgeInfoAt(eps,renumbP[mm],offset,idsLeftRightPtr+2*mm);
 
   return pool.getZeMesh().retn();
@@ -1172,20 +1172,20 @@ MEDCouplingUMesh *BuildMesh2DCutInternal(double eps, MEDCouplingUMesh *splitMesh
 /*
  * splitMesh1D is an input parameter but might have its cells renumbered.
  */
-MEDCouplingUMesh *BuildMesh2DCutFrom(double eps, int cellIdInMesh2D, const MEDCouplingUMesh *mesh2DDesc, MEDCouplingUMesh *splitMesh1D,
-                                     const int *descBg, const int *descEnd, const std::vector< std::vector<int> >& intersectEdge1, int offset,
-                                     MCAuto<DataArrayInt>& idsLeftRight)
+MEDCouplingUMesh *BuildMesh2DCutFrom(double eps, mcIdType cellIdInMesh2D, const MEDCouplingUMesh *mesh2DDesc, MEDCouplingUMesh *splitMesh1D,
+                                     const mcIdType *descBg, const mcIdType *descEnd, const std::vector< std::vector<mcIdType> >& intersectEdge1, mcIdType offset,
+                                     MCAuto<DataArrayIdType>& idsLeftRight)
 {
-  const int *cdescPtr(mesh2DDesc->getNodalConnectivity()->begin()),*cidescPtr(mesh2DDesc->getNodalConnectivityIndex()->begin());
+  const mcIdType *cdescPtr(mesh2DDesc->getNodalConnectivity()->begin()),*cidescPtr(mesh2DDesc->getNodalConnectivityIndex()->begin());
   //
-  std::vector<int> allEdges;
+  std::vector<mcIdType> allEdges;
   std::vector< MCAuto<INTERP_KERNEL::Edge> > allEdgesPtr; // for each sub edge in splitMesh2D the uncut Edge object of the original mesh2D
-  for(const int *it(descBg);it!=descEnd;it++) // for all edges in the descending connectivity of the 2D mesh in relative Fortran mode
+  for(const mcIdType *it(descBg);it!=descEnd;it++) // for all edges in the descending connectivity of the 2D mesh in relative Fortran mode
     {
-      int edgeId(std::abs(*it)-1);
-      std::map< MCAuto<INTERP_KERNEL::Node>,int> m;
+      mcIdType edgeId(std::abs(*it)-1);
+      std::map< MCAuto<INTERP_KERNEL::Node>,mcIdType> m;
       MCAuto<INTERP_KERNEL::Edge> ee(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)cdescPtr[cidescPtr[edgeId]],cdescPtr+cidescPtr[edgeId]+1,mesh2DDesc->getCoords()->begin(),m));
-      const std::vector<int>& edge1(intersectEdge1[edgeId]);
+      const std::vector<mcIdType>& edge1(intersectEdge1[edgeId]);
       if(*it>0)
         allEdges.insert(allEdges.end(),edge1.begin(),edge1.end());
       else
@@ -1198,7 +1198,7 @@ MEDCouplingUMesh *BuildMesh2DCutFrom(double eps, int cellIdInMesh2D, const MEDCo
   return BuildMesh2DCutInternal(eps,splitMesh1D,allEdges,allEdgesPtr,offset,idsLeftRight);
 }
 
-bool AreEdgeEqual(const double *coo2D, const INTERP_KERNEL::CellModel& typ1, const int *conn1, const INTERP_KERNEL::CellModel& typ2, const int *conn2, double eps)
+bool AreEdgeEqual(const double *coo2D, const INTERP_KERNEL::CellModel& typ1, const mcIdType *conn1, const INTERP_KERNEL::CellModel& typ2, const mcIdType *conn2, double eps)
 {
   if(!typ1.isQuadratic() && !typ2.isQuadratic())
     {//easy case comparison not
@@ -1241,26 +1241,26 @@ bool AreEdgeEqual(const double *coo2D, const INTERP_KERNEL::CellModel& typ1, con
  *
  * \param [in] cellIdInMesh1DSplitRelative is in Fortran mode using sign to specify direction.
  */
-int FindRightCandidateAmong(const MEDCouplingUMesh *mesh2DSplit, const int *candidatesIn2DBg, const int *candidatesIn2DEnd, const MEDCouplingUMesh *mesh1DSplit, int cellIdInMesh1DSplitRelative, double eps)
+mcIdType FindRightCandidateAmong(const MEDCouplingUMesh *mesh2DSplit, const mcIdType *candidatesIn2DBg, const mcIdType *candidatesIn2DEnd, const MEDCouplingUMesh *mesh1DSplit, mcIdType cellIdInMesh1DSplitRelative, double eps)
 {
   if(candidatesIn2DEnd==candidatesIn2DBg)
     throw INTERP_KERNEL::Exception("FindRightCandidateAmong : internal error 1 !");
   const double *coo(mesh2DSplit->getCoords()->begin());
   if(std::distance(candidatesIn2DBg,candidatesIn2DEnd)==1)
     return *candidatesIn2DBg;
-  int edgeId(std::abs(cellIdInMesh1DSplitRelative)-1);
+  mcIdType edgeId(std::abs(cellIdInMesh1DSplitRelative)-1);
   MCAuto<MEDCouplingUMesh> cur1D(static_cast<MEDCouplingUMesh *>(mesh1DSplit->buildPartOfMySelf(&edgeId,&edgeId+1,true)));
   if(cellIdInMesh1DSplitRelative<0)
     cur1D->changeOrientationOfCells();
-  const int *c1D(cur1D->getNodalConnectivity()->begin());
+  const mcIdType *c1D(cur1D->getNodalConnectivity()->begin());
   const INTERP_KERNEL::CellModel& ref1DType(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)c1D[0]));
-  for(const int *it=candidatesIn2DBg;it!=candidatesIn2DEnd;it++)
+  for(const mcIdType *it=candidatesIn2DBg;it!=candidatesIn2DEnd;it++)
     {
       MCAuto<MEDCouplingUMesh> cur2D(static_cast<MEDCouplingUMesh *>(mesh2DSplit->buildPartOfMySelf(it,it+1,true)));
-      const int *c(cur2D->getNodalConnectivity()->begin()),*ci(cur2D->getNodalConnectivityIndex()->begin());
+      const mcIdType *c(cur2D->getNodalConnectivity()->begin()),*ci(cur2D->getNodalConnectivityIndex()->begin());
       const INTERP_KERNEL::CellModel &cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)c[ci[0]]));
       unsigned sz(cm.getNumberOfSons2(c+ci[0]+1,ci[1]-ci[0]-1));
-      INTERP_KERNEL::AutoPtr<int> tmpPtr(new int[ci[1]-ci[0]]);
+      INTERP_KERNEL::AutoPtr<mcIdType> tmpPtr(new mcIdType[ci[1]-ci[0]]);
       for(unsigned it2=0;it2<sz;it2++)
         {
           INTERP_KERNEL::NormalizedCellType typeOfSon;
@@ -1274,7 +1274,7 @@ int FindRightCandidateAmong(const MEDCouplingUMesh *mesh2DSplit, const int *cand
 }
 
 /*!
- * \param [out] intersectEdge1 - for each cell in \a m1Desc returns the result of the split. The result is given using pair of int given resp start and stop.
+ * \param [out] intersectEdge1 - for each cell in \a m1Desc returns the result of the split. The result is given using pair of mcIdType given resp start and stop.
  *                               So for all edge \a i in \a m1Desc \a  intersectEdge1[i] is of length 2*n where n is the number of sub edges.
  *                               And for each j in [1,n) intersect[i][2*(j-1)+1]==intersect[i][2*j].
  * \param [out] subDiv2 - for each cell in \a m2Desc returns nodes that split it using convention \a m1Desc first, then \a m2Desc, then addCoo
@@ -1283,32 +1283,32 @@ int FindRightCandidateAmong(const MEDCouplingUMesh *mesh2DSplit, const int *cand
  * \param [out] mergedNodes - gives all pair of nodes of \a m2Desc that have same location than some nodes in \a m1Desc. key is id in \a m2Desc offsetted and value is id in \a m1Desc.
  */
 void MEDCouplingUMesh::Intersect1DMeshes(const MEDCouplingUMesh *m1Desc, const MEDCouplingUMesh *m2Desc, double eps,
-                                         std::vector< std::vector<int> >& intersectEdge1, std::vector< std::vector<int> >& colinear2, std::vector< std::vector<int> >& subDiv2, std::vector<double>& addCoo, std::map<int,int>& mergedNodes)
+                                         std::vector< std::vector<mcIdType> >& intersectEdge1, std::vector< std::vector<mcIdType> >& colinear2, std::vector< std::vector<mcIdType> >& subDiv2, std::vector<double>& addCoo, std::map<mcIdType,mcIdType>& mergedNodes)
 {
   static const int SPACEDIM=2;
   INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
-  const int *c1(m1Desc->getNodalConnectivity()->begin()),*ci1(m1Desc->getNodalConnectivityIndex()->begin());
+  const mcIdType *c1(m1Desc->getNodalConnectivity()->begin()),*ci1(m1Desc->getNodalConnectivityIndex()->begin());
   // Build BB tree of all edges in the tool mesh (second mesh)
   MCAuto<DataArrayDouble> bbox1Arr(m1Desc->getBoundingBoxForBBTree(eps)),bbox2Arr(m2Desc->getBoundingBoxForBBTree(eps));
   const double *bbox1(bbox1Arr->begin()),*bbox2(bbox2Arr->begin());
-  int nDescCell1(m1Desc->getNumberOfCells()),nDescCell2(m2Desc->getNumberOfCells());
+  mcIdType nDescCell1=m1Desc->getNumberOfCells(),nDescCell2=m2Desc->getNumberOfCells();
   intersectEdge1.resize(nDescCell1);
   colinear2.resize(nDescCell2);
   subDiv2.resize(nDescCell2);
-  BBTree<SPACEDIM,int> myTree(bbox2,0,0,m2Desc->getNumberOfCells(),-eps);
-  BBTreePts<SPACEDIM,int> treeNodes2(m2Desc->getCoords()->begin(),0,0,m2Desc->getCoords()->getNumberOfTuples(),eps);
+  BBTree<SPACEDIM,mcIdType> myTree(bbox2,0,0,m2Desc->getNumberOfCells(),-eps);
+  BBTreePts<SPACEDIM,mcIdType> treeNodes2(m2Desc->getCoords()->begin(),0,0,m2Desc->getCoords()->getNumberOfTuples(),eps);
 
-  std::vector<int> candidates1(1);
-  int offset1(m1Desc->getNumberOfNodes());
-  int offset2(offset1+m2Desc->getNumberOfNodes());
-  for(int i=0;i<nDescCell1;i++)  // for all edges in the first mesh
+  std::vector<mcIdType> candidates1(1);
+  mcIdType offset1(m1Desc->getNumberOfNodes());
+  mcIdType offset2(offset1+m2Desc->getNumberOfNodes());
+  for(mcIdType i=0;i<nDescCell1;i++)  // for all edges in the first mesh
     {
-      std::vector<int> candidates2; // edges of mesh2 candidate for intersection
+      std::vector<mcIdType> candidates2; // edges of mesh2 candidate for intersection
       myTree.getIntersectingElems(bbox1+i*2*SPACEDIM,candidates2);
       if(!candidates2.empty()) // candidates2 holds edges from the second mesh potentially intersecting current edge i in mesh1
         {
-          std::map<INTERP_KERNEL::Node *,int> map1,map2;
-          std::map<int, INTERP_KERNEL::Node *> revMap2;
+          std::map<INTERP_KERNEL::Node *,mcIdType> map1,map2;
+          std::map<mcIdType, INTERP_KERNEL::Node *> revMap2;
           // pol2 is not necessarily a closed polygon: just a set of (quadratic) edges (same as candidates2) in the Geometric DS format
           INTERP_KERNEL::QuadraticPolygon *pol2=MEDCouplingUMeshBuildQPFromMesh(m2Desc,candidates2,map2);
           // Build revMap2
@@ -1346,23 +1346,23 @@ void MEDCouplingUMesh::Intersect1DMeshes(const MEDCouplingUMesh *m1Desc, const M
  * Documentation about parameters  colinear2 and subDiv2 can be found in method QuadraticPolygon::splitAbs().
  */
 void MEDCouplingUMesh::IntersectDescending2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
-                                                   std::vector< std::vector<int> >& intersectEdge1, std::vector< std::vector<int> >& colinear2, std::vector< std::vector<int> >& subDiv2,
-                                                   MEDCouplingUMesh *& m1Desc, DataArrayInt *&desc1, DataArrayInt *&descIndx1, DataArrayInt *&revDesc1, DataArrayInt *&revDescIndx1,
+                                                   std::vector< std::vector<mcIdType> >& intersectEdge1, std::vector< std::vector<mcIdType> >& colinear2, std::vector< std::vector<mcIdType> >& subDiv2,
+                                                   MEDCouplingUMesh *& m1Desc, DataArrayIdType *&desc1, DataArrayIdType *&descIndx1, DataArrayIdType *&revDesc1, DataArrayIdType *&revDescIndx1,
                                                    std::vector<double>& addCoo,
-                                                   MEDCouplingUMesh *& m2Desc, DataArrayInt *&desc2, DataArrayInt *&descIndx2, DataArrayInt *&revDesc2, DataArrayInt *&revDescIndx2)
+                                                   MEDCouplingUMesh *& m2Desc, DataArrayIdType *&desc2, DataArrayIdType *&descIndx2, DataArrayIdType *&revDesc2, DataArrayIdType *&revDescIndx2)
 {
   // Build desc connectivity
-  desc1=DataArrayInt::New(); descIndx1=DataArrayInt::New(); revDesc1=DataArrayInt::New(); revDescIndx1=DataArrayInt::New();
-  desc2=DataArrayInt::New();
-  descIndx2=DataArrayInt::New();
-  revDesc2=DataArrayInt::New();
-  revDescIndx2=DataArrayInt::New();
-  MCAuto<DataArrayInt> dd1(desc1),dd2(descIndx1),dd3(revDesc1),dd4(revDescIndx1);
-  MCAuto<DataArrayInt> dd5(desc2),dd6(descIndx2),dd7(revDesc2),dd8(revDescIndx2);
+  desc1=DataArrayIdType::New(); descIndx1=DataArrayIdType::New(); revDesc1=DataArrayIdType::New(); revDescIndx1=DataArrayIdType::New();
+  desc2=DataArrayIdType::New();
+  descIndx2=DataArrayIdType::New();
+  revDesc2=DataArrayIdType::New();
+  revDescIndx2=DataArrayIdType::New();
+  MCAuto<DataArrayIdType> dd1(desc1),dd2(descIndx1),dd3(revDesc1),dd4(revDescIndx1);
+  MCAuto<DataArrayIdType> dd5(desc2),dd6(descIndx2),dd7(revDesc2),dd8(revDescIndx2);
   m1Desc=m1->buildDescendingConnectivity2(desc1,descIndx1,revDesc1,revDescIndx1);
   m2Desc=m2->buildDescendingConnectivity2(desc2,descIndx2,revDesc2,revDescIndx2);
   MCAuto<MEDCouplingUMesh> dd9(m1Desc),dd10(m2Desc);
-  std::map<int,int> notUsedMap;
+  std::map<mcIdType,mcIdType> notUsedMap;
   Intersect1DMeshes(m1Desc,m2Desc,eps,intersectEdge1,colinear2,subDiv2,addCoo,notUsedMap);
   m1Desc->incrRef(); desc1->incrRef(); descIndx1->incrRef(); revDesc1->incrRef(); revDescIndx1->incrRef();
   m2Desc->incrRef(); desc2->incrRef(); descIndx2->incrRef(); revDesc2->incrRef(); revDescIndx2->incrRef();
@@ -1376,32 +1376,32 @@ void MEDCouplingUMesh::IntersectDescending2DMeshes(const MEDCouplingUMesh *m1, c
  * @param[out] cNb1, cNb2 correspondence arrays giving for the merged mesh the initial cells IDs in m1 / m2
  * TODO: describe input parameters
  */
-void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCouplingUMesh *m1, const int *desc1, const int *descIndx1,
-                                                         const std::vector<std::vector<int> >& intesctEdges1, const std::vector< std::vector<int> >& colinear2,
-                                                         const MEDCouplingUMesh *m2, const int *desc2, const int *descIndx2, const std::vector<std::vector<int> >& intesctEdges2,
+void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCouplingUMesh *m1, const mcIdType *desc1, const mcIdType *descIndx1,
+                                                         const std::vector<std::vector<mcIdType> >& intesctEdges1, const std::vector< std::vector<mcIdType> >& colinear2,
+                                                         const MEDCouplingUMesh *m2, const mcIdType *desc2, const mcIdType *descIndx2, const std::vector<std::vector<mcIdType> >& intesctEdges2,
                                                          const std::vector<double>& addCoords,
-                                                         std::vector<double>& addCoordsQuadratic, std::vector<int>& cr, std::vector<int>& crI, std::vector<int>& cNb1, std::vector<int>& cNb2)
+                                                         std::vector<double>& addCoordsQuadratic, std::vector<mcIdType>& cr, std::vector<mcIdType>& crI, std::vector<mcIdType>& cNb1, std::vector<mcIdType>& cNb2)
 {
   static const int SPACEDIM=2;
   const double *coo1(m1->getCoords()->begin());
-  const int *conn1(m1->getNodalConnectivity()->begin()),*connI1(m1->getNodalConnectivityIndex()->begin());
-  int offset1(m1->getNumberOfNodes());
+  const mcIdType *conn1(m1->getNodalConnectivity()->begin()),*connI1(m1->getNodalConnectivityIndex()->begin());
+  mcIdType offset1(m1->getNumberOfNodes());
   const double *coo2(m2->getCoords()->begin());
-  const int *conn2(m2->getNodalConnectivity()->begin()),*connI2(m2->getNodalConnectivityIndex()->begin());
-  int offset2(offset1+m2->getNumberOfNodes());
-  int offset3(offset2+((int)addCoords.size())/2);
+  const mcIdType *conn2(m2->getNodalConnectivity()->begin()),*connI2(m2->getNodalConnectivityIndex()->begin());
+  mcIdType offset2(offset1+m2->getNumberOfNodes());
+  mcIdType offset3(offset2+ToIdType(addCoords.size())/2);
   MCAuto<DataArrayDouble> bbox1Arr(m1->getBoundingBoxForBBTree(eps)),bbox2Arr(m2->getBoundingBoxForBBTree(eps));
   const double *bbox1(bbox1Arr->begin()),*bbox2(bbox2Arr->begin());
   // Here a BBTree on 2D-cells, not on segments:
-  BBTree<SPACEDIM,int> myTree(bbox2,0,0,m2->getNumberOfCells(),eps);
-  int ncell1(m1->getNumberOfCells());
+  BBTree<SPACEDIM,mcIdType> myTree(bbox2,0,0,m2->getNumberOfCells(),eps);
+  mcIdType ncell1=m1->getNumberOfCells();
   crI.push_back(0);
-  for(int i=0;i<ncell1;i++)
+  for(mcIdType i=0;i<ncell1;i++)
     {
-      std::vector<int> candidates2;
+      std::vector<mcIdType> candidates2;
       myTree.getIntersectingElems(bbox1+i*2*SPACEDIM,candidates2);
-      std::map<INTERP_KERNEL::Node *,int> mapp;
-      std::map<int,INTERP_KERNEL::Node *> mappRev;
+      std::map<INTERP_KERNEL::Node *,mcIdType> mapp;
+      std::map<mcIdType,INTERP_KERNEL::Node *> mappRev;
       INTERP_KERNEL::QuadraticPolygon pol1;
       INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType)conn1[connI1[i]];
       const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
@@ -1417,12 +1417,12 @@ void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCo
       for(it1.first();!it1.finished();it1.next())
         edges1.insert(it1.current()->getPtr());
       //
-      std::map<int,std::vector<INTERP_KERNEL::ElementaryEdge *> > edgesIn2ForShare; // common edges
+      std::map<mcIdType,std::vector<INTERP_KERNEL::ElementaryEdge *> > edgesIn2ForShare; // common edges
       std::vector<INTERP_KERNEL::QuadraticPolygon> pol2s(candidates2.size());
-      int ii=0;
+      mcIdType ii=0;
       // Build, for each intersecting cell candidate from mesh2, the corresponding QP.
       // Again all the additional intersecting nodes are there.
-      for(std::vector<int>::const_iterator it2=candidates2.begin();it2!=candidates2.end();it2++,ii++)
+      for(std::vector<mcIdType>::const_iterator it2=candidates2.begin();it2!=candidates2.end();it2++,ii++)
         {
           INTERP_KERNEL::NormalizedCellType typ2=(INTERP_KERNEL::NormalizedCellType)conn2[connI2[*it2]];
           const INTERP_KERNEL::CellModel& cm2=INTERP_KERNEL::CellModel::GetCellModel(typ2);
@@ -1439,7 +1439,7 @@ void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCo
       ///
       ii=0;
       // Now rebuild intersected cells from all this:
-      for(std::vector<int>::const_iterator it2=candidates2.begin();it2!=candidates2.end();it2++,ii++)
+      for(std::vector<mcIdType>::const_iterator it2=candidates2.begin();it2!=candidates2.end();it2++,ii++)
         {
           INTERP_KERNEL::ComposedEdge::InitLocationsWithOther(pol1,pol2s[ii]);
           pol2s[ii].updateLocOfEdgeFromCrudeDataArray2(desc2+descIndx2[*it2],desc2+descIndx2[*it2+1],intesctEdges2,pol1,desc1+descIndx1[i],desc1+descIndx1[i+1],intesctEdges1,colinear2);
@@ -1460,21 +1460,21 @@ void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCo
               throw INTERP_KERNEL::Exception(oss.str());
           }
         }
-      for(std::map<int,INTERP_KERNEL::Node *>::const_iterator it=mappRev.begin();it!=mappRev.end();it++)
+      for(std::map<mcIdType,INTERP_KERNEL::Node *>::const_iterator it=mappRev.begin();it!=mappRev.end();it++)
         (*it).second->decrRef();
     }
 }
 
-void InsertNodeInConnIfNecessary(int nodeIdToInsert, std::vector<int>& conn, const double *coords, double eps)
+void InsertNodeInConnIfNecessary(mcIdType nodeIdToInsert, std::vector<mcIdType>& conn, const double *coords, double eps)
 {
-  std::vector<int>::iterator it(std::find(conn.begin(),conn.end(),nodeIdToInsert));
+  std::vector<mcIdType>::iterator it(std::find(conn.begin(),conn.end(),nodeIdToInsert));
   if(it!=conn.end())
     return ;
   std::size_t sz(conn.size());
   std::size_t found(std::numeric_limits<std::size_t>::max());
   for(std::size_t i=0;i<sz;i++)
     {
-      int pt0(conn[i]),pt1(conn[(i+1)%sz]);
+      mcIdType pt0(conn[i]),pt1(conn[(i+1)%sz]);
       double v1[3]={coords[3*pt1+0]-coords[3*pt0+0],coords[3*pt1+1]-coords[3*pt0+1],coords[3*pt1+2]-coords[3*pt0+2]},v2[3]={coords[3*nodeIdToInsert+0]-coords[3*pt0+0],coords[3*nodeIdToInsert+1]-coords[3*pt0+1],coords[3*nodeIdToInsert+2]-coords[3*pt0+2]};
       double normm(sqrt(v1[0]*v1[0]+v1[1]*v1[1]+v1[2]*v1[2]));
       std::transform(v1,v1+3,v1,std::bind2nd(std::multiplies<double>(),1./normm));
@@ -1494,13 +1494,13 @@ void InsertNodeInConnIfNecessary(int nodeIdToInsert, std::vector<int>& conn, con
   conn.insert(conn.begin()+(found+1)%sz,nodeIdToInsert);
 }
 
-void SplitIntoToPart(const std::vector<int>& conn, int pt0, int pt1, std::vector<int>& part0, std::vector<int>& part1)
+void SplitIntoToPart(const std::vector<mcIdType>& conn, mcIdType pt0, mcIdType pt1, std::vector<mcIdType>& part0, std::vector<mcIdType>& part1)
 {
   std::size_t sz(conn.size());
-  std::vector<int> *curPart(&part0);
+  std::vector<mcIdType> *curPart(&part0);
   for(std::size_t i=0;i<sz;i++)
     {
-      int nextt(conn[(i+1)%sz]);
+      mcIdType nextt(conn[(i+1)%sz]);
       (*curPart).push_back(nextt);
       if(nextt==pt0 || nextt==pt1)
         {
@@ -1516,36 +1516,36 @@ void SplitIntoToPart(const std::vector<int>& conn, int pt0, int pt1, std::vector
 /*!
  * this method method splits cur cells 3D Surf in sub cells 3DSurf using the previous subsplit. This method is the last one used to clip.
  */
-void MEDCouplingUMesh::buildSubCellsFromCut(const std::vector< std::pair<int,int> >& cut3DSurf,
-                                            const int *desc, const int *descIndx, const double *coords, double eps,
-                                            std::vector<std::vector<int> >& res) const
+void MEDCouplingUMesh::buildSubCellsFromCut(const std::vector< std::pair<mcIdType,mcIdType> >& cut3DSurf,
+                                            const mcIdType *desc, const mcIdType *descIndx, const double *coords, double eps,
+                                            std::vector<std::vector<mcIdType> >& res) const
 {
   checkFullyDefined();
   if(getMeshDimension()!=3 || getSpaceDimension()!=3)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSubCellsFromCut works on umeshes with meshdim equal to 3 and spaceDim equal to 3 too!");
-  const int *nodal3D(_nodal_connec->begin()),*nodalIndx3D(_nodal_connec_index->begin());
-  int nbOfCells(getNumberOfCells());
+  const mcIdType *nodal3D(_nodal_connec->begin()),*nodalIndx3D(_nodal_connec_index->begin());
+  mcIdType nbOfCells=getNumberOfCells();
   if(nbOfCells!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSubCellsFromCut works only with single cell presently !");
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int offset(descIndx[i]),nbOfFaces(descIndx[i+1]-offset);
+      mcIdType offset(descIndx[i]),nbOfFaces(descIndx[i+1]-offset);
       for(int j=0;j<nbOfFaces;j++)
         {
-          const std::pair<int,int>& p=cut3DSurf[desc[offset+j]];
+          const std::pair<mcIdType,mcIdType>& p=cut3DSurf[desc[offset+j]];
           const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)nodal3D[nodalIndx3D[i]]));
-          int sz=nodalIndx3D[i+1]-nodalIndx3D[i]-1;
-          INTERP_KERNEL::AutoPtr<int> tmp(new int[sz]);
+          mcIdType sz=nodalIndx3D[i+1]-nodalIndx3D[i]-1;
+          INTERP_KERNEL::AutoPtr<mcIdType> tmp(new mcIdType[sz]);
           INTERP_KERNEL::NormalizedCellType cmsId;
           unsigned nbOfNodesSon(cm.fillSonCellNodalConnectivity2(j,nodal3D+nodalIndx3D[i]+1,sz,tmp,cmsId));
-          std::vector<int> elt((int *)tmp,(int *)tmp+nbOfNodesSon);
+          std::vector<mcIdType> elt((mcIdType *)tmp,(mcIdType *)tmp+nbOfNodesSon);
           if(p.first!=-1 && p.second!=-1)
             {
               if(p.first!=-2)
                 {
                   InsertNodeInConnIfNecessary(p.first,elt,coords,eps);
                   InsertNodeInConnIfNecessary(p.second,elt,coords,eps);
-                  std::vector<int> elt1,elt2;
+                  std::vector<mcIdType> elt1,elt2;
                   SplitIntoToPart(elt,p.first,p.second,elt1,elt2);
                   res.push_back(elt1);
                   res.push_back(elt2);
@@ -1564,22 +1564,23 @@ void MEDCouplingUMesh::buildSubCellsFromCut(const std::vector< std::pair<int,int
  *
  * \sa MEDCouplingUMesh::split2DCells
  */
-void MEDCouplingUMesh::split2DCellsLinear(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI)
+void MEDCouplingUMesh::split2DCellsLinear(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI)
 {
   checkConnectivityFullyDefined();
-  int ncells(getNumberOfCells()),lgthToReach(getNodalConnectivityArrayLen()+subNodesInSeg->getNumberOfTuples());
-  MCAuto<DataArrayInt> c(DataArrayInt::New()); c->alloc((std::size_t)lgthToReach);
-  const int *subPtr(subNodesInSeg->begin()),*subIPtr(subNodesInSegI->begin()),*descPtr(desc->begin()),*descIPtr(descI->begin()),*oldConn(getNodalConnectivity()->begin());
-  int *cPtr(c->getPointer()),*ciPtr(getNodalConnectivityIndex()->getPointer());
-  int prevPosOfCi(ciPtr[0]);
-  for(int i=0;i<ncells;i++,ciPtr++,descIPtr++)
+  mcIdType ncells=getNumberOfCells();
+  mcIdType lgthToReach(getNodalConnectivityArrayLen()+subNodesInSeg->getNumberOfTuples());
+  MCAuto<DataArrayIdType> c(DataArrayIdType::New()); c->alloc((std::size_t)lgthToReach);
+  const mcIdType *subPtr(subNodesInSeg->begin()),*subIPtr(subNodesInSegI->begin()),*descPtr(desc->begin()),*descIPtr(descI->begin()),*oldConn(getNodalConnectivity()->begin());
+  mcIdType *cPtr(c->getPointer()),*ciPtr(getNodalConnectivityIndex()->getPointer());
+  mcIdType prevPosOfCi(ciPtr[0]);
+  for(mcIdType i=0;i<ncells;i++,ciPtr++,descIPtr++)
     {
-      int offset(descIPtr[0]),sz(descIPtr[1]-descIPtr[0]),deltaSz(0);
-      *cPtr++=(int)INTERP_KERNEL::NORM_POLYGON; *cPtr++=oldConn[prevPosOfCi+1];
-      for(int j=0;j<sz;j++)
+      mcIdType offset(descIPtr[0]),sz(descIPtr[1]-descIPtr[0]),deltaSz(0);
+      *cPtr++=ToIdType(INTERP_KERNEL::NORM_POLYGON); *cPtr++=oldConn[prevPosOfCi+1];
+      for(mcIdType j=0;j<sz;j++)
         {
-          int offset2(subIPtr[descPtr[offset+j]]),sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]);
-          for(int k=0;k<sz2;k++)
+          mcIdType offset2(subIPtr[descPtr[offset+j]]),sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]);
+          for(mcIdType k=0;k<sz2;k++)
             *cPtr++=subPtr[offset2+k];
           if(j!=sz-1)
             *cPtr++=oldConn[prevPosOfCi+j+2];
@@ -1598,29 +1599,31 @@ void MEDCouplingUMesh::split2DCellsLinear(const DataArrayInt *desc, const DataAr
 /*!
  * It is the quadratic part of MEDCouplingUMesh::split2DCells. Here some additional nodes can be added at the end of coordinates array object.
  *
- * \return  int - the number of new nodes created.
+ * \return  mcIdType - the number of new nodes created.
  * \sa MEDCouplingUMesh::split2DCells
  */
-int MEDCouplingUMesh::split2DCellsQuadratic(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *mid, const DataArrayInt *midI)
+mcIdType MEDCouplingUMesh::split2DCellsQuadratic(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI, const DataArrayIdType *mid, const DataArrayIdType *midI)
 {
   checkConsistencyLight();
-  int ncells(getNumberOfCells()),lgthToReach(getNodalConnectivityArrayLen()+2*subNodesInSeg->getNumberOfTuples()),nodesCnt(getNumberOfNodes());
-  MCAuto<DataArrayInt> c(DataArrayInt::New()); c->alloc((std::size_t)lgthToReach);
+  mcIdType ncells=getNumberOfCells();
+  mcIdType lgthToReach(getNodalConnectivityArrayLen()+2*subNodesInSeg->getNumberOfTuples());
+  mcIdType nodesCnt(getNumberOfNodes());
+  MCAuto<DataArrayIdType> c(DataArrayIdType::New()); c->alloc((std::size_t)lgthToReach);
   MCAuto<DataArrayDouble> addCoo(DataArrayDouble::New()); addCoo->alloc(0,1);
-  const int *subPtr(subNodesInSeg->begin()),*subIPtr(subNodesInSegI->begin()),*descPtr(desc->begin()),*descIPtr(descI->begin()),*oldConn(getNodalConnectivity()->begin());
-  const int *midPtr(mid->begin()),*midIPtr(midI->begin());
+  const mcIdType *subPtr(subNodesInSeg->begin()),*subIPtr(subNodesInSegI->begin()),*descPtr(desc->begin()),*descIPtr(descI->begin()),*oldConn(getNodalConnectivity()->begin());
+  const mcIdType *midPtr(mid->begin()),*midIPtr(midI->begin());
   const double *oldCoordsPtr(getCoords()->begin());
-  int *cPtr(c->getPointer()),*ciPtr(getNodalConnectivityIndex()->getPointer());
-  int prevPosOfCi(ciPtr[0]);
-  for(int i=0;i<ncells;i++,ciPtr++,descIPtr++)
+  mcIdType *cPtr(c->getPointer()),*ciPtr(getNodalConnectivityIndex()->getPointer());
+  mcIdType prevPosOfCi(ciPtr[0]);
+  for(mcIdType i=0;i<ncells;i++,ciPtr++,descIPtr++)
     {
-      int offset(descIPtr[0]),sz(descIPtr[1]-descIPtr[0]),deltaSz(sz);
-      for(int j=0;j<sz;j++)
-        { int sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]); deltaSz+=sz2; }
-      *cPtr++=(int)INTERP_KERNEL::NORM_QPOLYG; cPtr[0]=oldConn[prevPosOfCi+1];
-      for(int j=0;j<sz;j++)//loop over subedges of oldConn
+      mcIdType offset(descIPtr[0]),sz(descIPtr[1]-descIPtr[0]),deltaSz(sz);
+      for(mcIdType j=0;j<sz;j++)
+        { mcIdType sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]); deltaSz+=sz2; }
+      *cPtr++=ToIdType(INTERP_KERNEL::NORM_QPOLYG); cPtr[0]=oldConn[prevPosOfCi+1];
+      for(mcIdType j=0;j<sz;j++)//loop over subedges of oldConn
         {
-          int offset2(subIPtr[descPtr[offset+j]]),sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]),offset3(midIPtr[descPtr[offset+j]]);
+          mcIdType offset2(subIPtr[descPtr[offset+j]]),sz2(subIPtr[descPtr[offset+j]+1]-subIPtr[descPtr[offset+j]]),offset3(midIPtr[descPtr[offset+j]]);
           if(sz2==0)
             {
               if(j<sz-1)
@@ -1633,12 +1636,12 @@ int MEDCouplingUMesh::split2DCellsQuadratic(const DataArrayInt *desc, const Data
           ns[1]=new INTERP_KERNEL::Node(oldCoordsPtr[2*oldConn[prevPosOfCi+1+(1+j)%sz]],oldCoordsPtr[2*oldConn[prevPosOfCi+1+(1+j)%sz]+1]);
           ns[2]=new INTERP_KERNEL::Node(oldCoordsPtr[2*oldConn[prevPosOfCi+1+sz+j]],oldCoordsPtr[2*oldConn[prevPosOfCi+1+sz+j]+1]);
           MCAuto<INTERP_KERNEL::Edge> e(INTERP_KERNEL::QuadraticPolygon::BuildArcCircleEdge(ns));
-          for(int k=0;k<sz2;k++)//loop over subsplit of current subedge
+          for(mcIdType k=0;k<sz2;k++)//loop over subsplit of current subedge
             {
               cPtr[1]=subPtr[offset2+k];
               cPtr[deltaSz]=InternalAddPoint(e,midPtr[offset3+k],oldCoordsPtr,cPtr[0],cPtr[1],*addCoo,nodesCnt); cPtr++;
             }
-          int tmpEnd(oldConn[prevPosOfCi+1+(j+1)%sz]);
+          mcIdType tmpEnd(oldConn[prevPosOfCi+1+(j+1)%sz]);
           if(j!=sz-1)
             { cPtr[1]=tmpEnd; }
           cPtr[deltaSz]=InternalAddPoint(e,midPtr[offset3+sz2],oldCoordsPtr,cPtr[0],tmpEnd,*addCoo,nodesCnt); cPtr++;
@@ -1672,10 +1675,10 @@ int MEDCouplingUMesh::split2DCellsQuadratic(const DataArrayInt *desc, const Data
  *  \param [in] m2 - the second input mesh which is a partition tool. The mesh must be so that each point in the space covered by \a m2
  *                      must be covered exactly by one entity, \b no \b more. If it is not the case, some tools are available to heal the mesh (conformize2D, mergeNodes)
  *  \param [in] eps - precision used to detect coincident mesh entities.
- *  \param [out] cellNb1 - a new instance of DataArrayInt holding for each result
+ *  \param [out] cellNb1 - a new instance of DataArrayIdType holding for each result
  *         cell an id of the cell of \a m1 it comes from. The caller is to delete
  *         this array using decrRef() as it is no more needed.
- *  \param [out] cellNb2 - a new instance of DataArrayInt holding for each result
+ *  \param [out] cellNb2 - a new instance of DataArrayIdType holding for each result
  *         cell an id of the cell of \a m2 it comes from. -1 value means that a
  *         result cell comes from a cell (or part of cell) of \a m1 not overlapped by
  *         any cell of \a m2. The caller is to delete this array using decrRef() as
@@ -1690,7 +1693,7 @@ int MEDCouplingUMesh::split2DCellsQuadratic(const DataArrayInt *desc, const Data
  *  \sa conformize2D, mergeNodes
  */
 MEDCouplingUMesh *MEDCouplingUMesh::Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2,
-                                                      double eps, DataArrayInt *&cellNb1, DataArrayInt *&cellNb2)
+                                                      double eps, DataArrayIdType *&cellNb1, DataArrayIdType *&cellNb2)
 {
   if(!m1 || !m2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Intersect2DMeshes : input meshes must be not NULL !");
@@ -1701,43 +1704,43 @@ MEDCouplingUMesh *MEDCouplingUMesh::Intersect2DMeshes(const MEDCouplingUMesh *m1
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Intersect2DMeshes works on umeshes m1 AND m2  with meshdim equal to 2 and spaceDim equal to 2 too!");
 
   // Step 1: compute all edge intersections (new nodes)
-  std::vector< std::vector<int> > intersectEdge1, colinear2, subDiv2;
+  std::vector< std::vector<mcIdType> > intersectEdge1, colinear2, subDiv2;
   MEDCouplingUMesh *m1Desc=0,*m2Desc=0; // descending connec. meshes
-  DataArrayInt *desc1=0,*descIndx1=0,*revDesc1=0,*revDescIndx1=0,*desc2=0,*descIndx2=0,*revDesc2=0,*revDescIndx2=0;
+  DataArrayIdType *desc1=0,*descIndx1=0,*revDesc1=0,*revDescIndx1=0,*desc2=0,*descIndx2=0,*revDesc2=0,*revDescIndx2=0;
   std::vector<double> addCoo,addCoordsQuadratic;  // coordinates of newly created nodes
   IntersectDescending2DMeshes(m1,m2,eps,intersectEdge1,colinear2, subDiv2,
                               m1Desc,desc1,descIndx1,revDesc1,revDescIndx1,
                               addCoo, m2Desc,desc2,descIndx2,revDesc2,revDescIndx2);
   revDesc1->decrRef(); revDescIndx1->decrRef(); revDesc2->decrRef(); revDescIndx2->decrRef();
-  MCAuto<DataArrayInt> dd1(desc1),dd2(descIndx1),dd3(desc2),dd4(descIndx2);
+  MCAuto<DataArrayIdType> dd1(desc1),dd2(descIndx1),dd3(desc2),dd4(descIndx2);
   MCAuto<MEDCouplingUMesh> dd5(m1Desc),dd6(m2Desc);
 
   // Step 2: re-order newly created nodes according to the ordering found in m2
-  std::vector< std::vector<int> > intersectEdge2;
+  std::vector< std::vector<mcIdType> > intersectEdge2;
   BuildIntersectEdges(m1Desc,m2Desc,addCoo,subDiv2,intersectEdge2);
   subDiv2.clear(); dd5=0; dd6=0;
 
   // Step 3:
-  std::vector<int> cr,crI; //no DataArrayInt because interface with Geometric2D
-  std::vector<int> cNb1,cNb2; //no DataArrayInt because interface with Geometric2D
+  std::vector<mcIdType> cr,crI; //no DataArrayIdType because interface with Geometric2D
+  std::vector<mcIdType> cNb1,cNb2; //no DataArrayIdType because interface with Geometric2D
   BuildIntersecting2DCellsFromEdges(eps,m1,desc1->begin(),descIndx1->begin(),intersectEdge1,colinear2,m2,desc2->begin(),descIndx2->begin(),intersectEdge2,addCoo,
                                     /* outputs -> */addCoordsQuadratic,cr,crI,cNb1,cNb2);
 
   // Step 4: Prepare final result:
   MCAuto<DataArrayDouble> addCooDa(DataArrayDouble::New());
-  addCooDa->alloc((int)(addCoo.size())/2,2);
+  addCooDa->alloc(addCoo.size()/2,2);
   std::copy(addCoo.begin(),addCoo.end(),addCooDa->getPointer());
   MCAuto<DataArrayDouble> addCoordsQuadraticDa(DataArrayDouble::New());
-  addCoordsQuadraticDa->alloc((int)(addCoordsQuadratic.size())/2,2);
+  addCoordsQuadraticDa->alloc(addCoordsQuadratic.size()/2,2);
   std::copy(addCoordsQuadratic.begin(),addCoordsQuadratic.end(),addCoordsQuadraticDa->getPointer());
   std::vector<const DataArrayDouble *> coordss(4);
   coordss[0]=m1->getCoords(); coordss[1]=m2->getCoords(); coordss[2]=addCooDa; coordss[3]=addCoordsQuadraticDa;
   MCAuto<DataArrayDouble> coo(DataArrayDouble::Aggregate(coordss));
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::New("Intersect2D",2));
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()); conn->alloc((int)cr.size(),1); std::copy(cr.begin(),cr.end(),conn->getPointer());
-  MCAuto<DataArrayInt> connI(DataArrayInt::New()); connI->alloc((int)crI.size(),1); std::copy(crI.begin(),crI.end(),connI->getPointer());
-  MCAuto<DataArrayInt> c1(DataArrayInt::New()); c1->alloc((int)cNb1.size(),1); std::copy(cNb1.begin(),cNb1.end(),c1->getPointer());
-  MCAuto<DataArrayInt> c2(DataArrayInt::New()); c2->alloc((int)cNb2.size(),1); std::copy(cNb2.begin(),cNb2.end(),c2->getPointer());
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()); conn->alloc(cr.size(),1); std::copy(cr.begin(),cr.end(),conn->getPointer());
+  MCAuto<DataArrayIdType> connI(DataArrayIdType::New()); connI->alloc(crI.size(),1); std::copy(crI.begin(),crI.end(),connI->getPointer());
+  MCAuto<DataArrayIdType> c1(DataArrayIdType::New()); c1->alloc(cNb1.size(),1); std::copy(cNb1.begin(),cNb1.end(),c1->getPointer());
+  MCAuto<DataArrayIdType> c2(DataArrayIdType::New()); c2->alloc(cNb2.size(),1); std::copy(cNb2.begin(),cNb2.end(),c2->getPointer());
   ret->setConnectivity(conn,connI,true);
   ret->setCoords(coo);
   cellNb1=c1.retn(); cellNb2=c2.retn();
@@ -1765,7 +1768,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::Intersect2DMeshes(const MEDCouplingUMesh *m1
  *
  * \sa Intersect2DMeshes, orderConsecutiveCells1D, conformize2D, mergeNodes
  */
-void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D, const MEDCouplingUMesh *mesh1D, double eps, MEDCouplingUMesh *&splitMesh2D, MEDCouplingUMesh *&splitMesh1D, DataArrayInt *&cellIdInMesh2D, DataArrayInt *&cellIdInMesh1D)
+void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D, const MEDCouplingUMesh *mesh1D, double eps, MEDCouplingUMesh *&splitMesh2D, MEDCouplingUMesh *&splitMesh1D, DataArrayIdType *&cellIdInMesh2D, DataArrayIdType *&cellIdInMesh1D)
 {
   if(!mesh2D || !mesh1D)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Intersect2DMeshWith1DLine : input meshes must be not NULL !");
@@ -1775,22 +1778,22 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
   if(mesh2D->getMeshDimension()!=2 || mesh2D->getSpaceDimension()!=2 || mesh1D->getMeshDimension()!=1 || mesh1D->getSpaceDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::Intersect2DMeshWith1DLine works with mesh2D with spacedim=meshdim=2 and mesh1D with meshdim=1 spaceDim=2 !");
   // Step 1: compute all edge intersections (new nodes)
-  std::vector< std::vector<int> > intersectEdge1, colinear2, subDiv2;
+  std::vector< std::vector<mcIdType> > intersectEdge1, colinear2, subDiv2;
   std::vector<double> addCoo,addCoordsQuadratic;  // coordinates of newly created nodes
   INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
   //
   // Build desc connectivity
-  DataArrayInt *desc1(DataArrayInt::New()),*descIndx1(DataArrayInt::New()),*revDesc1(DataArrayInt::New()),*revDescIndx1(DataArrayInt::New());
-  MCAuto<DataArrayInt> dd1(desc1),dd2(descIndx1),dd3(revDesc1),dd4(revDescIndx1);
+  DataArrayIdType *desc1(DataArrayIdType::New()),*descIndx1(DataArrayIdType::New()),*revDesc1(DataArrayIdType::New()),*revDescIndx1(DataArrayIdType::New());
+  MCAuto<DataArrayIdType> dd1(desc1),dd2(descIndx1),dd3(revDesc1),dd4(revDescIndx1);
   MCAuto<MEDCouplingUMesh> m1Desc(mesh2D->buildDescendingConnectivity2(desc1,descIndx1,revDesc1,revDescIndx1));
-  std::map<int,int> mergedNodes;
+  std::map<mcIdType,mcIdType> mergedNodes;
   Intersect1DMeshes(m1Desc,mesh1D,eps,intersectEdge1,colinear2,subDiv2,addCoo,mergedNodes);
   // use mergeNodes to fix intersectEdge1
-  for(std::vector< std::vector<int> >::iterator it0=intersectEdge1.begin();it0!=intersectEdge1.end();it0++)
+  for(std::vector< std::vector<mcIdType> >::iterator it0=intersectEdge1.begin();it0!=intersectEdge1.end();it0++)
     {
       std::size_t n((*it0).size()/2);
-      int eltStart((*it0)[0]),eltEnd((*it0)[2*n-1]);
-      std::map<int,int>::const_iterator it1;
+      mcIdType eltStart((*it0)[0]),eltEnd((*it0)[2*n-1]);
+      std::map<mcIdType,mcIdType>::const_iterator it1;
       it1=mergedNodes.find(eltStart);
       if(it1!=mergedNodes.end())
         (*it0)[0]=(*it1).second;
@@ -1800,28 +1803,28 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
     }
   //
   MCAuto<DataArrayDouble> addCooDa(DataArrayDouble::New());
-  addCooDa->useArray(&addCoo[0],false,DeallocType::C_DEALLOC,(int)addCoo.size()/2,2);
+  addCooDa->useArray(&addCoo[0],false,DeallocType::C_DEALLOC,addCoo.size()/2,2);
   // Step 2: re-order newly created nodes according to the ordering found in m2
-  std::vector< std::vector<int> > intersectEdge2;
+  std::vector< std::vector<mcIdType> > intersectEdge2;
   BuildIntersectEdges(m1Desc,mesh1D,addCoo,subDiv2,intersectEdge2);
   subDiv2.clear();
   // Step 3: compute splitMesh1D
-  MCAuto<DataArrayInt> idsInRet1Colinear,idsInDescMesh2DForIdsInRetColinear;
-  MCAuto<DataArrayInt> ret2(DataArrayInt::New()); ret2->alloc(0,1);
+  MCAuto<DataArrayIdType> idsInRet1Colinear,idsInDescMesh2DForIdsInRetColinear;
+  MCAuto<DataArrayIdType> ret2(DataArrayIdType::New()); ret2->alloc(0,1);
   MCAuto<MEDCouplingUMesh> ret1(BuildMesh1DCutFrom(mesh1D,intersectEdge2,mesh2D->getCoords(),addCoo,mergedNodes,colinear2,intersectEdge1,
       idsInRet1Colinear,idsInDescMesh2DForIdsInRetColinear));
-  MCAuto<DataArrayInt> ret3(DataArrayInt::New()); ret3->alloc(ret1->getNumberOfCells()*2,1); ret3->fillWithValue(std::numeric_limits<int>::max()); ret3->rearrange(2);
-  MCAuto<DataArrayInt> idsInRet1NotColinear(idsInRet1Colinear->buildComplement(ret1->getNumberOfCells()));
+  MCAuto<DataArrayIdType> ret3(DataArrayIdType::New()); ret3->alloc(ret1->getNumberOfCells()*2,1); ret3->fillWithValue(std::numeric_limits<mcIdType>::max()); ret3->rearrange(2);
+  MCAuto<DataArrayIdType> idsInRet1NotColinear(idsInRet1Colinear->buildComplement(ret1->getNumberOfCells()));
   // deal with cells in mesh2D that are not cut but only some of their edges are
-  MCAuto<DataArrayInt> idsInDesc2DToBeRefined(idsInDescMesh2DForIdsInRetColinear->deepCopy());
+  MCAuto<DataArrayIdType> idsInDesc2DToBeRefined(idsInDescMesh2DForIdsInRetColinear->deepCopy());
   idsInDesc2DToBeRefined->abs(); idsInDesc2DToBeRefined->applyLin(1,-1);
   idsInDesc2DToBeRefined=idsInDesc2DToBeRefined->buildUnique();
-  MCAuto<DataArrayInt> out0s;//ids in mesh2D that are impacted by the fact that some edges of \a mesh1D are part of the edges of those cells
+  MCAuto<DataArrayIdType> out0s;//ids in mesh2D that are impacted by the fact that some edges of \a mesh1D are part of the edges of those cells
   if(!idsInDesc2DToBeRefined->empty())
     {
-      DataArrayInt *out0(0),*outi0(0);
-      DataArrayInt::ExtractFromIndexedArrays(idsInDesc2DToBeRefined->begin(),idsInDesc2DToBeRefined->end(),dd3,dd4,out0,outi0);
-      MCAuto<DataArrayInt> outi0s(outi0);
+      DataArrayIdType *out0(0),*outi0(0);
+      DataArrayIdType::ExtractFromIndexedArrays(idsInDesc2DToBeRefined->begin(),idsInDesc2DToBeRefined->end(),dd3,dd4,out0,outi0);
+      MCAuto<DataArrayIdType> outi0s(outi0);
       out0s=out0;
       out0s=out0s->buildUnique();
       out0s->sort(true);
@@ -1829,17 +1832,17 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
   //
   MCAuto<MEDCouplingUMesh> ret1NonCol(static_cast<MEDCouplingUMesh *>(ret1->buildPartOfMySelf(idsInRet1NotColinear->begin(),idsInRet1NotColinear->end())));
   MCAuto<DataArrayDouble> baryRet1(ret1NonCol->computeCellCenterOfMass());
-  MCAuto<DataArrayInt> elts,eltsIndex;
+  MCAuto<DataArrayIdType> elts,eltsIndex;
   mesh2D->getCellsContainingPoints(baryRet1->begin(),baryRet1->getNumberOfTuples(),eps,elts,eltsIndex);
-  MCAuto<DataArrayInt> eltsIndex2(DataArrayInt::New()); eltsIndex2->alloc(0,1);
+  MCAuto<DataArrayIdType> eltsIndex2(DataArrayIdType::New()); eltsIndex2->alloc(0,1);
   if (eltsIndex->getNumberOfTuples() > 1)
     eltsIndex2 = eltsIndex->deltaShiftIndex();
-  MCAuto<DataArrayInt> eltsIndex3(eltsIndex2->findIdsEqual(1));
+  MCAuto<DataArrayIdType> eltsIndex3(eltsIndex2->findIdsEqual(1));
   if(eltsIndex2->count(0)+eltsIndex3->getNumberOfTuples()!=ret1NonCol->getNumberOfCells())
     throw INTERP_KERNEL::Exception("Intersect2DMeshWith1DLine : internal error 1 !");
-  MCAuto<DataArrayInt> cellsToBeModified(elts->buildUnique());
-  MCAuto<DataArrayInt> untouchedCells(cellsToBeModified->buildComplement(mesh2D->getNumberOfCells()));
-  if((DataArrayInt *)out0s)
+  MCAuto<DataArrayIdType> cellsToBeModified(elts->buildUnique());
+  MCAuto<DataArrayIdType> untouchedCells(cellsToBeModified->buildComplement(mesh2D->getNumberOfCells()));
+  if((DataArrayIdType *)out0s)
     untouchedCells=untouchedCells->buildSubstraction(out0s);//if some edges in ret1 are colinear to descending mesh of mesh2D remove cells from untouched one
   std::vector< MCAuto<MEDCouplingUMesh> > outMesh2DSplit;
   // OK all is ready to insert in ret2 mesh
@@ -1849,26 +1852,26 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
       outMesh2DSplit.back()->setCoords(ret1->getCoords());
       ret2->pushBackValsSilent(untouchedCells->begin(),untouchedCells->end());
     }
-  if((DataArrayInt *)out0s)
+  if((DataArrayIdType *)out0s)
     {// here dealing with cells in out0s but not in cellsToBeModified
-      MCAuto<DataArrayInt> fewModifiedCells(out0s->buildSubstraction(cellsToBeModified));
-      const int *rdptr(dd3->begin()),*rdiptr(dd4->begin()),*dptr(dd1->begin()),*diptr(dd2->begin());
-      for(const int *it=fewModifiedCells->begin();it!=fewModifiedCells->end();it++)
+      MCAuto<DataArrayIdType> fewModifiedCells(out0s->buildSubstraction(cellsToBeModified));
+      const mcIdType *rdptr(dd3->begin()),*rdiptr(dd4->begin()),*dptr(dd1->begin()),*diptr(dd2->begin());
+      for(const mcIdType *it=fewModifiedCells->begin();it!=fewModifiedCells->end();it++)
         {
           outMesh2DSplit.push_back(BuildRefined2DCell(ret1->getCoords(),mesh2D,*it,dptr+diptr[*it],dptr+diptr[*it+1],intersectEdge1));
           ret1->setCoords(outMesh2DSplit.back()->getCoords());
         }
-      int offset(ret2->getNumberOfTuples());
+      mcIdType offset(ret2->getNumberOfTuples());
       ret2->pushBackValsSilent(fewModifiedCells->begin(),fewModifiedCells->end());
-      MCAuto<DataArrayInt> partOfRet3(DataArrayInt::New()); partOfRet3->alloc(2*idsInRet1Colinear->getNumberOfTuples(),1);
-      partOfRet3->fillWithValue(std::numeric_limits<int>::max()); partOfRet3->rearrange(2);
-      int kk(0),*ret3ptr(partOfRet3->getPointer());
-      for(const int *it=idsInDescMesh2DForIdsInRetColinear->begin();it!=idsInDescMesh2DForIdsInRetColinear->end();it++,kk++)
+      MCAuto<DataArrayIdType> partOfRet3(DataArrayIdType::New()); partOfRet3->alloc(2*idsInRet1Colinear->getNumberOfTuples(),1);
+      partOfRet3->fillWithValue(std::numeric_limits<mcIdType>::max()); partOfRet3->rearrange(2);
+      mcIdType kk(0),*ret3ptr(partOfRet3->getPointer());
+      for(const mcIdType *it=idsInDescMesh2DForIdsInRetColinear->begin();it!=idsInDescMesh2DForIdsInRetColinear->end();it++,kk++)
         {
-          int faceId(std::abs(*it)-1);
-          for(const int *it2=rdptr+rdiptr[faceId];it2!=rdptr+rdiptr[faceId+1];it2++)
+          mcIdType faceId(std::abs(*it)-1);
+          for(const mcIdType *it2=rdptr+rdiptr[faceId];it2!=rdptr+rdiptr[faceId+1];it2++)
             {
-              int tmp(fewModifiedCells->findIdFirstEqual(*it2));
+              mcIdType tmp(fewModifiedCells->findIdFirstEqual(*it2));
               if(tmp!=-1)
                 {
                   if(std::find(dptr+diptr[*it2],dptr+diptr[*it2+1],-(*it))!=dptr+diptr[*it2+1])
@@ -1896,17 +1899,17 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
         }
     }
   cellsToBeModified=cellsToBeModified->buildUniqueNotSorted();
-  for(const int *it=cellsToBeModified->begin();it!=cellsToBeModified->end();it++)
+  for(const mcIdType *it=cellsToBeModified->begin();it!=cellsToBeModified->end();it++)
     {
-      MCAuto<DataArrayInt> idsNonColPerCell(elts->findIdsEqual(*it));
+      MCAuto<DataArrayIdType> idsNonColPerCell(elts->findIdsEqual(*it));
       idsNonColPerCell->transformWithIndArr(eltsIndex3->begin(),eltsIndex3->end());
-      MCAuto<DataArrayInt> idsNonColPerCell2(idsInRet1NotColinear->selectByTupleId(idsNonColPerCell->begin(),idsNonColPerCell->end()));
+      MCAuto<DataArrayIdType> idsNonColPerCell2(idsInRet1NotColinear->selectByTupleId(idsNonColPerCell->begin(),idsNonColPerCell->end()));
       MCAuto<MEDCouplingUMesh> partOfMesh1CuttingCur2DCell(static_cast<MEDCouplingUMesh *>(ret1NonCol->buildPartOfMySelf(idsNonColPerCell->begin(),idsNonColPerCell->end())));
-      MCAuto<DataArrayInt> partOfRet3;
+      MCAuto<DataArrayIdType> partOfRet3;
       MCAuto<MEDCouplingUMesh> splitOfOneCell(BuildMesh2DCutFrom(eps,*it,m1Desc,partOfMesh1CuttingCur2DCell,dd1->begin()+dd2->getIJ(*it,0),dd1->begin()+dd2->getIJ((*it)+1,0),intersectEdge1,ret2->getNumberOfTuples(),partOfRet3));
       ret3->setPartOfValues3(partOfRet3,idsNonColPerCell2->begin(),idsNonColPerCell2->end(),0,2,1,true);
       outMesh2DSplit.push_back(splitOfOneCell);
-      for(std::size_t i=0;i<splitOfOneCell->getNumberOfCells();i++)
+      for(mcIdType i=0;i<splitOfOneCell->getNumberOfCells();i++)
         ret2->pushBackSilent(*it);
     }
   //
@@ -1917,16 +1920,16 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
   //
   ret1->getCoords()->setInfoOnComponents(compNames);
   MCAuto<MEDCouplingUMesh> ret2D(MEDCouplingUMesh::MergeUMeshesOnSameCoords(tmp));
-  // To finish - filter ret3 - std::numeric_limits<int>::max() -> -1 - negate values must be resolved.
+  // To finish - filter ret3 - std::numeric_limits<mcIdType>::max() -> -1 - negate values must be resolved.
   ret3->rearrange(1);
-  MCAuto<DataArrayInt> edgesToDealWith(ret3->findIdsStrictlyNegative());
-  for(const int *it=edgesToDealWith->begin();it!=edgesToDealWith->end();it++)
+  MCAuto<DataArrayIdType> edgesToDealWith(ret3->findIdsStrictlyNegative());
+  for(const mcIdType *it=edgesToDealWith->begin();it!=edgesToDealWith->end();it++)
     {
-      int old2DCellId(-ret3->getIJ(*it,0)-1);
-      MCAuto<DataArrayInt> candidates(ret2->findIdsEqual(old2DCellId));
+      mcIdType old2DCellId(-ret3->getIJ(*it,0)-1);
+      MCAuto<DataArrayIdType> candidates(ret2->findIdsEqual(old2DCellId));
       ret3->setIJ(*it,0,FindRightCandidateAmong(ret2D,candidates->begin(),candidates->end(),ret1,*it%2==0?-((*it)/2+1):(*it)/2+1,eps));// div by 2 because 2 components natively in ret3
     }
-  ret3->changeValue(std::numeric_limits<int>::max(),-1);
+  ret3->changeValue(std::numeric_limits<mcIdType>::max(),-1);
   ret3->rearrange(2);
   //
   splitMesh1D=ret1.retn();
@@ -1950,7 +1953,7 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
  * If it is not the case you can invoke MEDCouplingUMesh::mergeNodes before calling this method.
  *
  * \param [in] eps the relative error to detect merged edges.
- * \return DataArrayInt  * - The list of cellIds in \a this that have been subdivided. If empty, nothing changed in \a this (as if it were a const method). The array is a newly allocated array
+ * \return DataArrayIdType  * - The list of cellIds in \a this that have been subdivided. If empty, nothing changed in \a this (as if it were a const method). The array is a newly allocated array
  *                           that the user is expected to deal with.
  *
  * \throw If \a this is not coherent.
@@ -1958,30 +1961,30 @@ void MEDCouplingUMesh::Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D,
  * \throw If \a this has not meshDim equal to 2.
  * \sa MEDCouplingUMesh::mergeNodes, MEDCouplingUMesh::split2DCells
  */
-DataArrayInt *MEDCouplingUMesh::conformize2D(double eps)
+DataArrayIdType *MEDCouplingUMesh::conformize2D(double eps)
 {
   static const int SPACEDIM=2;
   checkConsistencyLight();
   if(getSpaceDimension()!=2 || getMeshDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::conformize2D : This method only works for meshes with spaceDim=2 and meshDim=2 !");
-  MCAuto<DataArrayInt> desc1(DataArrayInt::New()),descIndx1(DataArrayInt::New()),revDesc1(DataArrayInt::New()),revDescIndx1(DataArrayInt::New());
+  MCAuto<DataArrayIdType> desc1(DataArrayIdType::New()),descIndx1(DataArrayIdType::New()),revDesc1(DataArrayIdType::New()),revDescIndx1(DataArrayIdType::New());
   MCAuto<MEDCouplingUMesh> mDesc(buildDescendingConnectivity(desc1,descIndx1,revDesc1,revDescIndx1));
-  const int *c(mDesc->getNodalConnectivity()->begin()),*ci(mDesc->getNodalConnectivityIndex()->begin()),*rd(revDesc1->begin()),*rdi(revDescIndx1->begin());
+  const mcIdType *c(mDesc->getNodalConnectivity()->begin()),*ci(mDesc->getNodalConnectivityIndex()->begin()),*rd(revDesc1->begin()),*rdi(revDescIndx1->begin());
   MCAuto<DataArrayDouble> bboxArr(mDesc->getBoundingBoxForBBTree(eps));
   const double *bbox(bboxArr->begin()),*coords(getCoords()->begin());
-  int nCell(getNumberOfCells()),nDescCell(mDesc->getNumberOfCells());
-  std::vector< std::vector<int> > intersectEdge(nDescCell),overlapEdge(nDescCell);
+  mcIdType nCell=getNumberOfCells(),nDescCell=mDesc->getNumberOfCells();
+  std::vector< std::vector<mcIdType> > intersectEdge(nDescCell),overlapEdge(nDescCell);
   std::vector<double> addCoo;
-  BBTree<SPACEDIM,int> myTree(bbox,0,0,nDescCell,-eps);
+  BBTree<SPACEDIM,mcIdType> myTree(bbox,0,0,nDescCell,-eps);
   INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
-  for(int i=0;i<nDescCell;i++)
+  for(mcIdType i=0;i<nDescCell;i++)
     {
-      std::vector<int> candidates;
+      std::vector<mcIdType> candidates;
       myTree.getIntersectingElems(bbox+i*2*SPACEDIM,candidates);
-      for(std::vector<int>::const_iterator it=candidates.begin();it!=candidates.end();it++)
+      for(std::vector<mcIdType>::const_iterator it=candidates.begin();it!=candidates.end();it++)
         if(*it>i)  // we're dealing with pair of edges, no need to treat the same pair twice
           {
-            std::map<MCAuto<INTERP_KERNEL::Node>,int> m;
+            std::map<MCAuto<INTERP_KERNEL::Node>,mcIdType> m;
             INTERP_KERNEL::Edge *e1(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)c[ci[i]],c+ci[i]+1,coords,m)),
                 *e2(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)c[ci[*it]],c+ci[*it]+1,coords,m));
             INTERP_KERNEL::MergePoints merge;
@@ -1995,24 +1998,24 @@ DataArrayInt *MEDCouplingUMesh::conformize2D(double eps)
           }
     }
   // splitting done. sort intersect point in intersectEdge.
-  std::vector< std::vector<int> > middle(nDescCell);
-  int nbOf2DCellsToBeSplit(0);
+  std::vector< std::vector<mcIdType> > middle(nDescCell);
+  mcIdType nbOf2DCellsToBeSplit(0);
   bool middleNeedsToBeUsed(false);
   std::vector<bool> cells2DToTreat(nDescCell,false);
-  for(int i=0;i<nDescCell;i++)
+  for(mcIdType i=0;i<nDescCell;i++)
     {
-      std::vector<int>& isect(intersectEdge[i]);
-      int sz((int)isect.size());
+      std::vector<mcIdType>& isect(intersectEdge[i]);
+      std::size_t sz(isect.size());
       if(sz>1)
         {
-          std::map<MCAuto<INTERP_KERNEL::Node>,int> m;
+          std::map<MCAuto<INTERP_KERNEL::Node>,mcIdType> m;
           INTERP_KERNEL::Edge *e(MEDCouplingUMeshBuildQPFromEdge2((INTERP_KERNEL::NormalizedCellType)c[ci[i]],c+ci[i]+1,coords,m));
           e->sortSubNodesAbs(coords,isect);
           e->decrRef();
         }
       if(sz!=0)
         {
-          int idx0(rdi[i]),idx1(rdi[i+1]);
+          mcIdType idx0(rdi[i]),idx1(rdi[i+1]);
           if(idx1-idx0!=1)
             throw INTERP_KERNEL::Exception("MEDCouplingUMesh::conformize2D : internal error #0 !");
           if(!cells2DToTreat[rd[idx0]])
@@ -2021,22 +2024,22 @@ DataArrayInt *MEDCouplingUMesh::conformize2D(double eps)
               nbOf2DCellsToBeSplit++;
             }
           // try to reuse at most eventual 'middle' of SEG3
-          std::vector<int>& mid(middle[i]);
+          std::vector<mcIdType>& mid(middle[i]);
           mid.resize(sz+1,-1);
           if((INTERP_KERNEL::NormalizedCellType)c[ci[i]]==INTERP_KERNEL::NORM_SEG3)
             {
               middleNeedsToBeUsed=true;
-              const std::vector<int>& candidates(overlapEdge[i]);
-              std::vector<int> trueCandidates;
-              for(std::vector<int>::const_iterator itc=candidates.begin();itc!=candidates.end();itc++)
+              const std::vector<mcIdType>& candidates(overlapEdge[i]);
+              std::vector<mcIdType> trueCandidates;
+              for(std::vector<mcIdType>::const_iterator itc=candidates.begin();itc!=candidates.end();itc++)
                 if((INTERP_KERNEL::NormalizedCellType)c[ci[*itc]]==INTERP_KERNEL::NORM_SEG3)
                   trueCandidates.push_back(*itc);
-              int stNode(c[ci[i]+1]),endNode(isect[0]);
-              for(int j=0;j<sz+1;j++)
+              mcIdType stNode(c[ci[i]+1]),endNode(isect[0]);
+              for(std::size_t j=0;j<sz+1;j++)
                 {
-                  for(std::vector<int>::const_iterator itc=trueCandidates.begin();itc!=trueCandidates.end();itc++)
+                  for(std::vector<mcIdType>::const_iterator itc=trueCandidates.begin();itc!=trueCandidates.end();itc++)
                     {
-                      int tmpSt(c[ci[*itc]+1]),tmpEnd(c[ci[*itc]+2]);
+                      mcIdType tmpSt(c[ci[*itc]+1]),tmpEnd(c[ci[*itc]+2]);
                       if((tmpSt==stNode && tmpEnd==endNode) || (tmpSt==endNode && tmpEnd==stNode))
                         { mid[j]=*itc; break; }
                     }
@@ -2046,29 +2049,29 @@ DataArrayInt *MEDCouplingUMesh::conformize2D(double eps)
             }
         }
     }
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()),notRet(DataArrayInt::New()); ret->alloc(nbOf2DCellsToBeSplit,1);
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()),notRet(DataArrayIdType::New()); ret->alloc(nbOf2DCellsToBeSplit,1);
   if(nbOf2DCellsToBeSplit==0)
     return ret.retn();
   //
-  int *retPtr(ret->getPointer());
-  for(int i=0;i<nCell;i++)
+  mcIdType *retPtr(ret->getPointer());
+  for(mcIdType i=0;i<nCell;i++)
     if(cells2DToTreat[i])
       *retPtr++=i;
   //
-  MCAuto<DataArrayInt> mSafe,nSafe,oSafe,pSafe,qSafe,rSafe;
-  DataArrayInt *m(0),*n(0),*o(0),*p(0),*q(0),*r(0);
-  DataArrayInt::ExtractFromIndexedArrays(ret->begin(),ret->end(),desc1,descIndx1,m,n); mSafe=m; nSafe=n;
-  DataArrayInt::PutIntoToSkylineFrmt(intersectEdge,o,p); oSafe=o; pSafe=p;
+  MCAuto<DataArrayIdType> mSafe,nSafe,oSafe,pSafe,qSafe,rSafe;
+  DataArrayIdType *m(0),*n(0),*o(0),*p(0),*q(0),*r(0);
+  DataArrayIdType::ExtractFromIndexedArrays(ret->begin(),ret->end(),desc1,descIndx1,m,n); mSafe=m; nSafe=n;
+  DataArrayIdType::PutIntoToSkylineFrmt(intersectEdge,o,p); oSafe=o; pSafe=p;
   if(middleNeedsToBeUsed)
-    { DataArrayInt::PutIntoToSkylineFrmt(middle,q,r); qSafe=q; rSafe=r; }
+    { DataArrayIdType::PutIntoToSkylineFrmt(middle,q,r); qSafe=q; rSafe=r; }
   MCAuto<MEDCouplingUMesh> modif(static_cast<MEDCouplingUMesh *>(buildPartOfMySelf(ret->begin(),ret->end(),true)));
-  int nbOfNodesCreated(modif->split2DCells(mSafe,nSafe,oSafe,pSafe,qSafe,rSafe));
+  mcIdType nbOfNodesCreated(modif->split2DCells(mSafe,nSafe,oSafe,pSafe,qSafe,rSafe));
   setCoords(modif->getCoords());//if nbOfNodesCreated==0 modif and this have the same coordinates pointer so this line has no effect. But for quadratic cases this line is important.
   setPartOfMySelf(ret->begin(),ret->end(),*modif);
   {
-    bool areNodesMerged; int newNbOfNodes;
+    bool areNodesMerged; mcIdType newNbOfNodes;
     if(nbOfNodesCreated!=0)
-      MCAuto<DataArrayInt> tmp(mergeNodes(eps,areNodesMerged,newNbOfNodes));
+      MCAuto<DataArrayIdType> tmp(mergeNodes(eps,areNodesMerged,newNbOfNodes));
   }
   return ret.retn();
 }
@@ -2086,7 +2089,7 @@ DataArrayInt *MEDCouplingUMesh::conformize2D(double eps)
  *
  * If \a this is constituted by only linear 2D cells, this method is close to the computation of the convex hull of each cells in \a this.
  *
- * \return DataArrayInt  * - The list of cellIds in \a this that have at least one edge colinearized.
+ * \return DataArrayIdType  * - The list of cellIds in \a this that have at least one edge colinearized.
  *
  * \throw If \a this is not coherent.
  * \throw If \a this has not spaceDim equal to 2.
@@ -2094,7 +2097,7 @@ DataArrayInt *MEDCouplingUMesh::conformize2D(double eps)
  *
  * \sa MEDCouplingUMesh::conformize2D, MEDCouplingUMesh::mergeNodes, MEDCouplingUMesh::convexEnvelop2D.
  */
-DataArrayInt *MEDCouplingUMesh::colinearize2D(double eps)
+DataArrayIdType *MEDCouplingUMesh::colinearize2D(double eps)
 {
   return internalColinearize2D(eps, false);
 }
@@ -2106,7 +2109,7 @@ DataArrayInt *MEDCouplingUMesh::colinearize2D(double eps)
  *
  * \sa MEDCouplingUMesh::colinearize2D
  */
-DataArrayInt *MEDCouplingUMesh::colinearizeKeepingConform2D(double eps)
+DataArrayIdType *MEDCouplingUMesh::colinearizeKeepingConform2D(double eps)
 {
   return internalColinearize2D(eps, true);
 }
@@ -2115,35 +2118,35 @@ DataArrayInt *MEDCouplingUMesh::colinearizeKeepingConform2D(double eps)
 /*!
  * \param stayConform is set to True, will not fuse two edges sharing a node that has (strictly) more than 2 egdes connected to it
  */
-DataArrayInt *MEDCouplingUMesh::internalColinearize2D(double eps, bool stayConform)
+DataArrayIdType *MEDCouplingUMesh::internalColinearize2D(double eps, bool stayConform)
 {
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
   checkConsistencyLight();
   if(getSpaceDimension()!=2 || getMeshDimension()!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::colinearize2D : This method only works for meshes with spaceDim=2 and meshDim=2 !");
   INTERP_KERNEL::QuadraticPlanarPrecision prec(eps);
-  int nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
-  const int *cptr(_nodal_connec->begin()),*ciptr(_nodal_connec_index->begin());
-  MCAuto<DataArrayInt> newc(DataArrayInt::New()),newci(DataArrayInt::New()); newci->alloc(nbOfCells+1,1); newc->alloc(0,1); newci->setIJ(0,0,0);
-  std::map<int, bool> forbiddenPoints;  // list of points that can not be removed (or it will break conformity)
+  mcIdType nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
+  const mcIdType *cptr(_nodal_connec->begin()),*ciptr(_nodal_connec_index->begin());
+  MCAuto<DataArrayIdType> newc(DataArrayIdType::New()),newci(DataArrayIdType::New()); newci->alloc(nbOfCells+1,1); newc->alloc(0,1); newci->setIJ(0,0,0);
+  std::map<mcIdType, bool> forbiddenPoints;  // list of points that can not be removed (or it will break conformity)
   if(stayConform) //
     {
       // A point that is used by more than 2 edges can not be removed without breaking conformity:
-      MCAuto<DataArrayInt> desc1(DataArrayInt::New()),descI1(DataArrayInt::New()),revDesc1(DataArrayInt::New()),revDescI1(DataArrayInt::New());
+      MCAuto<DataArrayIdType> desc1(DataArrayIdType::New()),descI1(DataArrayIdType::New()),revDesc1(DataArrayIdType::New()),revDescI1(DataArrayIdType::New());
       MCAuto<MEDCouplingUMesh> mDesc1D(buildDescendingConnectivity(desc1,descI1,revDesc1,revDescI1));
-      MCAuto<DataArrayInt> desc2(DataArrayInt::New()),descI2(DataArrayInt::New()),revDesc2(DataArrayInt::New()),revDescI2(DataArrayInt::New());
+      MCAuto<DataArrayIdType> desc2(DataArrayIdType::New()),descI2(DataArrayIdType::New()),revDesc2(DataArrayIdType::New()),revDescI2(DataArrayIdType::New());
       MCAuto<MEDCouplingUMesh> mDesc0D(mDesc1D->buildDescendingConnectivity(desc2,descI2,revDesc2,revDescI2));
-      MCAuto<DataArrayInt> dsi(revDescI2->deltaShiftIndex());
-      MCAuto<DataArrayInt> ids(dsi->findIdsGreaterThan(2));
-      const int * cPtr(mDesc0D->getNodalConnectivity()->begin());
+      MCAuto<DataArrayIdType> dsi(revDescI2->deltaShiftIndex());
+      MCAuto<DataArrayIdType> ids(dsi->findIdsGreaterThan(2));
+      const mcIdType * cPtr(mDesc0D->getNodalConnectivity()->begin());
       for(auto it = ids->begin(); it != ids->end(); it++)
          forbiddenPoints[cPtr[2*(*it)+1]] = true;  // we know that a 0D mesh has a connectivity of the form [NORM_POINT1, i1, NORM_POINT1, i2, ...]
     }
 
   MCAuto<DataArrayDouble> appendedCoords(DataArrayDouble::New()); appendedCoords->alloc(0,1);//1 not 2 it is not a bug.
   const double *coords(_coords->begin());
-  int *newciptr(newci->getPointer());
-  for(int i=0;i<nbOfCells;i++,newciptr++,ciptr++)
+  mcIdType *newciptr(newci->getPointer());
+  for(mcIdType i=0;i<nbOfCells;i++,newciptr++,ciptr++)
     {
       if(Colinearize2DCell(coords,cptr+ciptr[0],cptr+ciptr[1],nbOfNodes,forbiddenPoints, /*out*/ newc,appendedCoords))
         ret->pushBackSilent(i);
@@ -2170,19 +2173,19 @@ DataArrayInt *MEDCouplingUMesh::internalColinearize2D(double eps, bool stayConfo
  * startNode, endNode in global numbering
  *\return true if the segment is indeed split
  */
-bool MEDCouplingUMesh::OrderPointsAlongLine(const double * coo, int startNode, int endNode,
-                                            const int * c, const int * cI, const int *idsBg, const int *endBg,
-                                            std::vector<int> & pointIds, std::vector<int> & hitSegs)
+bool MEDCouplingUMesh::OrderPointsAlongLine(const double * coo, mcIdType startNode, mcIdType endNode,
+                                            const mcIdType * c, const mcIdType * cI, const mcIdType *idsBg, const mcIdType *endBg,
+                                            std::vector<mcIdType> & pointIds, std::vector<mcIdType> & hitSegs)
 {
   using namespace std;
 
   const int SPACEDIM=3;
-  typedef pair<double, int> PairDI;
+  typedef pair<double, mcIdType> PairDI;
   set< PairDI > x;
-  for (const int * it = idsBg; it != endBg; ++it)
+  for (const mcIdType * it = idsBg; it != endBg; ++it)
     {
       assert(c[cI[*it]] == INTERP_KERNEL::NORM_SEG2);
-      int start = c[cI[*it]+1], end = c[cI[*it]+2];
+      mcIdType start = c[cI[*it]+1], end = c[cI[*it]+2];
       x.insert(make_pair(coo[start*SPACEDIM], start));  // take only X coords
       x.insert(make_pair(coo[end*SPACEDIM], end));
     }
@@ -2192,10 +2195,10 @@ bool MEDCouplingUMesh::OrderPointsAlongLine(const double * coo, int startNode, i
   pointIds.reserve(xx.size());
 
   // Keep what is inside [startNode, endNode]:
-  int go = 0;
+  mcIdType go = 0;
   for (vector<PairDI>::const_iterator it=xx.begin(); it != xx.end(); ++it)
     {
-      const int idx = (*it).second;
+      const mcIdType idx = (*it).second;
       if (!go)
         {
           if (idx == startNode)   go = 1;
@@ -2208,7 +2211,7 @@ bool MEDCouplingUMesh::OrderPointsAlongLine(const double * coo, int startNode, i
         break;
     }
 
-//  vector<int> pointIds2(pointIds.size()+2);
+//  vector<mcIdType> pointIds2(pointIds.size()+2);
 //  copy(pointIds.begin(), pointIds.end(), pointIds2.data()+1);
 //  pointIds2[0] = startNode;
 //  pointIds2[pointIds2.size()-1] = endNode;
@@ -2217,12 +2220,12 @@ bool MEDCouplingUMesh::OrderPointsAlongLine(const double * coo, int startNode, i
     reverse(pointIds.begin(), pointIds.end());
 
   // Now identify smaller segments that are not sub-divided - those won't need any further treatment:
-  for (const int * it = idsBg; it != endBg; ++it)
+  for (const mcIdType * it = idsBg; it != endBg; ++it)
     {
-      int start = c[cI[*it]+1], end = c[cI[*it]+2];
-      vector<int>::const_iterator itStart = find(pointIds.begin(), pointIds.end(), start);
+      mcIdType start = c[cI[*it]+1], end = c[cI[*it]+2];
+      vector<mcIdType>::const_iterator itStart = find(pointIds.begin(), pointIds.end(), start);
       if (itStart == pointIds.end()) continue;
-      vector<int>::const_iterator itEnd = find(pointIds.begin(), pointIds.end(), end);
+      vector<mcIdType>::const_iterator itEnd = find(pointIds.begin(), pointIds.end(), end);
       if (itEnd == pointIds.end())               continue;
       if (abs(distance(itEnd, itStart)) != 1)    continue;
       hitSegs.push_back(*it);   // segment is undivided.
@@ -2231,23 +2234,23 @@ bool MEDCouplingUMesh::OrderPointsAlongLine(const double * coo, int startNode, i
   return (pointIds.size() > 2); // something else apart start and end node
 }
 
-void MEDCouplingUMesh::ReplaceEdgeInFace(const int * sIdxConn, const int * sIdxConnE, int startNode, int endNode,
-                                          const std::vector<int>& insidePoints, std::vector<int>& modifiedFace)
+void MEDCouplingUMesh::ReplaceEdgeInFace(const mcIdType * sIdxConn, const mcIdType * sIdxConnE, mcIdType startNode, mcIdType endNode,
+                                          const std::vector<mcIdType>& insidePoints, std::vector<mcIdType>& modifiedFace)
 {
   using namespace std;
-  int dst = distance(sIdxConn, sIdxConnE);
+  size_t dst = distance(sIdxConn, sIdxConnE);
   modifiedFace.reserve(dst + insidePoints.size()-2);
   modifiedFace.resize(dst);
   copy(sIdxConn, sIdxConnE, modifiedFace.data());
 
-  vector<int>::iterator shortEnd = modifiedFace.begin()+dst;
-  vector<int>::iterator startPos = find(modifiedFace.begin(), shortEnd , startNode);
+  vector<mcIdType>::iterator shortEnd = modifiedFace.begin()+dst;
+  vector<mcIdType>::iterator startPos = find(modifiedFace.begin(), shortEnd , startNode);
   if (startPos == shortEnd)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ReplaceEdgeInFace: internal error, should never happen!");
-  vector<int>::iterator endPos = find(modifiedFace.begin(),shortEnd, endNode);
+  vector<mcIdType>::iterator endPos = find(modifiedFace.begin(),shortEnd, endNode);
   if (endPos == shortEnd)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ReplaceEdgeInFace: internal error, should never happen!");
-  int d = distance(startPos, endPos);
+  size_t d = distance(startPos, endPos);
   if (d == 1 || d == (1-dst)) // don't use modulo, for neg numbers, result is implementation defined ...
     modifiedFace.insert(++startPos, ++insidePoints.begin(), --insidePoints.end());  // insidePoints also contains start and end node. Those don't need to be inserted.
   else
@@ -2269,7 +2272,7 @@ void MEDCouplingUMesh::ReplaceEdgeInFace(const int * sIdxConn, const int * sIdxC
  * If it is not the case you can invoke MEDCouplingUMesh::mergeNodes before calling this method.
  *
  * \param [in] eps the relative error to detect merged edges.
- * \return DataArrayInt  * - The list of cellIds in \a this that have been subdivided. If empty, nothing changed in \a this (as if it were a const method). The array is a newly allocated array
+ * \return DataArrayIdType  * - The list of cellIds in \a this that have been subdivided. If empty, nothing changed in \a this (as if it were a const method). The array is a newly allocated array
  *                           that the user is expected to deal with.
  *
  * \throw If \a this is not coherent.
@@ -2277,7 +2280,7 @@ void MEDCouplingUMesh::ReplaceEdgeInFace(const int * sIdxConn, const int * sIdxC
  * \throw If \a this has not meshDim equal to 3.
  * \sa MEDCouplingUMesh::mergeNodes, MEDCouplingUMesh::conformize2D, MEDCouplingUMesh::convertAllToPoly()
  */
-DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
+DataArrayIdType *MEDCouplingUMesh::conformize3D(double eps)
 {
   using namespace std;
 
@@ -2290,23 +2293,23 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
 
   MCAuto<MEDCouplingSkyLineArray> connSla(MEDCouplingSkyLineArray::BuildFromPolyhedronConn(getNodalConnectivity(), getNodalConnectivityIndex()));
   const double * coo(_coords->begin());
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(0,1);
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(0,1);
 
   {
     /*************************
      *  STEP 1  -- faces
      *************************/
-    MCAuto<DataArrayInt> descDNU(DataArrayInt::New()),descIDNU(DataArrayInt::New()),revDesc(DataArrayInt::New()),revDescI(DataArrayInt::New());
+    MCAuto<DataArrayIdType> descDNU(DataArrayIdType::New()),descIDNU(DataArrayIdType::New()),revDesc(DataArrayIdType::New()),revDescI(DataArrayIdType::New());
     MCAuto<MEDCouplingUMesh> mDesc(buildDescendingConnectivity(descDNU,descIDNU,revDesc,revDescI));
-    const int *revDescIP(revDescI->getConstPointer()), *revDescP(revDesc->getConstPointer());
-    const int *cDesc(mDesc->getNodalConnectivity()->begin()),*cIDesc(mDesc->getNodalConnectivityIndex()->begin());
+    const mcIdType *revDescIP(revDescI->getConstPointer()), *revDescP(revDesc->getConstPointer());
+    const mcIdType *cDesc(mDesc->getNodalConnectivity()->begin()),*cIDesc(mDesc->getNodalConnectivityIndex()->begin());
     MCAuto<MEDCouplingSkyLineArray> connSlaDesc(MEDCouplingSkyLineArray::New(mDesc->getNodalConnectivityIndex(), mDesc->getNodalConnectivity()));
 
     // Build BBTree
     MCAuto<DataArrayDouble> bboxArr(mDesc->getBoundingBoxForBBTree(eps));
     const double *bbox(bboxArr->begin()); getCoords()->begin();
-    int nDescCell(mDesc->getNumberOfCells());
-    BBTree<SPACEDIM,int> myTree(bbox,0,0,nDescCell,-eps);
+    mcIdType nDescCell=mDesc->getNumberOfCells();
+    BBTree<SPACEDIM,mcIdType> myTree(bbox,0,0,nDescCell,-eps);
     // Surfaces - handle biggest first
     MCAuto<MEDCouplingFieldDouble> surfF = mDesc->getMeasureField(true);
     DataArrayDouble * surfs = surfF->getArray();
@@ -2316,26 +2319,26 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
     const double * normalsP = normals->getConstPointer();
 
     // Sort faces by decreasing surface:
-    vector< pair<double,int> > S;
-    for(std::size_t i=0;i < surfs->getNumberOfTuples();i++)
+    vector< pair<double,mcIdType> > S;
+    for(mcIdType i=0;i < surfs->getNumberOfTuples();i++)
       {
-        pair<double,int> p = make_pair(surfs->begin()[i], i);
+        pair<double,mcIdType> p = make_pair(surfs->begin()[i], i);
         S.push_back(p);
       }
     sort(S.rbegin(),S.rend()); // reverse sort
     vector<bool> hit(nDescCell);
     fill(hit.begin(), hit.end(), false);
-    vector<int> hitPoly; // the final result: which 3D cells have been modified.
+    vector<mcIdType> hitPoly; // the final result: which 3D cells have been modified.
 
-    for( vector<pair<double,int> >::const_iterator it = S.begin(); it != S.end(); it++)
+    for( vector<pair<double,mcIdType> >::const_iterator it = S.begin(); it != S.end(); it++)
       {
-        int faceIdx = (*it).second;
+        mcIdType faceIdx = (*it).second;
         if (hit[faceIdx]) continue;
 
-        vector<int> candidates, cands2;
+        vector<mcIdType> candidates, cands2;
         myTree.getIntersectingElems(bbox+faceIdx*2*SPACEDIM,candidates);
         // Keep only candidates whose normal matches the normal of current face
-        for(vector<int>::const_iterator it2=candidates.begin();it2!=candidates.end();it2++)
+        for(vector<mcIdType>::const_iterator it2=candidates.begin();it2!=candidates.end();it2++)
           {
             bool col = INTERP_KERNEL::isColinear3D(normalsP + faceIdx*SPACEDIM, normalsP + *(it2)*SPACEDIM, eps);
             if (*it2 != faceIdx && col)
@@ -2354,16 +2357,16 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
         MCAuto<MEDCouplingUMesh> mPartCand(mDesc->buildPartOfMySelf(&cands2[0], &cands2[0]+cands2.size(), false)); // false=zipCoords is called
         double * cooPartRef(mPartRef->_coords->getPointer());
         double * cooPartCand(mPartCand->_coords->getPointer());
-        for (std::size_t ii = 0; ii < mPartRef->_coords->getNumberOfTuples(); ii++)
+        for (mcIdType ii = 0; ii < mPartRef->_coords->getNumberOfTuples(); ii++)
           rotation.transform_vector(cooPartRef+SPACEDIM*ii);
-        for (std::size_t ii = 0; ii < mPartCand->_coords->getNumberOfTuples(); ii++)
+        for (mcIdType ii = 0; ii < mPartCand->_coords->getNumberOfTuples(); ii++)
           rotation.transform_vector(cooPartCand+SPACEDIM*ii);
 
         // Localize faces in 2D thanks to barycenters
         MCAuto<DataArrayDouble> baryPart = mPartCand->computeCellCenterOfMass();
-        vector<int> compo; compo.push_back(2);
+        vector<std::size_t> compo; compo.push_back(2);
         MCAuto<DataArrayDouble> baryPartZ = baryPart->keepSelectedComponents(compo);
-        MCAuto<DataArrayInt> idsGoodPlane = baryPartZ->findIdsInRange(-eps, +eps);
+        MCAuto<DataArrayIdType> idsGoodPlane = baryPartZ->findIdsInRange(-eps, +eps);
         if (!idsGoodPlane->getNumberOfTuples())
           continue;
 
@@ -2372,15 +2375,15 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
         compo[0] = 0; compo.push_back(1);
         MCAuto<DataArrayDouble> baryPartXY = baryPart->keepSelectedComponents(compo);
         mPartRef->changeSpaceDimension(2,0.0);
-        MCAuto<DataArrayInt> cc(DataArrayInt::New()), ccI(DataArrayInt::New());
+        MCAuto<DataArrayIdType> cc(DataArrayIdType::New()), ccI(DataArrayIdType::New());
         mPartRef->getCellsContainingPoints(baryPartXY->begin(), baryPartXY->getNumberOfTuples(), eps, cc, ccI);
 
         if (!cc->getNumberOfTuples())
           continue;
-        MCAuto<DataArrayInt> dsi = ccI->deltaShiftIndex();
+        MCAuto<DataArrayIdType> dsi = ccI->deltaShiftIndex();
 
         {
-          MCAuto<DataArrayInt> tmp = dsi->findIdsInRange(0, 2);
+          MCAuto<DataArrayIdType> tmp = dsi->findIdsInRange(0, 2);
           if (tmp->getNumberOfTuples() != dsi->getNumberOfTuples())
             {
               ostringstream oss;
@@ -2389,16 +2392,16 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
             }
         }
 
-        MCAuto<DataArrayInt> ids = dsi->findIdsEqual(1);
+        MCAuto<DataArrayIdType> ids = dsi->findIdsEqual(1);
         // Boundary face:
         if (!ids->getNumberOfTuples())
           continue;
 
         double checkSurf=0.0;
-        const int * idsGoodPlaneP(idsGoodPlane->begin());
-        for (const int * ii = ids->begin(); ii != ids->end(); ii++)
+        const mcIdType * idsGoodPlaneP(idsGoodPlane->begin());
+        for (const mcIdType * ii = ids->begin(); ii != ids->end(); ii++)
           {
-            int faceIdx2 = cands2[idsGoodPlaneP[*ii]];
+            mcIdType faceIdx2 = cands2[idsGoodPlaneP[*ii]];
             hit[faceIdx2] = true;
             checkSurf += surfs->begin()[faceIdx2];
           }
@@ -2410,18 +2413,18 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
           }
 
         // For all polyhedrons using this face, replace connectivity:
-        vector<int> polyIndices, packsIds, facePack;
-        for (int ii=revDescIP[faceIdx]; ii < revDescIP[faceIdx+1]; ii++)
+        vector<mcIdType> polyIndices, packsIds, facePack;
+        for (mcIdType ii=revDescIP[faceIdx]; ii < revDescIP[faceIdx+1]; ii++)
           polyIndices.push_back(revDescP[ii]);
         ret->pushBackValsSilent(polyIndices.data(),polyIndices.data()+polyIndices.size());
 
         // Current face connectivity
-        const int * sIdxConn = cDesc + cIDesc[faceIdx] + 1;
-        const int * sIdxConnE = cDesc + cIDesc[faceIdx+1];
+        const mcIdType * sIdxConn = cDesc + cIDesc[faceIdx] + 1;
+        const mcIdType * sIdxConnE = cDesc + cIDesc[faceIdx+1];
         connSla->findPackIds(polyIndices, sIdxConn, sIdxConnE, packsIds);
         // Deletion of old faces
-        int jj=0;
-        for (vector<int>::const_iterator it2=polyIndices.begin(); it2!=polyIndices.end(); ++it2, ++jj)
+        mcIdType jj=0;
+        for (vector<mcIdType>::const_iterator it2=polyIndices.begin(); it2!=polyIndices.end(); ++it2, ++jj)
           {
             if (packsIds[jj] == -1)
               // The below should never happen - if a face is used several times, with a different layout of the nodes
@@ -2432,22 +2435,22 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
               connSla->deletePack(*it2, packsIds[jj]);
           }
         // Insertion of new faces:
-        for (const int * ii = ids->begin(); ii != ids->end(); ii++)
+        for (const mcIdType * ii = ids->begin(); ii != ids->end(); ii++)
           {
             // Build pack from the face to insert:
-            int faceIdx2 = cands2[idsGoodPlane->getIJ(*ii,0)];
-            int facePack2Sz;
-            const int * facePack2 = connSlaDesc->getSimplePackSafePtr(faceIdx2, facePack2Sz); // contains the type!
+            mcIdType faceIdx2 = cands2[idsGoodPlane->getIJ(*ii,0)];
+            mcIdType facePack2Sz;
+            const mcIdType * facePack2 = connSlaDesc->getSimplePackSafePtr(faceIdx2, facePack2Sz); // contains the type!
             // Insert it in all hit polyhedrons:
-            for (vector<int>::const_iterator it2=polyIndices.begin(); it2!=polyIndices.end(); ++it2)
+            for (vector<mcIdType>::const_iterator it2=polyIndices.begin(); it2!=polyIndices.end(); ++it2)
               connSla->pushBackPack(*it2, facePack2+1, facePack2+facePack2Sz);  // without the type
           }
       }
   }  // end step1
 
   // Set back modified connectivity
-  MCAuto<DataArrayInt> cAuto; cAuto.takeRef(_nodal_connec);
-  MCAuto<DataArrayInt> cIAuto; cIAuto.takeRef(_nodal_connec_index);
+  MCAuto<DataArrayIdType> cAuto; cAuto.takeRef(_nodal_connec);
+  MCAuto<DataArrayIdType> cIAuto; cIAuto.takeRef(_nodal_connec_index);
   connSla->convertToPolyhedronConn(cAuto, cIAuto);
 
   {
@@ -2457,36 +2460,36 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
     // Now we have a face-conform mesh.
 
     // Recompute descending
-    MCAuto<DataArrayInt> desc(DataArrayInt::New()),descI(DataArrayInt::New()),revDesc(DataArrayInt::New()),revDescI(DataArrayInt::New());
+    MCAuto<DataArrayIdType> desc(DataArrayIdType::New()),descI(DataArrayIdType::New()),revDesc(DataArrayIdType::New()),revDescI(DataArrayIdType::New());
     // Rebuild desc connectivity with orientation this time!!
     MCAuto<MEDCouplingUMesh> mDesc(buildDescendingConnectivity2(desc,descI,revDesc,revDescI));
-    const int *revDescIP(revDescI->getConstPointer()), *revDescP(revDesc->getConstPointer());
-    const int *descIP(descI->getConstPointer()), *descP(desc->getConstPointer());
-    const int *cDesc(mDesc->getNodalConnectivity()->begin()),*cIDesc(mDesc->getNodalConnectivityIndex()->begin());
-    MCAuto<DataArrayInt> ciDeepC(mDesc->getNodalConnectivityIndex()->deepCopy());
-    MCAuto<DataArrayInt> cDeepC(mDesc->getNodalConnectivity()->deepCopy());
+    const mcIdType *revDescIP(revDescI->getConstPointer()), *revDescP(revDesc->getConstPointer());
+    const mcIdType *descIP(descI->getConstPointer()), *descP(desc->getConstPointer());
+    const mcIdType *cDesc(mDesc->getNodalConnectivity()->begin()),*cIDesc(mDesc->getNodalConnectivityIndex()->begin());
+    MCAuto<DataArrayIdType> ciDeepC(mDesc->getNodalConnectivityIndex()->deepCopy());
+    MCAuto<DataArrayIdType> cDeepC(mDesc->getNodalConnectivity()->deepCopy());
     MCAuto<MEDCouplingSkyLineArray> connSlaDesc(MEDCouplingSkyLineArray::New(ciDeepC, cDeepC));
-    MCAuto<DataArrayInt> desc2(DataArrayInt::New()),descI2(DataArrayInt::New()),revDesc2(DataArrayInt::New()),revDescI2(DataArrayInt::New());
+    MCAuto<DataArrayIdType> desc2(DataArrayIdType::New()),descI2(DataArrayIdType::New()),revDesc2(DataArrayIdType::New()),revDescI2(DataArrayIdType::New());
     MCAuto<MEDCouplingUMesh> mDesc2 = mDesc->buildDescendingConnectivity(desc2,descI2,revDesc2,revDescI2);
 //    std::cout << "writing!\n";
 //    mDesc->writeVTK("/tmp/toto_desc_confInter.vtu");
 //    mDesc2->writeVTK("/tmp/toto_desc2_confInter.vtu");
-    const int *revDescIP2(revDescI2->getConstPointer()), *revDescP2(revDesc2->getConstPointer());
-    const int *cDesc2(mDesc2->getNodalConnectivity()->begin()),*cIDesc2(mDesc2->getNodalConnectivityIndex()->begin());
+    const mcIdType *revDescIP2(revDescI2->getConstPointer()), *revDescP2(revDesc2->getConstPointer());
+    const mcIdType *cDesc2(mDesc2->getNodalConnectivity()->begin()),*cIDesc2(mDesc2->getNodalConnectivityIndex()->begin());
     MCAuto<DataArrayDouble> bboxArr(mDesc2->getBoundingBoxForBBTree(eps));
     const double *bbox2(bboxArr->begin());
-    int nDesc2Cell=mDesc2->getNumberOfCells();
-    BBTree<SPACEDIM,int> myTree2(bbox2,0,0,nDesc2Cell,-eps);
+    mcIdType nDesc2Cell=mDesc2->getNumberOfCells();
+    BBTree<SPACEDIM,mcIdType> myTree2(bbox2,0,0,nDesc2Cell,-eps);
 
     // Edges - handle longest first
     MCAuto<MEDCouplingFieldDouble> lenF = mDesc2->getMeasureField(true);
     DataArrayDouble * lens = lenF->getArray();
 
     // Sort edges by decreasing length:
-    vector<pair<double,int> > S;
-    for(std::size_t i=0;i < lens->getNumberOfTuples();i++)
+    vector<pair<double,mcIdType> > S;
+    for(mcIdType i=0;i < lens->getNumberOfTuples();i++)
       {
-        pair<double,int> p = make_pair(lens->getIJ(i, 0), i);
+        pair<double,mcIdType> p = make_pair(lens->getIJ(i, 0), i);
         S.push_back(p);
       }
     sort(S.rbegin(),S.rend()); // reverse sort
@@ -2494,24 +2497,24 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
     vector<bool> hit(nDesc2Cell);
     fill(hit.begin(), hit.end(), false);
 
-    for( vector<pair<double,int> >::const_iterator it = S.begin(); it != S.end(); it++)
+    for( vector<pair<double,mcIdType> >::const_iterator it = S.begin(); it != S.end(); it++)
       {
-        int eIdx = (*it).second;
+        mcIdType eIdx = (*it).second;
         if (hit[eIdx])
           continue;
 
-        vector<int> candidates, cands2;
+        vector<mcIdType> candidates, cands2;
         myTree2.getIntersectingElems(bbox2+eIdx*2*SPACEDIM,candidates);
         // Keep only candidates colinear with current edge
         double vCurr[3];
-        unsigned start = cDesc2[cIDesc2[eIdx]+1], end = cDesc2[cIDesc2[eIdx]+2];
-        for (int i3=0; i3 < 3; i3++)  // TODO: use fillSonCellNodalConnectivity2 or similar?
+        mcIdType start = cDesc2[cIDesc2[eIdx]+1], end = cDesc2[cIDesc2[eIdx]+2];
+        for (mcIdType i3=0; i3 < 3; i3++)  // TODO: use fillSonCellNodalConnectivity2 or similar?
           vCurr[i3] = coo[start*SPACEDIM+i3] - coo[end*SPACEDIM+i3];
-        for(vector<int>::const_iterator it2=candidates.begin();it2!=candidates.end();it2++)
+        for(vector<mcIdType>::const_iterator it2=candidates.begin();it2!=candidates.end();it2++)
           {
             double vOther[3];
-            unsigned start2 = cDesc2[cIDesc2[*it2]+1], end2 = cDesc2[cIDesc2[*it2]+2];
-            for (int i3=0; i3 < 3; i3++)
+            mcIdType start2 = cDesc2[cIDesc2[*it2]+1], end2 = cDesc2[cIDesc2[*it2]+2];
+            for (mcIdType i3=0; i3 < 3; i3++)
               vOther[i3] = coo[start2*SPACEDIM+i3] - coo[end2*SPACEDIM+i3];
             bool col = INTERP_KERNEL::isColinear3D(vCurr, vOther, eps);
             // Warning: different from faces: we need to keep eIdx in the final list of candidates because we need
@@ -2523,69 +2526,69 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
           continue;
 
         // Now rotate edges to bring them on Ox
-        int startNode = cDesc2[cIDesc2[eIdx]+1];
-        int endNode = cDesc2[cIDesc2[eIdx]+2];
+        mcIdType startNode = cDesc2[cIDesc2[eIdx]+1];
+        mcIdType endNode = cDesc2[cIDesc2[eIdx]+2];
         INTERP_KERNEL::TranslationRotationMatrix rotation;
         INTERP_KERNEL::TranslationRotationMatrix::Rotate3DBipoint(coo+SPACEDIM*startNode, coo+SPACEDIM*endNode, rotation);
         MCAuto<MEDCouplingUMesh> mPartRef(mDesc2->buildPartOfMySelfSlice(eIdx, eIdx+1,1,false));  // false=zipCoords is called
         MCAuto<MEDCouplingUMesh> mPartCand(mDesc2->buildPartOfMySelf(&cands2[0], &cands2[0]+cands2.size(), true)); // true=zipCoords is called
-        MCAuto<DataArrayInt> nodeMap(mPartCand->zipCoordsTraducer());
-        int nbElemsNotM1;
+        MCAuto<DataArrayIdType> nodeMap(mPartCand->zipCoordsTraducer());
+        mcIdType nbElemsNotM1;
         {
-          MCAuto<DataArrayInt> tmp(nodeMap->findIdsNotEqual(-1));
+          MCAuto<DataArrayIdType> tmp(nodeMap->findIdsNotEqual(-1));
           nbElemsNotM1 = tmp->getNbOfElems();
         }
-        MCAuto<DataArrayInt>  nodeMapInv = nodeMap->invertArrayO2N2N2O(nbElemsNotM1);
+        MCAuto<DataArrayIdType>  nodeMapInv = nodeMap->invertArrayO2N2N2O(nbElemsNotM1);
         double * cooPartRef(mPartRef->_coords->getPointer());
         double * cooPartCand(mPartCand->_coords->getPointer());
-        for (std::size_t ii = 0; ii < mPartRef->_coords->getNumberOfTuples(); ii++)
+        for (mcIdType ii = 0; ii < mPartRef->_coords->getNumberOfTuples(); ii++)
           rotation.transform_vector(cooPartRef+SPACEDIM*ii);
-        for (std::size_t ii = 0; ii < mPartCand->_coords->getNumberOfTuples(); ii++)
+        for (mcIdType ii = 0; ii < mPartCand->_coords->getNumberOfTuples(); ii++)
           rotation.transform_vector(cooPartCand+SPACEDIM*ii);
 
 
         // Eliminate all edges for which y or z is not null
         MCAuto<DataArrayDouble> baryPart = mPartCand->computeCellCenterOfMass();
-        vector<int> compo; compo.push_back(1);
+        vector<std::size_t> compo; compo.push_back(1);
         MCAuto<DataArrayDouble> baryPartY = baryPart->keepSelectedComponents(compo);
         compo[0] = 2;
         MCAuto<DataArrayDouble> baryPartZ = baryPart->keepSelectedComponents(compo);
-        MCAuto<DataArrayInt> idsGoodLine1 = baryPartY->findIdsInRange(-eps, +eps);
-        MCAuto<DataArrayInt> idsGoodLine2 = baryPartZ->findIdsInRange(-eps, +eps);
-        MCAuto<DataArrayInt> idsGoodLine = idsGoodLine1->buildIntersection(idsGoodLine2);
+        MCAuto<DataArrayIdType> idsGoodLine1 = baryPartY->findIdsInRange(-eps, +eps);
+        MCAuto<DataArrayIdType> idsGoodLine2 = baryPartZ->findIdsInRange(-eps, +eps);
+        MCAuto<DataArrayIdType> idsGoodLine = idsGoodLine1->buildIntersection(idsGoodLine2);
         if (!idsGoodLine->getNumberOfTuples())
           continue;
 
         // Now the ordering along the Ox axis:
-        std::vector<int> insidePoints, hitSegs;
+        std::vector<mcIdType> insidePoints, hitSegs;
         bool isSplit = OrderPointsAlongLine(mPartCand->_coords->getConstPointer(), nodeMap->begin()[startNode], nodeMap->begin()[endNode],
             mPartCand->getNodalConnectivity()->begin(), mPartCand->getNodalConnectivityIndex()->begin(),
             idsGoodLine->begin(), idsGoodLine->end(),
             /*out*/insidePoints, hitSegs);
         // Optim: smaller segments completely included in eIdx and not split won't need any further treatment:
-        for (vector<int>::const_iterator its=hitSegs.begin(); its != hitSegs.end(); ++its)
+        for (vector<mcIdType>::const_iterator its=hitSegs.begin(); its != hitSegs.end(); ++its)
           hit[cands2[*its]] = true;
 
         if (!isSplit)  // current segment remains in one piece
           continue;
 
         // Get original node IDs in global coords array
-        for (std::vector<int>::iterator iit = insidePoints.begin(); iit!=insidePoints.end(); ++iit)
+        for (std::vector<mcIdType>::iterator iit = insidePoints.begin(); iit!=insidePoints.end(); ++iit)
           *iit = nodeMapInv->begin()[*iit];
 
-        vector<int> polyIndices, packsIds, facePack;
+        vector<mcIdType> polyIndices, packsIds, facePack;
         // For each face implying this edge
-        for (int ii=revDescIP2[eIdx]; ii < revDescIP2[eIdx+1]; ii++)
+        for (mcIdType ii=revDescIP2[eIdx]; ii < revDescIP2[eIdx+1]; ii++)
           {
-            int faceIdx = revDescP2[ii];
+            mcIdType faceIdx = revDescP2[ii];
             // each cell where this face is involved connectivity will be modified:
             ret->pushBackValsSilent(revDescP + revDescIP[faceIdx], revDescP + revDescIP[faceIdx+1]);
 
             // Current face connectivity
-            const int * sIdxConn = cDesc + cIDesc[faceIdx] + 1;
-            const int * sIdxConnE = cDesc + cIDesc[faceIdx+1];
+            const mcIdType * sIdxConn = cDesc + cIDesc[faceIdx] + 1;
+            const mcIdType * sIdxConnE = cDesc + cIDesc[faceIdx+1];
 
-            vector<int> modifiedFace;
+            vector<mcIdType> modifiedFace;
             ReplaceEdgeInFace(sIdxConn, sIdxConnE, startNode, endNode, insidePoints, /*out*/modifiedFace);
             modifiedFace.insert(modifiedFace.begin(), INTERP_KERNEL::NORM_POLYGON);
             connSlaDesc->replaceSimplePack(faceIdx, modifiedFace.data(), modifiedFace.data()+modifiedFace.size());
@@ -2594,22 +2597,23 @@ DataArrayInt *MEDCouplingUMesh::conformize3D(double eps)
 
     // Rebuild 3D connectivity from descending:
     MCAuto<MEDCouplingSkyLineArray> newConn(MEDCouplingSkyLineArray::New());
-    MCAuto<DataArrayInt> superIdx(DataArrayInt::New());  superIdx->alloc(getNumberOfCells()+1); superIdx->fillWithValue(0);
-    MCAuto<DataArrayInt> idx(DataArrayInt::New());       idx->alloc(1);                         idx->fillWithValue(0);
-    MCAuto<DataArrayInt> vals(DataArrayInt::New());      vals->alloc(0);
+    MCAuto<DataArrayIdType> superIdx(DataArrayIdType::New());  superIdx->alloc(getNumberOfCells()+1); superIdx->fillWithValue(0);
+    MCAuto<DataArrayIdType> idx(DataArrayIdType::New());       idx->alloc(1);                         idx->fillWithValue(0);
+    MCAuto<DataArrayIdType> vals(DataArrayIdType::New());      vals->alloc(0);
     newConn->set3(superIdx, idx, vals);
-    for(std::size_t ii = 0; ii < getNumberOfCells(); ii++)
-      for (int jj=descIP[ii]; jj < descIP[ii+1]; jj++)
+    mcIdType nbCells=getNumberOfCells();
+    for(mcIdType ii = 0; ii < nbCells; ii++)
+      for (mcIdType jj=descIP[ii]; jj < descIP[ii+1]; jj++)
         {
-          int sz, faceIdx = abs(descP[jj])-1;
+          mcIdType sz, faceIdx = abs(descP[jj])-1;
           bool orient = descP[jj]>0;
-          const int * p = connSlaDesc->getSimplePackSafePtr(faceIdx, sz);
+          const mcIdType * p = connSlaDesc->getSimplePackSafePtr(faceIdx, sz);
           if (orient)
             newConn->pushBackPack(ii, p+1, p+sz);  // +1 to skip type
           else
             {
-              vector<int> rev(sz-1);
-              for (int kk=0; kk<sz-1; kk++) rev[kk]=*(p+sz-kk-1);
+              vector<mcIdType> rev(sz-1);
+              for (mcIdType kk=0; kk<sz-1; kk++) rev[kk]=*(p+sz-kk-1);
               newConn->pushBackPack(ii, rev.data(), rev.data()+sz-1);
             }
         }
old mode 100644 (file)
new mode 100755 (executable)
index 5730990..80e1b0e
@@ -74,17 +74,17 @@ MCAuto<MEDCouplingUMesh> ComputeBigCellFrom(const double pt1[2], const double pt
     line->setCoords(coo);
   }
   line->allocateCells();
-  static const int CONN[2]={0,1};
+  static const mcIdType CONN[2]={0,1};
   line->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,CONN);
   MCAuto<MEDCouplingUMesh> sp2,sp1;
   {
-    DataArrayInt *cellNb1(0),*cellNb2(0);
+    DataArrayIdType *cellNb1(0),*cellNb2(0);
     MEDCouplingUMesh *sp2Pt(0),*sp1Pt(0);
     MEDCouplingUMesh::Intersect2DMeshWith1DLine(mu,line,eps,sp2Pt,sp1Pt,cellNb1,cellNb2);
     sp1=sp1Pt; sp2=sp2Pt;
-    MCAuto<DataArrayInt> cellNb10(cellNb1),cellNb20(cellNb2);
+    MCAuto<DataArrayIdType> cellNb10(cellNb1),cellNb20(cellNb2);
   }
-  std::vector<int> ccp;
+  std::vector<mcIdType> ccp;
   sp2->getCellsContainingPoint(pt1,eps,ccp);
   if(ccp.size()!=1)
     throw INTERP_KERNEL::Exception("ComputeBigCellFrom : expected single element !");
@@ -96,31 +96,31 @@ MCAuto<MEDCouplingUMesh> ComputeBigCellFrom(const double pt1[2], const double pt
 
 MCAuto<MEDCouplingUMesh> MergeVorCells2D(MEDCouplingUMesh *p, double eps, bool isZip)
 {
-  MCAuto<DataArrayInt> edgeToKeep;
+  MCAuto<DataArrayIdType> edgeToKeep;
   MCAuto<MEDCouplingUMesh> p0;
   {
-    MCAuto<DataArrayInt> d(DataArrayInt::New()),di(DataArrayInt::New()),rd(DataArrayInt::New()),rdi(DataArrayInt::New());
+    MCAuto<DataArrayIdType> d(DataArrayIdType::New()),di(DataArrayIdType::New()),rd(DataArrayIdType::New()),rdi(DataArrayIdType::New());
     p0=p->buildDescendingConnectivity(d,di,rd,rdi);
-    MCAuto<DataArrayInt> dsi(rdi->deltaShiftIndex());
+    MCAuto<DataArrayIdType> dsi(rdi->deltaShiftIndex());
     edgeToKeep=dsi->findIdsEqual(1);
   }
   MCAuto<MEDCouplingUMesh> skinOfRes(p0->buildPartOfMySelf(edgeToKeep->begin(),edgeToKeep->end()));
   if(isZip)
     {
       skinOfRes->zipCoords();
-      if(skinOfRes->getNumberOfCells()!=skinOfRes->getNumberOfNodes())
+      if(ToIdType(skinOfRes->getNumberOfCells())!=skinOfRes->getNumberOfNodes())
         throw INTERP_KERNEL::Exception("MergeVorCells : result of merge looks bad !");
     }
-  MCAuto<DataArrayInt> d(skinOfRes->orderConsecutiveCells1D());
+  MCAuto<DataArrayIdType> d(skinOfRes->orderConsecutiveCells1D());
   MCAuto<MEDCoupling1SGTUMesh> skinOfRes2;
   {
     MCAuto<MEDCouplingUMesh> part(skinOfRes->buildPartOfMySelf(d->begin(),d->end()));
     skinOfRes2=MEDCoupling1SGTUMesh::New(part);
   }
-  MCAuto<DataArrayInt> c(skinOfRes2->getNodalConnectivity()->deepCopy());
+  MCAuto<DataArrayIdType> c(skinOfRes2->getNodalConnectivity()->deepCopy());
   c->circularPermutation(1);
   c->rearrange(2);
-  std::vector< MCAuto<DataArrayInt> > vdi(c->explodeComponents());
+  std::vector< MCAuto<DataArrayIdType> > vdi(c->explodeComponents());
   if(!vdi[0]->isEqual(*vdi[1]))
     throw INTERP_KERNEL::Exception("MergeVorCells : internal error !");
   MCAuto<MEDCouplingUMesh> m(MEDCouplingUMesh::New("",2));
@@ -144,8 +144,8 @@ MCAuto<MEDCouplingUMesh> MergeVorCells(const std::vector< MCAuto<MEDCouplingUMes
   }
   p->zipCoords();
   {
-    bool dummy; int dummy2;
-    MCAuto<DataArrayInt> dummy3(p->mergeNodes(eps,dummy,dummy2));
+    bool dummy; mcIdType dummy2;
+    MCAuto<DataArrayIdType> dummy3(p->mergeNodes(eps,dummy,dummy2));
   }
   return MergeVorCells2D(p,eps,true);
 }
@@ -157,13 +157,13 @@ MCAuto<MEDCouplingUMesh> SimplifyPolygon(const MEDCouplingUMesh *m, double eps)
 {
   if(m->getNumberOfCells()!=1)
     throw INTERP_KERNEL::Exception("SimplifyPolygon : internal error !");
-  const int *conn(m->getNodalConnectivity()->begin()),*conni(m->getNodalConnectivityIndex()->begin());
-  int nbPtsInPolygon(conni[1]-conni[0]-1);
+  const mcIdType *conn(m->getNodalConnectivity()->begin()),*conni(m->getNodalConnectivityIndex()->begin());
+  mcIdType nbPtsInPolygon(conni[1]-conni[0]-1);
   const double *coo(m->getCoords()->begin());
-  std::vector<int> resConn;
-  for(int i=0;i<nbPtsInPolygon;i++)
+  std::vector<mcIdType> resConn;
+  for(mcIdType i=0;i<nbPtsInPolygon;i++)
     {
-      int prev(conn[(i+nbPtsInPolygon-1)%nbPtsInPolygon+1]),current(conn[i%nbPtsInPolygon+1]),zeNext(conn[(i+1)%nbPtsInPolygon+1]);
+      mcIdType prev(conn[(i+nbPtsInPolygon-1)%nbPtsInPolygon+1]),current(conn[i%nbPtsInPolygon+1]),zeNext(conn[(i+1)%nbPtsInPolygon+1]);
       double a[3]={
         coo[3*prev+0]-coo[3*current+0],
         coo[3*prev+1]-coo[3*current+1],
@@ -180,7 +180,7 @@ MCAuto<MEDCouplingUMesh> SimplifyPolygon(const MEDCouplingUMesh *m, double eps)
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::New("",2));
   ret->setCoords(m->getCoords());
   ret->allocateCells();
-  ret->insertNextCell(INTERP_KERNEL::NORM_POLYGON,resConn.size(),&resConn[0]);
+  ret->insertNextCell(INTERP_KERNEL::NORM_POLYGON,ToIdType(resConn.size()),&resConn[0]);
   return ret;
 }
 
@@ -198,32 +198,32 @@ MCAuto<MEDCouplingUMesh> MergeVorCells3D(const std::vector< MCAuto<MEDCouplingUM
   }
   p->zipCoords();
   {
-    bool dummy; int dummy2;
-    MCAuto<DataArrayInt> dummy3(p->mergeNodes(eps,dummy,dummy2));
+    bool dummy; mcIdType dummy2;
+    MCAuto<DataArrayIdType> dummy3(p->mergeNodes(eps,dummy,dummy2));
   }
-  MCAuto<DataArrayInt> edgeToKeep;
+  MCAuto<DataArrayIdType> edgeToKeep;
   MCAuto<MEDCouplingUMesh> p0;
   {
-    MCAuto<DataArrayInt> d(DataArrayInt::New()),di(DataArrayInt::New()),rd(DataArrayInt::New()),rdi(DataArrayInt::New());
+    MCAuto<DataArrayIdType> d(DataArrayIdType::New()),di(DataArrayIdType::New()),rd(DataArrayIdType::New()),rdi(DataArrayIdType::New());
     p0=p->buildDescendingConnectivity(d,di,rd,rdi);
-    MCAuto<DataArrayInt> dsi(rdi->deltaShiftIndex());
+    MCAuto<DataArrayIdType> dsi(rdi->deltaShiftIndex());
     edgeToKeep=dsi->findIdsEqual(1);
   }
   MCAuto<MEDCouplingUMesh> skinOfRes(p0->buildPartOfMySelf(edgeToKeep->begin(),edgeToKeep->end()));
   MCAuto<DataArrayDouble> eqn(skinOfRes->computePlaneEquationOf3DFaces());
-  MCAuto<DataArrayInt> comm,commI;
+  MCAuto<DataArrayIdType> comm,commI;
   {
-    DataArrayInt *a(0),*b(0);
+    DataArrayIdType *a(0),*b(0);
     eqn->findCommonTuples(eps,0,a,b);
     comm=a; commI=b;
-    //comm=DataArrayInt::New(); comm->alloc(0,1); commI=DataArrayInt::New(); commI->alloc(1,1); commI->setIJ(0,0,0);
+    //comm=DataArrayIdType::New(); comm->alloc(0,1); commI=DataArrayIdType::New(); commI->alloc(1,1); commI->setIJ(0,0,0);
   }
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::New("",3));
   ret->setCoords(skinOfRes->getCoords());
   ret->allocateCells();
-  std::vector<int> conn;
+  std::vector<mcIdType> conn;
   int jj(0);
-  for(int i=0;i<commI->getNumberOfTuples()-1;i++,jj++)
+  for(mcIdType i=0;i<commI->getNumberOfTuples()-1;i++,jj++)
     {
       if(jj!=0)
         conn.push_back(-1);
@@ -234,27 +234,27 @@ MCAuto<MEDCouplingUMesh> MergeVorCells3D(const std::vector< MCAuto<MEDCouplingUM
       else
         tmp2=MergeVorCells2D(tmp,eps,false);
       tmp2=SimplifyPolygon(tmp2,eps);
-      const int *cPtr(tmp2->getNodalConnectivity()->begin()),*ciPtr(tmp2->getNodalConnectivityIndex()->begin());
+      const mcIdType *cPtr(tmp2->getNodalConnectivity()->begin()),*ciPtr(tmp2->getNodalConnectivityIndex()->begin());
       conn.insert(conn.end(),cPtr+1,cPtr+ciPtr[1]);
     }
-  MCAuto<DataArrayInt> remain(comm->buildComplement(skinOfRes->getNumberOfCells()));
+  MCAuto<DataArrayIdType> remain(comm->buildComplement(ToIdType(skinOfRes->getNumberOfCells())));
   {
     MCAuto<MEDCouplingUMesh> tmp(skinOfRes->buildPartOfMySelf(remain->begin(),remain->end(),true));
-    const int *cPtr(tmp->getNodalConnectivity()->begin()),*ciPtr(tmp->getNodalConnectivityIndex()->begin());
-    for(int i=0;i<remain->getNumberOfTuples();i++,jj++)
+    const mcIdType *cPtr(tmp->getNodalConnectivity()->begin()),*ciPtr(tmp->getNodalConnectivityIndex()->begin());
+    for(mcIdType i=0;i<remain->getNumberOfTuples();i++,jj++)
       {
         if(jj!=0)
           conn.push_back(-1);
         conn.insert(conn.end(),cPtr+ciPtr[i]+1,cPtr+ciPtr[i+1]);
       }
   }
-  ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,conn.size(),&conn[0]);
+  ret->insertNextCell(INTERP_KERNEL::NORM_POLYHED,ToIdType(conn.size()),&conn[0]);
   return ret;
 }
 
 MCAuto<MEDCouplingUMesh> MergeVorCells1D(const std::vector< MCAuto<MEDCouplingUMesh> >& vcs, double eps)
 {
-  static const int CONN_SEG2_DFT[2]={0,1};
+  static const mcIdType CONN_SEG2_DFT[2]={0,1};
   if(vcs.empty())
     throw INTERP_KERNEL::Exception("MergeVorCells1D : internal error 1 !");
   if(vcs.size()==1)
@@ -263,12 +263,12 @@ MCAuto<MEDCouplingUMesh> MergeVorCells1D(const std::vector< MCAuto<MEDCouplingUM
     throw INTERP_KERNEL::Exception("MergeVorCells1D : internal error 2 !");
   double a0,b0,a1,b1;
   {
-    const int *connPtr(vcs[0]->getNodalConnectivity()->begin());
+    const mcIdType *connPtr(vcs[0]->getNodalConnectivity()->begin());
     const double *coordPtr(vcs[0]->getCoords()->begin());
     a0=coordPtr[connPtr[1]]; b0=coordPtr[connPtr[2]];
   }
   {
-    const int *connPtr(vcs[1]->getNodalConnectivity()->begin());
+    const mcIdType *connPtr(vcs[1]->getNodalConnectivity()->begin());
     const double *coordPtr(vcs[1]->getCoords()->begin());
     a1=coordPtr[connPtr[1]]; b1=coordPtr[connPtr[2]];
   }
@@ -283,7 +283,7 @@ MCAuto<MEDCouplingUMesh> MergeVorCells1D(const std::vector< MCAuto<MEDCouplingUM
 
 MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer1D::doIt(const MEDCouplingUMesh *m, const DataArrayDouble *points, double eps) const
 {
-  static const int CONN_SEG2_DFT[2]={0,1};
+  static const mcIdType CONN_SEG2_DFT[2]={0,1};
   if(!m || !points)
     throw INTERP_KERNEL::Exception("Voronoize1D : null pointer !");
   m->checkConsistencyLight();
@@ -292,14 +292,14 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer1D::doIt(const MEDCouplingUMesh *
     throw INTERP_KERNEL::Exception("Voronoize1D : spacedim must be equal to 1 and meshdim also equal to 1 !");
   if(m->getNumberOfCells()!=1)
     throw INTERP_KERNEL::Exception("Voronoize1D : mesh is expected to have only one cell !");
-  int nbPts(points->getNumberOfTuples());
+  mcIdType nbPts(points->getNumberOfTuples());
   if(nbPts<1)
     throw INTERP_KERNEL::Exception("Voronoize1D : at least one point expected !");
   std::vector<double> bbox(4);
   m->getBoundingBox(&bbox[0]);
   std::vector< MCAuto<MEDCouplingUMesh> > l0(1,MCAuto<MEDCouplingUMesh>(m->deepCopy()));
   const double *pts(points->begin());
-  for(int i=1;i<nbPts;i++)
+  for(mcIdType i=1;i<nbPts;i++)
     {
       MCAuto<MEDCouplingUMesh> vorTess;
       {
@@ -308,10 +308,10 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer1D::doIt(const MEDCouplingUMesh *
       }
       {
         bool dummy;
-        int newNbNodes;
-        MCAuto<DataArrayInt> dummy3(vorTess->mergeNodes(eps,dummy,newNbNodes));
+        mcIdType newNbNodes;
+        MCAuto<DataArrayIdType> dummy3(vorTess->mergeNodes(eps,dummy,newNbNodes));
       }
-      std::vector<int> polygsToIterOn;
+      std::vector<mcIdType> polygsToIterOn;
       const double *pt(pts+i);
       vorTess->getCellsContainingPoint(pt,eps,polygsToIterOn);
       if(polygsToIterOn.empty())
@@ -319,9 +319,9 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer1D::doIt(const MEDCouplingUMesh *
       if(polygsToIterOn.size()>2)
         throw INTERP_KERNEL::Exception("Voronoize1D : overlap of points !");
       std::vector< MCAuto<MEDCouplingUMesh> > newVorCells;
-      for(std::vector<int>::const_iterator it=polygsToIterOn.begin();it!=polygsToIterOn.end();it++)
+      for(std::vector<mcIdType>::const_iterator it=polygsToIterOn.begin();it!=polygsToIterOn.end();it++)
         {
-          int poly(*it);
+          mcIdType poly(*it);
           //
           double seed(pts[poly]),zept(*pt);
           double mid((seed+zept)/2.);
@@ -330,7 +330,7 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer1D::doIt(const MEDCouplingUMesh *
           tile->zipCoords();
           double a,b;
           {
-            const int *connPtr(tile->getNodalConnectivity()->begin());
+            const mcIdType *connPtr(tile->getNodalConnectivity()->begin());
             const double *coordPtr(tile->getCoords()->begin());
             a=coordPtr[connPtr[1]]; b=coordPtr[connPtr[2]];
           }
@@ -357,8 +357,8 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer1D::doIt(const MEDCouplingUMesh *
   std::vector< const MEDCouplingUMesh * > l0Bis(VecAutoToVecOfCstPt(l0));
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::MergeUMeshes(l0Bis));
   {
-    bool dummy; int dummy2;
-    MCAuto<DataArrayInt> dummy3(ret->mergeNodes(eps,dummy,dummy2));
+    bool dummy; mcIdType dummy2;
+    MCAuto<DataArrayIdType> dummy3(ret->mergeNodes(eps,dummy,dummy2));
   }
   return ret;
 }
@@ -373,14 +373,14 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer2D::doIt(const MEDCouplingUMesh *
     throw INTERP_KERNEL::Exception("Voronoize2D : spacedim must be equal to 2 and meshdim also equal to 2 !");
   if(m->getNumberOfCells()!=1)
     throw INTERP_KERNEL::Exception("Voronoize2D : mesh is expected to have only one cell !");
-  int nbPts(points->getNumberOfTuples());
+  mcIdType nbPts(points->getNumberOfTuples());
   if(nbPts<1)
     throw INTERP_KERNEL::Exception("Voronoize2D : at least one point expected !");
   std::vector<double> bbox(4);
   m->getBoundingBox(&bbox[0]);
   std::vector< MCAuto<MEDCouplingUMesh> > l0(1,MCAuto<MEDCouplingUMesh>(m->deepCopy()));
   const double *pts(points->begin());
-  for(int i=1;i<nbPts;i++)
+  for(mcIdType i=1;i<nbPts;i++)
     {
       MCAuto<MEDCouplingUMesh> vorTess;
       {
@@ -389,36 +389,36 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer2D::doIt(const MEDCouplingUMesh *
       }
       {
         bool dummy;
-        int newNbNodes;
-        MCAuto<DataArrayInt> dummy3(vorTess->mergeNodes(eps,dummy,newNbNodes));
+        mcIdType newNbNodes;
+        MCAuto<DataArrayIdType> dummy3(vorTess->mergeNodes(eps,dummy,newNbNodes));
       }
-      std::vector<int> polygsToIterOn;
+      std::vector<mcIdType> polygsToIterOn;
       const double *pt(pts+i*2);
       vorTess->getCellsContainingPoint(pt,eps,polygsToIterOn);
       if(polygsToIterOn.size()<1)
         throw INTERP_KERNEL::Exception("Voronoize2D : presence of a point outside the given cell !");
-      std::set<int> elemsToDo,elemsDone; elemsToDo.insert(polygsToIterOn[0]);
+      std::set<mcIdType> elemsToDo,elemsDone; elemsToDo.insert(polygsToIterOn[0]);
       std::vector< MCAuto<MEDCouplingUMesh> > newVorCells;
       while(!elemsToDo.empty())
         {
-          int poly(*elemsToDo.begin()); elemsToDo.erase(elemsToDo.begin()); elemsDone.insert(poly);
+          mcIdType poly(*elemsToDo.begin()); elemsToDo.erase(elemsToDo.begin()); elemsDone.insert(poly);
           const double *seed(pts+2*poly);
           MCAuto<MEDCouplingUMesh> cell(ComputeBigCellFrom(pt,seed,bbox,eps));
           MCAuto<MEDCouplingUMesh> tile(l0[poly]);
           tile->zipCoords();
           MCAuto<MEDCouplingUMesh> a;
-          MCAuto<DataArrayInt> b,c;
+          MCAuto<DataArrayIdType> b,c;
           {
-            DataArrayInt *bPtr(0),*cPtr(0);
+            DataArrayIdType *bPtr(0),*cPtr(0);
             a=MEDCouplingUMesh::Intersect2DMeshes(tile,cell,eps,bPtr,cPtr);
             b=bPtr; c=cPtr;
           }
-          MCAuto<DataArrayInt> part(c->findIdsEqual(-1));
+          MCAuto<DataArrayIdType> part(c->findIdsEqual(-1));
           if(part->getNumberOfTuples()!=1)
             throw INTERP_KERNEL::Exception("Voronoize2D : internal error");
           MCAuto<MEDCouplingUMesh> newVorCell;
           {
-            MCAuto<DataArrayInt> tmp(part->buildComplement(a->getNumberOfCells()));
+            MCAuto<DataArrayIdType> tmp(part->buildComplement(ToIdType(a->getNumberOfCells())));
             newVorCell=a->buildPartOfMySelf(tmp->begin(),tmp->end());
           }
           newVorCell->zipCoords();
@@ -426,9 +426,9 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer2D::doIt(const MEDCouplingUMesh *
           modifiedCell->zipCoords();
           l0[poly]=modifiedCell;
           //
-          MCAuto<DataArrayInt> ids;
+          MCAuto<DataArrayIdType> ids;
           {
-            DataArrayInt *tmp(0);
+            DataArrayIdType *tmp(0);
             bool sta(a->getCoords()->areIncludedInMe(cell->getCoords(),eps,tmp));
             ids=tmp;
             if(!sta)
@@ -436,19 +436,19 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer2D::doIt(const MEDCouplingUMesh *
           }
           MCAuto<DataArrayDouble> newCoords;
           {
-            MCAuto<DataArrayInt> tmp(ids->buildComplement(a->getNumberOfNodes()));
+            MCAuto<DataArrayIdType> tmp(ids->buildComplement(a->getNumberOfNodes()));
             newCoords=a->getCoords()->selectByTupleId(tmp->begin(),tmp->end());
           }
           const double *cPtr(newCoords->begin());
-          for(int j=0;j<newCoords->getNumberOfTuples();j++,cPtr+=2)
+          for(mcIdType j=0;j<newCoords->getNumberOfTuples();j++,cPtr+=2)
             {
-              std::set<int> zeCandidates;
+              std::set<mcIdType> zeCandidates;
               {
-                std::vector<int> zeCandidatesTmp;
+                std::vector<mcIdType> zeCandidatesTmp;
                 vorTess->getCellsContainingPoint(cPtr,eps,zeCandidatesTmp);
                 zeCandidates.insert(zeCandidatesTmp.begin(),zeCandidatesTmp.end());
               }
-              std::set<int> tmp2,newElementsToDo;
+              std::set<mcIdType> tmp2,newElementsToDo;
               std::set_difference(zeCandidates.begin(),zeCandidates.end(),elemsDone.begin(),elemsDone.end(),std::inserter(tmp2,tmp2.begin()));
               std::set_union(elemsToDo.begin(),elemsToDo.end(),tmp2.begin(),tmp2.end(),std::inserter(newElementsToDo,newElementsToDo.begin()));
               elemsToDo=newElementsToDo;
@@ -460,13 +460,13 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer2D::doIt(const MEDCouplingUMesh *
   std::vector< const MEDCouplingUMesh * > l0Bis(VecAutoToVecOfCstPt(l0));
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::MergeUMeshes(l0Bis));
   {
-    bool dummy; int dummy2;
-    MCAuto<DataArrayInt> dummy3(ret->mergeNodes(eps,dummy,dummy2));
+    bool dummy; mcIdType dummy2;
+    MCAuto<DataArrayIdType> dummy3(ret->mergeNodes(eps,dummy,dummy2));
   }
   return ret;
 }
 
-MCAuto<MEDCouplingUMesh> Split3DCellInParts(const MEDCouplingUMesh *m, const double pt[3], const double seed[3], double eps, int tmp[2])
+MCAuto<MEDCouplingUMesh> Split3DCellInParts(const MEDCouplingUMesh *m, const double pt[3], const double seed[3], double eps, mcIdType tmp[2])
 {
   if(m->getMeshDimension()!=3 || m->getSpaceDimension()!=3 || m->getNumberOfCells()!=1)
     throw INTERP_KERNEL::Exception("Split3DCellInParts : expecting a 3D with exactly one cell !");
@@ -478,7 +478,7 @@ MCAuto<MEDCouplingUMesh> Split3DCellInParts(const MEDCouplingUMesh *m, const dou
 
 MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer3D::doIt(const MEDCouplingUMesh *m, const DataArrayDouble *points, double eps) const
 {
-  double eps2(1.-sqrt(eps));// 2nd eps for interpolation. Here the eps is computed to feet cos(eps) ~ 1-eps^2
+  //double eps2(1.-sqrt(eps));// 2nd eps for interpolation. Here the eps is computed to feet cos(eps) ~ 1-eps^2
   if(!m || !points)
     throw INTERP_KERNEL::Exception("Voronoize3D : null pointer !");
   m->checkConsistencyLight();
@@ -487,12 +487,12 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer3D::doIt(const MEDCouplingUMesh *
     throw INTERP_KERNEL::Exception("Voronoize3D : spacedim must be equal to 3 and meshdim also equal to 3 !");
   if(m->getNumberOfCells()!=1)
     throw INTERP_KERNEL::Exception("Voronoize3D : mesh is expected to have only one cell !");
-  int nbPts(points->getNumberOfTuples());
+  mcIdType nbPts(points->getNumberOfTuples());
   if(nbPts<1)
     throw INTERP_KERNEL::Exception("Voronoize3D : at least one point expected !");
   std::vector< MCAuto<MEDCouplingUMesh> > l0(1,MCAuto<MEDCouplingUMesh>(m->deepCopy()));
   const double *pts(points->begin());
-  for(int i=1;i<nbPts;i++)
+  for(mcIdType i=1;i<nbPts;i++)
     {
       MCAuto<MEDCouplingUMesh> vorTess;
       {
@@ -501,27 +501,27 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer3D::doIt(const MEDCouplingUMesh *
       }
       {
         bool dummy;
-        int newNbNodes;
-        MCAuto<DataArrayInt> dummy3(vorTess->mergeNodes(eps,dummy,newNbNodes));
+        mcIdType newNbNodes;
+        MCAuto<DataArrayIdType> dummy3(vorTess->mergeNodes(eps,dummy,newNbNodes));
       }
-      std::vector<int> polygsToIterOn;
+      std::vector<mcIdType> polygsToIterOn;
       const double *pt(pts+i*3);
       vorTess->getCellsContainingPoint(pt,eps,polygsToIterOn);
       if(polygsToIterOn.size()<1)
         throw INTERP_KERNEL::Exception("Voronoize3D : presence of a point outside the given cell !");
       std::vector< MCAuto<MEDCouplingUMesh> > newVorCells;
-      for(int poly=0;poly<vorTess->getNumberOfCells();poly++)
+      for(mcIdType poly=0;poly<ToIdType(vorTess->getNumberOfCells());poly++)
         {
           const double *seed(pts+3*poly);
           MCAuto<MEDCouplingUMesh> tile(l0[poly]);
           tile->zipCoords();
-          int tmp[2];
+          mcIdType tmp[2];
           MCAuto<MEDCouplingUMesh> cells;
           try
             {
               cells=Split3DCellInParts(tile,pt,seed,eps,tmp);
             }
-          catch(INTERP_KERNEL::Exception& e)
+          catch(INTERP_KERNEL::Exception&)
             {
               continue;
             }
@@ -537,8 +537,8 @@ MCAuto<MEDCouplingUMesh> MEDCoupling::Voronizer3D::doIt(const MEDCouplingUMesh *
   std::vector< const MEDCouplingUMesh * > l0Bis(VecAutoToVecOfCstPt(l0));
   MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::MergeUMeshes(l0Bis));
   {
-    bool dummy; int dummy2;
-    MCAuto<DataArrayInt> dummy3(ret->mergeNodes(eps,dummy,dummy2));
+    bool dummy; mcIdType dummy2;
+    MCAuto<DataArrayIdType> dummy3(ret->mergeNodes(eps,dummy,dummy2));
   }
   return ret;
 }
index 6023488ed843adeba41e068590fcb43945f3d106..ab111273d609a86e670f21e2677872fadd353bfa 100644 (file)
@@ -22,6 +22,7 @@
 #define __MEDCOUPLINGBASICSTEST_HXX__
 
 #include <cppunit/extensions/HelperMacros.h>
+#include "MCType.hxx"
 
 #include <map>
 #include <vector>
@@ -93,9 +94,9 @@ namespace MEDCoupling
     static DataArrayDouble *buildCoordsForMultiTypes_1();
     static MEDCouplingMultiFields *buildMultiFields_1();
     static std::vector<MEDCouplingFieldDouble *> buildMultiFields_2();
-    static double sumAll(const std::vector< std::map<int,double> >& matrix);
+    static double sumAll(const std::vector< std::map<mcIdType,double> >& matrix);
   protected:
-    static int countNonZero(const std::vector< std::map<int,double> >& matrix);
+    static int countNonZero(const std::vector< std::map<mcIdType,double> >& matrix);
 
     static void test2D1DMeshesIntersection(MEDCouplingUMesh *sourceMesh,
                                            MEDCouplingUMesh *targetMesh,
index 1ee95f1ae4c8e7878c98a167a54b91ff908e6135..f057a7215ffba22e46ab3051927c03c22d0c9192 100644 (file)
@@ -35,7 +35,7 @@
 
 using namespace MEDCoupling;
 
-typedef std::vector<std::map<int,double> > IntersectionMatrix;
+typedef std::vector<std::map<mcIdType,double> > IntersectionMatrix;
 
 MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSourceMesh_2()
 {
@@ -46,7 +46,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSourceMesh_2()
                            0.0, 200.0, 200.0, 200.0, 0.0, 200.0, 200.0, 100.0, 200.0, 200.0, 200.0, 149.999999970343, 149.9999999874621, 49.999999881628682};
   
   
-  int sourceConn[212]={25, 27, 13, 19, 18, 3, 20, 21, 5, 10, 17, 1, 1, 3, 0, 7, 18, 1, 0, 27, 12, 27, 13, 24, 25, 19, 16, 26, 1, 2, 6, 8, 15, 13, 
+  mcIdType sourceConn[212]={25, 27, 13, 19, 18, 3, 20, 21, 5, 10, 17, 1, 1, 3, 0, 7, 18, 1, 0, 27, 12, 27, 13, 24, 25, 19, 16, 26, 1, 2, 6, 8, 15, 13, 
                        12, 5, 24, 13, 25, 27, 10, 11, 9, 6, 19, 8, 23, 1, 22, 8, 23, 19, 16, 13, 17, 1, 6, 9, 10, 8, 13, 17, 5, 15, 5, 4, 1, 12, 18,
                        0, 24, 27, 19, 20, 18, 1, 7, 6, 5, 1, 4, 12, 15, 14, 25, 27, 19, 18, 1, 19, 16, 13, 20, 19, 23, 1, 27, 12, 1, 0, 6, 5, 1, 10,
                        4, 5, 1, 7, 12, 27, 1, 13, 5, 15, 4, 12, 19, 16, 26, 22, 13, 5, 17, 1, 1, 3, 7, 2, 13, 5, 1, 12, 18, 1, 3, 0, 8, 23, 2, 9, 3,
@@ -70,7 +70,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSourceMesh_2()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build3DTargetMesh_2()
 {
   double targetCoords[24]={200.0, 200.0, 0.0, 200.0, 200.0, 200.0, 200.0, 0.0, 0.0, 200.0, 0.0, 200.0, 0.0, 200.0, 0.0, 0.0, 200.0, 200.0, 0.0, 0.0, 0.0, 0.0, 0.0, 200.0};
-  int targetConn[20]={5, 6, 3, 0, 1, 3, 0, 5, 3, 6, 5, 7, 6, 4, 0, 5, 6, 3, 0, 2};
+  mcIdType targetConn[20]={5, 6, 3, 0, 1, 3, 0, 5, 3, 6, 5, 7, 6, 4, 0, 5, 6, 3, 0, 2};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(3);
   targetMesh->allocateCells(5);
@@ -91,7 +91,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build1DTargetMesh_1()
     25.,25.,0., 25.,25.,50., 25.,25.,200., 75.,25.,0., 75.,25.,50., 75.,25.,200.,
     25.,125.,0., 25.,125.,50., 25.,125.,200., 125.,125.,0., 125.,125.,50., 125.,125.,200.
   };
-  int targetConn[16]={0,1, 1,2, 3,4, 4,5, 6,7, 7,8, 9,10, 10,11};
+  mcIdType targetConn[16]={0,1, 1,2, 3,4, 4,5, 6,7, 7,8, 9,10, 10,11};
 
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("my name of mesh 1D",1);
   targetMesh->allocateCells(8);
@@ -109,7 +109,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build1DTargetMesh_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build2DSourceMesh_1()
 {
   double sourceCoords[8]={-0.3,-0.3, 0.7,-0.3, -0.3,0.7, 0.7,0.7};
-  int sourceConn[6]={0,3,1,0,2,3};
+  mcIdType sourceConn[6]={0,3,1,0,2,3};
   MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New("my name of mesh 2D",2);
   sourceMesh->allocateCells(2);
   sourceMesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,sourceConn);
@@ -126,7 +126,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DSourceMesh_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_1()
 {
   double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 };
-  int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(5);
@@ -147,7 +147,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMeshPerm_1()
 {
   double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 };
-  int targetConn[18]={0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[18]={0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(5);
@@ -168,7 +168,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMeshPerm_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_2()
 {
   double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 };
-  int targetConn[24]={0,3,4, 0,4,1, 1,4,2, 4,5,2, 3,6,4, 6,7,4, 4,7,5, 7,8,5 };
+  mcIdType targetConn[24]={0,3,4, 0,4,1, 1,4,2, 4,5,2, 3,6,4, 6,7,4, 4,7,5, 7,8,5 };
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(8);
@@ -192,7 +192,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_2()
 MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU1DMesh_U()
 {
   double coords[4]={ 0.0, 0.3, 0.75, 1.0 };
-  int conn[2*3]={ 0,1, 1,2, 2,3 };
+  mcIdType conn[2*3]={ 0,1, 1,2, 2,3 };
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(1);
   mesh->allocateCells(3);
@@ -210,7 +210,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU1DMesh_U()
 MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU2DMesh_U()
 {
   double coords[18]={0.0,0.0, 0.5,0.0, 1.0,0.0, 0.0,0.5, 0.5,0.5, 1.0,0.5, 0.0,1.0, 0.5,1.0, 1.0,1.0 };
-  int conn[18]={0,1,4,3, 3,4,7,6, 4,5,8,7, 1,5,4, 1,2,5 };
+  mcIdType conn[18]={0,1,4,3, 3,4,7,6, 4,5,8,7, 1,5,4, 1,2,5 };
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
@@ -234,7 +234,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU3DMesh_U()
 //   0.0,1.0,0.0 ,0.0,0.3,0.0 ,0.0,0.3,0.3 ,0.3,0.0,0.0 ,0.3,0.3,1.0 ,1.0,0.0,1.0 ,1.0,0.0,0.3 ,0.3,0.0,0.3 ,0.3,1.0,0.3 ,0.0,0.3,1.0 ,0.3,0.0,1.0 ,0.3,0.3,0.3 ,1.0,0.3,1.0 ,1.0,0.0,0.0 ,0.0,0.0,0.0 ,1.0,0.3,0.3 ,0.3,1.0,0.0 ,1.0,1.0,0.3 ,1.0,1.0,1.0 ,0.0,1.0,1.0 ,0.3,0.3,0.0 ,0.0,1.0,0.3 ,0.0,0.0,1.0 ,0.3,1.0,1.0 ,1.0,0.3,0.0 ,0.0,0.0,0.3 ,1.0,1.0,0.0
       0.0,0.0,0.0, 0.3,0.0,0.0, 1.0,0.0,0.0, 0.0,0.3,0.0, 0.3,0.3,0.0, 1.0,0.3,0.0, 0.0,1.0,0.0, 0.3,1.0,0.0, 1.0,1.0,0.0, 0.0,0.0,0.3, 0.3,0.0,0.3, 1.0,0.0,0.3, 0.0,0.3,0.3, 0.3,0.3,0.3, 1.0,0.3,0.3, 0.0,1.0,0.3, 0.3,1.0,0.3, 1.0,1.0,0.3, 0.0,0.0,1.0, 0.3,0.0,1.0, 1.0,0.0,1.0, 0.0,0.3,1.0, 0.3,0.3,1.0, 1.0,0.3,1.0, 0.0,1.0,1.0, 0.3,1.0,1.0, 1.0,1.0,1.0,
     };
-  int conn[8*8]=
+  mcIdType conn[8*8]=
     {
 //       11,15,12,4,8,17,18,23,3,13,6,7,20,24,15,11,14,3,7,25,1,20,11,2,1,20,11,2,0,16,8,21,20,24,15,11,16,26,17,8,25,7,10,22,2,11,4,9,2,11,4,9,21,8,23,19,7,6,5,10,11,15,12,4
       0,3,4,1,9,12,13,10, 1,4,5,2,10,13,14,11, 3,6,7,4,12,15,16,13, 4,7,8,5,13,16,17,14, 9,12,13,10,18,21,22,19, 10,13,14,11,19,22,23,20, 12,15,16,13,21,24,25,22, 13,16,17,14,22,25,26,23
@@ -256,7 +256,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::buildCU3DMesh_U()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfSourceMesh_1()
 {
   double sourceCoords[12]={-0.3,-0.3,0.5, 0.7,-0.3,1.5, -0.3,0.7,0.5, 0.7,0.7,1.5};
-  int sourceConn[6]={0,3,1,0,2,3};
+  mcIdType sourceConn[6]={0,3,1,0,2,3};
   MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New();
   sourceMesh->setMeshDimension(2);
   sourceMesh->allocateCells(2);
@@ -274,7 +274,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfSourceMesh_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfSourceMesh_2()
 {
   double sourceCoords[12]={-0.3,-0.3,0., 0.7,-0.3,0., -0.3,0.7,0., 0.7,0.7,0.};
-  int sourceConn[6]={0,3,1,0,2,3};
+  mcIdType sourceConn[6]={0,3,1,0,2,3};
   MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New();
   sourceMesh->setMeshDimension(2);
   sourceMesh->allocateCells(2);
@@ -292,7 +292,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfSourceMesh_2()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMesh_1()
 {
   double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5};
-  int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(5);
@@ -316,7 +316,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMesh_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMeshPerm_1()
 {
   double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5};
-  int targetConn[18]={0,3,4,1, 1,4,2, 4,2,5, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[18]={0,3,4,1, 1,4,2, 4,2,5, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(5);
@@ -337,7 +337,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMeshPerm_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSurfTargetMesh_2()
 {
   double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5};
-  int targetConn[24]={0,3,4, 0,4,1, 1,4,2, 4,5,2, 3,6,4, 6,7,4, 4,7,5, 7,8,5 };
+  mcIdType targetConn[24]={0,3,4, 0,4,1, 1,4,2, 4,5,2, 3,6,4, 6,7,4, 4,7,5, 7,8,5 };
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(8);
@@ -362,7 +362,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DSourceMesh_1()
 {
   double sourceCoords[27]={ 0.0, 0.0, 200.0, 0.0, 0.0, 0.0, 0.0, 200.0, 200.0, 0.0, 200.0, 0.0, 200.0, 0.0, 200.0,
                             200.0, 0.0, 0.0, 200.0, 200.0, 200.0, 200.0, 200.0, 0.0, 100.0, 100.0, 100.0 };
-  int sourceConn[48]={8,1,7,3, 6,0,8,2, 7,4,5,8, 6,8,4,7, 6,8,0,4, 6,8,7,3, 8,1,3,0, 4,1,5,8, 1,7,5,8, 0,3,8,2, 8,1,0,4, 3,6,8,2};
+  mcIdType sourceConn[48]={8,1,7,3, 6,0,8,2, 7,4,5,8, 6,8,4,7, 6,8,0,4, 6,8,7,3, 8,1,3,0, 4,1,5,8, 1,7,5,8, 0,3,8,2, 8,1,0,4, 3,6,8,2};
   MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New();
   sourceMesh->setMeshDimension(3);
   sourceMesh->allocateCells(12);
@@ -392,7 +392,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DTargetMesh_1()
   double targetCoords[81]={ 0., 0., 0., 50., 0., 0. , 200., 0., 0.  , 0., 50., 0., 50., 50., 0. , 200., 50., 0.,   0., 200., 0., 50., 200., 0. , 200., 200., 0. ,
                             0., 0., 50., 50., 0., 50. , 200., 0., 50.  , 0., 50., 50., 50., 50., 50. , 200., 50., 50.,   0., 200., 50., 50., 200., 50. , 200., 200., 50. ,
                             0., 0., 200., 50., 0., 200. , 200., 0., 200.  , 0., 50., 200., 50., 50., 200. , 200., 50., 200.,   0., 200., 200., 50., 200., 200. , 200., 200., 200. };
-  int targetConn[64]={0,1,4,3,9,10,13,12, 1,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16,
+  mcIdType targetConn[64]={0,1,4,3,9,10,13,12, 1,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16,
                       9,10,13,12,18,19,22,21, 10,11,14,13,19,20,23,22, 12,13,16,15,21,22,25,24, 13,14,17,16,22,23,26,25};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(3);
@@ -411,7 +411,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DTargetMesh_1()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMeshMergeNode_1()
 {
   double targetCoords[36]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,-0.3, 0.2,-0.3, 0.2,-0.3, 0.2,0.2, 0.2,0.2, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7, 0.2,0.7 };
-  int targetConn[18]={0,9,7,5, 4,6,2, 10,11,8, 9,14,15,7, 17,16,13,6};
+  mcIdType targetConn[18]={0,9,7,5, 4,6,2, 10,11,8, 9,14,15,7, 17,16,13,6};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(5);
@@ -434,7 +434,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DTargetMeshMergeNode_1()
   double targetCoords[93]={ 0., 0., 0., 50., 0., 0. , 200., 0., 0.  , 0., 50., 0., 50., 50., 0. , 200., 50., 0.,   0., 200., 0., 50., 200., 0. , 200., 200., 0. ,
                             0., 0., 50., 50., 0., 50. , 200., 0., 50.  , 0., 50., 50., 50., 50., 50. , 200., 50., 50.,   0., 200., 50., 50., 200., 50. , 200., 200., 50. ,
                             0., 0., 200., 50., 0., 200. , 200., 0., 200.  , 0., 50., 200., 50., 50., 200. , 200., 50., 200.,   0., 200., 200., 50., 200., 200. , 200., 200., 200., 50.,0.,0., 50.,0.,0., 50.,0.,0.,  200., 50., 200.};
-  int targetConn[64]={0,29,4,3,9,10,13,12, 28,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16,
+  mcIdType targetConn[64]={0,29,4,3,9,10,13,12, 28,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16,
                       9,10,13,12,18,19,22,21, 10,11,14,13,19,20,23,22, 12,13,16,15,21,22,25,24, 13,14,17,16,22,30,26,25};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(3);
@@ -462,7 +462,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DExtrudedUMesh_1(MEDCouplingUMesh
     0.,0.,3., 1.,1.,3., 1.,1.25,3., 1.,0.,3., 1.,1.5,3., 2.,0.,3., 2.,1.,3., 1.,2.,3., 0.,2.,3., 3.,1.,3.,
     3.,2.,3., 0.,1.,3., 1.,3.,3., 2.,2.,3., 2.,3.,3.};
 
-  int conn[354]={
+  mcIdType conn[354]={
     // 0
     0,11,1,3,15,26,16,18,   1,2,4,7,13,6,-1,1,16,21,6,-1,6,21,28,13,-1,13,7,22,28,-1,7,4,19,22,-1,4,2,17,19,-1,2,1,16,17,-1,16,21,28,22,19,17,
     1,6,5,3,16,21,20,18,   13,10,9,6,28,25,24,21,
@@ -479,7 +479,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DExtrudedUMesh_1(MEDCouplingUMesh
     41,38,37,34,32,31,-1,41,56,46,31,-1,31,46,47,32,-1,32,47,49,34,-1,34,49,52,37,-1,37,38,53,52,-1,38,41,56,53,-1,56,46,47,49,52,53,
     37,42,44,43,52,57,59,58
   };
-  int conn2[28]={7,12,14,13, 11,8,7,4,2,1, 13,10,9,6, 1,6,5,3, 1,2,4,7,13,6, 0,11,1,3};
+  mcIdType conn2[28]={7,12,14,13, 11,8,7,4,2,1, 13,10,9,6, 1,6,5,3, 1,2,4,7,13,6, 0,11,1,3};
   //
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New();
   ret->setMeshDimension(3);
@@ -559,7 +559,7 @@ void MEDCouplingBasicsTest::build3DExtrudedUMesh_2(MEDCouplingUMesh *&meshN, MED
     4.2729998779296876, 0.43212001800537109, 0.14404000282287599, 4.2729998779296876, 0, 0.21606000900268554, 4.2729998779296876, 0.10803000450134277,
     0.21606000900268554, 4.2729998779296876, 0.21606000900268554, 0.21606000900268554, 4.2729998779296876, 0.28808000564575198, 0.21606000900268554,
     4.2729998779296876, 0.36010002136230468, 0.21606000900268554, 4.2729998779296876, 0.43212001800537109, 0.21606000900268554, 4.2729998779296876};
-  const int connN[320]={
+  const mcIdType connN[320]={
     0, 1, 7, 6, 30, 31, 37, 36, 1, 2, 8, 7, 31, 32, 38, 37, 2, 3, 9, 8, 32, 33, 39, 38, 3, 4, 10, 9, 33, 34, 40, 39, 4, 5, 11, 10, 34, 35, 41, 40, 6,
     7, 13, 12, 36, 37, 43, 42, 7, 8, 14, 13, 37, 38, 44, 43, 8, 9, 15, 14, 38, 39, 45, 44, 9, 10, 16, 15, 39, 40, 46, 45, 10, 11, 17, 16, 40, 41, 47,
     46, 12, 13, 19, 18, 42, 43, 49, 48, 13, 14, 20, 19, 43, 44, 50, 49, 14, 15, 21, 20, 44, 45, 51, 50, 15, 16, 22, 21, 45, 46, 52, 51, 16, 17, 23,
@@ -617,7 +617,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMeshMerged_1()
     -0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7,
     0.7,-0.3, 1.7,-0.3, 0.7,0.7, 1.7,0.7
   };
-  int targetConn[24]={
+  mcIdType targetConn[24]={
     0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4,
     9,12,10,9,11,12
   };
@@ -652,7 +652,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DCurveMesh(double dx, double dy)
     {
       0.+dx,0.+dy, 1.+dx,0.+dy, 2.+dx,1.+dy
     };
-  int targetConn[2*2]={1,2, 0,1};
+  mcIdType targetConn[2*2]={1,2, 0,1};
 
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("2Dcurve 1D mesh",1);
   targetMesh->allocateCells(2);
@@ -673,7 +673,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build1DMesh(double dx)
     {
       0.+dx, 1.+dx, 3.+dx, 4.+dx
     };
-  int targetConn[2*3]={1,2, 0,1, 2,3};
+  mcIdType targetConn[2*3]={1,2, 0,1, 2,3};
 
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("1D mesh",1);
   targetMesh->allocateCells(3);
@@ -692,7 +692,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build1DSourceMesh_2()
 {
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New("1DSourceMesh",1);
   ret->allocateCells(4);
-  int conn[8]={0,1,2,3,1,2,3,4};
+  mcIdType conn[8]={0,1,2,3,1,2,3,4};
   for(int i=0;i<4;i++)
     ret->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+2*i);
   ret->finishInsertingCells();
@@ -709,7 +709,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build1DTargetMesh_2()
 {
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New("1DTargetMesh",1);
   ret->allocateCells(2);
-  int conn[4]={1,2,0,1};
+  mcIdType conn[4]={1,2,0,1};
   for(int i=0;i<2;i++)
     ret->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+2*i);
   ret->finishInsertingCells();
@@ -726,7 +726,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DCurveSourceMesh_2()
 {
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New("1DSourceMesh",1);
   ret->allocateCells(4);
-  int conn[8]={0,1,2,3,1,2,3,4};
+  mcIdType conn[8]={0,1,2,3,1,2,3,4};
   for(int i=0;i<4;i++)
     ret->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+2*i);
   ret->finishInsertingCells();
@@ -743,7 +743,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DCurveTargetMesh_2()
 {
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New("1DTargetMesh",1);
   ret->allocateCells(2);
-  int conn[4]={1,2,0,1};
+  mcIdType conn[4]={1,2,0,1};
   for(int i=0;i<2;i++)
     ret->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+2*i);
   ret->finishInsertingCells();
@@ -760,7 +760,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build1DTargetMesh_3()
 {
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New("1DMesh_3",1);
   ret->allocateCells(4);
-  int conn[10]={0,1,2, 3,4, 6,5,7 ,9,8};
+  mcIdType conn[10]={0,1,2, 3,4, 6,5,7 ,9,8};
   ret->insertNextCell(INTERP_KERNEL::NORM_SEG3,3,conn);
   ret->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+3);
   ret->insertNextCell(INTERP_KERNEL::NORM_SEG3,3,conn+5);
@@ -779,7 +779,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DCurveTargetMesh_3()
 {
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New("2DCurveMesh_3",1);
   ret->allocateCells(4);
-  int conn[10]={0,1,2, 3,4, 6,5,7 ,9,8};
+  mcIdType conn[10]={0,1,2, 3,4, 6,5,7 ,9,8};
   ret->insertNextCell(INTERP_KERNEL::NORM_SEG3,3,conn);
   ret->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+3);
   ret->insertNextCell(INTERP_KERNEL::NORM_SEG3,3,conn+5);
@@ -798,7 +798,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_3()
 {
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New("2DMesh_3",2);
   ret->allocateCells(10);
-  int conn[52]={
+  mcIdType conn[52]={
     0,1,2, 0,1,3,4, 0,1,3,5,4, 0,1,2,6,7,8, 0,1,3,4,6,9,2,10,
     0,2,1, 0,4,3,1, 0,4,5,3,1, 0,2,1,8,7,6, 0,4,3,1,10,2,9,6
   };
@@ -829,7 +829,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_3()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build2DTargetMesh_4()
 {
   double targetCoords[20]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 };
-  int targetConn[18]={0,4,5,1, 1,5,3, 5,6,2, 7,8,5,4, 8,9,6,5};
+  mcIdType targetConn[18]={0,4,5,1, 1,5,3, 5,6,2, 7,8,5,4, 8,9,6,5};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(5);
@@ -995,7 +995,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build1DMultiTypes_1()
 {
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New("Multi1DMesh",1);
   DataArrayDouble *coo=buildCoordsForMultiTypes_1();
-  const int conn[5]={0,2, 0,2,1};
+  const mcIdType conn[5]={0,2, 0,2,1};
   mesh->allocateCells(2);
   mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
   mesh->insertNextCell(INTERP_KERNEL::NORM_SEG3,3,conn+2);
@@ -1009,7 +1009,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2DMultiTypes_1()
 {
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New("Multi2DMesh",2);
   DataArrayDouble *coo=buildCoordsForMultiTypes_1();
-  const int conn[21]={3,4,5, 3,4,5,6,7,8, 0,9,10,11, 0,9,10,11,12,13,14,15};
+  const mcIdType conn[21]={3,4,5, 3,4,5,6,7,8, 0,9,10,11, 0,9,10,11,12,13,14,15};
   mesh->allocateCells(4);
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn);
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI6,6,conn+3);
@@ -1025,7 +1025,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3DMultiTypes_1()
 {
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New("Multi3DMesh",3);
   DataArrayDouble *coo=buildCoordsForMultiTypes_1();
-  const int conn[81]={0,16,17,18,
+  const mcIdType conn[81]={0,16,17,18,
                       0,16,17,18,19,20,21,22,23,24,
                       0,11,10,9,25,
                       0,11,10,9,25,15,14,13,12,26,27,28,29,
@@ -1124,7 +1124,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::buildHexa8Mesh_1()
   const double coords[81]={0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.0, 1.0, 0.5, 0.0, 0.0, 1.0, 0.0, 0.5, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.5, 1.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.0, 1.0, 0.5, 0.5, 1.0, 0.5, 1.0, 1.0, 0.5, 0.0, 0.0, 1.0, 0.5, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.5, 1.0, 0.5, 0.5, 1.0, 1.0, 0.5, 1.0, 0.0, 1.0, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 1.0};
   coo->alloc(27,3);
   std::copy(coords,coords+81,coo->getPointer());
-  const int conn[64]={3,12,13,4,0,9,10,1,
+  const mcIdType conn[64]={3,12,13,4,0,9,10,1,
                       4,13,14,5,1,10,11,2,
                       6,15,16,7,3,12,13,4,
                       7,16,17,8,4,13,14,5,
@@ -1146,7 +1146,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::buildPointe_1(MEDCouplingUMesh *& m1)
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New("Pointe.med",3);
   MEDCouplingUMesh *mesh2=MEDCouplingUMesh::New("Pointe.med",2);
   const double coords[57]={0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 2.0, 0.0, 1.0, 0.0, 2.0, 1.0, -2.0, 0.0, 1.0, 0.0, -2.0, 1.0, 1.0, 1.0, 2.0, -1.0, 1.0, 2.0, -1.0, -1.0, 2.0, 1.0, -1.0, 2.0, 1.0, 1.0, 3.0, -1.0, 1.0, 3.0, -1.0, -1.0, 3.0, 1.0, -1.0, 3.0, 1.0, 1.0, 4.0, -1.0, 1.0, 4.0, -1.0, -1.0, 4.0, 1.0, -1.0, 4.0, 0.0, 0.0, 5.0};
-  const int conn[74]={0,1,2,5,0,1,3,2,0,1,4,3,0,1,5,4,1,6,3,2,1,7,4,3,1,8,5,4,1,9,2,5,1,6,2,9,1,7,3,6,1,8,4,7,1,9,5,8, 6,7,8,9,1,14,17,16,15,18, 10,11,12,13,6,7,8,9,14,15,16,17,10,11,12,13};
+  const mcIdType conn[74]={0,1,2,5,0,1,3,2,0,1,4,3,0,1,5,4,1,6,3,2,1,7,4,3,1,8,5,4,1,9,2,5,1,6,2,9,1,7,3,6,1,8,4,7,1,9,5,8, 6,7,8,9,1,14,17,16,15,18, 10,11,12,13,6,7,8,9,14,15,16,17,10,11,12,13};
   DataArrayDouble *coo=DataArrayDouble::New();
   coo->alloc(19,3);
   std::copy(coords,coords+57,coo->getPointer());
@@ -1162,7 +1162,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::buildPointe_1(MEDCouplingUMesh *& m1)
   mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+66);
   mesh->finishInsertingCells();
   //[1,34,29,23,41,32]
-  const int conn2[20]={0,5,1,14,18,17,8,7,4,9,5,2, 12,8,9,13,6,7,8,9};
+  const mcIdType conn2[20]={0,5,1,14,18,17,8,7,4,9,5,2, 12,8,9,13,6,7,8,9};
   mesh2->allocateCells(6);
   for(int i=0;i<4;i++)
     mesh2->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn2+3*i);
@@ -1174,11 +1174,11 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::buildPointe_1(MEDCouplingUMesh *& m1)
   return mesh;
 }
 
-double MEDCouplingBasicsTest::sumAll(const std::vector< std::map<int,double> >& matrix)
+double MEDCouplingBasicsTest::sumAll(const std::vector< std::map<mcIdType,double> >& matrix)
 {
   double ret=0.;
-  for(std::vector< std::map<int,double> >::const_iterator iter=matrix.begin();iter!=matrix.end();iter++)
-    for(std::map<int,double>::const_iterator iter2=(*iter).begin();iter2!=(*iter).end();iter2++)
+  for(std::vector< std::map<mcIdType,double> >::const_iterator iter=matrix.begin();iter!=matrix.end();iter++)
+    for(std::map<mcIdType,double>::const_iterator iter2=(*iter).begin();iter2!=(*iter).end();iter2++)
       ret+=(*iter2).second;
   return ret;
 }
@@ -1189,7 +1189,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2D1DSourceMesh()
                             -5., 3.,   -9., 0.,  -13., 3.,
                             -9., 8.,   -7., 0.,   -7., 8.
   };
-  int sourceConn[16]={0,1, 1,2, 2,3, 3,0, 3,4, 4,5, 4,6, 7,8};
+  mcIdType sourceConn[16]={0,1, 1,2, 2,3, 3,0, 3,4, 4,5, 4,6, 7,8};
   MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New();
   sourceMesh->setMeshDimension(1);
   sourceMesh->allocateCells(8);
@@ -1213,7 +1213,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build2D1DSourceMesh()
 MEDCouplingUMesh *MEDCouplingBasicsTest::build2D1DTargetMesh()
 {
   double targetCoords[10]={-17., 0., -17.,6., -9.,6., -9.,0., -5., 3.};
-  int targetConn[7]={0,1,2,3, 2,3,4};
+  mcIdType targetConn[7]={0,1,2,3, 2,3,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(2);
@@ -1238,7 +1238,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build2D1DSegSourceMesh(const double shi
   const int nbYP1 = nbY + 1;
   sourceMesh->allocateCells(nbY);
 
-  int sourceConn[2];
+  mcIdType sourceConn[2];
   for (int iY = 0; iY < nbY; ++iY)
     {
       sourceConn[0] = iY    ;
@@ -1273,7 +1273,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build2D1DQuadTargetMesh(const double in
   const int nbYP1 = nbY + 1;
   targetMesh->allocateCells(nbX * nbY);
 
-  int targetConn[4];
+  mcIdType targetConn[4];
   for (int iX = 0; iX < nbX; ++iX)
     {
       for (int iY = 0; iY < nbY; ++iY)
@@ -1316,7 +1316,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build2D1DTriTargetMesh(const double inc
   const int nbYP1 = nbY + 1;
   targetMesh->allocateCells(nbX * nbY * 2);
 
-  int targetConn[3];
+  mcIdType targetConn[3];
   for (int iX = 0; iX < nbX; ++iX)
     {
       for (int iY = 0; iY < nbY; ++iY)
@@ -1360,7 +1360,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3D2DSourceMesh()
                            -20., 0., 16., -18., 0., 16., -20., 2.5, 16.,
                            -25., 0., -5.,   5., 0., -5.,   5., 0. , 25., -25.,0.,25.
   };
-  int sourceConn[25]={0,1,2, 3,4,5,6, 7,8,9, 10,11,12,13, 14,15,16, 3,4,8,7, 17,18,19,20};
+  mcIdType sourceConn[25]={0,1,2, 3,4,5,6, 7,8,9, 10,11,12,13, 14,15,16, 3,4,8,7, 17,18,19,20};
   MEDCouplingUMesh *sourceMesh=MEDCouplingUMesh::New();
   sourceMesh->setMeshDimension(2);
   sourceMesh->allocateCells(7);
@@ -1388,7 +1388,7 @@ MEDCouplingUMesh *MEDCouplingBasicsTest::build3D2DTargetMesh()
                            -20.,-5.,10., -20.,-5.,-4., -12.,-5.,-4.,
                            -12.,-5.,10., -20., 0.,-4., -12., 0.,-4.
   };
-  int targetConn[20]={4,5,7,8, 0,3,2,1,4,7,6,5, 4,13,14,7,9,10,11,12};
+  mcIdType targetConn[20]={4,5,7,8, 0,3,2,1,4,7,6,5, 4,13,14,7,9,10,11,12};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(3);
   targetMesh->allocateCells(3);
@@ -1416,7 +1416,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build3D2DQuadSourceMesh(const double sh
   const int nbZP1 = nbZ + 1;
   sourceMesh->allocateCells(nbY * nbZ);
 
-  int sourceConn[4];
+  mcIdType sourceConn[4];
   for (int iY = 0; iY < nbY; ++iY)
     {
       for (int iZ = 0; iZ < nbZ; ++iZ)
@@ -1462,7 +1462,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build3D2DTriSourceMesh(const double shi
   const int nbZP1 = nbZ + 1;
   sourceMesh->allocateCells(nbY * nbZ * 2);
 
-  int sourceConn[3];
+  mcIdType sourceConn[3];
   for (int iY = 0; iY < nbY; ++iY)
     {
       for (int iZ = 0; iZ < nbZ; ++iZ)
@@ -1512,7 +1512,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build3D2DHexaTargetMesh(const double in
   const int nbZP1 = nbZ + 1;
   targetMesh->allocateCells(nbX * nbY * nbZ);
 
-  int targetConn[8];
+  mcIdType targetConn[8];
   for (int iX = 0; iX < nbX; ++iX)
     {
       for (int iY = 0; iY < nbY; ++iY)
@@ -1568,7 +1568,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build3D2DTetraTargetMesh(const double i
   const int nbZP1 = nbZ + 1;
   targetMesh->allocateCells(nbX * nbY * nbZ * 5);
 
-  int targetConn[4];
+  mcIdType targetConn[4];
   for (int iX = 0; iX < nbX; ++iX)
     {
       for (int iY = 0; iY < nbY; ++iY)
@@ -1627,11 +1627,11 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build3D2DTetraTargetMesh(const double i
   return targetMesh;
 }
 
-int MEDCouplingBasicsTest::countNonZero(const std::vector< std::map<int,double> >& matrix)
+int MEDCouplingBasicsTest::countNonZero(const std::vector< std::map<mcIdType,double> >& matrix)
 {
-  int ret=0.;
-  for(std::vector< std::map<int,double> >::const_iterator iter=matrix.begin();iter!=matrix.end();iter++)
-    for(std::map<int,double>::const_iterator iter2=(*iter).begin();iter2!=(*iter).end();iter2++)
+  int ret=0;
+  for(std::vector< std::map<mcIdType,double> >::const_iterator iter=matrix.begin();iter!=matrix.end();iter++)
+    for(std::map<mcIdType,double>::const_iterator iter2=(*iter).begin();iter2!=(*iter).end();iter2++)
       if (!INTERP_KERNEL::epsilonEqual((*iter2).second, 0.)) ret +=1;
   return ret;
 }
index 65b3a6c5e86bbf241fa9b9c9fdbae1a755c1a48c..417e6bbab940eaa2c76d9cc65528e9d16de99d4e 100644 (file)
@@ -23,6 +23,7 @@
 #include "MEDCouplingCMesh.hxx"
 #include "MEDCouplingMappedExtrudedMesh.hxx"
 #include "MEDCouplingFieldDouble.hxx"
+#include "MEDCouplingMemArray.txx"
 #include <sstream>
 #include <cmath>
 #include <algorithm>
@@ -122,8 +123,8 @@ void MEDCouplingBasicsTest1::testArray3()
 
 void MEDCouplingBasicsTest1::testMesh()
 {
-  const int nbOfCells=6;
-  const int nbOfNodes=12;
+  const mcIdType nbOfCells=6;
+  const mcIdType nbOfNodes=12;
   
   double coords[3*nbOfNodes]={ 
     0.024155, 0.04183768725682622, -0.305, 0.04831000000000001, -1.015761910347357e-17, -0.305, 0.09662000000000001, -1.832979297858306e-18, 
@@ -132,10 +133,10 @@ void MEDCouplingBasicsTest1::testMesh()
     0.09662000000000001, -1.832979297858306e-18, -0.2863, 0.120775, 0.04183768725682623, -0.2863, 0.09662000000000001, 0.08367537451365245, 
     -0.2863, 0.04831000000000001, 0.08367537451365246, -0.2863, };
   
-  int tab4[4*nbOfCells]={ 
+  mcIdType tab4[4*nbOfCells]={ 
     1, 2, 8, 7, 2, 3, 9, 8, 3, 4, 10, 9, 4, 5, 11, 10, 5, 0, 6, 11, 
     0, 1, 7, 6, };
-  CPPUNIT_ASSERT_EQUAL(MEDCouplingMesh::GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NORM_TRI3),3);
+  CPPUNIT_ASSERT_EQUAL(MEDCouplingMesh::GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NORM_TRI3),ToIdType(3));
   CPPUNIT_ASSERT(MEDCouplingMesh::IsStaticGeometricType(INTERP_KERNEL::NORM_TRI3));
   CPPUNIT_ASSERT(MEDCouplingMesh::IsLinearGeometricType(INTERP_KERNEL::NORM_TRI3));
   CPPUNIT_ASSERT_EQUAL(MEDCouplingMesh::GetDimensionOfGeometricType(INTERP_KERNEL::NORM_TRI3),2);
@@ -145,7 +146,7 @@ void MEDCouplingBasicsTest1::testMesh()
   CPPUNIT_ASSERT(MEDCouplingMesh::IsLinearGeometricType(INTERP_KERNEL::NORM_POLYGON));
   CPPUNIT_ASSERT_EQUAL(MEDCouplingMesh::GetDimensionOfGeometricType(INTERP_KERNEL::NORM_POLYGON),2);
   CPPUNIT_ASSERT_EQUAL(std::string(MEDCouplingMesh::GetReprOfGeometricType(INTERP_KERNEL::NORM_POLYGON)),std::string("NORM_POLYGON"));
-  CPPUNIT_ASSERT_EQUAL(MEDCouplingMesh::GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NORM_TRI6),6);
+  CPPUNIT_ASSERT_EQUAL(MEDCouplingMesh::GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NORM_TRI6),ToIdType(6));
   CPPUNIT_ASSERT(MEDCouplingMesh::IsStaticGeometricType(INTERP_KERNEL::NORM_TRI6));
   CPPUNIT_ASSERT(!MEDCouplingMesh::IsLinearGeometricType(INTERP_KERNEL::NORM_TRI6));
   CPPUNIT_ASSERT_EQUAL(MEDCouplingMesh::GetDimensionOfGeometricType(INTERP_KERNEL::NORM_TRI6),2);
@@ -153,19 +154,19 @@ void MEDCouplingBasicsTest1::testMesh()
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(8);
-  const int *curConn=tab4;
-  for(int i=0;i<nbOfCells;i++,curConn+=4)
+  const mcIdType *curConn=tab4;
+  for(mcIdType i=0;i<nbOfCells;i++,curConn+=4)
     mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,curConn);
   mesh->finishInsertingCells();
-  CPPUNIT_ASSERT_EQUAL((std::size_t)30,mesh->getNodalConnectivity()->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(30),mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells());
   //test 0 - no copy no ownership
   DataArrayDouble *myCoords=DataArrayDouble::New();
   myCoords->useArray(coords,false,DeallocType::CPP_DEALLOC,nbOfNodes,3);
   mesh->setCoords(myCoords);
   mesh->setCoords(myCoords);
   myCoords->decrRef();
-  CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells());
   mesh->checkConsistencyLight();
   //test 1 - no copy ownership C++
   myCoords=DataArrayDouble::New();
@@ -174,7 +175,7 @@ void MEDCouplingBasicsTest1::testMesh()
   myCoords->useArray(tmp,true,DeallocType::CPP_DEALLOC,nbOfNodes,3);
   mesh->setCoords(myCoords);
   myCoords->decrRef();
-  CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells());
   mesh->checkConsistencyLight();
   //test 2 - no copy ownership C
   myCoords=DataArrayDouble::New();
@@ -204,31 +205,31 @@ void MEDCouplingBasicsTest1::testMesh()
   MEDCouplingUMesh *mesh2=mesh->clone(false);
   CPPUNIT_ASSERT(mesh2!=mesh);
   mesh2->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh2->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh2->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh2->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,mesh2->getSpaceDimension());
   CPPUNIT_ASSERT(mesh!=mesh2);
   CPPUNIT_ASSERT(mesh->getCoords()==mesh2->getCoords());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.2863,mesh2->getCoords()->getIJ(11,2),1e-14);
   CPPUNIT_ASSERT(mesh->getNodalConnectivity()==mesh2->getNodalConnectivity());
-  CPPUNIT_ASSERT_EQUAL(3,mesh2->getNodalConnectivity()->getIJ(7,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),mesh2->getNodalConnectivity()->getIJ(7,0));
   CPPUNIT_ASSERT(mesh->getNodalConnectivityIndex()==mesh2->getNodalConnectivityIndex());
-  CPPUNIT_ASSERT_EQUAL(15,mesh2->getNodalConnectivityIndex()->getIJ(3,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(15),mesh2->getNodalConnectivityIndex()->getIJ(3,0));
   mesh2->decrRef();
   // test clone not recursively
   MEDCouplingUMesh *mesh3=mesh->clone(true);
   CPPUNIT_ASSERT(mesh3!=mesh);
   mesh3->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh3->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh3->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,mesh3->getSpaceDimension());
   CPPUNIT_ASSERT(mesh!=mesh3);
   CPPUNIT_ASSERT(mesh->getCoords()!=mesh3->getCoords());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.2863,mesh3->getCoords()->getIJ(11,2),1e-14);
   CPPUNIT_ASSERT(mesh->getNodalConnectivity()!=mesh3->getNodalConnectivity());
-  CPPUNIT_ASSERT_EQUAL(3,mesh3->getNodalConnectivity()->getIJ(7,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),mesh3->getNodalConnectivity()->getIJ(7,0));
   CPPUNIT_ASSERT(mesh->getNodalConnectivityIndex()!=mesh3->getNodalConnectivityIndex());
-  CPPUNIT_ASSERT_EQUAL(15,mesh3->getNodalConnectivityIndex()->getIJ(3,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(15),mesh3->getNodalConnectivityIndex()->getIJ(3,0));
   mesh3->decrRef();
   //test 4 - Field on cells
   MEDCouplingFieldDouble *fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS);
@@ -246,7 +247,7 @@ void MEDCouplingBasicsTest1::testMesh()
   MEDCouplingFieldDouble *fieldOnCells2=fieldOnCells->clone(false);
   CPPUNIT_ASSERT(fieldOnCells2!=fieldOnCells);
   fieldOnCells2->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)fieldOnCells2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(nbOfCells,fieldOnCells2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(9,(int)fieldOnCells2->getNumberOfComponents());
   CPPUNIT_ASSERT(fieldOnCells2->getArray()==fieldOnCells->getArray());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,fieldOnCells2->getArray()->getIJ(3,7),1e-14);
@@ -255,7 +256,7 @@ void MEDCouplingBasicsTest1::testMesh()
   MEDCouplingFieldDouble *fieldOnCells3=fieldOnCells->clone(true);
   CPPUNIT_ASSERT(fieldOnCells3!=fieldOnCells);
   fieldOnCells3->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)fieldOnCells3->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(nbOfCells,fieldOnCells3->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(9,(int)fieldOnCells3->getNumberOfComponents());
   CPPUNIT_ASSERT(fieldOnCells3->getArray()!=fieldOnCells->getArray());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,fieldOnCells3->getArray()->getIJ(3,7),1e-14);
@@ -271,7 +272,7 @@ void MEDCouplingBasicsTest1::testMesh()
 void MEDCouplingBasicsTest1::testMeshPointsCloud()
 {
   double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5};
-  const int targetConn[]={0,1,2,3,4,5,7,6};
+  const mcIdType targetConn[]={0,1,2,3,4,5,7,6};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(0);
   targetMesh->allocateCells(8);
@@ -294,7 +295,7 @@ void MEDCouplingBasicsTest1::testMeshPointsCloud()
   targetMesh->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(3,targetMesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(8,(int)targetMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(9,targetMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9),targetMesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(0,targetMesh->getMeshDimension());
   //
   targetMesh->decrRef();
@@ -362,14 +363,14 @@ void MEDCouplingBasicsTest1::testDeepCopy()
 void MEDCouplingBasicsTest1::testRevNodal()
 {
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
-  DataArrayInt *revNodal=DataArrayInt::New();
-  DataArrayInt *revNodalIndx=DataArrayInt::New();
+  DataArrayIdType *revNodal=DataArrayIdType::New();
+  DataArrayIdType *revNodalIndx=DataArrayIdType::New();
   //
   mesh->getReverseNodalConnectivity(revNodal,revNodalIndx);
-  const int revNodalExpected[18]={0,0,1,1,2,0,3,0,1,2,3,4,2,4,3,3,4,4};
-  const int revNodalIndexExpected[10]={0,1,3,5,7,12,14,15,17,18};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,revNodal->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)10,revNodalIndx->getNbOfElems());
+  const mcIdType revNodalExpected[18]={0,0,1,1,2,0,3,0,1,2,3,4,2,4,3,3,4,4};
+  const mcIdType revNodalIndexExpected[10]={0,1,3,5,7,12,14,15,17,18};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),revNodal->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),revNodalIndx->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(revNodalExpected,revNodalExpected+18,revNodal->getPointer()));
   CPPUNIT_ASSERT(std::equal(revNodalIndexExpected,revNodalIndexExpected+10,revNodalIndx->getPointer()));
   //
@@ -383,14 +384,14 @@ void MEDCouplingBasicsTest1::testConvertToPolyTypes()
   ////// 2D
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
   //
-  const int elts[2]={1,3};
-  std::vector<int> eltsV(elts,elts+2);
+  const mcIdType elts[2]={1,3};
+  std::vector<mcIdType> eltsV(elts,elts+2);
   mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
   mesh->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(5,(int)mesh->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(23,(int)mesh->getNodalConnectivity()->getNumberOfTuples());
-  const int *pt=mesh->getNodalConnectivity()->getConstPointer();
-  const int expected1[23]={4, 0, 3, 4, 1, 5, 1, 4, 2, 3, 4, 5, 2, 5, 6, 7, 4, 3, 4, 7, 8, 5, 4};
+  const mcIdType *pt=mesh->getNodalConnectivity()->getConstPointer();
+  const mcIdType expected1[23]={4, 0, 3, 4, 1, 5, 1, 4, 2, 3, 4, 5, 2, 5, 6, 7, 4, 3, 4, 7, 8, 5, 4};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+23,pt));
   //
   mesh->decrRef();
@@ -411,32 +412,32 @@ void MEDCouplingBasicsTest1::testConvertToPolyTypes()
 void MEDCouplingBasicsTest1::testDescConn2D()
 {
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
-  DataArrayInt *desc=DataArrayInt::New();
-  DataArrayInt *descIndx=DataArrayInt::New();
-  DataArrayInt *revDesc=DataArrayInt::New();
-  DataArrayInt *revDescIndx=DataArrayInt::New();
+  DataArrayIdType *desc=DataArrayIdType::New();
+  DataArrayIdType *descIndx=DataArrayIdType::New();
+  DataArrayIdType *revDesc=DataArrayIdType::New();
+  DataArrayIdType *revDescIndx=DataArrayIdType::New();
   //
   MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   mesh2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(13,(int)mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples());
-  const int expected1[18]={0,1,2,3, 2,4,5, 6,7,4, 8,9,1,10, 11,12,6,9};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(14),revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples());
+  const mcIdType expected1[18]={0,1,2,3, 2,4,5, 6,7,4, 8,9,1,10, 11,12,6,9};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer()));
-  const int expected2[6]={0,4,7,10,14,18};
+  const mcIdType expected2[6]={0,4,7,10,14,18};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+6,descIndx->getConstPointer()));
-  const int expected3[14]={0,1,3,5,6,8,9,11,12,13,15,16,17,18};
+  const mcIdType expected3[14]={0,1,3,5,6,8,9,11,12,13,15,16,17,18};
   CPPUNIT_ASSERT(std::equal(expected3,expected3+14,revDescIndx->getConstPointer()));
-  const int expected4[18]={0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
+  const mcIdType expected4[18]={0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
   CPPUNIT_ASSERT(std::equal(expected4,expected4+18,revDesc->getConstPointer()));
-  DataArrayInt *conn=mesh2->getNodalConnectivity();
-  DataArrayInt *connIndex=mesh2->getNodalConnectivityIndex();
-  const int expected5[14]={0,3,6,9,12,15,18,21,24,27,30,33,36,39};
+  DataArrayIdType *conn=mesh2->getNodalConnectivity();
+  DataArrayIdType *connIndex=mesh2->getNodalConnectivityIndex();
+  const mcIdType expected5[14]={0,3,6,9,12,15,18,21,24,27,30,33,36,39};
   CPPUNIT_ASSERT(std::equal(expected5,expected5+14,connIndex->getConstPointer()));
-  const int expected6[39]={1, 0, 3, 1, 3, 4, 1, 4, 1, 1, 1, 0, 1, 4, 2, 1, 2, 1, 1, 4, 5, 1, 5, 2, 1, 6, 7, 1, 7, 4, 1, 3, 6, 1, 7, 8, 1, 8, 5};
+  const mcIdType expected6[39]={1, 0, 3, 1, 3, 4, 1, 4, 1, 1, 1, 0, 1, 4, 2, 1, 2, 1, 1, 4, 5, 1, 5, 2, 1, 6, 7, 1, 7, 4, 1, 3, 6, 1, 7, 8, 1, 8, 5};
   CPPUNIT_ASSERT(std::equal(expected6,expected6+39,conn->getConstPointer()));
   //
   desc->decrRef();
@@ -445,24 +446,24 @@ void MEDCouplingBasicsTest1::testDescConn2D()
   revDescIndx->decrRef();
   mesh2->decrRef();
   //
-  const int elts[2]={1,3};
-  std::vector<int> eltsV(elts,elts+2);
+  const mcIdType elts[2]={1,3};
+  std::vector<mcIdType> eltsV(elts,elts+2);
   mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
   mesh->checkConsistencyLight();
   //
-  desc=DataArrayInt::New();
-  descIndx=DataArrayInt::New();
-  revDesc=DataArrayInt::New();
-  revDescIndx=DataArrayInt::New();
+  desc=DataArrayIdType::New();
+  descIndx=DataArrayIdType::New();
+  revDesc=DataArrayIdType::New();
+  revDescIndx=DataArrayIdType::New();
   //
   mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   mesh2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(13,(int)mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(14),revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+6,descIndx->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected3,expected3+14,revDescIndx->getConstPointer()));
@@ -483,29 +484,29 @@ void MEDCouplingBasicsTest1::testDescConn2D()
 void MEDCouplingBasicsTest1::testDescConn3D()
 {
   MEDCouplingUMesh *mesh=build3DTargetMesh_1();
-  DataArrayInt *desc=DataArrayInt::New();
-  DataArrayInt *descIndx=DataArrayInt::New();
-  DataArrayInt *revDesc=DataArrayInt::New();
-  DataArrayInt *revDescIndx=DataArrayInt::New();
+  DataArrayIdType *desc=DataArrayIdType::New();
+  DataArrayIdType *descIndx=DataArrayIdType::New();
+  DataArrayIdType *revDesc=DataArrayIdType::New();
+  DataArrayIdType *revDescIndx=DataArrayIdType::New();
   //
   MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   mesh2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(36,(int)mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,(int)revDescIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,(int)descIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples());
-  const int expected1[9]={0, 6, 12, 18, 24, 30, 36, 42, 48};
-  const int expected2[48]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 11, 12, 4, 13, 14, 15, 16, 17, 10, 18, 19, 13, 1, 20, 21, 22, 23, 24, 7, 25, 26, 27, 28, 22, 12, 29, 23, 30, 31, 32, 17, 33, 28, 34, 35, 30};
-  const int expected3[37]={0, 1, 3, 4, 6, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48};
-  const int expected4[48]={0, 0, 4, 0, 0, 1, 0, 2, 0, 1, 1, 5, 1, 1, 1, 3, 2, 2, 6, 2, 3, 2, 2, 3, 3, 7, 3, 3, 4, 4, 4, 5, 4, 6, 4, 5, 5, 5, 5, 7, 6, 6, 7, 6, 6, 7, 7, 7};
-  const int expected5[37]={0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180};
-  const int expected6[180]={4, 0, 1, 4, 3, 4, 9, 12, 13, 10, 4, 0, 9, 10, 1, 4, 1, 10, 13, 4, 4, 4, 13, 12, 3, 4, 3, 12, 9, 0, 4, 1, 2, 5, 4, 4, 10, 13, 14, 11, 4, 1, 10, 11, 2, 4, 2, 11, 14,
+  CPPUNIT_ASSERT_EQUAL(ToIdType(37),revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,(int)revDescIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9),descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,(int)descIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(48),desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(48),revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples());
+  const mcIdType expected1[9]={0, 6, 12, 18, 24, 30, 36, 42, 48};
+  const mcIdType expected2[48]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 11, 12, 4, 13, 14, 15, 16, 17, 10, 18, 19, 13, 1, 20, 21, 22, 23, 24, 7, 25, 26, 27, 28, 22, 12, 29, 23, 30, 31, 32, 17, 33, 28, 34, 35, 30};
+  const mcIdType expected3[37]={0, 1, 3, 4, 6, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48};
+  const mcIdType expected4[48]={0, 0, 4, 0, 0, 1, 0, 2, 0, 1, 1, 5, 1, 1, 1, 3, 2, 2, 6, 2, 3, 2, 2, 3, 3, 7, 3, 3, 4, 4, 4, 5, 4, 6, 4, 5, 5, 5, 5, 7, 6, 6, 7, 6, 6, 7, 7, 7};
+  const mcIdType expected5[37]={0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180};
+  const mcIdType expected6[180]={4, 0, 1, 4, 3, 4, 9, 12, 13, 10, 4, 0, 9, 10, 1, 4, 1, 10, 13, 4, 4, 4, 13, 12, 3, 4, 3, 12, 9, 0, 4, 1, 2, 5, 4, 4, 10, 13, 14, 11, 4, 1, 10, 11, 2, 4, 2, 11, 14,
                             5, 4, 5, 14, 13, 4, 4, 3, 4, 7, 6, 4, 12, 15, 16, 13, 4, 4, 13, 16, 7, 4, 7, 16, 15, 6, 4, 6, 15, 12, 3, 4, 4, 5, 8, 7, 4, 13, 16, 17, 14, 4, 5, 14, 17, 8, 4, 8,
                             17, 16, 7, 4, 18, 21, 22, 19, 4, 9, 18, 19, 10, 4, 10, 19, 22, 13, 4, 13, 22, 21, 12, 4, 12, 21, 18, 9, 4, 19, 22, 23, 20, 4, 10, 19, 20, 11, 4, 11, 20, 23, 14, 4,
                             14, 23, 22, 13, 4, 21, 24, 25, 22, 4, 13, 22, 25, 16, 4, 16, 25, 24, 15, 4, 15, 24, 21, 12, 4, 22, 25, 26, 23, 4, 14, 23, 26, 17, 4, 17, 26, 25, 16};
-  const int expected7[180]={4, 0, 1, 4, 3, 4, 9, 12, 13, 10, 4, 0, 9, 10, 1, 4, 1, 10, 13, 4, 4, 4, 13, 12, 3, 4, 3, 12, 9, 0, 5, 1, 2, 5, 4, 5, 10, 13, 14, 11, 5, 1, 10, 11, 2, 5, 2, 11, 14,
+  const mcIdType expected7[180]={4, 0, 1, 4, 3, 4, 9, 12, 13, 10, 4, 0, 9, 10, 1, 4, 1, 10, 13, 4, 4, 4, 13, 12, 3, 4, 3, 12, 9, 0, 5, 1, 2, 5, 4, 5, 10, 13, 14, 11, 5, 1, 10, 11, 2, 5, 2, 11, 14,
                             5, 5, 5, 14, 13, 4, 4, 3, 4, 7, 6, 4, 12, 15, 16, 13, 4, 4, 13, 16, 7, 4, 7, 16, 15, 6, 4, 6, 15, 12, 3, 5, 4, 5, 8, 7, 5, 13, 16, 17, 14, 5, 5, 14, 17, 8, 5, 8,
                             17, 16, 7, 4, 18, 21, 22, 19, 4, 9, 18, 19, 10, 4, 10, 19, 22, 13, 4, 13, 22, 21, 12, 4, 12, 21, 18, 9, 4, 19, 22, 23, 20, 4, 10, 19, 20, 11, 4, 11, 20, 23, 14, 4,
                             14, 23, 22, 13, 4, 21, 24, 25, 22, 4, 13, 22, 25, 16, 4, 16, 25, 24, 15, 4, 15, 24, 21, 12, 4, 22, 25, 26, 23, 4, 14, 23, 26, 17, 4, 17, 26, 25, 16};
@@ -523,22 +524,22 @@ void MEDCouplingBasicsTest1::testDescConn3D()
   revDescIndx->decrRef();
   mesh2->decrRef();
   //
-  const int elts[2]={1,3};
-  std::vector<int> eltsV(elts,elts+2);
+  const mcIdType elts[2]={1,3};
+  std::vector<mcIdType> eltsV(elts,elts+2);
   mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
   mesh->checkConsistencyLight();
-  desc=DataArrayInt::New();
-  descIndx=DataArrayInt::New();
-  revDesc=DataArrayInt::New();
-  revDescIndx=DataArrayInt::New();
+  desc=DataArrayIdType::New();
+  descIndx=DataArrayIdType::New();
+  revDesc=DataArrayIdType::New();
+  revDescIndx=DataArrayIdType::New();
   mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
   mesh2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(36,(int)mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,(int)revDescIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,(int)descIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(37),revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,(int)revDescIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9),descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,(int)descIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(48),desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(48),revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+9,descIndx->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+48,desc->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected3,expected3+37,revDescIndx->getConstPointer()));
@@ -557,10 +558,10 @@ void MEDCouplingBasicsTest1::testDescConn3D()
 void MEDCouplingBasicsTest1::testFindBoundaryNodes()
 {
   MEDCouplingUMesh *mesh=build3DTargetMesh_1();
-  DataArrayInt *boundaryNodes=mesh->findBoundaryNodes();
+  DataArrayIdType *boundaryNodes=mesh->findBoundaryNodes();
   CPPUNIT_ASSERT_EQUAL(26,(int)boundaryNodes->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)boundaryNodes->getNumberOfComponents());
-  const int expected1[26]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26};
+  const mcIdType expected1[26]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+26,boundaryNodes->begin()));
   boundaryNodes->decrRef();
   mesh->decrRef();
@@ -571,7 +572,7 @@ void MEDCouplingBasicsTest1::testBoundaryMesh()
   MEDCouplingUMesh *mesh=build3DTargetMesh_1();
   MEDCouplingPointSet *mesh2=mesh->buildBoundaryMesh(false);
   CPPUNIT_ASSERT_EQUAL(24,(int)mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(26,mesh2->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(26,(int)mesh2->getNumberOfNodes());
   mesh2->decrRef();
   mesh->decrRef();
 }
@@ -580,8 +581,8 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelf()
 {
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
   mesh->setName("Toto");
-  const int tab1[2]={0,4};
-  const int tab2[3]={0,2,3};
+  const mcIdType tab1[2]={0,4};
+  const mcIdType tab2[3]={0,2,3};
   //
   MEDCouplingPointSet *subMeshSimple=mesh->buildPartOfMySelf(tab1,tab1+2,true);
   MEDCouplingUMesh *subMesh=dynamic_cast<MEDCouplingUMesh *>(subMeshSimple);
@@ -595,10 +596,10 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelf()
   CPPUNIT_ASSERT(name=="Toto");
   CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords());
   CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getNumberOfCells());
-  const int subConn[10]={4,0,3,4,1,4,7,8,5,4};
-  const int subConnIndex[3]={0,5,10};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)10,subMesh->getNodalConnectivity()->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,subMesh->getNodalConnectivityIndex()->getNbOfElems());
+  const mcIdType subConn[10]={4,0,3,4,1,4,7,8,5,4};
+  const mcIdType subConnIndex[3]={0,5,10};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),subMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),subMesh->getNodalConnectivityIndex()->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(subConn,subConn+10,subMesh->getNodalConnectivity()->getPointer()));
   CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+3,subMesh->getNodalConnectivityIndex()->getPointer()));
   subMesh->decrRef();
@@ -613,13 +614,13 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelf()
   CPPUNIT_ASSERT(name=="Toto");
   CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords());
   CPPUNIT_ASSERT_EQUAL(3,(int)subMesh->getNumberOfCells());
-  const int subConn2[14]={4,0,3,4,1,3,4,5,2,4,6,7,4,3};
-  const int subConnIndex2[4]={0,5,9,14};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)14,subMesh->getNodalConnectivity()->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)4,subMesh->getNodalConnectivityIndex()->getNbOfElems());
+  const mcIdType subConn2[14]={4,0,3,4,1,3,4,5,2,4,6,7,4,3};
+  const mcIdType subConnIndex2[4]={0,5,9,14};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(14),subMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),subMesh->getNodalConnectivityIndex()->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(subConn2,subConn2+14,subMesh->getNodalConnectivity()->getPointer()));
   CPPUNIT_ASSERT(std::equal(subConnIndex2,subConnIndex2+4,subMesh->getNodalConnectivityIndex()->getPointer()));
-  const int tab3[3]={0,1,2};
+  const mcIdType tab3[3]={0,1,2};
   MEDCouplingPointSet *subMeshSimple2=subMeshSimple->buildPartOfMySelf(tab3,tab3+3,true);
   subMesh->decrRef();
   name=subMeshSimple2->getName();
@@ -632,17 +633,17 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelf()
 void MEDCouplingBasicsTest1::testBuildPartOfMySelfNode()
 {
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
-  const int tab1[4]={5,7,8,4};
+  const mcIdType tab1[4]={5,7,8,4};
   MEDCouplingPointSet *subMeshSimple=mesh->buildPartOfMySelfNode(tab1,tab1+4,true);
   MEDCouplingUMesh *subMesh=dynamic_cast<MEDCouplingUMesh *>(subMeshSimple);
   CPPUNIT_ASSERT(subMesh);
   CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllGeoTypes().size());
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin());
   CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)5,subMesh->getNodalConnectivity()->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2,subMesh->getNodalConnectivityIndex()->getNbOfElems());
-  const int subConn[5]={4,7,8,5,4};
-  const int subConnIndex[3]={0,5};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),subMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),subMesh->getNodalConnectivityIndex()->getNbOfElems());
+  const mcIdType subConn[5]={4,7,8,5,4};
+  const mcIdType subConnIndex[3]={0,5};
   CPPUNIT_ASSERT(std::equal(subConn,subConn+5,subMesh->getNodalConnectivity()->getPointer()));
   CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+2,subMesh->getNodalConnectivityIndex()->getPointer()));
   CPPUNIT_ASSERT(subMesh->getCoords()==mesh->getCoords());
@@ -655,16 +656,16 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelfNode()
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllGeoTypes().begin());
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllGeoTypes().begin()));
   CPPUNIT_ASSERT_EQUAL(3,(int)subMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)14,subMesh->getNodalConnectivity()->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)4,subMesh->getNodalConnectivityIndex()->getNbOfElems());
-  const int subConn2[14]={3,4,5,2,4,6,7,4,3,4,7,8,5,4};
-  const int subConnIndex2[4]={0,4,9,14};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(14),subMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),subMesh->getNodalConnectivityIndex()->getNbOfElems());
+  const mcIdType subConn2[14]={3,4,5,2,4,6,7,4,3,4,7,8,5,4};
+  const mcIdType subConnIndex2[4]={0,4,9,14};
   CPPUNIT_ASSERT(std::equal(subConn2,subConn2+14,subMesh->getNodalConnectivity()->getPointer()));
   CPPUNIT_ASSERT(std::equal(subConnIndex2,subConnIndex2+4,subMesh->getNodalConnectivityIndex()->getPointer()));
   CPPUNIT_ASSERT(subMesh->getCoords()==mesh->getCoords());
   subMeshSimple->decrRef();
   //testing the case where length of tab2 is greater than max number of node per cell.
-  const int tab2[7]={0,3,2,1,4,5,6};
+  const mcIdType tab2[7]={0,3,2,1,4,5,6};
   subMeshSimple=mesh->buildPartOfMySelfNode(tab2,tab2+7,true);
   subMesh=dynamic_cast<MEDCouplingUMesh *>(subMeshSimple);
   CPPUNIT_ASSERT(subMesh);
@@ -682,10 +683,10 @@ void MEDCouplingBasicsTest1::testZipCoords()
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
   CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
-  CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(9,(int)mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(5,(int)mesh->getNumberOfCells());
-  std::vector<int> oldConn(mesh->getNodalConnectivity()->getNbOfElems());
-  std::vector<int> oldConnIndex(mesh->getNumberOfCells()+1);
+  std::vector<mcIdType> oldConn(mesh->getNodalConnectivity()->getNbOfElems());
+  std::vector<mcIdType> oldConnIndex(mesh->getNumberOfCells()+1);
   std::copy(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+oldConn.size(),oldConn.begin());
   std::copy(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+mesh->getNumberOfCells()+1,oldConnIndex.begin());
   DataArrayDouble *oldCoords=mesh->getCoords();
@@ -693,7 +694,7 @@ void MEDCouplingBasicsTest1::testZipCoords()
   mesh->zipCoords();
   CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
-  CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(9,(int)mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(5,(int)mesh->getNumberOfCells());
   CPPUNIT_ASSERT(mesh->getCoords()!=oldCoords);
   CPPUNIT_ASSERT(std::equal(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+2*9,oldCoords->getPointer()));
@@ -701,21 +702,21 @@ void MEDCouplingBasicsTest1::testZipCoords()
   CPPUNIT_ASSERT(std::equal(oldConnIndex.begin(),oldConnIndex.end(),mesh->getNodalConnectivityIndex()->getPointer()));
   oldCoords->decrRef();
   //
-  const int tab1[2]={0,4};
+  const mcIdType tab1[2]={0,4};
   MEDCouplingPointSet *subMeshPtSet=mesh->buildPartOfMySelf(tab1,tab1+2,true);
   MEDCouplingUMesh *subMesh=dynamic_cast<MEDCouplingUMesh *>(subMeshPtSet);
   CPPUNIT_ASSERT(subMesh);
-  DataArrayInt *traducer=subMesh->zipCoordsTraducer();
-  const int expectedTraducer[9]={0,1,-1,2,3,4,-1,5,6};
+  DataArrayIdType *traducer=subMesh->zipCoordsTraducer();
+  const mcIdType expectedTraducer[9]={0,1,-1,2,3,4,-1,5,6};
   CPPUNIT_ASSERT(std::equal(expectedTraducer,expectedTraducer+9,traducer->getPointer()));
   traducer->decrRef();
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin());
   CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getNumberOfCells());
-  const int subConn[10]={4,0,2,3,1,4,5,6,4,3};
-  const int subConnIndex[3]={0,5,10};
-  CPPUNIT_ASSERT_EQUAL(7,subMesh->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)10,subMesh->getNodalConnectivity()->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,subMesh->getNodalConnectivityIndex()->getNbOfElems());
+  const mcIdType subConn[10]={4,0,2,3,1,4,5,6,4,3};
+  const mcIdType subConnIndex[3]={0,5,10};
+  CPPUNIT_ASSERT_EQUAL(7,(int)subMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),subMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),subMesh->getNodalConnectivityIndex()->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(subConn,subConn+10,subMesh->getNodalConnectivity()->getPointer()));
   CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+3,subMesh->getNodalConnectivityIndex()->getPointer()));
   subMesh->decrRef();
@@ -725,9 +726,9 @@ void MEDCouplingBasicsTest1::testZipCoords()
   CPPUNIT_ASSERT(subMesh);
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin());
   CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(7,subMesh->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)10,subMesh->getNodalConnectivity()->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,subMesh->getNodalConnectivityIndex()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(7,(int)subMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),subMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),subMesh->getNodalConnectivityIndex()->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(subConn,subConn+10,subMesh->getNodalConnectivity()->getPointer()));
   CPPUNIT_ASSERT(std::equal(subConnIndex,subConnIndex+3,subMesh->getNodalConnectivityIndex()->getPointer()));
   subMesh->decrRef();
@@ -739,7 +740,7 @@ void MEDCouplingBasicsTest1::testZipConnectivity()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
   MEDCouplingUMesh *m2=build2DTargetMesh_1();
-  int cells1[3]={2,3,4};
+  mcIdType cells1[3]={2,3,4};
   MEDCouplingPointSet *m3_1=m2->buildPartOfMySelf(cells1,cells1+3,true);
   MEDCouplingUMesh *m3=dynamic_cast<MEDCouplingUMesh *>(m3_1);
   CPPUNIT_ASSERT(m3);
@@ -753,15 +754,15 @@ void MEDCouplingBasicsTest1::testZipConnectivity()
   m5->decrRef();
   //
   bool areNodesMerged;
-  int newNbOfNodes;
+  mcIdType newNbOfNodes;
   CPPUNIT_ASSERT_EQUAL(10,(int)m6->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(22,m6->getNumberOfNodes());
-  DataArrayInt *arr=m6->mergeNodes(1e-13,areNodesMerged,newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(22,(int)m6->getNumberOfNodes());
+  DataArrayIdType *arr=m6->mergeNodes(1e-13,areNodesMerged,newNbOfNodes);
   arr->decrRef();
   CPPUNIT_ASSERT(areNodesMerged);
   CPPUNIT_ASSERT_EQUAL(10,(int)m6->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(9,m6->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL(9,newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(9,(int)m6->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(9,(int)newNbOfNodes);
   //
   arr=m6->zipConnectivityTraducer(0);
   CPPUNIT_ASSERT_EQUAL(7,(int)m6->getNumberOfCells());
@@ -794,7 +795,7 @@ void MEDCouplingBasicsTest1::testEqualMesh()
   CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12));
   CPPUNIT_ASSERT(mesh2->isEqual(mesh1,1e-12));
   //
-  int *pt2=mesh1->getNodalConnectivity()->getPointer();
+  mcIdType *pt2=mesh1->getNodalConnectivity()->getPointer();
   pt2[5]++;
   CPPUNIT_ASSERT(!mesh1->isEqual(mesh2,1e-12));
   CPPUNIT_ASSERT(!mesh2->isEqual(mesh1,1e-12));
@@ -941,14 +942,14 @@ void MEDCouplingBasicsTest1::testBuildSubMeshData()
   //check buildSubMesh on field on cells
   MEDCouplingFieldDouble *fieldCells=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
   fieldCells->setMesh(targetMesh);
-  const int elts[3]={1,2,4};
-  DataArrayInt *di;
+  const mcIdType elts[3]={1,2,4};
+  DataArrayIdType *di;
   MEDCouplingMesh *ret1=fieldCells->buildSubMeshData(elts,elts+3,di);
   CPPUNIT_ASSERT_EQUAL(3,(int)ret1->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(9,ret1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(9,(int)ret1->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)di->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)di->getNumberOfComponents());
-  const int *toCheck=di->getConstPointer();
+  const mcIdType *toCheck=di->getConstPointer();
   CPPUNIT_ASSERT(std::equal(elts,elts+3,toCheck));
   MEDCouplingUMesh *ret1DC=dynamic_cast<MEDCouplingUMesh *>(ret1);
   CPPUNIT_ASSERT(ret1DC);
@@ -962,11 +963,11 @@ void MEDCouplingBasicsTest1::testBuildSubMeshData()
   MEDCouplingUMesh *ret2DC=dynamic_cast<MEDCouplingUMesh *>(ret2);
   CPPUNIT_ASSERT(ret2DC);
   CPPUNIT_ASSERT_EQUAL(3,(int)ret2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(6,ret2->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(6,(int)ret2->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(6,(int)di->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)di->getNumberOfComponents());
   toCheck=di->getConstPointer();
-  const int expected[6]={1,2,4,5,7,8};
+  const mcIdType expected[6]={1,2,4,5,7,8};
   CPPUNIT_ASSERT(std::equal(expected,expected+6,toCheck));
   ret2->decrRef();
   di->decrRef();
@@ -980,24 +981,24 @@ void MEDCouplingBasicsTest1::testExtrudedMesh1()
   MEDCouplingUMesh *mesh3D=build3DExtrudedUMesh_1(mesh2D);
   MEDCouplingMappedExtrudedMesh *ext=MEDCouplingMappedExtrudedMesh::New(mesh3D,mesh2D,1);
   CPPUNIT_ASSERT_EQUAL(18,(int)ext->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(60,ext->getNumberOfNodes());
-  DataArrayInt *ids3D=ext->getMesh3DIds();
-  const int ids3DExpected[18]={5,4,3,2,1,0, 11,10,9,8,7,6, 17,16,15,14,13,12};
+  CPPUNIT_ASSERT_EQUAL(60,(int)ext->getNumberOfNodes());
+  DataArrayIdType *ids3D=ext->getMesh3DIds();
+  const mcIdType ids3DExpected[18]={5,4,3,2,1,0, 11,10,9,8,7,6, 17,16,15,14,13,12};
   CPPUNIT_ASSERT_EQUAL(18,(int)ids3D->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)ids3D->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(ids3DExpected,ids3DExpected+18,ids3D->getConstPointer()));
   MEDCouplingUMesh *mesh1D=ext->getMesh1D();
-  CPPUNIT_ASSERT_EQUAL(4,mesh1D->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(4,(int)mesh1D->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)mesh1D->getNumberOfCells());
   const double mesh1DExpected[12]={0.66666666666666663, 1.4583333333333333, 0, 0.66666666666666663, 1.4583333333333333, 1, 0.66666666666666663, 1.4583333333333333, 2, 0.66666666666666663, 1.4583333333333333, 3};
   DataArrayDouble *mesh1DCoords=mesh1D->getCoords();
   CPPUNIT_ASSERT_EQUAL(4,(int)mesh1DCoords->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(3,(int)mesh1DCoords->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(mesh1DExpected,mesh1DExpected+12,mesh1DCoords->getConstPointer()));
-  DataArrayInt *conn1D=mesh1D->getNodalConnectivity();
+  DataArrayIdType *conn1D=mesh1D->getNodalConnectivity();
   CPPUNIT_ASSERT_EQUAL(9,(int)conn1D->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)conn1D->getNumberOfComponents());
-  const int conn1DExpected[9]={1,0,1,1,1,2,1,2,3};
+  const mcIdType conn1DExpected[9]={1,0,1,1,1,2,1,2,3};
   CPPUNIT_ASSERT(std::equal(conn1DExpected,conn1DExpected+9,conn1D->getConstPointer()));
   ext->decrRef();
   mesh3D->decrRef();
@@ -1010,11 +1011,11 @@ void MEDCouplingBasicsTest1::testExtrudedMesh2()
   build3DExtrudedUMesh_2(mN,mTT,mTF);
   //
   bool b=false;
-  int newNbOfNodes;
-  DataArrayInt *da=mTT->mergeNodes(1e-12,b,newNbOfNodes);
+  mcIdType newNbOfNodes;
+  DataArrayIdType *da=mTT->mergeNodes(1e-12,b,newNbOfNodes);
   CPPUNIT_ASSERT(b);
   da->decrRef();
-  std::vector<int> n;
+  std::vector<mcIdType> n;
   double pt[3]={300.,300.,0.};
   double v[3]={0.,0.,2.};
   mTT->findNodesOnPlane(pt,v,1e-12,n);
@@ -1081,12 +1082,12 @@ void MEDCouplingBasicsTest1::testExtrudedMesh3()
   CPPUNIT_ASSERT_EQUAL(15,(int)m4->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(5,(int)m4->getMesh2D()->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(3,(int)m4->getMesh1D()->getNumberOfCells());
-  const int *m3DIds=m4->getMesh3DIds()->getConstPointer();
-  for(int i=0;i<15;i++)
+  const mcIdType *m3DIds=m4->getMesh3DIds()->getConstPointer();
+  for(mcIdType i=0;i<15;i++)
     CPPUNIT_ASSERT_EQUAL(i,m3DIds[i]);
   m4->decrRef();
   //some random in cells to check that extrusion alg find it correctly
-  const int expected1[15]={1,3,2,0,6,5,7,10,11,8,12,9,14,13,4};
+  const mcIdType expected1[15]={1,3,2,0,6,5,7,10,11,8,12,9,14,13,4};
   m3->renumberCells(expected1,false);
   m4=MEDCouplingMappedExtrudedMesh::New(m3,m1,0);
   CPPUNIT_ASSERT_EQUAL(15,(int)m4->getNumberOfCells());
@@ -1098,7 +1099,7 @@ void MEDCouplingBasicsTest1::testExtrudedMesh3()
   m4->decrRef();
   m3->decrRef();
   //play with polygons and polyedrons
-  std::vector<int> cells(2); cells[0]=2; cells[1]=3;
+  std::vector<mcIdType> cells(2); cells[0]=2; cells[1]=3;
   m1->convertToPolyTypes(&cells[0],&cells[0]+cells.size());
   m3=m1->buildExtrudedMesh(m2,0);
   CPPUNIT_ASSERT_EQUAL((int)INTERP_KERNEL::NORM_HEXA8,(int)m3->getTypeOfCell(0));
@@ -1128,7 +1129,7 @@ void MEDCouplingBasicsTest1::testExtrudedMesh3()
 void MEDCouplingBasicsTest1::testExtrudedMesh4()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
-  std::vector<int> cells(2); cells[0]=2; cells[1]=4;
+  std::vector<mcIdType> cells(2); cells[0]=2; cells[1]=4;
   m1->convertToPolyTypes(&cells[0],&cells[0]+cells.size());
   m1->changeSpaceDimension(3);
   MEDCouplingUMesh *m2=buildCU1DMesh_U();
@@ -1138,8 +1139,8 @@ void MEDCouplingBasicsTest1::testExtrudedMesh4()
   m2->rotate(center,vector,-M_PI/2.);
   m1->zipCoords();
   MEDCouplingUMesh *m3=m1->buildExtrudedMesh(m2,0);
-  const int expected1[15]= {1,3,2,0,6,5,7,10,11,8,12,9,14,13,4};
-  const int rexpected1[15]={3, 0, 2, 1, 14, 5, 4, 6, 9, 11, 7, 8, 10, 13, 12};
+  const mcIdType expected1[15]= {1,3,2,0,6,5,7,10,11,8,12,9,14,13,4};
+  const mcIdType rexpected1[15]={3, 0, 2, 1, 14, 5, 4, 6, 9, 11, 7, 8, 10, 13, 12};
   m3->renumberCells(expected1,false);
   MEDCouplingMappedExtrudedMesh *m4=MEDCouplingMappedExtrudedMesh::New(m3,m1,0);
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_HEXA8,m4->getTypeOfCell(0));
@@ -1174,16 +1175,16 @@ void MEDCouplingBasicsTest1::testExtrudedMesh4()
 
 void MEDCouplingBasicsTest1::testFindCommonNodes()
 {
-  DataArrayInt *comm,*commI;
+  DataArrayIdType *comm,*commI;
   MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
   targetMesh->findCommonNodes(1e-10,-1,comm,commI);
   CPPUNIT_ASSERT_EQUAL(1,(int)commI->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,(int)comm->getNumberOfTuples());
-  int newNbOfNodes;
-  DataArrayInt *o2n=targetMesh->buildNewNumberingFromCommonNodesFormat(comm,commI,newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL(27,newNbOfNodes);
+  mcIdType newNbOfNodes;
+  DataArrayIdType *o2n=targetMesh->buildNewNumberingFromCommonNodesFormat(comm,commI,newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(27,(int)newNbOfNodes);
   CPPUNIT_ASSERT_EQUAL(27,(int)o2n->getNumberOfTuples());
-  const int o2nExp1[27]=
+  const mcIdType o2nExp1[27]=
     {
       0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
       21,22,23,24,25,26
@@ -1195,18 +1196,18 @@ void MEDCouplingBasicsTest1::testFindCommonNodes()
   targetMesh->decrRef();
   //
   targetMesh=build3DTargetMeshMergeNode_1();
-  CPPUNIT_ASSERT_EQUAL(31,targetMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(31,(int)targetMesh->getNumberOfNodes());
   targetMesh->findCommonNodes(1e-10,-1,comm,commI);
   CPPUNIT_ASSERT_EQUAL(3,(int)commI->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(6,(int)comm->getNumberOfTuples());
-  const int commExpected[6]={1,27,28,29,23,30};
-  const int commIExpected[3]={0,4,6};
+  const mcIdType commExpected[6]={1,27,28,29,23,30};
+  const mcIdType commIExpected[3]={0,4,6};
   CPPUNIT_ASSERT(std::equal(commExpected,commExpected+6,comm->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(commIExpected,commIExpected+3,commI->getConstPointer()));
   o2n=targetMesh->buildNewNumberingFromCommonNodesFormat(comm,commI,newNbOfNodes);
   CPPUNIT_ASSERT_EQUAL(31,(int)o2n->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(27,newNbOfNodes);
-  const int o2nExp2[31]=
+  CPPUNIT_ASSERT_EQUAL(27,(int)newNbOfNodes);
+  const mcIdType o2nExp2[31]=
     {
       0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
       21,22,23,24,25,26,1,1,1,23
@@ -1219,7 +1220,7 @@ void MEDCouplingBasicsTest1::testFindCommonNodes()
   //
   targetMesh=build3DTargetMesh_1();
   bool areNodesMerged;
-  unsigned int time=targetMesh->getTimeOfThis();
+  std::size_t time=targetMesh->getTimeOfThis();
   o2n=targetMesh->mergeNodes(1e-10,areNodesMerged,newNbOfNodes);
   targetMesh->updateTime();
   CPPUNIT_ASSERT(time==targetMesh->getTimeOfThis());
@@ -1233,7 +1234,7 @@ void MEDCouplingBasicsTest1::testFindCommonNodes()
   targetMesh->updateTime();
   CPPUNIT_ASSERT(time!=targetMesh->getTimeOfThis());
   CPPUNIT_ASSERT(areNodesMerged);
-  int connExp[72]={18,0,1,4,3,9,10,13,12, 18,1,2,5,4,10,11,14,13, 18,3,4,7,6,12,13,16,15,
+  mcIdType connExp[72]={18,0,1,4,3,9,10,13,12, 18,1,2,5,4,10,11,14,13, 18,3,4,7,6,12,13,16,15,
                    18,4,5,8,7,13,14,17,16,
                    18,9,10,13,12,18,19,22,21, 18,10,11,14,13,19,20,23,22, 18,12,13,16,15,21,22,25,24,
                    18,13,14,17,16,22,23,26,25};
@@ -1252,13 +1253,13 @@ void MEDCouplingBasicsTest1::testFindCommonNodes()
   o2n->decrRef();
   //2D
   targetMesh=build2DTargetMeshMergeNode_1();
-  CPPUNIT_ASSERT_EQUAL(18,targetMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(18,(int)targetMesh->getNumberOfNodes());
   time=targetMesh->getTimeOfThis();
   o2n=targetMesh->mergeNodes(1e-10,areNodesMerged,newNbOfNodes);
   CPPUNIT_ASSERT(time!=targetMesh->getTimeOfThis());
   CPPUNIT_ASSERT(areNodesMerged);
-  CPPUNIT_ASSERT_EQUAL(9,targetMesh->getNumberOfNodes());
-  int connExp2[23]={4,0,4,3,1, 3,1,3,2, 3,3,5,2, 4,4,6,7,3, 4,7,8,5,3};
+  CPPUNIT_ASSERT_EQUAL(9,(int)targetMesh->getNumberOfNodes());
+  mcIdType connExp2[23]={4,0,4,3,1, 3,1,3,2, 3,3,5,2, 4,4,6,7,3, 4,7,8,5,3};
   CPPUNIT_ASSERT_EQUAL(23,(int)targetMesh->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(connExp2,connExp2+23,targetMesh->getNodalConnectivity()->getConstPointer()));
   double coordsExp2[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, 0.2,0.2, -0.3,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7};
@@ -1270,15 +1271,15 @@ void MEDCouplingBasicsTest1::testFindCommonNodes()
 
 void MEDCouplingBasicsTest1::testCheckButterflyCells()
 {
-  std::vector<int> cells;
+  std::vector<mcIdType> cells;
   MEDCouplingUMesh *sourceMesh=build2DTargetMesh_1();
   sourceMesh->checkButterflyCells(cells);
   CPPUNIT_ASSERT(cells.empty());
-  int *pt=sourceMesh->getNodalConnectivity()->getPointer();
+  mcIdType *pt=sourceMesh->getNodalConnectivity()->getPointer();
   std::swap(pt[15],pt[16]);
   sourceMesh->checkButterflyCells(cells);
   CPPUNIT_ASSERT_EQUAL(1,(int)cells.size());
-  CPPUNIT_ASSERT_EQUAL(3,cells[0]);
+  CPPUNIT_ASSERT_EQUAL(3,(int)cells[0]);
   cells.clear();
   std::swap(pt[15],pt[16]);
   sourceMesh->checkButterflyCells(cells);
@@ -1292,7 +1293,7 @@ void MEDCouplingBasicsTest1::testCheckButterflyCells()
   std::swap(pt[15],pt[16]);
   sourceMesh->checkButterflyCells(cells);
   CPPUNIT_ASSERT_EQUAL(1,(int)cells.size());
-  CPPUNIT_ASSERT_EQUAL(3,cells[0]);
+  CPPUNIT_ASSERT_EQUAL(3,(int)cells[0]);
   cells.clear();
   std::swap(pt[15],pt[16]);
   sourceMesh->checkButterflyCells(cells);
@@ -1314,10 +1315,10 @@ void MEDCouplingBasicsTest1::testMergeMesh1()
   CPPUNIT_ASSERT(m3->isEqual(m4,1.e-12));
   m4->decrRef();
   bool isMerged;
-  int newNbOfNodes;
-  DataArrayInt *da=m3C->mergeNodes(1.e-12,isMerged,newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL(11,m3C->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL(11,newNbOfNodes);
+  mcIdType newNbOfNodes;
+  DataArrayIdType *da=m3C->mergeNodes(1.e-12,isMerged,newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(11,(int)m3C->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(11,(int)newNbOfNodes);
   CPPUNIT_ASSERT(isMerged);
   da->decrRef();
   m3->decrRef();
@@ -1329,7 +1330,7 @@ void MEDCouplingBasicsTest1::testMergeMeshOnSameCoords1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
   MEDCouplingUMesh *m2=build2DTargetMesh_1();
-  std::vector<int> cells(5);
+  std::vector<mcIdType> cells(5);
   for(int i=0;i<5;i++)
     cells[i]=i;
   m2->convertToPolyTypes(&cells[0],&cells[0]+cells.size());
@@ -1342,15 +1343,15 @@ void MEDCouplingBasicsTest1::testMergeMeshOnSameCoords1()
   m4->checkConsistencyLight();
   CPPUNIT_ASSERT(m4->getCoords()==m1->getCoords());
   CPPUNIT_ASSERT_EQUAL(15,(int)m4->getNumberOfCells());
-  const int cells1[5]={0,1,2,3,4};
+  const mcIdType cells1[5]={0,1,2,3,4};
   MEDCouplingPointSet *m1_1=m4->buildPartOfMySelf(cells1,cells1+5,true);
   m1_1->setName(m1->getName().c_str());
   CPPUNIT_ASSERT(m1->isEqual(m1_1,1e-12));
-  const int cells2[5]={5,6,7,8,9};
+  const mcIdType cells2[5]={5,6,7,8,9};
   MEDCouplingPointSet *m2_1=m4->buildPartOfMySelf(cells2,cells2+5,true);
   m2_1->setName(m2->getName().c_str());
   CPPUNIT_ASSERT(m2->isEqual(m2_1,1e-12));
-  const int cells3[5]={10,11,12,13,14};
+  const mcIdType cells3[5]={10,11,12,13,14};
   MEDCouplingPointSet *m3_1=m4->buildPartOfMySelf(cells3,cells3+5,true);
   m3_1->setName(m3->getName().c_str());
   CPPUNIT_ASSERT(m3->isEqual(m3_1,1e-12));
@@ -1818,7 +1819,7 @@ void MEDCouplingBasicsTest1::testOperationsOnFields3()
 void MEDCouplingBasicsTest1::testOperationsOnFields4()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_CELLS,CONST_ON_TIME_INTERVAL);
   f1->setMesh(m);
   DataArrayDouble *array=DataArrayDouble::New();
@@ -1953,19 +1954,19 @@ void MEDCouplingBasicsTest1::testCheckConsecutiveCellTypes()
   CPPUNIT_ASSERT(!targetMesh->checkConsecutiveCellTypes());
   CPPUNIT_ASSERT(!targetMesh->checkConsecutiveCellTypesAndOrder(order1,order1+2));
   CPPUNIT_ASSERT(!targetMesh->checkConsecutiveCellTypesAndOrder(order2,order2+2));
-  DataArrayInt *da=targetMesh->getRenumArrForConsecutiveCellTypesSpec(order1,order1+2);
+  DataArrayIdType *da=targetMesh->getRenumArrForConsecutiveCellTypesSpec(order1,order1+2);
   CPPUNIT_ASSERT_EQUAL(5,(int)da->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
-  const int expected1[5]={2,0,1,3,4};
+  const mcIdType expected1[5]={2,0,1,3,4};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+5,da->getConstPointer()));
   da->decrRef();
   da=targetMesh->getRenumArrForConsecutiveCellTypesSpec(order2,order2+2);
   CPPUNIT_ASSERT_EQUAL(5,(int)da->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
-  const int expected2[5]={0,3,4,1,2};
+  const mcIdType expected2[5]={0,3,4,1,2};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+5,da->getConstPointer()));
   da->decrRef();
-  const int renumber1[5]={4,0,1,2,3};
+  const mcIdType renumber1[5]={4,0,1,2,3};
   targetMesh->renumberCells(renumber1,false);
   CPPUNIT_ASSERT(targetMesh->checkConsecutiveCellTypes());
   CPPUNIT_ASSERT(targetMesh->checkConsecutiveCellTypesAndOrder(order1,order1+2));
@@ -1978,15 +1979,15 @@ void MEDCouplingBasicsTest1::testRearrange2ConsecutiveCellTypes()
 {
   MEDCouplingUMesh *m1_1=build2DSourceMesh_1();
   MEDCouplingUMesh *m2_1=build2DTargetMesh_1();
-  DataArrayInt *arr1=m1_1->rearrange2ConsecutiveCellTypes();
+  DataArrayIdType *arr1=m1_1->rearrange2ConsecutiveCellTypes();
   MEDCouplingUMesh *m1_2=build2DSourceMesh_1();
   CPPUNIT_ASSERT(m1_2->isEqual(m1_1,1e-12));
-  const int expected1[2]={0,1};
+  const mcIdType expected1[2]={0,1};
   CPPUNIT_ASSERT_EQUAL(2,(int)arr1->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)arr1->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+2,arr1->getConstPointer()));
   arr1->decrRef();
-  const int expected2[5]={0,3,4,1,2};
+  const mcIdType expected2[5]={0,3,4,1,2};
   arr1=m2_1->rearrange2ConsecutiveCellTypes();
   CPPUNIT_ASSERT_EQUAL(5,(int)arr1->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)arr1->getNumberOfComponents());
@@ -2024,55 +2025,55 @@ void MEDCouplingBasicsTest1::testFuseUMeshesOnSameCoords()
 {
   std::vector<const MEDCouplingUMesh *> meshes;
   MEDCouplingUMesh *m2=build2DTargetMesh_1();
-  int cells1[3]={2,3,4};
+  mcIdType cells1[3]={2,3,4};
   MEDCouplingPointSet *m3_1=m2->buildPartOfMySelf(cells1,cells1+3,true);
   MEDCouplingUMesh *m3=dynamic_cast<MEDCouplingUMesh *>(m3_1);
   CPPUNIT_ASSERT(m3);
   meshes.push_back(m3);
-  int cells2[3]={1,2,4};
+  mcIdType cells2[3]={1,2,4};
   MEDCouplingPointSet *m4_1=m2->buildPartOfMySelf(cells2,cells2+3,true);
   MEDCouplingUMesh *m4=dynamic_cast<MEDCouplingUMesh *>(m4_1);
   CPPUNIT_ASSERT(m4);
   meshes.push_back(m4);
-  int cells3[2]={1,2};
+  mcIdType cells3[2]={1,2};
   MEDCouplingPointSet *m5_1=m2->buildPartOfMySelf(cells3,cells3+2,true);
   MEDCouplingUMesh *m5=dynamic_cast<MEDCouplingUMesh *>(m5_1);
   CPPUNIT_ASSERT(m5);
   meshes.push_back(m5);
   m2->decrRef();
   //
-  std::vector<DataArrayInt *> corr;
+  std::vector<DataArrayIdType *> corr;
   MEDCouplingUMesh *m7=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,0,corr);
   CPPUNIT_ASSERT_EQUAL(4,(int)m7->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(3,(int)corr.size());
-  const int expectedVals1[3]={3,3,2};
-  const int expectedVals2[3][3]={{0,1,2},{3,0,2},{3,0,111111}};
+  const mcIdType expectedVals1[3]={3,3,2};
+  const mcIdType expectedVals2[3][3]={{0,1,2},{3,0,2},{3,0,111111}};
   for(int i=0;i<3;i++)
     {
-      DataArrayInt *arr=corr[i];
+      DataArrayIdType *arr=corr[i];
       CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents());
-      int nbOfVals=expectedVals1[i];
-      CPPUNIT_ASSERT_EQUAL(nbOfVals,(int)arr->getNumberOfTuples());
-      const int *vals=arr->getConstPointer();
-      for(int j=0;j<nbOfVals;j++)
+      mcIdType nbOfVals=expectedVals1[i];
+      CPPUNIT_ASSERT_EQUAL(nbOfVals,arr->getNumberOfTuples());
+      const mcIdType *vals=arr->getConstPointer();
+      for(mcIdType j=0;j<nbOfVals;j++)
         CPPUNIT_ASSERT_EQUAL(expectedVals2[i][j],vals[j]);
     }
-  std::vector< std::vector<int> > fidsOfGroups;
-  std::vector<const DataArrayInt *> corr2(corr.begin(),corr.end());
-  DataArrayInt *arr2=DataArrayInt::MakePartition(corr2,m7->getNumberOfCells(),fidsOfGroups);
-  const int fidExp[4]={5,1,3,4};
-  const int fidsGrp[3][3]={{1,3,5},{3,4,5},{4,5,23344}};
+  std::vector< std::vector<mcIdType> > fidsOfGroups;
+  std::vector<const DataArrayIdType *> corr2(corr.begin(),corr.end());
+  DataArrayIdType *arr2=DataArrayIdType::MakePartition(corr2,m7->getNumberOfCells(),fidsOfGroups);
+  const mcIdType fidExp[4]={5,1,3,4};
+  const mcIdType fidsGrp[3][3]={{1,3,5},{3,4,5},{4,5,23344}};
   CPPUNIT_ASSERT_EQUAL(3,(int)fidsOfGroups.size());
   CPPUNIT_ASSERT_EQUAL(1,(int)arr2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(4,(int)arr2->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(fidExp,fidExp+4,arr2->getConstPointer()));
   for(int i=0;i<3;i++)
     {
-      int nbOfVals=expectedVals1[i];
-      CPPUNIT_ASSERT_EQUAL(nbOfVals,(int)fidsOfGroups[i].size());
+      mcIdType nbOfVals=expectedVals1[i];
+      CPPUNIT_ASSERT_EQUAL(nbOfVals,ToIdType(fidsOfGroups[i].size()));
       CPPUNIT_ASSERT(std::equal(fidsOfGroups[i].begin(),fidsOfGroups[i].end(),fidsGrp[i]));
     }
-  for(std::vector<DataArrayInt *>::iterator iter=corr.begin();iter!=corr.end();iter++)
+  for(std::vector<DataArrayIdType *>::iterator iter=corr.begin();iter!=corr.end();iter++)
     (*iter)->decrRef();
   arr2->decrRef();
   m7->decrRef();
@@ -2087,21 +2088,21 @@ void MEDCouplingBasicsTest1::testFuseUMeshesOnSameCoords2()
   MEDCouplingUMesh *m2;
   MEDCouplingUMesh *m1=build3DExtrudedUMesh_1(m2);
   m2->decrRef();
-  const int part1[5]={2,3,6,4,10};
+  const mcIdType part1[5]={2,3,6,4,10};
   MEDCouplingUMesh *m3=(MEDCouplingUMesh *)m1->buildPartOfMySelf(part1,part1+5,true);
-  const int part2[4]={5,6,4,7};
+  const mcIdType part2[4]={5,6,4,7};
   MEDCouplingUMesh *m4=(MEDCouplingUMesh *)m1->buildPartOfMySelf(part2,part2+4,true);
   std::vector<const MEDCouplingUMesh *> meshes;
   meshes.push_back(m1);
   meshes.push_back(m3);
   meshes.push_back(m3);
   meshes.push_back(m4);
-  std::vector<DataArrayInt *> corr;
+  std::vector<DataArrayIdType *> corr;
   MEDCouplingUMesh *m5=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,0,corr);
   CPPUNIT_ASSERT_EQUAL(18,(int)m5->getNumberOfCells());
-  std::vector<DataArrayInt *>::iterator it=corr.begin();
-  const int exp1[4]={18,5,5,4};
-  const int exp2[4][18]={
+  std::vector<DataArrayIdType *>::iterator it=corr.begin();
+  const mcIdType exp1[4]={18,5,5,4};
+  const mcIdType exp2[4][18]={
     {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17},
     {2,3,6,4,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
     {2,3,6,4,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
@@ -2110,7 +2111,7 @@ void MEDCouplingBasicsTest1::testFuseUMeshesOnSameCoords2()
   int i=0;
   for(;it!=corr.end();it++,i++)
     {
-      int sz=(*it)->getNumberOfTuples();
+      mcIdType sz=(*it)->getNumberOfTuples();
       CPPUNIT_ASSERT_EQUAL(exp1[i],sz);
       CPPUNIT_ASSERT(std::equal(exp2[i],exp2[i]+sz,(*it)->getConstPointer()));
     }
@@ -2136,7 +2137,7 @@ void MEDCouplingBasicsTest1::testBuildOrthogonalField()
   targetMesh->decrRef();
   // testing 
   double targetCoords[12]={0.,0.,0.,0.5,0.,0.5,1.,0.,1.,0.,1.,0.};
-  int targetConn[4]={0,1,2,3};
+  mcIdType targetConn[4]={0,1,2,3};
   targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(1);
@@ -2162,13 +2163,13 @@ void MEDCouplingBasicsTest1::testGetCellsContainingPoint()
 {
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   double pos[12]={0.,0.,0.4,0.4,0.,0.4,0.1,0.1,0.25,0.,0.65,0.};
-  MCAuto<DataArrayInt> t1,t2;
+  MCAuto<DataArrayIdType> t1,t2;
   //2D basic
   targetMesh->getCellsContainingPoints(pos,6,1e-12,t1,t2);
   CPPUNIT_ASSERT_EQUAL(6,(int)t1->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(7,(int)t2->getNbOfElems());
-  const int expectedValues1[6]={0,4,3,0,1,2};
-  const int expectedValues2[7]={0,1,2,3,4,5,6};
+  const mcIdType expectedValues1[6]={0,4,3,0,1,2};
+  const mcIdType expectedValues2[7]={0,1,2,3,4,5,6};
   CPPUNIT_ASSERT(std::equal(t1->begin(),t1->end(),expectedValues1));
   CPPUNIT_ASSERT(std::equal(t2->begin(),t2->end(),expectedValues2));
   //2D with no help of bounding box.
@@ -2182,50 +2183,50 @@ void MEDCouplingBasicsTest1::testGetCellsContainingPoint()
   CPPUNIT_ASSERT(std::equal(t2->begin(),t2->end(),expectedValues2));
   //2D outside
   const double pos1bis[2]={-0.3303300858899107,-0.11819805153394641};
-  CPPUNIT_ASSERT_EQUAL(-1,targetMesh->getCellContainingPoint(pos1bis,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(-1),targetMesh->getCellContainingPoint(pos1bis,1e-12));
   targetMesh->decrRef();
   //test limits 2D
   targetMesh=build2DTargetMesh_1();
   const double pos2[2]={0.2,-0.05};
-  std::vector<int> t11;
+  std::vector<mcIdType> t11;
   t11.clear();
   targetMesh->getCellsContainingPoint(pos2,1e-12,t11);
   CPPUNIT_ASSERT_EQUAL(2,(int)t11.size());
-  const int expectedValues3[2]={0,1};
+  const mcIdType expectedValues3[2]={0,1};
   CPPUNIT_ASSERT(std::equal(t11.begin(),t11.end(),expectedValues3));
   const double pos3[2]={0.2,0.2};
   t11.clear();
   targetMesh->getCellsContainingPoint(pos3,1e-12,t11);
   CPPUNIT_ASSERT_EQUAL(5,(int)t11.size());
-  const int expectedValues4[5]={0,1,2,3,4};
+  const mcIdType expectedValues4[5]={0,1,2,3,4};
   CPPUNIT_ASSERT(std::equal(t11.begin(),t11.end(),expectedValues4));
-  CPPUNIT_ASSERT_EQUAL(0,targetMesh->getCellContainingPoint(pos3,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),targetMesh->getCellContainingPoint(pos3,1e-12));
   targetMesh->decrRef();
   //3D
   targetMesh=build3DTargetMesh_1();
   const double pos4[3]={25.,25.,25.};
-  CPPUNIT_ASSERT_EQUAL(0,targetMesh->getCellContainingPoint(pos4,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),targetMesh->getCellContainingPoint(pos4,1e-12));
   const double pos5[3]={50.,50.,50.};
   t11.clear();
   targetMesh->getCellsContainingPoint(pos5,1e-12,t11);
   CPPUNIT_ASSERT_EQUAL(8,(int)t11.size());
-  const int expectedValues5[8]={0,1,2,3,4,5,6,7};
+  const mcIdType expectedValues5[8]={0,1,2,3,4,5,6,7};
   CPPUNIT_ASSERT(std::equal(t11.begin(),t11.end(),expectedValues5));
   const double pos6[3]={0., 50., 0.};
   t11.clear();
   targetMesh->getCellsContainingPoint(pos6,1e-12,t11);
   CPPUNIT_ASSERT_EQUAL(2,(int)t11.size());
-  const int expectedValues6[2]={0,2};
+  const mcIdType expectedValues6[2]={0,2};
   CPPUNIT_ASSERT(std::equal(t11.begin(),t11.end(),expectedValues6));
   //3D outside
   const double pos7[3]={-1.0,-1.0,0.};
-  CPPUNIT_ASSERT_EQUAL(-1,targetMesh->getCellContainingPoint(pos7,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(-1),targetMesh->getCellContainingPoint(pos7,1e-12));
   //3D outside 2
   const double center2[3]={0.,0.,0.};
   const double vec2[3]={0.,-1.,0.};
   targetMesh->rotate(center2,vec2,0.78539816339744830962);
   const double pos8[3]={-25,25.,12.};
-  CPPUNIT_ASSERT_EQUAL(-1,targetMesh->getCellContainingPoint(pos8,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(-1),targetMesh->getCellContainingPoint(pos8,1e-12));
   //
   targetMesh->decrRef();
 }
@@ -2234,13 +2235,13 @@ void MEDCouplingBasicsTest1::testGetValueOn1()
 {
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   MEDCouplingFieldDouble *fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS);
-  int nbOfCells=targetMesh->getNumberOfCells();
+  std::size_t nbOfCells=targetMesh->getNumberOfCells();
   fieldOnCells->setMesh(targetMesh);
   DataArrayDouble *array=DataArrayDouble::New();
   array->alloc(nbOfCells,2);
   fieldOnCells->setArray(array);
   double *tmp=array->getPointer();
-  for(int i=0;i<nbOfCells;i++)
+  for(std::size_t i=0;i<nbOfCells;i++)
     { tmp[2*i]=7.+(double)i; tmp[2*i+1]=17.+(double)i; }
   array->decrRef();
   //
@@ -2255,7 +2256,7 @@ void MEDCouplingBasicsTest1::testGetValueOn1()
   //
   targetMesh=build2DSourceMesh_1();
   MEDCouplingFieldDouble *fieldOnNodes=MEDCouplingFieldDouble::New(ON_NODES);
-  int nbOfNodes=targetMesh->getNumberOfNodes();
+  mcIdType nbOfNodes=targetMesh->getNumberOfNodes();
   fieldOnNodes->setMesh(targetMesh);
   array=DataArrayDouble::New();
   array->alloc(nbOfNodes,2);
@@ -2454,38 +2455,38 @@ void MEDCouplingBasicsTest1::testCMesh2()
   coordsZ1->useArray(arrZ1,false, DeallocType::CPP_DEALLOC,4,1);
   mesh1->setCoords(coordsX1,coordsY1,coordsZ1);
   
-  std::vector<int> dis=mesh1->getDistributionOfTypes();
+  std::vector<mcIdType> dis=mesh1->getDistributionOfTypes();
   CPPUNIT_ASSERT_EQUAL(3,(int) dis.size());
-  CPPUNIT_ASSERT_EQUAL((int) INTERP_KERNEL::NORM_HEXA8,dis[0]);
-  CPPUNIT_ASSERT_EQUAL(27,dis[1]);
-  CPPUNIT_ASSERT_EQUAL(-1,dis[2]);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(INTERP_KERNEL::NORM_HEXA8),dis[0]);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(27),dis[1]);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(-1),dis[2]);
   
-  std::vector<const DataArrayInt *> idsPerType;
+  std::vector<const DataArrayIdType *> idsPerType;
   CPPUNIT_ASSERT(!(mesh1->checkTypeConsistencyAndContig(dis, idsPerType)));
-  dis[0]=(int) INTERP_KERNEL::NORM_QUAD4;
+  dis[0]=(mcIdType) INTERP_KERNEL::NORM_QUAD4;
   CPPUNIT_ASSERT_THROW(mesh1->checkTypeConsistencyAndContig(dis, idsPerType),INTERP_KERNEL::Exception);
   
-  dis[0]=(int) INTERP_KERNEL::NORM_HEXA8;
+  dis[0]=(mcIdType) INTERP_KERNEL::NORM_HEXA8;
   dis[2]=0;
-  DataArrayInt *ids=DataArrayInt::New();
+  DataArrayIdType *ids=DataArrayIdType::New();
   ids->alloc(10,1);
   ids->fillWithValue(23);
   idsPerType.push_back(ids);
-  DataArrayInt* check=mesh1->checkTypeConsistencyAndContig(dis, idsPerType);
+  DataArrayIdType* check=mesh1->checkTypeConsistencyAndContig(dis, idsPerType);
   CPPUNIT_ASSERT(check);
   CPPUNIT_ASSERT(check->isEqual(*ids));
   
-  std::vector<int> code;
-  std::vector<DataArrayInt *> idsInPflPerType;
-  std::vector<DataArrayInt *> pfls;
+  std::vector<mcIdType> code;
+  std::vector<DataArrayIdType *> idsInPflPerType;
+  std::vector<DataArrayIdType *> pfls;
   mesh1->splitProfilePerType(ids,code,idsInPflPerType,pfls);
   CPPUNIT_ASSERT_EQUAL(3,(int)code.size());
-  CPPUNIT_ASSERT_EQUAL((int) INTERP_KERNEL::NORM_HEXA8,code[0]);
-  CPPUNIT_ASSERT_EQUAL(10,code[1]);
-  CPPUNIT_ASSERT_EQUAL(0,code[2]);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(INTERP_KERNEL::NORM_HEXA8),code[0]);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),code[1]);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),code[2]);
   CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType.size());
   CPPUNIT_ASSERT_EQUAL(1,(int)pfls.size());
-  DataArrayInt *exp=DataArrayInt::New(); exp->alloc(10,1); exp->iota(0);
+  DataArrayIdType *exp=DataArrayIdType::New(); exp->alloc(10,1); exp->iota(0);
   CPPUNIT_ASSERT(idsInPflPerType[0]->isEqual(*exp));
   exp->decrRef();
   CPPUNIT_ASSERT(pfls[0]->isEqual(*ids));
@@ -2494,29 +2495,29 @@ void MEDCouplingBasicsTest1::testCMesh2()
 
   ids->decrRef();
   check->decrRef();
-  int cells1[4]={0,1,25,26};
+  mcIdType cells1[4]={0,1,25,26};
   MEDCouplingUMesh *partMesh1=
     dynamic_cast<MEDCouplingUMesh *>(mesh1->buildPart(cells1,cells1+4));
   CPPUNIT_ASSERT(partMesh1);
   CPPUNIT_ASSERT_EQUAL(4,(int)partMesh1->getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8));
-  CPPUNIT_ASSERT_EQUAL(64,mesh1->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL(64,partMesh1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(64,(int)mesh1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(64,(int)partMesh1->getNumberOfNodes());
   
-  int cells2[2]={25,26};
-  DataArrayInt* arr1;
+  mcIdType cells2[2]={25,26};
+  DataArrayIdType* arr1;
   MEDCouplingCMesh *partMesh2=
     dynamic_cast<MEDCouplingCMesh *>(mesh1->buildPartAndReduceNodes(cells2,cells2+2,arr1));
   CPPUNIT_ASSERT(partMesh2);
   CPPUNIT_ASSERT_EQUAL(2,(int)partMesh2->getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8));
-  CPPUNIT_ASSERT_EQUAL(12,partMesh2->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(12,(int)partMesh2->getNumberOfNodes());
   
-  int cells3[2]={2,3};
-  DataArrayInt* arr2;
+  mcIdType cells3[2]={2,3};
+  DataArrayIdType* arr2;
   MEDCouplingUMesh *partMesh3=
     dynamic_cast<MEDCouplingUMesh *>(partMesh1->buildPartAndReduceNodes(cells3,cells3+2,arr2));
   CPPUNIT_ASSERT(partMesh3);
   CPPUNIT_ASSERT_EQUAL(2,(int)partMesh3->getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8));
-  CPPUNIT_ASSERT_EQUAL(12,partMesh3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(12,(int)partMesh3->getNumberOfNodes());
   
   CPPUNIT_ASSERT_THROW(mesh1->simplexize(0),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(mesh1->getMeasureFieldOnNode(true),INTERP_KERNEL::Exception);
@@ -2538,7 +2539,7 @@ void MEDCouplingBasicsTest1::testCMesh2()
   MEDCouplingFieldDouble *f1=mesh2d->buildOrthogonalField();
   
   std::vector<double> tinyInfoD;
-  std::vector<int> tinyInfo;
+  std::vector<mcIdType> tinyInfo;
   std::vector<std::string> littleStrings;
   mesh2d->getTinySerializationInformation(tinyInfoD, tinyInfo, littleStrings);
   CPPUNIT_ASSERT_EQUAL(5,(int)tinyInfo.size());
@@ -2548,7 +2549,7 @@ void MEDCouplingBasicsTest1::testCMesh2()
   CPPUNIT_ASSERT_EQUAL(-1,(int)tinyInfo[3]);  //it
   CPPUNIT_ASSERT_EQUAL(-1,(int)tinyInfo[4]);   //order
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,tinyInfoD[0],1e-14); //time
-  DataArrayInt* d1=DataArrayInt::New();
+  DataArrayIdType* d1=DataArrayIdType::New();
   DataArrayDouble* d2=DataArrayDouble::New();
   mesh2d->resizeForUnserialization(tinyInfo, d1, d2, littleStrings);
   CPPUNIT_ASSERT_EQUAL(0,(int)d1->getNumberOfTuples());
@@ -2620,17 +2621,17 @@ void MEDCouplingBasicsTest1::testTryToShareSameCoords()
 void MEDCouplingBasicsTest1::testFindNodeOnPlane()
 {
   MEDCouplingUMesh *mesh=build3DTargetMesh_1();
-  std::vector<int> n;
+  std::vector<mcIdType> n;
   double pt[3]={300.,300.,0.};
   double v[3]={0.,0.,2.};
   mesh->findNodesOnPlane(pt,v,1e-12,n);
   CPPUNIT_ASSERT_EQUAL(9,(int)n.size());
   MEDCouplingUMesh *m3dSurf=(MEDCouplingUMesh *)mesh->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true);
   MEDCouplingMappedExtrudedMesh *me=MEDCouplingMappedExtrudedMesh::New(mesh,m3dSurf,0);
-  const DataArrayInt *da=me->getMesh3DIds();
+  const DataArrayIdType *da=me->getMesh3DIds();
   CPPUNIT_ASSERT_EQUAL(8,(int)me->getNumberOfCells());
-  const int expected[8]={0,1,2,3,4,5,6,7};
-  const int *val=da->getConstPointer();
+  const mcIdType expected[8]={0,1,2,3,4,5,6,7};
+  const mcIdType *val=da->getConstPointer();
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_EQUAL(expected[i],val[i]);
   me->decrRef();
@@ -2643,7 +2644,7 @@ void MEDCouplingBasicsTest1::testRenumberCells()
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
   MEDCouplingUMesh *m2=build3DSurfTargetMesh_1();
   CPPUNIT_ASSERT(m->isEqual(m2,0));
-  const int arr[5]={12,3,25,2,26};
+  const mcIdType arr[5]={12,3,25,2,26};
   m->renumberCells(arr,true);
   CPPUNIT_ASSERT(!m->isEqual(m2,0));
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,m->getTypeOfCell(0));
@@ -2651,7 +2652,7 @@ void MEDCouplingBasicsTest1::testRenumberCells()
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,m->getTypeOfCell(2));
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(3));
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,m->getTypeOfCell(4));
-  const int arr2[5]={5,-1,-5,4,8};
+  const mcIdType arr2[5]={5,-1,-5,4,8};
   m->renumberCells(arr2,true);
   CPPUNIT_ASSERT(m->isEqual(m2,0));
   m->decrRef();
@@ -2683,8 +2684,8 @@ void MEDCouplingBasicsTest1::testSetConnectivity()
 {
   MEDCouplingUMesh *m1 = build1DTargetMesh_1();
 
-  DataArrayInt * conn = DataArrayInt::New();
-  DataArrayInt * connI = DataArrayInt::New();
+  DataArrayIdType * conn = DataArrayIdType::New();
+  DataArrayIdType * connI = DataArrayIdType::New();
   m1->setConnectivity(conn, connI, true); // was SEG-Faulting with empty arrays
   conn->decrRef();
   connI->decrRef();
index 8fdca210a010c2eece4baa608d420dd066b0df65..d68ab59fba78dce27ed65dc4154b74011769c18f 100644 (file)
@@ -51,17 +51,17 @@ void MEDCouplingBasicsTest2::testGaussPointField1()
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_GAUSS_PT,NO_TIME);
   CPPUNIT_ASSERT_THROW(f->getNumberOfTuples(), INTERP_KERNEL::Exception); // Sanity check!
   f->setMesh(m);
-  CPPUNIT_ASSERT_EQUAL(5,f->getNumberOfMeshPlacesExpected());
-  CPPUNIT_ASSERT_EQUAL(0,f->getNbOfGaussLocalization());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),f->getNumberOfMeshPlacesExpected());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),f->getNbOfGaussLocalization());
   f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_TRI3,_refCoo1,_gsCoo1,_wg1);
   f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_TRI3,_refCoo1,_gsCoo1,_wg1); // not a bug only to check that it works well
   CPPUNIT_ASSERT_THROW(f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_QUAD4,_refCoo1,_gsCoo1,_wg1),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_EQUAL(1,f->getNbOfGaussLocalization());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),f->getNbOfGaussLocalization());
   const double refCoo2[8]={ 0.,0., 1.,0., 1.,1., 0.,1. };
   std::vector<double> _refCoo2(refCoo2,refCoo2+8);
   _gsCoo1.resize(4); _wg1.resize(2);
   f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_QUAD4,_refCoo2,_gsCoo1,_wg1);
-  CPPUNIT_ASSERT_EQUAL(2,f->getNbOfGaussLocalization());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),f->getNbOfGaussLocalization());
   DataArrayDouble *array=DataArrayDouble::New();
   array->alloc(18,2);
   double *ptr=array->getPointer();
@@ -75,30 +75,30 @@ void MEDCouplingBasicsTest2::testGaussPointField1()
   CPPUNIT_ASSERT_DOUBLES_EQUAL(16.,f->getIJK(1,5,1),1e-14);
   //
   f->clearGaussLocalizations();
-  CPPUNIT_ASSERT_EQUAL(0,f->getNbOfGaussLocalization());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),f->getNbOfGaussLocalization());
   CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);
-  int ids1[4]={0,1,3,4};
+  mcIdType ids1[4]={0,1,3,4};
   CPPUNIT_ASSERT_THROW(f->setGaussLocalizationOnCells(ids1,ids1+4,_refCoo2,_gsCoo1,_wg1),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_EQUAL(0,f->getNbOfGaussLocalization());
-  int ids2[2]={0,4};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),f->getNbOfGaussLocalization());
+  mcIdType ids2[2]={0,4};
   f->setGaussLocalizationOnCells(ids2,ids2+2,_refCoo2,_gsCoo1,_wg1);
-  CPPUNIT_ASSERT_EQUAL(1,f->getNbOfGaussLocalization());
-  CPPUNIT_ASSERT_EQUAL(0,f->getGaussLocalizationIdOfOneCell(0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),f->getNbOfGaussLocalization());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),f->getGaussLocalizationIdOfOneCell(0));
   CPPUNIT_ASSERT_THROW(f->getGaussLocalizationIdOfOneCell(1),INTERP_KERNEL::Exception);
-  int ids3[2]={1,2};
+  mcIdType ids3[2]={1,2};
   f->setGaussLocalizationOnCells(ids3,ids3+2,_refCoo1,_gsCoo1,_wg1);
-  CPPUNIT_ASSERT_EQUAL(2,f->getNbOfGaussLocalization());
-  CPPUNIT_ASSERT_EQUAL(0,f->getGaussLocalizationIdOfOneCell(0));
-  CPPUNIT_ASSERT_EQUAL(1,f->getGaussLocalizationIdOfOneCell(1));
-  CPPUNIT_ASSERT_EQUAL(1,f->getGaussLocalizationIdOfOneCell(2));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),f->getNbOfGaussLocalization());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),f->getGaussLocalizationIdOfOneCell(0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),f->getGaussLocalizationIdOfOneCell(1));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),f->getGaussLocalizationIdOfOneCell(2));
   CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);//<- cell 3 has no localization
-  int ids4[1]={3};
+  mcIdType ids4[1]={3};
   std::vector<double> _gsCoo2(_gsCoo1);
   std::vector<double> _wg2(_wg1);
   _gsCoo2[0]=0.8888777776666; _wg2[0]=0.1234567892377;
   f->setGaussLocalizationOnCells(ids4,ids4+1,_refCoo2,_gsCoo2,_wg2);
-  CPPUNIT_ASSERT_EQUAL(3,f->getNbOfGaussLocalization());
-  std::vector<int> tmpIds;
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),f->getNbOfGaussLocalization());
+  std::vector<mcIdType> tmpIds;
   f->getCellIdsHavingGaussLocalization(0,tmpIds);
   CPPUNIT_ASSERT_EQUAL(2,(int)tmpIds.size());
   CPPUNIT_ASSERT(std::equal(ids2,ids2+2,tmpIds.begin()));
@@ -128,7 +128,7 @@ void MEDCouplingBasicsTest2::testGaussPointNEField1()
   MEDCouplingUMesh *m=build2DTargetMesh_1();
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_GAUSS_NE,NO_TIME);
   f->setMesh(m);
-  CPPUNIT_ASSERT_EQUAL(5,f->getNumberOfMeshPlacesExpected());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),f->getNumberOfMeshPlacesExpected());
   f->setName("MyFirstFieldOnNE");
   f->setDescription("MyDescriptionNE");
   DataArrayDouble *array=DataArrayDouble::New();
@@ -154,7 +154,7 @@ void MEDCouplingBasicsTest2::testCellOrientation1()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
   double vec[3]={0.,0.,-1.};
-  std::vector<int> res1;
+  std::vector<mcIdType> res1;
   CPPUNIT_ASSERT_THROW(m->are2DCellsNotCorrectlyOriented(vec,false,res1),INTERP_KERNEL::Exception);
   m->changeSpaceDimension(3);
   res1.clear();
@@ -167,13 +167,13 @@ void MEDCouplingBasicsTest2::testCellOrientation1()
   //
   vec[2]=-1.;
   // connectivity inversion
-  int *conn=m->getNodalConnectivity()->getPointer();
-  int tmp=conn[11];
+  mcIdType *conn=m->getNodalConnectivity()->getPointer();
+  mcIdType tmp=conn[11];
   conn[11]=conn[12];
   conn[12]=tmp;
   m->are2DCellsNotCorrectlyOriented(vec,false,res1);
   CPPUNIT_ASSERT_EQUAL(1,(int)res1.size());
-  CPPUNIT_ASSERT_EQUAL(2,res1[0]);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),res1[0]);
   res1.clear();
   m->orientCorrectly2DCells(vec,false);
   m->are2DCellsNotCorrectlyOriented(vec,false,res1);
@@ -191,7 +191,7 @@ void MEDCouplingBasicsTest2::testCellOrientation2()
   MEDCouplingUMesh *m1=0;
   MEDCouplingUMesh *m2=build3DExtrudedUMesh_1(m1);
   m1->decrRef();
-  std::vector<int> res1;
+  std::vector<mcIdType> res1;
   m2->arePolyhedronsNotCorrectlyOriented(res1);
   CPPUNIT_ASSERT_EQUAL(6,(int)res1.size());
   m2->orientCorrectlyPolyhedrons();
@@ -200,8 +200,8 @@ void MEDCouplingBasicsTest2::testCellOrientation2()
   CPPUNIT_ASSERT(res1.empty());
   m2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(18,(int)m2->getNumberOfCells());
-  int cellIds[3]={0,6,12};
-  std::vector<int> cellIds2(cellIds,cellIds+3);
+  mcIdType cellIds[3]={0,6,12};
+  std::vector<mcIdType> cellIds2(cellIds,cellIds+3);
   m2->convertToPolyTypes(&cellIds2[0],&cellIds2[0]+cellIds2.size());
   m2->orientCorrectlyPolyhedrons();
   res1.clear();
@@ -212,8 +212,8 @@ void MEDCouplingBasicsTest2::testCellOrientation2()
   MEDCouplingUMesh *m3=build2DTargetMesh_1();
   double vec[3]={0.,0.,1.};
   m3->changeSpaceDimension(3);
-  const int ids1[5]={0,1,2,3,4};
-  std::vector<int> ids2(ids1,ids1+5);
+  const mcIdType ids1[5]={0,1,2,3,4};
+  std::vector<mcIdType> ids2(ids1,ids1+5);
   m3->convertToPolyTypes(&ids2[0],&ids2[0]+ids2.size());
   m3->orientCorrectly2DCells(vec,false);
   MEDCouplingUMesh *m4=buildCU1DMesh_U();
@@ -271,7 +271,7 @@ void MEDCouplingBasicsTest2::testCellOrientation3()
   coords[4] = cos(5*M_PI/4.0); coords[5] = sin(5*M_PI/4.0);
   coords[6] = cos(M_PI/4.0); coords[7] = sin(M_PI/4.0);
 
-  int conn[4]= { 0,1,2,3 };
+  mcIdType conn[4]= { 0,1,2,3 };
   double vec[3]={0.,0.,-1.};
   m->allocateCells(1);
   m->insertNextCell(INTERP_KERNEL::NORM_QPOLYG,4,conn);
@@ -283,7 +283,7 @@ void MEDCouplingBasicsTest2::testCellOrientation3()
   myCoords->decrRef();
   m->changeSpaceDimension(3);
 
-  std::vector<int> res1;
+  std::vector<mcIdType> res1;
   m->are2DCellsNotCorrectlyOriented(vec,false,res1);
   CPPUNIT_ASSERT(res1.empty());
   vec[2] = 1.0;
@@ -298,7 +298,7 @@ void MEDCouplingBasicsTest2::testCellOrientation3()
  */
 void MEDCouplingBasicsTest2::testPolyhedronBarycenter()
 {
-  int connN[]={0,3,2,1, -1, 4,5,6,7, -1, 0,4,7,3, -1, 3,7,6,2, -1, 2,6,5,1, -1, 1,5,4,0};
+  mcIdType connN[]={0,3,2,1, -1, 4,5,6,7, -1, 0,4,7,3, -1, 3,7,6,2, -1, 2,6,5,1, -1, 1,5,4,0};
   double coords[]={0.,0.,0., 1.,0.,0., 1.,1.,0., 0.,1.,0., 0.,0.,1., 1.,0.,1., 1.,1.,1., 0.,1.,1., 0.5, 0.5, 0.5};
   MEDCouplingUMesh *meshN=MEDCouplingUMesh::New();
   meshN->setName("ForBary");
@@ -313,7 +313,7 @@ void MEDCouplingBasicsTest2::testPolyhedronBarycenter()
   myCoords->decrRef();
   meshN->checkConsistencyLight();
   //
-  std::vector<int> res1;
+  std::vector<mcIdType> res1;
   meshN->arePolyhedronsNotCorrectlyOriented(res1);
   meshN->orientCorrectlyPolyhedrons();
   CPPUNIT_ASSERT(res1.empty());
@@ -574,7 +574,7 @@ void MEDCouplingBasicsTest2::testAreaBary3D()
                        0.167803379307 , -0.207851396623 , -0.088802726124 , 0.12868717152 , -0.230920439715 , 0.00760508389036 ,
                        -0.0372812069535 , -0.286740286332 , 0.00963701291166 };
 
-  int connN [] = { /*polyhedron 0*/
+  mcIdType connN [] = { /*polyhedron 0*/
     0 , 1 , 3 , 4 , 2 , -1 , 1 , 5 , 6 , 7 , 0 , -1 , 0 , 7 , 8 , 10 , 11 , 9 , 2 , -1 , 1 , 5 , 12 , 14 , 15 , 13 , 3 , -1 , 16 , 9 , 2 , 4 , 17 , -1
     , 4 , 3 , 13 , 18 , 17 , -1 , 5 , 6 , 19 , 21 , 20 , 12 , -1 , 6 , 7 , 8 , 23 , 22 , 19 , -1 , 23 , 24 , 10 , 8 , -1 , 25 , 11 , 9 , 16 , -1
     , 24 , 26 , 25 , 11 , 10 , -1 , 12 , 14 , 20 , -1 , 27 , 28 , 29 , 15 , 13 , 18 , -1 , 14 , 15 , 29 , 30 , 21 , 20 , -1 , 26 , 27 , 18 , 17 , 16 , 25 , -1
@@ -612,7 +612,7 @@ void MEDCouplingBasicsTest2::testAreaBary3D()
   meshN->setCoords(myCoords);
   myCoords->decrRef();
   meshN->checkConsistencyLight();
-  std::vector<int> res1;
+  std::vector<mcIdType> res1;
   meshN->arePolyhedronsNotCorrectlyOriented(res1);
   meshN->orientCorrectlyPolyhedrons();
   res1.clear();
@@ -636,13 +636,12 @@ void MEDCouplingBasicsTest2::testRenumberCellsForFields()
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
   f->setMesh(m);
   DataArrayDouble *arr=DataArrayDouble::New();
-  int nbOfCells=m->getNumberOfCells();
-  arr->alloc(nbOfCells,3);
+  arr->alloc(m->getNumberOfCells(),3);
   f->setArray(arr);
   arr->decrRef();
   const double values1[15]={7.,107.,10007.,8.,108.,10008.,9.,109.,10009.,10.,110.,10010.,11.,111.,10011.};
   std::copy(values1,values1+15,arr->getPointer());
-  const int renumber1[5]={3,1,0,4,2};
+  const mcIdType renumber1[5]={3,1,0,4,2};
   double res[3];
   const double loc[]={-0.05,-0.05, 0.55,-0.25, 0.55,0.15, -0.05,0.45, 0.45,0.45};
   for(int j=0;j<5;j++)
@@ -698,7 +697,7 @@ void MEDCouplingBasicsTest2::testRenumberCellsForFields()
   ptr=f->getArray()->getConstPointer();
   for(int i=0;i<36;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],ptr[i],1e-12);
-  const int renumber2[5]={2,1,4,0,3};//reverse renumber1
+  const mcIdType renumber2[5]={2,1,4,0,3};//reverse renumber1
   f->renumberCells(renumber2,false);
   CPPUNIT_ASSERT(f->isEqual(fCpy,1e-12,1e-12));
   fCpy->decrRef();
@@ -734,16 +733,16 @@ void MEDCouplingBasicsTest2::testRenumberNodesForFields()
   MEDCouplingUMesh *m=build2DTargetMesh_1();
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_NODES,NO_TIME);
   f->setMesh(m);
-  CPPUNIT_ASSERT_EQUAL(9,f->getNumberOfMeshPlacesExpected());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9),f->getNumberOfMeshPlacesExpected());
   DataArrayDouble *arr=DataArrayDouble::New();
-  int nbOfNodes=m->getNumberOfNodes();
+  mcIdType nbOfNodes=m->getNumberOfNodes();
   arr->alloc(nbOfNodes,3);
   f->setArray(arr);
   arr->decrRef();
   const double values1[27]={7.,107.,10007.,8.,108.,10008.,9.,109.,10009.,10.,110.,10010.,11.,111.,10011.,12.,112.,10012.,13.,113.,10013.,14.,114.,10014.,15.,115.,10015.};
   std::copy(values1,values1+27,arr->getPointer());
   f->checkConsistencyLight();
-  const int renumber1[9]={0,4,1,3,5,2,6,7,8};
+  const mcIdType renumber1[9]={0,4,1,3,5,2,6,7,8};
   double res[3];
   const double loc[]={0.5432,-0.2432, 0.5478,0.1528};
   const double expected1[6]={9.0272, 109.0272, 10009.0272, 11.4124,111.4124,10011.4124};
@@ -766,7 +765,7 @@ void MEDCouplingBasicsTest2::testRenumberNodesForFields()
   const double expected2[27]={7.,107.,10007.,9.,109.,10009.,12.,112.,10012.,10.,110.,10010.,8.,108.,10008.,11.,111.,10011.,13.,113.,10013.,14.,114.,10014.,15.,115.,10015.};
   for(int i=0;i<27;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],f->getArray()->getConstPointer()[i],1e-12);
-  const int renumber2[9]={0,2,5,3,1,4,6,7,8};//reverse of renumber2
+  const mcIdType renumber2[9]={0,2,5,3,1,4,6,7,8};//reverse of renumber2
   f->renumberNodes(renumber2);
   CPPUNIT_ASSERT(f->isEqual(fCpy,1e-12,1e-12));
   fCpy->decrRef();
@@ -785,7 +784,7 @@ void MEDCouplingBasicsTest2::testConvertQuadraticCellsToLinear()
   std::set<INTERP_KERNEL::NormalizedCellType> expected1Bis(expected1,expected1+5);
   CPPUNIT_ASSERT(expected1Bis==types);
   CPPUNIT_ASSERT(mesh->isPresenceOfQuadratic());
-  CPPUNIT_ASSERT_EQUAL(62,mesh->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(62),mesh->getNodalConnectivityArrayLen());
   MEDCouplingFieldDouble *f1=mesh->getMeasureField(false);
   //
   mesh->convertQuadraticCellsToLinear();
@@ -794,7 +793,7 @@ void MEDCouplingBasicsTest2::testConvertQuadraticCellsToLinear()
   mesh->checkConsistencyLight();
   MEDCouplingFieldDouble *f2=mesh->getMeasureField(false);
   CPPUNIT_ASSERT(f1->getArray()->isEqual(*f2->getArray(),1e-12));
-  CPPUNIT_ASSERT_EQUAL(48,mesh->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(48),mesh->getNodalConnectivityArrayLen());
   std::set<INTERP_KERNEL::NormalizedCellType> types2=mesh->getAllGeoTypes();
   CPPUNIT_ASSERT_EQUAL(3,(int)types2.size());
   INTERP_KERNEL::NormalizedCellType expected2[3]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_QUAD4};
@@ -810,7 +809,7 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
 {
   MEDCouplingUMesh *mesh1=build2DTargetMesh_3();
   MEDCouplingUMesh *mesh2=build2DTargetMesh_3();
-  DataArrayInt *cellCor,*nodeCor;
+  DataArrayIdType *cellCor,*nodeCor;
   //First test mesh1
   mesh1->checkGeoEquivalWith(mesh1,0,1e-12,cellCor,nodeCor);//deepEqual
   CPPUNIT_ASSERT(cellCor==0);
@@ -832,7 +831,7 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
   CPPUNIT_ASSERT(cellCor==0);
   CPPUNIT_ASSERT(nodeCor==0);
   //Third test : cell permutation by keeping the first the middle and the last as it is.
-  const int renum[]={0,2,1,3,4,5,6,8,7,9};
+  const mcIdType renum[]={0,2,1,3,4,5,6,8,7,9};
   mesh2->renumberCells(renum,false);
   CPPUNIT_ASSERT_THROW(mesh1->checkGeoEquivalWith(mesh2,0,1e-12,cellCor,nodeCor),INTERP_KERNEL::Exception);//deepEqual fails
   CPPUNIT_ASSERT(cellCor==0);
@@ -852,7 +851,7 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
   //4th test : cell and node permutation by keeping the first the middle and the last as it is.
   mesh2->decrRef();
   mesh2=build2DTargetMesh_3();
-  const int renum2[]={0,2,1,3,4,5,6,8,7,9,10};
+  const mcIdType renum2[]={0,2,1,3,4,5,6,8,7,9,10};
   mesh2->renumberCells(renum,false);
   mesh2->renumberNodes(renum2,11);
   CPPUNIT_ASSERT_THROW(mesh1->checkGeoEquivalWith(mesh2,0,1e-12,cellCor,nodeCor),INTERP_KERNEL::Exception);//deepEqual fails
@@ -877,19 +876,19 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
   //5th test : modification of the last cell to check fastCheck detection.
   mesh2->decrRef();
   mesh2=build2DTargetMesh_3();
-  const int renum3[]={0,2,1,3,4,5,6,8,9,7};
+  const mcIdType renum3[]={0,2,1,3,4,5,6,8,9,7};
   mesh2->renumberCells(renum3,false);
   mesh2->renumberNodes(renum2,11);
   bool isExcep=false;
   try { mesh1->checkGeoEquivalWith(mesh2,0,1e-12,cellCor,nodeCor);//deepEqual fails
   }
-  catch(INTERP_KERNEL::Exception& e) { isExcep=true; }
+  catch(INTERP_KERNEL::Exception&) { isExcep=true; }
   CPPUNIT_ASSERT(isExcep); isExcep=false;
   CPPUNIT_ASSERT(cellCor==0);
   CPPUNIT_ASSERT(nodeCor==0);
   try { mesh1->checkGeoEquivalWith(mesh2,1,1e-12,cellCor,nodeCor);//fastEqual has detected something
   }
-  catch(INTERP_KERNEL::Exception& e) { isExcep=true; }
+  catch(INTERP_KERNEL::Exception&) { isExcep=true; }
   CPPUNIT_ASSERT(isExcep); isExcep=false;
   CPPUNIT_ASSERT(cellCor==0);
   CPPUNIT_ASSERT(nodeCor==0);
@@ -915,11 +914,11 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith2()
 {
   MEDCouplingUMesh *mesh1=build2DTargetMesh_4();
   MEDCouplingUMesh *mesh2=build2DTargetMesh_1();
-  DataArrayInt *cellCor,*nodeCor;
+  DataArrayIdType *cellCor,*nodeCor;
   mesh1->checkGeoEquivalWith(mesh2,10,1e-12,cellCor,nodeCor);
   CPPUNIT_ASSERT(cellCor==0);
   CPPUNIT_ASSERT(nodeCor!=0);
-  const int expected1[9]={0, 1, 3, 4, 5, 6, 7, 8, 9};
+  const mcIdType expected1[9]={0, 1, 3, 4, 5, 6, 7, 8, 9};
   for(int i=0;i<9;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],nodeCor->getIJ(i,0));
   nodeCor->decrRef();
@@ -931,10 +930,10 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith2()
 void MEDCouplingBasicsTest2::testCopyTinyStringsFromOnFields()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,LINEAR_TIME);
   f->setMesh(m);
-  CPPUNIT_ASSERT_EQUAL(5,f->getNumberOfMeshPlacesExpected());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),f->getNumberOfMeshPlacesExpected());
   f->setName("a");
   f->setDescription("b");
   DataArrayDouble *a1=DataArrayDouble::New();
@@ -999,7 +998,7 @@ void MEDCouplingBasicsTest2::testTryToShareSameCoordsPermute()
   m->tryToShareSameCoordsPermute(*m2,1e-12);
   CPPUNIT_ASSERT(m->getCoords()==m2->getCoords());
   CPPUNIT_ASSERT(m2->isEqual(m,1e-12));
-  const int renum1[9]={1,2,0,5,8,7,4,3,6};
+  const mcIdType renum1[9]={1,2,0,5,8,7,4,3,6};
   m->renumberNodes(renum1,9);
   CPPUNIT_ASSERT(m->getCoords()!=m2->getCoords());
   CPPUNIT_ASSERT(!m2->isEqual(m,1e-12));
@@ -1014,7 +1013,7 @@ void MEDCouplingBasicsTest2::testTryToShareSameCoordsPermute2()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_4();
   double targetCoords[8]={-0.3,-0.3, 0.2,-0.3, -0.3,0.2, 0.2,0.2 };
-  int targetConn[4]={0,2,3,1};
+  mcIdType targetConn[4]={0,2,3,1};
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New();
   m2->setMeshDimension(2);
   m2->allocateCells(1);
@@ -1069,7 +1068,7 @@ void MEDCouplingBasicsTest2::testChangeUnderlyingMesh1()
   f1->setArray(array);
   array->decrRef();
   //
-  const int renum[]={0,2,1,3,4,5,6,8,7,9};
+  const mcIdType renum[]={0,2,1,3,4,5,6,8,7,9};
   mesh2->renumberCells(renum,false);
   CPPUNIT_ASSERT(f1->getMesh()==mesh1);
   f1->changeUnderlyingMesh(mesh1,10,1e-12);// nothing done only to check that nothing done.
@@ -1090,7 +1089,7 @@ void MEDCouplingBasicsTest2::testChangeUnderlyingMesh1()
   f1->setArray(array);
   array->decrRef();
   //
-  const int renum2[]={0,2,10,3,4,5,6,8,7,9,1};
+  const mcIdType renum2[]={0,2,10,3,4,5,6,8,7,9,1};
   mesh2->renumberNodes(renum2,11);
   CPPUNIT_ASSERT(f1->getMesh()==mesh1);
   f1->changeUnderlyingMesh(mesh2,10,1e-12);
@@ -1107,7 +1106,7 @@ void MEDCouplingBasicsTest2::testChangeUnderlyingMesh1()
 void MEDCouplingBasicsTest2::testGetMaxValue1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,LINEAR_TIME);
   f->setMesh(m);
   DataArrayDouble *a1=DataArrayDouble::New();
@@ -1157,7 +1156,7 @@ void MEDCouplingBasicsTest2::testSubstractInPlaceDM1()
   CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(20,(int)f1->getNumberOfValues());
   //
-  const int renum[]={0,2,3,1,4,5,6,8,7,9};
+  const mcIdType renum[]={0,2,3,1,4,5,6,8,7,9};
   mesh2->renumberCells(renum,false);
   //
   MEDCouplingFieldDouble *f2=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
@@ -1308,14 +1307,14 @@ void MEDCouplingBasicsTest2::testGetIdsInRange1()
   array->decrRef();
   //
   f1->checkConsistencyLight();
-  DataArrayInt *da=f1->findIdsInRange(2.9,7.1);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)5,da->getNbOfElems());
-  const int expected1[5]={2,3,5,7,9};
+  DataArrayIdType *da=f1->findIdsInRange(2.9,7.1);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),da->getNbOfElems());
+  const mcIdType expected1[5]={2,3,5,7,9};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+5,da->getConstPointer()));
   da->decrRef();
   da=f1->findIdsInRange(8.,12.);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)4,da->getNbOfElems());
-  const int expected2[4]={1,4,6,8};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),da->getNbOfElems());
+  const mcIdType expected2[4]={1,4,6,8};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+4,da->getConstPointer()));
   da->decrRef();
   //
@@ -1336,7 +1335,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   f1->setArray(array);
   array->decrRef();
   //
-  const int part1[3]={2,1,4};
+  const mcIdType part1[3]={2,1,4};
   MEDCouplingFieldDouble *f2=f1->buildSubPart(part1,part1+3);
   f2->zipCoords();
   CPPUNIT_ASSERT_EQUAL(3,(int)f2->getNumberOfTuples());
@@ -1349,7 +1348,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   MEDCouplingUMesh *m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(13,m2C->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(13),m2C->getNodalConnectivityArrayLen());
   const double expected2[12]={0.2, -0.3, 0.7, -0.3, 0.2, 0.2, 0.7, 0.2, 0.2, 0.7, 0.7, 0.7};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
@@ -1369,7 +1368,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   std::copy(arr2,arr2+18,array->getPointer());  
   f1->setArray(array);
   array->decrRef();
-  const int part2[2]={1,2};
+  const mcIdType part2[2]={1,2};
   f2=f1->buildSubPart(part2,part2+2);
   CPPUNIT_ASSERT_EQUAL(4,(int)f2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents());
@@ -1377,11 +1376,11 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected5[i],1e-12);
   CPPUNIT_ASSERT_EQUAL(2,(int)f2->getMesh()->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(4,f2->getMesh()->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getMesh()->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(8,m2C->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(8),m2C->getNodalConnectivityArrayLen());
   for(int i=0;i<8;i++)//8 is not an error
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
   CPPUNIT_ASSERT(std::equal(expected3,expected3+4,m2C->getNodalConnectivity()->getConstPointer()+4));
@@ -1389,8 +1388,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,m2C->getNodalConnectivityIndex()->getConstPointer()));
   f2->decrRef();
   //idem previous because nodes of cell#4 are not fully present in part3 
-  const int part3[2]={1,2};
-  DataArrayInt *arrr=DataArrayInt::New();
+  const mcIdType part3[2]={1,2};
+  DataArrayIdType *arrr=DataArrayIdType::New();
   arrr->alloc(2,1);
   std::copy(part3,part3+2,arrr->getPointer());
   f2=f1->buildSubPart(arrr);
@@ -1400,11 +1399,11 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected5[i],1e-12);
   CPPUNIT_ASSERT_EQUAL(2,(int)f2->getMesh()->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(4,f2->getMesh()->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getMesh()->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(8,m2C->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(8),m2C->getNodalConnectivityArrayLen());
   for(int i=0;i<8;i++)//8 is not an error
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
   CPPUNIT_ASSERT(std::equal(expected3,expected3+4,m2C->getNodalConnectivity()->getConstPointer()+4));
@@ -1412,7 +1411,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,m2C->getNodalConnectivityIndex()->getConstPointer()));
   f2->decrRef();
   //
-  const int part4[3]={1,2,4};
+  const mcIdType part4[3]={1,2,4};
   f2=f1->buildSubPart(part4,part4+3);
   CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents());
@@ -1420,11 +1419,11 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected6[i],1e-12);
   CPPUNIT_ASSERT_EQUAL(3,(int)f2->getMesh()->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(6,f2->getMesh()->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(6,(int)f2->getMesh()->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(13,m2C->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(13),m2C->getNodalConnectivityArrayLen());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
   CPPUNIT_ASSERT(std::equal(expected3,expected3+4,m2C->getNodalConnectivity()->getConstPointer()+4));
@@ -1848,11 +1847,11 @@ void MEDCouplingBasicsTest2::testMaxPerTuple1()
     CPPUNIT_ASSERT_DOUBLES_EQUAL(5.6,f2->getIJ(i,0),1e-13);
   f2->decrRef();
   //
-  DataArrayInt *d2I=0;
+  DataArrayIdType *d2I=0;
   DataArrayDouble *d2=array->maxPerTupleWithCompoId(d2I);
   CPPUNIT_ASSERT_EQUAL(1,(int)d2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(5,(int)d2->getNumberOfTuples());
-  const int expected2[5]={4,3,2,0,1};
+  const mcIdType expected2[5]={4,3,2,0,1};
   for(int i=0;i<5;i++)
     {
       CPPUNIT_ASSERT_DOUBLES_EQUAL(5.6,d2->getIJ(i,0),1e-13);
@@ -1943,7 +1942,7 @@ void MEDCouplingBasicsTest2::testIsEqualWithoutConsideringStr1()
 {
   MEDCouplingUMesh *mesh1=build2DTargetMesh_1();
   MEDCouplingUMesh *mesh2=build2DTargetMesh_1();
-  DataArrayInt *da1,*da2;
+  DataArrayIdType *da1,*da2;
   //
   CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12));
   CPPUNIT_ASSERT(mesh1->isEqualWithoutConsideringStr(mesh2,1e-12));
@@ -1974,7 +1973,7 @@ void MEDCouplingBasicsTest2::testIsEqualWithoutConsideringStr1()
   mesh2->getCoords()->setIJ(0,3,tmp);
   CPPUNIT_ASSERT(mesh1->isEqual(mesh2,1e-12));
   CPPUNIT_ASSERT(mesh1->isEqualWithoutConsideringStr(mesh2,1e-12));
-  int tmp2=mesh2->getNodalConnectivity()->getIJ(0,4);
+  mcIdType tmp2=mesh2->getNodalConnectivity()->getIJ(0,4);
   mesh2->getNodalConnectivity()->setIJ(0,4,0);
   CPPUNIT_ASSERT(!mesh1->isEqual(mesh2,1e-12));
   CPPUNIT_ASSERT(!mesh1->isEqualWithoutConsideringStr(mesh2,1e-12));
@@ -2017,12 +2016,12 @@ void MEDCouplingBasicsTest2::testIsEqualWithoutConsideringStr1()
 void MEDCouplingBasicsTest2::testGetNodeIdsOfCell1()
 {
   MEDCouplingUMesh *mesh1=build2DTargetMesh_1();
-  std::vector<int> nodeIds;
+  std::vector<mcIdType> nodeIds;
   mesh1->getNodeIdsOfCell(1,nodeIds);
   CPPUNIT_ASSERT_EQUAL(3,(int)nodeIds.size());
-  CPPUNIT_ASSERT_EQUAL(1,nodeIds[0]);
-  CPPUNIT_ASSERT_EQUAL(4,nodeIds[1]);
-  CPPUNIT_ASSERT_EQUAL(2,nodeIds[2]);
+  CPPUNIT_ASSERT_EQUAL(1,(int)nodeIds[0]);
+  CPPUNIT_ASSERT_EQUAL(4,(int)nodeIds[1]);
+  CPPUNIT_ASSERT_EQUAL(2,(int)nodeIds[2]);
   std::vector<double> coords;
   mesh1->getCoordinatesOfNode(4,coords);
   CPPUNIT_ASSERT_EQUAL(2,(int)coords.size());
@@ -2238,7 +2237,7 @@ void MEDCouplingBasicsTest2::testAreaBary3D2()
   mesh->setCoords(coo);
   coo->decrRef();
   //
-  int tmpConn[8]={0,1,2,3,4,5,6,7};
+  mcIdType tmpConn[8]={0,1,2,3,4,5,6,7};
   mesh->allocateCells(3);
   mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,tmpConn);
   std::transform(tmpConn,tmpConn+8,tmpConn,std::bind2nd(std::plus<int>(),8));
@@ -2248,10 +2247,10 @@ void MEDCouplingBasicsTest2::testAreaBary3D2()
   mesh->finishInsertingCells();
   mesh->checkConsistencyLight();
   bool isMerged;
-  int newNebOfNodes;
-  DataArrayInt *da=mesh->mergeNodes(1e-7,isMerged,newNebOfNodes);
+  mcIdType newNebOfNodes;
+  DataArrayIdType *da=mesh->mergeNodes(1e-7,isMerged,newNebOfNodes);
   da->decrRef();
-  CPPUNIT_ASSERT_EQUAL(12,newNebOfNodes);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),newNebOfNodes);
   MEDCouplingFieldDouble *vols=mesh->getMeasureField(true);
   CPPUNIT_ASSERT_EQUAL(3,(int)vols->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)vols->getNumberOfComponents());
index 17a2010419526ba5fb62cf1b6db0900f496f46d5..52200697acaf81cc2a3dee22c627d8e47686fbd4 100644 (file)
@@ -24,6 +24,7 @@
 #include "MEDCouplingMappedExtrudedMesh.hxx"
 #include "MEDCouplingFieldDouble.hxx"
 #include "MEDCouplingMemArray.hxx"
+#include "MEDCouplingMemArray.txx"
 #include "MEDCouplingGaussLocalization.hxx"
 
 #include <cmath>
@@ -44,7 +45,7 @@ void MEDCouplingBasicsTest3::testGetMeasureFieldCMesh1()
   m->setCoordsAt(0,da);
   da->decrRef();
   m->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(4,m->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(4,(int)m->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)m->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(1,m->getSpaceDimension());
   MEDCouplingFieldDouble *f=m->getMeasureField(true);
@@ -74,7 +75,7 @@ void MEDCouplingBasicsTest3::testGetMeasureFieldCMesh1()
   m->setCoordsAt(1,da);
   da->decrRef();
   m->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(12,m->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(12,(int)m->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(6,(int)m->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(2,m->getSpaceDimension());
   f=m->getMeasureField(true);
@@ -105,7 +106,7 @@ void MEDCouplingBasicsTest3::testGetMeasureFieldCMesh1()
   m->setCoordsAt(2,da);
   da->decrRef();
   m->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(60,m->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(60,(int)m->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(24,(int)m->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(3,m->getSpaceDimension());
   f=m->getMeasureField(true);
@@ -175,7 +176,7 @@ void MEDCouplingBasicsTest3::testFieldDoubleZipConnectivity1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
   MEDCouplingUMesh *m2=build2DTargetMesh_1();
-  const int cells1[3]={2,3,4};
+  const mcIdType cells1[3]={2,3,4};
   MEDCouplingPointSet *m3_1=m2->buildPartOfMySelf(cells1,cells1+3,true);
   MEDCouplingUMesh *m3=dynamic_cast<MEDCouplingUMesh *>(m3_1);
   CPPUNIT_ASSERT(m3);
@@ -189,11 +190,11 @@ void MEDCouplingBasicsTest3::testFieldDoubleZipConnectivity1()
   m5->decrRef();
   //
   CPPUNIT_ASSERT_EQUAL(10,(int)m6->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(22,m6->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(22,(int)m6->getNumberOfNodes());
   bool areNodesMerged;
-  int newNbOfNodes;
-  DataArrayInt *arr=m6->mergeNodes(1e-13,areNodesMerged,newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL(9,m6->getNumberOfNodes());
+  mcIdType newNbOfNodes;
+  DataArrayIdType *arr=m6->mergeNodes(1e-13,areNodesMerged,newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(9,(int)m6->getNumberOfNodes());
   arr->decrRef();
   MEDCouplingFieldDouble *f=m6->fillFromAnalytic(ON_CELLS,2,"x");
   MEDCouplingFieldDouble *f2=m6->fillFromAnalytic(ON_NODES,2,"x");
@@ -244,7 +245,7 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumber1()
   const double arr1[14]={1.1,11.1,2.1,12.1,3.1,13.1,4.1,14.1,5.1,15.1,6.1,16.1,7.1,17.1};
   std::copy(arr1,arr1+14,a->getPointer());
   //
-  const int arr2[7]={3,1,0,6,5,4,2};
+  const mcIdType arr2[7]={3,1,0,6,5,4,2};
   DataArrayDouble *b=a->renumber(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents());
@@ -256,18 +257,18 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumber1()
   b->decrRef();
   a->decrRef();
   //
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(7,2);
   c->setInfoOnComponent(0,"toto");
   c->setInfoOnComponent(1,"tata");
-  const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
   std::copy(arr3,arr3+14,c->getPointer());
-  DataArrayInt *d=c->renumber(arr2);
+  DataArrayIdType *d=c->renumber(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto");
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata");
-  const int expected2[14]={3, 13, 2, 12, 7, 17, 1, 11, 6, 16, 5, 15, 4, 14};
+  const mcIdType expected2[14]={3, 13, 2, 12, 7, 17, 1, 11, 6, 16, 5, 15, 4, 14};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],d->getIJ(0,i));
   c->decrRef();
@@ -283,7 +284,7 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberAndReduce1()
   const double arr1[14]={1.1,11.1,2.1,12.1,3.1,13.1,4.1,14.1,5.1,15.1,6.1,16.1,7.1,17.1};
   std::copy(arr1,arr1+14,a->getPointer());
   //
-  const int arr2[7]={2,-1,1,-1,0,4,3};
+  const mcIdType arr2[7]={2,-1,1,-1,0,4,3};
   DataArrayDouble *b=a->renumberAndReduce(arr2,5);
   CPPUNIT_ASSERT_EQUAL(5,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents());
@@ -295,18 +296,18 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberAndReduce1()
   b->decrRef();
   a->decrRef();
   //
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(7,2);
   c->setInfoOnComponent(0,"toto");
   c->setInfoOnComponent(1,"tata");
-  const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
   std::copy(arr3,arr3+14,c->getPointer());
-  DataArrayInt *d=c->renumberAndReduce(arr2,5);
+  DataArrayIdType *d=c->renumberAndReduce(arr2,5);
   CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto");
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata");
-  const int expected2[10]={5,15,3,13,1,11,7,17,6,16};
+  const mcIdType expected2[10]={5,15,3,13,1,11,7,17,6,16};
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],d->getIJ(0,i));
   c->decrRef();
@@ -320,7 +321,7 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlace1()
   const double arr1[14]={1.1,11.1,2.1,12.1,3.1,13.1,4.1,14.1,5.1,15.1,6.1,16.1,7.1,17.1};
   std::copy(arr1,arr1+14,a->getPointer());
   //
-  const int arr2[7]={3,1,0,6,5,4,2};
+  const mcIdType arr2[7]={3,1,0,6,5,4,2};
   a->renumberInPlace(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)a->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)a->getNumberOfComponents());
@@ -329,14 +330,14 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlace1()
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],a->getIJ(0,i),1e-14);
   a->decrRef();
   //
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(7,2);
-  const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
   std::copy(arr3,arr3+14,c->getPointer());
   c->renumberInPlace(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)c->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)c->getNumberOfComponents());
-  const int expected2[14]={3, 13, 2, 12, 7, 17, 1, 11, 6, 16, 5, 15, 4, 14};
+  const mcIdType expected2[14]={3, 13, 2, 12, 7, 17, 1, 11, 6, 16, 5, 15, 4, 14};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],c->getIJ(0,i));
   c->decrRef();
@@ -351,7 +352,7 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberR1()
   const double arr1[14]={1.1,11.1,2.1,12.1,3.1,13.1,4.1,14.1,5.1,15.1,6.1,16.1,7.1,17.1};
   std::copy(arr1,arr1+14,a->getPointer());
   //
-  const int arr2[7]={3,1,0,6,5,4,2};
+  const mcIdType arr2[7]={3,1,0,6,5,4,2};
   DataArrayDouble *b=a->renumberR(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents());
@@ -363,18 +364,18 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberR1()
   b->decrRef();
   a->decrRef();
   //
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(7,2);
   c->setInfoOnComponent(0,"toto");
   c->setInfoOnComponent(1,"tata");
-  const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
   std::copy(arr3,arr3+14,c->getPointer());
-  DataArrayInt *d=c->renumberR(arr2);
+  DataArrayIdType *d=c->renumberR(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto");
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata");
-  const int expected2[14]={4, 14, 2, 12, 1, 11, 7, 17, 6, 16, 5, 15, 3, 13};
+  const mcIdType expected2[14]={4, 14, 2, 12, 1, 11, 7, 17, 6, 16, 5, 15, 3, 13};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],d->getIJ(0,i));
   c->decrRef();
@@ -388,7 +389,7 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlaceR1()
   const double arr1[14]={1.1,11.1,2.1,12.1,3.1,13.1,4.1,14.1,5.1,15.1,6.1,16.1,7.1,17.1};
   std::copy(arr1,arr1+14,a->getPointer());
   //
-  const int arr2[7]={3,1,0,6,5,4,2};
+  const mcIdType arr2[7]={3,1,0,6,5,4,2};
   a->renumberInPlaceR(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)a->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)a->getNumberOfComponents());
@@ -397,14 +398,14 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlaceR1()
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],a->getIJ(0,i),1e-14);
   a->decrRef();
   //
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(7,2);
-  const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
   std::copy(arr3,arr3+14,c->getPointer());
   c->renumberInPlaceR(arr2);
   CPPUNIT_ASSERT_EQUAL(7,(int)c->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)c->getNumberOfComponents());
-  const int expected2[14]={4, 14, 2, 12, 1, 11, 7, 17, 6, 16, 5, 15, 3, 13};
+  const mcIdType expected2[14]={4, 14, 2, 12, 1, 11, 7, 17, 6, 16, 5, 15, 3, 13};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],c->getIJ(0,i));
   c->decrRef();
@@ -419,7 +420,7 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleId1()
   const double arr1[14]={1.1,11.1,2.1,12.1,3.1,13.1,4.1,14.1,5.1,15.1,6.1,16.1,7.1,17.1};
   std::copy(arr1,arr1+14,a->getPointer());
   //
-  const int arr2[7]={4,2,0,6,5};
+  const mcIdType arr2[7]={4,2,0,6,5};
   DataArrayDouble *b=a->selectByTupleId(arr2,arr2+5);
   CPPUNIT_ASSERT_EQUAL(5,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents());
@@ -431,18 +432,18 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleId1()
   b->decrRef();
   a->decrRef();
   //
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(7,2);
   c->setInfoOnComponent(0,"toto");
   c->setInfoOnComponent(1,"tata");
-  const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
   std::copy(arr3,arr3+14,c->getPointer());
-  DataArrayInt *d=c->selectByTupleId(arr2,arr2+5);
+  DataArrayIdType *d=c->selectByTupleId(arr2,arr2+5);
   CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto");
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata");
-  const int expected2[10]={5,15,3,13,1,11,7,17,6,16};
+  const mcIdType expected2[10]={5,15,3,13,1,11,7,17,6,16};
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],d->getIJ(0,i));
   c->decrRef();
@@ -455,16 +456,16 @@ void MEDCouplingBasicsTest3::testDaDoubleGetMinMaxValues1()
   a->alloc(9,1);
   const double arr1[9]={2.34,4.56,-6.77,4.55,4.56,2.24,2.34,1.02,4.56};
   std::copy(arr1,arr1+9,a->getPointer());
-  int where;
+  mcIdType where;
   double m=a->getMaxValue(where);
-  CPPUNIT_ASSERT_EQUAL(1,where);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),where);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(4.56,m,1e-12);
-  DataArrayInt *ws;
+  DataArrayIdType *ws;
   m=a->getMaxValue2(ws);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(4.56,m,1e-12);
   CPPUNIT_ASSERT_EQUAL(3,(int)ws->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)ws->getNumberOfComponents());
-  const int expected1[3]={1,4,8};
+  const mcIdType expected1[3]={1,4,8};
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],ws->getIJ(i,0));
   ws->decrRef();
@@ -475,7 +476,7 @@ void MEDCouplingBasicsTest3::testDaDoubleGetMinMaxValues1()
   std::copy(arr2,arr2+9,a->getPointer());
   where=-2;
   m=a->getMinValue(where);
-  CPPUNIT_ASSERT_EQUAL(1,where);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),where);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(-4.56,m,1e-12);
   m=a->getMinValue2(ws);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(-4.56,m,1e-12);
@@ -505,12 +506,12 @@ void MEDCouplingBasicsTest3::testFieldDoubleGetMinMaxValues2()
   f->checkConsistencyLight();
   double m=f->getMaxValue();
   CPPUNIT_ASSERT_DOUBLES_EQUAL(8.71,m,1e-12);
-  DataArrayInt *ws;
+  DataArrayIdType *ws;
   m=f->getMaxValue2(ws);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(8.71,m,1e-12);
   CPPUNIT_ASSERT_EQUAL(4,(int)ws->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)ws->getNumberOfComponents());
-  const int expected1[4]={0,3,7,17};
+  const mcIdType expected1[4]={0,3,7,17};
   for(int i=0;i<4;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],ws->getIJ(i,0));
   ws->decrRef();
@@ -545,15 +546,15 @@ void MEDCouplingBasicsTest3::testBuildUnstructuredCMesh1()
   da->decrRef();
   m->checkConsistencyLight();
   double pos=2.4;
-  CPPUNIT_ASSERT_EQUAL(0,m->getCellContainingPoint(&pos,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),m->getCellContainingPoint(&pos,1e-12));
   pos=3.7;
-  CPPUNIT_ASSERT_EQUAL(1,m->getCellContainingPoint(&pos,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),m->getCellContainingPoint(&pos,1e-12));
   pos=5.9;
-  CPPUNIT_ASSERT_EQUAL(2,m->getCellContainingPoint(&pos,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),m->getCellContainingPoint(&pos,1e-12));
   pos=10.3;
-  CPPUNIT_ASSERT_EQUAL(-1,m->getCellContainingPoint(&pos,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(-1),m->getCellContainingPoint(&pos,1e-12));
   pos=1.3;
-  CPPUNIT_ASSERT_EQUAL(-1,m->getCellContainingPoint(&pos,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(-1),m->getCellContainingPoint(&pos,1e-12));
   //
   MEDCouplingUMesh *m2=m->buildUnstructured();
   m2->checkConsistencyLight();
@@ -607,7 +608,7 @@ void MEDCouplingBasicsTest3::testBuildUnstructuredCMesh1()
   f2->decrRef();
   //
   double pos1[3]={5.,30.,2.};
-  CPPUNIT_ASSERT_EQUAL(16,m->getCellContainingPoint(pos1,1e-12));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(16),m->getCellContainingPoint(pos1,1e-12));
   //
   const double pt[3]={2.4,12.7,-3.4};
   m->scale(pt,3.7);
@@ -622,31 +623,31 @@ void MEDCouplingBasicsTest3::testBuildUnstructuredCMesh1()
 
 void MEDCouplingBasicsTest3::testDataArrayIntInvertO2NNO21()
 {
-  const int arr1[6]={2,0,4,1,5,3};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType arr1[6]={2,0,4,1,5,3};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(6,1);
   std::copy(arr1,arr1+6,da->getPointer());
-  DataArrayInt *da2=da->invertArrayO2N2N2O(6);
+  DataArrayIdType *da2=da->invertArrayO2N2N2O(6);
   CPPUNIT_ASSERT_EQUAL(6,(int)da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
-  const int expected1[6]={1,3,0,5,2,4};
+  const mcIdType expected1[6]={1,3,0,5,2,4};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0));
-  DataArrayInt *da3=da2->invertArrayN2O2O2N(6);
+  DataArrayIdType *da3=da2->invertArrayN2O2O2N(6);
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(arr1[i],da3->getIJ(i,0));
   da3->decrRef();
   da2->decrRef();
   da->decrRef();
   //
-  const int arr2[10]={3,-1,5,4,-1,0,-1,1,2,-1};
-  da=DataArrayInt::New();
+  const mcIdType arr2[10]={3,-1,5,4,-1,0,-1,1,2,-1};
+  da=DataArrayIdType::New();
   da->alloc(10,1);
   std::copy(arr2,arr2+10,da->getPointer());
   da2=da->invertArrayO2N2N2O(6);
   CPPUNIT_ASSERT_EQUAL(6,(int)da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
-  const int expected2[10]={5,7,8,0,3,2};
+  const mcIdType expected2[10]={5,7,8,0,3,2};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],da2->getIJ(i,0));
   da3=da2->invertArrayN2O2O2N(10);
@@ -667,8 +668,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent1()
   a1->setInfoOnComponent(1,"bbbb");
   a1->setInfoOnComponent(2,"cccc");
   a1->setInfoOnComponent(3,"dddd");
-  const int arr2[6]={1,2,1,2,0,0};
-  std::vector<int> arr2V(arr2,arr2+6);
+  const mcIdType arr2[6]={1,2,1,2,0,0};
+  std::vector<std::size_t> arr2V(arr2,arr2+6);
   DataArrayDouble *a2=static_cast<DataArrayDouble *>(a1->keepSelectedComponents(arr2V));
   CPPUNIT_ASSERT_EQUAL(6,(int)a2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(5,(int)a2->getNumberOfTuples());
@@ -692,15 +693,15 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent1()
   CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(4))=="aaaa");
   CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(5))=="aaaa");
   for(int i=0;i<30;i++)
-    CPPUNIT_ASSERT_EQUAL(int(expected1[i]),a4->getIJ(0,i));
+    CPPUNIT_ASSERT_EQUAL((int)expected1[i],a4->getIJ(0,i));
   // setSelectedComponents
-  const int arr3[2]={3,2};
-  std::vector<int> arr3V(arr3,arr3+2);
+  const mcIdType arr3[2]={3,2};
+  std::vector<std::size_t> arr3V(arr3,arr3+2);
   DataArrayDouble *a5=static_cast<DataArrayDouble *>(a1->keepSelectedComponents(arr3V));
   a5->setInfoOnComponent(0,"eeee");
   a5->setInfoOnComponent(1,"ffff");
-  const int arr4[2]={1,2};
-  std::vector<int> arr4V(arr4,arr4+2);
+  const mcIdType arr4[2]={1,2};
+  std::vector<std::size_t> arr4V(arr4,arr4+2);
   a2->setSelectedComponents(a5,arr4V);
   CPPUNIT_ASSERT_EQUAL(6,(int)a2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(5,(int)a2->getNumberOfTuples());
@@ -726,14 +727,14 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent1()
   CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(4))=="aaaa");
   CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(5))=="aaaa");
   for(int i=0;i<30;i++)
-    CPPUNIT_ASSERT_EQUAL(int(expected2[i]),a4->getIJ(0,i));
+    CPPUNIT_ASSERT_EQUAL(expected2[i],(double)a4->getIJ(0,i));
   // test of throw
-  const int arr5[3]={2,3,6};
-  const int arr6[3]={2,7,5};
-  const int arr7[4]={2,1,4,6};
-  std::vector<int> arr5V(arr5,arr5+3);
-  std::vector<int> arr6V(arr6,arr6+3);
-  std::vector<int> arr7V(arr7,arr7+4);
+  const mcIdType arr5[3]={2,3,6};
+  const mcIdType arr6[3]={2,7,5};
+  const mcIdType arr7[4]={2,1,4,6};
+  std::vector<std::size_t> arr5V(arr5,arr5+3);
+  std::vector<std::size_t> arr6V(arr6,arr6+3);
+  std::vector<std::size_t> arr7V(arr7,arr7+4);
   CPPUNIT_ASSERT_THROW(a2->keepSelectedComponents(arr5V),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(a2->keepSelectedComponents(arr6V),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(a2->setSelectedComponents(a1,arr7V),INTERP_KERNEL::Exception);
@@ -764,8 +765,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent2()
   f1->setArray(a1);
   f1->checkConsistencyLight();
   //
-  const int arr2[6]={1,2,1,2,0,0};
-  std::vector<int> arr2V(arr2,arr2+6);
+  const mcIdType arr2[6]={1,2,1,2,0,0};
+  std::vector<std::size_t> arr2V(arr2,arr2+6);
   MEDCouplingFieldDouble *f2=f1->keepSelectedComponents(arr2V);
   CPPUNIT_ASSERT(f2->getMesh()==f1->getMesh());
   CPPUNIT_ASSERT(f2->getTimeDiscretization()==ONE_TIME);
@@ -786,15 +787,15 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent2()
   for(int i=0;i<30;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f2->getIJ(0,i),1e-14);
   //setSelectedComponents
-  const int arr3[2]={3,2};
-  std::vector<int> arr3V(arr3,arr3+2);
+  const mcIdType arr3[2]={3,2};
+  std::vector<std::size_t> arr3V(arr3,arr3+2);
   MEDCouplingFieldDouble *f5=f1->keepSelectedComponents(arr3V);
   f5->setTime(6.7,8,9);
   f5->getArray()->setInfoOnComponent(0,"eeee");
   f5->getArray()->setInfoOnComponent(1,"ffff");
   f5->checkConsistencyLight();
-  const int arr4[2]={1,2};
-  std::vector<int> arr4V(arr4,arr4+2);
+  const mcIdType arr4[2]={1,2};
+  std::vector<std::size_t> arr4V(arr4,arr4+2);
   f2->setSelectedComponents(f5,arr4V);
   CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
@@ -820,7 +821,7 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent2()
 
 void MEDCouplingBasicsTest3::testElementaryDAThrowAndSpecialCases()
 {
-  DataArrayInt *da=DataArrayInt::New();
+  DataArrayIdType *da=DataArrayIdType::New();
   CPPUNIT_ASSERT_THROW(da->checkAllocated(),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(da->fillWithValue(1),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(da->iota(1),INTERP_KERNEL::Exception);
@@ -828,7 +829,7 @@ void MEDCouplingBasicsTest3::testElementaryDAThrowAndSpecialCases()
   da->fillWithValue(11); //11,11,11,11...
   da->iota(10); //10,11,12,13...
   
-  DataArrayInt *db=DataArrayInt::New();
+  DataArrayIdType *db=DataArrayIdType::New();
   db->alloc(7,2);
   
   DataArrayDouble *dbl2=DataArrayDouble::New();
@@ -859,7 +860,7 @@ void MEDCouplingBasicsTest3::testElementaryDAThrowAndSpecialCases()
   CPPUNIT_ASSERT(!dbl->isMonotonic(false, 1.1));
   CPPUNIT_ASSERT(!dbl->isMonotonic(false, -1.1));
   
-  DataArrayInt *dc=DataArrayInt::New();
+  DataArrayIdType *dc=DataArrayIdType::New();
   dc->alloc(14,1);
   
   DataArrayDouble *dd=DataArrayDouble::New();
@@ -878,7 +879,7 @@ void MEDCouplingBasicsTest3::testElementaryDAThrowAndSpecialCases()
  
   CPPUNIT_ASSERT_THROW(db->copyStringInfoFrom(*da),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(db->copyStringInfoFrom(*da),INTERP_KERNEL::Exception);
-  std::vector<int> cIds(2,2);
+  std::vector<std::size_t> cIds(2,2);
   CPPUNIT_ASSERT_THROW(da->copyPartOfStringInfoFrom(*db,cIds),INTERP_KERNEL::Exception);
   cIds[0]=1;
   cIds[0]=-1;
@@ -919,9 +920,9 @@ void MEDCouplingBasicsTest3::testElementaryDAThrowAndSpecialCases()
   
   CPPUNIT_ASSERT_THROW(db->GetNumberOfItemGivenBES(10,9,1,"theMessageInThrow"),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(db->GetNumberOfItemGivenBES(0,1,-1,"theMessageInThrow"),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_EQUAL(10,db->GetNumberOfItemGivenBES(0,10,1,"theMessageInThrow"));
-  CPPUNIT_ASSERT_EQUAL(5,db->GetNumberOfItemGivenBES(0,10,2,"theMessageInThrow"));
-  CPPUNIT_ASSERT_EQUAL(6,db->GetNumberOfItemGivenBES(0,11,2,"theMessageInThrow"));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),db->GetNumberOfItemGivenBES(0,10,1,"theMessageInThrow"));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),db->GetNumberOfItemGivenBES(0,10,2,"theMessageInThrow"));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),db->GetNumberOfItemGivenBES(0,11,2,"theMessageInThrow"));
   
   //std::cout<<"\n!!!!!!!!!\n"<<dd->repr()<<"\n!!!!!!!!!\n";
   CPPUNIT_ASSERT(!((da->repr().find("Number of components : 1"))==std::string::npos));
@@ -945,12 +946,12 @@ void MEDCouplingBasicsTest3::testElementaryDAThrowAndSpecialCases()
   CPPUNIT_ASSERT_THROW(dbl->meldWith(dd),INTERP_KERNEL::Exception);
   
   CPPUNIT_ASSERT_THROW(dbl->setPartOfValuesAdv(dbl2,da),INTERP_KERNEL::Exception); //dbl dbl2 not have the same number of components
-  CPPUNIT_ASSERT_THROW(dbl->setPartOfValuesAdv(dd,da),INTERP_KERNEL::Exception);  //da tuple selector DataArrayInt instance not have exactly 2 components
+  CPPUNIT_ASSERT_THROW(dbl->setPartOfValuesAdv(dd,da),INTERP_KERNEL::Exception);  //da tuple selector DataArrayIdType instance not have exactly 2 components
   
   DataArrayDouble *dbl3=DataArrayDouble::New();
   dbl3->alloc(6,2);
   dbl3->fillWithValue(11.);
-  int tupleId;
+  mcIdType tupleId;
   //bad number of components
   CPPUNIT_ASSERT_THROW(dbl3->getMaxValue(tupleId),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(dd->getMaxValue(tupleId),INTERP_KERNEL::Exception);
@@ -1023,14 +1024,14 @@ void MEDCouplingBasicsTest3::testElementaryDAThrowAndSpecialCases()
 
 void MEDCouplingBasicsTest3::testDAIGetIdsEqual1()
 {
-  const int tab1[7]={5,-2,-4,-2,3,2,-2};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType tab1[7]={5,-2,-4,-2,3,2,-2};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(7,1);
   std::copy(tab1,tab1+7,da->getPointer());
-  DataArrayInt *da2=da->findIdsEqual(-2);
+  DataArrayIdType *da2=da->findIdsEqual(-2);
   CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
-  const int expected1[3]={1,3,6};
+  const mcIdType expected1[3]={1,3,6};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,da2->getConstPointer()));
   da2->decrRef();
   da->decrRef();
@@ -1038,16 +1039,16 @@ void MEDCouplingBasicsTest3::testDAIGetIdsEqual1()
 
 void MEDCouplingBasicsTest3::testDAIGetIdsEqualList1()
 {
-  const int tab1[7]={5,-2,-4,-2,3,2,-2};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType tab1[7]={5,-2,-4,-2,3,2,-2};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(7,1);
   std::copy(tab1,tab1+7,da->getPointer());
-  const int tab2[3]={3,-2,0};
-  std::vector<int> tab2V(tab2,tab2+3);
-  DataArrayInt *da2=da->findIdsEqualList(&tab2V[0],&tab2V[0]+tab2V.size());
+  const mcIdType tab2[3]={3,-2,0};
+  std::vector<mcIdType> tab2V(tab2,tab2+3);
+  DataArrayIdType *da2=da->findIdsEqualList(&tab2V[0],&tab2V[0]+tab2V.size());
   CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
-  const int expected1[4]={1,3,4,6};
+  const mcIdType expected1[4]={1,3,4,6};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+4,da2->getConstPointer()));
   da2->decrRef();
   da->decrRef();
@@ -1055,12 +1056,12 @@ void MEDCouplingBasicsTest3::testDAIGetIdsEqualList1()
 
 void MEDCouplingBasicsTest3::testDAFromNoInterlace1()
 {
-  const int tab1[15]={1,11,21,31,41,2,12,22,32,42,3,13,23,33,43};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType tab1[15]={1,11,21,31,41,2,12,22,32,42,3,13,23,33,43};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(5,3);
   std::copy(tab1,tab1+15,da->getPointer());
-  DataArrayInt *da2=da->fromNoInterlace();
-  const int expected1[15]={1,2,3,11,12,13,21,22,23,31,32,33,41,42,43};
+  DataArrayIdType *da2=da->fromNoInterlace();
+  const mcIdType expected1[15]={1,2,3,11,12,13,21,22,23,31,32,33,41,42,43};
   CPPUNIT_ASSERT_EQUAL(5,(int)da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components !
   CPPUNIT_ASSERT(std::equal(expected1,expected1+15,da2->getConstPointer()));
@@ -1077,12 +1078,12 @@ void MEDCouplingBasicsTest3::testDAFromNoInterlace1()
 
 void MEDCouplingBasicsTest3::testDAToNoInterlace1()
 {
-  const int tab1[15]={1,2,3,11,12,13,21,22,23,31,32,33,41,42,43};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType tab1[15]={1,2,3,11,12,13,21,22,23,31,32,33,41,42,43};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(5,3);
   std::copy(tab1,tab1+15,da->getPointer());
-  DataArrayInt *da2=da->toNoInterlace();
-  const int expected1[15]={1,11,21,31,41,2,12,22,32,42,3,13,23,33,43};
+  DataArrayIdType *da2=da->toNoInterlace();
+  const mcIdType expected1[15]={1,11,21,31,41,2,12,22,32,42,3,13,23,33,43};
   CPPUNIT_ASSERT_EQUAL(5,(int)da2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components !
   CPPUNIT_ASSERT(std::equal(expected1,expected1+15,da2->getConstPointer()));
@@ -1099,8 +1100,8 @@ void MEDCouplingBasicsTest3::testDAToNoInterlace1()
 
 void MEDCouplingBasicsTest3::testDAIsUniform1()
 {
-  const int tab1[5]={1,1,1,1,1};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType tab1[5]={1,1,1,1,1};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(5,1);
   std::copy(tab1,tab1+5,da->getPointer());
   CPPUNIT_ASSERT(da->isUniform(1));
@@ -1161,8 +1162,8 @@ void MEDCouplingBasicsTest3::testDADFromSpherToCart1()
 
 void MEDCouplingBasicsTest3::testUnPolyze1()
 {
-  const int elts[8]={0,1,2,3,4,5,6,7};
-  std::vector<int> eltsV(elts,elts+8);
+  const mcIdType elts[8]={0,1,2,3,4,5,6,7};
+  std::vector<mcIdType> eltsV(elts,elts+8);
   MEDCouplingUMesh *mesh=build3DTargetMesh_1();
   mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
   mesh->unPolyze();
@@ -1208,7 +1209,7 @@ void MEDCouplingBasicsTest3::testUnPolyze1()
 void MEDCouplingBasicsTest3::testConvertDegeneratedCells1()
 {
   MEDCouplingUMesh *mesh=build3DTargetMesh_1();
-  int conn[32]={0,1,3,3,9,10,12,12, 0,1,3,4,9,9,9,9, 1,1,1,1,10,12,9,10, 10,11,12,9,1,1,1,1};
+  mcIdType conn[32]={0,1,3,3,9,10,12,12, 0,1,3,4,9,9,9,9, 1,1,1,1,10,12,9,10, 10,11,12,9,1,1,1,1};
   mesh->allocateCells(4);
   mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn);
   mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+8);
@@ -1250,24 +1251,24 @@ void MEDCouplingBasicsTest3::testGetNodeIdsNearPoints1()
   mesh->setCoords(tmp2);
   tmp2->decrRef();
   const double pts[6]={0.2,0.2,0.1,0.3,-0.3,0.7};
-  DataArrayInt *c=mesh->getNodeIdsNearPoint(pts,1e-7);
+  DataArrayIdType *c=mesh->getNodeIdsNearPoint(pts,1e-7);
   CPPUNIT_ASSERT_EQUAL(3,(int)c->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(4,c->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(9,c->getIJ(1,0));
-  CPPUNIT_ASSERT_EQUAL(11,c->getIJ(2,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),c->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9),c->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(11),c->getIJ(2,0));
   c->decrRef();
-  DataArrayInt *cI=0;
+  DataArrayIdType *cI=0;
   mesh->getNodeIdsNearPoints(pts,3,1e-7,c,cI);
-  CPPUNIT_ASSERT_EQUAL(4,(int)cI->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(4,(int)c->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(4,c->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(9,c->getIJ(1,0));
-  CPPUNIT_ASSERT_EQUAL(11,c->getIJ(2,0));
-  CPPUNIT_ASSERT_EQUAL(6,c->getIJ(3,0));
-  CPPUNIT_ASSERT_EQUAL(0,cI->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(3,cI->getIJ(1,0));
-  CPPUNIT_ASSERT_EQUAL(3,cI->getIJ(2,0));
-  CPPUNIT_ASSERT_EQUAL(4,cI->getIJ(3,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),cI->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),c->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),c->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9),c->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(11),c->getIJ(2,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),c->getIJ(3,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),cI->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),cI->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),cI->getIJ(2,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),cI->getIJ(3,0));
   c->decrRef();
   cI->decrRef();
   mesh->decrRef();
@@ -1392,17 +1393,17 @@ void MEDCouplingBasicsTest3::testExtrudedMesh5()
   DataArrayDouble *h=g->fromPolarToCart();
   f->setCoords(h);
   MEDCouplingUMesh *i=c->buildExtrudedMesh(f,1);
-  CPPUNIT_ASSERT_EQUAL(52,i->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(52,(int)i->getNumberOfNodes());
   bool tmp2;
-  int tmp3;
-  DataArrayInt *tmp=i->mergeNodes(1e-9,tmp2,tmp3);
+  mcIdType tmp3;
+  DataArrayIdType *tmp=i->mergeNodes(1e-9,tmp2,tmp3);
   CPPUNIT_ASSERT(tmp2);
-  CPPUNIT_ASSERT_EQUAL(37,tmp3);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(37),tmp3);
   tmp->decrRef();
   i->convertDegeneratedCells();
   i->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(36,(int)i->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(37,i->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(37,(int)i->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(12,(int)i->getNumberOfCellsWithType(INTERP_KERNEL::NORM_TRI3));
   CPPUNIT_ASSERT_EQUAL(24,(int)i->getNumberOfCellsWithType(INTERP_KERNEL::NORM_QUAD4));
   const double expected1[3]={0.25,0.75,2.0625};
@@ -1504,12 +1505,12 @@ void MEDCouplingBasicsTest3::testExtrudedMesh7()
   DataArrayDouble *h=g->fromPolarToCart();
   f->setCoords(h);
   MEDCouplingUMesh *i=c->buildExtrudedMesh(f,1);
-  CPPUNIT_ASSERT_EQUAL(52,i->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(52,(int)i->getNumberOfNodes());
   bool tmp2;
-  int tmp3;
-  DataArrayInt *tmp=i->mergeNodes(1e-9,tmp2,tmp3);
+  mcIdType tmp3;
+  DataArrayIdType *tmp=i->mergeNodes(1e-9,tmp2,tmp3);
   CPPUNIT_ASSERT(tmp2);
-  CPPUNIT_ASSERT_EQUAL(37,tmp3);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(37),tmp3);
   tmp->decrRef();
   i->convertDegeneratedCells();
   const double vec1[3]={10.,0.,0.};
@@ -1521,7 +1522,7 @@ void MEDCouplingBasicsTest3::testExtrudedMesh7()
   MEDCouplingFieldDouble *f2=i3->getMeasureField(true);
   tmp=i->mergeNodes(1e-9,tmp2,tmp3);
   CPPUNIT_ASSERT(tmp2);
-  CPPUNIT_ASSERT_EQUAL(444,tmp3);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(444),tmp3);
   tmp->decrRef();
   const double expected1[36]={1.327751058489274, 4.2942574094314701, 13.024068164857139, 1.3069177251569044, 4.1484240761012954, 12.297505664866796, 1.270833333332571, 3.8958333333309674, 11.039062499993179, 1.2291666666659207, 3.6041666666644425, 9.585937499993932, 1.1930822748415895, 3.3515759238941376, 8.3274943351204556, 1.1722489415082769, 3.2057425905609289, 7.6009318351210622, 1.1722489415082862, 3.2057425905609884, 7.6009318351213713, 1.1930822748416161, 3.3515759238943001, 8.3274943351212727, 1.2291666666659564, 3.6041666666646734, 9.5859374999950777, 1.2708333333326081, 3.8958333333311868, 11.039062499994293, 1.3069177251569224, 4.1484240761014384, 12.297505664867627, 1.3277510584902354, 4.2942574094346071, 13.024068164866796};
   int kk=0;
@@ -1546,13 +1547,13 @@ void MEDCouplingBasicsTest3::testExtrudedMesh7()
 void MEDCouplingBasicsTest3::testSimplexize1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  std::vector<int> v(1);
+  std::vector<mcIdType> v(1);
   v[0]=3;
   m->convertToPolyTypes(&v[0],&v[0]+v.size());
-  DataArrayInt *da=m->simplexize(0);
+  DataArrayIdType *da=m->simplexize(0);
   CPPUNIT_ASSERT_EQUAL(7,(int)da->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
-  const int expected2[7]={0,0,1,2,3,4,4};
+  const mcIdType expected2[7]={0,0,1,2,3,4,4};
   for(int i=0;i<7;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],da->getIJ(i,0));
   m->checkConsistencyLight();
@@ -1608,7 +1609,7 @@ void MEDCouplingBasicsTest3::testSimplexize1()
 void MEDCouplingBasicsTest3::testSimplexize2()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  std::vector<int> v(1);
+  std::vector<mcIdType> v(1);
   v[0]=3;
   m->convertToPolyTypes(&v[0],&v[0]+v.size());
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
@@ -1688,7 +1689,7 @@ void MEDCouplingBasicsTest3::testDAMeld1()
   CPPUNIT_ASSERT(da4->getInfoOnComponent(4)=="c2da3");
   for(int i=0;i<35;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],da4->getIJ(0,i),1e-10);
-  // test of static method DataArrayInt::meld
+  // test of static method DataArrayIdType::meld
   dai1=da1C->convertToIntArr();
   DataArrayInt *dai4=DataArrayInt::Meld(dai1,dai3);
   CPPUNIT_ASSERT_EQUAL(5,(int)dai4->getNumberOfComponents());
@@ -1699,7 +1700,7 @@ void MEDCouplingBasicsTest3::testDAMeld1()
   CPPUNIT_ASSERT(dai4->getInfoOnComponent(3)=="c1da3");
   CPPUNIT_ASSERT(dai4->getInfoOnComponent(4)=="c2da3");
   for(int i=0;i<35;i++)
-    CPPUNIT_ASSERT_EQUAL((int)expected1[i],dai4->getIJ(0,i));
+    CPPUNIT_ASSERT_EQUAL(expected1[i],(double)dai4->getIJ(0,i));
   //
   dai4->decrRef();
   da4->decrRef();
@@ -1781,9 +1782,9 @@ void MEDCouplingBasicsTest3::testMergeNodes2()
   tmp[1]=m2;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::MergeUMeshes(tmp);
   bool b;
-  int newNbOfNodes;
-  DataArrayInt *da=m3->mergeNodesCenter(0.01,b,newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL(9,m3->getNumberOfNodes());
+  mcIdType newNbOfNodes;
+  DataArrayIdType *da=m3->mergeNodesCenter(0.01,b,newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(9,(int)m3->getNumberOfNodes());
   const double expected1[18]={-0.299,-0.3, 0.201,-0.3, 0.701,-0.3, -0.299,0.2, 0.201,0.2, 0.701,0.2, -0.299,0.7, 0.201,0.7, 0.701,0.7};
   for(int i=0;i<18;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],m3->getCoords()->getIJ(0,i),1e-13);
@@ -1836,14 +1837,14 @@ void MEDCouplingBasicsTest3::testMergeField2()
 
 void MEDCouplingBasicsTest3::testDAIBuildComplement1()
 {
-  DataArrayInt *a=DataArrayInt::New();
-  const int tab[4]={3,1,7,8};
+  DataArrayIdType *a=DataArrayIdType::New();
+  const mcIdType tab[4]={3,1,7,8};
   a->alloc(4,1);
   std::copy(tab,tab+4,a->getPointer());
-  DataArrayInt *b=a->buildComplement(12);
+  DataArrayIdType *b=a->buildComplement(12);
   CPPUNIT_ASSERT_EQUAL(8,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents());
-  const int expected1[8]={0,2,4,5,6,9,10,11};
+  const mcIdType expected1[8]={0,2,4,5,6,9,10,11};
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i));
   b->decrRef();
@@ -1852,18 +1853,18 @@ void MEDCouplingBasicsTest3::testDAIBuildComplement1()
 
 void MEDCouplingBasicsTest3::testDAIBuildUnion1()
 {
-  DataArrayInt *a=DataArrayInt::New();
-  const int tab1[4]={3,1,7,8};
+  DataArrayIdType *a=DataArrayIdType::New();
+  const mcIdType tab1[4]={3,1,7,8};
   a->alloc(4,1);
   std::copy(tab1,tab1+4,a->getPointer());
-  DataArrayInt *c=DataArrayInt::New();
-  const int tab2[5]={5,3,0,18,8};
+  DataArrayIdType *c=DataArrayIdType::New();
+  const mcIdType tab2[5]={5,3,0,18,8};
   c->alloc(5,1);
   std::copy(tab2,tab2+5,c->getPointer());
-  DataArrayInt *b=a->buildUnion(c);
+  DataArrayIdType *b=a->buildUnion(c);
   CPPUNIT_ASSERT_EQUAL(7,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents());
-  const int expected1[7]={0,1,3,5,7,8,18};
+  const mcIdType expected1[7]={0,1,3,5,7,8,18};
   for(int i=0;i<7;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i));
   c->decrRef();
@@ -1873,18 +1874,18 @@ void MEDCouplingBasicsTest3::testDAIBuildUnion1()
 
 void MEDCouplingBasicsTest3::testDAIBuildIntersection1()
 {
-  DataArrayInt *a=DataArrayInt::New();
-  const int tab1[4]={3,1,7,8};
+  DataArrayIdType *a=DataArrayIdType::New();
+  const mcIdType tab1[4]={3,1,7,8};
   a->alloc(4,1);
   std::copy(tab1,tab1+4,a->getPointer());
-  DataArrayInt *c=DataArrayInt::New();
-  const int tab2[5]={5,3,0,18,8};
+  DataArrayIdType *c=DataArrayIdType::New();
+  const mcIdType tab2[5]={5,3,0,18,8};
   c->alloc(5,1);
   std::copy(tab2,tab2+5,c->getPointer());
-  DataArrayInt *b=a->buildIntersection(c);
+  DataArrayIdType *b=a->buildIntersection(c);
   CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents());
-  const int expected1[2]={3,8};
+  const mcIdType expected1[2]={3,8};
   for(int i=0;i<2;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i));
   c->decrRef();
@@ -1894,14 +1895,14 @@ void MEDCouplingBasicsTest3::testDAIBuildIntersection1()
 
 void MEDCouplingBasicsTest3::testDAIDeltaShiftIndex1()
 {
-  DataArrayInt *a=DataArrayInt::New();
-  const int tab[7]={1,3,6,7,7,9,15};
+  DataArrayIdType *a=DataArrayIdType::New();
+  const mcIdType tab[7]={1,3,6,7,7,9,15};
   a->alloc(7,1);
   std::copy(tab,tab+7,a->getPointer());
-  DataArrayInt *b=a->deltaShiftIndex();
+  DataArrayIdType *b=a->deltaShiftIndex();
   CPPUNIT_ASSERT_EQUAL(6,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents());
-  const int expected1[6]={2,3,1,0,2,6};
+  const mcIdType expected1[6]={2,3,1,0,2,6};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i));
   b->decrRef();
@@ -1917,7 +1918,7 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleIdSafe1()
   const double arr1[14]={1.1,11.1,2.1,12.1,3.1,13.1,4.1,14.1,5.1,15.1,6.1,16.1,7.1,17.1};
   std::copy(arr1,arr1+14,a->getPointer());
   //
-  const int arr2[7]={4,2,0,6,5};
+  const mcIdType arr2[7]={4,2,0,6,5};
   DataArrayDouble *b=a->selectByTupleIdSafe(arr2,arr2+5);
   CPPUNIT_ASSERT_EQUAL(5,(int)b->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents());
@@ -1926,25 +1927,25 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleIdSafe1()
   const double expected1[10]={5.1,15.1,3.1,13.1,1.1,11.1,7.1,17.1,6.1,16.1};
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],b->getIJ(0,i),1e-14);
-  const int arr4[5]={4,-1,0,6,5};
+  const mcIdType arr4[5]={4,-1,0,6,5};
   CPPUNIT_ASSERT_THROW(a->selectByTupleIdSafe(arr4,arr4+5),INTERP_KERNEL::Exception);
-  const int arr5[5]={4,2,0,6,7};
+  const mcIdType arr5[5]={4,2,0,6,7};
   CPPUNIT_ASSERT_THROW(a->selectByTupleIdSafe(arr5,arr5+5),INTERP_KERNEL::Exception);
   b->decrRef();
   a->decrRef();
   //
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(7,2);
   c->setInfoOnComponent(0,"toto");
   c->setInfoOnComponent(1,"tata");
-  const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
   std::copy(arr3,arr3+14,c->getPointer());
-  DataArrayInt *d=c->selectByTupleIdSafe(arr2,arr2+5);
+  DataArrayIdType *d=c->selectByTupleIdSafe(arr2,arr2+5);
   CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto");
   CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata");
-  const int expected2[10]={5,15,3,13,1,11,7,17,6,16};
+  const mcIdType expected2[10]={5,15,3,13,1,11,7,17,6,16};
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],d->getIJ(0,i));
   CPPUNIT_ASSERT_THROW(c->selectByTupleIdSafe(arr4,arr4+5),INTERP_KERNEL::Exception);
@@ -1956,9 +1957,9 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleIdSafe1()
 void MEDCouplingBasicsTest3::testAreCellsIncludedIn1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  const int pt[2]={1,3};
+  const mcIdType pt[2]={1,3};
   MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->buildPartOfMySelf(pt,pt+2,true);
-  DataArrayInt *tmp;
+  DataArrayIdType *tmp;
   CPPUNIT_ASSERT(m->areCellsIncludedIn(m2,0,tmp));
   CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)tmp->getNumberOfComponents());
@@ -1973,19 +1974,19 @@ void MEDCouplingBasicsTest3::testAreCellsIncludedIn1()
 
 void MEDCouplingBasicsTest3::testDAIBuildSubstraction1()
 {
-  DataArrayInt *a=DataArrayInt::New();
-  const int aa[]={2,3,6,8,9};
+  DataArrayIdType *a=DataArrayIdType::New();
+  const mcIdType aa[]={2,3,6,8,9};
   a->alloc(5,1);
   std::copy(aa,aa+5,a->getPointer());
-  DataArrayInt *b=DataArrayInt::New();
-  const int bb[]={1,3,5,9,11};
+  DataArrayIdType *b=DataArrayIdType::New();
+  const mcIdType bb[]={1,3,5,9,11};
   b->alloc(5,1);
   std::copy(bb,bb+5,b->getPointer());
   //
-  DataArrayInt *c=a->buildSubstraction(b);
+  DataArrayIdType *c=a->buildSubstraction(b);
   CPPUNIT_ASSERT_EQUAL(3,(int)c->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)c->getNumberOfComponents());
-  const int expected1[3]={2,6,8};
+  const mcIdType expected1[3]={2,6,8};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer()));
   //
   c->decrRef();
@@ -1996,10 +1997,10 @@ void MEDCouplingBasicsTest3::testDAIBuildSubstraction1()
 void MEDCouplingBasicsTest3::testBuildOrthogonalField2()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  DataArrayInt *d1=DataArrayInt::New();
-  DataArrayInt *d2=DataArrayInt::New();
-  DataArrayInt *d3=DataArrayInt::New();
-  DataArrayInt *d4=DataArrayInt::New();
+  DataArrayIdType *d1=DataArrayIdType::New();
+  DataArrayIdType *d2=DataArrayIdType::New();
+  DataArrayIdType *d3=DataArrayIdType::New();
+  DataArrayIdType *d4=DataArrayIdType::New();
   MEDCouplingUMesh *m1=m->buildDescendingConnectivity(d1,d2,d3,d4);
   //
   MEDCouplingFieldDouble *f1=m1->buildOrthogonalField();
@@ -2023,7 +2024,7 @@ void MEDCouplingBasicsTest3::testBuildOrthogonalField2()
 void MEDCouplingBasicsTest3::testUMInsertNextCell1()
 {
   double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 };
-  int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->allocateCells(5);
   CPPUNIT_ASSERT_THROW(targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn),INTERP_KERNEL::Exception);
@@ -2049,10 +2050,10 @@ void MEDCouplingBasicsTest3::testUMInsertNextCell1()
 void MEDCouplingBasicsTest3::testFieldOperatorDivDiffComp1()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  DataArrayInt *d1=DataArrayInt::New();
-  DataArrayInt *d2=DataArrayInt::New();
-  DataArrayInt *d3=DataArrayInt::New();
-  DataArrayInt *d4=DataArrayInt::New();
+  DataArrayIdType *d1=DataArrayIdType::New();
+  DataArrayIdType *d2=DataArrayIdType::New();
+  DataArrayIdType *d3=DataArrayIdType::New();
+  DataArrayIdType *d4=DataArrayIdType::New();
   MEDCouplingUMesh *m1=m->buildDescendingConnectivity(d1,d2,d3,d4);
   //
   MEDCouplingFieldDouble *f1=m1->buildOrthogonalField();
@@ -2089,58 +2090,58 @@ void MEDCouplingBasicsTest3::testFieldOperatorDivDiffComp1()
 
 void MEDCouplingBasicsTest3::testDARearrange1()
 {
-  DataArrayInt *da1=DataArrayInt::New();
+  DataArrayIdType *da1=DataArrayIdType::New();
   da1->alloc(12,1);
   da1->iota(0);
-  const int *ptr=da1->getConstPointer();
+  const mcIdType *ptr=da1->getConstPointer();
   //
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da1->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(12,(int)da1->getNumberOfTuples());
   da1->rearrange(4);
   CPPUNIT_ASSERT(ptr==da1->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da1->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfTuples());
-  for(int i=0;i<12;i++)
+  for(mcIdType i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i));
   //
   da1->rearrange(6);
   CPPUNIT_ASSERT(ptr==da1->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da1->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(6,(int)da1->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(2,(int)da1->getNumberOfTuples());
-  for(int i=0;i<12;i++)
+  for(mcIdType i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i));
   //
   CPPUNIT_ASSERT_THROW(da1->rearrange(7),INTERP_KERNEL::Exception);
   //
   da1->rearrange(12);
   CPPUNIT_ASSERT(ptr==da1->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da1->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(12,(int)da1->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfTuples());
-  for(int i=0;i<12;i++)
+  for(mcIdType i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i));
   //
   da1->rearrange(3);
   CPPUNIT_ASSERT(ptr==da1->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da1->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples());
-  for(int i=0;i<12;i++)
+  for(mcIdType i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i));
   //double
   MCAuto<DataArrayDouble> da2=da1->convertToDblArr();
   da1->decrRef();
   const double *ptr2=da2->getConstPointer();
   //
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da2->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
   da2->rearrange(4);
   CPPUNIT_ASSERT(ptr2==da2->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da2->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfTuples());
   for(int i=0;i<12;i++)
@@ -2148,7 +2149,7 @@ void MEDCouplingBasicsTest3::testDARearrange1()
   //
   da2->rearrange(6);
   CPPUNIT_ASSERT(ptr2==da2->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da2->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(6,(int)da2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(2,(int)da2->getNumberOfTuples());
   for(int i=0;i<12;i++)
@@ -2158,7 +2159,7 @@ void MEDCouplingBasicsTest3::testDARearrange1()
   //
   da2->rearrange(1);
   CPPUNIT_ASSERT(ptr2==da2->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da2->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(12,(int)da2->getNumberOfTuples());
   for(int i=0;i<12;i++)
@@ -2166,7 +2167,7 @@ void MEDCouplingBasicsTest3::testDARearrange1()
   //
   da2->rearrange(3);
   CPPUNIT_ASSERT(ptr2==da2->getConstPointer());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(12),da2->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
   for(int i=0;i<12;i++)
@@ -2175,12 +2176,12 @@ void MEDCouplingBasicsTest3::testDARearrange1()
 
 void MEDCouplingBasicsTest3::testGetDifferentValues1()
 {
-  DataArrayInt *da1=DataArrayInt::New();
-  const int arr[12]={1,2,3,2,2,3,5,1,5,5,2,2};
+  DataArrayIdType *da1=DataArrayIdType::New();
+  const mcIdType arr[12]={1,2,3,2,2,3,5,1,5,5,2,2};
   da1->alloc(4,3);
   std::copy(arr,arr+12,da1->getPointer());
-  DataArrayInt *s=da1->getDifferentValues();
-  const int expected1[4]={1,2,3,5};
+  DataArrayIdType *s=da1->getDifferentValues();
+  const mcIdType expected1[4]={1,2,3,5};
   CPPUNIT_ASSERT_EQUAL(4,(int)s->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+4,s->begin()));
   da1->decrRef();
@@ -2189,16 +2190,16 @@ void MEDCouplingBasicsTest3::testGetDifferentValues1()
 
 void MEDCouplingBasicsTest3::testDAIBuildPermutationArr1()
 {
-  DataArrayInt *a=DataArrayInt::New();
-  const int vala[5]={4,5,6,7,8};
+  DataArrayIdType *a=DataArrayIdType::New();
+  const mcIdType vala[5]={4,5,6,7,8};
   a->alloc(5,1);
   std::copy(vala,vala+5,a->getPointer());
-  DataArrayInt *b=DataArrayInt::New();
-  const int valb[5]={5,4,8,6,7};
+  DataArrayIdType *b=DataArrayIdType::New();
+  const mcIdType valb[5]={5,4,8,6,7};
   b->alloc(5,1);
   std::copy(valb,valb+5,b->getPointer());
-  DataArrayInt *c=a->buildPermutationArr(*b);
-  const int expect1[5]={1,0,4,2,3};
+  DataArrayIdType *c=a->buildPermutationArr(*b);
+  const mcIdType expect1[5]={1,0,4,2,3};
   CPPUNIT_ASSERT_EQUAL(5,(int)c->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)c->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expect1,expect1+5,c->getConstPointer()));
@@ -2212,11 +2213,11 @@ void MEDCouplingBasicsTest3::testDAIBuildPermutationArr1()
   CPPUNIT_ASSERT(a->isEqualWithoutConsideringStrAndOrder(*b));
   c->decrRef();
   c=a->buildPermutationArr(*b);
-  const int expect2[5]={1,3,4,2,3};
+  const mcIdType expect2[5]={1,3,4,2,3};
   CPPUNIT_ASSERT(std::equal(expect2,expect2+5,c->getConstPointer()));
   MCAuto<DataArrayDouble> d=b->convertToDblArr();
   b->sort();
-  const int expect3[5]={4,4,5,6,8};
+  const mcIdType expect3[5]={4,4,5,6,8};
   CPPUNIT_ASSERT(std::equal(expect3,expect3+5,b->getConstPointer()));
   d->sort();
   CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples());
@@ -2238,7 +2239,7 @@ void MEDCouplingBasicsTest3::testAreCellsIncludedIn2()
   CPPUNIT_ASSERT_EQUAL(3,m2->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,m2->getMeshDimension());
   m2->setName(myName);
-  DataArrayInt *tmp;
+  DataArrayIdType *tmp;
   CPPUNIT_ASSERT(m->areCellsIncludedIn(m2,0,tmp));
   CPPUNIT_ASSERT(std::string(myName)==tmp->getName());
   CPPUNIT_ASSERT_EQUAL(0,(int)tmp->getNumberOfTuples());
@@ -2251,7 +2252,7 @@ void MEDCouplingBasicsTest3::testAreCellsIncludedIn2()
 void MEDCouplingBasicsTest3::testUMeshGetPartBarycenterAndOwner1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
-  const int part[3]={1,0,4};
+  const mcIdType part[3]={1,0,4};
   DataArrayDouble *b=m1->getPartBarycenterAndOwner(part,part+3);
   CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(3,(int)b->getNumberOfTuples());
@@ -2265,7 +2266,7 @@ void MEDCouplingBasicsTest3::testUMeshGetPartBarycenterAndOwner1()
 void MEDCouplingBasicsTest3::testUMeshGetPartMeasureField1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
-  const int part[3]={1,0,4};
+  const mcIdType part[3]={1,0,4};
   DataArrayDouble *b=m1->getPartMeasureField(true,part,part+3);
   CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(3,(int)b->getNumberOfTuples());
@@ -2280,7 +2281,7 @@ void MEDCouplingBasicsTest3::testUMeshBuildPartOrthogonalField1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
   m1->changeSpaceDimension(3);
-  const int part[3]={1,0,4};
+  const mcIdType part[3]={1,0,4};
   MEDCouplingFieldDouble *b=m1->buildPartOrthogonalField(part,part+3);
   CPPUNIT_ASSERT_EQUAL(3,(int)b->getArray()->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(3,(int)b->getArray()->getNumberOfTuples());
@@ -2294,16 +2295,16 @@ void MEDCouplingBasicsTest3::testUMeshBuildPartOrthogonalField1()
 void MEDCouplingBasicsTest3::testUMeshGetTypesOfPart1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
-  const int part1[]={0,3,4};
+  const mcIdType part1[]={0,3,4};
   std::set<INTERP_KERNEL::NormalizedCellType> s;
   s=m1->getTypesOfPart(part1,part1+3);
   CPPUNIT_ASSERT(s.size()==1);
   CPPUNIT_ASSERT(*s.begin()==INTERP_KERNEL::NORM_QUAD4);
-  const int part2[]={2,2,2,1};
+  const mcIdType part2[]={2,2,2,1};
   s=m1->getTypesOfPart(part2,part2+4);
   CPPUNIT_ASSERT(s.size()==1);
   CPPUNIT_ASSERT(*s.begin()==INTERP_KERNEL::NORM_TRI3);
-  const int part3[]={3,2,1};
+  const mcIdType part3[]={3,2,1};
   s=m1->getTypesOfPart(part3,part3+3);
   CPPUNIT_ASSERT(s.size()==2);
   CPPUNIT_ASSERT(*s.begin()==INTERP_KERNEL::NORM_TRI3);
@@ -2314,26 +2315,26 @@ void MEDCouplingBasicsTest3::testUMeshGetTypesOfPart1()
 void MEDCouplingBasicsTest3::testUMeshKeepCellIdsByType1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
-  const int part1[3]={0,3,4};
-  DataArrayInt *a=m1->keepCellIdsByType(INTERP_KERNEL::NORM_TRI3,part1,part1+3);
+  const mcIdType part1[3]={0,3,4};
+  DataArrayIdType *a=m1->keepCellIdsByType(INTERP_KERNEL::NORM_TRI3,part1,part1+3);
   CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(0,(int)a->getNumberOfTuples());
   a->decrRef();
   //
-  const int part2[5]={3,2,0,2,4};
+  const mcIdType part2[5]={3,2,0,2,4};
   a=m1->keepCellIdsByType(INTERP_KERNEL::NORM_TRI3,part2,part2+5);
   CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(2,(int)a->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,a->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(2,a->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(2,(int)a->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(2,(int)a->getIJ(1,0));
   a->decrRef();
   //
   a=m1->keepCellIdsByType(INTERP_KERNEL::NORM_QUAD4,part2,part2+5);
   CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(3,(int)a->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(3,a->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(0,a->getIJ(1,0));
-  CPPUNIT_ASSERT_EQUAL(4,a->getIJ(2,0));
+  CPPUNIT_ASSERT_EQUAL(3,(int)a->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(0,(int)a->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(4,(int)a->getIJ(2,0));
   //
   a->decrRef();
   m1->decrRef();
@@ -2341,24 +2342,24 @@ void MEDCouplingBasicsTest3::testUMeshKeepCellIdsByType1()
 
 void MEDCouplingBasicsTest3::testDAIAggregateMulti1()
 {
-  DataArrayInt *a=DataArrayInt::New();
+  DataArrayIdType *a=DataArrayIdType::New();
   a->setName("aa");
   a->alloc(4,1);
   a->iota(0);
   a->rearrange(2);
-  DataArrayInt *b=DataArrayInt::New();
+  DataArrayIdType *b=DataArrayIdType::New();
   b->setName("bb");
   b->alloc(6,1);
   b->iota(0);
   b->rearrange(2);
   //
-  std::vector<const DataArrayInt *> v(2);
+  std::vector<const DataArrayIdType *> v(2);
   v[0]=a; v[1]=b;
-  DataArrayInt *c=DataArrayInt::Aggregate(v);
+  DataArrayIdType *c=DataArrayIdType::Aggregate(v);
   CPPUNIT_ASSERT_EQUAL(5,(int)c->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,(int)c->getNumberOfComponents());
   CPPUNIT_ASSERT(c->getName()=="aa");
-  const int expect1[10]={0,1,2,3,0,1,2,3,4,5};
+  const mcIdType expect1[10]={0,1,2,3,0,1,2,3,4,5};
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_EQUAL(expect1[i],c->getIJ(0,i));
   //
@@ -2373,9 +2374,9 @@ void MEDCouplingBasicsTest3::testMergeUMeshes2()
   MEDCouplingUMesh *m2=build3DSurfTargetMesh_1();
   MEDCouplingUMesh *m3=build3DSurfTargetMesh_1();
   //
-  const int vec1[3]={0,2,3};
+  const mcIdType vec1[3]={0,2,3};
   MEDCouplingUMesh *m2_2=(MEDCouplingUMesh *)m2->buildPartOfMySelf(vec1,vec1+3,false);
-  const int vec2[2]={1,1};
+  const mcIdType vec2[2]={1,1};
   MEDCouplingUMesh *m3_2=(MEDCouplingUMesh *)m3->buildPartOfMySelf(vec2,vec2+2,false);
   //
   std::vector<const MEDCouplingUMesh *> ms(3);
@@ -2386,32 +2387,32 @@ void MEDCouplingBasicsTest3::testMergeUMeshes2()
   MEDCouplingUMesh *m4=MEDCouplingUMesh::MergeUMeshes(ms);
   m4->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(10,(int)m4->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(20,m4->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL(45,m4->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(20,(int)m4->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(45,(int)m4->getNodalConnectivityArrayLen());
   //
   MEDCouplingMesh *m4bis=MEDCouplingMesh::MergeMeshes(ms2);
   CPPUNIT_ASSERT(m4->isEqual(m4bis,1e-12));
   m4bis->decrRef();
   //
-  const int vec3[5]={0,1,2,3,4};
+  const mcIdType vec3[5]={0,1,2,3,4};
   MEDCouplingUMesh *m4_1=(MEDCouplingUMesh *)m4->buildPartOfMySelf(vec3,vec3+5,false);
   m4_1->setName(m1->getName().c_str());
   CPPUNIT_ASSERT(m4_1->isEqual(m1,1e-12));
   m4_1->decrRef();
   //
-  const int vec4[3]={5,6,7};
+  const mcIdType vec4[3]={5,6,7};
   MEDCouplingUMesh *m4_2=(MEDCouplingUMesh *)m4->buildPartOfMySelf(vec4,vec4+3,false);
-  DataArrayInt *cellCor=0;
-  DataArrayInt *nodeCor=0;
+  DataArrayIdType *cellCor=0;
+  DataArrayIdType *nodeCor=0;
   m4_2->checkGeoEquivalWith(m2_2,10,1e-12,cellCor,nodeCor);
   CPPUNIT_ASSERT(cellCor==0);
   CPPUNIT_ASSERT(nodeCor==0);
   m4_2->decrRef();
   //
-  const int vec5[2]={8,9};
+  const mcIdType vec5[2]={8,9};
   MEDCouplingUMesh *m4_3=(MEDCouplingUMesh *)m4->buildPartOfMySelf(vec5,vec5+2,false);
   CPPUNIT_ASSERT_EQUAL(2,(int)m4_3->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(3,m4_3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(3,(int)m4_3->getNumberOfNodes());
   m3_2->zipCoords();
   m4_3->setName(m3_2->getName().c_str());
   CPPUNIT_ASSERT(m4_3->isEqual(m3_2,1e-12));
@@ -2434,7 +2435,7 @@ void MEDCouplingBasicsTest3::testBuild0DMeshFromCoords1()
   std::copy(sourceCoords,sourceCoords+12,coo->getPointer());
   MEDCouplingUMesh *m=MEDCouplingUMesh::Build0DMeshFromCoords(coo);
   m->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(4,m->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(4,(int)m->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(4,(int)m->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(3,m->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(0,m->getMeshDimension());
@@ -2443,10 +2444,10 @@ void MEDCouplingBasicsTest3::testBuild0DMeshFromCoords1()
   CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_POINT1,*types.begin());
   for(int i=0;i<4;i++)
     {
-      std::vector<int> conn;
+      std::vector<mcIdType> conn;
       m->getNodeIdsOfCell(i,conn);
       CPPUNIT_ASSERT_EQUAL(1,(int)conn.size());
-      CPPUNIT_ASSERT_EQUAL(i,conn[0]);
+      CPPUNIT_ASSERT_EQUAL(i,(int)conn[0]);
       CPPUNIT_ASSERT(INTERP_KERNEL::NORM_POINT1==m->getTypeOfCell(i));
     }
   CPPUNIT_ASSERT(std::string(m->getName())=="My0D");
index 550dfd02eb9391da5df346e261462fc743d064f3..7eb6e13646fbd24320e392481c5ead957fde7142 100644 (file)
@@ -160,30 +160,30 @@ void MEDCouplingBasicsTest4::testFieldOverTime1()
 
 void MEDCouplingBasicsTest4::testDAICheckAndPreparePermutation1()
 {
-  const int vals1[]={9,10,0,6,4,11,3,7};
-  const int expect1[]={5,6,0,3,2,7,1,4};
-  const int vals2[]={9,10,0,6,10,11,3,7};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType vals1[]={9,10,0,6,4,11,3,7};
+  const mcIdType expect1[]={5,6,0,3,2,7,1,4};
+  const mcIdType vals2[]={9,10,0,6,10,11,3,7};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(8,1);
   std::copy(vals1,vals1+8,da->getPointer());
-  DataArrayInt *da2=da->checkAndPreparePermutation();
- CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
+  DataArrayIdType *da2=da->checkAndPreparePermutation();
 CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_EQUAL(expect1[i],da2->getIJ(i,0));
   da2->decrRef();
   da->decrRef();
   //
-  da=DataArrayInt::New();
+  da=DataArrayIdType::New();
   da->alloc(8,1);
   da->iota(0);
   da2=da->checkAndPreparePermutation();
- CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   CPPUNIT_ASSERT(da2->isIota(8));
   da2->decrRef();
   da->decrRef();
   //
-  da=DataArrayInt::New();
+  da=DataArrayIdType::New();
   da->alloc(8,1);
   std::copy(vals2,vals2+8,da->getPointer());
   CPPUNIT_ASSERT_THROW(da->checkAndPreparePermutation(),INTERP_KERNEL::Exception);
@@ -192,14 +192,14 @@ void MEDCouplingBasicsTest4::testDAICheckAndPreparePermutation1()
 
 void MEDCouplingBasicsTest4::testDAIChangeSurjectiveFormat1()
 {
-  const int vals1[8]={0,3,2,3,2,2,1,2};
-  const int expected1[5]={0,1,2,6,8};
-  const int expected2[8]={0,  6,  2,4,5,7,  1,3};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType vals1[8]={0,3,2,3,2,2,1,2};
+  const mcIdType expected1[5]={0,1,2,6,8};
+  const mcIdType expected2[8]={0,  6,  2,4,5,7,  1,3};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(8,1);
   std::copy(vals1,vals1+8,da->getPointer());
   //
-  DataArrayInt *da2,*da2I;
+  DataArrayIdType *da2,*da2I;
   da->changeSurjectiveFormat(4,da2,da2I);
  CPPUNIT_ASSERT_EQUAL(5,(int)da2I->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples());
@@ -216,18 +216,18 @@ void MEDCouplingBasicsTest4::testDAIChangeSurjectiveFormat1()
 void MEDCouplingBasicsTest4::testUMeshGetCellIdsLyingOnNodes1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  const int nodeIds1[5]={1,2,3,4,6};
-  const int nodeIds2[2]={6,7};
-  DataArrayInt *da=m->getCellIdsLyingOnNodes(nodeIds1,nodeIds1+5,true);
- CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(1,da->getIJ(0,0));
+  const mcIdType nodeIds1[5]={1,2,3,4,6};
+  const mcIdType nodeIds2[2]={6,7};
+  DataArrayIdType *da=m->getCellIdsLyingOnNodes(nodeIds1,nodeIds1+5,true);
 CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(1,(int)da->getIJ(0,0));
   da->decrRef();
   da=m->getCellIdsLyingOnNodes(nodeIds2,nodeIds2+2,false);
- CPPUNIT_ASSERT_EQUAL(2,(int)da->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(3,da->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(4,da->getIJ(1,0));
 CPPUNIT_ASSERT_EQUAL(2,(int)da->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(3,(int)da->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(4,(int)da->getIJ(1,0));
   da->decrRef();
   //
   m->decrRef();
@@ -236,7 +236,7 @@ void MEDCouplingBasicsTest4::testUMeshGetCellIdsLyingOnNodes1()
 void MEDCouplingBasicsTest4::testUMeshFindCellIdsOnBoundary1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  DataArrayInt *da5=m->findCellIdsOnBoundary();
+  DataArrayIdType *da5=m->findCellIdsOnBoundary();
   CPPUNIT_ASSERT(da5->isIota(5));
   //
   da5->decrRef();
@@ -406,8 +406,8 @@ void MEDCouplingBasicsTest4::testFillFromAnalyticTwo1()
   CPPUNIT_ASSERT_DOUBLES_EQUAL(3.4,f1->getTime(a,b),1.e-14);
   CPPUNIT_ASSERT_EQUAL(5,a); CPPUNIT_ASSERT_EQUAL(6,b);
   CPPUNIT_ASSERT_EQUAL(std::string(f1->getTimeUnit()),std::string("us"));
- CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
- CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
   const double expected1[9]={0.2, 0.7, 1.2, 0.7, 1.2, 1.7, 1.2, 1.7, 2.2};
   for(int i=0;i<9;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12);
@@ -664,7 +664,7 @@ void MEDCouplingBasicsTest4::testP2Localization1()
 {
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("testP2",2);
   const double coords[12]={0.,2.,3.5,0.,4.5,1.5,1.2,0.32,3.4,1.,2.1,2.4};
-  const int conn[6]={0,1,2,3,4,5};
+  const mcIdType conn[6]={0,1,2,3,4,5};
   DataArrayDouble *coo=DataArrayDouble::New();
   coo->alloc(6,2);
   std::copy(coords,coords+12,coo->getPointer());
@@ -698,7 +698,7 @@ void MEDCouplingBasicsTest4::testP2Localization2()
 {
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("testP2_2",3);
   const double coords[30]={0.33312787792955395, -0.35155740179580952, -0.03567564825034563, 1.307146326477638, -0.57234557776250305, -0.08608044208272235, 0.5551834466499993, 0.62324964668794192, -0.014638951108536295, 0.37761817224442129, -0.38324019806913578, 0.96283164472856886, 0.79494856035658679, -0.40628057809270046, 0.0021004190225864614, 1.023740446371799, 0.07665912970471335, -0.072889657161871096, 0.54564584619517376, 0.11132872093429744, 0.039647326652013051, 0.27164784387819052, -0.42018012100866675, 0.46563376500745146, 0.89501965094896418, -0.56148455362735061, 0.43337469695473035, 0.49118025152924394, 0.093884938060727313, 0.47216346905220891};
-  const int conn[10]={0,1,2,3,4,5,6,7,8,9};
+  const mcIdType conn[10]={0,1,2,3,4,5,6,7,8,9};
   DataArrayDouble *coo=DataArrayDouble::New();
   coo->alloc(10,3);
   std::copy(coords,coords+30,coo->getPointer());
@@ -734,7 +734,7 @@ void MEDCouplingBasicsTest4::testGetValueOn2()
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
   f->setMesh(m);
   DataArrayDouble *arr=DataArrayDouble::New();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   arr->alloc(nbOfCells,3);
   f->setArray(arr);
   arr->decrRef();
@@ -753,7 +753,7 @@ void MEDCouplingBasicsTest4::testGetValueOn2()
   f=MEDCouplingFieldDouble::New(ON_NODES,NO_TIME);
   f->setMesh(m);
   arr=DataArrayDouble::New();
-  int nbOfNodes=m->getNumberOfNodes();
+  mcIdType nbOfNodes=m->getNumberOfNodes();
   arr->alloc(nbOfNodes,3);
   f->setArray(arr);
   arr->decrRef();
@@ -775,25 +775,25 @@ void MEDCouplingBasicsTest4::testGetValueOn2()
 
 void MEDCouplingBasicsTest4::testDAIGetIdsNotEqual1()
 {
-  DataArrayInt *d=DataArrayInt::New();
-  const int vals1[10]={2,3,5,6,8,5,5,6,1,-5};
+  DataArrayIdType *d=DataArrayIdType::New();
+  const mcIdType vals1[10]={2,3,5,6,8,5,5,6,1,-5};
   d->alloc(10,1);
   std::copy(vals1,vals1+10,d->getPointer());
-  DataArrayInt *d2=d->findIdsNotEqual(5);
+  DataArrayIdType *d2=d->findIdsNotEqual(5);
  CPPUNIT_ASSERT_EQUAL(7,(int)d2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)d2->getNumberOfComponents());
-  const int expected1[7]={0,1,3,4,7,8,9};
+  const mcIdType expected1[7]={0,1,3,4,7,8,9};
   for(int i=0;i<7;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],d2->getIJ(0,i));
   d->rearrange(2);
   CPPUNIT_ASSERT_THROW(d->findIdsNotEqual(5),INTERP_KERNEL::Exception);
-  const int vals2[3]={-4,5,6};
-  std::vector<int> vals3(vals2,vals2+3);
+  const mcIdType vals2[3]={-4,5,6};
+  std::vector<mcIdType> vals3(vals2,vals2+3);
   d->rearrange(1);
-  DataArrayInt *d3=d->findIdsNotEqualList(&vals3[0],&vals3[0]+vals3.size());
+  DataArrayIdType *d3=d->findIdsNotEqualList(&vals3[0],&vals3[0]+vals3.size());
  CPPUNIT_ASSERT_EQUAL(5,(int)d3->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)d3->getNumberOfComponents());
-  const int expected2[5]={0,1,4,8,9};
+  const mcIdType expected2[5]={0,1,4,8,9};
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],d3->getIJ(0,i));
   d3->decrRef();
@@ -803,9 +803,9 @@ void MEDCouplingBasicsTest4::testDAIGetIdsNotEqual1()
 
 void MEDCouplingBasicsTest4::testDAIComputeOffsets1()
 {
-  DataArrayInt *d=DataArrayInt::New();
-  const int vals1[6]={3,5,1,2,0,8};
-  const int expected1[6]={0,3,8,9,11,11};
+  DataArrayIdType *d=DataArrayIdType::New();
+  const mcIdType vals1[6]={3,5,1,2,0,8};
+  const mcIdType expected1[6]={0,3,8,9,11,11};
   d->alloc(6,1);
   std::copy(vals1,vals1+6,d->getPointer());
   d->computeOffsets();
@@ -822,7 +822,7 @@ void MEDCouplingBasicsTest4::testUMeshHexagonPrism1()
     0.8660254037844386, 0.5, 0.0, 0.0, 1.0, 0.0, -0.8660254037844386, 0.5, 0.0, -0.8660254037844386, -0.5, 0.0, 0.0, -1.0, 0.0, 0.8660254037844386, -0.5, 0.0,
     0.8660254037844386, 0.5, 2.0, 0.0, 1.0, 2.0, -0.8660254037844386, 0.5, 2.0, -0.8660254037844386, -0.5, 2.0, 0.0, -1.0, 2.0, 0.8660254037844386, -0.5, 2.0
   };
-  const int conn[12]={1,2,3,4,5,0,7,8,9,10,11,6};
+  const mcIdType conn[12]={1,2,3,4,5,0,7,8,9,10,11,6};
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New("MyFirstHexagonalPrism",3);
   DataArrayDouble *coo=DataArrayDouble::New();
   coo->alloc(12,3);
@@ -844,19 +844,19 @@ void MEDCouplingBasicsTest4::testUMeshHexagonPrism1()
   const double expected1[3]={0.,0.,1.};
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],bary->getIJ(0,i),1e-12);
-  DataArrayInt *d1=DataArrayInt::New();
-  DataArrayInt *d2=DataArrayInt::New();
-  DataArrayInt *d3=DataArrayInt::New();
-  DataArrayInt *d4=DataArrayInt::New();
+  DataArrayIdType *d1=DataArrayIdType::New();
+  DataArrayIdType *d2=DataArrayIdType::New();
+  DataArrayIdType *d3=DataArrayIdType::New();
+  DataArrayIdType *d4=DataArrayIdType::New();
   MEDCouplingUMesh *m2=mesh->buildDescendingConnectivity(d1,d2,d3,d4);
   CPPUNIT_ASSERT_EQUAL(8,(int)m2->getNumberOfCells());
-  const int expected4[8][6]={{1,2,3,4,5,0},{7,6,11,10,9,8},{1,7,8,2},{2,8,9,3},{3,9,10,4},{4,10,11,5},{5,11,6,0},{0,6,7,1}};
+  const mcIdType expected4[8][6]={{1,2,3,4,5,0},{7,6,11,10,9,8},{1,7,8,2},{2,8,9,3},{3,9,10,4},{4,10,11,5},{5,11,6,0},{0,6,7,1}};
   const INTERP_KERNEL::NormalizedCellType expected2[8]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4};
-  const int expected3[8]={6,6,4,4,4,4,4,4};
+  const mcIdType expected3[8]={6,6,4,4,4,4,4,4};
   for(int i=0;i<8;i++)
     {
       CPPUNIT_ASSERT(m2->getTypeOfCell(i)==expected2[i]);
-      std::vector<int> v;
+      std::vector<mcIdType> v;
       m2->getNodeIdsOfCell(i,v);
       CPPUNIT_ASSERT((int)v.size()==expected3[i]);
       CPPUNIT_ASSERT(std::equal(expected4[i],expected4[i]+expected3[i],v.begin()));
@@ -871,7 +871,7 @@ void MEDCouplingBasicsTest4::testUMeshHexagonPrism1()
   CPPUNIT_ASSERT(INTERP_KERNEL::NORM_POLYHED==mesh->getTypeOfCell(0));
   mesh->unPolyze();
   CPPUNIT_ASSERT(INTERP_KERNEL::NORM_HEXGP12==mesh->getTypeOfCell(0));
-  CPPUNIT_ASSERT_EQUAL(13,mesh->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(13),mesh->getNodalConnectivityArrayLen());
   //
   vols->decrRef();
   bary->decrRef();
@@ -915,8 +915,8 @@ void MEDCouplingBasicsTest4::testCheckCoherencyDeeper1()
   m->getNodalConnectivity()->setIJ(8,0,8);//OK
   m->checkConsistencyLight();
   m->checkConsistency();
-  const int elts[2]={1,5};
-  std::vector<int> eltsV(elts,elts+2);
+  const mcIdType elts[2]={1,5};
+  std::vector<mcIdType> eltsV(elts,elts+2);
   m->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
   m->checkConsistencyLight();
   m->checkConsistency();
@@ -952,18 +952,18 @@ void MEDCouplingBasicsTest4::testUnPolyze2()
   m->setCoords(coo);
   coo->decrRef();
   m->allocateCells(2);
-  const int conn[4]={0,1,2,3};
+  const mcIdType conn[4]={0,1,2,3};
   m->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,conn);
   m->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,conn);
   m->finishInsertingCells();
   std::vector<const MEDCouplingUMesh *> ms(4,m);
   MEDCouplingUMesh *m2=MEDCouplingUMesh::MergeUMeshesOnSameCoords(ms);
-  std::vector<int> temp(1,2);
+  std::vector<mcIdType> temp(1,2);
   m2->convertToPolyTypes(&temp[0],&temp[0]+temp.size());
   m2->unPolyze();
   CPPUNIT_ASSERT(INTERP_KERNEL::NORM_TETRA4==m2->getTypeOfCell(2));
-  CPPUNIT_ASSERT_EQUAL(40,m2->getNodalConnectivityArrayLen());
-  std::vector<int> temp2;
+  CPPUNIT_ASSERT_EQUAL(ToIdType(40),m2->getNodalConnectivityArrayLen());
+  std::vector<mcIdType> temp2;
   m2->getNodeIdsOfCell(2,temp2);
   CPPUNIT_ASSERT(4==(int)temp2.size());
   CPPUNIT_ASSERT(std::equal(conn,conn+4,temp2.begin()));
@@ -1017,13 +1017,13 @@ void MEDCouplingBasicsTest4::testDACpyFrom1()
 
 void MEDCouplingBasicsTest4::testDAITransformWithIndArr1()
 {
-  const int tab1[4]={17,18,22,19};
-  const int tab2[12]={0,1,1,3,3,0,1,3,2,2,3,0};
-  const int expected[12]={17,18,18,19,19,17,18,19,22,22,19,17};
-  DataArrayInt *d=DataArrayInt::New();
+  const mcIdType tab1[4]={17,18,22,19};
+  const mcIdType tab2[12]={0,1,1,3,3,0,1,3,2,2,3,0};
+  const mcIdType expected[12]={17,18,18,19,19,17,18,19,22,22,19,17};
+  DataArrayIdType *d=DataArrayIdType::New();
   d->alloc(4,1);
   std::copy(tab1,tab1+4,d->getPointer());
-  DataArrayInt *d1=DataArrayInt::New();
+  DataArrayIdType *d1=DataArrayIdType::New();
   d1->alloc(12,1);
   std::copy(tab2,tab2+12,d1->getPointer());
   //
@@ -1039,12 +1039,12 @@ void MEDCouplingBasicsTest4::testDAITransformWithIndArr1()
 
 void MEDCouplingBasicsTest4::testDAIBuildPermArrPerLevel1()
 {
-  const int arr[12]={2,0,1,1,0,1,2,0,1,1,0,0};
-  const int expected1[12]={10,0,5,6,1,7,11,2,8,9,3,4};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType arr[12]={2,0,1,1,0,1,2,0,1,1,0,0};
+  const mcIdType expected1[12]={10,0,5,6,1,7,11,2,8,9,3,4};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(12,1);
   std::copy(arr,arr+12,da->getPointer());
-  DataArrayInt *da2=da->buildPermArrPerLevel();
+  DataArrayIdType *da2=da->buildPermArrPerLevel();
  CPPUNIT_ASSERT_EQUAL(12,(int)da2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<12;i++)
@@ -1055,24 +1055,24 @@ void MEDCouplingBasicsTest4::testDAIBuildPermArrPerLevel1()
 
 void MEDCouplingBasicsTest4::testDAIOperations1()
 {
-  const int arr1[12]={-1,-2,4,7,3,2,6,6,4,3,0,1};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType arr1[12]={-1,-2,4,7,3,2,6,6,4,3,0,1};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(4,3);
   std::copy(arr1,arr1+12,da->getPointer());
-  DataArrayInt *da1=DataArrayInt::New();
+  DataArrayIdType *da1=DataArrayIdType::New();
   da1->alloc(12,1);
   da1->iota(2);
-  CPPUNIT_ASSERT_THROW(DataArrayInt::Add(da,da1),INTERP_KERNEL::Exception);//not same number of tuples/Components
+  CPPUNIT_ASSERT_THROW(DataArrayIdType::Add(da,da1),INTERP_KERNEL::Exception);//not same number of tuples/Components
   da1->rearrange(3);
-  DataArrayInt *da2=DataArrayInt::Add(da,da1);
+  DataArrayIdType *da2=DataArrayIdType::Add(da,da1);
  CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
-  const int expected1[12]={1,1,8,12,9,9,14,15,14,14,12,14};
+  const mcIdType expected1[12]={1,1,8,12,9,9,14,15,14,14,12,14};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(0,i));
   da2->decrRef();
   da1->substractEqual(da);
-  const int expected2[12]={3,5,0,-2,3,5,2,3,6,8,12,12};
+  const mcIdType expected2[12]={3,5,0,-2,3,5,2,3,6,8,12,12};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],da1->getIJ(0,i));
   da1->rearrange(1); da1->iota(2); da1->rearrange(3);
@@ -1080,17 +1080,17 @@ void MEDCouplingBasicsTest4::testDAIOperations1()
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da1->getIJ(0,i));
   da1->rearrange(1); da1->iota(2); da1->rearrange(3);
-  da2=DataArrayInt::Multiply(da,da1);
+  da2=DataArrayIdType::Multiply(da,da1);
  CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
-  const int expected3[12]={-2,-6,16,35,18,14,48,54,40,33,0,13};
+  const mcIdType expected3[12]={-2,-6,16,35,18,14,48,54,40,33,0,13};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],da2->getIJ(0,i));
   da2->decrRef();
   da->divideEqual(da1);
  CPPUNIT_ASSERT_EQUAL(4,(int)da->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfComponents());
-  const int expected4[12]={0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0};
+  const mcIdType expected4[12]={0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],da->getIJ(0,i));
   std::copy(arr1,arr1+12,da->getPointer());
@@ -1100,7 +1100,7 @@ void MEDCouplingBasicsTest4::testDAIOperations1()
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],da1->getIJ(0,i));
   da1->rearrange(1); da1->iota(2); da1->rearrange(3);
-  da2=DataArrayInt::Divide(da,da1);
+  da2=DataArrayIdType::Divide(da,da1);
  CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
   for(int i=0;i<12;i++)
@@ -1109,21 +1109,21 @@ void MEDCouplingBasicsTest4::testDAIOperations1()
   da1->applyInv(321);
  CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents());
-  const int expected5[12]={160,107,80,64,53,45,40,35,32,29,26,24};
+  const mcIdType expected5[12]={160,107,80,64,53,45,40,35,32,29,26,24};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected5[i],da1->getIJ(0,i));
   da1->applyDivideBy(2);
  CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents());
-  const int expected6[12]={80,53,40,32,26,22,20,17,16,14,13,12};
+  const mcIdType expected6[12]={80,53,40,32,26,22,20,17,16,14,13,12};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected6[i],da1->getIJ(0,i));
-  const int expected7[12]={3,4,5,4,5,1,6,3,2,0,6,5};
+  const mcIdType expected7[12]={3,4,5,4,5,1,6,3,2,0,6,5};
   da1->applyModulus(7);
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected7[i],da1->getIJ(0,i));
   da1->applyLin(1,1);
-  const int expected8[12]={3,3,3,3,3,1,3,3,0,0,3,3};
+  const mcIdType expected8[12]={3,3,3,3,3,1,3,3,0,0,3,3};
   da1->applyRModulus(3);
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected8[i],da1->getIJ(0,i));
@@ -1136,15 +1136,15 @@ void MEDCouplingBasicsTest4::testEmulateMEDMEMBDC1()
 {
   MEDCouplingUMesh *m1=0;
   MEDCouplingUMesh *m=buildPointe_1(m1);
-  DataArrayInt *da1=DataArrayInt::New();
-  DataArrayInt *da2=DataArrayInt::New();
-  DataArrayInt *da3=0;
-  DataArrayInt *da4=0;
-  DataArrayInt *da5=0;
-  DataArrayInt *da0=0;
+  DataArrayIdType *da1=DataArrayIdType::New();
+  DataArrayIdType *da2=DataArrayIdType::New();
+  DataArrayIdType *da3=0;
+  DataArrayIdType *da4=0;
+  DataArrayIdType *da5=0;
+  DataArrayIdType *da0=0;
   MEDCouplingUMesh *m2=m->emulateMEDMEMBDC(m1,da1,da2,da3,da4,da5,da0);
-  const int expected0[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46};
-  const int expected1[6]={1,32,29,23,41,36};
+  const mcIdType expected0[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46};
+  const mcIdType expected1[6]={1,32,29,23,41,36};
  CPPUNIT_ASSERT_EQUAL(47,(int)da0->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da0->getNumberOfComponents());
   for(int i=0;i<47;i++)
@@ -1153,23 +1153,23 @@ void MEDCouplingBasicsTest4::testEmulateMEDMEMBDC1()
  CPPUNIT_ASSERT_EQUAL(1,(int)da5->getNumberOfComponents());
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da5->getIJ(0,i));
-  const int expected2[70]={0,1,2,3,4,0,5,6,7,4,8,9,1,7,10,11,12,13,14,5,15,16,17,8,18,19,20,10,21,22,23,2,13,24,25,21,16,26,27,12,19,28,29,15,22,30,31,18,36,26,28,30,24,37,32,33,34,35,38,36,39,40,41,42,37,38,43,44,45,46};
+  const mcIdType expected2[70]={0,1,2,3,4,0,5,6,7,4,8,9,1,7,10,11,12,13,14,5,15,16,17,8,18,19,20,10,21,22,23,2,13,24,25,21,16,26,27,12,19,28,29,15,22,30,31,18,36,26,28,30,24,37,32,33,34,35,38,36,39,40,41,42,37,38,43,44,45,46};
  CPPUNIT_ASSERT_EQUAL(70,(int)da1->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents());
   for(int i=0;i<70;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],da1->getIJ(0,i));
-  const int expected3[17]={0,4,8,12,16,20,24,28,32,36,40,44,48,53,58,64,70};
+  const mcIdType expected3[17]={0,4,8,12,16,20,24,28,32,36,40,44,48,53,58,64,70};
  CPPUNIT_ASSERT_EQUAL(17,(int)da2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<17;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],da2->getIJ(0,i));
-  const int expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,53,54,55,56,58,60,62,63,64,65,66,67,68,69,70};
-  //const int expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,54,56,57,58,59,60,62,63,64,65,66,67,68,69,70};
+  const mcIdType expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,53,54,55,56,58,60,62,63,64,65,66,67,68,69,70};
+  //const mcIdType expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,54,56,57,58,59,60,62,63,64,65,66,67,68,69,70};
  CPPUNIT_ASSERT_EQUAL(48,(int)da4->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da4->getNumberOfComponents());
   for(int i=0;i<48;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],da4->getIJ(0,i));
-  const int expected5[70]={0,1,0,3,0,7,0,1,2,1,4,1,2,3,2,5,2,3,6,3,4,9,4,8,4,5,10,5,9,5,6,11,6,10,6,7,8,7,11,7,8,12,8,9,12,9,10,12,10,11,12,11,13,13,13,13,12,14,13,15,14,15,14,14,14,14,15,15,15,15};
+  const mcIdType expected5[70]={0,1,0,3,0,7,0,1,2,1,4,1,2,3,2,5,2,3,6,3,4,9,4,8,4,5,10,5,9,5,6,11,6,10,6,7,8,7,11,7,8,12,8,9,12,9,10,12,10,11,12,11,13,13,13,13,12,14,13,15,14,15,14,14,14,14,15,15,15,15};
  CPPUNIT_ASSERT_EQUAL(70,(int)da3->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da3->getNumberOfComponents());
   for(int i=0;i<70;i++)
@@ -1192,30 +1192,30 @@ void MEDCouplingBasicsTest4::testGetLevArrPerCellTypes1()
   MEDCouplingUMesh *m1=0;
   MEDCouplingUMesh *m=buildPointe_1(m1);
   m1->decrRef();
-  DataArrayInt *d0=DataArrayInt::New();
-  DataArrayInt *d1=DataArrayInt::New();
-  DataArrayInt *d2=DataArrayInt::New();
-  DataArrayInt *d3=DataArrayInt::New();
+  DataArrayIdType *d0=DataArrayIdType::New();
+  DataArrayIdType *d1=DataArrayIdType::New();
+  DataArrayIdType *d2=DataArrayIdType::New();
+  DataArrayIdType *d3=DataArrayIdType::New();
   m1=m->buildDescendingConnectivity(d0,d1,d2,d3);
   d0->decrRef(); d1->decrRef(); d2->decrRef(); d3->decrRef();
   INTERP_KERNEL::NormalizedCellType order[2]={INTERP_KERNEL::NORM_TRI3,INTERP_KERNEL::NORM_QUAD4};
-  DataArrayInt *da1=0;
-  DataArrayInt *da0=m1->getLevArrPerCellTypes(order,order+2,da1);
-  const int expected0[47]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1};
-  const int expected1[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46};
- CPPUNIT_ASSERT_EQUAL(47,(int)da0->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)da0->getNumberOfComponents());
+  DataArrayIdType *da1=0;
+  DataArrayIdType *da0=m1->getLevArrPerCellTypes(order,order+2,da1);
+  const mcIdType expected0[47]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1};
+  const mcIdType expected1[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46};
 CPPUNIT_ASSERT_EQUAL(47,(int)da0->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)da0->getNumberOfComponents());
   for(int i=0;i<47;i++)
     CPPUNIT_ASSERT_EQUAL(expected0[i],da0->getIJ(0,i));
- CPPUNIT_ASSERT_EQUAL(2,(int)da1->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(36,da1->getIJ(0,0));//36 TRI3
-  CPPUNIT_ASSERT_EQUAL(11,da1->getIJ(1,0));//11 QUAD4
 CPPUNIT_ASSERT_EQUAL(2,(int)da1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(36,(int)da1->getIJ(0,0));//36 TRI3
+  CPPUNIT_ASSERT_EQUAL(11,(int)da1->getIJ(1,0));//11 QUAD4
   //
-  DataArrayInt *da2=da0->buildPermArrPerLevel();
+  DataArrayIdType *da2=da0->buildPermArrPerLevel();
   //
- CPPUNIT_ASSERT_EQUAL(47,(int)da2->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(47,(int)da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<47;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(0,i));
   da2->decrRef();
@@ -1232,14 +1232,14 @@ void MEDCouplingBasicsTest4::testSortCellsInMEDFileFrmt1()
   MEDCouplingUMesh *m=buildPointe_1(m1);
   MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->deepCopy();
   m->setCoords(0);
-  const int vals[16]={0,1,2,14,3,12,4,5,15,6,7,8,9,10,11,13};
-  DataArrayInt *da=DataArrayInt::New();
+  const mcIdType vals[16]={0,1,2,14,3,12,4,5,15,6,7,8,9,10,11,13};
+  DataArrayIdType *da=DataArrayIdType::New();
   da->alloc(16,1);
   std::copy(vals,vals+16,da->getPointer());
-  DataArrayInt *daa=da->invertArrayN2O2O2N(16);
+  DataArrayIdType *daa=da->invertArrayN2O2O2N(16);
   m->renumberCells(daa->getConstPointer(),false);
   daa->decrRef();
-  DataArrayInt *da2=m->sortCellsInMEDFileFrmt();
+  DataArrayIdType *da2=m->sortCellsInMEDFileFrmt();
   CPPUNIT_ASSERT(m2->isEqual(m2,1e-12));
   CPPUNIT_ASSERT(da->isEqual(*da2));
   m2->decrRef();
@@ -1252,10 +1252,10 @@ void MEDCouplingBasicsTest4::testSortCellsInMEDFileFrmt1()
 void MEDCouplingBasicsTest4::testBuildPartAndReduceNodes1()
 {
   MEDCouplingMesh *m=build2DTargetMesh_1();
-  const int arr[2]={1,0};
-  DataArrayInt *da;
+  const mcIdType arr[2]={1,0};
+  DataArrayIdType *da;
   MEDCouplingMesh *m2=m->buildPartAndReduceNodes(arr,arr+2,da);
-  CPPUNIT_ASSERT_EQUAL(5,m2->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(5,(int)m2->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,(int)m2->getNumberOfCells());
   MEDCouplingFieldDouble *f=m2->getMeasureField(true);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,f->getArray()->getIJ(0,0),1e-12);
@@ -1268,17 +1268,17 @@ void MEDCouplingBasicsTest4::testBuildPartAndReduceNodes1()
 
 void MEDCouplingBasicsTest4::testDAITransformWithIndArrR1()
 {
-  const int tab1[6]={2,4,5,3,6,7};
-  const int tab2[12]={-1,-1,0,1,2,3,4,5,-1,-1,-1,-1};
-  const int expected[6]={0,3,1,2,4,5};
-  DataArrayInt *d=DataArrayInt::New();
+  const mcIdType tab1[6]={2,4,5,3,6,7};
+  const mcIdType tab2[12]={-1,-1,0,1,2,3,4,5,-1,-1,-1,-1};
+  const mcIdType expected[6]={0,3,1,2,4,5};
+  DataArrayIdType *d=DataArrayIdType::New();
   d->alloc(6,1);
   std::copy(tab1,tab1+6,d->getPointer());
-  DataArrayInt *d1=DataArrayInt::New();
+  DataArrayIdType *d1=DataArrayIdType::New();
   d1->alloc(12,1);
   std::copy(tab2,tab2+12,d1->getPointer());
   //
-  DataArrayInt *d3=d->transformWithIndArrR(d1->getConstPointer(),d1->getConstPointer()+d1->getNbOfElems());
+  DataArrayIdType *d3=d->transformWithIndArrR(d1->getConstPointer(),d1->getConstPointer()+d1->getNbOfElems());
  CPPUNIT_ASSERT_EQUAL(6,(int)d3->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)d3->getNumberOfComponents());
   for(int i=0;i<6;i++)
@@ -1291,12 +1291,12 @@ void MEDCouplingBasicsTest4::testDAITransformWithIndArrR1()
 
 void MEDCouplingBasicsTest4::testDAISplitByValueRange1()
 {
-  const int val1[9]={6,5,0,3,2,7,8,1,4};
-  const int val2[3]={0,4,9};
-  DataArrayInt *d=DataArrayInt::New();
+  const mcIdType val1[9]={6,5,0,3,2,7,8,1,4};
+  const mcIdType val2[3]={0,4,9};
+  DataArrayIdType *d=DataArrayIdType::New();
   d->alloc(9,1);
   std::copy(val1,val1+9,d->getPointer());
-  DataArrayInt *ee=0,*f=0,*g=0;
+  DataArrayIdType *ee=0,*f=0,*g=0;
   d->splitByValueRange(val2,val2+3,ee,f,g);
  CPPUNIT_ASSERT_EQUAL(9,(int)ee->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)ee->getNumberOfComponents());
@@ -1305,15 +1305,15 @@ void MEDCouplingBasicsTest4::testDAISplitByValueRange1()
  CPPUNIT_ASSERT_EQUAL(2,(int)g->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)g->getNumberOfComponents());
   //
-  const int expected1[9]={1,1,0,0,0,1,1,0,1};
-  const int expected2[9]={2,1,0,3,2,3,4,1,0};
+  const mcIdType expected1[9]={1,1,0,0,0,1,1,0,1};
+  const mcIdType expected2[9]={2,1,0,3,2,3,4,1,0};
   for(int i=0;i<9;i++)
     {
       CPPUNIT_ASSERT_EQUAL(expected1[i],ee->getIJ(i,0));
       CPPUNIT_ASSERT_EQUAL(expected2[i],f->getIJ(i,0));
     }
-  CPPUNIT_ASSERT_EQUAL(0,g->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(1,g->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(0,(int)g->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(1,(int)g->getIJ(1,0));
   //
   ee->decrRef();
   f->decrRef();
@@ -1327,39 +1327,39 @@ void MEDCouplingBasicsTest4::testDAISplitByValueRange1()
 
 void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
 {
-  const int val0[5]={2,0,1,3,4};
+  const mcIdType val0[5]={2,0,1,3,4};
   MEDCouplingUMesh *m=build2DTargetMesh_1();
   m->renumberCells(val0,false);
-  std::vector<int> code;
-  std::vector<DataArrayInt *> idsInPflPerType;
-  std::vector<DataArrayInt *> pfls;
+  std::vector<mcIdType> code;
+  std::vector<DataArrayIdType *> idsInPflPerType;
+  std::vector<DataArrayIdType *> pfls;
   //
-  const int val1[3]={0,2,3};
-  DataArrayInt *d=DataArrayInt::New();
+  const mcIdType val1[3]={0,2,3};
+  DataArrayIdType *d=DataArrayIdType::New();
   d->alloc(3,1);
   d->setName("sup");
   std::copy(val1,val1+3,d->getPointer());
   m->splitProfilePerType(d,code,idsInPflPerType,pfls);
   CPPUNIT_ASSERT_EQUAL(6,(int)code.size());
   CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType.size());
-  const int expected1[6]={3,1,0, 4,2,1};
+  const mcIdType expected1[6]={3,1,0, 4,2,1};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],code[i]);
- CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
- CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[1]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(1,0));
 CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(0,(int)idsInPflPerType[0]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[1]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[1]->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[1]->getIJ(1,0));
   idsInPflPerType[0]->decrRef();
   idsInPflPerType[1]->decrRef();
   CPPUNIT_ASSERT_EQUAL(2,(int)pfls.size());
   CPPUNIT_ASSERT(std::string("sup")==pfls[0]->getName());
- CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(0,(int)pfls[0]->getIJ(0,0));
   CPPUNIT_ASSERT(std::string("sup")==pfls[1]->getName());
- CPPUNIT_ASSERT_EQUAL(2,(int)pfls[1]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(0,pfls[1]->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(1,pfls[1]->getIJ(1,0));
 CPPUNIT_ASSERT_EQUAL(2,(int)pfls[1]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(0,(int)pfls[1]->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(1,(int)pfls[1]->getIJ(1,0));
   pfls[0]->decrRef();
   pfls[1]->decrRef();
   d->decrRef();
@@ -1367,55 +1367,55 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
   pfls.clear();
   code.clear();
   //
-  const int val2[4]={0,2,3,4};// all quad4 are selected here ! So no profile for Quads
-  d=DataArrayInt::New();
+  const mcIdType val2[4]={0,2,3,4};// all quad4 are selected here ! So no profile for Quads
+  d=DataArrayIdType::New();
   d->alloc(4,1);
   std::copy(val2,val2+4,d->getPointer());
   m->splitProfilePerType(d,code,idsInPflPerType,pfls);
   CPPUNIT_ASSERT_EQUAL(6,(int)code.size());
   CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType.size());
-  const int expected2[6]={3,1,0, 4,3,-1};
+  const mcIdType expected2[6]={3,1,0, 4,3,-1};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],code[i]);
- CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
- CPPUNIT_ASSERT_EQUAL(3,(int)idsInPflPerType[1]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(1,0));
-  CPPUNIT_ASSERT_EQUAL(3,idsInPflPerType[1]->getIJ(2,0));
 CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(0,(int)idsInPflPerType[0]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(3,(int)idsInPflPerType[1]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[1]->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[1]->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(3,(int)idsInPflPerType[1]->getIJ(2,0));
   idsInPflPerType[0]->decrRef();
   idsInPflPerType[1]->decrRef();
   CPPUNIT_ASSERT_EQUAL(1,(int)pfls.size());
- CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(0,(int)pfls[0]->getIJ(0,0));
   pfls[0]->decrRef();
   d->decrRef();
   idsInPflPerType.clear();
   pfls.clear();
   code.clear();
   //
-  const int val3[3]={1,0,2};// all tri3 are selected here but not in the same order ! Profile requested for Tri3
-  d=DataArrayInt::New();
+  const mcIdType val3[3]={1,0,2};// all tri3 are selected here but not in the same order ! Profile requested for Tri3
+  d=DataArrayIdType::New();
   d->alloc(3,1);
   std::copy(val3,val3+3,d->getPointer());
   m->splitProfilePerType(d,code,idsInPflPerType,pfls);
   CPPUNIT_ASSERT_EQUAL(6,(int)code.size());
   CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType.size());
-  const int expected3[6]={3,2,0, 4,1,1};
+  const mcIdType expected3[6]={3,2,0, 4,1,1};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],code[i]);
- CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getIJ(1,0));
- CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[1]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(0,(int)idsInPflPerType[0]->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getIJ(1,0));
 CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[1]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[1]->getIJ(0,0));
   idsInPflPerType[0]->decrRef();
   idsInPflPerType[1]->decrRef();
   CPPUNIT_ASSERT_EQUAL(2,(int)pfls.size());
- CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(1,0));
-  CPPUNIT_ASSERT_EQUAL(0,pfls[1]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(0,(int)pfls[0]->getIJ(1,0));
+  CPPUNIT_ASSERT_EQUAL(0,(int)pfls[1]->getIJ(0,0));
   pfls[0]->decrRef();
   pfls[1]->decrRef();
   d->decrRef();
@@ -1423,24 +1423,24 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
   pfls.clear();
   code.clear();
   //
-  const int val4[2]={3,4};// all tri3 are selected here but not in the same order ! Profile requested for Tri3
-  d=DataArrayInt::New();
+  const mcIdType val4[2]={3,4};// all tri3 are selected here but not in the same order ! Profile requested for Tri3
+  d=DataArrayIdType::New();
   d->alloc(2,1);
   std::copy(val4,val4+2,d->getPointer());
   m->splitProfilePerType(d,code,idsInPflPerType,pfls);
   CPPUNIT_ASSERT_EQUAL(3,(int)code.size());
   CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType.size());
-  const int expected4[3]={4,2,0};
+  const mcIdType expected4[3]={4,2,0};
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],code[i]);
- CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getIJ(1,0));
 CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(0,(int)idsInPflPerType[0]->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getIJ(1,0));
   idsInPflPerType[0]->decrRef();
   CPPUNIT_ASSERT_EQUAL(1,(int)pfls.size());
- CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getIJ(0,0));
-  CPPUNIT_ASSERT_EQUAL(2,pfls[0]->getIJ(1,0));
 CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getIJ(1,0));
   pfls[0]->decrRef();
   d->decrRef();
   idsInPflPerType.clear();
@@ -1452,19 +1452,19 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
 
 void MEDCouplingBasicsTest4::testDAIBuildExplicitArrByRanges1()
 {
-  DataArrayInt *d=DataArrayInt::New();
+  DataArrayIdType *d=DataArrayIdType::New();
   d->alloc(3,1);
-  const int vals1[3]={0,2,3};
+  const mcIdType vals1[3]={0,2,3};
   std::copy(vals1,vals1+3,d->getPointer());
-  DataArrayInt *e=DataArrayInt::New();
+  DataArrayIdType *e=DataArrayIdType::New();
   e->alloc(6,1);
-  const int vals2[6]={0,3,6,10,14,20};
+  const mcIdType vals2[6]={0,3,6,10,14,20};
   std::copy(vals2,vals2+6,e->getPointer());
   //
-  DataArrayInt *f=d->buildExplicitArrByRanges(e);
- CPPUNIT_ASSERT_EQUAL(11,(int)f->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents());
-  const int expected1[11]={0,1,2,6,7,8,9,10,11,12,13};
+  DataArrayIdType *f=d->buildExplicitArrByRanges(e);
 CPPUNIT_ASSERT_EQUAL(11,(int)f->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents());
+  const mcIdType expected1[11]={0,1,2,6,7,8,9,10,11,12,13};
   for(int i=0;i<11;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],f->getIJ(i,0));
   //
@@ -1475,14 +1475,14 @@ void MEDCouplingBasicsTest4::testDAIBuildExplicitArrByRanges1()
 
 void MEDCouplingBasicsTest4::testDAIComputeOffsets2()
 {
-  DataArrayInt *d=DataArrayInt::New();
-  const int vals1[6]={3,5,1,2,0,8};
-  const int expected1[7]={0,3,8,9,11,11,19};
+  DataArrayIdType *d=DataArrayIdType::New();
+  const mcIdType vals1[6]={3,5,1,2,0,8};
+  const mcIdType expected1[7]={0,3,8,9,11,11,19};
   d->alloc(6,1);
   std::copy(vals1,vals1+6,d->getPointer());
   d->computeOffsetsFull();
- CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   for(int i=0;i<7;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],d->getIJ(0,i));
   d->decrRef();
@@ -1519,17 +1519,17 @@ void MEDCouplingBasicsTest4::testMergeField3()
 void MEDCouplingBasicsTest4::testGetDistributionOfTypes1()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  const int tab1[5]={2,0,1,3,4};
+  const mcIdType tab1[5]={2,0,1,3,4};
   CPPUNIT_ASSERT_THROW(m->getDistributionOfTypes(),INTERP_KERNEL::Exception);
   m->renumberCells(tab1,false);
-  std::vector<int> code=m->getDistributionOfTypes();
+  std::vector<mcIdType> code=m->getDistributionOfTypes();
   CPPUNIT_ASSERT_EQUAL(6,(int)code.size());
-  CPPUNIT_ASSERT_EQUAL(3,code[0]);
-  CPPUNIT_ASSERT_EQUAL(2,code[1]);
-  CPPUNIT_ASSERT_EQUAL(-1,code[2]);
-  CPPUNIT_ASSERT_EQUAL(4,code[3]);
-  CPPUNIT_ASSERT_EQUAL(3,code[4]);
-  CPPUNIT_ASSERT_EQUAL(-1,code[5]);
+  CPPUNIT_ASSERT_EQUAL(3,(int)code[0]);
+  CPPUNIT_ASSERT_EQUAL(2,(int)code[1]);
+  CPPUNIT_ASSERT_EQUAL(-1,(int)code[2]);
+  CPPUNIT_ASSERT_EQUAL(4,(int)code[3]);
+  CPPUNIT_ASSERT_EQUAL(3,(int)code[4]);
+  CPPUNIT_ASSERT_EQUAL(-1,(int)code[5]);
   m->decrRef();
 }
 
@@ -1591,9 +1591,9 @@ void MEDCouplingBasicsTest4::testNormMax1()
 void MEDCouplingBasicsTest4::testFindAndCorrectBadOriented3DExtrudedCells1()
 {
   const double coords[38*3]={0.0011180339887498999, -0.0011755705045849499, 0.0, -0.0012331070204200001, -0.0011755705045849499, 0.0, -0.00067557050458494599, -0.00145964954842536, 0.0, -0.00050000000000000001, -0.00086602540378443902, 0.0, 0.00140211303259031, -0.00061803398874989504, 0.0, 0.00086602540378443902, -0.00050000000000000001, 0.0, 0.001, 0.0, 0.0, 0.00034561537182258202, 0.000269164072574575, 0.0, 0.0, 0.001, 0.0, -0.00050000000000000001, 0.00086602540378443902, 0.0, -0.000269164072574575, 0.00034561537182258202, 0.0, -0.001, 0.0, 0.0, -0.00086602540378443902, -0.00050000000000000001, 0.0, -0.00034561537182258202, -0.000269164072574575, 0.0, 0.0, -0.001, 0.0, 0.00050000000000000001, -0.00086602540378443902, 0.0, 0.000269164072574575, -0.00034561537182258202, 0.0, 0.0015, -6.01853107621011e-36, 0.0, 0.00056049747291484397, -0.00145964954842536, 0.0, 0.0011180339887498999, -0.0011755705045849499, 0.00050000000000000001, -0.0012331070204200001, -0.0011755705045849499, 0.00050000000000000001, -0.00067557050458494599, -0.00145964954842536, 0.00050000000000000001, -0.00050000000000000001, -0.00086602540378443902, 0.00050000000000000001, 0.00140211303259031, -0.00061803398874989504, 0.00050000000000000001, 0.00086602540378443902, -0.00050000000000000001, 0.00050000000000000001, 0.001, 0.0, 0.00050000000000000001, 0.00034561537182258202, 0.000269164072574575, 0.00050000000000000001, 0.0, 0.001, 0.00050000000000000001, -0.00050000000000000001, 0.00086602540378443902, 0.00050000000000000001, -0.000269164072574575, 0.00034561537182258202, 0.00050000000000000001, -0.001, 0.0, 0.00050000000000000001, -0.00086602540378443902, -0.00050000000000000001, 0.00050000000000000001, -0.00034561537182258202, -0.000269164072574575, 0.00050000000000000001, 0.0, -0.001, 0.00050000000000000001, 0.00050000000000000001, -0.00086602540378443902, 0.00050000000000000001, 0.000269164072574575, -0.00034561537182258202, 0.00050000000000000001, 0.0015, -6.01853107621011e-36, 0.00050000000000000001, 0.00056049747291484397, -0.00145964954842536, 0.00050000000000000001};
-  const int conn[56]={2, 1, 3, 21, 20, 22, 4, 0, 5, 23, 19, 24, 8, 9, 10, 27, 28, 29, 11, 12, 13, 30, 31, 32, 0, 18, 15, 5, 19, 37, 34, 24, 6, 17, 4, 5, 25, 36, 23, 24, 3, 14, 16, 13, 22, 33, 35, 32, 13, 16, 7, 10, 32, 35, 26, 29};
-  const int connExp[64]={16, 2, 1, 3, 21, 20, 22, 16, 4, 0, 5, 23, 19, 24, 16, 8, 10, 9, 27, 29, 28, 16, 11, 13, 12, 30, 32, 31, 18, 0, 18, 15, 5, 19, 37, 34, 24,18, 6, 17, 4, 5, 25, 36, 23, 24, 18, 3, 13, 16, 14, 22, 32, 35, 33, 18, 13, 10, 7, 16, 32, 29, 26, 35};
-  const int invalidCells[4]={2,3,6,7};
+  const mcIdType conn[56]={2, 1, 3, 21, 20, 22, 4, 0, 5, 23, 19, 24, 8, 9, 10, 27, 28, 29, 11, 12, 13, 30, 31, 32, 0, 18, 15, 5, 19, 37, 34, 24, 6, 17, 4, 5, 25, 36, 23, 24, 3, 14, 16, 13, 22, 33, 35, 32, 13, 16, 7, 10, 32, 35, 26, 29};
+  const mcIdType connExp[64]={16, 2, 1, 3, 21, 20, 22, 16, 4, 0, 5, 23, 19, 24, 16, 8, 10, 9, 27, 29, 28, 16, 11, 13, 12, 30, 32, 31, 18, 0, 18, 15, 5, 19, 37, 34, 24,18, 6, 17, 4, 5, 25, 36, 23, 24, 18, 3, 13, 16, 14, 22, 32, 35, 33, 18, 13, 10, 7, 16, 32, 29, 26, 35};
+  const mcIdType invalidCells[4]={2,3,6,7};
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("Example",3);
   DataArrayDouble *coo=DataArrayDouble::New();
   coo->alloc(38,3);
@@ -1611,7 +1611,7 @@ void MEDCouplingBasicsTest4::testFindAndCorrectBadOriented3DExtrudedCells1()
   m->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+48);
   m->finishInsertingCells();
   //
-  DataArrayInt *v=m->findAndCorrectBadOriented3DExtrudedCells();
+  DataArrayIdType *v=m->findAndCorrectBadOriented3DExtrudedCells();
  CPPUNIT_ASSERT_EQUAL(4,(int)v->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(v->begin(),v->end(),invalidCells));
   CPPUNIT_ASSERT(std::equal(connExp,connExp+64,m->getNodalConnectivity()->getConstPointer()));
@@ -1622,7 +1622,7 @@ void MEDCouplingBasicsTest4::testFindAndCorrectBadOriented3DExtrudedCells1()
 
 void MEDCouplingBasicsTest4::testConvertExtrudedPolyhedra1()
 {
-  const int conn[72]={1,2,3,4, 5,6,7,8,9,10,11,12, 13,14,15,16, 17,18,19,20,21,22, 23,24,25,26,27,28, 29,30,31,32,33,34,35,36,37,38, 39,40,41,42,43,44,45,46, 47,48,49,50,51,52,53,54,55,56,57,58, 59,60,61,62,63,64,65,66,67,68,69,70,71,72};
+  const mcIdType conn[72]={1,2,3,4, 5,6,7,8,9,10,11,12, 13,14,15,16, 17,18,19,20,21,22, 23,24,25,26,27,28, 29,30,31,32,33,34,35,36,37,38, 39,40,41,42,43,44,45,46, 47,48,49,50,51,52,53,54,55,56,57,58, 59,60,61,62,63,64,65,66,67,68,69,70,71,72};
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("Example",3);
   DataArrayDouble *coo=DataArrayDouble::New();
   coo->alloc(73,3);
@@ -1642,12 +1642,12 @@ void MEDCouplingBasicsTest4::testConvertExtrudedPolyhedra1()
   m->finishInsertingCells();
   //
   m->convertExtrudedPolyhedra();
-  DataArrayInt *da=m->getNodalConnectivity();
-  DataArrayInt *dai=m->getNodalConnectivityIndex();
-  CPPUNIT_ASSERT_EQUAL((std::size_t)10,dai->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)159,da->getNbOfElems());
+  DataArrayIdType *da=m->getNodalConnectivity();
+  DataArrayIdType *dai=m->getNodalConnectivityIndex();
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),dai->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(159),da->getNbOfElems());
   //
-  const int expected1[159]={14,1,2,3,4,
+  const mcIdType expected1[159]={14,1,2,3,4,
                             18,5,6,7,8,9,10,11,12,
                             14,13,14,15,16,
                             31,17,18,19,-1,20,22,21,-1,17,20,21,18,-1,18,21,22,19,-1,19,22,20,17,
@@ -1656,7 +1656,7 @@ void MEDCouplingBasicsTest4::testConvertExtrudedPolyhedra1()
                             18,39,40,41,42,43,44,45,46,
                             22,47,48,49,50,51,52,53,54,55,56,57,58,
                             31,59,60,61,62,63,64,65,-1,66,72,71,70,69,68,67,-1,59,66,67,60,-1,60,67,68,61,-1,61,68,69,62,-1,62,69,70,63,-1,63,70,71,64,-1,64,71,72,65,-1,65,72,66,59};
-  const int expected2[10]={0,5,14,19,42,49,86,95,108,159};
+  const mcIdType expected2[10]={0,5,14,19,42,49,86,95,108,159};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+159,da->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+10,dai->getConstPointer()));
   m->checkConsistency();
@@ -1683,14 +1683,14 @@ void MEDCouplingBasicsTest4::testDaDSetPartOfValuesAdv1()
 {
   const double tab1[18]={3.,4.,5., 13.,14.,15., 23.,24.,25., 33.,34.,35., 43.,44.,45., 53.,54.,55.};
   const double tab2[9]={6.,7.,8., 16.,17.,18., 26.,27.,28.};
-  const int tab3[6]={4,1, 2,2, 3,0};
+  const mcIdType tab3[6]={4,1, 2,2, 3,0};
   DataArrayDouble *a=DataArrayDouble::New();
   a->alloc(6,3);
   std::copy(tab1,tab1+18,a->getPointer());
   DataArrayDouble *b=DataArrayDouble::New();
   b->alloc(3,3);
   std::copy(tab2,tab2+9,b->getPointer());
-  DataArrayInt *c=DataArrayInt::New();
+  DataArrayIdType *c=DataArrayIdType::New();
   c->alloc(3,2);
   std::copy(tab3,tab3+6,c->getPointer());
   //
@@ -1715,7 +1715,7 @@ void MEDCouplingBasicsTest4::testUMeshBuildSetInstanceFromThis1()
   //
   m=MEDCouplingUMesh::New("toto",2);
   m2=m->buildSetInstanceFromThis(3);
-  CPPUNIT_ASSERT_EQUAL(0,m2->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(0,(int)m2->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(0,(int)m2->getNumberOfCells());
   m->decrRef();
   m2->decrRef();
@@ -1751,15 +1751,15 @@ void MEDCouplingBasicsTest4::testChangeUnderlyingMeshWithCMesh1()
   coordsZ->decrRef();
   MEDCouplingMesh *mesh2=mesh->deepCopy();
   //
-  static const int ids1[9]={0,1,2,10,11,12,20,21,22};
-  for(const int *myId=ids1;myId!=ids1+9;myId++)
+  static const mcIdType ids1[9]={0,1,2,10,11,12,20,21,22};
+  for(const mcIdType *myId=ids1;myId!=ids1+9;myId++)
     {
       MEDCouplingFieldDouble *f=mesh->getMeasureField(true);
       f->changeUnderlyingMesh(mesh2,*myId,1e-12);
       f->decrRef();
     }
   mesh2->setName("uuuu");
-  for(const int *myId=ids1+1;myId!=ids1+9;myId++)
+  for(const mcIdType *myId=ids1+1;myId!=ids1+9;myId++)
     {
       MEDCouplingFieldDouble *f=mesh->getMeasureField(true);
       f->changeUnderlyingMesh(mesh2,*myId,1e-12);
@@ -1776,23 +1776,23 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   da->alloc(6,1);
   const double array1[6]={2.3,1.2,1.3,2.3,2.301,0.8};
   std::copy(array1,array1+6,da->getPointer());
-  DataArrayInt *c=0,*cI=0;
+  DataArrayIdType *c=0,*cI=0;
   // nbOftuples=1
   da->findCommonTuples(1e-2,-1,c,cI);
-  const int expected1[3]={0,3,4};
-  const int expected2[2]={0,3};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2,cI->getNbOfElems());
+  const mcIdType expected1[3]={0,3,4};
+  const mcIdType expected2[2]={0,3};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+2,cI->getConstPointer()));
   c->decrRef();
   cI->decrRef();
   //
   da->findCommonTuples(2e-1,-1,c,cI);
-  const int expected3[5]={0,3,4,1,2};
-  const int expected4[3]={0,3,5};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)5,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,cI->getNbOfElems());
+  const mcIdType expected3[5]={0,3,4,1,2};
+  const mcIdType expected4[3]={0,3,5};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+5,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,cI->getConstPointer()));
   c->decrRef();
@@ -1802,16 +1802,16 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   const double array2[12]={2.3,2.3,1.2,1.2,1.3,1.3,2.3,2.3,2.301,2.301,0.8,0.8};
   std::copy(array2,array2+12,da->getPointer());
   da->findCommonTuples(1e-2,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+2,cI->getConstPointer()));
   c->decrRef();
   cI->decrRef();
   //
   da->findCommonTuples(2e-1,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)5,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+5,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,cI->getConstPointer()));
   c->decrRef();
@@ -1821,16 +1821,16 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   const double array3[18]={2.3,2.3,2.3,1.2,1.2,1.2,1.3,1.3,1.3,2.3,2.3,2.3,2.301,2.301,2.301,0.8,0.8,0.8};
   std::copy(array3,array3+18,da->getPointer());
   da->findCommonTuples(1e-2,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+2,cI->getConstPointer()));
   c->decrRef();
   cI->decrRef();
   //
   da->findCommonTuples(2e-1,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)5,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+5,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,cI->getConstPointer()));
   c->decrRef();
@@ -1841,9 +1841,9 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   std::copy(array11,array11+6,da->getPointer());
   // nbOftuples=1, no common groups
   da->findCommonTuples(1e-2,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)0,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)1,cI->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(0,cI->getIJ(0,0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),cI->getIJ(0,0));
   
   da->alloc(6,5);  //bad NumberOfComponents
   CPPUNIT_ASSERT_THROW(da->findCommonTuples(1e-2,-1,c,cI),INTERP_KERNEL::Exception);
@@ -1866,11 +1866,11 @@ void MEDCouplingBasicsTest4::testDABack1()
   CPPUNIT_ASSERT_THROW(da->back(),INTERP_KERNEL::Exception);
   da->decrRef();
   //
-  DataArrayInt *da2=DataArrayInt::New();
+  DataArrayIdType *da2=DataArrayIdType::New();
   da2->alloc(4,1);
-  const int array2[4]={4,7,8,2};
+  const mcIdType array2[4]={4,7,8,2};
   std::copy(array2,array2+4,da2->getPointer());
-  CPPUNIT_ASSERT_EQUAL(2,da2->back());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),da2->back());
   da2->rearrange(2);
   CPPUNIT_ASSERT_THROW(da2->back(),INTERP_KERNEL::Exception);
   da2->alloc(0,1);
@@ -1887,14 +1887,14 @@ void MEDCouplingBasicsTest4::testDADGetDifferentValues1()
   //
   const double expected1[4]={2.301,1.2,1.3,0.8};
   DataArrayDouble *dv=da->getDifferentValues(1e-2);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)4,dv->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),dv->getNbOfElems());
   for(int i=0;i<4;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],dv->getIJ(i,0),1e-14);
   dv->decrRef();
   //
   dv=da->getDifferentValues(2e-1);
   const double expected2[3]={2.301,1.3,0.8};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)3,dv->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),dv->getNbOfElems());
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],dv->getIJ(i,0),1e-14);
   dv->decrRef();
@@ -1903,22 +1903,22 @@ void MEDCouplingBasicsTest4::testDADGetDifferentValues1()
 
 void MEDCouplingBasicsTest4::testDAIBuildOld2NewArrayFromSurjectiveFormat2()
 {
-  const int arr[5]={0,3, 5,7,9};
-  const int arrI[3]={0,2,5};
-  DataArrayInt *a=DataArrayInt::New();
+  const mcIdType arr[5]={0,3, 5,7,9};
+  const mcIdType arrI[3]={0,2,5};
+  DataArrayIdType *a=DataArrayIdType::New();
   a->alloc(5,1);
   std::copy(arr,arr+5,a->getPointer());
-  DataArrayInt *b=DataArrayInt::New();
+  DataArrayIdType *b=DataArrayIdType::New();
   b->alloc(3,1);
   std::copy(arrI,arrI+3,b->getPointer());
-  int newNbTuple=-1;
-  DataArrayInt *ret=DataArrayInt::ConvertIndexArrayToO2N(10,a->begin(),b->begin(),b->end(),newNbTuple);
-  const int expected[10]={0,1,2,0,3,4,5,4,6,4};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)10,ret->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(7,newNbTuple);
- CPPUNIT_ASSERT_EQUAL(1,(int)ret->getNumberOfComponents());
+  mcIdType newNbTuple=-1;
+  DataArrayIdType *ret=DataArrayIdType::ConvertIndexArrayToO2N(10,a->begin(),b->begin(),b->end(),newNbTuple);
+  const mcIdType expected[10]={0,1,2,0,3,4,5,4,6,4};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(10),ret->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(7),newNbTuple);
 CPPUNIT_ASSERT_EQUAL(1,(int)ret->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected,expected+10,ret->getConstPointer()));
-  CPPUNIT_ASSERT_THROW(DataArrayInt::ConvertIndexArrayToO2N(9,a->begin(),b->begin(),b->end(),newNbTuple),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(DataArrayIdType::ConvertIndexArrayToO2N(9,a->begin(),b->begin(),b->end(),newNbTuple),INTERP_KERNEL::Exception);
   ret->decrRef();
   b->decrRef();
   a->decrRef();
@@ -1926,11 +1926,11 @@ void MEDCouplingBasicsTest4::testDAIBuildOld2NewArrayFromSurjectiveFormat2()
 
 void MEDCouplingBasicsTest4::testDADIReverse1()
 {
-  const int arr[6]={0,3,5,7,9,2};
-  DataArrayInt *a=DataArrayInt::New();
+  const mcIdType arr[6]={0,3,5,7,9,2};
+  DataArrayIdType *a=DataArrayIdType::New();
   a->alloc(6,1);
   std::copy(arr,arr+6,a->getPointer());
-  CPPUNIT_ASSERT_EQUAL(2,a->back());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),a->back());
   a->reverse();
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(arr[5-i],a->getIJ(i,0));
@@ -1960,17 +1960,17 @@ void MEDCouplingBasicsTest4::testDADIReverse1()
 void MEDCouplingBasicsTest4::testGetNodeIdsInUse1()
 {
   MEDCouplingUMesh *m0=build2DTargetMesh_1();
-  const int CellIds[2]={1,2};
+  const mcIdType CellIds[2]={1,2};
   MEDCouplingUMesh *m1=static_cast<MEDCouplingUMesh *>(m0->buildPartOfMySelf(CellIds,CellIds+2,true));
-  int newNbOfNodes=-1;
-  DataArrayInt *arr=m1->getNodeIdsInUse(newNbOfNodes);
-  const int expected[9]={-1,0,1,-1,2,3,-1,-1,-1};
-  CPPUNIT_ASSERT_EQUAL(4,newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)9,arr->getNbOfElems());
+  mcIdType newNbOfNodes=-1;
+  DataArrayIdType *arr=m1->getNodeIdsInUse(newNbOfNodes);
+  const mcIdType expected[9]={-1,0,1,-1,2,3,-1,-1,-1};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9),arr->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected,expected+9,arr->getConstPointer()));
-  DataArrayInt *arr2=arr->invertArrayO2N2N2O(newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)4,arr2->getNbOfElems());
-  const int expected2[4]={1,2,4,5};
+  DataArrayIdType *arr2=arr->invertArrayO2N2N2O(newNbOfNodes);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),arr2->getNbOfElems());
+  const mcIdType expected2[4]={1,2,4,5};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+4,arr2->getConstPointer()));
   arr2->decrRef();
   arr->decrRef();
@@ -1981,32 +1981,32 @@ void MEDCouplingBasicsTest4::testGetNodeIdsInUse1()
 void MEDCouplingBasicsTest4::testBuildDescendingConnec2()
 {
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
-  DataArrayInt *desc=DataArrayInt::New();
-  DataArrayInt *descIndx=DataArrayInt::New();
-  DataArrayInt *revDesc=DataArrayInt::New();
-  DataArrayInt *revDescIndx=DataArrayInt::New();
+  DataArrayIdType *desc=DataArrayIdType::New();
+  DataArrayIdType *descIndx=DataArrayIdType::New();
+  DataArrayIdType *revDesc=DataArrayIdType::New();
+  DataArrayIdType *revDescIndx=DataArrayIdType::New();
   //
   MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity2(desc,descIndx,revDesc,revDescIndx);
   mesh2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(13,(int)mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples());
-  const int expected1[18]={1,2,3,4,-3,5,6, 7,8,-5,9,10,-2,11, 12,13,-7,-10};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(14),revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples());
+  const mcIdType expected1[18]={1,2,3,4,-3,5,6, 7,8,-5,9,10,-2,11, 12,13,-7,-10};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer()));
-  const int expected2[6]={0,4,7,10,14,18};
+  const mcIdType expected2[6]={0,4,7,10,14,18};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+6,descIndx->getConstPointer()));
-  const int expected3[14]={0,1,3,5,6,8,9,11,12,13,15,16,17,18};
+  const mcIdType expected3[14]={0,1,3,5,6,8,9,11,12,13,15,16,17,18};
   CPPUNIT_ASSERT(std::equal(expected3,expected3+14,revDescIndx->getConstPointer()));
-  const int expected4[18]={0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
+  const mcIdType expected4[18]={0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
   CPPUNIT_ASSERT(std::equal(expected4,expected4+18,revDesc->getConstPointer()));
-  DataArrayInt *conn=mesh2->getNodalConnectivity();
-  DataArrayInt *connIndex=mesh2->getNodalConnectivityIndex();
-  const int expected5[14]={0,3,6,9,12,15,18,21,24,27,30,33,36,39};
+  DataArrayIdType *conn=mesh2->getNodalConnectivity();
+  DataArrayIdType *connIndex=mesh2->getNodalConnectivityIndex();
+  const mcIdType expected5[14]={0,3,6,9,12,15,18,21,24,27,30,33,36,39};
   CPPUNIT_ASSERT(std::equal(expected5,expected5+14,connIndex->getConstPointer()));
-  const int expected6[39]={1, 0, 3, 1, 3, 4, 1, 4, 1, 1, 1, 0, 1, 4, 2, 1, 2, 1, 1, 4, 5, 1, 5, 2, 1, 6, 7, 1, 7, 4, 1, 3, 6, 1, 7, 8, 1, 8, 5};
+  const mcIdType expected6[39]={1, 0, 3, 1, 3, 4, 1, 4, 1, 1, 1, 0, 1, 4, 2, 1, 2, 1, 1, 4, 5, 1, 5, 2, 1, 6, 7, 1, 7, 4, 1, 3, 6, 1, 7, 8, 1, 8, 5};
   CPPUNIT_ASSERT(std::equal(expected6,expected6+39,conn->getConstPointer()));
   //
   desc->decrRef();
@@ -2031,27 +2031,27 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp1()
   std::copy(arrY,arrY+4,coordY->getPointer());
   m1c->setCoordsAt(1,coordY);
   MEDCouplingUMesh *m1=m1c->buildUnstructured();
-  const int subPart1[3]={3,4,5};
+  const mcIdType subPart1[3]={3,4,5};
   MEDCouplingUMesh *m1bis=static_cast<MEDCouplingUMesh *>(m1->buildPartOfMySelf(subPart1,subPart1+3,false));
   MEDCouplingUMesh *m2tmp=static_cast<MEDCouplingUMesh *>(m1->deepCopy());
-  const int subPart2[3]={0,1,2};
+  const mcIdType subPart2[3]={0,1,2};
   MEDCouplingUMesh *m2=static_cast<MEDCouplingUMesh *>(m2tmp->buildPartOfMySelf(subPart2,subPart2+3,false));
   const double vec[2]={0.5,0.5};
   m2->translate(vec);
   // End of construction of input meshes m1bis and m2 -> start of specific part of the test
-  DataArrayInt *d1=0,*d2=0;
+  DataArrayIdType *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1bis,m2,1e-10,d1,d2);
-  const int expected1[8]={0,0,1,1,1,2,2,2};
-  const int expected2[8]={0,-1,0,1,-1,1,2,-1};
+  const mcIdType expected1[8]={0,0,1,1,1,2,2,2};
+  const mcIdType expected2[8]={0,-1,0,1,-1,1,2,-1};
  CPPUNIT_ASSERT_EQUAL(8,(int)d1->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(8,(int)d2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(8,(int)m3->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(22,(int)m3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+8,d1->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+8,d2->getConstPointer()));
-  const int expected3[44]={5,17,1,16,12,5,16,0,4,5,17,12,5,18,1,17,13,5,19,2,18,13,5,17,5,6,19,13,5,20,2,19,14,5,21,3,20,14,5,19,6,7,21,14};
-  const int expected4[9]={0,5,12,17,22,28,33,38,44};
+  const mcIdType expected3[44]={5,17,1,16,12,5,16,0,4,5,17,12,5,18,1,17,13,5,19,2,18,13,5,17,5,6,19,13,5,20,2,19,14,5,21,3,20,14,5,19,6,7,21,14};
+  const mcIdType expected4[9]={0,5,12,17,22,28,33,38,44};
   const double expected5[44]={-1.0,2.0,1.0,2.0,2.0,2.0,4.0,2.0,-1.0,4.0,1.0,4.0,2.0,4.0,4.0,4.0,-0.5,-1.5,1.5,-1.5,2.5,-1.5,4.5,-1.5,-0.5,2.5,1.5,2.5,2.5,2.5,4.5,2.5,-0.5,2.0,1.0,2.5,1.5,2.0,2.0,2.5,2.5,2.0,4.0,2.5};
   CPPUNIT_ASSERT_EQUAL(44,(int)m3->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(9,(int)m3->getNodalConnectivityIndex()->getNumberOfTuples());
@@ -2081,8 +2081,8 @@ void MEDCouplingBasicsTest4::testFindNodesOnLine1()
   const double vec[2]={0.,1.};
   const double vec2[3]={1.,0.,0.};
   const double vec3[3]={0.,1.,1.};
-  const int expected1[3]={0,3,6};
-  std::vector<int> res;
+  const mcIdType expected1[3]={0,3,6};
+  std::vector<mcIdType> res;
   mesh->findNodesOnLine(pt,vec,1e-12,res);
   CPPUNIT_ASSERT_EQUAL(3,(int)res.size());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,res.begin()));
@@ -2125,19 +2125,19 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp2()
   m2c->setCoordsAt(1,coordsY2);
   MEDCouplingUMesh *m2=m2c->buildUnstructured();
   //
-  DataArrayInt *d1=0,*d2=0;
+  DataArrayIdType *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2);
-  const int expected1[9]={0,0,1,1,2,2,3,4,5};
-  const int expected2[9]={0,2,1,3,1,3,2,3,3};
+  const mcIdType expected1[9]={0,0,1,1,2,2,3,4,5};
+  const mcIdType expected2[9]={0,2,1,3,1,3,2,3,3};
  CPPUNIT_ASSERT_EQUAL(9,(int)d1->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(9,(int)d2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(9,(int)m3->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(22,(int)m3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+9,d1->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+9,d2->getConstPointer()));
-  const int expected3[45]={5,16,13,12,15,5,15,4,5,16,5,21,2,13,16,5,16,5,6,21,5,17,14,2,21,5,21,6,7,17,5,4,18,19,5,5,5,19,10,6,5,6,10,20,7};
-  const int expected4[10]={0,5,10,15,20,25,30,35,40,45};
+  const mcIdType expected3[45]={5,16,13,12,15,5,15,4,5,16,5,21,2,13,16,5,16,5,6,21,5,17,14,2,21,5,21,6,7,17,5,4,18,19,5,5,5,19,10,6,5,6,10,20,7};
+  const mcIdType expected4[10]={0,5,10,15,20,25,30,35,40,45};
   const double expected5[44]={0.0,0.0,1.0,0.0,1.5,0.0,2.0,0.0,0.0,1.5,1.0,1.5,1.5,1.5,2.0,1.5,0.0,3.0,1.0,3.0,1.5,3.0,2.0,3.0,0.0,0.0,1.0,0.0,2.0,0.0,0.0,1.0,1.0,1.0,2.0,1.0,0.0,3.0,1.0,3.0,2.0,3.0,1.5,1.0};
   CPPUNIT_ASSERT_EQUAL(45,(int)m3->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(10,(int)m3->getNodalConnectivityIndex()->getNumberOfTuples());
@@ -2162,8 +2162,8 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp2()
 void MEDCouplingBasicsTest4::testBuildPartOfMySelfSafe1()
 {
   MEDCouplingUMesh *mesh=build2DTargetMesh_1();
-  const int input1[4]={0,-1,4,2};
-  const int input2[4]={0,4,5,4};
+  const mcIdType input1[4]={0,-1,4,2};
+  const mcIdType input2[4]={0,4,5,4};
   CPPUNIT_ASSERT_THROW(mesh->buildPartOfMySelf(input1,input1+4,true),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(mesh->buildPartOfMySelf(input2,input2+4,true),INTERP_KERNEL::Exception);
   mesh->decrRef();
@@ -2172,7 +2172,7 @@ void MEDCouplingBasicsTest4::testBuildPartOfMySelfSafe1()
 void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp3()
 {
   double m1Coords[50]={0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1,0.,-1.5,0.5,0.,1.25,0.,0.70710678118654757,0.70710678118654757,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.70710678118654757,0.70710678118654757,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.70710678118654757,-0.70710678118654757,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.70710678118654757,-0.70710678118654757,1.0606601717798214,-1.0606601717798214};
-  int m1Conn[56]={0,3,1,13,11,9, 3,4,2,1,14,12,10,11, 5,3,0,15,13,17, 6,4,3,5,16,14,15,18, 5,0,7,17,21,19, 6,5,7,8,18,19,22,20, 0,1,7,9,23,21, 1,2,8,7,10,24,22,23};
+  mcIdType m1Conn[56]={0,3,1,13,11,9, 3,4,2,1,14,12,10,11, 5,3,0,15,13,17, 6,4,3,5,16,14,15,18, 5,0,7,17,21,19, 6,5,7,8,18,19,22,20, 0,1,7,9,23,21, 1,2,8,7,10,24,22,23};
   MEDCouplingUMesh *m1=MEDCouplingUMesh::New();
   m1->setMeshDimension(2);
   m1->allocateCells(8);
@@ -2192,7 +2192,7 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp3()
   myCoords1->decrRef();
   //
   double m2Coords[30]={0.,0.,1.1,0.,1.1,1.,0.,1.,1.7,0.,1.7,1.,-1.1,1.,-1.1,0.,-1.7,0.,-1.7,1.,-1.7,-1,-1.1,-1.,0.,-1.,1.1,-1,1.7,-1.};
-  int m2Conn[32]={0,3,2,1, 1,2,5,4, 7,6,3,0, 8,9,6,7, 7,0,12,11, 8,7,11,10, 0,1,13,12, 1,4,14,13};
+  mcIdType m2Conn[32]={0,3,2,1, 1,2,5,4, 7,6,3,0, 8,9,6,7, 7,0,12,11, 8,7,11,10, 0,1,13,12, 1,4,14,13};
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New();
   m2->setMeshDimension(2);
   m2->allocateCells(8);
@@ -2205,20 +2205,20 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp3()
   m2->setCoords(myCoords2);
   myCoords2->decrRef();
   //
-  DataArrayInt *d1=0,*d2=0;
+  DataArrayIdType *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2);
   m3->unPolyze();
-  const int expected1[16]={0,1,1,1,2,3,3,3,4,5,5,5,6,7,7,7};
-  const int expected2[16]={0,0,1,-1,2,2,3,-1,4,4,5,-1,6,6,7,-1};
- CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples());
+  const mcIdType expected1[16]={0,1,1,1,2,3,3,3,4,5,5,5,6,7,7,7};
+  const mcIdType expected2[16]={0,0,1,-1,2,2,3,-1,4,4,5,-1,6,6,7,-1};
 CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(16,(int)m3->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(104,m3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(104,(int)m3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+16,d1->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+16,d2->getConstPointer()));
-  const int expected3[136]={6,28,1,25,44,45,46,8,26,1,28,27,47,48,49,50,8,40,2,26,27,51,52,53,54,8,28,4,40,27,55,56,57,58,6,28,25,5,59,60,61,8,28,5,32,31,62,63,64,65,8,32,6,41,31,66,67,68,69,8,41,4,28,31,70,71,72,73,6,25,37,5,74,75,76,8,32,5,37,36,77,78,79,80,8,42,6,32,36,81,82,83,84,8,37,8,42,36,85,86,87,88,6,1,37,25,89,90,91,8,37,1,26,38,92,93,94,95,8,26,2,43,38,96,97,98,99,8,43,8,37,38,100,101,102,103};
-  const int expected4[17]={0,7,16,25,34,41,50,59,68,75,84,93,102,109,118,127,136};
+  const mcIdType expected3[136]={6,28,1,25,44,45,46,8,26,1,28,27,47,48,49,50,8,40,2,26,27,51,52,53,54,8,28,4,40,27,55,56,57,58,6,28,25,5,59,60,61,8,28,5,32,31,62,63,64,65,8,32,6,41,31,66,67,68,69,8,41,4,28,31,70,71,72,73,6,25,37,5,74,75,76,8,32,5,37,36,77,78,79,80,8,42,6,32,36,81,82,83,84,8,37,8,42,36,85,86,87,88,6,1,37,25,89,90,91,8,37,1,26,38,92,93,94,95,8,26,2,43,38,96,97,98,99,8,43,8,37,38,100,101,102,103};
+  const mcIdType expected4[17]={0,7,16,25,34,41,50,59,68,75,84,93,102,109,118,127,136};
   const double expected5[208]={0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1.,0.,-1.5,0.5,0.,1.25,0.,0.7071067811865476,0.7071067811865476,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.7071067811865476,0.7071067811865476,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.7071067811865476,-0.7071067811865476,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.7071067811865476,-0.7071067811865476,1.0606601717798214,-1.0606601717798214,0.,0.,1.1,0.,1.1,1.,0.,1.,1.7,0.,1.7,1.,-1.1,1.,-1.1,0.,-1.7,0.,-1.7,1.,-1.7,-1.,-1.1,-1.,0.,-1.,1.1,-1.,1.7,-1.,1.118033988749895,1.,-1.118033988749895,1.,-1.118033988749895,-1.,1.118033988749895,-1.,0.7071067811865477,0.7071067811865476,0.5,0.,0.,0.5,1.05,0.,0.7071067811865475,0.7071067811865477,0.55,1.,1.1,0.5,1.4012585384440737,0.535233134659635,1.3,0.,1.1,0.5,1.1090169943749475,1.,0.,1.25,0.6123724356957946,1.369306393762915,1.1090169943749475,1.,0.55,1.,0.,0.5,-0.5,0.,-0.7071067811865477,0.7071067811865476,-0.7071067811865475,0.7071067811865477,-1.05,0.,-1.1,0.5,-0.55,1.,-1.3,0.,-1.4012585384440737,0.5352331346596344,-1.1090169943749475,1.,-1.1,0.5,-0.6123724356957941,1.3693063937629155,0.,1.25,-0.55,1.,-1.1090169943749475,1.,0.,-0.5,-0.7071067811865475,-0.7071067811865477,-0.5,0.,-1.05,0.,-0.7071067811865478,-0.7071067811865475,-0.55,-1.,-1.1,-0.5,-1.4012585384440734,-0.5352331346596354,-1.3,0.,-1.1,-0.5,-1.1090169943749475,-1.,0.,-1.25,-0.6123724356957945,-1.369306393762915,-1.1090169943749475,-1.,-0.55,-1.,0.7071067811865475,-0.7071067811865477,0.,-0.5,0.5,0.,0.7071067811865477,-0.7071067811865475,1.05,0.,1.1,-0.5,0.55,-1.,1.3,0.,1.4012585384440737,-0.535233134659635,1.1090169943749475,-1.,1.1,-0.5,0.6123724356957946,-1.369306393762915,0.,-1.25,0.55,-1.,1.1090169943749475,-1.0};
   CPPUNIT_ASSERT_EQUAL(136,(int)m3->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(17,(int)m3->getNodalConnectivityIndex()->getNumberOfTuples());
index 8aa080b227bc553f6768191492fe279911db874f..41a7cb6344bf4141319564f71d0f5511eef82ec4 100644 (file)
@@ -24,6 +24,7 @@
 #include "MEDCouplingMappedExtrudedMesh.hxx"
 #include "MEDCouplingFieldDouble.hxx"
 #include "MEDCouplingMemArray.hxx"
+#include "MEDCouplingMemArray.txx"
 #include "MEDCouplingGaussLocalization.hxx"
 #include "MEDCouplingMultiFields.hxx"
 #include "MEDCouplingFieldOverTime.hxx"
@@ -37,7 +38,7 @@ using namespace MEDCoupling;
 void MEDCouplingBasicsTest5::testUMeshTessellate2D1()
 {
   double m1Coords[50]={0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1,0.,-1.5,0.5,0.,1.25,0.,0.70710678118654757,0.70710678118654757,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.70710678118654757,0.70710678118654757,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.70710678118654757,-0.70710678118654757,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.70710678118654757,-0.70710678118654757,1.0606601717798214,-1.0606601717798214};
-  int m1Conn[56]={0,3,1,13,11,9, 3,4,2,1,14,12,10,11, 5,3,0,15,13,17, 6,4,3,5,16,14,15,18, 5,0,7,17,21,19, 6,5,7,8,18,19,22,20, 0,1,7,9,23,21, 1,2,8,7,10,24,22,23};
+  mcIdType m1Conn[56]={0,3,1,13,11,9, 3,4,2,1,14,12,10,11, 5,3,0,15,13,17, 6,4,3,5,16,14,15,18, 5,0,7,17,21,19, 6,5,7,8,18,19,22,20, 0,1,7,9,23,21, 1,2,8,7,10,24,22,23};
   MEDCouplingUMesh *m1=MEDCouplingUMesh::New();
   m1->setMeshDimension(2);
   m1->allocateCells(8);
@@ -59,8 +60,8 @@ void MEDCouplingBasicsTest5::testUMeshTessellate2D1()
   MEDCouplingUMesh *m11=static_cast<MEDCouplingUMesh *>(m1->deepCopy());
   m11->tessellate2D(1.);
   CPPUNIT_ASSERT(m11->getCoords()->isEqual(*m11->getCoords(),1e-12));
-  const int expected1[48]={5,0,3,11,1,5,3,4,12,2,1,11,5,5,15,3,0,5,6,16,4,3,15,5,5,5,0,7,19,5,6,5,19,7,8,20,5,0,1,23,7,5,1,2,24,8,7,23};
-  const int expected2[9]={0,5,12,17,24,29,36,41,48};
+  const mcIdType expected1[48]={5,0,3,11,1,5,3,4,12,2,1,11,5,5,15,3,0,5,6,16,4,3,15,5,5,5,0,7,19,5,6,5,19,7,8,20,5,0,1,23,7,5,1,2,24,8,7,23};
+  const mcIdType expected2[9]={0,5,12,17,24,29,36,41,48};
   CPPUNIT_ASSERT_EQUAL(48,(int)m11->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(9,(int)m11->getNodalConnectivityIndex()->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+48,m11->getNodalConnectivity()->getConstPointer()));
@@ -69,9 +70,9 @@ void MEDCouplingBasicsTest5::testUMeshTessellate2D1()
   //
   MEDCouplingUMesh *m12=static_cast<MEDCouplingUMesh *>(m1->deepCopy());
   m12->tessellate2D(0.5);
-  CPPUNIT_ASSERT_EQUAL(41,m12->getNumberOfNodes());
-  const int expected3[60]={5,0,3,25,26,1,5,3,4,27,28,2,1,26,25,5,5,29,30,3,0,5,6,31,32,4,3,30,29,5,5,5,0,7,33,34,5,6,5,34,33,7,8,35,36,5,0,1,37,38,7,5,1,2,39,40,8,7,38,37};
-  const int expected4[9]={0,6,15,21,30,36,45,51,60};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(41),m12->getNumberOfNodes());
+  const mcIdType expected3[60]={5,0,3,25,26,1,5,3,4,27,28,2,1,26,25,5,5,29,30,3,0,5,6,31,32,4,3,30,29,5,5,5,0,7,33,34,5,6,5,34,33,7,8,35,36,5,0,1,37,38,7,5,1,2,39,40,8,7,38,37};
+  const mcIdType expected4[9]={0,6,15,21,30,36,45,51,60};
   const double expected5[82]={0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1.,0.,-1.5,0.5,0.,1.25,0.,0.7071067811865476,0.7071067811865476,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.7071067811865476,0.7071067811865476,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.7071067811865476,-0.7071067811865476,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.7071067811865476,-0.7071067811865476,1.0606601717798214,-1.0606601717798214,0.479425538604203,0.8775825618903728,0.8414709848078964,0.54030230586814,0.7191383079063044,1.3163738428355591,1.2622064772118446,0.8104534588022099,-0.877582561890373,0.4794255386042027,-0.5403023058681399,0.8414709848078964,-1.3163738428355596,0.7191383079063038,-0.8104534588022098,1.2622064772118446,-0.4794255386042031,-0.8775825618903728,-0.8414709848078965,-0.5403023058681399,-0.7191383079063045,-1.3163738428355591,-1.2622064772118449,-0.8104534588022098,0.8775825618903729,-0.47942553860420295,0.54030230586814,-0.8414709848078964,1.3163738428355594,-0.7191383079063043,0.8104534588022099,-1.2622064772118446};
   for(int i=0;i<82;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected5[i],m12->getCoords()->getIJ(0,i),1e-12);
@@ -88,7 +89,7 @@ void MEDCouplingBasicsTest5::testUMeshTessellate2DCurve1()
 {
   // A quarter of circle:
   double mcoords[6] = {0.4,0.0,   0.0,-0.4,   0.283,-0.283};
-  int mconnec[3] = {0,1,2};
+  mcIdType mconnec[3] = {0,1,2};
 
   MEDCouplingUMesh *m1 = MEDCouplingUMesh::New();
   m1->setMeshDimension(1);
@@ -114,7 +115,7 @@ void MEDCouplingBasicsTest5::testUMeshTessellate2DCurve1()
 void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp4()
 {
   double m1Coords[50]={0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1,0.,-1.5,0.5,0.,1.25,0.,0.70710678118654757,0.70710678118654757,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.70710678118654757,0.70710678118654757,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.70710678118654757,-0.70710678118654757,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.70710678118654757,-0.70710678118654757,1.0606601717798214,-1.0606601717798214};
-  int m1Conn[56]={0,3,1,13,11,9, 3,4,2,1,14,12,10,11, 5,3,0,15,13,17, 6,4,3,5,16,14,15,18, 5,0,7,17,21,19, 6,5,7,8,18,19,22,20, 0,1,7,9,23,21, 1,2,8,7,10,24,22,23};
+  mcIdType m1Conn[56]={0,3,1,13,11,9, 3,4,2,1,14,12,10,11, 5,3,0,15,13,17, 6,4,3,5,16,14,15,18, 5,0,7,17,21,19, 6,5,7,8,18,19,22,20, 0,1,7,9,23,21, 1,2,8,7,10,24,22,23};
   MEDCouplingUMesh *m1=MEDCouplingUMesh::New();
   m1->setMeshDimension(2);
   m1->allocateCells(8);
@@ -134,7 +135,7 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp4()
   myCoords1->decrRef();
   //
   double m2Coords[30]={0.,0.,1.1,0.,1.1,1.,0.,1.,1.7,0.,1.7,1.,-1.1,1.,-1.1,0.,-1.7,0.,-1.7,1.,-1.7,-1,-1.1,-1.,0.,-1.,1.1,-1,1.7,-1.};
-  int m2Conn[32]={0,3,2,1, 1,2,5,4, 7,6,3,0, 8,9,6,7, 7,0,12,11, 8,7,11,10, 0,1,13,12, 1,4,14,13};
+  mcIdType m2Conn[32]={0,3,2,1, 1,2,5,4, 7,6,3,0, 8,9,6,7, 7,0,12,11, 8,7,11,10, 0,1,13,12, 1,4,14,13};
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New();
   m2->setMeshDimension(2);
   m2->allocateCells(8);
@@ -147,20 +148,20 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp4()
   m2->setCoords(myCoords2);
   myCoords2->decrRef();
   //
-  DataArrayInt *d1=0,*d2=0;
+  DataArrayIdType *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m2,m1,1e-10,d1,d2);
   m3->unPolyze();
-  const int expected1[16]={0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7};
-  const int expected2[16]={0,1,1,-1,2,3,3,-1,4,5,5,-1,6,7,7,-1};
+  const mcIdType expected1[16]={0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7};
+  const mcIdType expected2[16]={0,1,1,-1,2,3,3,-1,4,5,5,-1,6,7,7,-1};
  CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(16,(int)m3->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(104,m3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(104,(int)m3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+16,d1->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+16,d2->getConstPointer()));
-  const int expected3[136]={6,16,15,18,44,45,46,8,18,2,1,16,47,48,49,50,8,17,1,2,40,51,52,53,54,8,40,5,4,17,55,56,57,58,6,18,15,20,59,60,61,8,20,7,6,18,62,63,64,65,8,41,6,7,21,66,67,68,69,8,21,8,9,41,70,71,72,73,6,20,15,22,74,75,76,8,22,11,7,20,77,78,79,80,8,21,7,11,42,81,82,83,84,8,42,10,8,21,85,86,87,88,6,22,15,16,89,90,91,8,16,1,13,22,92,93,94,95,8,43,13,1,17,96,97,98,99,8,17,4,14,43,100,101,102,103};
-  const int expected4[17]={0,7,16,25,34,41,50,59,68,75,84,93,102,109,118,127,136};
+  const mcIdType expected3[136]={6,16,15,18,44,45,46,8,18,2,1,16,47,48,49,50,8,17,1,2,40,51,52,53,54,8,40,5,4,17,55,56,57,58,6,18,15,20,59,60,61,8,20,7,6,18,62,63,64,65,8,41,6,7,21,66,67,68,69,8,21,8,9,41,70,71,72,73,6,20,15,22,74,75,76,8,22,11,7,20,77,78,79,80,8,21,7,11,42,81,82,83,84,8,42,10,8,21,85,86,87,88,6,22,15,16,89,90,91,8,16,1,13,22,92,93,94,95,8,43,13,1,17,96,97,98,99,8,17,4,14,43,100,101,102,103};
+  const mcIdType expected4[17]={0,7,16,25,34,41,50,59,68,75,84,93,102,109,118,127,136};
   const double expected5[208]={0.,0.,1.1, 0.,1.1,1.,0.,1.,1.7,0.,1.7,1.,-1.1,1.,-1.1,0.,-1.7,0.,-1.7,1.,-1.7,-1.,-1.1,-1.,0.,-1.,1.1,-1.,1.7,-1.,0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1.,0.,-1.5,0.5,0.,1.25,0.,0.7071067811865476,0.7071067811865476,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.7071067811865476,0.7071067811865476,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.7071067811865476,-0.7071067811865476,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.7071067811865476,-0.7071067811865476,1.0606601717798214,-1.0606601717798214,1.1180339887498951,1.,-1.1180339887498951,1.,-1.1180339887498951,-1.,1.1180339887498951,-1.,0.5,0.,0.,0.5,0.7071067811865477,0.7071067811865476,0.55,1.,1.1,0.5,1.05,0.,0.7071067811865477,0.7071067811865475,1.3,0.,1.1,0.5,1.1090169943749475,1.,1.4012585384440737,0.535233134659635,1.4090169943749475,1.,1.7,0.5,1.6,0.,1.4012585384440737,0.535233134659635,0.,0.5,-0.5,0.,-0.7071067811865477,0.7071067811865476,-1.05,0.,-1.1,0.5,-0.55,1.,-0.7071067811865478,0.7071067811865475,-1.1090169943749475,1.,-1.1,0.5,-1.3,0.,-1.4012585384440737,0.5352331346596344,-1.6,0.,-1.7,0.5,-1.4090169943749475,1.,-1.4012585384440737,0.5352331346596344,-0.5,0.,0.,-0.5,-0.7071067811865475,-0.7071067811865477,-0.55,-1.,-1.1,-0.5,-1.05,0.,-0.7071067811865475,-0.7071067811865477,-1.3,0.,-1.1,-0.5,-1.1090169943749475,-1.,-1.4012585384440734,-0.5352331346596354,-1.4090169943749475,-1.,-1.7,-0.5,-1.6,0.,-1.4012585384440732,-0.5352331346596354,0.,-0.5,0.5,0.,0.7071067811865475,-0.7071067811865477,1.05,0.,1.1,-0.5,0.55,-1.,0.7071067811865475,-0.7071067811865477,1.1090169943749475,-1.,1.1,-0.5,1.3,0.,1.4012585384440737,-0.535233134659635,1.6,0.,1.7,-0.5,1.4090169943749475,-1.,1.4012585384440737,-0.535233134659635};
   CPPUNIT_ASSERT_EQUAL(136,(int)m3->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(17,(int)m3->getNodalConnectivityIndex()->getNumberOfTuples());
@@ -182,13 +183,13 @@ void MEDCouplingBasicsTest5::testGetCellIdsCrossingPlane1()
   MEDCouplingUMesh *mesh3D=build3DExtrudedUMesh_1(mesh2D);
   const double vec[3]={-0.07,1.,0.07};
   const double origin[3]={1.524,1.4552,1.74768};
-  DataArrayInt *ids1=mesh3D->getCellIdsCrossingPlane(origin,vec,1e-10);
+  DataArrayIdType *ids1=mesh3D->getCellIdsCrossingPlane(origin,vec,1e-10);
  CPPUNIT_ASSERT_EQUAL(9,(int)ids1->getNumberOfTuples());
-  const int expected1[9]={1,3,4,7,9,10,13,15,16};
+  const mcIdType expected1[9]={1,3,4,7,9,10,13,15,16};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+9,ids1->getConstPointer()));
   const double vec2[3]={0.,0.,1.};
-  DataArrayInt *ids2=mesh3D->getCellIdsCrossingPlane(origin,vec2,1e-10);
-  const int expected2[6]={6,7,8,9,10,11};
+  DataArrayIdType *ids2=mesh3D->getCellIdsCrossingPlane(origin,vec2,1e-10);
+  const mcIdType expected2[6]={6,7,8,9,10,11};
  CPPUNIT_ASSERT_EQUAL(6,(int)ids2->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected2,expected2+6,ids2->getConstPointer()));
   ids1->decrRef();
@@ -205,15 +206,15 @@ void MEDCouplingBasicsTest5::testBuildSlice3D1()
   // First slice in the middle of 3D cells
   const double vec1[3]={-0.07,1.,0.07};
   const double origin1[3]={1.524,1.4552,1.74768};
-  DataArrayInt *ids=0;
+  DataArrayIdType *ids=0;
   MEDCouplingUMesh *slice1=mesh3D->buildSlice3D(origin1,vec1,1e-10,ids);
-  const int expected1[9]={1,3,4,7,9,10,13,15,16};
-  const int expected2[47]={5,42,41,40,43,44,5,42,46,45,41,5,44,43,40,47,48,5,49,42,44,50,5,49,51,46,42,5,50,44,48,52,5,53,49,50,54,5,53,55,51,49,5,54,50,52,56};
-  const int expected3[10]={0,6,11,17,22,27,32,37,42,47};
+  const mcIdType expected1[9]={1,3,4,7,9,10,13,15,16};
+  const mcIdType expected2[47]={5,42,41,40,43,44,5,42,46,45,41,5,44,43,40,47,48,5,49,42,44,50,5,49,51,46,42,5,50,44,48,52,5,53,49,50,54,5,53,55,51,49,5,54,50,52,56};
+  const mcIdType expected3[10]={0,6,11,17,22,27,32,37,42,47};
   const double expected4[171]={1.,1.,0.,1.,1.25,0.,1.,1.5,0.,2.,1.,0.,1.,2.,0.,0.,2.,0.,3.,1.,0.,3.,2.,0.,0.,1.,0.,2.,2.,0.,1.,1.,1.,1.,1.25,1.,1.,1.5,1.,2.,1.,1.,1.,2.,1.,0.,2.,1.,3.,1.,1.,3.,2.,1.,0.,1.,1.,2.,2.,1.,1.,1.,2.,1.,1.25,2.,1.,1.5,2.,2.,1.,2.,1.,2.,2.,0.,2.,2.,3.,1.,2.,3.,2.,2.,0.,1.,2.,2.,2.,2.,1.,1.,3.,1.,1.25,3.,1.,1.5,3.,2.,1.,3.,1.,2.,3.,0.,2.,3.,3.,1.,3.,3.,2.,3.,0.,1.,3.,2.,2.,3.,1.,1.5408576,0.,2.,1.6108576000000001,0.,2.,1.5408576,1.,1.,1.5,0.5836800000000008,1.,1.4708576,1.,3.,1.6808576,0.,3.,1.6108576000000001,1.,0.,1.4708576,0.,0.,1.4008576,1.,2.,1.4708576,2.,1.,1.4008576000000001,2.,3.,1.5408575999999998,2.,0.,1.3308575999999999,2.,2.,1.4008576,3.,1.,1.3308576,3.,3.,1.4708576,3.,0.,1.2608576,3.};
   CPPUNIT_ASSERT_EQUAL(2,slice1->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
-  CPPUNIT_ASSERT_EQUAL(57,slice1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(57,(int)slice1->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(9,(int)slice1->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(9,(int)ids->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(47,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
@@ -229,12 +230,12 @@ void MEDCouplingBasicsTest5::testBuildSlice3D1()
   const double vec2[3]={0.,3.,1.};
   const double origin2[3]={2.5,1.,3.};
   slice1=mesh3D->buildSlice3D(origin2,vec2,1e-10,ids);
-  const int expected5[49]={5,50,10,4,51,5,50,52,7,10,5,51,4,5,53,5,54,50,51,55,56,5,54,57,52,50,5,56,55,51,53,58,5,38,59,56,54,43,5,54,57,46,43,5,38,59,56,58,48};
-  const int expected6[10]={0,5,10,15,21,26,32,38,43,49};
+  const mcIdType expected5[49]={5,50,10,4,51,5,50,52,7,10,5,51,4,5,53,5,54,50,51,55,56,5,54,57,52,50,5,56,55,51,53,58,5,38,59,56,54,43,5,54,57,46,43,5,38,59,56,58,48};
+  const mcIdType expected6[10]={0,5,10,15,21,26,32,38,43,49};
   const double expected7[180]={1.,1.,0.,1.,1.25,0.,1.,1.5,0.,2.,1.,0.,1.,2.,0.,0.,2.,0.,3.,1.,0.,3.,2.,0.,0.,1.,0.,1.,3.,0.,2.,2.,0.,2.,3.,0.,1.,1.,1.,1.,1.25,1.,1.,1.5,1.,2.,1.,1.,1.,2.,1.,0.,2.,1.,3.,1.,1.,3.,2.,1.,0.,1.,1.,1.,3.,1.,2.,2.,1.,2.,3.,1.,0.,0.,2.,1.,1.,2.,1.,1.25,2.,1.,0.,2.,1.,1.5,2.,2.,0.,2.,2.,1.,2.,1.,2.,2.,0.,2.,2.,3.,1.,2.,3.,2.,2.,0.,1.,2.,2.,2.,2.,0.,0.,3.,1.,1.,3.,1.,1.25,3.,1.,0.,3.,1.,1.5,3.,2.,0.,3.,2.,1.,3.,1.,2.,3.,0.,2.,3.,3.,1.,3.,3.,2.,3.,0.,1.,3.,2.,2.,3.,2.,1.6666666666666667,1.,1.,1.6666666666666667,1.,3.,1.6666666666666667,1.,0.,1.6666666666666667,1.,2.,1.3333333333333335,2.,1.,1.5,1.5,1.,1.3333333333333333,2.,3.,1.3333333333333335,2.,0.,1.3333333333333335,2.,1.,1.25,2.25};
   CPPUNIT_ASSERT_EQUAL(2,slice1->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
-  CPPUNIT_ASSERT_EQUAL(60,slice1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(60,(int)slice1->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(9,(int)slice1->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(9,(int)ids->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(49,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
@@ -250,13 +251,13 @@ void MEDCouplingBasicsTest5::testBuildSlice3D1()
   const double vec3[3]={0.,0.,1.};
   const double origin3[3]={2.5,1.,2.};
   slice1=mesh3D->buildSlice3D(origin3,vec3,1e-10,ids);
-  const int expected8[12]={6,7,8,9,10,11,12,13,14,15,16,17};
-  const int expected9[68]={5,15,26,16,18,5,16,21,28,22,19,17,5,18,20,21,16,5,21,24,25,28,5,26,16,17,19,22,23,5,22,27,29,28,5,15,26,16,18,5,16,21,28,22,19,17,5,18,20,21,16,5,21,24,25,28,5,26,16,17,19,22,23,5,22,27,29,28};
-  const int expected10[13]={0,5,12,17,22,29,34,39,46,51,56,63,68};
+  const mcIdType expected8[12]={6,7,8,9,10,11,12,13,14,15,16,17};
+  const mcIdType expected9[68]={5,15,26,16,18,5,16,21,28,22,19,17,5,18,20,21,16,5,21,24,25,28,5,26,16,17,19,22,23,5,22,27,29,28,5,15,26,16,18,5,16,21,28,22,19,17,5,18,20,21,16,5,21,24,25,28,5,26,16,17,19,22,23,5,22,27,29,28};
+  const mcIdType expected10[13]={0,5,12,17,22,29,34,39,46,51,56,63,68};
   const double expected11[135]={0.,0.,1.,1.,1.,1.,1.,1.25, 1.,1.,0.,1.,1.,1.5, 1.,2.,0.,1.,2.,1.,1.,1.,2.,1.,0.,2.,1.,3.,1.,1.,3.,2.,1.,0.,1.,1.,1.,3.,1.,2.,2.,1.,2.,3.,1.,0.,0.,2.,1.,1.,2.,1.,1.25, 2.,1.,0.,2.,1.,1.5, 2.,2.,0.,2.,2.,1.,2.,1.,2.,2.,0.,2.,2.,3.,1.,2.,3.,2.,2.,0.,1.,2.,1.,3.,2.,2.,2.,2.,2.,3.,2.,0.,0.,3.,1.,1.,3.,1.,1.25, 3.,1.,0.,3.,1.,1.5, 3.,2.,0.,3.,2.,1.,3.,1.,2.,3.,0.,2.,3.,3.,1.,3.,3.,2.,3.,0.,1.,3.,1.,3.,3.,2.,2.,3.,2.,3.,3.};
   CPPUNIT_ASSERT_EQUAL(2,slice1->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
-  CPPUNIT_ASSERT_EQUAL(45,slice1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(45,(int)slice1->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(12,(int)slice1->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(12,(int)ids->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(68,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
@@ -277,22 +278,22 @@ void MEDCouplingBasicsTest5::testBuildSlice3DSurf1()
   MEDCouplingUMesh *mesh2D=0;
   MEDCouplingUMesh *mesh3D=build3DExtrudedUMesh_1(mesh2D);
   mesh2D->decrRef();
-  DataArrayInt *a=DataArrayInt::New(),*b=DataArrayInt::New(),*c=DataArrayInt::New(),*d=DataArrayInt::New();
+  DataArrayIdType *a=DataArrayIdType::New(),*b=DataArrayIdType::New(),*c=DataArrayIdType::New(),*d=DataArrayIdType::New();
   mesh2D=mesh3D->buildDescendingConnectivity(a,b,c,d);
   a->decrRef(); b->decrRef(); c->decrRef(); d->decrRef();
   mesh3D->decrRef();
   //
   const double vec1[3]={-0.07,1.,0.07};
   const double origin1[3]={1.524,1.4552,1.74768};
-  DataArrayInt *ids=0;
+  DataArrayIdType *ids=0;
   MEDCouplingUMesh *slice1=mesh2D->buildSlice3DSurf(origin1,vec1,1e-10,ids);
-  const int expected1[25]={6,8,10,11,13,18,19,21,23,25,26,38,41,43,47,49,52,53,64,67,69,73,75,78,79};
-  const int expected2[75]={1,40,41,1,42,41,1,40,43,1,44,43,1,42,44,1,45,41,1,42,46,1,46,45,1,47,40,1,47,48,1,44,48,1,49,42,1,44,50,1,49,50,1,49,51,1,51,46,1,48,52,1,50,52,1,53,49,1,50,54,1,53,54,1,53,55,1,55,51,1,52,56,1,54,56};
-  const int expected3[26]={0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75};
+  const mcIdType expected1[25]={6,8,10,11,13,18,19,21,23,25,26,38,41,43,47,49,52,53,64,67,69,73,75,78,79};
+  const mcIdType expected2[75]={1,40,41,1,42,41,1,40,43,1,44,43,1,42,44,1,45,41,1,42,46,1,46,45,1,47,40,1,47,48,1,44,48,1,49,42,1,44,50,1,49,50,1,49,51,1,51,46,1,48,52,1,50,52,1,53,49,1,50,54,1,53,54,1,53,55,1,55,51,1,52,56,1,54,56};
+  const mcIdType expected3[26]={0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75};
   const double expected4[171]={1.,1.,0.,1.,1.25,0.,1.,1.5,0.,2.,1.,0.,1.,2.,0.,0.,2.,0.,3.,1.,0.,3.,2.,0.,0.,1.,0.,2.,2.,0.,1.,1.,1.,1.,1.25,1.,1.,1.5,1.,2.,1.,1.,1.,2.,1.,0.,2.,1.,3.,1.,1.,3.,2.,1.,0.,1.,1.,2.,2.,1.,1.,1.,2.,1.,1.25,2.,1.,1.5,2.,2.,1.,2.,1.,2.,2.,0.,2.,2.,3.,1.,2.,3.,2.,2.,0.,1.,2.,2.,2.,2.,1.,1.,3.,1.,1.25,3.,1.,1.5,3.,2.,1.,3.,1.,2.,3.,0.,2.,3.,3.,1.,3.,3.,2.,3.,0.,1.,3.,2.,2.,3.,1.,1.5408576,0.,2.,1.6108576000000001,0.,2.,1.5408576,1.,1.,1.5,0.5836800000000008,1.,1.4708576,1.,3.,1.6808576,0.,3.,1.6108576000000001,1.,0.,1.4708576,0.,0.,1.4008576,1.,2.,1.4708576,2.,1.,1.4008576000000001,2.,3.,1.5408575999999998,2.,0.,1.3308575999999999,2.,2.,1.4008576,3.,1.,1.3308576,3.,3.,1.4708576,3.,0.,1.2608576,3.};
   CPPUNIT_ASSERT_EQUAL(1,slice1->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
-  CPPUNIT_ASSERT_EQUAL(57,slice1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(57,(int)slice1->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(25,(int)slice1->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(25,(int)ids->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(75,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
@@ -308,13 +309,13 @@ void MEDCouplingBasicsTest5::testBuildSlice3DSurf1()
   const double vec2[3]={0.,0.,1.};
   const double origin2[3]={2.5,1.,2.};
   slice1=mesh2D->buildSlice3DSurf(origin2,vec2,1e-10,ids);
-  const int expected5[68]={32,32,32,32,33,34,35,36,37,38,39,40,41,42,43,43,43,43,43,43,44,44,44,44,45,46,47,47,47,47,48,49,50,51,52,53,53,53,53,53,53,54,54,54,54,55,56,57,59,60,61,62,63,64,65,66,67,68,71,72,74,75,76,77,78,81,82,83};
-  const int expected6[204]={1,15,18,1,18,16,1,16,26,1,26,15,1,26,15,1,16,26,1,18,16,1,15,18,1,16,21,1,21,28,1,22,28,1,19,22,1,17,19,1,16,17,1,16,21,1,21,28,1,28,22,1,22,19,1,19,17,1,17,16,1,16,18,1,18,20,1,20,21,1,21,16,1,20,21,1,18,20,1,28,21,1,21,24,1,24,25,1,25,28,1,25,28,1,24,25,1,21,24,1,23,22,1,26,23,1,26,16,1,16,17,1,17,19,1,19,22,1,22,23,1,23,26,1,22,28,1,28,29,1,29,27,1,27,22,1,27,22,1,29,27,1,28,29,1,26,15,1,16,26,1,18,16,1,15,18,1,16,21,1,21,28,1,22,28,1,19,22,1,17,19,1,16,17,1,20,21,1,18,20,1,25,28,1,24,25,1,21,24,1,23,22,1,26,23,1,27,22,1,29,27,1,28,29};
-  const int expected7[69]={0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,198,201,204};
+  const mcIdType expected5[68]={32,32,32,32,33,34,35,36,37,38,39,40,41,42,43,43,43,43,43,43,44,44,44,44,45,46,47,47,47,47,48,49,50,51,52,53,53,53,53,53,53,54,54,54,54,55,56,57,59,60,61,62,63,64,65,66,67,68,71,72,74,75,76,77,78,81,82,83};
+  const mcIdType expected6[204]={1,15,18,1,18,16,1,16,26,1,26,15,1,26,15,1,16,26,1,18,16,1,15,18,1,16,21,1,21,28,1,22,28,1,19,22,1,17,19,1,16,17,1,16,21,1,21,28,1,28,22,1,22,19,1,19,17,1,17,16,1,16,18,1,18,20,1,20,21,1,21,16,1,20,21,1,18,20,1,28,21,1,21,24,1,24,25,1,25,28,1,25,28,1,24,25,1,21,24,1,23,22,1,26,23,1,26,16,1,16,17,1,17,19,1,19,22,1,22,23,1,23,26,1,22,28,1,28,29,1,29,27,1,27,22,1,27,22,1,29,27,1,28,29,1,26,15,1,16,26,1,18,16,1,15,18,1,16,21,1,21,28,1,22,28,1,19,22,1,17,19,1,16,17,1,20,21,1,18,20,1,25,28,1,24,25,1,21,24,1,23,22,1,26,23,1,27,22,1,29,27,1,28,29};
+  const mcIdType expected7[69]={0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,198,201,204};
   const double expected8[135]={0.,0.,1.,1.,1.,1.,1.,1.25, 1.,1.,0.,1.,1.,1.5, 1.,2.,0.,1.,2.,1.,1.,1.,2.,1.,0.,2.,1.,3.,1.,1.,3.,2.,1.,0.,1.,1.,1.,3.,1.,2.,2.,1.,2.,3.,1.,0.,0.,2.,1.,1.,2.,1.,1.25, 2.,1.,0.,2.,1.,1.5, 2.,2.,0.,2.,2.,1.,2.,1.,2.,2.,0.,2.,2.,3.,1.,2.,3.,2.,2.,0.,1.,2.,1.,3.,2.,2.,2.,2.,2.,3.,2.,0.,0.,3.,1.,1.,3.,1.,1.25, 3.,1.,0.,3.,1.,1.5, 3.,2.,0.,3.,2.,1.,3.,1.,2.,3.,0.,2.,3.,3.,1.,3.,3.,2.,3.,0.,1.,3.,1.,3.,3.,2.,2.,3.,2.,3.,3.};
   CPPUNIT_ASSERT_EQUAL(1,slice1->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
-  CPPUNIT_ASSERT_EQUAL(45,slice1->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(45,(int)slice1->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(68,(int)slice1->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(68,(int)ids->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(204,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
@@ -345,7 +346,7 @@ void MEDCouplingBasicsTest5::testDataArrayDoubleAdvSetting1()
   CPPUNIT_ASSERT_THROW(da->setInfoAndChangeNbOfCompo(compsCpp),INTERP_KERNEL::Exception);
   std::copy(data1,data1+14,da->getPointer());
   //
-  std::vector<std::pair<int,int> > p(3);
+  std::vector<std::pair<mcIdType,mcIdType> > p(3);
   p[0].first=0; p[0].second=3; p[1].first=3; p[1].second=5; p[2].first=5; p[2].second=7;
   tmp=dynamic_cast<DataArrayDouble *>(da->selectByTupleRanges(p));
   CPPUNIT_ASSERT(tmp->isEqual(*da,1e-14));
@@ -392,7 +393,7 @@ void MEDCouplingBasicsTest5::testDataArrayDoubleAdvSetting1()
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected4[i],dac->getIJ(0,i),1e-14);
   dac->decrRef();
   //
-  DataArrayInt *ids=DataArrayInt::New();
+  DataArrayIdType *ids=DataArrayIdType::New();
   ids->alloc(3,1);
   dac=da->deepCopy();
   ids->setIJ(0,0,2); ids->setIJ(1,0,0); ids->setIJ(2,0,4);
@@ -426,12 +427,12 @@ void MEDCouplingBasicsTest5::testDataArrayDoubleAdvSetting1()
 
 void MEDCouplingBasicsTest5::testDataArrayIntAdvSetting1()
 {
-  const int data1[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
-  const int data2[10]={8,38,9,39,0,30,11,41,12,42};
+  const mcIdType data1[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17};
+  const mcIdType data2[10]={8,38,9,39,0,30,11,41,12,42};
   const char *comps[2]={"comp1","comp2"};
   std::vector<std::string> compsCpp(comps,comps+2);
-  DataArrayInt *da=DataArrayInt::New();
-  DataArrayInt *tmp=0;
+  DataArrayIdType *da=DataArrayIdType::New();
+  DataArrayIdType *tmp=0;
   da->setInfoAndChangeNbOfCompo(compsCpp);
   da->setName("da");
   da->alloc(7,2);
@@ -439,22 +440,22 @@ void MEDCouplingBasicsTest5::testDataArrayIntAdvSetting1()
   CPPUNIT_ASSERT_THROW(da->setInfoAndChangeNbOfCompo(compsCpp),INTERP_KERNEL::Exception);
   std::copy(data1,data1+14,da->getPointer());
   //
-  std::vector<std::pair<int,int> > p(3);
+  std::vector<std::pair<mcIdType,mcIdType> > p(3);
   p[0].first=0; p[0].second=3; p[1].first=3; p[1].second=5; p[2].first=5; p[2].second=7;
-  tmp=dynamic_cast<DataArrayInt *>(da->selectByTupleRanges(p));
+  tmp=dynamic_cast<DataArrayIdType *>(da->selectByTupleRanges(p));
   CPPUNIT_ASSERT(tmp->isEqual(*da));
   tmp->decrRef();
   p[0].first=0; p[0].second=2; p[1].first=3; p[1].second=4; p[2].first=5; p[2].second=7;
-  tmp=dynamic_cast<DataArrayInt *>(da->selectByTupleRanges(p));
-  const int expected1[10]={1,11,2,12,4,14,6,16,7,17};
+  tmp=dynamic_cast<DataArrayIdType *>(da->selectByTupleRanges(p));
+  const mcIdType expected1[10]={1,11,2,12,4,14,6,16,7,17};
  CPPUNIT_ASSERT_EQUAL(5,(int)tmp->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfComponents());
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],tmp->getIJ(0,i));
   tmp->decrRef();
   p[0].first=0; p[0].second=2; p[1].first=0; p[1].second=2; p[2].first=5; p[2].second=6;
-  tmp=dynamic_cast<DataArrayInt *>(da->selectByTupleRanges(p));
-  const int expected2[10]={1,11,2,12,1,11,2,12,6,16};
+  tmp=dynamic_cast<DataArrayIdType *>(da->selectByTupleRanges(p));
+  const mcIdType expected2[10]={1,11,2,12,1,11,2,12,6,16};
  CPPUNIT_ASSERT_EQUAL(5,(int)tmp->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfComponents());
   for(int i=0;i<10;i++)
@@ -465,13 +466,13 @@ void MEDCouplingBasicsTest5::testDataArrayIntAdvSetting1()
   p[0].first=0; p[0].second=2; p[1].first=0; p[1].second=2; p[2].first=5; p[2].second=8;
   CPPUNIT_ASSERT_THROW(da->selectByTupleRanges(p),INTERP_KERNEL::Exception);
   //
-  DataArrayInt *da2=DataArrayInt::New();
+  DataArrayIdType *da2=DataArrayIdType::New();
   da2->alloc(5,2);
   std::copy(data2,data2+10,da2->getPointer());
   //
-  DataArrayInt *dac=da->deepCopy();
+  DataArrayIdType *dac=da->deepCopy();
   dac->setContigPartOfSelectedValuesSlice(1,da2,2,4,1);
-  const int expected3[14]={1,11,0,30,11,41,4,14,5,15,6,16,7,17};
+  const mcIdType expected3[14]={1,11,0,30,11,41,4,14,5,15,6,16,7,17};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],dac->getIJ(0,i));
   dac->decrRef();
@@ -481,17 +482,17 @@ void MEDCouplingBasicsTest5::testDataArrayIntAdvSetting1()
   CPPUNIT_ASSERT_THROW(dac->setContigPartOfSelectedValuesSlice(0,da2,4,6,1),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_THROW(dac->setContigPartOfSelectedValuesSlice(3,da2,5,0,1),INTERP_KERNEL::Exception);
   dac->setContigPartOfSelectedValuesSlice(3,da2,1,5,1);
-  const int expected4[14]={1,11,2,12,3,13,9,39,0,30,11,41,12,42};
+  const mcIdType expected4[14]={1,11,2,12,3,13,9,39,0,30,11,41,12,42};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],dac->getIJ(0,i));
   dac->decrRef();
   //
-  DataArrayInt *ids=DataArrayInt::New();
+  DataArrayIdType *ids=DataArrayIdType::New();
   ids->alloc(3,1);
   dac=da->deepCopy();
   ids->setIJ(0,0,2); ids->setIJ(1,0,0); ids->setIJ(2,0,4);
   dac->setContigPartOfSelectedValues(2,da2,ids);
-  const int expected5[14]={1,11,2,12,0,30,8,38,12,42,6,16,7,17};
+  const mcIdType expected5[14]={1,11,2,12,0,30,8,38,12,42,6,16,7,17};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected5[i],dac->getIJ(0,i));
   dac->decrRef();
@@ -508,7 +509,7 @@ void MEDCouplingBasicsTest5::testDataArrayIntAdvSetting1()
   ids->setIJ(0,0,2); ids->setIJ(1,0,2); ids->setIJ(2,0,1);
   dac=da->deepCopy();
   dac->setContigPartOfSelectedValues(4,da2,ids);
-  const int expected6[14]={1,11,2,12,3,13,4,14,0,30,0,30,9,39};
+  const mcIdType expected6[14]={1,11,2,12,3,13,4,14,0,30,0,30,9,39};
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_EQUAL(expected6[i],dac->getIJ(0,i));
   dac->decrRef();
@@ -521,32 +522,32 @@ void MEDCouplingBasicsTest5::testDataArrayIntAdvSetting1()
 void MEDCouplingBasicsTest5::testBuildDescendingConnec2Of3DMesh1()
 {
   MEDCouplingUMesh *mesh=build3DSourceMesh_1();
-  DataArrayInt *desc=DataArrayInt::New();
-  DataArrayInt *descIndx=DataArrayInt::New();
-  DataArrayInt *revDesc=DataArrayInt::New();
-  DataArrayInt *revDescIndx=DataArrayInt::New();
+  DataArrayIdType *desc=DataArrayIdType::New();
+  DataArrayIdType *descIndx=DataArrayIdType::New();
+  DataArrayIdType *revDesc=DataArrayIdType::New();
+  DataArrayIdType *revDescIndx=DataArrayIdType::New();
   //
   MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity2(desc,descIndx,revDesc,revDescIndx);
   mesh2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(30,(int)mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)31,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(31,(int)revDescIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)13,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(13,(int)descIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples());
-  const int expected1[48]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,-10,15,-5,-13,16,17,-14,18,-4,19,-2,20,21,22,23,24,25,-11,26,-1,-12,-25,-22,27,28,-7,-20,-24,29,-16,-18,30,-8,-28};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(31),revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(31,(int)revDescIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(13),descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(13,(int)descIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(48),desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(48),revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples());
+  const mcIdType expected1[48]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,-10,15,-5,-13,16,17,-14,18,-4,19,-2,20,21,22,23,24,25,-11,26,-1,-12,-25,-22,27,28,-7,-20,-24,29,-16,-18,30,-8,-28};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+48,desc->getConstPointer()));
-  const int expected2[13]={0,4,8,12,16,20,24,28,32,36,40,44,48};
+  const mcIdType expected2[13]={0,4,8,12,16,20,24,28,32,36,40,44,48};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+13,descIndx->getConstPointer()));
-  const int expected3[31]={0,2,4,5,7,9,10,12,14,15,17,19,21,23,25,26,28,29,31,32,34,35,37,38,40,42,43,44,46,47,48};
+  const mcIdType expected3[31]={0,2,4,5,7,9,10,12,14,15,17,19,21,23,25,26,28,29,31,32,34,35,37,38,40,42,43,44,46,47,48};
   CPPUNIT_ASSERT(std::equal(expected3,expected3+31,revDescIndx->getConstPointer()));
-  const int expected4[48]={0,8,0,6,0,0,5,1,4,1,1,9,1,11,2,2,3,2,7,2,8,3,4,3,5,3,4,10,4,5,11,5,6,10,6,6,9,7,7,10,7,8,8,9,9,11,10,11};
+  const mcIdType expected4[48]={0,8,0,6,0,0,5,1,4,1,1,9,1,11,2,2,3,2,7,2,8,3,4,3,5,3,4,10,4,5,11,5,6,10,6,6,9,7,7,10,7,8,8,9,9,11,10,11};
   CPPUNIT_ASSERT(std::equal(expected4,expected4+48,revDesc->getConstPointer()));
-  DataArrayInt *conn=mesh2->getNodalConnectivity();
-  DataArrayInt *connIndex=mesh2->getNodalConnectivityIndex();
-  const int expected5[31]={0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120};
+  DataArrayIdType *conn=mesh2->getNodalConnectivity();
+  DataArrayIdType *connIndex=mesh2->getNodalConnectivityIndex();
+  const mcIdType expected5[31]={0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120};
   CPPUNIT_ASSERT(std::equal(expected5,expected5+31,connIndex->getConstPointer()));
-  const int expected6[120]={3,8,1,7,3,8,3,1,3,1,3,7,3,7,3,8,3,6,0,8,3,6,2,0,3,0,2,8,3,8,2,6,3,7,4,5,3,7,8,4,3,4,8,5,3,5,8,7,3,6,8,4,3,6,7,8,3,4,7,6,3,8,4,0,3,0,4,6,3,6,3,8,3,7,3,6,3,8,0,1,3,1,0,3,3,3,0,8,3,4,1,5,3,4,8,1,3,1,8,5,3,1,7,5,3,0,2,3,3,3,2,8,3,1,4,0,3,3,2,6};
+  const mcIdType expected6[120]={3,8,1,7,3,8,3,1,3,1,3,7,3,7,3,8,3,6,0,8,3,6,2,0,3,0,2,8,3,8,2,6,3,7,4,5,3,7,8,4,3,4,8,5,3,5,8,7,3,6,8,4,3,6,7,8,3,4,7,6,3,8,4,0,3,0,4,6,3,6,3,8,3,7,3,6,3,8,0,1,3,1,0,3,3,3,0,8,3,4,1,5,3,4,8,1,3,1,8,5,3,1,7,5,3,0,2,3,3,3,2,8,3,1,4,0,3,3,2,6};
   CPPUNIT_ASSERT(std::equal(expected6,expected6+120,conn->getConstPointer()));
   //
   desc->decrRef();
@@ -560,7 +561,7 @@ void MEDCouplingBasicsTest5::testBuildDescendingConnec2Of3DMesh1()
 void MEDCouplingBasicsTest5::testAre2DCellsNotCorrectlyOriented1()
 {
   double m1Coords[8]={1.,1.,-1.,-1.,-1.,-1.,1.,-1.};
-  int m1Conn[4]={0,3,1,2};
+  mcIdType m1Conn[4]={0,3,1,2};
   MEDCouplingUMesh *m1=MEDCouplingUMesh::New();
   m1->setMeshDimension(2);
   m1->allocateCells(1);
@@ -580,13 +581,13 @@ void MEDCouplingBasicsTest5::testAre2DCellsNotCorrectlyOriented1()
       vec2[1]=3.*sin(M_PI/9.*i);
       MEDCouplingUMesh *m1Cpy=static_cast<MEDCouplingUMesh *>(m1->deepCopy());
       m1Cpy->translate(vec2);
-      std::vector<int> res;
+      std::vector<mcIdType> res;
       CPPUNIT_ASSERT_THROW(m1Cpy->are2DCellsNotCorrectlyOriented(vec1,false,res),INTERP_KERNEL::Exception);
       res.clear();
       m1Cpy->changeSpaceDimension(3);
       m1Cpy->are2DCellsNotCorrectlyOriented(vec1,false,res);
       CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
-      CPPUNIT_ASSERT_EQUAL(0,res[0]);
+      CPPUNIT_ASSERT_EQUAL(0,(int)res[0]);
       m1Cpy->decrRef();
     }
   delete [] vec2;
@@ -607,10 +608,10 @@ void MEDCouplingBasicsTest5::testDataArrayAbs1()
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],d1->getIJ(0,i),1e-14);
   //
-  const int expected2[12]={2,3,5,6,7,8,9,10,11,12,13,15};
+  const mcIdType expected2[12]={2,3,5,6,7,8,9,10,11,12,13,15};
   d2->abs();
   for(int i=0;i<12;i++)
-    CPPUNIT_ASSERT_EQUAL(expected2[i],d2->getIJ(0,i));
+    CPPUNIT_ASSERT_EQUAL((int)expected2[i],d2->getIJ(0,i));
   //
   d1->decrRef();
 }
@@ -621,15 +622,15 @@ void MEDCouplingBasicsTest5::testGetValueOn3()
   const double v2[5]={0.7,1.25,0.,2.,1.5};
   const double disp[12]={5.,50.,500.,6.,60.,600.,7.,70.,700.,8.,80.,800.};
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("myMesh",1);
-  const int nbNodes=4;
-  const int nbCells=nbNodes-1;
+  const mcIdType nbNodes=4;
+  const mcIdType nbCells=nbNodes-1;
   m->allocateCells(nbCells);
   DataArrayDouble *coords=DataArrayDouble::New();
   coords->alloc(nbNodes,1);
   std::copy(v,v+nbNodes,coords->getPointer());
   m->setCoords(coords);
   coords->decrRef();
-  const int conn[6]={0,1,2,1,2,3};
+  const mcIdType conn[6]={0,1,2,1,2,3};
   m->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
   m->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+2);
   m->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+4);
@@ -667,10 +668,10 @@ void MEDCouplingBasicsTest5::testGetNodeIdsOfCell2()
   // test in 1D
   m1c->setCoordsAt(0,coordsX);
   CPPUNIT_ASSERT_EQUAL(4,(int)m1c->getNumberOfCells());
-  const int expected1[4][2]={{0,1},{1,2},{2,3},{3,4}};
+  const mcIdType expected1[4][2]={{0,1},{1,2},{2,3},{3,4}};
   for(int i=0;i<4;i++)
     {
-      std::vector<int> v;
+      std::vector<mcIdType> v;
       m1c->getNodeIdsOfCell(i,v);
       CPPUNIT_ASSERT((int)v.size()==2);
       std::equal(v.begin(),v.end(),expected1[i]);
@@ -678,10 +679,10 @@ void MEDCouplingBasicsTest5::testGetNodeIdsOfCell2()
   // test in 2D
   m1c->setCoordsAt(1,coordsY);
   CPPUNIT_ASSERT_EQUAL(12,(int)m1c->getNumberOfCells());
-  const int expected2[12][4]={{0,1,6,5},{1,2,7,6},{2,3,8,7},{3,4,9,8},{4,5,11,10},{5,6,12,11},{6,7,13,12},{7,8,14,13},{8,9,16,15},{9,10,17,16},{10,11,18,17},{11,12,19,18}};
+  const mcIdType expected2[12][4]={{0,1,6,5},{1,2,7,6},{2,3,8,7},{3,4,9,8},{4,5,11,10},{5,6,12,11},{6,7,13,12},{7,8,14,13},{8,9,16,15},{9,10,17,16},{10,11,18,17},{11,12,19,18}};
   for(int i=0;i<12;i++)
     {
-      std::vector<int> v;
+      std::vector<mcIdType> v;
       m1c->getNodeIdsOfCell(i,v);
       CPPUNIT_ASSERT((int)v.size()==4);
       std::equal(v.begin(),v.end(),expected2[i]);
@@ -689,10 +690,10 @@ void MEDCouplingBasicsTest5::testGetNodeIdsOfCell2()
   // test in 3D
   m1c->setCoordsAt(2,coordsZ);
   CPPUNIT_ASSERT_EQUAL(24,(int)m1c->getNumberOfCells());
-  const int expected3[24][8]={{0,1,6,5,20,21,26,25},{1,2,7,6,21,22,27,26},{2,3,8,7,22,23,28,27},{3,4,9,8,23,24,29,28},{4,5,11,10,24,25,31,30},{5,6,12,11,25,26,32,31},{6,7,13,12,26,27,33,32},{7,8,14,13,27,28,34,33},{8,9,16,15,28,29,36,35},{9,10,17,16,29,30,37,36},{10,11,18,17,30,31,38,37},{11,12,19,18,31,32,39,38},{20,21,26,25,40,41,46,45},{21,22,27,26,41,42,47,46},{22,23,28,27,42,43,48,47},{23,24,29,28,43,44,49,48},{24,25,31,30,44,45,51,50},{25,26,32,31,45,46,52,51},{26,27,33,32,46,47,53,52},{27,28,34,33,47,48,54,53},{28,29,36,35,48,49,56,55},{29,30,37,36,49,50,57,56},{30,31,38,37,50,51,58,57},{31,32,39,38,51,52,59,58}};
+  const mcIdType expected3[24][8]={{0,1,6,5,20,21,26,25},{1,2,7,6,21,22,27,26},{2,3,8,7,22,23,28,27},{3,4,9,8,23,24,29,28},{4,5,11,10,24,25,31,30},{5,6,12,11,25,26,32,31},{6,7,13,12,26,27,33,32},{7,8,14,13,27,28,34,33},{8,9,16,15,28,29,36,35},{9,10,17,16,29,30,37,36},{10,11,18,17,30,31,38,37},{11,12,19,18,31,32,39,38},{20,21,26,25,40,41,46,45},{21,22,27,26,41,42,47,46},{22,23,28,27,42,43,48,47},{23,24,29,28,43,44,49,48},{24,25,31,30,44,45,51,50},{25,26,32,31,45,46,52,51},{26,27,33,32,46,47,53,52},{27,28,34,33,47,48,54,53},{28,29,36,35,48,49,56,55},{29,30,37,36,49,50,57,56},{30,31,38,37,50,51,58,57},{31,32,39,38,51,52,59,58}};
   for(int i=0;i<12;i++)
     {
-      std::vector<int> v;
+      std::vector<mcIdType> v;
       m1c->getNodeIdsOfCell(i,v);
       CPPUNIT_ASSERT((int)v.size()==8);
       std::equal(v.begin(),v.end(),expected3[i]);
@@ -707,7 +708,7 @@ void MEDCouplingBasicsTest5::testGetNodeIdsOfCell2()
 void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
 {
   double mesh2DCoords[27]={-0.3,-0.3,0., 0.2,-0.3,0., 0.7,-0.3,0., -0.3,0.2,0., 0.2,0.2,0., 0.7,0.2,0., -0.3,0.7,0., 0.2,0.7,0., 0.7,0.7,0. };
-  int mesh2DConn[18]={1,4,2, 4,5,2, 0,3,4,1, 6,7,4,3, 7,8,5,4};
+  mcIdType mesh2DConn[18]={1,4,2, 4,5,2, 0,3,4,1, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *mesh2D=MEDCouplingUMesh::New("mesh",2);
   mesh2D->allocateCells(5);
   mesh2D->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,mesh2DConn);
@@ -724,7 +725,7 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
   mesh2D->checkConsistencyLight();
   //
   double mesh3DCoords[24]={-0.3,-0.3,0., -0.3,0.2,0., 0.2,0.2,0., 0.2,-0.3,0., -0.3,-0.3,1., -0.3,0.2,1., 0.2,0.2,1., 0.2,-0.3,1. };
-  int mesh3DConn[8]={0,1,2,3,4,5,6,7};
+  mcIdType mesh3DConn[8]={0,1,2,3,4,5,6,7};
   MEDCouplingUMesh *mesh3D=MEDCouplingUMesh::New("mesh",3);
   mesh3D->allocateCells(1);
   mesh3D->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,mesh3DConn);
@@ -740,8 +741,8 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
   MEDCouplingUMesh *mesh2D_2=dynamic_cast<MEDCouplingUMesh *>(mesh2D->deepCopy());
   MEDCouplingUMesh *mesh3D_4=dynamic_cast<MEDCouplingUMesh *>(mesh3D->deepCopy());
   MEDCouplingUMesh *mesh2D_4=dynamic_cast<MEDCouplingUMesh *>(mesh2D->deepCopy());
-  DataArrayInt *renumNodes=DataArrayInt::New();
-  int oldNbOf3DNodes=mesh3D->getNumberOfNodes();
+  DataArrayIdType *renumNodes=DataArrayIdType::New();
+  mcIdType oldNbOf3DNodes=mesh3D->getNumberOfNodes();
   renumNodes->alloc(mesh2D->getNumberOfNodes(),1);
   renumNodes->iota(oldNbOf3DNodes);
   DataArrayDouble *coo=DataArrayDouble::Aggregate(mesh3D->getCoords(),mesh2D->getCoords());
@@ -755,12 +756,12 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
   CPPUNIT_ASSERT(mesh2D_3->isEqual(mesh2D,1e-12));
   mesh2D_3->decrRef();
   //
-  DataArrayInt *da1,*da2;
+  DataArrayIdType *da1,*da2;
   mesh3D->checkGeoEquivalWith(mesh3D_2,10,1e-12,da1,da2);
   CPPUNIT_ASSERT(da1==0);
  CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
-  const int expected1[8]={8,11,12,9,4,5,6,7};
+  const mcIdType expected1[8]={8,11,12,9,4,5,6,7};
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0));
   da2->decrRef();
@@ -769,7 +770,7 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
   CPPUNIT_ASSERT(da1==0);
  CPPUNIT_ASSERT_EQUAL(9,(int)da2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
-  for(int i=0;i<9;i++)
+  for(mcIdType i=0;i<9;i++)
     CPPUNIT_ASSERT_EQUAL(8+i,da2->getIJ(i,0));
   da2->decrRef();
   //
@@ -782,14 +783,14 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
   CPPUNIT_ASSERT(mesh3D_4->getCoords()==mesh2D_4->getCoords());
   CPPUNIT_ASSERT(mesh2D_4->getCoords()==mesh2D_5->getCoords());
   mesh3D_4->checkConsistencyLight(); mesh2D_4->checkConsistencyLight(); mesh2D_5->checkConsistencyLight();
-  CPPUNIT_ASSERT_EQUAL(26,mesh3D_4->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(26,(int)mesh3D_4->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,mesh3D_4->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(9,(int)mesh3D_4->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(23,(int)mesh2D_4->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(23,(int)mesh2D_5->getNodalConnectivity()->getNumberOfTuples());
-  const int expected2[9]={18,0,1,2,3,4,5,6,7};
-  const int expected3[23]={3,9,12,10, 3,12,13,10, 4,8,11,12,9, 4,14,15,12,11, 4,15,16,13,12};
-  const int expected4[23]={3,18,21,19, 3,21,22,19, 4,17,20,21,18, 4,23,24,21,20, 4,24,25,22,21};
+  const mcIdType expected2[9]={18,0,1,2,3,4,5,6,7};
+  const mcIdType expected3[23]={3,9,12,10, 3,12,13,10, 4,8,11,12,9, 4,14,15,12,11, 4,15,16,13,12};
+  const mcIdType expected4[23]={3,18,21,19, 3,21,22,19, 4,17,20,21,18, 4,23,24,21,20, 4,24,25,22,21};
   const double expected5[78]={-0.3,-0.3,0., -0.3,0.2,0., 0.2,0.2,0., 0.2,-0.3,0., -0.3,-0.3,1., -0.3,0.2,1., 0.2,0.2,1., 0.2,-0.3,1., -0.3,-0.3,0., 0.2,-0.3,0., 0.7,-0.3,0., -0.3,0.2,0., 0.2,0.2,0., 0.7,0.2,0., -0.3,0.7,0., 0.2,0.7,0., 0.7,0.7,0., 0.7, -0.3, 0.0, 1.2, -0.3, 0.0, 1.7, -0.3, 0.0, 0.7, 0.2, 0.0, 1.2, 0.2, 0.0, 1.7, 0.2, 0.0, 0.7, 0.7, 0.0, 1.2, 0.7, 0.0, 1.7, 0.7, 0.0};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+9,mesh3D_4->getNodalConnectivity()->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected3,expected3+23,mesh2D_4->getNodalConnectivity()->getConstPointer()));
@@ -801,14 +802,14 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
   mesh3D_4->checkConsistencyLight(); mesh2D_4->checkConsistencyLight(); mesh2D_5->checkConsistencyLight();
   CPPUNIT_ASSERT(mesh3D_4->getCoords()==mesh2D_4->getCoords());
   CPPUNIT_ASSERT(mesh2D_4->getCoords()==mesh2D_5->getCoords());
-  CPPUNIT_ASSERT_EQUAL(19,mesh3D_4->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(19,(int)mesh3D_4->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,mesh3D_4->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(9,(int)mesh3D_4->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(23,(int)mesh2D_4->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(23,(int)mesh2D_5->getNodalConnectivity()->getNumberOfTuples());
-  const int expected6[9]={18,0,1,2,3,4,5,6,7};
-  const int expected7[23]={3,3,2,8, 3,2,9,8, 4,0,1,2,3, 4,10,11,2,1, 4,11,12,9,2};
-  const int expected8[23]={3,13,15,14, 3,15,16,14, 4,8,9,15,13, 4,12,17,15,9, 4,17,18,16,15};
+  const mcIdType expected6[9]={18,0,1,2,3,4,5,6,7};
+  const mcIdType expected7[23]={3,3,2,8, 3,2,9,8, 4,0,1,2,3, 4,10,11,2,1, 4,11,12,9,2};
+  const mcIdType expected8[23]={3,13,15,14, 3,15,16,14, 4,8,9,15,13, 4,12,17,15,9, 4,17,18,16,15};
   const double expected9[57]={-0.3, -0.3, 0., -0.3, 0.2, 0., 0.2, 0.2, 0., 0.2, -0.3, 0., -0.3, -0.3, 1., -0.3, 0.2, 1., 
                               0.2, 0.2, 1., 0.2, -0.3, 1., 0.7, -0.3, 0., 0.7, 0.2, 0., -0.3, 0.7, 0., 0.2, 0.7, 0., 
                               0.7, 0.7, 0., 1.2, -0.3, 0., 1.7, -0.3, 0., 1.2, 0.2, 0., 1.7, 0.2, 0., 1.2, 0.7, 0., 1.7, 0.7, 0.};
@@ -831,12 +832,12 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1()
 void MEDCouplingBasicsTest5::testComputeNeighborsOfCells1()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  DataArrayInt *d1=0,*d2=0;
+  DataArrayIdType *d1=0,*d2=0;
   m->computeNeighborsOfCells(d1,d2);
  CPPUNIT_ASSERT_EQUAL(6,(int)d2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(10,(int)d1->getNumberOfTuples());
-  const int expected1[6]={0,2,4,6,8,10};
-  const int expected2[10]={3,1,0,2,4,1,4,0,2,3};
+  const mcIdType expected1[6]={0,2,4,6,8,10};
+  const mcIdType expected2[10]={3,1,0,2,4,1,4,0,2,3};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+6,d2->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+10,d1->getConstPointer()));
   d1->decrRef();
@@ -847,7 +848,7 @@ void MEDCouplingBasicsTest5::testComputeNeighborsOfCells1()
 void MEDCouplingBasicsTest5::testCheckButterflyCellsBug1()
 {
   double mesh2DCoords[10]={323.85,120.983748908684,317.5,131.982271536747,336.55,120.983748908686,330.2,131.982271536751,323.85,142.98079416481};
-  int mesh2DConn[5]={4,1,0,2,3};
+  mcIdType mesh2DConn[5]={4,1,0,2,3};
   MEDCouplingUMesh *mesh2D=MEDCouplingUMesh::New("mesh",2);
   mesh2D->allocateCells(1);
   mesh2D->insertNextCell(INTERP_KERNEL::NORM_POLYGON,5,mesh2DConn);
@@ -859,7 +860,7 @@ void MEDCouplingBasicsTest5::testCheckButterflyCellsBug1()
   myCoords->decrRef();
   mesh2D->checkConsistencyLight();
   //
-  std::vector<int> v;
+  std::vector<mcIdType> v;
   mesh2D->checkButterflyCells(v);
   CPPUNIT_ASSERT_EQUAL(0,(int)v.size());
   //
@@ -868,66 +869,66 @@ void MEDCouplingBasicsTest5::testCheckButterflyCellsBug1()
 
 void MEDCouplingBasicsTest5::testDataArrayIntRange1()
 {
-  DataArrayInt *d=DataArrayInt::Range(2,17,7);
-  const int expected1[3]={2,9,16};
- CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  DataArrayIdType *d=DataArrayIdType::Range(2,17,7);
+  const mcIdType expected1[3]={2,9,16};
 CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,d->getConstPointer()));
   d->decrRef();
   //
-  d=DataArrayInt::Range(2,23,7);
- CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  d=DataArrayIdType::Range(2,23,7);
 CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,d->getConstPointer()));
   d->decrRef();
   //
-  d=DataArrayInt::Range(2,24,7);
-  const int expected2[4]={2,9,16,23};
- CPPUNIT_ASSERT_EQUAL(4,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  d=DataArrayIdType::Range(2,24,7);
+  const mcIdType expected2[4]={2,9,16,23};
 CPPUNIT_ASSERT_EQUAL(4,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected2,expected2+4,d->getConstPointer()));
   d->decrRef();
   //
-  d=DataArrayInt::Range(24,2,-7);
-  const int expected3[4]={24,17,10,3};
- CPPUNIT_ASSERT_EQUAL(4,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  d=DataArrayIdType::Range(24,2,-7);
+  const mcIdType expected3[4]={24,17,10,3};
 CPPUNIT_ASSERT_EQUAL(4,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+4,d->getConstPointer()));
   d->decrRef();
   //
-  d=DataArrayInt::Range(23,2,-7);
-  const int expected4[3]={23,16,9};
- CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  d=DataArrayIdType::Range(23,2,-7);
+  const mcIdType expected4[3]={23,16,9};
 CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,d->getConstPointer()));
   d->decrRef();
   //
-  d=DataArrayInt::Range(23,22,-7);
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(23,d->getIJ(0,0));
+  d=DataArrayIdType::Range(23,22,-7);
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(23,(int)d->getIJ(0,0));
   d->decrRef();
   //
-  d=DataArrayInt::Range(22,23,7);
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(22,d->getIJ(0,0));
+  d=DataArrayIdType::Range(22,23,7);
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(22,(int)d->getIJ(0,0));
   d->decrRef();
   //
-  d=DataArrayInt::Range(22,22,7);
- CPPUNIT_ASSERT_EQUAL(0,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  d=DataArrayIdType::Range(22,22,7);
 CPPUNIT_ASSERT_EQUAL(0,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   d->decrRef();
   //
-  d=DataArrayInt::Range(22,22,-7);
- CPPUNIT_ASSERT_EQUAL(0,(int)d->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
+  d=DataArrayIdType::Range(22,22,-7);
 CPPUNIT_ASSERT_EQUAL(0,(int)d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   d->decrRef();
   //
-  CPPUNIT_ASSERT_THROW(DataArrayInt::Range(22,23,-7),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_THROW(DataArrayInt::Range(23,22,7),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_THROW(DataArrayInt::Range(23,22,0),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_THROW(DataArrayInt::Range(22,23,0),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(DataArrayIdType::Range(22,23,-7),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(DataArrayIdType::Range(23,22,7),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(DataArrayIdType::Range(23,22,0),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(DataArrayIdType::Range(22,23,0),INTERP_KERNEL::Exception);
 }
 
 void MEDCouplingBasicsTest5::testDataArrayDoubleGetMinMaxPerComponent1()
@@ -964,13 +965,13 @@ void MEDCouplingBasicsTest5::testDataArrayDoubleGetMinMaxPerComponent1()
 
 void MEDCouplingBasicsTest5::testDataArrayIntGetHashCode1()
 {
-  DataArrayInt *d1=DataArrayInt::New(); d1->alloc(3545,1); d1->iota(0);
-  DataArrayInt *d2=DataArrayInt::New(); d2->alloc(3545,1); d2->iota(0);
+  DataArrayIdType *d1=DataArrayIdType::New(); d1->alloc(3545,1); d1->iota(0);
+  DataArrayIdType *d2=DataArrayIdType::New(); d2->alloc(3545,1); d2->iota(0);
   //
   CPPUNIT_ASSERT_EQUAL(d1->getHashCode(),d2->getHashCode());
-  CPPUNIT_ASSERT_EQUAL(232341068,d1->getHashCode());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(232341068),d1->getHashCode());
   d1->setIJ(886,0,6);
-  CPPUNIT_ASSERT_EQUAL(232340188,d1->getHashCode());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(232340188),d1->getHashCode());
   //
   d1->decrRef();
   d2->decrRef();
@@ -979,10 +980,10 @@ void MEDCouplingBasicsTest5::testDataArrayIntGetHashCode1()
 void MEDCouplingBasicsTest5::testZipConnectivityPol1()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_1();
-  const int cells1[3]={2,3,4};
+  const mcIdType cells1[3]={2,3,4};
   MEDCouplingPointSet *m2_1=m1->buildPartOfMySelf(cells1,cells1+3,true);
   MEDCouplingUMesh *m2=dynamic_cast<MEDCouplingUMesh *>(m2_1);
-  DataArrayInt *arr=0;
+  DataArrayIdType *arr=0;
   CPPUNIT_ASSERT(m2);
   // no permutation policy 0
   CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,0,arr));
@@ -1003,10 +1004,10 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1()
   CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer()));
   arr->decrRef();
   // some modification into m2
-  const int modif1[3]={2,4,5};
+  const mcIdType modif1[3]={2,4,5};
   std::copy(modif1,modif1+3,m2->getNodalConnectivity()->getPointer()+1);
   //policy 0 fails because cell0 in m2 has same orientation be not same connectivity
-  const int expected1[3]={5,3,4};
+  const mcIdType expected1[3]={5,3,4};
   CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,0,arr));
  CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents());
@@ -1025,7 +1026,7 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1()
   CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer()));
   arr->decrRef();
   //some new modification into m2
-  const int modif2[3]={2,5,4};
+  const mcIdType modif2[3]={2,5,4};
   std::copy(modif2,modif2+3,m2->getNodalConnectivity()->getPointer()+1);
   //policy 0 fails because cell0 in m2 has not exactly the same conn
   CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,0,arr));
@@ -1048,7 +1049,7 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1()
   m1->decrRef();
   m2->decrRef();
   // Now 1D
-  const int cells2[2]={3,2};
+  const mcIdType cells2[2]={3,2};
   m1=build1DSourceMesh_2();
   m2_1=m1->buildPartOfMySelf(cells2,cells2+2,true);
   m2=dynamic_cast<MEDCouplingUMesh *>(m2_1);
@@ -1073,10 +1074,10 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1()
   CPPUNIT_ASSERT(std::equal(cells2,cells2+2,arr->getConstPointer()));
   arr->decrRef();
   // some modification into m2
-  const int modif3[2]={4,3};
+  const mcIdType modif3[2]={4,3};
   std::copy(modif3,modif3+2,m2->getNodalConnectivity()->getPointer()+1);
   //policy 0 fails because cell0 in m2 has not exactly the same conn
-  const int expected2[2]={4,2};
+  const mcIdType expected2[2]={4,2};
   CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,0,arr));
  CPPUNIT_ASSERT_EQUAL(2,(int)arr->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents());
@@ -1101,8 +1102,8 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1()
 void MEDCouplingBasicsTest5::testConvexEnvelop2D1()
 {
   const double coords[662]={7.54758495819e-14,-1.12270326253e-12,8.43143594193,-1.02835845055e-12,4.21571797096,7.30183771609,-4.21571797097,7.30183771609,-8.43143594193,-1.09439981894e-12,-4.21571797097,-7.30183771609,4.21571797097,-7.30183771609,16.8628718839,-1.02835845055e-12,12.6471539129,7.30183771609,8.43143594193,14.6036754322,2.26427548746e-13,14.6036754322,-8.43143594193,14.6036754322,-12.6471539129,7.30183771609,-16.8628718839,-1.39630321727e-12,-12.6471539129,-7.30183771609,-8.43143594193,-14.6036754322,3.7737924791e-14,-14.6036754322,8.43143594193,-14.6036754322,12.6471539129,-7.30183771609,25.2943078258,-1.07553085654e-12,21.0785898548,7.30183771609,16.8628718839,14.6036754322,12.6471539129,21.9055131483,4.21571797096,21.9055131483,-4.21571797097,21.9055131483,-12.6471539129,21.9055131483,-16.8628718839,14.6036754322,-21.0785898548,7.30183771609,-25.2943078258,-1.02835845055e-12,-21.0785898548,-7.30183771609,-16.8628718839,-14.6036754322,-12.6471539129,-21.9055131483,-4.21571797097,-21.9055131483,4.21571797097,-21.9055131483,12.6471539129,-21.9055131483,16.8628718839,-14.6036754322,21.0785898548,-7.30183771609,33.7257437677,-7.45324014622e-13,29.5100257968,7.30183771609,25.2943078258,14.6036754322,21.0785898548,21.9055131483,16.8628718839,29.2073508644,8.43143594193,29.2073508644,-1.20761359331e-12,29.2073508644,-8.43143594193,29.2073508644,-16.8628718839,29.2073508644,-21.0785898548,21.9055131483,-25.2943078258,14.6036754322,-29.5100257968,7.30183771609,-33.7257437677,-7.26455052226e-13,-29.5100257968,-7.30183771609,-25.2943078258,-14.6036754322,-21.0785898548,-21.9055131483,-16.8628718839,-29.2073508644,-8.43143594193,-29.2073508644,4.15117172701e-13,-29.2073508644,8.43143594193,-29.2073508644,16.8628718839,-29.2073508644,21.0785898548,-21.9055131483,25.2943078258,-14.6036754322,29.5100257968,-7.30183771609,42.1571797097,-1.86802727715e-12,37.9414617387,7.30183771609,33.7257437677,14.6036754322,29.5100257968,21.9055131483,25.2943078258,29.2073508644,21.0785898548,36.5091885805,12.6471539129,36.5091885805,4.21571797096,36.5091885805,-4.21571797096,36.5091885805,-12.6471539129,36.5091885805,-21.0785898548,36.5091885805,-25.2943078258,29.2073508644,-29.5100257968,21.9055131483,-33.7257437677,14.6036754322,-37.9414617387,7.30183771609,-42.1571797097,-9.81186044565e-13,-37.9414617387,-7.30183771609,-33.7257437677,-14.6036754322,-29.5100257968,-21.9055131483,-25.2943078258,-29.2073508644,-21.0785898548,-36.5091885805,-12.6471539129,-36.5091885805,-4.21571797097,-36.5091885805,4.21571797097,-36.5091885805,12.6471539129,-36.5091885805,21.0785898548,-36.5091885805,25.2943078258,-29.2073508644,29.5100257968,-21.9055131483,33.7257437677,-14.6036754322,37.9414617387,-7.30183771609,50.5886156516,-6.98151608633e-13,46.3728976806,7.30183771609,42.1571797097,14.6036754322,37.9414617387,21.9055131483,33.7257437677,29.2073508644,29.5100257968,36.5091885805,25.2943078258,43.8110262966,16.8628718839,43.8110262966,8.43143594193,43.8110262966,-1.84915831476e-12,43.8110262966,-8.43143594193,43.8110262966,-16.8628718839,43.8110262966,-25.2943078258,43.8110262966,-29.5100257968,36.5091885805,-33.7257437677,29.2073508644,-37.9414617387,21.9055131483,-42.1571797097,14.6036754322,-46.3728976806,7.30183771609,-50.5886156516,-1.47177906685e-12,-46.3728976806,-7.30183771609,-42.1571797097,-14.6036754322,-37.9414617387,-21.9055131483,-33.7257437677,-29.2073508644,-29.5100257968,-36.5091885805,-25.2943078258,-43.8110262966,-16.8628718839,-43.8110262966,-8.43143594193,-43.8110262966,7.54758495819e-14,-43.8110262966,8.43143594193,-43.8110262966,16.8628718839,-43.8110262966,25.2943078258,-43.8110262966,29.5100257968,-36.5091885805,33.7257437677,-29.2073508644,37.9414617387,-21.9055131483,42.1571797097,-14.6036754322,46.3728976806,-7.30183771609,59.0200515935,-7.9249642061e-13,54.8043336225,7.30183771609,50.5886156516,14.6036754322,46.3728976806,21.9055131483,42.1571797097,29.2073508644,37.9414617387,36.5091885805,33.7257437677,43.8110262966,29.5100257968,51.1128640127,21.0785898548,51.1128640127,12.6471539129,51.1128640127,4.21571797096,51.1128640127,-4.21571797096,51.1128640127,-12.6471539129,51.1128640127,-21.0785898548,51.1128640127,-29.5100257968,51.1128640127,-33.7257437677,43.8110262966,-37.9414617387,36.5091885805,-42.1571797097,29.2073508644,-46.3728976806,21.9055131483,-50.5886156516,14.6036754322,-54.8043336226,7.30183771609,-59.0200515935,-1.31139288649e-12,-54.8043336226,-7.30183771609,-50.5886156516,-14.6036754322,-46.3728976806,-21.9055131483,-42.1571797097,-29.2073508644,-37.9414617387,-36.5091885805,-33.7257437677,-43.8110262966,-29.5100257968,-51.1128640127,-21.0785898548,-51.1128640127,-12.6471539129,-51.1128640127,-4.21571797097,-51.1128640127,4.21571797097,-51.1128640127,12.6471539129,-51.1128640127,21.0785898548,-51.1128640127,29.5100257968,-51.1128640127,33.7257437677,-43.8110262966,37.9414617387,-36.5091885805,42.1571797097,-29.2073508644,46.3728976806,-21.9055131483,50.5886156516,-14.6036754322,54.8043336225,-7.30183771609,67.4514875354,-2.14162723189e-12,63.2357695645,7.30183771609,59.0200515935,14.6036754322,54.8043336226,21.9055131483,50.5886156516,29.2073508644,46.3728976806,36.5091885805,42.1571797097,43.8110262966,37.9414617387,51.1128640127,33.7257437677,58.4147017287,25.2943078258,58.4147017287,16.8628718839,58.4147017287,8.43143594193,58.4147017287,6.79282646237e-13,58.4147017287,-8.43143594193,58.4147017287,-16.8628718839,58.4147017287,-25.2943078258,58.4147017287,-33.7257437677,58.4147017287,-37.9414617387,51.1128640127,-42.1571797097,43.8110262966,-46.3728976806,36.5091885805,-50.5886156516,29.2073508644,-54.8043336226,21.9055131483,-59.0200515935,14.6036754322,-63.2357695645,7.30183771609,-67.4514875354,-1.16044118732e-12,-63.2357695645,-7.30183771609,-59.0200515935,-14.6036754322,-54.8043336226,-21.9055131483,-50.5886156516,-29.2073508644,-46.3728976806,-36.5091885805,-42.1571797097,-43.8110262966,-37.9414617387,-51.1128640127,-33.7257437677,-58.4147017287,-25.2943078258,-58.4147017287,-16.8628718839,-58.4147017287,-8.43143594193,-58.4147017287,-5.66068871864e-14,-58.4147017287,8.43143594193,-58.4147017287,16.8628718839,-58.4147017287,25.2943078258,-58.4147017287,33.7257437677,-58.4147017287,37.9414617387,-51.1128640127,42.1571797097,-43.8110262966,46.3728976806,-36.5091885805,50.5886156516,-29.2073508644,54.8043336226,-21.9055131483,59.0200515935,-14.6036754322,63.2357695645,-7.30183771609,75.8829234774,-2.29257893105e-12,71.6672055064,7.30183771609,67.4514875354,14.6036754322,63.2357695645,21.9055131483,59.0200515935,29.2073508644,54.8043336226,36.5091885805,50.5886156516,43.8110262966,46.3728976806,51.1128640127,42.1571797097,58.4147017287,37.9414617387,65.7165394448,29.5100257968,65.7165394448,21.0785898548,65.7165394448,12.6471539129,65.7165394448,4.21571797097,65.7165394448,-4.21571797096,65.7165394448,-12.6471539129,65.7165394448,-21.0785898548,65.7165394448,-29.5100257968,65.7165394448,-37.9414617387,65.7165394448,-42.1571797097,58.4147017287,-46.3728976806,51.1128640127,-50.5886156516,43.8110262966,-54.8043336226,36.5091885805,-59.0200515935,29.2073508644,-63.2357695645,21.9055131483,-67.4514875354,14.6036754322,-71.6672055064,7.30183771609,-75.8829234774,-1.31139288649e-12,-71.6672055064,-7.30183771609,-67.4514875354,-14.6036754322,-63.2357695645,-21.9055131483,-59.0200515935,-29.2073508644,-54.8043336226,-36.5091885805,-50.5886156516,-43.8110262966,-46.3728976806,-51.1128640127,-42.1571797097,-58.4147017287,-37.9414617387,-65.7165394448,-29.5100257968,-65.7165394448,-21.0785898548,-65.7165394448,-12.6471539129,-65.7165394448,-4.21571797097,-65.7165394448,4.21571797097,-65.7165394448,12.6471539129,-65.7165394448,21.0785898548,-65.7165394448,29.5100257968,-65.7165394448,37.9414617387,-65.7165394448,42.1571797097,-58.4147017287,46.3728976806,-51.1128640127,50.5886156516,-43.8110262966,54.8043336226,-36.5091885805,59.0200515935,-29.2073508644,63.2357695645,-21.9055131483,67.4514875354,-14.6036754322,71.6672055064,-7.30183771609,84.3143594193,-1.49064802924e-12,80.0986414483,7.30183771609,75.8829234774,14.6036754322,71.6672055064,21.9055131483,67.4514875354,29.2073508644,63.2357695645,36.5091885805,59.0200515935,43.8110262966,54.8043336226,51.1128640127,50.5886156516,58.4147017287,46.3728976806,65.7165394448,42.1571797097,73.0183771609,33.7257437677,73.0183771609,25.2943078258,73.0183771609,16.8628718839,73.0183771609,8.43143594193,73.0183771609,2.0755858635e-12,73.0183771609,-8.43143594193,73.0183771609,-16.8628718839,73.0183771609,-25.2943078258,73.0183771609,-33.7257437677,73.0183771609,-42.1571797097,73.0183771609,-46.3728976806,65.7165394448,-50.5886156516,58.4147017287,-54.8043336226,51.1128640127,-59.0200515935,43.8110262966,-63.2357695645,36.5091885805,-67.4514875354,29.2073508644,-71.6672055064,21.9055131483,-75.8829234774,14.6036754322,-80.0986414483,7.30183771609,-84.3143594193,-1.11326878133e-12,-80.0986414483,-7.30183771609,-75.8829234774,-14.6036754322,-71.6672055064,-21.9055131483,-67.4514875354,-29.2073508644,-63.2357695645,-36.5091885805,-59.0200515935,-43.8110262966,-54.8043336226,-51.1128640127,-50.5886156516,-58.4147017287,-46.3728976806,-65.7165394448,-42.1571797097,-73.0183771609,-33.7257437677,-73.0183771609,-25.2943078258,-73.0183771609,-16.8628718839,-73.0183771609,-8.43143594193,-73.0183771609,-5.66068871864e-14,-73.0183771609,8.43143594193,-73.0183771609,16.8628718839,-73.0183771609,25.2943078258,-73.0183771609,33.7257437677,-73.0183771609,42.1571797097,-73.0183771609,46.3728976806,-65.7165394448,50.5886156516,-58.4147017287,54.8043336226,-51.1128640127,59.0200515935,-43.8110262966,63.2357695645,-36.5091885805,67.4514875354,-29.2073508644,71.6672055064,-21.9055131483,75.8829234774,-14.6036754322,80.0986414483,-7.3018377161};
-  const int conn[2137]={0,2,3,4,5,6,1,1,8,2,0,6,18,7,2,9,10,3,0,1,8,3,10,11,12,4,0,2,4,3,12,13,14,5,0,5,0,4,14,15,16,6,6,1,0,5,16,17,18,7,20,8,1,18,36,19,8,21,9,2,1,7,20,9,22,23,10,2,8,21,10,23,24,11,3,2,9,11,24,25,26,12,3,10,12,11,26,27,13,4,3,13,12,27,28,29,14,4,14,4,13,29,30,15,5,15,5,14,30,31,32,16,16,6,5,15,32,33,17,17,18,6,16,33,34,35,18,7,1,6,17,35,36,19,38,20,7,36,60,37,20,39,21,8,7,19,38,21,40,22,9,8,20,39,22,41,42,23,9,21,40,23,42,43,24,10,9,22,24,43,44,25,11,10,23,25,44,45,46,26,11,24,26,25,46,47,27,12,11,27,26,47,48,28,13,12,28,27,48,49,50,29,13,29,13,28,50,51,30,14,30,14,29,51,52,31,15,31,15,30,52,53,54,32,32,16,15,31,54,55,33,33,17,16,32,55,56,34,34,35,17,33,56,57,58,35,36,18,17,34,58,59,36,19,7,18,35,59,60,37,62,38,19,60,90,61,38,63,39,20,19,37,62,39,64,40,21,20,38,63,40,65,41,22,21,39,64,41,66,67,42,22,40,65,42,67,68,43,23,22,41,43,68,69,44,24,23,42,44,69,70,45,25,24,43,45,70,71,72,46,25,44,46,45,72,73,47,26,25,47,46,73,74,48,27,26,48,47,74,75,49,28,27,49,48,75,76,77,50,28,50,28,49,77,78,51,29,51,29,50,78,79,52,30,52,30,51,79,80,53,31,53,31,52,80,81,82,54,54,32,31,53,82,83,55,55,33,32,54,83,84,56,56,34,33,55,84,85,57,57,58,34,56,85,86,87,58,59,35,34,57,87,88,59,60,36,35,58,88,89,60,37,19,36,59,89,90,61,92,62,37,90,126,91,62,93,63,38,37,61,92,63,94,64,39,38,62,93,64,95,65,40,39,63,94,65,96,66,41,40,64,95,66,97,98,67,41,65,96,67,98,99,68,42,41,66,68,99,100,69,43,42,67,69,100,101,70,44,43,68,70,101,102,71,45,44,69,71,102,103,104,72,45,70,72,71,104,105,73,46,45,73,72,105,106,74,47,46,74,73,106,107,75,48,47,75,74,107,108,76,49,48,76,75,108,109,110,77,49,77,49,76,110,111,78,50,78,50,77,111,112,79,51,79,51,78,112,113,80,52,80,52,79,113,114,81,53,81,53,80,114,115,116,82,82,54,53,81,116,117,83,83,55,54,82,117,118,84,84,56,55,83,118,119,85,85,57,56,84,119,120,86,86,87,57,85,120,121,122,87,88,58,57,86,122,123,88,89,59,58,87,123,124,89,90,60,59,88,124,125,90,61,37,60,89,125,126,91,128,92,61,126,168,127,92,129,93,62,61,91,128,93,130,94,63,62,92,129,94,131,95,64,63,93,130,95,132,96,65,64,94,131,96,133,97,66,65,95,132,97,134,135,98,66,96,133,98,135,136,99,67,66,97,99,136,137,100,68,67,98,100,137,138,101,69,68,99,101,138,139,102,70,69,100,102,139,140,103,71,70,101,103,140,141,142,104,71,102,104,103,142,143,105,72,71,105,104,143,144,106,73,72,106,105,144,145,107,74,73,107,106,145,146,108,75,74,108,107,146,147,109,76,75,109,108,147,148,149,110,76,110,76,109,149,150,111,77,111,77,110,150,151,112,78,112,78,111,151,152,113,79,113,79,112,152,153,114,80,114,80,113,153,154,115,81,115,81,114,154,155,156,116,116,82,81,115,156,157,117,117,83,82,116,157,158,118,118,84,83,117,158,159,119,119,85,84,118,159,160,120,120,86,85,119,160,161,121,121,122,86,120,161,162,163,122,123,87,86,121,163,164,123,124,88,87,122,164,165,124,125,89,88,123,165,166,125,126,90,89,124,166,167,126,91,61,90,125,167,168,127,170,128,91,168,216,169,128,171,129,92,91,127,170,129,172,130,93,92,128,171,130,173,131,94,93,129,172,131,174,132,95,94,130,173,132,175,133,96,95,131,174,133,176,134,97,96,132,175,134,177,178,135,97,133,176,135,178,179,136,98,97,134,136,179,180,137,99,98,135,137,180,181,138,100,99,136,138,181,182,139,101,100,137,139,182,183,140,102,101,138,140,183,184,141,103,102,139,141,184,185,186,142,103,140,142,141,186,187,143,104,103,143,142,187,188,144,105,104,144,143,188,189,145,106,105,145,144,189,190,146,107,106,146,145,190,191,147,108,107,147,146,191,192,148,109,108,148,147,192,193,194,149,109,149,109,148,194,195,150,110,150,110,149,195,196,151,111,151,111,150,196,197,152,112,152,112,151,197,198,153,113,153,113,152,198,199,154,114,154,114,153,199,200,155,115,155,115,154,200,201,202,156,156,116,115,155,202,203,157,157,117,116,156,203,204,158,158,118,117,157,204,205,159,159,119,118,158,205,206,160,160,120,119,159,206,207,161,161,121,120,160,207,208,162,162,163,121,161,208,209,210,163,164,122,121,162,210,211,164,165,123,122,163,211,212,165,166,124,123,164,212,213,166,167,125,124,165,213,214,167,168,126,125,166,214,215,168,127,91,126,167,215,216,169,218,170,127,216,270,217,170,219,171,128,127,169,218,171,220,172,129,128,170,219,172,221,173,130,129,171,220,173,222,174,131,130,172,221,174,223,175,132,131,173,222,175,224,176,133,132,174,223,176,225,177,134,133,175,224,177,226,227,178,134,176,225,178,227,228,179,135,134,177,179,228,229,180,136,135,178,180,229,230,181,137,136,179,181,230,231,182,138,137,180,182,231,232,183,139,138,181,183,232,233,184,140,139,182,184,233,234,185,141,140,183,185,234,235,236,186,141,184,186,185,236,237,187,142,141,187,186,237,238,188,143,142,188,187,238,239,189,144,143,189,188,239,240,190,145,144,190,189,240,241,191,146,145,191,190,241,242,192,147,146,192,191,242,243,193,148,147,193,192,243,244,245,194,148,194,148,193,245,246,195,149,195,149,194,246,247,196,150,196,150,195,247,248,197,151,197,151,196,248,249,198,152,198,152,197,249,250,199,153,199,153,198,250,251,200,154,200,154,199,251,252,201,155,201,155,200,252,253,254,202,202,156,155,201,254,255,203,203,157,156,202,255,256,204,204,158,157,203,256,257,205,205,159,158,204,257,258,206,206,160,159,205,258,259,207,207,161,160,206,259,260,208,208,162,161,207,260,261,209,209,210,162,208,261,262,263,210,211,163,162,209,263,264,211,212,164,163,210,264,265,212,213,165,164,211,265,266,213,214,166,165,212,266,267,214,215,167,166,213,267,268,215,216,168,167,214,268,269,216,169,127,168,215,269,270,217,272,218,169,270,330,271,218,273,219,170,169,217,272,219,274,220,171,170,218,273,220,275,221,172,171,219,274,221,276,222,173,172,220,275,222,277,223,174,173,221,276,223,278,224,175,174,222,277,224,279,225,176,175,223,278,225,280,226,177,176,224,279,226,281,282,227,177,225,280,227,282,283,228,178,177,226,228,283,284,229,179,178,227,229,284,285,230,180,179,228,230,285,286,231,181,180,229,231,286,287,232,182,181,230,232,287,288,233,183,182,231,233,288,289,234,184,183,232,234,289,290,235,185,184,233,235,290,291,292,236,185,234,236,235,292,293,237,186,185,237,236,293,294,238,187,186,238,237,294,295,239,188,187,239,238,295,296,240,189,188,240,239,296,297,241,190,189,241,240,297,298,242,191,190,242,241,298,299,243,192,191,243,242,299,300,244,193,192,244,243,300,301,302,245,193,245,193,244,302,303,246,194,246,194,245,303,304,247,195,247,195,246,304,305,248,196,248,196,247,305,306,249,197,249,197,248,306,307,250,198,250,198,249,307,308,251,199,251,199,250,308,309,252,200,252,200,251,309,310,253,201,253,201,252,310,311,312,254,254,202,201,253,312,313,255,255,203,202,254,313,314,256,256,204,203,255,314,315,257,257,205,204,256,315,316,258,258,206,205,257,316,317,259,259,207,206,258,317,318,260,260,208,207,259,318,319,261,261,209,208,260,319,320,262,262,263,209,261,320,321,322,263,264,210,209,262,322,323,264,265,211,210,263,323,324,265,266,212,211,264,324,325,266,267,213,212,265,325,326,267,268,214,213,266,326,327,268,269,215,214,267,327,328,269,270,216,215,268,328,329,270,217,169,216,269,329,330,271,272,217,330,273,218,217,271,274,219,218,272,275,220,219,273,276,221,220,274,277,222,221,275,278,223,222,276,279,224,223,277,280,225,224,278,281,226,225,279,281,282,226,280,283,227,226,281,284,228,227,282,285,229,228,283,286,230,229,284,287,231,230,285,288,232,231,286,289,233,232,287,290,234,233,288,291,235,234,289,291,292,235,290,291,293,236,235,292,294,237,236,293,295,238,237,294,296,239,238,295,297,240,239,296,298,241,240,297,299,242,241,298,300,243,242,299,301,244,243,301,300,302,244,244,301,303,245,245,302,304,246,246,303,305,247,247,304,306,248,248,305,307,249,249,306,308,250,250,307,309,251,251,308,310,252,252,309,311,253,311,253,310,312,254,253,311,313,255,254,312,314,256,255,313,315,257,256,314,316,258,257,315,317,259,258,316,318,260,259,317,319,261,260,318,320,262,261,319,321,321,322,262,320,323,263,262,321,324,264,263,322,325,265,264,323,326,266,265,324,327,267,266,325,328,268,267,326,329,269,268,327,330,270,269,328,271,217,270,329};
-  const int connI[332]={0,7,14,21,28,35,42,49,56,63,70,77,84,91,98,105,112,119,126,133,140,147,154,161,168,175,182,189,196,203,210,217,224,231,238,245,252,259,266,273,280,287,294,301,308,315,322,329,336,343,350,357,364,371,378,385,392,399,406,413,420,427,434,441,448,455,462,469,476,483,490,497,504,511,518,525,532,539,546,553,560,567,574,581,588,595,602,609,616,623,630,637,644,651,658,665,672,679,686,693,700,707,714,721,728,735,742,749,756,763,770,777,784,791,798,805,812,819,826,833,840,847,854,861,868,875,882,889,896,903,910,917,924,931,938,945,952,959,966,973,980,987,994,1001,1008,1015,1022,1029,1036,1043,1050,1057,1064,1071,1078,1085,1092,1099,1106,1113,1120,1127,1134,1141,1148,1155,1162,1169,1176,1183,1190,1197,1204,1211,1218,1225,1232,1239,1246,1253,1260,1267,1274,1281,1288,1295,1302,1309,1316,1323,1330,1337,1344,1351,1358,1365,1372,1379,1386,1393,1400,1407,1414,1421,1428,1435,1442,1449,1456,1463,1470,1477,1484,1491,1498,1505,1512,1519,1526,1533,1540,1547,1554,1561,1568,1575,1582,1589,1596,1603,1610,1617,1624,1631,1638,1645,1652,1659,1666,1673,1680,1687,1694,1701,1708,1715,1722,1729,1736,1743,1750,1757,1764,1771,1778,1785,1792,1799,1806,1813,1820,1827,1834,1841,1848,1855,1862,1869,1876,1883,1890,1897,1901,1905,1909,1913,1917,1921,1925,1929,1933,1937,1941,1945,1949,1953,1957,1961,1965,1969,1973,1977,1981,1985,1989,1993,1997,2001,2005,2009,2013,2017,2021,2025,2029,2033,2037,2041,2045,2049,2053,2057,2061,2065,2069,2073,2077,2081,2085,2089,2093,2097,2101,2105,2109,2113,2117,2121,2125,2129,2133,2137};
+  const mcIdType conn[2137]={0,2,3,4,5,6,1,1,8,2,0,6,18,7,2,9,10,3,0,1,8,3,10,11,12,4,0,2,4,3,12,13,14,5,0,5,0,4,14,15,16,6,6,1,0,5,16,17,18,7,20,8,1,18,36,19,8,21,9,2,1,7,20,9,22,23,10,2,8,21,10,23,24,11,3,2,9,11,24,25,26,12,3,10,12,11,26,27,13,4,3,13,12,27,28,29,14,4,14,4,13,29,30,15,5,15,5,14,30,31,32,16,16,6,5,15,32,33,17,17,18,6,16,33,34,35,18,7,1,6,17,35,36,19,38,20,7,36,60,37,20,39,21,8,7,19,38,21,40,22,9,8,20,39,22,41,42,23,9,21,40,23,42,43,24,10,9,22,24,43,44,25,11,10,23,25,44,45,46,26,11,24,26,25,46,47,27,12,11,27,26,47,48,28,13,12,28,27,48,49,50,29,13,29,13,28,50,51,30,14,30,14,29,51,52,31,15,31,15,30,52,53,54,32,32,16,15,31,54,55,33,33,17,16,32,55,56,34,34,35,17,33,56,57,58,35,36,18,17,34,58,59,36,19,7,18,35,59,60,37,62,38,19,60,90,61,38,63,39,20,19,37,62,39,64,40,21,20,38,63,40,65,41,22,21,39,64,41,66,67,42,22,40,65,42,67,68,43,23,22,41,43,68,69,44,24,23,42,44,69,70,45,25,24,43,45,70,71,72,46,25,44,46,45,72,73,47,26,25,47,46,73,74,48,27,26,48,47,74,75,49,28,27,49,48,75,76,77,50,28,50,28,49,77,78,51,29,51,29,50,78,79,52,30,52,30,51,79,80,53,31,53,31,52,80,81,82,54,54,32,31,53,82,83,55,55,33,32,54,83,84,56,56,34,33,55,84,85,57,57,58,34,56,85,86,87,58,59,35,34,57,87,88,59,60,36,35,58,88,89,60,37,19,36,59,89,90,61,92,62,37,90,126,91,62,93,63,38,37,61,92,63,94,64,39,38,62,93,64,95,65,40,39,63,94,65,96,66,41,40,64,95,66,97,98,67,41,65,96,67,98,99,68,42,41,66,68,99,100,69,43,42,67,69,100,101,70,44,43,68,70,101,102,71,45,44,69,71,102,103,104,72,45,70,72,71,104,105,73,46,45,73,72,105,106,74,47,46,74,73,106,107,75,48,47,75,74,107,108,76,49,48,76,75,108,109,110,77,49,77,49,76,110,111,78,50,78,50,77,111,112,79,51,79,51,78,112,113,80,52,80,52,79,113,114,81,53,81,53,80,114,115,116,82,82,54,53,81,116,117,83,83,55,54,82,117,118,84,84,56,55,83,118,119,85,85,57,56,84,119,120,86,86,87,57,85,120,121,122,87,88,58,57,86,122,123,88,89,59,58,87,123,124,89,90,60,59,88,124,125,90,61,37,60,89,125,126,91,128,92,61,126,168,127,92,129,93,62,61,91,128,93,130,94,63,62,92,129,94,131,95,64,63,93,130,95,132,96,65,64,94,131,96,133,97,66,65,95,132,97,134,135,98,66,96,133,98,135,136,99,67,66,97,99,136,137,100,68,67,98,100,137,138,101,69,68,99,101,138,139,102,70,69,100,102,139,140,103,71,70,101,103,140,141,142,104,71,102,104,103,142,143,105,72,71,105,104,143,144,106,73,72,106,105,144,145,107,74,73,107,106,145,146,108,75,74,108,107,146,147,109,76,75,109,108,147,148,149,110,76,110,76,109,149,150,111,77,111,77,110,150,151,112,78,112,78,111,151,152,113,79,113,79,112,152,153,114,80,114,80,113,153,154,115,81,115,81,114,154,155,156,116,116,82,81,115,156,157,117,117,83,82,116,157,158,118,118,84,83,117,158,159,119,119,85,84,118,159,160,120,120,86,85,119,160,161,121,121,122,86,120,161,162,163,122,123,87,86,121,163,164,123,124,88,87,122,164,165,124,125,89,88,123,165,166,125,126,90,89,124,166,167,126,91,61,90,125,167,168,127,170,128,91,168,216,169,128,171,129,92,91,127,170,129,172,130,93,92,128,171,130,173,131,94,93,129,172,131,174,132,95,94,130,173,132,175,133,96,95,131,174,133,176,134,97,96,132,175,134,177,178,135,97,133,176,135,178,179,136,98,97,134,136,179,180,137,99,98,135,137,180,181,138,100,99,136,138,181,182,139,101,100,137,139,182,183,140,102,101,138,140,183,184,141,103,102,139,141,184,185,186,142,103,140,142,141,186,187,143,104,103,143,142,187,188,144,105,104,144,143,188,189,145,106,105,145,144,189,190,146,107,106,146,145,190,191,147,108,107,147,146,191,192,148,109,108,148,147,192,193,194,149,109,149,109,148,194,195,150,110,150,110,149,195,196,151,111,151,111,150,196,197,152,112,152,112,151,197,198,153,113,153,113,152,198,199,154,114,154,114,153,199,200,155,115,155,115,154,200,201,202,156,156,116,115,155,202,203,157,157,117,116,156,203,204,158,158,118,117,157,204,205,159,159,119,118,158,205,206,160,160,120,119,159,206,207,161,161,121,120,160,207,208,162,162,163,121,161,208,209,210,163,164,122,121,162,210,211,164,165,123,122,163,211,212,165,166,124,123,164,212,213,166,167,125,124,165,213,214,167,168,126,125,166,214,215,168,127,91,126,167,215,216,169,218,170,127,216,270,217,170,219,171,128,127,169,218,171,220,172,129,128,170,219,172,221,173,130,129,171,220,173,222,174,131,130,172,221,174,223,175,132,131,173,222,175,224,176,133,132,174,223,176,225,177,134,133,175,224,177,226,227,178,134,176,225,178,227,228,179,135,134,177,179,228,229,180,136,135,178,180,229,230,181,137,136,179,181,230,231,182,138,137,180,182,231,232,183,139,138,181,183,232,233,184,140,139,182,184,233,234,185,141,140,183,185,234,235,236,186,141,184,186,185,236,237,187,142,141,187,186,237,238,188,143,142,188,187,238,239,189,144,143,189,188,239,240,190,145,144,190,189,240,241,191,146,145,191,190,241,242,192,147,146,192,191,242,243,193,148,147,193,192,243,244,245,194,148,194,148,193,245,246,195,149,195,149,194,246,247,196,150,196,150,195,247,248,197,151,197,151,196,248,249,198,152,198,152,197,249,250,199,153,199,153,198,250,251,200,154,200,154,199,251,252,201,155,201,155,200,252,253,254,202,202,156,155,201,254,255,203,203,157,156,202,255,256,204,204,158,157,203,256,257,205,205,159,158,204,257,258,206,206,160,159,205,258,259,207,207,161,160,206,259,260,208,208,162,161,207,260,261,209,209,210,162,208,261,262,263,210,211,163,162,209,263,264,211,212,164,163,210,264,265,212,213,165,164,211,265,266,213,214,166,165,212,266,267,214,215,167,166,213,267,268,215,216,168,167,214,268,269,216,169,127,168,215,269,270,217,272,218,169,270,330,271,218,273,219,170,169,217,272,219,274,220,171,170,218,273,220,275,221,172,171,219,274,221,276,222,173,172,220,275,222,277,223,174,173,221,276,223,278,224,175,174,222,277,224,279,225,176,175,223,278,225,280,226,177,176,224,279,226,281,282,227,177,225,280,227,282,283,228,178,177,226,228,283,284,229,179,178,227,229,284,285,230,180,179,228,230,285,286,231,181,180,229,231,286,287,232,182,181,230,232,287,288,233,183,182,231,233,288,289,234,184,183,232,234,289,290,235,185,184,233,235,290,291,292,236,185,234,236,235,292,293,237,186,185,237,236,293,294,238,187,186,238,237,294,295,239,188,187,239,238,295,296,240,189,188,240,239,296,297,241,190,189,241,240,297,298,242,191,190,242,241,298,299,243,192,191,243,242,299,300,244,193,192,244,243,300,301,302,245,193,245,193,244,302,303,246,194,246,194,245,303,304,247,195,247,195,246,304,305,248,196,248,196,247,305,306,249,197,249,197,248,306,307,250,198,250,198,249,307,308,251,199,251,199,250,308,309,252,200,252,200,251,309,310,253,201,253,201,252,310,311,312,254,254,202,201,253,312,313,255,255,203,202,254,313,314,256,256,204,203,255,314,315,257,257,205,204,256,315,316,258,258,206,205,257,316,317,259,259,207,206,258,317,318,260,260,208,207,259,318,319,261,261,209,208,260,319,320,262,262,263,209,261,320,321,322,263,264,210,209,262,322,323,264,265,211,210,263,323,324,265,266,212,211,264,324,325,266,267,213,212,265,325,326,267,268,214,213,266,326,327,268,269,215,214,267,327,328,269,270,216,215,268,328,329,270,217,169,216,269,329,330,271,272,217,330,273,218,217,271,274,219,218,272,275,220,219,273,276,221,220,274,277,222,221,275,278,223,222,276,279,224,223,277,280,225,224,278,281,226,225,279,281,282,226,280,283,227,226,281,284,228,227,282,285,229,228,283,286,230,229,284,287,231,230,285,288,232,231,286,289,233,232,287,290,234,233,288,291,235,234,289,291,292,235,290,291,293,236,235,292,294,237,236,293,295,238,237,294,296,239,238,295,297,240,239,296,298,241,240,297,299,242,241,298,300,243,242,299,301,244,243,301,300,302,244,244,301,303,245,245,302,304,246,246,303,305,247,247,304,306,248,248,305,307,249,249,306,308,250,250,307,309,251,251,308,310,252,252,309,311,253,311,253,310,312,254,253,311,313,255,254,312,314,256,255,313,315,257,256,314,316,258,257,315,317,259,258,316,318,260,259,317,319,261,260,318,320,262,261,319,321,321,322,262,320,323,263,262,321,324,264,263,322,325,265,264,323,326,266,265,324,327,267,266,325,328,268,267,326,329,269,268,327,330,270,269,328,271,217,270,329};
+  const mcIdType connI[332]={0,7,14,21,28,35,42,49,56,63,70,77,84,91,98,105,112,119,126,133,140,147,154,161,168,175,182,189,196,203,210,217,224,231,238,245,252,259,266,273,280,287,294,301,308,315,322,329,336,343,350,357,364,371,378,385,392,399,406,413,420,427,434,441,448,455,462,469,476,483,490,497,504,511,518,525,532,539,546,553,560,567,574,581,588,595,602,609,616,623,630,637,644,651,658,665,672,679,686,693,700,707,714,721,728,735,742,749,756,763,770,777,784,791,798,805,812,819,826,833,840,847,854,861,868,875,882,889,896,903,910,917,924,931,938,945,952,959,966,973,980,987,994,1001,1008,1015,1022,1029,1036,1043,1050,1057,1064,1071,1078,1085,1092,1099,1106,1113,1120,1127,1134,1141,1148,1155,1162,1169,1176,1183,1190,1197,1204,1211,1218,1225,1232,1239,1246,1253,1260,1267,1274,1281,1288,1295,1302,1309,1316,1323,1330,1337,1344,1351,1358,1365,1372,1379,1386,1393,1400,1407,1414,1421,1428,1435,1442,1449,1456,1463,1470,1477,1484,1491,1498,1505,1512,1519,1526,1533,1540,1547,1554,1561,1568,1575,1582,1589,1596,1603,1610,1617,1624,1631,1638,1645,1652,1659,1666,1673,1680,1687,1694,1701,1708,1715,1722,1729,1736,1743,1750,1757,1764,1771,1778,1785,1792,1799,1806,1813,1820,1827,1834,1841,1848,1855,1862,1869,1876,1883,1890,1897,1901,1905,1909,1913,1917,1921,1925,1929,1933,1937,1941,1945,1949,1953,1957,1961,1965,1969,1973,1977,1981,1985,1989,1993,1997,2001,2005,2009,2013,2017,2021,2025,2029,2033,2037,2041,2045,2049,2053,2057,2061,2065,2069,2073,2077,2081,2085,2089,2093,2097,2101,2105,2109,2113,2117,2121,2125,2129,2133,2137};
   //
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("convexhull",2);
   m->allocateCells(331);
@@ -1116,13 +1117,13 @@ void MEDCouplingBasicsTest5::testConvexEnvelop2D1()
   coordsDa->decrRef();
   m->checkConsistencyLight();
   //
-  DataArrayInt *da=m->convexEnvelop2D();
+  DataArrayIdType *da=m->convexEnvelop2D();
   m->checkConsistencyLight();
   CPPUNIT_ASSERT(coordsDa==m->getCoords());
-  DataArrayInt *daC=da->buildComplement(331);
+  DataArrayIdType *daC=da->buildComplement(331);
   da->decrRef();
-  const int expected[58]={271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330};
-  DataArrayInt *expected2=DataArrayInt::New();
+  const mcIdType expected[58]={271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330};
+  DataArrayIdType *expected2=DataArrayIdType::New();
   expected2->alloc(58,1);
   std::copy(expected,expected+58,expected2->getPointer());
   CPPUNIT_ASSERT(expected2->isEqual(*daC));
@@ -1137,7 +1138,7 @@ void MEDCouplingBasicsTest5::testConvexEnvelop2D1()
   vals->substractEqual(ref2);
   ref2->decrRef();
   vals->abs();
-  DataArrayInt *theTest=vals->findIdsInRange(-1.,1e-7);
+  DataArrayIdType *theTest=vals->findIdsInRange(-1.,1e-7);
   CPPUNIT_ASSERT(theTest->isIota(331));
   theTest->decrRef();
   valsF->decrRef();
@@ -1147,24 +1148,24 @@ void MEDCouplingBasicsTest5::testConvexEnvelop2D1()
 
 void MEDCouplingBasicsTest5::testDataArraySort1()
 {
-  DataArrayInt *arr=DataArrayInt::New();
+  DataArrayIdType *arr=DataArrayIdType::New();
   CPPUNIT_ASSERT_THROW(arr->sort(true),INTERP_KERNEL::Exception);//no allocation
   CPPUNIT_ASSERT_THROW(arr->sort(false),INTERP_KERNEL::Exception);//no allocation
-  const int values[6]={2,1,6,5,4,7};
+  const mcIdType values[6]={2,1,6,5,4,7};
   arr->alloc(3,2);
   CPPUNIT_ASSERT_THROW(arr->sort(true),INTERP_KERNEL::Exception);//no one component
   CPPUNIT_ASSERT_THROW(arr->sort(false),INTERP_KERNEL::Exception);//no one component
   arr->rearrange(1);
   std::copy(values,values+6,arr->getPointer());
-  DataArrayInt *arr1=arr->deepCopy();
-  DataArrayInt *arr2=arr->deepCopy();
+  DataArrayIdType *arr1=arr->deepCopy();
+  DataArrayIdType *arr2=arr->deepCopy();
   arr1->sort(true);
-  const int expected1[6]={1,2,4,5,6,7};
+  const mcIdType expected1[6]={1,2,4,5,6,7};
  CPPUNIT_ASSERT_EQUAL(6,(int)arr1->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)arr1->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+6,arr1->begin()));
   arr2->sort(false);
-  const int expected2[6]={7,6,5,4,2,1};
+  const mcIdType expected2[6]={7,6,5,4,2,1};
  CPPUNIT_ASSERT_EQUAL(6,(int)arr2->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)arr2->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected2,expected2+6,arr2->begin()));
@@ -1203,20 +1204,20 @@ void MEDCouplingBasicsTest5::testDataArraySort1()
 void MEDCouplingBasicsTest5::testPartitionBySpreadZone1()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  const int part0[3]={2,3,4};
-  const int part1[2]={0,1};
+  const mcIdType part0[3]={2,3,4};
+  const mcIdType part1[2]={0,1};
   MEDCouplingUMesh *m1=static_cast<MEDCouplingUMesh *>(m->buildPartOfMySelf(part0,part0+3));
   MEDCouplingUMesh *m2=static_cast<MEDCouplingUMesh *>(m->buildPartOfMySelf(part1,part1+2));
   std::vector<const MEDCouplingUMesh *> v(3); v[0]=m; v[1]=m1; v[2]=m2;
   MEDCouplingUMesh *m4=MEDCouplingUMesh::MergeUMeshes(v);
-  const int renum[10]={5,2,9,6,4,7,0,1,3,8};
+  const mcIdType renum[10]={5,2,9,6,4,7,0,1,3,8};
   m4->renumberCells(renum);
   //
-  std::vector<DataArrayInt *> v2=m4->partitionBySpreadZone();
+  std::vector<DataArrayIdType *> v2=m4->partitionBySpreadZone();
   CPPUNIT_ASSERT_EQUAL(3,(int)v2.size());
-  const int expected0[3]={0,1,7};
-  const int expected1[5]={2,4,5,6,9};
-  const int expected2[2]={3,8};
+  const mcIdType expected0[3]={0,1,7};
+  const mcIdType expected1[5]={2,4,5,6,9};
+  const mcIdType expected2[2]={3,8};
  CPPUNIT_ASSERT_EQUAL(3,(int)v2[0]->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)v2[0]->getNumberOfComponents());
  CPPUNIT_ASSERT_EQUAL(5,(int)v2[1]->getNumberOfTuples());
@@ -1234,8 +1235,8 @@ void MEDCouplingBasicsTest5::testPartitionBySpreadZone1()
   MEDCouplingUMesh *m5=m4->buildSpreadZonesWithPoly();
   CPPUNIT_ASSERT_EQUAL(3,(int)m5->getNumberOfCells());
   CPPUNIT_ASSERT(m5->getCoords()==m4->getCoords());
-  const int expected3[23]={5,15,16,17,14,11,13,12,5,2,1,0,3,6,7,8,5,5,18,21,22,20,19};
-  const int expected4[4]={0,8,17,23};
+  const mcIdType expected3[23]={5,15,16,17,14,11,13,12,5,2,1,0,3,6,7,8,5,5,18,21,22,20,19};
+  const mcIdType expected4[4]={0,8,17,23};
   CPPUNIT_ASSERT_EQUAL(23,(int)m5->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+23,m5->getNodalConnectivity()->getConstPointer()));
   CPPUNIT_ASSERT_EQUAL(4,(int)m5->getNodalConnectivityIndex()->getNumberOfTuples());
@@ -1250,10 +1251,10 @@ void MEDCouplingBasicsTest5::testPartitionBySpreadZone1()
 
 void MEDCouplingBasicsTest5::testGiveCellsWithType1()
 {
-  const int expected0[2]={1,2};
-  const int expected1[3]={0,3,4};
+  const mcIdType expected0[2]={1,2};
+  const mcIdType expected1[3]={0,3,4};
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  DataArrayInt *da=m->giveCellsWithType(INTERP_KERNEL::NORM_TRI3);
+  DataArrayIdType *da=m->giveCellsWithType(INTERP_KERNEL::NORM_TRI3);
  CPPUNIT_ASSERT_EQUAL(2,(int)da->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected0,expected0+2,da->getConstPointer()));
@@ -1284,7 +1285,7 @@ void MEDCouplingBasicsTest5::testBuildSlice3D2()
   // First slice in the middle of 3D cells
   const double vec1[3]={-0.07,1.,0.07};
   const double origin1[3]={1.524,1.4552,1.74768};
-  DataArrayInt *ids=0;
+  DataArrayIdType *ids=0;
   MEDCouplingUMesh *slice1=mesh3D->buildSlice3D(origin1,vec1,1e-10,ids);
   //
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
@@ -1293,8 +1294,8 @@ void MEDCouplingBasicsTest5::testBuildSlice3D2()
   arr->rearrange(1); arr->iota(2.); arr->rearrange(2);
   f->setArray(arr);
   f->checkConsistencyLight();
-  const int exp1[9]={1,3,4,7,9,10,13,15,16};
-  DataArrayInt *expected1=DataArrayInt::New(); expected1->alloc(9,1); std::copy(exp1,exp1+9,expected1->getPointer());
+  const mcIdType exp1[9]={1,3,4,7,9,10,13,15,16};
+  DataArrayIdType *expected1=DataArrayIdType::New(); expected1->alloc(9,1); std::copy(exp1,exp1+9,expected1->getPointer());
   CPPUNIT_ASSERT(expected1->isEqual(*ids));
   DataArrayDouble *arr2=arr->selectByTupleIdSafe(expected1->begin(),expected1->end());
   //
@@ -1325,14 +1326,14 @@ void MEDCouplingBasicsTest5::testComputeTupleIdsToSelectFromCellIds1()
   DataArrayDouble *arr=DataArrayDouble::New(); arr->alloc(52,2) ; arr->rearrange(1) ; arr->iota(7.); arr->rearrange(2);
   f->setArray(arr);
   //
-  const int subPart1[3]={1,5,9};
+  const mcIdType subPart1[3]={1,5,9};
   MEDCouplingFieldDouble *f2=f->buildSubPart(subPart1,subPart1+3);
   f2->checkConsistencyLight();
-  DataArrayInt *cI=m->computeNbOfNodesPerCell();
+  DataArrayIdType *cI=m->computeNbOfNodesPerCell();
   cI->computeOffsetsFull();
-  const int sel1[3]={1,5,9};
-  DataArrayInt *sel=DataArrayInt::New(); sel->useArray(sel1,false,DeallocType::CPP_DEALLOC,3,1);
-  DataArrayInt *res=sel->buildExplicitArrByRanges(cI);
+  const mcIdType sel1[3]={1,5,9};
+  DataArrayIdType *sel=DataArrayIdType::New(); sel->useArray(sel1,false,DeallocType::CPP_DEALLOC,3,1);
+  DataArrayIdType *res=sel->buildExplicitArrByRanges(cI);
   DataArrayDouble *arr2=arr->selectByTupleIdSafe(res->begin(),res->end());
   const double expected1[30]={13.,14.,15.,16.,17.,18.,19.,20.,59.,60.,61.,62.,63.,64.,95.,96.,97.,98.,99.,100.,101.,102.,103.,104.,105.,106.,107.,108.,109.,110.};
   DataArrayDouble *arr3=DataArrayDouble::New(); arr3->useArray(expected1,false,DeallocType::CPP_DEALLOC,15,2);
@@ -1364,29 +1365,29 @@ void MEDCouplingBasicsTest5::testComputeSkin1()
   CPPUNIT_ASSERT_EQUAL(18,(int)skin->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(1,skin->getMeshDimension());
   CPPUNIT_ASSERT(skin->getCoords()==umesh->getCoords());
-  const int expected1[19]={0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54};
-  const int expected2[54]={1,1,0,1,0,5,1,2,1,1,3,2,1,4,3,1,9,4,1,5,10,1,14,9,1,10,15,1,19,14,1,15,20,1,24,19,1,20,25,1,25,26,1,26,27,1,27,28,1,28,29,1,29,24};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)19,skin->getNodalConnectivityIndex()->getNbOfElems());
+  const mcIdType expected1[19]={0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54};
+  const mcIdType expected2[54]={1,1,0,1,0,5,1,2,1,1,3,2,1,4,3,1,9,4,1,5,10,1,14,9,1,10,15,1,19,14,1,15,20,1,24,19,1,20,25,1,25,26,1,26,27,1,27,28,1,28,29,1,29,24};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),skin->getNodalConnectivityIndex()->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+19,skin->getNodalConnectivityIndex()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)54,skin->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(54),skin->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected2,expected2+54,skin->getNodalConnectivity()->getConstPointer()));
-  DataArrayInt *ids=skin->computeFetchedNodeIds();
-  const int expected3[18]={0,1,2,3,4,5,9,10,14,15,19,20,24,25,26,27,28,29};
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,ids->getNbOfElems());
+  DataArrayIdType *ids=skin->computeFetchedNodeIds();
+  const mcIdType expected3[18]={0,1,2,3,4,5,9,10,14,15,19,20,24,25,26,27,28,29};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),ids->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+18,ids->getConstPointer()));
   MEDCouplingUMesh *part=dynamic_cast<MEDCouplingUMesh *>(umesh->buildFacePartOfMySelfNode(ids->begin(),ids->end(),true));
   part->setName(skin->getName().c_str());
   CPPUNIT_ASSERT(part->isEqual(skin,1e-12));
   MEDCouplingUMesh *part2=dynamic_cast<MEDCouplingUMesh *>(part->buildPartOfMySelfSlice(1,18,2,true));
-  DataArrayInt *ids2=DataArrayInt::Range(0,18,2);
+  DataArrayIdType *ids2=DataArrayIdType::Range(0,18,2);
   part->setPartOfMySelf(ids2->begin(),ids2->end(),*part2);
   ids2->decrRef();
   CPPUNIT_ASSERT(!part->isEqual(skin,1e-12));
-  DataArrayInt *trad=part->zipConnectivityTraducer(0);
+  DataArrayIdType *trad=part->zipConnectivityTraducer(0);
   CPPUNIT_ASSERT_EQUAL(9,(int)part->getNumberOfCells());
-  const int expected4[18]={0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8};
+  const mcIdType expected4[18]={0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8};
   CPPUNIT_ASSERT(std::equal(expected4,expected4+18,trad->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)18,trad->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(18),trad->getNbOfElems());
   trad->decrRef();
   part->decrRef();
   part2->decrRef();
@@ -1402,18 +1403,18 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2()
   MEDCouplingUMesh *m=build2DTargetMesh_1();
   std::set<INTERP_KERNEL::NormalizedCellType> s; s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4);
   CPPUNIT_ASSERT(s==m->getAllGeoTypes());
-  const int ids1[3]={0,3,4};
+  const mcIdType ids1[3]={0,3,4};
   MEDCouplingUMesh *part=static_cast<MEDCouplingUMesh *>(m->buildPartOfMySelf(ids1,ids1+3,true));
   part->simplexize(0)->decrRef();
-  const int ids2[3]={1,2,5};
+  const mcIdType ids2[3]={1,2,5};
   MEDCouplingUMesh *part2=static_cast<MEDCouplingUMesh *>(part->buildPartOfMySelf(ids2,ids2+3,true));
   m->setPartOfMySelf(ids1,ids1+3,*part2);
-  const int expected1[20]={3,0,4,1,3,1,4,2,3,4,5,2,3,6,7,4,3,7,5,4};
+  const mcIdType expected1[20]={3,0,4,1,3,1,4,2,3,4,5,2,3,6,7,4,3,7,5,4};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+20,m->getNodalConnectivity()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)20,m->getNodalConnectivity()->getNbOfElems());
-  const int expected2[6]={0,4,8,12,16,20};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(20),m->getNodalConnectivity()->getNbOfElems());
+  const mcIdType expected2[6]={0,4,8,12,16,20};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+6,m->getNodalConnectivityIndex()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),m->getNodalConnectivityIndex()->getNbOfElems());
   s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3);
   CPPUNIT_ASSERT(s==m->getAllGeoTypes());
   m->decrRef(); part->decrRef(); part2->decrRef();
@@ -1422,12 +1423,12 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2()
   part=static_cast<MEDCouplingUMesh *>(m->buildPartOfMySelf(ids1,ids1+2,true));
   part->convertAllToPoly();
   m->setPartOfMySelf(ids1+1,ids1+3,*part);
-  const int expected3[23]={4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3};
+  const mcIdType expected3[23]={4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3};
   CPPUNIT_ASSERT(std::equal(expected3,expected3+23,m->getNodalConnectivity()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)23,m->getNodalConnectivity()->getNbOfElems());
-  const int expected4[6]={0,5,9,13,18,23};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(23),m->getNodalConnectivity()->getNbOfElems());
+  const mcIdType expected4[6]={0,5,9,13,18,23};
   CPPUNIT_ASSERT(std::equal(expected4,expected4+6,m->getNodalConnectivityIndex()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),m->getNodalConnectivityIndex()->getNbOfElems());
   s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4); s.insert(INTERP_KERNEL::NORM_POLYGON);
   CPPUNIT_ASSERT(s==m->getAllGeoTypes());
   m->decrRef(); part->decrRef();
@@ -1435,12 +1436,12 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2()
   m=build2DTargetMesh_1();
   part=static_cast<MEDCouplingUMesh *>(m->buildPartOfMySelfSlice(3,5,1,true));
   m->setPartOfMySelfSlice(1,3,1,*part);
-  const int expected5[25]={4,0,3,4,1,4,6,7,4,3,4,7,8,5,4,4,6,7,4,3,4,7,8,5,4};
+  const mcIdType expected5[25]={4,0,3,4,1,4,6,7,4,3,4,7,8,5,4,4,6,7,4,3,4,7,8,5,4};
   CPPUNIT_ASSERT(std::equal(expected5,expected5+25,m->getNodalConnectivity()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)25,m->getNodalConnectivity()->getNbOfElems());
-  const int expected6[6]={0,5,10,15,20,25};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(25),m->getNodalConnectivity()->getNbOfElems());
+  const mcIdType expected6[6]={0,5,10,15,20,25};
   CPPUNIT_ASSERT(std::equal(expected6,expected6+6,m->getNodalConnectivityIndex()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),m->getNodalConnectivityIndex()->getNbOfElems());
   s.clear(); s.insert(INTERP_KERNEL::NORM_QUAD4);
   CPPUNIT_ASSERT(s==m->getAllGeoTypes());
   m->decrRef(); part->decrRef();
@@ -1449,12 +1450,12 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2()
   part=static_cast<MEDCouplingUMesh *>(m->buildPartOfMySelfSlice(0,5,3,true));
   part->convertAllToPoly();
   m->setPartOfMySelfSlice(3,5,1,*part);
-  const int expected7[23]={4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3};
+  const mcIdType expected7[23]={4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3};
   CPPUNIT_ASSERT(std::equal(expected7,expected7+23,m->getNodalConnectivity()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)23,m->getNodalConnectivity()->getNbOfElems());
-  const int expected8[6]={0,5,9,13,18,23};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(23),m->getNodalConnectivity()->getNbOfElems());
+  const mcIdType expected8[6]={0,5,9,13,18,23};
   CPPUNIT_ASSERT(std::equal(expected8,expected8+6,m->getNodalConnectivityIndex()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),m->getNodalConnectivityIndex()->getNbOfElems());
 s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4); s.insert(INTERP_KERNEL::NORM_POLYGON);
   CPPUNIT_ASSERT(s==m->getAllGeoTypes());
   m->decrRef(); part->decrRef();
@@ -1463,12 +1464,12 @@ s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD
   part=static_cast<MEDCouplingUMesh *>(m->buildPartOfMySelfSlice(3,-1,-3,true));
   part->convertAllToPoly();
   m->setPartOfMySelfSlice(4,2,-1,*part);
-  const int expected9[23]={4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3};
+  const mcIdType expected9[23]={4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3};
   CPPUNIT_ASSERT(std::equal(expected9,expected9+23,m->getNodalConnectivity()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)23,m->getNodalConnectivity()->getNbOfElems());
-  const int expected10[6]={0,5,9,13,18,23};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(23),m->getNodalConnectivity()->getNbOfElems());
+  const mcIdType expected10[6]={0,5,9,13,18,23};
   CPPUNIT_ASSERT(std::equal(expected10,expected10+6,m->getNodalConnectivityIndex()->getConstPointer()));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),m->getNodalConnectivityIndex()->getNbOfElems());
   s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4); s.insert(INTERP_KERNEL::NORM_POLYGON);
   CPPUNIT_ASSERT(s==m->getAllGeoTypes());
   part->decrRef();
@@ -1478,7 +1479,7 @@ s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD
 void MEDCouplingBasicsTest5::testUnPolyze3()
 {
   const double coord[18]={0.0,0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5,0.0,0.5,0.5,-0.5,-0.5,0.5,0.5,-0.5,0.5};
-  const int conn[22]={1,2,5,4,-1,4,3,0,1,-1,2,0,3,5,-1,0,2,1,-1,4,5,3};
+  const mcIdType conn[22]={1,2,5,4,-1,4,3,0,1,-1,2,0,3,5,-1,0,2,1,-1,4,5,3};
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("a mesh",3);
   m->allocateCells(1);
   m->insertNextCell(INTERP_KERNEL::NORM_POLYHED,22,conn);
@@ -1500,8 +1501,8 @@ void MEDCouplingBasicsTest5::testUnPolyze3()
   std::set<INTERP_KERNEL::NormalizedCellType> s; s.insert(INTERP_KERNEL::NORM_PENTA6);
   CPPUNIT_ASSERT(s==m->getAllGeoTypes());
   //
-  const int expected1[2]={0,7};
-  const int expected2[7]={16,0,2,1,3,5,4};
+  const mcIdType expected1[2]={0,7};
+  const mcIdType expected2[7]={16,0,2,1,3,5,4};
   CPPUNIT_ASSERT_EQUAL(2,(int)m->getNodalConnectivityIndex()->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+2,m->getNodalConnectivityIndex()->getConstPointer()));
   CPPUNIT_ASSERT_EQUAL(7,(int)m->getNodalConnectivity()->getNumberOfTuples());
@@ -1567,11 +1568,11 @@ void MEDCouplingBasicsTest5::testDuplicateEachTupleNTimes1()
   d->decrRef();
   d2->decrRef();
   //
-  const int vals2[4]={9,8,7,6};
-  DataArrayInt *d4=DataArrayInt::New(); d4->useArray(vals2,false,DeallocType::CPP_DEALLOC,4,1); d4->setInfoOnComponent(0,"mass [kg]") ; d4->setName("aname");
-  DataArrayInt *d5=d4->duplicateEachTupleNTimes(3);
-  const int vals3[12]={9,9,9,8,8,8,7,7,7,6,6,6};
-  DataArrayInt *d6=DataArrayInt::New(); d6->useArray(vals3,false,DeallocType::CPP_DEALLOC,4*3,1); d6->setName("aname"); d6->setInfoOnComponent(0,"mass [kg]");
+  const mcIdType vals2[4]={9,8,7,6};
+  DataArrayIdType *d4=DataArrayIdType::New(); d4->useArray(vals2,false,DeallocType::CPP_DEALLOC,4,1); d4->setInfoOnComponent(0,"mass [kg]") ; d4->setName("aname");
+  DataArrayIdType *d5=d4->duplicateEachTupleNTimes(3);
+  const mcIdType vals3[12]={9,9,9,8,8,8,7,7,7,6,6,6};
+  DataArrayIdType *d6=DataArrayIdType::New(); d6->useArray(vals3,false,DeallocType::CPP_DEALLOC,4*3,1); d6->setName("aname"); d6->setInfoOnComponent(0,"mass [kg]");
   CPPUNIT_ASSERT(d5->isEqual(*d6)); d6->decrRef();
   d4->decrRef();
   d5->decrRef();
@@ -1584,12 +1585,12 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp5()
   const double coordsData[376]={41,0,42,0,0,42,0,41,41.5,0,29.698484809834998,29.698484809834994,0,41.5,28.991378028648452,28.991378028648445,-42,0,-41,0,-29.698484809834994,29.698484809834998,-41.5,0,-28.991378028648445,28.991378028648452,0,-42,0,-41,-29.698484809835001,-29.698484809834994,0,-41.5,-28.991378028648455,-28.991378028648445,29.698484809834987,-29.698484809835001,28.991378028648441,-28.991378028648455,43,0,0,43,42.5,0,30.405591591021544,30.40559159102154,0,42.5,-43,0,-30.40559159102154,30.405591591021544,-42.5,0,0,-43,-30.405591591021551,-30.40559159102154,0,-42.5,30.405591591021537,-30.405591591021551,44,0,0,44,43.5,0,31.112698372208094,31.112698372208087,0,43.5,-44,0,-31.112698372208087,31.112698372208094,-43.5,0,0,-44,-31.112698372208097,-31.112698372208087,0,-43.5,31.112698372208083,-31.112698372208097,45,0,0,45,44.5,0,31.81980515339464,31.819805153394636,0,44.5,-45,0,-31.819805153394636,31.81980515339464,-44.5,0,0,-45,-31.819805153394647,-31.819805153394636,0,-44.5,31.819805153394629,-31.819805153394647,47,0,0,47,46,0,33.234018715767739,33.234018715767732,0,46,-47,0,-33.234018715767732,33.234018715767739,-46,0,0,-47,-33.234018715767739,-33.234018715767732,0,-46,33.234018715767725,-33.234018715767739,49,0,0,49,48,0,34.648232278140831,34.648232278140824,0,48,-49,0,-34.648232278140824,34.648232278140831,-48,0,0,-49,-34.648232278140839,-34.648232278140824,0,-48,34.648232278140817,-34.648232278140839,51,0,0,51,50,0,36.062445840513924,36.062445840513924,0,50,-51,0,-36.062445840513924,36.062445840513924,-50,0,0,-51,-36.062445840513931,-36.062445840513924,0,-50,36.062445840513917,-36.062445840513931,53,0,0,53,52,0,37.476659402887023,37.476659402887016,0,52,-53,0,-37.476659402887016,37.476659402887023,-52,0,0,-53,-37.47665940288703,-37.476659402887016,0,-52,37.476659402887009,-37.47665940288703,55,0,0,55,54,0,38.890872965260115,38.890872965260108,0,54,-55,0,-38.890872965260108,38.890872965260115,-54,0,0,-55,-38.890872965260122,-38.890872965260108,0,-54,38.890872965260101,-38.890872965260122,59,0,0,59,57,0,41.719300090006307,41.7193000900063,0,57,-59,0,-41.7193000900063,41.719300090006307,-57,0,0,-59,-41.719300090006314,-41.7193000900063,0,-57,41.719300090006293,-41.719300090006314,63,0,0,63,61,0,44.547727214752499,44.547727214752491,0,61,-63,0,-44.547727214752491,44.547727214752499,-61,0,0,-63,-44.547727214752506,-44.547727214752491,0,-61,44.547727214752484,-44.547727214752506,67,0,0,67,65,0,47.37615433949869,47.376154339498683,0,65,-67,0,-47.376154339498683,47.37615433949869,-65,0,0,-67,-47.376154339498697,-47.376154339498683,0,-65,47.376154339498676,-47.376154339498697,71,0,0,71,69,0,50.204581464244875,50.204581464244868,0,69,-71,0,-50.204581464244868,50.204581464244875,-69,0,0,-71,-50.204581464244889,-50.204581464244868,0,-69,50.20458146424486,-50.204581464244889,75,0,0,75,73,0,53.033008588991066,53.033008588991059,0,73,-75,0,-53.033008588991059,53.033008588991066,-73,0,0,-75,-53.033008588991073,-53.033008588991059,0,-73,53.033008588991052,-53.033008588991073,80,0,0,80,77.5,0,56.568542494923804,56.568542494923797,0,77.5,-80,0,-56.568542494923797,56.568542494923804,-77.5,0,0,-80,-56.568542494923818,-56.568542494923797,0,-77.5,56.56854249492379,-56.568542494923818};
   coords->useArray(coordsData,false,DeallocType::CPP_DEALLOC,188,2);
   coords->setName("");
-  DataArrayInt *conn=DataArrayInt::New();
-  const int connData[540]={8,0,1,2,3,4,5,6,7,8,3,2,8,9,6,10,11,12,8,9,8,13,14,11,15,16,17,8,14,13,1,0,16,18,4,19,8,1,20,21,2,22,23,24,5,8,2,21,25,8,24,26,27,10,8,8,25,28,13,27,29,30,15,8,13,28,20,1,30,31,22,18,8,20,32,33,21,34,35,36,23,8,21,33,37,25,36,38,39,26,8,25,37,40,28,39,41,42,29,8,28,40,32,20,42,43,34,31,8,32,44,45,33,46,47,48,35,8,33,45,49,37,48,50,51,38,8,37,49,52,40,51,53,54,41,8,40,52,44,32,54,55,46,43,8,44,56,57,45,58,59,60,47,8,45,57,61,49,60,62,63,50,8,49,61,64,52,63,65,66,53,8,52,64,56,44,66,67,58,55,8,56,68,69,57,70,71,72,59,8,57,69,73,61,72,74,75,62,8,61,73,76,64,75,77,78,65,8,64,76,68,56,78,79,70,67,8,68,80,81,69,82,83,84,71,8,69,81,85,73,84,86,87,74,8,73,85,88,76,87,89,90,77,8,76,88,80,68,90,91,82,79,8,80,92,93,81,94,95,96,83,8,81,93,97,85,96,98,99,86,8,85,97,100,88,99,101,102,89,8,88,100,92,80,102,103,94,91,8,92,104,105,93,106,107,108,95,8,93,105,109,97,108,110,111,98,8,97,109,112,100,111,113,114,101,8,100,112,104,92,114,115,106,103,8,104,116,117,105,118,119,120,107,8,105,117,121,109,120,122,123,110,8,109,121,124,112,123,125,126,113,8,112,124,116,104,126,127,118,115,8,116,128,129,117,130,131,132,119,8,117,129,133,121,132,134,135,122,8,121,133,136,124,135,137,138,125,8,124,136,128,116,138,139,130,127,8,128,140,141,129,142,143,144,131,8,129,141,145,133,144,146,147,134,8,133,145,148,136,147,149,150,137,8,136,148,140,128,150,151,142,139,8,140,152,153,141,154,155,156,143,8,141,153,157,145,156,158,159,146,8,145,157,160,148,159,161,162,149,8,148,160,152,140,162,163,154,151,8,152,164,165,153,166,167,168,155,8,153,165,169,157,168,170,171,158,8,157,169,172,160,171,173,174,161,8,160,172,164,152,174,175,166,163,8,164,176,177,165,178,179,180,167,8,165,177,181,169,180,182,183,170,8,169,181,184,172,183,185,186,173,8,172,184,176,164,186,187,178,175};
+  DataArrayIdType *conn=DataArrayIdType::New();
+  const mcIdType connData[540]={8,0,1,2,3,4,5,6,7,8,3,2,8,9,6,10,11,12,8,9,8,13,14,11,15,16,17,8,14,13,1,0,16,18,4,19,8,1,20,21,2,22,23,24,5,8,2,21,25,8,24,26,27,10,8,8,25,28,13,27,29,30,15,8,13,28,20,1,30,31,22,18,8,20,32,33,21,34,35,36,23,8,21,33,37,25,36,38,39,26,8,25,37,40,28,39,41,42,29,8,28,40,32,20,42,43,34,31,8,32,44,45,33,46,47,48,35,8,33,45,49,37,48,50,51,38,8,37,49,52,40,51,53,54,41,8,40,52,44,32,54,55,46,43,8,44,56,57,45,58,59,60,47,8,45,57,61,49,60,62,63,50,8,49,61,64,52,63,65,66,53,8,52,64,56,44,66,67,58,55,8,56,68,69,57,70,71,72,59,8,57,69,73,61,72,74,75,62,8,61,73,76,64,75,77,78,65,8,64,76,68,56,78,79,70,67,8,68,80,81,69,82,83,84,71,8,69,81,85,73,84,86,87,74,8,73,85,88,76,87,89,90,77,8,76,88,80,68,90,91,82,79,8,80,92,93,81,94,95,96,83,8,81,93,97,85,96,98,99,86,8,85,97,100,88,99,101,102,89,8,88,100,92,80,102,103,94,91,8,92,104,105,93,106,107,108,95,8,93,105,109,97,108,110,111,98,8,97,109,112,100,111,113,114,101,8,100,112,104,92,114,115,106,103,8,104,116,117,105,118,119,120,107,8,105,117,121,109,120,122,123,110,8,109,121,124,112,123,125,126,113,8,112,124,116,104,126,127,118,115,8,116,128,129,117,130,131,132,119,8,117,129,133,121,132,134,135,122,8,121,133,136,124,135,137,138,125,8,124,136,128,116,138,139,130,127,8,128,140,141,129,142,143,144,131,8,129,141,145,133,144,146,147,134,8,133,145,148,136,147,149,150,137,8,136,148,140,128,150,151,142,139,8,140,152,153,141,154,155,156,143,8,141,153,157,145,156,158,159,146,8,145,157,160,148,159,161,162,149,8,148,160,152,140,162,163,154,151,8,152,164,165,153,166,167,168,155,8,153,165,169,157,168,170,171,158,8,157,169,172,160,171,173,174,161,8,160,172,164,152,174,175,166,163,8,164,176,177,165,178,179,180,167,8,165,177,181,169,180,182,183,170,8,169,181,184,172,183,185,186,173,8,172,184,176,164,186,187,178,175};
   conn->useArray(connData,false,DeallocType::CPP_DEALLOC,540,1);
   conn->setName("");
-  DataArrayInt *connI=DataArrayInt::New();
-  const int connIData[61]={0,9,18,27,36,45,54,63,72,81,90,99,108,117,126,135,144,153,162,171,180,189,198,207,216,225,234,243,252,261,270,279,288,297,306,315,324,333,342,351,360,369,378,387,396,405,414,423,432,441,450,459,468,477,486,495,504,513,522,531,540};
+  DataArrayIdType *connI=DataArrayIdType::New();
+  const mcIdType connIData[61]={0,9,18,27,36,45,54,63,72,81,90,99,108,117,126,135,144,153,162,171,180,189,198,207,216,225,234,243,252,261,270,279,288,297,306,315,324,333,342,351,360,369,378,387,396,405,414,423,432,441,450,459,468,477,486,495,504,513,522,531,540};
   connI->useArray(connIData,false,DeallocType::CPP_DEALLOC,61,1);
   connI->setName("");
   //
@@ -1600,15 +1601,15 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp5()
   //
   coords=DataArrayDouble::New();
   const double coordsData2[84]={46.5,-2.5,53.5,-2.5,53.5,2.5,46.5,2.5,50,-2.5,53.5,0,50,2.5,46.5,0,60.5,-2.5,60.5,2.5,57,-2.5,60.5,0,57,2.5,53.5,7.5,46.5,7.5,53.5,5,50,7.5,46.5,5,60.5,7.5,60.5,5,57,7.5,-2,47,2,47,2,53,-2,53,0,47,2,50,0,53,-2,50,6,47,6,53,4,47,6,50,4,53,2,59,-2,59,2,56,0,59,-2,56,6,59,6,56,4,59};
-  coords->useArray(coordsData2,false,DeallocType::CPP_DEALLOC,42,2);  
+  coords->useArray(coordsData2,false,DeallocType::CPP_DEALLOC,42,2);
   coords->setName("");
   // connectivity
-  conn=DataArrayInt::New();
-  const int connData2[72]={8,0,1,2,3,4,5,6,7,8,1,8,9,2,10,11,12,5,8,3,2,13,14,6,15,16,17,8,2,9,18,13,12,19,20,15,8,21,22,23,24,25,26,27,28,8,22,29,30,23,31,32,33,26,8,24,23,34,35,27,36,37,38,8,23,30,39,34,33,40,41,36};
+  conn=DataArrayIdType::New();
+  const mcIdType connData2[72]={8,0,1,2,3,4,5,6,7,8,1,8,9,2,10,11,12,5,8,3,2,13,14,6,15,16,17,8,2,9,18,13,12,19,20,15,8,21,22,23,24,25,26,27,28,8,22,29,30,23,31,32,33,26,8,24,23,34,35,27,36,37,38,8,23,30,39,34,33,40,41,36};
   conn->useArray(connData2,false,DeallocType::CPP_DEALLOC,72,1);
   conn->setName("");
-  connI=DataArrayInt::New();
-  const int connIData2[9]={0,9,18,27,36,45,54,63,72};
+  connI=DataArrayIdType::New();
+  const mcIdType connIData2[9]={0,9,18,27,36,45,54,63,72};
   connI->useArray(connIData2,false,DeallocType::CPP_DEALLOC,9,1);
   connI->setName("");
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New("Mobile",2);
@@ -1616,16 +1617,16 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp5()
   m2->setConnectivity(conn,connI,true);
   coords->decrRef(); conn->decrRef(); connI->decrRef();
   //
-  DataArrayInt *d1=0,*d2=0;
+  DataArrayIdType *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2);
   CPPUNIT_ASSERT_EQUAL(105,(int)m3->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(105,(int)d1->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(105,(int)d2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(704,m3->getNumberOfNodes());
 CPPUNIT_ASSERT_EQUAL(105,(int)d1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(105,(int)d2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(704,(int)m3->getNumberOfNodes());
   //
   const double areaExpected[105]={-65.18804756198824,-65.18804756198824,-65.18804756198824,-65.18804756198824,-66.75884388878285,-66.75884388878285,-66.7588438887833,-66.75884388878308,-68.32964021557768,-68.32964021557768,-68.32964021557814,-68.32964021557791,-69.9004365423732,-69.9004365423732,-69.90043654237297,-69.90043654237297,-1.194568659706448,-1.0869994447159463,-142.2316939607081,-144.51326206513068,-144.5132620651309,-1.1945686597064424,-143.3186934054243,-5.002264310862817,-10.0261332846393,-3.9727823117092953,-7.290862524642649,-124.504404940456,-3.9727823117093237,-146.82366506060032,-150.79644737231024,-5.002264310862776,-145.79418306144626,-5.00208651738126,-10.054764051268958,-4.001067863263231,-8.027932154428669,-129.99378209314813,-4.001067863263216,-153.07856481622616,-157.0796326794898,-5.0020865173811915,-152.07754616210832,-5.001928880064381,-10.050590216368969,-4.00098721602491,-8.025810856794209,-136.28350081741684,-4.000987216024939,-159.36183077064402,-163.36281798667005,-5.0019288800643285,-158.36088910660442,-1.2991516319851801,-3.702636830195414,-3.7815130030068254,-6.265364371195623,-0.02516260900254963,-0.6553944641345026,-3.975752765070567,-7.368528340442765,-142.57249927881398,-0.02516260900254963,-3.9757527650706095,-165.64508791977525,-169.64600329384803,-1.299151631985167,-3.7026368301953885,-164.6442148316677,-10.00321285677458,-20.08414323176165,-8.001644468035863,-16.042954878437143,-304.0096070742277,-8.00164446803587,-350.1399180412005,-358.1415625092368,-10.003212856774468,-348.13834965246224,-3.794150313030109,-8.65049239704272,-0.02260276689354157,-0.5885167811200915,-370.2185414798688,-0.022602766893559393,-383.2517009710623,-383.2743037379555,-3.7941503130300576,-379.48015342492505,-408.40704496667513,-408.4070449666742,-408.4070449666742,-408.4070449666742,-433.53978619538975,-433.5397861953902,-433.5397861953911,-433.53978619539066,-458.67252742410983,-458.6725274241094,-458.67252742410983,-458.6725274241089,-608.6835766330232,-608.6835766330232,-608.6835766330232,-608.6835766330241};
-  const int expected1[105]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,16,16,17,18,19,19,20,20,20,20,20,21,21,22,23,23,24,24,24,24,24,25,25,26,27,27,28,28,28,28,28,29,29,30,31,31,32,32,32,32,32,32,32,32,32,33,33,33,34,35,35,35,36,36,36,36,36,37,37,38,39,39,40,40,40,40,40,41,41,42,43,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59};
-  const int expected2[105]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,2,-1,-1,-1,0,-1,0,2,4,5,-1,4,-1,-1,0,-1,0,2,4,5,-1,4,-1,-1,0,-1,0,2,4,5,-1,4,-1,-1,0,-1,0,1,2,3,4,5,6,7,-1,4,6,-1,-1,0,1,-1,1,3,6,7,-1,6,-1,-1,1,-1,1,3,6,7,-1,6,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
+  const mcIdType expected1[105]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,16,16,17,18,19,19,20,20,20,20,20,21,21,22,23,23,24,24,24,24,24,25,25,26,27,27,28,28,28,28,28,29,29,30,31,31,32,32,32,32,32,32,32,32,32,33,33,33,34,35,35,35,36,36,36,36,36,37,37,38,39,39,40,40,40,40,40,41,41,42,43,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59};
+  const mcIdType expected2[105]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,2,-1,-1,-1,0,-1,0,2,4,5,-1,4,-1,-1,0,-1,0,2,4,5,-1,4,-1,-1,0,-1,0,2,4,5,-1,4,-1,-1,0,-1,0,1,2,3,4,5,6,7,-1,4,6,-1,-1,0,1,-1,1,3,6,7,-1,6,-1,-1,1,-1,1,3,6,7,-1,6,-1,-1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
   MEDCouplingFieldDouble *f3f=m3->getMeasureField(ON_CELLS);
   const double *f3=f3f->getArray()->getConstPointer();
   for(int i=0;i<105;i++)
@@ -1645,12 +1646,12 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp5()
 
 void MEDCouplingBasicsTest5::testDAIBuildUnique1()
 {
-  DataArrayInt *d=DataArrayInt::New();
-  const int dData[14]={1,2,2,3,3,3,3,4,5,5,7,7,7,19};
+  DataArrayIdType *d=DataArrayIdType::New();
+  const mcIdType dData[14]={1,2,2,3,3,3,3,4,5,5,7,7,7,19};
   d->useArray(dData,false,DeallocType::CPP_DEALLOC,14,1);
-  const int expectedData[7]={1,2,3,4,5,7,19};
+  const mcIdType expectedData[7]={1,2,3,4,5,7,19};
   //
-  DataArrayInt *e=d->buildUnique();
+  DataArrayIdType *e=d->buildUnique();
  CPPUNIT_ASSERT_EQUAL(7,(int)e->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)e->getNumberOfComponents());
   for(int i=0;i<7;i++)
@@ -1662,32 +1663,32 @@ void MEDCouplingBasicsTest5::testDAIBuildUnique1()
 
 void MEDCouplingBasicsTest5::testDAIPartitionByDifferentValues1()
 {
-  const int data[9]={1,0,1,2,0,2,2,-3,2};
-  const int expected1[4]={-3,0,1,2};
-  const int expected2_0[1]={7};
-  const int expected2_1[2]={1,4};
-  const int expected2_2[2]={0,2};
-  const int expected2_3[4]={3,5,6,8};
-  DataArrayInt *d=DataArrayInt::New();
+  const mcIdType data[9]={1,0,1,2,0,2,2,-3,2};
+  const mcIdType expected1[4]={-3,0,1,2};
+  const mcIdType expected2_0[1]={7};
+  const mcIdType expected2_1[2]={1,4};
+  const mcIdType expected2_2[2]={0,2};
+  const mcIdType expected2_3[4]={3,5,6,8};
+  DataArrayIdType *d=DataArrayIdType::New();
   d->useArray(data,false,DeallocType::CPP_DEALLOC,9,1);
-  std::vector<int> f;
+  std::vector<mcIdType> f;
   static const int nbOfOutputsExpected=4;
-  std::vector<DataArrayInt *> e=d->partitionByDifferentValues(f);
+  std::vector<DataArrayIdType *> e=d->partitionByDifferentValues(f);
   d->decrRef();
   CPPUNIT_ASSERT_EQUAL(nbOfOutputsExpected,(int)e.size());
   CPPUNIT_ASSERT_EQUAL(nbOfOutputsExpected,(int)f.size());
   for(int i=0;i<nbOfOutputsExpected;i++)
-    {
-      CPPUNIT_ASSERT_EQUAL(expected1[i],f[i]);
-    }
-  CPPUNIT_ASSERT_EQUAL((std::size_t)1,e[0]->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2,e[1]->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2,e[2]->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL((std::size_t)4,e[3]->getNbOfElems());
- CPPUNIT_ASSERT_EQUAL(1,(int)e[0]->getNumberOfComponents());
- CPPUNIT_ASSERT_EQUAL(1,(int)e[1]->getNumberOfComponents());
- CPPUNIT_ASSERT_EQUAL(1,(int)e[2]->getNumberOfComponents());
- CPPUNIT_ASSERT_EQUAL(1,(int)e[3]->getNumberOfComponents());
+  {
+    CPPUNIT_ASSERT_EQUAL(expected1[i],f[i]);
+  }
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),e[0]->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),e[1]->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),e[2]->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4),e[3]->getNbOfElems());
 CPPUNIT_ASSERT_EQUAL(1,(int)e[0]->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(1,(int)e[1]->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(1,(int)e[2]->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(1,(int)e[3]->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected2_0,expected2_0+1,e[0]->begin()));
   CPPUNIT_ASSERT(std::equal(expected2_1,expected2_1+2,e[1]->begin()));
   CPPUNIT_ASSERT(std::equal(expected2_2,expected2_2+2,e[2]->begin()));
@@ -1697,11 +1698,11 @@ void MEDCouplingBasicsTest5::testDAIPartitionByDifferentValues1()
 
 void MEDCouplingBasicsTest5::testDAICheckMonotonic1()
 {
-  const int data1[6]={-1,0,2,2,4,5};
-  const int data2[6]={6,2,0,-8,-9,-56};
-  const int data3[6]={-1,0,3,2,4,6};
-  const int data4[6]={7,5,2,3,0,-6};
-  DataArrayInt *d=DataArrayInt::New();
+  const mcIdType data1[6]={-1,0,2,2,4,5};
+  const mcIdType data2[6]={6,2,0,-8,-9,-56};
+  const mcIdType data3[6]={-1,0,3,2,4,6};
+  const mcIdType data4[6]={7,5,2,3,0,-6};
+  DataArrayIdType *d=DataArrayIdType::New();
   d->useArray(data1,false,DeallocType::CPP_DEALLOC,6,1);
   CPPUNIT_ASSERT(d->isMonotonic(true));
   CPPUNIT_ASSERT(!d->isMonotonic(false));
@@ -1742,11 +1743,11 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp6()
   const double coordsData[16]={2.7554552980815448e-15,45,-45,5.5109105961630896e-15,-31.819805153394636,31.81980515339464,2.8779199779962799e-15,47,2.8166876380389124e-15,46,-47,5.7558399559925599e-15,-33.234018715767732,33.234018715767739,-46,5.6333752760778247e-15};
   coords->useArray(coordsData,false,DeallocType::CPP_DEALLOC,8,2);
   // connectivity
-  DataArrayInt *conn=DataArrayInt::New();
-  const int connData[9]={8,0,3,5,1,4,6,7,2};
+  DataArrayIdType *conn=DataArrayIdType::New();
+  const mcIdType connData[9]={8,0,3,5,1,4,6,7,2};
   conn->useArray(connData,false,DeallocType::CPP_DEALLOC,9,1);
-  DataArrayInt *connI=DataArrayInt::New();
-  const int connIData[2]={0,9};
+  DataArrayIdType *connI=DataArrayIdType::New();
+  const mcIdType connIData[2]={0,9};
   connI->useArray(connIData,false,DeallocType::CPP_DEALLOC,2,1);
   MEDCouplingUMesh *m1=MEDCouplingUMesh::New("Fixe",2);
   m1->setCoords(coords);
@@ -1757,11 +1758,11 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp6()
   const double coordsData2[26]={-7.3800475508445391,41.854329503018846,-3.7041190667754655,42.338274668899189,-3.7041190667754655,45.338274668899189,-7.3800475508445382,44.854329503018839,-5.5473631693521845,42.136406608386956,-3.7041190667754655,43.838274668899189,-5.5420833088100014,45.09630208595901,-7.3800475508445382,43.354329503018839,-3.7041190667754651,52.338274668899189,-7.3800475508445382,51.854329503018839,-3.7041190667754655,48.838274668899189,-5.5420833088100014,52.09630208595901,-7.3800475508445382,48.354329503018839};
   coords->useArray(coordsData2,false,DeallocType::CPP_DEALLOC,13,2);
   // connectivity
-  conn=DataArrayInt::New();
-  const int connData2[18]={8,0,1,2,3,4,5,6,7,8,3,2,8,9,6,10,11,12};
+  conn=DataArrayIdType::New();
+  const mcIdType connData2[18]={8,0,1,2,3,4,5,6,7,8,3,2,8,9,6,10,11,12};
   conn->useArray(connData2,false,DeallocType::CPP_DEALLOC,18,1);
-  connI=DataArrayInt::New();
-  const int connIData2[3]={0,9,18};
+  connI=DataArrayIdType::New();
+  const mcIdType connIData2[3]={0,9,18};
   connI->useArray(connIData2,false,DeallocType::CPP_DEALLOC,3,1);
   //
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New("Mobile",2);
@@ -1769,18 +1770,18 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp6()
   m2->setConnectivity(conn,connI,true);
   coords->decrRef(); conn->decrRef(); connI->decrRef();
   //
-  DataArrayInt *d1=0,*d2=0;
+  DataArrayIdType *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2);
   CPPUNIT_ASSERT_EQUAL(4,(int)m3->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(4,(int)d1->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(4,(int)d2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(43,m3->getNumberOfNodes());
 CPPUNIT_ASSERT_EQUAL(4,(int)d1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(4,(int)d2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(43,(int)m3->getNumberOfNodes());
   bool areMerged=false;
-  int newNbOfNodes=-1;
+  mcIdType newNbOfNodes=-1;
   m3->mergeNodes(1e-12,areMerged,newNbOfNodes)->decrRef();
-  CPPUNIT_ASSERT_EQUAL(35,m3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(35,(int)m3->getNumberOfNodes());
   m3->zipCoords();
-  CPPUNIT_ASSERT_EQUAL(23,m3->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(23,(int)m3->getNumberOfNodes());
   //
   MEDCouplingFieldDouble *f=m3->getMeasureField(true);
   const double *vals=f->getArray()->getConstPointer();
@@ -1804,11 +1805,11 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp7()
   const double coordsData1[16]={0.5328427124746189, -0.08284271247461905, -0.03284271247461901, 0.4828427124746191, -0.03284271247461906, -0.082842712474619, 0.5328427124746191, 0.482842712474619};
   coords1->useArray(coordsData1,false,DeallocType::CPP_DEALLOC,8,2);
   // connectivity
-  DataArrayInt *conn1=DataArrayInt::New();
-  const int connData1[5]={INTERP_KERNEL::NORM_QPOLYG,0,1,2,3};
+  DataArrayIdType *conn1=DataArrayIdType::New();
+  const mcIdType connData1[5]={INTERP_KERNEL::NORM_QPOLYG,0,1,2,3};
   conn1->useArray(connData1,false,DeallocType::CPP_DEALLOC,5,1);
-  DataArrayInt *connI1=DataArrayInt::New();
-  const int connIData1[2]={0,5};
+  DataArrayIdType *connI1=DataArrayIdType::New();
+  const mcIdType connIData1[2]={0,5};
   connI1->useArray(connIData1,false,DeallocType::CPP_DEALLOC,2,1);
   MEDCouplingUMesh *m1=MEDCouplingUMesh::New("circle",2);
   m1->setCoords(coords1);
@@ -1820,18 +1821,18 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp7()
   const double coordsData2[8]={-0.5,-0.5,   -0.5, 0.5, 0.5, 0.5,    0.5,-0.5};
   coords2->useArray(coordsData2,false,DeallocType::CPP_DEALLOC,4,2);
   // connectivity
-  DataArrayInt *conn2=DataArrayInt::New();
-  const int connData2[5]={INTERP_KERNEL::NORM_POLYGON, 0,1,2,3};
+  DataArrayIdType *conn2=DataArrayIdType::New();
+  const mcIdType connData2[5]={INTERP_KERNEL::NORM_POLYGON, 0,1,2,3};
   conn2->useArray(connData2,false,DeallocType::CPP_DEALLOC,5,1);
-  DataArrayInt *connI2=DataArrayInt::New();
-  const int connIData2[2]={0,5};
+  DataArrayIdType *connI2=DataArrayIdType::New();
+  const mcIdType connIData2[2]={0,5};
   connI2->useArray(connIData2,false,DeallocType::CPP_DEALLOC,2,1);
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New("square",2);
   m2->setCoords(coords2);
   m2->setConnectivity(conn2,connI2,true);
   coords2->decrRef(); conn2->decrRef(); connI2->decrRef();
 
-  DataArrayInt * resToM1 = 0, * resToM2 = 0;
+  DataArrayIdType * resToM1 = 0, * resToM2 = 0;
   MEDCouplingUMesh *m_intersec=MEDCouplingUMesh::Intersect2DMeshes(m2, m1, eps, resToM1, resToM2);
   m_intersec->zipCoords();
 
@@ -1839,10 +1840,10 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp7()
     -0.014575131106459124, 0.5000000000000001, 0.5, -0.11224989991991996, 0.24271243444677046, 0.5, 0.5, 0.19387505004004, \
     -0.04799910280454185, -0.06682678787499614, -0.023843325638122054, 0.4915644577163915, 0.5, -0.30612494995996, 0.0, -0.5,\
     -0.5, 0.0, -0.25728756555322957, 0.5, -0.023843325638122026, 0.49156445771639157, -0.04799910280454181, -0.06682678787499613};
-  const int conn_tgt[22]={32, 5, 2, 6, 4, 7, 8, 9, 10, 32, 6, 3, 0, 1, 5, 4, 11, 12, 13, 14, 15, 16};
-  const int connI_tgt[3]={0, 9, 22};
-  const int res1_tgt[2] = {0, 0};
-  const int res2_tgt[2] = {0, -1};
+  const mcIdType conn_tgt[22]={32, 5, 2, 6, 4, 7, 8, 9, 10, 32, 6, 3, 0, 1, 5, 4, 11, 12, 13, 14, 15, 16};
+  const mcIdType connI_tgt[3]={0, 9, 22};
+  const mcIdType res1_tgt[2] = {0, 0};
+  const mcIdType res2_tgt[2] = {0, -1};
 
   CPPUNIT_ASSERT(std::equal(conn_tgt,conn_tgt+22,m_intersec->getNodalConnectivity()->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(connI_tgt,connI_tgt+3,m_intersec->getNodalConnectivityIndex()->getConstPointer()));
@@ -1856,26 +1857,26 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp7()
 
 void MEDCouplingBasicsTest5::testDAIBuildSubstractionOptimized1()
 {
-  const int tab1[7]={1,3,5,6,7,9,13};
-  const int tab2[3]={3,5,9};
-  const int tab3[3]={1,3,5};
-  DataArrayInt *da1=DataArrayInt::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,7,1);
-  DataArrayInt *da2=DataArrayInt::New(); da2->useArray(tab2,false,DeallocType::CPP_DEALLOC,3,1);
-  DataArrayInt *da3=DataArrayInt::New(); da3->useArray(tab3,false,DeallocType::CPP_DEALLOC,3,1);
-  DataArrayInt *da4=DataArrayInt::New(); da4->useArray(tab1,false,DeallocType::CPP_DEALLOC,7,1);
-  //
-  DataArrayInt *a=0;
+  const mcIdType tab1[7]={1,3,5,6,7,9,13};
+  const mcIdType tab2[3]={3,5,9};
+  const mcIdType tab3[3]={1,3,5};
+  DataArrayIdType *da1=DataArrayIdType::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,7,1);
+  DataArrayIdType *da2=DataArrayIdType::New(); da2->useArray(tab2,false,DeallocType::CPP_DEALLOC,3,1);
+  DataArrayIdType *da3=DataArrayIdType::New(); da3->useArray(tab3,false,DeallocType::CPP_DEALLOC,3,1);
+  DataArrayIdType *da4=DataArrayIdType::New(); da4->useArray(tab1,false,DeallocType::CPP_DEALLOC,7,1);
+  //
+  DataArrayIdType *a=0;
   a=da1->buildSubstractionOptimized(da2);
  CPPUNIT_ASSERT_EQUAL(4,(int)a->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents());
-  const int expected1_0[4]={1,6,7,13};
+  const mcIdType expected1_0[4]={1,6,7,13};
   CPPUNIT_ASSERT(std::equal(expected1_0,expected1_0+4,a->begin()));
   a->decrRef();
   //
   a=da1->buildSubstractionOptimized(da3);
  CPPUNIT_ASSERT_EQUAL(4,(int)a->getNumberOfTuples());
  CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents());
-  const int expected2_0[4]={6,7,9,13};
+  const mcIdType expected2_0[4]={6,7,9,13};
   CPPUNIT_ASSERT(std::equal(expected2_0,expected2_0+4,a->begin()));
   a->decrRef();
   //
@@ -1892,8 +1893,8 @@ void MEDCouplingBasicsTest5::testDAIBuildSubstractionOptimized1()
 
 void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
 {
-  const int tab1[7]={1,3,5,6,7,9,13};
-  DataArrayInt *da1=DataArrayInt::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,7,1);
+  const mcIdType tab1[7]={1,3,5,6,7,9,13};
+  DataArrayIdType *da1=DataArrayIdType::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,7,1);
   CPPUNIT_ASSERT(da1->isStrictlyMonotonic(true));
   da1->checkStrictlyMonotonic(true);
   CPPUNIT_ASSERT(da1->isMonotonic(true));
@@ -1904,8 +1905,8 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
   CPPUNIT_ASSERT_THROW(da1->checkMonotonic(false),INTERP_KERNEL::Exception);
   da1->decrRef();
   //
-  int tab2[7]={1,3,5,6,6,9,13};
-  da1=DataArrayInt::New(); da1->useArray(tab2,false,DeallocType::CPP_DEALLOC,7,1);
+  mcIdType tab2[7]={1,3,5,6,6,9,13};
+  da1=DataArrayIdType::New(); da1->useArray(tab2,false,DeallocType::CPP_DEALLOC,7,1);
   CPPUNIT_ASSERT(!da1->isStrictlyMonotonic(true));
   CPPUNIT_ASSERT_THROW(da1->checkStrictlyMonotonic(true),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT(da1->isMonotonic(true));
@@ -1916,8 +1917,8 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
   CPPUNIT_ASSERT_THROW(da1->checkMonotonic(false),INTERP_KERNEL::Exception);
   da1->decrRef();
   //
-  const int tab3[7]={1,3,5,6,5,9,13};
-  da1=DataArrayInt::New(); da1->useArray(tab3,false,DeallocType::CPP_DEALLOC,7,1);
+  const mcIdType tab3[7]={1,3,5,6,5,9,13};
+  da1=DataArrayIdType::New(); da1->useArray(tab3,false,DeallocType::CPP_DEALLOC,7,1);
   CPPUNIT_ASSERT(!da1->isStrictlyMonotonic(true));
   CPPUNIT_ASSERT_THROW(da1->checkStrictlyMonotonic(true),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT(!da1->isMonotonic(true));
@@ -1928,8 +1929,8 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
   CPPUNIT_ASSERT_THROW(da1->checkMonotonic(false),INTERP_KERNEL::Exception);
   da1->decrRef();
   //
-  const int tab4[7]={13,9,7,6,5,3,1};
-  da1=DataArrayInt::New(); da1->useArray(tab4,false,DeallocType::CPP_DEALLOC,7,1);
+  const mcIdType tab4[7]={13,9,7,6,5,3,1};
+  da1=DataArrayIdType::New(); da1->useArray(tab4,false,DeallocType::CPP_DEALLOC,7,1);
   CPPUNIT_ASSERT(!da1->isStrictlyMonotonic(true));
   CPPUNIT_ASSERT_THROW(da1->checkStrictlyMonotonic(true),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT(!da1->isMonotonic(true));
@@ -1940,8 +1941,8 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
   da1->checkMonotonic(false);
   da1->decrRef();
   //
-  const int tab5[7]={13,9,6,6,5,3,1};
-  da1=DataArrayInt::New(); da1->useArray(tab5,false,DeallocType::CPP_DEALLOC,7,1);
+  const mcIdType tab5[7]={13,9,6,6,5,3,1};
+  da1=DataArrayIdType::New(); da1->useArray(tab5,false,DeallocType::CPP_DEALLOC,7,1);
   CPPUNIT_ASSERT(!da1->isStrictlyMonotonic(true));
   CPPUNIT_ASSERT_THROW(da1->checkStrictlyMonotonic(true),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT(!da1->isMonotonic(true));
@@ -1952,8 +1953,8 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
   da1->checkMonotonic(false);
   da1->decrRef();
   //
-  const int tab6[7]={13,9,5,6,5,3,1};
-  da1=DataArrayInt::New(); da1->useArray(tab6,false,DeallocType::CPP_DEALLOC,7,1);
+  const mcIdType tab6[7]={13,9,5,6,5,3,1};
+  da1=DataArrayIdType::New(); da1->useArray(tab6,false,DeallocType::CPP_DEALLOC,7,1);
   CPPUNIT_ASSERT(!da1->isStrictlyMonotonic(true));
   CPPUNIT_ASSERT_THROW(da1->checkStrictlyMonotonic(true),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT(!da1->isMonotonic(true));
@@ -1964,7 +1965,7 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
   CPPUNIT_ASSERT_THROW(da1->checkMonotonic(false),INTERP_KERNEL::Exception);
   da1->decrRef();
   //
-  da1=DataArrayInt::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,0,1);
+  da1=DataArrayIdType::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,0,1);
   CPPUNIT_ASSERT(da1->isStrictlyMonotonic(true));
   da1->checkStrictlyMonotonic(true);
   CPPUNIT_ASSERT(da1->isMonotonic(true));
@@ -1975,7 +1976,7 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
   da1->checkMonotonic(false);
   da1->decrRef();
   //
-  da1=DataArrayInt::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,1,1);
+  da1=DataArrayIdType::New(); da1->useArray(tab1,false,DeallocType::CPP_DEALLOC,1,1);
   CPPUNIT_ASSERT(da1->isStrictlyMonotonic(true));
   da1->checkStrictlyMonotonic(true);
   CPPUNIT_ASSERT(da1->isMonotonic(true));
@@ -1989,7 +1990,7 @@ void MEDCouplingBasicsTest5::testDAIIsStrictlyMonotonic1()
 
 void MEDCouplingBasicsTest5::testSimplexize3()
 {
-  const int conn[24]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23};
+  const mcIdType conn[24]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23};
   MEDCouplingUMesh *m=MEDCouplingUMesh::New("toto",3);
   m->allocateCells(0);
   m->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,conn+0);
@@ -2004,7 +2005,7 @@ void MEDCouplingBasicsTest5::testSimplexize3()
   m->checkConsistency();
   //
   MEDCouplingUMesh *m1=static_cast<MEDCouplingUMesh *>(m->deepCopy());
-  DataArrayInt *d1=m1->simplexize(INTERP_KERNEL::PLANAR_FACE_5);
+  DataArrayIdType *d1=m1->simplexize(INTERP_KERNEL::PLANAR_FACE_5);
   m1->checkConsistency();
   MEDCouplingFieldDouble *f1=m1->getMeasureField(ON_CELLS);
   const double vol1Expected[12]={1./6, 1./6, 1./6,1./6, 1./6, 1./3,1./6, 1./6, 1./6, 1./6, 1./3, 1./6};
@@ -2012,9 +2013,9 @@ void MEDCouplingBasicsTest5::testSimplexize3()
   CPPUNIT_ASSERT_EQUAL(12,(int)f1->getArray()->getNumberOfTuples());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(vol1Expected[i],f1->getIJ(i,0),1e-12);
-  const int connExpected1[60]={14,0,1,2,3,14,4,9,5,6,14,4,8,9,11,14,4,7,11,6,14,9,11,10,6,14,4,9,6,11,14,12,17,13,14,14,12,16,17,19,14,12,15,19,14,14,17,19,18,14,14,12,17,14,19,14,20,21,22,23};
-  const int connIExpected1[13]={0,5,10,15,20,25,30,35,40,45,50,55,60};
-  const int n2o1[12]={0,1,1,1,1,1,2,2,2,2,2,3};
+  const mcIdType connExpected1[60]={14,0,1,2,3,14,4,9,5,6,14,4,8,9,11,14,4,7,11,6,14,9,11,10,6,14,4,9,6,11,14,12,17,13,14,14,12,16,17,19,14,12,15,19,14,14,17,19,18,14,14,12,17,14,19,14,20,21,22,23};
+  const mcIdType connIExpected1[13]={0,5,10,15,20,25,30,35,40,45,50,55,60};
+  const mcIdType n2o1[12]={0,1,1,1,1,1,2,2,2,2,2,3};
   CPPUNIT_ASSERT_EQUAL(1,(int)m1->getNodalConnectivity()->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(60,(int)m1->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)m1->getNodalConnectivityIndex()->getNumberOfComponents());
@@ -2029,7 +2030,7 @@ void MEDCouplingBasicsTest5::testSimplexize3()
   d1->decrRef();
   //
   MEDCouplingUMesh *m2=static_cast<MEDCouplingUMesh *>(m->deepCopy());
-  DataArrayInt *d2=m2->simplexize(INTERP_KERNEL::PLANAR_FACE_6);
+  DataArrayIdType *d2=m2->simplexize(INTERP_KERNEL::PLANAR_FACE_6);
   m2->checkConsistency();
   MEDCouplingFieldDouble *f2=m2->getMeasureField(ON_CELLS);
   const double vol2Expected[14]={1./6, 1./6, 1./6,1./6, 1./6, 1./6,1./6,1./6, 1./6, 1./6, 1./6, 1./6,1./6,1./6};
@@ -2037,9 +2038,9 @@ void MEDCouplingBasicsTest5::testSimplexize3()
   CPPUNIT_ASSERT_EQUAL(14,(int)f2->getArray()->getNumberOfTuples());
   for(int i=0;i<14;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(vol2Expected[i],f2->getIJ(i,0),1e-12);
-  const int connExpected2[70]={14,0,1,2,3,14,4,9,5,10,14,4,5,6,10,14,4,8,9,10,14,4,11,8,10,14,4,6,7,10,14,4,7,11,10,14,12,17,13,18,14,12,13,14,18,14,12,16,17,18,14,12,19,16,18,14,12,14,15,18,14,12,15,19,18,14,20,21,22,23};
-  const int connIExpected2[15]={0,5,10,15,20,25,30,35,40,45,50,55,60,65,70};
-  const int n2o2[14]={0,1,1,1,1,1,1,2,2,2,2,2,2,3};
+  const mcIdType connExpected2[70]={14,0,1,2,3,14,4,9,5,10,14,4,5,6,10,14,4,8,9,10,14,4,11,8,10,14,4,6,7,10,14,4,7,11,10,14,12,17,13,18,14,12,13,14,18,14,12,16,17,18,14,12,19,16,18,14,12,14,15,18,14,12,15,19,18,14,20,21,22,23};
+  const mcIdType connIExpected2[15]={0,5,10,15,20,25,30,35,40,45,50,55,60,65,70};
+  const mcIdType n2o2[14]={0,1,1,1,1,1,1,2,2,2,2,2,2,3};
   CPPUNIT_ASSERT_EQUAL(1,(int)m2->getNodalConnectivity()->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(70,(int)m2->getNodalConnectivity()->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)m2->getNodalConnectivityIndex()->getNumberOfComponents());
index 52ee9b15e53dbc9bc8691c0e4349012a3f1c4eb9..756736d00087e2b67db916a31c2946d068f3d6d9 100644 (file)
@@ -18,7 +18,7 @@
 //
 // Author : Anthony Geay (CEA/DEN)
 
-int connITT[201]={0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1029, 1058, 1087, 1116, 1145, 1174, 1203,
+mcIdType connITT[201]={0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1029, 1058, 1087, 1116, 1145, 1174, 1203,
                     1232, 1261, 1290, 1319, 1348, 1377, 1406, 1435, 1464, 1493, 1522, 1551, 1580, 1609, 1638, 1667, 1696, 1725, 1754, 1783, 1812, 1841, 1870, 1899,
                     1928, 1957, 1986, 2015, 2044, 2073, 2102, 2131, 2160, 2189, 2218, 2247, 2276, 2305, 2334, 2363, 2392, 2421, 2450, 2479, 2508, 2537, 2566, 2595,
                     2624, 2653, 2682, 2711, 2740, 2769, 2798, 2827, 2856, 2885, 2914, 2943, 2972, 3001, 3030, 3059, 3088, 3117, 3146, 3175, 3204, 3233, 3262, 3291,
@@ -27,7 +27,7 @@ int connITT[201]={0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600,
                     4712, 4741, 4770, 4799, 4828, 4857, 4886, 4915, 4944, 4973, 5002, 5031, 5060, 5089, 5118, 5147, 5176, 5205, 5234, 5263, 5292, 5321, 5350, 5379,
                     5408, 5437, 5466, 5495, 5524, 5553, 5582, 5611, 5640, 5669, 5698, 5727, 5756, 5785, 5814, 5843, 5872, 5901, 5930, 5959, 5988, 6017, 6046, 6075,
                     6104, 6133, 6162, 6191, 6220};
-  int connTT[6220]={0, 1, 2, 3, 4, 5, 6, -1, 0, 7, 8, 1, -1, 1, 8, 9, 2, -1, 2, 9, 10, 3, -1, 3, 10, 11, 4, -1, 4, 11, 12, 5, -1, 5, 12, 13, 6, -1, 6, 13, 7, 0, -1, 7, 13, 12, 11, 10, 9, 8, 14, 15, 16, 17, 18, 19,
+  mcIdType connTT[6220]={0, 1, 2, 3, 4, 5, 6, -1, 0, 7, 8, 1, -1, 1, 8, 9, 2, -1, 2, 9, 10, 3, -1, 3, 10, 11, 4, -1, 4, 11, 12, 5, -1, 5, 12, 13, 6, -1, 6, 13, 7, 0, -1, 7, 13, 12, 11, 10, 9, 8, 14, 15, 16, 17, 18, 19,
                     20, -1, 14, 21, 22, 15, -1, 15, 22, 23, 16, -1, 16, 23, 24, 17, -1, 17, 24, 25, 18, -1, 18, 25, 26, 19, -1, 19, 26, 27, 20, -1, 20, 27, 21, 14, -1, 21, 27, 26, 25, 24, 23, 22, 28, 29, 30, 31, 32,
                     33, 34, -1, 28, 35, 36, 29, -1, 29, 36, 37, 30, -1, 30, 37, 38, 31, -1, 31, 38, 39, 32, -1, 32, 39, 40, 33, -1, 33, 40, 41, 34, -1, 34, 41, 35, 28, -1, 35, 41, 40, 39, 38, 37, 36, 42, 43, 44, 45,
                     46, 47, 48, -1, 42, 49, 50, 43, -1, 43, 50, 51, 44, -1, 44, 51, 52, 45, -1, 45, 52, 53, 46, -1, 46, 53, 54, 47, -1, 47, 54, 55, 48, -1, 48, 55, 49, 42, -1, 49, 55, 54, 53, 52, 51, 50, 56, 57, 58,
@@ -906,7 +906,7 @@ double coordsTT[5160]={
   };
 
 
-const int connTFH8[2560]={
+const mcIdType connTFH8[2560]={
   1, 2, 7, 6, 28, 29, 34, 33, 2, 3, 8, 7, 29, 30, 35, 34, 3, 4, 9, 8, 30, 31, 36, 35, 4, 5, 10, 9, 31, 32, 37, 36, 6, 7, 12, 11, 33, 34, 39, 38, 7, 8, 13, 12, 34, 35, 40, 39,
   8, 9, 14, 13, 35, 36, 41, 40, 9, 10, 15, 14, 36, 37, 42, 41, 11, 12, 17, 16, 38, 39, 44, 43, 12, 13, 18, 17, 39, 40, 45, 44, 13, 14, 19, 18, 40, 41, 46, 45, 14, 15, 20, 19,
   41, 42, 47, 46, 16, 17, 21, 26, 43, 44, 48, 53, 17, 18, 22, 21, 44, 45, 49, 48, 18, 19, 23, 22, 45, 46, 50, 49, 19, 20, 24, 23, 46, 47, 51, 50, 28, 29, 34, 33, 55, 56, 61, 60,
@@ -966,7 +966,7 @@ const int connTFH8[2560]={
   526, 531, 530, 552, 553, 558, 557, 526, 527, 532, 531, 553, 554, 559, 558, 527, 528, 533, 532, 554, 555, 560, 559, 529, 530, 534, 539, 556, 557, 561, 566, 530, 531, 535, 534, 557, 558, 562, 561, 531, 532, 536, 535, 558, 559, 563,
   562, 532, 533, 537, 536, 559, 560, 564, 563};
 
-const int connTFPOLH[1000]={
+const mcIdType connTFPOLH[1000]={
   0, 25, 26, 16, 11, 6, 1, -1, 27, 28, 33, 38, 43, 53, 52, -1, 0, 1, 28, 27, -1, 1, 6, 33, 28, -1, 6, 11, 38, 33, -1, 11, 16, 43, 38, -1, 16, 26, 53, 43, -1, 26, 25, 52, 53, -1, 25, 0, 27, 52, 27, 52, 53, 43, 38, 33, 28, -1, 54, 55,
   60, 65, 70, 80, 79, -1, 27, 28, 55, 54, -1, 28, 33, 60, 55, -1, 33, 38, 65, 60, -1, 38, 43, 70, 65, -1, 43, 53, 80, 70, -1, 53, 52, 79, 80, -1, 52, 27, 54, 79, 54, 79, 80, 70, 65, 60, 55, -1, 81, 82, 87, 92, 97, 107, 106, -1, 54,
   55, 82, 81, -1, 55, 60, 87, 82, -1, 60, 65, 92, 87, -1, 65, 70, 97, 92, -1, 70, 80, 107, 97, -1, 80, 79, 106, 107, -1, 79, 54, 81, 106, 81, 106, 107, 97, 92, 87, 82, -1, 108, 109, 114, 119, 124, 134, 133, -1, 81, 82, 109, 108, -1,
@@ -1164,4 +1164,4 @@ const double coordsTF[1701]={
   4.2729999999999997, 0, 0.21606, 4.2729999999999997, 0.21606, 0.21606, 4.2729999999999997
 };
 
-const int connTFPOLH_I[21]={0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000};
+const mcIdType connTFPOLH_I[21]={0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000};
index cc96fe9a6ea990b43ce9181b5657a442eaf3408d..3c5e3c858441f4684c04178c12e0ee71ee3e7591 100644 (file)
@@ -41,7 +41,7 @@
 
 using namespace MEDCoupling;
 
-typedef std::vector<std::map<int,double> > IntersectionMatrix;
+typedef std::vector<std::map<mcIdType,double> > IntersectionMatrix;
 
 void MEDCouplingBasicsTestInterp::test2DInterpP0P0_1()
 {
@@ -51,7 +51,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P0_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[3]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Convex, INTERP_KERNEL::Geometric2D};
   for(int i=0;i<3;i++)
     {
@@ -82,7 +82,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P0PL_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   //
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -105,15 +105,15 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P0PL_2()
   MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   //
-  std::vector<int> cellsIds(targetMesh->getNumberOfCells());
-  for(int i=0;i<targetMesh->getNumberOfCells();i++)
+  std::vector<mcIdType> cellsIds(targetMesh->getNumberOfCells());
+  for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
   //
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   //
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -136,15 +136,15 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P0PL_3()
   MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   //
-  std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
-  for(int i=0;i<sourceMesh->getNumberOfCells();i++)
+  std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
+  for(mcIdType i=0;i<sourceMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
   //
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   //
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -167,19 +167,19 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P0PL_4()
   MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   //
-  std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
-  for(int i=0;i<sourceMesh->getNumberOfCells();i++)
+  std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
+  for(mcIdType i=0;i<sourceMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
   cellsIds.resize(targetMesh->getNumberOfCells());
-  for(int i=0;i<targetMesh->getNumberOfCells();i++)
+  for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
   //
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   //
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -205,7 +205,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P1_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
   for(int i=0;i<2;i++)
     {
@@ -241,7 +241,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P1PL_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
@@ -270,20 +270,20 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0P1PL_2()
   MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   //
-  std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
-  for(int i=0;i<sourceMesh->getNumberOfCells();i++)
+  std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
+  for(mcIdType i=0;i<sourceMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
   //
   cellsIds.resize(targetMesh->getNumberOfCells());
-  for(int i=0;i<targetMesh->getNumberOfCells();i++)
+  for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
   //
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
@@ -315,9 +315,9 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1P0_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
-  for(int i=0;i<2;i++)
+  for(mcIdType i=0;i<2;i++)
     {
       myInterpolator.setPrecision(1e-12);
       myInterpolator.setIntersectionType(types[i]);
@@ -348,7 +348,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1P0PL_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
@@ -382,15 +382,15 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1P0PL_2()
   MEDCouplingUMesh *sourceMesh=build2DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   //
-  std::vector<int >cellsIds(targetMesh->getNumberOfCells());
-  for(int i=0;i<targetMesh->getNumberOfCells();i++)
+  std::vector<mcIdType >cellsIds(targetMesh->getNumberOfCells());
+  for(mcIdType i=0;i<targetMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
   //
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
@@ -427,7 +427,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1P1_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
   for(int i=0;i<2;i++)
     {
@@ -466,7 +466,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1P1PL_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
@@ -500,7 +500,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P0_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[3]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
   for(int i=0;i<2;i++)
     {
@@ -531,7 +531,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P0PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -558,7 +558,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P1_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
   for(int i=0;i<2;i++)
     {
@@ -594,7 +594,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P1PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
@@ -626,7 +626,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP1P0_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
   for(int i=0;i<2;i++)
     {
@@ -659,7 +659,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP1P0PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
@@ -696,7 +696,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP1P1_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Triangulation, INTERP_KERNEL::Geometric2D};
   for(int i=0;i<2;i++)
     {
@@ -735,7 +735,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP1P1PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
@@ -769,7 +769,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P0_2()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::Triangulation);
   {
@@ -832,7 +832,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P0_2()
 void MEDCouplingBasicsTestInterp::test3DSurfInterpP0P0_3()
 {
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   double vecTrans[3]={0.,0.,1.e-10};
   double vec[3]={0.,-1.,0.};
   double pt[3]={-0.3,-0.3,5.e-11};
@@ -927,7 +927,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
   for ( int i = 0; i < 4; ++i )
@@ -995,7 +995,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
@@ -1037,7 +1037,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0PL_2()
 {
   MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
-  std::vector<int> cellsIds(targetMesh->getNumberOfCells());
+  std::vector<mcIdType> cellsIds(targetMesh->getNumberOfCells());
   for(int i=0;i<targetMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   targetMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
@@ -1045,7 +1045,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0PL_2()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
@@ -1087,7 +1087,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0PL_3()
 {
   MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
-  std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
+  std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
   for(int i=0;i<sourceMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
@@ -1095,7 +1095,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0PL_3()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
@@ -1137,7 +1137,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0PL_4()
 {
   MEDCouplingUMesh *sourceMesh=build3DSourceMesh_1();
   MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
-  std::vector<int> cellsIds(sourceMesh->getNumberOfCells());
+  std::vector<mcIdType> cellsIds(sourceMesh->getNumberOfCells());
   for(int i=0;i<sourceMesh->getNumberOfCells();i++)
     cellsIds[i]=i;
   sourceMesh->convertToPolyTypes(&cellsIds[0],&cellsIds[0]+cellsIds.size());
@@ -1149,7 +1149,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0PL_4()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
@@ -1195,7 +1195,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P1_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
   for ( int i = 0; i < 4; ++i )
@@ -1251,7 +1251,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P1PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
@@ -1285,7 +1285,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P0_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
   for ( int i = 0; i < 4; ++i )
@@ -1341,7 +1341,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P0PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   INTERP_KERNEL::SplittingPolicy sp[] = { INTERP_KERNEL::PLANAR_FACE_5, INTERP_KERNEL::PLANAR_FACE_6, INTERP_KERNEL::GENERAL_24, INTERP_KERNEL::GENERAL_48 };
@@ -1389,7 +1389,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P1_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
   CPPUNIT_ASSERT_EQUAL(8,(int)res.size());
@@ -1404,12 +1404,12 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P1_1()
   int i=0;
   double sum = 0;
   //cout.precision(18);
-  for(std::vector<std::map<int,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
     {
       //cout<< "res3D[" <<i<< "][]={";
       for(int j=0;j<28;j++)
         {
-          std::map<int,double>::const_iterator iter2=(*iter1).find(j);
+          std::map<mcIdType,double>::const_iterator iter2=(*iter1).find(j);
           if(iter2!=(*iter1).end())
             {
               //cout<< iter2->second<< ", ";
@@ -1439,7 +1439,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P1PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
@@ -1479,7 +1479,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0P0Empty()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
   //clean up
@@ -1512,7 +1512,7 @@ void MEDCouplingBasicsTestInterp::testInterpolationCC()
   CPPUNIT_ASSERT_THROW( sourceWrapper.nbCellsAlongAxis(3), INTERP_KERNEL::Exception);
 
   INTERP_KERNEL::InterpolationCC myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
 
   CPPUNIT_ASSERT_EQUAL(8,int( res.size()));
@@ -1521,7 +1521,7 @@ void MEDCouplingBasicsTestInterp::testInterpolationCC()
   std::set<double> vals;
   double sum = 0;
   for ( int i = 0; i < (int)res.size(); ++i )
-    for ( std::map<int,double>::iterator s_v = res[i].begin(); s_v != res[i].end(); ++s_v)
+    for ( std::map<mcIdType,double>::iterator s_v = res[i].begin(); s_v != res[i].end(); ++s_v)
       {
         sum += s_v->second;
         double vvv;
@@ -1568,7 +1568,7 @@ void MEDCouplingBasicsTestInterp::testInterpolationCU1D()
   MEDCouplingNormalizedCartesianMesh<1>      sourceWrapper(meshC);
   MEDCouplingNormalizedUnstructuredMesh<1,1> targetWrapper(meshU);
   INTERP_KERNEL::InterpolationCU myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   const double precis = 1e-13;
   myInterpolator.setPrecision(precis);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -1606,7 +1606,7 @@ void MEDCouplingBasicsTestInterp::testInterpolationCU2D()
   MEDCouplingNormalizedCartesianMesh<2>      sourceWrapper(meshC);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(meshU);
   INTERP_KERNEL::InterpolationCU myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
 
@@ -1675,7 +1675,7 @@ void MEDCouplingBasicsTestInterp::testInterpolationCU3D()
   MEDCouplingNormalizedCartesianMesh<3>      sourceWrapper(meshC);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(meshU);
   INTERP_KERNEL::InterpolationCU myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   const double precis = 1e-13;
   myInterpolator.setPrecision(precis);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -1759,8 +1759,8 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0IntegralUniform()
   //
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
-  CPPUNIT_ASSERT_EQUAL(5,myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
+  std::vector<std::map<mcIdType,double> > res;
+  CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][1],1e-12);
@@ -1769,7 +1769,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0IntegralUniform()
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][4],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(1.,sumAll(res),1e-12);
   res.clear();
-  CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
+  CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(5,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[1][0],1e-12);
@@ -1784,7 +1784,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0IntegralUniform()
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper2(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator2;
   CPPUNIT_ASSERT(myInterpolator2.getMeasureAbsStatus());
-  CPPUNIT_ASSERT_EQUAL(5,myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
+  CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,res[0][1],1e-12);
@@ -1795,7 +1795,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP0IntegralUniform()
   res.clear();
   myInterpolator2.setMeasureAbsStatus(false);
   CPPUNIT_ASSERT(!myInterpolator2.getMeasureAbsStatus());
-  CPPUNIT_ASSERT_EQUAL(5,myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
+  CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator2.toIntegralUniform(targetWrapper2,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.125,res[0][1],1e-12);
@@ -1811,8 +1811,8 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0IntegralUniform()
   MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1();
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
-  std::vector<std::map<int,double> > res;
-  CPPUNIT_ASSERT_EQUAL(5,myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
+  std::vector<std::map<mcIdType,double> > res;
+  CPPUNIT_ASSERT_EQUAL(5,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[0][1],1e-12);
@@ -1821,7 +1821,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP0IntegralUniform()
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][4],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(1.*sqrt(2.),sumAll(res),1e-12);
   res.clear();
-  CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
+  CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(5,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25*sqrt(2.),res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125*sqrt(2.),res[1][0],1e-12);
@@ -1837,8 +1837,8 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0IntegralUniform()
   MEDCouplingUMesh *targetMesh=build3DTargetMesh_1();
   INTERP_KERNEL::Interpolation3D myInterpolator;
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
-  std::vector<std::map<int,double> > res;
-  CPPUNIT_ASSERT_EQUAL(8,myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
+  std::vector<std::map<mcIdType,double> > res;
+  CPPUNIT_ASSERT_EQUAL(8,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(125000.,res[0][0],1e-6);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[0][1],1e-6);
@@ -1850,7 +1850,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP0IntegralUniform()
   CPPUNIT_ASSERT_DOUBLES_EQUAL(3375000.,res[0][7],1e-6);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6);
   res.clear();
-  CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
+  CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P0"));
   CPPUNIT_ASSERT_EQUAL(8,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(125000.,res[0][0],1e-6);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(375000.,res[1][0],1e-6);
@@ -1871,15 +1871,15 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1IntegralUniform()
   //
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
-  CPPUNIT_ASSERT_EQUAL(4,myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
+  std::vector<std::map<mcIdType,double> > res;
+  CPPUNIT_ASSERT_EQUAL(4,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
   CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[0][1],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[0][2],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][3],1e-12);
   res.clear();
-  CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
+  CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
   CPPUNIT_ASSERT_EQUAL(4,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.33333333333333331,res[0][0],1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.16666666666666666,res[1][0],1e-12);
@@ -1895,8 +1895,8 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1IntegralUniform()
   //
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(sourceMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
-  CPPUNIT_ASSERT_EQUAL(9,myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
+  std::vector<std::map<mcIdType,double> > res;
+  CPPUNIT_ASSERT_EQUAL(9,(int)myInterpolator.toIntegralUniform(targetWrapper,res,"P1"));
   CPPUNIT_ASSERT_EQUAL(1,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][0],1e-6);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][1],1e-6);
@@ -1909,7 +1909,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1IntegralUniform()
   CPPUNIT_ASSERT_DOUBLES_EQUAL(2000000.,res[0][8],1e-6);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(8000000.,sumAll(res),1e-6);
   res.clear();
-  CPPUNIT_ASSERT_EQUAL(1,myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
+  CPPUNIT_ASSERT_EQUAL(1,(int)myInterpolator.fromIntegralUniform(targetWrapper,res,"P1"));
   CPPUNIT_ASSERT_EQUAL(9,(int)res.size());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[0][0],1e-6);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(833333.333333333,res[1][0],1e-6);
@@ -1932,7 +1932,7 @@ void MEDCouplingBasicsTestInterp::test2DInterpP1P0Bary_1()
   MEDCouplingNormalizedUnstructuredMesh<2,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<2,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation2D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Barycentric,INTERP_KERNEL::BarycentricGeo2D};
   for(int i=0;i<2;i++)
     {
@@ -1973,7 +1973,7 @@ void MEDCouplingBasicsTestInterp::test3DSurfInterpP1P0Bary_1()
   MEDCouplingNormalizedUnstructuredMesh<3,2> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,2> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3DSurf myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   INTERP_KERNEL::IntersectionType types[2]={INTERP_KERNEL::Barycentric,INTERP_KERNEL::BarycentricGeo2D};
   for(int i=0;i<2;i++)
     {
@@ -2015,7 +2015,7 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P0Bary_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::Barycentric);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
@@ -2029,11 +2029,11 @@ void MEDCouplingBasicsTestInterp::test3DInterpP1P0Bary_1()
 
   double sum = 0;
   int i=0;
-  for(std::vector<std::map<int,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator iter1=res.begin();iter1!=res.end();iter1++,i++)
     {
       for(int j=0;j<28;j++)
         {
-          std::map<int,double>::const_iterator iter2=(*iter1).find(j);
+          std::map<mcIdType,double>::const_iterator iter2=(*iter1).find(j);
           if(iter2!=(*iter1).end())
             {
               sum += iter2->second;
@@ -2059,7 +2059,7 @@ void MEDCouplingBasicsTestInterp::test3DTo1DInterpP0P0PL_1()
   MEDCouplingNormalizedUnstructuredMesh<3,3> sourceWrapper(sourceMesh);
   MEDCouplingNormalizedUnstructuredMesh<3,3> targetWrapper(targetMesh);
   INTERP_KERNEL::Interpolation3D myInterpolator;
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.setPrecision(1e-12);
   myInterpolator.setIntersectionType(INTERP_KERNEL::PointLocator);
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
@@ -2097,7 +2097,7 @@ void MEDCouplingBasicsTestInterp::test1DInterp_1()
   myInterpolator.setPrecision(precis);
 
   // P0P0
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
   CPPUNIT_ASSERT_EQUAL( 3, int( res.size()) );
   CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.5, res[0][0], precis);
@@ -2154,7 +2154,7 @@ void MEDCouplingBasicsTestInterp::test2DCurveInterpP0P0_1()
   INTERP_KERNEL::Interpolation2DCurve myInterpolator;
   const double precis = 1e-13;
   myInterpolator.setPrecision(precis);
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
 
   CPPUNIT_ASSERT_EQUAL( 2, int( res.size()) );
@@ -2178,7 +2178,7 @@ void MEDCouplingBasicsTestInterp::test2DCurveInterpP0P0_2()
   const double precis = 1e-13;
   myInterpolator.setPrecision(precis);
   myInterpolator.setMedianPlane(1.);// median line on target
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P0");
 
   double tolInters = myInterpolator.getBoundingBoxAdjustmentAbs() * sqrt(2.);
@@ -2203,7 +2203,7 @@ void MEDCouplingBasicsTestInterp::test2DCurveInterpP0P1_1()
   INTERP_KERNEL::Interpolation2DCurve myInterpolator;
   const double precis = 1e-13;
   myInterpolator.setPrecision(precis);
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P0P1");
 
   const double len1 = 1., len0 = sqrt(2.);
@@ -2229,7 +2229,7 @@ void MEDCouplingBasicsTestInterp::test2DCurveInterpP1P0_1()
   INTERP_KERNEL::Interpolation2DCurve myInterpolator;
   const double precis = 1e-13;
   myInterpolator.setPrecision(precis);
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P0");
 
   const double len1 = 1., len0 = sqrt(2.);
@@ -2255,7 +2255,7 @@ void MEDCouplingBasicsTestInterp::test2DCurveInterpP1P1_1()
   INTERP_KERNEL::Interpolation2DCurve myInterpolator;
   const double precis = 1e-13;
   myInterpolator.setPrecision(precis);
-  std::vector<std::map<int,double> > res;
+  std::vector<std::map<mcIdType,double> > res;
   myInterpolator.interpolateMeshes(sourceWrapper,targetWrapper,res,"P1P1");
 
   const double len1 = 1., len0 = sqrt(2.);
@@ -2306,7 +2306,7 @@ void MEDCouplingBasicsTestInterp::test2D1DBasicInterpP0P0()
   CPPUNIT_ASSERT_EQUAL(1,(int)duplicateFaces.size());
 
   INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType correctDuplicateFaces;
-  std::set<int> face6;
+  std::set<mcIdType> face6;
   face6.insert(0);
   face6.insert(1);
   correctDuplicateFaces[6] = face6;
@@ -2467,15 +2467,15 @@ void MEDCouplingBasicsTestInterp::test3D2DBasicInterpP0P0()
     CPPUNIT_ASSERT_EQUAL(3,(int)duplicateFaces.size());
 
     INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType correctDuplicateFaces;
-    std::set<int> face2;
+    std::set<mcIdType> face2;
     face2.insert(0);
     face2.insert(1);
     correctDuplicateFaces[2] = face2;
-    std::set<int> face5;
+    std::set<mcIdType> face5;
     face5.insert(1);
     face5.insert(2);
     correctDuplicateFaces[5] = face5;
-    std::set<int> face6;
+    std::set<mcIdType> face6;
     face6.insert(0);
     face6.insert(1);
     face6.insert(2);
index dfd3751af6e2f58fc8bd0c0231cc62c008c20310..7e305f2195a10f47b969bd8b6b8375e5ec212754 100644 (file)
@@ -24,6 +24,7 @@
 #include "MEDCouplingMappedExtrudedMesh.hxx"
 #include "MEDCouplingFieldDouble.hxx"
 #include "MEDCouplingMemArray.hxx"
+#include "MEDCouplingMemArray.txx"
 #include "MEDCouplingMultiFields.hxx"
 
 
@@ -592,7 +593,7 @@ void CppExample_MEDCouplingFieldDouble_renumberNodes()
   CPPUNIT_ASSERT( values->isEqualWithoutConsideringStr( *nodeCoords, 1e-13 ));
   //! [CppSnippet_MEDCouplingFieldDouble_renumberNodes_2]
   //! [CppSnippet_MEDCouplingFieldDouble_renumberNodes_3]
-  const int renumber[9] = { 8, 7, 6, 5, 4, 3, 2, 1, 0 };
+  const mcIdType renumber[9] = { 8, 7, 6, 5, 4, 3, 2, 1, 0 };
   field->renumberNodes(renumber,false);
   const MEDCouplingMesh* mesh2 = field->getMesh(); // field now refers to another mesh
   values = field->getArray();
@@ -620,7 +621,7 @@ void CppExample_MEDCouplingFieldDouble_renumberCells()
   CPPUNIT_ASSERT( values->isEqualWithoutConsideringStr( *bc, 1e-13 ));
   //! [CppSnippet_MEDCouplingFieldDouble_renumberCells_2]
   //! [CppSnippet_MEDCouplingFieldDouble_renumberCells_3]
-  const int renumber[4] = { 3, 2, 1, 0 };
+  const mcIdType renumber[4] = { 3, 2, 1, 0 };
   field->renumberCells(renumber,false);
   const MEDCouplingMesh* mesh2 = field->getMesh(); // field now refers to another mesh
   values = field->getArray();
@@ -776,7 +777,7 @@ void CppExample_MEDCouplingUMesh_areCellsIncludedIn()
   MCAuto<MEDCouplingUMesh> mesh1=MEDCouplingUMesh::New();
   mesh1->setMeshDimension(2);
   mesh1->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh1->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // #0
   mesh1->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // #1
   mesh1->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // #2
@@ -790,13 +791,13 @@ void CppExample_MEDCouplingUMesh_areCellsIncludedIn()
   mesh1->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_areCellsIncludedIn_1]
   //! [CppSnippet_MEDCouplingUMesh_areCellsIncludedIn_2]
-  const int cells2[3] = { 4,2,0 }; // even cells selected
+  const mcIdType cells2[3] = { 4,2,0 }; // even cells selected
   MCAuto<MEDCouplingUMesh> mesh2 =
     (MEDCouplingUMesh*) mesh1->buildPartOfMySelf( cells2, cells2+3, true );
   //! [CppSnippet_MEDCouplingUMesh_areCellsIncludedIn_2]
   //! [CppSnippet_MEDCouplingUMesh_areCellsIncludedIn_3]
   int compType = 0; // the strongest policy
-  DataArrayInt *corr2to1, *corr1to2;
+  DataArrayIdType *corr2to1, *corr1to2;
   // a larger mesh1 includes a smaller mesh2
   CPPUNIT_ASSERT( mesh1->areCellsIncludedIn( mesh2, compType, corr2to1 ));
   CPPUNIT_ASSERT( std::equal( cells2, cells2+3, corr2to1->getConstPointer() ));
@@ -804,7 +805,7 @@ void CppExample_MEDCouplingUMesh_areCellsIncludedIn()
   //! [CppSnippet_MEDCouplingUMesh_areCellsIncludedIn_4]
   // the smaller mesh2 does NOT include the larger mesh1
   CPPUNIT_ASSERT( ! mesh2->areCellsIncludedIn( mesh1, compType, corr1to2 ));
-  const int corr1to2Expected[5] = {2, 3, 1, 4, 0};
+  const mcIdType corr1to2Expected[5] = {2, 3, 1, 4, 0};
   CPPUNIT_ASSERT(std::equal( corr1to2Expected, corr1to2Expected+5, corr1to2->getConstPointer() ));
   //! [CppSnippet_MEDCouplingUMesh_areCellsIncludedIn_4]
   corr2to1->decrRef();
@@ -831,13 +832,13 @@ void CppExample_MEDCouplingUMesh_findAndCorrectBadOriented3DExtrudedCells()
   mesh->setMeshDimension(3);
   mesh->allocateCells(2);
   // connectivity of reversed HEXA8 and PENTA6
-  const int conn[8+6]={0,1,4,3, 5,6,9,8, 1,2,4, 6,7,9};
+  const mcIdType conn[8+6]={0,1,4,3, 5,6,9,8, 1,2,4, 6,7,9};
   mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8, 8,conn+0);
   mesh->insertNextCell(INTERP_KERNEL::NORM_PENTA6,6,conn+8);
   mesh->finishInsertingCells();
   //! [CppSnippet_MEDCouplingUMesh_findAndCorrectBadOriented3DExtrudedCells_1]
   //! [CppSnippet_MEDCouplingUMesh_findAndCorrectBadOriented3DExtrudedCells_2]
-  MCAuto<DataArrayInt> fixedCells =
+  MCAuto<DataArrayIdType> fixedCells =
     mesh->findAndCorrectBadOriented3DExtrudedCells();
   CPPUNIT_ASSERT( fixedCells->getNumberOfTuples() == 2 ); // 2 cells fixed
   fixedCells = mesh->findAndCorrectBadOriented3DExtrudedCells();
@@ -865,7 +866,7 @@ void CppExample_MEDCouplingUMesh_arePolyhedronsNotCorrectlyOriented()
   mesh->setMeshDimension(3);
   mesh->allocateCells(2);
   // connectivity of a HEXA8 + a reversed PENTA6
-  const int conn[8+6]={0,3,4,1, 5,8,9,6, 1,2,4, 6,7,9};
+  const mcIdType conn[8+6]={0,3,4,1, 5,8,9,6, 1,2,4, 6,7,9};
   mesh->insertNextCell(INTERP_KERNEL::NORM_POLYHED,8,conn); //  "extruded" polyhedron
   mesh->insertNextCell(INTERP_KERNEL::NORM_POLYHED,6,conn+8);
   mesh->finishInsertingCells();
@@ -873,7 +874,7 @@ void CppExample_MEDCouplingUMesh_arePolyhedronsNotCorrectlyOriented()
   mesh->convertExtrudedPolyhedra();
   //! [CppSnippet_MEDCouplingUMesh_arePolyhedronsNotCorrectlyOriented_1]
   //! [CppSnippet_MEDCouplingUMesh_arePolyhedronsNotCorrectlyOriented_2]
-  std::vector<int> badCellIds;
+  std::vector<mcIdType> badCellIds;
   mesh->arePolyhedronsNotCorrectlyOriented( badCellIds );
   CPPUNIT_ASSERT( badCellIds.size() == 1 ); //  one polyhedron is KO
   // fix invalid rolyherdons
@@ -892,7 +893,7 @@ void CppExample_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -908,7 +909,7 @@ void CppExample_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented()
   //! [CppSnippet_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented_1]
   //! [CppSnippet_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented_2]
   const double vec[3] = {0.,0.,-1.};
-  std::vector<int> badCellIds;
+  std::vector<mcIdType> badCellIds;
   mesh->are2DCellsNotCorrectlyOriented( vec, false, badCellIds );
   CPPUNIT_ASSERT( badCellIds.size() == 1 ); //  one cell is reversed
   // fix orientation
@@ -927,7 +928,7 @@ void CppExample_MEDCouplingUMesh_getCellsContainingPoints()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);   
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); 
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7); 
@@ -945,10 +946,10 @@ void CppExample_MEDCouplingUMesh_getCellsContainingPoints()
                             0.3, 0.3,              // point located somewhere inside the mesh
                             coords[2], coords[3]}; // point at the node #1
   const double eps = 1e-4; // ball radius
-  MCAuto<DataArrayInt> cells, cellsIndex;
+  MCAuto<DataArrayIdType> cells, cellsIndex;
   mesh->getCellsContainingPoints( pos, 3, eps, cells, cellsIndex );
-  const int cellsExpected[3]={4, 0, 1};
-  const int cellsIndexExpected[4]={0, 0, 1, 3};
+  const mcIdType cellsExpected[3]={4, 0, 1};
+  const mcIdType cellsIndexExpected[4]={0, 0, 1, 3};
   CPPUNIT_ASSERT(std::equal( cellsExpected,      cellsExpected+3,      cells->begin()));
   CPPUNIT_ASSERT(std::equal( cellsIndexExpected, cellsIndexExpected+4, cellsIndex->begin()));
   //! [CppSnippet_MEDCouplingUMesh_getCellsContainingPoints_2]
@@ -961,7 +962,7 @@ void CppExample_MEDCouplingUMesh_getCellsContainingPoint()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -978,9 +979,9 @@ void CppExample_MEDCouplingUMesh_getCellsContainingPoint()
   const double* coords4  = coords + 4*2; // coordinates of the node #4
   const double eps = 1e-4; // ball radius
   const double pos[2] = { coords4[0] + eps, coords4[1] - eps }; // ball center
-  std::vector<int> cellIds;
+  std::vector<mcIdType> cellIds;
   mesh->getCellsContainingPoint( pos, eps, cellIds );
-  CPPUNIT_ASSERT ( (int)cellIds.size() == mesh->getNumberOfCells() );
+  CPPUNIT_ASSERT ( ToIdType(cellIds.size()) == mesh->getNumberOfCells() );
   //! [CppSnippet_MEDCouplingUMesh_getCellsContainingPoint_2]
 }
 
@@ -991,7 +992,7 @@ void CppExample_MEDCouplingUMesh_buildPartOrthogonalField()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1005,7 +1006,7 @@ void CppExample_MEDCouplingUMesh_buildPartOrthogonalField()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_buildPartOrthogonalField_1]
   //! [CppSnippet_MEDCouplingUMesh_buildPartOrthogonalField_2]
-  const int part[4] = {1,2,3,4}; // cell #0 is omitted
+  const mcIdType part[4] = {1,2,3,4}; // cell #0 is omitted
   MCAuto<MEDCouplingFieldDouble> vecField=
     mesh->buildPartOrthogonalField( part, part+4 );
   CPPUNIT_ASSERT ( vecField->getArray()->getNumberOfTuples() == 4 );
@@ -1020,7 +1021,7 @@ void CppExample_MEDCouplingUMesh_getPartMeasureField()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1035,7 +1036,7 @@ void CppExample_MEDCouplingUMesh_getPartMeasureField()
   //! [CppSnippet_MEDCouplingUMesh_getPartMeasureField_1]
   //! [CppSnippet_MEDCouplingUMesh_getPartMeasureField_2]
   const bool isAbs = true;
-  const int part[4] = {1,2,3,4}; // cell #0 is omitted
+  const mcIdType part[4] = {1,2,3,4}; // cell #0 is omitted
   MCAuto<DataArrayDouble> areaArr=
     mesh->getPartMeasureField( isAbs, part, part+4 );
   CPPUNIT_ASSERT( areaArr->getIJ(0,0) > 0 ); // orientation ignored
@@ -1044,11 +1045,11 @@ void CppExample_MEDCouplingUMesh_getPartMeasureField()
   CPPUNIT_ASSERT ( areaArr->getNumberOfTuples() == 4 );
   //! [CppSnippet_MEDCouplingUMesh_getPartMeasureField_2]
   //! [CppSnippet_MEDCouplingUMesh_getPartMeasureField_3]
-  const int cellIds[4] = {1,2,3,4}; // cell #0 is omitted
+  const mcIdType cellIds[4] = {1,2,3,4}; // cell #0 is omitted
   MCAuto<DataArrayDouble> baryCenters=
     mesh->getPartBarycenterAndOwner( cellIds, cellIds+4 );
   CPPUNIT_ASSERT( baryCenters->getNumberOfTuples() == 4 );
-  CPPUNIT_ASSERT( baryCenters->getNumberOfComponents() == mesh->getSpaceDimension() );
+  CPPUNIT_ASSERT( (int)baryCenters->getNumberOfComponents() == mesh->getSpaceDimension() );
   //! [CppSnippet_MEDCouplingUMesh_getPartMeasureField_3]
 }
 
@@ -1064,13 +1065,13 @@ void CppExample_MEDCouplingUMesh_getCellsInBoundingBox()
   coordsArr->useExternalArrayWithRWAccess(coords, 3,2);
   mesh->setCoords(coordsArr);
   mesh->allocateCells(1);
-  const int conn[3]={0,1,2};
+  const mcIdType conn[3]={0,1,2};
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn);
   mesh->finishInsertingCells();
   //! [CppSnippet_MEDCouplingUMesh_getCellsInBoundingBox_1]
   //! [CppSnippet_MEDCouplingUMesh_getCellsInBoundingBox_2]
   const double bbox[] = {1., 1., 1.001,1.001}; // xMin, xMax, yMin, yMax
-  MCAuto<DataArrayInt> cellIdsArr =
+  MCAuto<DataArrayIdType> cellIdsArr =
     mesh->getCellsInBoundingBox( bbox, 0.0 );
   CPPUNIT_ASSERT( cellIdsArr->getNumberOfTuples() == 0 );
   cellIdsArr = mesh->getCellsInBoundingBox( bbox, 0.1 );
@@ -1085,15 +1086,15 @@ void CppExample_MEDCouplingUMesh_renumberNodesInConn()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(1);
-  const int conn[4]={4,3,2,1};
+  const mcIdType conn[4]={4,3,2,1};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
   mesh->finishInsertingCells();
   //! [CppSnippet_MEDCouplingUMesh_renumberNodesInConn_1]
   //! [CppSnippet_MEDCouplingUMesh_renumberNodesInConn_2]
-  const int old2newIds[] = {-1,3,2,1,0};
+  const mcIdType old2newIds[] = {-1,3,2,1,0};
   mesh->renumberNodesInConn( old2newIds );
-  const int nodes0Expected[] = {0,1,2,3};
-  std::vector<int> nodes0;
+  const mcIdType nodes0Expected[] = {0,1,2,3};
+  std::vector<mcIdType> nodes0;
   mesh->getNodeIdsOfCell( 0, nodes0 );
   CPPUNIT_ASSERT(std::equal( nodes0Expected, nodes0Expected+4, &nodes0[0] ));
   //! [CppSnippet_MEDCouplingUMesh_renumberNodesInConn_2]
@@ -1113,7 +1114,7 @@ void CppExample_MEDCouplingUMesh_renumberNodes()
   mesh->finishInsertingCells();
   //! [CppSnippet_MEDCouplingUMesh_renumberNodes_1]
   //! [CppSnippet_MEDCouplingUMesh_renumberNodes_2]
-  const int newIds[] = { 2,1,0,-1 };
+  const mcIdType newIds[] = { 2,1,0,-1 };
   mesh->renumberNodes(newIds, 3);
   coordsArr = mesh->getCoordinatesAndOwner(); // get a shorten array
   const double coordsExpected[3*2]={0.7,-0.3, 0.2,-0.3, -0.3,-0.3};
@@ -1123,7 +1124,7 @@ void CppExample_MEDCouplingUMesh_renumberNodes()
   //! [CppSnippet_MEDCouplingUMesh_renumberNodes_2]
   //! [CppSnippet_MEDCouplingUMesh_renumberNodes_3]
   coordsArr->useExternalArrayWithRWAccess(coords, 4,2); // restore old nodes
-  const int newIds2[] = { 2,1,0,2 };
+  const mcIdType newIds2[] = { 2,1,0,2 };
   mesh->renumberNodesCenter(newIds2, 3);
   coordsArr = mesh->getCoordinatesAndOwner(); // get a shorten array
   const double coordsExpected2[3*2]={0.7,-0.3, 0.2,-0.3, -0.3, 0.0};
@@ -1140,7 +1141,7 @@ void CppExample_MEDCouplingUMesh_findBoundaryNodes()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);   
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); 
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7); 
@@ -1154,7 +1155,7 @@ void CppExample_MEDCouplingUMesh_findBoundaryNodes()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_findBoundaryNodes_1]
   //! [CppSnippet_MEDCouplingUMesh_findBoundaryNodes_2]
-  MCAuto<DataArrayInt> nodeIdsArr=mesh->findBoundaryNodes();
+  MCAuto<DataArrayIdType> nodeIdsArr=mesh->findBoundaryNodes();
   CPPUNIT_ASSERT( nodeIdsArr->getNumberOfTuples() == mesh->getNumberOfNodes() - 1 );
   //! [CppSnippet_MEDCouplingUMesh_findBoundaryNodes_2]
 }
@@ -1166,7 +1167,7 @@ void CppExample_MEDCouplingUMesh_buildBoundaryMesh()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);   
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); 
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7); 
@@ -1194,7 +1195,7 @@ void CppExample_MEDCouplingUMesh_buildFacePartOfMySelfNode()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1208,7 +1209,7 @@ void CppExample_MEDCouplingUMesh_buildFacePartOfMySelfNode()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_buildFacePartOfMySelfNode_1]
   //! [CppSnippet_MEDCouplingUMesh_buildFacePartOfMySelfNode_2]
-  std::vector<int> nodes;
+  std::vector<mcIdType> nodes;
   mesh->getNodeIdsOfCell( 0, nodes );
   const bool allNodes = true;
   MCAuto<MEDCouplingUMesh> mesh1 =
@@ -1227,7 +1228,7 @@ void CppExample_MEDCouplingUMesh_buildPartOfMySelfNode()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1241,14 +1242,14 @@ void CppExample_MEDCouplingUMesh_buildPartOfMySelfNode()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_buildPartOfMySelfNode_1]
   //! [CppSnippet_MEDCouplingUMesh_buildPartOfMySelfNode_2]
-  std::vector<int> nodes;
+  std::vector<mcIdType> nodes;
   mesh->getNodeIdsOfCell( 0, nodes );
   const bool allNodes = true;
   MCAuto<MEDCouplingUMesh> mesh1 =
     (MEDCouplingUMesh*)mesh->buildPartOfMySelfNode( &nodes[0], &nodes[0]+nodes.size(), allNodes);
   MCAuto<MEDCouplingUMesh> mesh2 =
     (MEDCouplingUMesh*)mesh->buildPartOfMySelfNode( &nodes[0], &nodes[0]+nodes.size(),!allNodes);
-  CPPUNIT_ASSERT_EQUAL( (int)mesh1->getNumberOfCells(), 1 );
+  CPPUNIT_ASSERT_EQUAL( mesh1->getNumberOfCells(), ToIdType( 1 ));
   CPPUNIT_ASSERT_EQUAL( mesh2->getNumberOfCells(), mesh->getNumberOfCells() );
   //! [CppSnippet_MEDCouplingUMesh_buildPartOfMySelfNode_2]
 }
@@ -1260,7 +1261,7 @@ void CppExample_MEDCouplingUMesh_getCellIdsLyingOnNodes()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1274,13 +1275,13 @@ void CppExample_MEDCouplingUMesh_getCellIdsLyingOnNodes()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_getCellIdsLyingOnNodes_1]
   //! [CppSnippet_MEDCouplingUMesh_getCellIdsLyingOnNodes_2]
-  std::vector<int> nodes;
+  std::vector<mcIdType> nodes;
   mesh->getNodeIdsOfCell( 0, nodes );
   const bool allNodes = true;
-  DataArrayInt* cellIdsArr1 = mesh->getCellIdsLyingOnNodes( &nodes[0], &nodes[0]+nodes.size(), allNodes);
-  DataArrayInt* cellIdsArr2 = mesh->getCellIdsLyingOnNodes( &nodes[0], &nodes[0]+nodes.size(),!allNodes);
-  CPPUNIT_ASSERT_EQUAL( (int)cellIdsArr1->getNumberOfTuples(), 1 );
-  CPPUNIT_ASSERT_EQUAL( (int)cellIdsArr2->getNumberOfTuples(), (int)mesh->getNumberOfCells() );
+  DataArrayIdType* cellIdsArr1 = mesh->getCellIdsLyingOnNodes( &nodes[0], &nodes[0]+nodes.size(), allNodes);
+  DataArrayIdType* cellIdsArr2 = mesh->getCellIdsLyingOnNodes( &nodes[0], &nodes[0]+nodes.size(),!allNodes);
+  CPPUNIT_ASSERT_EQUAL( cellIdsArr1->getNumberOfTuples(), ToIdType( 1 ));
+  CPPUNIT_ASSERT_EQUAL( cellIdsArr2->getNumberOfTuples(), mesh->getNumberOfCells() );
   //! [CppSnippet_MEDCouplingUMesh_getCellIdsLyingOnNodes_2]
   cellIdsArr1->decrRef();
   cellIdsArr2->decrRef();
@@ -1293,7 +1294,7 @@ void CppExample_MEDCouplingUMesh_getCellIdsFullyIncludedInNodeIds()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);   
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); 
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7); 
@@ -1307,11 +1308,11 @@ void CppExample_MEDCouplingUMesh_getCellIdsFullyIncludedInNodeIds()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_getCellIdsFullyIncludedInNodeIds_1]
   //! [CppSnippet_MEDCouplingUMesh_getCellIdsFullyIncludedInNodeIds_2]
-  const int cellIds[2]={1,2};
-  std::vector<int> nodes;
+  const mcIdType cellIds[2]={1,2};
+  std::vector<mcIdType> nodes;
   mesh->getNodeIdsOfCell( cellIds[0], nodes );
   mesh->getNodeIdsOfCell( cellIds[1], nodes );
-  DataArrayInt* cellIdsArr = mesh->getCellIdsFullyIncludedInNodeIds( &nodes[0], &nodes[0]+nodes.size());
+  DataArrayIdType* cellIdsArr = mesh->getCellIdsFullyIncludedInNodeIds( &nodes[0], &nodes[0]+nodes.size());
   CPPUNIT_ASSERT(std::equal( cellIds, cellIds+2, cellIdsArr->getPointer() ));
   //! [CppSnippet_MEDCouplingUMesh_getCellIdsFullyIncludedInNodeIds_2]
   cellIdsArr->decrRef();
@@ -1324,7 +1325,7 @@ void CppExample_MEDCouplingUMesh_buildPartOfMySelf()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1338,14 +1339,14 @@ void CppExample_MEDCouplingUMesh_buildPartOfMySelf()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_buildPartOfMySelf_1]
   //! [CppSnippet_MEDCouplingUMesh_buildPartOfMySelf_2]
-  const int cellIds[2]={1,2};
+  const mcIdType cellIds[2]={1,2};
   MEDCouplingUMesh* mesh2=(MEDCouplingUMesh*)mesh->buildPartOfMySelf(cellIds,cellIds+2,true);
   MEDCouplingUMesh* mesh3=(MEDCouplingUMesh*)mesh->buildPartOfMySelf(cellIds,cellIds+2,false);
   CPPUNIT_ASSERT(  coordsArr->isEqual( *mesh2->getCoords(), 1e-13 )); // same nodes
   CPPUNIT_ASSERT( !coordsArr->isEqual( *mesh3->getCoords(), 1e-13 )); // different nodes
-  for ( int i = 0; i < 2; ++i )
+  for ( mcIdType i = 0; i < 2; ++i )
     {
-      std::vector<int> nodes1, nodes2;
+      std::vector<mcIdType> nodes1, nodes2;
       mesh ->getNodeIdsOfCell(cellIds[i], nodes1);
       mesh2->getNodeIdsOfCell(i, nodes2);
       CPPUNIT_ASSERT( nodes1 == nodes2 ); // cell #cellIds[i] was copied
@@ -1362,7 +1363,7 @@ void CppExample_MEDCouplingUMesh_mergeNodes()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);
@@ -1379,13 +1380,13 @@ void CppExample_MEDCouplingUMesh_mergeNodes()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_mergeNodes_1]
   //! [CppSnippet_MEDCouplingUMesh_mergeNodes_2]
-  bool areNodesMerged; int newNbOfNodes;
-  MCAuto<DataArrayInt> arr=
+  bool areNodesMerged; mcIdType newNbOfNodes;
+  MCAuto<DataArrayIdType> arr=
     mesh->mergeNodes(0.004,areNodesMerged,newNbOfNodes);
-  const int idsExpected[6] = {0, 1, 0, 2, 2, 0};
+  const mcIdType idsExpected[6] = {0, 1, 0, 2, 2, 0};
   CPPUNIT_ASSERT(std::equal(idsExpected,idsExpected+6,arr->getPointer()));
   CPPUNIT_ASSERT( areNodesMerged );
-  CPPUNIT_ASSERT_EQUAL( 3, newNbOfNodes );
+  CPPUNIT_ASSERT_EQUAL( ToIdType( 3 ), newNbOfNodes );
   //! [CppSnippet_MEDCouplingUMesh_mergeNodes_2]
   //! [CppSnippet_MEDCouplingUMesh_mergeNodes_3]
   const double* baryCoords2 = coords + 2*2; // initial coordinates of node #2
@@ -1409,7 +1410,7 @@ void CppExample_MEDCouplingUMesh_zipConnectivityTraducer()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[11]={0,3,4,1, 1,4,2, 4,1,0,3};
+  const mcIdType conn[11]={0,3,4,1, 1,4,2, 4,1,0,3};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+0); // 0     
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); // 1     
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); // 2 == 1
@@ -1423,10 +1424,10 @@ void CppExample_MEDCouplingUMesh_zipConnectivityTraducer()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_zipConnectivityTraducer_1]
   //! [CppSnippet_MEDCouplingUMesh_zipConnectivityTraducer_2]
-  const int oldNbCells = mesh->getNumberOfCells();
-  DataArrayInt *arr = mesh->zipConnectivityTraducer(0);
-  CPPUNIT_ASSERT_EQUAL( oldNbCells-2, (int)mesh->getNumberOfCells() );
-  const int idsExpected[5] = {0, 1, 1, 0, 2};
+  const mcIdType oldNbCells = mesh->getNumberOfCells();
+  DataArrayIdType *arr = mesh->zipConnectivityTraducer(0);
+  CPPUNIT_ASSERT_EQUAL( oldNbCells-2, mesh->getNumberOfCells() );
+  const mcIdType idsExpected[5] = {0, 1, 1, 0, 2};
   CPPUNIT_ASSERT(std::equal(idsExpected,idsExpected+5,arr->getPointer()));
   //! [CppSnippet_MEDCouplingUMesh_zipConnectivityTraducer_2]
   arr->decrRef();
@@ -1439,7 +1440,7 @@ void CppExample_MEDCouplingUMesh_zipCoordsTraducer()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);   
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); 
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7); 
@@ -1453,12 +1454,12 @@ void CppExample_MEDCouplingUMesh_zipCoordsTraducer()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_zipCoordsTraducer_1]
   //! [CppSnippet_MEDCouplingUMesh_zipCoordsTraducer_2]
-  const int cellIds[2]={1,2};
+  const mcIdType cellIds[2]={1,2};
   MEDCouplingUMesh* mesh2=(MEDCouplingUMesh*)mesh->buildPartOfMySelf(cellIds,cellIds+2,true);
-  DataArrayInt *arr=mesh2->zipCoordsTraducer();
-  CPPUNIT_ASSERT_EQUAL( 4, mesh2->getNumberOfNodes() ); // nb of nodes decreased
-  CPPUNIT_ASSERT_EQUAL( (int)mesh->getNumberOfNodes(), (int)arr->getNumberOfTuples() );
-  const int idsExpected[9] = {-1,0,1,-1,2,3,-1,-1,-1}; // -1 for unused nodes
+  DataArrayIdType *arr=mesh2->zipCoordsTraducer();
+  CPPUNIT_ASSERT_EQUAL( ToIdType(4), mesh2->getNumberOfNodes() ); // nb of nodes decreased
+  CPPUNIT_ASSERT_EQUAL( mesh->getNumberOfNodes(), arr->getNumberOfTuples() );
+  const mcIdType idsExpected[9] = {-1,0,1,-1,2,3,-1,-1,-1}; // -1 for unused nodes
   CPPUNIT_ASSERT(std::equal(idsExpected,idsExpected+9,arr->getPointer()));
   //! [CppSnippet_MEDCouplingUMesh_zipCoordsTraducer_2]
   mesh2->decrRef();
@@ -1472,7 +1473,7 @@ void CppExample_MEDCouplingUMesh_getNodeIdsInUse()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);   
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4); 
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7); 
@@ -1486,16 +1487,16 @@ void CppExample_MEDCouplingUMesh_getNodeIdsInUse()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_getNodeIdsInUse_1]
   //! [CppSnippet_MEDCouplingUMesh_getNodeIdsInUse_2]
-  const int cellIds[2]={1,2};
+  const mcIdType cellIds[2]={1,2};
   MEDCouplingUMesh* mesh2=(MEDCouplingUMesh*)mesh->buildPartOfMySelf(cellIds,cellIds+2,true);
-  int newNbOfNodes = 0;
-  DataArrayInt *arr=mesh2->getNodeIdsInUse( newNbOfNodes );
-  const int idsExpected[9] = {-1,0,1,-1,2,3,-1,-1,-1};
+  mcIdType newNbOfNodes = 0;
+  DataArrayIdType *arr=mesh2->getNodeIdsInUse( newNbOfNodes );
+  const mcIdType idsExpected[9] = {-1,0,1,-1,2,3,-1,-1,-1};
   CPPUNIT_ASSERT(std::equal(idsExpected,idsExpected+9,arr->getPointer()));
   //! [CppSnippet_MEDCouplingUMesh_getNodeIdsInUse_2]
   //! [CppSnippet_MEDCouplingUMesh_getNodeIdsInUse_3]
-  DataArrayInt *arr2=arr->invertArrayO2N2N2O(newNbOfNodes);
-  const int idsExpected2[4] = {1,2,4,5};
+  DataArrayIdType *arr2=arr->invertArrayO2N2N2O(newNbOfNodes);
+  const mcIdType idsExpected2[4] = {1,2,4,5};
   CPPUNIT_ASSERT(std::equal(idsExpected2,idsExpected2+4,arr2->getPointer()));
   //! [CppSnippet_MEDCouplingUMesh_getNodeIdsInUse_3]
   mesh2->decrRef();
@@ -1510,7 +1511,7 @@ void CppExample_MEDCouplingUMesh_convertToPolyTypes()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1524,7 +1525,7 @@ void CppExample_MEDCouplingUMesh_convertToPolyTypes()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_convertToPolyTypes_1]
   //! [CppSnippet_MEDCouplingUMesh_convertToPolyTypes_2]
-  const int cells[2]={1,3};
+  const mcIdType cells[2]={1,3};
   mesh->convertToPolyTypes(cells, cells+2);
   CPPUNIT_ASSERT( mesh->getTypeOfCell(0) == INTERP_KERNEL::NORM_QUAD4 );
   CPPUNIT_ASSERT( mesh->getTypeOfCell(1) == INTERP_KERNEL::NORM_POLYGON );
@@ -1540,7 +1541,7 @@ void CppExample_MEDCouplingUMesh_buildDescendingConnectivity2()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1554,23 +1555,23 @@ void CppExample_MEDCouplingUMesh_buildDescendingConnectivity2()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_buildDescendingConnectivity2_1]
   //! [CppSnippet_MEDCouplingUMesh_buildDescendingConnectivity2_2]
-  DataArrayInt *desc       =DataArrayInt::New();
-  DataArrayInt *descIndx   =DataArrayInt::New();
-  DataArrayInt *revDesc    =DataArrayInt::New();
-  DataArrayInt *revDescIndx=DataArrayInt::New();
+  DataArrayIdType *desc       =DataArrayIdType::New();
+  DataArrayIdType *descIndx   =DataArrayIdType::New();
+  DataArrayIdType *revDesc    =DataArrayIdType::New();
+  DataArrayIdType *revDescIndx=DataArrayIdType::New();
   MEDCouplingUMesh * mesh2 = mesh->buildDescendingConnectivity2(desc,descIndx,revDesc,revDescIndx);
-  const int descExpected[]        = {1,2,3,4,-3,5,6,7,8,-5,9,10,-2,11,12,13,-7,-10};
-  const int descIndxExpected[]    = {0,4,7,10,14,18};
-  const int revDescExpected[]     = {0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
-  const int revDescIndxExpected[] = {0,1,3,5,6,8,9,11,12,13,15,16,17,18};
+  const mcIdType descExpected[]        = {1,2,3,4,-3,5,6,7,8,-5,9,10,-2,11,12,13,-7,-10};
+  const mcIdType descIndxExpected[]    = {0,4,7,10,14,18};
+  const mcIdType revDescExpected[]     = {0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
+  const mcIdType revDescIndxExpected[] = {0,1,3,5,6,8,9,11,12,13,15,16,17,18};
   CPPUNIT_ASSERT(std::equal(descExpected,descExpected+18,desc->getPointer()));
   CPPUNIT_ASSERT(std::equal(descIndxExpected,descIndxExpected+6,descIndx->getPointer()));
   CPPUNIT_ASSERT(std::equal(revDescExpected,revDescExpected+18,revDesc->getPointer()));
   CPPUNIT_ASSERT(std::equal(revDescIndxExpected,revDescIndxExpected+14,revDescIndx->getPointer()));
   //! [CppSnippet_MEDCouplingUMesh_buildDescendingConnectivity2_2]
   //! [CppSnippet_MEDCouplingUMesh_buildDescendingConnectivity2_3]
-  const int cell2ConnExpect[] = {4,1};
-  std::vector<int> cell2Conn;
+  const mcIdType cell2ConnExpect[] = {4,1};
+  std::vector<mcIdType> cell2Conn;
   mesh2->getNodeIdsOfCell( 3-1, cell2Conn ); // cell #3 in FORTRAN mode
   CPPUNIT_ASSERT(std::equal(cell2ConnExpect,cell2ConnExpect+2,&cell2Conn[0]));
   //! [CppSnippet_MEDCouplingUMesh_buildDescendingConnectivity2_3]
@@ -1588,7 +1589,7 @@ void CppExample_MEDCouplingUMesh_buildDescendingConnectivity()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1602,15 +1603,15 @@ void CppExample_MEDCouplingUMesh_buildDescendingConnectivity()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_buildDescendingConnectivity_1]
   //! [CppSnippet_MEDCouplingUMesh_buildDescendingConnectivity_2]
-  DataArrayInt *desc       =DataArrayInt::New();
-  DataArrayInt *descIndx   =DataArrayInt::New();
-  DataArrayInt *revDesc    =DataArrayInt::New();
-  DataArrayInt *revDescIndx=DataArrayInt::New();
+  DataArrayIdType *desc       =DataArrayIdType::New();
+  DataArrayIdType *descIndx   =DataArrayIdType::New();
+  DataArrayIdType *revDesc    =DataArrayIdType::New();
+  DataArrayIdType *revDescIndx=DataArrayIdType::New();
   MEDCouplingUMesh * mesh2 = mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
-  const int descExpected[]        = {0,1,2,3, 2,4,5, 6,7,4, 8,9,1,10, 11,12,6,9};
-  const int descIndxExpected[]    = {0,4,7,10,14,18};
-  const int revDescExpected[]     = {0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
-  const int revDescIndxExpected[] = {0,1,3,5,6,8,9,11,12,13,15,16,17,18};
+  const mcIdType descExpected[]        = {0,1,2,3, 2,4,5, 6,7,4, 8,9,1,10, 11,12,6,9};
+  const mcIdType descIndxExpected[]    = {0,4,7,10,14,18};
+  const mcIdType revDescExpected[]     = {0, 0,3, 0,1, 0, 1,2, 1, 2,4, 2, 3, 3,4, 3, 4, 4};
+  const mcIdType revDescIndxExpected[] = {0,1,3,5,6,8,9,11,12,13,15,16,17,18};
   CPPUNIT_ASSERT(std::equal(descExpected,descExpected+18,desc->getPointer()));
   CPPUNIT_ASSERT(std::equal(descIndxExpected,descIndxExpected+6,descIndx->getPointer()));
   CPPUNIT_ASSERT(std::equal(revDescExpected,revDescExpected+18,revDesc->getPointer()));
@@ -1630,7 +1631,7 @@ void CppExample_MEDCouplingUMesh_getReverseNodalConnectivity()
   MCAuto<MEDCouplingUMesh> mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
   mesh->allocateCells(5);
-  const int conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  const mcIdType conn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);    // 0
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+4);  // 1
   mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+7);  // 2
@@ -1644,11 +1645,11 @@ void CppExample_MEDCouplingUMesh_getReverseNodalConnectivity()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingUMesh_getReverseNodalConnectivity_1]
   //! [CppSnippet_MEDCouplingUMesh_getReverseNodalConnectivity_2]
-  DataArrayInt *revNodal=DataArrayInt::New();
-  DataArrayInt *revNodalIndx=DataArrayInt::New();
+  DataArrayIdType *revNodal=DataArrayIdType::New();
+  DataArrayIdType *revNodalIndx=DataArrayIdType::New();
   mesh->getReverseNodalConnectivity(revNodal,revNodalIndx);
-  const int revNodalExpected[18]={0,0,1,1,2,0,3,0,1,2,3,4,2,4,3,3,4,4};
-  const int revNodalIndexExpected[10]={0,1,3,5,7,12,14,15,17,18};
+  const mcIdType revNodalExpected[18]={0,0,1,1,2,0,3,0,1,2,3,4,2,4,3,3,4,4};
+  const mcIdType revNodalIndexExpected[10]={0,1,3,5,7,12,14,15,17,18};
   CPPUNIT_ASSERT(std::equal(revNodalExpected,revNodalExpected+18,revNodal->getPointer()));
   CPPUNIT_ASSERT(std::equal(revNodalIndexExpected,revNodalIndexExpected+10,revNodalIndx->getPointer()));
   //! [CppSnippet_MEDCouplingUMesh_getReverseNodalConnectivity_2]
@@ -1672,7 +1673,7 @@ void CppExample_MEDCouplingUMesh_checkDeepEquivalWith()
     coordsArr->useExternalArrayWithRWAccess( coords, 4, 2 );
     mesh1->setCoords(coordsArr);
     mesh1->allocateCells(2);
-    const int conn[6]={0,1,2, 1,2,3};
+    const mcIdType conn[6]={0,1,2, 1,2,3};
     mesh1->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+0);  // #0
     mesh1->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+3);  // #1
     mesh1->finishInsertingCells();
@@ -1689,7 +1690,7 @@ void CppExample_MEDCouplingUMesh_checkDeepEquivalWith()
     coordsArr->useExternalArrayWithRWAccess( coords2, 4, 2 );
     mesh2->setCoords(coordsArr);
     mesh2->allocateCells(2);
-    const int conn[6]={2,3,0, 3,1,2};
+    const mcIdType conn[6]={2,3,0, 3,1,2};
     mesh2->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+0);  // #0 = #1
     mesh2->insertNextCell(INTERP_KERNEL::NORM_TRI3,3, conn+3);  // #1 ~ #0
     mesh2->finishInsertingCells();
@@ -1697,10 +1698,10 @@ void CppExample_MEDCouplingUMesh_checkDeepEquivalWith()
   //! [CppSnippet_MEDCouplingUMesh_checkDeepEquivalWith_1]
   //! [CppSnippet_MEDCouplingUMesh_checkDeepEquivalWith_2]
   int cellCompPol = 1; // "permuted same orientation" - policy of medium severity
-  DataArrayInt *nOld2New, *cOld2New;
+  DataArrayIdType *nOld2New, *cOld2New;
   mesh1->checkDeepEquivalWith( mesh2, cellCompPol, 0.002, cOld2New, nOld2New );
-  const int nOld2NewExpected[4] = { 3, 0, 1, 2 };
-  const int cOld2NewExpected[2] = { 1, 0 };
+  const mcIdType nOld2NewExpected[4] = { 3, 0, 1, 2 };
+  const mcIdType cOld2NewExpected[2] = { 1, 0 };
   CPPUNIT_ASSERT(std::equal(nOld2NewExpected,nOld2NewExpected+4,nOld2New->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(cOld2NewExpected,cOld2NewExpected+2,cOld2New->getConstPointer()));
   //! [CppSnippet_MEDCouplingUMesh_checkDeepEquivalWith_2]
@@ -1709,7 +1710,7 @@ void CppExample_MEDCouplingUMesh_checkDeepEquivalWith()
   CPPUNIT_ASSERT_THROW ( mesh1->checkDeepEquivalOnSameNodesWith( mesh2, cellCompPol, 0.002, cOld2New ), INTERP_KERNEL::Exception );
   mesh2->setCoords( mesh1->getCoords() ); // make meshes share the same coordinates array
   mesh2->allocateCells(2);
-  const int conn[6]={1,2,3, 1,0,2};
+  const mcIdType conn[6]={1,2,3, 1,0,2};
   mesh2->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+0); // #0 = #1
   mesh2->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+3); // #1 ~ #0
   mesh2->finishInsertingCells();
@@ -1816,8 +1817,8 @@ void CppExample_MEDCouplingPointSet_getBoundingBox()
   mesh->getBoundingBox( (double*) bbox );
 
   // check the returned coordinates of extremum points of the bounding box
-  for ( int i = 0; i < 2; ++i )   // point id
-    for ( int j = 0; j < 3; ++j ) // component
+  for ( mcIdType i = 0; i < 2; ++i )   // point id
+    for ( mcIdType j = 0; j < 3; ++j ) // component
       CPPUNIT_ASSERT_DOUBLES_EQUAL( cc[ i*3 + j ], bbox[j][i], 1e-13);
   //! [CppSnippet_MEDCouplingPointSet_getBoundingBox_2]
 }
@@ -1839,12 +1840,12 @@ void CppExample_MEDCouplingPointSet_getNodeIdsNearPoint()
   //! [CppSnippet_MEDCouplingPointSet_getNodeIdsNearPoint_1]
   //! [CppSnippet_MEDCouplingPointSet_getNodeIdsNearPoint_2]
   double point [2]={0.3, -0.3}; // point close to nodes #0, #2 and #4
-  DataArrayInt *ids = mesh->getNodeIdsNearPoint(point, 1e-2);
+  DataArrayIdType *ids = mesh->getNodeIdsNearPoint(point, 1e-2);
 
   // check found ids
-  const int expectedIDs[3] = {0,2,4};
-  DataArrayInt * okIDs = ids->findIdsEqualList ( expectedIDs, expectedIDs+3 );
-  CPPUNIT_ASSERT_EQUAL(3, (int)okIDs->getNumberOfTuples());
+  const mcIdType expectedIDs[3] = {0,2,4};
+  DataArrayIdType * okIDs = ids->findIdsEqualList ( expectedIDs, expectedIDs+3 );
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3), okIDs->getNumberOfTuples());
 
   // release data
   ids->decrRef();
@@ -1869,17 +1870,17 @@ void CppExample_MEDCouplingPointSet_getNodeIdsNearPoints()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingPointSet_getNodeIdsNearPoints_1]
   //! [CppSnippet_MEDCouplingPointSet_getNodeIdsNearPoints_2]
-  const int nbOfPoints = 3;
+  const mcIdType nbOfPoints = 3;
   double points [nbOfPoints*2]={0.2,-0.30001,  // ~ node #1
                                 0.0, 0.0,
                                 1.1, 0.002}; // ~ nodes #3, #4 and #5
-  DataArrayInt *ids, *idsIndex;
+  DataArrayIdType *ids, *idsIndex;
   mesh->getNodeIdsNearPoints(points, nbOfPoints, 1e-1,ids,idsIndex);
 
   // check found ids (i.e. contents of 'ids' array)
-  const int expectedIDs[4] = {1, 3, 4, 5};
-  DataArrayInt * okIDs = ids->findIdsEqualList ( expectedIDs, expectedIDs+4 );
-  CPPUNIT_ASSERT_EQUAL(4, (int)okIDs->getNumberOfTuples());
+  const mcIdType expectedIDs[4] = {1, 3, 4, 5};
+  DataArrayIdType * okIDs = ids->findIdsEqualList ( expectedIDs, expectedIDs+4 );
+  CPPUNIT_ASSERT_EQUAL(ToIdType(4), okIDs->getNumberOfTuples());
 
   // release data
   ids->decrRef();
@@ -1904,12 +1905,12 @@ void CppExample_MEDCouplingPointSet_findCommonNodes()
   mesh->setCoords(coordsArr);
   //! [CppSnippet_MEDCouplingPointSet_findCommonNodes_1]
   //! [CppSnippet_MEDCouplingPointSet_findCommonNodes_2]
-  DataArrayInt *com, *comI;
+  DataArrayIdType *com, *comI;
   mesh->findCommonNodes(1e-13,-1,com,comI);
-  CPPUNIT_ASSERT_EQUAL(2, (int)com->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2),com->getNumberOfTuples());
   com->decrRef(); comI->decrRef();
   mesh->findCommonNodes(0.004,-1,com,comI);
-  CPPUNIT_ASSERT_EQUAL(5, (int)com->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5), com->getNumberOfTuples());
   //! [CppSnippet_MEDCouplingPointSet_findCommonNodes_2]
   com->decrRef(); comI->decrRef();
 }
@@ -1937,17 +1938,17 @@ void CppExample_DataArrayInt_buildPermutationArr()
   using namespace MEDCoupling;
   //! [CppSnippet_DataArrayInt_buildPermutationArr_1]
   DataArrayInt *a=DataArrayInt::New();
-  const int vala[5]={4,5,6,7,8};
+  const mcIdType vala[5]={4,5,6,7,8};
   a->alloc(5,1);
   std::copy(vala,vala+5,a->getPointer());
   DataArrayInt *b=DataArrayInt::New();
-  const int valb[5]={5,4,8,6,7};
+  const mcIdType valb[5]={5,4,8,6,7};
   b->alloc(5,1);
   std::copy(valb,valb+5,b->getPointer());
-  DataArrayInt *c=a->buildPermutationArr(*b);
+  DataArrayIdType *c=a->buildPermutationArr(*b);
   //! [CppSnippet_DataArrayInt_buildPermutationArr_1]
-  const int expect1[5]={1,0,4,2,3};
-  CPPUNIT_ASSERT_EQUAL(5,(int)c->getNumberOfTuples());
+  const mcIdType expect1[5]={1,0,4,2,3};
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),c->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,(int)c->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expect1,expect1+5,c->getConstPointer()));
   CPPUNIT_ASSERT(a->isEqualWithoutConsideringStrAndOrder(*b));
@@ -1960,13 +1961,13 @@ void CppExample_DataArrayInt_invertArrayO2N2N2O()
 {
   using namespace MEDCoupling;
   //! [CppSnippet_DataArrayInt_invertArrayO2N2N2O_1]
-  const int arr1[6]={2,0,4,1,5,3};
+  const mcIdType arr1[6]={2,0,4,1,5,3};
   DataArrayInt *da=DataArrayInt::New();
   da->alloc(6,1);
   std::copy(arr1,arr1+6,da->getPointer());
-  DataArrayInt *da2=da->invertArrayO2N2N2O(6);
-  const int expected1[6]={1,3,0,5,2,4};
-  for(int i=0;i<6;i++)
+  DataArrayIdType *da2=da->invertArrayO2N2N2O(6);
+  const mcIdType expected1[6]={1,3,0,5,2,4};
+  for(mcIdType i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0));
   //! [CppSnippet_DataArrayInt_invertArrayO2N2N2O_1]
   da->decrRef();
@@ -1977,13 +1978,13 @@ void CppExample_DataArrayInt_invertArrayN2O2O2N()
 {
   using namespace MEDCoupling;
   //! [CppSnippet_DataArrayInt_invertArrayN2O2O2N_1]
-  const int arr1[6]={2,0,4,1,5,3};
+  const mcIdType arr1[6]={2,0,4,1,5,3};
   DataArrayInt *da=DataArrayInt::New();
   da->alloc(6,1);
   std::copy(arr1,arr1+6,da->getPointer());
-  DataArrayInt *da2=da->invertArrayN2O2O2N(6);
-  const int expected1[6]={1,3,0,5,2,4};
-  for(int i=0;i<6;i++)
+  DataArrayIdType *da2=da->invertArrayN2O2O2N(6);
+  const mcIdType expected1[6]={1,3,0,5,2,4};
+  for(mcIdType i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0));
   //! [CppSnippet_DataArrayInt_invertArrayN2O2O2N_1]
   da->decrRef();
@@ -1998,7 +1999,7 @@ void CppExample_DataArrayDouble_getIdsInRange()
   da->alloc(10,1);
   da->iota();
 
-  DataArrayInt* da2 = da->findIdsInRange( 2.5, 6 );
+  DataArrayIdType* da2 = da->findIdsInRange( 2.5, 6 );
   //! [CppSnippet_DataArrayDouble_getIdsInRange_1]
   da->decrRef();
   da2->decrRef();
@@ -2020,11 +2021,11 @@ void CppExample_DataArrayDouble_findCommonTuples()
   std::copy(array2,array2+12,da->getPointer());
   //! [CppSnippet_DataArrayDouble_findCommonTuples1]
   //! [CppSnippet_DataArrayDouble_findCommonTuples2]
-  DataArrayInt *c=0,*cI=0;
+  DataArrayIdType *c=0,*cI=0;
   da->findCommonTuples(1.01e-1,-1,c,cI);
 
-  const int expected3[5]={0,3,4,1,2};
-  const int expected4[3]={0,3,5};
+  const mcIdType expected3[5]={0,3,4,1,2};
+  const mcIdType expected4[3]={0,3,5};
   CPPUNIT_ASSERT(std::equal(expected3,expected3+5,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,cI->getConstPointer()));
   c->decrRef();
@@ -2037,7 +2038,7 @@ void CppExample_DataArrayDouble_Meld1()
 {
   using namespace MEDCoupling;
   //! [CppSnippet_DataArrayDouble_Meld1_1]
-  const int sameNbTuples = 7;
+  const mcIdType sameNbTuples = 7;
 
   DataArrayDouble *da1=DataArrayDouble::New();
   da1->alloc(sameNbTuples,2);
@@ -2062,7 +2063,7 @@ void CppExample_DataArrayInt_Meld1()
 {
   using namespace MEDCoupling;
   //! [CppSnippet_DataArrayInt_Meld1_1]
-  const int sameNbTuples = 7;
+  const mcIdType sameNbTuples = 7;
 
   DataArrayInt *da1=DataArrayInt::New();
   da1->alloc(sameNbTuples,2);
@@ -2098,18 +2099,18 @@ void CppExampleFieldDoubleBuildSubPart1()
   array->decrRef();
   //! [CppSnippetFieldDoubleBuildSubPart1_1]
   //! [CppSnippetFieldDoubleBuildSubPart1_2]
-  const int part1[3]={2,1,4};
+  const mcIdType part1[3]={2,1,4};
   MEDCoupling::MEDCouplingFieldDouble *f2=f1->buildSubPart(part1,part1+3);
   //! [CppSnippetFieldDoubleBuildSubPart1_2]
   f2->zipCoords();
-  CPPUNIT_ASSERT_EQUAL(3,(int)f2->getMesh()->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(6,f2->getMesh()->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),f2->getMesh()->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),f2->getMesh()->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   MEDCoupling::MEDCouplingUMesh *m2C=dynamic_cast<MEDCoupling::MEDCouplingUMesh *>(const_cast<MEDCoupling::MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(13,m2C->getNodalConnectivityArrayLen());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(13),m2C->getNodalConnectivityArrayLen());
   const double expected2[12]={0.2, -0.3, 0.7, -0.3, 0.2, 0.2, 0.7, 0.2, 0.2, 0.7, 0.7, 0.7};
-  for(int i=0;i<12;i++)
+  for(mcIdType i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
   const double expected3[13]={3,2,3,1,3,0,2,1,4,4,5,3,2};
   CPPUNIT_ASSERT(std::equal(expected3,expected3+13,m2C->getNodalConnectivity()->getConstPointer()));
@@ -2129,20 +2130,20 @@ void CppExampleFieldDoubleBuildSubPart1()
   array->decrRef();
   //! [CppSnippetFieldDoubleBuildSubPart1_3]
   //! [CppSnippetFieldDoubleBuildSubPart1_4]
-  const int part2[2]={1,2};
+  const mcIdType part2[2]={1,2};
   f2=f1->buildSubPart(part2,part2+2);
   //! [CppSnippetFieldDoubleBuildSubPart1_4]
   f2->decrRef();
   //idem previous because nodes of cell#4 are not fully present in part3 
-  const int part3[2]={1,2};
-  MEDCoupling::DataArrayInt *arrr=MEDCoupling::DataArrayInt::New();
+  const mcIdType part3[2]={1,2};
+  MEDCoupling::DataArrayIdType *arrr=MEDCoupling::DataArrayIdType::New();
   arrr->alloc(2,1);
   std::copy(part3,part3+2,arrr->getPointer());
   f2=f1->buildSubPart(arrr);
   arrr->decrRef();
   f2->decrRef();
   //
-  const int part4[3]={1,2,4};
+  const mcIdType part4[3]={1,2,4};
   f2=f1->buildSubPart(part4,part4+3);
   f2->decrRef();
   //
@@ -2156,7 +2157,7 @@ void CppSnippetUMeshStdBuild1()
   //! [CppSnippetUMeshStdBuild1_1]
   double coords[27]={-0.3,-0.3,0.,   0.2,-0.3,0.,   0.7,-0.3,0.,   -0.3,0.2,0.,   0.2,0.2,0., 
                      0.7,0.2,0.,    -0.3,0.7,0.,    0.2,0.7,0.,     0.7,0.7,0. };
-  int nodalConnPerCell[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
+  mcIdType nodalConnPerCell[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
   //! [CppSnippetUMeshStdBuild1_1]
   //! [CppSnippetUMeshStdBuild1_2]
   MEDCoupling::MEDCouplingUMesh *mesh=MEDCoupling::MEDCouplingUMesh::New("My2DMesh",2);
@@ -2204,8 +2205,8 @@ void CppSnippetCMeshStdBuild1()
   arrY->decrRef();
   //! [CppSnippetCMeshStdBuild1_2]
   //! [CppSnippetCMeshStdBuild1_3]
-  CPPUNIT_ASSERT_EQUAL(8*6,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(9*7,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(8*6),mesh->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9*7),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
   //! [CppSnippetCMeshStdBuild1_3]
@@ -2219,8 +2220,8 @@ void CppSnippetCMeshStdBuild1()
   mesh->setCoordsAt(1,arrY);
   arrY->decrRef();
   //! [CppSnippetCMeshStdBuild1_2bis]
-  CPPUNIT_ASSERT_EQUAL(8*6,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(9*7,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(8*6),mesh->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(9*7),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
   //! [CppSnippetCMeshStdBuild1_4]
@@ -2233,22 +2234,22 @@ void CppSnippetUMeshAdvBuild1()
   //! [CppSnippetUMeshAdvBuild1_1]
   double coords[27]={-0.3,-0.3,0.,   0.2,-0.3,0.,   0.7,-0.3,0.,   -0.3,0.2,0.,   0.2,0.2,0., 
                      0.7,0.2,0.,    -0.3,0.7,0.,    0.2,0.7,0.,     0.7,0.7,0. };
-  int nodalConnPerCell[23]={4,0,3,4,1, 3,1,4,2, 3,4,5,2, 4,6,7,4,3, 4,7,8,5,4};
-  int nodalConnPerCellIndex[6]={0,5,9,13,18,23};
+  mcIdType nodalConnPerCell[23]={4,0,3,4,1, 3,1,4,2, 3,4,5,2, 4,6,7,4,3, 4,7,8,5,4};
+  mcIdType nodalConnPerCellIndex[6]={0,5,9,13,18,23};
   //! [CppSnippetUMeshAdvBuild1_1]
   //! [CppSnippetUMeshAdvBuild1_2]
   MEDCoupling::MEDCouplingUMesh *mesh=MEDCoupling::MEDCouplingUMesh::New("My2DMesh",2);
   //! [CppSnippetUMeshAdvBuild1_2]
   //! [CppSnippetUMeshAdvBuild1_3]
-  MEDCoupling::DataArrayInt *nodalConn=MEDCoupling::DataArrayInt::New();
+  MEDCoupling::DataArrayIdType *nodalConn=MEDCoupling::DataArrayIdType::New();
   nodalConn->alloc(23,1);
   std::copy(nodalConnPerCell,nodalConnPerCell+23,nodalConn->getPointer());
-  MEDCoupling::DataArrayInt *nodalConnI=MEDCoupling::DataArrayInt::New();
+  MEDCoupling::DataArrayIdType *nodalConnI=MEDCoupling::DataArrayIdType::New();
   nodalConnI->alloc(6,1);
   std::copy(nodalConnPerCellIndex,nodalConnPerCellIndex+6,nodalConnI->getPointer());
   mesh->setConnectivity(nodalConn,nodalConnI,true);
-  nodalConn->decrRef();// nodalConn DataArrayInt instance is owned by mesh after call to setConnectivity method. No more need here -> decrRef()
-  nodalConnI->decrRef();// nodalConnI DataArrayInt instance is owned by mesh after call to setConnectivity method. No more need here -> decrRef()
+  nodalConn->decrRef();// nodalConn DataArrayIdType instance is owned by mesh after call to setConnectivity method. No more need here -> decrRef()
+  nodalConnI->decrRef();// nodalConnI DataArrayIdType instance is owned by mesh after call to setConnectivity method. No more need here -> decrRef()
   //! [CppSnippetUMeshAdvBuild1_3]
   //! [CppSnippetUMeshAdvBuild1_4]
   MEDCoupling::DataArrayDouble *coordsArr=MEDCoupling::DataArrayDouble::New();
@@ -2266,7 +2267,7 @@ void CppSnippetUMeshAdvBuild1()
 void CppSnippetDataArrayBuild1()
 {
   //! [CppSnippetDataArrayBuild1_0]
-  const int nbOfNodes=12;
+  const mcIdType nbOfNodes=12;
   double coords[3*nbOfNodes]={2.,3.,4.,3.,4.,5.,4.,5.,6.,5.,6.,7.,6.,7.,8.,7.,8.,9.,8.,9.,10.,9.,10.,11.,10.,11.,12.,11.,12.,13.,12.,13.,14.,13.,14.,15.};
   //
   MEDCoupling::DataArrayDouble *coordsArr=0;
index 7b6a72e8185fff23aea25f37ce465baba7bab231..7c004b2bd1158496a103baf083470a466656a7f4 100644 (file)
@@ -628,8 +628,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi()
   sourceMesh->decrRef();
   targetMesh->decrRef();
   //------------- 1D -> 2D
-  const int conn[8]={0,1,1,2,2,3,3,0};
-  const int conn2[12]={6,7,5,4,2,7,6,3,0,4,5,1};
+  const mcIdType conn[8]={0,1,1,2,2,3,3,0};
+  const mcIdType conn2[12]={6,7,5,4,2,7,6,3,0,4,5,1};
   const double coords1[]={0.17,0.93,0.56,0.93,0.56,0.25,0.17,0.52};
   const double coords2[]={0.,0.,1.,0.,1.,1.,0.,1.,0.,0.5,1.,0.5,0.,0.8,1.,0.8};
   sourceMesh=MEDCouplingUMesh::New("src1D",1);
@@ -914,15 +914,15 @@ void MEDCouplingRemapperTest::testExtruded2()
 {
   MEDCouplingUMesh *meshN,*meshTT,*meshTF;
   MEDCouplingBasicsTest::build3DExtrudedUMesh_2(meshN,meshTT,meshTF);
-  std::vector<int> n;
+  std::vector<mcIdType> n;
   double pt[3]={300.,300.,0.};
   double v[3]={0.,0.,2.};
   meshN->findNodesOnPlane(pt,v,1e-12,n);
   MEDCouplingUMesh *meshN2D=(MEDCouplingUMesh *)meshN->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true);
   n.clear();
   bool b=false;
-  int newNbOfNodes;
-  DataArrayInt *da=meshTT->mergeNodes(1e-12,b,newNbOfNodes);
+  mcIdType newNbOfNodes;
+  DataArrayIdType *da=meshTT->mergeNodes(1e-12,b,newNbOfNodes);
   CPPUNIT_ASSERT(b);
   da->decrRef();
   meshTT->findNodesOnPlane(pt,v,1e-12,n);
@@ -1125,7 +1125,7 @@ MEDCouplingUMesh *MEDCouplingRemapperTest::build1DTargetMesh_2()
     0.59,0.09, 0.69,0.19, 0.21,-0.29,0.31,-0.19, 0.45,0.25,0.65,0.45,
     -0.2,-0.2,0.11,0.11, 0.25,0.25, 0.45,0.45
   };
-  int targetConn[10]={0,1, 2,3, 4,5, 6,7, 8,9};
+  mcIdType targetConn[10]={0,1, 2,3, 4,5, 6,7, 8,9};
 
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New("my name of mesh 1D 2",1);
   targetMesh->allocateCells(5);
@@ -1145,7 +1145,7 @@ MEDCouplingUMesh *MEDCouplingRemapperTest::build2DTargetMesh_3()
   double targetCoords[20]={-0.6,-0.4, -0.1,-0.4, 1.1,-0.4, 2.1,-0.4,
                            -0.6,0.1,  -0.1,0.1,  1.1,0.1,  2.1,0.1,
                            -0.6,1.1,  -0.1,1.1};
-  int targetConn[16]={0,4,5,1, 1,5,6,2, 2,6,7,3, 4,8,9,5};
+  mcIdType targetConn[16]={0,4,5,1, 1,5,6,2, 2,6,7,3, 4,8,9,5};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(4);
@@ -1172,7 +1172,7 @@ MEDCouplingUMesh *MEDCouplingRemapperTest::build3DExtrudedUMesh_1(MEDCouplingUMe
     0.,0.,3., 1.,1.,3., 1.,1.25,3., 0.,1.,3., 1.,1.5,3., 2.,0.,3., 2.,1.,3., 1.,2.,3., 0.,2.,3., 3.,1.,3.,
     3.,2.,3., 0.,1.,3., 1.,3.,3., 2.,2.,3., 2.,3.,3.};
 
-  int conn[354]={
+  mcIdType conn[354]={
     // 0
     0,11,1,3,15,26,16,18,   1,2,4,7,13,6,-1,1,16,21,6,-1,6,21,28,13,-1,13,7,22,28,-1,7,4,19,22,-1,4,2,17,19,-1,2,1,16,17,-1,16,21,28,22,19,17,
     1,6,5,3,16,21,20,18,   13,10,9,6,28,25,24,21,
@@ -1189,7 +1189,7 @@ MEDCouplingUMesh *MEDCouplingRemapperTest::build3DExtrudedUMesh_1(MEDCouplingUMe
     41,38,37,34,32,31,-1,41,56,46,31,-1,31,46,47,32,-1,32,47,49,34,-1,34,49,52,37,-1,37,38,53,52,-1,38,41,56,53,-1,56,46,47,49,52,53,
     37,42,44,43,52,57,59,58
   };
-  int conn2[28]={7,12,14,13, 11,8,7,4,2,1, 13,10,9,6, 1,6,5,3, 1,2,4,7,13,6, 0,11,1,3};
+  mcIdType conn2[28]={7,12,14,13, 11,8,7,4,2,1, 13,10,9,6, 1,6,5,3, 1,2,4,7,13,6, 0,11,1,3};
   //
   MEDCouplingUMesh *ret=MEDCouplingUMesh::New();
   ret->setMeshDimension(3);
@@ -1250,7 +1250,7 @@ void MEDCouplingRemapperTest::testPartialTransfer1()
   array->alloc(sourceMesh->getNumberOfCells(),1);
   srcField->setArray(array);
   double *ptr=array->getPointer();
-  for(int i=0;i<sourceMesh->getNumberOfCells();i++)
+  for(mcIdType i=0;i<sourceMesh->getNumberOfCells();i++)
     ptr[i]=(double)(i+7);
   array->decrRef();
   MEDCouplingFieldDouble *trgField=MEDCouplingFieldDouble::New(ON_CELLS);
@@ -1279,10 +1279,10 @@ void MEDCouplingRemapperTest::testBugNonRegression1()
   DataArrayDouble *coordsSrc(DataArrayDouble::New());
   const double coordsSrcData[18]={-6.25,3.6084391824351605,264.85199999999998,-6.25,3.6084391824351605,289.05200000000002,-6.2499999999999991,-3.6084391824351618,264.85199999999998,-6.2499999999999991,-3.6084391824351618,289.05200000000002,-1.7763568394002505e-15,4.4408920985006262e-15,264.85199999999998,-1.7763568394002505e-15,4.4408920985006262e-15,289.05200000000002};
   coordsSrc->useArray(coordsSrcData,false,DeallocType::CPP_DEALLOC,6,3);
-  DataArrayInt *connSrc(DataArrayInt::New()),*connISrc(DataArrayInt::New());
-  const int connSrcData[7]={16,2,0,4,3,1,5};
+  DataArrayIdType *connSrc(DataArrayIdType::New()),*connISrc(DataArrayIdType::New());
+  const mcIdType connSrcData[7]={16,2,0,4,3,1,5};
   connSrc->useArray(connSrcData,false,DeallocType::CPP_DEALLOC,7,1);
-  const int connISrcData[2]={0,7};
+  const mcIdType connISrcData[2]={0,7};
   connISrc->useArray(connISrcData,false,DeallocType::CPP_DEALLOC,2,1);
   MEDCouplingUMesh *srcMesh(MEDCouplingUMesh::New("source",3));
   srcMesh->setCoords(coordsSrc);
@@ -1292,11 +1292,11 @@ void MEDCouplingRemapperTest::testBugNonRegression1()
   DataArrayDouble *coordsTrg(DataArrayDouble::New());
 const double coordsTrgData[36]={-2,1.1547005383792521,264.85199999999998,-2,0.57735026918962618,264.85199999999998,-2.5,0.2886751345948132,264.85199999999998,-2.5,1.443375672974065,264.85199999999998,-3.0000000000000004,1.1547005383792526,264.85199999999998,-3.0000000000000004,0.57735026918962662,264.85199999999998,-2,1.1547005383792521,289.05200000000002,-2,0.57735026918962618,289.05200000000002,-2.5,0.2886751345948132,289.05200000000002,-2.5,1.443375672974065,289.05200000000002,-3.0000000000000004,1.1547005383792526,289.05200000000002,-3.0000000000000004,0.57735026918962662,289.05200000000002};
  coordsTrg->useArray(coordsTrgData,false,DeallocType::CPP_DEALLOC,12,3);
- DataArrayInt *connTrg=DataArrayInt::New();
- const int connTrgData[44]={31,0,1,2,5,4,3,-1,7,6,9,10,11,8,-1,3,9,6,0,-1,4,10,9,3,-1,5,11,10,4,-1,2,8,11,5,-1,1,7,8,2,-1,0,6,7,1};
+ DataArrayIdType *connTrg=DataArrayIdType::New();
+ const mcIdType connTrgData[44]={31,0,1,2,5,4,3,-1,7,6,9,10,11,8,-1,3,9,6,0,-1,4,10,9,3,-1,5,11,10,4,-1,2,8,11,5,-1,1,7,8,2,-1,0,6,7,1};
  connTrg->useArray(connTrgData,false,DeallocType::CPP_DEALLOC,44,1);
- DataArrayInt *connITrg=DataArrayInt::New();
- const int connITrgData[2]={0,44};
+ DataArrayIdType *connITrg=DataArrayIdType::New();
+ const mcIdType connITrgData[2]={0,44};
  connITrg->useArray(connITrgData,false,DeallocType::CPP_DEALLOC,2,1);
  MEDCouplingUMesh *trgMesh=MEDCouplingUMesh::New("target",3);
  trgMesh->setCoords(coordsTrg);
@@ -1308,7 +1308,7 @@ const double coordsTrgData[36]={-2,1.1547005383792521,264.85199999999998,-2,0.57
  remapper.setPrecision(1e-12);
  remapper.setIntersectionType(INTERP_KERNEL::Triangulation);
  CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(srcMesh,trgMesh,"P0P0"));
- std::vector<std::map<int,double> > matrx(remapper.getCrudeMatrix());
+ std::vector<std::map<mcIdType,double> > matrx(remapper.getCrudeMatrix());
  CPPUNIT_ASSERT_EQUAL(1,(int)matrx.size());
  CPPUNIT_ASSERT_EQUAL(1,(int)matrx[0].size());
  CPPUNIT_ASSERT_DOUBLES_EQUAL(valExpected,matrx[0][0],1e-13);
index 12254ca51218bbdae4067e584997f800e293cc0e..5050f27c27c8b2bc93a39f8f636e341638a1595c 100644 (file)
@@ -23,6 +23,10 @@ INCLUDE(${SWIG_USE_FILE})
 
 ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES CPLUSPLUS ON)
 IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
   SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES SWIG_FLAGS "-py3")
@@ -30,10 +34,14 @@ ELSE()
   SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 ENDIF()
 SET(SWIG_MODULE_MEDCoupling_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
+IF(MEDCOUPLING_USE_64BIT_IDS)
+  STRING(APPEND SWIG_MODULE_MEDCoupling_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
 SET (MEDCoupling_SWIG_DPYS_FILES
     MEDCouplingCommon.i
     MEDCouplingMemArray.i
+    DataArrayInt.i
     MEDCouplingFieldDiscretization.i
     MEDCouplingFinalize.i
     MEDCouplingTypemaps.i)
@@ -49,6 +57,7 @@ SET (MC_Swig_interf
     MEDCouplingRemapperCommon.i
     MEDCouplingRefCountObject.i
     MEDCouplingMemArray.i
+    DataArrayInt.i
     MEDCouplingFieldDiscretization.i
     MEDCouplingTimeDiscretization.i
     MEDCouplingFinalize.i
@@ -118,6 +127,9 @@ ELSE()
   SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 ENDIF()
 SET(SWIG_MODULE_MEDCouplingRemapper_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
+IF(MEDCOUPLING_USE_64BIT_IDS)
+  STRING(APPEND SWIG_MODULE_MEDCouplingRemapper_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
 # _ABR_ Ensure dependency mechanism on all SWIG files and headers
 SET (SWIG_MODULE_MEDCouplingRemapper_EXTRA_DEPS ${MEDCoupling_SWIG_DPYS_FILES}
diff --git a/src/MEDCoupling_Swig/DataArrayInt.i b/src/MEDCoupling_Swig/DataArrayInt.i
new file mode 100644 (file)
index 0000000..6017f15
--- /dev/null
@@ -0,0 +1,2613 @@
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (EDF R&D)
+
+%include "MEDCouplingMemArray.i"
+
+%define ARRAYDEF( ARRAY, INT )
+
+// namespace MEDCoupling
+// {
+//   class ARRAY ## Iterator;
+
+//   class ARRAY : public DataArray -- #ifdef doesn't work inside
+//   {
+  public:
+    static ARRAY *New();
+    INT intValue() const;
+    INT getHashCode() const;
+    bool empty() const;
+    void aggregate(const ARRAY *other);
+    ARRAY *performCopyOrIncrRef(bool deepCopy) const;
+    void deepCopyFrom(const ARRAY& other);
+    void reserve(std::size_t nbOfElems);
+    void pushBackSilent(INT val);
+    INT popBackSilent();
+    void pack() const;
+    void allocIfNecessary(INT nbOfTuple, INT nbOfCompo);
+    bool isEqual(const ARRAY& other) const;
+    bool isEqualWithoutConsideringStr(const ARRAY& other) const;
+    bool isEqualWithoutConsideringStrAndOrder(const ARRAY& other) const;
+    DataArrayIdType *buildPermutationArr(const ARRAY& other) const;
+    ARRAY *sumPerTuple() const;
+    void sort(bool asc=true);
+    void reverse();
+    void checkMonotonic(bool increasing) const;
+    bool isMonotonic(bool increasing) const;
+    void checkStrictlyMonotonic(bool increasing) const;
+    bool isStrictlyMonotonic(bool increasing) const;
+    void fillWithZero();
+    void fillWithValue(INT val);
+    void iota(INT init=0);
+    std::string repr() const;
+    std::string reprZip() const;
+    std::string reprNotTooLong() const;
+    ARRAY *invertArrayO2N2N2O(mcIdType newNbOfElem) const;
+    ARRAY *invertArrayN2O2O2N(mcIdType oldNbOfElem) const;
+    ARRAY *invertArrayO2N2N2OBis(mcIdType newNbOfElem) const;
+    DataArrayIdType *indicesOfSubPart(const ARRAY& partOfThis) const;
+    ARRAY *fromNoInterlace() const;
+    ARRAY *toNoInterlace() const;
+    ARRAY *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end, mcIdType step) const;
+    DataArrayIdType *checkAndPreparePermutation() const;
+    DataArrayIdType *buildPermArrPerLevel() const;
+    bool isIota(mcIdType sizeExpected) const;
+    bool isUniform(INT val) const;
+    INT checkUniformAndGuess() const;
+    bool hasUniqueValues() const;
+    ARRAY *subArray(mcIdType tupleIdBg, mcIdType tupleIdEnd=-1) const;
+    void transpose();
+    ARRAY *changeNbOfComponents(std::size_t newNbOfComp, INT dftValue) const;
+    void meldWith(const ARRAY *other);
+    void setPartOfValues1(const ARRAY *a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp, bool strictCompoCompare=true);
+    void setPartOfValuesSimple1(INT a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp);
+    void setPartOfValuesAdv(const ARRAY *a, const DataArrayIdType *tuplesSelec);
+    void getTuple(mcIdType tupleId, INT *res) const;
+    INT getIJ(std::size_t tupleId, std::size_t compoId) const;
+    INT getIJSafe(std::size_t tupleId, std::size_t compoId) const;
+    INT front() const;
+    INT back() const;
+    void setIJ(mcIdType tupleId, mcIdType compoId, INT newVal);
+    void setIJSilent(mcIdType tupleId, mcIdType compoId, INT newVal);
+    INT *getPointer();
+    const INT *getConstPointer() const;
+    ARRAY ## Iterator *iterator();
+    const INT *begin() const;
+    const INT *end() const;
+    DataArrayIdType *findIdsEqual(INT val) const;
+    DataArrayIdType *findIdsNotEqual(INT val) const;
+    mcIdType changeValue(INT oldValue, INT newValue);
+    mcIdType findIdFirstEqualTuple(const std::vector<INT>& tupl) const;
+    mcIdType findIdFirstEqual(INT value) const;
+    mcIdType findIdFirstEqual(const std::vector<INT>& vals) const;
+    mcIdType findIdSequence(const std::vector<INT>& vals) const;
+    bool presenceOfTuple(const std::vector<INT>& tupl) const;
+    bool presenceOfValue(INT value) const;
+    bool presenceOfValue(const std::vector<INT>& vals) const;
+    INT count(INT value) const;
+    INT accumulate(INT compId) const;
+    INT getMaxValueInArray() const;
+    INT getMaxAbsValueInArray() const;
+    INT getMinValueInArray() const;
+    void abs();
+    ARRAY *computeAbs() const;
+    void applyLin(INT a, INT b, INT compoId);
+    void applyLin(INT a, INT b);
+    void applyInv(INT numerator);
+    ARRAY *negate() const;
+    void applyDivideBy(INT val);
+    void applyModulus(INT val);
+    void applyRModulus(INT val);
+    void applyPow(INT val);
+    void applyRPow(INT val);
+    ARRAY *findIdsInRange(INT vmin, INT vmax) const;
+    ARRAY *findIdsNotInRange(INT vmin, INT vmax) const;
+    ARRAY *findIdsStrictlyNegative() const;
+    bool checkAllIdsInRange(INT vmin, INT vmax) const;
+    static ARRAY *Aggregate(const ARRAY *a1, const ARRAY *a2, INT offsetA2);
+    static ARRAY *Meld(const ARRAY *a1, const ARRAY *a2);
+    static DataArrayIdType *MakePartition(const std::vector<const ARRAY *>& groups, mcIdType newNb, std::vector< std::vector<mcIdType> >& fidsOfGroups);
+    static ARRAY *BuildUnion(const std::vector<const ARRAY *>& arr);
+    static ARRAY *BuildIntersection(const std::vector<const ARRAY *>& arr);
+    static DataArrayIdType *FindPermutationFromFirstToSecond(const ARRAY *ids1, const ARRAY *ids2);
+    DataArrayIdType *buildComplement(mcIdType nbOfElement) const;
+    ARRAY *buildSubstraction(const ARRAY *other) const;
+    ARRAY *buildSubstractionOptimized(const ARRAY *other) const;
+    ARRAY *buildUnion(const ARRAY *other) const;
+    ARRAY *buildIntersection(const ARRAY *other) const;
+    ARRAY *buildUnique() const;
+    ARRAY *buildUniqueNotSorted() const;
+    ARRAY *deltaShiftIndex() const;
+    void computeOffsets();
+    void computeOffsetsFull();
+    ARRAY *buildExplicitArrByRanges(const ARRAY *offsets) const;
+    DataArrayIdType *findRangeIdForEachTuple(const ARRAY *ranges) const;
+    ARRAY *findIdInRangeForEachTuple(const ARRAY *ranges) const;
+    void sortEachPairToMakeALinkedList();
+    ARRAY *duplicateEachTupleNTimes(mcIdType nbTimes) const;
+    ARRAY *getDifferentValues() const;
+    static ARRAY *Add(const ARRAY *a1, const ARRAY *a2);
+    void addEqual(const ARRAY *other);
+    static ARRAY *Substract(const ARRAY *a1, const ARRAY *a2);
+    void substractEqual(const ARRAY *other);
+    static ARRAY *Multiply(const ARRAY *a1, const ARRAY *a2);
+    void multiplyEqual(const ARRAY *other);
+    static ARRAY *Divide(const ARRAY *a1, const ARRAY *a2);
+    void divideEqual(const ARRAY *other);
+    static ARRAY *Modulus(const ARRAY *a1, const ARRAY *a2);
+    void modulusEqual(const ARRAY *other);
+    static ARRAY *Pow(const ARRAY *a1, const ARRAY *a2);
+    void powEqual(const ARRAY *other);
+    MCAuto<ARRAY> fromLinkedListOfPairToList() const;
+    MCAuto<DataArrayIdType> findIdsGreaterOrEqualTo(INT val) const;
+    MCAuto<DataArrayIdType> findIdsGreaterThan(INT val) const;
+    MCAuto<DataArrayIdType> findIdsLowerOrEqualTo(INT val) const;
+    MCAuto<DataArrayIdType> findIdsLowerThan(INT val) const;
+    MCAuto<ARRAY> selectPartDef(const PartDefinition* pd) const;
+    MCAuto<DataArrayDouble> convertToDblArr() const;
+    MCAuto<DataArrayFloat> convertToFloatArr() const;
+  public:
+    static ARRAY *Range(INT begin, INT end, INT step);
+    %extend
+    {
+      ARRAY()
+        {
+          return ARRAY::New();
+        }
+
+      static ARRAY *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
+      {
+        const char *msgBase="MEDCoupling::ARRAY::New : Available API are : \n-ARRAY.New()\n-ARRAY.New([1,3,4])\n-ARRAY.New([1,3,4],3)\n-ARRAY.New([1,3,4,5],2,2)\n-ARRAY.New([1,3,4,5,7,8],3,2)\n-ARRAY.New([(1,3),(4,5),(7,8)])\n-ARRAY.New(5)\n-ARRAY.New(5,2)";
+        std::string msg(msgBase);
+        if ( MEDCouplingHasNumPyBindings() )
+          msg+="\n-ARRAY.New(numpy array with dtype=int32)";
+
+        msg+=" !";
+        if(PyList_Check(elt0) || PyTuple_Check(elt0))
+          {
+            if(nbOfTuples)
+              {
+                if(PyInt_Check(nbOfTuples))
+                  {
+                    mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(nbOfTuples));
+                    if(nbOfTuples1<0)
+                      throw INTERP_KERNEL::Exception("ARRAY::New : should be a positive set of allocated memory !");
+                    if(nbOfComp)
+                      {
+                        if(PyInt_Check(nbOfComp))
+                          {//ARRAY.New([1,3,4,5],2,2)
+                            mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfComp));
+                            if(nbOfCompo<0)
+                              throw INTERP_KERNEL::Exception("ARRAY::New : should be a positive number of components !");
+                            MCAuto<ARRAY> ret=ARRAY::New();
+                            std::vector<INT> tmp=fillArrayWithPyListInt2<INT>(elt0,nbOfTuples1,nbOfCompo);
+                            ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
+                            return ret.retn();
+                          }
+                        else
+                          throw INTERP_KERNEL::Exception(msg.c_str());
+                      }
+                    else
+                      {//ARRAY.New([1,3,4],3)
+                        MCAuto<ARRAY> ret=ARRAY::New();
+                        mcIdType tmpp1=-1;
+                        std::vector<INT> tmp=fillArrayWithPyListInt2<INT>(elt0,nbOfTuples1,tmpp1);
+                        ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
+                        return ret.retn();
+                      }
+                  }
+                else
+                  throw INTERP_KERNEL::Exception(msg.c_str());
+              }
+            else
+              {// ARRAY.New([1,3,4])
+                MCAuto<ARRAY> ret=ARRAY::New();
+                mcIdType tmpp1=-1,tmpp2=-1;
+                std::vector<INT> tmp=fillArrayWithPyListInt2<INT>(elt0,tmpp1,tmpp2);
+                ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
+                return ret.retn();
+              }
+          }
+        else if(PyInt_Check(elt0))
+          {
+            INT nbOfTuples1=(INT)PyInt_AS_LONG(elt0);
+            if(nbOfTuples1<0)
+              throw INTERP_KERNEL::Exception("ARRAY::New : should be a positive set of allocated memory !");
+            if(nbOfTuples)
+              {
+                if(!nbOfComp)
+                  {
+                    if(PyInt_Check(nbOfTuples))
+                      {//ARRAY.New(5,2)
+                        INT nbOfCompo=(INT)PyInt_AS_LONG(nbOfTuples);
+                        if(nbOfCompo<0)
+                          throw INTERP_KERNEL::Exception("ARRAY::New : should be a positive number of components !");
+                        MCAuto<ARRAY> ret=ARRAY::New();
+                        ret->alloc(nbOfTuples1,nbOfCompo);
+                        return ret.retn();
+                      }
+                    else
+                      throw INTERP_KERNEL::Exception(msg.c_str());
+                  }
+                else
+                  throw INTERP_KERNEL::Exception(msg.c_str());
+              }
+            else
+              {//ARRAY.New(5)
+                MCAuto<ARRAY> ret=ARRAY::New();
+                ret->alloc(nbOfTuples1,1);
+                return ret.retn();
+              }
+          }
+        else if(MEDCouplingHasNumPyBindings() && PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL)
+          {//ARRAY.New(numpyArray)
+            return BuildNewInstance<ARRAY,INT>(elt0,NPYTraits<INT>::NPYObjectType,NPYTraits<INT>::NPYFunc,MEDCoupling::Traits<INT>::NPYStr);
+          }
+        else
+          throw INTERP_KERNEL::Exception(msg.c_str());
+        throw INTERP_KERNEL::Exception(msg.c_str());//to make g++ happy
+      }
+
+      ARRAY(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
+        {
+          return MEDCoupling_ ## ARRAY ## _New__SWIG_1(elt0,nbOfTuples,nbOfComp);
+        }
+      
+      std::string __str__() const
+      {
+        return self->reprNotTooLong();
+      }
+
+      mcIdType __len__() const
+      {
+        if(self->isAllocated())
+          {
+            return self->getNumberOfTuples();
+          }
+        else
+          {
+            throw INTERP_KERNEL::Exception("ARRAY::__len__ : Instance is NOT allocated !");
+          }
+      }
+
+      INT __int__() const
+      {
+        return self->intValue();
+      }
+
+      ARRAY ## Iterator *__iter__()
+      {
+        return self->iterator();
+      }
+   
+      PyObject *accumulate() const
+      {
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
+        INTERP_KERNEL::AutoPtr<INT> tmp=new INT[sz];
+        self->accumulate((INT *)tmp);
+        return convertIntArrToPyList((const INT *)tmp,sz);
+      }
+
+      ARRAY *accumulatePerChunck(PyObject *indexArr) const
+      {
+        mcIdType sw,sz,val;
+        std::vector<mcIdType> val2;
+        const mcIdType *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
+        return self->accumulatePerChunck(bg,bg+sz);
+      }
+
+      DataArrayIdType *findIdsEqualTuple(PyObject *inputTuple) const
+      {
+        mcIdType sw,sz;
+        INT val;
+        std::vector<INT> val2;
+        const INT *bg(convertIntStarLikePyObjToCppIntStar(inputTuple,sw,sz,val,val2));
+        return self->findIdsEqualTuple(bg,bg+sz);
+      }
+
+      DataArrayIdType *findIdForEach(PyObject *vals) const
+      {
+        mcIdType sw,sz;
+        INT val;
+        std::vector<INT> val2;
+        const INT *bg(convertIntStarLikePyObjToCppIntStar(vals,sw,sz,val,val2));
+        MCAuto<DataArrayIdType> ret(self->findIdForEach(bg,bg+sz));
+        return ret.retn();
+      }
+
+      PyObject *splitInBalancedSlices(mcIdType nbOfSlices) const
+      {
+        std::vector< std::pair<mcIdType,mcIdType> > slcs(self->splitInBalancedSlices(nbOfSlices));
+        PyObject *ret=PyList_New(slcs.size());
+        for(std::size_t i=0;i<slcs.size();i++)
+          PyList_SetItem(ret,i,PySlice_New(PyInt_FromLong(slcs[i].first),PyInt_FromLong(slcs[i].second),PyInt_FromLong(1)));
+        return ret;
+      }
+
+      ARRAY *buildExplicitArrOfSliceOnScaledArr(PyObject *slic) const
+      {
+        if(!PySlice_Check(slic))
+          throw INTERP_KERNEL::Exception("ARRAY::buildExplicitArrOfSliceOnScaledArr (wrap) : expecting a pyslice as second (first) parameter !");
+        Py_ssize_t strt=2,stp=2,step=2;
+        GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"ARRAY::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice is invalid !");
+        if(strt==std::numeric_limits<INT>::max() || stp==std::numeric_limits<INT>::max())
+          throw INTERP_KERNEL::Exception("ARRAY::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice contains some unknowns that can't be determined in static method ! Call DataArray::getSlice (non static) instead !");
+        return self->buildExplicitArrOfSliceOnScaledArr((INT)strt,(INT)stp,(INT)step);
+      }
+
+      PyObject *getMinMaxValues() const
+      {
+        INT a,b;
+        self->getMinMaxValues(a,b);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,PyInt_FromLong(a));
+        PyTuple_SetItem(ret,1,PyInt_FromLong(b));
+        return ret;
+      }
+   
+      static PyObject *ConvertIndexArrayToO2N(mcIdType nbOfOldTuples, PyObject *arr, PyObject *arrI)
+      {
+        mcIdType newNbOfTuples=-1;
+        mcIdType szArr,szArrI,sw,iTypppArr,iTypppArrI;
+        std::vector<mcIdType> stdvecTyyppArr;
+        std::vector<mcIdType> stdvecTyyppArrI;
+        const mcIdType *arrPtr=convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr);
+        const mcIdType *arrIPtr=convertIntStarLikePyObjToCppIntStar(arrI,sw,szArrI,iTypppArrI,stdvecTyyppArrI);
+        DataArrayIdType *ret0=MEDCoupling::ARRAY::ConvertIndexArrayToO2N(nbOfOldTuples,arrPtr,arrIPtr,arrIPtr+szArrI,newNbOfTuples);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj((void*)ret0,SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN | 0));
+        PyTuple_SetItem(ret,1,PyInt_FromLong(newNbOfTuples));
+        return ret;
+      }
+
+      static DataArrayIdType *CheckAndPreparePermutation(PyObject *arr)
+      {
+        MCAuto<DataArrayIdType> ret(DataArrayIdType::New());
+        mcIdType szArr,sw;
+        INT iTypppArr;
+        std::vector<INT> stdvecTyyppArr;
+        const INT *arrPtr(convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr));
+        mcIdType *pt(MEDCoupling::ARRAY::CheckAndPreparePermutation(arrPtr,arrPtr+szArr));
+        ret->useArray(pt,true,MEDCoupling::DeallocType::C_DEALLOC,szArr,1);
+        return ret.retn();
+      }
+
+      void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
+      {
+        const char *msg="MEDCoupling::ARRAY::setValues : Available API are : \n-ARRAY.setValues([1,3,4])\n-ARRAY.setValues([1,3,4],3)\n-ARRAY.setValues([1,3,4,5],2,2)\n-ARRAY.New(5)\n !";
+        if(PyList_Check(li) || PyTuple_Check(li))
+          {
+            if(nbOfTuples && nbOfTuples != Py_None)
+              {
+                if(PyInt_Check(nbOfTuples))
+                  {
+                    mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(nbOfTuples));
+                    if(nbOfTuples1<0)
+                      throw INTERP_KERNEL::Exception("ARRAY::setValue : should be a positive set of allocated memory !");
+                    if(nbOfComp && nbOfComp != Py_None)
+                      {
+                        if(PyInt_Check(nbOfComp))
+                          {//ARRAY.setValues([1,3,4,5],2,2)
+                            mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfComp));
+                            if(nbOfCompo<0)
+                              throw INTERP_KERNEL::Exception("ARRAY::setValue : should be a positive number of components !");
+                            std::vector<INT> tmp=fillArrayWithPyListInt2<INT>(li,nbOfTuples1,nbOfCompo);
+                            self->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),self->getPointer());
+                          }
+                        else
+                          throw INTERP_KERNEL::Exception(msg);
+                      }
+                    else
+                      {//ARRAY.setValues([1,3,4],3)
+                        mcIdType tmpp1=-1;
+                        std::vector<INT> tmp=fillArrayWithPyListInt2<INT>(li,nbOfTuples1,tmpp1);
+                        self->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),self->getPointer());
+                      }
+                  }
+                else
+                  throw INTERP_KERNEL::Exception(msg);
+              }
+            else
+              {// ARRAY.setValues([1,3,4])
+                mcIdType tmpp1=-1,tmpp2=-1;
+                std::vector<INT> tmp=fillArrayWithPyListInt2<INT>(li,tmpp1,tmpp2);
+                self->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),self->getPointer());
+              }
+          }
+        else
+          throw INTERP_KERNEL::Exception(msg);
+      }
+
+      PyObject *getValues() const
+      {
+        const INT *vals=self->getConstPointer();
+        return convertIntArrToPyList(vals,self->getNbOfElems());
+      }
+
+      PyObject *isEqualIfNotWhy(const ARRAY& other) const
+      {
+        std::string ret1;
+        bool ret0=self->isEqualIfNotWhy(other,ret1);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret0Py=ret0?Py_True:Py_False;
+        Py_XINCREF(ret0Py);
+        PyTuple_SetItem(ret,0,ret0Py);
+        PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
+        return ret;
+      }
+
+      PyObject *getValuesAsTuple() const
+      {
+        const INT *vals=self->getConstPointer();
+        mcIdType nbOfComp=ToIdType(self->getNumberOfComponents());
+        mcIdType nbOfTuples=self->getNumberOfTuples();
+        return convertIntArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
+      }
+
+      static PyObject *MakePartition(PyObject *gps, mcIdType newNb)
+      {
+        std::vector<const ARRAY *> groups;
+        std::vector< std::vector<mcIdType> > fidsOfGroups;
+        convertFromPyObjVectorOfObj(gps,SWIGTITraits<INT>::TI,"ARRAY",groups);
+        DataArrayIdType *ret0=MEDCoupling::ARRAY::MakePartition(groups,newNb,fidsOfGroups);
+        PyObject *ret = PyList_New(2);
+        PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        std::size_t sz=fidsOfGroups.size();
+        PyObject *ret1 = PyList_New(sz);
+        for(std::size_t i=0;i<sz;i++)
+          PyList_SetItem(ret1,i,convertIntArrToPyList2(fidsOfGroups[i]));
+        PyList_SetItem(ret,1,ret1);
+        return ret;
+      }
+
+      DataArrayIdType *findIdsEqualList(PyObject *obj)
+      {
+        mcIdType sw;
+        INT singleVal;
+        std::vector<INT> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        ARRAY *daIntTyypp=0;
+        convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw)
+          {
+          case 1:
+            return self->findIdsEqualList(&singleVal,&singleVal+1);
+          case 2:
+            return self->findIdsEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
+          case 4:
+            return self->findIdsEqualList(daIntTyypp->begin(),daIntTyypp->end());
+          default:
+            throw INTERP_KERNEL::Exception("ARRAY::findIdsEqualList : unrecognized type entered, expected list of int, tuple of int or ARRAY !");
+          }
+      }
+
+      DataArrayIdType *findIdsNotEqualList(PyObject *obj)
+      {
+        mcIdType sw;
+        INT singleVal;
+        std::vector<INT> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        ARRAY *daIntTyypp=0;
+        convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw)
+          {
+          case 1:
+            return self->findIdsNotEqualList(&singleVal,&singleVal+1);
+          case 2:
+            return self->findIdsNotEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
+          case 4:
+            return self->findIdsNotEqualList(daIntTyypp->begin(),daIntTyypp->end());
+          default:
+            throw INTERP_KERNEL::Exception("ARRAY::findIdsNotEqualList : unrecognized type entered, expected list of int, tuple of int or ARRAY !");
+          }
+      }
+
+      PyObject *splitByValueRange(PyObject *li) const
+      {
+        ARRAY *ret0=0,*ret1=0,*ret2=0;
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<INT>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<INT> tmp=convertPyToNewIntArr2<INT>(li,&size);
+            self->splitByValueRange(tmp,(INT *)tmp+size,ret0,ret1,ret2);
+          }
+        else
+          {
+            ARRAY *da2=reinterpret_cast< ARRAY * >(da);
+            if(!da2)
+              throw INTERP_KERNEL::Exception("Not null ARRAY instance expected !");
+            da2->checkAllocated();
+            self->splitByValueRange(da2->begin(),da2->end(),ret0,ret1,ret2);
+          }
+        PyObject *ret = PyList_New(3);
+        PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 ));
+        PyList_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 ));
+        PyList_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
+      DataArrayIdType *transformWithIndArrR(PyObject *li) const
+      {
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<INT>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<INT> tmp=convertPyToNewIntArr2<INT>(li,&size);
+            return self->transformWithIndArrR(tmp,tmp+size);
+          }
+        else
+          {
+            ARRAY *da2=reinterpret_cast< ARRAY * >(da);
+            return self->transformWithIndArrR(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
+          }
+      }
+
+      ARRAY *renumberAndReduce(PyObject *li, mcIdType newNbOfTuple)
+      {
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberAndReduce(tmp,newNbOfTuple);
+          }
+        else
+          {
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
+            if(!da2)
+              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+            da2->checkAllocated();
+            mcIdType size=self->getNumberOfTuples();
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
+          }
+      }
+
+      ARRAY *renumber(PyObject *li)
+      {
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumber(tmp);
+          }
+        else
+          {
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
+            if(!da2)
+              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+            da2->checkAllocated();
+            mcIdType size=self->getNumberOfTuples();
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumber(da2->getConstPointer());
+          }
+      }
+
+      ARRAY *renumberR(PyObject *li)
+      {
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberR(tmp);
+          }
+        else
+          {
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
+            if(!da2)
+              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+            da2->checkAllocated();
+            mcIdType size=self->getNumberOfTuples();
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberR(da2->getConstPointer());
+          }
+      }
+
+      void setSelectedComponents(const ARRAY *a, PyObject *li)
+      {
+        std::vector<std::size_t> tmp;
+        convertPyToNewIntArr3(li,tmp);
+        self->setSelectedComponents(a,tmp);
+      }
+
+      PyObject *explodeComponents() const
+      {
+        std::vector< MCAuto<ARRAY> > retCpp(self->explodeComponents());
+        std::size_t sz(retCpp.size());
+        PyObject *res(PyList_New(sz));
+        for(std::size_t i=0;i<sz;i++)
+          PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i].retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        return res;
+      }
+
+      PyObject *getTuple(mcIdType tupleId)
+      {
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
+        INTERP_KERNEL::AutoPtr<INT> tmp=new INT[sz];
+        self->getTuple(tupleId,tmp);
+        return convertIntArrToPyList((const INT*)tmp,sz);
+      }
+
+      PyObject *changeSurjectiveFormat(INT targetNb) const
+      {
+        DataArrayIdType *arr=0;
+        DataArrayIdType *arrI=0;
+        self->changeSurjectiveFormat(targetNb,arr,arrI);
+        PyObject *res = PyList_New(2);
+        PyList_SetItem(res,0,SWIG_NewPointerObj((void*)arr,SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN | 0));
+        PyList_SetItem(res,1,SWIG_NewPointerObj((void*)arrI,SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN | 0));
+        return res;
+      }
+
+      static ARRAY *Meld(PyObject *li)
+      {
+        std::vector<const ARRAY *> tmp;
+        convertFromPyObjVectorOfObj(li,SWIGTITraits<INT>::TI,"ARRAY",tmp);
+        return ARRAY::Meld(tmp);
+      }
+
+      static ARRAY *Aggregate(PyObject *li)
+      {
+        std::vector<const ARRAY *> tmp;
+        convertFromPyObjVectorOfObj(li,SWIGTITraits<INT>::TI,"ARRAY",tmp);
+        return ARRAY::Aggregate(tmp);
+      }
+
+      static ARRAY *AggregateIndexes(PyObject *li)
+      {
+        std::vector<const ARRAY *> tmp;
+        convertFromPyObjVectorOfObj(li,SWIGTITraits<INT>::TI,"ARRAY",tmp);
+        return ARRAY::AggregateIndexes(tmp);
+      }
+
+      static ARRAY *BuildUnion(PyObject *li)
+      {
+        std::vector<const ARRAY *> tmp;
+        convertFromPyObjVectorOfObj(li,SWIGTITraits<INT>::TI,"ARRAY",tmp);
+        return ARRAY::BuildUnion(tmp);
+      }
+
+      static ARRAY *BuildIntersection(PyObject *li)
+      {
+        std::vector<const ARRAY *> tmp;
+        convertFromPyObjVectorOfObj(li,SWIGTITraits<INT>::TI,"ARRAY",tmp);
+        return ARRAY::BuildIntersection(tmp);
+      }
+
+      PyObject *getMaxValue() const
+      {
+        mcIdType tmp;
+        INT r1=self->getMaxValue(tmp);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
+        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
+        return ret;
+      }
+    
+      PyObject *getMaxAbsValue(std::size_t& tupleId) const
+      {
+       std::size_t tmp;
+        INT r1=self->getMaxAbsValue(tmp);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
+        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
+        return ret;
+      }
+
+      PyObject *getMinValue() const
+      {
+        mcIdType tmp;
+        INT r1=self->getMinValue(tmp);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
+        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
+        return ret;
+      }
+
+      mcIdType index(PyObject *obj) const
+      {
+        std::size_t nbOfCompo=self->getNumberOfComponents();
+        switch(nbOfCompo)
+          {
+          case 1:
+            {
+              if(PyInt_Check(obj))
+                {
+                  INT val=(INT)PyInt_AS_LONG(obj);
+                  return self->findIdFirstEqual(val);
+                }
+              else
+                throw INTERP_KERNEL::Exception("ARRAY::index : 'this' contains one component and trying to find an element which is not an integer !");
+            }
+          default:
+            {
+              std::vector<INT> arr;
+              convertPyToNewIntArr3(obj,arr);
+              return self->findIdFirstEqualTuple(arr);
+            }
+          }
+      }
+
+      bool __contains__(PyObject *obj) const
+      {
+        std::size_t nbOfCompo=self->getNumberOfComponents();
+        switch(nbOfCompo)
+          {
+          case 0:
+            return false;
+          case 1:
+            {
+              if(PyInt_Check(obj))
+                {
+                  INT val=(INT)PyInt_AS_LONG(obj);
+                  return self->presenceOfValue(val);
+                }
+              else
+                throw INTERP_KERNEL::Exception("ARRAY::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
+            }
+          default:
+            {
+              std::vector<INT> arr;
+              convertPyToNewIntArr3(obj,arr);
+              return self->presenceOfTuple(arr);
+            }
+          }
+      }
+
+      PyObject *__getitem__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in ARRAY::__getitem__ !";
+        const char msg2[]="ARRAY::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
+        self->checkAllocated();
+        mcIdType nbOfTuples=self->getNumberOfTuples();
+        std::size_t nbOfComponents=self->getNumberOfComponents();
+        mcIdType it1;
+        std::size_t ic1;
+        std::vector<mcIdType> vt1;
+        std::vector<std::size_t> vc1;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > pt1,pc1;
+        DataArrayIdType *dt1=0,*dc1=0;
+        mcIdType sw;
+        convertObjToPossibleCpp3(obj,nbOfTuples,(int)nbOfComponents,sw,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
+        MCAuto<ARRAY> ret;
+        switch(sw)
+          {
+          case 1:
+            {
+              if(nbOfComponents==1)
+                return PyInt_FromLong(self->getIJSafe(it1,0));
+              return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&it1,&it1+1)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 2:
+            return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size())),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+          case 3:
+            return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+          case 4:
+            return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems())),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+          case 5:
+            return PyInt_FromLong(self->getIJSafe(it1,ic1));
+          case 6:
+            {
+              ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
+              std::vector<std::size_t> v2(1,ic1);
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 7:
+            {
+              ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
+              std::vector<std::size_t> v2(1,ic1);
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 8:
+            {
+              ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
+              std::vector<std::size_t> v2(1,ic1);
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 9:
+            {
+              ret=self->selectByTupleIdSafe(&it1,&it1+1);
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 10:
+            {
+              ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 11:
+            {
+              ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 12:
+            {
+              ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 13:
+            {
+              ret=self->selectByTupleIdSafe(&it1,&it1+1);
+              mcIdType nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
+              std::vector<std::size_t> v2(nbOfComp);
+              for(INT i=0;i<nbOfComp;i++)
+                v2[i]=pc1.first+i*pc1.second.second;
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 14:
+            {
+              ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
+              mcIdType nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
+              std::vector<std::size_t> v2(nbOfComp);
+              for(INT i=0;i<nbOfComp;i++)
+                v2[i]=pc1.first+i*pc1.second.second;
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 15:
+            {
+              ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
+              mcIdType nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
+              std::vector<std::size_t> v2(nbOfComp);
+              for(mcIdType i=0;i<nbOfComp;i++)
+                v2[i]=pc1.first+i*pc1.second.second;
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          case 16:
+            {
+              ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
+              mcIdType nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
+              std::vector<std::size_t> v2(nbOfComp);
+              for(INT i=0;i<nbOfComp;i++)
+                v2[i]=pc1.first+i*pc1.second.second;
+              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 );
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__setitem__(PyObject *obj, PyObject *value)
+      {
+        self->checkAllocated();
+        const char msg[]="Unexpected situation in __setitem__ !";
+        mcIdType nbOfTuples=self->getNumberOfTuples();
+        int nbOfComponents=(int)self->getNumberOfComponents();
+        mcIdType sw1,sw2;
+        INT i1;
+        std::vector<INT> v1;
+        ARRAY *d1=0;
+        ARRAY ## Tuple *dd1=0;
+        convertIntStarLikePyObjToCpp(value,sw1,i1,v1,d1,dd1);
+        mcIdType it1,ic1;
+        std::vector<mcIdType> vt1,vc1;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > pt1,pc1;
+        DataArrayIdType *dt1=0,*dc1=0;
+        convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
+        MCAuto<ARRAY> tmp;
+        switch(sw2)
+          {
+          case 1:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple1(i1,it1,it1+1,1,0,nbOfComponents,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues1(d1,it1,it1+1,1,0,nbOfComponents,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 2:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 3:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 4:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 5:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple1(i1,it1,it1+1,1,ic1,ic1+1,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues1(d1,it1,it1+1,1,ic1,ic1+1,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 6:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 7:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 8:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 9:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple2(i1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size(),false);
+                  return self;
+                case 3:
+                  self->setPartOfValues2(d1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 10:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple2(i1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size(),false);
+                  return self;
+                case 3:
+                  self->setPartOfValues2(d1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 11:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple4(i1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size(),false);
+                  return self;
+                case 3:
+                  self->setPartOfValues4(d1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 12:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple2(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size(),false);
+                  return self;
+                case 3:
+                  self->setPartOfValues2(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 13:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple1(i1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues1(d1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 14:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 15:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          case 16:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 2:
+                  tmp=ARRAY::New();
+                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
+                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second,false);
+                  return self;
+                case 3:
+                  self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                case 4:
+                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
+                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
+                  return self;
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+              break;
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+        return self;
+      }
+
+      ARRAY *__neg__() const
+      {
+        return self->negate();
+      }
+      ARRAY *__add__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __add__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyLin(1,val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Add(self,aaaa);
+            }
+          case 3:
+            {
+              return ARRAY::Add(self,a);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Add(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__radd__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __radd__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyLin(1,val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Add(self,aaaa);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Add(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      PyObject *___iadd___(PyObject *trueSelf, PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __iadd__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              self->applyLin(1,val);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> bb=ARRAY::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              self->addEqual(bb);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 3:
+            {
+              self->addEqual(a);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              self->addEqual(aaaa);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__sub__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __sub__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyLin(1,-val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Substract(self,aaaa);
+            }
+          case 3:
+            {
+              return ARRAY::Substract(self,a);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Substract(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__rsub__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __rsub__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyLin(-1,val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Substract(aaaa,self);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Substract(aaaa,self);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      PyObject *___isub___(PyObject *trueSelf, PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __isub__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              self->applyLin(1,-val);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> bb=ARRAY::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              self->substractEqual(bb);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 3:
+            {
+              self->substractEqual(a);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              self->substractEqual(aaaa);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__mul__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __mul__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyLin(val,0);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Multiply(self,aaaa);
+            }
+          case 3:
+            {
+              return ARRAY::Multiply(self,a);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Multiply(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__rmul__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __rmul__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyLin(val,0);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Multiply(self,aaaa);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Multiply(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      PyObject *___imul___(PyObject *trueSelf, PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __imul__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              self->applyLin(val,0);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> bb=ARRAY::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              self->multiplyEqual(bb);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 3:
+            {
+              self->multiplyEqual(a);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              self->multiplyEqual(aaaa);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__div__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __div__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyDivideBy(val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Divide(self,aaaa);
+            }
+          case 3:
+            {
+              return ARRAY::Divide(self,a);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Divide(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__rdiv__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __rdiv__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyInv(val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Divide(aaaa,self);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Divide(aaaa,self);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      PyObject *___idiv___(PyObject *trueSelf, PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __idiv__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              self->applyDivideBy(val);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> bb=ARRAY::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              self->divideEqual(bb);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 3:
+            {
+              self->divideEqual(a);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              self->divideEqual(aaaa);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__mod__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __mod__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyModulus(val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Modulus(self,aaaa);
+            }
+          case 3:
+            {
+              return ARRAY::Modulus(self,a);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Modulus(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__rmod__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __rmod__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyRModulus(val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Modulus(aaaa,self);
+            }
+          case 3:
+            {
+              return ARRAY::Modulus(a,self);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Modulus(aaaa,self);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      PyObject *___imod___(PyObject *trueSelf, PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __imod__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              self->applyModulus(val);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 3:
+            {
+              self->modulusEqual(a);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              self->modulusEqual(aaaa);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__pow__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __pow__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyPow(val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Pow(self,aaaa);
+            }
+          case 3:
+            {
+              return ARRAY::Pow(self,a);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Pow(self,aaaa);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      ARRAY *__rpow__(PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __rpow__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              MCAuto<ARRAY> ret=self->deepCopy();
+              ret->applyRPow(val);
+              return ret.retn();
+            }
+          case 2:
+            {
+              MCAuto<ARRAY> aaaa=ARRAY::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,aa.size());
+              return ARRAY::Pow(aaaa,self);
+            }
+          case 3:
+            {
+              return ARRAY::Pow(a,self);
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              return ARRAY::Pow(aaaa,self);
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+   
+      PyObject *___ipow___(PyObject *trueSelf, PyObject *obj)
+      {
+        const char msg[]="Unexpected situation in __ipow__ !";
+        INT val;
+        ARRAY *a;
+        std::vector<INT> aa;
+        ARRAY ## Tuple *aaa;
+        mcIdType sw;
+        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
+        switch(sw)
+          {
+          case 1:
+            {
+              self->applyPow(val);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 3:
+            {
+              self->powEqual(a);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          case 4:
+            {
+              MCAuto<ARRAY> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
+              self->powEqual(aaaa);
+              Py_XINCREF(trueSelf);
+              return trueSelf;
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+
+      std::string __repr__() const
+      {
+        std::ostringstream oss;
+        self->reprQuickOverview(oss);
+        return oss.str();
+      }
+      
+      void pushBackValsSilent(PyObject *li)
+      {
+        mcIdType szArr,sw;
+        INT iTypppArr;
+        std::vector<INT> stdvecTyyppArr;
+        const INT *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        self->pushBackValsSilent(tmp,tmp+szArr);
+      }
+      
+      PyObject *partitionByDifferentValues() const
+      {
+        std::vector<INT> ret1;
+        std::vector<DataArrayIdType *> ret0=self->partitionByDifferentValues(ret1);
+        std::size_t sz=ret0.size();
+        PyObject *pyRet=PyTuple_New(2);
+        PyObject *pyRet0=PyList_New((INT)sz);
+        PyObject *pyRet1=PyList_New((INT)sz);
+        for(std::size_t i=0;i<sz;i++)
+          {
+            PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+            PyList_SetItem(pyRet1,i,PyInt_FromLong(ret1[i]));
+          }
+        PyTuple_SetItem(pyRet,0,pyRet0);
+        PyTuple_SetItem(pyRet,1,pyRet1);
+        return pyRet;
+      }
+      
+      PyObject *findIdsRangesInListOfIds(const ARRAY *listOfIds) const
+      {
+        DataArrayIdType *ret0=0;
+        ARRAY *ret1=0;
+        self->findIdsRangesInListOfIds(listOfIds,ret0,ret1);
+        PyObject *pyRet=PyTuple_New(2);
+        PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<INT>::TI, SWIG_POINTER_OWN | 0 ));
+        return pyRet;
+      }
+
+      PyObject *isRange() const
+      {
+        INT a(0),b(0),c(0);
+        bool ret(self->isRange(a,b,c));
+        PyObject *pyRet=PyTuple_New(2);
+        PyObject *ret0Py=ret?Py_True:Py_False,*ret1Py(0);
+        Py_XINCREF(ret0Py);
+        PyTuple_SetItem(pyRet,0,ret0Py);
+        if(ret)
+          ret1Py=PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(c));
+        else
+          {
+            ret1Py=Py_None;
+            Py_XINCREF(ret1Py);
+          }
+        PyTuple_SetItem(pyRet,1,ret1Py);
+        return pyRet;
+      }
+
+      static bool RemoveIdsFromIndexedArrays(PyObject *li, ARRAY *arr, DataArrayIdType *arrIndx, mcIdType offsetForRemoval=0) throw(INTERP_KERNEL::Exception)
+      {
+        mcIdType sw;
+        INT singleVal;
+        std::vector<INT> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::ARRAY *daIntTyypp=0;
+        if(!arrIndx)
+          throw INTERP_KERNEL::Exception("ARRAY::RemoveIdsFromIndexedArrays : null pointer as arrIndex !");
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndx->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw)
+          {
+          case 1:
+            return ARRAY::RemoveIdsFromIndexedArrays(&singleVal,&singleVal+1,arr,arrIndx,offsetForRemoval);
+          case 2:
+            return ARRAY::RemoveIdsFromIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arr,arrIndx,offsetForRemoval);
+          case 4:
+            return ARRAY::RemoveIdsFromIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arr,arrIndx,offsetForRemoval);
+          default:
+            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::RemoveIdsFromIndexedArrays : unrecognized type entered, expected list of int, tuple of int or ARRAY !");
+          }
+      }
+
+      static PyObject *ExtractFromIndexedArrays(PyObject *li, const ARRAY *arrIn, const DataArrayIdType *arrIndxIn) throw(INTERP_KERNEL::Exception)
+      {
+        ARRAY *arrOut=0;
+        DataArrayIdType *arrIndexOut=0;
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
+        if(!arrIndxIn)
+          throw INTERP_KERNEL::Exception("ARRAY::ExtractFromIndexedArrays : null pointer as arrIndxIn !");
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw)
+          {
+          case 1:
+            {
+              ARRAY::ExtractFromIndexedArrays(&singleVal,&singleVal+1,arrIn,arrIndxIn,arrOut,arrIndexOut);
+              break;
+            }
+          case 2:
+            {
+              ARRAY::ExtractFromIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,arrOut,arrIndexOut);
+              break;
+            }
+          case 4:
+            {
+              ARRAY::ExtractFromIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,arrOut,arrIndexOut);
+              break;
+            }
+          default:
+            throw INTERP_KERNEL::Exception("ARRAY::ExtractFromIndexedArrays : unrecognized type entered, expected list of int, tuple of int or ARRAY !");
+          }
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
+      static PyObject *ExtractFromIndexedArraysSlice(mcIdType strt, mcIdType stp, mcIdType step, const ARRAY *arrIn, const DataArrayIdType *arrIndxIn) throw(INTERP_KERNEL::Exception)
+      {
+        ARRAY *arrOut=0;
+        DataArrayIdType *arrIndexOut=0;
+        ARRAY::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
+      static PyObject *ExtractFromIndexedArraysSlice(PyObject *slic, const ARRAY *arrIn, const DataArrayIdType *arrIndxIn) throw(INTERP_KERNEL::Exception)
+      {
+        if(!PySlice_Check(slic))
+          throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : the first param is not a pyslice !");
+        Py_ssize_t strt=2,stp=2,step=2;
+        if(!arrIndxIn)
+          throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : last array is null !");
+        arrIndxIn->checkAllocated();
+        if(arrIndxIn->getNumberOfComponents()!=1)
+          throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : number of components of last argument must be equal to one !");
+        GetIndicesOfSlice(slic,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step,"ExtractFromIndexedArraysSlice (wrap) : Invalid slice regarding nb of elements !");
+        ARRAY *arrOut=0;
+        DataArrayIdType *arrIndexOut=0;
+        ARRAY::ExtractFromIndexedArraysSlice(ToIdType(strt),ToIdType(stp),ToIdType(step),arrIn,arrIndxIn,arrOut,arrIndexOut);
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
+      static PyObject *SetPartOfIndexedArrays(PyObject *li,
+                                              const ARRAY *arrIn, const DataArrayIdType *arrIndxIn,
+                                              const ARRAY *srcArr, const DataArrayIdType *srcArrIndex) throw(INTERP_KERNEL::Exception)
+      {
+        ARRAY *arrOut=0;
+        DataArrayIdType *arrIndexOut=0;
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
+        if(!arrIndxIn)
+          throw INTERP_KERNEL::Exception("ARRAY::SetPartOfIndexedArrays : null pointer as arrIndex !");
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw)
+          {
+          case 1:
+            {
+              ARRAY::SetPartOfIndexedArrays(&singleVal,&singleVal+1,arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
+              break;
+            }
+          case 2:
+            {
+              ARRAY::SetPartOfIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
+              break;
+            }
+          case 4:
+            {
+              ARRAY::SetPartOfIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
+              break;
+            }
+          default:
+            throw INTERP_KERNEL::Exception("ARRAY::SetPartOfIndexedArrays : unrecognized type entered, expected list of int, tuple of int or ARRAY !");
+          }
+        PyObject *ret=PyTuple_New(2);
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        return ret;
+      }
+
+      static void SetPartOfIndexedArraysSameIdx(PyObject *li, ARRAY *arrIn, const DataArrayIdType *arrIndxIn,
+                                                const ARRAY *srcArr, const DataArrayIdType *srcArrIndex) throw(INTERP_KERNEL::Exception)
+      {
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
+        if(!arrIndxIn)
+          throw INTERP_KERNEL::Exception("ARRAY::SetPartOfIndexedArraysSameIdx : null pointer as arrIndex !");
+        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw)
+          {
+          case 1:
+            {
+              ARRAY::SetPartOfIndexedArraysSameIdx(&singleVal,&singleVal+1,arrIn,arrIndxIn,srcArr,srcArrIndex);
+              break;
+            }
+          case 2:
+            {
+              ARRAY::SetPartOfIndexedArraysSameIdx(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,srcArr,srcArrIndex);
+              break;
+            }
+          case 4:
+            {
+              ARRAY::SetPartOfIndexedArraysSameIdx(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,srcArr,srcArrIndex);
+              break;
+            }
+          default:
+            throw INTERP_KERNEL::Exception("ARRAY::SetPartOfIndexedArraysSameIdx : unrecognized type entered, expected list of int, tuple of int or ARRAY !");
+          }
+      }
+
+    } // end extent
+  };
+
+  class ARRAY ## Tuple;
+
+  class ARRAY ## Iterator
+  {
+  public:
+    ARRAY ## Iterator(ARRAY *da);
+    ~ARRAY ## Iterator();
+    %extend
+    {
+      PyObject *next()
+      {
+        ARRAY ## Tuple *ret=self->nextt();
+        if(ret)
+          return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__ ## ARRAY ## Tuple,SWIG_POINTER_OWN | 0);
+        else
+          {
+            PyErr_SetString(PyExc_StopIteration,"No more data.");
+            return 0;
+          }
+      }
+    }
+  };
+
+  class ARRAY ## Tuple
+  {
+  public:
+    std::size_t getNumberOfCompo() const;
+    ARRAY *buildDAInt(INT nbOfTuples, INT nbOfCompo) const;
+    %extend
+    {
+      std::string __str__() const
+      {
+        return self->repr();
+      }
+
+      INT __int__() const
+      {
+        return self->intValue();
+      }
+
+      ARRAY *buildDAInt()
+      {
+        return self->buildDAInt(1,self->getNumberOfCompo());
+      }
+
+      PyObject *___iadd___(PyObject *trueSelf, PyObject *obj)
+      {
+        MCAuto<ARRAY> ret=self->buildDAInt(1,self->getNumberOfCompo());
+        MEDCoupling_ ## ARRAY ## ____iadd___(ret,0,obj);
+        Py_XINCREF(trueSelf);
+        return trueSelf;
+      }
+  
+      PyObject *___isub___(PyObject *trueSelf, PyObject *obj)
+      {
+        MCAuto<ARRAY> ret=self->buildDAInt(1,self->getNumberOfCompo());
+        MEDCoupling_ ## ARRAY ## ____isub___(ret,0,obj);
+        Py_XINCREF(trueSelf);
+        return trueSelf;
+      }
+  
+      PyObject *___imul___(PyObject *trueSelf, PyObject *obj)
+      {
+        MCAuto<ARRAY> ret=self->buildDAInt(1,self->getNumberOfCompo());
+        MEDCoupling_ ## ARRAY ## ____imul___(ret,0,obj);
+        Py_XINCREF(trueSelf);
+        return trueSelf;
+      }
+      PyObject *___idiv___(PyObject *trueSelf, PyObject *obj)
+      {
+        MCAuto<ARRAY> ret=self->buildDAInt(1,self->getNumberOfCompo());
+        MEDCoupling_ ## ARRAY ## ____idiv___(ret,0,obj);
+        Py_XINCREF(trueSelf);
+        return trueSelf;
+      }
+
+      PyObject *___imod___(PyObject *trueSelf, PyObject *obj)
+      {
+        MCAuto<ARRAY> ret=self->buildDAInt(1,self->getNumberOfCompo());
+        MEDCoupling_ ## ARRAY ## ____imod___(ret,0,obj);
+        Py_XINCREF(trueSelf);
+        return trueSelf;
+      }
+
+      PyObject *__len__()
+      {
+        return PyInt_FromLong(self->getNumberOfCompo());
+      }
+  
+      PyObject *__getitem__(PyObject *obj)
+      {
+        const char msg2[]="ARRAY ## Tuple::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
+        mcIdType sw;
+        INT singleVal;
+        std::vector<INT> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
+        const INT *pt=self->getConstPointer();
+        INT nbc=(INT)self->getNumberOfCompo();
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,ToIdType(nbc),sw,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw)
+          {
+          case 1:
+            {
+              if(singleVal>=(INT)nbc)
+                {
+                  std::ostringstream oss;
+                  oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
+                  PyErr_SetString(PyExc_StopIteration,oss.str().c_str());
+                  return 0;
+                }
+              if(singleVal>=0)
+                return PyInt_FromLong(pt[singleVal]);
+              else
+                {
+                  if(nbc+singleVal>0)
+                    return PyInt_FromLong(pt[nbc+singleVal]);
+                  else
+                    {
+                      std::ostringstream oss;
+                      oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
+                      throw INTERP_KERNEL::Exception(oss.str().c_str());
+                    }
+                }
+            }
+          case 2:
+            {
+              PyObject *t=PyTuple_New(multiVal.size());
+              for(std::size_t j=0;j<multiVal.size();j++)
+                {
+                  INT cid=multiVal[j];
+                  if(cid>=(INT)nbc)
+                    {
+                      std::ostringstream oss;
+                      oss << "Requesting for id #" << cid << " having only " << nbc << " components !";
+                      throw INTERP_KERNEL::Exception(oss.str().c_str());
+                    }
+                  PyTuple_SetItem(t,j,PyInt_FromLong(pt[cid]));
+                }
+              return t;
+            }
+          case 3:
+            {
+              mcIdType sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
+              PyObject *t=PyTuple_New(sz);
+              for(INT j=0;j<sz;j++)
+                PyTuple_SetItem(t,j,PyInt_FromLong(pt[slic.first+j*slic.second.second]));
+              return t;
+            }
+          default:
+            throw INTERP_KERNEL::Exception("ARRAY ## Tuple::__getitem__ : unrecognized type entered !");
+          }
+      }
+
+      ARRAY ## Tuple *__setitem__(PyObject *obj, PyObject *value)
+      {
+        const char msg[]="DataArrayIntTuple::__setitem__ : unrecognized type entered, int, slice, list<int>, tuple<int> !";
+        const char msg2[]="DataArrayIntTuple::__setitem__ : Mismatch of slice values in 2nd parameter (components) !";
+        mcIdType sw1,sw2;
+        mcIdType singleValV;
+        std::vector<mcIdType> multiValV;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slicV;
+        MEDCoupling::ARRAY ## Tuple *daIntTyyppV=0;
+        mcIdType nbc=ToIdType(self->getNumberOfCompo());
+        convertObjToPossibleCpp22<INT>(value,nbc,sw1,singleValV,multiValV,slicV,daIntTyyppV);
+        INT singleVal;
+        std::vector<INT> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::ARRAY *daIntTyypp=0;
+        INT *pt=self->getPointer();
+        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
+        switch(sw2)
+          {
+          case 1:
+            {
+              if(singleVal>=nbc)
+                {
+                  std::ostringstream oss;
+                  oss << "Requesting for setting id # " << singleVal << " having only " << nbc << " components !";
+                  throw INTERP_KERNEL::Exception(oss.str().c_str());
+                }
+              switch(sw1)
+                {
+                case 1:
+                  {
+                    pt[singleVal]=(INT)singleValV;
+                    return self;
+                  }
+                case 2:
+                  {
+                    if(multiValV.size()!=1)
+                      {
+                        std::ostringstream oss;
+                        oss << "Requesting for setting id # " << singleVal << " with a list or tuple with size != 1 ! ";
+                        throw INTERP_KERNEL::Exception(oss.str().c_str());
+                      }
+                    pt[singleVal]=(INT)multiValV[0];
+                    return self;
+                  }
+                case 4:
+                  {
+                    pt[singleVal]=daIntTyyppV->getConstPointer()[0];
+                    return self;
+                  }
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+            }
+          case 2:
+            {
+              switch(sw1)
+                {
+                case 1:
+                  {
+                    for(std::vector<INT>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
+                      {
+                        if(*it>=nbc)
+                          {
+                            std::ostringstream oss;
+                            oss << "Requesting for setting id # " << *it << " having only " << nbc << " components !";
+                            throw INTERP_KERNEL::Exception(oss.str().c_str());
+                          }
+                        pt[*it]=(INT)singleValV;
+                      }
+                    return self;
+                  }
+                case 2:
+                  {
+                    if(multiVal.size()!=multiValV.size())
+                      {
+                        std::ostringstream oss;
+                        oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << multiVal.size() << " !";
+                        throw INTERP_KERNEL::Exception(oss.str().c_str());
+                      }
+                    for(INT i=0;i<(INT)multiVal.size();i++)
+                      {
+                        INT pos=multiVal[i];
+                        if(pos>=nbc)
+                          {
+                            std::ostringstream oss;
+                            oss << "Requesting for setting id # " << pos << " having only " << nbc << " components !";
+                            throw INTERP_KERNEL::Exception(oss.str().c_str());
+                          }
+                        pt[multiVal[i]]=(INT)multiValV[i];
+                      }
+                    return self;
+                  }
+                case 4:
+                  {
+                    const INT *ptV=daIntTyyppV->getConstPointer();
+                    if(nbc>(INT)daIntTyyppV->getNumberOfCompo())
+                      {
+                        std::ostringstream oss;
+                        oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
+                        throw INTERP_KERNEL::Exception(oss.str().c_str());
+                      }
+                    std::copy(ptV,ptV+nbc,pt);
+                    return self;
+                  }
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+            }
+          case 3:
+            {
+              std::size_t sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
+              switch(sw1)
+                {
+                case 1:
+                  {
+                    for(std::size_t j=0;j<sz;j++)
+                      pt[slic.first+j*slic.second.second]=(INT)singleValV;
+                    return self;
+                  }
+                case 2:
+                  {
+                    if(sz!=multiValV.size())
+                      {
+                        std::ostringstream oss;
+                        oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << sz << " !";
+                        throw INTERP_KERNEL::Exception(oss.str().c_str());
+                      }
+                    for(std::size_t j=0;j<sz;j++)
+                      pt[slic.first+j*slic.second.second]=(INT)multiValV[j];
+                    return self;
+                  }
+                case 4:
+                  {
+                    const INT *ptV=daIntTyyppV->getConstPointer();
+                    if(sz>daIntTyyppV->getNumberOfCompo())
+                      {
+                        std::ostringstream oss;
+                        oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
+                        throw INTERP_KERNEL::Exception(oss.str().c_str());
+                      }
+                    for(std::size_t j=0;j<sz;j++)
+                      pt[slic.first+j*slic.second.second]=ptV[j];
+                    return self;
+                  }
+                default:
+                  throw INTERP_KERNEL::Exception(msg);
+                }
+            }
+          default:
+            throw INTERP_KERNEL::Exception(msg);
+          }
+      }
+    }
+//   };
+// }
+%enddef
+
+
+%define TRANSFORMWITHINDARR( ARRAY, INT )
+void transformWithIndArr(PyObject *li)
+{
+  void *da=0;
+  int res1(SWIG_ConvertPtr(li,&da,SWIGTITraits<INT>::TI, 0 |  0 ));
+  if (!SWIG_IsOK(res1))
+    {
+      int res2(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__MapII, 0 |  0 ));
+      if(SWIG_IsOK(res2))
+        {
+          MapII *m=reinterpret_cast<MapII *>(da);
+          self->transformWithIndArr(*m);
+        }
+      else
+        {
+          mcIdType size;
+          INTERP_KERNEL::AutoPtr<INT> tmp=convertPyToNewIntArr2<INT>(li,&size);
+          self->transformWithIndArr(tmp,tmp+size);
+        }
+    }
+  else
+    {
+      ARRAY *da2=reinterpret_cast< ARRAY * >(da);
+      self->transformWithIndArr(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
+    }
+}
+%enddef
+
+namespace MEDCoupling
+{
+  typedef int      Int32;
+  typedef long int Int64;
+
+
+  class DataArrayInt32Iterator;
+
+  class DataArrayInt32 : public DataArray
+  {
+    ARRAYDEF( DataArrayInt32, Int32 )
+  };
+  %extend DataArrayInt32 {
+#ifdef WITH_NUMPY
+    PyObject *toNumPyArray() // not const. It is not a bug !
+    {
+      return ToNumPyArray<DataArrayInt32,MEDCoupling::Int32>(self,NPY_INT32,"DataArrayInt32");
+    }
+#endif
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+    MCAuto< MapII > invertArrayN2O2O2NOptimized()
+    {
+      return self->invertArrayN2O2O2NOptimized();
+    }
+    MCAuto< MapII > giveN2OOptimized()
+    {
+      return self->giveN2OOptimized();
+    }
+    TRANSFORMWITHINDARR( DataArrayInt32, Int32 )
+#endif
+  };
+  
+  class DataArrayInt64Iterator;
+
+  class DataArrayInt64 : public DataArray
+  {
+    ARRAYDEF( DataArrayInt64, Int64 )
+  };
+  %extend DataArrayInt64 {
+#ifdef WITH_NUMPY
+    PyObject *toNumPyArray() // not const. It is not a bug !
+    {
+      return ToNumPyArray<DataArrayInt64,MEDCoupling::Int64>(self,NPY_INT64,"DataArrayInt64");
+    }
+#endif
+#ifdef MEDCOUPLING_USE_64BIT_IDS
+    MCAuto< MapII > invertArrayN2O2O2NOptimized()
+    {
+      return self->invertArrayN2O2O2NOptimized();
+    }
+    MCAuto< MapII > giveN2OOptimized()
+    {
+      return self->giveN2OOptimized();
+    }
+    TRANSFORMWITHINDARR( DataArrayInt64, Int64 )
+#endif
+  };
+
+}
index 57ae1cd4884f1709a9f7993c3d225fa6ee1f6e0e..7c2ef3baf2fb2a20e12f1b0c78879d4fc8d29387 100644 (file)
@@ -56,24 +56,42 @@ def MEDCouplingFieldDoubleIdiv(self,*args):
 def MEDCouplingFieldDoubleIpow(self,*args):
     import _MEDCoupling
     return _MEDCoupling.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def MEDCouplingDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayInt32Iadd(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayInt____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntIsub(self,*args):
+    return _MEDCoupling.DataArrayInt32____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32Isub(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayInt____isub___(self, self, *args)
-def MEDCouplingDataArrayIntImul(self,*args):
+    return _MEDCoupling.DataArrayInt32____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32Imul(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayInt____imul___(self, self, *args)
-def MEDCouplingDataArrayIntIdiv(self,*args):
+    return _MEDCoupling.DataArrayInt32____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32Idiv(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayInt____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntImod(self,*args):
+    return _MEDCoupling.DataArrayInt32____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32Imod(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayInt____imod___(self, self, *args)
-def MEDCouplingDataArrayIntIpow(self,*args):
+    return _MEDCoupling.DataArrayInt32____imod___(self, self, *args)
+def MEDCouplingDataArrayInt32Ipow(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayInt____ipow___(self, self, *args)
+    return _MEDCoupling.DataArrayInt32____ipow___(self, self, *args)
+def MEDCouplingDataArrayInt64Iadd(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt64____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64Isub(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt64____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64Imul(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt64____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64Idiv(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt64____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64Imod(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt64____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64Ipow(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt64____ipow___(self, self, *args)
 def MEDCouplingDataArrayFloatIadd(self,*args):
     import _MEDCoupling
     return _MEDCoupling.DataArrayFloat____iadd___(self, self, *args)
@@ -98,21 +116,36 @@ def MEDCouplingDataArrayDoubleTupleImul(self,*args):
 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
     import _MEDCoupling
     return _MEDCoupling.DataArrayDoubleTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayInt32TupleIadd(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt32Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIsub(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt32Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImul(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt32Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIdiv(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt32Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImod(self,*args):
+    import _MEDCoupling
+    return _MEDCoupling.DataArrayInt32Tuple____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIadd(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayIntTuple____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIsub(self,*args):
+    return _MEDCoupling.DataArrayInt64Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIsub(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayIntTuple____isub___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImul(self,*args):
+    return _MEDCoupling.DataArrayInt64Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImul(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayIntTuple____imul___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIdiv(self,*args):
+    return _MEDCoupling.DataArrayInt64Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIdiv(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayIntTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImod(self,*args):
+    return _MEDCoupling.DataArrayInt64Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImod(self,*args):
     import _MEDCoupling
-    return _MEDCoupling.DataArrayIntTuple____imod___(self, self, *args)
+    return _MEDCoupling.DataArrayInt64Tuple____imod___(self, self, *args)
 def MEDCouplingDenseMatrixIadd(self,*args):
     import _MEDCoupling
     return _MEDCoupling.DenseMatrix____iadd___(self, self, *args)
index 332270c83f45893d58e3c6993153c412261ba252..188dcf5f958c4e661661ae33548c09356ac32a0b 100644 (file)
@@ -2404,8 +2404,8 @@ class MEDCouplingBasicsTest2(unittest.TestCase):
             pass
         # test of static method DataArrayInt::meld
         dai1=da1C.convertToIntArr();
-        dai4=DataArrayInt.Meld(dai1,dai3);
-        tmp=DataArrayInt.Meld([dai1,dai3]);
+        dai4=DataArrayInt32.Meld(dai1,dai3);
+        tmp=DataArrayInt32.Meld([dai1,dai3]);
         self.assertTrue(dai4.isEqual(tmp))
         self.assertEqual(5,dai4.getNumberOfComponents());
         self.assertEqual(7,dai4.getNumberOfTuples());
index 94ec01b7330aaee17f41549ed1769d0db4ce0a26..0ad6b84217fa8544362185857bd47fde1484d769 100644 (file)
@@ -1499,7 +1499,7 @@ class MEDCouplingBasicsTest3(unittest.TestCase):
         self.assertTrue(d.isEqual(d1,1e-12));
         #
         d2=d.convertToIntArr();
-        d4=DataArrayInt.New();
+        d4=DataArrayInt32.New();
         self.assertTrue(not d2.isEqual(d4));
         d4.deepCopyFrom(d2);
         self.assertTrue(d2.isEqual(d4));
index 3bca65eeba86a804964cc5f63323d4232a3679e4..cea4720db7abdd3762e08a1f1a56bcd4e442e639 100644 (file)
@@ -2809,7 +2809,7 @@ class MEDCouplingBasicsTest4(unittest.TestCase):
 
     @unittest.skipUnless(checkFreeMemory((223456789*16)/(1024)), "Not enough memory")
     def testSwig2BigMem(self):
-        if MEDCouplingSizeOfVoidStar()==64:
+        if MEDCouplingSizeOfVoidStar()==64 and MEDCouplingSizeOfIDs()==32:
             d=DataArrayAsciiChar(223456789,16)
             self.assertTrue(d.getNumberOfTuples(),223456789)
             self.assertTrue(d.getNumberOfComponents(),16)
index f8cb7ca8ffbfb3057ab4ea399687b99a6c2f1a6c..b1dc1d3bd514540fd329b5c3f778990fb39ef1ca 100644 (file)
@@ -606,7 +606,7 @@ class MEDCouplingBasicsTest5(unittest.TestCase):
         m=MEDCoupling1SGTUMesh("m",NORM_QUAD4)
         mem_m=m.getHeapMemorySize()
         m.allocateCells(5)
-        self.assertIn(m.getHeapMemorySize() - mem_m, list(range(5 * 4 * 4, 5 * 4 * 4 + 32)))
+        self.assertIn(m.getHeapMemorySize() - mem_m, list(range(5 * 4 * MEDCouplingSizeOfIDs()//8, 5 * 4 * MEDCouplingSizeOfIDs()//8 + 32)))
         self.assertEqual(m.getNodalConnectivity().getNbOfElemAllocated(),20)
         m.setCoords(um.getCoords())
         m.insertNextCell([1,0,6,7])
@@ -1019,7 +1019,7 @@ class MEDCouplingBasicsTest5(unittest.TestCase):
         self.assertEqual(d.getInfoOnComponents(),["aa","bbb"])
         ref=d.getHeapMemorySize()
         d.desallocate()
-        self.assertEqual(ref-d.getHeapMemorySize(),6*4)
+        self.assertEqual(ref-d.getHeapMemorySize(),6*MEDCouplingSizeOfIDs()//8)
         self.assertTrue(not d.isAllocated())
         self.assertEqual(d.getInfoOnComponents(),["aa","bbb"])
         self.assertRaises(InterpKernelException,d.checkAllocated)
@@ -3885,9 +3885,9 @@ class MEDCouplingBasicsTest5(unittest.TestCase):
         m.setCoords(arrX,arrX)
         f=MEDCouplingFieldInt(ON_CELLS)
         f.setMesh(m)
-        arr=DataArrayInt(8) ; arr.iota() ;f.setArray(arr)
+        arr=DataArrayInt32(8) ; arr.iota() ;f.setArray(arr)
         self.assertRaises(InterpKernelException,f.checkConsistencyLight)
-        arr=DataArrayInt(9) ; arr.iota() ;f.setArray(arr)
+        arr=DataArrayInt32(9) ; arr.iota() ;f.setArray(arr)
         f.checkConsistencyLight()
         f.setTimeUnit("ms")
         self.assertEqual(f.getTimeUnit(),"ms")
@@ -3935,13 +3935,13 @@ class MEDCouplingBasicsTest5(unittest.TestCase):
         m1=MEDCouplingCMesh() ; m1.setCoords(DataArrayDouble([0,1,2,3]),DataArrayDouble([0,1,2,3,4]))
         m1=m1.buildUnstructured() ; m1.setName("mesh")
         f1=MEDCouplingFieldInt(ON_CELLS) ; f1.setMesh(m1)
-        arr1=DataArrayInt([(0,1),(2,3),(4,5),(6,7),(8,9),(10,11),(12,13),(14,15),(16,17),(18,19),(20,21),(22,23)]) ; arr1.setInfoOnComponents(["aa","bbb"])
+        arr1=DataArrayInt32([(0,1),(2,3),(4,5),(6,7),(8,9),(10,11),(12,13),(14,15),(16,17),(18,19),(20,21),(22,23)]) ; arr1.setInfoOnComponents(["aa","bbb"])
         f1.setArray(arr1) ; f1.setName("f1") ; f1.setTime(2.,3,4)
         #
         m2=MEDCouplingCMesh() ; m2.setCoords(DataArrayDouble([0,1,2,3]),DataArrayDouble([0,1,2,3,4]))
         m2=m2.buildUnstructured() ; m2.setName("mesh")
         f2=MEDCouplingFieldInt(ON_CELLS) ; f2.setMesh(m2)
-        arr2=DataArrayInt([(0,1),(2,3),(4,5),(6,7),(8,9),(10,11),(12,13),(14,15),(16,17),(18,19),(20,21),(22,23)]) ; arr2.setInfoOnComponents(["aa","bbb"])
+        arr2=DataArrayInt32([(0,1),(2,3),(4,5),(6,7),(8,9),(10,11),(12,13),(14,15),(16,17),(18,19),(20,21),(22,23)]) ; arr2.setInfoOnComponents(["aa","bbb"])
         f2.setArray(arr2) ; f2.setName("f1") ; f2.setTime(2.,3,4)
         #
         self.assertTrue(f1.isEqual(f2,1e-12,0))
@@ -3967,7 +3967,7 @@ class MEDCouplingBasicsTest5(unittest.TestCase):
         #
         for fd,expected in ((ON_NODES,False),(ON_CELLS,True)):
             f4=MEDCouplingFieldInt(fd) ; f4.setMesh(m2) ; f4.setTime(2.,3,4)
-            arr4=DataArrayInt([(0,1),(2,3),(4,5),(6,7),(8,9),(10,11),(12,13),(14,15),(16,17),(18,19),(20,21),(22,23)]) ; arr4.setInfoOnComponents(["aa","bbb"])
+            arr4=DataArrayInt32([(0,1),(2,3),(4,5),(6,7),(8,9),(10,11),(12,13),(14,15),(16,17),(18,19),(20,21),(22,23)]) ; arr4.setInfoOnComponents(["aa","bbb"])
             f4.setArray(arr4) ; f4.setName("f1")
             self.assertEqual(f1.isEqual(f4,1e-12,0),expected)
             pass
@@ -4687,14 +4687,14 @@ class MEDCouplingBasicsTest5(unittest.TestCase):
         """Test focused of new wrapped methods for MEDCouplingFieldInt thanks to code factorization."""
         d=DataArrayDouble(7) ; d.iota()
         m=MEDCouplingUMesh.Build1DMeshFromCoords(d)
-        f=MEDCouplingFieldInt(ON_CELLS) ; f.setMesh(m) ; arr=DataArrayInt(6) ; arr.iota() ; f.setArray(arr) ; f.checkConsistencyLight()
+        f=MEDCouplingFieldInt(ON_CELLS) ; f.setMesh(m) ; arr=DataArrayInt32(6) ; arr.iota() ; f.setArray(arr) ; f.checkConsistencyLight()
         f_0=f[::2] # test is here
-        self.assertTrue(f_0.getArray().isEqual(DataArrayInt([0,2,4])))
+        self.assertTrue(f_0.getArray().isEqual(DataArrayInt32([0,2,4])))
         self.assertTrue(f_0.getMesh().isEqual(m[[0,2,4]],1e-12))
         #
-        f2=MEDCouplingFieldInt(ON_NODES) ; f2.setMesh(m) ; arr=DataArrayInt(7) ; arr.iota() ; f2.setArray(arr) ; f2.checkConsistencyLight()
+        f2=MEDCouplingFieldInt(ON_NODES) ; f2.setMesh(m) ; arr=DataArrayInt32(7) ; arr.iota() ; f2.setArray(arr) ; f2.checkConsistencyLight()
         f_1=f2[::2] # test is here
-        self.assertTrue(f_1.getArray().isEqual(DataArrayInt([0,1,2,3,4,5])))
+        self.assertTrue(f_1.getArray().isEqual(DataArrayInt32([0,1,2,3,4,5])))
         m_1=m[[0,2,4]] ; m_1.zipCoords()
         self.assertTrue(f_1.getMesh().isEqual(m_1,1e-12))
         pass
diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py
new file mode 100644 (file)
index 0000000..1b655eb
--- /dev/null
@@ -0,0 +1,724 @@
+#  -*- coding: utf-8 -*-
+# Copyright (C) 2007-2019  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+
+import sys
+if sys.platform == "win32":
+    from MEDCouplingCompat import *
+else:
+    from medcoupling import *
+import unittest
+from math import pi,e,sqrt,cos,sin
+from datetime import datetime
+from MEDCouplingDataForTest import MEDCouplingDataForTest
+import rlcompleter,readline # this line has to be here, to ensure a usability of MEDCoupling/MEDLoader. B4 removing it please notify to anthony.geay@cea.fr
+
+class MEDCouplingBasicsTest7(unittest.TestCase):
+
+    def testDAIGetIdsEqual1(self):
+        tab1=[5,-2,-4,-2,3,2,-2];
+        da=DataArrayInt64.New();
+        da.setValues(tab1,7,1);
+        da2=da.findIdsEqual(-2);
+        self.assertEqual(3,da2.getNumberOfTuples());
+        self.assertEqual(1,da2.getNumberOfComponents());
+        expected1=[1,3,6];
+        self.assertEqual(expected1,da2.getValues());
+        pass
+
+    def testDAIGetIdsEqualList1(self):
+        tab1=[5,-2,-4,-2,3,2,-2];
+        da=DataArrayInt64.New();
+        da.setValues(tab1,7,1);
+        da2=da.findIdsEqualList([3,-2,0]);
+        self.assertEqual(4,da2.getNumberOfTuples());
+        self.assertEqual(1,da2.getNumberOfComponents());
+        expected1=[1,3,4,6];
+        self.assertEqual(expected1,da2.getValues());
+        pass
+
+    def testDAIsUniform1(self):
+        tab1=[1,1,1,1,1]
+        da=DataArrayInt64.New();
+        da.setValues(tab1,5,1);
+        self.assertTrue(da.isUniform(1));
+        da.setIJ(2,0,2);
+        self.assertTrue(not da.isUniform(1));
+        da.setIJ(2,0,1);
+        self.assertTrue(da.isUniform(1));
+        da2=da.convertToDblArr();
+        self.assertTrue(da2.isUniform(1.,1.e-12));
+        da2.setIJ(1,0,1.+1.e-13);
+        self.assertTrue(da2.isUniform(1.,1.e-12));
+        da2.setIJ(1,0,1.+1.e-11);
+        self.assertTrue(not da2.isUniform(1.,1.e-12));
+        pass
+
+    def testDAIBuildComplement1(self):
+        a=DataArrayInt64.New();
+        tab=[3,1,7,8]
+        a.setValues(tab,4,1);
+        b=a.buildComplement(12);
+        self.assertEqual(8,b.getNumberOfTuples());
+        self.assertEqual(1,b.getNumberOfComponents());
+        expected1=[0,2,4,5,6,9,10,11]
+        for i in range(8):
+            self.assertEqual(expected1[i],b.getIJ(0,i));
+            pass
+        pass
+
+    def testDAIBuildUnion1(self):
+        a=DataArrayInt64.New();
+        tab1=[3,1,7,8]
+        a.setValues(tab1,4,1);
+        c=DataArrayInt64.New();
+        tab2=[5,3,0,18,8]
+        c.setValues(tab2,5,1);
+        b=a.buildUnion(c);
+        self.assertEqual(7,b.getNumberOfTuples());
+        self.assertEqual(1,b.getNumberOfComponents());
+        expected1=[0,1,3,5,7,8,18]
+        for i in range(7):
+            self.assertEqual(expected1[i],b.getIJ(0,i));
+            pass
+        b=DataArrayInt64.BuildUnion([a,c]);
+        self.assertEqual(7,b.getNumberOfTuples());
+        self.assertEqual(1,b.getNumberOfComponents());
+        expected1=[0,1,3,5,7,8,18]
+        for i in range(7):
+            self.assertEqual(expected1[i],b.getIJ(0,i));
+            pass
+        pass
+
+    def testDAIBuildIntersection1(self):
+        a=DataArrayInt64.New();
+        tab1=[3,1,7,8]
+        a.setValues(tab1,4,1);
+        c=DataArrayInt64.New();
+        tab2=[5,3,0,18,8]
+        c.setValues(tab2,5,1);
+        b=a.buildIntersection(c);
+        self.assertEqual(2,b.getNumberOfTuples());
+        self.assertEqual(1,b.getNumberOfComponents());
+        expected1=[3,8]
+        for i in range(2):
+            self.assertEqual(expected1[i],b.getIJ(0,i));
+            pass
+        b=DataArrayInt64.BuildIntersection([a,c]);
+        self.assertEqual(2,b.getNumberOfTuples());
+        self.assertEqual(1,b.getNumberOfComponents());
+        expected1=[3,8]
+        for i in range(2):
+            self.assertEqual(expected1[i],b.getIJ(0,i));
+            pass
+        pass
+
+    def testDAIDeltaShiftIndex1(self):
+        a=DataArrayInt64.New();
+        tab=[1,3,6,7,7,9,15]
+        a.setValues(tab,7,1);
+        b=a.deltaShiftIndex();
+        self.assertEqual(6,b.getNumberOfTuples());
+        self.assertEqual(1,b.getNumberOfComponents());
+        expected1=[2,3,1,0,2,6]
+        for i in range(6):
+            self.assertEqual(expected1[i],b.getIJ(0,i));
+            pass
+        pass
+
+    def testDAIBuildSubstraction1(self):
+        a=DataArrayInt64.New()
+        aa=[2,3,6,8,9]
+        a.setValues(aa,5,1)
+        b=DataArrayInt64.New()
+        bb=[1,3,5,9,11]
+        b.setValues(bb,5,1)
+        self.assertEqual([2,6,8],a.buildSubstraction(b).getValues())
+        pass
+
+    def testDAIBuildPermutationArr1(self):
+        a=DataArrayInt64.New()
+        a.setValues([4,5,6,7,8],5,1)
+        b=DataArrayInt64.New()
+        b.setValues([5,4,8,6,7],5,1)
+        c=a.buildPermutationArr(b)
+        self.assertEqual([1,0,4,2,3],c.getValues())
+        self.assertTrue(a.isEqualWithoutConsideringStrAndOrder(b))
+        b.setIJ(0,0,9)
+        self.assertTrue(not a.isEqualWithoutConsideringStrAndOrder(b))
+        self.assertRaises(InterpKernelException,a.buildPermutationArr,b)
+        a.setIJ(3,0,4)
+        b.setIJ(0,0,5)
+        b.setIJ(4,0,4)#a==[4,5,6,4,8] and b==[5,4,8,6,4]
+        self.assertTrue(a.isEqualWithoutConsideringStrAndOrder(b))
+        c=a.buildPermutationArr(b)
+        self.assertEqual([1,3,4,2,3],c.getValues())
+        d=b.convertToDblArr()
+        expect3=[4,4,5,6,8]
+        b.sort()
+        self.assertEqual(expect3,b.getValues())
+        d.sort()
+        self.assertEqual(5,d.getNumberOfTuples());
+        self.assertEqual(1,d.getNumberOfComponents());
+        for i in range(5):
+            self.assertAlmostEqual(float(expect3[i]),d.getIJ(i,0),14);
+            pass
+        pass
+
+    def testDAIAggregateMulti1(self):
+        a=DataArrayInt64.New()
+        a.setValues(list(range(4)), 2, 2)
+        a.setName("aa")
+        b=DataArrayInt64.New()
+        b.setValues(list(range(6)), 3, 2)
+        c=DataArrayInt64.Aggregate([a,b])
+        self.assertEqual(list(range(4)) + list(range(6)), c.getValues())
+        self.assertEqual("aa",c.getName())
+        self.assertEqual(5,c.getNumberOfTuples())
+        self.assertEqual(2,c.getNumberOfComponents())
+        pass
+
+    def testDAICheckAndPreparePermutation1(self):
+        vals1=[9,10,0,6,4,11,3,7];
+        expect1=[5,6,0,3,2,7,1,4];
+        vals2=[9,10,0,6,10,11,3,7];
+        da=DataArrayInt64.New();
+        da.setValues(vals1,8,1);
+        da2=da.checkAndPreparePermutation();
+        self.assertEqual(8,da2.getNumberOfTuples());
+        self.assertEqual(1,da2.getNumberOfComponents());
+        for i in range(8):
+            self.assertEqual(expect1[i],da2.getIJ(i,0));
+            pass
+        #
+        da=DataArrayInt64.New();
+        da.alloc(8,1);
+        da.iota(0);
+        da2=da.checkAndPreparePermutation();
+        self.assertEqual(1,da2.getNumberOfComponents());
+        self.assertTrue(da2.isIota(8));
+        #
+        da=DataArrayInt64.New();
+        da.alloc(8,1);
+        da.setValues(vals2,8,1);
+        self.assertRaises(InterpKernelException,da.checkAndPreparePermutation);
+        pass
+
+    def testDAIChangeSurjectiveFormat1(self):
+        vals1=[0,3,2,3,2,2,1,2]
+        expected1=[0,1,2,6,8]
+        expected2=[0,  6,  2,4,5,7,  1,3]
+        da=DataArrayInt64.New();
+        da.setValues(vals1,8,1);
+        #
+        da2,da2I=da.changeSurjectiveFormat(4);
+        self.assertEqual(5,da2I.getNumberOfTuples());
+        self.assertEqual(8,da2.getNumberOfTuples());
+        self.assertEqual(expected1,da2I.getValues());
+        self.assertEqual(expected2,da2.getValues());
+        #
+        self.assertRaises(InterpKernelException,da.changeSurjectiveFormat,3);
+        #
+        pass
+
+    def testDAIGetIdsNotEqual1(self):
+        d=DataArrayInt64.New();
+        vals1=[2,3,5,6,8,5,5,6,1,-5]
+        d.setValues(vals1,10,1);
+        d2=d.findIdsNotEqual(5);
+        self.assertEqual(7,d2.getNumberOfTuples());
+        self.assertEqual(1,d2.getNumberOfComponents());
+        expected1=[0,1,3,4,7,8,9]
+        for i in range(7):
+            self.assertEqual(expected1[i],d2.getIJ(0,i));
+            pass
+        d.rearrange(2);
+        self.assertRaises(InterpKernelException,d.findIdsNotEqual,5);
+        vals2=[-4,5,6]
+        vals3=vals2;
+        d.rearrange(1);
+        d3=d.findIdsNotEqualList(vals3);
+        self.assertEqual(5,d3.getNumberOfTuples());
+        self.assertEqual(1,d3.getNumberOfComponents());
+        expected2=[0,1,4,8,9]
+        for i in range(5):
+            self.assertEqual(expected2[i],d3.getIJ(0,i));
+            pass
+        pass
+
+    def testDAIComputeOffsets1(self):
+        d=DataArrayInt64.New();
+        vals1=[3,5,1,2,0,8]
+        expected1=[0,3,8,9,11,11]
+        d.setValues(vals1,6,1);
+        d.computeOffsets();
+        self.assertEqual(6,d.getNumberOfTuples());
+        self.assertEqual(1,d.getNumberOfComponents());
+        for i in range(6):
+            self.assertEqual(expected1[i],d.getIJ(0,i));
+            pass
+        pass
+
+    def testDAITransformWithIndArr1(self):
+        if not MEDCouplingUse64BitIDs():
+            return
+        tab1=[17,18,22,19]
+        tab2=[0,1,1,3,3,0,1,3,2,2,3,0]
+        expected=[17,18,18,19,19,17,18,19,22,22,19,17]
+        d=DataArrayInt64.New();
+        d.setValues(tab1,4,1);
+        d1=DataArrayInt64.New();
+        d1.setValues(tab2,12,1);
+        d2=d1[:]
+        #
+        d1.transformWithIndArr(d);
+        self.assertEqual(12,d1.getNumberOfTuples());
+        self.assertEqual(1,d1.getNumberOfComponents());
+        for i in range(12):
+            self.assertEqual(expected[i],d1.getIJ(i,0));
+            pass
+        #
+        d1=d2
+        d1.transformWithIndArr(tab1)
+        self.assertEqual(12,d1.getNumberOfTuples());
+        self.assertEqual(1,d1.getNumberOfComponents());
+        for i in range(12):
+            self.assertEqual(expected[i],d1.getIJ(i,0));
+            pass
+        pass
+
+    def testDAIBuildPermArrPerLevel1(self):
+        arr=[2,0,1,1,0,1,2,0,1,1,0,0]
+        expected1=[10,0,5,6,1,7,11,2,8,9,3,4]
+        da=DataArrayInt64.New();
+        da.setValues(arr,12,1);
+        da2=da.buildPermArrPerLevel();
+        self.assertEqual(12,da2.getNumberOfTuples());
+        self.assertEqual(1,da2.getNumberOfComponents());
+        for i in range(12):
+            self.assertEqual(expected1[i],da2.getIJ(i,0));
+            pass
+        pass
+
+    def testDAIOperations1(self):
+        arr1=[-1,-2,4,7,3,2,6,6,4,3,0,1]
+        da=DataArrayInt64.New();
+        da.setValues(arr1,4,3);
+        da1=DataArrayInt64.New();
+        da1.alloc(12,1);
+        da1.iota(2);
+        self.assertRaises(InterpKernelException,DataArrayInt64.Add,da,da1);#not same number of tuples/Components
+        da1.rearrange(3);
+        da2=DataArrayInt64.Add(da,da1);
+        self.assertEqual(4,da2.getNumberOfTuples());
+        self.assertEqual(3,da2.getNumberOfComponents());
+        expected1=[1,1,8,12,9,9,14,15,14,14,12,14]
+        for i in range(12):
+            self.assertEqual(expected1[i],da2.getIJ(0,i));
+            pass
+        da1.substractEqual(da);
+        expected2=[3,5,0,-2,3,5,2,3,6,8,12,12]
+        for i in range(12):
+            self.assertEqual(expected2[i],da1.getIJ(0,i));
+            pass
+        da1.rearrange(1); da1.iota(2); da1.rearrange(3);
+        da1.addEqual(da);
+        for i in range(12):
+            self.assertEqual(expected1[i],da1.getIJ(0,i));
+            pass
+        da1.rearrange(1); da1.iota(2); da1.rearrange(3);
+        da2=DataArrayInt64.Multiply(da,da1);
+        self.assertEqual(4,da2.getNumberOfTuples());
+        self.assertEqual(3,da2.getNumberOfComponents());
+        expected3=[-2,-6,16,35,18,14,48,54,40,33,0,13]
+        for i in range(12):
+            self.assertEqual(expected3[i],da2.getIJ(0,i));
+            pass
+        da.divideEqual(da1);
+        self.assertEqual(4,da.getNumberOfTuples());
+        self.assertEqual(3,da.getNumberOfComponents());
+        expected4=[0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0]
+        for i in range(12):
+            self.assertEqual(expected4[i],da.getIJ(0,i));
+            pass
+        da.setValues(arr1,4,3);
+        da1.multiplyEqual(da);
+        self.assertEqual(4,da1.getNumberOfTuples());
+        self.assertEqual(3,da1.getNumberOfComponents());
+        for i in range(12):
+            self.assertEqual(expected3[i],da1.getIJ(0,i));
+            pass
+        da1.rearrange(1); da1.iota(2); da1.rearrange(3);
+        da2=DataArrayInt64.Divide(da,da1);
+        self.assertEqual(4,da2.getNumberOfTuples());
+        self.assertEqual(3,da2.getNumberOfComponents());
+        for i in range(12):
+            self.assertEqual(expected4[i],da2.getIJ(0,i));
+            pass
+        da1.applyInv(321);
+        self.assertEqual(4,da1.getNumberOfTuples());
+        self.assertEqual(3,da1.getNumberOfComponents());
+        expected5=[160,107,80,64,53,45,40,35,32,29,26,24]
+        for i in range(12):
+            self.assertEqual(expected5[i],da1.getIJ(0,i));
+            pass
+        da1.applyDivideBy(2);
+        self.assertEqual(4,da1.getNumberOfTuples());
+        self.assertEqual(3,da1.getNumberOfComponents());
+        expected6=[80,53,40,32,26,22,20,17,16,14,13,12]
+        for i in range(12):
+            self.assertEqual(expected6[i],da1.getIJ(0,i));
+            pass
+        expected7=[3,4,5,4,5,1,6,3,2,0,6,5]
+        da1.applyModulus(7);
+        for i in range(12):
+            self.assertEqual(expected7[i],da1.getIJ(0,i));
+            pass
+        da1.applyLin(1,1);
+        expected8=[3,3,3,3,3,1,3,3,0,0,3,3]
+        da1.applyRModulus(3);
+        for i in range(12):
+            self.assertEqual(expected8[i],da1.getIJ(0,i));
+            pass
+        pass
+
+    def testDAITransformWithIndArrR1(self):
+        tab1=[2,4,5,3,6,7]
+        tab2=[-1,-1,0,1,2,3,4,5,-1,-1,-1,-1]
+        expected=[0,3,1,2,4,5]
+        d=DataArrayInt64.New();
+        d.setValues(tab1,6,1);
+        d1=DataArrayInt64.New();
+        d1.setValues(tab2,12,1);
+        d2=d1[:]
+        #
+        d3=d.transformWithIndArrR(d1);
+        self.assertEqual(6,d3.getNumberOfTuples());
+        self.assertEqual(1,d3.getNumberOfComponents());
+        for i in range(6):
+            self.assertEqual(expected[i],d3.getIJ(i,0));
+            pass
+        #
+        d1=d2
+        d3=d.transformWithIndArrR(tab2)
+        self.assertEqual(6,d3.getNumberOfTuples());
+        self.assertEqual(1,d3.getNumberOfComponents());
+        for i in range(6):
+            self.assertEqual(expected[i],d3.getIJ(i,0));
+            pass
+        pass
+
+    def testDAISplitByValueRange1(self):
+        val1=[6,5,0,3,2,7,8,1,4]
+        val2=[0,4,9]
+        d=DataArrayInt64.New();
+        d.setValues(val1,9,1);
+        e,f,g=d.splitByValueRange(val2);
+        self.assertEqual(9,e.getNumberOfTuples());
+        self.assertEqual(1,e.getNumberOfComponents());
+        self.assertEqual(9,f.getNumberOfTuples());
+        self.assertEqual(1,f.getNumberOfComponents());
+        self.assertEqual(2,g.getNumberOfTuples());
+        self.assertEqual(1,g.getNumberOfComponents());
+        #
+        expected1=[1,1,0,0,0,1,1,0,1]
+        expected2=[2,1,0,3,2,3,4,1,0]
+        for i in range(9):
+            self.assertEqual(expected1[i],e.getIJ(i,0));
+            self.assertEqual(expected2[i],f.getIJ(i,0));
+            pass
+        self.assertEqual(0,g.getIJ(0,0));
+        self.assertEqual(1,g.getIJ(1,0));
+        #
+        d.setIJ(6,0,9);
+        self.assertRaises(InterpKernelException,d.splitByValueRange,val2);
+        # non regression test in python wrapping
+        rg=DataArrayInt64([0,10,29,56,75,102,121,148,167,194,213,240,259,286,305,332,351,378,397,424,443,470,489,516])
+        a,b,c=DataArrayInt64([75]).splitByValueRange(rg)
+        assert(a.isEqual(DataArrayInt64([4])))
+        assert(b.isEqual(DataArrayInt64([0])))
+        assert(c.isEqual(DataArrayInt64([4])))
+        pass
+
+    def testDAIBuildExplicitArrByRanges1(self):
+        d=DataArrayInt64.New();
+        vals1=[0,2,3]
+        d.setValues(vals1,3,1);
+        e=DataArrayInt64.New();
+        vals2=[0,3,6,10,14,20]
+        e.setValues(vals2,6,1);
+        #
+        f=d.buildExplicitArrByRanges(e);
+        self.assertEqual(11,f.getNumberOfTuples());
+        self.assertEqual(1,f.getNumberOfComponents());
+        expected1=[0,1,2,6,7,8,9,10,11,12,13]
+        for i in range(11):
+            self.assertEqual(expected1[i],f.getIJ(i,0));
+            pass
+        pass
+
+    def testDAIComputeOffsets2(self):
+        d=DataArrayInt64.New();
+        vals1=[3,5,1,2,0,8]
+        expected1=[0,3,8,9,11,11,19]
+        d.setValues(vals1,6,1);
+        d.computeOffsetsFull();
+        self.assertEqual(7,d.getNumberOfTuples());
+        self.assertEqual(1,d.getNumberOfComponents());
+        for i in range(7):
+            self.assertEqual(expected1[i],d.getIJ(0,i));
+            pass
+        pass
+
+    def testDAIBuildOld2NewArrayFromSurjectiveFormat2(self):
+        arr=[0,3, 5,7,9]
+        arrI=[0,2,5]
+        a=DataArrayInt.New();
+        a.setValues(arr,5,1);
+        b=DataArrayInt.New();
+        b.setValues(arrI,3,1);
+        ret,newNbTuple=DataArrayInt64.ConvertIndexArrayToO2N(10,a,b);
+        expected=[0,1,2,0,3,4,5,4,6,4]
+        self.assertEqual(10,ret.getNbOfElems());
+        self.assertEqual(7,newNbTuple);
+        self.assertEqual(1,ret.getNumberOfComponents());
+        self.assertEqual(expected,ret.getValues());
+        self.assertRaises(InterpKernelException,DataArrayInt64.ConvertIndexArrayToO2N,9,a,b);
+        pass
+
+    def testDAIBuildUnique1(self):
+        d=DataArrayInt64([1,2,2,3,3,3,3,4,5,5,7,7,7,19])
+        e=d.buildUnique()
+        self.assertTrue(e.isEqual(DataArrayInt64([1,2,3,4,5,7,19])))
+        pass
+
+    def testDAIPartitionByDifferentValues1(self):
+        d=DataArrayInt64([1,0,1,2,0,2,2,-3,2])
+        expected=[[-3,[7]],[0,[1,4]],[1,[0,2]],[2,[3,5,6,8]]]
+        for i,elt in enumerate(zip(*d.partitionByDifferentValues())):
+            self.assertEqual(expected[i][0],elt[1])
+            self.assertEqual(expected[i][1],elt[0].getValues())
+            pass
+        pass
+
+    def testDAICheckMonotonic1(self):
+        data1=[-1,0,2,2,4,5]
+        data2=[6,2,0,-8,-9,-56]
+        data3=[-1,0,3,2,4,6]
+        data4=[7,5,2,3,0,-6]
+        d=DataArrayInt64.New(data1);
+        self.assertTrue(d.isMonotonic(True));
+        self.assertTrue(not d.isMonotonic(False));
+        d.checkMonotonic(True);
+        self.assertRaises(InterpKernelException,d.checkMonotonic,False)
+        d=DataArrayInt64.New(data2);
+        self.assertTrue(d.isMonotonic(False));
+        self.assertTrue(not d.isMonotonic(True));
+        d.checkMonotonic(False);
+        self.assertRaises(InterpKernelException,d.checkMonotonic,True)
+        d=DataArrayInt64.New(data3);
+        self.assertTrue(not d.isMonotonic(False));
+        self.assertTrue(not d.isMonotonic(True));
+        self.assertRaises(InterpKernelException,d.checkMonotonic,True)
+        self.assertRaises(InterpKernelException,d.checkMonotonic,False)
+        d=DataArrayInt64.New(data4);
+        self.assertTrue(not d.isMonotonic(False));
+        self.assertTrue(not d.isMonotonic(True));
+        self.assertRaises(InterpKernelException,d.checkMonotonic,True)
+        self.assertRaises(InterpKernelException,d.checkMonotonic,False)
+        d=DataArrayInt64.New(0,1)
+        self.assertTrue(d.isMonotonic(True));
+        self.assertTrue(d.isMonotonic(False));
+        d.checkMonotonic(True);
+        d.checkMonotonic(False);
+        d=DataArrayInt64.New(data4,3,2);#throw because nbComp!=1
+        self.assertRaises(InterpKernelException,d.isMonotonic,True)
+        self.assertRaises(InterpKernelException,d.isMonotonic,False)
+        self.assertRaises(InterpKernelException,d.checkMonotonic,True)
+        self.assertRaises(InterpKernelException,d.checkMonotonic,False)
+        pass
+
+    def testDAIBuildSubstractionOptimized1(self):
+        da1=DataArrayInt64.New([1,3,5,6,7,9,13])
+        da2=DataArrayInt64.New([3,5,9])
+        da3=DataArrayInt64.New([1,3,5])
+        da4=DataArrayInt64.New([1,3,5,6,7,9,13])
+        #
+        a=da1.buildSubstractionOptimized(da2);
+        self.assertTrue(a.isEqual(DataArrayInt64([1,6,7,13])));
+        #
+        a=da1.buildSubstractionOptimized(da3);
+        self.assertTrue(a.isEqual(DataArrayInt64([6,7,9,13])));
+        #
+        a=da1.buildSubstractionOptimized(da4);
+        self.assertTrue(a.isEqual(DataArrayInt64([])));
+        pass
+
+    def testDAIIsStrictlyMonotonic1(self):
+        da1=DataArrayInt64.New([1,3,5,6,7,9,13])
+        self.assertTrue(da1.isStrictlyMonotonic(True));
+        da1.checkStrictlyMonotonic(True);
+        self.assertTrue(da1.isMonotonic(True));
+        da1.checkMonotonic(True);
+        self.assertTrue(not da1.isStrictlyMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,False)
+        self.assertTrue(not da1.isMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,False)
+        #
+        da1=DataArrayInt64.New([1,3,5,6,6,9,13])
+        self.assertTrue(not da1.isStrictlyMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,True)
+        self.assertTrue(da1.isMonotonic(True));
+        da1.checkMonotonic(True);
+        self.assertTrue(not da1.isStrictlyMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,False)
+        self.assertTrue(not da1.isMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,False)
+        #
+        da1=DataArrayInt64.New([1,3,5,6,5,9,13])
+        self.assertTrue(not da1.isStrictlyMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,True)
+        self.assertTrue(not da1.isMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,True)
+        self.assertTrue(not da1.isStrictlyMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,False)
+        self.assertTrue(not da1.isMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,False)
+        #
+        da1=DataArrayInt64.New([13,9,7,6,5,3,1])
+        self.assertTrue(not da1.isStrictlyMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,True)
+        self.assertTrue(not da1.isMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,True)
+        self.assertTrue(da1.isStrictlyMonotonic(False));
+        da1.checkStrictlyMonotonic(False);
+        self.assertTrue(da1.isMonotonic(False));
+        da1.checkMonotonic(False);
+        #
+        da1=DataArrayInt64.New([13,9,6,6,5,3,1])
+        self.assertTrue(not da1.isStrictlyMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,True)
+        self.assertTrue(not da1.isMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,True)
+        self.assertTrue(not da1.isStrictlyMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,False)
+        self.assertTrue(da1.isMonotonic(False));
+        da1.checkMonotonic(False);
+        #
+        da1=DataArrayInt64.New([13,9,5,6,5,3,1])
+        self.assertTrue(not da1.isStrictlyMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,True)
+        self.assertTrue(not da1.isMonotonic(True));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,True)
+        self.assertTrue(not da1.isStrictlyMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkStrictlyMonotonic,False)
+        self.assertTrue(not da1.isMonotonic(False));
+        self.assertRaises(InterpKernelException,da1.checkMonotonic,False)
+        #
+        da1=DataArrayInt64.New([])
+        self.assertTrue(da1.isStrictlyMonotonic(True));
+        da1.checkStrictlyMonotonic(True);
+        self.assertTrue(da1.isMonotonic(True));
+        da1.checkMonotonic(True);
+        self.assertTrue(da1.isStrictlyMonotonic(False));
+        da1.checkStrictlyMonotonic(False);
+        self.assertTrue(da1.isMonotonic(False));
+        da1.checkMonotonic(False);
+        #
+        da1=DataArrayInt64.New([13])
+        self.assertTrue(da1.isStrictlyMonotonic(True));
+        da1.checkStrictlyMonotonic(True);
+        self.assertTrue(da1.isMonotonic(True));
+        da1.checkMonotonic(True);
+        self.assertTrue(da1.isStrictlyMonotonic(False));
+        da1.checkStrictlyMonotonic(False);
+        self.assertTrue(da1.isMonotonic(False));
+        da1.checkMonotonic(False);
+        pass
+
+    def testDAIIndicesOfSubPart(self):
+        a=DataArrayInt64([9,10,0,6,4,11,3,8])
+        b=DataArrayInt64([6,0,11,8])
+        c=a.indicesOfSubPart(b)
+        self.assertTrue(c.isEqual(DataArrayInt([3,2,5,7])))
+        #
+        d=DataArrayInt64([9,10,0,6,4,11,0,8])
+        self.assertRaises(InterpKernelException,d.indicesOfSubPart,b) # 0 appears twice in the d array
+        f=DataArrayInt64([6,0,11,8,12])
+        self.assertRaises(InterpKernelException,a.indicesOfSubPart,f) # 12 in f does not exist in a
+        pass
+
+    def testDAIFromLinkedListOfPairToList1(self):
+        d=DataArrayInt64([(5,7),(7,3),(3,12),(12,17)])
+        zeRes=DataArrayInt64([5,7,3,12,17])
+        self.assertTrue(d.fromLinkedListOfPairToList().isEqual(zeRes))
+        d.rearrange(1)
+        self.assertRaises(InterpKernelException,d.fromLinkedListOfPairToList)
+        d.rearrange(2)
+        self.assertTrue(d.fromLinkedListOfPairToList().isEqual(zeRes))
+        d2=DataArrayInt64([(5,7)])
+        self.assertTrue(d2.fromLinkedListOfPairToList().isEqual(DataArrayInt64([5,7])))
+        d3=DataArrayInt64([(5,7),(7,3),(4,12),(12,17)])
+        self.assertRaises(InterpKernelException,d3.fromLinkedListOfPairToList) # not a linked list of pair
+        d4=DataArrayInt64([(5,7),(7,3),(12,3),(12,17)])
+        self.assertRaises(InterpKernelException,d4.fromLinkedListOfPairToList) # not a linked list of pair, but can be repaired !
+        d4.sortEachPairToMakeALinkedList()
+        self.assertTrue(d4.fromLinkedListOfPairToList().isEqual(zeRes))
+        pass
+
+    def testDAIfindIdsExt1(self):
+        d=DataArrayInt64([4,6,-2,3,7,0,10])
+        self.assertTrue(d.findIdsGreaterOrEqualTo(3).isEqual(DataArrayInt([0,1,3,4,6])))
+        self.assertTrue(d.findIdsGreaterThan(3).isEqual(DataArrayInt([0,1,4,6])))
+        self.assertTrue(d.findIdsLowerThan(3).isEqual(DataArrayInt([2,5])))
+        self.assertTrue(d.findIdsLowerOrEqualTo(3).isEqual(DataArrayInt([2,3,5])))
+        pass
+
+    def testDAICheckUniformAndGuess1(self):
+        d=DataArrayInt64([3,3],1,2)
+        self.assertRaises(InterpKernelException,d.checkUniformAndGuess)# non single compo
+        d=DataArrayInt64([])
+        self.assertRaises(InterpKernelException,d.checkUniformAndGuess)# empty
+        d=DataArrayInt64()
+        self.assertRaises(InterpKernelException,d.checkUniformAndGuess)# non allocated
+        d=DataArrayInt64([3,3,3])
+        self.assertEqual(3,d.checkUniformAndGuess())
+        d=DataArrayInt64([7])
+        self.assertEqual(7,d.checkUniformAndGuess())
+        d=DataArrayInt64([3,4,3])
+        self.assertRaises(InterpKernelException,d.checkUniformAndGuess)# non uniform
+        pass
+
+    def testDAIFindIdForEach1(self):
+        a1=DataArrayInt64([17,27,2,10,-4,3,12,27,16])
+        b1=DataArrayInt64([3,16,-4,27,17])
+        ret=a1.findIdForEach(b1)
+        self.assertTrue(ret.isEqual(DataArrayInt([5,8,4,7,0])))
+        self.assertTrue(a1[ret].isEqual(b1))
+        b2=DataArrayInt64([3,16,22,27,17])
+        self.assertRaises(InterpKernelException,a1.findIdForEach,b2) # 22 not in a1 !
+        a1.rearrange(3)
+        self.assertRaises(InterpKernelException,a1.findIdForEach,b1) # a1 is not single component
+        pass
+
+    pass
+
+if __name__ == '__main__':
+    unittest.main()
index 830a4c88822f5c2925e0dc7d03c810f462f302a7..a79ce8306208a0c04ffe58d7adee8db14cbd86d2 100644 (file)
@@ -27,6 +27,7 @@
 
 %{
 #include "MEDCouplingMemArray.hxx"
+#include "MEDCouplingMemArray.txx"
 #include "MEDCouplingUMesh.hxx"
 #include "MEDCouplingMappedExtrudedMesh.hxx"
 #include "MEDCouplingCMesh.hxx"
@@ -60,10 +61,26 @@ using namespace INTERP_KERNEL;
 
 %}
 
-%template(ivec) std::vector<int>;
 %template(dvec) std::vector<double>;
 %template(svec) std::vector<std::string>;
 
+//%include stdint.i
+
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+//typedef std::int32_t mcIdType;
+typedef int mcIdType;
+typedef DataArrayInt32 DataArrayIdType;
+%template(ivec) std::vector<int>;
+%template(i64vec) std::vector<long>;
+#else
+//typedef std::int64_t mcIdType;
+typedef long int mcIdType;
+typedef DataArrayInt64 DataArrayIdType;
+%template(ivec) std::vector<long>;
+%template(i32vec) std::vector<int>;
+#endif
+
+
 ////////////////////
 %typemap(out) MEDCoupling::MEDCouplingMesh*
 {
@@ -499,10 +516,12 @@ using namespace INTERP_KERNEL;
   {// AGY : here initialization of C++ traits in MEDCouplingDataArrayTypemaps.i for code factorization. Awful, I know, but no other solutions.
     SWIGTITraits<double>::TI=SWIGTYPE_p_MEDCoupling__DataArrayDouble;
     SWIGTITraits<float>::TI=SWIGTYPE_p_MEDCoupling__DataArrayFloat;
-    SWIGTITraits<int>::TI=SWIGTYPE_p_MEDCoupling__DataArrayInt;
+    SWIGTITraits<Int32>::TI=SWIGTYPE_p_MEDCoupling__DataArrayInt32;
+    SWIGTITraits<Int64>::TI=SWIGTYPE_p_MEDCoupling__DataArrayInt64;
     SWIGTITraits<double>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayDoubleTuple;
     SWIGTITraits<float>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayFloatTuple;
-    SWIGTITraits<int>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayIntTuple;
+    SWIGTITraits<Int32>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayInt32Tuple;
+    SWIGTITraits<Int64>::TI_TUPLE=SWIGTYPE_p_MEDCoupling__DataArrayInt64Tuple;
   }
 %}
 
@@ -524,9 +543,9 @@ using namespace INTERP_KERNEL;
     Py_ssize_t sz(sizeof(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER)/sizeof(decltype(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[0])));
     auto maxElt(*std::max_element(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER,MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER+sz));
     auto szOut(maxElt+1);
-    std::vector< int > retCpp(szOut,-1);
+    std::vector< mcIdType > retCpp(szOut,-1);
     mcIdType id(0);
-    for(const int *it=MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER;it!=MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER+sz;it++,id++)
+    for(const mcIdType *it=MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER;it!=MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER+sz;it++,id++)
       {
         if(*it!=-1)
           retCpp[*it]=id;
@@ -603,7 +622,8 @@ namespace MEDCoupling
       IMAGE_GRID = 12
     } MEDCouplingMeshType;
 
-  class DataArrayInt;
+  class DataArrayInt32;
+  class DataArrayInt64;
   class DataArrayDouble;
   class MEDCouplingUMesh;
   class MEDCouplingCMesh;
@@ -663,10 +683,10 @@ namespace MEDCoupling
     virtual DataArrayDouble *getCoordinatesAndOwner() const;
     virtual DataArrayDouble *computeCellCenterOfMass() const;
     virtual DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
-    virtual DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
-    virtual DataArrayInt *computeNbOfNodesPerCell() const;
-    virtual DataArrayInt *computeNbOfFacesPerCell() const;
-    virtual DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
+    virtual DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+    virtual DataArrayIdType *computeNbOfNodesPerCell() const;
+    virtual DataArrayIdType *computeNbOfFacesPerCell() const;
+    virtual DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
     virtual MEDCouplingMesh *buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const;
     virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
     virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const;
@@ -685,8 +705,8 @@ namespace MEDCoupling
     virtual MEDCouplingUMesh *buildUnstructured() const;
     virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
     virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const;
-    virtual DataArrayInt *simplexize(int policy);
-    virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
+    virtual DataArrayIdType *simplexize(int policy);
+    virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
     static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
     static bool IsStaticGeometricType(INTERP_KERNEL::NormalizedCellType type);
     static bool IsLinearGeometricType(INTERP_KERNEL::NormalizedCellType type);
@@ -721,13 +741,13 @@ namespace MEDCoupling
            return ret2;
          }
          
-         int getCellContainingPoint(PyObject *p, double eps) const
+         mcIdType getCellContainingPoint(PyObject *p, double eps) const
          {
            double val;
            DataArrayDouble *a;
            DataArrayDoubleTuple *aa;
            std::vector<double> bb;
-           int sw;
+           mcIdType sw;
            int spaceDim=self->getSpaceDimension();
            const char msg[]="Python wrap of MEDCouplingMesh::getCellContainingPoint : ";
            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,1,spaceDim,true);
@@ -740,15 +760,15 @@ namespace MEDCoupling
            DataArrayDouble *a;
            DataArrayDoubleTuple *aa;
            std::vector<double> bb;
-           int sw;
+           mcIdType sw;
            int spaceDim=self->getSpaceDimension();
            const char msg[]="Python wrap of MEDCouplingMesh::getCellsContainingPoint : ";
            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,nbOfPoints,spaceDim,true);
-           MCAuto<DataArrayInt> elts,eltsIndex;
+           MCAuto<DataArrayIdType> elts,eltsIndex;
            self->getCellsContainingPoints(pos,nbOfPoints,eps,elts,eltsIndex);
            PyObject *ret=PyTuple_New(2);
-           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
 
@@ -758,27 +778,27 @@ namespace MEDCoupling
            DataArrayDouble *a;
            DataArrayDoubleTuple *aa;
            std::vector<double> bb;
-           int sw;
+           mcIdType sw;
            int spaceDim=self->getSpaceDimension();
            const char msg[]="Python wrap of MEDCouplingMesh::getCellsContainingPointsLinearPartOnlyOnNonDynType : ";
            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,nbOfPoints,spaceDim,true);
-           MCAuto<DataArrayInt> elts,eltsIndex;
+           MCAuto<DataArrayIdType> elts,eltsIndex;
            self->getCellsContainingPointsLinearPartOnlyOnNonDynType(pos,nbOfPoints,eps,elts,eltsIndex);
            PyObject *ret=PyTuple_New(2);
-           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
 
          PyObject *getCellsContainingPoints(PyObject *p, double eps) const
          {
-           auto getCellsContainingPointsFunc=[self](const double *a, int b,double c, MCAuto<DataArrayInt>& d, MCAuto<DataArrayInt>& e) { self->getCellsContainingPoints(a,b,c,d,e); };
+           auto getCellsContainingPointsFunc=[self](const double *a, int b,double c, MCAuto<DataArrayIdType>& d, MCAuto<DataArrayIdType>& e) { self->getCellsContainingPoints(a,b,c,d,e); };
            return Mesh_getCellsContainingPointsLike(p,eps,self,getCellsContainingPointsFunc);
          }
 
          PyObject *getCellsContainingPointsLinearPartOnlyOnNonDynType(PyObject *p, double eps) const
          {
-           auto getCellsContainingPointsFunc=[self](const double *a, int b,double c, MCAuto<DataArrayInt>& d, MCAuto<DataArrayInt>& e) { self->getCellsContainingPointsLinearPartOnlyOnNonDynType(a,b,c,d,e); };
+           auto getCellsContainingPointsFunc=[self](const double *a, int b,double c, MCAuto<DataArrayIdType>& d, MCAuto<DataArrayIdType>& e) { self->getCellsContainingPointsLinearPartOnlyOnNonDynType(a,b,c,d,e); };
            return Mesh_getCellsContainingPointsLike(p,eps,self,getCellsContainingPointsFunc);
          }
          
@@ -788,91 +808,91 @@ namespace MEDCoupling
            DataArrayDouble *a;
            DataArrayDoubleTuple *aa;
            std::vector<double> bb;
-           int sw;
+           mcIdType sw;
            int spaceDim=self->getSpaceDimension();
            const char msg[]="Python wrap of MEDCouplingUMesh::getCellsContainingPoint : ";
            const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,1,spaceDim,true);
-           std::vector<int> elts;
+           std::vector<mcIdType> elts;
            self->getCellsContainingPoint(pos,eps,elts);
-           DataArrayInt *ret=DataArrayInt::New();
+           DataArrayIdType *ret=DataArrayIdType::New();
            ret->alloc((int)elts.size(),1);
            std::copy(elts.begin(),elts.end(),ret->getPointer());
-           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+           return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
          }
          
          virtual PyObject *getReverseNodalConnectivity() const
          {
-           MCAuto<DataArrayInt> d0=DataArrayInt::New();
-           MCAuto<DataArrayInt> d1=DataArrayInt::New();
+           MCAuto<DataArrayIdType> d0=DataArrayIdType::New();
+           MCAuto<DataArrayIdType> d1=DataArrayIdType::New();
            self->getReverseNodalConnectivity(d0,d1);
            PyObject *ret=PyTuple_New(2);
-           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
          
          void renumberCells(PyObject *li, bool check=true)
          {
-           int sw,sz(-1);
-           int v0; std::vector<int> v1;
-           const int *ids(convertIntStarLikePyObjToCppIntStar(li,sw,sz,v0,v1));
+           mcIdType sw,sz(-1);
+           mcIdType v0; std::vector<mcIdType> v1;
+           const mcIdType *ids(convertIntStarLikePyObjToCppIntStar(li,sw,sz,v0,v1));
            self->renumberCells(ids,check);
          }
 
          PyObject *checkGeoEquivalWith(const MEDCouplingMesh *other, int levOfCheck, double prec) const
          {
-           DataArrayInt *cellCor, *nodeCor;
+           DataArrayIdType *cellCor, *nodeCor;
            self->checkGeoEquivalWith(other,levOfCheck,prec,cellCor,nodeCor);
            PyObject *res = PyList_New(2);
-           PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, cellCor?SWIG_POINTER_OWN | 0:0 ));
-           PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(nodeCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, nodeCor?SWIG_POINTER_OWN | 0:0 ));
+           PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellCor),SWIGTITraits<mcIdType>::TI, cellCor?SWIG_POINTER_OWN | 0:0 ));
+           PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(nodeCor),SWIGTITraits<mcIdType>::TI, nodeCor?SWIG_POINTER_OWN | 0:0 ));
            return res;
          }
 
          PyObject *checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec) const
          {
-           DataArrayInt *cellCor=0,*nodeCor=0;
+           DataArrayIdType *cellCor=0,*nodeCor=0;
            self->checkDeepEquivalWith(other,cellCompPol,prec,cellCor,nodeCor);
            PyObject *res = PyList_New(2);
-           PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, cellCor?SWIG_POINTER_OWN | 0:0 ));
-           PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(nodeCor),SWIGTYPE_p_MEDCoupling__DataArrayInt, nodeCor?SWIG_POINTER_OWN | 0:0 ));
+           PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellCor),SWIGTITraits<mcIdType>::TI, cellCor?SWIG_POINTER_OWN | 0:0 ));
+           PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(nodeCor),SWIGTITraits<mcIdType>::TI, nodeCor?SWIG_POINTER_OWN | 0:0 ));
            return res;
          }
          
-         DataArrayInt *checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec) const
+         DataArrayIdType *checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec) const
          {
-           DataArrayInt *cellCor=0;
+           DataArrayIdType *cellCor=0;
            self->checkDeepEquivalOnSameNodesWith(other,cellCompPol,prec,cellCor);
            return cellCor;
          }
 
-         DataArrayInt *getCellIdsFullyIncludedInNodeIds(PyObject *li) const
+         DataArrayIdType *getCellIdsFullyIncludedInNodeIds(PyObject *li) const
          {
            void *da=0;
-           int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+           int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
            if (!SWIG_IsOK(res1))
              {
-               int size;
-               INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-               return self->getCellIdsFullyIncludedInNodeIds(tmp,((const int *)tmp)+size);
+               mcIdType size;
+               INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+               return self->getCellIdsFullyIncludedInNodeIds(tmp,((const mcIdType *)tmp)+size);
              }
            else
              {
-               DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+               DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
                if(!da2)
-                 throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+                 throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
                da2->checkAllocated();
                return self->getCellIdsFullyIncludedInNodeIds(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
              }
          }
          PyObject *getNodeIdsOfCell(int cellId) const
          {
-           std::vector<int> conn;
+           std::vector<mcIdType> conn;
            self->getNodeIdsOfCell(cellId,conn);
            return convertIntArrToPyList2(conn);
          }
 
-         PyObject *getCoordinatesOfNode(int nodeId) const
+         PyObject *getCoordinatesOfNode(mcIdType nodeId) const
          {
            std::vector<double> coo;
            self->getCoordinatesOfNode(nodeId,coo);
@@ -885,7 +905,7 @@ namespace MEDCoupling
            DataArrayDouble *a;
            DataArrayDoubleTuple *aa;
            std::vector<double> bb;
-           int sw;
+           mcIdType sw;
            int spaceDim=self->getSpaceDimension();
            const char msg[]="Python wrap of MEDCouplingPointSet::scale : ";
            const double *pointPtr=convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,msg,1,spaceDim,true);
@@ -915,14 +935,14 @@ namespace MEDCoupling
 
          PyObject *buildPart(PyObject *li) const
          {
-           int szArr,sw,iTypppArr;
-           std::vector<int> stdvecTyyppArr;
-           const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+           mcIdType szArr,sw,iTypppArr;
+           std::vector<mcIdType> stdvecTyyppArr;
+           const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
            MEDCouplingMesh *ret=self->buildPart(tmp,tmp+szArr);
-           if(sw==3)//DataArrayInt
+           if(sw==3)//DataArrayIdType
              { 
-               void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
-               DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+               void *argp; SWIG_ConvertPtr(li,&argp,SWIGTITraits<mcIdType>::TI,0|0);
+               DataArrayIdType *argpt=reinterpret_cast< MEDCoupling::DataArrayIdType * >(argp);
                std::string name=argpt->getName();
                if(!name.empty())
                  ret->setName(name.c_str());
@@ -932,15 +952,15 @@ namespace MEDCoupling
         
          PyObject *buildPartAndReduceNodes(PyObject *li) const
          {
-           int szArr,sw,iTypppArr;
-           std::vector<int> stdvecTyyppArr;
-           DataArrayInt *arr=0;
-           const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+           mcIdType szArr,sw,iTypppArr;
+           std::vector<mcIdType> stdvecTyyppArr;
+           DataArrayIdType *arr=0;
+           const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
            MEDCouplingMesh *ret=self->buildPartAndReduceNodes(tmp,tmp+szArr,arr);
-           if(sw==3)//DataArrayInt
+           if(sw==3)//DataArrayIdType
              { 
-               void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
-               DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+               void *argp; SWIG_ConvertPtr(li,&argp,SWIGTITraits<mcIdType>::TI,0|0);
+               DataArrayIdType *argpt=reinterpret_cast< MEDCoupling::DataArrayIdType * >(argp);
                std::string name=argpt->getName();
                if(!name.empty())
                  ret->setName(name.c_str());
@@ -948,22 +968,22 @@ namespace MEDCoupling
            //
            PyObject *res = PyList_New(2);
            PyObject *obj0=convertMesh(ret, SWIG_POINTER_OWN | 0 );
-           PyObject *obj1=SWIG_NewPointerObj(SWIG_as_voidptr(arr),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+           PyObject *obj1=SWIG_NewPointerObj(SWIG_as_voidptr(arr),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
            PyList_SetItem(res,0,obj0);
            PyList_SetItem(res,1,obj1);
            return res;
          }
 
-         PyObject *buildPartRangeAndReduceNodes(int beginCellIds, int endCellIds, int stepCellIds) const
+         PyObject *buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const
          {
-           int a,b,c;
-           DataArrayInt *arr=0;
+           mcIdType a,b,c;
+           DataArrayIdType *arr=0;
            MEDCouplingMesh *ret=self->buildPartRangeAndReduceNodes(beginCellIds,endCellIds,stepCellIds,a,b,c,arr);
            PyObject *res = PyTuple_New(2);
            PyObject *obj0=convertMesh(ret, SWIG_POINTER_OWN | 0 );
            PyObject *obj1=0;
            if(arr)
-             obj1=SWIG_NewPointerObj(SWIG_as_voidptr(arr),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+             obj1=SWIG_NewPointerObj(SWIG_as_voidptr(arr),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
            else
              obj1=PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(b));
            PyTuple_SetItem(res,0,obj0);
@@ -973,59 +993,59 @@ namespace MEDCoupling
 
         PyObject *getDistributionOfTypes() const
         {
-          std::vector<int> vals=self->getDistributionOfTypes();
+          std::vector<mcIdType> vals=self->getDistributionOfTypes();
           if(vals.size()%3!=0)
             throw INTERP_KERNEL::Exception("Internal Error detected in wrap python ! code returned by MEDCouplingMesh::getDistributionOfTypes is not so that %3==0 !");
-          PyObject *ret=PyList_New((int)vals.size()/3);
-          for(int j=0;j<(int)vals.size()/3;j++)
+          PyObject *ret=PyList_New((mcIdType)vals.size()/3);
+          for(std::size_t j=0;j<vals.size()/3;j++)
              {
                PyObject *ret1=PyList_New(3);
-               PyList_SetItem(ret1,0,SWIG_From_int(vals[3*j]));
-               PyList_SetItem(ret1,1,SWIG_From_int(vals[3*j+1]));
-               PyList_SetItem(ret1,2,SWIG_From_int(vals[3*j+2]));
+               PyList_SetItem(ret1,0,PyInt_FromLong(vals[3*j]));
+               PyList_SetItem(ret1,1,PyInt_FromLong(vals[3*j+1]));
+               PyList_SetItem(ret1,2,PyInt_FromLong(vals[3*j+2]));
                PyList_SetItem(ret,j,ret1);
              }
           return ret;
         }
 
-        DataArrayInt *checkTypeConsistencyAndContig(PyObject *li, PyObject *li2) const
+        DataArrayIdType *checkTypeConsistencyAndContig(PyObject *li, PyObject *li2) const
         {
-          std::vector<int> code;
-          std::vector<const DataArrayInt *> idsPerType;
-          convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li2,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",idsPerType);
+          std::vector<mcIdType> code;
+          std::vector<const DataArrayIdType *> idsPerType;
+          convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType *>(li2,SWIGTITraits<mcIdType>::TI,"DataArrayIdType",idsPerType);
           convertPyToNewIntArr4(li,1,3,code);
           return self->checkTypeConsistencyAndContig(code,idsPerType);
         }
 
-        PyObject *splitProfilePerType(const DataArrayInt *profile, bool smartPflKiller=true) const
+        PyObject *splitProfilePerType(const DataArrayIdType *profile, bool smartPflKiller=true) const
         {
-          std::vector<int> code;
-          std::vector<DataArrayInt *> idsInPflPerType;
-          std::vector<DataArrayInt *> idsPerType;
+          std::vector<mcIdType> code;
+          std::vector<DataArrayIdType *> idsInPflPerType;
+          std::vector<DataArrayIdType *> idsPerType;
           self->splitProfilePerType(profile,code,idsInPflPerType,idsPerType,smartPflKiller);
           PyObject *ret=PyTuple_New(3);
           //
           if(code.size()%3!=0)
             throw INTERP_KERNEL::Exception("Internal Error detected in wrap python ! code returned by MEDCouplingMesh::splitProfilePerType is not so that %3==0 !");
-          PyObject *ret0=PyList_New((int)code.size()/3);
-          for(int j=0;j<(int)code.size()/3;j++)
+          PyObject *ret0=PyList_New((mcIdType)code.size()/3);
+          for(std::size_t j=0;j<code.size()/3;j++)
              {
                PyObject *ret00=PyList_New(3);
-               PyList_SetItem(ret00,0,SWIG_From_int(code[3*j]));
-               PyList_SetItem(ret00,1,SWIG_From_int(code[3*j+1]));
-               PyList_SetItem(ret00,2,SWIG_From_int(code[3*j+2]));
+               PyList_SetItem(ret00,0,PyInt_FromLong(code[3*j]));
+               PyList_SetItem(ret00,1,PyInt_FromLong(code[3*j+1]));
+               PyList_SetItem(ret00,2,PyInt_FromLong(code[3*j+2]));
                PyList_SetItem(ret0,j,ret00);
              }
           PyTuple_SetItem(ret,0,ret0);
           //
           PyObject *ret1=PyList_New(idsInPflPerType.size());
           for(std::size_t j=0;j<idsInPflPerType.size();j++)
-            PyList_SetItem(ret1,j,SWIG_NewPointerObj(SWIG_as_voidptr(idsInPflPerType[j]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+            PyList_SetItem(ret1,j,SWIG_NewPointerObj(SWIG_as_voidptr(idsInPflPerType[j]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
           PyTuple_SetItem(ret,1,ret1);
-          int n=idsPerType.size();
+          std::size_t n=idsPerType.size();
           PyObject *ret2=PyList_New(n);
-          for(int i=0;i<n;i++)
-            PyList_SetItem(ret2,i,SWIG_NewPointerObj(SWIG_as_voidptr(idsPerType[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+          for(std::size_t i=0;i<n;i++)
+            PyList_SetItem(ret2,i,SWIG_NewPointerObj(SWIG_as_voidptr(idsPerType[i]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
           PyTuple_SetItem(ret,2,ret2);
           return ret;
         }
@@ -1036,7 +1056,7 @@ namespace MEDCoupling
           DataArrayDouble *a;
           DataArrayDoubleTuple *aa;
           std::vector<double> bb;
-          int sw;
+          mcIdType sw;
           int spaceDim=self->getSpaceDimension();
           const char msg[]="Python wrap of MEDCouplingPointSet::translate : ";
           const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val,a,aa,bb,msg,1,spaceDim,true);
@@ -1050,7 +1070,7 @@ namespace MEDCoupling
            DataArrayDouble *a;
            DataArrayDoubleTuple *aa;
            std::vector<double> bb;
-           int sw;
+           mcIdType sw;
            int spaceDim=self->getSpaceDimension();
            const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,spaceDim,true);
            self->rotate(centerPtr,0,alpha);
@@ -1063,7 +1083,7 @@ namespace MEDCoupling
            DataArrayDouble *a,*a2;
            DataArrayDoubleTuple *aa,*aa2;
            std::vector<double> bb,bb2;
-           int sw;
+           mcIdType sw;
            int spaceDim=self->getSpaceDimension();
            const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,spaceDim,true);
            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
@@ -1083,16 +1103,16 @@ namespace MEDCoupling
          virtual PyObject *getTinySerializationInformation() const
          {
            std::vector<double> a0;
-           std::vector<int> a1;
+           std::vector<mcIdType> a1;
            std::vector<std::string> a2;
            self->getTinySerializationInformation(a0,a1,a2);
            PyObject *ret(PyTuple_New(3));
            PyTuple_SetItem(ret,0,convertDblArrToPyList2(a0));
            PyTuple_SetItem(ret,1,convertIntArrToPyList2(a1));
-           int sz(a2.size());
+           std::size_t sz(a2.size());
            PyObject *ret2(PyList_New(sz));
            {
-             for(int i=0;i<sz;i++)
+             for(std::size_t i=0;i<sz;i++)
                PyList_SetItem(ret2,i,PyString_FromString(a2[i].c_str()));
            }
            PyTuple_SetItem(ret,2,ret2);
@@ -1101,16 +1121,16 @@ namespace MEDCoupling
 
          virtual PyObject *serialize() const
          {
-           DataArrayInt *a0Tmp(0);
+           DataArrayIdType *a0Tmp(0);
            DataArrayDouble *a1Tmp(0);
            self->serialize(a0Tmp,a1Tmp);
            PyObject *ret(PyTuple_New(2));
-           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(a0Tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(a0Tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(a1Tmp),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
 
-         void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2) const
+         void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2) const
          {
            std::vector<std::string> littleStrings;
            self->resizeForUnserialization(tinyInfo,a1,a2,littleStrings);
@@ -1131,21 +1151,21 @@ namespace MEDCoupling
            static const char MSG[]="MEDCouplingMesh.__setstate__ : expected input is a tuple of size 2 !";
            if(!PyTuple_Check(inp))
              throw INTERP_KERNEL::Exception(MSG);
-           int sz(PyTuple_Size(inp));
+           std::size_t sz(PyTuple_Size(inp));
            if(sz!=2)
              throw INTERP_KERNEL::Exception(MSG);
            PyObject *elt0(PyTuple_GetItem(inp,0));
            PyObject *elt1(PyTuple_GetItem(inp,1));
            std::vector<double> a0;
-           std::vector<int> a1;
+           std::vector<mcIdType> a1;
            std::vector<std::string> a2;
-           DataArrayInt *b0(0);
+           DataArrayIdType *b0(0);
            DataArrayDouble *b1(0);
            {
              if(!PyTuple_Check(elt0) && PyTuple_Size(elt0)!=3)
                throw INTERP_KERNEL::Exception(MSG);
              PyObject *a0py(PyTuple_GetItem(elt0,0)),*a1py(PyTuple_GetItem(elt0,1)),*a2py(PyTuple_GetItem(elt0,2));
-             int tmp(-1);
+             mcIdType tmp(-1);
              fillArrayWithPyListDbl3(a0py,tmp,a0);
              convertPyToNewIntArr3(a1py,a1);
              fillStringVector(a2py,a2);
@@ -1155,10 +1175,10 @@ namespace MEDCoupling
                throw INTERP_KERNEL::Exception(MSG);
              PyObject *b0py(PyTuple_GetItem(elt1,0)),*b1py(PyTuple_GetItem(elt1,1));
              void *argp(0);
-             int status(SWIG_ConvertPtr(b0py,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0));
+             int status(SWIG_ConvertPtr(b0py,&argp,SWIGTITraits<mcIdType>::TI,0|0));
              if(!SWIG_IsOK(status))
                throw INTERP_KERNEL::Exception(MSG);
-             b0=reinterpret_cast<DataArrayInt *>(argp);
+             b0=reinterpret_cast<DataArrayIdType *>(argp);
              status=SWIG_ConvertPtr(b1py,&argp,SWIGTYPE_p_MEDCoupling__DataArrayDouble,0|0);
              if(!SWIG_IsOK(status))
                throw INTERP_KERNEL::Exception(MSG);
@@ -1248,10 +1268,10 @@ namespace MEDCoupling
   class MEDCouplingSkyLineArray
   {
   public:  
-    static MEDCouplingSkyLineArray *BuildFromPolyhedronConn( const DataArrayInt* c, const DataArrayInt* cI );
+    static MEDCouplingSkyLineArray *BuildFromPolyhedronConn( const DataArrayIdType* c, const DataArrayIdType* cI );
   
-    void set( DataArrayInt* index, DataArrayInt* value );
-    void set3( DataArrayInt* superIndex, DataArrayInt* index, DataArrayInt* value );
+    void set( DataArrayIdType* index, DataArrayIdType* value );
+    void set3( DataArrayIdType* superIndex, DataArrayIdType* index, DataArrayIdType* value );
     
     int getSuperNumberOf() const;
     int getNumberOf() const;
@@ -1260,7 +1280,7 @@ namespace MEDCoupling
     void deletePack(const int i, const int j);
     
     void deleteSimplePack(const int i);
-    void deleteSimplePacks(const DataArrayInt* idx);
+    void deleteSimplePacks(const DataArrayIdType* idx);
     
     %extend 
     {
@@ -1269,12 +1289,12 @@ namespace MEDCoupling
         return MEDCouplingSkyLineArray::New();
       }
 
-      MEDCouplingSkyLineArray( const std::vector<int>& index, const std::vector<int>& value)
+      MEDCouplingSkyLineArray( const std::vector<mcIdType>& index, const std::vector<mcIdType>& value)
       {
         return MEDCouplingSkyLineArray::New(index, value);
       }
 
-      MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value )
+      MEDCouplingSkyLineArray( DataArrayIdType* index, DataArrayIdType* value )
       {
         return MEDCouplingSkyLineArray::New(index, value);
       }
@@ -1289,40 +1309,40 @@ namespace MEDCoupling
         return self->simpleRepr();
       }
       
-      DataArrayInt *getSuperIndexArray() const
+      DataArrayIdType *getSuperIndexArray() const
       {
-        DataArrayInt *ret(self->getSuperIndexArray());
+        DataArrayIdType *ret(self->getSuperIndexArray());
         if(ret)
           ret->incrRef();
         return ret;
       }
       
-      DataArrayInt *getIndexArray() const
+      DataArrayIdType *getIndexArray() const
       {
-        DataArrayInt *ret(self->getIndexArray());
+        DataArrayIdType *ret(self->getIndexArray());
         if(ret)
           ret->incrRef();
         return ret;
       }
       
-      DataArrayInt *getValuesArray() const
+      DataArrayIdType *getValuesArray() const
       {
-        DataArrayInt *ret(self->getValuesArray());
+        DataArrayIdType *ret(self->getValuesArray());
         if(ret)
           ret->incrRef();
         return ret;
       }
      
-      PyObject *getSimplePackSafe(int absolutePackId) const
+      PyObject *getSimplePackSafe(mcIdType absolutePackId) const
       {
-        std::vector<int> ret;
+        std::vector<mcIdType> ret;
         self->getSimplePackSafe(absolutePackId,ret);
         return convertIntArrToPyList2(ret);
       }
 
       PyObject *findPackIds(PyObject *superPackIndices, PyObject *pack) const
       {
-          std::vector<int> vpack, vspIdx, out;
+          std::vector<mcIdType> vpack, vspIdx, out;
           
           convertPyToNewIntArr3(superPackIndices,vspIdx);
           convertPyToNewIntArr3(pack,vpack);
@@ -1331,42 +1351,42 @@ namespace MEDCoupling
           return convertIntArrToPyList2(out);
       }
       
-      void pushBackPack(const int i, PyObject *pack)
+      void pushBackPack(const mcIdType i, PyObject *pack)
         {
-          std::vector<int> vpack;
+          std::vector<mcIdType> vpack;
           convertPyToNewIntArr3(pack,vpack);
           self->pushBackPack(i,vpack.data(), vpack.data()+vpack.size());
         }
         
-      void replaceSimplePack(const int idx, PyObject *pack)
+      void replaceSimplePack(const mcIdType idx, PyObject *pack)
         {
-          std::vector<int> vpack;
+          std::vector<mcIdType> vpack;
           convertPyToNewIntArr3(pack,vpack);
           self->replaceSimplePack(idx, vpack.data(), vpack.data()+vpack.size());
         }
         
-      void replaceSimplePacks(const DataArrayInt* idx, PyObject *listePacks)
+      void replaceSimplePacks(const DataArrayIdType* idx, PyObject *listePacks)
         {
-          std::vector<const DataArrayInt*> packs;
-          convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt*>(listePacks,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",packs);
+          std::vector<const DataArrayIdType*> packs;
+          convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType*>(listePacks,SWIGTITraits<mcIdType>::TI,"DataArrayIdType",packs);
           self->replaceSimplePacks(idx, packs);
         }
         
-      void replacePack(const int superIdx, const int idx, PyObject *pack)
+      void replacePack(const mcIdType superIdx, const mcIdType idx, PyObject *pack)
         {
-          std::vector<int> vpack;
+          std::vector<mcIdType> vpack;
           convertPyToNewIntArr3(pack,vpack);
           self->replacePack(superIdx, idx, vpack.data(), vpack.data()+vpack.size());
         }
 
       PyObject *convertToPolyhedronConn() const
          {
-           MCAuto<DataArrayInt> d0=DataArrayInt::New();
-           MCAuto<DataArrayInt> d1=DataArrayInt::New();
+           MCAuto<DataArrayIdType> d0=DataArrayIdType::New();
+           MCAuto<DataArrayIdType> d1=DataArrayIdType::New();
            self->convertToPolyhedronConn(d0,d1);
            PyObject *ret=PyTuple_New(2);
-           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          } 
     }
@@ -1395,17 +1415,17 @@ namespace MEDCoupling
       virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon);
       static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2);
       static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type);
-      static DataArrayInt *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps);
-      virtual DataArrayInt *computeFetchedNodeIds() const;
+      static DataArrayIdType *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps);
+      virtual DataArrayIdType *computeFetchedNodeIds() const;
       virtual int getNumberOfNodesInCell(int cellId) const;
       virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const;
-      virtual DataArrayInt *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
-      virtual DataArrayInt *zipCoordsTraducer();
-      virtual DataArrayInt *findBoundaryNodes() const;
-      virtual DataArrayInt *zipConnectivityTraducer(int compType, int startCellId=0);
+      virtual DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
+      virtual DataArrayIdType *zipCoordsTraducer();
+      virtual DataArrayIdType *findBoundaryNodes() const;
+      virtual DataArrayIdType *zipConnectivityTraducer(int compType, int startCellId=0);
       virtual MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
       virtual void checkFullyDefined() const;
-      virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const;
+      virtual bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
       virtual MEDCouplingPointSet *deepCopyConnectivityOnly() const;
       virtual DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
       virtual void renumberNodesWithOffsetInConn(int offset);
@@ -1419,23 +1439,23 @@ namespace MEDCoupling
              return self->simpleRepr();
            }
            
-           PyObject *buildNewNumberingFromCommonNodesFormat(const DataArrayInt *comm, const DataArrayInt *commIndex) const
+           PyObject *buildNewNumberingFromCommonNodesFormat(const DataArrayIdType *comm, const DataArrayIdType *commIndex) const
            {
-             int newNbOfNodes;
-             DataArrayInt *ret0=self->buildNewNumberingFromCommonNodesFormat(comm,commIndex,newNbOfNodes);
+             mcIdType newNbOfNodes;
+             DataArrayIdType *ret0=self->buildNewNumberingFromCommonNodesFormat(comm,commIndex,newNbOfNodes);
              PyObject *res = PyList_New(2);
-             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-             PyList_SetItem(res,1,SWIG_From_int(newNbOfNodes));
+             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+             PyList_SetItem(res,1,PyInt_FromLong(newNbOfNodes));
              return res;
            }
            
-           PyObject *findCommonNodes(double prec, int limitTupleId=-1) const
+           PyObject *findCommonNodes(double prec, mcIdType limitTupleId=-1) const
            {
-             DataArrayInt *comm, *commIndex;
+             DataArrayIdType *comm, *commIndex;
              self->findCommonNodes(prec,limitTupleId,comm,commIndex);
              PyObject *res = PyList_New(2);
-             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(comm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-             PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(commIndex),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(comm),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+             PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(commIndex),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              return res;
            }
            
@@ -1449,14 +1469,14 @@ namespace MEDCoupling
            
            PyObject *buildPartOfMySelf(PyObject *li, bool keepCoords=true) const
            {
-             int szArr,sw,iTypppArr;
-             std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             mcIdType szArr,sw,iTypppArr;
+             std::vector<mcIdType> stdvecTyyppArr;
+             const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildPartOfMySelf(tmp,tmp+szArr,keepCoords);
-             if(sw==3)//DataArrayInt
+             if(sw==3)//DataArrayIdType
                { 
-                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
-                 DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTITraits<mcIdType>::TI,0|0);
+                 DataArrayIdType *argpt=reinterpret_cast< MEDCoupling::DataArrayIdType * >(argp);
                  std::string name=argpt->getName();
                  if(!name.empty())
                    ret->setName(name.c_str());
@@ -1466,14 +1486,14 @@ namespace MEDCoupling
            
            PyObject *buildPartOfMySelfNode(PyObject *li, bool fullyIn) const
            {
-             int szArr,sw,iTypppArr;
-             std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             mcIdType szArr,sw,iTypppArr;
+             std::vector<mcIdType> stdvecTyyppArr;
+             const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildPartOfMySelfNode(tmp,tmp+szArr,fullyIn);
-             if(sw==3)//DataArrayInt
+             if(sw==3)//DataArrayIdType
                { 
-                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
-                 DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTITraits<mcIdType>::TI,0|0);
+                 DataArrayIdType *argpt=reinterpret_cast< MEDCoupling::DataArrayIdType * >(argp);
                  std::string name=argpt->getName();
                  if(!name.empty())
                    ret->setName(name.c_str());
@@ -1483,14 +1503,14 @@ namespace MEDCoupling
 
            virtual PyObject *buildPartOfMySelfKeepCoords(PyObject *li) const
            {
-             int szArr,sw,iTypppArr;
-             std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             mcIdType szArr,sw,iTypppArr;
+             std::vector<mcIdType> stdvecTyyppArr;
+             const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoords(tmp,tmp+szArr);
-             if(sw==3)//DataArrayInt
+             if(sw==3)//DataArrayIdType
                { 
-                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
-                 DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTITraits<mcIdType>::TI,0|0);
+                 DataArrayIdType *argpt=reinterpret_cast< MEDCoupling::DataArrayIdType * >(argp);
                  std::string name=argpt->getName();
                  if(!name.empty())
                    ret->setName(name.c_str());
@@ -1498,7 +1518,7 @@ namespace MEDCoupling
              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
            }
 
-           virtual PyObject *buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const
+           virtual PyObject *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const
            {
              MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoordsSlice(start,end,step);
              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
@@ -1506,14 +1526,14 @@ namespace MEDCoupling
 
            PyObject *buildFacePartOfMySelfNode(PyObject *li, bool fullyIn) const
            {
-             int szArr,sw,iTypppArr;
-             std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             mcIdType szArr,sw,iTypppArr;
+             std::vector<mcIdType> stdvecTyyppArr;
+             const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              MEDCouplingPointSet *ret=self->buildFacePartOfMySelfNode(tmp,tmp+szArr,fullyIn);
-             if(sw==3)//DataArrayInt
+             if(sw==3)//DataArrayIdType
                { 
-                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
-                 DataArrayInt *argpt=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+                 void *argp; SWIG_ConvertPtr(li,&argp,SWIGTITraits<mcIdType>::TI,0|0);
+                 DataArrayIdType *argpt=reinterpret_cast< MEDCoupling::DataArrayIdType * >(argp);
                  std::string name=argpt->getName();
                  if(!name.empty())
                    ret->setName(name.c_str());
@@ -1521,19 +1541,19 @@ namespace MEDCoupling
              return convertMesh(ret, SWIG_POINTER_OWN | 0 );
            }
 
-           void renumberNodes(PyObject *li, int newNbOfNodes)
+           void renumberNodes(PyObject *li, mcIdType newNbOfNodes)
            {
-             int szArr,sw,iTypppArr;
-             std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             mcIdType szArr,sw,iTypppArr;
+             std::vector<mcIdType> stdvecTyyppArr;
+             const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              self->renumberNodes(tmp,newNbOfNodes);
            }
 
-           void renumberNodesCenter(PyObject *li, int newNbOfNodes)
+           void renumberNodesCenter(PyObject *li, mcIdType newNbOfNodes)
            {
-             int szArr,sw,iTypppArr;
-             std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             mcIdType szArr,sw,iTypppArr;
+             std::vector<mcIdType> stdvecTyyppArr;
+             const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              self->renumberNodesCenter(tmp,newNbOfNodes);
            }
 
@@ -1544,17 +1564,17 @@ namespace MEDCoupling
                DataArrayDouble *a,*a2;
                DataArrayDoubleTuple *aa,*aa2;
                std::vector<double> bb,bb2;
-               int sw;
+               mcIdType sw;
                const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st parameter for point.";
                const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd parameter for vector.";
                const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
                const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
-               std::vector<int> nodes;
+               std::vector<mcIdType> nodes;
                self->findNodesOnLine(p,v,eps,nodes);
-               DataArrayInt *ret=DataArrayInt::New();
-               ret->alloc((int)nodes.size(),1);
+               DataArrayIdType *ret=DataArrayIdType::New();
+               ret->alloc(nodes.size(),1);
                std::copy(nodes.begin(),nodes.end(),ret->getPointer());
-               return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+               return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
              }
            PyObject *findNodesOnPlane(PyObject *pt, PyObject *vec, double eps) const
              {
@@ -1563,17 +1583,17 @@ namespace MEDCoupling
                DataArrayDouble *a,*a2;
                DataArrayDoubleTuple *aa,*aa2;
                std::vector<double> bb,bb2;
-               int sw;
+               mcIdType sw;
                const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st parameter for point.";
                const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd parameter for vector.";
                const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
                const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
-               std::vector<int> nodes;
+               std::vector<mcIdType> nodes;
                self->findNodesOnPlane(p,v,eps,nodes);
-               DataArrayInt *ret=DataArrayInt::New();
-               ret->alloc((int)nodes.size(),1);
+               DataArrayIdType *ret=DataArrayIdType::New();
+               ret->alloc(nodes.size(),1);
                std::copy(nodes.begin(),nodes.end(),ret->getPointer());
-               return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+               return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
              }
            
            PyObject *getNodeIdsNearPoint(PyObject *pt, double eps) const
@@ -1582,49 +1602,49 @@ namespace MEDCoupling
              DataArrayDouble *a;
              DataArrayDoubleTuple *aa;
              std::vector<double> bb;
-             int sw;
+             mcIdType sw;
              int spaceDim=self->getSpaceDimension();
              const char msg[]="Python wrap of MEDCouplingPointSet::getNodeIdsNearPoint : ";
              const double *pos=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
-             DataArrayInt *ret=self->getNodeIdsNearPoint(pos,eps);
-             return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+             DataArrayIdType *ret=self->getNodeIdsNearPoint(pos,eps);
+             return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
            }
 
-           PyObject *getNodeIdsNearPoints(PyObject *pt, int nbOfPoints, double eps) const
+           PyObject *getNodeIdsNearPoints(PyObject *pt, mcIdType nbOfPoints, double eps) const
            {
-             DataArrayInt *c=0,*cI=0;
+             DataArrayIdType *c=0,*cI=0;
              //
              double val;
              DataArrayDouble *a;
              DataArrayDoubleTuple *aa;
              std::vector<double> bb;
-             int sw;
+             mcIdType sw;
              int spaceDim=self->getSpaceDimension();
              const char msg[]="Python wrap of MEDCouplingPointSet::getNodeIdsNearPoints : ";
              const double *pos=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,nbOfPoints,spaceDim,true);
              self->getNodeIdsNearPoints(pos,nbOfPoints,eps,c,cI);
              PyObject *ret=PyTuple_New(2);
-             PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-             PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+             PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+             PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              return ret;
            }
 
            PyObject *getNodeIdsNearPoints(PyObject *pt, double eps) const
            {
-             DataArrayInt *c=0,*cI=0;
+             DataArrayIdType *c=0,*cI=0;
              int spaceDim=self->getSpaceDimension();
              double val;
              DataArrayDouble *a;
              DataArrayDoubleTuple *aa;
              std::vector<double> bb;
-             int sw;
-             int nbOfTuples=-1;
+             mcIdType sw;
+             mcIdType nbOfTuples=-1;
              const double *ptPtr=convertObjToPossibleCpp5_Safe2(pt,sw,val,a,aa,bb,"Python wrap of MEDCouplingUMesh::getNodeIdsNearPoints",spaceDim,true,nbOfTuples);
              self->getNodeIdsNearPoints(ptPtr,nbOfTuples,eps,c,cI);
              //
              PyObject *ret=PyTuple_New(2);
-             PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-             PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+             PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+             PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              return ret;
            }
 
@@ -1634,22 +1654,22 @@ namespace MEDCoupling
              DataArrayDouble *a;
              DataArrayDoubleTuple *aa;
              std::vector<double> bb;
-             int sw;
+             mcIdType sw;
              int spaceDim=self->getSpaceDimension();
              const char msg[]="Python wrap of MEDCouplingPointSet::getCellsInBoundingBox : ";
              const double *tmp=convertObjToPossibleCpp5_Safe(bbox,sw,val,a,aa,bb,msg,spaceDim,2,true);
              //
-             DataArrayInt *elems=self->getCellsInBoundingBox(tmp,eps);
-             return SWIG_NewPointerObj(SWIG_as_voidptr(elems),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+             DataArrayIdType *elems=self->getCellsInBoundingBox(tmp,eps);
+             return SWIG_NewPointerObj(SWIG_as_voidptr(elems),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
            }
 
            void duplicateNodesInCoords(PyObject *li)
            {
-             int sw;
-             int singleVal;
-             std::vector<int> multiVal;
-             std::pair<int, std::pair<int,int> > slic;
-             MEDCoupling::DataArrayInt *daIntTyypp=0;
+             mcIdType sw;
+             mcIdType singleVal;
+             std::vector<mcIdType> multiVal;
+             std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+             MEDCoupling::DataArrayIdType *daIntTyypp=0;
              convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
              switch(sw)
                {
@@ -1660,17 +1680,17 @@ namespace MEDCoupling
                case 4:
                  return self->duplicateNodesInCoords(daIntTyypp->begin(),daIntTyypp->end());
                default:
-                 throw INTERP_KERNEL::Exception("MEDCouplingPointSet::duplicateNodesInCoords : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
+                 throw INTERP_KERNEL::Exception("MEDCouplingPointSet::duplicateNodesInCoords : unrecognized type entered, expected list of int, tuple of int or DataArrayIdType !");
                }
            }
 
-           virtual PyObject *findCommonCells(int compType, int startCellId=0) const
+           virtual PyObject *findCommonCells(int compType, mcIdType startCellId=0) const
            {
-             DataArrayInt *v0(nullptr),*v1(nullptr);
+             DataArrayIdType *v0(nullptr),*v1(nullptr);
              self->findCommonCells(compType,startCellId,v0,v1);
              PyObject *res = PyList_New(2);
-             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-             PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+             PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              return res;
            }
 
@@ -1687,18 +1707,18 @@ namespace MEDCoupling
                    return ;
                  }
              }
-             int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 | 0 ));
+             int res1(SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 | 0 ));
              if (!SWIG_IsOK(res1))
                {
-                 int size;
-                 INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+                 mcIdType size;
+                 INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
                  self->renumberNodesInConn(tmp);
                }
              else
                {
-                 DataArrayInt *da2(reinterpret_cast< DataArrayInt * >(da));
+                 DataArrayIdType *da2(reinterpret_cast< DataArrayIdType * >(da));
                  if(!da2)
-                   throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+                   throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
                  da2->checkAllocated();
                  self->renumberNodesInConn(da2->getConstPointer());
                }
@@ -1706,21 +1726,21 @@ namespace MEDCoupling
 
            virtual PyObject *getNodeIdsInUse() const
            {
-             int ret1=-1;
-             DataArrayInt *ret0=self->getNodeIdsInUse(ret1);
+             mcIdType ret1=-1;
+             DataArrayIdType *ret0=self->getNodeIdsInUse(ret1);
              PyObject *ret=PyTuple_New(2);
-             PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+             PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
              return ret;
            }
 
-           virtual DataArrayInt *fillCellIdsToKeepFromNodeIds(PyObject *li, bool fullyIn) const
+           virtual DataArrayIdType *fillCellIdsToKeepFromNodeIds(PyObject *li, bool fullyIn) const
            {
-             DataArrayInt *ret(nullptr);
+             DataArrayIdType *ret(nullptr);
              //
-             int szArr,sw,iTypppArr;
-             std::vector<int> stdvecTyyppArr;
-             const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+             mcIdType szArr,sw,iTypppArr;
+             std::vector<mcIdType> stdvecTyyppArr;
+             const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
              self->fillCellIdsToKeepFromNodeIds(tmp,tmp+szArr,fullyIn,ret);
              return ret;
            }
@@ -1728,42 +1748,42 @@ namespace MEDCoupling
            virtual PyObject *mergeNodes(double precision)
            {
              bool ret1;
-             int ret2;
-             DataArrayInt *ret0=self->mergeNodes(precision,ret1,ret2);
+             mcIdType ret2;
+             DataArrayIdType *ret0=self->mergeNodes(precision,ret1,ret2);
              PyObject *res = PyList_New(3);
-             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              PyList_SetItem(res,1,SWIG_From_bool(ret1));
-             PyList_SetItem(res,2,SWIG_From_int(ret2));
+             PyList_SetItem(res,2,PyInt_FromLong(ret2));
              return res;
            }
            
            virtual PyObject *mergeNodesCenter(double precision)
            {
              bool ret1;
-             int ret2;
-             DataArrayInt *ret0=self->mergeNodesCenter(precision,ret1,ret2);
+             mcIdType ret2;
+             DataArrayIdType *ret0=self->mergeNodesCenter(precision,ret1,ret2);
              PyObject *res = PyList_New(3);
-             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+             PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              PyList_SetItem(res,1,SWIG_From_bool(ret1));
-             PyList_SetItem(res,2,SWIG_From_int(ret2));
+             PyList_SetItem(res,2,PyInt_FromLong(ret2));
              return res;
            }
            
-           DataArrayInt *getCellIdsLyingOnNodes(PyObject *li, bool fullyIn) const
+           DataArrayIdType *getCellIdsLyingOnNodes(PyObject *li, bool fullyIn) const
            {
              void *da=0;
-             int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+             int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
              if (!SWIG_IsOK(res1))
                {
-                 int size;
-                 INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-                 return self->getCellIdsLyingOnNodes(tmp,((const int *)tmp)+size,fullyIn);
+                 mcIdType size;
+                 INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+                 return self->getCellIdsLyingOnNodes(tmp,((const mcIdType *)tmp)+size,fullyIn);
                }
              else
                {
-                 DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+                 DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
                  if(!da2)
-                   throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+                   throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
                  da2->checkAllocated();
                  return self->getCellIdsLyingOnNodes(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),fullyIn);
                }
@@ -1771,12 +1791,12 @@ namespace MEDCoupling
 
            MEDCouplingPointSet *__getitem__(PyObject *listOrDataArrI)
            {
-             int sw;
-             int singleVal;
-             std::vector<int> multiVal;
-             std::pair<int, std::pair<int,int> > slic;
-             MEDCoupling::DataArrayInt *daIntTyypp=0;
-             int nbc=self->getNumberOfCells();
+             mcIdType sw;
+             mcIdType singleVal;
+             std::vector<mcIdType> multiVal;
+             std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+             MEDCoupling::DataArrayIdType *daIntTyypp=0;
+             mcIdType nbc=self->getNumberOfCells();
              convertIntStarOrSliceLikePyObjToCpp(listOrDataArrI,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
              switch(sw)
                {
@@ -1794,7 +1814,7 @@ namespace MEDCoupling
                      {
                        if(nbc+singleVal>0)
                          {
-                           int tmp=nbc+singleVal;
+                           mcIdType tmp=nbc+singleVal;
                            return self->buildPartOfMySelf(&tmp,&tmp+1,true);
                          }
                        else
@@ -1821,25 +1841,25 @@ namespace MEDCoupling
                    return self->buildPartOfMySelf(daIntTyypp->begin(),daIntTyypp->end(),true);
                  }
                default:
-                 throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
+                 throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayIdType instance !");
                }
            }
            
-           static void Rotate2DAlg(PyObject *center, double angle, int nbNodes, PyObject *coords)
+           static void Rotate2DAlg(PyObject *center, double angle, mcIdType nbNodes, PyObject *coords)
            {
-             int sz;
+             mcIdType sz;
              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
              INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
              MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,coo);
-             for(int i=0;i<sz;i++)
+             for(mcIdType i=0;i<sz;i++)
                PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
            }
            
            static void Rotate2DAlg(PyObject *center, double angle, PyObject *coords)
            {
-             int sz;
+             mcIdType sz;
              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
-             int sw,nbNodes=0;
+             mcIdType sw,nbNodes=0;
              double val0;  MEDCoupling::DataArrayDouble *val1=0; MEDCoupling::DataArrayDoubleTuple *val2=0;
              std::vector<double> val3;
              const double *coo=convertObjToPossibleCpp5_Safe2(coords,sw,val0,val1,val2,val3,
@@ -1849,22 +1869,22 @@ namespace MEDCoupling
              MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,const_cast<double *>(coo));
            }
            
-           static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, int nbNodes, PyObject *coords)
+           static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, mcIdType nbNodes, PyObject *coords)
            {
-             int sz,sz2;
+             mcIdType sz,sz2;
              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
              INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
              INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
              MEDCoupling::DataArrayDouble::Rotate3DAlg(c,v,angle,nbNodes,coo,coo);
-             for(int i=0;i<sz;i++)
+             for(mcIdType i=0;i<sz;i++)
                PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
            }
            
            static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, PyObject *coords)
            {
-             int sz,sz2;
+             mcIdType sz,sz2;
              INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
-             int sw,nbNodes=0;
+             mcIdType sw,nbNodes=0;
              double val0;  MEDCoupling::DataArrayDouble *val1=0; MEDCoupling::DataArrayDoubleTuple *val2=0;
              std::vector<double> val3;
              const double *coo=convertObjToPossibleCpp5_Safe2(coords,sw,val0,val1,val2,val3,
@@ -1892,10 +1912,10 @@ namespace MEDCoupling
 
         PyObject *getAllConn() const
         {
-          int ret2;
-          const int *r=self->getAllConn(ret2);
+          mcIdType ret2;
+          const mcIdType *r=self->getAllConn(ret2);
           PyObject *ret=PyTuple_New(ret2);
-          for(int i=0;i<ret2;i++)
+          for(mcIdType i=0;i<ret2;i++)
             PyTuple_SetItem(ret,i,PyInt_FromLong(r[i]));
           return ret;
         }
@@ -1980,7 +2000,7 @@ namespace MEDCoupling
     void allocateCells(int nbOfCells=0);
     void finishInsertingCells();
     MEDCouplingUMeshCellByTypeEntry *cellsByType();
-    void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true);
+    void setConnectivity(DataArrayIdType *conn, DataArrayIdType *connIndex, bool isComputingTypes=true);
     INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const;
     void setPartOfMySelfSlice(int start, int end, int step, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
     int getNodalConnectivityArrayLen() const;
@@ -1988,24 +2008,24 @@ namespace MEDCoupling
     std::string reprConnectivityOfThis() const;
     MEDCouplingUMesh *buildSetInstanceFromThis(int spaceDim) const;
     //tools
-    DataArrayInt *conformize2D(double eps);
-    DataArrayInt *conformize3D(double eps);
-    DataArrayInt *colinearize2D(double eps);
-    DataArrayInt *colinearizeKeepingConform2D(double eps);
+    DataArrayIdType *conformize2D(double eps);
+    DataArrayIdType *conformize3D(double eps);
+    DataArrayIdType *colinearize2D(double eps);
+    DataArrayIdType *colinearizeKeepingConform2D(double eps);
     void shiftNodeNumbersInConn(int delta);
     std::vector<bool> getQuadraticStatus() const;
-    DataArrayInt *findCellIdsOnBoundary() const;
+    DataArrayIdType *findCellIdsOnBoundary() const;
     MEDCouplingUMesh *computeSkin() const;
     bool checkConsecutiveCellTypes() const;
     bool checkConsecutiveCellTypesForMEDFileFrmt() const;
-    DataArrayInt *rearrange2ConsecutiveCellTypes();
-    DataArrayInt *sortCellsInMEDFileFrmt();
-    DataArrayInt *getRenumArrForMEDFileFrmt() const;
-    DataArrayInt *convertCellArrayPerGeoType(const DataArrayInt *da) const;
-    MEDCouplingUMesh *buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
-    MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
-    MEDCouplingUMesh *explode3DMeshTo1D(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
-    MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const;
+    DataArrayIdType *rearrange2ConsecutiveCellTypes();
+    DataArrayIdType *sortCellsInMEDFileFrmt();
+    DataArrayIdType *getRenumArrForMEDFileFrmt() const;
+    DataArrayIdType *convertCellArrayPerGeoType(const DataArrayIdType *da) const;
+    MEDCouplingUMesh *buildDescendingConnectivity(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+    MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+    MEDCouplingUMesh *explode3DMeshTo1D(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+    MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
     void orientCorrectlyPolyhedrons();
     bool isPresenceOfQuadratic() const;
     bool isFullyQuadratic() const;
@@ -2013,9 +2033,9 @@ namespace MEDCoupling
     bool isContiguous1D() const;
     void tessellate2D(double eps);
     void convertQuadraticCellsToLinear();
-    DataArrayInt *convertLinearCellsToQuadratic(int conversionType=0);
+    DataArrayIdType *convertLinearCellsToQuadratic(int conversionType=0);
     void convertDegeneratedCells();
-    DataArrayInt *convertDegeneratedCellsAndRemoveFlatOnes();
+    DataArrayIdType *convertDegeneratedCellsAndRemoveFlatOnes();
     bool removeDegenerated1DCells();
     bool areOnlySimplexCells() const;
     MEDCouplingFieldDouble *getEdgeRatioField() const;
@@ -2023,27 +2043,27 @@ namespace MEDCoupling
     MEDCouplingFieldDouble *getWarpField() const;
     MEDCouplingFieldDouble *getSkewField() const;
     DataArrayDouble *computePlaneEquationOf3DFaces() const;
-    DataArrayInt *convexEnvelop2D();
+    DataArrayIdType *convexEnvelop2D();
     std::string cppRepr() const;
-    DataArrayInt *findAndCorrectBadOriented3DExtrudedCells();
-    DataArrayInt *findAndCorrectBadOriented3DCells();
+    DataArrayIdType *findAndCorrectBadOriented3DExtrudedCells();
+    DataArrayIdType *findAndCorrectBadOriented3DCells();
     MEDCoupling::MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const;
     MEDCouplingSkyLineArray *generateGraph() const;
-    DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const;
-    DataArrayInt *buildUnionOf2DMesh() const;
-    DataArrayInt *buildUnionOf3DMesh() const;
-    DataArrayInt *orderConsecutiveCells1D() const;
+    DataArrayIdType *convertNodalConnectivityToStaticGeoTypeMesh() const;
+    DataArrayIdType *buildUnionOf2DMesh() const;
+    DataArrayIdType *buildUnionOf3DMesh() const;
+    DataArrayIdType *orderConsecutiveCells1D() const;
     DataArrayDouble *getBoundingBoxForBBTreeFast() const;
     DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const;
     DataArrayDouble *getBoundingBoxForBBTree1DQuadratic(double arcDetEps=1e-12) const;
     void changeOrientationOfCells();
     DataArrayDouble *computeCellCenterOfMassWithPrecision(double eps);
-    int split2DCells(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *subNodesInSeg, const DataArrayInt *subNodesInSegI, const DataArrayInt *midOpt=0, const DataArrayInt *midOptI=0);
+    int split2DCells(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI, const DataArrayIdType *midOpt=0, const DataArrayIdType *midOptI=0);
     static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da);
     static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
     static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
-    static DataArrayInt *ComputeSpreadZoneGradually(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn);
-    static DataArrayInt *ComputeRangesFromTypeDistribution(const std::vector<int>& code);
+    static DataArrayIdType *ComputeSpreadZoneGradually(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn);
+    static DataArrayIdType *ComputeRangesFromTypeDistribution(const std::vector<mcIdType>& code);
     %extend {
       MEDCouplingUMesh()
       {
@@ -2090,12 +2110,12 @@ namespace MEDCoupling
       
       void setPartOfMySelf(PyObject *li, const MEDCouplingUMesh& otherOnSameCoordsThanThis)
       {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        int nbc=self->getNumberOfCells();
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
+        mcIdType nbc=self->getNumberOfCells();
         convertIntStarOrSliceLikePyObjToCpp(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
@@ -2116,7 +2136,7 @@ namespace MEDCoupling
                 {
                   if(nbc+singleVal>0)
                     {
-                      int tmp=nbc+singleVal;
+                      mcIdType tmp=nbc+singleVal;
                       self->setPartOfMySelf(&tmp,&tmp+1,otherOnSameCoordsThanThis);
                       break;
                     }
@@ -2142,18 +2162,18 @@ namespace MEDCoupling
               break;
             }
           default:
-            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::setPartOfMySelf : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
+            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::setPartOfMySelf : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayIdType instance !");
           }
       }
 
       void __setitem__(PyObject *li, const MEDCouplingUMesh& otherOnSameCoordsThanThis)
       {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        int nbc=self->getNumberOfCells();
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
+        mcIdType nbc=self->getNumberOfCells();
         convertIntStarOrSliceLikePyObjToCpp(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
@@ -2174,7 +2194,7 @@ namespace MEDCoupling
                 {
                   if(nbc+singleVal>0)
                     {
-                      int tmp=nbc+singleVal;
+                      mcIdType tmp=nbc+singleVal;
                       self->setPartOfMySelf(&tmp,&tmp+1,otherOnSameCoordsThanThis);
                       break;
                     }
@@ -2205,15 +2225,15 @@ namespace MEDCoupling
               break;
             }
           default:
-            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__setitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int, slice, DataArrayInt instance !");
+            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__setitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int, slice, DataArrayIdType instance !");
           }
       }
 
-      void insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, PyObject *li)
+      void insertNextCell(INTERP_KERNEL::NormalizedCellType type, mcIdType size, PyObject *li)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         if(size>szArr)
           {
             std::ostringstream oss; oss << "Wrap of MEDCouplingUMesh::insertNextCell : request of connectivity with length " << size << " whereas the length of input is " << szArr << " !";
@@ -2224,47 +2244,47 @@ namespace MEDCoupling
 
       void insertNextCell(INTERP_KERNEL::NormalizedCellType type, PyObject *li)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->insertNextCell(type,szArr,tmp);
       }
       
-      DataArrayInt *getNodalConnectivity()
+      DataArrayIdType *getNodalConnectivity()
       {
-        DataArrayInt *ret=self->getNodalConnectivity();
+        DataArrayIdType *ret=self->getNodalConnectivity();
         if(ret)
           ret->incrRef();
         return ret;
       }
-      DataArrayInt *getNodalConnectivityIndex()
+      DataArrayIdType *getNodalConnectivityIndex()
       {
-        DataArrayInt *ret=self->getNodalConnectivityIndex();
+        DataArrayIdType *ret=self->getNodalConnectivityIndex();
         if(ret)
           ret->incrRef();
         return ret;
       }
       
-      static PyObject *ComputeSpreadZoneGraduallyFromSeed(PyObject *seed, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn, int nbOfDepthPeeling=-1)
+      static PyObject *ComputeSpreadZoneGraduallyFromSeed(PyObject *seed, const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn, mcIdType nbOfDepthPeeling=-1)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *seedPtr=convertIntStarLikePyObjToCppIntStar(seed,sw,szArr,iTypppArr,stdvecTyyppArr);
-        int nbOfDepthPeelingPerformed=0;
-        DataArrayInt *ret0=MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(seedPtr,seedPtr+szArr,arrIn,arrIndxIn,nbOfDepthPeeling,nbOfDepthPeelingPerformed);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *seedPtr=convertIntStarLikePyObjToCppIntStar(seed,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType nbOfDepthPeelingPerformed=0;
+        DataArrayIdType *ret0=MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed(seedPtr,seedPtr+szArr,arrIn,arrIndxIn,nbOfDepthPeeling,nbOfDepthPeelingPerformed);
         PyObject *res=PyTuple_New(2);
-        PyTuple_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         PyTuple_SetItem(res,1,PyInt_FromLong(nbOfDepthPeelingPerformed));
         return res;
       }
 
-      static PyObject *FindCommonCellsAlg(int compType, int startCellId, const DataArrayInt *nodal, const DataArrayInt *nodalI, const DataArrayInt *revNodal, const DataArrayInt *revNodalI)
+      static PyObject *FindCommonCellsAlg(int compType, mcIdType startCellId, const DataArrayIdType *nodal, const DataArrayIdType *nodalI, const DataArrayIdType *revNodal, const DataArrayIdType *revNodalI)
       {
-        DataArrayInt *v0=0,*v1=0;
+        DataArrayIdType *v0=0,*v1=0;
         MEDCouplingUMesh::FindCommonCellsAlg(compType,startCellId,nodal,nodalI,revNodal,revNodalI,v0,v1);
         PyObject *res = PyList_New(2);
-        PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return res;
       }
       
@@ -2274,11 +2294,11 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         int nbOfCompo=self->getSpaceDimension();
         const double *pt=convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,"Python wrap of MEDCouplingUMesh::distanceToPoint",1,nbOfCompo,true);
         //
-        int cellId=-1;
+        mcIdType cellId=-1;
         double ret0=self->distanceToPoint(pt,pt+nbOfCompo,cellId);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(ret0));
@@ -2288,118 +2308,118 @@ namespace MEDCoupling
 
       PyObject *distanceToPoints(const DataArrayDouble *pts) const
       {
-        DataArrayInt *ret1=0;
+        DataArrayIdType *ret1=0;
         DataArrayDouble *ret0=self->distanceToPoints(pts,ret1);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *tetrahedrize(int policy)
       {
-        int ret2(-1);
-        DataArrayInt *ret1(0);
+        mcIdType ret2(-1);
+        DataArrayIdType *ret1(0);
         MEDCoupling1SGTUMesh *ret0(self->tetrahedrize(policy,ret1,ret2));
         PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCoupling1SGTUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         PyTuple_SetItem(ret,2,PyInt_FromLong(ret2));
         return ret;
       }
       
       PyObject *checkButterflyCells(double eps=1e-12)
       {
-        std::vector<int> cells;
+        std::vector<mcIdType> cells;
         self->checkButterflyCells(cells,eps);
-        DataArrayInt *ret=DataArrayInt::New();
-        ret->alloc((int)cells.size(),1);
+        DataArrayIdType *ret=DataArrayIdType::New();
+        ret->alloc(cells.size(),1);
         std::copy(cells.begin(),cells.end(),ret->getPointer());
-        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
       }
 
       PyObject *splitByType() const
       {
         std::vector<MEDCouplingUMesh *> ms=self->splitByType();
-        int sz=ms.size();
+        std::size_t sz=ms.size();
         PyObject *ret = PyList_New(sz);
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(ms[i]),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *partitionBySpreadZone() const
       {
-        std::vector<DataArrayInt *> retCpp=self->partitionBySpreadZone();
-        int sz=retCpp.size();
+        std::vector<DataArrayIdType *> retCpp=self->partitionBySpreadZone();
+        std::size_t sz=retCpp.size();
         PyObject *ret=PyList_New(sz);
-        for(int i=0;i<sz;i++)
-          PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        for(std::size_t i=0;i<sz;i++)
+          PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
-      static PyObject *PartitionBySpreadZone(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn)
+      static PyObject *PartitionBySpreadZone(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn)
       {
-        std::vector<DataArrayInt *> retCpp(MEDCouplingUMesh::PartitionBySpreadZone(arrIn,arrIndxIn));
-        int sz=retCpp.size();
+        std::vector<DataArrayIdType *> retCpp(MEDCouplingUMesh::PartitionBySpreadZone(arrIn,arrIndxIn));
+        std::size_t sz=retCpp.size();
         PyObject *ret=PyList_New(sz);
-        for(int i=0;i<sz;i++)
-          PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        for(std::size_t i=0;i<sz;i++)
+          PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, PyObject *ids) const
       {
-        int size;
-        INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(ids,&size);
+        mcIdType size;
+        INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(ids,&size);
         MEDCouplingUMesh *ret=self->keepSpecifiedCells(type,tmp,tmp+size);
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 );
       }
 
       bool checkConsecutiveCellTypesAndOrder(PyObject *li) const
       {
-        int sz;
-        INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=(INTERP_KERNEL::NormalizedCellType *)convertPyToNewIntArr2(li,&sz);
+        mcIdType sz;
+        INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=convertPyToNewIntArr2<INTERP_KERNEL::NormalizedCellType>(li,&sz);
         bool ret=self->checkConsecutiveCellTypesAndOrder(order,order+sz);
         return ret;
       }
 
-      DataArrayInt *getRenumArrForConsecutiveCellTypesSpec(PyObject *li) const
+      DataArrayIdType *getRenumArrForConsecutiveCellTypesSpec(PyObject *li) const
       {
-        int sz;
-        INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=(INTERP_KERNEL::NormalizedCellType *)convertPyToNewIntArr2(li,&sz);
-        DataArrayInt *ret=self->getRenumArrForConsecutiveCellTypesSpec(order,(INTERP_KERNEL::NormalizedCellType *)order+sz);
+        mcIdType sz;
+        INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=convertPyToNewIntArr2<INTERP_KERNEL::NormalizedCellType>(li,&sz);
+        DataArrayIdType *ret=self->getRenumArrForConsecutiveCellTypesSpec(order,(INTERP_KERNEL::NormalizedCellType *)order+sz);
         return ret;
       }
 
       PyObject *findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords) const
       {
-        DataArrayInt *tmp0=0,*tmp1=0,*tmp2=0;
+        DataArrayIdType *tmp0=0,*tmp1=0,*tmp2=0;
         self->findNodesToDuplicate(otherDimM1OnSameCoords,tmp0,tmp1,tmp2);
         PyObject *ret=PyTuple_New(3);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(tmp2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(tmp2),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords) const
       {
-        DataArrayInt *tmp0=0,*tmp1=0;
+        DataArrayIdType *tmp0=0,*tmp1=0;
         self->findCellIdsLyingOn(otherDimM1OnSameCoords,tmp0,tmp1);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       void duplicateNodes(PyObject *li)
       {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
         convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
@@ -2410,17 +2430,17 @@ namespace MEDCoupling
           case 4:
             return self->duplicateNodes(daIntTyypp->begin(),daIntTyypp->end());
           default:
-            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::duplicateNodes : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
+            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::duplicateNodes : unrecognized type entered, expected list of int, tuple of int or DataArrayIdType !");
           }
       }
 
-      void duplicateNodesInConn(PyObject *li, int offset)
+      void duplicateNodesInConn(PyObject *li, mcIdType offset)
       {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
         convertIntStarOrSliceLikePyObjToCpp(li,self->getNumberOfNodes(),sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
@@ -2431,37 +2451,37 @@ namespace MEDCoupling
           case 4:
             return self->duplicateNodesInConn(daIntTyypp->begin(),daIntTyypp->end(),offset);
           default:
-            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::duplicateNodesInConn : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
+            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::duplicateNodesInConn : unrecognized type entered, expected list of int, tuple of int or DataArrayIdType !");
           }
       }
 
       void attractSeg3MidPtsAroundNodes(double ratio, PyObject *nodeIds)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *nodeIdsPtr(convertIntStarLikePyObjToCppIntStar(nodeIds,sw,szArr,iTypppArr,stdvecTyyppArr));
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *nodeIdsPtr(convertIntStarLikePyObjToCppIntStar(nodeIds,sw,szArr,iTypppArr,stdvecTyyppArr));
         self->attractSeg3MidPtsAroundNodes(ratio,nodeIdsPtr,nodeIdsPtr+szArr);
       }
 
       PyObject *getLevArrPerCellTypes(PyObject *li) const
       {
-        int sz;
-        INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=(INTERP_KERNEL::NormalizedCellType *)convertPyToNewIntArr2(li,&sz);
-        DataArrayInt *tmp0,*tmp1=0;
+        mcIdType sz;
+        INTERP_KERNEL::AutoPtr<INTERP_KERNEL::NormalizedCellType> order=convertPyToNewIntArr2<INTERP_KERNEL::NormalizedCellType>(li,&sz);
+        DataArrayIdType *tmp0,*tmp1=0;
         tmp0=self->getLevArrPerCellTypes(order,(INTERP_KERNEL::NormalizedCellType *)order+sz,tmp1);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(tmp0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *convertNodalConnectivityToDynamicGeoTypeMesh() const
       {
-        DataArrayInt *ret0=0,*ret1=0;
+        DataArrayIdType *ret0=0,*ret1=0;
         self->convertNodalConnectivityToDynamicGeoTypeMesh(ret0,ret1);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
@@ -2469,12 +2489,12 @@ namespace MEDCoupling
       {
         std::vector<const MEDCoupling::MEDCouplingUMesh *> meshes;
         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(ms,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",meshes);
-        DataArrayInt *ret1=0,*ret2=0;
+        DataArrayIdType *ret1=0,*ret2=0;
         MEDCouplingUMesh *ret0=MEDCouplingUMesh::AggregateSortedByTypeMeshesOnSameCoords(meshes,ret1,ret2);
         PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
@@ -2488,15 +2508,15 @@ namespace MEDCoupling
 
       static PyObject *FuseUMeshesOnSameCoords(PyObject *ms, int compType)
       {
-        int sz;
+        std::size_t sz;
         std::vector<const MEDCouplingUMesh *> meshes;
         convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingUMesh *>(ms,SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh,"MEDCouplingUMesh",meshes);
-        std::vector<DataArrayInt *> corr;
+        std::vector<DataArrayIdType *> corr;
         MEDCouplingUMesh *um=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,compType,corr);
         sz=corr.size();
         PyObject *ret1=PyList_New(sz);
-        for(int i=0;i<sz;i++)
-          PyList_SetItem(ret1,i,SWIG_NewPointerObj(SWIG_as_voidptr(corr[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        for(std::size_t i=0;i<sz;i++)
+          PyList_SetItem(ret1,i,SWIG_NewPointerObj(SWIG_as_voidptr(corr[i]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         PyObject *ret=PyList_New(2);
         PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(um),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
         PyList_SetItem(ret,1,ret1);
@@ -2523,17 +2543,17 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         int spaceDim=self->getSpaceDimension();
         const char msg[]="Python wrap of MEDCouplingUMesh::are2DCellsNotCorrectlyOriented : ";
         const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val,a,aa,bb,msg,1,spaceDim,true);
         //
-        std::vector<int> cells;
+        std::vector<mcIdType> cells;
         self->are2DCellsNotCorrectlyOriented(v,polyOnly,cells);
-        DataArrayInt *ret=DataArrayInt::New();
-        ret->alloc((int)cells.size(),1);
+        DataArrayIdType *ret=DataArrayIdType::New();
+        ret->alloc(cells.size(),1);
         std::copy(cells.begin(),cells.end(),ret->getPointer());
-        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
       }
 
       void orientCorrectly2DCells(PyObject *vec, bool polyOnly)
@@ -2542,7 +2562,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         int spaceDim=self->getSpaceDimension();
         const char msg[]="Python wrap of MEDCouplingUMesh::orientCorrectly2DCells : ";
         const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val,a,aa,bb,msg,1,spaceDim,true);
@@ -2551,12 +2571,12 @@ namespace MEDCoupling
       
       PyObject *arePolyhedronsNotCorrectlyOriented() const
       {
-        std::vector<int> cells;
+        std::vector<mcIdType> cells;
         self->arePolyhedronsNotCorrectlyOriented(cells);
-        DataArrayInt *ret=DataArrayInt::New();
-        ret->alloc((int)cells.size(),1);
+        DataArrayIdType *ret=DataArrayIdType::New();
+        ret->alloc(cells.size(),1);
         std::copy(cells.begin(),cells.end(),ret->getPointer());
-        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
       }
 
       PyObject *getFastAveragePlaneOfThis() const
@@ -2579,200 +2599,200 @@ namespace MEDCoupling
 
       PyObject *areCellsIncludedIn(const MEDCouplingUMesh *other, int compType) const
       {
-        DataArrayInt *ret1;
+        DataArrayIdType *ret1;
         bool ret0=self->areCellsIncludedIn(other,compType,ret1);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret0Py=ret0?Py_True:Py_False;
         Py_XINCREF(ret0Py);
         PyTuple_SetItem(ret,0,ret0Py);
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *areCellsIncludedInPolicy7(const MEDCouplingUMesh *other) const
       {
-        DataArrayInt *ret1;
+        DataArrayIdType *ret1;
         bool ret0=self->areCellsIncludedInPolicy7(other,ret1);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret0Py=ret0?Py_True:Py_False;
         Py_XINCREF(ret0Py);
         PyTuple_SetItem(ret,0,ret0Py);
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *explode3DMeshTo1D() const
       {
-        MCAuto<DataArrayInt> d0=DataArrayInt::New();
-        MCAuto<DataArrayInt> d1=DataArrayInt::New();
-        MCAuto<DataArrayInt> d2=DataArrayInt::New();
-        MCAuto<DataArrayInt> d3=DataArrayInt::New();
+        MCAuto<DataArrayIdType> d0=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d1=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d2=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d3=DataArrayIdType::New();
         MEDCouplingUMesh *m=self->explode3DMeshTo1D(d0,d1,d2,d3);
         PyObject *ret=PyTuple_New(5);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *explodeIntoEdges() const
       {
-        MCAuto<DataArrayInt> desc,descIndex,revDesc,revDescIndx;
+        MCAuto<DataArrayIdType> desc,descIndex,revDesc,revDescIndx;
         MCAuto<MEDCouplingUMesh> m(self->explodeIntoEdges(desc,descIndex,revDesc,revDescIndx));
         PyObject *ret=PyTuple_New(5);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m.retn()),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(desc.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(descIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(revDesc.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(revDescIndx.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(desc.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(descIndex.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(revDesc.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(revDescIndx.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *explodeMeshIntoMicroEdges() const
       {
-        MCAuto<DataArrayInt> d0=DataArrayInt::New();
-        MCAuto<DataArrayInt> d1=DataArrayInt::New();
-        MCAuto<DataArrayInt> d2=DataArrayInt::New();
-        MCAuto<DataArrayInt> d3=DataArrayInt::New();
+        MCAuto<DataArrayIdType> d0=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d1=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d2=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d3=DataArrayIdType::New();
         MEDCouplingUMesh *m=self->explodeMeshIntoMicroEdges(d0,d1,d2,d3);
         PyObject *ret=PyTuple_New(5);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *buildDescendingConnectivity() const
       {
-        MCAuto<DataArrayInt> d0=DataArrayInt::New();
-        MCAuto<DataArrayInt> d1=DataArrayInt::New();
-        MCAuto<DataArrayInt> d2=DataArrayInt::New();
-        MCAuto<DataArrayInt> d3=DataArrayInt::New();
+        MCAuto<DataArrayIdType> d0=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d1=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d2=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d3=DataArrayIdType::New();
         MEDCouplingUMesh *m=self->buildDescendingConnectivity(d0,d1,d2,d3);
         PyObject *ret=PyTuple_New(5);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *buildDescendingConnectivity2() const
       {
-        MCAuto<DataArrayInt> d0=DataArrayInt::New();
-        MCAuto<DataArrayInt> d1=DataArrayInt::New();
-        MCAuto<DataArrayInt> d2=DataArrayInt::New();
-        MCAuto<DataArrayInt> d3=DataArrayInt::New();
+        MCAuto<DataArrayIdType> d0=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d1=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d2=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d3=DataArrayIdType::New();
         MEDCouplingUMesh *m=self->buildDescendingConnectivity2(d0,d1,d2,d3);
         PyObject *ret=PyTuple_New(5);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
       
       PyObject *computeNeighborsOfCells() const
       {
-        DataArrayInt *neighbors=0,*neighborsIdx=0;
+        DataArrayIdType *neighbors=0,*neighborsIdx=0;
         self->computeNeighborsOfCells(neighbors,neighborsIdx);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *computeNeighborsOfNodes() const
       {
-        DataArrayInt *neighbors=0,*neighborsIdx=0;
+        DataArrayIdType *neighbors=0,*neighborsIdx=0;
         self->computeNeighborsOfNodes(neighbors,neighborsIdx);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *computeEnlargedNeighborsOfNodes() const
       {
-        MCAuto<DataArrayInt> neighbors,neighborsIdx;
+        MCAuto<DataArrayIdType> neighbors,neighborsIdx;
         self->computeEnlargedNeighborsOfNodes(neighbors,neighborsIdx);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
       
-      PyObject *computeCellNeighborhoodFromNodesOne(const DataArrayInt *nodeNeigh, const DataArrayInt *nodeNeighI) const
+      PyObject *computeCellNeighborhoodFromNodesOne(const DataArrayIdType *nodeNeigh, const DataArrayIdType *nodeNeighI) const
       {
-        MCAuto<DataArrayInt> cellNeigh,cellNeighIndex;
+        MCAuto<DataArrayIdType> cellNeigh,cellNeighIndex;
         self->computeCellNeighborhoodFromNodesOne(nodeNeigh,nodeNeighI,cellNeigh,cellNeighIndex);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeigh.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeighIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeigh.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeighIndex.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
       
-      static PyObject *ComputeNeighborsOfCellsAdv(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *revDesc, const DataArrayInt *revDescI)
+      static PyObject *ComputeNeighborsOfCellsAdv(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *revDesc, const DataArrayIdType *revDescI)
       {
-        DataArrayInt *neighbors=0,*neighborsIdx=0;
+        DataArrayIdType *neighbors=0,*neighborsIdx=0;
         MEDCouplingUMesh::ComputeNeighborsOfCellsAdv(desc,descI,revDesc,revDescI,neighbors,neighborsIdx);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(neighbors),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh)
       {
-        MCAuto<DataArrayInt> d0=DataArrayInt::New();
-        MCAuto<DataArrayInt> d1=DataArrayInt::New();
-        DataArrayInt *d2,*d3,*d4,*dd5;
+        MCAuto<DataArrayIdType> d0=DataArrayIdType::New();
+        MCAuto<DataArrayIdType> d1=DataArrayIdType::New();
+        DataArrayIdType *d2,*d3,*d4,*dd5;
         MEDCouplingUMesh *mOut=self->emulateMEDMEMBDC(nM1LevMesh,d0,d1,d2,d3,d4,dd5);
         PyObject *ret=PyTuple_New(7);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(mOut),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(d4),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(dd5),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(d4),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(dd5),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
-      DataArrayDouble *getPartBarycenterAndOwner(DataArrayInt *da) const
+      DataArrayDouble *getPartBarycenterAndOwner(DataArrayIdType *da) const
       {
         if(!da)
-          throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+          throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
         da->checkAllocated();
         return self->getPartBarycenterAndOwner(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
       }
 
-      DataArrayDouble *getPartMeasureField(bool isAbs, DataArrayInt *da) const
+      DataArrayDouble *getPartMeasureField(bool isAbs, DataArrayIdType *da) const
       {
         if(!da)
-          throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+          throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
         da->checkAllocated();
         return self->getPartMeasureField(isAbs,da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
       }
 
-      MEDCouplingFieldDouble *buildPartOrthogonalField(DataArrayInt *da) const
+      MEDCouplingFieldDouble *buildPartOrthogonalField(DataArrayIdType *da) const
       {
         if(!da)
-          throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+          throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
         da->checkAllocated();
         return self->buildPartOrthogonalField(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
       }
 
-      PyObject *getTypesOfPart(DataArrayInt *da) const
+      PyObject *getTypesOfPart(DataArrayIdType *da) const
       {
         if(!da)
-          throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+          throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
         da->checkAllocated();
         std::set<INTERP_KERNEL::NormalizedCellType> result=self->getTypesOfPart(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
         std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
@@ -2782,37 +2802,37 @@ namespace MEDCoupling
         return res;
       }
 
-      DataArrayInt *keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da) const
+      DataArrayIdType *keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, DataArrayIdType *da) const
       {
         if(!da)
-          throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+          throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
         da->checkAllocated();
-        DataArrayInt *ret=self->keepCellIdsByType(type,da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
+        DataArrayIdType *ret=self->keepCellIdsByType(type,da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
         ret->setName(da->getName().c_str());
         return ret;
       }
 
       static PyObject *Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps)
       {
-        DataArrayInt *cellNb1=0,*cellNb2=0;
+        DataArrayIdType *cellNb1=0,*cellNb2=0;
         MEDCouplingUMesh *mret=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,eps,cellNb1,cellNb2);
         PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(mret),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNb1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(cellNb2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNb1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(cellNb2),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       static PyObject *Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D, const MEDCouplingUMesh *mesh1D, double eps)
       {
         MEDCouplingUMesh *splitMesh2D(0),*splitMesh1D(0);
-        DataArrayInt *cellIdInMesh2D(0),*cellIdInMesh1D(0);
+        DataArrayIdType *cellIdInMesh2D(0),*cellIdInMesh1D(0);
         MEDCouplingUMesh::Intersect2DMeshWith1DLine(mesh2D,mesh1D,eps,splitMesh2D,splitMesh1D,cellIdInMesh2D,cellIdInMesh1D);
         PyObject *ret(PyTuple_New(4));
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(splitMesh2D),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(splitMesh1D),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(cellIdInMesh2D),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellIdInMesh1D),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(cellIdInMesh2D),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellIdInMesh1D),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
@@ -2825,17 +2845,17 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st parameter for origin.";
         const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
         //
-        DataArrayInt *cellIds=0;
+        DataArrayIdType *cellIds=0;
         MEDCouplingUMesh *ret0=self->buildSlice3D(orig,vect,eps,cellIds);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellIds),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
@@ -2848,17 +2868,17 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st parameter for origin.";
         const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
         const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
         //
-        DataArrayInt *cellIds=0;
+        DataArrayIdType *cellIds=0;
         MEDCouplingUMesh *ret0=self->buildSlice3DSurf(orig,vect,eps,cellIds);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellIds),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
@@ -2868,7 +2888,7 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st parameter for origin.";
         const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,3,true);
@@ -2877,7 +2897,7 @@ namespace MEDCoupling
         return ret.retn();
       }
 
-      DataArrayInt *getCellIdsCrossingPlane(PyObject *origin, PyObject *vec, double eps) const
+      DataArrayIdType *getCellIdsCrossingPlane(PyObject *origin, PyObject *vec, double eps) const
       {
         int spaceDim=self->getSpaceDimension();
         if(spaceDim!=3)
@@ -2886,7 +2906,7 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st parameter for origin.";
         const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd parameter for vector.";
         const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
@@ -2896,11 +2916,11 @@ namespace MEDCoupling
 
       void convertToPolyTypes(PyObject *li)
       {
-        int sw;
-        int pos1;
-        std::vector<int> pos2;
-        DataArrayInt *pos3=0;
-        DataArrayIntTuple *pos4=0;
+        mcIdType sw;
+        mcIdType pos1;
+        std::vector<mcIdType> pos2;
+        DataArrayIdType *pos3=0;
+        DataArrayIdTypeTuple *pos4=0;
         convertIntStarLikePyObjToCpp(li,sw,pos1,pos2,pos3,pos4);
         switch(sw)
           {
@@ -2946,7 +2966,7 @@ namespace MEDCoupling
     MEDCouplingUMesh *build3DUnstructuredMesh() const;
     int get2DCellIdForExtrusion() const;
     %extend {
-      MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId)
+      MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId)
       {
         return MEDCouplingMappedExtrudedMesh::New(mesh3D,mesh2D,cell2DId);
       }
@@ -2989,10 +3009,10 @@ namespace MEDCoupling
       }
       PyObject *getMesh3DIds() const
       {
-        DataArrayInt *ret=self->getMesh3DIds();
+        DataArrayIdType *ret=self->getMesh3DIds();
         if(ret)
           ret->incrRef();
-        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
       } 
     }
   };
@@ -3012,15 +3032,15 @@ namespace MEDCoupling
     {
       virtual void insertNextCell(PyObject *li)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->insertNextCell(tmp,tmp+szArr);
       }
 
-      virtual DataArrayInt *getNodalConnectivity() const
+      virtual DataArrayIdType *getNodalConnectivity() const
       {
-        DataArrayInt *ret=self->getNodalConnectivity();
+        DataArrayIdType *ret=self->getNodalConnectivity();
         if(ret) ret->incrRef();
         return ret;
       }
@@ -3041,13 +3061,13 @@ namespace MEDCoupling
   public:
     static MEDCoupling1SGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
     static MEDCoupling1SGTUMesh *New(const MEDCouplingUMesh *m);
-    void setNodalConnectivity(DataArrayInt *nodalConn);
+    void setNodalConnectivity(DataArrayIdType *nodalConn);
     int getNumberOfNodesPerCell() const;
     static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2);
     MEDCoupling1SGTUMesh *buildSetInstanceFromThis(int spaceDim) const;
     MEDCoupling1GTUMesh *computeDualMesh() const;
     MEDCoupling1SGTUMesh *explodeEachHexa8To6Quad4() const;
-    DataArrayInt *sortHexa8EachOther();
+    DataArrayIdType *sortHexa8EachOther();
     %extend
     {
       MEDCoupling1SGTUMesh()
@@ -3079,12 +3099,12 @@ namespace MEDCoupling
 
       PyObject *structurizeMe(double eps=1e-12) const
       {
-        DataArrayInt *cellPerm(0),*nodePerm(0);
+        DataArrayIdType *cellPerm(0),*nodePerm(0);
         MEDCouplingCMesh *retCpp(self->structurizeMe(cellPerm,nodePerm,eps));
         PyObject *ret(PyTuple_New(3));
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp),SWIGTYPE_p_MEDCoupling__MEDCouplingCMesh, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellPerm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(nodePerm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellPerm),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(nodePerm),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
@@ -3113,7 +3133,7 @@ namespace MEDCoupling
   public:
     static MEDCoupling1DGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
     static MEDCoupling1DGTUMesh *New(const MEDCouplingUMesh *m);
-    void setNodalConnectivity(DataArrayInt *nodalConn, DataArrayInt *nodalConnIndex);
+    void setNodalConnectivity(DataArrayIdType *nodalConn, DataArrayIdType *nodalConnIndex);
     MEDCoupling1DGTUMesh *buildSetInstanceFromThis(int spaceDim) const;
     bool isPacked() const;
     %extend
@@ -3144,23 +3164,23 @@ namespace MEDCoupling
         return oss.str();
       }
 
-      DataArrayInt *getNodalConnectivityIndex() const
+      DataArrayIdType *getNodalConnectivityIndex() const
       {
-        DataArrayInt *ret=self->getNodalConnectivityIndex();
+        DataArrayIdType *ret=self->getNodalConnectivityIndex();
         if(ret) ret->incrRef();
         return ret;
       }
 
       PyObject *retrievePackedNodalConnectivity() const
       {
-        DataArrayInt *ret1=0,*ret2=0;
+        DataArrayIdType *ret1=0,*ret2=0;
         bool ret0=self->retrievePackedNodalConnectivity(ret1,ret2);
         PyObject *ret0Py=ret0?Py_True:Py_False;
         Py_XINCREF(ret0Py);
         PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,ret0Py);
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
       
@@ -3189,10 +3209,10 @@ namespace MEDCoupling
         return MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(tmp);
       }
       
-      static DataArrayInt *AggregateNodalConnAndShiftNodeIds(PyObject *li, const std::vector<int>& offsetInNodeIdsPerElt)
+      static DataArrayIdType *AggregateNodalConnAndShiftNodeIds(PyObject *li, const std::vector<mcIdType>& offsetInNodeIdsPerElt)
       {
-        std::vector<const MEDCoupling::DataArrayInt *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
+        std::vector<const MEDCoupling::DataArrayIdType *> tmp;
+        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType *>(li,SWIGTITraits<mcIdType>::TI,"DataArrayIdType",tmp);
         return MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(tmp,offsetInNodeIdsPerElt);
       }
     }
@@ -3203,32 +3223,32 @@ namespace MEDCoupling
   class MEDCouplingStructuredMesh : public MEDCoupling::MEDCouplingMesh
   {
   public:
-    int getCellIdFromPos(int i, int j, int k) const;
-    int getNodeIdFromPos(int i, int j, int k) const;
-    int getNumberOfCellsOfSubLevelMesh() const;
+    mcIdType getCellIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
+    mcIdType getNodeIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
+    mcIdType getNumberOfCellsOfSubLevelMesh() const;
     int getSpaceDimensionOnNodeStruct() const;
     double computeSquareness() const;
-    virtual std::vector<int> getNodeGridStructure() const;
-    std::vector<int> getCellGridStructure() const;
+    virtual std::vector<mcIdType> getNodeGridStructure() const;
+    std::vector<mcIdType> getCellGridStructure() const;
     MEDCoupling1SGTUMesh *build1SGTUnstructured() const;
-    std::vector<int> getLocationFromCellId(int cellId) const;
-    std::vector<int> getLocationFromNodeId(int cellId) const;
+    std::vector<mcIdType> getLocationFromCellId(mcIdType cellId) const;
+    std::vector<mcIdType> getLocationFromNodeId(mcIdType cellId) const;
     static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension(int meshDim);
     MEDCoupling1SGTUMesh *build1SGTSubLevelMesh() const;
-    static int DeduceNumberOfGivenStructure(const std::vector<int>& st);
-    static DataArrayInt *ComputeCornersGhost(const std::vector<int>& st, int ghostLev);
-    static std::vector<int> GetSplitVectFromStruct(const std::vector<int>& strct);
+    static mcIdType DeduceNumberOfGivenStructure(const std::vector<mcIdType>& st);
+    static DataArrayIdType *ComputeCornersGhost(const std::vector<mcIdType>& st, mcIdType ghostLev);
+    static std::vector<mcIdType> GetSplitVectFromStruct(const std::vector<mcIdType>& strct);
     %extend
     {
       virtual MEDCouplingStructuredMesh *buildStructuredSubPart(PyObject *cellPart) const
       {
-        int tmpp1=-1,tmpp2=-1;
-        std::vector<int> tmp=fillArrayWithPyListInt2(cellPart,tmpp1,tmpp2);
-        std::vector< std::pair<int,int> > inp;
+        mcIdType tmpp1=-1,tmpp2=-1;
+        std::vector<mcIdType> tmp=fillArrayWithPyListInt2(cellPart,tmpp1,tmpp2);
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         if(tmpp2==2)
           {
             inp.resize(tmpp1);
-            for(int i=0;i<tmpp1;i++)
+            for(mcIdType i=0;i<tmpp1;i++)
               { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
           }
         else if(tmpp2==1)
@@ -3236,7 +3256,7 @@ namespace MEDCoupling
             if(tmpp1%2!=0)
               throw INTERP_KERNEL::Exception("Wrap of MEDCouplingStructuredMesh.buildStructuredSubPart : invalid input size ! Must be even size !");
             inp.resize(tmpp1/2);
-            for(int i=0;i<tmpp1/2;i++)
+            for(mcIdType i=0;i<tmpp1/2;i++)
               { inp[i].first=tmp[2*i]; inp[i].second=tmp[2*i+1]; }
           }
         else
@@ -3244,39 +3264,39 @@ namespace MEDCoupling
         return self->buildStructuredSubPart(inp);
       }
 
-      static DataArrayInt *BuildExplicitIdsFrom(PyObject *st, PyObject *part)
+      static DataArrayIdType *BuildExplicitIdsFrom(PyObject *st, PyObject *part)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(part,inp);
         //
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp4=convertIntStarLikePyObjToCppIntStar(st,sw,szArr,iTypppArr,stdvecTyyppArr);
-        std::vector<int> tmp5(tmp4,tmp4+szArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp4=convertIntStarLikePyObjToCppIntStar(st,sw,szArr,iTypppArr,stdvecTyyppArr);
+        std::vector<mcIdType> tmp5(tmp4,tmp4+szArr);
         //
         return MEDCouplingStructuredMesh::BuildExplicitIdsFrom(tmp5,inp);
       }
 
-      static void MultiplyPartOf(const std::vector<int>& st, PyObject *part, double factor, DataArrayDouble *da)
+      static void MultiplyPartOf(const std::vector<mcIdType>& st, PyObject *part, double factor, DataArrayDouble *da)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(part,inp);
         MEDCouplingStructuredMesh::MultiplyPartOf(st,inp,factor,da);
       }
 
-      static void MultiplyPartOfByGhost(const std::vector<int>& st, PyObject *part, int ghostSize, double factor, DataArrayDouble *da)
+      static void MultiplyPartOfByGhost(const std::vector<mcIdType>& st, PyObject *part, mcIdType ghostSize, double factor, DataArrayDouble *da)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(part,inp);
         MEDCouplingStructuredMesh::MultiplyPartOfByGhost(st,inp,ghostSize,factor,da);
       }
 
-      static PyObject *PutInGhostFormat(int ghostSize, const std::vector<int>& st, PyObject *part)
+      static PyObject *PutInGhostFormat(mcIdType ghostSize, const std::vector<mcIdType>& st, PyObject *part)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(part,inp);
-        std::vector<int> stWithGhost;
-        std::vector< std::pair<int,int> > partWithGhost;
+        std::vector<mcIdType> stWithGhost;
+        std::vector< std::pair<mcIdType,mcIdType> > partWithGhost;
         MEDCouplingStructuredMesh::PutInGhostFormat(ghostSize,st,inp,stWithGhost,partWithGhost);
         PyObject *ret(PyTuple_New(2));
         PyTuple_SetItem(ret,0,convertIntArrToPyList2(stWithGhost));
@@ -3284,53 +3304,53 @@ namespace MEDCoupling
         return ret;
       }
 
-      static DataArrayDouble *ExtractFieldOfDoubleFrom(const std::vector<int>& st, const DataArrayDouble *fieldOfDbl, PyObject *partCompactFormat)
+      static DataArrayDouble *ExtractFieldOfDoubleFrom(const std::vector<mcIdType>& st, const DataArrayDouble *fieldOfDbl, PyObject *partCompactFormat)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(partCompactFormat,inp);
         return MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(st,fieldOfDbl,inp);
       }
 
-      static void AssignPartOfFieldOfDoubleUsing(const std::vector<int>& st, DataArrayDouble *fieldOfDbl, PyObject *partCompactFormat, const DataArrayDouble *other)
+      static void AssignPartOfFieldOfDoubleUsing(const std::vector<mcIdType>& st, DataArrayDouble *fieldOfDbl, PyObject *partCompactFormat, const DataArrayDouble *other)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(partCompactFormat,inp);
         MEDCouplingStructuredMesh::AssignPartOfFieldOfDoubleUsing(st,fieldOfDbl,inp,other);
       }
 
-      static int DeduceNumberOfGivenRangeInCompactFrmt(PyObject *part)
+      static mcIdType DeduceNumberOfGivenRangeInCompactFrmt(PyObject *part)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(part,inp);
         return MEDCouplingStructuredMesh::DeduceNumberOfGivenRangeInCompactFrmt(inp);
       }
 
-      static DataArrayInt *Build1GTNodalConnectivity(PyObject *li)
+      static DataArrayIdType *Build1GTNodalConnectivity(PyObject *li)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         return MEDCouplingStructuredMesh::Build1GTNodalConnectivity(tmp,tmp+szArr);
       }
 
-      static DataArrayInt *Build1GTNodalConnectivityOfSubLevelMesh(PyObject *li)
+      static DataArrayIdType *Build1GTNodalConnectivityOfSubLevelMesh(PyObject *li)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp(convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr));
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp(convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr));
         return MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh(tmp,tmp+szArr);
       }
 
-      static std::vector<int> GetDimensionsFromCompactFrmt(PyObject *partCompactFormat)
+      static std::vector<mcIdType> GetDimensionsFromCompactFrmt(PyObject *partCompactFormat)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(partCompactFormat,inp);
         return MEDCouplingStructuredMesh::GetDimensionsFromCompactFrmt(inp);
       }
 
-      static PyObject *GetCompactFrmtFromDimensions(const std::vector<int>& dims)
+      static PyObject *GetCompactFrmtFromDimensions(const std::vector<mcIdType>& dims)
       {
-        std::vector< std::pair<int,int> > ret(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dims));
+        std::vector< std::pair<mcIdType,mcIdType> > ret(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(dims));
         PyObject *retPy=PyList_New(ret.size());
         for(std::size_t i=0;i<ret.size();i++)
           {
@@ -3344,10 +3364,10 @@ namespace MEDCoupling
 
       static PyObject *IntersectRanges(PyObject *r1, PyObject *r2)
       {
-        std::vector< std::pair<int,int> > r1Cpp,r2Cpp;
+        std::vector< std::pair<mcIdType,mcIdType> > r1Cpp,r2Cpp;
         convertPyToVectorPairInt(r1,r1Cpp);
         convertPyToVectorPairInt(r2,r2Cpp);
-        std::vector< std::pair<int,int> > ret(MEDCouplingStructuredMesh::IntersectRanges(r1Cpp,r2Cpp));
+        std::vector< std::pair<mcIdType,mcIdType> > ret(MEDCouplingStructuredMesh::IntersectRanges(r1Cpp,r2Cpp));
         PyObject *retPy=PyList_New(ret.size());
         for(std::size_t i=0;i<ret.size();i++)
           {
@@ -3361,7 +3381,7 @@ namespace MEDCoupling
 
       static bool AreRangesIntersect(PyObject *r1, PyObject *r2)
       {
-        std::vector< std::pair<int,int> > r1Cpp,r2Cpp;
+        std::vector< std::pair<mcIdType,mcIdType> > r1Cpp,r2Cpp;
         convertPyToVectorPairInt(r1,r1Cpp);
         convertPyToVectorPairInt(r2,r2Cpp);
         return MEDCouplingStructuredMesh::AreRangesIntersect(r1Cpp,r2Cpp);
@@ -3369,14 +3389,14 @@ namespace MEDCoupling
 
       static PyObject *IsPartStructured(PyObject *li, PyObject *st)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
-        int szArr2,sw2,iTypppArr2;
-        std::vector<int> stdvecTyyppArr2;
-        const int *tmp2=convertIntStarLikePyObjToCppIntStar(st,sw2,szArr2,iTypppArr2,stdvecTyyppArr2);
-        std::vector<int> tmp3(tmp2,tmp2+szArr2);
-        std::vector< std::pair<int,int> > partCompactFormat;
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr2,sw2,iTypppArr2;
+        std::vector<mcIdType> stdvecTyyppArr2;
+        const mcIdType *tmp2=convertIntStarLikePyObjToCppIntStar(st,sw2,szArr2,iTypppArr2,stdvecTyyppArr2);
+        std::vector<mcIdType> tmp3(tmp2,tmp2+szArr2);
+        std::vector< std::pair<mcIdType,mcIdType> > partCompactFormat;
         bool ret0=MEDCouplingStructuredMesh::IsPartStructured(tmp,tmp+szArr,tmp3,partCompactFormat);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret0Py=ret0?Py_True:Py_False; Py_XINCREF(ret0Py);
@@ -3395,7 +3415,7 @@ namespace MEDCoupling
 
       static PyObject *ChangeReferenceFromGlobalOfCompactFrmt(PyObject *bigInAbs, PyObject *partOfBigInAbs, bool check=true)
       {
-        std::vector< std::pair<int,int> > param0,param1,ret;
+        std::vector< std::pair<mcIdType,mcIdType> > param0,param1,ret;
         convertPyToVectorPairInt(bigInAbs,param0);
         convertPyToVectorPairInt(partOfBigInAbs,param1);
         MEDCouplingStructuredMesh::ChangeReferenceFromGlobalOfCompactFrmt(param0,param1,ret,check);
@@ -3410,11 +3430,11 @@ namespace MEDCoupling
         return retPy;
       }
 
-      static PyObject *TranslateCompactFrmt(PyObject *part, const std::vector<int>& translation)
+      static PyObject *TranslateCompactFrmt(PyObject *part, const std::vector<mcIdType>& translation)
       {
-        std::vector< std::pair<int,int> > param0;
+        std::vector< std::pair<mcIdType,mcIdType> > param0;
         convertPyToVectorPairInt(part,param0);
-        std::vector< std::pair<int,int> > ret(MEDCouplingStructuredMesh::TranslateCompactFrmt(param0,translation));
+        std::vector< std::pair<mcIdType,mcIdType> > ret(MEDCouplingStructuredMesh::TranslateCompactFrmt(param0,translation));
         PyObject *retPy(PyList_New(ret.size()));
         for(std::size_t i=0;i<ret.size();i++)
           {
@@ -3426,9 +3446,9 @@ namespace MEDCoupling
         return retPy;
       }
 
-      static std::vector<int> FindTranslationFrom(PyObject *startingFrom, PyObject *goingTo)
+      static std::vector<mcIdType> FindTranslationFrom(PyObject *startingFrom, PyObject *goingTo)
       {
-        std::vector< std::pair<int,int> > param0,param1;
+        std::vector< std::pair<mcIdType,mcIdType> > param0,param1;
         convertPyToVectorPairInt(startingFrom,param0);
         convertPyToVectorPairInt(goingTo,param1);
         return  MEDCouplingStructuredMesh::FindTranslationFrom(param0,param1);
@@ -3436,7 +3456,7 @@ namespace MEDCoupling
 
       static PyObject *ChangeReferenceToGlobalOfCompactFrmt(PyObject *bigInAbs, PyObject *partOfBigRelativeToBig, bool check=true)
       {
-        std::vector< std::pair<int,int> > param0,param1,ret;
+        std::vector< std::pair<mcIdType,mcIdType> > param0,param1,ret;
         convertPyToVectorPairInt(bigInAbs,param0);
         convertPyToVectorPairInt(partOfBigRelativeToBig,param1);
         MEDCouplingStructuredMesh::ChangeReferenceToGlobalOfCompactFrmt(param0,param1,ret,check);
@@ -3534,9 +3554,9 @@ namespace MEDCoupling
       }
       void setNodeGridStructure(PyObject *gridStruct)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(gridStruct,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(gridStruct,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->setNodeGridStructure(tmp,tmp+szArr);
       }
     }
@@ -3552,16 +3572,16 @@ namespace MEDCoupling
     static MEDCouplingIMesh *New();
     //
     void setSpaceDimension(int spaceDim);
-    std::vector<int> getNodeStruct() const;
+    std::vector<mcIdType> getNodeStruct() const;
     std::vector<double> getOrigin() const;
     std::vector<double> getDXYZ() const;
     void setAxisUnit(const std::string& unitName);
     std::string getAxisUnit() const;
     double getMeasureOfAnyCell() const;
     MEDCouplingCMesh *convertToCartesian() const;
-    void refineWithFactor(const std::vector<int>& factors);
+    void refineWithFactor(const std::vector<mcIdType>& factors);
     MEDCouplingIMesh *asSingleCell() const;
-    MEDCouplingIMesh *buildWithGhost(int ghostLev) const;
+    MEDCouplingIMesh *buildWithGhost(mcIdType ghostLev) const;
     %extend
     {
       MEDCouplingIMesh()
@@ -3572,15 +3592,15 @@ namespace MEDCoupling
       {
         static const char msg0[]="MEDCouplingIMesh::New : error on 'origin' parameter !";
         static const char msg1[]="MEDCouplingIMesh::New : error on 'dxyz' parameter !";
-        const int *nodeStrctPtr(0);
+        const mcIdType *nodeStrctPtr(0);
         const double *originPtr(0),*dxyzPtr(0);
-        int sw,sz,val0;
-        std::vector<int> bb0;
+        mcIdType sw,sz,val0;
+        std::vector<mcIdType> bb0;
         nodeStrctPtr=convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0);
         //
         double val,val2;
         std::vector<double> bb,bb2;
-        int sz1,sz2;
+        mcIdType sz1,sz2;
         originPtr=convertObjToPossibleCpp5_SingleCompo(origin,sw,val,bb,msg0,false,sz1);
         dxyzPtr=convertObjToPossibleCpp5_SingleCompo(dxyz,sw,val2,bb2,msg1,false,sz2);
         //
@@ -3594,9 +3614,9 @@ namespace MEDCoupling
 
       void setNodeStruct(PyObject *nodeStrct)
       {
-        int sw,sz,val0;
-        std::vector<int> bb0;
-        const int *nodeStrctPtr(convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0));
+        mcIdType sw,sz,val0;
+        std::vector<mcIdType> bb0;
+        const mcIdType *nodeStrctPtr(convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0));
         self->setNodeStruct(nodeStrctPtr,nodeStrctPtr+sz);
       }
 
@@ -3604,10 +3624,8 @@ namespace MEDCoupling
       {
         static const char msg[]="MEDCouplingIMesh::setOrigin : invalid input 'origin' parameter ! integer, float, list/tuple of float, DataArrayDouble or DataArrayDoubleTuple supported !";
         double val;
-        DataArrayDouble *a;
-        DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw,nbTuples;
+        mcIdType sw,nbTuples;
         const double *originPtr(convertObjToPossibleCpp5_SingleCompo(origin,sw,val,bb,msg,false,nbTuples));
         self->setOrigin(originPtr,originPtr+nbTuples);
       }
@@ -3616,45 +3634,43 @@ namespace MEDCoupling
       {
         static const char msg[]="MEDCouplingIMesh::setDXYZ : invalid input 'dxyz' parameter ! integer, float, list/tuple of float, DataArrayDouble or DataArrayDoubleTuple supported !";
         double val;
-        DataArrayDouble *a;
-        DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw,nbTuples;
+        mcIdType sw,nbTuples;
         const double *originPtr(convertObjToPossibleCpp5_SingleCompo(dxyz,sw,val,bb,msg,false,nbTuples));
         self->setDXYZ(originPtr,originPtr+nbTuples);
       }
 
-      static void CondenseFineToCoarse(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA)
+      static void CondenseFineToCoarse(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(fineLocInCoarse,inp);
         MEDCouplingIMesh::CondenseFineToCoarse(coarseSt,fineDA,inp,facts,coarseDA);
       }
 
-      static void CondenseFineToCoarseGhost(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA, int ghostSize)
+      static void CondenseFineToCoarseGhost(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA, mcIdType ghostSize)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(fineLocInCoarse,inp);
         MEDCouplingIMesh::CondenseFineToCoarseGhost(coarseSt,fineDA,inp,facts,coarseDA,ghostSize);
       }
 
-      static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts)
+      static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<mcIdType>& facts)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(fineLocInCoarse,inp);
         MEDCouplingIMesh::SpreadCoarseToFine(coarseDA,coarseSt,fineDA,inp,facts);
       }
 
-      static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, int ghostSize)
+      static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(fineLocInCoarse,inp);
         MEDCouplingIMesh::SpreadCoarseToFineGhost(coarseDA,coarseSt,fineDA,inp,facts,ghostSize);
       }
 
-      static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<int>& facts, int ghostSize)
+      static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, PyObject *fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(fineLocInCoarse,inp);
         MEDCouplingIMesh::SpreadCoarseToFineGhostZone(coarseDA,coarseSt,fineDA,inp,facts,ghostSize);
       }
@@ -3694,16 +3710,16 @@ namespace MEDCoupling
     virtual void setNature(NatureOfField nat);
     DataArrayDouble *getLocalizationOfDiscr() const;
     MEDCouplingFieldDouble *buildMeasureField(bool isAbs) const;
-    int getNumberOfTuplesExpected() const;
-    int getNumberOfMeshPlacesExpected() const;
+    mcIdType getNumberOfTuplesExpected() const;
+    mcIdType getNumberOfMeshPlacesExpected() const;
     void setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
                                     const std::vector<double>& gsCoo, const std::vector<double>& wg);
     void clearGaussLocalizations();
     MEDCouplingGaussLocalization& getGaussLocalization(int locId);
-    int getNbOfGaussLocalization() const;
-    int getGaussLocalizationIdOfOneCell(int cellId) const;
+    mcIdType getNbOfGaussLocalization() const;
+    mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
     const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const;
-    int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+    mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
     void setDiscretization(MEDCouplingFieldDiscretization *newDisc);
     %extend {
       PyObject *getMesh() const
@@ -3724,45 +3740,45 @@ namespace MEDCoupling
 
       PyObject *getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
       {
-        std::set<int> ret=self->getGaussLocalizationIdsOfOneType(type);
+        std::set<mcIdType> ret=self->getGaussLocalizationIdsOfOneType(type);
         return convertIntArrToPyList3(ret);
       }
 
       PyObject *buildSubMeshData(PyObject *li) const
       {
-        DataArrayInt *ret1=0;
+        DataArrayIdType *ret1=0;
         MEDCouplingMesh *ret0=0;
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             ret0=self->buildSubMeshData(tmp,tmp+size,ret1);
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+              throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
             da2->checkAllocated();
             ret0=self->buildSubMeshData(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),ret1);
           }
         PyObject *res = PyList_New(2);
         PyList_SetItem(res,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
-        PyList_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
+        PyList_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN | 0));
         return res;
       }
 
-      PyObject *buildSubMeshDataRange(int begin, int end, int step) const
+      PyObject *buildSubMeshDataRange(mcIdType begin, mcIdType end, mcIdType step) const
       {
-        DataArrayInt *ret1=0;
-        int bb,ee,ss;
+        DataArrayIdType *ret1=0;
+        mcIdType bb,ee,ss;
         MEDCouplingMesh *ret0=self->buildSubMeshDataRange(begin,end,step,bb,ee,ss,ret1);
         PyObject *res=PyTuple_New(2);
         PyTuple_SetItem(res,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
         if(ret1)
-          PyTuple_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
+          PyTuple_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN | 0));
         else
           {
             PyObject *res1=PySlice_New(PyInt_FromLong(bb),PyInt_FromLong(ee),PyInt_FromLong(ss));
@@ -3771,11 +3787,11 @@ namespace MEDCoupling
         return res;
       }
 
-      DataArrayInt *computeTupleIdsToSelectFromCellIds(PyObject *cellIds) const
+      DataArrayIdType *computeTupleIdsToSelectFromCellIds(PyObject *cellIds) const
       {
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *cellIdsBg(convertIntStarLikePyObjToCppIntStar(cellIds,sw,sz,v0,v1));
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *cellIdsBg(convertIntStarLikePyObjToCppIntStar(cellIds,sw,sz,v0,v1));
         return self->computeTupleIdsToSelectFromCellIds(cellIdsBg,cellIdsBg+sz);
       }
 
@@ -3783,18 +3799,18 @@ namespace MEDCoupling
                                        const std::vector<double>& gsCoo, const std::vector<double>& wg)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            self->setGaussLocalizationOnCells(tmp,((int *)tmp)+size,refCoo,gsCoo,wg);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            self->setGaussLocalizationOnCells(tmp,((mcIdType *)tmp)+size,refCoo,gsCoo,wg);
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+              throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
             da2->checkAllocated();
             self->setGaussLocalizationOnCells(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),refCoo,gsCoo,wg);
           }
@@ -3802,20 +3818,20 @@ namespace MEDCoupling
 
       PyObject *getCellIdsHavingGaussLocalization(int locId) const
       {
-        std::vector<int> tmp;
+        std::vector<mcIdType> tmp;
         self->getCellIdsHavingGaussLocalization(locId,tmp);
-        DataArrayInt *ret=DataArrayInt::New();
-        ret->alloc((int)tmp.size(),1);
+        DataArrayIdType *ret=DataArrayIdType::New();
+        ret->alloc((mcIdType)tmp.size(),1);
         std::copy(tmp.begin(),tmp.end(),ret->getPointer());
-        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
       }
       
-      int getNumberOfTuplesExpectedRegardingCode(PyObject *code, PyObject *idsPerType) const
+      mcIdType getNumberOfTuplesExpectedRegardingCode(PyObject *code, PyObject *idsPerType) const
       {
-        std::vector<int> inp0;
+        std::vector<mcIdType> inp0;
         convertPyToNewIntArr4(code,1,3,inp0);
-        std::vector<const DataArrayInt *> inp1;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(idsPerType,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",inp1);
+        std::vector<const DataArrayIdType *> inp1;
+        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType *>(idsPerType,SWIGTITraits<mcIdType>::TI,"DataArrayIdType",inp1);
         return self->getNumberOfTuplesExpectedRegardingCode(inp0,inp1);
       }
     }
@@ -3957,7 +3973,7 @@ namespace MEDCoupling
     MEDCouplingFieldDouble *deviator() const;
     MEDCouplingFieldDouble *magnitude() const;
     MEDCouplingFieldDouble *maxPerTuple() const;
-    void changeNbOfComponents(int newNbOfComp, double dftValue=0.);
+    void changeNbOfComponents(std::size_t newNbOfComp, double dftValue=0.);
     void sortPerTuple(bool asc);
     MEDCouplingFieldDouble &operator=(double value);
     void fillFromAnalytic(int nbOfComp, const std::string& func);
@@ -3981,7 +3997,7 @@ namespace MEDCoupling
     double normL1(int compId) const;
     double normL2(int compId) const;
     double normMax(int compId) const;
-    DataArrayInt *findIdsInRange(double vmin, double vmax) const;
+    DataArrayIdType *findIdsInRange(double vmin, double vmax) const;
     MEDCouplingFieldDouble *buildSubPartRange(int begin, int end, int step) const;
     static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
     static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
@@ -4052,7 +4068,7 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,3,true);
         const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,3,true);
         return self->computeVectorFieldCyl(centerPtr,vectorPtr);
@@ -4072,9 +4088,9 @@ namespace MEDCoupling
         for(std::vector<DataArrayDouble *>::iterator it=arrs.begin();it!=arrs.end();it++)
           if(*it)
             (*it)->incrRef();
-        int sz=arrs.size();
+        std::size_t sz=arrs.size();
         PyObject *ret=PyTuple_New(sz);
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           {
             if(arrs[i])
               PyTuple_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(arrs[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
@@ -4088,9 +4104,9 @@ namespace MEDCoupling
       {
         std::vector<const DataArrayDouble *> tmp;
         convertFromPyObjVectorOfObj<const DataArrayDouble *>(ls,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",tmp);
-        int sz=tmp.size();
+        std::size_t sz=tmp.size();
         std::vector<DataArrayDouble *> arrs(sz);
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           arrs[i]=const_cast<DataArrayDouble *>(tmp[i]);
         self->setArrays(arrs);
       }
@@ -4109,7 +4125,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         const MEDCouplingMesh *mesh=self->getMesh();
         if(!mesh)
           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingFieldDouble::getValueOn : no underlying mesh !");
@@ -4117,15 +4133,15 @@ namespace MEDCoupling
         const char msg[]="Python wrap of MEDCouplingFieldDouble::getValueOn : ";
         const double *spaceLoc=convertObjToPossibleCpp5_Safe(sl,sw,val,a,aa,bb,msg,1,spaceDim,true);
         //
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> res=new double[sz];
         self->getValueOn(spaceLoc,res);
         return convertDblArrToPyList<double>(res,sz);
       }
 
-       PyObject *getValueOnPos(int i, int j, int k) const
+       PyObject *getValueOnPos(mcIdType i, mcIdType j, mcIdType k) const
        {
-         int sz=self->getNumberOfComponents();
+         mcIdType sz=ToIdType(self->getNumberOfComponents());
          INTERP_KERNEL::AutoPtr<double> res=new double[sz];
          self->getValueOnPos(i,j,k,res);
          return convertDblArrToPyList<double>(res,sz);
@@ -4137,11 +4153,11 @@ namespace MEDCoupling
         if(!mesh)
           throw INTERP_KERNEL::Exception("Python wrap MEDCouplingFieldDouble::getValueOnMulti : lying on a null mesh !");
         //
-        int sw,nbPts;
+        mcIdType sw,nbPts;
         double v0; MEDCoupling::DataArrayDouble *v1(0); MEDCoupling::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
         const double *inp=convertObjToPossibleCpp5_Safe2(locs,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDouble::getValueOnMulti",
                                                          mesh->getSpaceDimension(),true,nbPts);
-        return self->getValueOnMulti(inp,nbPts);
+        return self->getValueOnMulti(inp,(int)nbPts);
       }
 
       PyObject *getValueOn(PyObject *sl, double time) const
@@ -4150,7 +4166,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         const MEDCouplingMesh *mesh=self->getMesh();
         if(!mesh)
           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingFieldDouble::getValueOn : no underlying mesh !");
@@ -4159,7 +4175,7 @@ namespace MEDCoupling
         const double *spaceLoc=convertObjToPossibleCpp5_Safe(sl,sw,val,a,aa,bb,msg,1,spaceDim,true);
         //
         //
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> res=new double[sz];
         self->getValueOn(spaceLoc,time,res);
         return convertDblArrToPyList<double>(res,sz);
@@ -4211,75 +4227,75 @@ namespace MEDCoupling
       }
       PyObject *accumulate() const
       {
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->accumulate(tmp);
         return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *integral(bool isWAbs) const
       {
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->integral(isWAbs,tmp);
         return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *getWeightedAverageValue(bool isWAbs=true) const
       {
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->getWeightedAverageValue(tmp,isWAbs);
         return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *normL1() const
       {
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->normL1(tmp);
         return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *normL2() const
       {
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->normL2(tmp);
         return convertDblArrToPyList<double>(tmp,sz);
       }
       PyObject *normMax() const
       {
-        int sz=self->getNumberOfComponents();
+        mcIdType sz=ToIdType(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->normMax(tmp);
         return convertDblArrToPyList<double>(tmp,sz);
       }
       void renumberCells(PyObject *li, bool check=true)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberCells(tmp,check);
       }
       
       void renumberCellsWithoutMesh(PyObject *li, bool check=true)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberCellsWithoutMesh(tmp,check);
       }
       
       void renumberNodes(PyObject *li, double eps=1e-15)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberNodes(tmp,eps);
       }
 
-      void renumberNodesWithoutMesh(PyObject *li, int newNbOfNodes, double eps=1e-15)
+      void renumberNodesWithoutMesh(PyObject *li, mcIdType newNbOfNodes, double eps=1e-15)
       {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+        mcIdType szArr,sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        const mcIdType *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
         self->renumberNodesWithoutMesh(tmp,newNbOfNodes,eps);
       }
 
@@ -4295,34 +4311,34 @@ namespace MEDCoupling
 
       PyObject *getMaxValue2() const
       {
-        DataArrayInt *tmp;
+        DataArrayIdType *tmp;
         double r1=self->getMaxValue2(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
       
       PyObject *getMinValue2() const
       {
-        DataArrayInt *tmp;
+        DataArrayIdType *tmp;
         double r1=self->getMinValue2(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
       
       MEDCouplingFieldDouble *keepSelectedComponents(PyObject *li) const
       {
-        std::vector<int> tmp;
+        std::vector<std::size_t> tmp;
         convertPyToNewIntArr3(li,tmp);
         return self->keepSelectedComponents(tmp);
       }
 
       void setSelectedComponents(const MEDCouplingFieldDouble *f, PyObject *li)
       {
-        std::vector<int> tmp;
+        std::vector<std::size_t> tmp;
         convertPyToNewIntArr3(li,tmp);
         self->setSelectedComponents(f,tmp);
       }
@@ -4333,7 +4349,7 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         int spaceDim=3;
         const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st parameter for origin.";
         const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd parameter for vector.";
@@ -4372,7 +4388,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4409,7 +4425,7 @@ namespace MEDCoupling
             {
               if(!self->getArray())
                 throw INTERP_KERNEL::Exception(msg2);
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               MCAuto<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),aaa);
               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
               ret2->setArray(ret);
@@ -4454,7 +4470,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4493,7 +4509,7 @@ namespace MEDCoupling
             {
               if(!self->getArray())
                 throw INTERP_KERNEL::Exception(msg2);
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               MCAuto<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),aaa);
               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
               ret2->setArray(ret);
@@ -4528,7 +4544,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4565,7 +4581,7 @@ namespace MEDCoupling
             {
               if(!self->getArray())
                 throw INTERP_KERNEL::Exception(msg2);
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               MCAuto<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),aaa);
               MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
               ret2->setArray(ret);
@@ -4604,7 +4620,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4637,7 +4653,7 @@ namespace MEDCoupling
             {
               if(!self->getArray())
                 throw INTERP_KERNEL::Exception(msg2);
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               self->getArray()->addEqual(aaa);
               Py_XINCREF(trueSelf);
               return trueSelf;
@@ -4670,7 +4686,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4703,7 +4719,7 @@ namespace MEDCoupling
             {
               if(!self->getArray())
                 throw INTERP_KERNEL::Exception(msg2);
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               self->getArray()->substractEqual(aaa);
               Py_XINCREF(trueSelf);
               return trueSelf;
@@ -4736,7 +4752,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4802,7 +4818,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4837,7 +4853,7 @@ namespace MEDCoupling
             {
               if(!self->getArray())
                 throw INTERP_KERNEL::Exception(msg2);
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               self->getArray()->divideEqual(aaa);
               Py_XINCREF(trueSelf);
               return trueSelf;
@@ -4870,7 +4886,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -4903,7 +4919,7 @@ namespace MEDCoupling
             {
               if(!self->getArray())
                 throw INTERP_KERNEL::Exception(msg2);
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               self->getArray()->powEqual(aaa);
               Py_XINCREF(trueSelf);
               return trueSelf;
@@ -4969,9 +4985,9 @@ namespace MEDCoupling
          {
            std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
            convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
-           int sz=tmp.size();
+           std::size_t sz=tmp.size();
            std::vector<MEDCouplingFieldDouble *> fs(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
            return MEDCouplingMultiFields::New(fs);
          }
@@ -4979,18 +4995,18 @@ namespace MEDCoupling
          {
            std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
            convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
-           int sz=tmp.size();
+           std::size_t sz=tmp.size();
            std::vector<MEDCouplingFieldDouble *> fs(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
            return MEDCouplingMultiFields::New(fs);
          }
          PyObject *getFields() const
          {
            std::vector<const MEDCouplingFieldDouble *> fields=self->getFields();
-           int sz=fields.size();
+           std::size_t sz=fields.size();
            PyObject *res = PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
                if(fields[i])
                  {
@@ -5018,9 +5034,9 @@ namespace MEDCoupling
          PyObject *getMeshes() const
          {
            std::vector<MEDCouplingMesh *> ms=self->getMeshes();
-           int sz=ms.size();
+           std::size_t sz=ms.size();
            PyObject *res = PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
                if(ms[i])
                  {
@@ -5038,9 +5054,9 @@ namespace MEDCoupling
          {
            std::vector<int> refs;
            std::vector<MEDCouplingMesh *> ms=self->getDifferentMeshes(refs);
-           int sz=ms.size();
+           std::size_t sz=ms.size();
            PyObject *res = PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
                if(ms[i])
                  {
@@ -5061,9 +5077,9 @@ namespace MEDCoupling
          PyObject *getArrays() const
          {
            std::vector<DataArrayDouble *> ms=self->getArrays();
-           int sz=ms.size();
+           std::size_t sz=ms.size();
            PyObject *res = PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
                if(ms[i])
                  {
@@ -5081,10 +5097,10 @@ namespace MEDCoupling
          {
            std::vector< std::vector<int> > refs;
            std::vector<DataArrayDouble *> ms=self->getDifferentArrays(refs);
-           int sz=ms.size();
+           std::size_t sz=ms.size();
            PyObject *res = PyList_New(sz);
            PyObject *res2 = PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
                if(ms[i])
                  {
@@ -5116,7 +5132,7 @@ namespace MEDCoupling
     void setTimeUnit(const std::string& unit);
     std::string getTimeUnit() const;
     void setTime(double val, int iteration, int order);
-    void setArray(DataArrayInt *array);
+    void setArray(DataArrayInt32 *array);
     MEDCouplingFieldInt *deepCopy() const;
     MEDCouplingFieldInt *clone(bool recDeepCpy) const;
     MEDCouplingFieldInt *cloneWithMesh(bool recDeepCpy) const;
@@ -5167,9 +5183,9 @@ namespace MEDCoupling
         return fieldT__getitem__(self,li);
       }
 
-      DataArrayInt *getArray()
+      DataArrayInt32 *getArray()
       {
-        DataArrayInt *ret=self->getArray();
+        DataArrayInt32 *ret=self->getArray();
         if(ret)
           ret->incrRef();
         return ret;
@@ -5365,9 +5381,9 @@ namespace MEDCoupling
           {
             std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
             convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
-            int sz=tmp.size();
+            std::size_t sz=tmp.size();
             std::vector<MEDCouplingFieldDouble *> fs(sz);
-            for(int i=0;i<sz;i++)
+            for(std::size_t i=0;i<sz;i++)
               fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
             return MEDCouplingFieldOverTime::New(fs);
           }
@@ -5376,15 +5392,15 @@ namespace MEDCoupling
             return self->simpleRepr();
           }
         static MEDCouplingFieldOverTime *New(PyObject *li)
-        {
-          std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
-          convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
-           int sz=tmp.size();
-           std::vector<MEDCouplingFieldDouble *> fs(sz);
-           for(int i=0;i<sz;i++)
-             fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
-           return MEDCouplingFieldOverTime::New(fs);
-         }
+          {
+            std::vector<const MEDCoupling::MEDCouplingFieldDouble *> tmp;
+            convertFromPyObjVectorOfObj<const MEDCoupling::MEDCouplingFieldDouble *>(li,SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,"MEDCouplingFieldDouble",tmp);
+            std::size_t sz=tmp.size();
+            std::vector<MEDCouplingFieldDouble *> fs(sz);
+            for(std::size_t i=0;i<sz;i++)
+              fs[i]=const_cast<MEDCouplingFieldDouble *>(tmp[i]);
+            return MEDCouplingFieldOverTime::New(fs);
+          }
       }
   };
 
@@ -5413,29 +5429,29 @@ namespace MEDCoupling
   public:
     int getNumberOfOverlapedCellsForFather() const;
     bool isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, int ghostLev) const;
-    std::vector<int> computeCellGridSt() const;
+    std::vector<mcIdType> computeCellGridSt() const;
     %extend
     {
       PyObject *getBLTRRange() const
       {
-        const std::vector< std::pair<int,int> >& ret(self->getBLTRRange());
+        const std::vector< std::pair<mcIdType,mcIdType> >& ret(self->getBLTRRange());
         return convertFromVectorPairInt(ret);
       }
 
       PyObject *getBLTRRangeRelativeToGF() const
       {
-        std::vector< std::pair<int,int> > ret(self->getBLTRRangeRelativeToGF());
+        std::vector< std::pair<mcIdType,mcIdType> > ret(self->getBLTRRangeRelativeToGF());
         return convertFromVectorPairInt(ret);
       }
 
-      void addPatch(PyObject *bottomLeftTopRight, const std::vector<int>& factors)
+      void addPatch(PyObject *bottomLeftTopRight, const std::vector<mcIdType>& factors)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(bottomLeftTopRight,inp);
         self->addPatch(inp,factors);
       }
 
-      MEDCouplingCartesianAMRPatch *__getitem__(int patchId) const
+      MEDCouplingCartesianAMRPatch *__getitem__(mcIdType patchId) const
       {
         const MEDCouplingCartesianAMRMeshGen *mesh(self->getMesh());
         if(!mesh)
@@ -5453,7 +5469,7 @@ namespace MEDCoupling
         return ret;
       }
 
-      void __delitem__(int patchId)
+      void __delitem__(mcIdType patchId)
       {
         MEDCouplingCartesianAMRMeshGen *mesh(const_cast<MEDCouplingCartesianAMRMeshGen *>(self->getMesh()));
         if(!mesh)
@@ -5461,7 +5477,7 @@ namespace MEDCoupling
         mesh->removePatch(patchId);
       }
 
-      int __len__() const
+      mcIdType __len__() const
       {
         const MEDCouplingCartesianAMRMeshGen *mesh(self->getMesh());
         if(!mesh)
@@ -5478,45 +5494,45 @@ namespace MEDCoupling
   class MEDCouplingCartesianAMRMeshGen : public RefCountObject, public TimeLabel
   {
   public:
-    int getAbsoluteLevel() const;
-    int getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
-    std::vector<int> getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+    mcIdType getAbsoluteLevel() const;
+    mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+    std::vector<mcIdType> getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
     int getSpaceDimension() const;
-    const std::vector<int>& getFactors() const;
-    void setFactors(const std::vector<int>& newFactors);
-    int getMaxNumberOfLevelsRelativeToThis() const;
-    int getNumberOfCellsAtCurrentLevel() const;
-    int getNumberOfCellsAtCurrentLevelGhost(int ghostLev) const;
-    int getNumberOfCellsRecursiveWithOverlap() const;
-    int getNumberOfCellsRecursiveWithoutOverlap() const;
-    bool isPatchInNeighborhoodOf(int patchId1, int patchId2, int ghostLev) const;
+    const std::vector<mcIdType>& getFactors() const;
+    void setFactors(const std::vector<mcIdType>& newFactors);
+    mcIdType getMaxNumberOfLevelsRelativeToThis() const;
+    mcIdType getNumberOfCellsAtCurrentLevel() const;
+    mcIdType getNumberOfCellsAtCurrentLevelGhost(mcIdType ghostLev) const;
+    mcIdType getNumberOfCellsRecursiveWithOverlap() const;
+    mcIdType getNumberOfCellsRecursiveWithoutOverlap() const;
+    bool isPatchInNeighborhoodOf(mcIdType patchId1, mcIdType patchId2, mcIdType ghostLev) const;
    virtual void detachFromFather();
     //
-    int getNumberOfPatches() const;
-    int getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const;
+    mcIdType getNumberOfPatches() const;
+    mcIdType getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const;
     MEDCouplingUMesh *buildUnstructured() const;
-    DataArrayDouble *extractGhostFrom(int ghostSz, const DataArrayDouble *arr) const;
-    std::vector<int> getPatchIdsInTheNeighborhoodOf(int patchId, int ghostLev) const;
+    DataArrayDouble *extractGhostFrom(mcIdType ghostSz, const DataArrayDouble *arr) const;
+    std::vector<mcIdType> getPatchIdsInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
     MEDCoupling1SGTUMesh *buildMeshFromPatchEnvelop() const;
     MEDCoupling1SGTUMesh *buildMeshOfDirectChildrenOnly() const;
     void removeAllPatches();
-    void removePatch(int patchId);
-    void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<int>& factors);
-    void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<int>& factors, double eps);
-    DataArrayDouble *createCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis) const;
-    void fillCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const;
-    void fillCellFieldOnPatchGhost(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev, bool isConservative=true) const;
-    void fillCellFieldOnPatchOnlyOnGhostZone(int patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, int ghostLev) const;
-    void fillCellFieldOnPatchOnlyOnGhostZoneWith(int ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const;
-    void fillCellFieldComingFromPatch(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const;
-    void fillCellFieldComingFromPatchGhost(int patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, int ghostLev, bool isConservative=true) const;
-    DataArrayInt *findPatchesInTheNeighborhoodOf(int patchId, int ghostLev) const;
+    void removePatch(mcIdType patchId);
+    void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<mcIdType>& factors);
+    void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<mcIdType>& factors, double eps);
+    DataArrayDouble *createCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis) const;
+    void fillCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const;
+    void fillCellFieldOnPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev, bool isConservative=true) const;
+    void fillCellFieldOnPatchOnlyOnGhostZone(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev) const;
+    void fillCellFieldOnPatchOnlyOnGhostZoneWith(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const;
+    void fillCellFieldComingFromPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const;
+    void fillCellFieldComingFromPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, bool isConservative=true) const;
+    DataArrayIdType *findPatchesInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
     std::string buildPythonDumpOfThis() const;
     %extend
     {
-      void addPatch(PyObject *bottomLeftTopRight, const std::vector<int>& factors)
+      void addPatch(PyObject *bottomLeftTopRight, const std::vector<mcIdType>& factors)
       {
-        std::vector< std::pair<int,int> > inp;
+        std::vector< std::pair<mcIdType,mcIdType> > inp;
         convertPyToVectorPairInt(bottomLeftTopRight,inp);
         self->addPatch(inp,factors);
       }
@@ -5524,9 +5540,9 @@ namespace MEDCoupling
       PyObject *getPatches() const
       {
         std::vector< const MEDCouplingCartesianAMRPatch *> ps(self->getPatches());
-        int sz(ps.size());
+        std::size_t sz(ps.size());
         PyObject *ret = PyList_New(sz);
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           {
             MEDCouplingCartesianAMRPatch *elt(const_cast<MEDCouplingCartesianAMRPatch *>(ps[i]));
             if(elt)
@@ -5542,7 +5558,7 @@ namespace MEDCoupling
         return convertCartesianAMRMesh(self->deepCopy(father), SWIG_POINTER_OWN | 0 );
       }
 
-      MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<int>& pos) const
+      MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<mcIdType>& pos) const
       {
         const MEDCouplingCartesianAMRPatch *ret(self->getPatchAtPosition(pos));
         MEDCouplingCartesianAMRPatch *ret2(const_cast<MEDCouplingCartesianAMRPatch *>(ret));
@@ -5551,7 +5567,7 @@ namespace MEDCoupling
         return ret2;
       }
 
-      MEDCouplingCartesianAMRMeshGen *getMeshAtPosition(const std::vector<int>& pos) const
+      MEDCouplingCartesianAMRMeshGen *getMeshAtPosition(const std::vector<mcIdType>& pos) const
       {
         const MEDCouplingCartesianAMRMeshGen *ret(self->getMeshAtPosition(pos));
         MEDCouplingCartesianAMRMeshGen *ret2(const_cast<MEDCouplingCartesianAMRMeshGen *>(ret));
@@ -5562,25 +5578,25 @@ namespace MEDCoupling
 
       virtual PyObject *positionRelativeToGodFather() const
       {
-        std::vector<int> out1;
-        std::vector< std::pair<int,int> > out0(self->positionRelativeToGodFather(out1));
+        std::vector<mcIdType> out1;
+        std::vector< std::pair<mcIdType,mcIdType> > out0(self->positionRelativeToGodFather(out1));
         PyObject *ret(PyTuple_New(2));
         PyTuple_SetItem(ret,0,convertFromVectorPairInt(out0));
         PyTuple_SetItem(ret,1,convertIntArrToPyList2(out1));
         return ret;
       }
 
-      virtual PyObject *retrieveGridsAt(int absoluteLev) const
+      virtual PyObject *retrieveGridsAt(mcIdType absoluteLev) const
       {
         std::vector<MEDCouplingCartesianAMRPatchGen *> ps(self->retrieveGridsAt(absoluteLev));
-        int sz(ps.size());
+        std::size_t sz(ps.size());
         PyObject *ret = PyList_New(sz);
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           PyList_SetItem(ret,i,convertCartesianAMRPatch(ps[i], SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
-      MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostSz, PyObject *recurseArrs) const
+      MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(mcIdType ghostSz, PyObject *recurseArrs) const
       {
         std::vector<const DataArrayDouble *> inp;
         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayDouble *>(recurseArrs,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",inp);
@@ -5603,7 +5619,7 @@ namespace MEDCoupling
         return ret;
       }
 
-      MEDCouplingCartesianAMRPatch *getPatch(int patchId) const
+      MEDCouplingCartesianAMRPatch *getPatch(mcIdType patchId) const
       {
         MEDCouplingCartesianAMRPatch *ret(const_cast<MEDCouplingCartesianAMRPatch *>(self->getPatch(patchId)));
         if(ret)
@@ -5619,7 +5635,7 @@ namespace MEDCoupling
         return const_cast<MEDCouplingIMesh *>(ret);
       }
 
-      MEDCouplingCartesianAMRPatch *__getitem__(int patchId) const
+      MEDCouplingCartesianAMRPatch *__getitem__(mcIdType patchId) const
       {
         if(patchId==self->getNumberOfPatches())
           {
@@ -5634,26 +5650,26 @@ namespace MEDCoupling
         return ret;
       }
 
-      void fillCellFieldOnPatchGhostAdv(int patchId, const DataArrayDouble *cellFieldOnThis, int ghostLev, PyObject *arrsOnPatches, bool isConservative=true) const
+      void fillCellFieldOnPatchGhostAdv(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, PyObject *arrsOnPatches, bool isConservative=true) const
       {
         std::vector<const MEDCoupling::DataArrayDouble *> arrsOnPatches2;
         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayDouble *>(arrsOnPatches,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",arrsOnPatches2);
         self->fillCellFieldOnPatchGhostAdv(patchId,cellFieldOnThis,ghostLev,arrsOnPatches2,isConservative);
       }
 
-      void fillCellFieldOnPatchOnlyGhostAdv(int patchId, int ghostLev, PyObject *arrsOnPatches) const
+      void fillCellFieldOnPatchOnlyGhostAdv(mcIdType patchId, mcIdType ghostLev, PyObject *arrsOnPatches) const
       {
         std::vector<const MEDCoupling::DataArrayDouble *> arrsOnPatches2;
         convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayDouble *>(arrsOnPatches,SWIGTYPE_p_MEDCoupling__DataArrayDouble,"DataArrayDouble",arrsOnPatches2);
         self->fillCellFieldOnPatchOnlyGhostAdv(patchId,ghostLev,arrsOnPatches2);
       }
 
-      void __delitem__(int patchId)
+      void __delitem__(mcIdType patchId)
       {
         self->removePatch(patchId);
       }
 
-      int __len__() const
+      mcIdType __len__() const
       {
         return self->getNumberOfPatches();
       }
@@ -5674,15 +5690,15 @@ namespace MEDCoupling
       {
         static const char msg0[]="MEDCouplingCartesianAMRMesh::New : error on 'origin' parameter !";
         static const char msg1[]="MEDCouplingCartesianAMRMesh::New : error on 'dxyz' parameter !";
-        const int *nodeStrctPtr(0);
+        const mcIdType *nodeStrctPtr(0);
         const double *originPtr(0),*dxyzPtr(0);
-        int sw,sz,val0;
-        std::vector<int> bb0;
+        mcIdType sw,sz,val0;
+        std::vector<mcIdType> bb0;
         nodeStrctPtr=convertIntStarLikePyObjToCppIntStar(nodeStrct,sw,sz,val0,bb0);
         //
         double val,val2;
         std::vector<double> bb,bb2;
-        int sz1,sz2;
+        mcIdType sz1,sz2;
         originPtr=convertObjToPossibleCpp5_SingleCompo(origin,sw,val,bb,msg0,false,sz1);
         dxyzPtr=convertObjToPossibleCpp5_SingleCompo(dxyz,sw,val2,bb2,msg1,false,sz2);
         //
@@ -5693,7 +5709,7 @@ namespace MEDCoupling
       {
         std::vector<const INTERP_KERNEL::BoxSplittingOptions *> inp0;
         convertFromPyObjVectorOfObj<const INTERP_KERNEL::BoxSplittingOptions *>(bso,SWIGTYPE_p_INTERP_KERNEL__BoxSplittingOptions,"BoxSplittingOptions",inp0);
-        std::vector< std::vector<int> > inp2;
+        std::vector< std::vector<mcIdType> > inp2;
         convertPyToVectorOfVectorOfInt(factors,inp2);
         self->createPatchesFromCriterionML(inp0,criterion,inp2,eps);
       }
@@ -5714,13 +5730,13 @@ namespace MEDCoupling
   {
   public:
     virtual void synchronizeFineToCoarse();
-    virtual void synchronizeFineToCoarseBetween(int fromLev, int toLev);
+    virtual void synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev);
     virtual void synchronizeCoarseToFine();
-    virtual void synchronizeCoarseToFineBetween(int fromLev, int toLev);
+    virtual void synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev);
     virtual void synchronizeAllGhostZones();
     virtual void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh);
-    virtual void synchronizeAllGhostZonesAtASpecifiedLevel(int level);
-    virtual void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(int level);
+    virtual void synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level);
+    virtual void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level);
     virtual void alloc();
     virtual void dealloc();
     %extend
@@ -5738,7 +5754,7 @@ namespace MEDCoupling
   class MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
   {
   public:
-    int getNumberOfLevels() const;
+    mcIdType getNumberOfLevels() const;
     MEDCouplingAMRAttribute *deepCopy() const;
     MEDCouplingAMRAttribute *deepCpyWithoutGodFather() const;
     MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
@@ -5749,7 +5765,7 @@ namespace MEDCoupling
     std::string writeVTHB(const std::string& fileName) const;
     %extend
     {
-      static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, PyObject *fieldNames, int ghostLev)
+      static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, PyObject *fieldNames, mcIdType ghostLev)
       {
         std::vector< std::pair<std::string,int> > fieldNamesCpp0;
         std::vector< std::pair<std::string, std::vector<std::string> > > fieldNamesCpp1;
@@ -5767,7 +5783,7 @@ namespace MEDCoupling
         return ret;
       }
 
-      MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, PyObject *fieldNames, int ghostLev)
+      MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, PyObject *fieldNames, mcIdType ghostLev)
       {
         return MEDCoupling_MEDCouplingAMRAttribute_New(gf,fieldNames,ghostLev);
       }
@@ -5790,7 +5806,7 @@ namespace MEDCoupling
 
       void spillNatures(PyObject *nfs)
       {
-        std::vector<int> inp0;
+        std::vector<mcIdType> inp0;
         if(!fillIntVector(nfs,inp0))
           throw INTERP_KERNEL::Exception("wrap of MEDCouplingAMRAttribute::spillNatures : vector of NatureOfField enum expected !");
         std::size_t sz(inp0.size());
@@ -5803,9 +5819,9 @@ namespace MEDCoupling
       PyObject *retrieveFieldsOn(MEDCouplingCartesianAMRMeshGen *mesh) const
       {
         std::vector<DataArrayDouble *> ret(self->retrieveFieldsOn(mesh));
-        int sz((int)ret.size());
+        std::size_t sz(ret.size());
         PyObject *retPy(PyList_New(sz));
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           PyList_SetItem(retPy,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret[i]),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
         return retPy;
       }
@@ -5815,16 +5831,16 @@ namespace MEDCoupling
   class DenseMatrix : public RefCountObject, public TimeLabel
   {
   public:
-    static DenseMatrix *New(int nbRows, int nbCols);
-    static DenseMatrix *New(DataArrayDouble *array, int nbRows, int nbCols);
+    static DenseMatrix *New(mcIdType nbRows, mcIdType nbCols);
+    static DenseMatrix *New(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols);
     DenseMatrix *deepCopy() const;
     DenseMatrix *shallowCpy() const;
     //
-    int getNumberOfRows() const;
-    int getNumberOfCols() const;
-    int getNbOfElems() const;
-    void reBuild(DataArrayDouble *array, int nbRows=-1, int nbCols=-1);
-    void reShape(int nbRows, int nbCols);
+    mcIdType getNumberOfRows() const;
+    mcIdType getNumberOfCols() const;
+    mcIdType getNbOfElems() const;
+    void reBuild(DataArrayDouble *array, mcIdType nbRows=-1, mcIdType nbCols=-1);
+    void reShape(mcIdType nbRows, mcIdType nbCols);
     void transpose();
     //
     bool isEqual(const DenseMatrix& other, double eps) const;
@@ -5832,12 +5848,12 @@ namespace MEDCoupling
     static DataArrayDouble *MatVecMult(const DenseMatrix *mat, const DataArrayDouble *vec);
     %extend
     {
-      DenseMatrix(int nbRows, int nbCols)
+      DenseMatrix(mcIdType nbRows, mcIdType nbCols)
       {
         return DenseMatrix::New(nbRows,nbCols);
       }
 
-      DenseMatrix(DataArrayDouble *array, int nbRows, int nbCols)
+      DenseMatrix(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols)
       {
         return DenseMatrix::New(array,nbRows,nbCols);
       }
index ee04ca39a261df1c143aa37a157f2a882e215288..3187b80eb8e52152247ac079cbf25c09012c1cf1 100644 (file)
@@ -71,7 +71,8 @@ struct PyCallBackDataArraySt {
 };
 
 typedef struct PyCallBackDataArraySt<MEDCoupling::DataArrayByte> PyCallBackDataArrayChar;
-typedef struct PyCallBackDataArraySt<MEDCoupling::DataArrayInt> PyCallBackDataArrayInt;
+typedef struct PyCallBackDataArraySt<MEDCoupling::DataArrayInt32> PyCallBackDataArrayInt32;
+typedef struct PyCallBackDataArraySt<MEDCoupling::DataArrayInt64> PyCallBackDataArrayInt64;
 typedef struct PyCallBackDataArraySt<MEDCoupling::DataArrayFloat> PyCallBackDataArrayFloat;
 typedef struct PyCallBackDataArraySt<MEDCoupling::DataArrayDouble> PyCallBackDataArrayDouble;
 
@@ -85,9 +86,15 @@ extern "C"
     return (PyObject *)self;
   }
 
-  static PyObject *callbackmcdataarrayint___new__(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+  static PyObject *callbackmcdataarrayint32___new__(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   {
-    PyCallBackDataArrayInt *self = (PyCallBackDataArrayInt *) ( type->tp_alloc(type, 0) );
+    PyCallBackDataArrayInt32 *self = (PyCallBackDataArrayInt32 *) ( type->tp_alloc(type, 0) );
+    return (PyObject *)self;
+  }
+  
+  static PyObject *callbackmcdataarrayint64___new__(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+  {
+    PyCallBackDataArrayInt64 *self = (PyCallBackDataArrayInt64 *) ( type->tp_alloc(type, 0) );
     return (PyObject *)self;
   }
   
@@ -124,7 +131,7 @@ extern "C"
 
   // real callback called when a numpy arr having more than one DataArray instance client on it is destroyed.
   // In this case, all the "weak" clients, except the first one, invoke this call back that desable the content of these "weak" clients.
-  static PyObject *callbackmcdataarrayint_call(PyCallBackDataArrayInt *self, PyObject *args, PyObject *kw)
+  static PyObject *callbackmcdataarrayint32_call(PyCallBackDataArrayInt32 *self, PyObject *args, PyObject *kw)
   {
     if(self->_pt_mc)
       {
@@ -135,6 +142,19 @@ extern "C"
     return Py_None;
   }
 
+  // real callback called when a numpy arr having more than one DataArray instance client on it is destroyed.
+  // In this case, all the "weak" clients, except the first one, invoke this call back that desable the content of these "weak" clients.
+  static PyObject *callbackmcdataarrayint64_call(PyCallBackDataArrayInt64 *self, PyObject *args, PyObject *kw)
+  {
+    if(self->_pt_mc)
+      {
+        MEDCoupling::MemArray<long>& mma=self->_pt_mc->accessToMemArray();
+        mma.destroy();
+      }
+    Py_XINCREF(Py_None);
+    return Py_None;
+  }
+
   // real callback called when a numpy arr having more than one DataArray instance client on it is destroyed.
   // In this case, all the "weak" clients, except the first one, invoke this call back that desable the content of these "weak" clients.
   static PyObject *callbackmcdataarrayfloat_call(PyCallBackDataArrayFloat *self, PyObject *args, PyObject *kw)
@@ -205,10 +225,10 @@ PyTypeObject PyCallBackDataArrayChar_RefType = {
 };
 
 
-PyTypeObject PyCallBackDataArrayInt_RefType = {
+PyTypeObject PyCallBackDataArrayInt32_RefType = {
   PyVarObject_HEAD_INIT(&PyType_Type, 0)
-  "callbackmcdataarrayint",
-  sizeof(PyCallBackDataArrayInt),
+  "callbackmcdataarrayint32",
+  sizeof(PyCallBackDataArrayInt32),
   0,
   callbackmcdataarray_dealloc,            /*tp_dealloc*/
   0,                          /*tp_print*/
@@ -220,7 +240,7 @@ PyTypeObject PyCallBackDataArrayInt_RefType = {
   0,                          /*tp_as_sequence*/
   0,                          /*tp_as_mapping*/
   0,                          /*tp_hash*/
-  (ternaryfunc)callbackmcdataarrayint_call,  /*tp_call*/
+  (ternaryfunc)callbackmcdataarrayint32_call,  /*tp_call*/
   0,                          /*tp_str*/
   0,                          /*tp_getattro*/
   0,                          /*tp_setattro*/
@@ -243,7 +263,50 @@ PyTypeObject PyCallBackDataArrayInt_RefType = {
   0,                          /*tp_dictoffset*/
   callbackmcdataarray___init__,           /*tp_init*/
   PyType_GenericAlloc,        /*tp_alloc*/
-  callbackmcdataarrayint___new__,            /*tp_new*/
+  callbackmcdataarrayint32___new__,            /*tp_new*/
+  PyObject_GC_Del,            /*tp_free*/
+};
+
+
+PyTypeObject PyCallBackDataArrayInt64_RefType = {
+  PyVarObject_HEAD_INIT(&PyType_Type, 0)
+  "callbackmcdataarrayint64",
+  sizeof(PyCallBackDataArrayInt64),
+  0,
+  callbackmcdataarray_dealloc,            /*tp_dealloc*/
+  0,                          /*tp_print*/
+  0,                          /*tp_getattr*/
+  0,                          /*tp_setattr*/
+  0,                          /*tp_compare*/
+  0,                          /*tp_repr*/
+  0,                          /*tp_as_number*/
+  0,                          /*tp_as_sequence*/
+  0,                          /*tp_as_mapping*/
+  0,                          /*tp_hash*/
+  (ternaryfunc)callbackmcdataarrayint64_call,  /*tp_call*/
+  0,                          /*tp_str*/
+  0,                          /*tp_getattro*/
+  0,                          /*tp_setattro*/
+  0,                          /*tp_as_buffer*/
+  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,  /*tp_flags*/
+  0,                          /*tp_doc*/
+  0,                          /*tp_traverse*/
+  0,                          /*tp_clear*/
+  0,                          /*tp_richcompare*/
+  0,                          /*tp_weaklistoffset*/
+  0,                          /*tp_iter*/
+  0,                          /*tp_iternext*/
+  0,                          /*tp_methods*/
+  0,                          /*tp_members*/
+  0,                          /*tp_getset*/
+  0,                          /*tp_base*/
+  0,                          /*tp_dict*/
+  0,                          /*tp_descr_get*/
+  0,                          /*tp_descr_set*/
+  0,                          /*tp_dictoffset*/
+  callbackmcdataarray___init__,           /*tp_init*/
+  PyType_GenericAlloc,        /*tp_alloc*/
+  callbackmcdataarrayint64___new__,            /*tp_new*/
   PyObject_GC_Del,            /*tp_free*/
 };
 
@@ -352,6 +415,22 @@ struct NPYTraits<float>
   static PyTypeObject *NPYFunc;
   static PyObject *Array_SWIGTYPE;
 };
+
+template<>
+struct NPYTraits<int>
+{
+  static const int NPYObjectType=NPY_INT32;
+  static PyTypeObject *NPYFunc;
+  static PyObject *Array_SWIGTYPE;
+};
+
+template<>
+struct NPYTraits<long>
+{
+  static const int NPYObjectType=NPY_INT64;
+  static PyTypeObject *NPYFunc;
+  static PyObject *Array_SWIGTYPE;
+};
 #endif
 
 #endif
index 29049764bbb540c2c9968f111e9894176a4c7850..cc99dc9bbd7c50f5a96e099b2df78ac9d4571cd6 100644 (file)
 
 #include "InterpKernelAutoPtr.hxx"
 #include "MEDCouplingDataArrayTraits.hxx"
+#include "MCType.hxx"
 
 #include <sstream>
 
+using namespace MEDCoupling;
+
+template<class T>
+struct SWIGTITraits
+{ };
+
+template<>
+struct SWIGTITraits<double>
+{ static swig_type_info *TI; static swig_type_info *TI_TUPLE; };
+
+template<>
+struct SWIGTITraits<float>
+{ static swig_type_info *TI; static swig_type_info *TI_TUPLE; };
+
+template<>
+struct SWIGTITraits<Int32>
+{ static swig_type_info *TI; static swig_type_info *TI_TUPLE; };
+
+template<>
+struct SWIGTITraits<Int64>
+{ static swig_type_info *TI; static swig_type_info *TI_TUPLE; };
+
+swig_type_info *SWIGTITraits<double>::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayDouble is null when called here ! Postpone initialization at inlined initializeMe()
+swig_type_info *SWIGTITraits<float>::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayFloat is null when called here ! Postpone initialization at inlined initializeMe()
+swig_type_info *SWIGTITraits<Int32>::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayInt32 is null when called here ! Postpone initialization at inlined initializeMe()
+swig_type_info *SWIGTITraits<Int64>::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayInt64 is null when called here ! Postpone initialization at inlined initializeMe()
+swig_type_info *SWIGTITraits<double>::TI_TUPLE=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayDouble is null when called here ! Postpone initialization at inlined initializeMe()
+swig_type_info *SWIGTITraits<float>::TI_TUPLE=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayFloat is null when called here ! Postpone initialization at inlined initializeMe()
+swig_type_info *SWIGTITraits<Int32>::TI_TUPLE=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayInt32 is null when called here ! Postpone initialization at inlined initializeMe()
+swig_type_info *SWIGTITraits<Int64>::TI_TUPLE=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayInt64 is null when called here ! Postpone initialization at inlined initializeMe()
+
 static PyObject *convertArray(MEDCoupling::DataArray *array, int owner)
 {
   PyObject *ret(NULL);
@@ -40,8 +72,10 @@ static PyObject *convertArray(MEDCoupling::DataArray *array, int owner)
     }
   if(dynamic_cast<MEDCoupling::DataArrayDouble *>(array))
     ret=SWIG_NewPointerObj((void*)array,SWIGTYPE_p_MEDCoupling__DataArrayDouble,owner);
-  if(dynamic_cast<MEDCoupling::DataArrayInt *>(array))
-    ret=SWIG_NewPointerObj((void*)array,SWIGTYPE_p_MEDCoupling__DataArrayInt,owner);
+  if(dynamic_cast<MEDCoupling::DataArrayInt32 *>(array))
+    ret=SWIG_NewPointerObj((void*)array,SWIGTYPE_p_MEDCoupling__DataArrayInt32,owner);
+  if(dynamic_cast<MEDCoupling::DataArrayInt64 *>(array))
+    ret=SWIG_NewPointerObj((void*)array,SWIGTYPE_p_MEDCoupling__DataArrayInt64,owner);
   if(dynamic_cast<MEDCoupling::DataArrayFloat *>(array))
     ret=SWIG_NewPointerObj((void*)array,SWIGTYPE_p_MEDCoupling__DataArrayFloat,owner);
   if(!ret)
@@ -92,11 +126,11 @@ void GetIndicesOfSliceExplicitely(PyObject *slice, Py_ssize_t *start, Py_ssize_t
   throw INTERP_KERNEL::Exception(msgInCaseOfFailure);
 }
 
-int InterpreteNegativeInt(int val, int nbelem)
+int InterpreteNegativeInt(long val, mcIdType nbelem)
 {
   if(val<0)
     {
-      int newVal(nbelem+val);
+      int newVal((int)(nbelem+val));
       if(newVal<0)
         {
           std::ostringstream oss; oss << "interpreteNegativeInt : request for negative int=" << val << " but number of elems is equal to " << nbelem << " !";
@@ -105,7 +139,7 @@ int InterpreteNegativeInt(int val, int nbelem)
       return newVal;
     }
   else
-    return val;
+    return (int)val;
 }
 
 #ifdef WITH_NUMPY
@@ -133,6 +167,9 @@ MCData *BuildNewInstance(PyObject *elt0, int npyObjectType, PyTypeObject *pytype
   if(PyArray_DESCR(elt0)->type_num != npyObjectType)
     {
       std::ostringstream oss; oss << "Input numpy array has not the type " << msg << "!";
+#ifdef _DEBUG_
+      oss << " type_num == " << PyArray_DESCR(elt0)->type_num;
+#endif
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   npy_intp sz0=PyArray_DIM(elt0,0);
@@ -195,7 +232,7 @@ MCData *BuildNewInstance(PyObject *elt0, int npyObjectType, PyTypeObject *pytype
           void **objs=new void *[2]; objs[0]=cb; objs[1]=ref;
           mma.setParameterForDeallocator(objs);
           mma.setSpecificDeallocator(numarrdeal2<MCData>);
-          //"Impossible to share this numpy array chunk of data, because already shared by an another non numpy array object (maybe an another DataArrayInt instance) ! Release it, or perform a copy on the input array !");
+          //"Impossible to share this numpy array chunk of data, because already shared by an another non numpy array object (maybe an another DataArrayIdType instance) ! Release it, or perform a copy on the input array !");
         }
       else
         {
@@ -289,7 +326,7 @@ int NumpyArrSetBaseObjectExt(PyArrayObject *arr, PyObject *obj)
 }
 
 template<class MCData, class T>
-PyObject *ToNumPyArrayUnderground(MCData *self, int npyObjectType, const char *MCDataStr, int nbTuples, int nbComp)
+PyObject *ToNumPyArrayUnderground(MCData *self, int npyObjectType, const char *MCDataStr, mcIdType nbTuples, std::size_t nbComp)
 {
   if(!self->isAllocated())
     {
@@ -304,7 +341,7 @@ PyObject *ToNumPyArrayUnderground(MCData *self, int npyObjectType, const char *M
     }
   int nbDims=nbComp==1?1:2;
   npy_intp dim[2];
-  dim[0]=(npy_intp)nbTuples; dim[1]=nbComp;
+  dim[0]=(npy_intp)nbTuples; dim[1]=(npy_intp)nbComp;
   const T *bg=self->getConstPointer();
   PyObject *ret(PyArray_SimpleNewFromData(nbDims,dim,npyObjectType,const_cast<T *>(bg)));
   if(mem.isDeallocatorCalled())
@@ -346,35 +383,40 @@ PyObject *ToNumPyArray(MCData *self, int npyObjectType, const char *MCDataStr)
   return ToNumPyArrayUnderground<MCData,T>(self,npyObjectType,MCDataStr,self->getNumberOfTuples(),self->getNumberOfComponents());
 }
 
-SWIGINTERN PyObject *MEDCoupling_DataArrayInt_toNumPyArray(MEDCoupling::DataArrayInt *self);
+SWIGINTERN PyObject *MEDCoupling_DataArrayInt32_toNumPyArray(MEDCoupling::DataArrayInt32 *self);
+SWIGINTERN PyObject *MEDCoupling_DataArrayInt64_toNumPyArray(MEDCoupling::DataArrayInt64 *self);
 SWIGINTERN PyObject *MEDCoupling_DataArrayDouble_toNumPyArray(MEDCoupling::DataArrayDouble *self);
 
 #endif
 
 #ifdef WITH_SCIPY
-PyObject *ToCSRMatrix(const std::vector<std::map<int,double> >& m, int nbCols)
+PyObject *ToCSRMatrix(const std::vector<std::map<mcIdType,double> >& m, mcIdType nbCols)
 {
-  int nbRows((int)m.size());
-  MEDCoupling::MCAuto<MEDCoupling::DataArrayInt> indPtr(MEDCoupling::DataArrayInt::New()),indices(MEDCoupling::DataArrayInt::New());
+  mcIdType nbRows((mcIdType)m.size());
+  MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType> indPtr(MEDCoupling::DataArrayIdType::New()),indices(MEDCoupling::DataArrayIdType::New());
   MEDCoupling::MCAuto<MEDCoupling::DataArrayDouble> data(MEDCoupling::DataArrayDouble::New());
   indPtr->alloc(nbRows+1,1);
-  int *intPtr_ptr(indPtr->getPointer()); intPtr_ptr[0]=0; intPtr_ptr++;
-  int sz2(0);
-  for(std::vector<std::map<int,double> >::const_iterator it0=m.begin();it0!=m.end();it0++,intPtr_ptr++)
+  mcIdType *intPtr_ptr(indPtr->getPointer()); intPtr_ptr[0]=0; intPtr_ptr++;
+  mcIdType sz2(0);
+  for(std::vector<std::map<mcIdType,double> >::const_iterator it0=m.begin();it0!=m.end();it0++,intPtr_ptr++)
     {
-      sz2+=(int)(*it0).size();
+      sz2+=(mcIdType)(*it0).size();
       *intPtr_ptr=sz2;
     }
   indices->alloc(sz2,1); data->alloc(sz2,1);
-  int *indices_ptr(indices->getPointer());
+  mcIdType *indices_ptr(indices->getPointer());
   double *data_ptr(data->getPointer());
-  for(std::vector<std::map<int,double> >::const_iterator it0=m.begin();it0!=m.end();it0++)
-    for(std::map<int,double>::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++,indices_ptr++,data_ptr++)
+  for(std::vector<std::map<mcIdType,double> >::const_iterator it0=m.begin();it0!=m.end();it0++)
+    for(std::map<mcIdType,double>::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++,indices_ptr++,data_ptr++)
       {
         *indices_ptr=(*it1).first;
         *data_ptr=(*it1).second;
       }
-  PyObject *a(MEDCoupling_DataArrayDouble_toNumPyArray(data)),*b(MEDCoupling_DataArrayInt_toNumPyArray(indices)),*c(MEDCoupling_DataArrayInt_toNumPyArray(indPtr));
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+  PyObject *a(MEDCoupling_DataArrayDouble_toNumPyArray(data)),*b(MEDCoupling_DataArrayInt32_toNumPyArray(indices)),*c(MEDCoupling_DataArrayInt32_toNumPyArray(indPtr));
+#else
+  PyObject *a(MEDCoupling_DataArrayDouble_toNumPyArray(data)),*b(MEDCoupling_DataArrayInt64_toNumPyArray(indices)),*c(MEDCoupling_DataArrayInt64_toNumPyArray(indPtr));
+#endif
   //
   PyObject *args(PyTuple_New(1)),*args0(PyTuple_New(3)),*kw(PyDict_New()),*kw1(PyTuple_New(2));
   PyTuple_SetItem(args0,0,a); PyTuple_SetItem(args0,1,b); PyTuple_SetItem(args0,2,c); PyTuple_SetItem(args,0,args0);
@@ -423,8 +465,10 @@ static PyObject *convertDataArray(MEDCoupling::DataArray *dac, int owner)
     }
   if(dynamic_cast<MEDCoupling::DataArrayDouble *>(dac))
     ret=SWIG_NewPointerObj((void*)dac,SWIGTYPE_p_MEDCoupling__DataArrayDouble,owner);
-  if(dynamic_cast<MEDCoupling::DataArrayInt *>(dac))
-    ret=SWIG_NewPointerObj((void*)dac,SWIGTYPE_p_MEDCoupling__DataArrayInt,owner);
+  if(dynamic_cast<MEDCoupling::DataArrayInt32 *>(dac))
+    ret=SWIG_NewPointerObj((void*)dac,SWIGTYPE_p_MEDCoupling__DataArrayInt32,owner);
+  if(dynamic_cast<MEDCoupling::DataArrayInt64 *>(dac))
+    ret=SWIG_NewPointerObj((void*)dac,SWIGTYPE_p_MEDCoupling__DataArrayInt64,owner);
   if(dynamic_cast<MEDCoupling::DataArrayFloat *>(dac))
     ret=SWIG_NewPointerObj((void*)dac,SWIGTYPE_p_MEDCoupling__DataArrayFloat,owner);
   if(dynamic_cast<MEDCoupling::DataArrayByte *>(dac))
@@ -436,29 +480,32 @@ static PyObject *convertDataArray(MEDCoupling::DataArray *dac, int owner)
   return ret;
 }
 
-static PyObject *convertIntArrToPyList(const int *ptr, int size)
+template<class T>
+static PyObject *convertIntArrToPyList(const T *ptr, mcIdType size)
 {
   PyObject *ret=PyList_New(size);
-  for(int i=0;i<size;i++)
+  for(T i=0;i<size;i++)
     PyList_SetItem(ret,i,PyInt_FromLong(ptr[i]));
   return ret;
 }
 
-static PyObject *convertIntArrToPyList2(const std::vector<int>& v)
+template<class T>
+static PyObject *convertIntArrToPyList2(const std::vector<T>& v)
 {
-  int size=v.size();
+  std::size_t size=v.size();
   PyObject *ret=PyList_New(size);
-  for(int i=0;i<size;i++)
+  for(std::size_t i=0;i<size;i++)
     PyList_SetItem(ret,i,PyInt_FromLong(v[i]));
   return ret;
 }
 
-static PyObject *convertIntArrToPyList3(const std::set<int>& v)
+template<class T>
+static PyObject *convertIntArrToPyList3(const std::set<T>& v)
 {
-  int size=v.size();
+  std::size_t size=v.size();
   PyObject *ret=PyList_New(size);
-  std::set<int>::const_iterator it=v.begin();
-  for(int i=0;i<size;i++,it++)
+  typename std::set<T>::const_iterator it=v.begin();
+  for(std::size_t i=0;i<size;i++,it++)
     PyList_SetItem(ret,i,PyInt_FromLong(*it));
   return ret;
 }
@@ -501,31 +548,33 @@ static std::string convertPyObjectToStr(PyObject *obj, const char *msg=NULL)
   return ret;
 }
 
-static PyObject *convertIntArrToPyListOfTuple(const int *vals, int nbOfComp, int nbOfTuples)
+template<class T>
+static PyObject *convertIntArrToPyListOfTuple(const T *vals, mcIdType nbOfComp, mcIdType nbOfTuples)
 {
   PyObject *ret=PyList_New(nbOfTuples);
-  for(int i=0;i<nbOfTuples;i++)
+  for(T i=0;i<nbOfTuples;i++)
     {
       PyObject *t=PyTuple_New(nbOfComp);
-      for(int j=0;j<nbOfComp;j++)
+      for(T j=0;j<nbOfComp;j++)
         PyTuple_SetItem(t,j,PyInt_FromLong(vals[i*nbOfComp+j]));
       PyList_SetItem(ret,i,t);
     }
   return ret;
 }
 
-static int *convertPyToNewIntArr2(PyObject *pyLi, int *size)
+template< class T = mcIdType >
+static T *convertPyToNewIntArr2(PyObject *pyLi, mcIdType *size)
 {
   if(PyList_Check(pyLi))
     {
-      *size=PyList_Size(pyLi);
-      int *tmp=new int[*size];
-      for(int i=0;i<*size;i++)
+      *size=ToIdType(PyList_Size(pyLi));
+      T *tmp=new T[*size];
+      for(mcIdType i=0;i<*size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyInt_Check(o))
             {
-              int val=(int)PyInt_AS_LONG(o);
+              T val=(T)PyInt_AS_LONG(o);
               tmp[i]=val;
             }
           else
@@ -538,14 +587,14 @@ static int *convertPyToNewIntArr2(PyObject *pyLi, int *size)
     }
   else if(PyTuple_Check(pyLi))
     {
-      *size=PyTuple_Size(pyLi);
-      int *tmp=new int[*size];
-      for(int i=0;i<*size;i++)
+      *size=ToIdType(PyTuple_Size(pyLi));
+      T *tmp=new T[*size];
+      for(mcIdType i=0;i<*size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyInt_Check(o))
             {
-              int val=(int)PyInt_AS_LONG(o);
+              T val=(T)PyInt_AS_LONG(o);
               tmp[i]=val;
             }
           else
@@ -562,7 +611,7 @@ static int *convertPyToNewIntArr2(PyObject *pyLi, int *size)
     }
 }
 
-static PyObject *convertFromVectorPairInt(const std::vector< std::pair<int,int> >& arr)
+static PyObject *convertFromVectorPairInt(const std::vector< std::pair<mcIdType,mcIdType> >& arr)
 {
   PyObject *ret=PyList_New(arr.size());
   for(std::size_t i=0;i<arr.size();i++)
@@ -575,19 +624,19 @@ static PyObject *convertFromVectorPairInt(const std::vector< std::pair<int,int>
   return ret;
 }
 
-static void convertPyToVectorPairInt(PyObject *pyLi, std::vector< std::pair<int,int> >& arr)
+static void convertPyToVectorPairInt(PyObject *pyLi, std::vector< std::pair<mcIdType,mcIdType> >& arr)
 {
   const char msg[]="list must contain tuples of 2 integers only or tuple must contain tuples of 2 integers only !";
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       arr.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
-              int sz2=PyTuple_Size(o);
+              std::size_t sz2=PyTuple_Size(o);
               if(sz2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               PyObject *o_0=PyTuple_GetItem(o,0);
@@ -596,8 +645,8 @@ static void convertPyToVectorPairInt(PyObject *pyLi, std::vector< std::pair<int,
               PyObject *o_1=PyTuple_GetItem(o,1);
               if(!PyInt_Check(o_1))
                 throw INTERP_KERNEL::Exception(msg);
-              arr[i].first=(int)PyInt_AS_LONG(o_0);
-              arr[i].second=(int)PyInt_AS_LONG(o_1);
+              arr[i].first=(mcIdType)PyInt_AS_LONG(o_0);
+              arr[i].second=(mcIdType)PyInt_AS_LONG(o_1);
             }
           else
             throw INTERP_KERNEL::Exception(msg);
@@ -605,14 +654,14 @@ static void convertPyToVectorPairInt(PyObject *pyLi, std::vector< std::pair<int,
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
+      std::size_t size=PyTuple_Size(pyLi);
       arr.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
-              int sz2=PyTuple_Size(o);
+              std::size_t sz2=PyTuple_Size(o);
               if(sz2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               PyObject *o_0=PyTuple_GetItem(o,0);
@@ -621,8 +670,8 @@ static void convertPyToVectorPairInt(PyObject *pyLi, std::vector< std::pair<int,
               PyObject *o_1=PyTuple_GetItem(o,1);
               if(!PyInt_Check(o_1))
                 throw INTERP_KERNEL::Exception(msg);
-              arr[i].first=(int)PyInt_AS_LONG(o_0);
-              arr[i].second=(int)PyInt_AS_LONG(o_1);
+              arr[i].first=(mcIdType)PyInt_AS_LONG(o_0);
+              arr[i].second=(mcIdType)PyInt_AS_LONG(o_1);
             }
           else
             throw INTERP_KERNEL::Exception(msg);
@@ -637,14 +686,14 @@ static void convertPyToVectorPairStringInt(PyObject *pyLi, std::vector< std::pai
   const char msg[]="convertPyToVectorPairStringInt : list must contain tuples of 2 integers only or tuple must contain tuples of 1 string and 1 integer only !";
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       arr.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
-              int sz2=PyTuple_Size(o);
+              std::size_t sz2=PyTuple_Size(o);
               if(sz2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               PyObject *o_0=PyTuple_GetItem(o,0);
@@ -660,14 +709,14 @@ static void convertPyToVectorPairStringInt(PyObject *pyLi, std::vector< std::pai
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
+      std::size_t size=PyTuple_Size(pyLi);
       arr.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
-              int sz2=PyTuple_Size(o);
+              std::size_t sz2=PyTuple_Size(o);
               if(sz2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               PyObject *o_0=PyTuple_GetItem(o,0);
@@ -685,18 +734,19 @@ static void convertPyToVectorPairStringInt(PyObject *pyLi, std::vector< std::pai
     throw INTERP_KERNEL::Exception(msg);
 }
 
-static void convertPyToNewIntArr3(PyObject *pyLi, std::vector<int>& arr)
+template<class T>
+static void convertPyToNewIntArr3(PyObject *pyLi, std::vector<T>& arr)
 {
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       arr.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyInt_Check(o))
             {
-              int val=(int)PyInt_AS_LONG(o);
+              T val=(T)PyInt_AS_LONG(o);
               arr[i]=val;
             }
           else
@@ -705,14 +755,14 @@ static void convertPyToNewIntArr3(PyObject *pyLi, std::vector<int>& arr)
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
+      std::size_t size=PyTuple_Size(pyLi);
       arr.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyInt_Check(o))
             {
-              int val=(int)PyInt_AS_LONG(o);
+              T val=(T)PyInt_AS_LONG(o);
               arr[i]=val;
             }
           else
@@ -725,27 +775,27 @@ static void convertPyToNewIntArr3(PyObject *pyLi, std::vector<int>& arr)
     }
 }
 
-static void convertPyToNewIntArr4(PyObject *pyLi, int recurseLev, int nbOfSubPart, std::vector<int>& arr)
+static void convertPyToNewIntArr4(PyObject *pyLi, mcIdType recurseLev, mcIdType nbOfSubPart, std::vector<mcIdType>& arr)
 {
   if(recurseLev<0)
     throw INTERP_KERNEL::Exception("convertPyToNewIntArr4 : invalid list of integers level of recursion !");
   arr.clear();
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
-      for(int i=0;i<size;i++)
+      std::size_t size=PyList_Size(pyLi);
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyInt_Check(o))
             {
-              int val=(int)PyInt_AS_LONG(o);
+              mcIdType val=(mcIdType)PyInt_AS_LONG(o);
               arr.push_back(val);
             }
           else
             {
-              std::vector<int> arr2;
+              std::vector<mcIdType> arr2;
               convertPyToNewIntArr4(o,recurseLev-1,nbOfSubPart,arr2);
-              if(nbOfSubPart>=1 && nbOfSubPart!=(int)arr2.size())
+              if(nbOfSubPart>=1 && nbOfSubPart!=(mcIdType)arr2.size())
                   {
                     std::ostringstream oss; oss << "convertPyToNewIntArr4 : input list at lev " <<  recurseLev << " invalid nb of subpart elts expected " << nbOfSubPart << " having " << arr2.size() << " !";
                     throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -756,20 +806,20 @@ static void convertPyToNewIntArr4(PyObject *pyLi, int recurseLev, int nbOfSubPar
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
-      for(int i=0;i<size;i++)
+      std::size_t size=PyTuple_Size(pyLi);
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyInt_Check(o))
             {
-              int val=(int)PyInt_AS_LONG(o);
+              mcIdType val=ToIdType(PyInt_AS_LONG(o));
               arr.push_back(val);
             }
           else
             {
-              std::vector<int> arr2;
+              std::vector<mcIdType> arr2;
               convertPyToNewIntArr4(o,recurseLev-1,nbOfSubPart,arr2);
-              if(nbOfSubPart>=1 && nbOfSubPart!=(int)arr2.size())
+              if(nbOfSubPart>=1 && nbOfSubPart!=(mcIdType)arr2.size())
                   {
                     std::ostringstream oss; oss << "convertPyToNewIntArr4 : input list at lev " <<  recurseLev << " invalid nb of subpart elts expected " << nbOfSubPart << " having " << arr2.size() << " !";
                     throw INTERP_KERNEL::Exception(oss.str().c_str());
@@ -782,7 +832,7 @@ static void convertPyToNewIntArr4(PyObject *pyLi, int recurseLev, int nbOfSubPar
     throw INTERP_KERNEL::Exception("convertPyToNewIntArr4 : not a list nor a tuple recursively !");
 }
 
-static void checkFillArrayWithPyList(int size1, int size2, int& nbOfTuples, int& nbOfComp)
+static void checkFillArrayWithPyList(mcIdType size1, mcIdType size2, mcIdType& nbOfTuples, mcIdType& nbOfComp)
 {
   if(nbOfTuples==-1)
     {
@@ -822,12 +872,13 @@ static void checkFillArrayWithPyList(int size1, int size2, int& nbOfTuples, int&
     }
 }
 
-static void fillArrayWithPyListInt3(PyObject *pyLi, int& nbOfElt, std::vector<int>& ret)
+template< class T >
+static void fillArrayWithPyListInt3(PyObject *pyLi, mcIdType& nbOfElt, std::vector<T>& ret)
 {
   static const char MSG[]="fillArrayWithPyListInt3 : It appears that the input list or tuple is composed by elts having different sizes !";
   if(PyInt_Check(pyLi))
     {
-      long val=PyInt_AS_LONG(pyLi);
+      T val=(T)PyInt_AS_LONG(pyLi);
       if(nbOfElt==-1)
         nbOfElt=1;
       else
@@ -837,12 +888,12 @@ static void fillArrayWithPyListInt3(PyObject *pyLi, int& nbOfElt, std::vector<in
     }
   else if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
-      int tmp=0;
-      for(int i=0;i<size;i++)
+      std::size_t size=PyList_Size(pyLi);
+      mcIdType tmp=0;
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
-          int tmp1=-1;
+          mcIdType tmp1=-1;
           fillArrayWithPyListInt3(o,tmp1,ret);
           tmp+=tmp1;
         }
@@ -856,12 +907,12 @@ static void fillArrayWithPyListInt3(PyObject *pyLi, int& nbOfElt, std::vector<in
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
-      int tmp=0;
-      for(int i=0;i<size;i++)
+      std::size_t size=PyTuple_Size(pyLi);
+      mcIdType tmp=0;
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
-          int tmp1=-1;
+          mcIdType tmp1=-1;
           fillArrayWithPyListInt3(o,tmp1,ret);
           tmp+=tmp1;
         }
@@ -877,14 +928,15 @@ static void fillArrayWithPyListInt3(PyObject *pyLi, int& nbOfElt, std::vector<in
     throw INTERP_KERNEL::Exception("fillArrayWithPyListInt3 : Unrecognized type ! Should be a composition of tuple,list,int !");
 }
 
-static std::vector<int> fillArrayWithPyListInt2(PyObject *pyLi, int& nbOfTuples, int& nbOfComp)
+template< class T = mcIdType >
+static std::vector<T> fillArrayWithPyListInt2(PyObject *pyLi, mcIdType& nbOfTuples, mcIdType& nbOfComp)
 {
-  std::vector<int> ret;
-  int size1=-1,size2=-1;
+  std::vector<T> ret;
+  mcIdType size1=-1,size2=-1;
   if(PyList_Check(pyLi))
     {
-      size1=PyList_Size(pyLi);
-      for(int i=0;i<size1;i++)
+      size1=ToIdType(PyList_Size(pyLi));
+      for(mcIdType i=0;i<size1;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           fillArrayWithPyListInt3(o,size2,ret);
@@ -894,8 +946,8 @@ static std::vector<int> fillArrayWithPyListInt2(PyObject *pyLi, int& nbOfTuples,
     }
   else if(PyTuple_Check(pyLi))
     {
-      size1=PyTuple_Size(pyLi);
-      for(int i=0;i<size1;i++)
+      size1=ToIdType(PyTuple_Size(pyLi));
+      for(mcIdType i=0;i<size1;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           fillArrayWithPyListInt3(o,size2,ret);
@@ -916,7 +968,7 @@ static bool fillStringVector(PyObject *pyLi, std::vector<std::string>& vec)
     {
       Py_ssize_t sz=PyList_Size(pyLi);
       vec.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(!convertPyObjectToStrNT(o,vec[i]))
@@ -928,7 +980,7 @@ static bool fillStringVector(PyObject *pyLi, std::vector<std::string>& vec)
     {
       Py_ssize_t sz=PyTuple_Size(pyLi);
       vec.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(!convertPyObjectToStrNT(o,vec[i]))
@@ -946,7 +998,7 @@ static void convertPyToVectorOfVectorOfString(PyObject *pyLi, std::vector< std::
     {
       Py_ssize_t sz=PyList_Size(pyLi);
       arr.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(!fillStringVector(o,arr[i]))
@@ -957,7 +1009,7 @@ static void convertPyToVectorOfVectorOfString(PyObject *pyLi, std::vector< std::
     {
       Py_ssize_t sz=PyTuple_Size(pyLi);
       arr.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(!fillStringVector(o,arr[i]))
@@ -968,17 +1020,17 @@ static void convertPyToVectorOfVectorOfString(PyObject *pyLi, std::vector< std::
     throw INTERP_KERNEL::Exception(msg);
 }
 
-static bool fillIntVector(PyObject *pyLi, std::vector<int>& vec)
+static bool fillIntVector(PyObject *pyLi, std::vector<mcIdType>& vec)
 {
   if(PyList_Check(pyLi))
     {
       Py_ssize_t sz=PyList_Size(pyLi);
       vec.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyInt_Check(o))
-            vec[i]=PyInt_AS_LONG(o);
+            vec[i]=ToIdType(PyInt_AS_LONG(o));
           else
             return false;
         }
@@ -988,11 +1040,11 @@ static bool fillIntVector(PyObject *pyLi, std::vector<int>& vec)
     {
       Py_ssize_t sz=PyTuple_Size(pyLi);
       vec.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyInt_Check(o))
-            vec[i]=PyInt_AS_LONG(o);
+            vec[i]=ToIdType(PyInt_AS_LONG(o));
           else
             return false;
         }
@@ -1002,14 +1054,14 @@ static bool fillIntVector(PyObject *pyLi, std::vector<int>& vec)
     return false;
 }
 
-static void convertPyToVectorOfVectorOfInt(PyObject *pyLi, std::vector< std::vector<int> >& arr)
+static void convertPyToVectorOfVectorOfInt(PyObject *pyLi, std::vector< std::vector<mcIdType> >& arr)
 {
   const char msg[]="convertPyToVectorOfVectorOfInt : expecting list of list of strings !";
   if(PyList_Check(pyLi))
     {
       Py_ssize_t sz=PyList_Size(pyLi);
       arr.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(!fillIntVector(o,arr[i]))
@@ -1020,7 +1072,7 @@ static void convertPyToVectorOfVectorOfInt(PyObject *pyLi, std::vector< std::vec
     {
       Py_ssize_t sz=PyTuple_Size(pyLi);
       arr.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(!fillIntVector(o,arr[i]))
@@ -1038,12 +1090,12 @@ static void convertPyToVectorPairStringVecString(PyObject *pyLi, std::vector< st
     {
       Py_ssize_t sz=PyList_Size(pyLi);
       arr.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(mcIdType i=0;i<sz;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
-              int sz2=PyTuple_Size(o);
+              std::size_t sz2=PyTuple_Size(o);
               if(sz2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               std::pair<std::string, std::vector<std::string> > item;
@@ -1062,12 +1114,12 @@ static void convertPyToVectorPairStringVecString(PyObject *pyLi, std::vector< st
     {
       Py_ssize_t sz=PyTuple_Size(pyLi);
       arr.resize(sz);
-      for(int i=0;i<sz;i++)
+      for(Py_ssize_t i=0;i<sz;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
-              int sz2=PyTuple_Size(o);
+              std::size_t sz2=PyTuple_Size(o);
               if(sz2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               std::pair<std::string, std::vector<std::string> > item;
@@ -1087,42 +1139,42 @@ static void convertPyToVectorPairStringVecString(PyObject *pyLi, std::vector< st
 }
 
 template<class T>
-PyObject *convertDblArrToPyList(const T *ptr, int size)
+PyObject *convertDblArrToPyList(const T *ptr, std::size_t size)
 {
   PyObject *ret(PyList_New(size));
-  for(int i=0;i<size;i++)
+  for(std::size_t i=0;i<size;i++)
     PyList_SetItem(ret,i,PyFloat_FromDouble(ptr[i]));
   return ret;
 }
 
 static PyObject *convertDblArrToPyList2(const std::vector<double>& v)
 {
-  int size(v.size());
+  std::size_t size(v.size());
   PyObject *ret(PyList_New(size));
-  for(int i=0;i<size;i++)
+  for(std::size_t i=0;i<size;i++)
     PyList_SetItem(ret,i,PyFloat_FromDouble(v[i]));
   return ret;
 }
 
 template<class T>
-PyObject *convertDblArrToPyListOfTuple(const T *vals, int nbOfComp, int nbOfTuples)
+PyObject *convertDblArrToPyListOfTuple(const T *vals, std::size_t nbOfComp, mcIdType nbOfTuples)
 {
   PyObject *ret(PyList_New(nbOfTuples));
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
       PyObject *t=PyTuple_New(nbOfComp);
-      for(int j=0;j<nbOfComp;j++)
+      for(std::size_t j=0;j<nbOfComp;j++)
         PyTuple_SetItem(t,j,PyFloat_FromDouble(vals[i*nbOfComp+j]));
       PyList_SetItem(ret,i,t);
     }
   return ret;
 }
 
-static PyObject *convertCharArrToPyListOfTuple(const char *vals, int nbOfComp, int nbOfTuples)
+static PyObject *convertCharArrToPyListOfTuple(const char *vals, int nbOfComp, mcIdType nbOfTuples)
 {
   PyObject *ret=PyList_New(nbOfTuples);
   INTERP_KERNEL::AutoPtr<char> tmp=new char[nbOfComp+1]; tmp[nbOfComp]='\0';
-  for(int i=0;i<nbOfTuples;i++)
+  for(mcIdType i=0;i<nbOfTuples;i++)
     {
       std::copy(vals+i*nbOfComp,vals+(i+1)*nbOfComp,(char *)tmp);
       PyList_SetItem(ret,i,PyString_FromString(tmp));
@@ -1130,13 +1182,13 @@ static PyObject *convertCharArrToPyListOfTuple(const char *vals, int nbOfComp, i
   return ret;
 }
 
-static double *convertPyToNewDblArr2(PyObject *pyLi, int *size)
+static double *convertPyToNewDblArr2(PyObject *pyLi, mcIdType *size)
 {
   if(PyList_Check(pyLi))
     {
-      *size=PyList_Size(pyLi);
+      *size=ToIdType(PyList_Size(pyLi));
       double *tmp=(double *)malloc((*size)*sizeof(double));
-      for(int i=0;i<*size;i++)
+      for(mcIdType i=0;i<*size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyFloat_Check(o))
@@ -1147,7 +1199,7 @@ static double *convertPyToNewDblArr2(PyObject *pyLi, int *size)
           else if(PyInt_Check(o))
             {
               long val0=PyInt_AS_LONG(o);
-              double val=val0;
+              double val=(double)val0;
               tmp[i]=val;
             }
           else
@@ -1160,9 +1212,9 @@ static double *convertPyToNewDblArr2(PyObject *pyLi, int *size)
     }
   else if(PyTuple_Check(pyLi))
     {
-      *size=PyTuple_Size(pyLi);
+      *size=ToIdType(PyTuple_Size(pyLi));
       double *tmp=(double *)malloc((*size)*sizeof(double));
-      for(int i=0;i<*size;i++)
+      for(mcIdType i=0;i<*size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           if(PyFloat_Check(o))
@@ -1173,7 +1225,7 @@ static double *convertPyToNewDblArr2(PyObject *pyLi, int *size)
           else if(PyInt_Check(o))
             {
               long val0=PyInt_AS_LONG(o);
-              double val=val0;
+              double val=(double)val0;
               tmp[i]=val;
             }
           else
@@ -1188,7 +1240,7 @@ static double *convertPyToNewDblArr2(PyObject *pyLi, int *size)
     throw INTERP_KERNEL::Exception("convertPyToNewDblArr2 : not a list");
 }
 
-static void fillArrayWithPyListDbl3(PyObject *pyLi, int& nbOfElt, std::vector<double>& ret)
+static void fillArrayWithPyListDbl3(PyObject *pyLi, mcIdType& nbOfElt, std::vector<double>& ret)
 {
   static const char MSG[]="fillArrayWithPyListDbl3 : It appears that the input list or tuple is composed by elts having different sizes !";
   if(PyFloat_Check(pyLi))
@@ -1203,8 +1255,8 @@ static void fillArrayWithPyListDbl3(PyObject *pyLi, int& nbOfElt, std::vector<do
     }
   else if(PyInt_Check(pyLi))
     {
-      long val0=PyInt_AS_LONG(pyLi);
-      double val=val0;
+      mcIdType val0=ToIdType(PyInt_AS_LONG(pyLi));
+      double val=(double)val0;
       if(nbOfElt==-1)
         nbOfElt=1;
       else
@@ -1214,12 +1266,12 @@ static void fillArrayWithPyListDbl3(PyObject *pyLi, int& nbOfElt, std::vector<do
     }
   else if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
-      int tmp=0;
-      for(int i=0;i<size;i++)
+      std::size_t size=PyList_Size(pyLi);
+      mcIdType tmp=0;
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
-          int tmp1=-1;
+          mcIdType tmp1=-1;
           fillArrayWithPyListDbl3(o,tmp1,ret);
           tmp+=tmp1;
         }
@@ -1233,12 +1285,12 @@ static void fillArrayWithPyListDbl3(PyObject *pyLi, int& nbOfElt, std::vector<do
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
-      int tmp=0;
-      for(int i=0;i<size;i++)
+      std::size_t size=PyTuple_Size(pyLi);
+      mcIdType tmp=0;
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
-          int tmp1=-1;
+          mcIdType tmp1=-1;
           fillArrayWithPyListDbl3(o,tmp1,ret);
           tmp+=tmp1;
         }
@@ -1254,14 +1306,15 @@ static void fillArrayWithPyListDbl3(PyObject *pyLi, int& nbOfElt, std::vector<do
     throw INTERP_KERNEL::Exception("fillArrayWithPyListDbl3 : Unrecognized type ! Should be a composition of tuple,list,int and float !");
 }
 
-static std::vector<double> fillArrayWithPyListDbl2(PyObject *pyLi, int& nbOfTuples, int& nbOfComp)
+static std::vector<double> fillArrayWithPyListDbl2(PyObject *pyLi, mcIdType& nbOfTuples, mcIdType& nbOfComp)
 {
   std::vector<double> ret;
-  int size1=-1,size2=-1;
+  std::size_t size1=-1;
+  mcIdType size2=-1;
   if(PyList_Check(pyLi))
     {
       size1=PyList_Size(pyLi);
-      for(int i=0;i<size1;i++)
+      for(std::size_t i=0;i<size1;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           fillArrayWithPyListDbl3(o,size2,ret);
@@ -1272,7 +1325,7 @@ static std::vector<double> fillArrayWithPyListDbl2(PyObject *pyLi, int& nbOfTupl
   else if(PyTuple_Check(pyLi))
     {
       size1=PyTuple_Size(pyLi);
-      for(int i=0;i<size1;i++)
+      for(std::size_t i=0;i<size1;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           fillArrayWithPyListDbl3(o,size2,ret);
@@ -1283,7 +1336,7 @@ static std::vector<double> fillArrayWithPyListDbl2(PyObject *pyLi, int& nbOfTupl
   else
     throw INTERP_KERNEL::Exception("fillArrayWithPyListDbl2 : Unrecognized type ! Should be a tuple or a list !");
   //
-  checkFillArrayWithPyList(size1,size2,nbOfTuples,nbOfComp);
+  checkFillArrayWithPyList(ToIdType(size1),ToIdType(size2),nbOfTuples,nbOfComp);
   return ret;
 }
 
@@ -1294,9 +1347,9 @@ static void convertFromPyObjVectorOfObj(PyObject *pyLi, swig_type_info *ty, cons
   void *argp=0;
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       ret.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *obj=PyList_GetItem(pyLi,i);
           int status=SWIG_ConvertPtr(obj,&argp,ty,0|0);
@@ -1311,9 +1364,9 @@ static void convertFromPyObjVectorOfObj(PyObject *pyLi, swig_type_info *ty, cons
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
+      std::size_t size=PyTuple_Size(pyLi);
       ret.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *obj=PyTuple_GetItem(pyLi,i);
           int status=SWIG_ConvertPtr(obj,&argp,ty,0|0);
@@ -1340,29 +1393,30 @@ static void convertFromPyObjVectorOfObj(PyObject *pyLi, swig_type_info *ty, cons
  * if python int -> cpp int sw=1
  * if python list[int] -> cpp vector<int> sw=2
  * if python tuple[int] -> cpp vector<int> sw=2
- * if python DataArrayInt -> cpp DataArrayInt sw=3
- * if python DataArrayIntTuple -> cpp DataArrayIntTuple sw=4
+ * if python DataArrayIdType -> cpp DataArrayIdType sw=3
+ * if python DataArrayIntTuple -> cpp DataArrayIdTypeTuple sw=4
  *
- * switch between (int,vector<int>,DataArrayInt)
+ * switch between (int,vector<int>,DataArrayIdType)
  */
-static void convertIntStarLikePyObjToCpp(PyObject *value, int& sw, int& iTyypp, std::vector<int>& stdvecTyypp, MEDCoupling::DataArrayInt *& daIntTyypp, MEDCoupling::DataArrayIntTuple *&daIntTuple)
+template< class T, class ARRAY >
+static void convertIntStarLikePyObjToCpp(PyObject *value, mcIdType& sw, T& iTyypp, std::vector<T>& stdvecTyypp, ARRAY *& daIntTyypp, typename MEDCoupling::Traits< T >::ArrayTuple *&daIntTuple)
 {
   sw=-1;
   if(PyInt_Check(value))
     {
-      iTyypp=(int)PyInt_AS_LONG(value);
+      iTyypp=(T)PyInt_AS_LONG(value);
       sw=1;
       return;
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(T)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "Tuple as been detected but element #" << i << " is not integer ! only tuples of integers accepted !";
@@ -1374,13 +1428,13 @@ static void convertIntStarLikePyObjToCpp(PyObject *value, int& sw, int& iTyypp,
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(T)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "List as been detected but element #" << i << " is not integer ! only lists of integers accepted !";
@@ -1391,82 +1445,84 @@ static void convertIntStarLikePyObjToCpp(PyObject *value, int& sw, int& iTyypp,
       return;
     }
   void *argp;
-  int status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
+  int status=SWIG_ConvertPtr(value,&argp,SWIGTITraits< typename ARRAY::Type >::TI,0|0);
   if(SWIG_IsOK(status))
     {
-      daIntTyypp=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+      daIntTyypp=reinterpret_cast< ARRAY * >(argp);
       sw=3;
       return;
     }
-  status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayIntTuple,0|0);
+  status=SWIG_ConvertPtr(value,&argp,SWIGTITraits<T>::TI_TUPLE,0|0);
   if(SWIG_IsOK(status))
     {
-      daIntTuple=reinterpret_cast< MEDCoupling::DataArrayIntTuple * >(argp);
+      daIntTuple=reinterpret_cast< typename MEDCoupling::Traits< T >::ArrayTuple * >(argp);
       sw=4;
       return ;
     }
-  throw INTERP_KERNEL::Exception("5 types accepted : integer, tuple of integer, list of integer, DataArrayInt, DataArrayIntTuple");
+  throw INTERP_KERNEL::Exception("5 types accepted : integer, tuple of integer, list of integer, DataArrayIdType, DataArrayIdTypeTuple");
 }
 
 /*!
  * if python int -> cpp int sw=1
  * if python list[int] -> cpp vector<int> sw=2
  * if python tuple[int] -> cpp vector<int> sw=2
- * if python DataArrayInt -> cpp DataArrayInt sw=3
- * if python DataArrayIntTuple -> cpp DataArrayIntTuple sw=4
+ * if python DataArrayIdType -> cpp DataArrayIdType sw=3
+ * if python DataArrayIdTypeTuple -> cpp DataArrayIdTypeTuple sw=4
  *
- * switch between (int,vector<int>,DataArrayInt)
+ * switch between (int,vector<int>,DataArrayIdType)
  */
-static const int *convertIntStarLikePyObjToCppIntStar(PyObject *value, int& sw, int& sz, int& iTyypp, std::vector<int>& stdvecTyypp)
+template< class T >
+static const T *convertIntStarLikePyObjToCppIntStar(PyObject *value, mcIdType& sw, mcIdType& sz, T& iTyypp, std::vector<T>& stdvecTyypp)
 {
   sw=-1;
   if(PyInt_Check(value))
     {
-      iTyypp=(int)PyInt_AS_LONG(value);
+      iTyypp=(T)PyInt_AS_LONG(value);
       sw=1; sz=1;
       return &iTyypp;
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(T)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "Tuple as been detected but element #" << i << " is not integer ! only tuples of integers accepted !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
         }
-      sw=2; sz=size;
+      sw=2; sz=ToIdType(size);
       return &stdvecTyypp[0];
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(T)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "List as been detected but element #" << i << " is not integer ! only lists of integers accepted !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
         }
-      sw=2; sz=size;
+      sw=2; sz=ToIdType(size);
       return &stdvecTyypp[0];
     }
   void *argp;
-  int status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
+  int status=SWIG_ConvertPtr(value,&argp,SWIGTITraits<T>::TI,0|0);
   if(SWIG_IsOK(status))
     {
-      MEDCoupling::DataArrayInt *daIntTyypp=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+      typedef typename MEDCoupling::Traits< T >::ArrayType ARRAY;
+      ARRAY *daIntTyypp=reinterpret_cast< ARRAY * >(argp);
       if(daIntTyypp)
         {
           sw=3; sz=daIntTyypp->getNbOfElems();
@@ -1478,14 +1534,15 @@ static const int *convertIntStarLikePyObjToCppIntStar(PyObject *value, int& sw,
           return 0;
         }
     }
-  status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayIntTuple,0|0);
+  status=SWIG_ConvertPtr(value,&argp,SWIGTITraits<T>::TI_TUPLE,0|0);
   if(SWIG_IsOK(status))
     {
-      MEDCoupling::DataArrayIntTuple *daIntTuple=reinterpret_cast< MEDCoupling::DataArrayIntTuple * >(argp);
-      sw=4; sz=daIntTuple->getNumberOfCompo();
+      typedef typename MEDCoupling::Traits< T >::ArrayTuple ARRAYTUPLE;
+      ARRAYTUPLE *daIntTuple=reinterpret_cast< ARRAYTUPLE * >(argp);
+      sw=4; sz=ToIdType(daIntTuple->getNumberOfCompo());
       return daIntTuple->getConstPointer();
     }
-  throw INTERP_KERNEL::Exception("5 types accepted : integer, tuple of integer, list of integer, DataArrayInt, DataArrayIntTuple");
+  throw INTERP_KERNEL::Exception("5 types accepted : integer, tuple of integer, list of integer, DataArrayIdType, DataArrayIdTypeTuple");
 }
 
 /*!
@@ -1497,10 +1554,10 @@ static const int *convertIntStarLikePyObjToCppIntStar(PyObject *value, int& sw,
  * if python tuple[int] -> cpp vector<double> sw=2
  * if python DataArrayDouble -> cpp DataArrayDouble sw=3
  *
- * switch between (int,vector<int>,DataArrayInt)
+ * switch between (int,vector<int>,DataArrayIdType)
  */
 template<class T>
-void considerPyObjAsATStarLikeObject(PyObject *value, int& sw, T& iTyypp, std::vector<T>& stdvecTyypp, typename MEDCoupling::Traits<T>::ArrayType *& daIntTyypp, swig_type_info *ti)
+void considerPyObjAsATStarLikeObject(PyObject *value, mcIdType& sw, T& iTyypp, std::vector<T>& stdvecTyypp, typename MEDCoupling::Traits<T>::ArrayType *& daIntTyypp, swig_type_info *ti)
 {
   sw=-1;
   if(PyFloat_Check(value))
@@ -1517,9 +1574,9 @@ void considerPyObjAsATStarLikeObject(PyObject *value, int& sw, T& iTyypp, std::v
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -1537,9 +1594,9 @@ void considerPyObjAsATStarLikeObject(PyObject *value, int& sw, T& iTyypp, std::v
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -1572,9 +1629,9 @@ void considerPyObjAsATStarLikeObject(PyObject *value, int& sw, T& iTyypp, std::v
  * if python tuple[int] -> cpp vector<double> sw=2
  * if python DataArrayDoubleTuple -> cpp DataArrayDoubleTuple sw=3
  *
- * switch between (int,vector<int>,DataArrayInt)
+ * switch between (int,vector<int>,DataArrayIdType)
  */
-static void convertDoubleStarLikePyObjToCpp(PyObject *value, int& sw, double& iTyypp, std::vector<double>& stdvecTyypp, MEDCoupling::DataArrayDoubleTuple *& daIntTyypp)
+static void convertDoubleStarLikePyObjToCpp(PyObject *value, mcIdType& sw, double& iTyypp, std::vector<double>& stdvecTyypp, MEDCoupling::DataArrayDoubleTuple *& daIntTyypp)
 {
   sw=-1;
   if(PyFloat_Check(value))
@@ -1591,9 +1648,9 @@ static void convertDoubleStarLikePyObjToCpp(PyObject *value, int& sw, double& iT
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -1611,9 +1668,9 @@ static void convertDoubleStarLikePyObjToCpp(PyObject *value, int& sw, double& iT
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -1638,12 +1695,12 @@ static void convertDoubleStarLikePyObjToCpp(PyObject *value, int& sw, double& iT
 }
 
 template<class T>
-void convertFPStarLikePyObjToCpp_2(PyObject *value, int& sw, T& val, typename MEDCoupling::Traits<T>::ArrayType *&d, typename MEDCoupling::Traits<T>::ArrayTuple *&e, std::vector<T>& f, swig_type_info *ti_da, swig_type_info *ti_tuple)
+void convertFPStarLikePyObjToCpp_2(PyObject *value, mcIdType& sw, T& val, typename MEDCoupling::Traits<T>::ArrayType *&d, typename MEDCoupling::Traits<T>::ArrayTuple *&e, std::vector<T>& f, swig_type_info *ti_da, swig_type_info *ti_tuple)
 {
   sw=-1;
   if(PyFloat_Check(value))
     {
-      val=PyFloat_AS_DOUBLE(value);
+      val=(T)PyFloat_AS_DOUBLE(value);
       sw=1;
       return;
     }
@@ -1655,13 +1712,13 @@ void convertFPStarLikePyObjToCpp_2(PyObject *value, int& sw, T& val, typename ME
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       f.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyFloat_Check(o))
-            f[i]=PyFloat_AS_DOUBLE(o);
+            f[i]=(T)PyFloat_AS_DOUBLE(o);
           else if(PyInt_Check(o))
             f[i]=(T)PyInt_AS_LONG(o);
           else
@@ -1675,13 +1732,13 @@ void convertFPStarLikePyObjToCpp_2(PyObject *value, int& sw, T& val, typename ME
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       f.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyFloat_Check(o))
-            f[i]=PyFloat_AS_DOUBLE(o);
+            f[i]=(T)PyFloat_AS_DOUBLE(o);
           else if(PyInt_Check(o))
             f[i]=(T)PyInt_AS_LONG(o);
           else
@@ -1719,7 +1776,7 @@ void convertFPStarLikePyObjToCpp_2(PyObject *value, int& sw, T& val, typename ME
  * if value list[int,double] -> cpp std::vector<double> sw=4
  * if value tuple[int,double] -> cpp std::vector<double> sw=4
  */
-static void convertDoubleStarLikePyObjToCpp_2(PyObject *value, int& sw, double& val, MEDCoupling::DataArrayDouble *&d, MEDCoupling::DataArrayDoubleTuple *&e, std::vector<double>& f)
+static void convertDoubleStarLikePyObjToCpp_2(PyObject *value, mcIdType& sw, double& val, MEDCoupling::DataArrayDouble *&d, MEDCoupling::DataArrayDoubleTuple *&e, std::vector<double>& f)
 {
   convertFPStarLikePyObjToCpp_2<double>(value,sw,val,d,e,f,SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIGTYPE_p_MEDCoupling__DataArrayDoubleTuple);
 }
@@ -1732,7 +1789,7 @@ static void convertDoubleStarLikePyObjToCpp_2(PyObject *value, int& sw, double&
  * if value list[int,double] -> cpp std::vector<double> sw=4
  * if value tuple[int,double] -> cpp std::vector<double> sw=4
  */
-static void convertFloatStarLikePyObjToCpp_2(PyObject *value, int& sw, float& val, MEDCoupling::DataArrayFloat *&d, MEDCoupling::DataArrayFloatTuple *&e, std::vector<float>& f)
+static void convertFloatStarLikePyObjToCpp_2(PyObject *value, mcIdType& sw, float& val, MEDCoupling::DataArrayFloat *&d, MEDCoupling::DataArrayFloatTuple *&e, std::vector<float>& f)
 {
   convertFPStarLikePyObjToCpp_2<float>(value,sw,val,d,e,f,SWIGTYPE_p_MEDCoupling__DataArrayFloat,SWIGTYPE_p_MEDCoupling__DataArrayFloatTuple);
 }
@@ -1742,29 +1799,30 @@ static void convertFloatStarLikePyObjToCpp_2(PyObject *value, int& sw, float& va
  * if python list[int] -> cpp vector<int> sw=2
  * if python tuple[int] -> cpp vector<int> sw=2
  * if python slicp -> cpp pair sw=3 (begin,end,step)
- * if python DataArrayInt -> cpp DataArrayInt sw=4 . The returned pointer cannot be the null pointer ! If null an exception is thrown.
+ * if python DataArrayIdType -> cpp DataArrayIdType sw=4 . The returned pointer cannot be the null pointer ! If null an exception is thrown.
  *
- * switch between (int,vector<int>,DataArrayInt)
+ * switch between (int,vector<int>,DataArrayIdType)
  */
-static void convertIntStarOrSliceLikePyObjToCpp(PyObject *value, int nbelem, int& sw, int& iTyypp, std::vector<int>& stdvecTyypp, std::pair<int, std::pair<int,int> >& p, MEDCoupling::DataArrayInt *& daIntTyypp)
+template<class T, class ARRAY>
+static void convertIntStarOrSliceLikePyObjToCpp(PyObject *value, mcIdType nbelem, mcIdType& sw, T& iTyypp, std::vector<T>& stdvecTyypp, std::pair<mcIdType, std::pair<mcIdType,mcIdType> >& p, ARRAY *& daIntTyypp)
 {
-  const char *msg="5 types accepted : integer, tuple of integer, list of integer, slice, DataArrayInt, DataArrayIntTuple";
+  const char *msg="5 types accepted : integer, tuple of integer, list of integer, slice, DataArrayIdType, DataArrayIdTypeTuple";
   sw=-1;
   if(PyInt_Check(value))
     {
-      iTyypp=(int)PyInt_AS_LONG(value);
+      iTyypp=(T)PyInt_AS_LONG(value);
       sw=1;
       return;
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(T)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "Tuple as been detected but element #" << i << " is not integer ! only tuples of integers accepted !";
@@ -1776,13 +1834,13 @@ static void convertIntStarOrSliceLikePyObjToCpp(PyObject *value, int nbelem, int
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(T)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "List as been detected but element #" << i << " is not integer ! only lists of integers accepted !";
@@ -1796,17 +1854,17 @@ static void convertIntStarOrSliceLikePyObjToCpp(PyObject *value, int nbelem, int
     {
       Py_ssize_t strt=2,stp=2,step=2;
       GetIndicesOfSlice(value,nbelem,&strt,&stp,&step,"Slice in subscriptable object DataArray invalid !");
-      p.first=strt;
-      p.second.first=stp;
-      p.second.second=step;
+      p.first=ToIdType(strt);
+      p.second.first=ToIdType(stp);
+      p.second.second=ToIdType(step);
       sw=3;
       return ;
     }
   void *argp;
-  int status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
+  int status=SWIG_ConvertPtr(value,&argp,SWIGTITraits< typename ARRAY::Type >::TI,0|0);
   if(SWIG_IsOK(status))
     {
-      daIntTyypp=reinterpret_cast< MEDCoupling::DataArrayInt * >(argp);
+      daIntTyypp=reinterpret_cast< ARRAY * >(argp);
       if(!daIntTyypp)
         {
           std::ostringstream oss; oss << msg << " Instance in null !";
@@ -1815,10 +1873,11 @@ static void convertIntStarOrSliceLikePyObjToCpp(PyObject *value, int nbelem, int
       sw=4;
       return ;
     }
-  status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayIntTuple,0|0);
+  status=SWIG_ConvertPtr(value,&argp,SWIGTITraits< typename ARRAY::Type >::TI_TUPLE,0|0);
   if(SWIG_IsOK(status))
     {
-      MEDCoupling::DataArrayIntTuple *tmp=reinterpret_cast< MEDCoupling::DataArrayIntTuple * >(argp);
+      typedef typename MEDCoupling::Traits< typename ARRAY::Type >::ArrayTuple ARRAYTUPLE;
+      ARRAYTUPLE *tmp=reinterpret_cast< ARRAYTUPLE * >(argp);
       if(!tmp)
         {
           std::ostringstream oss; oss << msg << " Instance in null !";
@@ -1835,12 +1894,13 @@ static void convertIntStarOrSliceLikePyObjToCpp(PyObject *value, int nbelem, int
 /*!
  * Idem than convertIntStarOrSliceLikePyObjToCpp
  */
-static void convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(PyObject *value, int nbelem, int& sw, int& iTyypp, std::vector<int>& stdvecTyypp, std::pair<int, std::pair<int,int> >& p, MEDCoupling::DataArrayInt *& daIntTyypp)
+template<class T, class ARRAY>
+static void convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(PyObject *value, mcIdType nbelem, mcIdType& sw, T& iTyypp, std::vector<T>& stdvecTyypp, std::pair<mcIdType, std::pair<mcIdType,mcIdType> >& p, ARRAY *& daIntTyypp)
 {
   convertIntStarOrSliceLikePyObjToCpp(value,nbelem,sw,iTyypp,stdvecTyypp,p,daIntTyypp);
   if(sw==1)
     {
-      iTyypp=InterpreteNegativeInt(iTyypp,nbelem);
+      iTyypp=(T)InterpreteNegativeInt(iTyypp,nbelem);
     }
 }
 
@@ -1849,26 +1909,27 @@ static void convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(PyObject *value,
  * if python tuple[int] -> cpp vector<int> sw=2
  * if python list[int] -> cpp vector<int> sw=2
  * if python slice -> cpp pair sw=3
- * if python DataArrayIntTuple -> cpp DataArrayIntTuple sw=4 . WARNING The returned pointer can be the null pointer !
+ * if python DataArrayIdTypeTuple -> cpp DataArrayIdTypeTuple sw=4 . WARNING The returned pointer can be the null pointer !
  */
-static void convertObjToPossibleCpp22(PyObject *value, int nbelem, int& sw, int& iTyypp, std::vector<int>& stdvecTyypp, std::pair<int, std::pair<int,int> >& p, MEDCoupling::DataArrayIntTuple *& daIntTyypp)
+template< class TUPLE_T >
+static void convertObjToPossibleCpp22(PyObject *value, mcIdType nbelem, mcIdType& sw, mcIdType& iTyypp, std::vector<mcIdType>& stdvecTyypp, std::pair<mcIdType, std::pair<mcIdType,mcIdType> >& p, typename MEDCoupling::Traits< TUPLE_T >::ArrayTuple *& daIntTyypp)
 {
   sw=-1;
   if(PyInt_Check(value))
     {
-      iTyypp=(int)PyInt_AS_LONG(value);
+      iTyypp=ToIdType(PyInt_AS_LONG(value));
       sw=1;
       return;
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(mcIdType)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "Tuple as been detected but element #" << i << " is not integer ! only tuples of integers accepted !";
@@ -1880,13 +1941,13 @@ static void convertObjToPossibleCpp22(PyObject *value, int nbelem, int& sw, int&
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       stdvecTyypp.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyInt_Check(o))
-            stdvecTyypp[i]=(int)PyInt_AS_LONG(o);
+            stdvecTyypp[i]=(mcIdType)PyInt_AS_LONG(o);
           else
             {
               std::ostringstream oss; oss << "List as been detected but element #" << i << " is not integer ! only lists of integers accepted !";
@@ -1900,17 +1961,17 @@ static void convertObjToPossibleCpp22(PyObject *value, int nbelem, int& sw, int&
     {
       Py_ssize_t strt=2,stp=2,step=2;
       GetIndicesOfSlice(value,nbelem,&strt,&stp,&step,"Slice in subscriptable object DataArray invalid !");
-      p.first=strt;
-      p.second.first=stp;
-      p.second.second=step;
+      p.first=ToIdType(strt);
+      p.second.first=ToIdType(stp);
+      p.second.second=ToIdType(step);
       sw=3;
       return ;
     }
   void *argp;
-  int status=SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayIntTuple,0|0);
+  int status=SWIG_ConvertPtr(value,&argp,SWIGTITraits<TUPLE_T>::TI_TUPLE,0|0);
   if(!SWIG_IsOK(status))
-    throw INTERP_KERNEL::Exception("4 types accepted : integer, tuple of integer, list of integer, slice, DataArrayIntTuple");
-  daIntTyypp=reinterpret_cast< MEDCoupling::DataArrayIntTuple * >(argp);
+    throw INTERP_KERNEL::Exception("4 types accepted : integer, tuple of integer, list of integer, slice, DataArrayIdTypeTuple");
+  daIntTyypp=reinterpret_cast< typename MEDCoupling::Traits< TUPLE_T >::ArrayTuple * >(argp);
   sw=4;
 }
 
@@ -1921,7 +1982,7 @@ static void convertObjToPossibleCpp22(PyObject *value, int nbelem, int& sw, int&
  * if python not null pointer of DataArrayChar -> cpp DataArrayChar sw=4
  * switch between (int,string,vector<string>,DataArrayChar)
  */
-static void convertObjToPossibleCpp6(PyObject *value, int& sw, char& cTyp, std::string& sType, std::vector<std::string>& vsType, MEDCoupling::DataArrayChar *& dacType)
+static void convertObjToPossibleCpp6(PyObject *value, mcIdType& sw, char& cTyp, std::string& sType, std::vector<std::string>& vsType, MEDCoupling::DataArrayChar *& dacType)
 {
   const char *msg="4 types accepted : string, list or tuple of strings having same size, not null DataArrayChar instance.";
   sw=-1;
@@ -1963,9 +2024,9 @@ static void convertObjToPossibleCpp6(PyObject *value, int& sw, char& cTyp, std::
 #endif
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       vsType.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           try
@@ -1983,9 +2044,9 @@ static void convertObjToPossibleCpp6(PyObject *value, int& sw, char& cTyp, std::
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       vsType.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           try
@@ -2022,7 +2083,7 @@ static void convertObjToPossibleCpp6(PyObject *value, int& sw, char& cTyp, std::
  * if value list[int] -> vt sw=2
  * if value tuple[int] -> vt sw=2
  * if value slice -> pt sw=3
- * if value DataArrayInt -> dt sw=4
+ * if value DataArrayIdType -> dt sw=4
  * if value tuple [int,int] -> cpp it,ip sw=5
  * if value tuple [list[int],int] -> cpp vt,ip sw=6
  * if value tuple [tuple[int],int] -> cpp vt,ip sw=6
@@ -2044,11 +2105,12 @@ static void convertObjToPossibleCpp6(PyObject *value, int& sw, char& cTyp, std::
  * if value tuple [slice,slice] -> cpp pt,pc sw=15
  * if value tuple [DaI,slice] -> cpp dt,pc sw=16
  *
- * switch between (int,vector<int>,DataArrayInt)
+ * switch between (int,vector<int>,DataArrayIdType)
  */
-static void convertObjToPossibleCpp3(PyObject *value, int nbTuple, int nbCompo, int& sw, int& it, int& ic, std::vector<int>& vt, std::vector<int>& vc,
-                                     std::pair<int, std::pair<int,int> >& pt, std::pair<int, std::pair<int,int> >& pc,
-                                     MEDCoupling::DataArrayInt *&dt, MEDCoupling::DataArrayInt *&dc)
+template<class TC>
+static void convertObjToPossibleCpp3(PyObject *value, mcIdType nbTuple, int nbCompo, mcIdType& sw, mcIdType& it, TC& ic, std::vector<mcIdType>& vt, std::vector<TC>& vc,
+                                     std::pair<mcIdType, std::pair<mcIdType,mcIdType> >& pt, std::pair<mcIdType, std::pair<mcIdType,mcIdType> >& pc,
+                                     MEDCoupling::DataArrayIdType *&dt, MEDCoupling::DataArrayIdType *&dc)
 {
   if(!PyTuple_Check(value))
     {
@@ -2057,11 +2119,11 @@ static void convertObjToPossibleCpp3(PyObject *value, int nbTuple, int nbCompo,
     }
   else
     {
-      int sz=PyTuple_Size(value);
+      std::size_t sz=PyTuple_Size(value);
       if(sz!=2)
         throw INTERP_KERNEL::Exception("Unexpected nb of slice element : 1 or 2 expected !\n1st is for tuple selection, 2nd for component selection !");
       PyObject *ob0=PyTuple_GetItem(value,0);
-      int sw1,sw2;
+      mcIdType sw1,sw2;
       convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(ob0,nbTuple,sw1,it,vt,pt,dt);
       PyObject *ob1=PyTuple_GetItem(value,1);
       convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(ob1,nbCompo,sw2,ic,vc,pc,dc);
@@ -2077,8 +2139,8 @@ static void convertObjToPossibleCpp3(PyObject *value, int nbTuple, int nbCompo,
  * if value list[int,double] -> cpp std::vector<double> sw=4
  * if value tuple[int,double] -> cpp std::vector<double> sw=4
  */
-static const double *convertObjToPossibleCpp5_Safe(PyObject *value, int& sw, double& val, MEDCoupling::DataArrayDouble *&d, MEDCoupling::DataArrayDoubleTuple *&e, std::vector<double>& f,
-                                                   const char *msg, int nbTuplesExpected, int nbCompExpected, bool throwIfNullPt)
+static const double *convertObjToPossibleCpp5_Safe(PyObject *value, mcIdType& sw, double& val, MEDCoupling::DataArrayDouble *&d, MEDCoupling::DataArrayDoubleTuple *&e, std::vector<double>& f,
+                                                   const char *msg, mcIdType nbTuplesExpected, int nbCompExpected, bool throwIfNullPt)
 {
   sw=-1;
   if(PyFloat_Check(value))
@@ -2107,7 +2169,7 @@ static const double *convertObjToPossibleCpp5_Safe(PyObject *value, int& sw, dou
     {
       try
         {
-          int tmp1=nbTuplesExpected,tmp2=nbCompExpected;
+          mcIdType tmp1=nbTuplesExpected,tmp2=nbCompExpected;
           std::vector<double> ret=fillArrayWithPyListDbl2(value,tmp1,tmp2);
           sw=4;
           f=ret;
@@ -2125,7 +2187,7 @@ static const double *convertObjToPossibleCpp5_Safe(PyObject *value, int& sw, dou
         {
           if(d->getNumberOfTuples()==nbTuplesExpected)
             {
-              if(d->getNumberOfComponents()==nbCompExpected)
+              if(ToIdType(d->getNumberOfComponents())==nbCompExpected)
                 {
                   return d->getConstPointer();
                 }
@@ -2157,7 +2219,7 @@ static const double *convertObjToPossibleCpp5_Safe(PyObject *value, int& sw, dou
     {
       e=reinterpret_cast< MEDCoupling::DataArrayDoubleTuple * >(argp);
       sw=3;
-      if(e->getNumberOfCompo()==nbCompExpected)
+      if(ToIdType(e->getNumberOfCompo())==nbCompExpected)
         {
           if(nbTuplesExpected==1)
             return e->getConstPointer();
@@ -2184,8 +2246,8 @@ static const double *convertObjToPossibleCpp5_Safe(PyObject *value, int& sw, dou
  * if value list[int,double] -> cpp std::vector<double> sw=4
  * if value tuple[int,double] -> cpp std::vector<double> sw=4
  */
-static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, int& sw, double& val, MEDCoupling::DataArrayDouble *&d, MEDCoupling::DataArrayDoubleTuple *&e, std::vector<double>& f,
-                                                    const char *msg, int nbCompExpected, bool throwIfNullPt, int& nbTuples)
+static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, mcIdType& sw, double& val, MEDCoupling::DataArrayDouble *&d, MEDCoupling::DataArrayDoubleTuple *&e, std::vector<double>& f,
+                                                    const char *msg, int nbCompExpected, bool throwIfNullPt, mcIdType& nbTuples)
 {
   sw=-1;
   if(PyFloat_Check(value))
@@ -2214,9 +2276,9 @@ static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, int& sw, do
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       f.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -2235,14 +2297,14 @@ static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, int& sw, do
           std::ostringstream oss; oss << msg << "dimension expected to be a multiple of " << nbCompExpected << " , and your data in input has dimension " << f.size() << " !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      nbTuples=size/nbCompExpected;
+      nbTuples=ToIdType(size/nbCompExpected);
       return &f[0];
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       f.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -2261,7 +2323,7 @@ static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, int& sw, do
           std::ostringstream oss; oss << msg << "dimension expected to be a multiple of " << nbCompExpected << " , and your data in input has dimension " << f.size() << " !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      nbTuples=size/nbCompExpected;
+      nbTuples=ToIdType(size/nbCompExpected);
       return &f[0];
     }
   void *argp;
@@ -2272,7 +2334,7 @@ static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, int& sw, do
       sw=2;
       if(d)
         {
-          if(d->getNumberOfComponents()==nbCompExpected)
+          if(ToIdType(d->getNumberOfComponents())==nbCompExpected)
             {
               nbTuples=d->getNumberOfTuples();
               return d->getConstPointer();
@@ -2301,7 +2363,7 @@ static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, int& sw, do
       sw=3;
       if(e)
         {
-          if(e->getNumberOfCompo()==nbCompExpected)
+          if(ToIdType(e->getNumberOfCompo())==nbCompExpected)
             {
               nbTuples=1;
               return e->getConstPointer();
@@ -2334,8 +2396,8 @@ static const double *convertObjToPossibleCpp5_Safe2(PyObject *value, int& sw, do
  * if value list[int,double] -> cpp std::vector<double> sw=4
  * if value tuple[int,double] -> cpp std::vector<double> sw=4
  */
-static const double *convertObjToPossibleCpp5_SingleCompo(PyObject *value, int& sw, double& val, std::vector<double>& f,
-                                                          const char *msg, bool throwIfNullPt, int& nbTuples)
+static const double *convertObjToPossibleCpp5_SingleCompo(PyObject *value, mcIdType& sw, double& val, std::vector<double>& f,
+                                                          const char *msg, bool throwIfNullPt, mcIdType& nbTuples)
 {
   MEDCoupling::DataArrayDouble *d=0;
   MEDCoupling::DataArrayDoubleTuple *e=0;
@@ -2356,9 +2418,9 @@ static const double *convertObjToPossibleCpp5_SingleCompo(PyObject *value, int&
     }
   if(PyTuple_Check(value))
     {
-      int size=PyTuple_Size(value);
+      std::size_t size=PyTuple_Size(value);
       f.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -2372,14 +2434,14 @@ static const double *convertObjToPossibleCpp5_SingleCompo(PyObject *value, int&
             }
         }
       sw=4;
-      nbTuples=size;
+      nbTuples=ToIdType(size);
       return &f[0];
     }
   if(PyList_Check(value))
     {
-      int size=PyList_Size(value);
+      std::size_t size=PyList_Size(value);
       f.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(value,i);
           if(PyFloat_Check(o))
@@ -2393,7 +2455,7 @@ static const double *convertObjToPossibleCpp5_SingleCompo(PyObject *value, int&
             }
         }
       sw=4;
-      nbTuples=size;
+      nbTuples=ToIdType(size);
       return &f[0];
     }
   void *argp;
@@ -2433,7 +2495,7 @@ static const double *convertObjToPossibleCpp5_SingleCompo(PyObject *value, int&
       sw=3;
       if(e)
         {
-          nbTuples=e->getNumberOfCompo();
+          nbTuples=ToIdType(e->getNumberOfCompo());
           return e->getConstPointer();
         }
       else
@@ -2459,15 +2521,19 @@ static MEDCoupling::DataArray *CheckAndRetrieveDataArrayInstance(PyObject *obj,
       status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayDouble,0|0);
       if(!SWIG_IsOK(status))
         {
-          status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0);
+          status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayInt32,0|0);
           if(!SWIG_IsOK(status))
             {
-              status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayAsciiChar,0|0);
+              status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayInt64,0|0);
               if(!SWIG_IsOK(status))
                 {
-                  status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayByte,0|0);
-                  std::ostringstream oss; oss << msg << " ! Accepted instances are DataArrayDouble, DataArrayInt, DataArrayAsciiChar, DataArrayByte !";
-                  throw INTERP_KERNEL::Exception(oss.str().c_str());
+                  status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayAsciiChar,0|0);
+                  if(!SWIG_IsOK(status))
+                    {
+                      status=SWIG_ConvertPtr(obj,&aBasePtrVS,SWIGTYPE_p_MEDCoupling__DataArrayByte,0|0);
+                      std::ostringstream oss; oss << msg << " ! Accepted instances are DataArrayDouble, DataArrayIdType, DataArrayAsciiChar, DataArrayByte !";
+                      throw INTERP_KERNEL::Exception(oss.str().c_str());
+                    }
                 }
             }
         }
@@ -2505,14 +2571,14 @@ static typename MEDCoupling::Traits<T>::ArrayType *DataArrayT_New(PyObject *elt0
         {
           if(PyInt_Check(nbOfTuples))
             {
-              int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
+              mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(nbOfTuples));
               if(nbOfTuples1<0)
                 throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive set of allocated memory !");
               if(elt2)
                 {
                   if(PyInt_Check(elt2))
                     {//DataArrayDouble.New([1.,3.,4.,5.],2,2)
-                      int nbOfCompo=PyInt_AS_LONG(elt2);
+                      mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(elt2));
                       if(nbOfCompo<0)
                         throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive number of components !");
                       MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > ret(MEDCoupling::Traits<T>::ArrayType::New());
@@ -2526,7 +2592,7 @@ static typename MEDCoupling::Traits<T>::ArrayType *DataArrayT_New(PyObject *elt0
               else
                 {//DataArrayDouble.New([1.,3.,4.],3)
                   MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > ret(MEDCoupling::Traits<T>::ArrayType::New());
-                  int tmpp1(-1);
+                  mcIdType tmpp1(-1);
                   std::vector<double> tmp(fillArrayWithPyListDbl2(elt0,nbOfTuples1,tmpp1));
                   ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
                   return ret.retn();
@@ -2538,7 +2604,7 @@ static typename MEDCoupling::Traits<T>::ArrayType *DataArrayT_New(PyObject *elt0
       else
         {// DataArrayDouble.New([1.,3.,4.])
           MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > ret(MEDCoupling::Traits<T>::ArrayType::New());
-          int tmpp1(-1),tmpp2(-1);
+          mcIdType tmpp1(-1),tmpp2(-1);
           std::vector<double> tmp=fillArrayWithPyListDbl2(elt0,tmpp1,tmpp2);
           ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
           return ret.retn();
@@ -2546,7 +2612,7 @@ static typename MEDCoupling::Traits<T>::ArrayType *DataArrayT_New(PyObject *elt0
     }
   else if(PyInt_Check(elt0))
     {
-      int nbOfTuples1(PyInt_AS_LONG(elt0));
+      mcIdType nbOfTuples1(ToIdType(PyInt_AS_LONG(elt0)));
       if(nbOfTuples1<0)
         throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive set of allocated memory !");
       if(nbOfTuples)
@@ -2555,7 +2621,7 @@ static typename MEDCoupling::Traits<T>::ArrayType *DataArrayT_New(PyObject *elt0
             {
               if(PyInt_Check(nbOfTuples))
                 {//DataArrayDouble.New(5,2)
-                  int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
+                  mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfTuples));
                   if(nbOfCompo<0)
                     throw INTERP_KERNEL::Exception("DataArrayDouble::New : should be a positive number of components !");
                   MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > ret(MEDCoupling::Traits<T>::ArrayType::New());
@@ -2591,16 +2657,18 @@ typename MEDCoupling::Traits<T>::ArrayType *DataArrayT__setitem__internal(typena
 {
   self->checkAllocated();
   const char msg[]="Unexpected situation in DataArrayDouble::__setitem__ !";
-  int nbOfTuples(self->getNumberOfTuples()),nbOfComponents(self->getNumberOfComponents());
-  int sw1,sw2;
+  mcIdType nbOfTuples(self->getNumberOfTuples());
+  int nbOfComponents((int)(self->getNumberOfComponents()));
+  mcIdType sw1,sw2;
   T i1;
   std::vector<T> v1;
   typename MEDCoupling::Traits<T>::ArrayType *d1=0;
   considerPyObjAsATStarLikeObject<T>(value,sw1,i1,v1,d1,ti);
-  int it1,ic1;
-  std::vector<int> vt1,vc1;
-  std::pair<int, std::pair<int,int> > pt1,pc1;
-  MEDCoupling::DataArrayInt *dt1=0,*dc1=0;
+  mcIdType it1,ic1;
+  std::vector<mcIdType> vt1;
+  std::vector<mcIdType> vc1;
+  std::pair<mcIdType, std::pair<mcIdType,mcIdType> > pt1,pc1;
+  MEDCoupling::DataArrayIdType *dt1=0,*dc1=0;
   convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
   MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > tmp;
   switch(sw2)
@@ -2937,12 +3005,15 @@ PyObject *DataArrayT__getitem__internal(const typename MEDCoupling::Traits<T>::A
   const char msg[]="Unexpected situation in DataArrayDouble::__getitem__ !";
   const char msg2[]="DataArrayDouble::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
   self->checkAllocated();
-  int nbOfTuples(self->getNumberOfTuples()),nbOfComponents(self->getNumberOfComponents());
-  int it1,ic1;
-  std::vector<int> vt1,vc1;
-  std::pair<int, std::pair<int,int> > pt1,pc1;
-  MEDCoupling::DataArrayInt *dt1=0,*dc1=0;
-  int sw;
+  mcIdType nbOfTuples(self->getNumberOfTuples());
+  int nbOfComponents((int)(self->getNumberOfComponents()));
+  mcIdType it1;
+  std::size_t ic1;
+  std::vector<mcIdType> vt1;
+  std::vector<std::size_t> vc1;
+  std::pair<mcIdType, std::pair<mcIdType,mcIdType> > pt1,pc1;
+  MEDCoupling::DataArrayIdType *dt1=0,*dc1=0;
+  mcIdType sw;
   convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
   MEDCoupling::MCAuto<typename MEDCoupling::Traits<T>::ArrayType > ret;
   switch(sw)
@@ -2962,19 +3033,19 @@ PyObject *DataArrayT__getitem__internal(const typename MEDCoupling::Traits<T>::A
     case 6:
       {
         ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
-        std::vector<int> v2(1,ic1);
+        std::vector<std::size_t> v2(1,ic1);
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),ti, SWIG_POINTER_OWN | 0 );
       }
     case 7:
       {
         ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
-        std::vector<int> v2(1,ic1);
+        std::vector<std::size_t> v2(1,ic1);
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),ti, SWIG_POINTER_OWN | 0 );
       }
     case 8:
       {
         ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
-        std::vector<int> v2(1,ic1);
+        std::vector<std::size_t> v2(1,ic1);
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),ti, SWIG_POINTER_OWN | 0 );
       }
     case 9:
@@ -3000,17 +3071,17 @@ PyObject *DataArrayT__getitem__internal(const typename MEDCoupling::Traits<T>::A
     case 13:
       {
         ret=self->selectByTupleIdSafe(&it1,&it1+1);
-        int nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
-        std::vector<int> v2(nbOfComp);
-        for(int i=0;i<nbOfComp;i++)
+        mcIdType nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
+        std::vector<std::size_t> v2(nbOfComp);
+        for(mcIdType i=0;i<nbOfComp;i++)
           v2[i]=pc1.first+i*pc1.second.second;
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),ti, SWIG_POINTER_OWN | 0 );
       }
     case 14:
       {
         ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
-        int nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
-        std::vector<int> v2(nbOfComp);
+        mcIdType nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
+        std::vector<std::size_t> v2(nbOfComp);
         for(int i=0;i<nbOfComp;i++)
           v2[i]=pc1.first+i*pc1.second.second;
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),ti, SWIG_POINTER_OWN | 0 );
@@ -3018,8 +3089,8 @@ PyObject *DataArrayT__getitem__internal(const typename MEDCoupling::Traits<T>::A
     case 15:
       {
         ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
-        int nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
-        std::vector<int> v2(nbOfComp);
+        mcIdType nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
+        std::vector<std::size_t> v2(nbOfComp);
         for(int i=0;i<nbOfComp;i++)
           v2[i]=pc1.first+i*pc1.second.second;
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),ti, SWIG_POINTER_OWN | 0 );
@@ -3027,8 +3098,8 @@ PyObject *DataArrayT__getitem__internal(const typename MEDCoupling::Traits<T>::A
     case 16:
       {
         ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
-        int nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
-        std::vector<int> v2(nbOfComp);
+        mcIdType nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2));
+        std::vector<std::size_t> v2(nbOfComp);
         for(int i=0;i<nbOfComp;i++)
           v2[i]=pc1.first+i*pc1.second.second;
         return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),ti, SWIG_POINTER_OWN | 0 );
@@ -3057,7 +3128,7 @@ bool isCSRMatrix(PyObject *m)
 #endif
 }
 
-void convertCSR_MCDataToVectMapIntDouble(const MEDCoupling::DataArrayInt *indptrPtr, const MEDCoupling::DataArrayInt *indicesPtr, const MEDCoupling::DataArrayDouble *dataPtr, std::vector<std::map<int,double> >& mCpp)
+void convertCSR_MCDataToVectMapIntDouble(const MEDCoupling::DataArrayInt32 *indptrPtr, const MEDCoupling::DataArrayInt32 *indicesPtr, const MEDCoupling::DataArrayDouble *dataPtr, std::vector<std::map<mcIdType,double> >& mCpp)
 {
   auto nbOfRows(indptrPtr->getNumberOfTuples()-1);
   if(nbOfRows<0)
@@ -3076,7 +3147,7 @@ void convertCSR_MCDataToVectMapIntDouble(const MEDCoupling::DataArrayInt *indptr
     }
 }
 
-void convertToVectMapIntDouble(PyObject *pyobj, std::vector<std::map<int,double> >& mCpp)
+void convertToVectMapIntDouble(PyObject *pyobj, std::vector<std::map<mcIdType,double> >& mCpp)
 {
   if(!PyList_Check(pyobj))
     throw INTERP_KERNEL::Exception("convertToVectMapIntDouble : input is not a python list !");
@@ -3093,7 +3164,7 @@ void convertToVectMapIntDouble(PyObject *pyobj, std::vector<std::map<int,double>
         }
       PyObject *key, *value;
       Py_ssize_t pos(0);
-      std::map<int,double>& mapCpp(mCpp[i]);
+      std::map<mcIdType,double>& mapCpp(mCpp[i]);
       while(PyDict_Next(elt,&pos,&key,&value))
         {
           if(!PyInt_Check(key))
@@ -3106,7 +3177,7 @@ void convertToVectMapIntDouble(PyObject *pyobj, std::vector<std::map<int,double>
               std::ostringstream oss; oss << "convertToVectMapIntDouble : at pos # " << i << " of pylist the dict contains at pos " << pos << " the value not mappable to pyfloat !";
               throw INTERP_KERNEL::Exception(oss.str());
             }
-          mapCpp[(int)PyInt_AS_LONG(key)]=PyFloat_AS_DOUBLE(value);
+          mapCpp[ToIdType(PyInt_AS_LONG(key))]=PyFloat_AS_DOUBLE(value);
         }
     }
 }
@@ -3119,7 +3190,7 @@ PyObject *DataArrayT_imul__internal(PyObject *trueSelf, PyObject *obj, typename
   typename MEDCoupling::Traits<T>::ArrayType *a;
   typename MEDCoupling::Traits<T>::ArrayTuple *aa;
   std::vector<T> bb;
-  int sw;
+  mcIdType sw;
   convertFPStarLikePyObjToCpp_2<T>(obj,sw,val,a,aa,bb,ti_da,ti_tuple);
   switch(sw)
     {
@@ -3144,7 +3215,7 @@ PyObject *DataArrayT_imul__internal(PyObject *trueSelf, PyObject *obj, typename
       }
     case 4:
       {
-        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,(int)bb.size());
+        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,bb.size());
         self->multiplyEqual(aaa);
         Py_XINCREF(trueSelf);
         return trueSelf;
@@ -3162,7 +3233,7 @@ PyObject *DataArrayT_idiv__internal(PyObject *trueSelf, PyObject *obj, typename
   typename MEDCoupling::Traits<T>::ArrayType *a;
   typename MEDCoupling::Traits<T>::ArrayTuple *aa;
   std::vector<T> bb;
-  int sw;
+  mcIdType sw;
   convertFPStarLikePyObjToCpp_2<T>(obj,sw,val,a,aa,bb,ti_da,ti_tuple);
   switch(sw)
     {
@@ -3170,7 +3241,7 @@ PyObject *DataArrayT_idiv__internal(PyObject *trueSelf, PyObject *obj, typename
       {
         if(val==0.)
           throw INTERP_KERNEL::Exception("DataArrayDouble::__div__ : trying to divide by zero !");
-        self->applyLin(1./val,0.);
+        self->applyLin((T)(1./val),(T)0.);
         Py_XINCREF(trueSelf);
         return trueSelf;
       }
@@ -3189,7 +3260,7 @@ PyObject *DataArrayT_idiv__internal(PyObject *trueSelf, PyObject *obj, typename
       }
     case 4:
       {
-        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,(int)bb.size());
+        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,bb.size());
         self->divideEqual(aaa);
         Py_XINCREF(trueSelf);
         return trueSelf;
@@ -3207,7 +3278,7 @@ PyObject *DataArrayT_iadd__internal(PyObject *trueSelf, PyObject *obj, typename
   typename MEDCoupling::Traits<T>::ArrayType *a;
   typename MEDCoupling::Traits<T>::ArrayTuple *aa;
   std::vector<T> bb;
-  int sw;
+  mcIdType sw;
   convertFPStarLikePyObjToCpp_2<T>(obj,sw,val,a,aa,bb,ti_da,ti_tuple);
   switch(sw)
     {
@@ -3232,7 +3303,7 @@ PyObject *DataArrayT_iadd__internal(PyObject *trueSelf, PyObject *obj, typename
       }
     case 4:
       {
-        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,(int)bb.size());
+        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,bb.size());
         self->addEqual(aaa);
         Py_XINCREF(trueSelf);
         return trueSelf;
@@ -3250,7 +3321,7 @@ PyObject *DataArrayT_isub__internal(PyObject *trueSelf, PyObject *obj, typename
   typename MEDCoupling::Traits<T>::ArrayType *a;
   typename MEDCoupling::Traits<T>::ArrayTuple *aa;
   std::vector<T> bb;
-  int sw;
+  mcIdType sw;
   convertFPStarLikePyObjToCpp_2<T>(obj,sw,val,a,aa,bb,ti_da,ti_tuple);
   switch(sw)
     {
@@ -3275,7 +3346,7 @@ PyObject *DataArrayT_isub__internal(PyObject *trueSelf, PyObject *obj, typename
       }
     case 4:
       {
-        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,(int)bb.size());
+        MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,bb.size());
         self->substractEqual(aaa);
         Py_XINCREF(trueSelf);
         return trueSelf;
@@ -3285,33 +3356,14 @@ PyObject *DataArrayT_isub__internal(PyObject *trueSelf, PyObject *obj, typename
     }
 }
 
-template<class T>
-struct SWIGTITraits
-{ };
-
-template<>
-struct SWIGTITraits<double>
-{ static swig_type_info *TI; static swig_type_info *TI_TUPLE; };
-
-template<>
-struct SWIGTITraits<float>
-{ static swig_type_info *TI; static swig_type_info *TI_TUPLE; };
-
-template<>
-struct SWIGTITraits<int>
-{ static swig_type_info *TI; static swig_type_info *TI_TUPLE; };
-
-swig_type_info *SWIGTITraits<double>::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayDouble is null when called here ! Postpone initialization at inlined initializeMe()
-swig_type_info *SWIGTITraits<float>::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayFloat is null when called here ! Postpone initialization at inlined initializeMe()
-swig_type_info *SWIGTITraits<int>::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayFloat is null when called here ! Postpone initialization at inlined initializeMe()
-swig_type_info *SWIGTITraits<double>::TI_TUPLE=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayDouble is null when called here ! Postpone initialization at inlined initializeMe()
-swig_type_info *SWIGTITraits<float>::TI_TUPLE=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayFloat is null when called here ! Postpone initialization at inlined initializeMe()
-swig_type_info *SWIGTITraits<int>::TI_TUPLE=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayFloat is null when called here ! Postpone initialization at inlined initializeMe()
-
 #ifdef WITH_NUMPY
 PyTypeObject *NPYTraits<double>::NPYFunc=&PyCallBackDataArrayDouble_RefType;
 
 PyTypeObject *NPYTraits<float>::NPYFunc=&PyCallBackDataArrayFloat_RefType;
+
+PyTypeObject *NPYTraits<int>::NPYFunc=&PyCallBackDataArrayInt32_RefType;
+
+PyTypeObject *NPYTraits<long>::NPYFunc=&PyCallBackDataArrayInt64_RefType;
 #endif
 
 template<class T>
@@ -3358,7 +3410,7 @@ typename MEDCoupling::Traits<T>::ArrayType *DataArrayFPT_rmul(typename MEDCoupli
   typename MEDCoupling::Traits<T>::ArrayType *a;
   typename MEDCoupling::Traits<T>::ArrayTuple *aa;
   std::vector<T> bb;
-  int sw;
+  mcIdType sw;
   convertFPStarLikePyObjToCpp_2<T>(obj,sw,val,a,aa,bb,SWIGTITraits<T>::TI,SWIGTITraits<T>::TI_TUPLE);
   switch(sw)
     {
@@ -3375,7 +3427,7 @@ typename MEDCoupling::Traits<T>::ArrayType *DataArrayFPT_rmul(typename MEDCoupli
       }
     case 4:
       {
-        typename MEDCoupling::MCAuto<typename MEDCoupling::Traits<T>::ArrayType> aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,(int)bb.size());
+        typename MEDCoupling::MCAuto<typename MEDCoupling::Traits<T>::ArrayType> aaa(MEDCoupling::Traits<T>::ArrayType::New()); aaa->useArray(&bb[0],false,MEDCoupling::DeallocType::CPP_DEALLOC,1,bb.size());
         return MEDCoupling::Traits<T>::ArrayType::Multiply(self,aaa);
       }
     default:
index 4b973f2573e1a064c0cdee331f1432a3789794d9..c70d046f73a01ba7712048bdfa1910a1f2ea0dee 100644 (file)
@@ -50,7 +50,7 @@ namespace MEDCoupling
     virtual const char *getRepr() const;
     virtual int getNumberOfTuples(const MEDCouplingMesh *mesh) const;
     virtual int getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
-    virtual DataArrayInt *getOffsetArr(const MEDCouplingMesh *mesh) const;
+    virtual DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
     virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
     virtual void checkCompatibilityWithNature(NatureOfField nat) const;
     virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, int cellId, int nodeIdInCell, int compoId) const;
@@ -67,21 +67,21 @@ namespace MEDCoupling
     {
       virtual MEDCouplingFieldDiscretization *clonePart(PyObject *li)
       {
-        int sz=0,sw=-1,val1=-1;
-        std::vector<int> val2;
-        const int *inp=convertIntStarLikePyObjToCppIntStar(li,sw,sz,val1,val2);
+        mcIdType sz=0,sw=-1,val1=-1;
+        std::vector<mcIdType> val2;
+        const mcIdType *inp=convertIntStarLikePyObjToCppIntStar(li,sw,sz,val1,val2);
         return self->clonePart(inp,inp+sz);
       }
       
-      virtual PyObject *buildSubMeshDataRange(const MEDCouplingMesh *mesh, int beginCellIds, int endCellIds, int stepCellIds, int& beginOut, int& endOut, int& stepOut, DataArrayInt *&di) const
+      virtual PyObject *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const
       {
-        DataArrayInt *ret1=0;
-        int bb,ee,ss;
+        DataArrayIdType *ret1=0;
+        mcIdType bb,ee,ss;
         MEDCouplingMesh *ret0=self->buildSubMeshDataRange(mesh,beginCellIds,endCellIds,stepCellIds,bb,ee,ss,ret1);
         PyObject *res=PyTuple_New(2);
         PyTuple_SetItem(res,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
         if(ret1)
-          PyTuple_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
+          PyTuple_SetItem(res,1,SWIG_NewPointerObj((void*)ret1,SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN | 0));
         else
           {
             PyObject *res1=PySlice_New(PyInt_FromLong(bb),PyInt_FromLong(ee),PyInt_FromLong(ss));
@@ -90,27 +90,27 @@ namespace MEDCoupling
         return res;
       }
 
-      virtual int getNumberOfTuplesExpectedRegardingCode(PyObject *code, PyObject *idsPerType) const
+      virtual mcIdType getNumberOfTuplesExpectedRegardingCode(PyObject *code, PyObject *idsPerType) const
       {
-        std::vector<int> inp0;
+        std::vector<mcIdType> inp0;
         convertPyToNewIntArr4(code,1,3,inp0);
-        std::vector<const DataArrayInt *> inp1;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(idsPerType,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",inp1);
+        std::vector<const DataArrayIdType *> inp1;
+        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType *>(idsPerType,SWIGTITraits<mcIdType>::TI,"DataArrayIdType",inp1);
         return self->getNumberOfTuplesExpectedRegardingCode(inp0,inp1);
       }
 
       virtual PyObject *computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, PyObject *tupleIds) const
       {
-        std::vector<int> vVal; int iVal=-1;
-        int sz=-1,sw=0;
-        const int *tupleIdsBg=convertIntStarLikePyObjToCppIntStar(tupleIds,sw,sz,iVal,vVal);
+        std::vector<mcIdType> vVal; mcIdType iVal=-1;
+        mcIdType sz=-1,sw=0;
+        const mcIdType *tupleIdsBg=convertIntStarLikePyObjToCppIntStar(tupleIds,sw,sz,iVal,vVal);
         if(sw==0)
           throw INTERP_KERNEL::Exception("MEDCouplingFieldDiscretization::computeMeshRestrictionFromTupleIds : none parameter in input !");
-        DataArrayInt *ret0=0,*ret1=0;
+        DataArrayIdType *ret0=0,*ret1=0;
         self->computeMeshRestrictionFromTupleIds(mesh,tupleIdsBg,tupleIdsBg+sz,ret0,ret1);
         PyObject *pyRet=PyTuple_New(2);
-        PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return pyRet;
       }
 
@@ -118,7 +118,7 @@ namespace MEDCoupling
       {
         if(!arr)
           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::normL1 : input array is null !");
-        int sz(arr->getNumberOfComponents());
+        std::size_t sz(arr->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->normL1(mesh,arr,tmp);
         return convertDblArrToPyList<double>(tmp,sz);
@@ -128,7 +128,7 @@ namespace MEDCoupling
       {
         if(!arr)
           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::normL2 : input array is null !");
-        int sz(arr->getNumberOfComponents());
+        std::size_t sz(arr->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->normL2(mesh,arr,tmp);
         return convertDblArrToPyList<double>(tmp,sz);
@@ -138,38 +138,38 @@ namespace MEDCoupling
       {
         if(!arr)
           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::integral : input array is null !");
-        int sz(arr->getNumberOfComponents());
+        std::size_t sz(arr->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->integral(mesh,arr,isWAbs,tmp);
         return convertDblArrToPyList<double>(tmp,sz);
       }
 
-      virtual PyObject *getCellIdsHavingGaussLocalization(int locId) const
+      virtual PyObject *getCellIdsHavingGaussLocalization(mcIdType locId) const
       {
-        std::vector<int> tmp;
+        std::vector<mcIdType> tmp;
         self->getCellIdsHavingGaussLocalization(locId,tmp);
-        DataArrayInt *ret=DataArrayInt::New();
-        ret->alloc((int)tmp.size(),1);
+        DataArrayIdType *ret=DataArrayIdType::New();
+        ret->alloc(tmp.size(),1);
         std::copy(tmp.begin(),tmp.end(),ret->getPointer());
-        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
       }
 
       virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, PyObject *li, const std::vector<double>& refCoo,
                                                const std::vector<double>& gsCoo, const std::vector<double>& wg)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            self->setGaussLocalizationOnCells(m,tmp,((int *)tmp)+size,refCoo,gsCoo,wg);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            self->setGaussLocalizationOnCells(m,tmp,((mcIdType *)tmp)+size,refCoo,gsCoo,wg);
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+              throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
             da2->checkAllocated();
             self->setGaussLocalizationOnCells(m,da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),refCoo,gsCoo,wg);
           }
@@ -177,7 +177,7 @@ namespace MEDCoupling
 
       virtual PyObject *getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const
       {
-        std::set<int> ret=self->getGaussLocalizationIdsOfOneType(type);
+        std::set<mcIdType> ret=self->getGaussLocalizationIdsOfOneType(type);
         return convertIntArrToPyList3(ret);
       }
 
@@ -187,7 +187,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         if(!mesh)
           throw INTERP_KERNEL::Exception("Python wrap of MEDCouplingFieldDiscretization::getValueOn : no underlying mesh !");
         int spaceDim=mesh->getSpaceDimension();
@@ -199,22 +199,22 @@ namespace MEDCoupling
         return convertDblArrToPyList<double>(res,spaceDim);
       }
 
-      virtual PyObject *getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k) const
+      virtual PyObject *getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k) const
       {
         if(!arr)
           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretization::getValueOnPos : input array is null !");
-        int sz(arr->getNumberOfComponents());
-         INTERP_KERNEL::AutoPtr<double> res=new double[sz];
-         self->getValueOnPos(arr,mesh,i,j,k,res);
-         return convertDblArrToPyList<double>(res,sz);
-       }
+        std::size_t sz(arr->getNumberOfComponents());
+        INTERP_KERNEL::AutoPtr<double> res=new double[sz];
+        self->getValueOnPos(arr,mesh,i,j,k,res);
+        return convertDblArrToPyList<double>(res,sz);
+      }
       
       virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, PyObject *loc) const
       {
         if(!mesh)
           throw INTERP_KERNEL::Exception("Python wrap MEDCouplingFieldDiscretization::getValueOnMulti : null input mesh !");
         //
-        int sw,nbPts;
+        mcIdType sw,nbPts;
         double v0; MEDCoupling::DataArrayDouble *v1(0); MEDCoupling::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
         const double *inp=convertObjToPossibleCpp5_Safe2(loc,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDouble::getValueOnMulti",
                                                          mesh->getSpaceDimension(),true,nbPts);
@@ -223,9 +223,9 @@ namespace MEDCoupling
 
       virtual void renumberCells(PyObject *li, bool check=true)
       {
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *ids(convertIntStarLikePyObjToCppIntStar(li,sw,sz,v0,v1));
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *ids(convertIntStarLikePyObjToCppIntStar(li,sw,sz,v0,v1));
         self->renumberCells(ids,check);
       }
 
@@ -235,55 +235,55 @@ namespace MEDCoupling
         std::vector<DataArray *> input1;
         convertFromPyObjVectorOfObj<MEDCoupling::DataArray *>(arrays,SWIGTYPE_p_MEDCoupling__DataArray,"DataArray",input1);
         //
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
         //
         self->renumberArraysForCell(mesh,input1,old2NewBg,check);
       }
       
-      virtual DataArrayInt *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, PyObject *cellIds) const
+      virtual DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, PyObject *cellIds) const
       {
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *cellIdsBg(convertIntStarLikePyObjToCppIntStar(cellIds,sw,sz,v0,v1));
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *cellIdsBg(convertIntStarLikePyObjToCppIntStar(cellIds,sw,sz,v0,v1));
         return self->computeTupleIdsToSelectFromCellIds(mesh,cellIdsBg,cellIdsBg+sz);
       }
 
       virtual PyObject *buildSubMeshData(const MEDCouplingMesh *mesh, PyObject *ids)
       {
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *idsBg(convertIntStarLikePyObjToCppIntStar(ids,sw,sz,v0,v1));
-        DataArrayInt *di(0);
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *idsBg(convertIntStarLikePyObjToCppIntStar(ids,sw,sz,v0,v1));
+        DataArrayIdType *di(0);
         MEDCouplingMesh *ret0=self->buildSubMeshData(mesh,idsBg,idsBg+sz,di);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,convertMesh(ret0, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(di),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(di),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
-      virtual void renumberValuesOnNodes(double epsOnVals, PyObject *old2New, int newNbOfNodes, DataArrayDouble *arr) const
+      virtual void renumberValuesOnNodes(double epsOnVals, PyObject *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const
       {
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
         self->renumberValuesOnNodes(epsOnVals,old2NewBg,newNbOfNodes,arr);
       }
 
-      virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, PyObject *old2New, int newSz, DataArrayDouble *arr) const
+      virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, PyObject *old2New, mcIdType newSz, DataArrayDouble *arr) const
       {
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *old2NewBg(convertIntStarLikePyObjToCppIntStar(old2New,sw,sz,v0,v1));
         self->renumberValuesOnCells(epsOnVals,mesh,old2NewBg,newSz,arr);
       }
 
-      virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, PyObject *new2old, int newSz, DataArrayDouble *arr) const
+      virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, PyObject *new2old, mcIdType newSz, DataArrayDouble *arr) const
       {
-        int sw,sz(-1);
-        int v0; std::vector<int> v1;
-        const int *new2oldBg(convertIntStarLikePyObjToCppIntStar(new2old,sw,sz,v0,v1));
+        mcIdType sw,sz(-1);
+        mcIdType v0; std::vector<mcIdType> v1;
+        const mcIdType *new2oldBg(convertIntStarLikePyObjToCppIntStar(new2old,sw,sz,v0,v1));
         self->renumberValuesOnCellsR(mesh,new2oldBg,newSz,arr);
       }
     }
@@ -304,29 +304,29 @@ namespace MEDCoupling
   class MEDCouplingFieldDiscretizationPerCell : public MEDCouplingFieldDiscretization
   {
   public:
-    void setArrayOfDiscIds(const DataArrayInt *adids);
+    void setArrayOfDiscIds(const DataArrayIdType *adids);
     void checkNoOrphanCells() const;
     %extend
     {
       PyObject *getArrayOfDiscIds() const
       {
-        DataArrayInt *ret=const_cast<DataArrayInt *>(self->getArrayOfDiscIds());
+        DataArrayIdType *ret=const_cast<DataArrayIdType *>(self->getArrayOfDiscIds());
         if(ret)
           ret->incrRef();
-        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+        return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
       }
 
       PyObject *splitIntoSingleGaussDicrPerCellType() const
       {
-        std::vector<int> ret1;
-        std::vector<DataArrayInt *> ret0=self->splitIntoSingleGaussDicrPerCellType(ret1);
+        std::vector<mcIdType> ret1;
+        std::vector<DataArrayIdType *> ret0=self->splitIntoSingleGaussDicrPerCellType(ret1);
         std::size_t sz=ret0.size();
         PyObject *pyRet=PyTuple_New(2);
-        PyObject *pyRet0=PyList_New((int)sz);
-        PyObject *pyRet1=PyList_New((int)sz);
+        PyObject *pyRet0=PyList_New((mcIdType)sz);
+        PyObject *pyRet1=PyList_New((mcIdType)sz);
         for(std::size_t i=0;i<sz;i++)
           {
-            PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+            PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
             PyList_SetItem(pyRet1,i,PyInt_FromLong(ret1[i]));
           }
         PyTuple_SetItem(pyRet,0,pyRet0);
@@ -353,21 +353,21 @@ namespace MEDCoupling
       {
         std::size_t sz(0);
         const double *ret(MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometricType(geoType,sz));
-        return convertDblArrToPyList<double>(ret,sz);
+        return convertDblArrToPyList<double>(ret,ToIdType(sz));
       }
       
       static PyObject *GetRefCoordsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType)
       {
         std::size_t sz(0);
         const double *ret(MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricType(geoType,sz));
-        return convertDblArrToPyList<double>(ret,sz);
+        return convertDblArrToPyList<double>(ret,ToIdType(sz));
       }
       
       static PyObject *GetLocsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType)
       {
         std::size_t sz(0);
         const double *ret(MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType(geoType,sz));
-        return convertDblArrToPyList<double>(ret,sz);
+        return convertDblArrToPyList<double>(ret,ToIdType(sz));
       }
     }
   };
@@ -375,12 +375,12 @@ namespace MEDCoupling
   class MEDCouplingFieldDiscretizationKriging : public MEDCouplingFieldDiscretizationOnNodes
   {
   public:
-    static DataArrayDouble *PerformDriftOfVec(const DataArrayDouble *arr, int isDrift);
+    static DataArrayDouble *PerformDriftOfVec(const DataArrayDouble *arr, mcIdType isDrift);
     %extend
     {
       PyObject *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr) const
       {
-        int ret1;
+        mcIdType ret1;
         DataArrayDouble *ret0=self->computeVectorOfCoefficients(mesh,arr,ret1);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
@@ -390,7 +390,7 @@ namespace MEDCoupling
       
       PyObject *computeInverseMatrix(const MEDCouplingMesh *mesh) const
       {
-        int ret1(-1),ret2(-1);
+        mcIdType ret1(-1),ret2(-1);
         DataArrayDouble *ret0=self->computeInverseMatrix(mesh,ret1,ret2);
         PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
@@ -401,7 +401,7 @@ namespace MEDCoupling
 
       PyObject *computeMatrix(const MEDCouplingMesh *mesh) const
       {
-        int ret1(-1),ret2(-1);
+        mcIdType ret1(-1),ret2(-1);
         DataArrayDouble *ret0=self->computeMatrix(mesh,ret1,ret2);
         PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
@@ -414,12 +414,12 @@ namespace MEDCoupling
       {
         if(!mesh)
           throw INTERP_KERNEL::Exception("wrap of MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts : input mesh is empty !");
-        int sw,nbPts;
+        mcIdType sw,nbPts;
         double v0; MEDCoupling::DataArrayDouble *v1(0); MEDCoupling::DataArrayDoubleTuple *v2(0); std::vector<double> v3;
         const double *inp=convertObjToPossibleCpp5_Safe2(locs,sw,v0,v1,v2,v3,"wrap of MEDCouplingFieldDiscretizationKriging::computeEvaluationMatrixOnGivenPts",
                                                          mesh->getSpaceDimension(),true,nbPts);
         //
-        int ret1(-1);
+        mcIdType ret1(-1);
         DataArrayDouble *ret0=self->computeEvaluationMatrixOnGivenPts(mesh,inp,nbPts,ret1);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
@@ -436,7 +436,7 @@ namespace MEDCoupling
 
       PyObject *performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr) const
       {
-        int ret1(-1);
+        mcIdType ret1(-1);
         DataArrayDouble *ret0(self->performDrift(matr,arr,ret1));
         PyObject *res(PyTuple_New(2));
         PyTuple_SetItem(res,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIG_POINTER_OWN | 0));
@@ -446,7 +446,7 @@ namespace MEDCoupling
 
       static PyObject *PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr)
       {
-        int ret1(-1);
+        mcIdType ret1(-1);
         DataArrayDouble *ret0(MEDCouplingFieldDiscretizationKriging::PerformDriftRect(matr,arr,ret1));
         PyObject *res(PyTuple_New(2));
         PyTuple_SetItem(res,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_MEDCoupling__DataArrayDouble,SWIG_POINTER_OWN | 0));
index 1cc2bfab0dfaa0dba9b792038b2376c164f50d90..801152b81ae7b9e8e78a8f6c7feb0dc2c8983c8b 100644 (file)
@@ -33,19 +33,33 @@ DataArrayDouble.__floordiv__=DataArrayDouble.__div__
 DataArrayDouble.__ifloordiv__=MEDCouplingDataArrayDoubleIdiv
 DataArrayDouble.__rfloordiv__=DataArrayDouble.__rdiv__
 
-DataArrayInt.__reduce__=MEDCouplingDataArrayIntReduce
-DataArrayInt.__iadd__=MEDCouplingDataArrayIntIadd
-DataArrayInt.__isub__=MEDCouplingDataArrayIntIsub
-DataArrayInt.__imul__=MEDCouplingDataArrayIntImul
-DataArrayInt.__idiv__=MEDCouplingDataArrayIntIdiv
-DataArrayInt.__imod__=MEDCouplingDataArrayIntImod
-DataArrayInt.__ipow__=MEDCouplingDataArrayIntIpow
-DataArrayInt.__truediv__=DataArrayInt.__div__
-DataArrayInt.__itruediv__=MEDCouplingDataArrayIntIdiv
-DataArrayInt.__rtruediv__=DataArrayInt.__rdiv__
-DataArrayInt.__floordiv__=DataArrayInt.__div__
-DataArrayInt.__ifloordiv__=MEDCouplingDataArrayIntIdiv
-DataArrayInt.__rfloordiv__=DataArrayInt.__rdiv__
+DataArrayInt32.__reduce__=MEDCouplingDataArrayInt32Reduce
+DataArrayInt32.__iadd__=MEDCouplingDataArrayInt32Iadd
+DataArrayInt32.__isub__=MEDCouplingDataArrayInt32Isub
+DataArrayInt32.__imul__=MEDCouplingDataArrayInt32Imul
+DataArrayInt32.__idiv__=MEDCouplingDataArrayInt32Idiv
+DataArrayInt32.__imod__=MEDCouplingDataArrayInt32Imod
+DataArrayInt32.__ipow__=MEDCouplingDataArrayInt32Ipow
+DataArrayInt32.__truediv__=DataArrayInt32.__div__
+DataArrayInt32.__itruediv__=MEDCouplingDataArrayInt32Idiv
+DataArrayInt32.__rtruediv__=DataArrayInt32.__rdiv__
+DataArrayInt32.__floordiv__=DataArrayInt32.__div__
+DataArrayInt32.__ifloordiv__=MEDCouplingDataArrayInt32Idiv
+DataArrayInt32.__rfloordiv__=DataArrayInt32.__rdiv__
+
+DataArrayInt64.__reduce__=MEDCouplingDataArrayInt64Reduce
+DataArrayInt64.__iadd__=MEDCouplingDataArrayInt64Iadd
+DataArrayInt64.__isub__=MEDCouplingDataArrayInt64Isub
+DataArrayInt64.__imul__=MEDCouplingDataArrayInt64Imul
+DataArrayInt64.__idiv__=MEDCouplingDataArrayInt64Idiv
+DataArrayInt64.__imod__=MEDCouplingDataArrayInt64Imod
+DataArrayInt64.__ipow__=MEDCouplingDataArrayInt64Ipow
+DataArrayInt64.__truediv__=DataArrayInt64.__div__
+DataArrayInt64.__itruediv__=MEDCouplingDataArrayInt64Idiv
+DataArrayInt64.__rtruediv__=DataArrayInt64.__rdiv__
+DataArrayInt64.__floordiv__=DataArrayInt64.__div__
+DataArrayInt64.__ifloordiv__=MEDCouplingDataArrayInt64Idiv
+DataArrayInt64.__rfloordiv__=DataArrayInt64.__rdiv__
 
 DataArrayByte.__reduce__=MEDCouplingDataArrayByteReduce
   
@@ -83,13 +97,21 @@ DataArrayDoubleTuple.__idiv__=MEDCouplingDataArrayDoubleTupleIdiv
 DataArrayDoubleTuple.__itruediv__=MEDCouplingDataArrayDoubleTupleIdiv
 DataArrayDoubleTuple.__ifloordiv__=MEDCouplingDataArrayDoubleTupleIdiv
 
-DataArrayIntTuple.__iadd__=MEDCouplingDataArrayIntTupleIadd
-DataArrayIntTuple.__isub__=MEDCouplingDataArrayIntTupleIsub
-DataArrayIntTuple.__imul__=MEDCouplingDataArrayIntTupleImul
-DataArrayIntTuple.__idiv__=MEDCouplingDataArrayIntTupleIdiv
-DataArrayIntTuple.__itruediv__=MEDCouplingDataArrayIntTupleIdiv
-DataArrayIntTuple.__ifloordiv__=MEDCouplingDataArrayIntTupleIdiv
-DataArrayIntTuple.__imod__=MEDCouplingDataArrayIntTupleImod
+DataArrayInt32Tuple.__iadd__=MEDCouplingDataArrayInt32TupleIadd
+DataArrayInt32Tuple.__isub__=MEDCouplingDataArrayInt32TupleIsub
+DataArrayInt32Tuple.__imul__=MEDCouplingDataArrayInt32TupleImul
+DataArrayInt32Tuple.__idiv__=MEDCouplingDataArrayInt32TupleIdiv
+DataArrayInt32Tuple.__itruediv__=MEDCouplingDataArrayInt32TupleIdiv
+DataArrayInt32Tuple.__ifloordiv__=MEDCouplingDataArrayInt32TupleIdiv
+DataArrayInt32Tuple.__imod__=MEDCouplingDataArrayInt32TupleImod
+
+DataArrayInt64Tuple.__iadd__=MEDCouplingDataArrayInt64TupleIadd
+DataArrayInt64Tuple.__isub__=MEDCouplingDataArrayInt64TupleIsub
+DataArrayInt64Tuple.__imul__=MEDCouplingDataArrayInt64TupleImul
+DataArrayInt64Tuple.__idiv__=MEDCouplingDataArrayInt64TupleIdiv
+DataArrayInt64Tuple.__itruediv__=MEDCouplingDataArrayInt64TupleIdiv
+DataArrayInt64Tuple.__ifloordiv__=MEDCouplingDataArrayInt64TupleIdiv
+DataArrayInt64Tuple.__imod__=MEDCouplingDataArrayInt64TupleImod
 
 DenseMatrix.__iadd__=MEDCouplingDenseMatrixIadd
 DenseMatrix.__isub__=MEDCouplingDenseMatrixIsub
@@ -103,54 +125,69 @@ MEDCouplingIMesh.__reduce__=MEDCouplingIMeshReduce
 MEDCouplingMappedExtrudedMesh.__reduce__=MEDCouplingMappedExtrudedMeshReduce
 
 DataArrayAsciiCharIterator.__next__ = DataArrayAsciiCharIterator.next
-DataArrayIntIterator.__next__ = DataArrayIntIterator.next
+DataArrayInt32Iterator.__next__ = DataArrayInt32Iterator.next
+DataArrayInt64Iterator.__next__ = DataArrayInt64Iterator.next
 DataArrayDoubleIterator.__next__ = DataArrayDoubleIterator.next
 MEDCouplingUMeshCellIterator.__next__ = MEDCouplingUMeshCellIterator.next
 MEDCouplingUMeshCellByTypeIterator.__next__ = MEDCouplingUMeshCellByTypeIterator.next
 
+
 del INTERPKERNELExceptionReduce
-del MEDCouplingDataArrayDoubleReduce
-del MEDCouplingDataArrayFloatReduce
-del MEDCouplingDataArrayIntReduce
-del MEDCouplingDataArrayByteReduce
-del MEDCouplingUMeshReduce
+del MEDCoupling1SGTUMeshReduce
 del MEDCouplingCMeshReduce
-del MEDCouplingIMeshReduce
-del MEDCouplingMappedExtrudedMeshReduce
 del MEDCouplingCurveLinearMeshReduce
-del MEDCoupling1SGTUMeshReduce
-del MEDCoupling1DGTUMeshReduce
-del MEDCouplingFieldDoubleReduce
-del MEDCouplingFieldFloatReduce
-del MEDCouplingFieldIntReduce
-del MEDCouplingFieldTemplateReduce
+del MEDCouplingDataArrayByteReduce
 del MEDCouplingDataArrayDoubleIadd
-del MEDCouplingDataArrayDoubleIsub
-del MEDCouplingDataArrayDoubleImul
 del MEDCouplingDataArrayDoubleIdiv
-del MEDCouplingFieldDoubleIadd
-del MEDCouplingFieldDoubleIsub
-del MEDCouplingFieldDoubleImul
-del MEDCouplingFieldDoubleIdiv
-del MEDCouplingFieldDoubleIpow
-del MEDCouplingDataArrayIntIadd
-del MEDCouplingDataArrayIntIsub
-del MEDCouplingDataArrayIntImul
-del MEDCouplingDataArrayIntIdiv
-del MEDCouplingDataArrayIntImod
-del MEDCouplingDataArrayFloatIadd
-del MEDCouplingDataArrayFloatIsub
-del MEDCouplingDataArrayFloatImul
-del MEDCouplingDataArrayFloatIdiv
+del MEDCouplingDataArrayDoubleImul
+del MEDCouplingDataArrayDoubleIpow
+del MEDCouplingDataArrayDoubleIsub
+del MEDCouplingDataArrayDoubleReduce
 del MEDCouplingDataArrayDoubleTupleIadd
-del MEDCouplingDataArrayDoubleTupleIsub
-del MEDCouplingDataArrayDoubleTupleImul
 del MEDCouplingDataArrayDoubleTupleIdiv
-del MEDCouplingDataArrayIntTupleIadd
-del MEDCouplingDataArrayIntTupleIsub
-del MEDCouplingDataArrayIntTupleImul
-del MEDCouplingDataArrayIntTupleIdiv
-del MEDCouplingDataArrayIntTupleImod
+del MEDCouplingDataArrayDoubleTupleImul
+del MEDCouplingDataArrayDoubleTupleIsub
+del MEDCouplingDataArrayFloatIadd
+del MEDCouplingDataArrayFloatIdiv
+del MEDCouplingDataArrayFloatImul
+del MEDCouplingDataArrayFloatIsub
+del MEDCouplingDataArrayFloatReduce
+del MEDCouplingDataArrayInt32Iadd
+del MEDCouplingDataArrayInt32Idiv
+del MEDCouplingDataArrayInt32Imod
+del MEDCouplingDataArrayInt32Imul
+del MEDCouplingDataArrayInt32Ipow
+del MEDCouplingDataArrayInt32Isub
+del MEDCouplingDataArrayInt32Reduce
+del MEDCouplingDataArrayInt32TupleIadd
+del MEDCouplingDataArrayInt32TupleIdiv
+del MEDCouplingDataArrayInt32TupleImod
+del MEDCouplingDataArrayInt32TupleImul
+del MEDCouplingDataArrayInt32TupleIsub
+del MEDCouplingDataArrayInt64Iadd
+del MEDCouplingDataArrayInt64Idiv
+del MEDCouplingDataArrayInt64Imod
+del MEDCouplingDataArrayInt64Imul
+del MEDCouplingDataArrayInt64Ipow
+del MEDCouplingDataArrayInt64Isub
+del MEDCouplingDataArrayInt64Reduce
+del MEDCouplingDataArrayInt64TupleIadd
+del MEDCouplingDataArrayInt64TupleIdiv
+del MEDCouplingDataArrayInt64TupleImod
+del MEDCouplingDataArrayInt64TupleImul
+del MEDCouplingDataArrayInt64TupleIsub
 del MEDCouplingDenseMatrixIadd
 del MEDCouplingDenseMatrixIsub
+del MEDCouplingFieldDoubleIadd
+del MEDCouplingFieldDoubleIdiv
+del MEDCouplingFieldDoubleImul
+del MEDCouplingFieldDoubleIpow
+del MEDCouplingFieldDoubleIsub
+del MEDCouplingFieldDoubleReduce
+del MEDCouplingFieldFloatReduce
+del MEDCouplingFieldIntReduce 
+del MEDCouplingFieldTemplateReduce
+del MEDCouplingIMeshReduce
+del MEDCouplingMappedExtrudedMeshReduce
+del MEDCouplingUMeshReduce
 %}
index f096deb753ac510b575389a506084d5408b3f98e..4c988d334bcfea69ae7b5e4e0fbdb6c6604824f1 100644 (file)
   $result=convertDataArrayChar($1,$owner);
 }
 
-%typemap(out) MCAuto<MEDCoupling::DataArrayInt>
+%typemap(out) MCAuto<MEDCoupling::DataArrayInt32>
 {
-  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN|0);
+  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt32,SWIG_POINTER_OWN|0);
+}
+
+%typemap(out) MCAuto<MEDCoupling::DataArrayInt64>
+{
+  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt64,SWIG_POINTER_OWN|0);
+}
+
+%typemap(out) MCAuto<MEDCoupling::DataArrayIdType>
+{
+  $result=SWIG_NewPointerObj(SWIG_as_voidptr($1.retn()),SWIGTITraits<mcIdType>::TI,SWIG_POINTER_OWN|0);
 }
 
 %typemap(out) MCAuto<MEDCoupling::DataArrayDouble>
 %newobject MEDCoupling::DataArrayFloat::__iter__;
 %newobject MEDCoupling::DataArrayFloat::Meld;
 %newobject MEDCoupling::DataArrayFloat::__rmul__;
-%newobject MEDCoupling::DataArrayInt::New;
-%newobject MEDCoupling::DataArrayInt::__iter__;
-%newobject MEDCoupling::DataArrayInt::performCopyOrIncrRef;
-%newobject MEDCoupling::DataArrayInt::subArray;
-%newobject MEDCoupling::DataArrayInt::changeNbOfComponents;
-%newobject MEDCoupling::DataArrayInt::accumulatePerChunck;
-%newobject MEDCoupling::DataArrayInt::checkAndPreparePermutation;
-%newobject MEDCoupling::DataArrayInt::transformWithIndArrR;
-%newobject MEDCoupling::DataArrayInt::renumber;
-%newobject MEDCoupling::DataArrayInt::renumberR;
-%newobject MEDCoupling::DataArrayInt::renumberAndReduce;
-%newobject MEDCoupling::DataArrayInt::invertArrayO2N2N2O;
-%newobject MEDCoupling::DataArrayInt::invertArrayN2O2O2N;
-%newobject MEDCoupling::DataArrayInt::invertArrayO2N2N2OBis;
-%newobject MEDCoupling::DataArrayInt::findIdsEqual;
-%newobject MEDCoupling::DataArrayInt::findIdsNotEqual;
-%newobject MEDCoupling::DataArrayInt::findIdsEqualList;
-%newobject MEDCoupling::DataArrayInt::findIdsNotEqualList;
-%newobject MEDCoupling::DataArrayInt::findIdsEqualTuple;
-%newobject MEDCoupling::DataArrayInt::findIdForEach;
-%newobject MEDCoupling::DataArrayInt::sumPerTuple;
-%newobject MEDCoupling::DataArrayInt::negate;
-%newobject MEDCoupling::DataArrayInt::computeAbs;
-%newobject MEDCoupling::DataArrayInt::findIdsInRange;
-%newobject MEDCoupling::DataArrayInt::findIdsNotInRange;
-%newobject MEDCoupling::DataArrayInt::findIdsStrictlyNegative;
-%newobject MEDCoupling::DataArrayInt::Aggregate;
-%newobject MEDCoupling::DataArrayInt::AggregateIndexes;
-%newobject MEDCoupling::DataArrayInt::Meld;
-%newobject MEDCoupling::DataArrayInt::Add;
-%newobject MEDCoupling::DataArrayInt::Substract;
-%newobject MEDCoupling::DataArrayInt::Multiply;
-%newobject MEDCoupling::DataArrayInt::Divide;
-%newobject MEDCoupling::DataArrayInt::Pow;
-%newobject MEDCoupling::DataArrayInt::BuildUnion;
-%newobject MEDCoupling::DataArrayInt::BuildIntersection;
-%newobject MEDCoupling::DataArrayInt::Range;
-%newobject MEDCoupling::DataArrayInt::indicesOfSubPart;
-%newobject MEDCoupling::DataArrayInt::fromNoInterlace;
-%newobject MEDCoupling::DataArrayInt::toNoInterlace;
-%newobject MEDCoupling::DataArrayInt::buildComplement;
-%newobject MEDCoupling::DataArrayInt::buildUnion;
-%newobject MEDCoupling::DataArrayInt::buildSubstraction;
-%newobject MEDCoupling::DataArrayInt::buildSubstractionOptimized;
-%newobject MEDCoupling::DataArrayInt::buildIntersection;
-%newobject MEDCoupling::DataArrayInt::buildUnique;
-%newobject MEDCoupling::DataArrayInt::buildUniqueNotSorted;
-%newobject MEDCoupling::DataArrayInt::deltaShiftIndex;
-%newobject MEDCoupling::DataArrayInt::buildExplicitArrByRanges;
-%newobject MEDCoupling::DataArrayInt::buildExplicitArrOfSliceOnScaledArr;
-%newobject MEDCoupling::DataArrayInt::findRangeIdForEachTuple;
-%newobject MEDCoupling::DataArrayInt::findIdInRangeForEachTuple;
-%newobject MEDCoupling::DataArrayInt::duplicateEachTupleNTimes;
-%newobject MEDCoupling::DataArrayInt::buildPermutationArr;
-%newobject MEDCoupling::DataArrayInt::buildPermArrPerLevel;
-%newobject MEDCoupling::DataArrayInt::getDifferentValues;
-%newobject MEDCoupling::DataArrayInt::FindPermutationFromFirstToSecond;
-%newobject MEDCoupling::DataArrayInt::CheckAndPreparePermutation;
-%newobject MEDCoupling::DataArrayInt::__neg__;
-%newobject MEDCoupling::DataArrayInt::__add__;
-%newobject MEDCoupling::DataArrayInt::__radd__;
-%newobject MEDCoupling::DataArrayInt::__sub__;
-%newobject MEDCoupling::DataArrayInt::__rsub__;
-%newobject MEDCoupling::DataArrayInt::__mul__;
-%newobject MEDCoupling::DataArrayInt::__rmul__;
-%newobject MEDCoupling::DataArrayInt::__div__;
-%newobject MEDCoupling::DataArrayInt::__rdiv__;
-%newobject MEDCoupling::DataArrayInt::__mod__;
-%newobject MEDCoupling::DataArrayInt::__rmod__;
-%newobject MEDCoupling::DataArrayInt::__pow__;
-%newobject MEDCoupling::DataArrayInt::__rpow__;
-%newobject MEDCoupling::DataArrayIntTuple::buildDAInt;
+%newobject MEDCoupling::DataArrayInt32::New;
+%newobject MEDCoupling::DataArrayInt32::__iter__;
+%newobject MEDCoupling::DataArrayInt32::performCopyOrIncrRef;
+%newobject MEDCoupling::DataArrayInt32::subArray;
+%newobject MEDCoupling::DataArrayInt32::changeNbOfComponents;
+%newobject MEDCoupling::DataArrayInt32::accumulatePerChunck;
+%newobject MEDCoupling::DataArrayInt32::checkAndPreparePermutation;
+%newobject MEDCoupling::DataArrayInt32::transformWithIndArrR;
+%newobject MEDCoupling::DataArrayInt32::renumber;
+%newobject MEDCoupling::DataArrayInt32::renumberR;
+%newobject MEDCoupling::DataArrayInt32::renumberAndReduce;
+%newobject MEDCoupling::DataArrayInt32::invertArrayO2N2N2O;
+%newobject MEDCoupling::DataArrayInt32::invertArrayN2O2O2N;
+%newobject MEDCoupling::DataArrayInt32::invertArrayO2N2N2OBis;
+%newobject MEDCoupling::DataArrayInt32::findIdsEqual;
+%newobject MEDCoupling::DataArrayInt32::findIdsNotEqual;
+%newobject MEDCoupling::DataArrayInt32::findIdsEqualList;
+%newobject MEDCoupling::DataArrayInt32::findIdsNotEqualList;
+%newobject MEDCoupling::DataArrayInt32::findIdsEqualTuple;
+%newobject MEDCoupling::DataArrayInt32::findIdForEach;
+%newobject MEDCoupling::DataArrayInt32::sumPerTuple;
+%newobject MEDCoupling::DataArrayInt32::negate;
+%newobject MEDCoupling::DataArrayInt32::computeAbs;
+%newobject MEDCoupling::DataArrayInt32::findIdsInRange;
+%newobject MEDCoupling::DataArrayInt32::findIdsNotInRange;
+%newobject MEDCoupling::DataArrayInt32::findIdsStrictlyNegative;
+%newobject MEDCoupling::DataArrayInt32::Aggregate;
+%newobject MEDCoupling::DataArrayInt32::AggregateIndexes;
+%newobject MEDCoupling::DataArrayInt32::Meld;
+%newobject MEDCoupling::DataArrayInt32::Add;
+%newobject MEDCoupling::DataArrayInt32::Substract;
+%newobject MEDCoupling::DataArrayInt32::Multiply;
+%newobject MEDCoupling::DataArrayInt32::Divide;
+%newobject MEDCoupling::DataArrayInt32::Pow;
+%newobject MEDCoupling::DataArrayInt32::BuildUnion;
+%newobject MEDCoupling::DataArrayInt32::BuildIntersection;
+%newobject MEDCoupling::DataArrayInt32::Range;
+%newobject MEDCoupling::DataArrayInt32::indicesOfSubPart;
+%newobject MEDCoupling::DataArrayInt32::fromNoInterlace;
+%newobject MEDCoupling::DataArrayInt32::toNoInterlace;
+%newobject MEDCoupling::DataArrayInt32::buildComplement;
+%newobject MEDCoupling::DataArrayInt32::buildUnion;
+%newobject MEDCoupling::DataArrayInt32::buildSubstraction;
+%newobject MEDCoupling::DataArrayInt32::buildSubstractionOptimized;
+%newobject MEDCoupling::DataArrayInt32::buildIntersection;
+%newobject MEDCoupling::DataArrayInt32::buildUnique;
+%newobject MEDCoupling::DataArrayInt32::buildUniqueNotSorted;
+%newobject MEDCoupling::DataArrayInt32::deltaShiftIndex;
+%newobject MEDCoupling::DataArrayInt32::buildExplicitArrByRanges;
+%newobject MEDCoupling::DataArrayInt32::buildExplicitArrOfSliceOnScaledArr;
+%newobject MEDCoupling::DataArrayInt32::findRangeIdForEachTuple;
+%newobject MEDCoupling::DataArrayInt32::findIdInRangeForEachTuple;
+%newobject MEDCoupling::DataArrayInt32::duplicateEachTupleNTimes;
+%newobject MEDCoupling::DataArrayInt32::buildPermutationArr;
+%newobject MEDCoupling::DataArrayInt32::buildPermArrPerLevel;
+%newobject MEDCoupling::DataArrayInt32::getDifferentValues;
+%newobject MEDCoupling::DataArrayInt32::FindPermutationFromFirstToSecond;
+%newobject MEDCoupling::DataArrayInt32::CheckAndPreparePermutation;
+%newobject MEDCoupling::DataArrayInt32::__neg__;
+%newobject MEDCoupling::DataArrayInt32::__add__;
+%newobject MEDCoupling::DataArrayInt32::__radd__;
+%newobject MEDCoupling::DataArrayInt32::__sub__;
+%newobject MEDCoupling::DataArrayInt32::__rsub__;
+%newobject MEDCoupling::DataArrayInt32::__mul__;
+%newobject MEDCoupling::DataArrayInt32::__rmul__;
+%newobject MEDCoupling::DataArrayInt32::__div__;
+%newobject MEDCoupling::DataArrayInt32::__rdiv__;
+%newobject MEDCoupling::DataArrayInt32::__mod__;
+%newobject MEDCoupling::DataArrayInt32::__rmod__;
+%newobject MEDCoupling::DataArrayInt32::__pow__;
+%newobject MEDCoupling::DataArrayInt32::__rpow__;
+%newobject MEDCoupling::DataArrayInt32Tuple::buildDAInt;
+%newobject MEDCoupling::DataArrayInt64::New;
+%newobject MEDCoupling::DataArrayInt64::__iter__;
+%newobject MEDCoupling::DataArrayInt64::performCopyOrIncrRef;
+%newobject MEDCoupling::DataArrayInt64::subArray;
+%newobject MEDCoupling::DataArrayInt64::changeNbOfComponents;
+%newobject MEDCoupling::DataArrayInt64::accumulatePerChunck;
+%newobject MEDCoupling::DataArrayInt64::checkAndPreparePermutation;
+%newobject MEDCoupling::DataArrayInt64::transformWithIndArrR;
+%newobject MEDCoupling::DataArrayInt64::renumber;
+%newobject MEDCoupling::DataArrayInt64::renumberR;
+%newobject MEDCoupling::DataArrayInt64::renumberAndReduce;
+%newobject MEDCoupling::DataArrayInt64::invertArrayO2N2N2O;
+%newobject MEDCoupling::DataArrayInt64::invertArrayN2O2O2N;
+%newobject MEDCoupling::DataArrayInt64::invertArrayO2N2N2OBis;
+%newobject MEDCoupling::DataArrayInt64::findIdsEqual;
+%newobject MEDCoupling::DataArrayInt64::findIdsNotEqual;
+%newobject MEDCoupling::DataArrayInt64::findIdsEqualList;
+%newobject MEDCoupling::DataArrayInt64::findIdsNotEqualList;
+%newobject MEDCoupling::DataArrayInt64::findIdsEqualTuple;
+%newobject MEDCoupling::DataArrayInt64::findIdForEach;
+%newobject MEDCoupling::DataArrayInt64::sumPerTuple;
+%newobject MEDCoupling::DataArrayInt64::negate;
+%newobject MEDCoupling::DataArrayInt64::computeAbs;
+%newobject MEDCoupling::DataArrayInt64::findIdsInRange;
+%newobject MEDCoupling::DataArrayInt64::findIdsNotInRange;
+%newobject MEDCoupling::DataArrayInt64::findIdsStrictlyNegative;
+%newobject MEDCoupling::DataArrayInt64::Aggregate;
+%newobject MEDCoupling::DataArrayInt64::AggregateIndexes;
+%newobject MEDCoupling::DataArrayInt64::Meld;
+%newobject MEDCoupling::DataArrayInt64::Add;
+%newobject MEDCoupling::DataArrayInt64::Substract;
+%newobject MEDCoupling::DataArrayInt64::Multiply;
+%newobject MEDCoupling::DataArrayInt64::Divide;
+%newobject MEDCoupling::DataArrayInt64::Pow;
+%newobject MEDCoupling::DataArrayInt64::BuildUnion;
+%newobject MEDCoupling::DataArrayInt64::BuildIntersection;
+%newobject MEDCoupling::DataArrayInt64::Range;
+%newobject MEDCoupling::DataArrayInt64::indicesOfSubPart;
+%newobject MEDCoupling::DataArrayInt64::fromNoInterlace;
+%newobject MEDCoupling::DataArrayInt64::toNoInterlace;
+%newobject MEDCoupling::DataArrayInt64::buildComplement;
+%newobject MEDCoupling::DataArrayInt64::buildUnion;
+%newobject MEDCoupling::DataArrayInt64::buildSubstraction;
+%newobject MEDCoupling::DataArrayInt64::buildSubstractionOptimized;
+%newobject MEDCoupling::DataArrayInt64::buildIntersection;
+%newobject MEDCoupling::DataArrayInt64::buildUnique;
+%newobject MEDCoupling::DataArrayInt64::buildUniqueNotSorted;
+%newobject MEDCoupling::DataArrayInt64::deltaShiftIndex;
+%newobject MEDCoupling::DataArrayInt64::buildExplicitArrByRanges;
+%newobject MEDCoupling::DataArrayInt64::buildExplicitArrOfSliceOnScaledArr;
+%newobject MEDCoupling::DataArrayInt64::findRangeIdForEachTuple;
+%newobject MEDCoupling::DataArrayInt64::findIdInRangeForEachTuple;
+%newobject MEDCoupling::DataArrayInt64::duplicateEachTupleNTimes;
+%newobject MEDCoupling::DataArrayInt64::buildPermutationArr;
+%newobject MEDCoupling::DataArrayInt64::buildPermArrPerLevel;
+%newobject MEDCoupling::DataArrayInt64::getDifferentValues;
+%newobject MEDCoupling::DataArrayInt64::FindPermutationFromFirstToSecond;
+%newobject MEDCoupling::DataArrayInt64::CheckAndPreparePermutation;
+%newobject MEDCoupling::DataArrayInt64::__neg__;
+%newobject MEDCoupling::DataArrayInt64::__add__;
+%newobject MEDCoupling::DataArrayInt64::__radd__;
+%newobject MEDCoupling::DataArrayInt64::__sub__;
+%newobject MEDCoupling::DataArrayInt64::__rsub__;
+%newobject MEDCoupling::DataArrayInt64::__mul__;
+%newobject MEDCoupling::DataArrayInt64::__rmul__;
+%newobject MEDCoupling::DataArrayInt64::__div__;
+%newobject MEDCoupling::DataArrayInt64::__rdiv__;
+%newobject MEDCoupling::DataArrayInt64::__mod__;
+%newobject MEDCoupling::DataArrayInt64::__rmod__;
+%newobject MEDCoupling::DataArrayInt64::__pow__;
+%newobject MEDCoupling::DataArrayInt64::__rpow__;
+%newobject MEDCoupling::DataArrayInt64Tuple::buildDAInt;
 %newobject MEDCoupling::DataArrayChar::convertToIntArr;
 %newobject MEDCoupling::DataArrayChar::renumber;
 %newobject MEDCoupling::DataArrayChar::renumberR;
 
 %feature("unref") DataArray "$this->decrRef();"
 %feature("unref") DataArrayDouble "$this->decrRef();"
-%feature("unref") DataArrayInt "$this->decrRef();"
+%feature("unref") DataArrayInt32 "$this->decrRef();"
+%feature("unref") DataArrayInt64 "$this->decrRef();"
 %feature("unref") DataArrayChar "$this->decrRef();"
 %feature("unref") DataArrayAsciiChar "$this->decrRef();"
 %feature("unref") DataArrayByte "$this->decrRef();"
@@ -257,7 +340,16 @@ namespace MEDCoupling
       AX_SPHER = 5
     } MEDCouplingAxisType;
 
-  class DataArrayInt;
+  class DataArrayInt32;
+  class DataArrayInt64;
+
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+typedef DataArrayInt32 DataArrayIdType;
+#define DataArrayIdType DataArrayInt32
+#else
+typedef DataArrayInt64 DataArrayIdType;
+#define DataArrayIdType DataArrayInt64
+#endif
 
   class MapII : public RefCountObject, public TimeLabel
   {
@@ -269,8 +361,8 @@ namespace MEDCoupling
   {
   public:
     static PartDefinition *New(int start, int stop, int step);
-    static PartDefinition *New(DataArrayInt *listOfIds);
-    virtual DataArrayInt *toDAI() const;
+    static PartDefinition *New(DataArrayIdType *listOfIds);
+    virtual DataArrayIdType *toDAI() const;
     virtual int getNumberOfElems() const;
     virtual std::string getRepr() const;
     virtual PartDefinition *composeWith(const PartDefinition *other) const;
@@ -307,10 +399,10 @@ namespace MEDCoupling
   class DataArrayPartDefinition : public PartDefinition
   {
   public:
-    static DataArrayPartDefinition *New(DataArrayInt *listOfIds);
+    static DataArrayPartDefinition *New(DataArrayIdType *listOfIds);
     %extend
     {
-      DataArrayPartDefinition(DataArrayInt *listOfIds)
+      DataArrayPartDefinition(DataArrayIdType *listOfIds)
       {
         return DataArrayPartDefinition::New(listOfIds);
       }
@@ -338,14 +430,14 @@ namespace MEDCoupling
     int getEffectiveStop() const;
     %extend
     {
-      SlicePartDefinition(int start, int stop, int step)
+      SlicePartDefinition(mcIdType start, mcIdType stop, mcIdType step)
       {
         return SlicePartDefinition::New(start,stop,step);
       }
 
       PyObject *getSlice() const
       {
-        int a,b,c;
+        mcIdType a,b,c;
         self->getSlice(a,b,c);
         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(c));
       }
@@ -371,8 +463,8 @@ namespace MEDCoupling
   public:
     void setName(const std::string& name);
     void copyStringInfoFrom(const DataArray& other);
-    void copyPartOfStringInfoFrom(const DataArray& other, const std::vector<int>& compoIds);
-    void copyPartOfStringInfoFrom2(const std::vector<int>& compoIds, const DataArray& other);
+    void copyPartOfStringInfoFrom(const DataArray& other, const std::vector<std::size_t>& compoIds);
+    void copyPartOfStringInfoFrom2(const std::vector<std::size_t>& compoIds, const DataArray& other);
     bool areInfoEqualsIfNotWhy(const DataArray& other, std::string& reason) const;
     bool areInfoEquals(const DataArray& other) const;
     std::string cppRepr(const std::string& varName) const;
@@ -405,7 +497,7 @@ namespace MEDCoupling
     void checkNbOfComps(int nbOfCompo, const std::string& msg) const;
     void checkNbOfTuplesAndComp(const DataArray& other, const std::string& msg) const;
     void checkNbOfTuplesAndComp(int nbOfTuples, int nbOfCompo, const std::string& msg) const;
-    void checkNbOfElems(std::size_t nbOfElems, const std::string& msg) const;
+    void checkNbOfElems(mcIdType nbOfElems, const std::string& msg) const;
     static int GetNumberOfItemGivenBES(int begin, int end, int step, const std::string& msg);
     static int GetNumberOfItemGivenBESRelative(int begin, int end, int step, const std::string& msg);
     static int GetPosOfItemGivenBESRelativeNoThrow(int value, int begin, int end, int step);
@@ -419,22 +511,22 @@ namespace MEDCoupling
       PyObject *getInfoOnComponents() const
       {
         const std::vector<std::string>& comps=self->getInfoOnComponents();
-        PyObject *ret=PyList_New((int)comps.size());
-        for(int i=0;i<(int)comps.size();i++)
+        PyObject *ret=PyList_New((mcIdType)comps.size());
+        for(std::size_t i=0;i<comps.size();i++)
           PyList_SetItem(ret,i,PyString_FromString(comps[i].c_str()));
         return ret;
       }
       
       void copyPartOfStringInfoFrom(const DataArray& other, PyObject *li)
       {
-        std::vector<int> tmp;
+        std::vector<std::size_t> tmp;
         convertPyToNewIntArr3(li,tmp);
         self->copyPartOfStringInfoFrom(other,tmp);
       }
 
       void copyPartOfStringInfoFrom2(PyObject *li, const DataArray& other)
       {
-        std::vector<int> tmp;
+        std::vector<std::size_t> tmp;
         convertPyToNewIntArr3(li,tmp);
         self->copyPartOfStringInfoFrom2(tmp,other);
       }
@@ -442,11 +534,11 @@ namespace MEDCoupling
       virtual void renumberInPlace(PyObject *li)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -455,11 +547,11 @@ namespace MEDCoupling
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
             da2->checkAllocated();
-            int size=self->getNumberOfTuples();
+            mcIdType size=self->getNumberOfTuples();
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -471,11 +563,11 @@ namespace MEDCoupling
       virtual void renumberInPlaceR(PyObject *li)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -484,11 +576,11 @@ namespace MEDCoupling
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
             da2->checkAllocated();
-            int size=self->getNumberOfTuples();
+            mcIdType size=self->getNumberOfTuples();
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -498,22 +590,22 @@ namespace MEDCoupling
       }
 
       //tuplesSelec in PyObject * because DataArrayInt is not already existing !
-      virtual void setContigPartOfSelectedValues(int tupleIdStart, PyObject *aBase, PyObject *tuplesSelec)
+      virtual void setContigPartOfSelectedValues(mcIdType tupleIdStart, PyObject *aBase, PyObject *tuplesSelec)
       {
         static const char msg[]="DataArray::setContigPartOfSelectedValuesSlice : 4th parameter \"tuplesSelec\" should be of type DataArrayInt";
           DataArray *a=CheckAndRetrieveDataArrayInstance(aBase,"DataArray::setContigPartOfSelectedValuesSlice : 3rd parameter \"aBase\" should be of type DataArray");
         DataArray *tuplesSelecPtr=CheckAndRetrieveDataArrayInstance(tuplesSelec,msg);
-        DataArrayInt *tuplesSelecPtr2=0;
+        DataArrayIdType *tuplesSelecPtr2=0;
         if(tuplesSelecPtr)
           {
-            tuplesSelecPtr2=dynamic_cast<DataArrayInt *>(tuplesSelecPtr);
+            tuplesSelecPtr2=dynamic_cast<DataArrayIdType *>(tuplesSelecPtr);
             if(!tuplesSelecPtr2)
               throw INTERP_KERNEL::Exception(msg);
           }
         self->setContigPartOfSelectedValues(tupleIdStart,a,tuplesSelecPtr2);
       }
       
-      virtual void setContigPartOfSelectedValuesSlice(int tupleIdStart, PyObject *aBase, int bg, int end2, int step)
+      virtual void setContigPartOfSelectedValuesSlice(mcIdType tupleIdStart, PyObject *aBase, mcIdType bg, mcIdType end2, mcIdType step)
       {
         DataArray *a=CheckAndRetrieveDataArrayInstance(aBase,"DataArray::setContigPartOfSelectedValuesSlice : 2nd parameter \"aBase\" should be of type DataArray");
         self->setContigPartOfSelectedValuesSlice(tupleIdStart,a,bg,end2,step);
@@ -521,7 +613,7 @@ namespace MEDCoupling
 
       virtual DataArray *selectByTupleRanges(PyObject *li) const
       {
-        std::vector<std::pair<int,int> > ranges;
+        std::vector<std::pair<mcIdType,mcIdType> > ranges;
         convertPyToVectorPairInt(li,ranges);
         return self->selectByTupleRanges(ranges);
       }
@@ -529,16 +621,16 @@ namespace MEDCoupling
       virtual DataArray *selectByTupleId(PyObject *li) const
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             return self->selectByTupleId(tmp,tmp+size);
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
             da2->checkAllocated();
@@ -549,16 +641,16 @@ namespace MEDCoupling
       virtual DataArray *selectByTupleIdSafe(PyObject *li) const
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             return self->selectByTupleIdSafe(tmp,tmp+size);
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
             da2->checkAllocated();
@@ -568,50 +660,50 @@ namespace MEDCoupling
 
       virtual PyObject *keepSelectedComponents(PyObject *li) const
       {
-        std::vector<int> tmp;
+        std::vector<std::size_t> tmp;
         convertPyToNewIntArr3(li,tmp);
         DataArray *ret=self->keepSelectedComponents(tmp);
         return convertDataArray(ret,SWIG_POINTER_OWN | 0 );
       }
 
-      static PyObject *GetSlice(PyObject *slic, int sliceId, int nbOfSlices)
+      static PyObject *GetSlice(PyObject *slic, mcIdType sliceId, mcIdType nbOfSlices)
       {
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::GetSlice (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
         GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetSlice (wrap) : the input slice is invalid !");
-        int a,b;
-        DataArray::GetSlice(strt,stp,step,sliceId,nbOfSlices,a,b);
+        mcIdType a,b;
+        DataArray::GetSlice(ToIdType(strt),ToIdType(stp),ToIdType(step),sliceId,nbOfSlices,a,b);
         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(step));
       }
 
-      PyObject *getSlice(PyObject *slic, int sliceId, int nbOfSlices) const
+      PyObject *getSlice(PyObject *slic, mcIdType sliceId, mcIdType nbOfSlices) const
       {
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::getSlice (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
         GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getSlice (wrap) : the input slice is invalid !");
-        int a,b;
-        DataArray::GetSlice(strt,stp,step,sliceId,nbOfSlices,a,b);
+        mcIdType a,b;
+        DataArray::GetSlice(ToIdType(strt),ToIdType(stp),ToIdType(step),sliceId,nbOfSlices,a,b);
         return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(step));
       }
 
-      static int GetNumberOfItemGivenBES(PyObject *slic)
+      static mcIdType GetNumberOfItemGivenBES(PyObject *slic)
       {
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBES (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
         GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBES (wrap) : the input slice is invalid !");
-        return DataArray::GetNumberOfItemGivenBES(strt,stp,step,"");
+        return DataArray::GetNumberOfItemGivenBES(ToIdType(strt),ToIdType(stp),ToIdType(step),"");
       }
 
-      static int GetNumberOfItemGivenBESRelative(PyObject *slic)
+      static mcIdType GetNumberOfItemGivenBESRelative(PyObject *slic)
       {
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::GetNumberOfItemGivenBESRelative (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
         GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArray::GetNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
-        return DataArray::GetNumberOfItemGivenBESRelative(strt,stp,step,"");
+        return DataArray::GetNumberOfItemGivenBESRelative(ToIdType(strt),ToIdType(stp),ToIdType(step),"");
       }
       
       static DataArray *Aggregate(PyObject *arrs)
@@ -621,22 +713,22 @@ namespace MEDCoupling
         return DataArray::Aggregate(tmp);
       }
 
-      int getNumberOfItemGivenBES(PyObject *slic) const
+      mcIdType getNumberOfItemGivenBES(PyObject *slic) const
       {
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::getNumberOfItemGivenBES (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
         GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBES (wrap) : the input slice is invalid !");
-        return DataArray::GetNumberOfItemGivenBES(strt,stp,step,"");
+        return DataArray::GetNumberOfItemGivenBES(ToIdType(strt),ToIdType(stp),ToIdType(step),"");
       }
 
-      int getNumberOfItemGivenBESRelative(PyObject *slic)
+      mcIdType getNumberOfItemGivenBESRelative(PyObject *slic)
       {
         if(!PySlice_Check(slic))
           throw INTERP_KERNEL::Exception("DataArray::getNumberOfItemGivenBESRelative (wrap) : expecting a pyslice as second (first) parameter !");
         Py_ssize_t strt=2,stp=2,step=2;
         GetIndicesOfSlice(slic,self->getNumberOfTuples(),&strt,&stp,&step,"DataArray::getNumberOfItemGivenBESRelative (wrap) : the input slice is invalid !");
-        return DataArray::GetNumberOfItemGivenBESRelative(strt,stp,step,"");
+        return DataArray::GetNumberOfItemGivenBESRelative(ToIdType(strt),ToIdType(stp),ToIdType(step),"");
       }
 
       PyObject *__getstate__() const
@@ -646,9 +738,9 @@ namespace MEDCoupling
         const std::vector<std::string> &a1(self->getInfoOnComponents());
         PyTuple_SetItem(ret,0,PyString_FromString(a0.c_str()));
         //
-        int sz(a1.size());
+        std::size_t sz(a1.size());
         PyObject *ret1(PyList_New(sz));
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           PyList_SetItem(ret1,i,PyString_FromString(a1[i].c_str()));
         PyTuple_SetItem(ret,1,ret1);
         //
@@ -660,7 +752,7 @@ namespace MEDCoupling
         static const char MSG[]="DataArrayDouble.__setstate__ : expected input is a tuple of size 2 with string as 1st arg and list of string as 2nd arg !";
         if(!PyTuple_Check(inp))
           throw INTERP_KERNEL::Exception("DataArrayDouble.__setstate__ : invalid input ! Invalid overwrite of __getstate__ ?");
-        int sz(PyTuple_Size(inp));
+        std::size_t sz(PyTuple_Size(inp));
         if(sz!=2)
           throw INTERP_KERNEL::Exception("DataArrayDouble.__setstate__ : invalid tuple in input ! Should be of size 2 ! Invalid overwrite of __getstate__ ?");
         PyObject *a0(PyTuple_GetItem(inp,0));
@@ -723,7 +815,7 @@ namespace MEDCoupling
         return self->reprNotTooLong();
       }
 
-      int __len__() const
+      mcIdType __len__() const
       {
         if(self->isAllocated())
           {
@@ -744,7 +836,8 @@ namespace MEDCoupling
       PyObject *getValuesAsTuple() const
       {
         const float *vals(self->begin());
-        int nbOfComp(self->getNumberOfComponents()),nbOfTuples(self->getNumberOfTuples());
+        std::size_t nbOfComp(self->getNumberOfComponents());
+        mcIdType nbOfTuples(self->getNumberOfTuples());
         return convertDblArrToPyListOfTuple<float>(vals,nbOfComp,nbOfTuples);
       }
 
@@ -830,8 +923,8 @@ namespace MEDCoupling
   class DataArrayFloatTuple
   {
   public:
-    int getNumberOfCompo() const;
-    DataArrayFloat *buildDAFloat(int nbOfTuples, int nbOfCompo) const;
+    std::size_t getNumberOfCompo() const;
+    DataArrayFloat *buildDAFloat(mcIdType nbOfTuples, mcIdType nbOfCompo) const;
     %extend
     {
       std::string __str__() const
@@ -864,7 +957,6 @@ namespace MEDCoupling
     }
   };
   
-  class DataArrayInt;
   class DataArrayDoubleIterator;
   
   class DataArrayDouble : public DataArray
@@ -898,15 +990,15 @@ namespace MEDCoupling
     DataArrayDouble *toNoInterlace() const;
     DataArrayDouble *subArray(int tupleIdBg, int tupleIdEnd=-1) const;
     void transpose();
-    DataArrayDouble *changeNbOfComponents(int newNbOfComp, double dftValue) const;
+    DataArrayDouble *changeNbOfComponents(std::size_t newNbOfComp, double dftValue) const;
     void meldWith(const DataArrayDouble *other);
     DataArrayDouble *duplicateEachTupleNTimes(int nbTimes) const;
     DataArrayDouble *getDifferentValues(double prec, int limitTupleId=-1) const;
-    DataArrayInt *findClosestTupleId(const DataArrayDouble *other) const;
-    DataArrayInt *computeNbOfInteractionsWith(const DataArrayDouble *otherBBoxFrmt, double eps) const;
+    DataArrayIdType *findClosestTupleId(const DataArrayDouble *other) const;
+    DataArrayIdType *computeNbOfInteractionsWith(const DataArrayDouble *otherBBoxFrmt, double eps) const;
     void setPartOfValues1(const DataArrayDouble *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
-    void setPartOfValuesSimple1(double a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp);
-    void setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayInt *tuplesSelec);
+    void setPartOfValuesSimple1(double a, mcIdType bgTuples, mcIdType endTuples, mcIdType stepTuples, mcIdType bgComp, mcIdType endComp, mcIdType stepComp);
+    void setPartOfValuesAdv(const DataArrayDouble *a, const DataArrayIdType *tuplesSelec);
     double getIJ(int tupleId, int compoId) const;
     double front() const;
     double back() const;
@@ -962,9 +1054,9 @@ namespace MEDCoupling
     DataArrayDouble *applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func, bool isSafe=true) const;
     void applyFuncFast32(const std::string& func);
     void applyFuncFast64(const std::string& func);
-    DataArrayInt *findIdsInRange(double vmin, double vmax) const;
-    DataArrayInt *findIdsNotInRange(double vmin, double vmax) const;
-    DataArrayInt *findIdsStrictlyNegative() const;
+    DataArrayIdType *findIdsInRange(double vmin, double vmax) const;
+    DataArrayIdType *findIdsNotInRange(double vmin, double vmax) const;
+    DataArrayIdType *findIdsStrictlyNegative() const;
     static DataArrayDouble *Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2);
     static DataArrayDouble *Meld(const DataArrayDouble *a1, const DataArrayDouble *a2);
     static DataArrayDouble *Dot(const DataArrayDouble *a1, const DataArrayDouble *a2);
@@ -981,11 +1073,11 @@ namespace MEDCoupling
     void divideEqual(const DataArrayDouble *other);
     static DataArrayDouble *Pow(const DataArrayDouble *a1, const DataArrayDouble *a2);
     void powEqual(const DataArrayDouble *other);
-    MCAuto<DataArrayInt> findIdsGreaterOrEqualTo(double val) const;
-    MCAuto<DataArrayInt> findIdsGreaterThan(double val) const;
-    MCAuto<DataArrayInt> findIdsLowerOrEqualTo(double val) const;
-    MCAuto<DataArrayInt> findIdsLowerThan(double val) const;
-    MCAuto<DataArrayInt> convertToIntArr() const;
+    MCAuto<DataArrayIdType> findIdsGreaterOrEqualTo(double val) const;
+    MCAuto<DataArrayIdType> findIdsGreaterThan(double val) const;
+    MCAuto<DataArrayIdType> findIdsLowerOrEqualTo(double val) const;
+    MCAuto<DataArrayIdType> findIdsLowerThan(double val) const;
+    MCAuto<DataArrayInt32> convertToIntArr() const;
     MCAuto<DataArrayDouble> selectPartDef(const PartDefinition* pd) const;
     MCAuto<DataArrayDouble> cumSum() const;
     MCAuto<DataArrayFloat> convertToFloatArr() const;
@@ -1010,7 +1102,7 @@ namespace MEDCoupling
       {
         double val;
         std::vector<double> bb;
-        int sw,nbTuples=-1;
+        mcIdType sw; mcIdType nbTuples=-1;
         const char msg[]="Python wrap of DataArrayDouble::pushBackValsSilent : ";
         const double *tmp=convertObjToPossibleCpp5_SingleCompo(li,sw,val,bb,msg,true,nbTuples);
         self->pushBackValsSilent(tmp,tmp+nbTuples);
@@ -1033,7 +1125,7 @@ namespace MEDCoupling
         return self->doubleValue();
       }
 
-      int __len__() const
+      mcIdType __len__() const
       {
         if(self->isAllocated())
           {
@@ -1075,14 +1167,14 @@ namespace MEDCoupling
               {
                 if(PyInt_Check(nbOfTuples))
                   {
-                    int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
+                    mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(nbOfTuples));
                     if(nbOfTuples1<0)
                       throw INTERP_KERNEL::Exception("DataArrayDouble::setValues : should be a positive set of allocated memory !");
                     if(nbOfComp && nbOfComp != Py_None)
                       {
                         if(PyInt_Check(nbOfComp))
                           {//DataArrayDouble.setValues([1.,3.,4.,5.],2,2)
-                            int nbOfCompo=PyInt_AS_LONG(nbOfComp);
+                            mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfComp));
                             if(nbOfCompo<0)
                               throw INTERP_KERNEL::Exception("DataArrayDouble::setValues : should be a positive number of components !");
                             std::vector<double> tmp=fillArrayWithPyListDbl2(li,nbOfTuples1,nbOfCompo);
@@ -1093,7 +1185,7 @@ namespace MEDCoupling
                       }
                     else
                       {//DataArrayDouble.setValues([1.,3.,4.],3)
-                        int tmpp1=-1;
+                        mcIdType tmpp1=-1;
                         std::vector<double> tmp=fillArrayWithPyListDbl2(li,nbOfTuples1,tmpp1);
                         self->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),self->getPointer());
                       }
@@ -1103,7 +1195,7 @@ namespace MEDCoupling
               }
             else
               {// DataArrayDouble.setValues([1.,3.,4.])
-                int tmpp1=-1,tmpp2=-1;
+                mcIdType tmpp1=-1,tmpp2=-1;
                 std::vector<double> tmp=fillArrayWithPyListDbl2(li,tmpp1,tmpp2);
                 self->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),self->getPointer());
               }
@@ -1140,7 +1232,8 @@ namespace MEDCoupling
       PyObject *getValuesAsTuple() const
       {
         const double *vals(self->begin());
-        int nbOfComp(self->getNumberOfComponents()),nbOfTuples(self->getNumberOfTuples());
+        std::size_t nbOfComp(self->getNumberOfComponents());
+        mcIdType nbOfTuples(self->getNumberOfTuples());
         return convertDblArrToPyListOfTuple<double>(vals,nbOfComp,nbOfTuples);
       }
 
@@ -1151,7 +1244,7 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const double *seg2Ptr(convertObjToPossibleCpp5_Safe(seg2,sw,val,a,aa,bb,msg,2,2,true));
         const double *tri3Ptr(convertObjToPossibleCpp5_Safe(tri3,sw,val2,a2,aa2,bb2,msg,3,2,true));
         //
@@ -1173,7 +1266,7 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const double *centerPtr(convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,msg,1,3,true));
         const double *vectorPtr(convertObjToPossibleCpp5_Safe(normalVector,sw,val2,a2,aa2,bb2,msg,1,3,true));
         MCAuto<DataArrayDouble> ret(self->symmetry3DPlane(centerPtr,vectorPtr));
@@ -1183,11 +1276,11 @@ namespace MEDCoupling
       static PyObject *GiveBaseForPlane(PyObject *normalVector)
       {
         const char msg[]="Python wrap of DataArrayDouble::GiveBaseForPlane : ";
-        double val,val2;
-        DataArrayDouble *a,*a2;
-        DataArrayDoubleTuple *aa,*aa2;
+        double val;
+        DataArrayDouble *a;
+        DataArrayDoubleTuple *aa;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const double *vectorPtr(convertObjToPossibleCpp5_Safe(normalVector,sw,val,a,aa,bb,msg,1,3,true));
         double res[9];
         DataArrayDouble::GiveBaseForPlane(vectorPtr,res);
@@ -1201,7 +1294,7 @@ namespace MEDCoupling
         DataArrayDouble *a,*a2;
         DataArrayDoubleTuple *aa,*aa2;
         std::vector<double> bb,bb2;
-        int sw;
+        mcIdType sw;
         const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,3,true);
         const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,3,true);
         return self->fromCartToCylGiven(coords,centerPtr,vectorPtr);
@@ -1210,11 +1303,11 @@ namespace MEDCoupling
       DataArrayDouble *renumber(PyObject *li)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1223,11 +1316,11 @@ namespace MEDCoupling
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
             da2->checkAllocated();
-            int size=self->getNumberOfTuples();
+            mcIdType size=self->getNumberOfTuples();
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1239,11 +1332,11 @@ namespace MEDCoupling
       DataArrayDouble *renumberR(PyObject *li)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1252,11 +1345,11 @@ namespace MEDCoupling
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
             da2->checkAllocated();
-            int size=self->getNumberOfTuples();
+            mcIdType size=self->getNumberOfTuples();
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1265,14 +1358,14 @@ namespace MEDCoupling
           }
       }
 
-      DataArrayDouble *renumberAndReduce(PyObject *li, int newNbOfTuple)
+      DataArrayDouble *renumberAndReduce(PyObject *li, mcIdType newNbOfTuple)
       {
         void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
         if (!SWIG_IsOK(res1))
           {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1281,11 +1374,11 @@ namespace MEDCoupling
           }
         else
           {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
             if(!da2)
               throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
             da2->checkAllocated();
-            int size=self->getNumberOfTuples();
+            mcIdType size=self->getNumberOfTuples();
             if(size!=self->getNumberOfTuples())
               {
                 throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
@@ -1296,7 +1389,7 @@ namespace MEDCoupling
 
       PyObject *minimalDistanceTo(const DataArrayDouble *other) const
       {
-        int thisTupleId,otherTupleId;
+        mcIdType thisTupleId,otherTupleId;
         double r0=self->minimalDistanceTo(other,thisTupleId,otherTupleId);
         PyObject *ret=PyTuple_New(3);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r0));
@@ -1307,7 +1400,7 @@ namespace MEDCoupling
 
       PyObject *getMaxValue() const
       {
-        int tmp;
+        mcIdType tmp;
         double r1=self->getMaxValue(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
@@ -1327,17 +1420,17 @@ namespace MEDCoupling
 
       PyObject *getMaxValue2() const
       {
-        DataArrayInt *tmp;
+        DataArrayIdType *tmp;
         double r1=self->getMaxValue2(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *getMinValue() const
       {
-        int tmp;
+        mcIdType tmp;
         double r1=self->getMinValue(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
@@ -1347,54 +1440,54 @@ namespace MEDCoupling
 
       PyObject *getMinValue2() const
       {
-        DataArrayInt *tmp;
+        DataArrayIdType *tmp;
         double r1=self->getMinValue2(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyFloat_FromDouble(r1));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *getMinMaxPerComponent() const
       {
-        int nbOfCompo(self->getNumberOfComponents());
+        std::size_t nbOfCompo(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp(new double[2*nbOfCompo]);
         self->getMinMaxPerComponent(tmp);
-        PyObject *ret=convertDblArrToPyListOfTuple<double>(tmp,2,nbOfCompo);
+        PyObject *ret=convertDblArrToPyListOfTuple<double>(tmp,2,ToIdType(nbOfCompo));
         return ret;
       }
       
       PyObject *normMaxPerComponent() const
       {
-        int nbOfCompo(self->getNumberOfComponents());
+        std::size_t nbOfCompo(self->getNumberOfComponents());
         INTERP_KERNEL::AutoPtr<double> tmp(new double[nbOfCompo]);
         self->normMaxPerComponent(tmp);
-        return convertDblArrToPyList<double>(tmp,nbOfCompo);
+        return convertDblArrToPyList<double>(tmp,ToIdType(nbOfCompo));
       }
 
       PyObject *accumulate() const
       {
-        int sz=self->getNumberOfComponents();
+        std::size_t sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->accumulate(tmp);
-        return convertDblArrToPyList<double>(tmp,sz);
+        return convertDblArrToPyList<double>(tmp,ToIdType(sz));
       }
 
       DataArrayDouble *accumulatePerChunck(PyObject *indexArr) const
       {
-        int sw,sz,val;
-        std::vector<int> val2;
-        const int *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
+        mcIdType sw, sz,val;
+        std::vector<mcIdType> val2;
+        const mcIdType *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
         return self->accumulatePerChunck(bg,bg+sz);
       }
 
-      PyObject *findCommonTuples(double prec, int limitNodeId=-1) const
+      PyObject *findCommonTuples(double prec, mcIdType limitNodeId=-1) const
       {
-        DataArrayInt *comm, *commIndex;
+        DataArrayIdType *comm, *commIndex;
         self->findCommonTuples(prec,limitNodeId,comm,commIndex);
         PyObject *res = PyList_New(2);
-        PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(comm),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(commIndex),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(comm),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(commIndex),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return res;
       }
 
@@ -1404,9 +1497,10 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
-        int tupleId=-1,nbOfCompo=self->getNumberOfComponents();
-        const double *pt=convertObjToPossibleCpp5_Safe(tuple,sw,val,a,aa,bb,"Python wrap of DataArrayDouble::distanceToTuple",1,nbOfCompo,true);
+        mcIdType sw;
+        mcIdType tupleId=-1;
+        std::size_t nbOfCompo=self->getNumberOfComponents();
+        const double *pt=convertObjToPossibleCpp5_Safe(tuple,sw,val,a,aa,bb,"Python wrap of DataArrayDouble::distanceToTuple",1,(int)nbOfCompo,true);
         //
         double ret0=self->distanceToTuple(pt,pt+nbOfCompo,tupleId);
         PyObject *ret=PyTuple_New(2);
@@ -1417,7 +1511,7 @@ namespace MEDCoupling
 
       void setSelectedComponents(const DataArrayDouble *a, PyObject *li)
       {
-        std::vector<int> tmp;
+        std::vector<std::size_t> tmp;
         convertPyToNewIntArr3(li,tmp);
         self->setSelectedComponents(a,tmp);
       }
@@ -1432,12 +1526,12 @@ namespace MEDCoupling
         return res;
       }
    
-      PyObject *getTuple(int tupleId)
+      PyObject *getTuple(mcIdType tupleId)
       {
-        int sz=self->getNumberOfComponents();
+        std::size_t sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<double> tmp=new double[sz];
         self->getTuple(tupleId,tmp);
-        return convertDblArrToPyList<double>(tmp,sz);
+        return convertDblArrToPyList<double>(tmp,ToIdType(sz));
       }
 
       static DataArrayDouble *Aggregate(PyObject *li)
@@ -1460,28 +1554,29 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
-        int nbComp=self->getNumberOfComponents(),nbTuples=-1;
+        mcIdType sw;
+        std::size_t nbComp=self->getNumberOfComponents();
+        mcIdType nbTuples=-1;
         const char msg[]="Python wrap of DataArrayDouble::computeTupleIdsNearTuples : ";
-        const double *pos=convertObjToPossibleCpp5_Safe2(pt,sw,val,a,aa,bb,msg,nbComp,true,nbTuples);
+        const double *pos=convertObjToPossibleCpp5_Safe2(pt,sw,val,a,aa,bb,msg,(int)nbComp,true,nbTuples);
         MCAuto<DataArrayDouble> inpu=DataArrayDouble::New(); inpu->useArray(pos,false,DeallocType::CPP_DEALLOC,nbTuples,nbComp);
-        DataArrayInt *c=0,*cI=0;
+        DataArrayIdType *c=0,*cI=0;
         self->computeTupleIdsNearTuples(inpu,eps,c,cI);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *areIncludedInMe(const DataArrayDouble *other, double prec) const
       {
-        DataArrayInt *ret1=0;
+        DataArrayIdType *ret1=0;
         bool ret0=self->areIncludedInMe(other,prec,ret1);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret0Py=ret0?Py_True:Py_False;
         Py_XINCREF(ret0Py);
         PyTuple_SetItem(ret,0,ret0Py);
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
@@ -1507,7 +1602,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         //
 #ifndef WITHOUT_AUTOFIELD
         void *argp;
@@ -1546,7 +1641,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Add(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
             }
           default:
@@ -1561,7 +1656,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -1578,7 +1673,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return DataArrayDouble::Add(self,aaa);
             }
           default:
@@ -1598,7 +1693,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         //
 #ifndef WITHOUT_AUTOFIELD
         void *argp;
@@ -1637,7 +1732,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Substract(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
             }
           default:
@@ -1652,7 +1747,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -1669,7 +1764,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return DataArrayDouble::Substract(aaa,self);
             }
           default:
@@ -1689,7 +1784,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         //
 #ifndef WITHOUT_AUTOFIELD
         void *argp;
@@ -1728,7 +1823,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Multiply(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
             }
           default:
@@ -1753,7 +1848,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         //
 #ifndef WITHOUT_AUTOFIELD
         void *argp;
@@ -1794,7 +1889,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return SWIG_NewPointerObj(SWIG_as_voidptr(DataArrayDouble::Divide(self,aaa)),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 );
             }
           default:
@@ -1809,7 +1904,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -1826,7 +1921,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return DataArrayDouble::Divide(aaa,self);
             }
           default:
@@ -1846,7 +1941,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -1867,7 +1962,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return DataArrayDouble::Pow(self,aaa);
             }
           default:
@@ -1882,7 +1977,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -1899,7 +1994,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               return DataArrayDouble::Pow(aaa,self);
             }
           default:
@@ -1914,7 +2009,7 @@ namespace MEDCoupling
         DataArrayDouble *a;
         DataArrayDoubleTuple *aa;
         std::vector<double> bb;
-        int sw;
+        mcIdType sw;
         convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
         switch(sw)
           {
@@ -1939,7 +2034,7 @@ namespace MEDCoupling
             }
           case 4:
             {
-              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,(int)bb.size());
+              MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,DeallocType::CPP_DEALLOC,1,bb.size());
               self->powEqual(aaa);
               Py_XINCREF(trueSelf);
               return trueSelf;
@@ -1951,22 +2046,22 @@ namespace MEDCoupling
    
       PyObject *computeTupleIdsNearTuples(const DataArrayDouble *other, double eps)
       {
-        DataArrayInt *c=0,*cI=0;
+        DataArrayIdType *c=0,*cI=0;
         //
         self->computeTupleIdsNearTuples(other,eps,c,cI);
         PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(c),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cI),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
 
       PyObject *maxPerTupleWithCompoId() const
       {
-        DataArrayInt *ret1=0;
+        DataArrayIdType *ret1=0;
         DataArrayDouble *ret0=self->maxPerTupleWithCompoId(ret1);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         return ret;
       }
     }
@@ -1998,7 +2093,7 @@ namespace MEDCoupling
   class DataArrayDoubleTuple
   {
   public:
-    int getNumberOfCompo() const;
+    std::size_t getNumberOfCompo() const;
     DataArrayDouble *buildDADouble(int nbOfTuples, int nbOfCompo) const;
     %extend
     {
@@ -2057,13 +2152,13 @@ namespace MEDCoupling
       PyObject *__getitem__(PyObject *obj)
       {
         const char msg2[]="DataArrayDoubleTuple::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
+        mcIdType sw;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
         const double *pt=self->getConstPointer();
-        int nbc=self->getNumberOfCompo();
+        mcIdType nbc=ToIdType(self->getNumberOfCompo());
         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
         switch(sw)
           {
@@ -2093,9 +2188,9 @@ namespace MEDCoupling
           case 2:
             {
               PyObject *t=PyTuple_New(multiVal.size());
-              for(int j=0;j<(int)multiVal.size();j++)
+              for(std::size_t j=0;j<multiVal.size();j++)
                 {
-                  int cid=multiVal[j];
+                  mcIdType cid=multiVal[j];
                   if(cid>=nbc)
                     {
                       std::ostringstream oss;
@@ -2108,9 +2203,9 @@ namespace MEDCoupling
             }
           case 3:
             {
-              int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
+              mcIdType sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
               PyObject *t=PyTuple_New(sz);
-              for(int j=0;j<sz;j++)
+              for(mcIdType j=0;j<sz;j++)
                 PyTuple_SetItem(t,j,PyFloat_FromDouble(pt[slic.first+j*slic.second.second]));
               return t;
             }
@@ -2123,16 +2218,16 @@ namespace MEDCoupling
       {
         const char msg[]="DataArrayDoubleTuple::__setitem__ : unrecognized type entered, int, slice, list<int>, tuple<int> !";
         const char msg2[]="DataArrayDoubleTuple::__setitem__ : Mismatch of slice values in 2nd parameter (components) !";
-        int sw1,sw2;
+        mcIdType sw1,sw2;
         double singleValV;
         std::vector<double> multiValV;
         MEDCoupling::DataArrayDoubleTuple *daIntTyyppV=0;
-        int nbc=self->getNumberOfCompo();
+        mcIdType nbc=ToIdType(self->getNumberOfCompo());
         convertDoubleStarLikePyObjToCpp(value,sw1,singleValV,multiValV,daIntTyyppV);
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
+        mcIdType singleVal;
+        std::vector<mcIdType> multiVal;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
         double *pt=self->getPointer();
         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
         switch(sw2)
@@ -2178,7 +2273,7 @@ namespace MEDCoupling
                 {
                 case 1:
                   {
-                    for(std::vector<int>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
+                    for(std::vector<mcIdType>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
                       {
                         if(*it>=nbc)
                           {
@@ -2198,9 +2293,9 @@ namespace MEDCoupling
                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << multiVal.size() << " !";
                         throw INTERP_KERNEL::Exception(oss.str().c_str());
                       }
-                    for(int i=0;i<(int)multiVal.size();i++)
+                    for(std::size_t i=0;i<multiVal.size();i++)
                       {
-                        int pos=multiVal[i];
+                        mcIdType pos=multiVal[i];
                         if(pos>=nbc)
                           {
                             std::ostringstream oss;
@@ -2214,7 +2309,7 @@ namespace MEDCoupling
                 case 3:
                   {
                     const double *ptV=daIntTyyppV->getConstPointer();
-                    if(nbc>daIntTyyppV->getNumberOfCompo())
+                    if(nbc>(mcIdType)daIntTyyppV->getNumberOfCompo())
                       {
                         std::ostringstream oss;
                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
@@ -2229,37 +2324,37 @@ namespace MEDCoupling
             }
           case 3:
             {
-              int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
+              mcIdType sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
               switch(sw1)
                 {
                 case 1:
                   {
-                    for(int j=0;j<sz;j++)
+                    for(mcIdType j=0;j<sz;j++)
                       pt[slic.first+j*slic.second.second]=singleValV;
                     return self;
                   }
                 case 2:
                   {
-                    if(sz!=(int)multiValV.size())
+                    if(sz!=(mcIdType)multiValV.size())
                       {
                         std::ostringstream oss;
                         oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << sz << " !";
                         throw INTERP_KERNEL::Exception(oss.str().c_str());
                       }
-                    for(int j=0;j<sz;j++)
+                    for(mcIdType j=0;j<sz;j++)
                       pt[slic.first+j*slic.second.second]=multiValV[j];
                     return self;
                   }
                 case 3:
                   {
                     const double *ptV=daIntTyyppV->getConstPointer();
-                    if(sz>daIntTyyppV->getNumberOfCompo())
+                    if(sz>(mcIdType)daIntTyyppV->getNumberOfCompo())
                       {
                         std::ostringstream oss;
                         oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
                         throw INTERP_KERNEL::Exception(oss.str().c_str());
                       }
-                    for(int j=0;j<sz;j++)
+                    for(mcIdType j=0;j<sz;j++)
                       pt[slic.first+j*slic.second.second]=ptV[j];
                     return self;
                   }
@@ -2274,2916 +2369,394 @@ namespace MEDCoupling
     }
   };
 
-  class DataArrayIntIterator;
-
-  class DataArrayInt : public DataArray
+  class DataArrayChar : public DataArray
   {
   public:
-    static DataArrayInt *New();
-    int intValue() const;
+    virtual DataArrayChar *buildEmptySpecializedDAChar() const;
     int getHashCode() const;
     bool empty() const;
-    void aggregate(const DataArrayInt *other);
-    DataArrayInt *performCopyOrIncrRef(bool deepCopy) const;
-    void deepCopyFrom(const DataArrayInt& other);
+    void deepCopyFrom(const DataArrayChar& other);
     void reserve(std::size_t nbOfElems);
-    void pushBackSilent(int val);
-    int popBackSilent();
+    void pushBackSilent(char val);
+    char popBackSilent();
     void pack() const;
     void allocIfNecessary(int nbOfTuple, int nbOfCompo);
-    bool isEqual(const DataArrayInt& other) const;
-    bool isEqualWithoutConsideringStr(const DataArrayInt& other) const;
-    bool isEqualWithoutConsideringStrAndOrder(const DataArrayInt& other) const;
-    DataArrayInt *buildPermutationArr(const DataArrayInt& other) const;
-    DataArrayInt *sumPerTuple() const;
-    void sort(bool asc=true);
+    bool isEqual(const DataArrayChar& other) const;
+    bool isEqualWithoutConsideringStr(const DataArrayChar& other) const;
     void reverse();
-    void checkMonotonic(bool increasing) const;
-    bool isMonotonic(bool increasing) const;
-    void checkStrictlyMonotonic(bool increasing) const;
-    bool isStrictlyMonotonic(bool increasing) const;
     void fillWithZero();
-    void fillWithValue(int val);
-    void iota(int init=0);
+    void fillWithValue(char val);
     std::string repr() const;
     std::string reprZip() const;
-    std::string reprNotTooLong() const;
-    DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const;
-    DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const;
-    DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const;
-    MCAuto< MapII > invertArrayN2O2O2NOptimized() const;
-    MCAuto< MapII > giveN2OOptimized() const;
-    DataArrayInt *indicesOfSubPart(const DataArrayInt& partOfThis) const;
-    DataArrayInt *fromNoInterlace() const;
-    DataArrayInt *toNoInterlace() const;
-    DataArrayInt *selectByTupleIdSafeSlice(int bg, int end, int step) const;
-    DataArrayInt *checkAndPreparePermutation() const;
-    DataArrayInt *buildPermArrPerLevel() const;
-    bool isIota(int sizeExpected) const;
-    bool isUniform(int val) const;
-    int checkUniformAndGuess() const;
-    bool hasUniqueValues() const;
-    DataArrayInt *subArray(int tupleIdBg, int tupleIdEnd=-1) const;
-    void transpose();
-    DataArrayInt *changeNbOfComponents(int newNbOfComp, int dftValue) const;
-    void meldWith(const DataArrayInt *other);
-    void setPartOfValues1(const DataArrayInt *a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true);
-    void setPartOfValuesSimple1(int a, int bgTuples, int endTuples, int stepTuples, int bgComp, int endComp, int stepComp);
-    void setPartOfValuesAdv(const DataArrayInt *a, const DataArrayInt *tuplesSelec);
-    void getTuple(int tupleId, int *res) const;
-    int getIJ(int tupleId, int compoId) const;
-    int getIJSafe(int tupleId, int compoId) const;
-    int front() const;
-    int back() const;
-    void setIJ(int tupleId, int compoId, int newVal);
-    void setIJSilent(int tupleId, int compoId, int newVal);
-    int *getPointer();
-    const int *getConstPointer() const;
-    DataArrayIntIterator *iterator();
-    const int *begin() const;
-    const int *end() const;
-    DataArrayInt *findIdsEqual(int val) const;
-    DataArrayInt *findIdsNotEqual(int val) const;
-    int changeValue(int oldValue, int newValue);
-    int findIdFirstEqualTuple(const std::vector<int>& tupl) const;
-    int findIdFirstEqual(int value) const;
-    int findIdFirstEqual(const std::vector<int>& vals) const;
-    int findIdSequence(const std::vector<int>& vals) const;
-    bool presenceOfTuple(const std::vector<int>& tupl) const;
-    bool presenceOfValue(int value) const;
-    bool presenceOfValue(const std::vector<int>& vals) const;
-    int count(int value) const;
-    int accumulate(int compId) const;
-    int getMaxValueInArray() const;
-    int getMaxAbsValueInArray() const;
-    int getMinValueInArray() const;
-    void abs();
-    DataArrayInt *computeAbs() const;
-    void applyLin(int a, int b, int compoId);
-    void applyLin(int a, int b);
-    void applyInv(int numerator);
-    DataArrayInt *negate() const;
-    void applyDivideBy(int val);
-    void applyModulus(int val);
-    void applyRModulus(int val);
-    void applyPow(int val);
-    void applyRPow(int val);
-    DataArrayInt *findIdsInRange(int vmin, int vmax) const;
-    DataArrayInt *findIdsNotInRange(int vmin, int vmax) const;
-    DataArrayInt *findIdsStrictlyNegative() const;
-    bool checkAllIdsInRange(int vmin, int vmax) const;
-    static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2);
-    static DataArrayInt *Meld(const DataArrayInt *a1, const DataArrayInt *a2);
-    static DataArrayInt *MakePartition(const std::vector<const DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups);
-    static DataArrayInt *BuildUnion(const std::vector<const DataArrayInt *>& arr);
-    static DataArrayInt *BuildIntersection(const std::vector<const DataArrayInt *>& arr);
-    static DataArrayInt *FindPermutationFromFirstToSecond(const DataArrayInt *ids1, const DataArrayInt *ids2);
-    DataArrayInt *buildComplement(int nbOfElement) const;
-    DataArrayInt *buildSubstraction(const DataArrayInt *other) const;
-    DataArrayInt *buildSubstractionOptimized(const DataArrayInt *other) const;
-    DataArrayInt *buildUnion(const DataArrayInt *other) const;
-    DataArrayInt *buildIntersection(const DataArrayInt *other) const;
-    DataArrayInt *buildUnique() const;
-    DataArrayInt *buildUniqueNotSorted() const;
-    DataArrayInt *deltaShiftIndex() const;
-    void computeOffsets();
-    void computeOffsetsFull();
-    DataArrayInt *buildExplicitArrByRanges(const DataArrayInt *offsets) const;
-    DataArrayInt *findRangeIdForEachTuple(const DataArrayInt *ranges) const;
-    DataArrayInt *findIdInRangeForEachTuple(const DataArrayInt *ranges) const;
-    void sortEachPairToMakeALinkedList();
-    DataArrayInt *duplicateEachTupleNTimes(int nbTimes) const;
-    DataArrayInt *getDifferentValues() const;
-    static DataArrayInt *Add(const DataArrayInt *a1, const DataArrayInt *a2);
-    void addEqual(const DataArrayInt *other);
-    static DataArrayInt *Substract(const DataArrayInt *a1, const DataArrayInt *a2);
-    void substractEqual(const DataArrayInt *other);
-    static DataArrayInt *Multiply(const DataArrayInt *a1, const DataArrayInt *a2);
-    void multiplyEqual(const DataArrayInt *other);
-    static DataArrayInt *Divide(const DataArrayInt *a1, const DataArrayInt *a2);
-    void divideEqual(const DataArrayInt *other);
-    static DataArrayInt *Modulus(const DataArrayInt *a1, const DataArrayInt *a2);
-    void modulusEqual(const DataArrayInt *other);
-    static DataArrayInt *Pow(const DataArrayInt *a1, const DataArrayInt *a2);
-    void powEqual(const DataArrayInt *other);
-    MCAuto<DataArrayInt> fromLinkedListOfPairToList() const;
-    MCAuto<DataArrayInt> findIdsGreaterOrEqualTo(int val) const;
-    MCAuto<DataArrayInt> findIdsGreaterThan(int val) const;
-    MCAuto<DataArrayInt> findIdsLowerOrEqualTo(int val) const;
-    MCAuto<DataArrayInt> findIdsLowerThan(int val) const;
-    MCAuto<DataArrayInt> selectPartDef(const PartDefinition* pd) const;
-    MCAuto<DataArrayDouble> convertToDblArr() const;
-    MCAuto<DataArrayFloat> convertToFloatArr() const;
+    DataArrayInt *convertToIntArr() const;
+    DataArrayChar *renumber(const mcIdType *old2New) const;
+    DataArrayChar *renumberR(const mcIdType *new2Old) const;
+    DataArrayChar *renumberAndReduce(const mcIdType *old2NewBg, mcIdType newNbOfTuple) const;
+    bool isUniform(char val) const;
+    void sort(bool asc=true);
+    DataArrayChar *subArray(mcIdType tupleIdBg, mcIdType tupleIdEnd=-1) const;
+    DataArrayChar *changeNbOfComponents(std::size_t newNbOfComp, char dftValue) const;
+    void meldWith(const DataArrayChar *other);
+    void setPartOfValuesAdv(const DataArrayChar *a, const DataArrayIdType *tuplesSelec);
+    char front() const;
+    char back() const;
+    void setIJ(mcIdType tupleId, int compoId, char newVal);
+    void setIJSilent(mcIdType tupleId, int compoId, char newVal);
+    char *getPointer();
+    DataArrayIdType *findIdsEqual(char val) const;
+    DataArrayIdType *findIdsNotEqual(char val) const;
+    int findIdFirstEqualTuple(const std::vector<char>& tupl) const;
+    bool presenceOfTuple(const std::vector<char>& tupl) const;
+    char getMaxValue(mcIdType& tupleId) const;
+    char getMaxValueInArray() const;
+    char getMinValue(mcIdType& tupleId) const;
+    char getMinValueInArray() const;
+    DataArrayIdType *findIdsInRange(char vmin, char vmax) const;
+    static DataArrayChar *Aggregate(const DataArrayChar *a1, const DataArrayChar *a2);
+    static DataArrayChar *Meld(const DataArrayChar *a1, const DataArrayChar *a2);
+    %extend
+    {
+      mcIdType __len__() const
+      {
+        if(self->isAllocated())
+          {
+            return self->getNumberOfTuples();
+          }
+        else
+          {
+            throw INTERP_KERNEL::Exception("DataArrayChar::__len__ : Instance is NOT allocated !");
+          }
+      }
+      
+      PyObject *isEqualIfNotWhy(const DataArrayChar& other) const
+      {
+        std::string ret1;
+        bool ret0=self->isEqualIfNotWhy(other,ret1);
+        PyObject *ret=PyTuple_New(2);
+        PyObject *ret0Py=ret0?Py_True:Py_False;
+        Py_XINCREF(ret0Py);
+        PyTuple_SetItem(ret,0,ret0Py);
+        PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
+        return ret;
+      }
+      
+      DataArrayChar *renumber(PyObject *li)
+      {
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumber(tmp);
+          }
+        else
+          {
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
+            if(!da2)
+              throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
+            da2->checkAllocated();
+            mcIdType size=self->getNumberOfTuples();
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumber(da2->getConstPointer());
+          }
+      }
+      
+      DataArrayChar *renumberR(PyObject *li)
+      {
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberR(tmp);
+          }
+        else
+          {
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
+            if(!da2)
+              throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
+            da2->checkAllocated();
+            mcIdType size=self->getNumberOfTuples();
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberR(da2->getConstPointer());
+          }
+      }
+      
+      DataArrayChar *renumberAndReduce(PyObject *li, mcIdType newNbOfTuple)
+      {
+        void *da=0;
+        int res1=SWIG_ConvertPtr(li,&da,SWIGTITraits<mcIdType>::TI, 0 |  0 );
+        if (!SWIG_IsOK(res1))
+          {
+            mcIdType size;
+            INTERP_KERNEL::AutoPtr<mcIdType> tmp=convertPyToNewIntArr2(li,&size);
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberAndReduce(tmp,newNbOfTuple);
+          }
+        else
+          {
+            DataArrayIdType *da2=reinterpret_cast< DataArrayIdType * >(da);
+            if(!da2)
+              throw INTERP_KERNEL::Exception("Not null DataArrayIdType instance expected !");
+            da2->checkAllocated();
+            mcIdType size=self->getNumberOfTuples();
+            if(size!=self->getNumberOfTuples())
+              {
+                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
+              }
+            return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
+          }
+      }
+      
+      static DataArrayChar *Aggregate(PyObject *dachs)
+      {
+        std::vector<const MEDCoupling::DataArrayChar *> tmp;
+        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayChar *>(dachs,SWIGTYPE_p_MEDCoupling__DataArrayChar,"DataArrayChar",tmp);
+        return DataArrayChar::Aggregate(tmp);
+      }
+      
+      static DataArrayChar *Meld(PyObject *dachs)
+      {
+        std::vector<const MEDCoupling::DataArrayChar *> tmp;
+        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayChar *>(dachs,SWIGTYPE_p_MEDCoupling__DataArrayChar,"DataArrayChar",tmp);
+        return DataArrayChar::Meld(tmp);
+      }
+    }
+  };
+  
+  class DataArrayByteIterator;
+
+  class DataArrayByte : public DataArrayChar
+  {
   public:
-    static DataArrayInt *Range(int begin, int end, int step);
+    static DataArrayByte *New();
+    DataArrayByteIterator *iterator();
+    DataArrayByte *performCopyOrIncrRef(bool deepCopy) const;
+    char byteValue() const;
     %extend
     {
-      DataArrayInt()
+      DataArrayByte()
         {
-          return DataArrayInt::New();
+          return DataArrayByte::New();
         }
 
-      static DataArrayInt *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
+      static DataArrayByte *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
       {
-        const char *msgBase="MEDCoupling::DataArrayInt::New : Available API are : \n-DataArrayInt.New()\n-DataArrayInt.New([1,3,4])\n-DataArrayInt.New([1,3,4],3)\n-DataArrayInt.New([1,3,4,5],2,2)\n-DataArrayInt.New([1,3,4,5,7,8],3,2)\n-DataArrayInt.New([(1,3),(4,5),(7,8)])\n-DataArrayInt.New(5)\n-DataArrayInt.New(5,2)";
-        std::string msg(msgBase);
-#ifdef WITH_NUMPY
-        msg+="\n-DataArrayInt.New(numpy array with dtype=int32)";
-#endif
-        msg+=" !";
+        const char *msg="MEDCoupling::DataArrayByte::New : Available API are : \n-DataArrayByte.New()\n--DataArrayByte.New([1,3,4])\n-DataArrayByte.New([1,3,4],3)\n-DataArrayByte.New([1,3,4,5],2,2)\n-DataArrayByte.New(5)\n-DataArrayByte.New(5,2) !";
         if(PyList_Check(elt0) || PyTuple_Check(elt0))
           {
             if(nbOfTuples)
               {
                 if(PyInt_Check(nbOfTuples))
                   {
-                    int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
+                    mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(nbOfTuples));
                     if(nbOfTuples1<0)
-                      throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive set of allocated memory !");
+                      throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
                     if(nbOfComp)
                       {
                         if(PyInt_Check(nbOfComp))
-                          {//DataArrayInt.New([1,3,4,5],2,2)
-                            int nbOfCompo=PyInt_AS_LONG(nbOfComp);
+                          {//DataArrayByte.New([1,3,4,5],2,2)
+                            mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfComp));
                             if(nbOfCompo<0)
-                              throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive number of components !");
-                            MCAuto<DataArrayInt> ret=DataArrayInt::New();
-                            std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
+                              throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
+                            MCAuto<DataArrayByte> ret=DataArrayByte::New();
+                            std::vector<mcIdType> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
                             return ret.retn();
                           }
                         else
-                          throw INTERP_KERNEL::Exception(msg.c_str());
+                          throw INTERP_KERNEL::Exception(msg);
                       }
                     else
-                      {//DataArrayInt.New([1,3,4],3)
-                        MCAuto<DataArrayInt> ret=DataArrayInt::New();
-                        int tmpp1=-1;
-                        std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
+                      {//DataArrayByte.New([1,3,4],3)
+                        MCAuto<DataArrayByte> ret=DataArrayByte::New();
+                        mcIdType tmpp1=-1;
+                        std::vector<mcIdType> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
                         return ret.retn();
                       }
                   }
                 else
-                  throw INTERP_KERNEL::Exception(msg.c_str());
+                  throw INTERP_KERNEL::Exception(msg);
               }
             else
-              {// DataArrayInt.New([1,3,4])
-                MCAuto<DataArrayInt> ret=DataArrayInt::New();
-                int tmpp1=-1,tmpp2=-1;
-                std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
+              {// DataArrayByte.New([1,3,4])
+                MCAuto<DataArrayByte> ret=DataArrayByte::New();
+                mcIdType tmpp1=-1,tmpp2=-1;
+                std::vector<mcIdType> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
                 ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
                 return ret.retn();
               }
           }
         else if(PyInt_Check(elt0))
           {
-            int nbOfTuples1=PyInt_AS_LONG(elt0);
+            mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(elt0));
             if(nbOfTuples1<0)
-              throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive set of allocated memory !");
+              throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
             if(nbOfTuples)
               {
                 if(!nbOfComp)
                   {
                     if(PyInt_Check(nbOfTuples))
-                      {//DataArrayInt.New(5,2)
-                        int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
+                      {//DataArrayByte.New(5,2)
+                        mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfTuples));
                         if(nbOfCompo<0)
-                          throw INTERP_KERNEL::Exception("DataArrayInt::New : should be a positive number of components !");
-                        MCAuto<DataArrayInt> ret=DataArrayInt::New();
+                          throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
+                        MCAuto<DataArrayByte> ret=DataArrayByte::New();
                         ret->alloc(nbOfTuples1,nbOfCompo);
                         return ret.retn();
                       }
                     else
-                      throw INTERP_KERNEL::Exception(msg.c_str());
+                      throw INTERP_KERNEL::Exception(msg);
                   }
                 else
-                  throw INTERP_KERNEL::Exception(msg.c_str());
+                  throw INTERP_KERNEL::Exception(msg);
               }
             else
-              {//DataArrayInt.New(5)
-                MCAuto<DataArrayInt> ret=DataArrayInt::New();
+              {//DataArrayByte.New(5)
+                MCAuto<DataArrayByte> ret=DataArrayByte::New();
                 ret->alloc(nbOfTuples1,1);
                 return ret.retn();
               }
           }
 #ifdef WITH_NUMPY
         else if(PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL)
-          {//DataArrayInt.New(numpyArray)
-            return BuildNewInstance<DataArrayInt,int>(elt0,NPY_INT32,&PyCallBackDataArrayInt_RefType,"INT32");
+          {//DataArrayDouble.New(numpyArray)
+            return BuildNewInstance<DataArrayByte,char>(elt0,NPY_INT8,&PyCallBackDataArrayChar_RefType,"INT8");
           }
 #endif
         else
-          throw INTERP_KERNEL::Exception(msg.c_str());
-        throw INTERP_KERNEL::Exception(msg.c_str());//to make g++ happy
+          throw INTERP_KERNEL::Exception(msg);
       }
 
-      DataArrayInt(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
+      DataArrayByte(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
         {
-          return MEDCoupling_DataArrayInt_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
+          return MEDCoupling_DataArrayByte_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
         }
-      
-      std::string __str__() const
+   
+      std::string __repr__() const
       {
-        return self->reprNotTooLong();
+        std::ostringstream oss;
+        self->reprQuickOverview(oss);
+        return oss.str();
       }
-
-      int __len__() const
+  
+      int __int__() const
       {
-        if(self->isAllocated())
-          {
-            return self->getNumberOfTuples();
-          }
-        else
-          {
-            throw INTERP_KERNEL::Exception("DataArrayInt::__len__ : Instance is NOT allocated !");
-          }
+        return (int) self->byteValue();
       }
 
-      int __int__() const
+      DataArrayByteIterator *__iter__()
       {
-        return self->intValue();
+        return self->iterator();
       }
 
-      DataArrayIntIterator *__iter__()
+      mcIdType getIJ(mcIdType tupleId, mcIdType compoId) const
       {
-        return self->iterator();
+        return (mcIdType)self->getIJ(tupleId,compoId);
       }
-   
-      PyObject *accumulate() const
+      
+      mcIdType getIJSafe(mcIdType tupleId, mcIdType compoId) const
       {
-        int sz=self->getNumberOfComponents();
-        INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
-        self->accumulate(tmp);
-        return convertIntArrToPyList(tmp,sz);
+        return (mcIdType)self->getIJSafe(tupleId,compoId);
       }
 
-      DataArrayInt *accumulatePerChunck(PyObject *indexArr) const
+      std::string __str__() const
       {
-        int sw,sz,val;
-        std::vector<int> val2;
-        const int *bg=convertIntStarLikePyObjToCppIntStar(indexArr,sw,sz,val,val2);
-        return self->accumulatePerChunck(bg,bg+sz);
+        return self->repr();
       }
 
-      DataArrayInt *findIdsEqualTuple(PyObject *inputTuple) const
+      PyObject *toStrList() const
       {
-        int sw,sz,val;
-        std::vector<int> val2;
-        const int *bg(convertIntStarLikePyObjToCppIntStar(inputTuple,sw,sz,val,val2));
-        return self->findIdsEqualTuple(bg,bg+sz);
+        const char *vals=self->getConstPointer();
+        std::size_t nbOfComp=self->getNumberOfComponents();
+        mcIdType nbOfTuples=self->getNumberOfTuples();
+        return convertCharArrToPyListOfTuple(vals,(int)nbOfComp,nbOfTuples);
       }
-
-      DataArrayInt *findIdForEach(PyObject *vals) const
+   
+      bool presenceOfTuple(PyObject *tupl) const
       {
-        int sw,sz,val;
-        std::vector<int> val2;
-        const int *bg(convertIntStarLikePyObjToCppIntStar(vals,sw,sz,val,val2));
-        MCAuto<DataArrayInt> ret(self->findIdForEach(bg,bg+sz));
-        return ret.retn();
+        mcIdType sz=-1,sw=-1;
+        mcIdType ival=-1; std::vector<mcIdType> ivval;
+        const mcIdType *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
+        std::vector<char> vals(sz);
+        std::copy(pt,pt+sz,vals.begin());
+        return self->presenceOfTuple(vals);
       }
 
-      PyObject *splitInBalancedSlices(int nbOfSlices) const
+      bool presenceOfValue(PyObject *vals) const
       {
-        std::vector< std::pair<int,int> > slcs(self->splitInBalancedSlices(nbOfSlices));
-        PyObject *ret=PyList_New(slcs.size());
-        for(std::size_t i=0;i<slcs.size();i++)
-          PyList_SetItem(ret,i,PySlice_New(PyInt_FromLong(slcs[i].first),PyInt_FromLong(slcs[i].second),PyInt_FromLong(1)));
-        return ret;
+        mcIdType sz=-1,sw=-1;
+        mcIdType ival=-1; std::vector<mcIdType> ivval;
+        const mcIdType *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
+        std::vector<char> vals2(sz);
+        std::copy(pt,pt+sz,vals2.begin());
+        return self->presenceOfValue(vals2);
       }
 
-      DataArrayInt *buildExplicitArrOfSliceOnScaledArr(PyObject *slic) const
+      mcIdType findIdFirstEqual(PyObject *vals) const
       {
-        if(!PySlice_Check(slic))
-          throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : expecting a pyslice as second (first) parameter !");
-        Py_ssize_t strt=2,stp=2,step=2;
-        GetIndicesOfSliceExplicitely(slic,&strt,&stp,&step,"DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice is invalid !");
-        if(strt==std::numeric_limits<int>::max() || stp==std::numeric_limits<int>::max())
-          throw INTERP_KERNEL::Exception("DataArrayInt::buildExplicitArrOfSliceOnScaledArr (wrap) : the input slice contains some unknowns that can't be determined in static method ! Call DataArray::getSlice (non static) instead !");
-        return self->buildExplicitArrOfSliceOnScaledArr(strt,stp,step);
+        mcIdType sz=-1,sw=-1;
+        mcIdType ival=-1; std::vector<mcIdType> ivval;
+        const mcIdType *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
+        std::vector<char> vals2(sz);
+        std::copy(pt,pt+sz,vals2.begin());
+        return self->findIdFirstEqual(vals2);
       }
 
-      PyObject *getMinMaxValues() const
+      mcIdType findIdFirstEqualTuple(PyObject *tupl) const
       {
-        int a,b;
-        self->getMinMaxValues(a,b);
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,PyInt_FromLong(a));
-        PyTuple_SetItem(ret,1,PyInt_FromLong(b));
-        return ret;
-      }
-   
-      static PyObject *ConvertIndexArrayToO2N(int nbOfOldTuples, PyObject *arr, PyObject *arrI)
-      {
-        int newNbOfTuples=-1;
-        int szArr,szArrI,sw,iTypppArr,iTypppArrI;
-        std::vector<int> stdvecTyyppArr,stdvecTyyppArrI;
-        const int *arrPtr=convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr);
-        const int *arrIPtr=convertIntStarLikePyObjToCppIntStar(arrI,sw,szArrI,iTypppArrI,stdvecTyyppArrI);
-        DataArrayInt *ret0=MEDCoupling::DataArrayInt::ConvertIndexArrayToO2N(nbOfOldTuples,arrPtr,arrIPtr,arrIPtr+szArrI,newNbOfTuples);
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj((void*)ret0,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
-        PyTuple_SetItem(ret,1,PyInt_FromLong(newNbOfTuples));
-        return ret;
+        mcIdType sz=-1,sw=-1;
+        mcIdType ival=-1; std::vector<mcIdType> ivval;
+        const mcIdType *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
+        std::vector<char> vals(sz);
+        std::copy(pt,pt+sz,vals.begin());
+        return self->findIdFirstEqualTuple(vals);
       }
 
-      static DataArrayInt *CheckAndPreparePermutation(PyObject *arr)
+      mcIdType findIdSequence(PyObject *strOrListOfInt) const
       {
-        MCAuto<DataArrayInt> ret(DataArrayInt::New());
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *arrPtr(convertIntStarLikePyObjToCppIntStar(arr,sw,szArr,iTypppArr,stdvecTyyppArr));
-        int *pt(MEDCoupling::DataArrayInt::CheckAndPreparePermutation(arrPtr,arrPtr+szArr));
-        ret->useArray(pt,true,MEDCoupling::DeallocType::C_DEALLOC,szArr,1);
-        return ret.retn();
+        mcIdType sz=-1,sw=-1;
+        mcIdType ival=-1; std::vector<mcIdType> ivval;
+        const mcIdType *pt=convertIntStarLikePyObjToCppIntStar(strOrListOfInt,sw,sz,ival,ivval);
+        std::vector<char> vals(sz);
+        std::copy(pt,pt+sz,vals.begin());
+        return self->findIdSequence(vals);
       }
 
-      void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
+      PyObject *getTuple(mcIdType tupleId)
       {
-        const char *msg="MEDCoupling::DataArrayInt::setValues : Available API are : \n-DataArrayInt.setValues([1,3,4])\n-DataArrayInt.setValues([1,3,4],3)\n-DataArrayInt.setValues([1,3,4,5],2,2)\n-DataArrayInt.New(5)\n !";
-        if(PyList_Check(li) || PyTuple_Check(li))
-          {
-            if(nbOfTuples && nbOfTuples != Py_None)
-              {
-                if(PyInt_Check(nbOfTuples))
-                  {
-                    int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
-                    if(nbOfTuples1<0)
-                      throw INTERP_KERNEL::Exception("DataArrayInt::setValue : should be a positive set of allocated memory !");
-                    if(nbOfComp && nbOfComp != Py_None)
-                      {
-                        if(PyInt_Check(nbOfComp))
-                          {//DataArrayInt.setValues([1,3,4,5],2,2)
-                            int nbOfCompo=PyInt_AS_LONG(nbOfComp);
-                            if(nbOfCompo<0)
-                              throw INTERP_KERNEL::Exception("DataArrayInt::setValue : should be a positive number of components !");
-                            std::vector<int> tmp=fillArrayWithPyListInt2(li,nbOfTuples1,nbOfCompo);
-                            self->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),self->getPointer());
-                          }
-                        else
-                          throw INTERP_KERNEL::Exception(msg);
-                      }
-                    else
-                      {//DataArrayInt.setValues([1,3,4],3)
-                        int tmpp1=-1;
-                        std::vector<int> tmp=fillArrayWithPyListInt2(li,nbOfTuples1,tmpp1);
-                        self->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),self->getPointer());
-                      }
-                  }
-                else
-                  throw INTERP_KERNEL::Exception(msg);
-              }
-            else
-              {// DataArrayInt.setValues([1,3,4])
-                int tmpp1=-1,tmpp2=-1;
-                std::vector<int> tmp=fillArrayWithPyListInt2(li,tmpp1,tmpp2);
-                self->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),self->getPointer());
-              }
-          }
-        else
-          throw INTERP_KERNEL::Exception(msg);
-      }
-
-      PyObject *getValues() const
-      {
-        const int *vals=self->getConstPointer();
-        return convertIntArrToPyList(vals,self->getNbOfElems());
-      }
-
-#ifdef WITH_NUMPY
-      PyObject *toNumPyArray() // not const. It is not a bug !
-      {
-        return ToNumPyArray<DataArrayInt,int>(self,NPY_INT32,"DataArrayInt");
-      }
-#endif
-
-      PyObject *isEqualIfNotWhy(const DataArrayInt& other) const
-      {
-        std::string ret1;
-        bool ret0=self->isEqualIfNotWhy(other,ret1);
-        PyObject *ret=PyTuple_New(2);
-        PyObject *ret0Py=ret0?Py_True:Py_False;
-        Py_XINCREF(ret0Py);
-        PyTuple_SetItem(ret,0,ret0Py);
-        PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
-        return ret;
-      }
-
-      PyObject *getValuesAsTuple() const
-      {
-        const int *vals=self->getConstPointer();
-        int nbOfComp=self->getNumberOfComponents();
-        int nbOfTuples=self->getNumberOfTuples();
-        return convertIntArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
-      }
-
-      static PyObject *MakePartition(PyObject *gps, int newNb)
-      {
-        std::vector<const DataArrayInt *> groups;
-        std::vector< std::vector<int> > fidsOfGroups;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(gps,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",groups);
-        MEDCoupling::DataArrayInt *ret0=MEDCoupling::DataArrayInt::MakePartition(groups,newNb,fidsOfGroups);
-        PyObject *ret = PyList_New(2);
-        PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        int sz=fidsOfGroups.size();
-        PyObject *ret1 = PyList_New(sz);
-        for(int i=0;i<sz;i++)
-          PyList_SetItem(ret1,i,convertIntArrToPyList2(fidsOfGroups[i]));
-        PyList_SetItem(ret,1,ret1);
-        return ret;
-      }
-
-      void transformWithIndArr(PyObject *li)
-      {
-        void *da=0;
-        int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 ));
-        if (!SWIG_IsOK(res1))
-          {
-            int res2(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__MapII, 0 |  0 ));
-            if(SWIG_IsOK(res2))
-              {
-                MapII *m=reinterpret_cast<MapII *>(da);
-                self->transformWithIndArr(*m);
-              }
-            else
-              {
-                int size;
-                INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-                self->transformWithIndArr(tmp,tmp+size);
-              }
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            self->transformWithIndArr(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
-          }
-      }
-
-      DataArrayInt *findIdsEqualList(PyObject *obj)
-      {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            return self->findIdsEqualList(&singleVal,&singleVal+1);
-          case 2:
-            return self->findIdsEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
-          case 4:
-            return self->findIdsEqualList(daIntTyypp->begin(),daIntTyypp->end());
-          default:
-            throw INTERP_KERNEL::Exception("DataArrayInt::findIdsEqualList : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
-          }
-      }
-
-      DataArrayInt *findIdsNotEqualList(PyObject *obj)
-      {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        convertIntStarOrSliceLikePyObjToCpp(obj,self->getNumberOfTuples(),sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            return self->findIdsNotEqualList(&singleVal,&singleVal+1);
-          case 2:
-            return self->findIdsNotEqualList(&multiVal[0],&multiVal[0]+multiVal.size());
-          case 4:
-            return self->findIdsNotEqualList(daIntTyypp->begin(),daIntTyypp->end());
-          default:
-            throw INTERP_KERNEL::Exception("DataArrayInt::findIdsNotEqualList : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
-          }
-      }
-
-      PyObject *splitByValueRange(PyObject *li) const
-      {
-        DataArrayInt *ret0=0,*ret1=0,*ret2=0;
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            self->splitByValueRange(tmp,(int *)tmp+size,ret0,ret1,ret2);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
-            da2->checkAllocated();
-            self->splitByValueRange(da2->begin(),da2->end(),ret0,ret1,ret2);
-          }
-        PyObject *ret = PyList_New(3);
-        PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyList_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyList_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        return ret;
-      }
-
-      DataArrayInt *transformWithIndArrR(PyObject *li) const
-      {
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            return self->transformWithIndArrR(tmp,tmp+size);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            return self->transformWithIndArrR(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems());
-          }
-      }
-
-      DataArrayInt *renumberAndReduce(PyObject *li, int newNbOfTuple)
-      {
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberAndReduce(tmp,newNbOfTuple);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
-            da2->checkAllocated();
-            int size=self->getNumberOfTuples();
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
-          }
-      }
-
-      DataArrayInt *renumber(PyObject *li)
-      {
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumber(tmp);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
-            da2->checkAllocated();
-            int size=self->getNumberOfTuples();
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumber(da2->getConstPointer());
-          }
-      }
-
-      DataArrayInt *renumberR(PyObject *li)
-      {
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberR(tmp);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
-            da2->checkAllocated();
-            int size=self->getNumberOfTuples();
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberR(da2->getConstPointer());
-          }
-      }
-
-      void setSelectedComponents(const DataArrayInt *a, PyObject *li)
-      {
-        std::vector<int> tmp;
-        convertPyToNewIntArr3(li,tmp);
-        self->setSelectedComponents(a,tmp);
-      }
-
-      PyObject *explodeComponents() const
-      {
-        std::vector< MCAuto<DataArrayInt> > retCpp(self->explodeComponents());
-        std::size_t sz(retCpp.size());
-        PyObject *res(PyList_New(sz));
-        for(std::size_t i=0;i<sz;i++)
-          PyList_SetItem(res,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i].retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        return res;
-      }
-
-      PyObject *getTuple(int tupleId)
-      {
-        int sz=self->getNumberOfComponents();
-        INTERP_KERNEL::AutoPtr<int> tmp=new int[sz];
-        self->getTuple(tupleId,tmp);
-        return convertIntArrToPyList(tmp,sz);
-      }
-
-      PyObject *changeSurjectiveFormat(int targetNb) const
-      {
-        DataArrayInt *arr=0;
-        DataArrayInt *arrI=0;
-        self->changeSurjectiveFormat(targetNb,arr,arrI);
-        PyObject *res = PyList_New(2);
-        PyList_SetItem(res,0,SWIG_NewPointerObj((void*)arr,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
-        PyList_SetItem(res,1,SWIG_NewPointerObj((void*)arrI,SWIGTYPE_p_MEDCoupling__DataArrayInt,SWIG_POINTER_OWN | 0));
-        return res;
-      }
-
-      static DataArrayInt *Meld(PyObject *li)
-      {
-        std::vector<const DataArrayInt *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
-        return DataArrayInt::Meld(tmp);
-      }
-
-      static DataArrayInt *Aggregate(PyObject *li)
-      {
-        std::vector<const DataArrayInt *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
-        return DataArrayInt::Aggregate(tmp);
-      }
-
-      static DataArrayInt *AggregateIndexes(PyObject *li)
-      {
-        std::vector<const DataArrayInt *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
-        return DataArrayInt::AggregateIndexes(tmp);
-      }
-
-      static DataArrayInt *BuildUnion(PyObject *li)
-      {
-        std::vector<const DataArrayInt *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
-        return DataArrayInt::BuildUnion(tmp);
-      }
-
-      static DataArrayInt *BuildIntersection(PyObject *li)
-      {
-        std::vector<const DataArrayInt *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",tmp);
-        return DataArrayInt::BuildIntersection(tmp);
-      }
-
-      PyObject *getMaxValue() const
-      {
-        int tmp;
-        int r1=self->getMaxValue(tmp);
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
-        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
-        return ret;
-      }
-    
-      PyObject *getMaxAbsValue(std::size_t& tupleId) const
-      {
-       std::size_t tmp;
-        int r1=self->getMaxAbsValue(tmp);
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
-        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
-        return ret;
-      }
-
-      PyObject *getMinValue() const
-      {
-        int tmp;
-        int r1=self->getMinValue(tmp);
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
-        PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
-        return ret;
-      }
-
-      int index(PyObject *obj) const
-      {
-        int nbOfCompo=self->getNumberOfComponents();
-        switch(nbOfCompo)
-          {
-          case 1:
-            {
-              if(PyInt_Check(obj))
-                {
-                  int val=(int)PyInt_AS_LONG(obj);
-                  return self->findIdFirstEqual(val);
-                }
-              else
-                throw INTERP_KERNEL::Exception("DataArrayInt::index : 'this' contains one component and trying to find an element which is not an integer !");
-            }
-          default:
-            {
-              std::vector<int> arr;
-              convertPyToNewIntArr3(obj,arr);
-              return self->findIdFirstEqualTuple(arr);
-            }
-          }
-      }
-
-      bool __contains__(PyObject *obj) const
-      {
-        int nbOfCompo=self->getNumberOfComponents();
-        switch(nbOfCompo)
-          {
-          case 0:
-            return false;
-          case 1:
-            {
-              if(PyInt_Check(obj))
-                {
-                  int val=(int)PyInt_AS_LONG(obj);
-                  return self->presenceOfValue(val);
-                }
-              else
-                throw INTERP_KERNEL::Exception("DataArrayInt::__contains__ : 'this' contains one component and trying to find an element which is not an integer !");
-            }
-          default:
-            {
-              std::vector<int> arr;
-              convertPyToNewIntArr3(obj,arr);
-              return self->presenceOfTuple(arr);
-            }
-          }
-      }
-
-      PyObject *__getitem__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in DataArrayInt::__getitem__ !";
-        const char msg2[]="DataArrayInt::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
-        self->checkAllocated();
-        int nbOfTuples=self->getNumberOfTuples();
-        int nbOfComponents=self->getNumberOfComponents();
-        int it1,ic1;
-        std::vector<int> vt1,vc1;
-        std::pair<int, std::pair<int,int> > pt1,pc1;
-        DataArrayInt *dt1=0,*dc1=0;
-        int sw;
-        convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
-        MCAuto<DataArrayInt> ret;
-        switch(sw)
-          {
-          case 1:
-            {
-              if(nbOfComponents==1)
-                return PyInt_FromLong(self->getIJSafe(it1,0));
-              return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&it1,&it1+1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 2:
-            return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size())),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-          case 3:
-            return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-          case 4:
-            return SWIG_NewPointerObj(SWIG_as_voidptr(self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems())),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-          case 5:
-            return PyInt_FromLong(self->getIJSafe(it1,ic1));
-          case 6:
-            {
-              ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
-              std::vector<int> v2(1,ic1);
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 7:
-            {
-              ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
-              std::vector<int> v2(1,ic1);
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 8:
-            {
-              ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
-              std::vector<int> v2(1,ic1);
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 9:
-            {
-              ret=self->selectByTupleIdSafe(&it1,&it1+1);
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 10:
-            {
-              ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 11:
-            {
-              ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 12:
-            {
-              ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(vc1)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 13:
-            {
-              ret=self->selectByTupleIdSafe(&it1,&it1+1);
-              int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
-              std::vector<int> v2(nbOfComp);
-              for(int i=0;i<nbOfComp;i++)
-                v2[i]=pc1.first+i*pc1.second.second;
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 14:
-            {
-              ret=self->selectByTupleIdSafe(&vt1[0],&vt1[0]+vt1.size());
-              int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
-              std::vector<int> v2(nbOfComp);
-              for(int i=0;i<nbOfComp;i++)
-                v2[i]=pc1.first+i*pc1.second.second;
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 15:
-            {
-              ret=self->selectByTupleIdSafeSlice(pt1.first,pt1.second.first,pt1.second.second);
-              int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
-              std::vector<int> v2(nbOfComp);
-              for(int i=0;i<nbOfComp;i++)
-                v2[i]=pc1.first+i*pc1.second.second;
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          case 16:
-            {
-              ret=self->selectByTupleIdSafe(dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems());
-              int nbOfComp=DataArray::GetNumberOfItemGivenBESRelative(pc1.first,pc1.second.first,pc1.second.second,msg2);
-              std::vector<int> v2(nbOfComp);
-              for(int i=0;i<nbOfComp;i++)
-                v2[i]=pc1.first+i*pc1.second.second;
-              return SWIG_NewPointerObj(SWIG_as_voidptr(ret->keepSelectedComponents(v2)),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__setitem__(PyObject *obj, PyObject *value)
-      {
-        self->checkAllocated();
-        const char msg[]="Unexpected situation in __setitem__ !";
-        int nbOfTuples=self->getNumberOfTuples();
-        int nbOfComponents=self->getNumberOfComponents();
-        int sw1,sw2;
-        int i1;
-        std::vector<int> v1;
-        DataArrayInt *d1=0;
-        DataArrayIntTuple *dd1=0;
-        convertIntStarLikePyObjToCpp(value,sw1,i1,v1,d1,dd1);
-        int it1,ic1;
-        std::vector<int> vt1,vc1;
-        std::pair<int, std::pair<int,int> > pt1,pc1;
-        DataArrayInt *dt1=0,*dc1=0;
-        convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
-        MCAuto<DataArrayInt> tmp;
-        switch(sw2)
-          {
-          case 1:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple1(i1,it1,it1+1,1,0,nbOfComponents,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues1(d1,it1,it1+1,1,0,nbOfComponents,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues1(tmp,it1,it1+1,1,0,nbOfComponents,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 2:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),0,nbOfComponents,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 3:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,0,nbOfComponents,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 4:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),0,nbOfComponents,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 5:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple1(i1,it1,it1+1,1,ic1,ic1+1,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues1(d1,it1,it1+1,1,ic1,ic1+1,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues1(tmp,it1,it1+1,1,ic1,ic1+1,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 6:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),ic1,ic1+1,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 7:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,ic1,ic1+1,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 8:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),ic1,ic1+1,1);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 9:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple2(i1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size(),false);
-                  return self;
-                case 3:
-                  self->setPartOfValues2(d1,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues2(tmp,&it1,&it1+1,&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 10:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple2(i1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size(),false);
-                  return self;
-                case 3:
-                  self->setPartOfValues2(d1,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues2(tmp,&vt1[0],&vt1[0]+vt1.size(),&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 11:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple4(i1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size(),false);
-                  return self;
-                case 3:
-                  self->setPartOfValues4(d1,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues4(tmp,pt1.first,pt1.second.first,pt1.second.second,&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 12:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple2(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size(),false);
-                  return self;
-                case 3:
-                  self->setPartOfValues2(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues2(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),&vc1[0],&vc1[0]+vc1.size());
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 13:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple1(i1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues1(d1,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues1(tmp,it1,it1+1,1,pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 14:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple3(i1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues3(d1,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues3(tmp,&vt1[0],&vt1[0]+vt1.size(),pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 15:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple1(i1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues1(d1,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues1(tmp,pt1.first,pt1.second.first,pt1.second.second,pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          case 16:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  self->setPartOfValuesSimple3(i1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 2:
-                  tmp=DataArrayInt::New();
-                  tmp->useArray(&v1[0],false,DeallocType::CPP_DEALLOC,1,v1.size());
-                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second,false);
-                  return self;
-                case 3:
-                  self->setPartOfValues3(d1,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                case 4:
-                  tmp=dd1->buildDAInt(1,self->getNumberOfComponents());
-                  self->setPartOfValues3(tmp,dt1->getConstPointer(),dt1->getConstPointer()+dt1->getNbOfElems(),pc1.first,pc1.second.first,pc1.second.second);
-                  return self;
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-              break;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-        return self;
-      }
-
-      DataArrayInt *__neg__() const
-      {
-        return self->negate();
-      }
-      DataArrayInt *__add__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __add__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyLin(1,val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Add(self,aaaa);
-            }
-          case 3:
-            {
-              return DataArrayInt::Add(self,a);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Add(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__radd__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __radd__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyLin(1,val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Add(self,aaaa);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Add(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      PyObject *___iadd___(PyObject *trueSelf, PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __iadd__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyLin(1,val);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              self->addEqual(bb);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              self->addEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              self->addEqual(aaaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__sub__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __sub__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyLin(1,-val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Substract(self,aaaa);
-            }
-          case 3:
-            {
-              return DataArrayInt::Substract(self,a);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Substract(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__rsub__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __rsub__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyLin(-1,val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Substract(aaaa,self);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Substract(aaaa,self);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      PyObject *___isub___(PyObject *trueSelf, PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __isub__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyLin(1,-val);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              self->substractEqual(bb);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              self->substractEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              self->substractEqual(aaaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__mul__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __mul__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyLin(val,0);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Multiply(self,aaaa);
-            }
-          case 3:
-            {
-              return DataArrayInt::Multiply(self,a);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Multiply(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__rmul__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __rmul__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyLin(val,0);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Multiply(self,aaaa);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Multiply(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      PyObject *___imul___(PyObject *trueSelf, PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __imul__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyLin(val,0);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              self->multiplyEqual(bb);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              self->multiplyEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              self->multiplyEqual(aaaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__div__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __div__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyDivideBy(val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Divide(self,aaaa);
-            }
-          case 3:
-            {
-              return DataArrayInt::Divide(self,a);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Divide(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__rdiv__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __rdiv__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyInv(val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Divide(aaaa,self);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Divide(aaaa,self);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      PyObject *___idiv___(PyObject *trueSelf, PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __idiv__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyDivideBy(val);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> bb=DataArrayInt::New(); bb->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              self->divideEqual(bb);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              self->divideEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              self->divideEqual(aaaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__mod__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __mod__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyModulus(val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Modulus(self,aaaa);
-            }
-          case 3:
-            {
-              return DataArrayInt::Modulus(self,a);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Modulus(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__rmod__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __rmod__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyRModulus(val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Modulus(aaaa,self);
-            }
-          case 3:
-            {
-              return DataArrayInt::Modulus(a,self);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Modulus(aaaa,self);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      PyObject *___imod___(PyObject *trueSelf, PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __imod__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyModulus(val);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              self->modulusEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              self->modulusEqual(aaaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__pow__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __pow__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyPow(val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Pow(self,aaaa);
-            }
-          case 3:
-            {
-              return DataArrayInt::Pow(self,a);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Pow(self,aaaa);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      DataArrayInt *__rpow__(PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __rpow__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              MCAuto<DataArrayInt> ret=self->deepCopy();
-              ret->applyRPow(val);
-              return ret.retn();
-            }
-          case 2:
-            {
-              MCAuto<DataArrayInt> aaaa=DataArrayInt::New(); aaaa->useArray(&aa[0],false,DeallocType::CPP_DEALLOC,1,(int)aa.size());
-              return DataArrayInt::Pow(aaaa,self);
-            }
-          case 3:
-            {
-              return DataArrayInt::Pow(a,self);
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              return DataArrayInt::Pow(aaaa,self);
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-   
-      PyObject *___ipow___(PyObject *trueSelf, PyObject *obj)
-      {
-        const char msg[]="Unexpected situation in __ipow__ !";
-        int val;
-        DataArrayInt *a;
-        std::vector<int> aa;
-        DataArrayIntTuple *aaa;
-        int sw;
-        convertIntStarLikePyObjToCpp(obj,sw,val,aa,a,aaa);
-        switch(sw)
-          {
-          case 1:
-            {
-              self->applyPow(val);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 3:
-            {
-              self->powEqual(a);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          case 4:
-            {
-              MCAuto<DataArrayInt> aaaa=aaa->buildDAInt(1,self->getNumberOfComponents());
-              self->powEqual(aaaa);
-              Py_XINCREF(trueSelf);
-              return trueSelf;
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-
-      std::string __repr__() const
-      {
-        std::ostringstream oss;
-        self->reprQuickOverview(oss);
-        return oss.str();
-      }
-      
-      void pushBackValsSilent(PyObject *li)
-      {
-        int szArr,sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        const int *tmp=convertIntStarLikePyObjToCppIntStar(li,sw,szArr,iTypppArr,stdvecTyyppArr);
-        self->pushBackValsSilent(tmp,tmp+szArr);
-      }
-      
-      PyObject *partitionByDifferentValues() const
-      {
-        std::vector<int> ret1;
-        std::vector<DataArrayInt *> ret0=self->partitionByDifferentValues(ret1);
-        std::size_t sz=ret0.size();
-        PyObject *pyRet=PyTuple_New(2);
-        PyObject *pyRet0=PyList_New((int)sz);
-        PyObject *pyRet1=PyList_New((int)sz);
-        for(std::size_t i=0;i<sz;i++)
-          {
-            PyList_SetItem(pyRet0,i,SWIG_NewPointerObj(SWIG_as_voidptr(ret0[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-            PyList_SetItem(pyRet1,i,PyInt_FromLong(ret1[i]));
-          }
-        PyTuple_SetItem(pyRet,0,pyRet0);
-        PyTuple_SetItem(pyRet,1,pyRet1);
-        return pyRet;
-      }
-      
-      PyObject *findIdsRangesInListOfIds(const DataArrayInt *listOfIds) const
-      {
-        DataArrayInt *ret0=0,*ret1=0;
-        self->findIdsRangesInListOfIds(listOfIds,ret0,ret1);
-        PyObject *pyRet=PyTuple_New(2);
-        PyTuple_SetItem(pyRet,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(pyRet,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        return pyRet;
-      }
-
-      PyObject *isRange() const
-      {
-        int a(0),b(0),c(0);
-        bool ret(self->isRange(a,b,c));
-        PyObject *pyRet=PyTuple_New(2);
-        PyObject *ret0Py=ret?Py_True:Py_False,*ret1Py(0);
-        Py_XINCREF(ret0Py);
-        PyTuple_SetItem(pyRet,0,ret0Py);
-        if(ret)
-          ret1Py=PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(c));
-        else
-          {
-            ret1Py=Py_None;
-            Py_XINCREF(ret1Py);
-          }
-        PyTuple_SetItem(pyRet,1,ret1Py);
-        return pyRet;
-      }
-
-      static bool RemoveIdsFromIndexedArrays(PyObject *li, DataArrayInt *arr, DataArrayInt *arrIndx, int offsetForRemoval=0) throw(INTERP_KERNEL::Exception)
-      {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        if(!arrIndx)
-          throw INTERP_KERNEL::Exception("DataArrayInt::RemoveIdsFromIndexedArrays : null pointer as arrIndex !");
-        convertIntStarOrSliceLikePyObjToCpp(li,arrIndx->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            return DataArrayInt::RemoveIdsFromIndexedArrays(&singleVal,&singleVal+1,arr,arrIndx,offsetForRemoval);
-          case 2:
-            return DataArrayInt::RemoveIdsFromIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arr,arrIndx,offsetForRemoval);
-          case 4:
-            return DataArrayInt::RemoveIdsFromIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arr,arrIndx,offsetForRemoval);
-          default:
-            throw INTERP_KERNEL::Exception("MEDCouplingUMesh::RemoveIdsFromIndexedArrays : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
-          }
-      }
-
-      static PyObject *ExtractFromIndexedArrays(PyObject *li, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
-      {
-        DataArrayInt *arrOut=0,*arrIndexOut=0;
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        if(!arrIndxIn)
-          throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : null pointer as arrIndxIn !");
-        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            {
-              DataArrayInt::ExtractFromIndexedArrays(&singleVal,&singleVal+1,arrIn,arrIndxIn,arrOut,arrIndexOut);
-              break;
-            }
-          case 2:
-            {
-              DataArrayInt::ExtractFromIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,arrOut,arrIndexOut);
-              break;
-            }
-          case 4:
-            {
-              DataArrayInt::ExtractFromIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,arrOut,arrIndexOut);
-              break;
-            }
-          default:
-            throw INTERP_KERNEL::Exception("DataArrayInt::ExtractFromIndexedArrays : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
-          }
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        return ret;
-      }
-
-      static PyObject *ExtractFromIndexedArraysSlice(int strt, int stp, int step, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
-      {
-        DataArrayInt *arrOut=0,*arrIndexOut=0;
-        DataArrayInt::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        return ret;
-      }
-
-      static PyObject *ExtractFromIndexedArraysSlice(PyObject *slic, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
-      {
-        if(!PySlice_Check(slic))
-          throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : the first param is not a pyslice !");
-        Py_ssize_t strt=2,stp=2,step=2;
-        if(!arrIndxIn)
-          throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : last array is null !");
-        arrIndxIn->checkAllocated();
-        if(arrIndxIn->getNumberOfComponents()!=1)
-          throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : number of components of last argument must be equal to one !");
-        GetIndicesOfSlice(slic,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step,"ExtractFromIndexedArraysSlice (wrap) : Invalid slice regarding nb of elements !");
-        DataArrayInt *arrOut=0,*arrIndexOut=0;
-        DataArrayInt::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        return ret;
-      }
-
-      static PyObject *SetPartOfIndexedArrays(PyObject *li,
-                                              const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                              const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex) throw(INTERP_KERNEL::Exception)
-      {
-        DataArrayInt *arrOut=0,*arrIndexOut=0;
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        if(!arrIndxIn)
-          throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArrays : null pointer as arrIndex !");
-        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            {
-              DataArrayInt::SetPartOfIndexedArrays(&singleVal,&singleVal+1,arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
-              break;
-            }
-          case 2:
-            {
-              DataArrayInt::SetPartOfIndexedArrays(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
-              break;
-            }
-          case 4:
-            {
-              DataArrayInt::SetPartOfIndexedArrays(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,srcArr,srcArrIndex,arrOut,arrIndexOut);
-              break;
-            }
-          default:
-            throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArrays : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
-          }
-        PyObject *ret=PyTuple_New(2);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-        return ret;
-      }
-
-      static void SetPartOfIndexedArraysSameIdx(PyObject *li, DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
-                                                const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex) throw(INTERP_KERNEL::Exception)
-      {
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        if(!arrIndxIn)
-          throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSameIdx : null pointer as arrIndex !");
-        convertIntStarOrSliceLikePyObjToCpp(li,arrIndxIn->getNumberOfTuples()-1,sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            {
-              DataArrayInt::SetPartOfIndexedArraysSameIdx(&singleVal,&singleVal+1,arrIn,arrIndxIn,srcArr,srcArrIndex);
-              break;
-            }
-          case 2:
-            {
-              DataArrayInt::SetPartOfIndexedArraysSameIdx(&multiVal[0],&multiVal[0]+multiVal.size(),arrIn,arrIndxIn,srcArr,srcArrIndex);
-              break;
-            }
-          case 4:
-            {
-              DataArrayInt::SetPartOfIndexedArraysSameIdx(daIntTyypp->begin(),daIntTyypp->end(),arrIn,arrIndxIn,srcArr,srcArrIndex);
-              break;
-            }
-          default:
-            throw INTERP_KERNEL::Exception("DataArrayInt::SetPartOfIndexedArraysSameIdx : unrecognized type entered, expected list of int, tuple of int or DataArrayInt !");
-          }
-      }
-
-    } // end extent
-  };
-
-  class DataArrayIntTuple;
-
-  class DataArrayIntIterator
-  {
-  public:
-    DataArrayIntIterator(DataArrayInt *da);
-    ~DataArrayIntIterator();
-    %extend
-    {
-      PyObject *next()
-      {
-        DataArrayIntTuple *ret=self->nextt();
-        if(ret)
-          return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayIntTuple,SWIG_POINTER_OWN | 0);
-        else
-          {
-            PyErr_SetString(PyExc_StopIteration,"No more data.");
-            return 0;
-          }
-      }
-    }
-  };
-
-  class DataArrayIntTuple
-  {
-  public:
-    int getNumberOfCompo() const;
-    DataArrayInt *buildDAInt(int nbOfTuples, int nbOfCompo) const;
-    %extend
-    {
-      std::string __str__() const
-      {
-        return self->repr();
-      }
-
-      int __int__() const
-      {
-        return self->intValue();
-      }
-
-      DataArrayInt *buildDAInt()
-      {
-        return self->buildDAInt(1,self->getNumberOfCompo());
-      }
-
-      PyObject *___iadd___(PyObject *trueSelf, PyObject *obj)
-      {
-        MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
-        MEDCoupling_DataArrayInt____iadd___(ret,0,obj);
-        Py_XINCREF(trueSelf);
-        return trueSelf;
-      }
-  
-      PyObject *___isub___(PyObject *trueSelf, PyObject *obj)
-      {
-        MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
-        MEDCoupling_DataArrayInt____isub___(ret,0,obj);
-        Py_XINCREF(trueSelf);
-        return trueSelf;
-      }
-  
-      PyObject *___imul___(PyObject *trueSelf, PyObject *obj)
-      {
-        MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
-        MEDCoupling_DataArrayInt____imul___(ret,0,obj);
-        Py_XINCREF(trueSelf);
-        return trueSelf;
-      }
-      PyObject *___idiv___(PyObject *trueSelf, PyObject *obj)
-      {
-        MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
-        MEDCoupling_DataArrayInt____idiv___(ret,0,obj);
-        Py_XINCREF(trueSelf);
-        return trueSelf;
-      }
-
-      PyObject *___imod___(PyObject *trueSelf, PyObject *obj)
-      {
-        MCAuto<DataArrayInt> ret=self->buildDAInt(1,self->getNumberOfCompo());
-        MEDCoupling_DataArrayInt____imod___(ret,0,obj);
-        Py_XINCREF(trueSelf);
-        return trueSelf;
-      }
-
-      PyObject *__len__()
-      {
-        return PyInt_FromLong(self->getNumberOfCompo());
-      }
-  
-      PyObject *__getitem__(PyObject *obj)
-      {
-        const char msg2[]="DataArrayIntTuple::__getitem__ : Mismatch of slice values in 2nd parameter (components) !";
-        int sw;
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        const int *pt=self->getConstPointer();
-        int nbc=self->getNumberOfCompo();
-        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw)
-          {
-          case 1:
-            {
-              if(singleVal>=nbc)
-                {
-                  std::ostringstream oss;
-                  oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
-                  PyErr_SetString(PyExc_StopIteration,oss.str().c_str());
-                  return 0;
-                }
-              if(singleVal>=0)
-                return PyInt_FromLong(pt[singleVal]);
-              else
-                {
-                  if(nbc+singleVal>0)
-                    return PyInt_FromLong(pt[nbc+singleVal]);
-                  else
-                    {
-                      std::ostringstream oss;
-                      oss << "Requesting for id " << singleVal << " having only " << nbc << " components !";
-                      throw INTERP_KERNEL::Exception(oss.str().c_str());
-                    }
-                }
-            }
-          case 2:
-            {
-              PyObject *t=PyTuple_New(multiVal.size());
-              for(int j=0;j<(int)multiVal.size();j++)
-                {
-                  int cid=multiVal[j];
-                  if(cid>=nbc)
-                    {
-                      std::ostringstream oss;
-                      oss << "Requesting for id #" << cid << " having only " << nbc << " components !";
-                      throw INTERP_KERNEL::Exception(oss.str().c_str());
-                    }
-                  PyTuple_SetItem(t,j,PyInt_FromLong(pt[cid]));
-                }
-              return t;
-            }
-          case 3:
-            {
-              int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
-              PyObject *t=PyTuple_New(sz);
-              for(int j=0;j<sz;j++)
-                PyTuple_SetItem(t,j,PyInt_FromLong(pt[slic.first+j*slic.second.second]));
-              return t;
-            }
-          default:
-            throw INTERP_KERNEL::Exception("DataArrayIntTuple::__getitem__ : unrecognized type entered !");
-          }
-      }
-
-      DataArrayIntTuple *__setitem__(PyObject *obj, PyObject *value)
-      {
-        const char msg[]="DataArrayIntTuple::__setitem__ : unrecognized type entered, int, slice, list<int>, tuple<int> !";
-        const char msg2[]="DataArrayIntTuple::__setitem__ : Mismatch of slice values in 2nd parameter (components) !";
-        int sw1,sw2;
-        int singleValV;
-        std::vector<int> multiValV;
-        std::pair<int, std::pair<int,int> > slicV;
-        MEDCoupling::DataArrayIntTuple *daIntTyyppV=0;
-        int nbc=self->getNumberOfCompo();
-        convertObjToPossibleCpp22(value,nbc,sw1,singleValV,multiValV,slicV,daIntTyyppV);
-        int singleVal;
-        std::vector<int> multiVal;
-        std::pair<int, std::pair<int,int> > slic;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        int *pt=self->getPointer();
-        convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbc,sw2,singleVal,multiVal,slic,daIntTyypp);
-        switch(sw2)
-          {
-          case 1:
-            {
-              if(singleVal>=nbc)
-                {
-                  std::ostringstream oss;
-                  oss << "Requesting for setting id # " << singleVal << " having only " << nbc << " components !";
-                  throw INTERP_KERNEL::Exception(oss.str().c_str());
-                }
-              switch(sw1)
-                {
-                case 1:
-                  {
-                    pt[singleVal]=singleValV;
-                    return self;
-                  }
-                case 2:
-                  {
-                    if(multiValV.size()!=1)
-                      {
-                        std::ostringstream oss;
-                        oss << "Requesting for setting id # " << singleVal << " with a list or tuple with size != 1 ! ";
-                        throw INTERP_KERNEL::Exception(oss.str().c_str());
-                      }
-                    pt[singleVal]=multiValV[0];
-                    return self;
-                  }
-                case 4:
-                  {
-                    pt[singleVal]=daIntTyyppV->getConstPointer()[0];
-                    return self;
-                  }
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-            }
-          case 2:
-            {
-              switch(sw1)
-                {
-                case 1:
-                  {
-                    for(std::vector<int>::const_iterator it=multiVal.begin();it!=multiVal.end();it++)
-                      {
-                        if(*it>=nbc)
-                          {
-                            std::ostringstream oss;
-                            oss << "Requesting for setting id # " << *it << " having only " << nbc << " components !";
-                            throw INTERP_KERNEL::Exception(oss.str().c_str());
-                          }
-                        pt[*it]=singleValV;
-                      }
-                    return self;
-                  }
-                case 2:
-                  {
-                    if(multiVal.size()!=multiValV.size())
-                      {
-                        std::ostringstream oss;
-                        oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << multiVal.size() << " !";
-                        throw INTERP_KERNEL::Exception(oss.str().c_str());
-                      }
-                    for(int i=0;i<(int)multiVal.size();i++)
-                      {
-                        int pos=multiVal[i];
-                        if(pos>=nbc)
-                          {
-                            std::ostringstream oss;
-                            oss << "Requesting for setting id # " << pos << " having only " << nbc << " components !";
-                            throw INTERP_KERNEL::Exception(oss.str().c_str());
-                          }
-                        pt[multiVal[i]]=multiValV[i];
-                      }
-                    return self;
-                  }
-                case 4:
-                  {
-                    const int *ptV=daIntTyyppV->getConstPointer();
-                    if(nbc>daIntTyyppV->getNumberOfCompo())
-                      {
-                        std::ostringstream oss;
-                        oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
-                        throw INTERP_KERNEL::Exception(oss.str().c_str());
-                      }
-                    std::copy(ptV,ptV+nbc,pt);
-                    return self;
-                  }
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-            }
-          case 3:
-            {
-              int sz=DataArray::GetNumberOfItemGivenBES(slic.first,slic.second.first,slic.second.second,msg2);
-              switch(sw1)
-                {
-                case 1:
-                  {
-                    for(int j=0;j<sz;j++)
-                      pt[slic.first+j*slic.second.second]=singleValV;
-                    return self;
-                  }
-                case 2:
-                  {
-                    if(sz!=(int)multiValV.size())
-                      {
-                        std::ostringstream oss;
-                        oss << "Mismatch length of during assignment : " << multiValV.size() << " != " << sz << " !";
-                        throw INTERP_KERNEL::Exception(oss.str().c_str());
-                      }
-                    for(int j=0;j<sz;j++)
-                      pt[slic.first+j*slic.second.second]=multiValV[j];
-                    return self;
-                  }
-                case 4:
-                  {
-                    const int *ptV=daIntTyyppV->getConstPointer();
-                    if(sz>daIntTyyppV->getNumberOfCompo())
-                      {
-                        std::ostringstream oss;
-                        oss << "Mismatch length of during assignment : " << nbc << " != " << daIntTyyppV->getNumberOfCompo() << " !";
-                        throw INTERP_KERNEL::Exception(oss.str().c_str());
-                      }
-                    for(int j=0;j<sz;j++)
-                      pt[slic.first+j*slic.second.second]=ptV[j];
-                    return self;
-                  }
-                default:
-                  throw INTERP_KERNEL::Exception(msg);
-                }
-            }
-          default:
-            throw INTERP_KERNEL::Exception(msg);
-          }
-      }
-    }
-  };
-
-  class DataArrayChar : public DataArray
-  {
-  public:
-    virtual DataArrayChar *buildEmptySpecializedDAChar() const;
-    int getHashCode() const;
-    bool empty() const;
-    void deepCopyFrom(const DataArrayChar& other);
-    void reserve(std::size_t nbOfElems);
-    void pushBackSilent(char val);
-    char popBackSilent();
-    void pack() const;
-    void allocIfNecessary(int nbOfTuple, int nbOfCompo);
-    bool isEqual(const DataArrayChar& other) const;
-    bool isEqualWithoutConsideringStr(const DataArrayChar& other) const;
-    void reverse();
-    void fillWithZero();
-    void fillWithValue(char val);
-    std::string repr() const;
-    std::string reprZip() const;
-    DataArrayInt *convertToIntArr() const;
-    DataArrayChar *renumber(const int *old2New) const;
-    DataArrayChar *renumberR(const int *new2Old) const;
-    DataArrayChar *renumberAndReduce(const int *old2NewBg, int newNbOfTuple) const;
-    bool isUniform(char val) const;
-    void sort(bool asc=true);
-    DataArrayChar *subArray(int tupleIdBg, int tupleIdEnd=-1) const;
-    DataArrayChar *changeNbOfComponents(int newNbOfComp, char dftValue) const;
-    void meldWith(const DataArrayChar *other);
-    void setPartOfValuesAdv(const DataArrayChar *a, const DataArrayInt *tuplesSelec);
-    char front() const;
-    char back() const;
-    void setIJ(int tupleId, int compoId, char newVal);
-    void setIJSilent(int tupleId, int compoId, char newVal);
-    char *getPointer();
-    DataArrayInt *findIdsEqual(char val) const;
-    DataArrayInt *findIdsNotEqual(char val) const;
-    int findIdFirstEqualTuple(const std::vector<char>& tupl) const;
-    bool presenceOfTuple(const std::vector<char>& tupl) const;
-    char getMaxValue(int& tupleId) const;
-    char getMaxValueInArray() const;
-    char getMinValue(int& tupleId) const;
-    char getMinValueInArray() const;
-    DataArrayInt *findIdsInRange(char vmin, char vmax) const;
-    static DataArrayChar *Aggregate(const DataArrayChar *a1, const DataArrayChar *a2);
-    static DataArrayChar *Meld(const DataArrayChar *a1, const DataArrayChar *a2);
-    %extend
-    {
-      int __len__() const
-      {
-        if(self->isAllocated())
-          {
-            return self->getNumberOfTuples();
-          }
-        else
-          {
-            throw INTERP_KERNEL::Exception("DataArrayChar::__len__ : Instance is NOT allocated !");
-          }
-      }
-      
-      PyObject *isEqualIfNotWhy(const DataArrayChar& other) const
-      {
-        std::string ret1;
-        bool ret0=self->isEqualIfNotWhy(other,ret1);
-        PyObject *ret=PyTuple_New(2);
-        PyObject *ret0Py=ret0?Py_True:Py_False;
-        Py_XINCREF(ret0Py);
-        PyTuple_SetItem(ret,0,ret0Py);
-        PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
-        return ret;
-      }
-      
-      DataArrayChar *renumber(PyObject *li)
-      {
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumber(tmp);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
-            da2->checkAllocated();
-            int size=self->getNumberOfTuples();
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumber(da2->getConstPointer());
-          }
-      }
-      
-      DataArrayChar *renumberR(PyObject *li)
-      {
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberR(tmp);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
-            da2->checkAllocated();
-            int size=self->getNumberOfTuples();
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberR(da2->getConstPointer());
-          }
-      }
-      
-      DataArrayChar *renumberAndReduce(PyObject *li, int newNbOfTuple)
-      {
-        void *da=0;
-        int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 |  0 );
-        if (!SWIG_IsOK(res1))
-          {
-            int size;
-            INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberAndReduce(tmp,newNbOfTuple);
-          }
-        else
-          {
-            DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
-            if(!da2)
-              throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
-            da2->checkAllocated();
-            int size=self->getNumberOfTuples();
-            if(size!=self->getNumberOfTuples())
-              {
-                throw INTERP_KERNEL::Exception("Invalid list length ! Must be equal to number of tuples !");
-              }
-            return self->renumberAndReduce(da2->getConstPointer(),newNbOfTuple);
-          }
-      }
-      
-      static DataArrayChar *Aggregate(PyObject *dachs)
-      {
-        std::vector<const MEDCoupling::DataArrayChar *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayChar *>(dachs,SWIGTYPE_p_MEDCoupling__DataArrayChar,"DataArrayChar",tmp);
-        return DataArrayChar::Aggregate(tmp);
-      }
-      
-      static DataArrayChar *Meld(PyObject *dachs)
-      {
-        std::vector<const MEDCoupling::DataArrayChar *> tmp;
-        convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayChar *>(dachs,SWIGTYPE_p_MEDCoupling__DataArrayChar,"DataArrayChar",tmp);
-        return DataArrayChar::Meld(tmp);
-      }
-    }
-  };
-  
-  class DataArrayByteIterator;
-
-  class DataArrayByte : public DataArrayChar
-  {
-  public:
-    static DataArrayByte *New();
-    DataArrayByteIterator *iterator();
-    DataArrayByte *performCopyOrIncrRef(bool deepCopy) const;
-    char byteValue() const;
-    %extend
-    {
-      DataArrayByte()
-        {
-          return DataArrayByte::New();
-        }
-
-      static DataArrayByte *New(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
-      {
-        const char *msg="MEDCoupling::DataArrayByte::New : Available API are : \n-DataArrayByte.New()\n--DataArrayByte.New([1,3,4])\n-DataArrayByte.New([1,3,4],3)\n-DataArrayByte.New([1,3,4,5],2,2)\n-DataArrayByte.New(5)\n-DataArrayByte.New(5,2) !";
-        if(PyList_Check(elt0) || PyTuple_Check(elt0))
-          {
-            if(nbOfTuples)
-              {
-                if(PyInt_Check(nbOfTuples))
-                  {
-                    int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
-                    if(nbOfTuples1<0)
-                      throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
-                    if(nbOfComp)
-                      {
-                        if(PyInt_Check(nbOfComp))
-                          {//DataArrayByte.New([1,3,4,5],2,2)
-                            int nbOfCompo=PyInt_AS_LONG(nbOfComp);
-                            if(nbOfCompo<0)
-                              throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
-                            MCAuto<DataArrayByte> ret=DataArrayByte::New();
-                            std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
-                            ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
-                            return ret.retn();
-                          }
-                        else
-                          throw INTERP_KERNEL::Exception(msg);
-                      }
-                    else
-                      {//DataArrayByte.New([1,3,4],3)
-                        MCAuto<DataArrayByte> ret=DataArrayByte::New();
-                        int tmpp1=-1;
-                        std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
-                        ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
-                        return ret.retn();
-                      }
-                  }
-                else
-                  throw INTERP_KERNEL::Exception(msg);
-              }
-            else
-              {// DataArrayByte.New([1,3,4])
-                MCAuto<DataArrayByte> ret=DataArrayByte::New();
-                int tmpp1=-1,tmpp2=-1;
-                std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
-                ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
-                return ret.retn();
-              }
-          }
-        else if(PyInt_Check(elt0))
-          {
-            int nbOfTuples1=PyInt_AS_LONG(elt0);
-            if(nbOfTuples1<0)
-              throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive set of allocated memory !");
-            if(nbOfTuples)
-              {
-                if(!nbOfComp)
-                  {
-                    if(PyInt_Check(nbOfTuples))
-                      {//DataArrayByte.New(5,2)
-                        int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
-                        if(nbOfCompo<0)
-                          throw INTERP_KERNEL::Exception("DataArrayByte::New : should be a positive number of components !");
-                        MCAuto<DataArrayByte> ret=DataArrayByte::New();
-                        ret->alloc(nbOfTuples1,nbOfCompo);
-                        return ret.retn();
-                      }
-                    else
-                      throw INTERP_KERNEL::Exception(msg);
-                  }
-                else
-                  throw INTERP_KERNEL::Exception(msg);
-              }
-            else
-              {//DataArrayByte.New(5)
-                MCAuto<DataArrayByte> ret=DataArrayByte::New();
-                ret->alloc(nbOfTuples1,1);
-                return ret.retn();
-              }
-          }
-#ifdef WITH_NUMPY
-        else if(PyArray_Check(elt0) && nbOfTuples==NULL && nbOfComp==NULL)
-          {//DataArrayDouble.New(numpyArray)
-            return BuildNewInstance<DataArrayByte,char>(elt0,NPY_INT8,&PyCallBackDataArrayChar_RefType,"INT8");
-          }
-#endif
-        else
-          throw INTERP_KERNEL::Exception(msg);
-      }
-
-      DataArrayByte(PyObject *elt0, PyObject *nbOfTuples=0, PyObject *nbOfComp=0)
-        {
-          return MEDCoupling_DataArrayByte_New__SWIG_1(elt0,nbOfTuples,nbOfComp);
-        }
-   
-      std::string __repr__() const
-      {
-        std::ostringstream oss;
-        self->reprQuickOverview(oss);
-        return oss.str();
-      }
-  
-      int __int__() const
-      {
-        return (int) self->byteValue();
-      }
-
-      DataArrayByteIterator *__iter__()
-      {
-        return self->iterator();
-      }
-
-      int getIJ(int tupleId, int compoId) const
-      {
-        return (int)self->getIJ(tupleId,compoId);
-      }
-      
-      int getIJSafe(int tupleId, int compoId) const
-      {
-        return (int)self->getIJSafe(tupleId,compoId);
-      }
-
-      std::string __str__() const
-      {
-        return self->repr();
-      }
-
-      PyObject *toStrList() const
-      {
-        const char *vals=self->getConstPointer();
-        int nbOfComp=self->getNumberOfComponents();
-        int nbOfTuples=self->getNumberOfTuples();
-        return convertCharArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
-      }
-   
-      bool presenceOfTuple(PyObject *tupl) const
-      {
-        int sz=-1,sw=-1;
-        int ival=-1; std::vector<int> ivval;
-        const int *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
-        std::vector<char> vals(sz);
-        std::copy(pt,pt+sz,vals.begin());
-        return self->presenceOfTuple(vals);
-      }
-
-      bool presenceOfValue(PyObject *vals) const
-      {
-        int sz=-1,sw=-1;
-        int ival=-1; std::vector<int> ivval;
-        const int *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
-        std::vector<char> vals2(sz);
-        std::copy(pt,pt+sz,vals2.begin());
-        return self->presenceOfValue(vals2);
-      }
-
-      int findIdFirstEqual(PyObject *vals) const
-      {
-        int sz=-1,sw=-1;
-        int ival=-1; std::vector<int> ivval;
-        const int *pt=convertIntStarLikePyObjToCppIntStar(vals,sw,sz,ival,ivval);
-        std::vector<char> vals2(sz);
-        std::copy(pt,pt+sz,vals2.begin());
-        return self->findIdFirstEqual(vals2);
-      }
-
-      int findIdFirstEqualTuple(PyObject *tupl) const
-      {
-        int sz=-1,sw=-1;
-        int ival=-1; std::vector<int> ivval;
-        const int *pt=convertIntStarLikePyObjToCppIntStar(tupl,sw,sz,ival,ivval);
-        std::vector<char> vals(sz);
-        std::copy(pt,pt+sz,vals.begin());
-        return self->findIdFirstEqualTuple(vals);
-      }
-
-      int findIdSequence(PyObject *strOrListOfInt) const
-      {
-        int sz=-1,sw=-1;
-        int ival=-1; std::vector<int> ivval;
-        const int *pt=convertIntStarLikePyObjToCppIntStar(strOrListOfInt,sw,sz,ival,ivval);
-        std::vector<char> vals(sz);
-        std::copy(pt,pt+sz,vals.begin());
-        return self->findIdSequence(vals);
-      }
-
-      PyObject *getTuple(int tupleId)
-      {
-        int sz=self->getNumberOfComponents();
+        std::size_t sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<char> tmp=new char[sz];
         self->getTuple(tupleId,tmp);
         PyObject *ret=PyTuple_New(sz);
-        for(int i=0;i<sz;i++) PyTuple_SetItem(ret,i,PyInt_FromLong((int)tmp[i]));
+        for(std::size_t i=0;i<sz;i++) PyTuple_SetItem(ret,i,PyInt_FromLong((mcIdType)tmp[i]));
         return ret;
       }
 
       PyObject *getMaxValue() const
       {
-        int tmp;
-        int r1=(int)self->getMaxValue(tmp);
+        mcIdType tmp;
+        mcIdType r1=(mcIdType)self->getMaxValue(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
@@ -5192,24 +2765,24 @@ namespace MEDCoupling
 
       PyObject *getMinValue() const
       {
-        int tmp;
-        int r1=(int)self->getMinValue(tmp);
+        mcIdType tmp;
+        mcIdType r1=(mcIdType)self->getMinValue(tmp);
         PyObject *ret=PyTuple_New(2);
         PyTuple_SetItem(ret,0,PyInt_FromLong(r1));
         PyTuple_SetItem(ret,1,PyInt_FromLong(tmp));
         return ret;
       }
 
-      int index(PyObject *obj) const
+      mcIdType index(PyObject *obj) const
       {
-        int nbOfCompo=self->getNumberOfComponents();
+        std::size_t nbOfCompo=self->getNumberOfComponents();
         switch(nbOfCompo)
           {
           case 1:
             {
               if(PyInt_Check(obj))
                 {
-                  int val=(int)PyInt_AS_LONG(obj);
+                  char val=(char)PyInt_AS_LONG(obj);
                   return self->findIdFirstEqual(val);
                 }
               else
@@ -5222,7 +2795,7 @@ namespace MEDCoupling
 
       bool __contains__(PyObject *obj) const
       {
-        int nbOfCompo=self->getNumberOfComponents();
+        std::size_t nbOfCompo=self->getNumberOfComponents();
         switch(nbOfCompo)
           {
           case 0:
@@ -5231,7 +2804,7 @@ namespace MEDCoupling
             {
               if(PyInt_Check(obj))
                 {
-                  int val=(int)PyInt_AS_LONG(obj);
+                  char val=(char)PyInt_AS_LONG(obj);
                   return self->presenceOfValue(val);
                 }
               else
@@ -5253,19 +2826,21 @@ namespace MEDCoupling
       {
         self->checkAllocated();
         const char msg[]="Unexpected situation in __setitem__ !";
-        int nbOfTuples(self->getNumberOfTuples()),nbOfComponents(self->getNumberOfComponents());
-        int sw1,sw2;
-        int i1;
+        mcIdType nbOfTuples(self->getNumberOfTuples());
+        int nbOfComponents((int)self->getNumberOfComponents());
+        mcIdType sw1,sw2;
+        int int1;
         std::vector<int> v1;
-        DataArrayInt *d1=0;
+        DataArrayIdType *d1=0;
         DataArrayIntTuple *dd1=0;
-        convertIntStarLikePyObjToCpp(value,sw1,i1,v1,d1,dd1);
-        int it1,ic1;
-        std::vector<int> vt1,vc1;
-        std::pair<int, std::pair<int,int> > pt1,pc1;
-        DataArrayInt *dt1=0,*dc1=0;
+        convertIntStarLikePyObjToCpp(value,sw1,int1,v1,d1,dd1);
+        mcIdType it1,ic1;
+        std::vector<mcIdType> vt1,vc1;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > pt1,pc1;
+        DataArrayIdType *dt1=0,*dc1=0;
         convertObjToPossibleCpp3(obj,nbOfTuples,nbOfComponents,sw2,it1,ic1,vt1,vc1,pt1,pc1,dt1,dc1);
-        MCAuto<DataArrayInt> tmp;
+        MCAuto<DataArrayIdType> tmp;
+        char i1 = (char)int1;
         switch(sw2)
           {
           case 1:
@@ -5481,7 +3056,7 @@ namespace MEDCoupling
   {
   public:
     std::string repr() const;
-    DataArrayByte *buildDAByte(int nbOfTuples, int nbOfCompo) const;
+    DataArrayByte *buildDAByte(mcIdType nbOfTuples, mcIdType nbOfCompo) const;
     %extend
     {
       std::string __str__() const
@@ -5526,18 +3101,18 @@ namespace MEDCoupling
               {
                 if(PyInt_Check(nbOfTuples))
                   {
-                    int nbOfTuples1=PyInt_AS_LONG(nbOfTuples);
+                    mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(nbOfTuples));
                     if(nbOfTuples1<0)
                       throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive set of allocated memory !");
                     if(nbOfComp)
                       {
                         if(PyInt_Check(nbOfComp))
                           {//DataArrayAsciiChar.New([1,3,4,5],2,2)
-                            int nbOfCompo=PyInt_AS_LONG(nbOfComp);
+                            mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfComp));
                             if(nbOfCompo<0)
                               throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive number of components !");
                             MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
-                            std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
+                            std::vector<mcIdType> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,nbOfCompo);
                             ret->alloc(nbOfTuples1,nbOfCompo); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
                             return ret.retn();
                           }
@@ -5547,8 +3122,8 @@ namespace MEDCoupling
                     else
                       {//DataArrayAsciiChar.New([1,3,4],3)
                         MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
-                        int tmpp1=-1;
-                        std::vector<int> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
+                        mcIdType tmpp1=-1;
+                        std::vector<mcIdType> tmp=fillArrayWithPyListInt2(elt0,nbOfTuples1,tmpp1);
                         ret->alloc(nbOfTuples1,tmpp1); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
                         return ret.retn();
                       }
@@ -5590,8 +3165,8 @@ namespace MEDCoupling
                   {
                     // DataArrayAsciiChar.New([1,3,4])
                     MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
-                    int tmpp1=-1,tmpp2=-1;
-                    std::vector<int> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
+                    mcIdType tmpp1=-1,tmpp2=-1;
+                    std::vector<mcIdType> tmp=fillArrayWithPyListInt2(elt0,tmpp1,tmpp2);
                     ret->alloc(tmpp1,tmpp2); std::copy(tmp.begin(),tmp.end(),ret->getPointer());
                     return ret.retn();
                   }
@@ -5599,7 +3174,7 @@ namespace MEDCoupling
           }
         else if(PyInt_Check(elt0))
           {
-            int nbOfTuples1=PyInt_AS_LONG(elt0);
+            mcIdType nbOfTuples1=ToIdType(PyInt_AS_LONG(elt0));
             if(nbOfTuples1<0)
               throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive set of allocated memory !");
             if(nbOfTuples)
@@ -5608,7 +3183,7 @@ namespace MEDCoupling
                   {
                     if(PyInt_Check(nbOfTuples))
                       {//DataArrayAsciiChar.New(5,2)
-                        int nbOfCompo=PyInt_AS_LONG(nbOfTuples);
+                        mcIdType nbOfCompo=ToIdType(PyInt_AS_LONG(nbOfTuples));
                         if(nbOfCompo<0)
                           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::New : should be a positive number of components !");
                         MCAuto<DataArrayAsciiChar> ret=DataArrayAsciiChar::New();
@@ -5649,14 +3224,14 @@ namespace MEDCoupling
         return self->iterator();
       }
 
-      std::string getIJ(int tupleId, int compoId) const
+      std::string getIJ(mcIdType tupleId, mcIdType compoId) const
       {
         char tmp[2]; tmp[1]='\0';
         tmp[0]=self->getIJ(tupleId,compoId);
         return std::string(tmp);
       }
    
-      std::string getIJSafe(int tupleId, int compoId) const
+      std::string getIJSafe(mcIdType tupleId, mcIdType compoId) const
       {
         char tmp[2]; tmp[1]='\0';
         tmp[0]=self->getIJSafe(tupleId,compoId);
@@ -5671,9 +3246,9 @@ namespace MEDCoupling
       PyObject *toStrList() const
       {
         const char *vals=self->getConstPointer();
-        int nbOfComp=self->getNumberOfComponents();
-        int nbOfTuples=self->getNumberOfTuples();
-        return convertCharArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
+        std::size_t nbOfComp=self->getNumberOfComponents();
+        mcIdType nbOfTuples=self->getNumberOfTuples();
+        return convertCharArrToPyListOfTuple(vals,(int)nbOfComp,nbOfTuples);
       }
 
       bool presenceOfTuple(PyObject *tupl) const
@@ -5720,7 +3295,7 @@ namespace MEDCoupling
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::presenceOfValue : only strings in input supported !");
       }
 
-      int findIdFirstEqual(PyObject *vals) const
+      mcIdType findIdFirstEqual(PyObject *vals) const
       {
         if(PyString_Check(vals))
           {
@@ -5742,7 +3317,7 @@ namespace MEDCoupling
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::findIdFirstEqual : only strings in input supported !");
       }
 
-      int findIdFirstEqualTuple(PyObject *tupl) const
+      mcIdType findIdFirstEqualTuple(PyObject *tupl) const
       {
         if(PyString_Check(tupl))
           {
@@ -5764,7 +3339,7 @@ namespace MEDCoupling
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::findIdFirstEqualTuple : only strings in input supported !");
       }
 
-      int findIdSequence(PyObject *strOrListOfInt) const
+      mcIdType findIdSequence(PyObject *strOrListOfInt) const
       {
         if(PyString_Check(strOrListOfInt))
           {
@@ -5786,9 +3361,9 @@ namespace MEDCoupling
           throw INTERP_KERNEL::Exception("DataArrayAsciiChar::search : only strings in input supported !");
       }
    
-      PyObject *getTuple(int tupleId) const
+      PyObject *getTuple(mcIdType tupleId) const
       {
-        int sz=self->getNumberOfComponents();
+        std::size_t sz=self->getNumberOfComponents();
         INTERP_KERNEL::AutoPtr<char> tmp=new char[sz+1]; tmp[sz]='\0';
         self->getTuple(tupleId,tmp);
         return PyString_FromString(tmp);
@@ -5796,7 +3371,7 @@ namespace MEDCoupling
 
       PyObject *getMaxValue() const
       {
-        int tmp;
+        mcIdType tmp;
         char tmp2[2]; tmp2[1]='\0';
         tmp2[0]=self->getMaxValue(tmp);
         PyObject *ret=PyTuple_New(2);
@@ -5807,7 +3382,7 @@ namespace MEDCoupling
 
       PyObject *getMinValue() const
       {
-        int tmp;
+        mcIdType tmp;
         char tmp2[2]; tmp2[1]='\0';
         tmp2[0]=self->getMinValue(tmp);
         PyObject *ret=PyTuple_New(2);
@@ -5816,9 +3391,9 @@ namespace MEDCoupling
         return ret;
       }
 
-      int index(PyObject *obj) const
+      mcIdType index(PyObject *obj) const
       {
-        int nbOfCompo=self->getNumberOfComponents();
+        std::size_t nbOfCompo=self->getNumberOfComponents();
         switch(nbOfCompo)
           {
           case 1:
@@ -5853,7 +3428,7 @@ namespace MEDCoupling
 
       bool __contains__(PyObject *obj) const
       {
-        int nbOfCompo=self->getNumberOfComponents();
+        std::size_t nbOfCompo=self->getNumberOfComponents();
         switch(nbOfCompo)
           {
           case 0:
@@ -5890,10 +3465,10 @@ namespace MEDCoupling
 
       PyObject *__getitem__(PyObject *obj) const
       {
-        int sw,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        std::pair<int, std::pair<int,int> > sTyyppArr;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
+        mcIdType sw,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > sTyyppArr;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,self->getNumberOfTuples(),sw,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
         switch(sw)
           {
@@ -5906,21 +3481,21 @@ namespace MEDCoupling
           case 4:
             return convertDataArrayChar(self->selectByTupleIdSafe(daIntTyypp->begin(),daIntTyypp->end()), SWIG_POINTER_OWN | 0 );
           default:
-            throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__getitem__ : supporting int, list of int, tuple of int, DataArrayInt and slice in input !");
+            throw INTERP_KERNEL::Exception("DataArrayAsciiChar::__getitem__ : supporting int, list of int, tuple of int, DataArrayIdType and slice in input !");
           }
       }
 
       DataArrayAsciiChar *__setitem__(PyObject *obj, PyObject *value)
       {
-        static const char msg[]="DataArrayAsciiChar::__setitem__ : supporting int, list of int, tuple of int, DataArrayInt and slice in input, and 4 types accepted in value : string, list or tuple of strings having same size, not null DataArrayChar instance.";
-        int sw1,iTypppArr;
-        std::vector<int> stdvecTyyppArr;
-        std::pair<int, std::pair<int,int> > sTyyppArr;
-        MEDCoupling::DataArrayInt *daIntTyypp=0;
-        int nbOfCompo=self->getNumberOfComponents();
-        int nbOfTuples=self->getNumberOfTuples();
+        static const char msg[]="DataArrayAsciiChar::__setitem__ : supporting int, list of int, tuple of int, DataArrayIdType and slice in input, and 4 types accepted in value : string, list or tuple of strings having same size, not null DataArrayChar instance.";
+        mcIdType sw1,iTypppArr;
+        std::vector<mcIdType> stdvecTyyppArr;
+        std::pair<mcIdType, std::pair<mcIdType,mcIdType> > sTyyppArr;
+        MEDCoupling::DataArrayIdType *daIntTyypp=0;
+        mcIdType nbOfCompo=ToIdType(self->getNumberOfComponents());
+        mcIdType nbOfTuples=self->getNumberOfTuples();
         convertIntStarOrSliceLikePyObjToCppWithNegIntInterp(obj,nbOfTuples,sw1,iTypppArr,stdvecTyyppArr,sTyyppArr,daIntTyypp);
-        int sw2;
+        mcIdType sw2;
         char vc; std::string sc; std::vector<std::string> vsc; DataArrayChar *dacc=0;
         convertObjToPossibleCpp6(value,sw2,vc,sc,vsc,dacc);
         switch(sw1)
@@ -6029,7 +3604,7 @@ namespace MEDCoupling
                 }
             }
           case 4:
-            {//DataArrayInt
+            {//DataArrayIdType
               switch(sw2)
                 {
                   {//value char
@@ -6096,8 +3671,8 @@ namespace MEDCoupling
   class DataArrayAsciiCharTuple
   {
   public:
-    int getNumberOfCompo() const;
-    DataArrayAsciiChar *buildDAAsciiChar(int nbOfTuples, int nbOfCompo) const;
+    std::size_t getNumberOfCompo() const;
+    DataArrayAsciiChar *buildDAAsciiChar(mcIdType nbOfTuples, mcIdType nbOfCompo) const;
     %extend
     {
       std::string __str__() const
@@ -6113,6 +3688,8 @@ namespace MEDCoupling
   };
 }
 
+%include "DataArrayInt.i"
+
 %pythoncode %{
 def MEDCouplingStdReduceFunct(cls,params):
     a,b=params
@@ -6126,10 +3703,15 @@ def MEDCouplingDataArrayDoubleReduce(self):
       raise InterpKernelException("PyWrap of DataArrayDouble.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
     return MEDCouplingStdReduceFunct,(DataArrayDouble,((self.toNumPyArray(),),(self.__getstate__()),))
 
-def MEDCouplingDataArrayIntReduce(self):
+def MEDCouplingDataArrayInt32Reduce(self):
     if not MEDCouplingHasNumPyBindings():
-      raise InterpKernelException("PyWrap of DataArrayInt.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
-    return MEDCouplingStdReduceFunct,(DataArrayInt,((self.toNumPyArray(),),(self.__getstate__()),))
+      raise InterpKernelException("PyWrap of DataArrayIdType.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
+    return MEDCouplingStdReduceFunct,(DataArrayInt32,((self.toNumPyArray(),),(self.__getstate__()),))
+
+def MEDCouplingDataArrayInt64Reduce(self):
+    if not MEDCouplingHasNumPyBindings():
+      raise InterpKernelException("PyWrap of DataArrayIdType.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
+    return MEDCouplingStdReduceFunct,(DataArrayInt64,((self.toNumPyArray(),),(self.__getstate__()),))
 
 def MEDCouplingDataArrayByteReduce(self):
     if not MEDCouplingHasNumPyBindings():
@@ -6140,4 +3722,11 @@ def MEDCouplingDataArrayFloatReduce(self):
     if not MEDCouplingHasNumPyBindings():
       raise InterpKernelException("PyWrap of DataArrayFloat.__reduce__ : not implemented because numpy is not active in your configuration ! No serialization/unserialization available without numpy !")
     return MEDCouplingStdReduceFunct,(DataArrayFloat,((self.toNumPyArray(),),(self.__getstate__()),))
+
+if MEDCouplingUse64BitIDs():
+  DataArrayInt=DataArrayInt64
+else:
+  DataArrayInt=DataArrayInt32
+pass
+
 %}
index a76432a4a1e8167d838b4a6ce45c2fa4241c3fa7..b35f9ecdb94b9d00cc8ed7864e12ff1d673b97ef 100644 (file)
@@ -46,10 +46,10 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         a=a.cumsum(dtype=int32)
         a=array(a,dtype=int64) ; a=array(a,dtype=int32)
         self.assertEqual(getrefcount(a),2)
-        d=DataArrayInt(a)
+        d=DataArrayInt32(a)
         d[:]=2
         #
-        e=DataArrayInt(sz) ; e.fillWithValue(2)
+        e=DataArrayInt32(sz) ; e.fillWithValue(2)
         self.assertTrue(d.isEqual(e))
         #
         a[:]=4 ; e.fillWithValue(4)
@@ -66,9 +66,9 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         self.assertEqual(getrefcount(a),3)
         self.assertEqual(getrefcount(b),2)
         b[:]=5
-        d=DataArrayInt(b)
+        d=DataArrayInt32(b)
         #
-        e=DataArrayInt(sz*2) ; e.fillWithValue(5)
+        e=DataArrayInt32(sz*2) ; e.fillWithValue(5)
         self.assertTrue(d.isEqual(e))
         pass
     
@@ -81,16 +81,16 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         c=a.reshape(2,sz)
         b[:]=6
         b[7:17]=7
-        d=DataArrayInt(b)
-        self.assertTrue(d.isEqual(DataArrayInt([6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,6,6,6])))
+        d=DataArrayInt32(b)
+        self.assertTrue(d.isEqual(DataArrayInt32([6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,6,6,6])))
         #
         a=zeros((10,2),dtype=int32)
         b=a.T
         c=b.view()
         a.shape=20
         a[3:]=10.
-        d=DataArrayInt(a)
-        self.assertTrue(d.isEqual(DataArrayInt([0,0,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10])))
+        d=DataArrayInt32(a)
+        self.assertTrue(d.isEqual(DataArrayInt32([0,0,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10])))
         pass
     
     @unittest.skipUnless(MEDCouplingHasNumPyBindings(),"requires numpy")
@@ -104,7 +104,7 @@ class MEDCouplingNumPyTest(unittest.TestCase):
     def test5(self):
         a=arange(20,dtype=int32)
         self.assertEqual(weakref.getweakrefcount(a),0)
-        d=DataArrayInt(a)
+        d=DataArrayInt32(a)
         self.assertEqual(weakref.getweakrefcount(a),1)
         self.assertTrue(not a.flags["OWNDATA"])
         self.assertTrue(d.isIota(20))
@@ -116,14 +116,14 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         gc.collect()
         self.assertTrue(a.flags["OWNDATA"])
         a[:]=4 # a can be used has usual
-        self.assertTrue(DataArrayInt(a).isUniform(4))
+        self.assertTrue(DataArrayInt32(a).isUniform(4))
         pass
     
     @unittest.skipUnless(MEDCouplingHasNumPyBindings(),"requires numpy")
     def test6(self):
         a=arange(20,dtype=int32)
-        d=DataArrayInt(a) # d owns data of a
-        e=DataArrayInt(a) # a not owned -> e only an access to chunk of a 
+        d=DataArrayInt32(a) # d owns data of a
+        e=DataArrayInt32(a) # a not owned -> e only an access to chunk of a 
         self.assertTrue(d.isIota(d.getNumberOfTuples()))
         self.assertTrue(e.isIota(e.getNumberOfTuples()))
         a[:]=6
@@ -142,9 +142,9 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         a=array(0,dtype=int32) ; a.resize(10,2)
         b=a.reshape(20)
         c=a.reshape(2,10)
-        d=DataArrayInt(b) # d owns data of a
-        e=DataArrayInt(b) # a not owned -> e only an access to chunk of a
-        f=DataArrayInt(b) # a not owned -> e only an access to chunk of a
+        d=DataArrayInt32(b) # d owns data of a
+        e=DataArrayInt32(b) # a not owned -> e only an access to chunk of a
+        f=DataArrayInt32(b) # a not owned -> e only an access to chunk of a
         del d # d removed -> a ownes again data
         ##@@ Ensure a pass of the garbage collector so that the de-allocator of d is called 
         import gc
@@ -177,11 +177,11 @@ class MEDCouplingNumPyTest(unittest.TestCase):
     def test8(self):
         a=arange(20,dtype=int32)
         self.assertTrue(a.flags["OWNDATA"])
-        d=DataArrayInt(a) # d owns data of a
+        d=DataArrayInt32(a) # d owns data of a
         self.assertTrue(not a.flags["OWNDATA"])
         d.pushBackSilent(20)# d pushBack so release of chunk of data -> a becomes owner of its data again
         self.assertTrue(a.flags["OWNDATA"])
-        self.assertTrue(d.isEqual(DataArrayInt([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))
+        self.assertTrue(d.isEqual(DataArrayInt32([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))
         self.assertEqual(a.tolist(),[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])
         pass
 
@@ -394,13 +394,13 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         a.resize(sz//2,2)
         a[:]=4
         self.assertEqual(getrefcount(a),2)
-        d=DataArrayInt(a)
+        d=DataArrayInt32(a)
         self.assertEqual(10,d.getNumberOfTuples())
         self.assertEqual(2,d.getNumberOfComponents())
         self.assertEqual(sz,d.getNbOfElems())
-        self.assertTrue(d.isEqual(DataArrayInt([(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4)])))
+        self.assertTrue(d.isEqual(DataArrayInt32([(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4),(4,4)])))
         a[:]=7
-        self.assertTrue(d.isEqual(DataArrayInt([(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7)])))
+        self.assertTrue(d.isEqual(DataArrayInt32([(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7),(7,7)])))
         #
         b=a.reshape((2,5,2))
         self.assertRaises(InterpKernelException,DataArrayInt.New,b) # b has not dimension in [0,1] !
@@ -430,7 +430,7 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         #tests that only DataArray*(npArray) constructor is available
         a=array(0,dtype=int32)
         a.resize(20)
-        DataArrayInt(a)
+        DataArrayInt32(a)
         self.assertRaises(InterpKernelException,DataArrayInt.New,a,20)
         self.assertRaises(InterpKernelException,DataArrayInt.New,a,20,1)
         a=array(0,dtype=float64)
@@ -564,9 +564,9 @@ class MEDCouplingNumPyTest(unittest.TestCase):
     @unittest.skipUnless(MEDCouplingHasNumPyBindings(),"requires numpy")
     def test25(self):
         a=arange(10,dtype=int32)
-        b=DataArrayInt(a)
-        c=DataArrayInt(a)
-        d=DataArrayInt(a)
+        b=DataArrayInt32(a)
+        c=DataArrayInt32(a)
+        d=DataArrayInt32(a)
         self.assertTrue(b.isIota(10))
         self.assertTrue(c.isIota(10))
         self.assertTrue(d.isIota(10))
@@ -584,8 +584,8 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         self.assertTrue(c.isIota(11))
         #
         a=arange(10,dtype=int32)
-        b=DataArrayInt(a)
-        c=DataArrayInt(a)
+        b=DataArrayInt32(a)
+        c=DataArrayInt32(a)
         self.assertTrue(b.isIota(10))
         self.assertTrue(c.isIota(10))
         b.pushBackSilent(10) # c and a,b are dissociated
@@ -644,9 +644,9 @@ class MEDCouplingNumPyTest(unittest.TestCase):
         self.assertEqual(a.ndim,2)
         self.assertEqual(a.size,15)
         self.assertEqual(a.shape,(5,3))
-        self.assertEqual(a.strides,(12,4))
-        self.assertEqual(a.nbytes,60)
-        self.assertEqual(a.itemsize,4)
+        self.assertEqual(a.strides,(3*MEDCouplingSizeOfIDs()//8,MEDCouplingSizeOfIDs()//8))
+        self.assertEqual(a.nbytes,15*MEDCouplingSizeOfIDs()//8)
+        self.assertEqual(a.itemsize,MEDCouplingSizeOfIDs()//8)
         self.assertEqual(a.tolist(),[[0,1,2],[3,4,5],[6,7,8],[9,10,11],[12,13,14]])
         #
         d2=d.convertToDblArr()
index e5f6bb732227071af260d0bf08a921b354555900..c0c633e1ae7e6d78d25e37022e3a0ed639275155 100644 (file)
@@ -347,7 +347,7 @@ class MEDCouplingPickleTest(unittest.TestCase):
         f.setName("aname")
         a=f.getArray()
         b=a[:] ; b.iota(7000)
-        f.setArray(DataArrayInt.Meld(a,b))
+        f.setArray(DataArrayInt32.Meld(a,b))
         f.getArray().setInfoOnComponents(["u1","vv2"])
         f.checkConsistencyLight();
         #
index 665c95f50a60c9ca66f3e2e67353e37a599f2849..7f9bdad563ef21d41c2798b326d424cf6e551be8 100644 (file)
@@ -187,6 +187,15 @@ namespace MEDCoupling
     return false;
 #endif
   }
+  
+  bool MEDCouplingUse64BitIDs()
+  {
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+    return false;
+#else
+    return true;
+#endif
+  }
 
   std::string MEDCouplingCompletionScript()
   {
index 5b8e041ed1287401654d25bdbc2fb5f37a57534b..ecd4a7ff76a1751bc710308f8437307a9f8bbc65 100644 (file)
@@ -66,24 +66,42 @@ def MEDCouplingDataArrayFloatImul(self,*args):
 def MEDCouplingDataArrayFloatIdiv(self,*args):
     import _MEDCouplingRemapper
     return _MEDCouplingRemapper.DataArrayFloat____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayInt32Iadd(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayInt____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntIsub(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt32____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32Isub(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayInt____isub___(self, self, *args)
-def MEDCouplingDataArrayIntImul(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt32____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32Imul(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayInt____imul___(self, self, *args)
-def MEDCouplingDataArrayIntIdiv(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt32____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32Idiv(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayInt____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntImod(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt32____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32Imod(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayInt____imod___(self, self, *args)
-def MEDCouplingDataArrayIntIpow(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt32____imod___(self, self, *args)
+def MEDCouplingDataArrayInt32Ipow(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayInt____ipow___(self, self, *args)
+    return _MEDCouplingRemapper.DataArrayInt32____ipow___(self, self, *args)
+def MEDCouplingDataArrayInt64Iadd(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt64____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64Isub(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt64____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64Imul(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt64____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64Idiv(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt64____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64Imod(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt64____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64Ipow(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt64____ipow___(self, self, *args)
 def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
     import _MEDCouplingRemapper
     return _MEDCouplingRemapper.DataArrayDoubleTuple____iadd___(self, self, *args)
@@ -96,21 +114,36 @@ def MEDCouplingDataArrayDoubleTupleImul(self,*args):
 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
     import _MEDCouplingRemapper
     return _MEDCouplingRemapper.DataArrayDoubleTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayInt32TupleIadd(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt32Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIsub(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt32Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImul(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt32Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIdiv(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt32Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImod(self,*args):
+    import _MEDCouplingRemapper
+    return _MEDCouplingRemapper.DataArrayInt32Tuple____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIadd(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayIntTuple____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIsub(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt64Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIsub(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayIntTuple____isub___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImul(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt64Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImul(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayIntTuple____imul___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIdiv(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt64Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIdiv(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayIntTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImod(self,*args):
+    return _MEDCouplingRemapper.DataArrayInt64Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImod(self,*args):
     import _MEDCouplingRemapper
-    return _MEDCouplingRemapper.DataArrayIntTuple____imod___(self, self, *args)
+    return _MEDCouplingRemapper.DataArrayInt64Tuple____imod___(self, self, *args)
 def MEDCouplingDenseMatrixIadd(self,*args):
     import _MEDCouplingRemapper
     return _MEDCouplingRemapper.DenseMatrix____iadd___(self, self, *args)
index 1a7364d69143bde0f050dcfab50debca8618b231..4c0c0188bf3a7e6305acbdafcf823f9c6dbe74e8 100644 (file)
@@ -69,14 +69,14 @@ namespace MEDCoupling
          {
            PyObject *getCrudeMatrix() const
            {
-             const std::vector<std::map<int,double> >& m=self->getCrudeMatrix();
+             const std::vector<std::map<mcIdType,double> >& m=self->getCrudeMatrix();
              std::size_t sz=m.size();
              PyObject *ret=PyList_New(sz);
              for(std::size_t i=0;i<sz;i++)
                {
-                 const std::map<int,double>& row=m[i];
+                 const std::map<mcIdType,double>& row=m[i];
                  PyObject *ret0=PyDict_New();
-                 for(std::map<int,double>::const_iterator it=row.begin();it!=row.end();it++)
+                 for(std::map<mcIdType,double>::const_iterator it=row.begin();it!=row.end();it++)
                    PyDict_SetItem(ret0,PyInt_FromLong((*it).first),PyFloat_FromDouble((*it).second));
                  PyList_SetItem(ret,i,ret0);
                }
@@ -90,15 +90,22 @@ namespace MEDCoupling
 #endif
            void setCrudeMatrix(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const std::string& method, PyObject *m)
            {
-             std::vector<std::map<int,double> > mCpp;
+             std::vector<std::map<mcIdType,double> > mCpp;
              if(isCSRMatrix(m))
                {
 #if defined(WITH_NUMPY) && defined(WITH_SCIPY)
                  PyObject *indptr(PyObject_GetAttrString(m,"indptr"));
                  PyObject *indices(PyObject_GetAttrString(m,"indices"));
                  PyObject *data(PyObject_GetAttrString(m,"data"));
-                 MCAuto<DataArrayInt> indptrPtr(MEDCoupling_DataArrayInt_New__SWIG_1(indptr,NULL,NULL));
-                 MCAuto<DataArrayInt> indicesPtr(MEDCoupling_DataArrayInt_New__SWIG_1(indices,NULL,NULL));
+                 MCAuto<DataArrayInt32> indptrPtr, indicesPtr;
+                 // csr_matrix.indptr and csr_matrix.indices are always dtype==int32
+// #if defined(MEDCOUPLING_USE_64BIT_IDS)
+//                  indptrPtr = MEDCoupling_DataArrayInt64_New__SWIG_1(indptr,NULL,NULL);
+//                  indicesPtr = MEDCoupling_DataArrayInt64_New__SWIG_1(indices,NULL,NULL);
+// #else
+                 indptrPtr = MEDCoupling_DataArrayInt32_New__SWIG_1(indptr,NULL,NULL);
+                 indicesPtr = MEDCoupling_DataArrayInt32_New__SWIG_1(indices,NULL,NULL);
+//#endif
                  MCAuto<DataArrayDouble> dataPtr(MEDCoupling_DataArrayDouble_New__SWIG_1(data,NULL,NULL));
                  convertCSR_MCDataToVectMapIntDouble(indptrPtr,indicesPtr,dataPtr,mCpp);
                  Py_XDECREF(data); Py_XDECREF(indptr); Py_XDECREF(indices);
@@ -113,7 +120,7 @@ namespace MEDCoupling
 
            void setCrudeMatrixEx(const MEDCouplingFieldTemplate *src, const MEDCouplingFieldTemplate *target, PyObject *m)
            {
-             std::vector<std::map<int,double> > mCpp;
+             std::vector<std::map<mcIdType,double> > mCpp;
              convertToVectMapIntDouble(m,mCpp);
              self->setCrudeMatrixEx(src,target,mCpp);
            }
index e6aedde615fbfcc1cbbc554f4e30aeff62ebd260..58054d5192bf4d97490c27f447c95b37b7042a08 100644 (file)
@@ -806,8 +806,8 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         vals*=1e-5
         eps0=DataArrayDouble(m0.data)-vals ; eps0.abs()
         self.assertTrue(eps0.findIdsInRange(1e-17,1e300).empty())
-        self.assertTrue(DataArrayInt(m0.indices).isEqual(DataArrayInt([0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27,0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27,0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27])))
-        self.assertTrue(DataArrayInt(m0.indptr).isEqual(DataArrayInt([0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,198,201,204,207,210,213,216,219,222,225,228,231,234,237,240,243,246,249,252,255,258,261,264,267,270,273,276,279,282,285,288,291,294,297,300,303,306,309,312])))
+        self.assertTrue(DataArrayInt32(m0.indices).isEqual(DataArrayInt32([0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,2,3,1,3,5,4,5,7,6,7,9,8,9,11,10,11,13,12,13,15,14,15,17,16,17,19,18,19,21,20,21,23,22,23,25,24,25,27,0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27,0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27,0,1,3,1,4,5,4,6,7,6,8,9,8,10,11,10,12,13,12,14,15,14,16,17,16,18,19,18,20,21,20,22,23,22,24,25,24,26,27])))
+        self.assertTrue(DataArrayInt32(m0.indptr).isEqual(DataArrayInt32([0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,198,201,204,207,210,213,216,219,222,225,228,231,234,237,240,243,246,249,252,255,258,261,264,267,270,273,276,279,282,285,288,291,294,297,300,303,306,309,312])))
         #
         rem2=MEDCouplingRemapper() ; rem2.setIntersectionType(Barycentric)
         rem2.prepare(b,a,"P0P1")
@@ -839,7 +839,7 @@ class MEDCouplingBasicsTest(unittest.TestCase):
         rem.setMinDotBtwPlane3DSurfIntersect(0.99)# this line is important it is to tell to remapper to select only cells with very close orientation
         rem.prepare(skinAndNonConformCells,skinAndNonConformCells,"P0P0")
         mat=rem.getCrudeCSRMatrix()
-        indptr=DataArrayInt(mat.indptr)
+        indptr=DataArrayInt32(mat.indptr) #not depend on MEDCouplingUse64BitIDs()
         indptr2=indptr.deltaShiftIndex()
         cellIdsOfNonConformCells=indptr2.findIdsNotEqual(1)
         cellIdsOfSkin=indptr2.findIdsEqual(1)
index 16dc0a7b11c474f595f1ee50b92f3a0efd778217..52c3fd5b2d22ca6c6bb263cceffb0de918cba61c 100644 (file)
@@ -104,8 +104,8 @@ namespace MEDCoupling
     virtual MEDCouplingTimeDiscretization *negate() const;
     virtual MEDCouplingTimeDiscretization *maxPerTuple() const;
     virtual MEDCouplingTimeDiscretization *keepSelectedComponents(const std::vector<int>& compoIds) const;
-    virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<int>& compoIds);
-    virtual void changeNbOfComponents(int newNbOfComp, double dftValue);
+    virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<std::size_t>& compoIds);
+    virtual void changeNbOfComponents(std::size_t newNbOfComp, double dftValue);
     virtual void sortPerTuple(bool asc);
     virtual void setUniformValue(int nbOfTuple, int nbOfCompo, double value);
     virtual void setOrCreateUniformValueOnAllComponents(int nbOfTuple, double value);
index 31de2db5605047e761b3bf96fab4d70490779954..080def392e194fdb24ac8161717d7251b2596e22 100644 (file)
@@ -186,7 +186,7 @@ static MEDCoupling::MEDCouplingFieldDouble *MEDCoupling_MEDCouplingFieldDouble__
   MEDCoupling::DataArrayDouble *a;
   MEDCoupling::DataArrayDoubleTuple *aa;
   std::vector<double> bb;
-  int sw;
+  mcIdType sw;
   convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
   switch(sw)
     {
@@ -258,7 +258,7 @@ static MEDCoupling::MEDCouplingFieldDouble *MEDCoupling_MEDCouplingFieldDouble__
   MEDCoupling::DataArrayDouble *a;
   MEDCoupling::DataArrayDoubleTuple *aa;
   std::vector<double> bb;
-  int sw;
+  mcIdType sw;
   convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
   switch(sw)
     {
@@ -325,7 +325,7 @@ static MEDCoupling::MEDCouplingFieldDouble *MEDCoupling_MEDCouplingFieldDouble__
   MEDCoupling::DataArrayDouble *a;
   MEDCoupling::DataArrayDoubleTuple *aa;
   std::vector<double> bb;
-  int sw;
+  mcIdType sw;
   convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
   switch(sw)
     {
@@ -397,7 +397,7 @@ MEDCoupling::MEDCouplingFieldDouble *MEDCoupling_MEDCouplingFieldDouble___rdiv__
   MEDCoupling::DataArrayDouble *a;
   MEDCoupling::DataArrayDoubleTuple *aa;
   std::vector<double> bb;
-  int sw;
+  mcIdType sw;
   convertDoubleStarLikePyObjToCpp_2(obj,sw,val,a,aa,bb);
   switch(sw)
     {
@@ -448,15 +448,15 @@ MEDCoupling::MEDCouplingFieldDouble *MEDCoupling_MEDCouplingFieldDouble___rdiv__
 template<class T>
 typename MEDCoupling::Traits<T>::FieldType *fieldT_buildSubPart(const MEDCoupling::MEDCouplingFieldT<T> *self, PyObject *li)
 {
-  int sw;
-  int singleVal;
-  std::vector<int> multiVal;
-  std::pair<int, std::pair<int,int> > slic;
-  MEDCoupling::DataArrayInt *daIntTyypp=0;
+  mcIdType sw;
+  mcIdType singleVal;
+  std::vector<mcIdType> multiVal;
+  std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+  MEDCoupling::DataArrayIdType *daIntTyypp=0;
   const MEDCoupling::MEDCouplingMesh *mesh=self->getMesh();
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::buildSubPart : field lies on a null mesh !");
-  int nbc=mesh->getNumberOfCells();
+  mcIdType nbc=mesh->getNumberOfCells();
   convertIntStarOrSliceLikePyObjToCpp(li,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
   switch(sw)
     {
@@ -474,7 +474,7 @@ typename MEDCoupling::Traits<T>::FieldType *fieldT_buildSubPart(const MEDCouplin
           {
             if(nbc+singleVal>0)
               {
-                int tmp=nbc+singleVal;
+                mcIdType tmp=nbc+singleVal;
                 return self->buildSubPart(&tmp,&tmp+1);
               }
             else
@@ -501,29 +501,29 @@ typename MEDCoupling::Traits<T>::FieldType *fieldT_buildSubPart(const MEDCouplin
         return self->buildSubPart(daIntTyypp->begin(),daIntTyypp->end());
       }
     default:
-      throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::buildSubPart : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
+      throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::buildSubPart : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayIdType instance !");
     }
 }
 
 template<class T>
 typename MEDCoupling::Traits<T>::FieldType *fieldT__getitem__(const MEDCoupling::MEDCouplingFieldT<T> *self, PyObject *li)
 {
-  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";
+  const char msg[]="MEDCouplingFieldDouble::__getitem__ : invalid call  Available API are : \n-myField[DataArrayIdType]\n-myField[slice]\n-myField[pythonListOfCellIds]\n-myField[integer]\n-myField[DataArrayIdType,1]\n-myField[slice,1]\n-myField[pythonListOfCellIds,1]\n-myField[integer,1]\n";
   if(PyTuple_Check(li))
     {
       Py_ssize_t sz=PyTuple_Size(li);
       if(sz!=2)
         throw INTERP_KERNEL::Exception(msg);
       PyObject *elt0=PyTuple_GetItem(li,0),*elt1=PyTuple_GetItem(li,1);
-      int sw;
-      int singleVal;
-      std::vector<int> multiVal;
-      std::pair<int, std::pair<int,int> > slic;
-      MEDCoupling::DataArrayInt *daIntTyypp=0;
+      mcIdType sw;
+      std::size_t singleVal;
+      std::vector<std::size_t> multiVal;
+      std::pair<mcIdType, std::pair<mcIdType,mcIdType> > slic;
+      MEDCoupling::DataArrayIdType *daIntTyypp=0;
       if(!self->getArray())
         throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::__getitem__ : no array set on field to deduce number of components !");
       try
-        { convertIntStarOrSliceLikePyObjToCpp(elt1,self->getArray()->getNumberOfComponents(),sw,singleVal,multiVal,slic,daIntTyypp); }
+      { convertIntStarOrSliceLikePyObjToCpp(elt1,ToIdType(self->getArray()->getNumberOfComponents()),sw,singleVal,multiVal,slic,daIntTyypp); }
       catch(INTERP_KERNEL::Exception& e)
         { std::ostringstream oss; oss << "MEDCouplingFieldDouble::__getitem__ : invalid type in 2nd parameter (compo) !" << e.what(); throw INTERP_KERNEL::Exception(oss.str().c_str()); }
       typename MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::FieldType > ret0(fieldT_buildSubPart<T>(self,elt0));
@@ -534,7 +534,7 @@ typename MEDCoupling::Traits<T>::FieldType *fieldT__getitem__(const MEDCoupling:
         {
         case 1:
           {
-            std::vector<int> v2(1,singleVal);
+            std::vector<std::size_t> v2(1,singleVal);
             MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aarr(ret0Arr->keepSelectedComponents(v2));
             ret0->setArray(aarr);
             return ret0.retn();
@@ -547,9 +547,9 @@ typename MEDCoupling::Traits<T>::FieldType *fieldT__getitem__(const MEDCoupling:
           }
         case 3:
           {
-            int nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(slic.first,slic.second.first,slic.second.second,"MEDCouplingFieldDouble::__getitem__ : invalid range in 2nd parameter (components) !"));
-            std::vector<int> v2(nbOfComp);
-            for(int i=0;i<nbOfComp;i++)
+            mcIdType nbOfComp(MEDCoupling::DataArray::GetNumberOfItemGivenBESRelative(slic.first,slic.second.first,slic.second.second,"MEDCouplingFieldDouble::__getitem__ : invalid range in 2nd parameter (components) !"));
+            std::vector<std::size_t> v2(nbOfComp);
+            for(mcIdType i=0;i<nbOfComp;i++)
               v2[i]=slic.first+i*slic.second.second;
             MEDCoupling::MCAuto< typename MEDCoupling::Traits<T>::ArrayType > aarr(ret0Arr->keepSelectedComponents(v2));
             ret0->setArray(aarr);
@@ -567,7 +567,7 @@ template<class FIELDT>
 PyObject *field_getTinySerializationInformation(const FIELDT *self)
 {
   std::vector<double> a0;
-  std::vector<int> a1;
+  std::vector<mcIdType> a1;
   std::vector<std::string> a2;
   self->getTinySerializationDbleInformation(a0);
   self->getTinySerializationIntInformation(a1);
@@ -576,10 +576,10 @@ PyObject *field_getTinySerializationInformation(const FIELDT *self)
   PyObject *ret(PyTuple_New(3));
   PyTuple_SetItem(ret,0,convertDblArrToPyList2(a0));
   PyTuple_SetItem(ret,1,convertIntArrToPyList2(a1));
-  int sz(a2.size());
+  std::size_t sz(a2.size());
   PyObject *ret2(PyList_New(sz));
   {
-    for(int i=0;i<sz;i++)
+    for(std::size_t i=0;i<sz;i++)
       PyList_SetItem(ret2,i,PyString_FromString(a2[i].c_str()));
   }
   PyTuple_SetItem(ret,2,ret2);
@@ -589,14 +589,14 @@ PyObject *field_getTinySerializationInformation(const FIELDT *self)
 template<class T>
 PyObject *field_serialize(const typename MEDCoupling::Traits<T>::FieldType *self)
 {
-  MEDCoupling::DataArrayInt *ret0(0);
+  MEDCoupling::DataArrayIdType *ret0(0);
   std::vector<typename MEDCoupling::Traits<T>::ArrayType *> ret1;
   self->serialize(ret0,ret1);
   if(ret0)
     ret0->incrRef();
   std::size_t sz(ret1.size());
   PyObject *ret(PyTuple_New(2));
-  PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+  PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
   PyObject *ret1Py(PyList_New(sz));
   for(std::size_t i=0;i<sz;i++)
     {
@@ -646,7 +646,7 @@ void field__setstate__(typename MEDCoupling::Traits<T>::FieldType *self, PyObjec
   static const char MSG[]="MEDCouplingFieldDouble.__setstate__ : expected input is a tuple of size 3 !";
   if(!PyTuple_Check(inp))
     throw INTERP_KERNEL::Exception(MSG);
-  int sz(PyTuple_Size(inp));
+  std::size_t sz(PyTuple_Size(inp));
   if(sz!=3)
     throw INTERP_KERNEL::Exception(MSG);
   // mesh
@@ -660,15 +660,15 @@ void field__setstate__(typename MEDCoupling::Traits<T>::FieldType *self, PyObjec
   PyObject *elt0(PyTuple_GetItem(inp,0));
   PyObject *elt1(PyTuple_GetItem(inp,1));
   std::vector<double> a0;
-  std::vector<int> a1;
+  std::vector<mcIdType> a1;
   std::vector<std::string> a2;
-  MEDCoupling::DataArrayInt *b0(0);
+  MEDCoupling::DataArrayIdType *b0(0);
   std::vector<typename MEDCoupling::Traits<T>::ArrayType *>b1;
   {
     if(!PyTuple_Check(elt0) && PyTuple_Size(elt0)!=3)
       throw INTERP_KERNEL::Exception(MSG);
     PyObject *a0py(PyTuple_GetItem(elt0,0)),*a1py(PyTuple_GetItem(elt0,1)),*a2py(PyTuple_GetItem(elt0,2));
-    int tmp(-1);
+    mcIdType tmp(-1);
     fillArrayWithPyListDbl3(a0py,tmp,a0);
     convertPyToNewIntArr3(a1py,a1);
     fillStringVector(a2py,a2);
@@ -678,10 +678,10 @@ void field__setstate__(typename MEDCoupling::Traits<T>::FieldType *self, PyObjec
       throw INTERP_KERNEL::Exception(MSG);
     PyObject *b0py(PyTuple_GetItem(elt1,0)),*b1py(PyTuple_GetItem(elt1,1));
     void *argp(0);
-    int status(SWIG_ConvertPtr(b0py,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0));
+    int status(SWIG_ConvertPtr(b0py,&argp,SWIGTITraits<mcIdType>::TI,0|0));
     if(!SWIG_IsOK(status))
       throw INTERP_KERNEL::Exception(MSG);
-    b0=reinterpret_cast<MEDCoupling::DataArrayInt *>(argp);
+    b0=reinterpret_cast<MEDCoupling::DataArrayIdType *>(argp);
     convertFromPyObjVectorOfObj<typename MEDCoupling::Traits<T>::ArrayType *>(b1py,SWIGTITraits<T>::TI,MEDCoupling::Traits<T>::ArrayTypeName,b1);
   }
   self->checkForUnserialization(a1,b0,b1);
@@ -689,17 +689,17 @@ void field__setstate__(typename MEDCoupling::Traits<T>::FieldType *self, PyObjec
   self->finishUnserialization(a1,a0,a2);
 }
 
-PyObject *Mesh_getCellsContainingPointsLike(PyObject *p, double eps, const MEDCoupling::MEDCouplingMesh *self, std::function<void(const double *,int,double,MEDCoupling::MCAuto<MEDCoupling::DataArrayInt>&,MEDCoupling::MCAuto<MEDCoupling::DataArrayInt>&)> func)
+PyObject *Mesh_getCellsContainingPointsLike(PyObject *p, double eps, const MEDCoupling::MEDCouplingMesh *self, std::function<void(const double *,mcIdType,double,MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType>&,MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType>&)> func)
 {
-  MEDCoupling::MCAuto<MEDCoupling::DataArrayInt> elts,eltsIndex;
+  MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType> elts,eltsIndex;
   int spaceDim=self->getSpaceDimension();
   void *da=0;
   int res1=SWIG_ConvertPtr(p,&da,SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 |  0 );
   if (!SWIG_IsOK(res1))
     {
-      int size;
+      mcIdType size;
       INTERP_KERNEL::AutoCPtr<double> tmp=convertPyToNewDblArr2(p,&size);
-      int nbOfPoints=size/spaceDim;
+      mcIdType nbOfPoints=size/spaceDim;
       if(size%spaceDim!=0)
         {
           throw INTERP_KERNEL::Exception("MEDCouplingMesh::getCellsContainingPoints : Invalid list length ! Must be a multiple of self.getSpaceDimension() !");
@@ -712,8 +712,8 @@ PyObject *Mesh_getCellsContainingPointsLike(PyObject *p, double eps, const MEDCo
       if(!da2)
         throw INTERP_KERNEL::Exception("MEDCouplingMesh::getCellsContainingPoints : Not null DataArrayDouble instance expected !");
       da2->checkAllocated();
-      int size=da2->getNumberOfTuples();
-      int nbOfCompo=da2->getNumberOfComponents();
+      mcIdType size=da2->getNumberOfTuples();
+      mcIdType nbOfCompo=ToIdType(da2->getNumberOfComponents());
       if(nbOfCompo!=spaceDim)
         {
           throw INTERP_KERNEL::Exception("MEDCouplingMesh::getCellsContainingPoints : Invalid DataArrayDouble nb of components ! Expected same as self.getSpaceDimension() !");
@@ -721,8 +721,8 @@ PyObject *Mesh_getCellsContainingPointsLike(PyObject *p, double eps, const MEDCo
       func(da2->getConstPointer(),size,eps,elts,eltsIndex);
     }
   PyObject *ret=PyTuple_New(2);
-  PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-  PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+  PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+  PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(eltsIndex.retn()),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
   return ret;
 }
 
index 6ad489506ebd66f9c51068333cb1b4fb22397c85..cdca7ec5f7c7463418eac0d50b6905150f6fa998 100644 (file)
@@ -35,7 +35,7 @@ else:
 # NumPy is an optional pre-requisite!
 assert(MEDCoupling.MEDCouplingHasNumPyBindings())
 a=numpy.arange(20,dtype=numpy.int32)
-d=DataArrayInt(a) # d owns data of a
-e=DataArrayInt(a) # a not owned -> e only an access to chunk of a
+d=DataArrayInt32(a) # d owns data of a
+e=DataArrayInt32(a) # a not owned -> e only an access to chunk of a
 a1=d.toNumPyArray()
 #! [UG_DataArrayNumpy_0]
index 6fd1864ed528cf17f917abb4110e9e88fb149da5..bebcc3a956e6489fd430998c2317420001d42a0b 100644 (file)
@@ -24,6 +24,7 @@ SET(BASE_TESTS
   MEDCouplingBasicsTest4.py
   MEDCouplingBasicsTest5.py
   MEDCouplingBasicsTest6.py
+  MEDCouplingBasicsTest7.py
   MEDCouplingIntersectTest.py
   MEDCouplingExamplesTest.py
   MEDCouplingRemapperTest.py
index c5150e7d33d21a5846c328a5591c8652f4eccbd6..41cbe3ec77c1dcd4ce665c4ad7b83636ab703168 100644 (file)
 
 ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS})
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 IF(MEDCOUPLING_ENABLE_PYTHON)
   ADD_SUBDIRECTORY(Swig)
 ENDIF(MEDCOUPLING_ENABLE_PYTHON)
index 6d6c1e39f5cc876ad18a2619653763d678ace614..22b772f009ba4a4446af3b84fda9b32f9b691c43 100644 (file)
 #define __MEDFILEBASIS_HXX__
 
 #include "InterpKernelException.hxx"
+#include "MEDCouplingMemArray.hxx"
 
 #include <string>
 #include <vector>
 
+#include <med.h>
+
 namespace MEDCoupling
 {
   class MEDFileString
@@ -60,4 +63,113 @@ namespace MEDCoupling
   };
 }
 
+namespace MEDCoupling
+{
+
+  class DataArrayMedInt : public DataArrayDiscreteSigned< med_int >
+  {
+    friend class DataArrayDiscrete<med_int>;
+  public:
+    template<class INTARRAY>
+    static DataArrayMedInt *Copy( const INTARRAY* array );
+    static DataArrayMedInt *New() { return new DataArrayMedInt(); }
+    DataArrayMedInt *deepCopy() const { return new DataArrayMedInt(*this); }
+    //DataArrayMedInt *buildNewEmptyInstance() const { return new DataArrayMedInt(); }//ko
+    DataArray *buildNewEmptyInstance() const { if ( sizeof(med_int)==sizeof(long)) return DataArrayInt64::New(); return DataArrayInt32::New(); }
+  public:
+    DataArray *selectByTupleId(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleId(new2OldBg,new2OldEnd); }
+    DataArray *selectByTupleId(const DataArrayIdType& di) const { return this->mySelectByTupleId(di); }
+    DataArray *selectByTupleIdSafe(const mcIdType *new2OldBg, const mcIdType *new2OldEnd) const { return this->mySelectByTupleIdSafe(new2OldBg,new2OldEnd); }
+    DataArray *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const { return this->myKeepSelectedComponents(compoIds); }
+    DataArray *selectByTupleIdSafeSlice(mcIdType bg, mcIdType end2, mcIdType step) const { return this->mySelectByTupleIdSafeSlice(bg,end2,step); }
+    DataArray *selectByTupleRanges(const std::vector<std::pair<mcIdType,mcIdType> >& ranges) const { return this->mySelectByTupleRanges(ranges); }
+  private:
+    ~DataArrayMedInt() { }
+    DataArrayMedInt() { }
+  };
+
+  template< class T1, class T2 >
+  MCAuto<T1> StaticCast( const MCAuto< T2 >& array )
+  {
+    DataArray *src = const_cast< T2* >((const T2*) array );
+    T1*        tgt = static_cast<T1*>( src );
+    if ( tgt )
+      tgt->incrRef();
+    return tgt;
+  }
+
+  template< class INTARRAY >
+  MCAuto<DataArrayMedInt> ToMedIntArray(const MCAuto<INTARRAY>& intArray )
+  {
+    if ( sizeof( med_int ) == sizeof( typename INTARRAY::Type ))
+      return StaticCast< DataArrayMedInt >( intArray );
+    return DataArrayMedInt::Copy((const INTARRAY*) intArray );
+  }
+
+  template< class INT >
+  MCAuto<DataArrayMedInt> ToMedIntArray(const typename MEDCoupling::Traits<INT>::ArrayType* intArray )
+  {
+    if ( sizeof( med_int ) == sizeof( INT ))
+    {
+      typedef typename MEDCoupling::Traits<INT>::ArrayType INTARRAY;
+      MCAuto< INTARRAY > ia = const_cast< INTARRAY* >( intArray );
+      ia->incrRef();
+      return StaticCast< DataArrayMedInt >( ia );
+    }
+    return DataArrayMedInt::Copy( intArray );
+  }
+
+  template< class INT >
+  MCAuto< typename MEDCoupling::Traits<INT>::ArrayType> FromMedIntArray(MCAuto<DataArrayMedInt>& medIntArray )
+  {
+    typedef typename MEDCoupling::Traits<INT>::ArrayType INTARRAY;
+    if ( sizeof( med_int ) == sizeof( INT ))
+      return StaticCast< INTARRAY >( medIntArray );
+
+    INTARRAY* intArray = INTARRAY::New();
+    intArray->alloc( medIntArray->getNumberOfTuples(), medIntArray->getNumberOfComponents() );
+    intArray->copyStringInfoFrom( * medIntArray.operator->() );
+    std::copy( medIntArray->begin(), medIntArray->end(), intArray->getPointer() );
+    return intArray;
+  }
+
+  template< class INT >
+  MCAuto<DataArrayMedInt> ToMedIntArray(const std::vector<INT>& intVec )
+  {
+    DataArrayMedInt* medIntArray = DataArrayMedInt::New();
+    if ( sizeof( med_int ) == sizeof( INT ))
+      {
+        medIntArray->useArray( reinterpret_cast<const med_int*>(intVec.data()), /*owner=*/false, DeallocType::CPP_DEALLOC, intVec.size(), /*nbComp=*/1 );
+      }
+    else
+      {
+        medIntArray->alloc( intVec.size(), 1 );
+        std::copy( intVec.begin(), intVec.end(), medIntArray->getPointer() );
+      }
+    return medIntArray;
+  }
+
+  template< class INT >
+  med_int ToMedInt( INT i )
+  {
+    return static_cast< med_int >( i );
+  }
+
+  template< class INT >
+  INT FromMedInt( med_int mi )
+  {
+    return static_cast< INT >( mi );
+  }
+
+  template<class INTARRAY>
+  DataArrayMedInt * DataArrayMedInt::Copy( const INTARRAY* intArray )
+  {
+    DataArrayMedInt* medIntArray = DataArrayMedInt::New();
+    medIntArray->alloc( intArray->getNumberOfTuples(), intArray->getNumberOfComponents() );
+    medIntArray->copyStringInfoFrom( *intArray );
+    std::copy( intArray->begin(), intArray->end(), medIntArray->getPointer() );
+    return medIntArray;
+  }
+}
+
 #endif
index 91eb35f744f4bf412bdaa16fde4c30fc54fc8bd0..2ca90a99aa278ec8711e06b9239dcb9b5d42291b 100644 (file)
@@ -95,36 +95,35 @@ MCAuto<MEDFileEltStruct4Mesh> MEDFileBlowStrEltUp::dealWithMEDBALLInMesh(const M
   const DataArrayDouble *coo(mesh->getCoords());
   if(!coo)
     throw INTERP_KERNEL::Exception("MEDFileBlowStrEltUp::dealWithMEDBALLInMesh : null coords !");
-  MCAuto<DataArrayInt> conn(zeStr->getConn());
+  MCAuto<DataArrayIdType> conn(zeStr->getConn());
   if(conn.isNull())
     throw INTERP_KERNEL::Exception("MEDFileBlowStrEltUp::dealWithMEDBALLInMesh : null connectivity !");
   conn->checkAllocated();
   if(conn->getNumberOfComponents()!=1)
     throw INTERP_KERNEL::Exception("MEDFileBlowStrEltUp::dealWithMEDBALLInMesh : excepted to be single compo !");
-  int nbCells(conn->getNumberOfTuples());
   MCAuto<DataArrayDouble> connOut(coo->selectByTupleIdSafe(conn->begin(),conn->end()));
   MCAuto<MEDCouplingUMesh> mcOut(MEDCouplingUMesh::Build0DMeshFromCoords(connOut));
   mcOut->setName(BuildNewMeshName(mesh->getName(),MED_BALL_STR));
   mOut->setMeshAtLevel(0,mcOut);
-  const DataArrayInt *ff1(mesh->getFamilyFieldAtLevel(1));
+  const DataArrayIdType *ff1(mesh->getFamilyFieldAtLevel(1));
   if(ff1)
     {
-      MCAuto<DataArrayInt> ff1o(ff1->selectByTupleIdSafe(conn->begin(),conn->end()));
+      MCAuto<DataArrayIdType> ff1o(ff1->selectByTupleIdSafe(conn->begin(),conn->end()));
       mOut->setFamilyFieldArr(1,ff1o);
     }
-  const DataArrayInt *nf1(mesh->getNumberFieldAtLevel(1));
+  const DataArrayIdType *nf1(mesh->getNumberFieldAtLevel(1));
   if(nf1)
     {
-      MCAuto<DataArrayInt> nf1o(nf1->selectByTupleIdSafe(conn->begin(),conn->end()));
+      MCAuto<DataArrayIdType> nf1o(nf1->selectByTupleIdSafe(conn->begin(),conn->end()));
       mOut->setRenumFieldArr(1,nf1o);
     }
   MCAuto<MEDFileUMeshPerTypeCommon> md(zeStr->getMeshDef());
-  const DataArrayInt *ff0(md->getFam());
+  const DataArrayIdType *ff0(md->getFam());
   if(ff0)
-    mOut->setFamilyFieldArr(0,const_cast<DataArrayInt *>(ff0));
-  const DataArrayInt *nf0(md->getNum());
+    mOut->setFamilyFieldArr(0,const_cast<DataArrayIdType *>(ff0));
+  const DataArrayIdType *nf0(md->getNum());
   if(nf0)
-    mOut->setRenumFieldArr(0,const_cast<DataArrayInt *>(nf0));
+    mOut->setRenumFieldArr(0,const_cast<DataArrayIdType *>(nf0));
   mOut->copyFamGrpMapsFrom(*mesh);
   const std::vector< MCAuto<DataArray> >& vars(zeStr->getVars());
   for(std::vector< MCAuto<DataArray> >::const_iterator it=vars.begin();it!=vars.end();it++)
@@ -223,7 +222,7 @@ void MEDFileBlowStrEltUp::dealWithMEDBALLSInFields(const MEDFileFields *fs, cons
           std::vector<std::string> pfls(zeGuideForPfl->getPflsReallyUsed());
           if(pfls.size()>=2)
             throw INTERP_KERNEL::Exception("MEDFileBlowStrEltUp::dealWithMEDBALLSInFields : drink less coffee");
-          MCAuto<DataArrayInt> pflMyLove;
+          MCAuto<DataArrayIdType> pflMyLove;
           if(pfls.size()==1)
             pflMyLove.takeRef(zeGuideForPfl->getProfile(pfls[0]));
           // Yeah we have pfls
@@ -386,7 +385,7 @@ void LocInfo::checkUniqueLoc(const std::string& loc) const
 
 MCAuto<MEDCouplingUMesh> LocInfo::BuildMeshCommon(INTERP_KERNEL::NormalizedCellType gt, const std::string& pfl, const MEDFileFieldLoc& loc, const MEDFileEltStruct4Mesh *zeStr, const MEDFileUMesh *mesh, const MEDFileUMesh *section, const MEDFileFieldGlobsReal *globs, MCAuto<DataArrayDouble>& ptsForLoc)
 {
-  MCAuto<DataArrayInt> conn(zeStr->getConn());
+  MCAuto<DataArrayIdType> conn(zeStr->getConn());
   conn=conn->deepCopy(); conn->rearrange(1);
   MCAuto<MEDCouplingUMesh> geoMesh;
   {
@@ -398,7 +397,7 @@ MCAuto<MEDCouplingUMesh> LocInfo::BuildMeshCommon(INTERP_KERNEL::NormalizedCellT
   //
   if(!pfl.empty())
     {
-      const DataArrayInt *pflArr(globs->getProfile(pfl));
+      const DataArrayIdType *pflArr(globs->getProfile(pfl));
       geoMesh=geoMesh->buildPartOfMySelf(pflArr->begin(),pflArr->end(),true);
     }
   //
@@ -418,7 +417,7 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshFromAngleVrille(INTERP_KERNEL::Normali
   MCConstAuto<DataArrayDouble> angleVrille;
   if(!pfl.empty())
     {
-      const DataArrayInt *pflArr(globs->getProfile(pfl));
+      const DataArrayIdType *pflArr(globs->getProfile(pfl));
       angleVrille=angleDeVrille->selectByTupleIdSafe(pflArr->begin(),pflArr->end());
     }
   else
@@ -426,12 +425,12 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshFromAngleVrille(INTERP_KERNEL::Normali
   //
   MCAuto<MEDCouplingFieldDouble> dir(geoMesh->buildDirectionVectorField());
   MCAuto<DataArrayDouble> rot(dir->getArray()->fromCartToSpher());
-  int nbCompo(ptsForLoc->getNumberOfComponents());
+  std::size_t nbCompo(ptsForLoc->getNumberOfComponents());
   MCAuto<DataArrayDouble> secPts(section->getCoords()->changeNbOfComponents(nbCompo,0.));
-  int nbSecPts(secPts->getNumberOfTuples()),nbCells(geoMesh->getNumberOfCells()),nbg(loc.getGaussWeights().size());
+  mcIdType nbSecPts(secPts->getNumberOfTuples()),nbCells(geoMesh->getNumberOfCells()),nbg(ToIdType(loc.getGaussWeights().size()));
   {
     const int TAB[3]={2,0,1};
-    std::vector<int> v(TAB,TAB+3);
+    std::vector<std::size_t> v(TAB,TAB+3);
     secPts=secPts->keepSelectedComponents(v);
   }
   const double CENTER[3]={0.,0.,0.},AX0[3]={0.,0.,1.};
@@ -449,7 +448,7 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshFromAngleVrille(INTERP_KERNEL::Normali
       for(int l=0;l<nbg;l++)
         {
           MCAuto<DataArrayDouble> p2(p->deepCopy());
-          for(int k=0;k<nbCompo;k++)
+          for(std::size_t k=0;k<nbCompo;k++)
             p2->applyLin(1.,ptsForLoc->getIJ(j*nbg+l,k),k);
           arrs[j*nbg+l]=p2;
         }
@@ -463,11 +462,11 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshFromEpaisseur(INTERP_KERNEL::Normalize
 {
   MCAuto<DataArrayDouble> ptsForLoc;
   MCAuto<MEDCouplingUMesh> geoMesh(BuildMeshCommon(gt,pfl,loc,zeStr,mesh,section,globs,ptsForLoc));
-  int nbSecPts(section->getNumberOfNodes()),nbCells(geoMesh->getNumberOfCells()),nbg(loc.getGaussWeights().size());
+  mcIdType nbSecPts(section->getNumberOfNodes()),nbCells(geoMesh->getNumberOfCells()),nbg(ToIdType(loc.getGaussWeights().size()));
   MCConstAuto<DataArrayDouble> zeThickness;
   if(!pfl.empty())
     {
-      const DataArrayInt *pflArr(globs->getProfile(pfl));
+      const DataArrayIdType *pflArr(globs->getProfile(pfl));
       zeThickness=thickness->selectByTupleIdSafe(pflArr->begin(),pflArr->end());
     }
   else
@@ -477,11 +476,11 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshFromEpaisseur(INTERP_KERNEL::Normalize
     MCAuto<MEDCouplingFieldDouble> ortho(geoMesh->buildOrthogonalField());
     orthoArr.takeRef(ortho->getArray());
   }
-  int nbCompo(orthoArr->getNumberOfComponents());
+  mcIdType nbCompo(ToIdType(orthoArr->getNumberOfComponents()));
   MCAuto<DataArrayDouble> secPts(section->getCoords()->duplicateEachTupleNTimes(nbCompo));
   secPts->rearrange(nbCompo);
   std::vector< MCAuto<DataArrayDouble> > arrs(nbCells*nbg);
-  for(int j=0;j<nbCells;j++)
+  for(mcIdType j=0;j<nbCells;j++)
     {
       double thck(zeThickness->getIJ(j,0)),eccentricity(zeThickness->getIJ(j,1));
       MCAuto<DataArrayDouble> fact(DataArrayDouble::New()),fact2(DataArrayDouble::New()); fact->alloc(1,nbCompo); fact2->alloc(1,nbCompo);
@@ -509,11 +508,11 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshPipeSEG3(const DataArrayDouble *angle,
   static const char MSG1[]="BuildMeshPipeSEG3 : not recognized pattern ! Send mail to anthony.geay@edf.fr with corresponding MED file !";
   MCAuto<DataArrayDouble> ptsForLoc;
   MCAuto<MEDCouplingUMesh> geoMesh(BuildMeshCommon(INTERP_KERNEL::NORM_SEG3,pfl,loc,zeStr,mesh,section,globs,ptsForLoc));
-  int nbSecPts(section->getNumberOfNodes()),nbCells(geoMesh->getNumberOfCells()),nbg(loc.getGaussWeights().size());
+  mcIdType nbSecPts(section->getNumberOfNodes()),nbCells(geoMesh->getNumberOfCells()),nbg(ToIdType(loc.getGaussWeights().size()));
   MCConstAuto<DataArrayDouble> zeAngle,zeScale;
   if(!pfl.empty())
     {
-      const DataArrayInt *pflArr(globs->getProfile(pfl));
+      const DataArrayIdType *pflArr(globs->getProfile(pfl));
       zeAngle=angle->selectByTupleIdSafe(pflArr->begin(),pflArr->end());
       zeScale=scale->selectByTupleIdSafe(pflArr->begin(),pflArr->end());
     }
@@ -531,17 +530,17 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshPipeSEG3(const DataArrayDouble *angle,
     dir=geoMesh2->buildDirectionVectorField();
   }
   MCAuto<DataArrayDouble> rot(dir->getArray()->fromCartToSpher());
-  int nbCompo(ptsForLoc->getNumberOfComponents());
+  std::size_t nbCompo(ptsForLoc->getNumberOfComponents());
   MCAuto<DataArrayDouble> secPts(section->getCoords()->changeNbOfComponents(nbCompo,0.));
   {
     const int TAB[3]={2,0,1};
-    std::vector<int> v(TAB,TAB+3);
+    std::vector<std::size_t> v(TAB,TAB+3);
     secPts=secPts->keepSelectedComponents(v);
   }
   const double CENTER[3]={0.,0.,0.},AX0[3]={0.,0.,1.};
   double AX1[3]; AX1[2]=0.;
   std::vector< MCAuto<DataArrayDouble> > arrs(nbCells*nbg);
-  for(int j=0;j<nbCells;j++)
+  for(mcIdType j=0;j<nbCells;j++)
     {
       constexpr int DIM=3;
       MCAuto<DataArrayDouble> p(secPts->deepCopy());
@@ -566,7 +565,7 @@ MCAuto<DataArrayDouble> LocInfo::BuildMeshPipeSEG3(const DataArrayDouble *angle,
           MCAuto<DataArrayDouble> p3(p->deepCopy());
           DataArrayDouble::Rotate3DAlg(CENTER,dir->getArray()->begin()+j*3,zeAngle->getIJ(j,l),nbSecPts,p3->begin(),p3->getPointer());
           MCAuto<DataArrayDouble> p2(p3->deepCopy());
-          for(int k=0;k<nbCompo;k++)
+          for(std::size_t k=0;k<nbCompo;k++)
             p2->applyLin(1.,ptsForLoc->getIJ(j*nbg+l,k),k);
           arrs[j*nbg+l]=p2;
         }
@@ -648,11 +647,11 @@ MCAuto<MEDFileUMesh> LocInfo::generateNonClassicalData(int zePos, const MEDFileU
         if(um->getNumberOfCells()!=1)
           throw INTERP_KERNEL::Exception(MSG1);
         gt=um->getTypeOfCell(0);
-        std::vector<int> v;
+        std::vector<mcIdType> v;
         um->getNodeIdsOfCell(0,v);
         std::size_t sz2(v.size());
         for(std::size_t j=0;j<sz2;j++)
-          if(v[j]!=j)
+          if(v[j]!=ToIdType(j))
             throw INTERP_KERNEL::Exception(MSG1);
       }
       const std::vector< MCAuto<MEDFileEltStruct4Mesh> >& strs(mesh->getAccessOfUndergroundEltStrs());
index 8c3c171731f00fd79044121a476ac23f361b4747..28e0750178782f1f29089bcec70b7b5e4a22edee 100644 (file)
@@ -203,16 +203,16 @@ bool MEDFileData::unPolyzeMeshes()
   if(!ms)
     return false;
   std::vector< MEDFileMesh * > meshesImpacted;
-  std::vector< DataArrayInt * > renumParamsOfMeshImpacted;//same size as meshesImpacted
-  std::vector< std::vector<int> > oldCodeOfMeshImpacted,newCodeOfMeshImpacted;//same size as meshesImpacted
-  std::vector<MCAuto<DataArrayInt> > memSaverIfThrow;//same size as meshesImpacted
+  std::vector< DataArrayIdType * > renumParamsOfMeshImpacted;//same size as meshesImpacted
+  std::vector< std::vector<mcIdType> > oldCodeOfMeshImpacted,newCodeOfMeshImpacted;//same size as meshesImpacted
+  std::vector<MCAuto<DataArrayIdType> > memSaverIfThrow;//same size as meshesImpacted
   for(int i=0;i<ms->getNumberOfMeshes();i++)
     {
       MEDFileMesh *m=ms->getMeshAtPos(i);
       if(m)
         {
-          std::vector<int> oldCode,newCode;
-          DataArrayInt *o2nRenumCell=0;
+          std::vector<mcIdType> oldCode,newCode;
+          DataArrayIdType *o2nRenumCell=0;
           bool modif=m->unPolyze(oldCode,newCode,o2nRenumCell);
           if(!modif)
             continue;
@@ -252,7 +252,7 @@ MCAuto<MEDFileData> MEDFileData::Aggregate(const std::vector<const MEDFileData *
   std::size_t sz(mfds.size()),i(0);
   MCAuto<MEDFileData> ret(MEDFileData::New());
   std::vector<const MEDFileUMesh *> ms(sz);
-  std::vector< std::vector< std::pair<int,int> > > dts(sz);
+  std::vector< std::vector< std::pair<int,mcIdType> > > dts(sz);
   for(std::vector<const MEDFileData *>::const_iterator it=mfds.begin();it!=mfds.end();it++,i++)
     {
       const MEDFileData *elt(*it);
index 10fe80b8666c9373263cb44fe9c9a2690f52f07f..bbc44b6dfb8dd69d96ee8d8f7fe44a83a8fc24b5 100644 (file)
@@ -21,6 +21,7 @@
 #include "MEDFileEquivalence.hxx"
 #include "MEDFileSafeCaller.txx"
 #include "MEDCouplingMemArray.hxx"
+#include "MEDCouplingMemArray.txx"
 #include "MEDLoaderBase.hxx"
 #include "MEDFileMesh.hxx"
 #include "InterpKernelAutoPtr.hxx"
@@ -206,12 +207,12 @@ void MEDFileEquivalencePair::load(med_idt fid)
   MEDFILESAFECALLERRD0(MEDequivalenceCorrespondenceSize,(fid,meshName.c_str(),_name.c_str(),dt,it,MED_NODE,MED_NONE,&ncor));
   if(ncor>0)
     {
-      MCAuto<DataArrayInt> da(DataArrayInt::New());
+      MCAuto<DataArrayMedInt> da(DataArrayMedInt::New());
       da->alloc(ncor*2);
       MEDFILESAFECALLERRD0(MEDequivalenceCorrespondenceRd,(fid,meshName.c_str(),_name.c_str(),dt,it,MED_NODE,MED_NONE,da->getPointer()));
       da->applyLin(1,-1);
       da->rearrange(2);
-      MCAuto<MEDFileEquivalenceNode> node(new MEDFileEquivalenceNode(this,da));
+      MCAuto<MEDFileEquivalenceNode> node(new MEDFileEquivalenceNode(this,FromMedIntArray<int>(da)));
       _node=node;
     }
   _cell=MEDFileEquivalenceCell::Load(fid,this);
@@ -280,7 +281,7 @@ MEDFileEquivalencePair *MEDFileEquivalences::getEquivalenceWithName(const std::s
 
 int MEDFileEquivalences::size() const
 {
-  return _equ.size();
+  return (int)_equ.size();
 }
 
 std::vector<std::string> MEDFileEquivalences::getEquivalenceNames() const
@@ -405,7 +406,7 @@ void MEDFileEquivalences::writeLL(med_idt fid) const
 int MEDFileEquivalences::PresenceOfEquivalences(med_idt fid, const std::string& meshName)
 {
   med_int nequ(MEDnEquivalence(fid,meshName.c_str()));
-  return nequ;
+  return FromMedInt<int>(nequ);
 }
 
 MEDFileEquivalences *MEDFileEquivalences::Load(med_idt fid, int nbOfEq, MEDFileMesh *owner)
@@ -418,7 +419,7 @@ MEDFileEquivalences *MEDFileEquivalences::Load(med_idt fid, int nbOfEq, MEDFileM
     {
       INTERP_KERNEL::AutoPtr<char> equ(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
       INTERP_KERNEL::AutoPtr<char> desc(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE));
-      int nstep,nocstpncor;
+      med_int nstep,nocstpncor;
       MEDFILESAFECALLERRD0(MEDequivalenceInfo,(fid,meshName.c_str(),i+1,equ,desc,&nstep,&nocstpncor));
       std::string eqName(MEDLoaderBase::buildStringFromFortran(equ,MED_NAME_SIZE)),eqDescName(MEDLoaderBase::buildStringFromFortran(desc,MED_COMMENT_SIZE));
       MCAuto<MEDFileEquivalencePair> eqv(MEDFileEquivalencePair::Load(ret,fid,eqName,eqDescName));
@@ -510,8 +511,8 @@ void MEDFileEquivalenceData::writeAdvanced(med_idt fid, med_entity_type medtype,
   INTERP_KERNEL::AutoPtr<char> name(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   MEDLoaderBase::safeStrCpy(meshName.c_str(),MED_NAME_SIZE,meshName2,getFather()->getMesh()->getTooLongStrPolicy());
   MEDLoaderBase::safeStrCpy(equName.c_str(),MED_NAME_SIZE,name,getFather()->getMesh()->getTooLongStrPolicy());
-  MCAuto<DataArrayInt> da2(da->deepCopy()); da2->rearrange(1); da2->applyLin(1,1); da2->rearrange(2);
-  MEDFILESAFECALLERWR0(MEDequivalenceCorrespondenceWr,(fid,meshName2,name,dt,it,medtype,medgt,da2->getNumberOfTuples(),da2->begin()));
+  MCAuto<DataArrayMedInt> da2(DataArrayMedInt::Copy(da)); da2->rearrange(1); da2->applyLin(1,1); da2->rearrange(2);
+  MEDFILESAFECALLERWR0(MEDequivalenceCorrespondenceWr,(fid,meshName2,name,dt,it,medtype,medgt,ToMedInt(da2->getNumberOfTuples()),da2->begin()));
 }
 
 std::size_t MEDFileEquivalenceCellType::getHeapMemorySizeWithoutChildren() const
@@ -661,7 +662,7 @@ void MEDFileEquivalenceCell::setArray(int meshDimRelToMax, DataArrayInt *da)
     return ;
   MEDFileEquivalences::CheckDataArray(da);
   MEDFileMesh *mm(getMesh());
-  int totalNbOfCells(mm->getNumberOfCellsAtLevel(meshDimRelToMax));
+  mcIdType totalNbOfCells(mm->getNumberOfCellsAtLevel(meshDimRelToMax));
   //
   MCAuto<DataArrayInt> tmp(da->deepCopy()); tmp->rearrange(1);
   int maxv,minv;
@@ -674,12 +675,12 @@ void MEDFileEquivalenceCell::setArray(int meshDimRelToMax, DataArrayInt *da)
   //
   std::vector<INTERP_KERNEL::NormalizedCellType> gts(mm->getGeoTypesAtLevel(meshDimRelToMax));
   int startId(0),endId;
-  std::vector<int> compS(1,0);
+  std::vector<std::size_t> compS(1,0);
   for(std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator it=gts.begin();it!=gts.end();it++)
     {
-      endId=startId+mm->getNumberOfCellsWithType(*it);
+      endId=startId+(int)mm->getNumberOfCellsWithType(*it);
       MCAuto<DataArrayInt> da0(da->keepSelectedComponents(compS));
-      MCAuto<DataArrayInt> ids(da0->findIdsInRange(startId,endId));
+      MCAuto<DataArrayIdType> ids(da0->findIdsInRange(startId,endId));
       MCAuto<DataArrayInt> da1(da->selectByTupleIdSafe(ids->begin(),ids->end()));
       da1->applyLin(1,-startId);
       setArrayForType(*it,da1);
@@ -725,12 +726,12 @@ void MEDFileEquivalenceCell::load(med_idt fid)
       MEDFILESAFECALLERRD0(MEDequivalenceCorrespondenceSize,(fid,meshName.c_str(),name.c_str(),dt,it,MED_CELL,typmai[i],&ncor));
       if(ncor>0)
         {
-          MCAuto<DataArrayInt> da(DataArrayInt::New());
+          MCAuto<DataArrayMedInt> da(DataArrayMedInt::New());
           da->alloc(ncor*2);
           MEDFILESAFECALLERRD0(MEDequivalenceCorrespondenceRd,(fid,meshName.c_str(),name.c_str(),dt,it,MED_CELL,typmai[i],da->getPointer()));
           da->applyLin(1,-1);
           da->rearrange(2);
-          MCAuto<MEDFileEquivalenceCellType> ct(new MEDFileEquivalenceCellType(getFather(),typmai2[i],da));
+          MCAuto<MEDFileEquivalenceCellType> ct(new MEDFileEquivalenceCellType(getFather(),typmai2[i],FromMedIntArray<int>(da)));
           _types.push_back(ct);
         }
     }
index e18ca59cba721302e6d0bd3d32367e3f135c74c3..61bceea4a2f4fdfac553130a40434921ef92c64d 100644 (file)
@@ -169,7 +169,7 @@ std::vector< std::pair<int,int> > MEDFileFields::getCommonIterations(bool& areTh
 
 int MEDFileFields::getNumberOfFields() const
 {
-  return _fields.size();
+  return (int)_fields.size();
 }
 
 std::vector<std::string> MEDFileFields::getFieldsNames() const
@@ -256,7 +256,7 @@ MEDFileFields::MEDFileFields()
 MEDFileFields::MEDFileFields(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities)
 try:MEDFileFieldGlobsReal(fid)
 {
-  int nbFields(MEDnField(fid));
+  med_int nbFields(MEDnField(fid));
   _fields.resize(nbFields);
   med_field_type typcha;
   for(int i=0;i<nbFields;i++)
@@ -515,7 +515,7 @@ void MEDFileFields::destroyFieldsAtPos(const int *startIds, const int *endIds)
 void MEDFileFields::destroyFieldsAtPos2(int bg, int end, int step)
 {
   static const char msg[]="MEDFileFields::destroyFieldsAtPos2";
-  int nbOfEntriesToKill(DataArrayInt::GetNumberOfItemGivenBESRelative(bg,end,step,msg));
+  mcIdType nbOfEntriesToKill(DataArrayIdType::GetNumberOfItemGivenBESRelative(bg,end,step,msg));
   std::vector<bool> b(_fields.size(),true);
   int k=bg;
   for(int i=0;i<nbOfEntriesToKill;i++,k+=step)
@@ -556,7 +556,7 @@ bool MEDFileFields::changeMeshNames(const std::vector< std::pair<std::string,std
  * \return If true a renumbering has been performed. The structure in \a this has been modified. If false, nothing has been done: it is typically the case if \a meshName is not referred by any 
  *         field in \a this.
  */
-bool MEDFileFields::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N)
+bool MEDFileFields::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N)
 {
   bool ret(false);
   for(std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> >::iterator it=_fields.begin();it!=_fields.end();it++)
@@ -576,7 +576,7 @@ bool MEDFileFields::renumberEntitiesLyingOnMesh(const std::string& meshName, con
  *
  * \return A new object that the caller is responsible to deallocate.
  */
-MEDFileFields *MEDFileFields::extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const
+MEDFileFields *MEDFileFields::extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const
 {
   if(!mm)
     throw INTERP_KERNEL::Exception("MEDFileFields::extractPart : input mesh is NULL !");
@@ -611,15 +611,15 @@ class PFLData
 {
 public:
   PFLData():_add_pts_in_pfl(0) { }
-  PFLData(const MCAuto<DataArrayInt>& mat, const MCAuto<DataArrayInt>& pfl, int nbOfNewPts):_matrix(mat),_pfl(pfl),_add_pts_in_pfl(nbOfNewPts) { }
+  PFLData(const MCAuto<DataArrayIdType>& mat, const MCAuto<DataArrayIdType>& pfl, mcIdType nbOfNewPts):_matrix(mat),_pfl(pfl),_add_pts_in_pfl(nbOfNewPts) { }
   std::string getPflName() const { if(_pfl.isNull()) { return std::string(); } else { return _pfl->getName(); } }
-  int getNbOfAddPtsInPfl() const { return _add_pts_in_pfl; }
-  MCAuto<DataArrayInt> getProfile() const { return _pfl; }
-  MCAuto<DataArrayInt> getMatrix() const { return _matrix; }
+  mcIdType getNbOfAddPtsInPfl() const { return _add_pts_in_pfl; }
+  MCAuto<DataArrayIdType> getProfile() const { return _pfl; }
+  MCAuto<DataArrayIdType> getMatrix() const { return _matrix; }
 private:
-  MCAuto<DataArrayInt> _matrix;
-  MCAuto<DataArrayInt> _pfl;
-  int _add_pts_in_pfl;
+  MCAuto<DataArrayIdType> _matrix;
+  MCAuto<DataArrayIdType> _pfl;
+  mcIdType _add_pts_in_pfl;
 };
 
 class MEDFileFieldLin2QuadVisitor : public MEDFileFieldVisitor
@@ -640,7 +640,7 @@ public:
   //
   void newPerMeshPerTypePerDisc(const MEDFileFieldPerMeshPerTypePerDisc *pmptpd);
 private:
-  void updateData(MEDFileFieldPerMeshPerTypePerDisc *pmtd, int deltaNbNodes);
+  void updateData(MEDFileFieldPerMeshPerTypePerDisc *pmtd, mcIdType deltaNbNodes);
 private:
   const MEDFileUMesh *_lin;
   const MEDFileUMesh *_quad;
@@ -674,48 +674,48 @@ void MEDFileFieldLin2QuadVisitor::newPerMeshPerTypePerDisc(const MEDFileFieldPer
       updateData(pmtdToModify,(*itCache).second.getNbOfAddPtsInPfl());
       return ;
     }
-  MCAuto<DataArrayInt> pfl;
+  MCAuto<DataArrayIdType> pfl;
   if(pflName.empty())
-    pfl=DataArrayInt::Range(0,pmptpd->getNumberOfVals(),1);
+    pfl=DataArrayIdType::Range(0,pmptpd->getNumberOfVals(),1);
   else
     pfl=_lin_globs->getProfile(pflName)->deepCopy();
   //
   MCAuto<MEDCouplingUMesh> mesh3D(_lin->getMeshAtLevel(0)),mesh3DQuadratic(_quad->getMeshAtLevel(0));
-  MCAuto<DataArrayInt> cellIds(mesh3D->getCellIdsLyingOnNodes(pfl->begin(),pfl->end(),true));
+  MCAuto<DataArrayIdType> cellIds(mesh3D->getCellIdsLyingOnNodes(pfl->begin(),pfl->end(),true));
   MCAuto<MEDCouplingUMesh> mesh3DQuadraticRestricted(mesh3DQuadratic->buildPartOfMySelf(cellIds->begin(),cellIds->end(),true));
-  MCAuto<DataArrayInt> mesh3DQuadraticRestrictedNodeIds(mesh3DQuadraticRestricted->computeFetchedNodeIds());
+  MCAuto<DataArrayIdType> mesh3DQuadraticRestrictedNodeIds(mesh3DQuadraticRestricted->computeFetchedNodeIds());
   mesh3DQuadraticRestrictedNodeIds->checkMonotonic(true);
-  MCAuto<DataArrayInt> newPtsIds(mesh3DQuadraticRestrictedNodeIds->buildSubstraction(pfl));
+  MCAuto<DataArrayIdType> newPtsIds(mesh3DQuadraticRestrictedNodeIds->buildSubstraction(pfl));
   MCAuto<MEDCoupling1SGTUMesh> allSeg3;
   {
-    MCAuto<DataArrayInt> a,b,c,d;
+    MCAuto<DataArrayIdType> a,b,c,d;
     MCAuto<MEDCouplingUMesh> seg3Tmp(mesh3DQuadraticRestricted->explodeIntoEdges(a,b,c,d));
     allSeg3=MEDCoupling1SGTUMesh::New(seg3Tmp);
   }
   if(allSeg3->getCellModelEnum()!=INTERP_KERNEL::NORM_SEG3)
     throw INTERP_KERNEL::Exception("MEDFileFieldLin2QuadVisitor::newPerMeshPerTypePerDisc : invalid situation where SEG3 expected !");
-  MCAuto<DataArrayInt> midPts,cellSeg3Ids,matrix;
+  MCAuto<DataArrayIdType> midPts,cellSeg3Ids,matrix;
   {
-    DataArrayInt *nodeConn(allSeg3->getNodalConnectivity());
+    DataArrayIdType *nodeConn(allSeg3->getNodalConnectivity());
     nodeConn->rearrange(3);
     {
-      std::vector<int> v(1,2);
+      std::vector<std::size_t> v(1,2);
       midPts=nodeConn->keepSelectedComponents(v);
     }
-    cellSeg3Ids=DataArrayInt::FindPermutationFromFirstToSecond(midPts,newPtsIds);
+    cellSeg3Ids=DataArrayIdType::FindPermutationFromFirstToSecond(midPts,newPtsIds);
     {
-      std::vector<int> v(2); v[0]=0; v[1]=1;
-      MCAuto<DataArrayInt> tmp(nodeConn->keepSelectedComponents(v));
+      std::vector<std::size_t> v(2); v[0]=0; v[1]=1;
+      MCAuto<DataArrayIdType> tmp(nodeConn->keepSelectedComponents(v));
       matrix=tmp->selectByTupleId(cellSeg3Ids->begin(),cellSeg3Ids->end());
     }
     nodeConn->rearrange(1);
   }
-  MCAuto<DataArrayInt> pflq;
+  MCAuto<DataArrayIdType> pflq;
   if(!pflName.empty())
     {
-      std::vector<const DataArrayInt *> vs(2);
+      std::vector<const DataArrayIdType *> vs(2);
       vs[0]=pfl; vs[1]=newPtsIds;
-      pflq=DataArrayInt::Aggregate(vs);
+      pflq=DataArrayIdType::Aggregate(vs);
       pflq->setName(pflName);
     }
   PFLData pdata(matrix,pflq,newPtsIds->getNumberOfTuples());
@@ -723,7 +723,7 @@ void MEDFileFieldLin2QuadVisitor::newPerMeshPerTypePerDisc(const MEDFileFieldPer
   updateData(pmtdToModify,pdata.getNbOfAddPtsInPfl());
 }
 
-void MEDFileFieldLin2QuadVisitor::updateData(MEDFileFieldPerMeshPerTypePerDisc *pmtd, int deltaNbNodes)
+void MEDFileFieldLin2QuadVisitor::updateData(MEDFileFieldPerMeshPerTypePerDisc *pmtd, mcIdType deltaNbNodes)
 {
   pmtd->incrementNbOfVals(deltaNbNodes);
 }
@@ -766,7 +766,7 @@ void MEDFileFieldLin2QuadVisitor::endTimeStepEntry(const MEDFileAnyTypeField1TSW
     return ;
   if(_1ts_update_requested)
     {
-      MCAuto<DataArrayInt> matrix,oldPfl;
+      MCAuto<DataArrayIdType> matrix,oldPfl;
       for(std::vector<std::string>::const_iterator it=_pfls_to_be_updated.begin();it!=_pfls_to_be_updated.end();it++)
         {
           std::map< std::string, PFLData >::const_iterator it2(_cache.find(*it));
@@ -786,9 +786,9 @@ void MEDFileFieldLin2QuadVisitor::endTimeStepEntry(const MEDFileAnyTypeField1TSW
       DataArrayDouble *arr(_cur_f1ts->getUndergroundDataArray());
       MCAuto<DataArrayDouble> res;
       {
-        std::vector<int> v(1,0),v2(1,1);
-        MCAuto<DataArrayInt> pts0(matrix->keepSelectedComponents(v));
-        MCAuto<DataArrayInt> pts1(matrix->keepSelectedComponents(v2));
+        std::vector<std::size_t> v(1,0),v2(1,1);
+        MCAuto<DataArrayIdType> pts0(matrix->keepSelectedComponents(v));
+        MCAuto<DataArrayIdType> pts1(matrix->keepSelectedComponents(v2));
         if(oldPfl.isNotNull())
           {
             pts0=oldPfl->findIdForEach(pts0->begin(),pts0->end());
@@ -1110,7 +1110,7 @@ int MEDFileFields::getPosFromFieldName(const std::string& fieldName) const
 {
   std::string tmp(fieldName);
   std::vector<std::string> poss;
-  for(std::size_t i=0;i<_fields.size();i++)
+  for(unsigned int i=0;i<_fields.size();i++)
     {
       const MEDFileAnyTypeFieldMultiTSWithoutSDA *f(_fields[i]);
       if(f)
index f79c2a8707550e2ab2d697395f1ee7b6243e33c6..7897ccc81136e7cfbfc80952d253cd8ce9755814 100644 (file)
@@ -121,11 +121,11 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void destroyFieldsAtPos(const int *startIds, const int *endIds);
     MEDLOADER_EXPORT void destroyFieldsAtPos2(int bg, int end, int step);
     MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
-    MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N);
+    MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N);
     MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
     MEDLOADER_EXPORT MCAuto<MEDFileFields> linearToQuadratic(const MEDFileMeshes *oldLin, const MEDFileMeshes *newQuad) const;
   public:
-    MEDLOADER_EXPORT MEDFileFields *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const;
+    MEDLOADER_EXPORT MEDFileFields *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
   public:
     MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
     MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
index d08370c773d46b3689e2db6e7bafbc2edfda39fa..c78b010f9c762693adbeec4c2ebd90321bb10328 100644 (file)
@@ -127,7 +127,7 @@ namespace MEDCoupling
    *  \sa getUndergroundDataArrayTemplate()
    */
   template<class T>
-  typename Traits<T>::ArrayType *MEDFileField1TSTemplateWithoutSDA<T>::getUndergroundDataArrayTemplateExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+  typename Traits<T>::ArrayType *MEDFileField1TSTemplateWithoutSDA<T>::getUndergroundDataArrayTemplateExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
   {
     if(this->_field_per_mesh.size()!=1)
       throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt : field lies on several meshes, this method has no sense !");
@@ -151,7 +151,7 @@ namespace MEDCoupling
   }
   
   template<class T>
-  void MEDFileField1TSTemplateWithoutSDA<T>::aggregate(const std::vector<typename MLFieldTraits<T>::F1TSWSDAType const *>& f1tss, const std::vector< std::vector< std::pair<int,int> > >& dts)
+  void MEDFileField1TSTemplateWithoutSDA<T>::aggregate(const std::vector<typename MLFieldTraits<T>::F1TSWSDAType const *>& f1tss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts)
   {
     if(f1tss.empty())
       throw INTERP_KERNEL::Exception("MEDFileField1TSTemplateWithoutSDA::aggregate : empty vector !");
@@ -174,15 +174,15 @@ namespace MEDCoupling
     setName(refPt->getName());
     
     const DataArray *arr(refPt->getUndergroundDataArray());
-    int nbCompo(arr->getNumberOfComponents());
+    std::size_t nbCompo(arr->getNumberOfComponents());
     for(typename std::vector<typename MLFieldTraits<T>::F1TSWSDAType const *>::const_iterator it=f1tss.begin();it!=f1tss.end();it++)
       {
         const typename Traits<T>::ArrayType *myArr((*it)->getUndergroundDataArrayTemplate());
         if(myArr->getNumberOfComponents()!=nbCompo)
           throw INTERP_KERNEL::Exception("MEDFileField1TSTemplateWithoutSDA::aggregate : arrays must have same number of components !");
       }
-    std::vector<std::pair< int, std::pair<int,int> > > extractInfo;
-    int start(0);
+    std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > > extractInfo;
+    mcIdType start(0);
     MCAuto<MEDFileFieldPerMesh> fpm(MEDFileFieldPerMesh::Aggregate(start,pms,dts,this,extractInfo));
     _field_per_mesh.push_back(fpm);
     int iteration,order;
@@ -191,7 +191,7 @@ namespace MEDCoupling
     _arr=Traits<T>::ArrayType::New();
     _arr->alloc(start,nbCompo); _arr->copyStringInfoFrom(*arr);
     start=0;
-    for(std::vector<std::pair< int, std::pair<int,int> > >::const_iterator it=extractInfo.begin();it!=extractInfo.end();it++)
+    for(std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > >::const_iterator it=extractInfo.begin();it!=extractInfo.end();it++)
       {
         const DataArray *zeArr(das[(*it).first]);
         _arr->setContigPartOfSelectedValuesSlice(start,zeArr,(*it).second.first,(*it).second.second,1);
@@ -401,7 +401,7 @@ namespace MEDCoupling
    *  \throw If no field values of the given \a type or given \a meshDimRelToMax are available.
    */
   template<class T>
-  typename Traits<T>::ArrayType *MEDFileTemplateField1TS<T>::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const
+  typename Traits<T>::ArrayType *MEDFileTemplateField1TS<T>::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const
   {
     MCAuto<DataArray> arr(contentNotNull()->getFieldWithProfile(type,meshDimRelToMax,mesh,pfl,this,*contentNotNull()));
     return ReturnSafelyTypedDataArray(arr);
@@ -420,7 +420,7 @@ namespace MEDCoupling
   }
   
   template<class T>
-  typename Traits<T>::ArrayType *MEDFileTemplateField1TS<T>::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+  typename Traits<T>::ArrayType *MEDFileTemplateField1TS<T>::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
   {
     return contentNotNull()->getUndergroundDataArrayTemplateExt(entries);
   }
@@ -685,7 +685,7 @@ namespace MEDCoupling
    *  \sa setFieldNoProfileSBT, setFieldProfileFlatly
    */
   template<class T>
-  void MEDFileTemplateField1TS<T>::setFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile)
+  void MEDFileTemplateField1TS<T>::setFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile)
   {
     setFieldProfileGeneral(field,mesh,meshDimRelToMax,profile,true);
   }
@@ -695,13 +695,13 @@ namespace MEDCoupling
    * \sa setFieldProfile
    */
   template<class T>
-  void MEDFileTemplateField1TS<T>::setFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile)
+  void MEDFileTemplateField1TS<T>::setFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile)
   {
     setFieldProfileGeneral(field,mesh,meshDimRelToMax,profile,false);
   }
 
   template<class T>
-  void MEDFileTemplateField1TS<T>::setFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, bool smartPflKiller)
+  void MEDFileTemplateField1TS<T>::setFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, bool smartPflKiller)
   {
     setFileName("");
     MCAuto<MEDCouplingFieldTemplate> ft(MEDCouplingFieldTemplate::NewWithoutCheck(*field));
@@ -716,7 +716,7 @@ namespace MEDCoupling
    * \sa MEDFileUMesh::deduceNodeSubPartFromCellSubPart , MEDFileUMesh::extractPart
    */
   template<class T>
-  typename MLFieldTraits<T>::F1TSType *MEDFileTemplateField1TS<T>::extractPartImpl(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const
+  typename MLFieldTraits<T>::F1TSType *MEDFileTemplateField1TS<T>::extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const
   {
     if(!mm)
       throw INTERP_KERNEL::Exception("MEDFileField1TS::extractPart : input mesh is NULL !");
@@ -730,10 +730,10 @@ namespace MEDCoupling
             getNonEmptyLevels(mm->getName(),levs);
             for(std::vector<int>::const_iterator lev=levs.begin();lev!=levs.end();lev++)
               {
-                std::map<int, MCAuto<DataArrayInt> >::const_iterator it2(extractDef.find(*lev));
+                std::map<int, MCAuto<DataArrayIdType> >::const_iterator it2(extractDef.find(*lev));
                 if(it2!=extractDef.end())
                   {
-                    MCAuto<DataArrayInt> t((*it2).second);
+                    MCAuto<DataArrayIdType> t((*it2).second);
                     if(t.isNull())
                       throw INTERP_KERNEL::Exception("MEDFileField1TS::extractPart : presence of a value with null pointer 1 !");
                     MCAuto<typename Traits<T>::FieldType> f(getFieldOnMeshAtLevel(ON_CELLS,(*lev),mm));
@@ -744,10 +744,10 @@ namespace MEDCoupling
           }
         else
           {
-            std::map<int, MCAuto<DataArrayInt> >::const_iterator it2(extractDef.find(1));
+            std::map<int, MCAuto<DataArrayIdType> >::const_iterator it2(extractDef.find(1));
             if(it2==extractDef.end())
               throw INTERP_KERNEL::Exception("MEDFileField1TS::extractPart : presence of a NODE field and no extract array available for NODE !");
-            MCAuto<DataArrayInt> t((*it2).second);
+            MCAuto<DataArrayIdType> t((*it2).second);
             if(t.isNull())
               throw INTERP_KERNEL::Exception("MEDFileField1TS::extractPart : presence of a value with null pointer 1 !");
             MCAuto<typename Traits<T>::FieldType> f(getFieldOnMeshAtLevel(ON_NODES,0,mm));
@@ -888,7 +888,7 @@ namespace MEDCoupling
    * \return A new object that the caller is responsible to deallocate.
    */
   template<class T>
-  typename MLFieldTraits<T>::FMTSType *MEDFileTemplateFieldMultiTS<T>::extractPartImpl(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const
+  typename MLFieldTraits<T>::FMTSType *MEDFileTemplateFieldMultiTS<T>::extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const
   {
     if(!mm)
       throw INTERP_KERNEL::Exception("MEDFileTemplateFieldMultiTS<T>::extractPart : mesh is null !");
@@ -1175,7 +1175,7 @@ namespace MEDCoupling
    *  \param [in] order - the iteration order number of required time step.
    *  \param [in] meshDimRelToMax - a relative dimension of the supporting mesh entities.
    *  \param [in] mesh - the supporting mesh.
-   *  \param [out] pfl - a new instance of DataArrayInt holding ids of mesh entities the
+   *  \param [out] pfl - a new instance of DataArrayIdType holding ids of mesh entities the
    *          field of interest lies on. If the field lies on all entities of the given
    *          dimension, all ids in \a pfl are zero. The caller is to delete this array
    *          using decrRef() as it is no more needed.  
@@ -1187,7 +1187,7 @@ namespace MEDCoupling
    *  \throw If no field values of the required parameters are available.
    */
   template<class T>
-  typename Traits<T>::ArrayType *MEDFileTemplateFieldMultiTS<T>::getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const
+  typename Traits<T>::ArrayType *MEDFileTemplateFieldMultiTS<T>::getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const
   {
     const MEDFileAnyTypeField1TSWithoutSDA& myF1TS(contentNotNullBase()->getTimeStepEntry(iteration,order));
     const typename MLFieldTraits<T>::F1TSWSDAType *myF1TSC(dynamic_cast<const typename MLFieldTraits<T>::F1TSWSDAType *>(&myF1TS));
@@ -1241,7 +1241,7 @@ namespace MEDCoupling
    *  \sa setFieldNoProfileSBT, appendFieldProfileFlatly
    */
   template<class T>
-  void MEDFileTemplateFieldMultiTS<T>::appendFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile)
+  void MEDFileTemplateFieldMultiTS<T>::appendFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile)
   {
     appendFieldProfileGeneral(field,mesh,meshDimRelToMax,profile,true);
   }
@@ -1250,13 +1250,13 @@ namespace MEDCoupling
    * same as appendFieldProfile except that here profile is created unconditionaly
    */
   template<class T>
-  void MEDFileTemplateFieldMultiTS<T>::appendFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile)
+  void MEDFileTemplateFieldMultiTS<T>::appendFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile)
   {
     appendFieldProfileGeneral(field,mesh,meshDimRelToMax,profile,false);
   }
 
   template<class T>
-  void MEDFileTemplateFieldMultiTS<T>::appendFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, bool smartPflKiller)
+  void MEDFileTemplateFieldMultiTS<T>::appendFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, bool smartPflKiller)
   {
     const typename Traits<T>::ArrayType *arr(NULL);
     if(field)
@@ -1332,7 +1332,7 @@ namespace MEDCoupling
   }
 
   template<class T>
-  typename Traits<T>::ArrayType *MEDFileTemplateFieldMultiTS<T>::getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+  typename Traits<T>::ArrayType *MEDFileTemplateFieldMultiTS<T>::getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
   {
     DataArray *ret(contentNotNull()->getUndergroundDataArrayExt(iteration,order,entries));
     if(!ret)
index 36f517561db00633b080752a54b6d773c3fbd001..dc51ad550b7c9f69bd5986e6e359aff383cfc308 100644 (file)
@@ -135,12 +135,12 @@ std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > MEDFileAnyTypeField1TSWi
   const DataArray *arr(getUndergroundDataArray());
   if(!arr)
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::splitComponents : no array defined !");
-  int nbOfCompo=arr->getNumberOfComponents();
+  std::size_t nbOfCompo=arr->getNumberOfComponents();
   std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > ret(nbOfCompo);
-  for(int i=0;i<nbOfCompo;i++)
+  for(std::size_t i=0;i<nbOfCompo;i++)
     {
       ret[i]=deepCopy();
-      std::vector<int> v(1,i);
+      std::vector<std::size_t> v(1,i);
       MCAuto<DataArray> arr2=arr->keepSelectedComponents(v);
       ret[i]->setArray(arr2);
     }
@@ -368,7 +368,7 @@ void MEDFileAnyTypeField1TSWithoutSDA::changeLocsRefsNamesGen2(const std::vector
  *          Length of this and of nested sequences is the same as that of \a typesF.
  *  \throw If no field is lying on \a mname.
  */
-std::vector< std::vector< std::pair<int,int> > > MEDFileAnyTypeField1TSWithoutSDA::getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const
+std::vector< std::vector< std::pair<mcIdType,mcIdType> > > MEDFileAnyTypeField1TSWithoutSDA::getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const
 {
   if(_field_per_mesh.empty())
     throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getFieldSplitedByType : This is empty !");
@@ -450,7 +450,7 @@ void MEDFileAnyTypeField1TSWithoutSDA::convertMedBallIntoClassic()
       (*it)->convertMedBallIntoClassic();
 }
 
-void MEDFileAnyTypeField1TSWithoutSDA::makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayInt *pfl)
+void MEDFileAnyTypeField1TSWithoutSDA::makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl)
 {
   if(!pfl)
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::makeReduction : null pfl !");
@@ -468,9 +468,9 @@ void MEDFileAnyTypeField1TSWithoutSDA::makeReduction(INTERP_KERNEL::NormalizedCe
   MEDFileFieldPerMeshPerTypePerDisc *disc(fpm->getLeafGivenTypeAndLocId(ct,0));
   if(disc->getType()!=tof)
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::makeReduction : error !");
-  int s(disc->getStart()),e(disc->getEnd()),nt(pfl->getNumberOfTuples());
+  mcIdType s(disc->getStart()),e(disc->getEnd()),nt(pfl->getNumberOfTuples());
   DataArray *arr(getUndergroundDataArray());
-  int nt2(arr->getNumberOfTuples()),delta((e-s)-nt);
+  mcIdType nt2(arr->getNumberOfTuples()),delta((e-s)-nt);
   if(delta<0)
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::makeReduction : internal error !");
   MCAuto<DataArray> arr0(arr->selectByTupleIdSafeSlice(0,s,1)),arr1(arr->selectByTupleIdSafeSlice(s,e,1)),arr2(arr->selectByTupleIdSafeSlice(e,nt2,1));
@@ -551,13 +551,13 @@ int MEDFileAnyTypeField1TSWithoutSDA::addNewEntryIfNecessary(const MEDCouplingMe
       if((*it)->getMeshName()==tmp)
         return i;
     }
-  int sz=_field_per_mesh.size();
+  std::size_t sz=_field_per_mesh.size();
   _field_per_mesh.resize(sz+1);
   _field_per_mesh[sz]=MEDFileFieldPerMesh::New(this,mesh);
-  return sz;
+  return (int)sz;
 }
 
-bool MEDFileAnyTypeField1TSWithoutSDA::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N,
+bool MEDFileAnyTypeField1TSWithoutSDA::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N,
                                                                    MEDFileFieldGlobsReal& glob)
 {
   bool ret=false;
@@ -581,7 +581,7 @@ std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > MEDFileAnyTypeField1TSWi
   std::vector<INTERP_KERNEL::NormalizedCellType> types;
   std::vector< std::vector<TypeOfField> > typesF;
   std::vector< std::vector<std::string> > pfls,locs;
-  std::vector< std::vector<std::pair<int,int> > > bgEnd(getFieldSplitedByType(getMeshName().c_str(),types,typesF,pfls,locs));
+  std::vector< std::vector<std::pair<mcIdType,mcIdType> > > bgEnd(getFieldSplitedByType(getMeshName().c_str(),types,typesF,pfls,locs));
   std::set<TypeOfField> allEnt;
   for(std::vector< std::vector<TypeOfField> >::const_iterator it1=typesF.begin();it1!=typesF.end();it1++)
     for(std::vector<TypeOfField>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
@@ -590,9 +590,9 @@ std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > MEDFileAnyTypeField1TSWi
   std::set<TypeOfField>::const_iterator it3(allEnt.begin());
   for(std::size_t i=0;i<allEnt.size();i++,it3++)
     {
-      std::vector< std::pair<int,int> > its;
+      std::vector< std::pair<mcIdType,mcIdType> > its;
       ret[i]=shallowCpy();
-      int newLgth(ret[i]->keepOnlySpatialDiscretization(*it3,its));
+      mcIdType newLgth(ret[i]->keepOnlySpatialDiscretization(*it3,its));
       ret[i]->updateData(newLgth,its);
     }
   return ret;
@@ -609,7 +609,7 @@ std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > MEDFileAnyTypeField1TSWi
   std::vector<INTERP_KERNEL::NormalizedCellType> types;
   std::vector< std::vector<TypeOfField> > typesF;
   std::vector< std::vector<std::string> > pfls,locs;
-  std::vector< std::vector<std::pair<int,int> > > bgEnd(getFieldSplitedByType(getMeshName().c_str(),types,typesF,pfls,locs));
+  std::vector< std::vector<std::pair<mcIdType,mcIdType> > > bgEnd(getFieldSplitedByType(getMeshName().c_str(),types,typesF,pfls,locs));
   std::set<TypeOfField> allEnt;
   std::size_t nbOfMDPGT(0),ii(0);
   for(std::vector< std::vector<TypeOfField> >::const_iterator it1=typesF.begin();it1!=typesF.end();it1++,ii++)
@@ -631,31 +631,31 @@ std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > MEDFileAnyTypeField1TSWi
   std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > ret(nbOfMDPGT);
   for(std::size_t i=0;i<nbOfMDPGT;i++)
     {
-      std::vector< std::pair<int,int> > its;
+      std::vector< std::pair<mcIdType,mcIdType> > its;
       ret[i]=shallowCpy();
-      int newLgth(ret[i]->keepOnlyGaussDiscretization(i,its));
+      mcIdType newLgth(ret[i]->keepOnlyGaussDiscretization(i,its));
       ret[i]->updateData(newLgth,its);
     }
   return ret;
 }
 
-int MEDFileAnyTypeField1TSWithoutSDA::keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<int,int> >& its)
+mcIdType MEDFileAnyTypeField1TSWithoutSDA::keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<mcIdType,mcIdType> >& its)
 {
-  int globalCounter(0);
+  mcIdType globalCounter(0);
   for(std::vector< MCAuto< MEDFileFieldPerMesh > >::iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++)
     (*it)->keepOnlySpatialDiscretization(tof,globalCounter,its);
   return globalCounter;
 }
 
-int MEDFileAnyTypeField1TSWithoutSDA::keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<int,int> >& its)
+mcIdType MEDFileAnyTypeField1TSWithoutSDA::keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<mcIdType,mcIdType> >& its)
 {
-  int globalCounter(0);
+  mcIdType globalCounter(0);
   for(std::vector< MCAuto< MEDFileFieldPerMesh > >::iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++)
     (*it)->keepOnlyGaussDiscretization(idOfDisc,globalCounter,its);
   return globalCounter;
 }
 
-void MEDFileAnyTypeField1TSWithoutSDA::updateData(int newLgth, const std::vector< std::pair<int,int> >& oldStartStops)
+void MEDFileAnyTypeField1TSWithoutSDA::updateData(mcIdType newLgth, const std::vector< std::pair<mcIdType,mcIdType> >& oldStartStops)
 {
   if(_nb_of_tuples_to_be_allocated>=0)
     {
@@ -681,8 +681,8 @@ void MEDFileAnyTypeField1TSWithoutSDA::updateData(int newLgth, const std::vector
       newArr->alloc(newLgth,getNumberOfComponents());
       if(oldArr)
         newArr->copyStringInfoFrom(*oldArr);
-      int pos=0;
-      for(std::vector< std::pair<int,int> >::const_iterator it=oldStartStops.begin();it!=oldStartStops.end();it++)
+      mcIdType pos=0;
+      for(std::vector< std::pair<mcIdType,mcIdType> >::const_iterator it=oldStartStops.begin();it!=oldStartStops.end();it++)
         {
           if((*it).second<(*it).first)
             throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::updateData : the range in the leaves was invalid !");
@@ -762,7 +762,7 @@ void MEDFileAnyTypeField1TSWithoutSDA::loadOnlyStructureOfDataRecursively(med_id
       mm=ms->getMeshWithName(getMeshName());
     }
   //
-  _field_per_mesh[0]=MEDFileFieldPerMesh::NewOnRead(fid,this,0,meshnumdt,meshnumit,nasc,mm,entities);
+  _field_per_mesh[0]=MEDFileFieldPerMesh::NewOnRead(fid,this,0,FromMedInt<int>(meshnumdt),FromMedInt<int>(meshnumit),nasc,mm,entities);
   _nb_of_tuples_to_be_allocated=0;
   _field_per_mesh[0]->loadOnlyStructureOfDataRecursively(fid,_nb_of_tuples_to_be_allocated,nasc);
 }
@@ -832,14 +832,14 @@ void MEDFileAnyTypeField1TSWithoutSDA::setFieldNoProfileSBT(const TimeHolder *th
   const MEDCouplingMesh *mesh(field->getMesh());
   //
   TypeOfField type(field->getTypeOfField());
-  std::vector<DataArrayInt *> dummy;
+  std::vector<DataArrayIdType *> dummy;
   if(mesh)
     setMeshName(mesh->getName());
-  int start(copyTinyInfoFrom(th,field,arr));
+  mcIdType start(copyTinyInfoFrom(th,field,arr));
   int pos(addNewEntryIfNecessary(mesh));
   if(type!=ON_NODES)
     {
-      std::vector<int> code=MEDFileField1TSWithoutSDA::CheckSBTMesh(mesh);
+      std::vector<mcIdType> code=MEDFileField1TSWithoutSDA::CheckSBTMesh(mesh);
       _field_per_mesh[pos]->assignFieldNoProfileNoRenum(start,code,field,arr,glob,nasc);
     }
   else
@@ -871,52 +871,52 @@ void MEDFileAnyTypeField1TSWithoutSDA::setFieldNoProfileSBT(const TimeHolder *th
  *  \throw If elements in \a mesh are not in the order suitable for writing to the MED file.
  *  \sa setFieldNoProfileSBT()
  */
-void MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc, bool smartPflKiller)
+void MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc, bool smartPflKiller)
 {
   if(!field)
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile : input field is null !");
   if(!arrOfVals || !arrOfVals->isAllocated())
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile : input array is null or not allocated !");
   TypeOfField type=field->getTypeOfField();
-  std::vector<DataArrayInt *> idsInPflPerType;
-  std::vector<DataArrayInt *> idsPerType;
-  std::vector<int> code,code2;
+  std::vector<DataArrayIdType *> idsInPflPerType;
+  std::vector<DataArrayIdType *> idsPerType;
+  std::vector<mcIdType> code,code2;
   MCAuto<MEDCouplingMesh> m(mesh->getMeshAtLevel(meshDimRelToMax));
   if(type!=ON_NODES)
     {
       m->splitProfilePerType(profile,code,idsInPflPerType,idsPerType,smartPflKiller);
-      std::vector< MCAuto<DataArrayInt> > idsInPflPerType2(idsInPflPerType.size()); std::copy(idsInPflPerType.begin(),idsInPflPerType.end(),idsInPflPerType2.begin());
-      std::vector< MCAuto<DataArrayInt> > idsPerType2(idsPerType.size()); std::copy(idsPerType.begin(),idsPerType.end(),idsPerType2.begin()); 
-      std::vector<const DataArrayInt *> idsPerType3(idsPerType.size()); std::copy(idsPerType.begin(),idsPerType.end(),idsPerType3.begin());
+      std::vector< MCAuto<DataArrayIdType> > idsInPflPerType2(idsInPflPerType.size()); std::copy(idsInPflPerType.begin(),idsInPflPerType.end(),idsInPflPerType2.begin());
+      std::vector< MCAuto<DataArrayIdType> > idsPerType2(idsPerType.size()); std::copy(idsPerType.begin(),idsPerType.end(),idsPerType2.begin()); 
+      std::vector<const DataArrayIdType *> idsPerType3(idsPerType.size()); std::copy(idsPerType.begin(),idsPerType.end(),idsPerType3.begin());
       // start of check
       MCAuto<MEDCouplingFieldTemplate> field2=field->clone(false);
-      int nbOfTuplesExp=field2->getNumberOfTuplesExpectedRegardingCode(code,idsPerType3);
+      mcIdType nbOfTuplesExp=field2->getNumberOfTuplesExpectedRegardingCode(code,idsPerType3);
       if(nbOfTuplesExp!=arrOfVals->getNumberOfTuples())
         {
           std::ostringstream oss; oss << "MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile : The array is expected to have " << nbOfTuplesExp << " tuples ! It has " << arrOfVals->getNumberOfTuples() << " !";
           throw INTERP_KERNEL::Exception(oss.str());
         }
       // end of check
-      int start(copyTinyInfoFrom(th,field,arrOfVals));
+      mcIdType start(copyTinyInfoFrom(th,field,arrOfVals));
       code2=m->getDistributionOfTypes();
       //
-      int pos=addNewEntryIfNecessary(m);
+      mcIdType pos=addNewEntryIfNecessary(m);
       _field_per_mesh[pos]->assignFieldProfile(start,profile,code,code2,idsInPflPerType,idsPerType,field,arrOfVals,m,glob,nasc);
     }
   else
     {
       if(!profile || !profile->isAllocated() || profile->getNumberOfComponents()!=1)
         throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile : input profile is null, not allocated or with number of components != 1 !");
-      std::vector<int> v(3); v[0]=-1; v[1]=profile->getNumberOfTuples(); v[2]=0;
-      std::vector<const DataArrayInt *> idsPerType3(1); idsPerType3[0]=profile;
-      int nbOfTuplesExp=field->getNumberOfTuplesExpectedRegardingCode(v,idsPerType3);
+      std::vector<mcIdType> v(3); v[0]=-1; v[1]=profile->getNumberOfTuples(); v[2]=0;
+      std::vector<const DataArrayIdType *> idsPerType3(1); idsPerType3[0]=profile;
+      mcIdType nbOfTuplesExp=field->getNumberOfTuplesExpectedRegardingCode(v,idsPerType3);
       if(nbOfTuplesExp!=arrOfVals->getNumberOfTuples())
         {
           std::ostringstream oss; oss << "MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile : For node field, the array is expected to have " << nbOfTuplesExp << " tuples ! It has " << arrOfVals->getNumberOfTuples() << " !";
           throw INTERP_KERNEL::Exception(oss.str());
         }
-      int start(copyTinyInfoFrom(th,field,arrOfVals));
-      int pos(addNewEntryIfNecessary(m));
+      mcIdType start(copyTinyInfoFrom(th,field,arrOfVals));
+      mcIdType pos(addNewEntryIfNecessary(m));
       _field_per_mesh[pos]->assignNodeFieldProfile(start,profile,field,arrOfVals,glob,nasc);
     }
 }
@@ -924,7 +924,7 @@ void MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile(const TimeHolder *th, con
 /*!
  * \param [in] newNbOfTuples - The new nb of tuples to be allocated.
  */
-void MEDFileAnyTypeField1TSWithoutSDA::allocNotFromFile(int newNbOfTuples)
+void MEDFileAnyTypeField1TSWithoutSDA::allocNotFromFile(mcIdType newNbOfTuples)
 {
   if(_nb_of_tuples_to_be_allocated>=0)
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::allocNotFromFile : the object is expected to be appended to a data coming from a file but not loaded ! Load before appending data !");
@@ -945,7 +945,7 @@ void MEDFileAnyTypeField1TSWithoutSDA::allocNotFromFile(int newNbOfTuples)
  *  \throw If \a this->_arr is already allocated but has different number of components
  *         than \a field.
  */
-int MEDFileAnyTypeField1TSWithoutSDA::copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr)
+mcIdType MEDFileAnyTypeField1TSWithoutSDA::copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr)
 {
   if(!field)
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeField1TSWithoutSDA::copyTinyInfoFrom : input field is NULL !");
@@ -969,8 +969,8 @@ int MEDFileAnyTypeField1TSWithoutSDA::copyTinyInfoFrom(const TimeHolder *th, con
     }
   else
     {
-      int oldNbOfTuples=getOrCreateAndGetArray()->getNumberOfTuples();
-      int newNbOfTuples=oldNbOfTuples+arr->getNumberOfTuples();
+      mcIdType oldNbOfTuples=getOrCreateAndGetArray()->getNumberOfTuples();
+      mcIdType newNbOfTuples=oldNbOfTuples+arr->getNumberOfTuples();
       getOrCreateAndGetArray()->reAlloc(newNbOfTuples);
       _nb_of_tuples_to_be_allocated=-3;
       return oldNbOfTuples;
@@ -981,7 +981,7 @@ int MEDFileAnyTypeField1TSWithoutSDA::copyTinyInfoFrom(const TimeHolder *th, con
  * Returns number of components in \a this field
  *  \return int - the number of components.
  */
-int MEDFileAnyTypeField1TSWithoutSDA::getNumberOfComponents() const
+std::size_t MEDFileAnyTypeField1TSWithoutSDA::getNumberOfComponents() const
 {
   return getOrCreateAndGetArray()->getNumberOfComponents();
 }
@@ -1162,7 +1162,7 @@ MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldAtLevel(TypeOf
 MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
 {
   MCAuto<MEDCouplingMesh> m(mesh->getMeshAtLevel(meshDimRelToMax,false));
-  const DataArrayInt *d(mesh->getNumberFieldAtLevel(meshDimRelToMax)),*e(mesh->getNumberFieldAtLevel(1));
+  const DataArrayIdType *d(mesh->getNumberFieldAtLevel(meshDimRelToMax)),*e(mesh->getNumberFieldAtLevel(1));
   if(meshDimRelToMax==1)
     (static_cast<MEDCouplingUMesh *>((MEDCouplingMesh *)m))->setMeshDimension(0);
   return MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(type,renumPol,glob,m,d,e,arrOut,nasc);
@@ -1222,7 +1222,7 @@ MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldAtTopLevel(Typ
  *  \throw If no field of \a this is lying on \a mesh.
  *  \throw If no field values of the given \a type or given \a meshDimRelToMax are available.
  */
-MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayInt *cellRenum, const DataArrayInt *nodeRenum, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
+MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayIdType *cellRenum, const DataArrayIdType *nodeRenum, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
 {
   static const char msg1[]="MEDFileField1TSWithoutSDA::getFieldOnMeshAtLevel : request for a renumbered field following mesh numbering whereas it is a profile field !";
   bool isPfl=false;
@@ -1271,7 +1271,7 @@ MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(
                 oss << "\"" << nasc.getName() << "\" not defined on all nodes !";
                 throw INTERP_KERNEL::Exception(oss.str());
               }
-            MCAuto<DataArrayInt> nodeRenumSafe=nodeRenum->checkAndPreparePermutation();
+            MCAuto<DataArrayIdType> nodeRenumSafe=nodeRenum->checkAndPreparePermutation();
             if(!dynamic_cast<DataArrayDouble *>((DataArray *)arrOut))
               throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getFieldOnMeshAtLevel : node renumbering not implemented for not double DataArrays !");
             ret->renumberNodes(nodeRenumSafe->getConstPointer());
@@ -1288,7 +1288,7 @@ MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(
  *  \param [in] type - a spatial discretization of the field.
  *  \param [in] meshDimRelToMax - a relative dimension of the supporting mesh entities.
  *  \param [in] mesh - the supporting mesh.
- *  \param [out] pfl - a new instance of DataArrayInt holding ids of mesh entities the
+ *  \param [out] pfl - a new instance of DataArrayIdType holding ids of mesh entities the
  *          field of interest lies on. If the field lies on all entities of the given
  *          dimension, all ids in \a pfl are zero. The caller is to delete this array
  *          using decrRef() as it is no more needed.  
@@ -1299,7 +1299,7 @@ MEDCouplingFieldDouble *MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel(
  *  \throw If no field of \a this is lying on \a mesh.
  *  \throw If no field values of the given \a type are available.
  */
-DataArray *MEDFileAnyTypeField1TSWithoutSDA::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const
+DataArray *MEDFileAnyTypeField1TSWithoutSDA::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const
 {
   MCAuto<MEDCouplingMesh> m(mesh->getMeshAtLevel(meshDimRelToMax));
   MCAuto<DataArray> ret=_field_per_mesh[0]->getFieldOnMeshAtLevelWithPfl(type,m,pfl,glob,nasc);
@@ -1330,32 +1330,32 @@ void MEDFileField1TSWithoutSDA::CheckMeshDimRel(int meshDimRelToMax)
  *          These values are in full-interlace mode.
  *  \throw If elements in \a mesh are not in the order suitable for writing to the MED file.
  */
-std::vector<int> MEDFileField1TSWithoutSDA::CheckSBTMesh(const MEDCouplingMesh *mesh)
+std::vector<mcIdType> MEDFileField1TSWithoutSDA::CheckSBTMesh(const MEDCouplingMesh *mesh)
 {
   if(!mesh)
     throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::CheckSBTMesh : input mesh is NULL !");
   std::set<INTERP_KERNEL::NormalizedCellType> geoTypes=mesh->getAllGeoTypes();
-  int nbOfTypes=geoTypes.size();
-  std::vector<int> code(3*nbOfTypes);
-  MCAuto<DataArrayInt> arr1=DataArrayInt::New();
+  std::size_t nbOfTypes=geoTypes.size();
+  std::vector<mcIdType> code(3*nbOfTypes);
+  MCAuto<DataArrayIdType> arr1=DataArrayIdType::New();
   arr1->alloc(nbOfTypes,1);
-  int *arrPtr=arr1->getPointer();
+  mcIdType *arrPtr=arr1->getPointer();
   std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator it=geoTypes.begin();
-  for(int i=0;i<nbOfTypes;i++,it++)
-    arrPtr[i]=std::distance(typmai2,std::find(typmai2,typmai2+MED_N_CELL_FIXED_GEO,*it));
-  MCAuto<DataArrayInt> arr2=arr1->checkAndPreparePermutation();
-  const int *arrPtr2=arr2->getConstPointer();
+  for(std::size_t i=0;i<nbOfTypes;i++,it++)
+    arrPtr[i]=ToIdType(std::distance(typmai2,std::find(typmai2,typmai2+MED_N_CELL_FIXED_GEO,*it)));
+  MCAuto<DataArrayIdType> arr2=arr1->checkAndPreparePermutation();
+  const mcIdType *arrPtr2=arr2->getConstPointer();
   int i=0;
   for(it=geoTypes.begin();it!=geoTypes.end();it++,i++)
     {
-      int pos=arrPtr2[i];
-      int nbCells=mesh->getNumberOfCellsWithType(*it);
-      code[3*pos]=(int)(*it);
+      mcIdType pos=arrPtr2[i];
+      mcIdType nbCells=mesh->getNumberOfCellsWithType(*it);
+      code[3*pos]=(mcIdType)(*it);
       code[3*pos+1]=nbCells;
       code[3*pos+2]=-1;//no profiles
     }
-  std::vector<const DataArrayInt *> idsPerType;//no profiles
-  DataArrayInt *da=mesh->checkTypeConsistencyAndContig(code,idsPerType);
+  std::vector<const DataArrayIdType *> idsPerType;//no profiles
+  DataArrayIdType *da=mesh->checkTypeConsistencyAndContig(code,idsPerType);
   if(da)
     {
       da->decrRef();
@@ -1408,15 +1408,15 @@ std::vector< std::vector<DataArrayDouble *> > MEDFileField1TSWithoutSDA::getFiel
   if(mname.empty())
     if(_field_per_mesh.empty())
       throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getFieldSplitedByType : This is empty !");
-  std::vector< std::vector< std::pair<int,int> > > ret0=_field_per_mesh[0]->getFieldSplitedByType(types,typesF,pfls,locs);
-  int nbOfRet=ret0.size();
+  std::vector< std::vector< std::pair<mcIdType,mcIdType> > > ret0=_field_per_mesh[0]->getFieldSplitedByType(types,typesF,pfls,locs);
+  std::size_t nbOfRet=ret0.size();
   std::vector< std::vector<DataArrayDouble *> > ret(nbOfRet);
-  for(int i=0;i<nbOfRet;i++)
+  for(std::size_t i=0;i<nbOfRet;i++)
     {
-      const std::vector< std::pair<int,int> >& p=ret0[i];
-      int nbOfRet1=p.size();
+      const std::vector< std::pair<mcIdType,mcIdType> >& p=ret0[i];
+      std::size_t nbOfRet1=p.size();
       ret[i].resize(nbOfRet1);
-      for(int j=0;j<nbOfRet1;j++)
+      for(std::size_t j=0;j<nbOfRet1;j++)
         {
           DataArrayDouble *tmp=_arr->selectByTupleIdSafeSlice(p[j].first,p[j].second,1);
           ret[i][j]=tmp;
@@ -1460,7 +1460,7 @@ MEDFileIntField1TSWithoutSDA *MEDFileField1TSWithoutSDA::convertToInt() const
  *  \throw If no field values are available.
  *  \sa getUndergroundDataArray()
  */
-DataArray *MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+DataArray *MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
   return getUndergroundDataArrayTemplateExt(entries);
 }
@@ -1504,7 +1504,7 @@ MEDFileIntField1TSWithoutSDA::MEDFileIntField1TSWithoutSDA()
 MEDFileIntField1TSWithoutSDA::MEDFileIntField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order,
                                                            const std::vector<std::string>& infos):MEDFileField1TSNDTemplateWithoutSDA<int>(fieldName,meshName,csit,iteration,order,infos)
 {
-  DataArrayInt *arr(getOrCreateAndGetArrayTemplate());
+  DataArrayInt32 *arr(getOrCreateAndGetArrayTemplate());
   arr->setInfoAndChangeNbOfCompo(infos);
 }
 
@@ -1514,9 +1514,9 @@ const char *MEDFileIntField1TSWithoutSDA::getTypeStr() const
 }
 
 /*!
- * Returns a pointer to the underground DataArrayInt instance and a
+ * Returns a pointer to the underground DataArrayIdType instance and a
  * sequence describing parameters of a support of each part of \a this field. The
- * caller should not decrRef() the returned DataArrayInt. This method allows for a
+ * caller should not decrRef() the returned DataArrayIdType. This method allows for a
  * direct access to the field values. This method is intended for the field lying on one
  * mesh only.
  *  \param [in,out] entries - the sequence describing parameters of a support of each
@@ -1524,12 +1524,12 @@ const char *MEDFileIntField1TSWithoutSDA::getTypeStr() const
  *         first part describes a type of mesh entity and an id of discretization of a
  *         current field part. The second part describes a range of values [begin,end)
  *         within the returned array relating to the current field part.
- *  \return DataArrayInt * - the pointer to the field values array.
+ *  \return DataArrayIdType * - the pointer to the field values array.
  *  \throw If the number of underlying meshes is not equal to 1.
  *  \throw If no field values are available.
  *  \sa getUndergroundDataArray()
  */
-DataArray *MEDFileIntField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+DataArray *MEDFileIntField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
   return getUndergroundDataArrayIntExt(entries);
 }
@@ -1537,7 +1537,7 @@ DataArray *MEDFileIntField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector<
 /*!
  * Returns a pointer to the underground DataArrayInt instance and a
  * sequence describing parameters of a support of each part of \a this field. The
- * caller should not decrRef() the returned DataArrayInt. This method allows for a
+ * caller should not decrRef() the returned DataArrayIdType. This method allows for a
  * direct access to the field values. This method is intended for the field lying on one
  * mesh only.
  *  \param [in,out] entries - the sequence describing parameters of a support of each
@@ -1550,7 +1550,7 @@ DataArray *MEDFileIntField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector<
  *  \throw If no field values are available.
  *  \sa getUndergroundDataArray()
  */
-DataArrayInt *MEDFileIntField1TSWithoutSDA::getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+DataArrayInt *MEDFileIntField1TSWithoutSDA::getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
   if(_field_per_mesh.size()!=1)
     throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt : field lies on several meshes, this method has no sense !");
@@ -1614,7 +1614,7 @@ const char *MEDFileFloatField1TSWithoutSDA::getTypeStr() const
  *  \throw If no field values are available.
  *  \sa getUndergroundDataArray()
  */
-DataArray *MEDFileFloatField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+DataArray *MEDFileFloatField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
   return getUndergroundDataArrayFloatExt(entries);
 }
@@ -1635,7 +1635,7 @@ DataArray *MEDFileFloatField1TSWithoutSDA::getUndergroundDataArrayExt(std::vecto
  *  \throw If no field values are available.
  *  \sa getUndergroundDataArray()
  */
-DataArrayFloat *MEDFileFloatField1TSWithoutSDA::getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+DataArrayFloat *MEDFileFloatField1TSWithoutSDA::getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
   if(_field_per_mesh.size()!=1)
     throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt : field lies on several meshes, this method has no sense !");
@@ -1711,7 +1711,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i
   med_int numdt,numit;
   med_float dt;
   MEDFILESAFECALLERRD0(MEDfieldComputingStepInfo,(fid,fieldName.c_str(),1,&numdt,&numit,&dt));
-  ret->setTime(numdt,numit,dt);
+  ret->setTime(FromMedInt<int>(numdt),FromMedInt<int>(numit),dt);
   ret->_csit=1;
   if(loadAll)
     ret->loadStructureAndBigArraysRecursively(fid,*((const MEDFileAnyTypeField1TSWithoutSDA*)ret),ms,entities);
@@ -1786,7 +1786,7 @@ MEDFileAnyTypeField1TSWithoutSDA *MEDFileAnyTypeField1TS::BuildContentFrom(med_i
   med_int numdt,numit;
   med_float dt;
   MEDFILESAFECALLERRD0(MEDfieldComputingStepInfo,(fid,fieldName.c_str(),1,&numdt,&numit,&dt));
-  ret->setTime(numdt,numit,dt);
+  ret->setTime(FromMedInt<int>(numdt),FromMedInt<int>(numit),dt);
   ret->_csit=1;
   if(loadAll)
     ret->loadStructureAndBigArraysRecursively(fid,*((const MEDFileAnyTypeField1TSWithoutSDA*)ret),ms,entities);
@@ -2000,21 +2000,21 @@ int MEDFileAnyTypeField1TS::LocateField2(med_idt fid, int fieldIdCFormat, bool c
 {
   if(checkFieldId)
     {
-      int nbFields=MEDnField(fid);
+      med_int nbFields=MEDnField(fid);
       if(fieldIdCFormat>=nbFields)
         {
           std::ostringstream oss; oss << "MEDFileAnyTypeField1TS::LocateField2(fileName) : in file \'" << FileNameFromFID(fid) << "\' number of fields is " << nbFields << " ! Trying to request for id " << fieldIdCFormat << " !";
           throw INTERP_KERNEL::Exception(oss.str());
         }
     }
-  int ncomp(MEDfieldnComponent(fid,fieldIdCFormat+1));
+  med_int ncomp(MEDfieldnComponent(fid,fieldIdCFormat+1));
   INTERP_KERNEL::AutoPtr<char> comp(MEDLoaderBase::buildEmptyString(ncomp*MED_SNAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> unit(MEDLoaderBase::buildEmptyString(ncomp*MED_SNAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> dtunit(MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> nomcha(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> nomMaa(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   med_bool localMesh;
-  int nbOfStep;
+  med_int nbOfStep;
   MEDFILESAFECALLERRD0(MEDfieldInfo,(fid,fieldIdCFormat+1,nomcha,nomMaa,&localMesh,&typcha,comp,unit,dtunit,&nbOfStep));
   fieldName=MEDLoaderBase::buildStringFromFortran(nomcha,MED_NAME_SIZE);
   dtunitOut=MEDLoaderBase::buildStringFromFortran(dtunit,MED_LNAME_SIZE);
@@ -2022,7 +2022,7 @@ int MEDFileAnyTypeField1TS::LocateField2(med_idt fid, int fieldIdCFormat, bool c
   infos.clear(); infos.resize(ncomp);
   for(int j=0;j<ncomp;j++)
     infos[j]=MEDLoaderBase::buildUnionUnit((char *)comp+j*MED_SNAME_SIZE,MED_SNAME_SIZE,(char *)unit+j*MED_SNAME_SIZE,MED_SNAME_SIZE);
-  return nbOfStep;
+  return FromMedInt<int>(nbOfStep);
 }
 
 /*!
@@ -2033,7 +2033,7 @@ int MEDFileAnyTypeField1TS::LocateField2(med_idt fid, int fieldIdCFormat, bool c
  */
 int MEDFileAnyTypeField1TS::LocateField(med_idt fid, const std::string& fieldName, int& posCFormat, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut, std::string& meshName)
 {
-  int nbFields=MEDnField(fid);
+  med_int nbFields=MEDnField(fid);
   bool found=false;
   std::vector<std::string> fns(nbFields);
   int nbOfStep2(-1);
@@ -2082,11 +2082,11 @@ void MEDFileAnyTypeField1TS::setProfileNameOnLeaf(const std::string& mName, INTE
   MEDFileFieldPerMeshPerTypePerDisc *disc=getLeafGivenMeshAndTypeAndLocId(mName,typ,locId);
   std::string oldPflName=disc->getProfile();
   std::vector<std::string> vv=getPflsReallyUsedMulti();
-  int nbOfOcc=std::count(vv.begin(),vv.end(),oldPflName);
+  std::size_t nbOfOcc=std::count(vv.begin(),vv.end(),oldPflName);
   if(forceRenameOnGlob || (!existsPfl(newPflName) && nbOfOcc==1))
     {
       disc->setProfile(newPflName);
-      DataArrayInt *pfl=getProfile(oldPflName.c_str());
+      DataArrayIdType *pfl=getProfile(oldPflName.c_str());
       pfl->setName(newPflName);
     }
   else
@@ -2120,7 +2120,7 @@ void MEDFileAnyTypeField1TS::setLocNameOnLeaf(const std::string& mName, INTERP_K
   MEDFileFieldPerMeshPerTypePerDisc *disc=getLeafGivenMeshAndTypeAndLocId(mName,typ,locId);
   std::string oldLocName=disc->getLocalization();
   std::vector<std::string> vv=getLocsReallyUsedMulti();
-  int nbOfOcc=std::count(vv.begin(),vv.end(),oldLocName);
+  std::size_t nbOfOcc=std::count(vv.begin(),vv.end(),oldLocName);
   if(forceRenameOnGlob || (!existsLoc(newLocName) && nbOfOcc==1))
     {
       disc->setLocalization(newLocName);
@@ -2209,10 +2209,10 @@ void MEDFileAnyTypeField1TS::unloadArraysWithoutDataLoss()
 
 void MEDFileAnyTypeField1TS::writeLL(med_idt fid) const
 {
-  int nbComp(getNumberOfComponents());
+  std::size_t nbComp(getNumberOfComponents());
   INTERP_KERNEL::AutoPtr<char> comp(MEDLoaderBase::buildEmptyString(nbComp*MED_SNAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> unit(MEDLoaderBase::buildEmptyString(nbComp*MED_SNAME_SIZE));
-  for(int i=0;i<nbComp;i++)
+  for(std::size_t i=0;i<nbComp;i++)
     {
       std::string info=getInfo()[i];
       std::string c,u;
@@ -2222,7 +2222,7 @@ void MEDFileAnyTypeField1TS::writeLL(med_idt fid) const
     }
   if(getName().empty())
     throw INTERP_KERNEL::Exception("MEDFileField1TS::write : MED file does not accept field with empty name !");
-  MEDFILESAFECALLERWR0(MEDfieldCr,(fid,getName().c_str(),getMEDFileFieldType(),nbComp,comp,unit,getDtUnit().c_str(),getMeshName().c_str()));
+  MEDFILESAFECALLERWR0(MEDfieldCr,(fid,getName().c_str(),getMEDFileFieldType(),ToMedInt(nbComp),comp,unit,getDtUnit().c_str(),getMeshName().c_str()));
   writeGlobals(fid,*this);
   contentNotNullBase()->writeLL(fid,*this,*contentNotNullBase());
 }
@@ -2373,7 +2373,7 @@ int MEDFileAnyTypeField1TS::getMeshOrder() const
   return contentNotNullBase()->getMeshOrder();
 }
 
-int MEDFileAnyTypeField1TS::getNumberOfComponents() const
+std::size_t MEDFileAnyTypeField1TS::getNumberOfComponents() const
 {
   return contentNotNullBase()->getNumberOfComponents();
 }
@@ -2437,7 +2437,7 @@ void MEDFileAnyTypeField1TS::convertMedBallIntoClassic()
   return contentNotNullBase()->convertMedBallIntoClassic();
 }
 
-void MEDFileAnyTypeField1TS::makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayInt *pfl)
+void MEDFileAnyTypeField1TS::makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl)
 {
   return contentNotNullBase()->makeReduction(ct,tof,pfl);
 }
@@ -2447,7 +2447,7 @@ std::vector<TypeOfField> MEDFileAnyTypeField1TS::getTypesOfFieldAvailable() cons
   return contentNotNullBase()->getTypesOfFieldAvailable();
 }
 
-std::vector< std::vector<std::pair<int,int> > > MEDFileAnyTypeField1TS::getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
+std::vector< std::vector<std::pair<mcIdType,mcIdType> > > MEDFileAnyTypeField1TS::getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
                                                                                               std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const
 {
   return contentNotNullBase()->getFieldSplitedByType(mname,types,typesF,pfls,locs);
@@ -2523,13 +2523,13 @@ MEDFileAnyTypeField1TS *MEDFileAnyTypeField1TS::deepCopy() const
   return ret.retn();
 }
 
-int MEDFileAnyTypeField1TS::copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr)
+mcIdType MEDFileAnyTypeField1TS::copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr)
 {
   MCAuto<MEDCouplingFieldTemplate> ft(MEDCouplingFieldTemplate::New(*field));
   return copyTinyInfoFrom(field->timeDiscrSafe(),ft,arr);
 }
 
-int MEDFileAnyTypeField1TS::copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr)
+mcIdType MEDFileAnyTypeField1TS::copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr)
 {
   return contentNotNullBase()->copyTinyInfoFrom(th,field,arr);
 }
index 9190fb40b03ec2661af132b6070faec1e6c25c27..7d7e874d0e39fae280ba193fece3b07f9861009b 100644 (file)
@@ -64,15 +64,15 @@ namespace MEDCoupling
     //
     MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
     MEDLOADER_EXPORT void convertMedBallIntoClassic();
-    MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayInt *pfl);
-    MEDLOADER_EXPORT std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+    MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
+    MEDLOADER_EXPORT std::vector< std::vector<std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
     //
     MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
     MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
     MEDLOADER_EXPORT void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other);
     MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
   public:
-    MEDLOADER_EXPORT int getNumberOfComponents() const;
+    MEDLOADER_EXPORT std::size_t getNumberOfComponents() const;
     MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
     MEDLOADER_EXPORT std::vector<std::string>& getInfo();
     MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
@@ -85,16 +85,16 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
-    MEDLOADER_EXPORT int copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
+    MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
     MEDLOADER_EXPORT void setFieldNoProfileSBT(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    MEDLOADER_EXPORT void setFieldProfile(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc, bool smartPflKiller=true);
+    MEDLOADER_EXPORT void setFieldProfile(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc, bool smartPflKiller=true);
     MEDLOADER_EXPORT virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
     MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *deepCopy() const = 0;
     MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const = 0;
     MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const;
     MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
     MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArray() const = 0;
-    MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const = 0;
+    MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const = 0;
     MEDLOADER_EXPORT virtual void setArray(DataArray *arr) = 0;
     MEDLOADER_EXPORT virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
     MEDLOADER_EXPORT virtual DataArray *getOrCreateAndGetArray() = 0;
@@ -104,16 +104,16 @@ namespace MEDCoupling
     MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
     MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
     MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
-    MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayInt *cellRenum, const DataArrayInt *nodeRenum, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
-    DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
+    MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayIdType *cellRenum, const DataArrayIdType *nodeRenum, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+    DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
   public:
-    MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
+    MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
     MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const;
     MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
-    MEDLOADER_EXPORT int keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<int,int> >& its);
-    MEDLOADER_EXPORT int keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<int,int> >& its);
+    MEDLOADER_EXPORT mcIdType keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<mcIdType,mcIdType> >& its);
+    MEDLOADER_EXPORT mcIdType keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<mcIdType,mcIdType> >& its);
   public:
-    MEDLOADER_EXPORT void allocNotFromFile(int newNbOfTuples);
+    MEDLOADER_EXPORT void allocNotFromFile(mcIdType newNbOfTuples);
     MEDLOADER_EXPORT bool allocIfNecessaryTheArrayToReceiveDataFromFile();
     MEDLOADER_EXPORT void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities);
     MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
@@ -125,7 +125,7 @@ namespace MEDCoupling
   protected:
     int getMeshIdFromMeshName(const std::string& mName) const;
     int addNewEntryIfNecessary(const MEDCouplingMesh *mesh);
-    void updateData(int newLgth, const std::vector< std::pair<int,int> >& oldStartStops);
+    void updateData(mcIdType newLgth, const std::vector< std::pair<mcIdType,mcIdType> >& oldStartStops);
   protected:
     std::vector< MCAuto< MEDFileFieldPerMesh > > _field_per_mesh;
     int _iteration;
@@ -138,7 +138,7 @@ namespace MEDCoupling
     // -2 means allocated and read from a file
     // -1 means not allocated and build from scratch
     // >=0 means not allocated and read from a file
-    mutable int _nb_of_tuples_to_be_allocated;
+    mutable mcIdType _nb_of_tuples_to_be_allocated;
   };
 
   class MEDFileIntField1TSWithoutSDA;
@@ -155,11 +155,11 @@ namespace MEDCoupling
     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getOrCreateAndGetArrayTemplate();
     MEDLOADER_EXPORT typename Traits<T>::ArrayType const *getOrCreateAndGetArrayTemplate() const;
     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplate() const;
-    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplateExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
+    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplateExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
     MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
     MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
     MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
-    MEDLOADER_EXPORT void aggregate(const typename std::vector< typename MLFieldTraits<T>::F1TSWSDAType const * >& f1tss, const std::vector< std::vector< std::pair<int,int> > >& dts);
+    MEDLOADER_EXPORT void aggregate(const typename std::vector< typename MLFieldTraits<T>::F1TSWSDAType const * >& f1tss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts);
     MEDLOADER_EXPORT void copyTimeInfoFrom(const typename Traits<T>::FieldType *mcf);
   protected:
     MCAuto< typename Traits<T>::ArrayType > _arr;
@@ -172,10 +172,10 @@ namespace MEDCoupling
   {
   public:
     MEDLOADER_EXPORT const char *getTypeStr() const;
-    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
+    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
     MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
     MEDLOADER_EXPORT static void CheckMeshDimRel(int meshDimRelToMax);
-    MEDLOADER_EXPORT static std::vector<int> CheckSBTMesh(const MEDCouplingMesh *mesh);
+    MEDLOADER_EXPORT static std::vector<mcIdType> CheckSBTMesh(const MEDCouplingMesh *mesh);
     MEDLOADER_EXPORT static MEDFileField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
   public:
     MEDLOADER_EXPORT MEDFileField1TSWithoutSDA();
@@ -208,8 +208,8 @@ namespace MEDCoupling
     MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA *deepCopy() const;
     MEDLOADER_EXPORT MEDFileIntField1TSWithoutSDA *shallowCpy() const;
     MEDLOADER_EXPORT const char *getTypeStr() const;
-    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
-    MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
+    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+    MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
   protected:
     MEDFileIntField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
   public:
@@ -227,8 +227,8 @@ namespace MEDCoupling
     MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *deepCopy() const;
     MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *shallowCpy() const;
     MEDLOADER_EXPORT const char *getTypeStr() const;
-    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
-    MEDLOADER_EXPORT DataArrayFloat *getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
+    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+    MEDLOADER_EXPORT DataArrayFloat *getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
   protected:
     MEDFileFloatField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
   public:
@@ -278,7 +278,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
     MEDLOADER_EXPORT int getMeshIteration() const;
     MEDLOADER_EXPORT int getMeshOrder() const;
-    MEDLOADER_EXPORT int getNumberOfComponents() const;
+    MEDLOADER_EXPORT std::size_t getNumberOfComponents() const;
     MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
     MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
     MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
@@ -288,14 +288,14 @@ namespace MEDCoupling
     MEDLOADER_EXPORT std::vector<std::string>& getInfo();
     MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
     MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
-    MEDLOADER_EXPORT std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
+    MEDLOADER_EXPORT std::vector< std::vector<std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
         std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
     MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
     MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
     MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
     MEDLOADER_EXPORT void convertMedBallIntoClassic();
-    MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayInt *pfl);
-    MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const = 0;
+    MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
+    MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const = 0;
     MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
   public:
     MEDLOADER_EXPORT void loadArrays();
@@ -306,8 +306,8 @@ namespace MEDCoupling
     MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitDiscretizations() const;
     MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitMultiDiscrPerGeoTypes() const;
     MEDLOADER_EXPORT MEDFileAnyTypeField1TS *deepCopy() const;
-    MEDLOADER_EXPORT int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
-    MEDLOADER_EXPORT int copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
+    MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
+    MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
   public:
     //! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
     MEDLOADER_EXPORT void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
@@ -349,10 +349,10 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent);
   public:
     MEDLOADER_EXPORT static typename Traits<T>::ArrayType *ReturnSafelyTypedDataArray(MCAuto<DataArray>& arr);
-    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
+    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const;
     MEDLOADER_EXPORT void setArray(DataArray *arr);
     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArray() const;
-    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
+    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
     MEDLOADER_EXPORT static MCAuto<typename Traits<T>::FieldType> SetDataArrayInField(MEDCouplingFieldDouble *f, MCAuto<DataArray>& arr);
     MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ToFieldTemplateWithTime(const typename Traits<T>::FieldType *f);
   public:
@@ -364,10 +364,10 @@ namespace MEDCoupling
     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
     MEDLOADER_EXPORT void setFieldNoProfileSBT(const typename Traits<T>::FieldType *field);
-    MEDLOADER_EXPORT void setFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
-    MEDLOADER_EXPORT void setFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
-    MEDLOADER_EXPORT typename MLFieldTraits<T>::F1TSType *extractPartImpl(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const;
-    MEDLOADER_EXPORT MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
+    MEDLOADER_EXPORT void setFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    MEDLOADER_EXPORT void setFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    MEDLOADER_EXPORT typename MLFieldTraits<T>::F1TSType *extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
+    MEDLOADER_EXPORT MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
   protected:
     ~MEDFileTemplateField1TS() { }
     MEDFileTemplateField1TS();
@@ -377,7 +377,7 @@ namespace MEDCoupling
     MEDFileTemplateField1TS(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent):MEDFileAnyTypeField1TS(other,shallowCopyOfContent) { }
     const typename MLFieldTraits<T>::F1TSWSDAType *contentNotNull() const;
     typename MLFieldTraits<T>::F1TSWSDAType *contentNotNull();
-    void setFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, bool smartPflKiller);
+    void setFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, bool smartPflKiller);
   };
 
   /*!
index af727fc7b717c457742d1e1625bbb5b8db6f714e..1a8791fc0a0160859c7a9a5c5c8d7eda4f2572c5 100644 (file)
@@ -28,6 +28,7 @@
 #include "MEDFileBlowStrEltUp.hxx"
 #include "MEDFileFieldVisitor.hxx"
 
+#include "MEDCouplingMemArray.txx"
 #include "MEDCouplingFieldDiscretization.hxx"
 #include "MCType.hxx"
 
@@ -43,50 +44,52 @@ void MEDFileFieldGlobs::loadProfileInFile(med_idt fid, int id, const std::string
 {
   if(id>=(int)_pfls.size())
     _pfls.resize(id+1);
-  _pfls[id]=DataArrayInt::New();
-  int lgth(MEDprofileSizeByName(fid,pflName.c_str()));
-  _pfls[id]->setName(pflName);
-  _pfls[id]->alloc(lgth,1);
-  MEDFILESAFECALLERRD0(MEDprofileRd,(fid,pflName.c_str(),_pfls[id]->getPointer()));
+  MCAuto<DataArrayMedInt> miPfl=DataArrayMedInt::New();
+  med_int lgth(MEDprofileSizeByName(fid,pflName.c_str()));
+  miPfl->setName(pflName);
+  miPfl->alloc(lgth,1);
+  MEDFILESAFECALLERRD0(MEDprofileRd,(fid,pflName.c_str(),miPfl->getPointer()));
+  _pfls[id]=FromMedIntArray<mcIdType>(miPfl);
   _pfls[id]->applyLin(1,-1,0);//Converting into C format
 }
 
 void MEDFileFieldGlobs::loadProfileInFile(med_idt fid, int i)
 {
   INTERP_KERNEL::AutoPtr<char> pflName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
-  int sz;
+  med_int sz;
   MEDFILESAFECALLERRD0(MEDprofileInfo,(fid,i+1,pflName,&sz));
   std::string pflCpp=MEDLoaderBase::buildStringFromFortran(pflName,MED_NAME_SIZE);
   if(i>=(int)_pfls.size())
     _pfls.resize(i+1);
-  _pfls[i]=DataArrayInt::New();
-  _pfls[i]->alloc(sz,1);
-  _pfls[i]->setName(pflCpp.c_str());
-  MEDFILESAFECALLERRD0(MEDprofileRd,(fid,pflName,_pfls[i]->getPointer()));
+  MCAuto<DataArrayMedInt> miPfl=DataArrayMedInt::New();
+  miPfl->alloc(sz,1);
+  miPfl->setName(pflCpp.c_str());
+  MEDFILESAFECALLERRD0(MEDprofileRd,(fid,pflName,miPfl->getPointer()));
+  _pfls[i]=FromMedIntArray<mcIdType>(miPfl);
   _pfls[i]->applyLin(1,-1,0);//Converting into C format
 }
 
 void MEDFileFieldGlobs::writeGlobals(med_idt fid, const MEDFileWritable& opt) const
 {
-  int nbOfPfls=_pfls.size();
-  for(int i=0;i<nbOfPfls;i++)
+  std::size_t nbOfPfls=_pfls.size();
+  for(std::size_t i=0;i<nbOfPfls;i++)
     {
-      MCAuto<DataArrayInt> cpy=_pfls[i]->deepCopy();
+      MCAuto<DataArrayMedInt> cpy=DataArrayMedInt::Copy((const DataArrayIdType*)_pfls[i]);
       cpy->applyLin(1,1,0);
       INTERP_KERNEL::AutoPtr<char> pflName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
       MEDLoaderBase::safeStrCpy(_pfls[i]->getName().c_str(),MED_NAME_SIZE,pflName,opt.getTooLongStrPolicy());
-      MEDFILESAFECALLERWR0(MEDprofileWr,(fid,pflName,_pfls[i]->getNumberOfTuples(),cpy->getConstPointer()));
+      MEDFILESAFECALLERWR0(MEDprofileWr,(fid,pflName,ToMedInt(_pfls[i]->getNumberOfTuples()),cpy->getConstPointer()));
     }
   //
-  int nbOfLocs=_locs.size();
-  for(int i=0;i<nbOfLocs;i++)
+  std::size_t nbOfLocs=_locs.size();
+  for(std::size_t i=0;i<nbOfLocs;i++)
     _locs[i]->writeLL(fid);
 }
 
 void MEDFileFieldGlobs::appendGlobs(const MEDFileFieldGlobs& other, double eps)
 {
   std::vector<std::string> pfls=getPfls();
-  for(std::vector< MCAuto<DataArrayInt> >::const_iterator it=other._pfls.begin();it!=other._pfls.end();it++)
+  for(std::vector< MCAuto<DataArrayIdType> >::const_iterator it=other._pfls.begin();it!=other._pfls.end();it++)
     {
       std::vector<std::string>::iterator it2=std::find(pfls.begin(),pfls.end(),(*it)->getName());
       if(it2==pfls.end())
@@ -95,7 +98,7 @@ void MEDFileFieldGlobs::appendGlobs(const MEDFileFieldGlobs& other, double eps)
         }
       else
         {
-          int id=std::distance(pfls.begin(),it2);
+          std::size_t id=std::distance(pfls.begin(),it2);
           if(!(*it)->isEqual(*_pfls[id]))
             {
               std::ostringstream oss; oss << "MEDFileFieldGlobs::appendGlobs : Profile \"" << (*it)->getName() << "\" already exists and is different from those expecting to be append !";
@@ -113,7 +116,7 @@ void MEDFileFieldGlobs::appendGlobs(const MEDFileFieldGlobs& other, double eps)
         }
       else
         {
-          int id=std::distance(locs.begin(),it2);
+          std::size_t id=std::distance(locs.begin(),it2);
           if(!(*it)->isEqual(*_locs[id],eps))
             {
               std::ostringstream oss; oss << "MEDFileFieldGlobs::appendGlobs : Localization \"" << (*it)->getName() << "\" already exists and is different from those expecting to be append !";
@@ -138,24 +141,24 @@ void MEDFileFieldGlobs::checkGlobsLocsPartCoherency(const std::vector<std::strin
 void MEDFileFieldGlobs::loadGlobals(med_idt fid, const MEDFileFieldGlobsReal& real)
 {
   std::vector<std::string> profiles=real.getPflsReallyUsed();
-  int sz=profiles.size();
+  std::size_t sz=profiles.size();
   _pfls.resize(sz);
-  for(int i=0;i<sz;i++)
+  for(unsigned int i=0;i<sz;i++)
     loadProfileInFile(fid,i,profiles[i].c_str());
   //
   std::vector<std::string> locs=real.getLocsReallyUsed();
   sz=locs.size();
   _locs.resize(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     _locs[i]=MEDFileFieldLoc::New(fid,locs[i].c_str());
 }
 
 void MEDFileFieldGlobs::loadAllGlobals(med_idt fid, const MEDFileEntities *entities)
 {
-  int nProfil=MEDnProfile(fid);
+  med_int nProfil=MEDnProfile(fid);
   for(int i=0;i<nProfil;i++)
     loadProfileInFile(fid,i);
-  int sz=MEDnLocalization(fid);
+  med_int sz=MEDnLocalization(fid);
   _locs.resize(sz);
   for(int i=0;i<sz;i++)
     {
@@ -181,8 +184,8 @@ std::size_t MEDFileFieldGlobs::getHeapMemorySizeWithoutChildren() const
 std::vector<const BigMemoryObject *> MEDFileFieldGlobs::getDirectChildrenWithNull() const
 {
   std::vector<const BigMemoryObject *> ret;
-  for(std::vector< MCAuto< DataArrayInt > >::const_iterator it=_pfls.begin();it!=_pfls.end();it++)
-    ret.push_back((const DataArrayInt *)*it);
+  for(std::vector< MCAuto< DataArrayIdType > >::const_iterator it=_pfls.begin();it!=_pfls.end();it++)
+    ret.push_back((const DataArrayIdType *)*it);
   for(std::vector< MCAuto<MEDFileFieldLoc> >::const_iterator it=_locs.begin();it!=_locs.end();it++)
     ret.push_back((const MEDFileFieldLoc *)*it);
   return ret;
@@ -192,9 +195,9 @@ MEDFileFieldGlobs *MEDFileFieldGlobs::deepCopy() const
 {
   MCAuto<MEDFileFieldGlobs> ret=new MEDFileFieldGlobs(*this);
   std::size_t i=0;
-  for(std::vector< MCAuto<DataArrayInt> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
+  for(std::vector< MCAuto<DataArrayIdType> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
     {
-      if((const DataArrayInt *)*it)
+      if((const DataArrayIdType *)*it)
         ret->_pfls[i]=(*it)->deepCopy();
     }
   i=0;
@@ -216,11 +219,11 @@ MEDFileFieldGlobs *MEDFileFieldGlobs::shallowCpyPart(const std::vector<std::stri
   MCAuto<MEDFileFieldGlobs> ret=MEDFileFieldGlobs::New();
   for(std::vector<std::string>::const_iterator it1=pfls.begin();it1!=pfls.end();it1++)
     {
-      DataArrayInt *pfl=const_cast<DataArrayInt *>(getProfile((*it1).c_str()));
+      DataArrayIdType *pfl=const_cast<DataArrayIdType *>(getProfile((*it1).c_str()));
       if(!pfl)
         throw INTERP_KERNEL::Exception("MEDFileFieldGlobs::shallowCpyPart : internal error ! pfl null !");
       pfl->incrRef();
-      MCAuto<DataArrayInt> pfl2(pfl);
+      MCAuto<DataArrayIdType> pfl2(pfl);
       ret->_pfls.push_back(pfl2);
     }
   for(std::vector<std::string>::const_iterator it2=locs.begin();it2!=locs.end();it2++)
@@ -246,7 +249,7 @@ MEDFileFieldGlobs *MEDFileFieldGlobs::deepCpyPart(const std::vector<std::string>
   MCAuto<MEDFileFieldGlobs> ret=MEDFileFieldGlobs::New();
   for(std::vector<std::string>::const_iterator it1=pfls.begin();it1!=pfls.end();it1++)
     {
-      DataArrayInt *pfl=const_cast<DataArrayInt *>(getProfile((*it1).c_str()));
+      DataArrayIdType *pfl=const_cast<DataArrayIdType *>(getProfile((*it1).c_str()));
       if(!pfl)
         throw INTERP_KERNEL::Exception("MEDFileFieldGlobs::deepCpyPart : internal error ! pfl null !");
       ret->_pfls.push_back(pfl->deepCopy());
@@ -281,7 +284,7 @@ void MEDFileFieldGlobs::simpleRepr(std::ostream& oss) const
   for(std::size_t i=0;i<n;i++)
     {
       oss << "  - #" << i << " ";
-      const DataArrayInt *pfl=_pfls[i];
+      const DataArrayIdType *pfl=_pfls[i];
       if(pfl)
         oss << "\"" << pfl->getName() << "\"\n";
       else
@@ -302,9 +305,9 @@ void MEDFileFieldGlobs::simpleRepr(std::ostream& oss) const
 
 void MEDFileFieldGlobs::changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif)
 {
-  for(std::vector< MCAuto<DataArrayInt> >::iterator it=_pfls.begin();it!=_pfls.end();it++)
+  for(std::vector< MCAuto<DataArrayIdType> >::iterator it=_pfls.begin();it!=_pfls.end();it++)
     {
-      DataArrayInt *elt(*it);
+      DataArrayIdType *elt(*it);
       if(elt)
         {
           std::string name(elt->getName());
@@ -375,7 +378,7 @@ namespace MEDCouplingImpl
   {
   public:
     PflFinder(const std::string& pfl):_pfl(pfl) { }
-    bool operator() (const MCAuto<DataArrayInt>& loc) { return loc->getName()==_pfl; }
+    bool operator() (const MCAuto<DataArrayIdType>& loc) { return loc->getName()==_pfl; }
   private:
     const std::string _pfl;
   };
@@ -392,12 +395,12 @@ int MEDFileFieldGlobs::getLocalizationId(const std::string& loc) const
         oss << "\"" << (*it)->getName() << "\", ";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  return std::distance(_locs.begin(),it);
+  return (int)std::distance(_locs.begin(),it);
 }
 
 int MEDFileFieldGlobs::getProfileId(const std::string& pfl) const
 {
-  std::vector< MCAuto<DataArrayInt> >::const_iterator it=std::find_if(_pfls.begin(),_pfls.end(),MEDCouplingImpl::PflFinder(pfl));
+  std::vector< MCAuto<DataArrayIdType> >::const_iterator it=std::find_if(_pfls.begin(),_pfls.end(),MEDCouplingImpl::PflFinder(pfl));
   if(it==_pfls.end())
     {
       std::ostringstream oss; oss << "MEDFileFieldGlobs::getProfileId : no such profile name : \"" << pfl << "\" Possible localizations are : ";
@@ -405,18 +408,18 @@ int MEDFileFieldGlobs::getProfileId(const std::string& pfl) const
         oss << "\"" << (*it)->getName() << "\", ";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  return std::distance(_pfls.begin(),it);
+  return (int)std::distance(_pfls.begin(),it);
 }
 
 /*!
  * The returned value is never null.
  */
-const DataArrayInt *MEDFileFieldGlobs::getProfile(const std::string& pflName) const
+const DataArrayIdType *MEDFileFieldGlobs::getProfile(const std::string& pflName) const
 {
   return getProfileFromId(getProfileId(pflName));
 }
 
-const DataArrayInt *MEDFileFieldGlobs::getProfileFromId(int pflId) const
+const DataArrayIdType *MEDFileFieldGlobs::getProfileFromId(int pflId) const
 {
   if(pflId<0 || pflId>=(int)_pfls.size())
     throw INTERP_KERNEL::Exception("MEDFileFieldGlobs::getProfileFromId : Invalid profile id !");
@@ -438,10 +441,10 @@ MEDFileFieldLoc& MEDFileFieldGlobs::getLocalization(const std::string& locName)
 /*!
  * The returned value is never null. Borrowed reference returned.
  */
-DataArrayInt *MEDFileFieldGlobs::getProfile(const std::string& pflName)
+DataArrayIdType *MEDFileFieldGlobs::getProfile(const std::string& pflName)
 {
   std::string pflNameCpp(pflName);
-  std::vector< MCAuto<DataArrayInt> >::iterator it=std::find_if(_pfls.begin(),_pfls.end(),MEDCouplingImpl::PflFinder(pflNameCpp));
+  std::vector< MCAuto<DataArrayIdType> >::iterator it=std::find_if(_pfls.begin(),_pfls.end(),MEDCouplingImpl::PflFinder(pflNameCpp));
   if(it==_pfls.end())
     {
       std::ostringstream oss; oss << "MEDFileFieldGlobs::getProfile: no such profile name : \"" << pflNameCpp << "\" Possible profiles are : ";
@@ -452,7 +455,7 @@ DataArrayInt *MEDFileFieldGlobs::getProfile(const std::string& pflName)
   return *it;
 }
 
-DataArrayInt *MEDFileFieldGlobs::getProfileFromId(int pflId)
+DataArrayIdType *MEDFileFieldGlobs::getProfileFromId(int pflId)
 {
   if(pflId<0 || pflId>=(int)_pfls.size())
     throw INTERP_KERNEL::Exception("MEDFileFieldGlobs::getProfileFromId : Invalid profile id !");
@@ -461,9 +464,9 @@ DataArrayInt *MEDFileFieldGlobs::getProfileFromId(int pflId)
 
 void MEDFileFieldGlobs::killProfileIds(const std::vector<int>& pflIds)
 {
-  std::vector< MCAuto<DataArrayInt> > newPfls;
+  std::vector< MCAuto<DataArrayIdType> > newPfls;
   int i=0;
-  for(std::vector< MCAuto<DataArrayInt> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
+  for(std::vector< MCAuto<DataArrayIdType> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
     {
       if(std::find(pflIds.begin(),pflIds.end(),i)==pflIds.end())
         newPfls.push_back(*it);
@@ -498,18 +501,18 @@ void MEDFileFieldGlobs::killStructureElementsInGlobs()
 
 std::vector<std::string> MEDFileFieldGlobs::getPfls() const
 {
-  int sz=_pfls.size();
+  std::size_t sz=_pfls.size();
   std::vector<std::string> ret(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     ret[i]=_pfls[i]->getName();
   return ret;
 }
 
 std::vector<std::string> MEDFileFieldGlobs::getLocs() const
 {
-  int sz=_locs.size();
+  std::size_t sz=_locs.size();
   std::vector<std::string> ret(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     ret[i]=_locs[i]->getName();
   return ret;
 }
@@ -530,18 +533,18 @@ bool MEDFileFieldGlobs::existsLoc(const std::string& locName) const
 
 std::vector< std::vector<int> > MEDFileFieldGlobs::whichAreEqualProfiles() const
 {
-  std::map<int,std::vector<int> > m;
+  std::map<mcIdType,std::vector<int> > m;
   int i=0;
-  for(std::vector< MCAuto<DataArrayInt> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
+  for(std::vector< MCAuto<DataArrayIdType> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++,i++)
     {
-      const DataArrayInt *tmp=(*it);
+      const DataArrayIdType *tmp=(*it);
       if(tmp)
         {
           m[tmp->getHashCode()].push_back(i);
         }
     }
   std::vector< std::vector<int> > ret;
-  for(std::map<int,std::vector<int> >::const_iterator it2=m.begin();it2!=m.end();it2++)
+  for(std::map<mcIdType,std::vector<int> >::const_iterator it2=m.begin();it2!=m.end();it2++)
     {
       if((*it2).second.size()>1)
         {
@@ -573,12 +576,12 @@ std::vector< std::vector<int> > MEDFileFieldGlobs::whichAreEqualLocs(double eps)
   throw INTERP_KERNEL::Exception("MEDFileFieldGlobs::whichAreEqualLocs : no implemented yet ! Sorry !");
 }
 
-void MEDFileFieldGlobs::appendProfile(DataArrayInt *pfl)
+void MEDFileFieldGlobs::appendProfile(DataArrayIdType *pfl)
 {
   std::string name(pfl->getName());
   if(name.empty())
     throw INTERP_KERNEL::Exception("MEDFileFieldGlobs::appendProfile : unsupported profiles with no name !");
-  for(std::vector< MCAuto<DataArrayInt> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++)
+  for(std::vector< MCAuto<DataArrayIdType> >::const_iterator it=_pfls.begin();it!=_pfls.end();it++)
     if(name==(*it)->getName())
       {
         if(!pfl->isEqual(*(*it)))
@@ -1088,10 +1091,10 @@ const MEDFileFieldLoc& MEDFileFieldGlobsReal::getLocalizationFromId(int locId) c
 /*!
  * Returns a profile array by its name.
  *  \param [in] pflName - the name of the profile of interest.
- *  \return const DataArrayInt * - the profile array having the name \a pflName.
+ *  \return const DataArrayIdType * - the profile array having the name \a pflName.
  *  \throw If there is no a profile named \a pflName.
  */
-const DataArrayInt *MEDFileFieldGlobsReal::getProfile(const std::string& pflName) const
+const DataArrayIdType *MEDFileFieldGlobsReal::getProfile(const std::string& pflName) const
 {
   return contentNotNull()->getProfile(pflName);
 }
@@ -1099,10 +1102,10 @@ const DataArrayInt *MEDFileFieldGlobsReal::getProfile(const std::string& pflName
 /*!
  * Returns a profile array by its id.
  *  \param [in] pflId - the id of the profile of interest.
- *  \return const DataArrayInt * - the profile array having the id \a pflId.
+ *  \return const DataArrayIdType * - the profile array having the id \a pflId.
  *  \throw If there is no a profile with id \a pflId.
  */
-const DataArrayInt *MEDFileFieldGlobsReal::getProfileFromId(int pflId) const
+const DataArrayIdType *MEDFileFieldGlobsReal::getProfileFromId(int pflId) const
 {
   return contentNotNull()->getProfileFromId(pflId);
 }
@@ -1134,10 +1137,10 @@ MEDFileFieldLoc& MEDFileFieldGlobsReal::getLocalization(const std::string& locNa
 /*!
  * Returns a profile array, apt for modification, by its name.
  *  \param [in] pflName - the name of the profile of interest.
- *  \return DataArrayInt * - Borrowed reference - a non-const pointer to the profile array having the name \a pflName.
+ *  \return DataArrayIdType * - Borrowed reference - a non-const pointer to the profile array having the name \a pflName.
  *  \throw If there is no a profile named \a pflName.
  */
-DataArrayInt *MEDFileFieldGlobsReal::getProfile(const std::string& pflName)
+DataArrayIdType *MEDFileFieldGlobsReal::getProfile(const std::string& pflName)
 {
   return contentNotNull()->getProfile(pflName);
 }
@@ -1145,10 +1148,10 @@ DataArrayInt *MEDFileFieldGlobsReal::getProfile(const std::string& pflName)
 /*!
  * Returns a profile array, apt for modification, by its id.
  *  \param [in] pflId - the id of the profile of interest.
- *  \return DataArrayInt * - Borrowed reference - a non-const pointer to the profile array having the id \a pflId.
+ *  \return DataArrayIdType * - Borrowed reference - a non-const pointer to the profile array having the id \a pflId.
  *  \throw If there is no a profile with id \a pflId.
  */
-DataArrayInt *MEDFileFieldGlobsReal::getProfileFromId(int pflId)
+DataArrayIdType *MEDFileFieldGlobsReal::getProfileFromId(int pflId)
 {
   return contentNotNull()->getProfileFromId(pflId);
 }
@@ -1178,7 +1181,7 @@ void MEDFileFieldGlobsReal::killLocalizationIds(const std::vector<int>& locIds)
  *  \throw If a profile with the same name as that of \a pfl already exists but contains
  *         different ids.
  */
-void MEDFileFieldGlobsReal::appendProfile(DataArrayInt *pfl)
+void MEDFileFieldGlobsReal::appendProfile(DataArrayIdType *pfl)
 {
   contentNotNull()->appendProfile(pfl);
 }
index c39e19895401a0440eae6ef949e058195d125002..5744392ee6d923c3a17ed8d0d8bdce26424726b0 100644 (file)
@@ -72,17 +72,17 @@ namespace MEDCoupling
     std::string getFileName() const { return _file_name; }
     const MEDFileFieldLoc& getLocalizationFromId(int locId) const;
     const MEDFileFieldLoc& getLocalization(const std::string& locName) const;
-    const DataArrayInt *getProfileFromId(int pflId) const;
-    const DataArrayInt *getProfile(const std::string& pflName) const;
+    const DataArrayIdType *getProfileFromId(int pflId) const;
+    const DataArrayIdType *getProfile(const std::string& pflName) const;
     MEDFileFieldLoc& getLocalizationFromId(int locId);
     MEDFileFieldLoc& getLocalization(const std::string& locName);
-    DataArrayInt *getProfile(const std::string& pflName);
-    DataArrayInt *getProfileFromId(int pflId);
+    DataArrayIdType *getProfile(const std::string& pflName);
+    DataArrayIdType *getProfileFromId(int pflId);
     void killProfileIds(const std::vector<int>& pflIds);
     void killLocalizationIds(const std::vector<int>& locIds);
     void killStructureElementsInGlobs();
     //
-    void appendProfile(DataArrayInt *pfl);
+    void appendProfile(DataArrayIdType *pfl);
     void appendLoc(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
     //
     static std::string CreateNewNameNotIn(const std::string& prefix, const std::vector<std::string>& namesToAvoid);
@@ -91,7 +91,7 @@ namespace MEDCoupling
     MEDFileFieldGlobs();
     ~MEDFileFieldGlobs();
   protected:
-    std::vector< MCAuto<DataArrayInt> > _pfls;
+    std::vector< MCAuto<DataArrayIdType> > _pfls;
     std::vector< MCAuto<MEDFileFieldLoc> > _locs;
     std::string _file_name;
   };
@@ -154,14 +154,14 @@ namespace MEDCoupling
     MEDLOADER_EXPORT const MEDFileFieldLoc& getLocalization(const std::string& locName) const;
     MEDLOADER_EXPORT MEDFileFieldLoc& getLocalizationFromId(int locId);
     MEDLOADER_EXPORT MEDFileFieldLoc& getLocalization(const std::string& locName);
-    MEDLOADER_EXPORT const DataArrayInt *getProfile(const std::string& pflName) const;
-    MEDLOADER_EXPORT const DataArrayInt *getProfileFromId(int pflId) const;
-    MEDLOADER_EXPORT DataArrayInt *getProfile(const std::string& pflName);
-    MEDLOADER_EXPORT DataArrayInt *getProfileFromId(int pflId);
+    MEDLOADER_EXPORT const DataArrayIdType *getProfile(const std::string& pflName) const;
+    MEDLOADER_EXPORT const DataArrayIdType *getProfileFromId(int pflId) const;
+    MEDLOADER_EXPORT DataArrayIdType *getProfile(const std::string& pflName);
+    MEDLOADER_EXPORT DataArrayIdType *getProfileFromId(int pflId);
     MEDLOADER_EXPORT void killProfileIds(const std::vector<int>& pflIds);
     MEDLOADER_EXPORT void killLocalizationIds(const std::vector<int>& locIds);
     //
-    MEDLOADER_EXPORT void appendProfile(DataArrayInt *pfl);
+    MEDLOADER_EXPORT void appendProfile(DataArrayIdType *pfl);
     MEDLOADER_EXPORT void appendLoc(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
   protected:
     MEDFileFieldGlobs *contentNotNull();
index c365fdff84542a3965dee08b9439264c9f30c6de..1d687b19db204755af87c619e53b1e5ebebe4ca6 100644 (file)
@@ -121,10 +121,12 @@ MEDFileFieldLoc::MEDFileFieldLoc(med_idt fid, const std::string& locName):_name(
 {
   med_geometry_type geotype;
   med_geometry_type sectiongeotype;
-  int nsectionmeshcell;
+  med_int nsectionmeshcell, dim, nb_gauss_pt;
   INTERP_KERNEL::AutoPtr<char> geointerpname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> sectionmeshname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
-  MEDlocalizationInfoByName(fid,locName.c_str(),&geotype,&_dim,&_nb_gauss_pt,geointerpname,sectionmeshname,&nsectionmeshcell,&sectiongeotype);
+  MEDlocalizationInfoByName(fid,locName.c_str(),&geotype,&dim,&nb_gauss_pt,geointerpname,sectionmeshname,&nsectionmeshcell,&sectiongeotype);
+  _dim=FromMedInt<int>(dim);
+  _nb_gauss_pt=FromMedInt<int>(nb_gauss_pt);
   _gt=new MEDFileGTKeeperSta((INTERP_KERNEL::NormalizedCellType)(std::distance(typmai3,std::find(typmai3,typmai3+34,geotype))));
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getGeoType()));
   _nb_node_per_cell=cm.getNumberOfNodes();
@@ -138,11 +140,13 @@ MEDFileFieldLoc::MEDFileFieldLoc(med_idt fid, int id, const MEDFileEntities *ent
 {
   med_geometry_type geotype;
   med_geometry_type sectiongeotype;
-  int nsectionmeshcell;
+  med_int nsectionmeshcell,dim,nb_gauss_pt;
   INTERP_KERNEL::AutoPtr<char> locName(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> geointerpname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> sectionmeshname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
-  MEDFILESAFECALLERRD0(MEDlocalizationInfo,(fid,id+1,locName,&geotype,&_dim,&_nb_gauss_pt,geointerpname,sectionmeshname,&nsectionmeshcell,&sectiongeotype));
+  MEDFILESAFECALLERRD0(MEDlocalizationInfo,(fid,id+1,locName,&geotype,&dim,&nb_gauss_pt,geointerpname,sectionmeshname,&nsectionmeshcell,&sectiongeotype));
+  _dim=FromMedInt<int>(dim);
+  _nb_gauss_pt=FromMedInt<int>(nb_gauss_pt);
   _name=locName;
   std::string sectionName(MEDLoaderBase::buildStringFromFortran(sectionmeshname,MED_NAME_SIZE));
   if(sectionName.empty())
@@ -164,8 +168,9 @@ MEDFileFieldLoc::MEDFileFieldLoc(med_idt fid, int id, const MEDFileEntities *ent
       const MEDFileUMesh *section(entities2->getSupMeshWithName(sectionName));
       _gt=new MEDFileGTKeeperDyn(um,section,se);
       {
-        int dummy;
-        MEDFILESAFECALLERRD0(MEDmeshGeotypeParameter,(fid,geotype,&dummy,&_nb_node_per_cell));
+        med_int dummy, nb_node_per_cell;
+        MEDFILESAFECALLERRD0(MEDmeshGeotypeParameter,(fid,geotype,&dummy,&nb_node_per_cell));
+        _nb_node_per_cell=FromMedInt<int>(nb_node_per_cell);
       }
     }
   _ref_coo.resize(_dim*_nb_node_per_cell);
@@ -175,12 +180,12 @@ MEDFileFieldLoc::MEDFileFieldLoc(med_idt fid, int id, const MEDFileEntities *ent
 }
 
 MEDFileFieldLoc::MEDFileFieldLoc(const std::string& locName, INTERP_KERNEL::NormalizedCellType geoType,
-                                 const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w):_name(locName),_gt(new MEDFileGTKeeperSta(geoType)),_ref_coo(refCoo),_gs_coo(gsCoo),_w(w)
+                                 const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w):_gt(new MEDFileGTKeeperSta(geoType)),_name(locName),_ref_coo(refCoo),_gs_coo(gsCoo),_w(w)
 {
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(getGeoType()));
   _dim=cm.getDimension();
   _nb_node_per_cell=cm.getNumberOfNodes();
-  _nb_gauss_pt=_w.size();
+  _nb_gauss_pt=(int)_w.size();
 }
 
 
@@ -265,11 +270,11 @@ std::string MEDFileFieldLoc::repr() const
   oss << "\n  - Dimension : " << _dim << "\n  - Number of gauss points : ";
   oss << _nb_gauss_pt << "\n  - Number of nodes in cell : " << _nb_node_per_cell;
   oss << "\n  - Ref coords are : ";
-  int sz=_ref_coo.size();
+  std::size_t sz=_ref_coo.size();
   if(sz%_dim==0)
     {
-      int nbOfTuples=sz/_dim;
-      for(int i=0;i<nbOfTuples;i++)
+      std::size_t nbOfTuples=sz/_dim;
+      for(std::size_t i=0;i<nbOfTuples;i++)
         {
           oss << "(";
           for(int j=0;j<_dim;j++)
@@ -283,8 +288,8 @@ std::string MEDFileFieldLoc::repr() const
   sz=_gs_coo.size();
   if(sz%_dim==0)
     {
-      int nbOfTuples=sz/_dim;
-      for(int i=0;i<nbOfTuples;i++)
+      std::size_t nbOfTuples=sz/_dim;
+      for(std::size_t i=0;i<nbOfTuples;i++)
         {
           oss << "(";
           for(int j=0;j<_dim;j++)
@@ -298,7 +303,7 @@ std::string MEDFileFieldLoc::repr() const
   return oss.str();
 }
 
-void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(mcIdType& start, mcIdType offset, mcIdType nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
   _type=field->getTypeOfField();
   _start=start;
@@ -313,8 +318,8 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(int& start, int off
       }
     case ON_GAUSS_NE:
       {
-        MCAuto<DataArrayInt> arr=field->getDiscretization()->getOffsetArr(field->getMesh());
-        const int *arrPtr=arr->getConstPointer();
+        MCAuto<DataArrayIdType> arr=field->getDiscretization()->getOffsetArr(field->getMesh());
+        const mcIdType *arrPtr=arr->getConstPointer();
         getOrCreateAndGetArray()->setContigPartOfSelectedValuesSlice(_start,arrr,arrPtr[offset],arrPtr[offset+nbOfCells],1);
         _end=_start+(arrPtr[offset+nbOfCells]-arrPtr[offset]);
         _nval=nbOfCells;
@@ -323,17 +328,17 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(int& start, int off
     case ON_GAUSS_PT:
       {
         const MEDCouplingFieldDiscretization *disc(field->getDiscretization());
-        const MEDCouplingGaussLocalization& gsLoc(field->getGaussLocalization(_loc_id));
+        const MEDCouplingGaussLocalization& gsLoc(field->getGaussLocalization(FromIdType<int>(_loc_id)));
         const MEDCouplingFieldDiscretizationGauss *disc2(dynamic_cast<const MEDCouplingFieldDiscretizationGauss *>(disc));
         if(!disc2)
           throw INTERP_KERNEL::Exception("assignFieldNoProfile : invalid call to this method ! Internal Error !");
-        const DataArrayInt *dai(disc2->getArrayOfDiscIds());
-        MCAuto<DataArrayInt> dai2(disc2->getOffsetArr(field->getMesh()));
-        const int *dai2Ptr(dai2->getConstPointer());
-        int nbi(gsLoc.getWeights().size());
-        MCAuto<DataArrayInt> da2(dai->selectByTupleIdSafeSlice(offset,offset+nbOfCells,1));
-        MCAuto<DataArrayInt> da3(da2->findIdsEqual(_loc_id));
-        const int *da3Ptr(da3->getConstPointer());
+        const DataArrayIdType *dai(disc2->getArrayOfDiscIds());
+        MCAuto<DataArrayIdType> dai2(disc2->getOffsetArr(field->getMesh()));
+        const mcIdType *dai2Ptr(dai2->getConstPointer());
+        mcIdType nbi(ToIdType(gsLoc.getWeights().size()));
+        MCAuto<DataArrayIdType> da2(dai->selectByTupleIdSafeSlice(offset,offset+nbOfCells,1));
+        MCAuto<DataArrayIdType> da3(da2->findIdsEqual(_loc_id));
+        const mcIdType *da3Ptr(da3->getConstPointer());
         if(da3->getNumberOfTuples()!=nbOfCells)
           {//profile : for gauss even in NoProfile !!!
             std::ostringstream oss; oss << "Pfl_" << nasc.getName() << "_" << INTERP_KERNEL::CellModel::GetCellModel(getGeoType()).getRepr() << "_" << _loc_id;
@@ -341,14 +346,14 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(int& start, int off
             da3->setName(_profile.c_str());
             glob.appendProfile(da3);
           }
-        MCAuto<DataArrayInt> da4(DataArrayInt::New());
+        MCAuto<DataArrayIdType> da4(DataArrayIdType::New());
         _nval=da3->getNbOfElems();
         da4->alloc(_nval*nbi,1);
-        int *da4Ptr(da4->getPointer());
-        for(int i=0;i<_nval;i++)
+        mcIdType *da4Ptr(da4->getPointer());
+        for(mcIdType i=0;i<_nval;i++)
           {
-            int ref=dai2Ptr[offset+da3Ptr[i]];
-            for(int j=0;j<nbi;j++)
+            mcIdType ref=dai2Ptr[offset+da3Ptr[i]];
+            for(mcIdType j=0;j<nbi;j++)
               *da4Ptr++=ref+j;
           }
         std::ostringstream oss2; oss2 << "Loc_" << nasc.getName() << "_" << INTERP_KERNEL::CellModel::GetCellModel(getGeoType()).getRepr() << "_" << _loc_id;
@@ -373,7 +378,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(int& start, int off
  *             \b WARNING if not null the MED file profile can be subdivided again in case of Gauss points.
  * \param [in] mesh is the mesh coming from the MEDFileMesh instance in correspondence with the MEDFileField. The mesh inside the \a field is simply ignored.
  */
-void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(bool isPflAlone, int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arrr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(bool isPflAlone, mcIdType& start, const DataArrayIdType *multiTypePfl, const DataArrayIdType *idsInPfl, DataArrayIdType *locIds, mcIdType nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arrr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
   _profile.clear();
   _type=field->getTypeOfField();
@@ -416,12 +421,12 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(bool isPflAlone, int&
       }
     case ON_GAUSS_NE:
       {
-        MCAuto<DataArrayInt> arr=field->getDiscretization()->getOffsetArr(mesh);
-        MCAuto<DataArrayInt> arr2=arr->deltaShiftIndex();
-        MCAuto<DataArrayInt> arr3=arr2->selectByTupleId(multiTypePfl->begin(),multiTypePfl->end());
+        MCAuto<DataArrayIdType> arr=field->getDiscretization()->getOffsetArr(mesh);
+        MCAuto<DataArrayIdType> arr2=arr->deltaShiftIndex();
+        MCAuto<DataArrayIdType> arr3=arr2->selectByTupleId(multiTypePfl->begin(),multiTypePfl->end());
         arr3->computeOffsetsFull();
-        MCAuto<DataArrayInt> tmp=idsInPfl->buildExplicitArrByRanges(arr3);
-        int trueNval=tmp->getNumberOfTuples();
+        MCAuto<DataArrayIdType> tmp=idsInPfl->buildExplicitArrByRanges(arr3);
+        mcIdType trueNval=tmp->getNumberOfTuples();
         _nval=idsInPfl->getNumberOfTuples();
         getOrCreateAndGetArray()->setContigPartOfSelectedValues(_start,arrr,tmp);
         _end=_start+trueNval;
@@ -432,23 +437,23 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(bool isPflAlone, int&
         const MEDCouplingFieldDiscretizationGauss *disc2=dynamic_cast<const MEDCouplingFieldDiscretizationGauss *>(field->getDiscretization());
         if(!disc2)
           throw INTERP_KERNEL::Exception("addNewEntryIfNecessaryGauss : invalid call to this method ! Internal Error !");
-        const DataArrayInt *da1=disc2->getArrayOfDiscIds();
-        const MEDCouplingGaussLocalization& gsLoc=field->getGaussLocalization(_loc_id);
-        MCAuto<DataArrayInt> da2=da1->selectByTupleId(idsInPfl->begin(),idsInPfl->end());
-        MCAuto<DataArrayInt> da3=da2->findIdsEqual(_loc_id);
-        MCAuto<DataArrayInt> da4=idsInPfl->selectByTupleId(da3->begin(),da3->end());
+        const DataArrayIdType *da1=disc2->getArrayOfDiscIds();
+        const MEDCouplingGaussLocalization& gsLoc=field->getGaussLocalization(FromIdType<int>(_loc_id));
+        MCAuto<DataArrayIdType> da2=da1->selectByTupleId(idsInPfl->begin(),idsInPfl->end());
+        MCAuto<DataArrayIdType> da3=da2->findIdsEqual(_loc_id);
+        MCAuto<DataArrayIdType> da4=idsInPfl->selectByTupleId(da3->begin(),da3->end());
         //
         MCAuto<MEDCouplingMesh> mesh2=mesh->buildPart(multiTypePfl->begin(),multiTypePfl->end());
-        MCAuto<DataArrayInt> arr=disc2->getOffsetArr(mesh2);
+        MCAuto<DataArrayIdType> arr=disc2->getOffsetArr(mesh2);
         //
-        MCAuto<DataArrayInt> tmp=DataArrayInt::New();
-        int trueNval=0;
-        for(const int *pt=da4->begin();pt!=da4->end();pt++)
+        MCAuto<DataArrayIdType> tmp=DataArrayIdType::New();
+        mcIdType trueNval=0;
+        for(const mcIdType *pt=da4->begin();pt!=da4->end();pt++)
           trueNval+=arr->getIJ(*pt+1,0)-arr->getIJ(*pt,0);
         tmp->alloc(trueNval,1);
-        int *tmpPtr=tmp->getPointer();
-        for(const int *pt=da4->begin();pt!=da4->end();pt++)
-          for(int j=arr->getIJ(*pt,0);j<arr->getIJ(*pt+1,0);j++)
+        mcIdType *tmpPtr=tmp->getPointer();
+        for(const mcIdType *pt=da4->begin();pt!=da4->end();pt++)
+          for(mcIdType j=arr->getIJ(*pt,0);j<arr->getIJ(*pt+1,0);j++)
             *tmpPtr++=j;
         //
         _nval=da4->getNumberOfTuples();
@@ -457,7 +462,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(bool isPflAlone, int&
         oss << "_loc_" << _loc_id;
         if(locIds)
           {
-            MCAuto<DataArrayInt> da5=locIds->selectByTupleId(da3->begin(),da3->end());
+            MCAuto<DataArrayIdType> da5=locIds->selectByTupleId(da3->begin(),da3->end());
             da5->setName(oss.str());
             glob.appendProfile(da5);
             _profile=oss.str();
@@ -482,7 +487,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldProfile(bool isPflAlone, int&
   start=_end;
 }
 
-void MEDFileFieldPerMeshPerTypePerDisc::assignNodeFieldNoProfile(int& start, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob)
+void MEDFileFieldPerMeshPerTypePerDisc::assignNodeFieldNoProfile(mcIdType& start, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob)
 {
   _start=start;
   _nval=arrr->getNumberOfTuples();
@@ -496,7 +501,7 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::NewOnRead(
   return new MEDFileFieldPerMeshPerTypePerDisc(fath,type,profileIt,pd);
 }
 
-MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::New(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int locId)
+MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::New(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, mcIdType locId)
 {
   return new MEDFileFieldPerMeshPerTypePerDisc(fath,type,locId,std::string());
 }
@@ -525,7 +530,7 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::deepCopy(M
   return ret.retn();
 }
 
-MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField atype, int profileIt, const PartDefinition *pd)
+MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField atype, mcIdType profileIt, const PartDefinition *pd)
 try:_type(atype),_father(fath),_profile_it(profileIt),_pd(const_cast<PartDefinition *>(pd))
 {
   if(pd)
@@ -536,7 +541,7 @@ catch(INTERP_KERNEL::Exception& e)
     throw e;
 }
 
-MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int locId, const std::string& dummy):_type(type),_father(fath),_loc_id(locId)
+MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, mcIdType locId, const std::string& dummy):_type(type),_father(fath),_loc_id(locId)
 {
 }
 
@@ -544,8 +549,8 @@ MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc(const MEDFi
 {
 }
 
-MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc():_type(ON_CELLS),_father(0),_start(-std::numeric_limits<int>::max()),_end(-std::numeric_limits<int>::max()),
-    _nval(-std::numeric_limits<int>::max()),_loc_id(-std::numeric_limits<int>::max())
+MEDFileFieldPerMeshPerTypePerDisc::MEDFileFieldPerMeshPerTypePerDisc():_type(ON_CELLS),_father(0),_start(-std::numeric_limits<mcIdType>::max()),_end(-std::numeric_limits<mcIdType>::max()),
+    _nval(-std::numeric_limits<mcIdType>::max()),_loc_id(-std::numeric_limits<int>::max())
 {
 }
 
@@ -556,7 +561,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::goReadZeValuesInFile(med_idt fid, const
     {
       med_entity_type mentiCpy(menti);
       INTERP_KERNEL::AutoPtr<char> locname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
-      int nbi,tmp1;
+      med_int nbi,tmp1;
       med_int nbValsInFile(MEDfieldnValueWithProfileByName(fid,fieldName.c_str(),iteration,order,menti,mgeoti,_profile.c_str(),MED_COMPACT_PFLMODE,&tmp1,locname,&nbi));
       if(nbValsInFile==0 && menti==MED_CELL)
         {//
@@ -582,18 +587,18 @@ void MEDFileFieldPerMeshPerTypePerDisc::goReadZeValuesInFile(med_idt fid, const
       if(!_profile.empty())
         throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::goReadZeValuesInFile : not implemented !");
       INTERP_KERNEL::AutoPtr<char> pflname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE)),locname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
-      int profilesize,nbi;
-      int overallNval(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,menti,mgeoti,_profile_it+1,MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
+      med_int profilesize,nbi;
+      med_int overallNval(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,menti,mgeoti,FromIdType<int>(_profile_it+1),MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
       const SlicePartDefinition *spd(dynamic_cast<const SlicePartDefinition *>(pd));
       if(spd)
         {
-          int start,stop,step;
+          mcIdType start,stop,step;
           spd->getSlice(start,stop,step);
-          int nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(start,stop,step,"MEDFileFieldPerMeshPerTypePerDisc::goReadZeValuesInFile"));
+          mcIdType nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(start,stop,step,"MEDFileFieldPerMeshPerTypePerDisc::goReadZeValuesInFile"));
           med_filter filter=MED_FILTER_INIT;
           MEDFILESAFECALLERRD0(MEDfilterBlockOfEntityCr,(fid,/*nentity*/overallNval,/*nvaluesperentity*/nbi,/*nconstituentpervalue*/nbOfCompo,
                                                          MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
-                                                         /*start*/start+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
+                                                         /*start*/ToMedInt(start+1),/*stride*/ToMedInt(step),/*count*/1,/*blocksize*/ToMedInt(nbOfEltsToLoad),
                                                          /*lastblocksize=useless because count=1*/0,&filter));
           MEDFILESAFECALLERRD0(MEDfieldValueAdvancedRd,(fid,fieldName.c_str(),iteration,order,menti,mgeoti,&filter,startFeedingPtr));
           MEDfilterClose(&filter);
@@ -603,18 +608,18 @@ void MEDFileFieldPerMeshPerTypePerDisc::goReadZeValuesInFile(med_idt fid, const
       if(dpd)
         {
           dpd->checkConsistencyLight();
-          MCAuto<DataArrayInt> myIds(dpd->toDAI());
-          int a(myIds->getMinValueInArray()),b(myIds->getMaxValueInArray());
+          MCAuto<DataArrayIdType> myIds(dpd->toDAI());
+          mcIdType a(myIds->getMinValueInArray()),b(myIds->getMaxValueInArray());
           myIds=myIds->deepCopy();// WARNING deep copy here because _pd is modified by applyLin !!!
           myIds->applyLin(1,-a);
-          int nbOfEltsToLoad(b-a+1);
+          mcIdType nbOfEltsToLoad(b-a+1);
           med_filter filter=MED_FILTER_INIT;
           {//TODO : manage int32 !
             MCAuto<DataArrayDouble> tmp(DataArrayDouble::New());
             tmp->alloc(nbOfEltsToLoad,nbOfCompo);
             MEDFILESAFECALLERRD0(MEDfilterBlockOfEntityCr,(fid,/*nentity*/overallNval,/*nvaluesperentity*/nbi,/*nconstituentpervalue*/nbOfCompo,
                                                            MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
-                                                           /*start*/a+1,/*stride*/1,/*count*/1,/*blocksize*/nbOfEltsToLoad,
+                                                           /*start*/ToMedInt(a+1),/*stride*/1,/*count*/1,/*blocksize*/ToMedInt(nbOfEltsToLoad),
                                                            /*lastblocksize=useless because count=1*/0,&filter));
             MEDFILESAFECALLERRD0(MEDfieldValueAdvancedRd,(fid,fieldName.c_str(),iteration,order,menti,mgeoti,&filter,reinterpret_cast<unsigned char *>(tmp->getPointer())));
             MCAuto<DataArrayDouble> feeder(DataArrayDouble::New());
@@ -633,23 +638,23 @@ const MEDFileFieldPerMeshPerTypeCommon *MEDFileFieldPerMeshPerTypePerDisc::getFa
   return _father;
 }
 
-void MEDFileFieldPerMeshPerTypePerDisc::loadOnlyStructureOfDataRecursively(med_idt fid, int& start, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMeshPerTypePerDisc::loadOnlyStructureOfDataRecursively(med_idt fid, mcIdType& start, const MEDFileFieldNameScope& nasc)
 {
   INTERP_KERNEL::AutoPtr<char> locname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> pflname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   std::string fieldName(nasc.getName()),meshName(getMeshName());
-  int iteration(getIteration()),order(getOrder()),profilesize,nbi;
+  med_int iteration(getIteration()),order(getOrder()),profilesize,nbi;
   TypeOfField type(getType());
   med_geometry_type mgeoti;
   med_entity_type menti;
   _father->entriesForMEDfile(type,mgeoti,menti);
-  int zeNVal(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,menti,mgeoti,_profile_it+1,MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
+  med_int zeNVal(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,menti,mgeoti,FromIdType<int>(_profile_it+1),MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
   if(zeNVal==0 && type==ON_CELLS)
     {//eheh maybe there's a surprise :)
-      int zeNVal1(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,MED_DESCENDING_FACE,mgeoti,_profile_it+1,MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
+      med_int zeNVal1(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,MED_DESCENDING_FACE,mgeoti,FromIdType<int>(_profile_it+1),MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
       if(zeNVal1==0)
         {
-          int zeNVal2(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,MED_DESCENDING_EDGE,mgeoti,_profile_it+1,MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
+          med_int zeNVal2(MEDfieldnValueWithProfile(fid,fieldName.c_str(),iteration,order,MED_DESCENDING_EDGE,mgeoti,FromIdType<int>(_profile_it+1),MED_COMPACT_PFLMODE,pflname,&profilesize,locname,&nbi));
           if(zeNVal2!=0)
             zeNVal=zeNVal2;
         }
@@ -709,7 +714,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::loadBigArray(med_idt fid, const MEDFileF
       std::ostringstream oss; oss << "MEDFileFieldPerMeshPerTypePerDisc::loadBigArray : Invalid start ("<< _start << ") regarding admissible range of allocated array [0," << arr->getNumberOfTuples() << "] !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  int nbOfCompo(arr->getNumberOfComponents());
+  int nbOfCompo((int)arr->getNumberOfComponents());
   DataArrayDouble *arrD(dynamic_cast<DataArrayDouble *>(arr));
   if(arrD)
     {
@@ -717,7 +722,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::loadBigArray(med_idt fid, const MEDFileF
       goReadZeValuesInFile(fid,fieldName,nbOfCompo,iteration,order,menti,mgeoti,reinterpret_cast<unsigned char*>(startFeeding));
       return ;
     }
-  DataArrayInt *arrI(dynamic_cast<DataArrayInt *>(arr));
+  DataArrayInt32 *arrI(dynamic_cast<DataArrayInt32 *>(arr));
   if(arrI)
     {
       int *startFeeding(arrI->getPointer()+_start*nbOfCompo);
@@ -737,9 +742,9 @@ void MEDFileFieldPerMeshPerTypePerDisc::loadBigArray(med_idt fid, const MEDFileF
 /*!
  * Set a \c this->_start **and** \c this->_end keeping the same delta between the two.
  */
-void MEDFileFieldPerMeshPerTypePerDisc::setNewStart(int newValueOfStart)
+void MEDFileFieldPerMeshPerTypePerDisc::setNewStart(mcIdType newValueOfStart)
 {
-  int delta=_end-_start;
+  mcIdType delta=_end-_start;
   _start=newValueOfStart;
   _end=_start+delta;
 }
@@ -797,19 +802,19 @@ void MEDFileFieldPerMeshPerTypePerDisc::setType(TypeOfField newType)
   _type=newType;
 }
 
-int MEDFileFieldPerMeshPerTypePerDisc::getNumberOfComponents() const
+std::size_t MEDFileFieldPerMeshPerTypePerDisc::getNumberOfComponents() const
 {
   return _father->getNumberOfComponents();
 }
 
-int MEDFileFieldPerMeshPerTypePerDisc::getNumberOfTuples() const
+mcIdType MEDFileFieldPerMeshPerTypePerDisc::getNumberOfTuples() const
 {
   return _end-_start;
 }
 
-void MEDFileFieldPerMeshPerTypePerDisc::incrementNbOfVals(int deltaNbVal)
+void MEDFileFieldPerMeshPerTypePerDisc::incrementNbOfVals(mcIdType deltaNbVal)
 {
-  int nbi((_end-_start)/_nval);
+  mcIdType nbi((_end-_start)/_nval);
   _nval+=deltaNbVal;
   _end+=nbi*deltaNbVal;
 }
@@ -874,11 +879,11 @@ void MEDFileFieldPerMeshPerTypePerDisc::changeLocsRefsNamesGen(const std::vector
     }
 }
 
-void MEDFileFieldPerMeshPerTypePerDisc::getFieldAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const
+void MEDFileFieldPerMeshPerTypePerDisc::getFieldAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<const DataArrayIdType *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const
 {
   if(type!=_type)
     return ;
-  dads.push_back(std::pair<int,int>(_start,_end));
+  dads.push_back(std::pair<mcIdType,mcIdType>(_start,_end));
   geoTypes.push_back(getGeoType());
   if(_profile.empty())
     pfls.push_back(0);
@@ -894,9 +899,9 @@ void MEDFileFieldPerMeshPerTypePerDisc::getFieldAtLevel(TypeOfField type, const
     }
 }
 
-void MEDFileFieldPerMeshPerTypePerDisc::fillValues(int discId, int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+void MEDFileFieldPerMeshPerTypePerDisc::fillValues(int discId, mcIdType& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
-  entries[startEntryId]=std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int> ,std::pair<int,int> >(std::pair<INTERP_KERNEL::NormalizedCellType,int>(getGeoType(),discId),std::pair<int,int>(_start,_end));
+  entries[startEntryId]=std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,mcIdType> ,std::pair<mcIdType,mcIdType> >(std::pair<INTERP_KERNEL::NormalizedCellType,mcIdType>(getGeoType(),discId),std::pair<mcIdType,mcIdType>(_start,_end));
   startEntryId++;
 }
 
@@ -913,7 +918,7 @@ void MEDFileFieldPerMeshPerTypePerDisc::writeLL(med_idt fid, const MEDFileFieldN
   if(!arr->isAllocated())
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::writeLL : the array to be written is not allocated !");
   const DataArrayDouble *arrD(dynamic_cast<const DataArrayDouble *>(arr));
-  const DataArrayInt *arrI(dynamic_cast<const DataArrayInt *>(arr));
+  const DataArrayInt32 *arrI(dynamic_cast<const DataArrayInt32 *>(arr));
   const DataArrayFloat *arrF(dynamic_cast<const DataArrayFloat *>(arr));
   const unsigned char *locToWrite=0;
   if(arrD)
@@ -925,11 +930,11 @@ void MEDFileFieldPerMeshPerTypePerDisc::writeLL(med_idt fid, const MEDFileFieldN
   else
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::writeLL : not recognized type of values ! Supported are FLOAT64 FLOAT32 and INT32 !");
   MEDFILESAFECALLERWR0(MEDfieldValueWithProfileWr,(fid,nasc.getName().c_str(),getIteration(),getOrder(),getTime(),menti,mgeoti,
-                                                   MED_COMPACT_PFLMODE,_profile.c_str(),_localization.c_str(),MED_FULL_INTERLACE,MED_ALL_CONSTITUENT,_nval,
+                                                   MED_COMPACT_PFLMODE,_profile.c_str(),_localization.c_str(),MED_FULL_INTERLACE,MED_ALL_CONSTITUENT,ToMedInt(_nval),
                                                    locToWrite));
 }
 
-void MEDFileFieldPerMeshPerTypePerDisc::getCoarseData(TypeOfField& type, std::pair<int,int>& dad, std::string& pfl, std::string& loc) const
+void MEDFileFieldPerMeshPerTypePerDisc::getCoarseData(TypeOfField& type, std::pair<mcIdType,mcIdType>& dad, std::string& pfl, std::string& loc) const
 {
   type=_type;
   pfl=_profile;
@@ -943,9 +948,9 @@ void MEDFileFieldPerMeshPerTypePerDisc::getCoarseData(TypeOfField& type, std::pa
  * \param [out] ptToFill memory zone where the output will be stored.
  * \return the size of data pushed into output param \a ptToFill
  */
-int MEDFileFieldPerMeshPerTypePerDisc::fillEltIdsFromCode(int offset, const std::vector<int>& codeOfMesh, const MEDFileFieldGlobsReal& glob, int *ptToFill) const
+mcIdType MEDFileFieldPerMeshPerTypePerDisc::fillEltIdsFromCode(mcIdType offset, const std::vector<mcIdType>& codeOfMesh, const MEDFileFieldGlobsReal& glob, mcIdType *ptToFill) const
 {
-  _loc_id=offset;
+  _loc_id=FromIdType<int>(offset);
   std::ostringstream oss;
   std::size_t nbOfType=codeOfMesh.size()/3;
   int found=-1;
@@ -958,7 +963,7 @@ int MEDFileFieldPerMeshPerTypePerDisc::fillEltIdsFromCode(int offset, const std:
       oss << "MEDFileFieldPerMeshPerTypePerDisc::fillEltIdsFromCode : not found geometric type " << cm.getRepr() << " in the referenced mesh of field !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  int *work=ptToFill;
+  mcIdType *work=ptToFill;
   if(_profile.empty())
     {
       if(_nval!=codeOfMesh[3*found+1])
@@ -968,12 +973,12 @@ int MEDFileFieldPerMeshPerTypePerDisc::fillEltIdsFromCode(int offset, const std:
           oss << " whereas mesh has " << codeOfMesh[3*found+1] << " for this geometric type !";
           throw INTERP_KERNEL::Exception(oss.str());
         }
-      for(int ii=codeOfMesh[3*found+2];ii<codeOfMesh[3*found+2]+_nval;ii++)
+      for(mcIdType ii=codeOfMesh[3*found+2];ii<codeOfMesh[3*found+2]+_nval;ii++)
         *work++=ii;
     }
   else
     {
-      const DataArrayInt *pfl=glob.getProfile(_profile.c_str());
+      const DataArrayIdType *pfl=glob.getProfile(_profile.c_str());
       if(pfl->getNumberOfTuples()!=_nval)
         {
           const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(getGeoType());
@@ -982,8 +987,8 @@ int MEDFileFieldPerMeshPerTypePerDisc::fillEltIdsFromCode(int offset, const std:
           oss << pfl->getNumberOfTuples() << " whereas the number of ids is set to " << _nval << " for this geometric type !";
           throw INTERP_KERNEL::Exception(oss.str());
         }
-      int offset2=codeOfMesh[3*found+2];
-      for(const int *pflId=pfl->begin();pflId!=pfl->end();pflId++)
+      mcIdType offset2=codeOfMesh[3*found+2];
+      for(const mcIdType *pflId=pfl->begin();pflId!=pfl->end();pflId++)
         {
           if(*pflId<codeOfMesh[3*found+1])
             *work++=offset2+*pflId;
@@ -992,14 +997,14 @@ int MEDFileFieldPerMeshPerTypePerDisc::fillEltIdsFromCode(int offset, const std:
   return _nval;
 }
 
-int MEDFileFieldPerMeshPerTypePerDisc::fillTupleIds(int *ptToFill) const
+mcIdType MEDFileFieldPerMeshPerTypePerDisc::fillTupleIds(mcIdType *ptToFill) const
 {
-  for(int i=_start;i<_end;i++)
+  for(mcIdType i=_start;i<_end;i++)
     *ptToFill++=i;
   return _end-_start;
 }
 
-int MEDFileFieldPerMeshPerTypePerDisc::ConvertType(TypeOfField type, int locId)
+int MEDFileFieldPerMeshPerTypePerDisc::ConvertType(TypeOfField type, mcIdType locId)
 {
   switch(type)
   {
@@ -1008,7 +1013,7 @@ int MEDFileFieldPerMeshPerTypePerDisc::ConvertType(TypeOfField type, int locId)
     case ON_GAUSS_NE:
       return -1;
     case ON_GAUSS_PT:
-      return locId;
+      return FromIdType<int>(locId);
     default:
       throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::ConvertType : not managed type of field !");
   }
@@ -1040,61 +1045,61 @@ std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > MEDFileFi
  * \param [out] result All new entries will be appended on it.
  * \return false if the configuration of renumbering leads to an unnecessary resplit of input \a entriesOnSameDisc. If not true is returned (the most general case !)
  */
-bool MEDFileFieldPerMeshPerTypePerDisc::RenumberChunks(int offset, const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
-                                                       const DataArrayInt *explicitIdsInMesh,
-                                                       const std::vector<int>& newCode,
+bool MEDFileFieldPerMeshPerTypePerDisc::RenumberChunks(mcIdType offset, const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
+                                                       const DataArrayIdType *explicitIdsInMesh,
+                                                       const std::vector<mcIdType>& newCode,
                                                        MEDFileFieldGlobsReal& glob, DataArrayDouble *arr,
                                                        std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> >& result)
 {
   if(entriesOnSameDisc.empty())
     return false;
   TypeOfField type=entriesOnSameDisc[0]->getType();
-  int szEntities=0,szTuples=0;
+  mcIdType szEntities=0,szTuples=0;
   for(std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>::const_iterator it=entriesOnSameDisc.begin();it!=entriesOnSameDisc.end();it++)
     { szEntities+=(*it)->_nval; szTuples+=(*it)->_end-(*it)->_start; }
-  int nbi=szTuples/szEntities;
+  mcIdType nbi=szTuples/szEntities;
   if(szTuples%szEntities!=0)
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::RenumberChunks : internal error the splitting into same dicretization failed !");
-  MCAuto<DataArrayInt> renumTuples=DataArrayInt::New(); renumTuples->alloc(szTuples,1);
-  MCAuto<DataArrayInt> ranges=MEDCouplingUMesh::ComputeRangesFromTypeDistribution(newCode);
-  std::vector< MCAuto<DataArrayInt> > newGeoTypesPerChunk(entriesOnSameDisc.size());
-  std::vector< const DataArrayInt * > newGeoTypesPerChunk2(entriesOnSameDisc.size());
-  std::vector< MCAuto<DataArrayInt> > newGeoTypesPerChunk_bis(entriesOnSameDisc.size());
-  std::vector< const DataArrayInt * > newGeoTypesPerChunk3(entriesOnSameDisc.size());
-  MCAuto<DataArrayInt> newGeoTypesPerChunk4=DataArrayInt::New(); newGeoTypesPerChunk4->alloc(szEntities,nbi);
+  MCAuto<DataArrayIdType> renumTuples=DataArrayIdType::New(); renumTuples->alloc(szTuples,1);
+  MCAuto<DataArrayIdType> ranges=MEDCouplingUMesh::ComputeRangesFromTypeDistribution(newCode);
+  std::vector< MCAuto<DataArrayIdType> > newGeoTypesPerChunk(entriesOnSameDisc.size());
+  std::vector< const DataArrayIdType * > newGeoTypesPerChunk2(entriesOnSameDisc.size());
+  std::vector< MCAuto<DataArrayIdType> > newGeoTypesPerChunk_bis(entriesOnSameDisc.size());
+  std::vector< const DataArrayIdType * > newGeoTypesPerChunk3(entriesOnSameDisc.size());
+  MCAuto<DataArrayIdType> newGeoTypesPerChunk4=DataArrayIdType::New(); newGeoTypesPerChunk4->alloc(szEntities,nbi);
   int id=0;
   for(std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>::const_iterator it=entriesOnSameDisc.begin();it!=entriesOnSameDisc.end();it++,id++)
     {
-      int startOfEltIdOfChunk=(*it)->_start;
-      MCAuto<DataArrayInt> newEltIds=explicitIdsInMesh->subArray(startOfEltIdOfChunk,startOfEltIdOfChunk+(*it)->_nval);
-      MCAuto<DataArrayInt> rangeIdsForChunk=newEltIds->findRangeIdForEachTuple(ranges);
-      MCAuto<DataArrayInt> idsInRrangeForChunk=newEltIds->findIdInRangeForEachTuple(ranges);
+      mcIdType startOfEltIdOfChunk=(*it)->_start;
+      MCAuto<DataArrayIdType> newEltIds=explicitIdsInMesh->subArray(startOfEltIdOfChunk,startOfEltIdOfChunk+(*it)->_nval);
+      MCAuto<DataArrayIdType> rangeIdsForChunk=newEltIds->findRangeIdForEachTuple(ranges);
+      MCAuto<DataArrayIdType> idsInRrangeForChunk=newEltIds->findIdInRangeForEachTuple(ranges);
       //
-      MCAuto<DataArrayInt> tmp=rangeIdsForChunk->duplicateEachTupleNTimes(nbi); rangeIdsForChunk->rearrange(nbi);
+      MCAuto<DataArrayIdType> tmp=rangeIdsForChunk->duplicateEachTupleNTimes(nbi); rangeIdsForChunk->rearrange(nbi);
       newGeoTypesPerChunk4->setPartOfValues1(tmp,(*it)->_tmp_work1-offset,(*it)->_tmp_work1+(*it)->_nval*nbi-offset,1,0,nbi,1);
       //
       newGeoTypesPerChunk[id]=rangeIdsForChunk; newGeoTypesPerChunk2[id]=rangeIdsForChunk;
       newGeoTypesPerChunk_bis[id]=idsInRrangeForChunk; newGeoTypesPerChunk3[id]=idsInRrangeForChunk;
     }
-  MCAuto<DataArrayInt> newGeoTypesEltIdsAllGather=DataArrayInt::Aggregate(newGeoTypesPerChunk2); newGeoTypesPerChunk.clear(); newGeoTypesPerChunk2.clear();
-  MCAuto<DataArrayInt> newGeoTypesEltIdsAllGather2=DataArrayInt::Aggregate(newGeoTypesPerChunk3); newGeoTypesPerChunk_bis.clear(); newGeoTypesPerChunk3.clear();
-  MCAuto<DataArrayInt> diffVals=newGeoTypesEltIdsAllGather->getDifferentValues();
-  MCAuto<DataArrayInt> renumEltIds=newGeoTypesEltIdsAllGather->buildPermArrPerLevel();
+  MCAuto<DataArrayIdType> newGeoTypesEltIdsAllGather=DataArrayIdType::Aggregate(newGeoTypesPerChunk2); newGeoTypesPerChunk.clear(); newGeoTypesPerChunk2.clear();
+  MCAuto<DataArrayIdType> newGeoTypesEltIdsAllGather2=DataArrayIdType::Aggregate(newGeoTypesPerChunk3); newGeoTypesPerChunk_bis.clear(); newGeoTypesPerChunk3.clear();
+  MCAuto<DataArrayIdType> diffVals=newGeoTypesEltIdsAllGather->getDifferentValues();
+  MCAuto<DataArrayIdType> renumEltIds=newGeoTypesEltIdsAllGather->buildPermArrPerLevel();
   //
-  MCAuto<DataArrayInt> renumTupleIds=newGeoTypesPerChunk4->buildPermArrPerLevel();
+  MCAuto<DataArrayIdType> renumTupleIds=newGeoTypesPerChunk4->buildPermArrPerLevel();
   //
   MCAuto<DataArrayDouble> arrPart=arr->subArray(offset,offset+szTuples);
   arrPart->renumberInPlace(renumTupleIds->begin());
-  arr->setPartOfValues1(arrPart,offset,offset+szTuples,1,0,arrPart->getNumberOfComponents(),1);
+  arr->setPartOfValues1(arrPart,offset,offset+szTuples,1,0,ToIdType(arrPart->getNumberOfComponents()),1);
   bool ret=false;
-  const int *idIt=diffVals->begin();
+  const mcIdType *idIt=diffVals->begin();
   std::list<const MEDFileFieldPerMeshPerTypePerDisc *> li(entriesOnSameDisc.begin(),entriesOnSameDisc.end());
-  int offset2=0;
-  for(int i=0;i<diffVals->getNumberOfTuples();i++,idIt++)
+  mcIdType offset2=0;
+  for(mcIdType i=0;i<diffVals->getNumberOfTuples();i++,idIt++)
     {
-      MCAuto<DataArrayInt> ids=newGeoTypesEltIdsAllGather->findIdsEqual(*idIt);
-      MCAuto<DataArrayInt> subIds=newGeoTypesEltIdsAllGather2->selectByTupleId(ids->begin(),ids->end());
-      int nbEntityElts=subIds->getNumberOfTuples();
+      MCAuto<DataArrayIdType> ids=newGeoTypesEltIdsAllGather->findIdsEqual(*idIt);
+      MCAuto<DataArrayIdType> subIds=newGeoTypesEltIdsAllGather2->selectByTupleId(ids->begin(),ids->end());
+      mcIdType nbEntityElts=subIds->getNumberOfTuples();
       bool ret2;
       MCAuto<MEDFileFieldPerMeshPerTypePerDisc> eltToAdd=MEDFileFieldPerMeshPerTypePerDisc::
           NewObjectOnSameDiscThanPool(type,(INTERP_KERNEL::NormalizedCellType)newCode[3*(*idIt)],subIds,!subIds->isIota(newCode[3*(*idIt)+1]),nbi,
@@ -1122,13 +1127,13 @@ bool MEDFileFieldPerMeshPerTypePerDisc::RenumberChunks(int offset, const std::ve
  *              and corresponding entry erased from \a entriesOnSameDisc.
  * \return a newly allocated chunk
  */
-MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayInt *idsOfMeshElt,
-                                                                                                  bool isPfl, int nbi, int offset,
+MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayIdType *idsOfMeshElt,
+                                                                                                  bool isPfl, mcIdType nbi, mcIdType offset,
                                                                                                   std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
                                                                                                   MEDFileFieldGlobsReal& glob,
                                                                                                   bool &notInExisting)
 {
-  int nbMeshEntities=idsOfMeshElt->getNumberOfTuples();
+  mcIdType nbMeshEntities=idsOfMeshElt->getNumberOfTuples();
   std::list< const MEDFileFieldPerMeshPerTypePerDisc *>::iterator it=entriesOnSameDisc.begin();
   for(;it!=entriesOnSameDisc.end();it++)
     {
@@ -1141,7 +1146,7 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::NewObjectO
               else
                 if(!(*it)->_profile.empty())
                   {
-                    const DataArrayInt *pfl=glob.getProfile((*it)->_profile.c_str());
+                    const DataArrayIdType *pfl=glob.getProfile((*it)->_profile.c_str());
                     if(pfl->isEqualWithoutConsideringStr(*idsOfMeshElt))
                       break;
                   }
@@ -1221,10 +1226,10 @@ std::vector<const BigMemoryObject *> MEDFileFieldPerMeshPerTypeCommon::getDirect
   return ret;
 }
 
-void MEDFileFieldPerMeshPerTypeCommon::assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMeshPerTypeCommon::assignFieldNoProfile(mcIdType& start, mcIdType offset, mcIdType nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
-  std::vector<int> pos=addNewEntryIfNecessary(field,offset,nbOfCells);
-  for(std::vector<int>::const_iterator it=pos.begin();it!=pos.end();it++)
+  std::vector<mcIdType> pos=addNewEntryIfNecessary(field,offset,nbOfCells);
+  for(std::vector<mcIdType>::const_iterator it=pos.begin();it!=pos.end();it++)
     _field_pm_pt_pd[*it]->assignFieldNoProfile(start,offset,nbOfCells,field,arr,glob,nasc);
 }
 
@@ -1237,23 +1242,23 @@ void MEDFileFieldPerMeshPerTypeCommon::assignFieldNoProfile(int& start, int offs
  * \param [in] nbOfEltsInWholeMesh nb of elts of type \a this->_geo_type in \b WHOLE mesh
  * \param [in] mesh is the mesh coming from the MEDFileMesh instance in correspondence with the MEDFileField. The mesh inside the \a field is simply ignored.
  */
-void MEDFileFieldPerMeshPerTypeCommon::assignFieldProfile(bool isPflAlone, int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMeshPerTypeCommon::assignFieldProfile(bool isPflAlone, mcIdType& start, const DataArrayIdType *multiTypePfl, const DataArrayIdType *idsInPfl, DataArrayIdType *locIds, mcIdType nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
-  std::vector<int> pos=addNewEntryIfNecessary(field,idsInPfl);
-  for(std::vector<int>::const_iterator it=pos.begin();it!=pos.end();it++)
+  std::vector<mcIdType> pos=addNewEntryIfNecessary(field,idsInPfl);
+  for(std::vector<mcIdType>::const_iterator it=pos.begin();it!=pos.end();it++)
     _field_pm_pt_pd[*it]->assignFieldProfile(isPflAlone,start,multiTypePfl,idsInPfl,locIds,nbOfEltsInWholeMesh,field,arr,mesh,glob,nasc);
 }
 
-void MEDFileFieldPerMeshPerTypeCommon::assignNodeFieldNoProfile(int& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob)
+void MEDFileFieldPerMeshPerTypeCommon::assignNodeFieldNoProfile(mcIdType& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob)
 {
   _field_pm_pt_pd.resize(1);
   _field_pm_pt_pd[0]=MEDFileFieldPerMeshPerTypePerDisc::New(this,ON_NODES,-3);
   _field_pm_pt_pd[0]->assignNodeFieldNoProfile(start,field,arr,glob);
 }
 
-void MEDFileFieldPerMeshPerTypeCommon::assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMeshPerTypeCommon::assignNodeFieldProfile(mcIdType& start, const DataArrayIdType *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
-  MCAuto<DataArrayInt> pfl2=pfl->deepCopy();
+  MCAuto<DataArrayIdType> pfl2=pfl->deepCopy();
   if(!arr || !arr->isAllocated())
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypeCommon::assignNodeFieldProfile : input array is null, or not allocated !");
   _field_pm_pt_pd.resize(1);
@@ -1261,15 +1266,15 @@ void MEDFileFieldPerMeshPerTypeCommon::assignNodeFieldProfile(int& start, const
   _field_pm_pt_pd[0]->assignFieldProfile(true,start,pfl,pfl2,pfl2,-1,field,arr,0,glob,nasc);//mesh is not requested so 0 is send.
 }
 
-std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, int offset, int nbOfCells)
+std::vector<mcIdType> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, mcIdType offset, mcIdType nbOfCells)
 {
   TypeOfField type=field->getTypeOfField();
   if(type!=ON_GAUSS_PT)
     {
       int locIdToFind=MEDFileFieldPerMeshPerTypePerDisc::ConvertType(type,0);
-      int sz=_field_pm_pt_pd.size();
+      std::size_t sz=_field_pm_pt_pd.size();
       bool found=false;
-      for(int j=0;j<sz && !found;j++)
+      for(std::size_t j=0;j<sz && !found;j++)
         {
           if(_field_pm_pt_pd[j]->getLocId()==locIdToFind)
             {
@@ -1282,25 +1287,25 @@ std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const
           _field_pm_pt_pd.resize(sz+1);
           _field_pm_pt_pd[sz]=MEDFileFieldPerMeshPerTypePerDisc::New(this,type,locIdToFind);
         }
-      std::vector<int> ret(1,(int)sz);
+      std::vector<mcIdType> ret(1,(mcIdType)sz);
       return ret;
     }
   else
     {
-      std::vector<int> ret2=addNewEntryIfNecessaryGauss(field,offset,nbOfCells);
-      int sz2=ret2.size();
-      std::vector<int> ret3(sz2);
-      int k=0;
-      for(int i=0;i<sz2;i++)
+      std::vector<mcIdType> ret2=addNewEntryIfNecessaryGauss(field,offset,nbOfCells);
+      std::size_t sz2=ret2.size();
+      std::vector<mcIdType> ret3(sz2);
+      mcIdType k=0;
+      for(std::size_t i=0;i<sz2;i++)
         {
-          int sz=_field_pm_pt_pd.size();
-          int locIdToFind=ret2[i];
+          mcIdType sz=ToIdType(_field_pm_pt_pd.size());
+          mcIdType locIdToFind=ret2[i];
           bool found=false;
-          for(int j=0;j<sz && !found;j++)
+          for(mcIdType j=0;j<sz && !found;j++)
             {
               if(_field_pm_pt_pd[j]->getLocId()==locIdToFind)
                 {
-                  _field_pm_pt_pd[j]=MEDFileFieldPerMeshPerTypePerDisc::New(this,type,locIdToFind);
+                  _field_pm_pt_pd[j]=MEDFileFieldPerMeshPerTypePerDisc::New(this,type,FromIdType<int>(locIdToFind));
                   ret3[k++]=j;
                   found=true;
                 }
@@ -1308,7 +1313,7 @@ std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const
           if(!found)
             {
               _field_pm_pt_pd.resize(sz+1);
-              _field_pm_pt_pd[sz]=MEDFileFieldPerMeshPerTypePerDisc::New(this,type,locIdToFind);
+              _field_pm_pt_pd[sz]=MEDFileFieldPerMeshPerTypePerDisc::New(this,type,FromIdType<int>(locIdToFind));
               ret3[k++]=sz;
             }
         }
@@ -1316,32 +1321,32 @@ std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const
     }
 }
 
-std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, int offset, int nbOfCells)
+std::vector<mcIdType> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, mcIdType offset, mcIdType nbOfCells)
 {
   const MEDCouplingFieldDiscretization *disc=field->getDiscretization();
   const MEDCouplingFieldDiscretizationGauss *disc2=dynamic_cast<const MEDCouplingFieldDiscretizationGauss *>(disc);
   if(!disc2)
     throw INTERP_KERNEL::Exception("addNewEntryIfNecessaryGauss : invalid call to this method ! Internal Error !");
-  const DataArrayInt *da=disc2->getArrayOfDiscIds();
+  const DataArrayIdType *da=disc2->getArrayOfDiscIds();
   if(!da)
     throw INTERP_KERNEL::Exception("addNewEntryIfNecessaryGauss (no profile) : no localization ids per cell array available ! The input Gauss node field is maybe invalid !");
-  MCAuto<DataArrayInt> da2=da->selectByTupleIdSafeSlice(offset,offset+nbOfCells,1);
-  MCAuto<DataArrayInt> retTmp=da2->getDifferentValues();
+  MCAuto<DataArrayIdType> da2=da->selectByTupleIdSafeSlice(offset,offset+nbOfCells,1);
+  MCAuto<DataArrayIdType> retTmp=da2->getDifferentValues();
   if(retTmp->presenceOfValue(-1))
     throw INTERP_KERNEL::Exception("addNewEntryIfNecessaryGauss : some cells have no dicretization description !");
-  std::vector<int> ret(retTmp->begin(),retTmp->end());
+  std::vector<mcIdType> ret(retTmp->begin(),retTmp->end());
   return ret;
 }
 
-std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, const DataArrayInt *subCells)
+std::vector<mcIdType> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, const DataArrayIdType *subCells)
 {
   TypeOfField type=field->getTypeOfField();
   if(type!=ON_GAUSS_PT)
     {
       int locIdToFind=MEDFileFieldPerMeshPerTypePerDisc::ConvertType(type,0);
-      int sz=_field_pm_pt_pd.size();
+      std::size_t sz=_field_pm_pt_pd.size();
       bool found=false;
-      for(int j=0;j<sz && !found;j++)
+      for(std::size_t j=0;j<sz && !found;j++)
         {
           if(_field_pm_pt_pd[j]->getLocId()==locIdToFind)
             {
@@ -1354,21 +1359,21 @@ std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const
           _field_pm_pt_pd.resize(sz+1);
           _field_pm_pt_pd[sz]=MEDFileFieldPerMeshPerTypePerDisc::New(this,type,locIdToFind);
         }
-      std::vector<int> ret(1,0);
+      std::vector<mcIdType> ret(1,0);
       return ret;
     }
   else
     {
-      std::vector<int> ret2=addNewEntryIfNecessaryGauss(field,subCells);
-      int sz2=ret2.size();
-      std::vector<int> ret3(sz2);
-      int k=0;
-      for(int i=0;i<sz2;i++)
+      std::vector<mcIdType> ret2=addNewEntryIfNecessaryGauss(field,subCells);
+      std::size_t sz2=ret2.size();
+      std::vector<mcIdType> ret3(sz2);
+      mcIdType k=0;
+      for(std::size_t i=0;i<sz2;i++)
         {
-          int sz=_field_pm_pt_pd.size();
-          int locIdToFind=ret2[i];
+          mcIdType sz=ToIdType(_field_pm_pt_pd.size());
+          mcIdType locIdToFind=ret2[i];
           bool found=false;
-          for(int j=0;j<sz && !found;j++)
+          for(mcIdType j=0;j<sz && !found;j++)
             {
               if(_field_pm_pt_pd[j]->getLocId()==locIdToFind)
                 {
@@ -1388,20 +1393,20 @@ std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessary(const
     }
 }
 
-std::vector<int> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, const DataArrayInt *subCells)
+std::vector<mcIdType> MEDFileFieldPerMeshPerTypeCommon::addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, const DataArrayIdType *subCells)
 {
   const MEDCouplingFieldDiscretization *disc=field->getDiscretization();
   const MEDCouplingFieldDiscretizationGauss *disc2=dynamic_cast<const MEDCouplingFieldDiscretizationGauss *>(disc);
   if(!disc2)
     throw INTERP_KERNEL::Exception("addNewEntryIfNecessaryGauss : invalid call to this method ! Internal Error !");
-  const DataArrayInt *da=disc2->getArrayOfDiscIds();
+  const DataArrayIdType *da=disc2->getArrayOfDiscIds();
   if(!da)
     throw INTERP_KERNEL::Exception("addNewEntryIfNecessaryGauss : no localization ids per cell array available ! The input Gauss node field is maybe invalid !");
-  MCAuto<DataArrayInt> da2=da->selectByTupleIdSafe(subCells->getConstPointer(),subCells->getConstPointer()+subCells->getNumberOfTuples());
-  MCAuto<DataArrayInt> retTmp=da2->getDifferentValues();
+  MCAuto<DataArrayIdType> da2=da->selectByTupleIdSafe(subCells->getConstPointer(),subCells->getConstPointer()+subCells->getNumberOfTuples());
+  MCAuto<DataArrayIdType> retTmp=da2->getDifferentValues();
   if(retTmp->presenceOfValue(-1))
     throw INTERP_KERNEL::Exception("addNewEntryIfNecessaryGauss : some cells have no dicretization description !");
-  std::vector<int> ret(retTmp->begin(),retTmp->end());
+  std::vector<mcIdType> ret(retTmp->begin(),retTmp->end());
   return ret;
 }
 
@@ -1432,11 +1437,11 @@ void MEDFileFieldPerMeshPerTypeCommon::fillTypesOfFieldAvailable(std::set<TypeOf
     }
 }
 
-void MEDFileFieldPerMeshPerTypeCommon::fillFieldSplitedByType(std::vector< std::pair<int,int> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const
+void MEDFileFieldPerMeshPerTypeCommon::fillFieldSplitedByType(std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const
 {
-  int sz=_field_pm_pt_pd.size();
+  std::size_t sz=_field_pm_pt_pd.size();
   dads.resize(sz); types.resize(sz); pfls.resize(sz); locs.resize(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     {
       _field_pm_pt_pd[i]->getCoarseData(types[i],dads[i],pfls[i],locs[i]);
     }
@@ -1462,16 +1467,16 @@ std::string MEDFileFieldPerMeshPerTypeCommon::getMeshName() const
   return _father->getMeshName();
 }
 
-void MEDFileFieldPerMeshPerTypeCommon::getSizes(int& globalSz, int& nbOfEntries) const
+void MEDFileFieldPerMeshPerTypeCommon::getSizes(mcIdType& globalSz, mcIdType& nbOfEntries) const
 {
   for(std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> >::const_iterator it=_field_pm_pt_pd.begin();it!=_field_pm_pt_pd.end();it++)
     {
       globalSz+=(*it)->getNumberOfTuples();
     }
-  nbOfEntries+=(int)_field_pm_pt_pd.size();
+  nbOfEntries+=(mcIdType)_field_pm_pt_pd.size();
 }
 
-int MEDFileFieldPerMeshPerTypeCommon::getNumberOfComponents() const
+std::size_t MEDFileFieldPerMeshPerTypeCommon::getNumberOfComponents() const
 {
   return _father->getNumberOfComponents();
 }
@@ -1582,14 +1587,14 @@ void MEDFileFieldPerMeshPerTypeCommon::changeLocsRefsNamesGen(const std::vector<
     (*it1)->changeLocsRefsNamesGen(mapOfModif);
 }
 
-MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId(int locId)
+MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId(mcIdType locId)
 {
   if(_field_pm_pt_pd.empty())
     {
       std::ostringstream oss; oss << "MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId : no localizations for geotype \"" << getGeoTypeRepr() << "\" !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  if(locId>=0 && locId<(int)_field_pm_pt_pd.size())
+  if(locId>=0 && locId<ToIdType(_field_pm_pt_pd.size()))
     return _field_pm_pt_pd[locId];
   std::ostringstream oss2; oss2 << "MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId : no such locId available (" << locId;
   oss2 << ") for geometric type \"" << getGeoTypeRepr() << "\" It should be in [0," << _field_pm_pt_pd.size() << ") !";
@@ -1597,14 +1602,14 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypeCommon::getLeafGive
   return static_cast<MEDFileFieldPerMeshPerTypePerDisc*>(0);
 }
 
-const MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId(int locId) const
+const MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId(mcIdType locId) const
 {
   if(_field_pm_pt_pd.empty())
     {
       std::ostringstream oss; oss << "MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId : no localizations for geotype \"" << getGeoTypeRepr() << "\" !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  if(locId>=0 && locId<(int)_field_pm_pt_pd.size())
+  if(locId>=0 && locId<ToIdType(_field_pm_pt_pd.size()))
     return _field_pm_pt_pd[locId];
   std::ostringstream oss2; oss2 << "MEDFileFieldPerMeshPerTypeCommon::getLeafGivenLocId : no such locId available (" << locId;
   oss2 << ") for geometric type \"" << getGeoTypeRepr() << "\" It should be in [0," << _field_pm_pt_pd.size() << ") !";
@@ -1624,7 +1629,7 @@ int MEDFileFieldPerMeshPerTypeCommon::locIdOfLeaf(const MEDFileFieldPerMeshPerTy
   throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypeCommon::locIdOfLeaf : not found such a leaf in this !");
 }
 
-void MEDFileFieldPerMeshPerTypeCommon::fillValues(int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+void MEDFileFieldPerMeshPerTypeCommon::fillValues(mcIdType& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
   int i=0;
   for(std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> >::const_iterator it=_field_pm_pt_pd.begin();it!=_field_pm_pt_pd.end();it++,i++)
@@ -1645,7 +1650,7 @@ void MEDFileFieldPerMeshPerTypeCommon::setLeaves(const std::vector< MCAuto< MEDF
  *  \param [out] its - list of pair (start,stop) kept
  *  \return bool - false if the type of field \a tof is not contained in \a this.
  */
-bool MEDFileFieldPerMeshPerTypeCommon::keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its)
+bool MEDFileFieldPerMeshPerTypeCommon::keepOnlySpatialDiscretization(TypeOfField tof, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its)
 {
   bool ret(false);
   std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> > newPmPtPd;
@@ -1653,7 +1658,7 @@ bool MEDFileFieldPerMeshPerTypeCommon::keepOnlySpatialDiscretization(TypeOfField
     if((*it)->getType()==tof)
       {
         newPmPtPd.push_back(*it);
-        std::pair<int,int> bgEnd; bgEnd.first=(*it)->getStart(); bgEnd.second=(*it)->getEnd();
+        std::pair<mcIdType,mcIdType> bgEnd; bgEnd.first=(*it)->getStart(); bgEnd.second=(*it)->getEnd();
         (*it)->setNewStart(globalNum);
         globalNum=(*it)->getEnd();
         its.push_back(bgEnd);
@@ -1669,13 +1674,13 @@ bool MEDFileFieldPerMeshPerTypeCommon::keepOnlySpatialDiscretization(TypeOfField
  *  \param [out] its - list of pair (start,stop) kept
  *  \return bool - false if the type of field \a tof is not contained in \a this.
  */
-bool MEDFileFieldPerMeshPerTypeCommon::keepOnlyGaussDiscretization(std::size_t idOfDisc, int &globalNum, std::vector< std::pair<int,int> >& its)
+bool MEDFileFieldPerMeshPerTypeCommon::keepOnlyGaussDiscretization(std::size_t idOfDisc, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its)
 {
   if(_field_pm_pt_pd.size()<=idOfDisc)
     return false;
   MCAuto<MEDFileFieldPerMeshPerTypePerDisc> elt(_field_pm_pt_pd[idOfDisc]);
   std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> > newPmPtPd(1,elt);
-  std::pair<int,int> bgEnd; bgEnd.first=_field_pm_pt_pd[idOfDisc]->getStart(); bgEnd.second=_field_pm_pt_pd[idOfDisc]->getEnd();
+  std::pair<mcIdType,mcIdType> bgEnd; bgEnd.first=_field_pm_pt_pd[idOfDisc]->getStart(); bgEnd.second=_field_pm_pt_pd[idOfDisc]->getEnd();
   elt->setNewStart(globalNum);
   globalNum=elt->getEnd();
   its.push_back(bgEnd);
@@ -1683,7 +1688,7 @@ bool MEDFileFieldPerMeshPerTypeCommon::keepOnlyGaussDiscretization(std::size_t i
   return true;
 }
 
-void MEDFileFieldPerMeshPerTypeCommon::loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMeshPerTypeCommon::loadOnlyStructureOfDataRecursively(med_idt fid, mcIdType &start, const MEDFileFieldNameScope& nasc)
 {
   for(std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> >::iterator it=_field_pm_pt_pd.begin();it!=_field_pm_pt_pd.end();it++)
     (*it)->loadOnlyStructureOfDataRecursively(fid,start,nasc);
@@ -1746,7 +1751,7 @@ MEDFileFieldPerMeshPerType *MEDFileFieldPerMeshPerType::deepCopy(MEDFileFieldPer
   return ret.retn();
 }
 
-void MEDFileFieldPerMeshPerType::getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const
+void MEDFileFieldPerMeshPerType::getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<const DataArrayIdType *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const
 {
   if(_geo_type!=INTERP_KERNEL::NORM_ERROR)
     {
@@ -1818,7 +1823,7 @@ MEDFileFieldPerMeshPerType::MEDFileFieldPerMeshPerType(med_idt fid, MEDFileField
   INTERP_KERNEL::AutoPtr<char> locName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
   med_geometry_type mgeoti;
   med_entity_type menti(ConvertIntoMEDFileType(type,geoType,mgeoti));
-  int nbProfiles(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),menti,mgeoti,pflName,locName));
+  med_int nbProfiles(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),menti,mgeoti,pflName,locName));
   _field_pm_pt_pd.resize(nbProfiles);
   for(int i=0;i<nbProfiles;i++)
     {
@@ -1826,7 +1831,7 @@ MEDFileFieldPerMeshPerType::MEDFileFieldPerMeshPerType(med_idt fid, MEDFileField
     }
   if(type==ON_CELLS)
     {
-      int nbProfiles2(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_NODE_ELEMENT,mgeoti,pflName,locName));
+      med_int nbProfiles2(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_NODE_ELEMENT,mgeoti,pflName,locName));
       for(int i=0;i<nbProfiles2;i++)
         _field_pm_pt_pd.push_back(MEDFileFieldPerMeshPerTypePerDisc::NewOnRead(this,ON_GAUSS_NE,i,pd));
     }
@@ -1834,8 +1839,8 @@ MEDFileFieldPerMeshPerType::MEDFileFieldPerMeshPerType(med_idt fid, MEDFileField
     return ;
   // dark side of the force.
   {
-    int nbProfiles1(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_FACE,mgeoti,pflName,locName));
-    int nbProfiles2(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_EDGE,mgeoti,pflName,locName));
+    med_int nbProfiles1(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_FACE,mgeoti,pflName,locName));
+    med_int nbProfiles2(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_EDGE,mgeoti,pflName,locName));
     if(nbProfiles1==0 && nbProfiles2==0)
       return ;// OK definitely nothing in field
     menti=nbProfiles1>=nbProfiles2?MED_DESCENDING_FACE:MED_DESCENDING_EDGE;//not enough words to describe the beauty
@@ -1846,7 +1851,7 @@ MEDFileFieldPerMeshPerType::MEDFileFieldPerMeshPerType(med_idt fid, MEDFileField
   }
 }
 
-MCAuto<MEDFileFieldPerMeshPerType> MEDFileFieldPerMeshPerType::Aggregate(int &start, const std::vector<std::pair<int,const MEDFileFieldPerMeshPerType *> >& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, INTERP_KERNEL::NormalizedCellType gt, MEDFileFieldPerMesh *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo)
+MCAuto<MEDFileFieldPerMeshPerType> MEDFileFieldPerMeshPerType::Aggregate(mcIdType &start, const std::vector<std::pair<int,const MEDFileFieldPerMeshPerType *> >& pms, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts, INTERP_KERNEL::NormalizedCellType gt, MEDFileFieldPerMesh *father, std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > >& extractInfo)
 {
   MCAuto<MEDFileFieldPerMeshPerType> ret(MEDFileFieldPerMeshPerType::New(father,gt));
   std::map<TypeOfField, std::vector< std::pair<int,const MEDFileFieldPerMeshPerTypePerDisc * > > > m;
@@ -1881,7 +1886,7 @@ MEDFileFieldPerMeshPerTypeDyn::MEDFileFieldPerMeshPerTypeDyn(med_idt fid, MEDFil
   _se.takeRef(se);
   INTERP_KERNEL::AutoPtr<char> pflName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
   INTERP_KERNEL::AutoPtr<char> locName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
-  int nbProfiles(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_STRUCT_ELEMENT,_se->getDynGT(),pflName,locName));
+  med_int nbProfiles(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_STRUCT_ELEMENT,_se->getDynGT(),pflName,locName));
   _field_pm_pt_pd.resize(nbProfiles);
   for(int i=0;i<nbProfiles;i++)
     {
@@ -1948,7 +1953,7 @@ MEDFileFieldPerMeshPerTypeDyn *MEDFileFieldPerMeshPerTypeDyn::deepCopy(MEDFileFi
   return ret.retn();
 }
 
-void MEDFileFieldPerMeshPerTypeDyn::getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const
+void MEDFileFieldPerMeshPerTypeDyn::getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<const DataArrayIdType *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const
 {
   throw INTERP_KERNEL::Exception("not implemented yet !");
 }
@@ -2013,15 +2018,15 @@ void MEDFileFieldPerMesh::copyTinyInfoFrom(const MEDCouplingMesh *mesh)
   mesh->getTime(_mesh_iteration,_mesh_order);
 }
 
-void MEDFileFieldPerMesh::assignFieldNoProfileNoRenum(int& start, const std::vector<int>& code, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMesh::assignFieldNoProfileNoRenum(mcIdType& start, const std::vector<mcIdType>& code, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
-  int nbOfTypes=code.size()/3;
-  int offset=0;
-  for(int i=0;i<nbOfTypes;i++)
+  std::size_t nbOfTypes=code.size()/3;
+  mcIdType offset=0;
+  for(std::size_t i=0;i<nbOfTypes;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)code[3*i];
-      int nbOfCells=code[3*i+1];
-      int pos=addNewEntryIfNecessary(type);
+      mcIdType nbOfCells=code[3*i+1];
+      mcIdType pos=addNewEntryIfNecessary(type);
       _field_pm_pt[pos]->assignFieldNoProfile(start,offset,nbOfCells,field,arr,glob,nasc);
       offset+=nbOfCells;
     }
@@ -2036,18 +2041,18 @@ void MEDFileFieldPerMesh::assignFieldNoProfileNoRenum(int& start, const std::vec
  * \param [in] idsPerType is a vector containing the profiles needed to be created for MED file format. \b WARNING these processed MED file profiles can be subdivided again in case of Gauss points.
  * \param [in] mesh is the mesh coming from the MEDFileMesh instance in correspondence with the MEDFileField. The mesh inside the \a field is simply ignored.
  */
-void MEDFileFieldPerMesh::assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const std::vector<int>& code, const std::vector<int>& code2, const std::vector<DataArrayInt *>& idsInPflPerType, const std::vector<DataArrayInt *>& idsPerType, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMesh::assignFieldProfile(mcIdType& start, const DataArrayIdType *multiTypePfl, const std::vector<mcIdType>& code, const std::vector<mcIdType>& code2, const std::vector<DataArrayIdType *>& idsInPflPerType, const std::vector<DataArrayIdType *>& idsPerType, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
-  int nbOfTypes(code.size()/3);
-  for(int i=0;i<nbOfTypes;i++)
+  std::size_t nbOfTypes(code.size()/3);
+  for(std::size_t i=0;i<nbOfTypes;i++)
     {
       INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)code[3*i];
-      int pos=addNewEntryIfNecessary(type);
-      DataArrayInt *pfl=0;
+      mcIdType pos=addNewEntryIfNecessary(type);
+      DataArrayIdType *pfl=0;
       if(code[3*i+2]!=-1)
         pfl=idsPerType[code[3*i+2]];
-      int nbOfTupes2=code2.size()/3;
-      int found=0;
+      std::size_t nbOfTupes2=code2.size()/3;
+      std::size_t found=0;
       for(;found<nbOfTupes2;found++)
         if(code[3*i]==code2[3*found])
           break;
@@ -2057,19 +2062,19 @@ void MEDFileFieldPerMesh::assignFieldProfile(int& start, const DataArrayInt *mul
     }
 }
 
-void MEDFileFieldPerMesh::assignNodeFieldNoProfile(int& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob)
+void MEDFileFieldPerMesh::assignNodeFieldNoProfile(mcIdType& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob)
 {
-  int pos=addNewEntryIfNecessary(INTERP_KERNEL::NORM_ERROR);
+  mcIdType pos=addNewEntryIfNecessary(INTERP_KERNEL::NORM_ERROR);
   _field_pm_pt[pos]->assignNodeFieldNoProfile(start,field,arr,glob);
 }
 
-void MEDFileFieldPerMesh::assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMesh::assignNodeFieldProfile(mcIdType& start, const DataArrayIdType *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc)
 {
-  int pos=addNewEntryIfNecessary(INTERP_KERNEL::NORM_ERROR);
+  mcIdType pos=addNewEntryIfNecessary(INTERP_KERNEL::NORM_ERROR);
   _field_pm_pt[pos]->assignNodeFieldProfile(start,pfl,field,arr,glob,nasc);
 }
 
-void MEDFileFieldPerMesh::loadOnlyStructureOfDataRecursively(med_idt fid, int& start, const MEDFileFieldNameScope& nasc)
+void MEDFileFieldPerMesh::loadOnlyStructureOfDataRecursively(med_idt fid, mcIdType& start, const MEDFileFieldNameScope& nasc)
 {
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     (*it)->loadOnlyStructureOfDataRecursively(fid,start,nasc);
@@ -2083,8 +2088,8 @@ void MEDFileFieldPerMesh::loadBigArraysRecursively(med_idt fid, const MEDFileFie
 
 void MEDFileFieldPerMesh::writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const
 {
-  int nbOfTypes=_field_pm_pt.size();
-  for(int i=0;i<nbOfTypes;i++)
+  std::size_t nbOfTypes=_field_pm_pt.size();
+  for(std::size_t i=0;i<nbOfTypes;i++)
     {
       _field_pm_pt[i]->copyOptionsFrom(*this);
       _field_pm_pt[i]->writeLL(fid,nasc);
@@ -2111,12 +2116,12 @@ void MEDFileFieldPerMesh::fillTypesOfFieldAvailable(std::set<TypeOfField>& types
     (*it)->fillTypesOfFieldAvailable(types);
 }
 
-std::vector< std::vector< std::pair<int,int> > > MEDFileFieldPerMesh::getFieldSplitedByType(std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> > & locs) const
+std::vector< std::vector< std::pair<mcIdType,mcIdType> > > MEDFileFieldPerMesh::getFieldSplitedByType(std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> > & locs) const
 {
-  int sz=_field_pm_pt.size();
-  std::vector< std::vector<std::pair<int,int> > > ret(sz);
+  std::size_t sz=_field_pm_pt.size();
+  std::vector< std::vector<std::pair<mcIdType,mcIdType> > > ret(sz);
   types.resize(sz); typesF.resize(sz); pfls.resize(sz); locs.resize(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     {
       types[i]=_field_pm_pt[i]->getGeoType();
       _field_pm_pt[i]->fillFieldSplitedByType(ret[i],typesF[i],pfls[i],locs[i]);
@@ -2140,7 +2145,7 @@ int MEDFileFieldPerMesh::getOrder() const
   return _father->getOrder();
 }
 
-int MEDFileFieldPerMesh::getNumberOfComponents() const
+std::size_t MEDFileFieldPerMesh::getNumberOfComponents() const
 {
   return _father->getNumberOfComponents();
 }
@@ -2282,24 +2287,24 @@ const std::vector<std::string>& MEDFileFieldPerMesh::getInfo() const
  * - 'notNullPfls' contains sz2 values that are extracted from 'pfls' in which null profiles have been removed.
  * 'code' and 'notNullPfls' are in MEDCouplingUMesh::checkTypeConsistencyAndContig format.
  */
-void MEDFileFieldPerMesh::SortArraysPerType(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& locs, std::vector<int>& code, std::vector<DataArrayInt *>& notNullPfls)
+void MEDFileFieldPerMesh::SortArraysPerType(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<const DataArrayIdType *>& pfls, const std::vector<int>& locs, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& notNullPfls)
 {
   int notNullPflsSz=0;
-  int nbOfArrs=geoTypes.size();
-  for(int i=0;i<nbOfArrs;i++)
+  std::size_t nbOfArrs=geoTypes.size();
+  for(std::size_t i=0;i<nbOfArrs;i++)
     if(pfls[i])
       notNullPflsSz++;
   std::set<INTERP_KERNEL::NormalizedCellType> geoTypes3(geoTypes.begin(),geoTypes.end());
-  int nbOfDiffGeoTypes=geoTypes3.size();
+  std::size_t nbOfDiffGeoTypes=geoTypes3.size();
   code.resize(3*nbOfDiffGeoTypes);
   notNullPfls.resize(notNullPflsSz);
   notNullPflsSz=0;
-  int j=0;
-  for(int i=0;i<nbOfDiffGeoTypes;i++)
+  std::size_t j=0;
+  for(std::size_t i=0;i<nbOfDiffGeoTypes;i++)
     {
-      int startZone=j;
+      std::size_t startZone=j;
       INTERP_KERNEL::NormalizedCellType refType=geoTypes[j];
-      std::vector<const DataArrayInt *> notNullTmp;
+      std::vector<const DataArrayIdType *> notNullTmp;
       if(pfls[j])
         notNullTmp.push_back(pfls[j]);
       j++;
@@ -2311,17 +2316,17 @@ void MEDFileFieldPerMesh::SortArraysPerType(const MEDFileFieldGlobsReal *glob, T
           }
         else
           break;
-      std::vector< std::pair<int,int> > tmpDads(dads.begin()+startZone,dads.begin()+j);
-      std::vector<const DataArrayInt *> tmpPfls(pfls.begin()+startZone,pfls.begin()+j);
+      std::vector< std::pair<mcIdType,mcIdType> > tmpDads(dads.begin()+startZone,dads.begin()+j);
+      std::vector<const DataArrayIdType *> tmpPfls(pfls.begin()+startZone,pfls.begin()+j);
       std::vector<int> tmpLocs(locs.begin()+startZone,locs.begin()+j);
-      code[3*i]=(int)refType;
+      code[3*i]=(mcIdType)refType;
       std::vector<INTERP_KERNEL::NormalizedCellType> refType2(1,refType);
       code[3*i+1]=ComputeNbOfElems(glob,type,refType2,tmpDads,tmpLocs);
       if(notNullTmp.empty())
         code[3*i+2]=-1;
       else
         {
-          notNullPfls[notNullPflsSz]=DataArrayInt::Aggregate(notNullTmp);
+          notNullPfls[notNullPflsSz]=DataArrayIdType::Aggregate(notNullTmp);
           code[3*i+2]=notNullPflsSz++;
         }
     }
@@ -2330,11 +2335,11 @@ void MEDFileFieldPerMesh::SortArraysPerType(const MEDFileFieldGlobsReal *glob, T
 /*!
  * 'dads' 'geoTypes' and 'locs' are input parameters that should have same size sz. sz should be >=1.
  */
-int MEDFileFieldPerMesh::ComputeNbOfElems(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs)
+mcIdType MEDFileFieldPerMesh::ComputeNbOfElems(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs)
 {
-  int sz=dads.size();
-  int ret=0;
-  for(int i=0;i<sz;i++)
+  std::size_t sz=dads.size();
+  mcIdType ret=0;
+  for(std::size_t i=0;i<sz;i++)
     {
       if(locs[i]==-1)
         {
@@ -2447,14 +2452,14 @@ void MEDFileFieldPerMesh::convertMedBallIntoClassic()
   _field_pm_pt[0]=DynamicCast<MEDFileFieldPerMeshPerType,MEDFileFieldPerMeshPerTypeCommon>(pt2);
 }
 
-bool MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N,
+bool MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N,
                                                       MEDFileFieldGlobsReal& glob)
 {
   if(getMeshName()!=meshName)
     return false;
   std::set<INTERP_KERNEL::NormalizedCellType> typesToKeep;
   for(std::size_t i=0;i<oldCode.size()/3;i++) typesToKeep.insert((INTERP_KERNEL::NormalizedCellType)oldCode[3*i]);
-  std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > > entries;
+  std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > > entries;
   std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> entriesKept;
   std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> otherEntries;
   getUndergroundDataArrayExt(entries);
@@ -2464,10 +2469,10 @@ bool MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh(const std::string& meshNam
   DataArrayDouble *arr(dynamic_cast<DataArrayDouble *>(arr0));//tony
   if(!arr0)
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh : DataArray storing values is double ! Not managed for the moment !");
-  int sz=0;
+  mcIdType sz=0;
   if(!arr)
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh : DataArrayDouble storing values of field is null !");
-  for(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >::const_iterator it=entries.begin();it!=entries.end();it++)
+  for(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >::const_iterator it=entries.begin();it!=entries.end();it++)
     {
       if(typesToKeep.find((*it).first.first)!=typesToKeep.end())
         {
@@ -2477,31 +2482,31 @@ bool MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh(const std::string& meshNam
       else
         otherEntries.push_back(getLeafGivenTypeAndLocId((*it).first.first,(*it).first.second));
     }
-  MCAuto<DataArrayInt> renumDefrag=DataArrayInt::New(); renumDefrag->alloc(arr->getNumberOfTuples(),1); renumDefrag->fillWithZero();
+  MCAuto<DataArrayIdType> renumDefrag=DataArrayIdType::New(); renumDefrag->alloc(arr->getNumberOfTuples(),1); renumDefrag->fillWithZero();
   ////////////////////
-  MCAuto<DataArrayInt> explicitIdsOldInMesh=DataArrayInt::New(); explicitIdsOldInMesh->alloc(sz,1);//sz is a majorant of the real size. A realloc will be done after
-  int *workI2=explicitIdsOldInMesh->getPointer();
-  int sz1=0,sz2=0,sid=1;
+  MCAuto<DataArrayIdType> explicitIdsOldInMesh=DataArrayIdType::New(); explicitIdsOldInMesh->alloc(sz,1);//sz is a majorant of the real size. A realloc will be done after
+  mcIdType *workI2=explicitIdsOldInMesh->getPointer();
+  mcIdType sz1=0,sz2=0,sid=1;
   std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > entriesKeptML=MEDFileFieldPerMeshPerTypePerDisc::SplitPerDiscretization(entriesKept);
   // std::vector<int> tupleIdOfStartOfNewChuncksV(entriesKeptML.size());
   for(std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> >::const_iterator itL1=entriesKeptML.begin();itL1!=entriesKeptML.end();itL1++,sid++)
     {
       //  tupleIdOfStartOfNewChuncksV[sid-1]=sz2;
-      MCAuto<DataArrayInt> explicitIdsOldInArr=DataArrayInt::New(); explicitIdsOldInArr->alloc(sz,1);
-      int *workI=explicitIdsOldInArr->getPointer();
+      MCAuto<DataArrayIdType> explicitIdsOldInArr=DataArrayIdType::New(); explicitIdsOldInArr->alloc(sz,1);
+      mcIdType *workI=explicitIdsOldInArr->getPointer();
       for(std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>::const_iterator itL2=(*itL1).begin();itL2!=(*itL1).end();itL2++)
         {
-          int delta1=(*itL2)->fillTupleIds(workI); workI+=delta1; sz1+=delta1;
+          mcIdType delta1=(*itL2)->fillTupleIds(workI); workI+=delta1; sz1+=delta1;
           (*itL2)->setLocId(sz2);
           (*itL2)->_tmp_work1=(*itL2)->getStart();
-          int delta2=(*itL2)->fillEltIdsFromCode(sz2,oldCode,glob,workI2); workI2+=delta2; sz2+=delta2;
+          mcIdType delta2=(*itL2)->fillEltIdsFromCode(sz2,oldCode,glob,workI2); workI2+=delta2; sz2+=delta2;
         }
       renumDefrag->setPartOfValuesSimple3(sid,explicitIdsOldInArr->begin(),explicitIdsOldInArr->end(),0,1,1);
     }
   explicitIdsOldInMesh->reAlloc(sz2);
-  int tupleIdOfStartOfNewChuncks=arr->getNumberOfTuples()-sz2;
+  mcIdType tupleIdOfStartOfNewChuncks=arr->getNumberOfTuples()-sz2;
   ////////////////////
-  MCAuto<DataArrayInt> permArrDefrag=renumDefrag->buildPermArrPerLevel(); renumDefrag=0;
+  MCAuto<DataArrayIdType> permArrDefrag=renumDefrag->buildPermArrPerLevel(); renumDefrag=0;
   // perform redispatching of non concerned MEDFileFieldPerMeshPerTypePerDisc
   std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> > otherEntriesNew;
   for(std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>::const_iterator it=otherEntries.begin();it!=otherEntries.end();it++)
@@ -2515,7 +2520,7 @@ bool MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh(const std::string& meshNam
   for(std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>::const_iterator it=entriesKept.begin();it!=entriesKept.end();it++)
     {
       MCAuto<MEDFileFieldPerMeshPerTypePerDisc> elt=MEDFileFieldPerMeshPerTypePerDisc::New(*(*it));
-      int newStart=elt->getLocId();
+      mcIdType newStart=elt->getLocId();
       elt->setLocId((*it)->getGeoType());
       elt->setNewStart(newStart);
       elt->_tmp_work1=permArrDefrag->getIJ(elt->_tmp_work1,0);
@@ -2524,7 +2529,7 @@ bool MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh(const std::string& meshNam
     }
   MCAuto<DataArrayDouble> arr2=arr->renumber(permArrDefrag->getConstPointer());
   // perform redispatching of concerned MEDFileFieldPerMeshPerTypePerDisc -> values are in arr2
-  MCAuto<DataArrayInt> explicitIdsNewInMesh=renumO2N->selectByTupleId(explicitIdsOldInMesh->begin(),explicitIdsOldInMesh->end());
+  MCAuto<DataArrayIdType> explicitIdsNewInMesh=renumO2N->selectByTupleId(explicitIdsOldInMesh->begin(),explicitIdsOldInMesh->end());
   std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > entriesKeptPerDisc=MEDFileFieldPerMeshPerTypePerDisc::SplitPerDiscretization(entriesKeptNew2);
   bool ret=false;
   for(std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> >::const_iterator it4=entriesKeptPerDisc.begin();it4!=entriesKeptPerDisc.end();it4++)
@@ -2550,12 +2555,12 @@ bool MEDFileFieldPerMesh::renumberEntitiesLyingOnMesh(const std::string& meshNam
  * \param [in,out] globalNum a global numbering counter for the renumbering.
  * \param [out] its - list of pair (start,stop) kept
  */
-void MEDFileFieldPerMesh::keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its)
+void MEDFileFieldPerMesh::keepOnlySpatialDiscretization(TypeOfField tof, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its)
 {
   std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > > ret;
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     {
-      std::vector< std::pair<int,int> > its2;
+      std::vector< std::pair<mcIdType,mcIdType> > its2;
       if((*it)->keepOnlySpatialDiscretization(tof,globalNum,its2))
         {
           ret.push_back(*it);
@@ -2569,12 +2574,12 @@ void MEDFileFieldPerMesh::keepOnlySpatialDiscretization(TypeOfField tof, int &gl
  * \param [in,out] globalNum a global numbering counter for the renumbering.
  * \param [out] its - list of pair (start,stop) kept
  */
-void MEDFileFieldPerMesh::keepOnlyGaussDiscretization(std::size_t idOfDisc, int &globalNum, std::vector< std::pair<int,int> >& its)
+void MEDFileFieldPerMesh::keepOnlyGaussDiscretization(std::size_t idOfDisc, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its)
 {
   std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > > ret;
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     {
-      std::vector< std::pair<int,int> > its2;
+      std::vector< std::pair<mcIdType,mcIdType> > its2;
       if((*it)->keepOnlyGaussDiscretization(idOfDisc,globalNum,its2))
         {
           ret.push_back(*it);
@@ -2623,10 +2628,11 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::getFieldOnMeshAtLevel(TypeOfField t
   if(_field_pm_pt.empty())
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMesh::getFieldOnMeshAtLevel : no types field set !");
   //
-  std::vector< std::pair<int,int> > dads;
-  std::vector<const DataArrayInt *> pfls;
-  std::vector<DataArrayInt *> notNullPflsPerGeoType;
-  std::vector<int> locs,code;
+  std::vector< std::pair<mcIdType,mcIdType> > dads;
+  std::vector<const DataArrayIdType *> pfls;
+  std::vector<DataArrayIdType *> notNullPflsPerGeoType;
+  std::vector<int> locs;
+  std::vector<mcIdType>code;
   std::vector<INTERP_KERNEL::NormalizedCellType> geoTypes;
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     (*it)->getFieldAtLevel(mesh->getMeshDimension(),type,glob,dads,pfls,locs,geoTypes);
@@ -2638,16 +2644,16 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::getFieldOnMeshAtLevel(TypeOfField t
       throw INTERP_KERNEL::Exception(oss.str());
     }
   //
-  std::vector< MCAuto<DataArrayInt> > notNullPflsPerGeoType2(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
-  std::vector< const DataArrayInt *> notNullPflsPerGeoType3(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
+  std::vector< MCAuto<DataArrayIdType> > notNullPflsPerGeoType2(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
+  std::vector< const DataArrayIdType *> notNullPflsPerGeoType3(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
   if(type!=ON_NODES)
     {
-      DataArrayInt *arr=mesh->checkTypeConsistencyAndContig(code,notNullPflsPerGeoType3);
+      DataArrayIdType *arr=mesh->checkTypeConsistencyAndContig(code,notNullPflsPerGeoType3);
       if(!arr)
         return finishField(type,glob,dads,locs,mesh,isPfl,arrOut,nasc);
       else
         {
-          MCAuto<DataArrayInt> arr2(arr);
+          MCAuto<DataArrayIdType> arr2(arr);
           return finishField2(type,glob,dads,locs,geoTypes,mesh,arr,isPfl,arrOut,nasc);
         }
     }
@@ -2655,7 +2661,7 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::getFieldOnMeshAtLevel(TypeOfField t
     {
       if(code.size()!=3)
         throw INTERP_KERNEL::Exception("MEDFileFieldPerMesh::getFieldOnMeshAtLevel : internal error #1 !");
-      int nb=code[1];
+      mcIdType nb=code[1];
       if(code[2]==-1)
         {
           if(nb!=mesh->getNumberOfNodes())
@@ -2671,15 +2677,16 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::getFieldOnMeshAtLevel(TypeOfField t
     }
 }
 
-DataArray *MEDFileFieldPerMesh::getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const
+DataArray *MEDFileFieldPerMesh::getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayIdType *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const
 {
   if(_field_pm_pt.empty())
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMesh::getFieldOnMeshAtLevel : no types field set !");
   //
-  std::vector<std::pair<int,int> > dads;
-  std::vector<const DataArrayInt *> pfls;
-  std::vector<DataArrayInt *> notNullPflsPerGeoType;
-  std::vector<int> locs,code;
+  std::vector<std::pair<mcIdType,mcIdType> > dads;
+  std::vector<const DataArrayIdType *> pfls;
+  std::vector<DataArrayIdType *> notNullPflsPerGeoType;
+  std::vector<int> locs;
+  std::vector<mcIdType> code;
   std::vector<INTERP_KERNEL::NormalizedCellType> geoTypes;
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     (*it)->getFieldAtLevel(mesh->getMeshDimension(),type,glob,dads,pfls,locs,geoTypes);
@@ -2690,18 +2697,18 @@ DataArray *MEDFileFieldPerMesh::getFieldOnMeshAtLevelWithPfl(TypeOfField type, c
       std::ostringstream oss; oss << "MEDFileFieldPerMesh::getFieldOnMeshAtLevelWithPfl : " << "The field \"" << nasc.getName() << "\" exists but not with such spatial discretization or such dimension specified !";
       throw INTERP_KERNEL::Exception(oss.str());
     }
-  std::vector< MCAuto<DataArrayInt> > notNullPflsPerGeoType2(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
-  std::vector< const DataArrayInt *> notNullPflsPerGeoType3(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
+  std::vector< MCAuto<DataArrayIdType> > notNullPflsPerGeoType2(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
+  std::vector< const DataArrayIdType *> notNullPflsPerGeoType3(notNullPflsPerGeoType.begin(),notNullPflsPerGeoType.end());
   if(type!=ON_NODES)
     {
-      MCAuto<DataArrayInt> arr=mesh->checkTypeConsistencyAndContig(code,notNullPflsPerGeoType3);
+      MCAuto<DataArrayIdType> arr=mesh->checkTypeConsistencyAndContig(code,notNullPflsPerGeoType3);
       return finishField4(dads,arr,mesh->getNumberOfCells(),pfl);
     }
   else
     {
       if(code.size()!=3)
         throw INTERP_KERNEL::Exception("MEDFileFieldPerMesh::getFieldOnMeshAtLevel : internal error #1 !");
-      int nb=code[1];
+      mcIdType nb=code[1];
       if(code[2]==-1)
         {
           if(nb!=mesh->getNumberOfNodes())
@@ -2728,10 +2735,10 @@ void MEDFileFieldPerMesh::accept(MEDFileFieldVisitor& visitor) const
       }
 }
 
-void MEDFileFieldPerMesh::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+void MEDFileFieldPerMesh::getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
-  int globalSz=0;
-  int nbOfEntries=0;
+  mcIdType globalSz=0;
+  mcIdType nbOfEntries=0;
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     {
       (*it)->getSizes(globalSz,nbOfEntries);
@@ -2744,7 +2751,7 @@ void MEDFileFieldPerMesh::getUndergroundDataArrayExt(std::vector< std::pair<std:
     }
 }
 
-MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMesh::getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId)
+MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMesh::getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, mcIdType locId)
 {
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     {
@@ -2762,7 +2769,7 @@ MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMesh::getLeafGivenTypeAndLocId
   throw INTERP_KERNEL::Exception(oss.str());
 }
 
-const MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMesh::getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) const
+const MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMesh::getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, mcIdType locId) const
 {
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     {
@@ -2786,7 +2793,7 @@ const MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMesh::getLeafGivenTypeAn
  * \param [in] dts - (Distribution of types) = level 1 : meshes to aggregate. Level 2 : all geo type. Level 3 pair specifying geo type and number of elem in geotype.
  * \param [out] extractInfo - Gives information about the where the data comes from. It is a vector of triplet. First element in the triplet the mesh pos. The 2nd one the start pos. The 3rd the end pos.
  */
-MCAuto<MEDFileFieldPerMeshPerTypePerDisc> MEDFileFieldPerMeshPerTypePerDisc::Aggregate(int &start, const std::vector< std::pair<int,const MEDFileFieldPerMeshPerTypePerDisc *> >& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, TypeOfField tof, MEDFileFieldPerMeshPerType *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo)
+MCAuto<MEDFileFieldPerMeshPerTypePerDisc> MEDFileFieldPerMeshPerTypePerDisc::Aggregate(mcIdType &start, const std::vector< std::pair<int,const MEDFileFieldPerMeshPerTypePerDisc *> >& pms, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts, TypeOfField tof, MEDFileFieldPerMeshPerType *father, std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > >& extractInfo)
 {
   MCAuto<MEDFileFieldPerMeshPerTypePerDisc> ret(new MEDFileFieldPerMeshPerTypePerDisc(father,tof));
   if(pms.empty())
@@ -2803,20 +2810,20 @@ MCAuto<MEDFileFieldPerMeshPerTypePerDisc> MEDFileFieldPerMeshPerTypePerDisc::Agg
   INTERP_KERNEL::NormalizedCellType gt(pms[0].second->getGeoType());
   std::size_t i(0);
   std::vector< std::pair<int,int> > filteredDTS;
-  for(std::vector< std::vector< std::pair<int,int> > >::const_iterator it=dts.begin();it!=dts.end();it++,i++)
-    for(std::vector< std::pair<int,int> >::const_iterator it2=(*it).begin();it2!=(*it).end();it2++)
+  for(std::vector< std::vector< std::pair<int,mcIdType> > >::const_iterator it=dts.begin();it!=dts.end();it++,i++)
+    for(std::vector< std::pair<int,mcIdType> >::const_iterator it2=(*it).begin();it2!=(*it).end();it2++)
       if((*it2).first==gt)
         filteredDTS.push_back(std::pair<int,int>(i,(*it2).second));
   if(pms.size()!=filteredDTS.size())
     throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::Aggregate : not implemented yet for generated profiles !");
   std::vector<std::pair<int,const MEDFileFieldPerMeshPerTypePerDisc *> >::const_iterator it1(pms.begin());
   std::vector< std::pair<int,int> >::const_iterator it2(filteredDTS.begin());
-  int zeStart(start),nval(0);
+  mcIdType zeStart(start),nval(0);
   for(;it1!=pms.end();it1++,it2++)
     {
       if((*it1).first!=(*it2).first)
         throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::Aggregate : not implemented yet for generated profiles 2 !");
-      int s1((*it1).second->getStart()),e1((*it1).second->getEnd());
+      mcIdType s1((*it1).second->getStart()),e1((*it1).second->getEnd());
       extractInfo.push_back(std::pair<int, std::pair<int,int> >((*it1).first,std::pair<int,int>(s1,e1)));
       start+=e1-s1;
       nval+=((*it1).second)->getNumberOfVals();
@@ -2825,7 +2832,7 @@ MCAuto<MEDFileFieldPerMeshPerTypePerDisc> MEDFileFieldPerMeshPerTypePerDisc::Agg
   return ret;
 }
 
-MCAuto<MEDFileFieldPerMesh> MEDFileFieldPerMesh::Aggregate(int &start, const std::vector<const MEDFileFieldPerMesh *>& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, MEDFileAnyTypeField1TSWithoutSDA *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo)
+MCAuto<MEDFileFieldPerMesh> MEDFileFieldPerMesh::Aggregate(mcIdType &start, const std::vector<const MEDFileFieldPerMesh *>& pms, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts, MEDFileAnyTypeField1TSWithoutSDA *father, std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > >& extractInfo)
 {
   MCAuto<MEDFileFieldPerMesh> ret(new MEDFileFieldPerMesh(father,pms[0]->getMeshName(),pms[0]->getMeshIteration(),pms[0]->getMeshOrder()));
   std::map<INTERP_KERNEL::NormalizedCellType, std::vector< std::pair<int,const MEDFileFieldPerMeshPerType *> > > m;
@@ -2854,7 +2861,7 @@ MCAuto<MEDFileFieldPerMesh> MEDFileFieldPerMesh::Aggregate(int &start, const std
 int MEDFileFieldPerMesh::addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellType type)
 {
   int i=0;
-  int pos=std::distance(typmai2,std::find(typmai2,typmai2+MED_N_CELL_FIXED_GEO,type));
+  std::size_t pos=std::distance(typmai2,std::find(typmai2,typmai2+MED_N_CELL_FIXED_GEO,type));
   std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::iterator it2=_field_pm_pt.begin();
   for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++,i++)
     {
@@ -2863,14 +2870,14 @@ int MEDFileFieldPerMesh::addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellTyp
         return i;
       else
         {
-          int pos2=std::distance(typmai2,std::find(typmai2,typmai2+MED_N_CELL_FIXED_GEO,curType));
+          std::size_t pos2=std::distance(typmai2,std::find(typmai2,typmai2+MED_N_CELL_FIXED_GEO,curType));
           if(pos>pos2)
             it2=it+1;
         }
     }
-  int ret=std::distance(_field_pm_pt.begin(),it2);
+  std::size_t ret=std::distance(_field_pm_pt.begin(),it2);
   _field_pm_pt.insert(it2,MEDFileFieldPerMeshPerType::New(this,type));
-  return ret;
+  return (int)ret;
 }
 
 /*!
@@ -2878,7 +2885,7 @@ int MEDFileFieldPerMesh::addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellTyp
  * \param [in] mesh is \b NOT the global mesh, but the possibly reduced mesh. \a mesh parameter will be directly aggregated in the returned field
  */
 MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField(TypeOfField type, const MEDFileFieldGlobsReal *glob,
-                                                         const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
+                                                         const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs,
                                                          const MEDCouplingMesh *mesh, bool& isPfl, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
 {
   isPfl=false;
@@ -2890,14 +2897,14 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField(TypeOfField type, const
   da->setName("");
   if(type==ON_GAUSS_PT)
     {
-      int offset=0;
-      int nbOfArrs=dads.size();
-      for(int i=0;i<nbOfArrs;i++)
+      mcIdType offset=0;
+      std::size_t nbOfArrs=dads.size();
+      for(std::size_t i=0;i<nbOfArrs;i++)
         {
-          std::vector<std::pair<int,int> > dads2(1,dads[i]); const std::vector<int> locs2(1,locs[i]);
+          std::vector<std::pair<mcIdType,mcIdType> > dads2(1,dads[i]); const std::vector<int> locs2(1,locs[i]);
           const std::vector<INTERP_KERNEL::NormalizedCellType> geoTypes2(1,INTERP_KERNEL::NORM_ERROR);
-          int nbOfElems=ComputeNbOfElems(glob,type,geoTypes2,dads2,locs2);
-          MCAuto<DataArrayInt> di=DataArrayInt::New();
+          mcIdType nbOfElems=ComputeNbOfElems(glob,type,geoTypes2,dads2,locs2);
+          MCAuto<DataArrayIdType> di=DataArrayIdType::New();
           di->alloc(nbOfElems,1);
           di->iota(offset);
           const MEDFileFieldLoc& fl=glob->getLocalizationFromId(locs[i]);
@@ -2917,9 +2924,9 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField(TypeOfField type, const
  * \param [in] mesh is the global mesh.
  */
 MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField2(TypeOfField type, const MEDFileFieldGlobsReal *glob,
-                                                          const std::vector<std::pair<int,int> >& dads, const std::vector<int>& locs,
+                                                          const std::vector<std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs,
                                                           const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes,
-                                                          const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
+                                                          const MEDCouplingMesh *mesh, const DataArrayIdType *da, bool& isPfl, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
 {
   if(da->isIota(mesh->getNumberOfCells()))
     return finishField(type,glob,dads,locs,mesh,isPfl,arrOut,nasc);
@@ -2934,8 +2941,8 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishField2(TypeOfField type, cons
  * This method is the complement of MEDFileFieldPerMesh::finishField2 method except that this method works for node profiles.
  */
 MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishFieldNode2(const MEDFileFieldGlobsReal *glob,
-                                                              const std::vector<std::pair<int,int> >& dads, const std::vector<int>& locs,
-                                                              const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
+                                                              const std::vector<std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs,
+                                                              const MEDCouplingMesh *mesh, const DataArrayIdType *da, bool& isPfl, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const
 {
   if(da->isIota(mesh->getNumberOfNodes()))
     return finishField(ON_NODES,glob,dads,locs,mesh,isPfl,arrOut,nasc);
@@ -2946,11 +2953,11 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishFieldNode2(const MEDFileField
       if(meshu->getNodalConnectivity()==0)
         {
           MCAuto<MEDCouplingFieldDouble> ret=finishField(ON_CELLS,glob,dads,locs,mesh,isPfl,arrOut,nasc);
-          int nb=da->getNbOfElems();
-          const int *ptr=da->getConstPointer();
+          mcIdType nb=da->getNbOfElems();
+          const mcIdType *ptr=da->getConstPointer();
           MEDCouplingUMesh *meshuc=const_cast<MEDCouplingUMesh *>(meshu);
           meshuc->allocateCells(nb);
-          for(int i=0;i<nb;i++)
+          for(mcIdType i=0;i<nb;i++)
             meshuc->insertNextCell(INTERP_KERNEL::NORM_POINT1,1,ptr+i);
           meshuc->finishInsertingCells();
           ret->setMesh(meshuc);
@@ -2963,14 +2970,14 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishFieldNode2(const MEDFileField
   //
   MCAuto<MEDCouplingFieldDouble> ret=finishField(ON_NODES,glob,dads,locs,mesh,isPfl,arrOut,nasc);
   isPfl=true;
-  DataArrayInt *arr2=0;
-  MCAuto<DataArrayInt> cellIds=mesh->getCellIdsFullyIncludedInNodeIds(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
+  DataArrayIdType *arr2=0;
+  MCAuto<DataArrayIdType> cellIds=mesh->getCellIdsFullyIncludedInNodeIds(da->getConstPointer(),da->getConstPointer()+da->getNbOfElems());
   MCAuto<MEDCouplingMesh> mesh2=mesh->buildPartAndReduceNodes(cellIds->getConstPointer(),cellIds->getConstPointer()+cellIds->getNbOfElems(),arr2);
-  MCAuto<DataArrayInt> arr3(arr2);
-  int nnodes=mesh2->getNumberOfNodes();
-  if(nnodes==(int)da->getNbOfElems())
+  MCAuto<DataArrayIdType> arr3(arr2);
+  mcIdType nnodes=mesh2->getNumberOfNodes();
+  if(nnodes==(mcIdType)da->getNbOfElems())
     {
-      MCAuto<DataArrayInt> da3=da->transformWithIndArrR(arr2->begin(),arr2->end());
+      MCAuto<DataArrayIdType> da3=da->transformWithIndArrR(arr2->begin(),arr2->end());
       arrOut->renumberInPlace(da3->getConstPointer());
       mesh2->setName(mesh->getName().c_str());
       ret->setMesh(mesh2);
@@ -2992,24 +2999,24 @@ MEDCouplingFieldDouble *MEDFileFieldPerMesh::finishFieldNode2(const MEDFileField
 /*!
  * This method is the most light method of field retrieving.
  */
-DataArray *MEDFileFieldPerMesh::finishField4(const std::vector<std::pair<int,int> >& dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const
+DataArray *MEDFileFieldPerMesh::finishField4(const std::vector<std::pair<mcIdType,mcIdType> >& dads, const DataArrayIdType *pflIn, mcIdType nbOfElems, DataArrayIdType *&pflOut) const
 {
   if(!pflIn)
     {
-      pflOut=DataArrayInt::New();
+      pflOut=DataArrayIdType::New();
       pflOut->alloc(nbOfElems,1);
       pflOut->iota(0);
     }
   else
     {
-      pflOut=const_cast<DataArrayInt*>(pflIn);
+      pflOut=const_cast<DataArrayIdType*>(pflIn);
       pflOut->incrRef();
     }
-  MCAuto<DataArrayInt> safePfl(pflOut);
+  MCAuto<DataArrayIdType> safePfl(pflOut);
   MCAuto<DataArray> da=getOrCreateAndGetArray()->selectByTupleRanges(dads);
   const std::vector<std::string>& infos=getInfo();
-  int nbOfComp=infos.size();
-  for(int i=0;i<nbOfComp;i++)
+  std::size_t nbOfComp=infos.size();
+  for(std::size_t i=0;i<nbOfComp;i++)
     da->setInfoOnComponent(i,infos[i].c_str());
   safePfl->incrRef();
   return da.retn();
@@ -3122,9 +3129,9 @@ MEDFileFieldPerMesh::MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWith
   INTERP_KERNEL::AutoCppPtr<MFFPMIter> iter0(MFFPMIter::NewCell(entities));
   for(iter0->begin();!iter0->finished();iter0->next())
     {
-      int nbProfile (MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_CELL        ,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
+      med_int nbProfile (MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_CELL        ,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
       std::string name0(MEDLoaderBase::buildStringFromFortran(meshName,MED_NAME_SIZE+1));
-      int nbProfile2(MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_NODE_ELEMENT,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
+      med_int nbProfile2(MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_NODE_ELEMENT,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
       std::string name1(MEDLoaderBase::buildStringFromFortran(meshName,MED_NAME_SIZE+1));
       if(nbProfile>0 || nbProfile2>0)
         {
@@ -3140,7 +3147,7 @@ MEDFileFieldPerMesh::MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWith
     }
   if(MFFPMIter::IsPresenceOfNode(entities))
     {
-      int nbProfile(MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_NODE,MED_NONE,meshCsit+1,meshName,pflName,locName));
+      med_int nbProfile(MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_NODE,MED_NONE,meshCsit+1,meshName,pflName,locName));
       if(nbProfile>0)
         {
           const PartDefinition *pd(0);
@@ -3155,7 +3162,7 @@ MEDFileFieldPerMesh::MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWith
   std::vector<int> dynGT(entities->getDynGTAvail());
   for(std::vector<int>::const_iterator it=dynGT.begin();it!=dynGT.end();it++)
     {
-      int nbPfl(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_STRUCT_ELEMENT,*it,pflName,locName));
+      med_int nbPfl(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_STRUCT_ELEMENT,*it,pflName,locName));
       if(nbPfl>0)
         {
           _field_pm_pt.push_back(MEDFileFieldPerMeshPerTypeDyn::NewOnRead(fid,this,entities,*it,nasc));
@@ -3168,9 +3175,9 @@ MEDFileFieldPerMesh::MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWith
   iter0=MFFPMIter::NewCell(entities);
   for(iter0->begin();!iter0->finished();iter0->next())
     {
-      int nbProfile (MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_FACE,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
+      med_int nbProfile (MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_FACE,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
       std::string name0(MEDLoaderBase::buildStringFromFortran(meshName,MED_NAME_SIZE+1));
-      int nbProfile2(MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_EDGE,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
+      med_int nbProfile2(MEDfield23nProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_EDGE,typmai[iter0->current()],meshCsit+1,meshName,pflName,locName));
       std::string name1(MEDLoaderBase::buildStringFromFortran(meshName,MED_NAME_SIZE+1));
       if(nbProfile>0 || nbProfile2>0)
         {
index 48d24b5a74ff04cd42980d28e37cc1fd80b3eeec..bb2e318dfa84a33936e2af932d076b694c46a49f 100644 (file)
@@ -133,20 +133,20 @@ namespace MEDCoupling
   {
   public:
     static MEDFileFieldPerMeshPerTypePerDisc *NewOnRead(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int profileIt, const PartDefinition *pd);
-    static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int locId);
+    static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, mcIdType locId);
     static MEDFileFieldPerMeshPerTypePerDisc *New(const MEDFileFieldPerMeshPerTypePerDisc& other);
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     MEDFileFieldPerMeshPerTypePerDisc *deepCopy(MEDFileFieldPerMeshPerTypeCommon *father) const;
-    void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    void assignFieldProfile(bool isPflAlone, int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arrr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob);
-    void getCoarseData(TypeOfField& type, std::pair<int,int>& dad, std::string& pfl, std::string& loc) const;
+    void assignFieldNoProfile(mcIdType& start, mcIdType offset, mcIdType nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void assignFieldProfile(bool isPflAlone, mcIdType& start, const DataArrayIdType *multiTypePfl, const DataArrayIdType *idsInPfl, DataArrayIdType *locIds, mcIdType nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arrr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void assignNodeFieldNoProfile(mcIdType& start, const MEDCouplingFieldTemplate *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob);
+    void getCoarseData(TypeOfField& type, std::pair<mcIdType,mcIdType>& dad, std::string& pfl, std::string& loc) const;
     void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
     const MEDFileFieldPerMeshPerTypeCommon *getFather() const;
-    void loadOnlyStructureOfDataRecursively(med_idt fid, int& start, const MEDFileFieldNameScope& nasc);
+    void loadOnlyStructureOfDataRecursively(med_idt fid, mcIdType& start, const MEDFileFieldNameScope& nasc);
     void loadBigArray(med_idt fid, const MEDFileFieldNameScope& nasc);
-    void setNewStart(int newValueOfStart);
+    void setNewStart(mcIdType newValueOfStart);
     int getIteration() const;
     int getOrder() const;
     double getTime() const;
@@ -156,13 +156,13 @@ namespace MEDCoupling
     void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
     void setType(TypeOfField newType);
     INTERP_KERNEL::NormalizedCellType getGeoType() const;
-    int getNumberOfComponents() const;
-    int getNumberOfTuples() const;
-    int getStart() const { return _start; }
-    int getEnd() const { return _end; }
-    void setEnd(int endd) { _end=endd; }
-    int getNumberOfVals() const { return _nval; }
-    void incrementNbOfVals(int deltaNbVal);
+    std::size_t getNumberOfComponents() const;
+    mcIdType getNumberOfTuples() const;
+    mcIdType getStart() const { return _start; }
+    mcIdType getEnd() const { return _end; }
+    void setEnd(mcIdType endd) { _end=endd; }
+    mcIdType getNumberOfVals() const { return _nval; }
+    void incrementNbOfVals(mcIdType deltaNbVal);
     DataArray *getOrCreateAndGetArray();
     const DataArray *getOrCreateAndGetArray() const;
     const std::vector<std::string>& getInfo() const;
@@ -170,29 +170,29 @@ namespace MEDCoupling
     void setProfile(const std::string& newPflName);
     std::string getLocalization() const;
     void setLocalization(const std::string& newLocName);
-    int getLocId() const { return _loc_id; }
-    void setLocId(int newId) const { _loc_id=newId; }
+    mcIdType getLocId() const { return _loc_id; }
+    void setLocId(mcIdType newId) const { _loc_id=newId; }
     void setFather(MEDFileFieldPerMeshPerTypeCommon *newFather) { _father=newFather; }
     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
-    void getFieldAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs,
+    void getFieldAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<const DataArrayIdType *>& pfls, std::vector<int>& locs,
                          std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
-    void fillValues(int discId, int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
-    int fillEltIdsFromCode(int offset, const std::vector<int>& codeOfMesh, const MEDFileFieldGlobsReal& glob, int *ptToFill) const;
-    int fillTupleIds(int *ptToFill) const;
-    static int ConvertType(TypeOfField type, int locId);
+    void fillValues(int discId, mcIdType& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+    mcIdType fillEltIdsFromCode(mcIdType offset, const std::vector<mcIdType>& codeOfMesh, const MEDFileFieldGlobsReal& glob, mcIdType *ptToFill) const;
+    mcIdType fillTupleIds(mcIdType *ptToFill) const;
+    static int ConvertType(TypeOfField type, mcIdType locId);
     static std::vector< std::vector< const MEDFileFieldPerMeshPerTypePerDisc *> > SplitPerDiscretization(const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entries);
-    static bool RenumberChunks(int offset, const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
-                               const DataArrayInt *explicitIdsInMesh, const std::vector<int>& newCode,
+    static bool RenumberChunks(mcIdType offset, const std::vector< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
+                               const DataArrayIdType *explicitIdsInMesh, const std::vector<mcIdType>& newCode,
                                MEDFileFieldGlobsReal& glob, DataArrayDouble *arr, std::vector< MCAuto<MEDFileFieldPerMeshPerTypePerDisc> >& result);
-    static MEDFileFieldPerMeshPerTypePerDisc *NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayInt *idsOfMeshElt,
-                                                                          bool isPfl, int nbi, int offset, std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
+    static MEDFileFieldPerMeshPerTypePerDisc *NewObjectOnSameDiscThanPool(TypeOfField typeF, INTERP_KERNEL::NormalizedCellType geoType, DataArrayIdType *idsOfMeshElt,
+                                                                          bool isPfl, mcIdType nbi, mcIdType offset, std::list< const MEDFileFieldPerMeshPerTypePerDisc *>& entriesOnSameDisc,
                                                                           MEDFileFieldGlobsReal& glob, bool &notInExisting);
-    static MCAuto<MEDFileFieldPerMeshPerTypePerDisc> Aggregate(int &start, const std::vector<std::pair<int,const MEDFileFieldPerMeshPerTypePerDisc *> >& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, TypeOfField tof, MEDFileFieldPerMeshPerType *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo);
+    static MCAuto<MEDFileFieldPerMeshPerTypePerDisc> Aggregate(mcIdType &start, const std::vector<std::pair<int,const MEDFileFieldPerMeshPerTypePerDisc *> >& pms, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts, TypeOfField tof, MEDFileFieldPerMeshPerType *father, std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > >& extractInfo);
     MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type):_type(type),_father(fath),_start(-1),_end(-1),_nval(-1),_loc_id(-5),_profile_it(-1) { }
   private:
-    MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int profileIt, const PartDefinition *pd);
-    MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, int profileIt, const std::string& dummy);
+    MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, mcIdType profileIt, const PartDefinition *pd);
+    MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerTypeCommon *fath, TypeOfField type, mcIdType profileIt, const std::string& dummy);
     MEDFileFieldPerMeshPerTypePerDisc(const MEDFileFieldPerMeshPerTypePerDisc& other);
     MEDFileFieldPerMeshPerTypePerDisc();
   private:
@@ -200,18 +200,18 @@ namespace MEDCoupling
   private:
     TypeOfField _type;
     MEDFileFieldPerMeshPerTypeCommon *_father;
-    int _start;
-    int _end;
+    mcIdType _start;
+    mcIdType _end;
     //! _nval is different than end-start in case of ON_GAUSS_PT and ON_GAUSS_NE ! (_nval=(_end-_start)/nbi)
-    int _nval;
+    mcIdType _nval;
     std::string _profile;
     std::string _localization;
     //! only on assignment -3 : ON_NODES, -2 : ON_CELLS, -1 : ON_GAUSS_NE, 0..* : ON_GAUSS_PT
-    mutable int _loc_id;
-    mutable int _profile_it;
+    mutable mcIdType _loc_id;
+    mutable mcIdType _profile_it;
     MCAuto<PartDefinition> _pd;
   public:
-    mutable int _tmp_work1;
+    mutable mcIdType _tmp_work1;
   };
 
   class MEDFileFieldVisitor;
@@ -222,23 +222,23 @@ namespace MEDCoupling
   public:
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
-    void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    void assignFieldProfile(bool isPflAlone, int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
-    void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void assignFieldNoProfile(mcIdType& start, mcIdType offset, mcIdType nbOfCells, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void assignFieldProfile(bool isPflAlone, mcIdType& start, const DataArrayIdType *multiTypePfl, const DataArrayIdType *idsInPfl, DataArrayIdType *locIds, mcIdType nbOfEltsInWholeMesh, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void assignNodeFieldNoProfile(mcIdType& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
+    void assignNodeFieldProfile(mcIdType& start, const DataArrayIdType *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
     const MEDFileFieldPerMesh *getFather() const;
-    void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc);
+    void loadOnlyStructureOfDataRecursively(med_idt fid, mcIdType &start, const MEDFileFieldNameScope& nasc);
     void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
     void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
     bool isUniqueLevel(int& dim) const;
     void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
-    void fillFieldSplitedByType(std::vector< std::pair<int,int> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const;
+    void fillFieldSplitedByType(std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const;
     int getIteration() const;
     int getOrder() const;
     double getTime() const;
     std::string getMeshName() const;
-    void getSizes(int& globalSz, int& nbOfEntries) const;
-    int getNumberOfComponents() const;
+    void getSizes(mcIdType& globalSz, mcIdType& nbOfEntries) const;
+    std::size_t getNumberOfComponents() const;
     bool presenceOfMultiDiscPerGeoType() const;
     void pushDiscretization(MEDFileFieldPerMeshPerTypePerDisc *disc);
     DataArray *getOrCreateAndGetArray();
@@ -250,14 +250,14 @@ namespace MEDCoupling
     std::vector<std::string> getLocsReallyUsedMulti() const;
     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
-    MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId);
-    const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) const;
-    int getNumberOfLoc() const { return _field_pm_pt_pd.size(); }
+    MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(mcIdType locId);
+    const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(mcIdType locId) const;
+    int getNumberOfLoc() const { return (int)_field_pm_pt_pd.size(); }
     int locIdOfLeaf(const MEDFileFieldPerMeshPerTypePerDisc *leaf) const;
-    void fillValues(int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
+    void fillValues(mcIdType& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
     void setLeaves(const std::vector< MCAuto< MEDFileFieldPerMeshPerTypePerDisc > >& leaves);
-    bool keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its);
-    bool keepOnlyGaussDiscretization(std::size_t idOfDisc, int &globalNum, std::vector< std::pair<int,int> >& its);
+    bool keepOnlySpatialDiscretization(TypeOfField tof, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its);
+    bool keepOnlyGaussDiscretization(std::size_t idOfDisc, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its);
     static med_entity_type ConvertIntoMEDFileType(TypeOfField ikType, INTERP_KERNEL::NormalizedCellType ikGeoType, med_geometry_type& medfGeoType);
     MEDFileFieldPerMeshPerTypeCommon(MEDFileFieldPerMesh *father):_father(father) { }
     void setFather(MEDFileFieldPerMesh *father);
@@ -270,13 +270,13 @@ namespace MEDCoupling
     virtual void simpleRepr(int bkOffset, std::ostream& oss, int id) const = 0;
     virtual std::string getGeoTypeRepr() const = 0;
     virtual MEDFileFieldPerMeshPerTypeCommon *deepCopy(MEDFileFieldPerMesh *father) const = 0;
-    virtual void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const = 0;
+    virtual void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<const DataArrayIdType *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const = 0;
   protected:
     void deepCopyElements();
-    std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, int offset, int nbOfCells);
-    std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, int offset, int nbOfCells);
-    std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, const DataArrayInt *subCells);
-    std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, const DataArrayInt *subCells);
+    std::vector<mcIdType> addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, mcIdType offset, mcIdType nbOfCells);
+    std::vector<mcIdType> addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, mcIdType offset, mcIdType nbOfCells);
+    std::vector<mcIdType> addNewEntryIfNecessary(const MEDCouplingFieldTemplate *field, const DataArrayIdType *subCells);
+    std::vector<mcIdType> addNewEntryIfNecessaryGauss(const MEDCouplingFieldTemplate *field, const DataArrayIdType *subCells);
   private:
     MEDFileFieldPerMesh *_father;
   protected:
@@ -288,7 +288,7 @@ namespace MEDCoupling
   public:
     static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType);
     static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc, const PartDefinition *pd);
-    static MCAuto<MEDFileFieldPerMeshPerType> Aggregate(int &start, const std::vector< std::pair<int,const MEDFileFieldPerMeshPerType *> >& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, INTERP_KERNEL::NormalizedCellType gt, MEDFileFieldPerMesh *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo);
+    static MCAuto<MEDFileFieldPerMeshPerType> Aggregate(mcIdType &start, const std::vector< std::pair<int,const MEDFileFieldPerMeshPerType *> >& pms, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts, INTERP_KERNEL::NormalizedCellType gt, MEDFileFieldPerMesh *father, std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > >& extractInfo);
   public:// overload of abstract methods
     void getDimension(int& dim) const;
     INTERP_KERNEL::NormalizedCellType getGeoType() const;
@@ -296,7 +296,7 @@ namespace MEDCoupling
     void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
     std::string getGeoTypeRepr() const;
     MEDFileFieldPerMeshPerType *deepCopy(MEDFileFieldPerMesh *father) const;
-    void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
+    void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<const DataArrayIdType *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
   private:
     MEDFileFieldPerMeshPerType(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc, const PartDefinition *pd);
     MEDFileFieldPerMeshPerType(MEDFileFieldPerMesh *father, INTERP_KERNEL::NormalizedCellType gt);
@@ -317,7 +317,7 @@ namespace MEDCoupling
     void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
     std::string getGeoTypeRepr() const;
     MEDFileFieldPerMeshPerTypeDyn *deepCopy(MEDFileFieldPerMesh *father) const;
-    void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
+    void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFileFieldGlobsReal *glob, std::vector< std::pair<mcIdType,mcIdType> >& dads, std::vector<const DataArrayIdType *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
   private:
     MEDFileFieldPerMeshPerTypeDyn(med_idt fid, MEDFileFieldPerMesh *fath, const MEDFileStructureElement *se, const MEDFileFieldNameScope& nasc);
   private:
@@ -338,15 +338,15 @@ namespace MEDCoupling
     MEDFileFieldPerMesh *deepCopy(MEDFileAnyTypeField1TSWithoutSDA *father) const;
     void simpleRepr(int bkOffset,std::ostream& oss, int id) const;
     void copyTinyInfoFrom(const MEDCouplingMesh *mesh);
-    void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const std::vector<int>& code, const std::vector<int>& code2, const std::vector<DataArrayInt *>& idsInPflPerType, const std::vector<DataArrayInt *>& idsPerType, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    void assignFieldNoProfileNoRenum(int& start, const std::vector<int>& code, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
-    void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
-    void loadOnlyStructureOfDataRecursively(med_idt fid, int &start, const MEDFileFieldNameScope& nasc);
+    void assignFieldProfile(mcIdType& start, const DataArrayIdType *multiTypePfl, const std::vector<mcIdType>& code, const std::vector<mcIdType>& code2, const std::vector<DataArrayIdType *>& idsInPflPerType, const std::vector<DataArrayIdType *>& idsPerType, const MEDCouplingFieldTemplate *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void assignFieldNoProfileNoRenum(mcIdType& start, const std::vector<mcIdType>& code, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void assignNodeFieldNoProfile(mcIdType& start, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
+    void assignNodeFieldProfile(mcIdType& start, const DataArrayIdType *pfl, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+    void loadOnlyStructureOfDataRecursively(med_idt fid, mcIdType &start, const MEDFileFieldNameScope& nasc);
     void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
     void writeLL(med_idt fid, const MEDFileFieldNameScope& nasc) const;
     void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const;
-    std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+    std::vector< std::vector< std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
     void accept(MEDFileFieldVisitor& visitor) const;
     void getDimension(int& dim) const;
     bool isUniqueLevel(int& dim) const;
@@ -357,7 +357,7 @@ namespace MEDCoupling
     int getMeshOrder() const { return _mesh_order; }
     std::string getMeshName() const;
     void setMeshName(const std::string& meshName);
-    int getNumberOfComponents() const;
+    std::size_t getNumberOfComponents() const;
     bool presenceOfMultiDiscPerGeoType() const;
     bool presenceOfStructureElements() const;
     bool onlyStructureElements() const;
@@ -374,37 +374,37 @@ namespace MEDCoupling
     std::vector<std::string> getLocsReallyUsedMulti() const;
     void convertMedBallIntoClassic();
     bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
-    bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
-    void keepOnlySpatialDiscretization(TypeOfField tof, int &globalNum, std::vector< std::pair<int,int> >& its);
-    void keepOnlyGaussDiscretization(std::size_t idOfDisc, int &globalNum, std::vector< std::pair<int,int> >& its);
+    bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
+    void keepOnlySpatialDiscretization(TypeOfField tof, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its);
+    void keepOnlyGaussDiscretization(std::size_t idOfDisc, mcIdType &globalNum, std::vector< std::pair<mcIdType,mcIdType> >& its);
     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
-    DataArray *getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
-    void getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
-    MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId);
-    const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) const;
-    static MCAuto<MEDFileFieldPerMesh> Aggregate(int &start, const std::vector<const MEDFileFieldPerMesh *>& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, MEDFileAnyTypeField1TSWithoutSDA *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo);
+    DataArray *getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayIdType *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
+    void getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+    MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, mcIdType locId);
+    const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, mcIdType locId) const;
+    static MCAuto<MEDFileFieldPerMesh> Aggregate(mcIdType &start, const std::vector<const MEDFileFieldPerMesh *>& pms, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts, MEDFileAnyTypeField1TSWithoutSDA *father, std::vector<std::pair< int, std::pair<mcIdType,mcIdType> > >& extractInfo);
   private:
     int addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellType type);
     MEDCouplingFieldDouble *finishField(TypeOfField type, const MEDFileFieldGlobsReal *glob,
-                                        const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs, const MEDCouplingMesh *mesh, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+                                        const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs, const MEDCouplingMesh *mesh, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
     MEDCouplingFieldDouble *finishField2(TypeOfField type, const MEDFileFieldGlobsReal *glob,
-                                         const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
+                                         const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs,
                                          const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes,
-                                         const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+                                         const MEDCouplingMesh *mesh, const DataArrayIdType *da, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
     MEDCouplingFieldDouble *finishFieldNode2(const MEDFileFieldGlobsReal *glob,
-                                             const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
-                                             const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
-    DataArray *finishField4(const std::vector< std::pair<int,int> >& dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const;
+                                             const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs,
+                                             const MEDCouplingMesh *mesh, const DataArrayIdType *da, bool& isPfl, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+    DataArray *finishField4(const std::vector< std::pair<mcIdType,mcIdType> >& dads, const DataArrayIdType *pflIn, mcIdType nbOfElems, DataArrayIdType *&pflOut) const;
     void assignNewLeaves(const std::vector< MCAuto< MEDFileFieldPerMeshPerTypePerDisc > >& leaves);
     static void SortArraysPerType(const MEDFileFieldGlobsReal *glob, TypeOfField type, 
-                                  const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& locs,
-                                  std::vector<int>& code, std::vector<DataArrayInt *>& notNullPfls);
-    static int ComputeNbOfElems(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs);
+                                  const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<const DataArrayIdType *>& pfls, const std::vector<int>& locs,
+                                  std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& notNullPfls);
+    static mcIdType ComputeNbOfElems(const MEDFileFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<mcIdType,mcIdType> >& dads, const std::vector<int>& locs);
     MEDFileFieldPerMesh(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc, const MEDFileMesh *mm, const MEDFileEntities *entities);
     MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
-    MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const std::string& meshName, int meshIt, int meshOrd):_father(fath),_mesh_iteration(meshIt),_mesh_order(meshOrd) { }
+    MEDFileFieldPerMesh(MEDFileAnyTypeField1TSWithoutSDA *fath, const std::string& meshName, int meshIt, int meshOrd):_mesh_iteration(meshIt),_mesh_order(meshOrd),_father(fath) { }
   private:
     int _mesh_iteration;
     int _mesh_order;
index 26bdcb1be1ed9246c0211f8f11c41c35c905b3f0..3f19a60c9abcf960c1c3c6947e952040fbdfbc8d 100644 (file)
@@ -134,11 +134,11 @@ MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTSWithoutSDA::buil
 MEDFileAnyTypeFieldMultiTSWithoutSDA *MEDFileAnyTypeFieldMultiTSWithoutSDA::buildFromTimeStepIds2(int bg, int end, int step) const
 {
   static const char msg[]="MEDFileAnyTypeFieldMultiTSWithoutSDA::buildFromTimeStepIds2";
-  int nbOfEntriesToKeep=DataArrayInt::GetNumberOfItemGivenBESRelative(bg,end,step,msg);
+  mcIdType nbOfEntriesToKeep=DataArrayInt::GetNumberOfItemGivenBESRelative(bg,end,step,msg);
   MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> ret=createNew();
   ret->setInfo(_infos);
-  int sz=(int)_time_steps.size();
-  int j=bg;
+  std::size_t sz=_time_steps.size();
+  std::size_t j=bg;
   for(int i=0;i<nbOfEntriesToKeep;i++,j+=step)
     {
       if(j>=0 && j<sz)
@@ -368,12 +368,12 @@ DataArray *MEDFileAnyTypeFieldMultiTSWithoutSDA::getUndergroundDataArray(int ite
 /*!
  * See doc at MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt
  */
-DataArray *MEDFileAnyTypeFieldMultiTSWithoutSDA::getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const
+DataArray *MEDFileAnyTypeFieldMultiTSWithoutSDA::getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const
 {
   return getTimeStepEntry(iteration,order).getUndergroundDataArrayExt(entries);
 }
 
-bool MEDFileAnyTypeFieldMultiTSWithoutSDA::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N,
+bool MEDFileAnyTypeFieldMultiTSWithoutSDA::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N,
                                                                        MEDFileFieldGlobsReal& glob)
 {
   bool ret=false;
@@ -494,24 +494,24 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::loadStructureOrStructureAndBigArraysR
       {
         case MED_FLOAT64:
           {
-            _time_steps[i]=MEDFileField1TSWithoutSDA::New(getName(),getMeshName(),i+1,numdt,numo,_infos);
+            _time_steps[i]=MEDFileField1TSWithoutSDA::New(getName(),getMeshName(),i+1,FromMedInt<int>(numdt),FromMedInt<int>(numo),_infos);
             break;
           }
         case MED_INT32:
           {
-            _time_steps[i]=MEDFileIntField1TSWithoutSDA::New(getName(),getMeshName(),i+1,numdt,numo,_infos);
+            _time_steps[i]=MEDFileIntField1TSWithoutSDA::New(getName(),getMeshName(),i+1,FromMedInt<int>(numdt),FromMedInt<int>(numo),_infos);
             break;
           }
         case MED_FLOAT32:
           {
-            _time_steps[i]=MEDFileFloatField1TSWithoutSDA::New(getName(),getMeshName(),i+1,numdt,numo,_infos);
+            _time_steps[i]=MEDFileFloatField1TSWithoutSDA::New(getName(),getMeshName(),i+1,FromMedInt<int>(numdt),FromMedInt<int>(numo),_infos);
             break;
           }
         case MED_INT:
           {
             if(sizeof(med_int)==sizeof(int))
               {
-                _time_steps[i]=MEDFileIntField1TSWithoutSDA::New(getName(),getMeshName(),i+1,numdt,numo,_infos);
+                _time_steps[i]=MEDFileIntField1TSWithoutSDA::New(getName(),getMeshName(),i+1,FromMedInt<int>(numdt),FromMedInt<int>(numo),_infos);
                 break;
               }
           }
@@ -532,10 +532,10 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::writeLL(med_idt fid, const MEDFileWri
     throw INTERP_KERNEL::Exception("MEDFileFieldMultiTSWithoutSDA::writeLL : no time steps set !");
   checkThatNbOfCompoOfTSMatchThis();
   std::vector<std::string> infos(getInfo());
-  int nbComp=infos.size();
+  std::size_t nbComp=infos.size();
   INTERP_KERNEL::AutoPtr<char> comp=MEDLoaderBase::buildEmptyString(nbComp*MED_SNAME_SIZE);
   INTERP_KERNEL::AutoPtr<char> unit=MEDLoaderBase::buildEmptyString(nbComp*MED_SNAME_SIZE);
-  for(int i=0;i<nbComp;i++)
+  for(unsigned int i=0;i<nbComp;i++)
     {
       std::string info=infos[i];
       std::string c,u;
@@ -545,9 +545,9 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::writeLL(med_idt fid, const MEDFileWri
     }
   if(_name.empty())
     throw INTERP_KERNEL::Exception("MEDFileFieldMultiTSWithoutSDA::write : MED file does not accept field with empty name !");
-  MEDFILESAFECALLERWR0(MEDfieldCr,(fid,_name.c_str(),getMEDFileFieldType(),nbComp,comp,unit,getDtUnit().c_str(),getMeshName().c_str()));
-  int nbOfTS=_time_steps.size();
-  for(int i=0;i<nbOfTS;i++)
+  MEDFILESAFECALLERWR0(MEDfieldCr,(fid,_name.c_str(),getMEDFileFieldType(),ToMedInt(nbComp),comp,unit,getDtUnit().c_str(),getMeshName().c_str()));
+  std::size_t nbOfTS=_time_steps.size();
+  for(std::size_t i=0;i<nbOfTS;i++)
     _time_steps[i]->writeLL(fid,opts,*this);
 }
 
@@ -583,7 +583,7 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::unloadArrays()
 
 int MEDFileAnyTypeFieldMultiTSWithoutSDA::getNumberOfTS() const
 {
-  return _time_steps.size();
+  return (int)_time_steps.size();
 }
 
 void MEDFileAnyTypeFieldMultiTSWithoutSDA::eraseEmptyTS()
@@ -625,13 +625,13 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::eraseTimeStepIds(const int *startIds,
 void MEDFileAnyTypeFieldMultiTSWithoutSDA::eraseTimeStepIds2(int bg, int end, int step)
 {
   static const char msg[]="MEDFileAnyTypeFieldMultiTSWithoutSDA::eraseTimeStepIds2";
-  int nbOfEntriesToKill=DataArrayInt::GetNumberOfItemGivenBESRelative(bg,end,step,msg);
+  mcIdType nbOfEntriesToKill=DataArrayInt::GetNumberOfItemGivenBESRelative(bg,end,step,msg);
   if(nbOfEntriesToKill==0)
     return ;
   std::size_t sz=_time_steps.size();
   std::vector<bool> b(sz,true);
   int j=bg;
-  for(int i=0;i<nbOfEntriesToKill;i++,j+=step)
+  for(mcIdType i=0;i<nbOfEntriesToKill;i++,j+=step)
     b[j]=false;
   std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > newTS;
   for(std::size_t i=0;i<sz;i++)
@@ -683,9 +683,9 @@ int MEDFileAnyTypeFieldMultiTSWithoutSDA::getPosGivenTime(double time, double ep
 
 std::vector< std::pair<int,int> > MEDFileAnyTypeFieldMultiTSWithoutSDA::getIterations() const
 {
-  int lgth=_time_steps.size();
+  std::size_t lgth=_time_steps.size();
   std::vector< std::pair<int,int> > ret(lgth);
-  for(int i=0;i<lgth;i++)
+  for(std::size_t i=0;i<lgth;i++)
     _time_steps[i]->fillIteration(ret[i]);
   return ret;
 }
@@ -830,9 +830,9 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::changeLocsRefsNamesGen2(const std::ve
 
 std::vector< std::vector<TypeOfField> > MEDFileAnyTypeFieldMultiTSWithoutSDA::getTypesOfFieldAvailable() const
 {
-  int lgth=_time_steps.size();
+  std::size_t lgth=_time_steps.size();
   std::vector< std::vector<TypeOfField> > ret(lgth);
-  for(int i=0;i<lgth;i++)
+  for(std::size_t i=0;i<lgth;i++)
     _time_steps[i]->fillTypesOfFieldAvailable(ret[i]);
   return ret;
 }
@@ -840,7 +840,7 @@ std::vector< std::vector<TypeOfField> > MEDFileAnyTypeFieldMultiTSWithoutSDA::ge
 /*!
  * entry point for users that want to iterate into MEDFile DataStructure without any overhead.
  */
-std::vector< std::vector< std::pair<int,int> > > MEDFileAnyTypeFieldMultiTSWithoutSDA::getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const
+std::vector< std::vector< std::pair<mcIdType,mcIdType> > > MEDFileAnyTypeFieldMultiTSWithoutSDA::getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const
 {
   return getTimeStepEntry(iteration,order).getFieldSplitedByType(mname,types,typesF,pfls,locs);
 }
@@ -1049,7 +1049,7 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldNoProfileSBT(const MEDCoup
   _time_steps.push_back(obj);
 }
 
-void MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, bool smartPflKiller)
+void MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, bool smartPflKiller)
 {
   if(!field)
     throw INTERP_KERNEL::Exception("MEDFileIntFieldMultiTSWithoutSDA::appendFieldNoProfileSBT : input field is NULL !");
@@ -1076,7 +1076,7 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::setIteration(int i, MCAuto<MEDFileAny
   const MEDFileAnyTypeField1TSWithoutSDA *tsPtr(ts);
   if(tsPtr)
     {
-      if(tsPtr->getNumberOfComponents()!=(int)_infos.size())
+      if(tsPtr->getNumberOfComponents()!=_infos.size())
         {
           std::ostringstream oss; oss << "MEDFileAnyTypeFieldMultiTSWithoutSDA::setIteration : trying to set element with " << tsPtr->getNumberOfComponents() << " components ! Should be " << _infos.size() <<  " !";
           throw INTERP_KERNEL::Exception(oss.str());
@@ -1484,7 +1484,7 @@ std::vector< std::vector<TypeOfField> > MEDFileAnyTypeFieldMultiTS::getTypesOfFi
   return contentNotNullBase()->getTypesOfFieldAvailable();
 }
 
-std::vector< std::vector< std::pair<int,int> > > MEDFileAnyTypeFieldMultiTS::getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const
+std::vector< std::vector< std::pair<mcIdType,mcIdType> > > MEDFileAnyTypeFieldMultiTS::getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const
 {
   return contentNotNullBase()->getFieldSplitedByType(iteration,order,mname,types,typesF,pfls,locs);
 }
@@ -1951,7 +1951,7 @@ int MEDFileAnyTypeFieldMultiTS::CheckSupportAcrossTime(MEDFileAnyTypeFieldMultiT
 }
 
 template<class T>
-MCAuto<MEDFileAnyTypeField1TS> AggregateHelperF1TS(const std::vector< typename MLFieldTraits<T>::F1TSType const *>& f1tss, const std::vector< std::vector< std::pair<int,int> > >& dts)
+MCAuto<MEDFileAnyTypeField1TS> AggregateHelperF1TS(const std::vector< typename MLFieldTraits<T>::F1TSType const *>& f1tss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts)
 {
   MCAuto< typename MLFieldTraits<T>::F1TSType > ret(MLFieldTraits<T>::F1TSType::New());
   if(f1tss.empty())
@@ -1974,7 +1974,7 @@ MCAuto<MEDFileAnyTypeField1TS> AggregateHelperF1TS(const std::vector< typename M
 }
 
 template<class T>
-MCAuto< MEDFileAnyTypeFieldMultiTS > AggregateHelperFMTS(const std::vector< typename MLFieldTraits<T>::FMTSType const *>& fmtss, const std::vector< std::vector< std::pair<int,int> > >& dts)
+MCAuto< MEDFileAnyTypeFieldMultiTS > AggregateHelperFMTS(const std::vector< typename MLFieldTraits<T>::FMTSType const *>& fmtss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts)
 {
   MCAuto< typename MLFieldTraits<T>::FMTSType > ret(MLFieldTraits<T>::FMTSType::New());
   if(fmtss.empty())
@@ -2007,7 +2007,7 @@ MCAuto< MEDFileAnyTypeFieldMultiTS > AggregateHelperFMTS(const std::vector< type
 /*!
  * \a dts and \a ftmss are expected to have same size.
  */
-MCAuto<MEDFileAnyTypeFieldMultiTS> MEDFileAnyTypeFieldMultiTS::Aggregate(const std::vector<const MEDFileAnyTypeFieldMultiTS *>& fmtss, const std::vector< std::vector< std::pair<int,int> > >& dts)
+MCAuto<MEDFileAnyTypeFieldMultiTS> MEDFileAnyTypeFieldMultiTS::Aggregate(const std::vector<const MEDFileAnyTypeFieldMultiTS *>& fmtss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts)
 {
   if(fmtss.empty())
     throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTS::Aggregate : input vector is empty !");
index e51a9c9e9e0637b87722d8bdbd47f3e073d4ed42..dd7b082aa4939a90e6f71a4117219534c0a6aa83 100644 (file)
@@ -85,12 +85,12 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
     MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
     MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
-    MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, bool smartPflKiller);
-    MEDLOADER_EXPORT std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+    MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, bool smartPflKiller);
+    MEDLOADER_EXPORT std::vector< std::vector< std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
     MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
     MEDLOADER_EXPORT DataArray *getUndergroundDataArray(int iteration, int order) const;
-    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
-    MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal& glob);
+    MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+    MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
     MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
     MEDLOADER_EXPORT void loadStructureOrStructureAndBigArraysRecursively(med_idt fid, int nbPdt, med_field_type fieldTyp, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
     MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts) const;
@@ -265,12 +265,12 @@ namespace MEDCoupling
     MEDLOADER_EXPORT int getNumberOfComponents() const;
     MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
     MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
-    MEDLOADER_EXPORT std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+    MEDLOADER_EXPORT std::vector< std::vector< std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
     MEDLOADER_EXPORT MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> getContent();
   public:
     MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *buildNewEmpty() const = 0;
-    MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const = 0;
-    MEDLOADER_EXPORT static MCAuto<MEDFileAnyTypeFieldMultiTS> Aggregate(const std::vector<const MEDFileAnyTypeFieldMultiTS *>& fmtss, const std::vector< std::vector< std::pair<int,int> > >& dts);
+    MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const = 0;
+    MEDLOADER_EXPORT static MCAuto<MEDFileAnyTypeFieldMultiTS> Aggregate(const std::vector<const MEDFileAnyTypeFieldMultiTS *>& fmtss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts);
   public:
     MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
     MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
@@ -299,8 +299,8 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(const typename MLFieldTraits<T>::FMTSWSDAType& other, bool shallowCopyOfContent);
     MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
-    MEDLOADER_EXPORT typename MLFieldTraits<T>::FMTSType *extractPartImpl(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const;
-    MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
+    MEDLOADER_EXPORT typename MLFieldTraits<T>::FMTSType *extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
+    MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
     //
     MEDLOADER_EXPORT typename Traits<T>::FieldType *field(int iteration, int order, const MEDFileMesh *mesh) const;
     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
@@ -308,21 +308,21 @@ namespace MEDCoupling
     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
     MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
-    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const;
+    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const;
     //
     MEDLOADER_EXPORT void appendFieldNoProfileSBT(const typename Traits<T>::FieldType *field);
-    MEDLOADER_EXPORT void appendFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
-    MEDLOADER_EXPORT void appendFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
+    MEDLOADER_EXPORT void appendFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    MEDLOADER_EXPORT void appendFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     //
     MEDLOADER_EXPORT typename MLFieldTraits<T>::F1TSType *getTimeStepAtPos(int pos) const;
     MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArray(int iteration, int order) const;
-    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
+    MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
     MEDLOADER_EXPORT typename MLFieldTraits<T>::FMTSType *buildNewEmptyImpl() const;
     MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
   protected:
     const typename MLFieldTraits<T>::FMTSWSDAType *contentNotNull() const;
     typename MLFieldTraits<T>::FMTSWSDAType *contentNotNull();
-    void appendFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, bool smartPflKiller);
+    void appendFieldProfileGeneral(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, bool smartPflKiller);
   protected:
     ~MEDFileTemplateFieldMultiTS() { }
     MEDFileTemplateFieldMultiTS();
index 6064ef74434751397487729b751c2775f7de24ab..79545ebf86365279d87b68a358fd954f2f97a5e6 100644 (file)
@@ -42,9 +42,9 @@ MEDFileMeshStruct *MEDFileMeshStruct::New(const MEDFileMesh *mesh)
 std::size_t MEDFileMeshStruct::getHeapMemorySizeWithoutChildren() const
 {
   std::size_t ret(0);
-  for(std::vector< std::vector<int> >::const_iterator it0=_geo_types_distrib.begin();it0!=_geo_types_distrib.end();it0++)
+  for(std::vector< std::vector<mcIdType> >::const_iterator it0=_geo_types_distrib.begin();it0!=_geo_types_distrib.end();it0++)
     ret+=(*it0).capacity()*sizeof(int);
-  ret+=_geo_types_distrib.capacity()*sizeof(std::vector<int>);
+  ret+=_geo_types_distrib.capacity()*sizeof(std::vector<mcIdType>);
   return ret;
 }
 
@@ -69,7 +69,7 @@ MEDFileMeshStruct::MEDFileMeshStruct(const MEDFileMesh *mesh):_mesh(mesh)
 int MEDFileMeshStruct::getLevelOfGeoType(INTERP_KERNEL::NormalizedCellType t) const
 {
   int j=0;
-  for(std::vector< std::vector<int> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++,j--)
+  for(std::vector< std::vector<mcIdType> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++,j--)
     {
       std::size_t sz=(*it1).size();
       if(sz%3!=0)
@@ -85,9 +85,9 @@ int MEDFileMeshStruct::getLevelOfGeoType(INTERP_KERNEL::NormalizedCellType t) co
 /*!
  * \sa MEDFileMeshStruct::doesManageGeoType
  */
-int MEDFileMeshStruct::getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const
+mcIdType MEDFileMeshStruct::getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const
 {
-  for(std::vector< std::vector<int> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++)
+  for(std::vector< std::vector<mcIdType> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++)
     {
       std::size_t sz=(*it1).size();
       if(sz%3!=0)
@@ -105,7 +105,7 @@ int MEDFileMeshStruct::getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellTy
  */
 bool MEDFileMeshStruct::doesManageGeoType(INTERP_KERNEL::NormalizedCellType t) const
 {
-  for(std::vector< std::vector<int> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++)
+  for(std::vector< std::vector<mcIdType> >::const_iterator it1=_geo_types_distrib.begin();it1!=_geo_types_distrib.end();it1++)
     {
       std::size_t sz=(*it1).size();
       if(sz%3!=0)
@@ -131,7 +131,7 @@ void MEDFileMeshStruct::appendIfImplicitType(INTERP_KERNEL::NormalizedCellType t
   std::size_t nbGeo(sz/3);
   if(nbGeo!=1)
     throw INTERP_KERNEL::Exception(MSG);
-  std::vector<int> arr(3); arr[0]=(int)t; arr[1]=_mesh->buildImplicitPartIfAny(t); arr[2]=-1;
+  std::vector<mcIdType> arr(3); arr[0]=(mcIdType)t; arr[1]=_mesh->buildImplicitPartIfAny(t); arr[2]=-1;
   _geo_types_distrib.push_back(arr);
 }
 
@@ -180,7 +180,7 @@ MEDMeshMultiLev *MEDMeshMultiLev::New(const MEDFileMesh *m, const std::vector<in
   throw INTERP_KERNEL::Exception("MEDMeshMultiLev::New : unrecognized type of mesh ! Must be in [MEDFileUMesh,MEDFileCMesh,MEDFileCurveLinearMesh] !");
 }
 
-MEDMeshMultiLev *MEDMeshMultiLev::New(const MEDFileMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities)
+MEDMeshMultiLev *MEDMeshMultiLev::New(const MEDFileMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities)
 {
   if(!m)
     throw INTERP_KERNEL::Exception("MEDMeshMultiLev::New 2 : null input pointer !");
@@ -196,25 +196,25 @@ MEDMeshMultiLev *MEDMeshMultiLev::New(const MEDFileMesh *m, const std::vector<IN
   throw INTERP_KERNEL::Exception("MEDMeshMultiLev::New 2 : unrecognized type of mesh ! Must be in [MEDFileUMesh,MEDFileCMesh,MEDFileCurveLinearMesh] !");
 }
 
-MEDMeshMultiLev *MEDMeshMultiLev::NewOnlyOnNode(const MEDFileMesh *m, const DataArrayInt *pflOnNode)
+MEDMeshMultiLev *MEDMeshMultiLev::NewOnlyOnNode(const MEDFileMesh *m, const DataArrayIdType *pflOnNode)
 {
   MCAuto<MEDMeshMultiLev> ret(MEDMeshMultiLev::New(m,m->getNonEmptyLevels()));
   ret->selectPartOfNodes(pflOnNode);
   return ret.retn();
 }
 
-void MEDMeshMultiLev::setNodeReduction(const DataArrayInt *nr)
+void MEDMeshMultiLev::setNodeReduction(const DataArrayIdType *nr)
 {
   if(nr)
     nr->incrRef();
-  _node_reduction=const_cast<DataArrayInt*>(nr);
+  _node_reduction=const_cast<DataArrayIdType*>(nr);
 }
 
-void MEDMeshMultiLev::setCellReduction(const DataArrayInt *cr)
+void MEDMeshMultiLev::setCellReduction(const DataArrayIdType *cr)
 {
   if(_pfls.size()!=1)
     throw INTERP_KERNEL::Exception("MEDMeshMultiLev::setCellReduction : can be used only for single geo type mesh !");
-  _pfls[0]=const_cast<DataArrayInt*>(cr);
+  _pfls[0]=const_cast<DataArrayIdType*>(cr);
   if(cr)
     cr->incrRef();
 }
@@ -227,7 +227,7 @@ bool MEDMeshMultiLev::isFastlyTheSameStruct(const MEDFileField1TSStructItem& fst
         throw INTERP_KERNEL::Exception("MEDMeshMultiLev::isFastlyTheSameStruct : unexpected situation for nodes !");
       const MEDFileField1TSStructItem2& p(fst[0]);
       std::string pflName(p.getPflName());
-      const DataArrayInt *nr(_node_reduction);
+      const DataArrayIdType *nr(_node_reduction);
       if(pflName.empty() && !nr)
         return true;
       if(!pflName.empty() && !nr)
@@ -241,8 +241,8 @@ bool MEDMeshMultiLev::isFastlyTheSameStruct(const MEDFileField1TSStructItem& fst
       std::size_t sz(fst.getNumberOfItems());
       if(sz!=_geo_types.size())
         return false;
-      int strt(0);
-      for(std::size_t i=0;i<sz;i++)
+      mcIdType strt(0);
+      for(unsigned int i=0;i<sz;i++)
         {
           const MEDFileField1TSStructItem2& p(fst[i]);
           if(!p.isFastlyEqual(strt,_geo_types[i],getPflNameOfId(i).c_str()))
@@ -265,33 +265,33 @@ DataArray *MEDMeshMultiLev::buildDataArray(const MEDFileField1TSStructItem& fst,
  * \param [out] famIds - Can be null. If not null the instance has to be dealt by the caller (decrRef).
  * \param [out] isWithoutCopy - When true the returned instance \a famIds if not null is directly those in the data structure.
  */
-void MEDMeshMultiLev::retrieveFamilyIdsOnCells(DataArrayInt *& famIds, bool& isWithoutCopy) const
+void MEDMeshMultiLev::retrieveFamilyIdsOnCells(DataArrayIdType *& famIds, bool& isWithoutCopy) const
 {
-  const DataArrayInt *fids(_cell_fam_ids);
+  const DataArrayIdType *fids(_cell_fam_ids);
   if(!fids)
     { famIds=0; isWithoutCopy=true; return ; }
   std::size_t sz(_geo_types.size());
   bool presenceOfPfls(false);
   for(std::size_t i=0;i<sz && !presenceOfPfls;i++)
     {
-      const DataArrayInt *pfl(_pfls[i]);
+      const DataArrayIdType *pfl(_pfls[i]);
       if(pfl)
         presenceOfPfls=true;
     }
   if(!presenceOfPfls)
-    { famIds=const_cast<DataArrayInt *>(fids); famIds->incrRef(); isWithoutCopy=_mesh->isObjectInTheProgeny(famIds); return ; }
+    { famIds=const_cast<DataArrayIdType *>(fids); famIds->incrRef(); isWithoutCopy=_mesh->isObjectInTheProgeny(famIds); return ; }
   //bad luck the slowest part
   isWithoutCopy=false;
-  std::vector< MCAuto<DataArrayInt> > retSafe(sz);
-  std::vector< const DataArrayInt *> ret(sz);
-  int start(0);
+  std::vector< MCAuto<DataArrayIdType> > retSafe(sz);
+  std::vector< const DataArrayIdType *> ret(sz);
+  mcIdType start(0);
   for(std::size_t i=0;i<sz;i++)
     {
-      const DataArrayInt *pfl(_pfls[i]);
-      int lgth(_nb_entities[i]);
+      const DataArrayIdType *pfl(_pfls[i]);
+      mcIdType lgth(_nb_entities[i]);
       if(pfl)
         {
-          MCAuto<DataArrayInt> tmp(fids->selectByTupleIdSafeSlice(start,start+lgth,1));
+          MCAuto<DataArrayIdType> tmp(fids->selectByTupleIdSafeSlice(start,start+lgth,1));
           retSafe[i]=tmp->selectByTupleIdSafe(pfl->begin(),pfl->end());
         }
       else
@@ -301,40 +301,40 @@ void MEDMeshMultiLev::retrieveFamilyIdsOnCells(DataArrayInt *& famIds, bool& isW
       ret[i]=retSafe[i];
       start+=lgth;
     }
-  famIds=DataArrayInt::Aggregate(ret);
+  famIds=DataArrayIdType::Aggregate(ret);
 }
 
 /*!
  * \param [out] numIds - Can be null. If not null the instance has to be dealt by the caller (decrRef).
  * \param [out] isWithoutCopy - When true the returned instance \a numIds if not null is directly those in the data structure.
  */
-void MEDMeshMultiLev::retrieveNumberIdsOnCells(DataArrayInt *& numIds, bool& isWithoutCopy) const
+void MEDMeshMultiLev::retrieveNumberIdsOnCells(DataArrayIdType *& numIds, bool& isWithoutCopy) const
 {
-  const DataArrayInt *nids(_cell_num_ids);
+  const DataArrayIdType *nids(_cell_num_ids);
   if(!nids)
     { numIds=0; isWithoutCopy=true; return ; }
   std::size_t sz(_geo_types.size());
   bool presenceOfPfls(false);
   for(std::size_t i=0;i<sz && !presenceOfPfls;i++)
     {
-      const DataArrayInt *pfl(_pfls[i]);
+      const DataArrayIdType *pfl(_pfls[i]);
       if(pfl)
         presenceOfPfls=true;
     }
   if(!presenceOfPfls)
-    { numIds=const_cast<DataArrayInt *>(nids); numIds->incrRef(); isWithoutCopy=_mesh->isObjectInTheProgeny(numIds); return ; }
+    { numIds=const_cast<DataArrayIdType *>(nids); numIds->incrRef(); isWithoutCopy=_mesh->isObjectInTheProgeny(numIds); return ; }
   //bad luck the slowest part
   isWithoutCopy=false;
-  std::vector< MCAuto<DataArrayInt> > retSafe(sz);
-  std::vector< const DataArrayInt *> ret(sz);
-  int start(0);
+  std::vector< MCAuto<DataArrayIdType> > retSafe(sz);
+  std::vector< const DataArrayIdType *> ret(sz);
+  mcIdType start(0);
   for(std::size_t i=0;i<sz;i++)
     {
-      const DataArrayInt *pfl(_pfls[i]);
-      int lgth(_nb_entities[i]);
+      const DataArrayIdType *pfl(_pfls[i]);
+      mcIdType lgth(_nb_entities[i]);
       if(pfl)
         {
-          MCAuto<DataArrayInt> tmp(nids->selectByTupleIdSafeSlice(start,start+lgth,1));
+          MCAuto<DataArrayIdType> tmp(nids->selectByTupleIdSafeSlice(start,start+lgth,1));
           retSafe[i]=tmp->selectByTupleIdSafe(pfl->begin(),pfl->end());
         }
       else
@@ -344,19 +344,19 @@ void MEDMeshMultiLev::retrieveNumberIdsOnCells(DataArrayInt *& numIds, bool& isW
       ret[i]=retSafe[i];
       start+=lgth;
     }
-  numIds=DataArrayInt::Aggregate(ret);
+  numIds=DataArrayIdType::Aggregate(ret);
 }
 
 /*!
  * \param [out] famIds - Can be null. If not null the instance has to be dealt by the caller (decrRef).
  * \param [out] isWithoutCopy - When true the returned instance \a famIds if not null is directly those in the data structure.
  */
-void MEDMeshMultiLev::retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isWithoutCopy) const
+void MEDMeshMultiLev::retrieveFamilyIdsOnNodes(DataArrayIdType *& famIds, bool& isWithoutCopy) const
 {
-  const DataArrayInt *fids(_node_fam_ids);
+  const DataArrayIdType *fids(_node_fam_ids);
   if(!fids)
     { famIds=0; isWithoutCopy=true; return ; }
-  const DataArrayInt *nr(_node_reduction);
+  const DataArrayIdType *nr(_node_reduction);
   if(nr)
     {
       isWithoutCopy=false;
@@ -364,7 +364,7 @@ void MEDMeshMultiLev::retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isW
     }
   else
     {
-      famIds=const_cast<DataArrayInt *>(fids); famIds->incrRef();
+      famIds=const_cast<DataArrayIdType *>(fids); famIds->incrRef();
       isWithoutCopy=_mesh->isObjectInTheProgeny(famIds);
     }
 }
@@ -373,12 +373,12 @@ void MEDMeshMultiLev::retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isW
  * \param [out] numIds - Can be null. If not null the instance has to be dealt by the caller (decrRef).
  * \param [out] isWithoutCopy - When true the returned instance \a numIds if not null is directly those in the data structure.
  */
-void MEDMeshMultiLev::retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isWithoutCopy) const
+void MEDMeshMultiLev::retrieveNumberIdsOnNodes(DataArrayIdType *& numIds, bool& isWithoutCopy) const
 {
-  const DataArrayInt *fids(_node_num_ids);
+  const DataArrayIdType *fids(_node_num_ids);
   if(!fids)
     { numIds=0; isWithoutCopy=true; return ; }
-  const DataArrayInt *nr(_node_reduction);
+  const DataArrayIdType *nr(_node_reduction);
   if(nr)
     {
       isWithoutCopy=false;
@@ -386,7 +386,7 @@ void MEDMeshMultiLev::retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isW
     }
   else
     {
-      numIds=const_cast<DataArrayInt *>(fids); numIds->incrRef();
+      numIds=const_cast<DataArrayIdType *>(fids); numIds->incrRef();
       isWithoutCopy=_mesh->isObjectInTheProgeny(numIds);
     }
 }
@@ -395,7 +395,7 @@ void MEDMeshMultiLev::retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isW
  * This method returns, if any, a new object containing the global node ids **BUT CONTRARY TO OTHER RETRIEVE METHODS** the returned object is always a NON AGGREGATED object. So the returned object if not null
  * can be used as this safely.
  */
-DataArrayInt *MEDMeshMultiLev::retrieveGlobalNodeIdsIfAny() const
+DataArrayIdType *MEDMeshMultiLev::retrieveGlobalNodeIdsIfAny() const
 {
   const MEDFileUMesh *umesh(dynamic_cast<const MEDFileUMesh *>(_mesh));
   if(!umesh)
@@ -403,12 +403,12 @@ DataArrayInt *MEDMeshMultiLev::retrieveGlobalNodeIdsIfAny() const
   const PartDefinition *pd(umesh->getPartDefAtLevel(1));
   if(!pd)
     return 0;
-  MCAuto<DataArrayInt> tmp(pd->toDAI());
-  const DataArrayInt *tmpCpp(tmp);
+  MCAuto<DataArrayIdType> tmp(pd->toDAI());
+  const DataArrayIdType *tmpCpp(tmp);
   if(!tmpCpp)
     return 0;
   //
-  const DataArrayInt *nr(_node_reduction);
+  const DataArrayIdType *nr(_node_reduction);
   if(nr)
     return tmp->selectByTupleIdSafe(nr->begin(),nr->end());
   else
@@ -420,28 +420,28 @@ std::vector< INTERP_KERNEL::NormalizedCellType > MEDMeshMultiLev::getGeoTypes()
   return _geo_types;
 }
 
-void MEDMeshMultiLev::setFamilyIdsOnCells(DataArrayInt *famIds)
+void MEDMeshMultiLev::setFamilyIdsOnCells(DataArrayIdType *famIds)
 {
   _cell_fam_ids=famIds;
   if(famIds)
     famIds->incrRef();
 }
 
-void MEDMeshMultiLev::setNumberIdsOnCells(DataArrayInt *numIds)
+void MEDMeshMultiLev::setNumberIdsOnCells(DataArrayIdType *numIds)
 {
   _cell_num_ids=numIds;
   if(numIds)
     numIds->incrRef();
 }
 
-void MEDMeshMultiLev::setFamilyIdsOnNodes(DataArrayInt *famIds)
+void MEDMeshMultiLev::setFamilyIdsOnNodes(DataArrayIdType *famIds)
 {
   _node_fam_ids=famIds;
   if(famIds)
     famIds->incrRef();
 }
 
-void MEDMeshMultiLev::setNumberIdsOnNodes(DataArrayInt *numIds)
+void MEDMeshMultiLev::setNumberIdsOnNodes(DataArrayIdType *numIds)
 {
   _node_num_ids=numIds;
   if(numIds)
@@ -453,7 +453,7 @@ std::string MEDMeshMultiLev::getPflNameOfId(int id) const
   std::size_t sz(_pfls.size());
   if(id<0 || id>=(int)sz)
     throw INTERP_KERNEL::Exception("MEDMeshMultiLev::getPflNameOfId : invalid input id !");
-  const DataArrayInt *pfl(_pfls[id]);
+  const DataArrayIdType *pfl(_pfls[id]);
   if(!pfl)
     return std::string("");
   return pfl->getName();
@@ -463,7 +463,7 @@ std::string MEDMeshMultiLev::getPflNameOfId(int id) const
  * Returns the number of cells having geometric type \a t.
  * The profiles are **NOT** taken into account here.
  */
-int MEDMeshMultiLev::getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const
+mcIdType MEDMeshMultiLev::getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const
 {
   std::size_t sz(_nb_entities.size());
   for(std::size_t i=0;i<sz;i++)
@@ -472,7 +472,7 @@ int MEDMeshMultiLev::getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const
   throw INTERP_KERNEL::Exception("MEDMeshMultiLev::getNumberOfCells : not existing geometric type in this !");
 }
 
-int MEDMeshMultiLev::getNumberOfNodes() const
+mcIdType MEDMeshMultiLev::getNumberOfNodes() const
 {
   return _nb_nodes;
 }
@@ -485,26 +485,26 @@ DataArray *MEDMeshMultiLev::constructDataArray(const MEDFileField1TSStructItem&
         throw INTERP_KERNEL::Exception("MEDMeshMultiLev::constructDataArray : unexpected situation for nodes !");
       const MEDFileField1TSStructItem2& p(fst[0]);
       std::string pflName(p.getPflName());
-      const DataArrayInt *nr(_node_reduction);
+      const DataArrayIdType *nr(_node_reduction);
       if(pflName.empty() && !nr)
         return vals->deepCopy();
       if(pflName.empty() && nr)
         throw INTERP_KERNEL::Exception("MEDMeshMultiLev::constructDataArray : unexpected situation for nodes 2 !");
       if(!pflName.empty() && nr)
         {
-          MCAuto<DataArrayInt> p1(globs->getProfile(pflName.c_str())->deepCopy());
-          MCAuto<DataArrayInt> p2(nr->deepCopy());
+          MCAuto<DataArrayIdType> p1(globs->getProfile(pflName.c_str())->deepCopy());
+          MCAuto<DataArrayIdType> p2(nr->deepCopy());
           p1->sort(true); p2->sort(true);
           if(!p1->isEqualWithoutConsideringStr(*p2))
             throw INTERP_KERNEL::Exception("MEDMeshMultiLev::constructDataArray : it appears that a profile on nodes does not cover the cells correctly !");
-          p1=DataArrayInt::FindPermutationFromFirstToSecond(globs->getProfile(pflName.c_str()),nr);
+          p1=DataArrayIdType::FindPermutationFromFirstToSecond(globs->getProfile(pflName.c_str()),nr);
           MCAuto<DataArray> ret(vals->deepCopy());
           ret->renumberInPlace(p1->begin());
           return ret.retn();
         }
       if(!pflName.empty() && !nr)
         {
-          MCAuto<DataArrayInt> p1(globs->getProfile(pflName.c_str())->deepCopy());
+          MCAuto<DataArrayIdType> p1(globs->getProfile(pflName.c_str())->deepCopy());
           p1->sort(true);
           if(!p1->isIota(getNumberOfNodes()))
             throw INTERP_KERNEL::Exception("MEDMeshMultiLev::constructDataArray : unexpected situation for nodes 4 !");
@@ -523,11 +523,11 @@ DataArray *MEDMeshMultiLev::constructDataArray(const MEDFileField1TSStructItem&
       std::vector< const DataArray *> arr(s.size());
       std::vector< MCAuto<DataArray> > arrSafe(s.size());
       int iii(0);
-      int nc(vals->getNumberOfComponents());
+      mcIdType nc(ToIdType(vals->getNumberOfComponents()));
       std::vector<std::string> compInfo(vals->getInfoOnComponents());
       for(std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator it=_geo_types.begin();it!=_geo_types.end();it++,iii++)
         {
-          const DataArrayInt *thisP(_pfls[iii]);
+          const DataArrayIdType *thisP(_pfls[iii]);
           std::vector<const MEDFileField1TSStructItem2 *> ps;
           for(std::size_t i=0;i<sz;i++)
             {
@@ -540,7 +540,7 @@ DataArray *MEDMeshMultiLev::constructDataArray(const MEDFileField1TSStructItem&
           if(ps.size()==1)
             {
               int nbi(ps[0]->getNbOfIntegrationPts(globs));
-              const DataArrayInt *otherP(ps[0]->getPfl(globs));
+              const DataArrayIdType *otherP(ps[0]->getPfl(globs));
               const std::pair<int,int>& strtStop(ps[0]->getStartStop());
               MCAuto<DataArray> ret(vals->selectByTupleIdSafeSlice(strtStop.first,strtStop.second,1));
               if(!thisP && !otherP)
@@ -550,8 +550,8 @@ DataArray *MEDMeshMultiLev::constructDataArray(const MEDFileField1TSStructItem&
                 }
               if(thisP && otherP)
                 {
-                  MCAuto<DataArrayInt> p1(otherP->invertArrayN2O2O2N(getNumberOfCells(ps[0]->getGeo())));
-                  MCAuto<DataArrayInt> p2(thisP->deepCopy());
+                  MCAuto<DataArrayIdType> p1(otherP->invertArrayN2O2O2N(getNumberOfCells(ps[0]->getGeo())));
+                  MCAuto<DataArrayIdType> p2(thisP->deepCopy());
                   p2->transformWithIndArr(p1->begin(),p1->end());
                   //p1=p2->findIdsNotEqual(-1);
                   //p1=p2->selectByTupleIdSafe(p1->begin(),p1->end());
@@ -561,10 +561,10 @@ DataArray *MEDMeshMultiLev::constructDataArray(const MEDFileField1TSStructItem&
                 }
               if(!thisP && otherP)
                 {
-                  MCAuto<DataArrayInt> p1(otherP->deepCopy());
+                  MCAuto<DataArrayIdType> p1(otherP->deepCopy());
                   p1->sort(true);
                   p1->checkAllIdsInRange(0,getNumberOfCells(ps[0]->getGeo()));
-                  p1=DataArrayInt::FindPermutationFromFirstToSecond(otherP,p1);
+                  p1=DataArrayIdType::FindPermutationFromFirstToSecond(otherP,p1);
                   ret->rearrange(nbi*nc); ret->renumberInPlace(p1->begin()); ret->rearrange(nc); ret->setInfoOnComponents(compInfo);
                   arrSafe[iii]=ret; arr[iii]=ret;
                   continue;
@@ -573,47 +573,47 @@ DataArray *MEDMeshMultiLev::constructDataArray(const MEDFileField1TSStructItem&
             }
           else
             {
-              std::vector< const DataArrayInt * >otherPS(ps.size());
+              std::vector< const DataArrayIdType * >otherPS(ps.size());
               std::vector< const DataArray * > arr2(ps.size());
               std::vector< MCAuto<DataArray> > arr2Safe(ps.size());
-              std::vector< const DataArrayInt * > nbis(ps.size());
-              std::vector< MCAuto<DataArrayInt> > nbisSafe(ps.size());
+              std::vector< const DataArrayIdType * > nbis(ps.size());
+              std::vector< MCAuto<DataArrayIdType> > nbisSafe(ps.size());
               int jj(0);
               for(std::vector<const MEDFileField1TSStructItem2 *>::const_iterator it2=ps.begin();it2!=ps.end();it2++,jj++)
                 {
                   int nbi((*it2)->getNbOfIntegrationPts(globs));
-                  const DataArrayInt *otherPfl((*it2)->getPfl(globs));
+                  const DataArrayIdType *otherPfl((*it2)->getPfl(globs));
                   const std::pair<int,int>& strtStop((*it2)->getStartStop());
                   MCAuto<DataArray> ret2(vals->selectByTupleIdSafeSlice(strtStop.first,strtStop.second,1));
                   if(!otherPfl)
                     throw INTERP_KERNEL::Exception("MEDMeshMultiLev::constructDataArray : unexpected situation for cells 4 !");
                   arr2[jj]=ret2; arr2Safe[jj]=ret2; otherPS[jj]=otherPfl;
-                  nbisSafe[jj]=DataArrayInt::New(); nbisSafe[jj]->alloc(otherPfl->getNumberOfTuples(),1); nbisSafe[jj]->fillWithValue(nbi);
+                  nbisSafe[jj]=DataArrayIdType::New(); nbisSafe[jj]->alloc(otherPfl->getNumberOfTuples(),1); nbisSafe[jj]->fillWithValue(nbi);
                   nbis[jj]=nbisSafe[jj];
                 }
               MCAuto<DataArray> arr3(DataArray::Aggregate(arr2));
-              MCAuto<DataArrayInt> otherP(DataArrayInt::Aggregate(otherPS));
-              MCAuto<DataArrayInt> zenbis(DataArrayInt::Aggregate(nbis));
-              MCAuto<DataArrayInt> otherPN(otherP->invertArrayN2O2O2N(getNumberOfCells(*it)));
-              MCAuto<DataArrayInt> p1;
+              MCAuto<DataArrayIdType> otherP(DataArrayIdType::Aggregate(otherPS));
+              MCAuto<DataArrayIdType> zenbis(DataArrayIdType::Aggregate(nbis));
+              MCAuto<DataArrayIdType> otherPN(otherP->invertArrayN2O2O2N(getNumberOfCells(*it)));
+              MCAuto<DataArrayIdType> p1;
               if(thisP)
-                p1=DataArrayInt::FindPermutationFromFirstToSecond(otherP,thisP);
+                p1=DataArrayIdType::FindPermutationFromFirstToSecond(otherP,thisP);
               else
                 p1=otherP->deepCopy();
-              MCAuto<DataArrayInt> zenbisN(zenbis->renumber(p1->begin()));
+              MCAuto<DataArrayIdType> zenbisN(zenbis->renumber(p1->begin()));
               zenbisN->computeOffsetsFull();
               jj=0;
               for(std::vector<const MEDFileField1TSStructItem2 *>::const_iterator it2=ps.begin();it2!=ps.end();it2++,jj++)
                 {
                   //int nbi((*it2)->getNbOfIntegrationPts(globs));
-                  const DataArrayInt *otherPfl((*it2)->getPfl(globs));
+                  const DataArrayIdType *otherPfl((*it2)->getPfl(globs));
                   const std::pair<int,int>& strtStop((*it2)->getStartStop());
                   MCAuto<DataArray> ret2(vals->selectByTupleIdSafeSlice(strtStop.first,strtStop.second,1));
                   //
-                  MCAuto<DataArrayInt> p2(otherPfl->deepCopy());
+                  MCAuto<DataArrayIdType> p2(otherPfl->deepCopy());
                   p2->transformWithIndArr(otherPN->begin(),otherPN->end());
                   p2->transformWithIndArr(p1->begin(),p1->end());
-                  MCAuto<DataArrayInt> idsN(p2->buildExplicitArrByRanges(zenbisN));
+                  MCAuto<DataArrayIdType> idsN(p2->buildExplicitArrByRanges(zenbisN));
                   arr3->setPartOfValuesBase3(ret2,idsN->begin(),idsN->end(),0,nc,1);
                 }
               arrSafe[iii]=arr3; arr[iii]=arr3;
@@ -627,43 +627,43 @@ DataArray *MEDMeshMultiLev::constructDataArray(const MEDFileField1TSStructItem&
 /*!
  * This method is called to add NORM_POINT1 cells in \a this so that orphan nodes in \a verticesToAdd will be fetched.
  */
-void MEDMeshMultiLev::appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr)
+void MEDMeshMultiLev::appendVertices(const DataArrayIdType *verticesToAdd, DataArrayIdType *nr)
 {
-  int nbOfVertices(verticesToAdd->getNumberOfTuples());
+  mcIdType nbOfVertices(verticesToAdd->getNumberOfTuples());
   std::size_t sz(_pfls.size());
   _pfls.resize(sz+1);
   _geo_types.resize(sz+1,INTERP_KERNEL::NORM_POINT1);
   _nb_entities.resize(sz+1,nbOfVertices);
   _node_reduction=nr; nr->incrRef();
   _nb_nodes+=nbOfVertices;
-  const DataArrayInt *cf(_cell_fam_ids),*cn(_cell_num_ids),*nf(_node_fam_ids),*nn(_node_num_ids);
+  const DataArrayIdType *cf(_cell_fam_ids),*cn(_cell_num_ids),*nf(_node_fam_ids),*nn(_node_num_ids);
   if(cf)
     {
-      MCAuto<DataArrayInt> tmp;
-      std::vector<const DataArrayInt *> a(2);
+      MCAuto<DataArrayIdType> tmp;
+      std::vector<const DataArrayIdType *> a(2);
       a[0]=cf;
       if(nf)
         tmp=nf->selectByTupleIdSafe(verticesToAdd->begin(),verticesToAdd->end());
       else
         {
-          tmp=DataArrayInt::New(); tmp->alloc(nbOfVertices,1); tmp->fillWithZero();
+          tmp=DataArrayIdType::New(); tmp->alloc(nbOfVertices,1); tmp->fillWithZero();
         }
       a[1]=tmp;
-      _cell_fam_ids=DataArrayInt::Aggregate(a);
+      _cell_fam_ids=DataArrayIdType::Aggregate(a);
     }
   if(cn)
     {
-      MCAuto<DataArrayInt> tmp;
-      std::vector<const DataArrayInt *> a(2);
+      MCAuto<DataArrayIdType> tmp;
+      std::vector<const DataArrayIdType *> a(2);
       a[0]=cn;
       if(nn)
         tmp=nn->selectByTupleIdSafe(verticesToAdd->begin(),verticesToAdd->end());
       else
         {
-          tmp=DataArrayInt::New(); tmp->alloc(nbOfVertices,1); tmp->fillWithZero();
+          tmp=DataArrayIdType::New(); tmp->alloc(nbOfVertices,1); tmp->fillWithZero();
         }
       a[1]=tmp;
-      _cell_num_ids=DataArrayInt::Aggregate(a);
+      _cell_num_ids=DataArrayIdType::Aggregate(a);
     }
 }
 
@@ -671,7 +671,7 @@ MEDMeshMultiLev::MEDMeshMultiLev(const MEDFileMesh *mesh):_mesh(mesh),_nb_nodes(
 {
 }
 
-MEDMeshMultiLev::MEDMeshMultiLev(const MEDFileMesh *mesh, int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):_mesh(mesh),_geo_types(gts),_nb_entities(nbEntities),_nb_nodes(nbNodes)
+MEDMeshMultiLev::MEDMeshMultiLev(const MEDFileMesh *mesh, mcIdType nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities):_mesh(mesh),_geo_types(gts),_nb_entities(nbEntities),_nb_nodes(nbNodes)
 {
   std::size_t sz(_geo_types.size());
   if(sz!=pfls.size() || sz!=nbEntities.size())
@@ -681,7 +681,7 @@ MEDMeshMultiLev::MEDMeshMultiLev(const MEDFileMesh *mesh, int nbNodes, const std
     {
       if(pfls[i])
         pfls[i]->incrRef();
-      _pfls[i]=const_cast<DataArrayInt *>(pfls[i]);
+      _pfls[i]=const_cast<DataArrayIdType *>(pfls[i]);
     }
 }
 
@@ -730,16 +730,16 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>
   bool cellFamIdsNoCpy(levs.size()==1);
   if(cellFamIdsNoCpy)
     {
-      const DataArrayInt *tmp(m->getFamilyFieldAtLevel(levs[0]));
+      const DataArrayIdType *tmp(m->getFamilyFieldAtLevel(levs[0]));
       if(tmp)
         {
           tmp->incrRef();
-          _cell_fam_ids=(const_cast<DataArrayInt *>(tmp));
+          _cell_fam_ids=(const_cast<DataArrayIdType *>(tmp));
         }
     }
   else
     {
-      std::vector<const DataArrayInt *> tmps(levs.size());
+      std::vector<const DataArrayIdType *> tmps(levs.size());
       bool f(true);
       for(std::size_t i=0;i<levs.size();i++)
         {
@@ -748,21 +748,21 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>
             f=false;
         }
       if(f && !tmps.empty())
-        _cell_fam_ids=DataArrayInt::Aggregate(tmps);
+        _cell_fam_ids=DataArrayIdType::Aggregate(tmps);
     }
   bool cellNumIdsNoCpy(levs.size()==1);
   if(cellNumIdsNoCpy)
     {
-      const DataArrayInt *tmp(m->getNumberFieldAtLevel(levs[0]));
+      const DataArrayIdType *tmp(m->getNumberFieldAtLevel(levs[0]));
       if(tmp)
         {
           tmp->incrRef();
-          _cell_num_ids=(const_cast<DataArrayInt *>(tmp));
+          _cell_num_ids=(const_cast<DataArrayIdType *>(tmp));
         }
     }
   else
     {
-      std::vector<const DataArrayInt *> tmps(levs.size());
+      std::vector<const DataArrayIdType *> tmps(levs.size());
       bool n(true);
       for(std::size_t i=0;i<levs.size();i++)
         {
@@ -771,33 +771,33 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>
             n=false;
         }
       if(n && !tmps.empty())
-        _cell_num_ids=DataArrayInt::Aggregate(tmps);
+        _cell_num_ids=DataArrayIdType::Aggregate(tmps);
     }
   // node part
   {
-    const DataArrayInt *tmp(m->getFamilyFieldAtLevel(1));
+    const DataArrayIdType *tmp(m->getFamilyFieldAtLevel(1));
     if(tmp)
       {
         tmp->incrRef();
-        _node_fam_ids=(const_cast<DataArrayInt *>(tmp));
+        _node_fam_ids=(const_cast<DataArrayIdType *>(tmp));
       }
   }
   {
-    const DataArrayInt *tmp(m->getNumberFieldAtLevel(1));
+    const DataArrayIdType *tmp(m->getNumberFieldAtLevel(1));
     if(tmp)
       {
         tmp->incrRef();
-        _node_num_ids=(const_cast<DataArrayInt *>(tmp));
+        _node_num_ids=(const_cast<DataArrayIdType *>(tmp));
       }
   }
 }
 
-MEDUMeshMultiLev *MEDUMeshMultiLev::New(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities)
+MEDUMeshMultiLev *MEDUMeshMultiLev::New(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities)
 {
   return new MEDUMeshMultiLev(m,gts,pfls,nbEntities);
 }
 
-MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDMeshMultiLev(m,m->getNumberOfNodes(),gts,pfls,nbEntities)
+MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities):MEDMeshMultiLev(m,m->getNumberOfNodes(),gts,pfls,nbEntities)
 {
   std::size_t sz(gts.size());
   if(sz<1)
@@ -820,23 +820,23 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTE
   int lev((int)dim-m->getMeshDimension());
   if(isSameDim && isNoPfl && m->getGeoTypesAtLevel(lev)==gts)//optimized part
     {
-      const DataArrayInt *famIds(m->getFamilyFieldAtLevel(lev));
+      const DataArrayIdType *famIds(m->getFamilyFieldAtLevel(lev));
       if(famIds)
-        { _cell_fam_ids=const_cast<DataArrayInt*>(famIds); famIds->incrRef(); }
-      const DataArrayInt *numIds(m->getNumberFieldAtLevel(lev));
+        { _cell_fam_ids=const_cast<DataArrayIdType*>(famIds); famIds->incrRef(); }
+      const DataArrayIdType *numIds(m->getNumberFieldAtLevel(lev));
       if(numIds)
-        { _cell_num_ids=const_cast<DataArrayInt*>(numIds); numIds->incrRef(); }
+        { _cell_num_ids=const_cast<DataArrayIdType*>(numIds); numIds->incrRef(); }
       famIds=m->getFamilyFieldAtLevel(1);
       if(famIds)
-        { _node_fam_ids=const_cast<DataArrayInt*>(famIds); famIds->incrRef(); }
+        { _node_fam_ids=const_cast<DataArrayIdType*>(famIds); famIds->incrRef(); }
       numIds=m->getNumberFieldAtLevel(1);
       if(numIds)
-        { _node_num_ids=const_cast<DataArrayInt*>(numIds); numIds->incrRef(); }
+        { _node_num_ids=const_cast<DataArrayIdType*>(numIds); numIds->incrRef(); }
       return ;
     }
   //
-  std::vector< MCAuto<DataArrayInt> > famIdsSafe(sz);
-  std::vector<const DataArrayInt *> famIds(sz);
+  std::vector< MCAuto<DataArrayIdType> > famIdsSafe(sz);
+  std::vector<const DataArrayIdType *> famIds(sz);
   bool f(true);
   for(std::size_t i=0;i<sz;i++)
     {
@@ -846,9 +846,9 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTE
         f=false;
     }
   if(f)
-    _cell_fam_ids=DataArrayInt::Aggregate(famIds);
-  std::vector< MCAuto<DataArrayInt> > numIdsSafe(sz);
-  std::vector<const DataArrayInt *> numIds(sz);
+    _cell_fam_ids=DataArrayIdType::Aggregate(famIds);
+  std::vector< MCAuto<DataArrayIdType> > numIdsSafe(sz);
+  std::vector<const DataArrayIdType *> numIds(sz);
   bool n(true);
   for(std::size_t i=0;i<sz;i++)
     {
@@ -858,35 +858,35 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTE
         n=false;
     }
   if(n)
-    _cell_num_ids=DataArrayInt::Aggregate(numIds);
+    _cell_num_ids=DataArrayIdType::Aggregate(numIds);
   // node ids management
-  const DataArrayInt *nodeFamIds(m->getFamilyFieldAtLevel(1));
+  const DataArrayIdType *nodeFamIds(m->getFamilyFieldAtLevel(1));
   if(nodeFamIds)
-    { _node_fam_ids=const_cast<DataArrayInt*>(nodeFamIds); nodeFamIds->incrRef(); }
-  const DataArrayInt *nodeNumIds(m->getNumberFieldAtLevel(1));
+    { _node_fam_ids=const_cast<DataArrayIdType*>(nodeFamIds); nodeFamIds->incrRef(); }
+  const DataArrayIdType *nodeNumIds(m->getNumberFieldAtLevel(1));
   if(nodeNumIds)
-    { _node_num_ids=const_cast<DataArrayInt*>(nodeNumIds); nodeNumIds->incrRef(); }
+    { _node_num_ids=const_cast<DataArrayIdType*>(nodeNumIds); nodeNumIds->incrRef(); }
 }
 
-void MEDUMeshMultiLev::selectPartOfNodes(const DataArrayInt *pflNodes)
+void MEDUMeshMultiLev::selectPartOfNodes(const DataArrayIdType *pflNodes)
 {
   if(!pflNodes || !pflNodes->isAllocated())
     return ;
   std::size_t sz(_parts.size());
-  std::vector< MCAuto<DataArrayInt> > a(sz);
-  std::vector< const DataArrayInt *> aa(sz);
+  std::vector< MCAuto<DataArrayIdType> > a(sz);
+  std::vector< const DataArrayIdType *> aa(sz);
   for(std::size_t i=0;i<sz;i++)
     {
-      const DataArrayInt *pfl(_pfls[i]);
+      const DataArrayIdType *pfl(_pfls[i]);
       MCAuto<MEDCoupling1GTUMesh> m(_parts[i]);
       if(pfl)
         m=dynamic_cast<MEDCoupling1GTUMesh *>(_parts[i]->buildPartOfMySelfKeepCoords(pfl->begin(),pfl->end()));
-      DataArrayInt *cellIds=0;
+      DataArrayIdType *cellIds=0;
       m->fillCellIdsToKeepFromNodeIds(pflNodes->begin(),pflNodes->end(),true,cellIds);
-      MCAuto<DataArrayInt> cellIdsSafe(cellIds);
+      MCAuto<DataArrayIdType> cellIdsSafe(cellIds);
       MCAuto<MEDCouplingPointSet> m2(m->buildPartOfMySelfKeepCoords(cellIds->begin(),cellIds->end()));
-      int tmp=-1;
-      MCAuto<DataArrayInt> o2n(m2->getNodeIdsInUse(tmp));
+      mcIdType tmp=-1;
+      MCAuto<DataArrayIdType> o2n(m2->getNodeIdsInUse(tmp));
       a[i]=o2n->invertArrayO2N2N2O(tmp); aa[i]=a[i];
       if(pfl)
         _pfls[i]=pfl->selectByTupleIdSafe(cellIds->begin(),cellIds->end());
@@ -894,7 +894,7 @@ void MEDUMeshMultiLev::selectPartOfNodes(const DataArrayInt *pflNodes)
         _pfls[i]=cellIdsSafe;
     }
   if(!aa.empty())
-    _node_reduction=DataArrayInt::Aggregate(aa);//general case
+    _node_reduction=DataArrayIdType::Aggregate(aa);//general case
   else
     _node_reduction=pflNodes->deepCopy();//case where no cells in read mesh.
   _node_reduction->sort(true);
@@ -904,9 +904,9 @@ void MEDUMeshMultiLev::selectPartOfNodes(const DataArrayInt *pflNodes)
   if(_node_reduction->getNumberOfTuples()>pflNodes->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::selectPartOfNodes : internal error in MEDCoupling during cell select from a list of nodes !");
   // Here the cells available in _parts is not enough to cover all the nodes in pflNodes. So adding vertices cells in _parts...
-  MCAuto<DataArrayInt> pflNodes2(pflNodes->deepCopy());
+  MCAuto<DataArrayIdType> pflNodes2(pflNodes->deepCopy());
   pflNodes2->sort(true);
-  MCAuto<DataArrayInt> diff(pflNodes2->buildSubstractionOptimized(_node_reduction));
+  MCAuto<DataArrayIdType> diff(pflNodes2->buildSubstractionOptimized(_node_reduction));
   appendVertices(diff,pflNodes2);
 }
 
@@ -933,7 +933,7 @@ MEDUMeshMultiLev::MEDUMeshMultiLev(const MEDStructuredMeshMultiLev& other, const
  * If returned value is false output pointer \a coords is not the internal pointer. If returned value is true output pointer \a coords is directly the internal pointer.
  * If true is returned, the \a coords output parameter should be used with care (non const method call) to avoid to change the internal state of MEDFileUMesh instance.
  */
-bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *&types, DataArrayInt *&cellLocations, DataArrayInt *& cells, DataArrayInt *&faceLocations, DataArrayInt *&faces) const
+bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *&types, DataArrayIdType *&cellLocations, DataArrayIdType *& cells, DataArrayIdType *&faceLocations, DataArrayIdType *&faces) const
 {
   const DataArrayDouble *tmp(0);
   if(_parts.empty())
@@ -943,7 +943,7 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
   if(!tmp)
     throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::getVTUArrays : the coordinates are null !");
   MCAuto<DataArrayDouble> a(const_cast<DataArrayDouble *>(tmp)); tmp->incrRef();
-  int szBCE(0),szD(0),szF(0);
+  mcIdType szBCE(0),szD(0),szF(0);
   bool isPolyh(false);
   int iii(0);
   for(std::vector< MCAuto<MEDCoupling1GTUMesh> >::const_iterator it=_parts.begin();it!=_parts.end();it++,iii++)
@@ -952,45 +952,45 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
       if(!cur)
         throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::getVTUArrays : a part is null !");
       //
-      const DataArrayInt *pfl(_pfls[iii]);
+      const DataArrayIdType *pfl(_pfls[iii]);
       MCAuto<MEDCoupling1GTUMesh> cur2;
       if(!pfl)
         { cur2=const_cast<MEDCoupling1GTUMesh *>(cur); cur2->incrRef(); }
       else
         { cur2=dynamic_cast<MEDCoupling1GTUMesh *>(cur->buildPartOfMySelfKeepCoords(pfl->begin(),pfl->end())); cur=cur2; }
       //
-      int curNbCells(cur->getNumberOfCells());
+      mcIdType curNbCells(cur->getNumberOfCells());
       szBCE+=curNbCells;
       if((*it)->getCellModelEnum()!=INTERP_KERNEL::NORM_POLYHED)
         szD+=cur->getNodalConnectivity()->getNumberOfTuples()+curNbCells;
       else
         {
           isPolyh=true;
-          MCAuto<DataArrayInt> tmp2(cur->computeEffectiveNbOfNodesPerCell());
-          szD+=tmp2->accumulate(0)+curNbCells;
+          MCAuto<DataArrayIdType> tmp2(cur->computeEffectiveNbOfNodesPerCell());
+          szD+=tmp2->accumulate((std::size_t)0)+curNbCells;
           szF+=2*curNbCells+cur->getNodalConnectivity()->getNumberOfTuples();
         }
     }
   MCAuto<DataArrayByte> b(DataArrayByte::New()); b->alloc(szBCE,1); char *bPtr(b->getPointer());
-  MCAuto<DataArrayInt> c(DataArrayInt::New()); c->alloc(szBCE,1); int *cPtr(c->getPointer());
-  MCAuto<DataArrayInt> d(DataArrayInt::New()); d->alloc(szD,1); int *dPtr(d->getPointer());
-  MCAuto<DataArrayInt> e(DataArrayInt::New()),f(DataArrayInt::New()); int *ePtr(0),*fPtr(0);
+  MCAuto<DataArrayIdType> c(DataArrayIdType::New()); c->alloc(szBCE,1); mcIdType *cPtr(c->getPointer());
+  MCAuto<DataArrayIdType> d(DataArrayIdType::New()); d->alloc(szD,1); mcIdType *dPtr(d->getPointer());
+  MCAuto<DataArrayIdType> e(DataArrayIdType::New()),f(DataArrayIdType::New()); mcIdType *ePtr(0),*fPtr(0);
   if(isPolyh)
     { e->alloc(szBCE,1); ePtr=e->getPointer(); f->alloc(szF,1); fPtr=f->getPointer(); }
-  int k(0);
+  mcIdType k(0);
   iii=0;
   for(std::vector< MCAuto<MEDCoupling1GTUMesh> >::const_iterator it=_parts.begin();it!=_parts.end();it++,iii++)
     {
       const MEDCoupling1GTUMesh *cur(*it);
       //
-      const DataArrayInt *pfl(_pfls[iii]);
+      const DataArrayIdType *pfl(_pfls[iii]);
       MCAuto<MEDCoupling1GTUMesh> cur2;
       if(!pfl)
         { cur2=const_cast<MEDCoupling1GTUMesh *>(cur); cur2->incrRef(); }
       else
         { cur2=dynamic_cast<MEDCoupling1GTUMesh *>(cur->buildPartOfMySelfKeepCoords(pfl->begin(),pfl->end())); cur=cur2; }
       //
-      int curNbCells(cur->getNumberOfCells());
+      mcIdType curNbCells(cur->getNumberOfCells());
       int gt((int)cur->getCellModelEnum());
       if(gt<0 || gt>=PARAMEDMEM_2_VTKTYPE_LGTH)
         throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::getVTUArrays : invalid geometric type !");
@@ -1000,15 +1000,15 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
       std::fill(bPtr,bPtr+curNbCells,gtvtk); bPtr+=curNbCells;
       const MEDCoupling1SGTUMesh *scur(dynamic_cast<const MEDCoupling1SGTUMesh *>(cur));
       const MEDCoupling1DGTUMesh *dcur(dynamic_cast<const MEDCoupling1DGTUMesh *>(cur));
-      const int *connPtr(cur->getNodalConnectivity()->begin());
+      const mcIdType *connPtr(cur->getNodalConnectivity()->begin());
       if(!scur && !dcur)
         throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::getVTUArrays : internal error !");
       if(scur)
         {
           if(cur->getCellModelEnum()!=INTERP_KERNEL::NORM_HEXA27)
             {
-              int nnpc(scur->getNumberOfNodesPerCell());
-              for(int i=0;i<curNbCells;i++,connPtr+=nnpc)
+              mcIdType nnpc(scur->getNumberOfNodesPerCell());
+              for(mcIdType i=0;i<curNbCells;i++,connPtr+=nnpc)
                 {
                   *dPtr++=nnpc;
                   dPtr=std::copy(connPtr,connPtr+nnpc,dPtr);
@@ -1017,7 +1017,7 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
             }
           else
             {
-              for(int i=0;i<curNbCells;i++,connPtr+=27)
+              for(mcIdType i=0;i<curNbCells;i++,connPtr+=27)
                 {
                   *dPtr++=27;
                   for(int j=0;j<27;j++,dPtr++)
@@ -1030,7 +1030,7 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
         }
       else
         {
-          const int *connIPtr(dcur->getNodalConnectivityIndex()->begin());
+          const mcIdType *connIPtr(dcur->getNodalConnectivityIndex()->begin());
           if(cur->getCellModelEnum()!=INTERP_KERNEL::NORM_POLYHED)
             {
               for(int i=0;i<curNbCells;i++,connIPtr++)
@@ -1042,12 +1042,12 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
             }
           else
             {
-              for(int i=0;i<curNbCells;i++,connIPtr++)
+              for(mcIdType i=0;i<curNbCells;i++,connIPtr++)
                 {
-                  std::set<int> s(connPtr+connIPtr[0],connPtr+connIPtr[1]); s.erase(-1);
-                  *dPtr++=(int)s.size();
+                  std::set<mcIdType> s(connPtr+connIPtr[0],connPtr+connIPtr[1]); s.erase(-1);
+                  *dPtr++=(mcIdType)s.size();
                   dPtr=std::copy(s.begin(),s.end(),dPtr);
-                  *cPtr++=k; k+=(int)s.size()+1;
+                  *cPtr++=k; k+=(mcIdType)s.size()+1;
                 }
             }
           if(isPolyh)
@@ -1057,16 +1057,16 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
                 { std::fill(ePtr,ePtr+curNbCells,-1); ePtr+=curNbCells; }
               else
                 {
-                  int kk(0);
+                  mcIdType kk(0);
                   for(int i=0;i<curNbCells;i++,connIPtr++)
                     {
-                      int nbFace(std::count(connPtr+connIPtr[0],connPtr+connIPtr[1],-1)+1);
+                      mcIdType nbFace(ToIdType(std::count(connPtr+connIPtr[0],connPtr+connIPtr[1],-1)+1));
                       *fPtr++=nbFace;
-                      const int *work(connPtr+connIPtr[0]);
+                      const mcIdType *work(connPtr+connIPtr[0]);
                       for(int j=0;j<nbFace;j++)
                         {
-                          const int *work2=std::find(work,connPtr+connIPtr[1],-1);
-                          *fPtr++=std::distance(work,work2);
+                          const mcIdType *work2=std::find(work,connPtr+connIPtr[1],-1);
+                          *fPtr++=ToIdType(std::distance(work,work2));
                           fPtr=std::copy(work,work2,fPtr);
                           work=work2+1;
                         }
@@ -1090,9 +1090,9 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *
   return _mesh->isObjectInTheProgeny(coords);
 }
 
-void MEDUMeshMultiLev::reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords, DataArrayInt *nodalConnVTK, DataArrayInt *polyhedNodalConnVTK) const
+void MEDUMeshMultiLev::reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords, DataArrayIdType *nodalConnVTK, DataArrayIdType *polyhedNodalConnVTK) const
 {
-  const DataArrayInt *nr(_node_reduction);
+  const DataArrayIdType *nr(_node_reduction);
   if(!nr)
     return ;
   if(nodalConnVTK->empty() && !polyhedNodalConnVTK)
@@ -1100,13 +1100,13 @@ void MEDUMeshMultiLev::reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords,
       coords=(coords->selectByTupleIdSafe(nr->begin(),nr->end()));
       return ;
     }
-  int sz(coords->getNumberOfTuples());
+  mcIdType sz(coords->getNumberOfTuples());
   std::vector<bool> b(sz,false);
-  const int *work(nodalConnVTK->begin()),*endW(nodalConnVTK->end());
+  const mcIdType *work(nodalConnVTK->begin()),*endW(nodalConnVTK->end());
   while(work!=endW)
     {
-      int nb(*work++);
-      for(int i=0;i<nb && work!=endW;i++,work++)
+      mcIdType nb(*work++);
+      for(mcIdType i=0;i<nb && work!=endW;i++,work++)
         {
           if(*work>=0 && *work<sz)
             b[*work]=true;
@@ -1119,11 +1119,11 @@ void MEDUMeshMultiLev::reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords,
       work=polyhedNodalConnVTK->begin(); endW=polyhedNodalConnVTK->end();
       while(work!=endW)
         {
-          int nb(*work++);
-          for(int i=0;i<nb && work!=endW;i++)
+          mcIdType nb(*work++);
+          for(mcIdType i=0;i<nb && work!=endW;i++)
             {
-              int nb2(*work++);
-              for(int j=0;j<nb2 && work!=endW;j++,work++)
+              mcIdType nb2(*work++);
+              for(mcIdType j=0;j<nb2 && work!=endW;j++,work++)
                 {
                   if(*work>=0 && *work<sz)
                     b[*work]=true;
@@ -1133,24 +1133,24 @@ void MEDUMeshMultiLev::reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords,
             }
         }
     }
-  int szExp(std::count(b.begin(),b.end(),true));
-  if(szExp!=nr->getNumberOfTuples())
+  std::size_t szExp(std::count(b.begin(),b.end(),true));
+  if(ToIdType(szExp)!=nr->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("MEDUMeshMultiLev::reorderNodesIfNecessary : internal error #3 !");
   // Go renumbering !
-  MCAuto<DataArrayInt> o2n(DataArrayInt::New()); o2n->alloc(sz,1);
-  int *o2nPtr(o2n->getPointer());
+  MCAuto<DataArrayIdType> o2n(DataArrayIdType::New()); o2n->alloc(sz,1);
+  mcIdType *o2nPtr(o2n->getPointer());
   int newId(0);
   for(int i=0;i<sz;i++,o2nPtr++)
     if(b[i]) *o2nPtr=newId++; else *o2nPtr=-1;
-  const int *o2nPtrc(o2n->begin());
-  MCAuto<DataArrayInt> n2o(o2n->invertArrayO2N2N2O(nr->getNumberOfTuples()));
-  MCAuto<DataArrayInt> perm(DataArrayInt::FindPermutationFromFirstToSecond(n2o,nr));
-  const int *permPtr(perm->begin());
-  int *work2(nodalConnVTK->getPointer()),*endW2(nodalConnVTK->getPointer()+nodalConnVTK->getNumberOfTuples());
+  const mcIdType *o2nPtrc(o2n->begin());
+  MCAuto<DataArrayIdType> n2o(o2n->invertArrayO2N2N2O(nr->getNumberOfTuples()));
+  MCAuto<DataArrayIdType> perm(DataArrayIdType::FindPermutationFromFirstToSecond(n2o,nr));
+  const mcIdType *permPtr(perm->begin());
+  mcIdType *work2(nodalConnVTK->getPointer()),*endW2(nodalConnVTK->getPointer()+nodalConnVTK->getNumberOfTuples());
   while(work2!=endW2)
     {
-      int nb(*work2++);
-      for(int i=0;i<nb && work2!=endW2;i++,work2++)
+      mcIdType nb(*work2++);
+      for(mcIdType i=0;i<nb && work2!=endW2;i++,work2++)
         *work2=permPtr[o2nPtrc[*work2]];
     }
   if(polyhedNodalConnVTK)
@@ -1158,11 +1158,11 @@ void MEDUMeshMultiLev::reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords,
       work2=polyhedNodalConnVTK->getPointer(); endW2=polyhedNodalConnVTK->getPointer()+polyhedNodalConnVTK->getNumberOfTuples();
       while(work2!=endW2)
         {
-          int nb(*work2++);
-          for(int i=0;i<nb && work2!=endW2;i++)
+          mcIdType nb(*work2++);
+          for(mcIdType i=0;i<nb && work2!=endW2;i++)
             {
-              int nb2(*work2++);
-              for(int j=0;j<nb2 && work2!=endW2;j++,work2++)
+              mcIdType nb2(*work2++);
+              for(mcIdType j=0;j<nb2 && work2!=endW2;j++,work2++)
                 *work2=permPtr[o2nPtrc[*work2]];
             }
         }
@@ -1171,15 +1171,15 @@ void MEDUMeshMultiLev::reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords,
 }
 
 
-void MEDUMeshMultiLev::appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr)
+void MEDUMeshMultiLev::appendVertices(const DataArrayIdType *verticesToAdd, DataArrayIdType *nr)
 {
-  int nbOfCells(verticesToAdd->getNumberOfTuples());//it is not a bug cells are NORM_POINT1
+  mcIdType nbOfCells(verticesToAdd->getNumberOfTuples());//it is not a bug cells are NORM_POINT1
   MEDMeshMultiLev::appendVertices(verticesToAdd,nr);
   MCAuto<MEDCoupling1SGTUMesh> elt(MEDCoupling1SGTUMesh::New("",INTERP_KERNEL::NORM_POINT1));
   elt->allocateCells(nbOfCells);
-  for(int i=0;i<nbOfCells;i++)
+  for(mcIdType i=0;i<nbOfCells;i++)
     {
-      int pt(verticesToAdd->getIJ(i,0));
+      mcIdType pt(verticesToAdd->getIJ(i,0));
       elt->insertNextCell(&pt,&pt+1);
     }
   if(_parts.empty())
@@ -1196,7 +1196,7 @@ MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh
   initStdFieldOfIntegers(m);
 }
 
-MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, int nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDMeshMultiLev(m,nbOfNodes,gts,pfls,nbEntities),_is_internal(true)
+MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, mcIdType nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities):MEDMeshMultiLev(m,nbOfNodes,gts,pfls,nbEntities),_is_internal(true)
 {
   initStdFieldOfIntegers(m);
 }
@@ -1208,18 +1208,18 @@ MEDStructuredMeshMultiLev::MEDStructuredMeshMultiLev(const MEDStructuredMeshMult
 void MEDStructuredMeshMultiLev::initStdFieldOfIntegers(const MEDFileStructuredMesh *m)
 {
   // ids fields management
-  const DataArrayInt *tmp(0);
+  const DataArrayIdType *tmp(0);
   tmp=m->getFamilyFieldAtLevel(0);
   if(tmp)
     {
       tmp->incrRef();
-      _cell_fam_ids=const_cast<DataArrayInt *>(tmp);
+      _cell_fam_ids=const_cast<DataArrayIdType *>(tmp);
     }
   tmp=m->getNumberFieldAtLevel(0);
   if(tmp)
     {
       tmp->incrRef();
-      _cell_num_ids=const_cast<DataArrayInt *>(tmp);
+      _cell_num_ids=const_cast<DataArrayIdType *>(tmp);
     }
   //
   tmp=0;
@@ -1227,26 +1227,26 @@ void MEDStructuredMeshMultiLev::initStdFieldOfIntegers(const MEDFileStructuredMe
   if(tmp)
     {
       tmp->incrRef();
-      _node_fam_ids=const_cast<DataArrayInt *>(tmp);
+      _node_fam_ids=const_cast<DataArrayIdType *>(tmp);
     }
   tmp=m->getNumberFieldAtLevel(1);
   if(tmp)
     {
       tmp->incrRef();
-      _node_num_ids=const_cast<DataArrayInt *>(tmp);
+      _node_num_ids=const_cast<DataArrayIdType *>(tmp);
     }
   // faces (if any)
   tmp=m->getFamilyFieldAtLevel(-1);
   if(tmp)
     {
       tmp->incrRef();
-      _face_fam_ids=const_cast<DataArrayInt *>(tmp);
+      _face_fam_ids=const_cast<DataArrayIdType *>(tmp);
     }
   tmp=m->getNumberFieldAtLevel(-1);
   if(tmp)
     {
       tmp->incrRef();
-      _face_num_ids=const_cast<DataArrayInt *>(tmp);
+      _face_num_ids=const_cast<DataArrayIdType *>(tmp);
     }
 }
 
@@ -1269,7 +1269,7 @@ bool MEDStructuredMeshMultiLev::prepareForImplicitUnstructuredMeshCase(MEDMeshMu
   MEDCoupling1GTUMesh *facesIfPresent((static_cast<const MEDFileStructuredMesh *>(_mesh))->getImplicitFaceMesh());
   if(!facesIfPresent)
     return false;
-  const DataArrayInt *pfl(0),*nr(_node_reduction);
+  const DataArrayIdType *pfl(0),*nr(_node_reduction);
   if(!_pfls.empty())
     pfl=_pfls[0];
   MCAuto<MEDCoupling1GTUMesh> facesIfPresent2(facesIfPresent); facesIfPresent->incrRef();
@@ -1285,39 +1285,39 @@ bool MEDStructuredMeshMultiLev::prepareForImplicitUnstructuredMeshCase(MEDMeshMu
 
 void MEDStructuredMeshMultiLev::dealWithImplicitUnstructuredMesh(const MEDFileMesh *m)
 {
-  const DataArrayInt *tmp(0);
+  const DataArrayIdType *tmp(0);
   tmp=m->getFamilyFieldAtLevel(-1);
   if(tmp)
     {
       tmp->incrRef();
-      _cell_fam_ids=const_cast<DataArrayInt *>(tmp);
+      _cell_fam_ids=const_cast<DataArrayIdType *>(tmp);
     }
   tmp=m->getNumberFieldAtLevel(-1);
   if(tmp)
     {
       tmp->incrRef();
-      _cell_num_ids=const_cast<DataArrayInt *>(tmp);
+      _cell_num_ids=const_cast<DataArrayIdType *>(tmp);
     }
 }
 
-void MEDStructuredMeshMultiLev::selectPartOfNodes(const DataArrayInt *pflNodes)
+void MEDStructuredMeshMultiLev::selectPartOfNodes(const DataArrayIdType *pflNodes)
 {
   if(!pflNodes || !pflNodes->isAllocated())
     return ;
-  std::vector<int> ngs(getNodeGridStructure());
-  MCAuto<DataArrayInt> conn(MEDCouplingStructuredMesh::Build1GTNodalConnectivity(&ngs[0],&ngs[0]+ngs.size()));
-  MCAuto<MEDCoupling1SGTUMesh> m(MEDCoupling1SGTUMesh::New("",MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(ngs.size())));
+  std::vector<mcIdType> ngs(getNodeGridStructure());
+  MCAuto<DataArrayIdType> conn(MEDCouplingStructuredMesh::Build1GTNodalConnectivity(&ngs[0],&ngs[0]+ngs.size()));
+  MCAuto<MEDCoupling1SGTUMesh> m(MEDCoupling1SGTUMesh::New("",MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension((int)ngs.size())));
   m->setNodalConnectivity(conn);
-  const DataArrayInt *pfl(_pfls[0]);
+  const DataArrayIdType *pfl(_pfls[0]);
   if(pfl)
     {
       m=dynamic_cast<MEDCoupling1SGTUMesh *>(m->buildPartOfMySelfKeepCoords(pfl->begin(),pfl->end()));
     }
-  DataArrayInt *cellIds=0;
+  DataArrayIdType *cellIds=0;
   m->fillCellIdsToKeepFromNodeIds(pflNodes->begin(),pflNodes->end(),true,cellIds);
-  MCAuto<DataArrayInt> cellIdsSafe(cellIds);
+  MCAuto<DataArrayIdType> cellIdsSafe(cellIds);
   MCAuto<MEDCouplingPointSet> m2(m->buildPartOfMySelfKeepCoords(cellIds->begin(),cellIds->end()));
-  int tmp=-1;
+  mcIdType tmp=-1;
   _node_reduction=m2->getNodeIdsInUse(tmp);
   if(pfl)
     _pfls[0]=pfl->selectByTupleIdSafe(cellIds->begin(),cellIds->end());
@@ -1332,7 +1332,7 @@ MEDCMeshMultiLev *MEDCMeshMultiLev::New(const MEDFileCMesh *m, const std::vector
   return new MEDCMeshMultiLev(m,levs);
 }
 
-MEDCMeshMultiLev *MEDCMeshMultiLev::New(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities)
+MEDCMeshMultiLev *MEDCMeshMultiLev::New(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities)
 {
   return new MEDCMeshMultiLev(m,gts,pfls,nbEntities);
 }
@@ -1355,7 +1355,7 @@ MEDCMeshMultiLev::MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<int>
     }
 }
 
-MEDCMeshMultiLev::MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDStructuredMeshMultiLev(m,m->getNumberOfNodes(),gts,pfls,nbEntities)
+MEDCMeshMultiLev::MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities):MEDStructuredMeshMultiLev(m,m->getNumberOfNodes(),gts,pfls,nbEntities)
 {
   if(!m)
     throw INTERP_KERNEL::Exception("MEDCMeshMultiLev constructor 2 : null input pointer !");
@@ -1382,9 +1382,9 @@ MEDCMeshMultiLev::MEDCMeshMultiLev(const MEDCMeshMultiLev& other):MEDStructuredM
 {
 }
 
-std::vector<int> MEDCMeshMultiLev::getNodeGridStructure() const
+std::vector<mcIdType> MEDCMeshMultiLev::getNodeGridStructure() const
 {
-  std::vector<int> ret(_coords.size());
+  std::vector<mcIdType> ret(_coords.size());
   for(std::size_t i=0;i<_coords.size();i++)
     ret[i]=_coords[i]->getNumberOfTuples();
   return ret;
@@ -1395,16 +1395,16 @@ MEDMeshMultiLev *MEDCMeshMultiLev::prepare() const
   MEDMeshMultiLev *retSpecific(0);
   if(prepareForImplicitUnstructuredMeshCase(retSpecific))
     return retSpecific;
-  const DataArrayInt *pfl(0),*nr(_node_reduction);
+  const DataArrayIdType *pfl(0),*nr(_node_reduction);
   if(!_pfls.empty())
     pfl=_pfls[0];
-  MCAuto<DataArrayInt> nnr;
-  std::vector<int> cgs,ngs(getNodeGridStructure());
+  MCAuto<DataArrayIdType> nnr;
+  std::vector<mcIdType> cgs,ngs(getNodeGridStructure());
   cgs.resize(ngs.size());
-  std::transform(ngs.begin(),ngs.end(),cgs.begin(),std::bind2nd(std::plus<int>(),-1));
+  std::transform(ngs.begin(),ngs.end(),cgs.begin(),std::bind2nd(std::plus<mcIdType>(),-1));
   if(pfl)
     {
-      std::vector< std::pair<int,int> > cellParts;
+      std::vector< std::pair<mcIdType,mcIdType> > cellParts;
       MCAuto<MEDMeshMultiLev> ret2;
       if(MEDCouplingStructuredMesh::IsPartStructured(pfl->begin(),pfl->end(),cgs,cellParts))
         {
@@ -1423,7 +1423,7 @@ MEDMeshMultiLev *MEDCMeshMultiLev::prepare() const
       else
         {
           MCAuto<MEDCouplingCMesh> m(MEDCouplingCMesh::New());
-          for(std::size_t i=0;i<ngs.size();i++)
+          for(unsigned int i=0;i<ngs.size();i++)
             m->setCoordsAt(i,_coords[i]);
           MCAuto<MEDCoupling1SGTUMesh> m2(m->build1SGTUnstructured());
           MCAuto<MEDCoupling1GTUMesh> m3=dynamic_cast<MEDCoupling1GTUMesh *>(m2->buildPartOfMySelfKeepCoords(pfl->begin(),pfl->end()));
@@ -1432,15 +1432,15 @@ MEDMeshMultiLev *MEDCMeshMultiLev::prepare() const
             { m3->zipCoords(); nnr=nr->deepCopy(); nnr->sort(true); ret->setNodeReduction(nnr); }
           ret2=(MEDUMeshMultiLev *)ret; ret2->incrRef();
         }
-      const DataArrayInt *famIds(_cell_fam_ids),*numIds(_cell_num_ids);
+      const DataArrayIdType *famIds(_cell_fam_ids),*numIds(_cell_num_ids);
       if(famIds)
         {
-          MCAuto<DataArrayInt> tmp(famIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
+          MCAuto<DataArrayIdType> tmp(famIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
           ret2->setFamilyIdsOnCells(tmp);
         }
       if(numIds)
         {
-          MCAuto<DataArrayInt> tmp(numIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
+          MCAuto<DataArrayIdType> tmp(numIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
           ret2->setNumberIdsOnCells(tmp);
         }
       return ret2.retn();
@@ -1478,7 +1478,7 @@ MEDCurveLinearMeshMultiLev *MEDCurveLinearMeshMultiLev::New(const MEDFileCurveLi
   return new MEDCurveLinearMeshMultiLev(m,levs);
 }
 
-MEDCurveLinearMeshMultiLev *MEDCurveLinearMeshMultiLev::New(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities)
+MEDCurveLinearMeshMultiLev *MEDCurveLinearMeshMultiLev::New(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities)
 {
   return new MEDCurveLinearMeshMultiLev(m,gts,pfls,nbEntities);
 }
@@ -1497,7 +1497,7 @@ MEDCurveLinearMeshMultiLev::MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearM
   _structure=m->getMesh()->getNodeGridStructure();
 }
 
-MEDCurveLinearMeshMultiLev::MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities):MEDStructuredMeshMultiLev(m,m->getNumberOfNodes(),gts,pfls,nbEntities)
+MEDCurveLinearMeshMultiLev::MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities):MEDStructuredMeshMultiLev(m,m->getNumberOfNodes(),gts,pfls,nbEntities)
 {
   if(!m)
     throw INTERP_KERNEL::Exception("MEDCurveLinearMeshMultiLev constructor 2 : null input pointer !");
@@ -1521,7 +1521,7 @@ MEDCurveLinearMeshMultiLev::MEDCurveLinearMeshMultiLev(const MEDCurveLinearMeshM
 {
 }
 
-std::vector<int> MEDCurveLinearMeshMultiLev::getNodeGridStructure() const
+std::vector<mcIdType> MEDCurveLinearMeshMultiLev::getNodeGridStructure() const
 {
   return _structure;
 }
@@ -1531,27 +1531,27 @@ MEDMeshMultiLev *MEDCurveLinearMeshMultiLev::prepare() const
   MEDMeshMultiLev *retSpecific(0);
   if(prepareForImplicitUnstructuredMeshCase(retSpecific))
     return retSpecific;
-  const DataArrayInt *pfl(0),*nr(_node_reduction);
+  const DataArrayIdType *pfl(0),*nr(_node_reduction);
   if(!_pfls.empty())
     pfl=_pfls[0];
-  MCAuto<DataArrayInt> nnr;
-  std::vector<int> cgs,ngs(getNodeGridStructure());
+  MCAuto<DataArrayIdType> nnr;
+  std::vector<mcIdType> cgs,ngs(getNodeGridStructure());
   cgs.resize(ngs.size());
-  std::transform(ngs.begin(),ngs.end(),cgs.begin(),std::bind2nd(std::plus<int>(),-1));
+  std::transform(ngs.begin(),ngs.end(),cgs.begin(),std::bind2nd(std::plus<mcIdType>(),-1));
   if(pfl)
     {
-      std::vector< std::pair<int,int> > cellParts,nodeParts;
+      std::vector< std::pair<mcIdType,mcIdType> > cellParts,nodeParts;
       MCAuto<MEDMeshMultiLev> ret2;
       if(MEDCouplingStructuredMesh::IsPartStructured(pfl->begin(),pfl->end(),cgs,cellParts))
         {
           nodeParts=cellParts;
-          std::vector<int> st(ngs.size());
+          std::vector<mcIdType> st(ngs.size());
           for(std::size_t i=0;i<ngs.size();i++)
             {
               nodeParts[i].second++;
               st[i]=nodeParts[i].second-nodeParts[i].first;
             }
-          MCAuto<DataArrayInt> p(MEDCouplingStructuredMesh::BuildExplicitIdsFrom(ngs,nodeParts));
+          MCAuto<DataArrayIdType> p(MEDCouplingStructuredMesh::BuildExplicitIdsFrom(ngs,nodeParts));
           MCAuto<MEDCurveLinearMeshMultiLev> ret(new MEDCurveLinearMeshMultiLev(*this));
           ret->_is_internal=false;
           if(nr)
@@ -1573,15 +1573,15 @@ MEDMeshMultiLev *MEDCurveLinearMeshMultiLev::prepare() const
             { m3->zipCoords(); nnr=nr->deepCopy(); nnr->sort(true); ret->setNodeReduction(nnr); }
           ret2=(MEDUMeshMultiLev *)ret; ret2->incrRef();
         }
-      const DataArrayInt *famIds(_cell_fam_ids),*numIds(_cell_num_ids);
+      const DataArrayIdType *famIds(_cell_fam_ids),*numIds(_cell_num_ids);
       if(famIds)
         {
-          MCAuto<DataArrayInt> tmp(famIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
+          MCAuto<DataArrayIdType> tmp(famIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
           ret2->setFamilyIdsOnCells(tmp);
         }
       if(numIds)
         {
-          MCAuto<DataArrayInt> tmp(numIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
+          MCAuto<DataArrayIdType> tmp(numIds->selectByTupleIdSafe(pfl->begin(),pfl->end()));
           ret2->setNumberIdsOnCells(tmp);
         }
       return ret2.retn();
@@ -1595,7 +1595,7 @@ MEDMeshMultiLev *MEDCurveLinearMeshMultiLev::prepare() const
     }
 }
 
-void MEDCurveLinearMeshMultiLev::buildVTUArrays(DataArrayDouble *&coords, std::vector<int>& nodeStrct, bool& isInternal) const
+void MEDCurveLinearMeshMultiLev::buildVTUArrays(DataArrayDouble *&coords, std::vector<mcIdType>& nodeStrct, bool& isInternal) const
 {
   isInternal=_is_internal;
   nodeStrct=_structure;
@@ -1611,7 +1611,7 @@ MEDFileField1TSStructItem2::MEDFileField1TSStructItem2()
 {
 }
 
-MEDFileField1TSStructItem2::MEDFileField1TSStructItem2(INTERP_KERNEL::NormalizedCellType a, const std::pair<int,int>& b, const std::string& c, const std::string& d):_geo_type(a),_start_end(b),_pfl(DataArrayInt::New()),_loc(d),_nb_of_entity(-1)
+MEDFileField1TSStructItem2::MEDFileField1TSStructItem2(INTERP_KERNEL::NormalizedCellType a, const std::pair<mcIdType,mcIdType>& b, const std::string& c, const std::string& d):_geo_type(a),_start_end(b),_pfl(DataArrayIdType::New()),_loc(d),_nb_of_entity(-1)
 {
   _pfl->setName(c.c_str());
 }
@@ -1623,13 +1623,13 @@ void MEDFileField1TSStructItem2::checkWithMeshStructForCells(const MEDFileMeshSt
       MEDFileMeshStruct *mstUnConstCasted(const_cast<MEDFileMeshStruct *>(mst));
       mstUnConstCasted->appendIfImplicitType(_geo_type);
     }
-  int nbOfEnt=mst->getNumberOfElemsOfGeoType(_geo_type);
+  mcIdType nbOfEnt=mst->getNumberOfElemsOfGeoType(_geo_type);
   checkInRange(nbOfEnt,1,globs);
 }
 
 void MEDFileField1TSStructItem2::checkWithMeshStructForGaussNE(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs)
 {
-  int nbOfEnt=mst->getNumberOfElemsOfGeoType(_geo_type);
+  mcIdType nbOfEnt=mst->getNumberOfElemsOfGeoType(_geo_type);
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_geo_type);
   checkInRange(nbOfEnt,(int)cm.getNumberOfNodes(),globs);
 }
@@ -1641,7 +1641,7 @@ void MEDFileField1TSStructItem2::checkWithMeshStructForGaussPT(const MEDFileMesh
   if(_loc.empty())
     throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::checkWithMeshStructForGaussPT : no localization specified !");
   const MEDFileFieldLoc& loc=globs->getLocalization(_loc.c_str());
-  int nbOfEnt=mst->getNumberOfElemsOfGeoType(_geo_type);
+  mcIdType nbOfEnt=mst->getNumberOfElemsOfGeoType(_geo_type);
   checkInRange(nbOfEnt,loc.getNumberOfGaussPoints(),globs);
 }
 
@@ -1650,9 +1650,9 @@ int MEDFileField1TSStructItem2::getNbOfIntegrationPts(const MEDFileFieldGlobsRea
   if(_loc.empty())
     {
       if(getPflName().empty())
-        return (_start_end.second-_start_end.first)/_nb_of_entity;
+        return (int)((_start_end.second-_start_end.first)/_nb_of_entity);
       else
-        return (_start_end.second-_start_end.first)/getPfl(globs)->getNumberOfTuples();
+        return (int)((_start_end.second-_start_end.first)/getPfl(globs)->getNumberOfTuples());
     }
   else
     {
@@ -1666,7 +1666,7 @@ std::string MEDFileField1TSStructItem2::getPflName() const
   return _pfl->getName();
 }
 
-const DataArrayInt *MEDFileField1TSStructItem2::getPfl(const MEDFileFieldGlobsReal *globs) const
+const DataArrayIdType *MEDFileField1TSStructItem2::getPfl(const MEDFileFieldGlobsReal *globs) const
 {
   if(!_pfl->isAllocated())
     {
@@ -1683,7 +1683,7 @@ const DataArrayInt *MEDFileField1TSStructItem2::getPfl(const MEDFileFieldGlobsRe
  * \param [in] nbOfEntity - number of entity that can be either cells or nodes. Not other possibility.
  * \param [in] nip - number of integration points. 1 for ON_CELLS and NO_NODES
  */
-void MEDFileField1TSStructItem2::checkInRange(int nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs)
+void MEDFileField1TSStructItem2::checkInRange(mcIdType nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs)
 {
   _nb_of_entity=nbOfEntity;
   if(_pfl->getName().empty())
@@ -1696,14 +1696,14 @@ void MEDFileField1TSStructItem2::checkInRange(int nbOfEntity, int nip, const MED
     {
       if(!globs)
         throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::checkInRange : Presence of a profile on field whereas no globals found in file !");
-      const DataArrayInt *pfl=globs->getProfile(_pfl->getName().c_str());
+      const DataArrayIdType *pfl=globs->getProfile(_pfl->getName().c_str());
       if(!pfl)
         throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::checkInRange : Presence of a profile on field whereas no such profile found in file !");
       pfl->checkAllIdsInRange(0,nbOfEntity);
     }
 }
 
-bool MEDFileField1TSStructItem2::isFastlyEqual(int& startExp, INTERP_KERNEL::NormalizedCellType gt, const std::string& pflName) const
+bool MEDFileField1TSStructItem2::isFastlyEqual(mcIdType& startExp, INTERP_KERNEL::NormalizedCellType gt, const std::string& pflName) const
 {
   if(startExp!=_start_end.first)
     return false;
@@ -1732,7 +1732,7 @@ bool MEDFileField1TSStructItem2::isCellSupportEqual(const MEDFileField1TSStructI
     return false;
   if(_pfl->getName().empty() && other._pfl->getName().empty())
     return true;
-  const DataArrayInt *pfl1(getPfl(globs)),*pfl2(other.getPfl(globs));
+  const DataArrayIdType *pfl1(getPfl(globs)),*pfl2(other.getPfl(globs));
   return pfl1->isEqualWithoutConsideringStr(*pfl2);
 }
 
@@ -1751,9 +1751,9 @@ MEDFileField1TSStructItem2 MEDFileField1TSStructItem2::BuildAggregationOf(const
   if(objs.size()==1)
     return MEDFileField1TSStructItem2(*objs[0]);
   INTERP_KERNEL::NormalizedCellType gt(objs[0]->_geo_type);
-  int nbEntityRef(objs[0]->_nb_of_entity);
+  mcIdType nbEntityRef(objs[0]->_nb_of_entity);
   std::size_t sz(objs.size());
-  std::vector<const DataArrayInt *> arrs(sz);
+  std::vector<const DataArrayIdType *> arrs(sz);
   for(std::size_t i=0;i<sz;i++)
     {
       const MEDFileField1TSStructItem2 *obj(objs[i]);
@@ -1765,15 +1765,15 @@ MEDFileField1TSStructItem2 MEDFileField1TSStructItem2::BuildAggregationOf(const
         throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::BuildAggregationOf : invalid situation ! Several same geo type chunk must all lie on profiles !");
       arrs[i]=globs->getProfile(obj->_pfl->getName().c_str());
     }
-  MCAuto<DataArrayInt> arr(DataArrayInt::Aggregate(arrs));
+  MCAuto<DataArrayIdType> arr(DataArrayIdType::Aggregate(arrs));
   arr->sort();
-  int oldNbTuples(arr->getNumberOfTuples());
+  mcIdType oldNbTuples(arr->getNumberOfTuples());
   arr=arr->buildUnique();
   if(oldNbTuples!=arr->getNumberOfTuples())
     throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem2::BuildAggregationOf : some entities are present several times !");
   if(arr->isIota(nbEntityRef))
     {
-      std::pair<int,int> p(0,nbEntityRef);
+      std::pair<mcIdType,mcIdType> p(0,nbEntityRef);
       std::string a,b;
       MEDFileField1TSStructItem2 ret(gt,p,a,b);
       ret._nb_of_entity=nbEntityRef;
@@ -1782,7 +1782,7 @@ MEDFileField1TSStructItem2 MEDFileField1TSStructItem2::BuildAggregationOf(const
   else
     {
       arr->setName(NEWLY_CREATED_PFL_NAME);
-      std::pair<int,int> p(0,oldNbTuples);
+      std::pair<mcIdType,mcIdType> p(0,oldNbTuples);
       std::string a,b;
       MEDFileField1TSStructItem2 ret(gt,p,a,b);
       ret._nb_of_entity=nbEntityRef;
@@ -1800,7 +1800,7 @@ std::size_t MEDFileField1TSStructItem2::getHeapMemorySizeWithoutChildren() const
 std::vector<const BigMemoryObject *> MEDFileField1TSStructItem2::getDirectChildrenWithNull() const
 {
   std::vector<const BigMemoryObject *> ret;
-  ret.push_back((const DataArrayInt *)_pfl);
+  ret.push_back((const DataArrayIdType *)_pfl);
   return ret;
 }
 
@@ -1816,7 +1816,7 @@ void MEDFileField1TSStructItem::checkWithMeshStruct(const MEDFileMeshStruct *mst
   {
     case ON_NODES:
       {
-        int nbOfEnt=mst->getNumberOfNodes();
+        mcIdType nbOfEnt=mst->getNumberOfNodes();
         if(_items.size()!=1)
           throw INTERP_KERNEL::Exception("MEDFileField1TSStructItem::checkWithMeshStruct : for nodes field only one subdivision supported !");
         _items[0].checkInRange(nbOfEnt,1,globs);
@@ -1945,7 +1945,7 @@ bool MEDFileField1TSStructItem::isCompatibleWithNodesDiscr(const MEDFileField1TS
   int theFirstLevFull;
   bool ret0=isFullyOnOneLev(meshSt,theFirstLevFull);
   const MEDFileField1TSStructItem2& otherNodeIt(other._items[0]);
-  int nbOfNodes(meshSt->getNumberOfNodes());
+  mcIdType nbOfNodes(meshSt->getNumberOfNodes());
   if(otherNodeIt.getPflName().empty())
     {//on all nodes
       if(!ret0)
@@ -1959,8 +1959,8 @@ bool MEDFileField1TSStructItem::isCompatibleWithNodesDiscr(const MEDFileField1TS
     }
   else
     {
-      const DataArrayInt *pfl=globs->getProfile(otherNodeIt.getPflName().c_str());
-      MCAuto<DataArrayInt> cpyPfl(pfl->deepCopy());
+      const DataArrayIdType *pfl=globs->getProfile(otherNodeIt.getPflName().c_str());
+      MCAuto<DataArrayIdType> cpyPfl(pfl->deepCopy());
       cpyPfl->sort();
       if(cpyPfl->isIota(nbOfNodes))
         {//on all nodes also !
@@ -2028,8 +2028,8 @@ MEDMeshMultiLev *MEDFileField1TSStructItem::buildFromScratchDataSetSupportOnCell
 {
   std::size_t sz(_items.size());
   std::vector<INTERP_KERNEL::NormalizedCellType> a0(sz);
-  std::vector<const DataArrayInt *> a1(sz);
-  std::vector<int> a2(sz);
+  std::vector<const DataArrayIdType *> a1(sz);
+  std::vector<mcIdType> a2(sz);
   std::size_t i(0);
   for(std::vector< MEDFileField1TSStructItem2 >::const_iterator it=_items.begin();it!=_items.end();it++,i++)
     {
@@ -2072,7 +2072,7 @@ MEDFileField1TSStructItem MEDFileField1TSStructItem::BuildItemFrom(const MEDFile
   std::vector< std::vector<std::string> > pfls,locs;
   std::vector< std::vector<TypeOfField> > typesF;
   std::vector<INTERP_KERNEL::NormalizedCellType> geoTypes;
-  std::vector< std::vector<std::pair<int,int> > > strtEnds=ref->getFieldSplitedByType(std::string(),geoTypes,typesF,pfls,locs);
+  std::vector< std::vector<std::pair<mcIdType,mcIdType> > > strtEnds=ref->getFieldSplitedByType(std::string(),geoTypes,typesF,pfls,locs);
   std::size_t nbOfGeoTypes(geoTypes.size());
   if(nbOfGeoTypes==0)
     throw INTERP_KERNEL::Exception("MEDFileField1TSStruct : not null by empty ref  !");
@@ -2431,7 +2431,7 @@ bool MEDFileFastCellSupportComparator::isDataSetSupportEqualToThePreviousOne(int
 
 int MEDFileFastCellSupportComparator::getNumberOfTS() const
 {
-  return _f1ts_cmps.size();
+  return (int)_f1ts_cmps.size();
 }
 
 std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileFastCellSupportComparator::getGeoTypesAt(int timeStepId, const MEDFileMesh *m) const
index 19c83992595a3c96015321d945177e770aaec978..b59d3cccb2f8b3e7231364d578098963377c55aa 100644 (file)
@@ -53,9 +53,9 @@ namespace MEDCoupling
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     const MEDFileMesh *getTheMesh() const { return _mesh; }
-    int getNumberOfNodes() const { return _nb_nodes; }
+    mcIdType getNumberOfNodes() const { return _nb_nodes; }
     bool doesManageGeoType(INTERP_KERNEL::NormalizedCellType t) const;
-    int getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const;
+    mcIdType getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const;
     int getLevelOfGeoType(INTERP_KERNEL::NormalizedCellType t) const;
     int getNumberOfLevs() const;
     int getNumberOfGeoTypesInLev(int relativeLev) const;
@@ -66,8 +66,8 @@ namespace MEDCoupling
   private:
     const MEDFileMesh *_mesh;
     std::string _name;
-    int _nb_nodes;
-    std::vector< std::vector<int> > _geo_types_distrib;
+    mcIdType _nb_nodes;
+    std::vector< std::vector<mcIdType> > _geo_types_distrib;
   }; 
 
   class MEDFileField1TSStructItem;
@@ -78,47 +78,47 @@ namespace MEDCoupling
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
   public:
-    static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
     static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<int>& levs);
-    static MEDMeshMultiLev *NewOnlyOnNode(const MEDFileMesh *m, const DataArrayInt *pflOnNode);
-    void setNodeReduction(const DataArrayInt *nr);
-    void setCellReduction(const DataArrayInt *cr);
+    static MEDMeshMultiLev *NewOnlyOnNode(const MEDFileMesh *m, const DataArrayIdType *pflOnNode);
+    void setNodeReduction(const DataArrayIdType *nr);
+    void setCellReduction(const DataArrayIdType *cr);
     bool isFastlyTheSameStruct(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs) const;
     MEDLOADER_EXPORT DataArray *buildDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const;
-    MEDLOADER_EXPORT void retrieveFamilyIdsOnCells(DataArrayInt *& famIds, bool& isWithoutCopy) const;
-    MEDLOADER_EXPORT void retrieveNumberIdsOnCells(DataArrayInt *& numIds, bool& isWithoutCopy) const;
-    MEDLOADER_EXPORT void retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isWithoutCopy) const;
-    MEDLOADER_EXPORT void retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isWithoutCopy) const;
-    MEDLOADER_EXPORT DataArrayInt *retrieveGlobalNodeIdsIfAny() const;
+    MEDLOADER_EXPORT void retrieveFamilyIdsOnCells(DataArrayIdType *& famIds, bool& isWithoutCopy) const;
+    MEDLOADER_EXPORT void retrieveNumberIdsOnCells(DataArrayIdType *& numIds, bool& isWithoutCopy) const;
+    MEDLOADER_EXPORT void retrieveFamilyIdsOnNodes(DataArrayIdType *& famIds, bool& isWithoutCopy) const;
+    MEDLOADER_EXPORT void retrieveNumberIdsOnNodes(DataArrayIdType *& numIds, bool& isWithoutCopy) const;
+    MEDLOADER_EXPORT DataArrayIdType *retrieveGlobalNodeIdsIfAny() const;
     MEDLOADER_EXPORT std::vector< INTERP_KERNEL::NormalizedCellType > getGeoTypes() const;
-    void setFamilyIdsOnCells(DataArrayInt *famIds);
-    void setNumberIdsOnCells(DataArrayInt *numIds);
-    void setFamilyIdsOnNodes(DataArrayInt *famIds);
-    void setNumberIdsOnNodes(DataArrayInt *numIds);
-    virtual void selectPartOfNodes(const DataArrayInt *pflNodes) = 0;
+    void setFamilyIdsOnCells(DataArrayIdType *famIds);
+    void setNumberIdsOnCells(DataArrayIdType *numIds);
+    void setFamilyIdsOnNodes(DataArrayIdType *famIds);
+    void setNumberIdsOnNodes(DataArrayIdType *numIds);
+    virtual void selectPartOfNodes(const DataArrayIdType *pflNodes) = 0;
     virtual MEDMeshMultiLev *prepare() const = 0;
-    int getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const;
-    int getNumberOfNodes() const;
+    mcIdType getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const;
+    mcIdType getNumberOfNodes() const;
   protected:
     std::string getPflNameOfId(int id) const;
     DataArray *constructDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const;
-    virtual void appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr);
+    virtual void appendVertices(const DataArrayIdType *verticesToAdd, DataArrayIdType *nr);
   protected:
     MEDMeshMultiLev(const MEDFileMesh *mesh);
     MEDMeshMultiLev(const MEDMeshMultiLev& other);
-    MEDMeshMultiLev(const MEDFileMesh *mesh, int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    MEDMeshMultiLev(const MEDFileMesh *mesh, mcIdType nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
   protected:
     const MEDFileMesh *_mesh;
-    std::vector< MCAuto<DataArrayInt> > _pfls;
+    std::vector< MCAuto<DataArrayIdType> > _pfls;
     std::vector< INTERP_KERNEL::NormalizedCellType > _geo_types;
-    std::vector<int> _nb_entities;
-    MCAuto<DataArrayInt> _node_reduction;
-    int _nb_nodes;
+    std::vector<mcIdType> _nb_entities;
+    MCAuto<DataArrayIdType> _node_reduction;
+    mcIdType _nb_nodes;
     //
-    MCAuto<DataArrayInt> _cell_fam_ids;
-    MCAuto<DataArrayInt> _cell_num_ids;
-    MCAuto<DataArrayInt> _node_fam_ids;
-    MCAuto<DataArrayInt> _node_num_ids;
+    MCAuto<DataArrayIdType> _cell_fam_ids;
+    MCAuto<DataArrayIdType> _cell_num_ids;
+    MCAuto<DataArrayIdType> _node_fam_ids;
+    MCAuto<DataArrayIdType> _node_num_ids;
   public:
     MEDLOADER_EXPORT static const int PARAMEDMEM_2_VTKTYPE_LGTH=34;
     MEDLOADER_EXPORT static const unsigned char PARAMEDMEM_2_VTKTYPE[PARAMEDMEM_2_VTKTYPE_LGTH];
@@ -131,19 +131,19 @@ namespace MEDCoupling
   {
   public:
     static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<int>& levs);
-    static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
-    void selectPartOfNodes(const DataArrayInt *pflNodes);
+    static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
+    void selectPartOfNodes(const DataArrayIdType *pflNodes);
     MEDMeshMultiLev *prepare() const;
     MEDUMeshMultiLev(const MEDStructuredMeshMultiLev& other, const MCAuto<MEDCoupling1GTUMesh>& part);
-    MEDLOADER_EXPORT bool buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *&types, DataArrayInt *&cellLocations, DataArrayInt *& cells, DataArrayInt *&faceLocations, DataArrayInt *&faces) const;
+    MEDLOADER_EXPORT bool buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *&types, DataArrayIdType *&cellLocations, DataArrayIdType *& cells, DataArrayIdType *&faceLocations, DataArrayIdType *&faces) const;
   protected:
-    void appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr);
+    void appendVertices(const DataArrayIdType *verticesToAdd, DataArrayIdType *nr);
   private:
-    void reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords, DataArrayInt *nodalConnVTK, DataArrayInt *polyhedNodalConnVTK) const;
+    void reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords, DataArrayIdType *nodalConnVTK, DataArrayIdType *polyhedNodalConnVTK) const;
   private:
     MEDUMeshMultiLev(const MEDUMeshMultiLev& other);
     MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>& levs);
-    MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
   private:
     std::vector< MCAuto<MEDCoupling1GTUMesh> > _parts;
     //! this attribute is used only for mesh with no cells but having coordinates. For classical umeshes those pointer is equal to pointer of coordinates of instances in this->_parts.
@@ -153,12 +153,12 @@ namespace MEDCoupling
   class MEDStructuredMeshMultiLev : public MEDMeshMultiLev
   {
   public:
-    void selectPartOfNodes(const DataArrayInt *pflNodes);
-    virtual std::vector<int> getNodeGridStructure() const = 0;
+    void selectPartOfNodes(const DataArrayIdType *pflNodes);
+    virtual std::vector<mcIdType> getNodeGridStructure() const = 0;
   protected:
     MEDStructuredMeshMultiLev(const MEDStructuredMeshMultiLev& other);
     MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, const std::vector<int>& lev);
-    MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, int nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, mcIdType nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
     void dealWithImplicitUnstructuredMesh(const MEDFileMesh *m);
   protected:
     void moveFaceToCell() const;
@@ -167,22 +167,22 @@ namespace MEDCoupling
     void initStdFieldOfIntegers(const MEDFileStructuredMesh *m);
   protected:
     bool _is_internal;
-    MCAuto<DataArrayInt> _face_fam_ids;
-    MCAuto<DataArrayInt> _face_num_ids;
+    MCAuto<DataArrayIdType> _face_fam_ids;
+    MCAuto<DataArrayIdType> _face_num_ids;
   };
 
   class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
   {
   public:
     static MEDCMeshMultiLev *New(const MEDFileCMesh *m, const std::vector<int>& levs);
-    static MEDCMeshMultiLev *New(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
-    std::vector<int> getNodeGridStructure() const;
+    static MEDCMeshMultiLev *New(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
+    std::vector<mcIdType> getNodeGridStructure() const;
     MEDMeshMultiLev *prepare() const;
     MEDLOADER_EXPORT std::vector< DataArrayDouble * > buildVTUArrays(bool& isInternal) const;
   private:
     MEDCMeshMultiLev(const MEDCMeshMultiLev& other);
     MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<int>& levs);
-    MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
   private:
     std::vector< MCAuto<DataArrayDouble> > _coords;
   };
@@ -191,24 +191,24 @@ namespace MEDCoupling
   {
   public:
     static MEDCurveLinearMeshMultiLev *New(const MEDFileCurveLinearMesh *m, const std::vector<int>& levs);
-    static MEDCurveLinearMeshMultiLev *New(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls , const std::vector<int>& nbEntities);
-    std::vector<int> getNodeGridStructure() const;
+    static MEDCurveLinearMeshMultiLev *New(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls , const std::vector<mcIdType>& nbEntities);
+    std::vector<mcIdType> getNodeGridStructure() const;
     MEDMeshMultiLev *prepare() const;
-    MEDLOADER_EXPORT void buildVTUArrays(DataArrayDouble *&coords, std::vector<int>& nodeStrct, bool& isInternal) const;
+    MEDLOADER_EXPORT void buildVTUArrays(DataArrayDouble *&coords, std::vector<mcIdType>& nodeStrct, bool& isInternal) const;
   private:
     MEDCurveLinearMeshMultiLev(const MEDCurveLinearMeshMultiLev& other);
     MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<int>& levs);
-    MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayIdType *>& pfls, const std::vector<mcIdType>& nbEntities);
   private:
     MCAuto<DataArrayDouble> _coords;
-    std::vector<int> _structure;
+    std::vector<mcIdType> _structure;
   };
 
   class MEDFileField1TSStructItem2 : public BigMemoryObject
   {
   public:
     MEDFileField1TSStructItem2();
-    MEDFileField1TSStructItem2(INTERP_KERNEL::NormalizedCellType a, const std::pair<int,int>& b, const std::string& pfl, const std::string& loc);
+    MEDFileField1TSStructItem2(INTERP_KERNEL::NormalizedCellType a, const std::pair<mcIdType,mcIdType>& b, const std::string& pfl, const std::string& loc);
     void checkWithMeshStructForCells(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
     void checkWithMeshStructForGaussNE(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
     void checkWithMeshStructForGaussPT(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
@@ -216,15 +216,15 @@ namespace MEDCoupling
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     //
-    const DataArrayInt *getPfl(const MEDFileFieldGlobsReal *globs) const;
+    const DataArrayIdType *getPfl(const MEDFileFieldGlobsReal *globs) const;
     INTERP_KERNEL::NormalizedCellType getGeo() const { return _geo_type; }
-    int getNbEntity() const { return _nb_of_entity; }
-    const std::pair<int,int>& getStartStop() const { return _start_end; }
+    mcIdType getNbEntity() const { return _nb_of_entity; }
+    const std::pair<mcIdType,mcIdType>& getStartStop() const { return _start_end; }
     std::string getPflName() const;
     int getNbOfIntegrationPts(const MEDFileFieldGlobsReal *globs) const;
     //! warning this method also set _nb_of_entity attribute !
-    void checkInRange(int nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs);
-    bool isFastlyEqual(int& startExp, INTERP_KERNEL::NormalizedCellType gt, const std::string& pflName) const;
+    void checkInRange(mcIdType nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs);
+    bool isFastlyEqual(mcIdType& startExp, INTERP_KERNEL::NormalizedCellType gt, const std::string& pflName) const;
     bool operator==(const MEDFileField1TSStructItem2& other) const;
     bool isCellSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const;
     bool isNodeSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const;
@@ -233,10 +233,10 @@ namespace MEDCoupling
     static const char NEWLY_CREATED_PFL_NAME[];
   private:
     INTERP_KERNEL::NormalizedCellType _geo_type;
-    std::pair<int,int> _start_end;
-    MCAuto<DataArrayInt> _pfl;
+    std::pair<mcIdType,mcIdType> _start_end;
+    MCAuto<DataArrayIdType> _pfl;
     std::string _loc;
-    int _nb_of_entity;
+    mcIdType _nb_of_entity;
   };
 
   class MEDFileField1TSStructItem : public BigMemoryObject
index a1ed652a702e9f9ff53e858b992982964589860d..af5ea9d17360c4f6a0ab69dd5d2bfd4cc927fe0d 100644 (file)
@@ -18,6 +18,7 @@
 //
 
 #include "MEDFileJoint.hxx"
+#include "MEDFileBasis.hxx"
 #include "MEDLoader.hxx"
 #include "MEDLoaderBase.hxx"
 #include "MEDFileSafeCaller.txx"
@@ -33,7 +34,7 @@ using namespace MEDCoupling;
 
 std::size_t MEDFileJointCorrespondence::getHeapMemorySizeWithoutChildren() const
 {
-  return sizeof(MCAuto<DataArrayInt>);
+  return sizeof(MCAuto<DataArrayIdType>);
 }
 
 std::vector<const BigMemoryObject *> MEDFileJointCorrespondence::getDirectChildrenWithNull() const
@@ -55,7 +56,7 @@ MEDFileJointCorrespondence::MEDFileJointCorrespondence():
  *  \param [in] loc_geo_type - the local geometry type of correspondence.
  *  \param [in] rem_geo_type - the remote geometry type of correspondence.
  */
-MEDFileJointCorrespondence::MEDFileJointCorrespondence(DataArrayInt* correspondence,
+MEDFileJointCorrespondence::MEDFileJointCorrespondence(DataArrayIdType* correspondence,
                                                        bool          isNodal,
                                                        INTERP_KERNEL::NormalizedCellType loc_geo_type,
                                                        INTERP_KERNEL::NormalizedCellType rem_geo_type):
@@ -66,7 +67,7 @@ MEDFileJointCorrespondence::MEDFileJointCorrespondence(DataArrayInt* corresponde
   MEDFileJointCorrespondence::setCorrespondence( correspondence );
 }
 
-MEDFileJointCorrespondence* MEDFileJointCorrespondence::New(DataArrayInt* correspondence,
+MEDFileJointCorrespondence* MEDFileJointCorrespondence::New(DataArrayIdType* correspondence,
                                                             INTERP_KERNEL::NormalizedCellType loc_geo_type,
                                                             INTERP_KERNEL::NormalizedCellType rem_geo_type)
 {
@@ -76,7 +77,7 @@ MEDFileJointCorrespondence* MEDFileJointCorrespondence::New(DataArrayInt* corres
 /*!
  * Returns a new MEDFileJointCorrespondence of nodes
  */
-MEDFileJointCorrespondence *MEDFileJointCorrespondence::New(DataArrayInt* correspondence)
+MEDFileJointCorrespondence *MEDFileJointCorrespondence::New(DataArrayIdType* correspondence)
 {
   return new MEDFileJointCorrespondence(correspondence);
 }
@@ -108,7 +109,7 @@ void MEDFileJointCorrespondence::write(const std::string& fileName, int mode, co
   MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),medmod);
 
   std::ostringstream oss; oss << "MEDFileJointCorrespondence : error on attempt to write in file : \"" << fileName << "\"";
-  MEDFileUtilities::CheckMEDCode(fid,fid,oss.str());
+  MEDFileUtilities::CheckMEDCode((int)fid,fid,oss.str());
 
   if (( !_is_nodal ) &&
       ( _loc_geo_type == INTERP_KERNEL::NORM_ERROR ||
@@ -117,7 +118,7 @@ void MEDFileJointCorrespondence::write(const std::string& fileName, int mode, co
       throw INTERP_KERNEL::Exception( "Geometric type not specified for a cell Joint" );
     }
 
-  if ( (const DataArrayInt *)_correspondence )
+  if ( (const DataArrayIdType *)_correspondence )
     {
       writeLL(fid, localMeshName, jointName, order, iteration);
     }
@@ -135,8 +136,8 @@ void MEDFileJointCorrespondence::writeLL(med_idt fid, const std::string& localMe
                                                          order, iteration,
                                                          MED_NODE, MED_NONE,
                                                          MED_NODE, MED_NONE,
-                                                         _correspondence->getNbOfElems()/2,
-                                                         _correspondence->getConstPointer()));
+                                                         ToMedInt(_correspondence->getNbOfElems()/2),
+                                                         ToMedIntArray(_correspondence)->getConstPointer()));
     }
   else
     {
@@ -144,12 +145,12 @@ void MEDFileJointCorrespondence::writeLL(med_idt fid, const std::string& localMe
                                                          order, iteration,
                                                          MED_CELL, typmai3[ _loc_geo_type ],
                                                          MED_CELL, typmai3[ _rem_geo_type ],
-                                                         _correspondence->getNbOfElems()/2,
-                                                         _correspondence->getConstPointer()));
+                                                         ToMedInt(_correspondence->getNbOfElems()/2),
+                                                         ToMedIntArray(_correspondence)->getConstPointer()));
     }
 }
 
-void MEDFileJointCorrespondence::setCorrespondence(DataArrayInt *corr)
+void MEDFileJointCorrespondence::setCorrespondence(DataArrayIdType *corr)
 {
   _correspondence=corr;
   if ( corr )
@@ -198,13 +199,13 @@ std::string MEDFileJointCorrespondence::simpleRepr() const
   oss << "- entity type of the correspondence : " << ( getIsNodal() ? "NODE" : "CELL" ) << "\n";
   oss << "- Local geometry type of the correspondence : " << INTERP_KERNEL::CellModel::GetCellModel( _loc_geo_type ).getRepr() << "\n";
   oss << "- Remote geometry type of the correspondence : " << INTERP_KERNEL::CellModel::GetCellModel( _rem_geo_type ).getRepr() << "\n";
-  if ( (const DataArrayInt *)_correspondence )
+  if ( (const DataArrayIdType *)_correspondence )
     {
       oss << "- Number entity of the correspondence : " << getCorrespondence()->getNumberOfTuples() << "\n";
 
-      const DataArrayInt* tmp=getCorrespondence();
+      const DataArrayIdType* tmp=getCorrespondence();
       oss << "- Correspondence : <<";
-      for(const int *it=tmp->begin();it!=tmp->end();it++)
+      for(const mcIdType *it=tmp->begin();it!=tmp->end();it++)
         oss<< *it << " ";
     }
   else
@@ -222,7 +223,7 @@ MEDFileJointOneStep::MEDFileJointOneStep():_order(-1),_iteration(-1)
 
 std::size_t MEDFileJointOneStep::getHeapMemorySizeWithoutChildren() const
 {
-  return _correspondences.capacity()*sizeof(MCAuto<DataArrayInt>);
+  return _correspondences.capacity()*sizeof(MCAuto<DataArrayIdType>);
 }
 
 std::vector<const BigMemoryObject *> MEDFileJointOneStep::getDirectChildrenWithNull() const
@@ -262,20 +263,20 @@ MEDFileJointOneStep* MEDFileJointOneStep::New(med_idt fid, const std::string& mN
 
 MEDFileJointOneStep::MEDFileJointOneStep(med_idt fid, const std::string& mName, const std::string& jointName, int num)
 {
-  int order, iteration, ncorrespondence;
+  med_int order, iteration, ncorrespondence;
   MEDFILESAFECALLERRD0(MEDsubdomainComputingStepInfo,(fid, mName.c_str(), jointName.c_str(), num, &order, &iteration, &ncorrespondence));
-  MEDFileJointOneStep::setOrder(order);
-  MEDFileJointOneStep::setIteration(iteration);
+  MEDFileJointOneStep::setOrder(FromMedInt<int>(order));
+  MEDFileJointOneStep::setIteration(FromMedInt<int>(iteration));
   for ( int cur_it = 1; cur_it <= ncorrespondence; ++cur_it )
     {
-      int num_entity;
+      med_int num_entity;
       med_entity_type loc_ent_type, rem_ent_type;
       med_geometry_type loc_geo_type, rem_geo_type;
       MEDFILESAFECALLERRD0(MEDsubdomainCorrespondenceSizeInfo,(fid, mName.c_str(), jointName.c_str(), order, iteration, cur_it,
                                                                &loc_ent_type, &loc_geo_type, &rem_ent_type, &rem_geo_type, &num_entity));
       if ( num_entity > 0 )
         {
-          MCAuto<DataArrayInt> correspondence=DataArrayInt::New();
+          MCAuto<DataArrayMedInt> correspondence=DataArrayMedInt::New();
           correspondence->alloc(num_entity*2, 1);
           MEDFILESAFECALLERRD0(MEDsubdomainCorrespondenceRd,(fid, mName.c_str(), jointName.c_str(), order, iteration, loc_ent_type,
                                                              loc_geo_type, rem_ent_type, rem_geo_type, correspondence->getPointer()));
@@ -283,7 +284,7 @@ MEDFileJointOneStep::MEDFileJointOneStep(med_idt fid, const std::string& mName,
           cor->setIsNodal( loc_ent_type == MED_NODE );
           cor->setLocalGeometryType ( convertGeometryType( loc_geo_type ));
           cor->setRemoteGeometryType( convertGeometryType( rem_geo_type ));
-          cor->setCorrespondence( correspondence );
+          cor->setCorrespondence( FromMedIntArray<mcIdType>(correspondence ));
           _correspondences.push_back(cor);
         }
     }
@@ -304,7 +305,7 @@ void MEDFileJointOneStep::write(const std::string& fileName, int mode, const std
   med_access_mode medmod=MEDFileUtilities::TraduceWriteMode(mode);
   MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),medmod);
   std::ostringstream oss; oss << "MEDFileJointOneStep : error on attempt to write in file : \"" << fileName << "\"";
-  MEDFileUtilities::CheckMEDCode(fid,fid,oss.str());
+  MEDFileUtilities::CheckMEDCode((int)fid,fid,oss.str());
   if ( _correspondences.empty() )
     throw INTERP_KERNEL::Exception("MEDFileJointOneStep::write : no correspondences defined !");
   writeLL(fid, localMeshName, jointName);
@@ -328,7 +329,7 @@ void MEDFileJointOneStep::pushCorrespondence(MEDFileJointCorrespondence* corresp
 
 int MEDFileJointOneStep::getNumberOfCorrespondences() const
 {
-  return _correspondences.size();
+  return (int)_correspondences.size();
 }
 
 /** Return a borrowed reference (caller is not responsible) */
@@ -481,14 +482,14 @@ MEDFileJoint::MEDFileJoint(med_idt fid, const std::string& mName, int curJoint)
   INTERP_KERNEL::AutoPtr<char> joint_name=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
   INTERP_KERNEL::AutoPtr<char> desc_name=MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE);
   INTERP_KERNEL::AutoPtr<char> rem_mesh_name=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
-  int domain_number=0, nstep=0, nocstpncorrespondence=0;
+  med_int domain_number=0, nstep=0, nocstpncorrespondence=0;
   MEDFILESAFECALLERRD0(MEDsubdomainJointInfo,(fid,mName.c_str(), curJoint, joint_name, desc_name, &domain_number,rem_mesh_name,
                                               &nstep, &nocstpncorrespondence));
   setLocalMeshName(mName);
   setRemoteMeshName(MEDLoaderBase::buildStringFromFortran(rem_mesh_name,MED_NAME_SIZE));
   setDescription(MEDLoaderBase::buildStringFromFortran(desc_name,MED_COMMENT_SIZE));
   setJointName(MEDLoaderBase::buildStringFromFortran(joint_name,MED_NAME_SIZE));
-  setDomainNumber(domain_number);
+  setDomainNumber(FromMedInt<int>(domain_number));
   for(int cur_step=1; cur_step <= nstep; ++cur_step)
     {
       MEDFileJointOneStep *cor=MEDFileJointOneStep::New(fid, mName.c_str(), getJointName(), cur_step);
@@ -515,7 +516,7 @@ void MEDFileJoint::pushStep(MEDFileJointOneStep* step)
 
 int MEDFileJoint::getNumberOfSteps() const
 {
-  return _joint.size();
+  return (int)_joint.size();
 }
 
 /** Return a borrowed reference (caller is not responsible) */
@@ -654,7 +655,7 @@ std::string MEDFileJoints::getMeshName() const
 
 int MEDFileJoints::getNumberOfJoints() const
 {
-  return _joints.size();
+  return (int)_joints.size();
 }
 
 /** Return a borrowed reference (caller is not responsible) */
@@ -759,7 +760,7 @@ MEDFileJoints::MEDFileJoints()
 
 MEDFileJoints::MEDFileJoints(med_idt fid, const std::string& meshName)
 {
-  int num_joint=MEDnSubdomainJoint(fid, meshName.c_str() );
+  med_int num_joint=MEDnSubdomainJoint(fid, meshName.c_str() );
   for(int i = 1; i <= num_joint; i++)
     _joints.push_back(MEDFileJoint::New(fid,meshName,i));
 }
index 421bca3faf6378af0524977f7541de351cf2037e..567d97abf1002ca7922862b6f5178c9fe2d5c701 100644 (file)
@@ -39,8 +39,8 @@ class MEDFileJointCorrespondence : public RefCountObject, public MEDFileWritable
 {
 public:
   MEDLOADER_EXPORT static MEDFileJointCorrespondence *New();
-  MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayInt* correspondence); // nodes
-  MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayInt* correspondence,  // cells
+  MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence); // nodes
+  MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence,  // cells
                                                           INTERP_KERNEL::NormalizedCellType loc_geo_type,
                                                           INTERP_KERNEL::NormalizedCellType rem_geo_type);
   MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
@@ -54,15 +54,15 @@ public:
   MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getLocalGeometryType() const { return _loc_geo_type; }
   MEDLOADER_EXPORT void setRemoteGeometryType(INTERP_KERNEL::NormalizedCellType type) { _rem_geo_type=type; }
   MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getRemoteGeometryType() const { return _rem_geo_type; }
-  MEDLOADER_EXPORT void setCorrespondence(DataArrayInt *corr);
-  MEDLOADER_EXPORT const DataArrayInt *getCorrespondence() const { return _correspondence; }
+  MEDLOADER_EXPORT void setCorrespondence(DataArrayIdType *corr);
+  MEDLOADER_EXPORT const DataArrayIdType *getCorrespondence() const { return _correspondence; }
   MEDLOADER_EXPORT void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const;
 
   MEDLOADER_EXPORT std::string simpleRepr() const;
   MEDLOADER_EXPORT void writeLL(med_idt fid, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const;
 private:
   MEDFileJointCorrespondence();
-  MEDFileJointCorrespondence(DataArrayInt*                     correspondence,
+  MEDFileJointCorrespondence(DataArrayIdType*                     correspondence,
                              bool                              is_nodal = true,
                              INTERP_KERNEL::NormalizedCellType loc_geo_type = INTERP_KERNEL::NORM_ERROR,
                              INTERP_KERNEL::NormalizedCellType rem_geo_type = INTERP_KERNEL::NORM_ERROR);
@@ -70,7 +70,7 @@ private:
   bool                                           _is_nodal;
   INTERP_KERNEL::NormalizedCellType              _loc_geo_type;
   INTERP_KERNEL::NormalizedCellType              _rem_geo_type;
-  MCAuto<DataArrayInt> _correspondence;
+  MCAuto<DataArrayIdType> _correspondence;
 };
 
 /*!
index 49d4755ae2f54b4e6003d36b6e23d7c220aabc70..b45e6f7e80b7d50411c06558277a41e199f31aac 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "MEDCouplingUMesh.hxx"
 #include "MEDCouplingMappedExtrudedMesh.hxx"
+#include "MEDCouplingMemArray.txx"
 
 #include "InterpKernelAutoPtr.hxx"
 
@@ -57,8 +58,8 @@ std::size_t MEDFileMesh::getHeapMemorySizeWithoutChildren() const
       for(std::vector<std::string>::const_iterator it2=(*it).second.begin();it2!=(*it).second.end();it2++)
         ret+=(*it2).capacity();
     }
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
-    ret+=(*it).first.capacity()+sizeof(int);
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
+    ret+=(*it).first.capacity()+sizeof(mcIdType);
   return ret;
 }
 
@@ -379,7 +380,7 @@ std::vector<std::string> MEDFileMesh::getFamiliesOnGroups(const std::vector<std:
  *  \return std::vector<int> - sequence of ids of the families.
  *  \throw If the name of a nonexistent group is specified.
  */
-std::vector<int> MEDFileMesh::getFamiliesIdsOnGroup(const std::string& name) const
+std::vector<mcIdType> MEDFileMesh::getFamiliesIdsOnGroup(const std::string& name) const
 {
   std::string oname(name);
   std::map<std::string, std::vector<std::string> >::const_iterator it=_groups.find(oname);
@@ -406,7 +407,7 @@ void MEDFileMesh::setFamiliesOnGroup(const std::string& name, const std::vector<
   _groups[oname]=fams;
   for(std::vector<std::string>::const_iterator it1=fams.begin();it1!=fams.end();it1++)
     {
-      std::map<std::string,int>::iterator it2=_families.find(*it1);
+      std::map<std::string,mcIdType>::iterator it2=_families.find(*it1);
       if(it2==_families.end())
         _families[*it1]=0;
     }
@@ -420,12 +421,12 @@ void MEDFileMesh::setFamiliesOnGroup(const std::string& name, const std::vector<
  *  \param [in] famIds - a sequence of ids of families constituting the group.
  *  \throw If a family name is not found by its id.
  */
-void MEDFileMesh::setFamiliesIdsOnGroup(const std::string& name, const std::vector<int>& famIds)
+void MEDFileMesh::setFamiliesIdsOnGroup(const std::string& name, const std::vector<mcIdType>& famIds)
 {
   std::string oname(name);
   std::vector<std::string> fams(famIds.size());
   int i=0;
-  for(std::vector<int>::const_iterator it1=famIds.begin();it1!=famIds.end();it1++,i++)
+  for(std::vector<mcIdType>::const_iterator it1=famIds.begin();it1!=famIds.end();it1++,i++)
     {
       std::string name2=getFamilyNameGivenId(*it1);
       fams[i]=name2;
@@ -462,7 +463,7 @@ std::vector<std::string> MEDFileMesh::getGroupsOnFamily(const std::string& name)
 void MEDFileMesh::setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps)
 {
   std::string fName(famName);
-  const std::map<std::string,int>::const_iterator it=_families.find(fName);
+  const std::map<std::string,mcIdType>::const_iterator it=_families.find(fName);
   if(it==_families.end())
     {
       std::vector<std::string> fams=getFamiliesNames();
@@ -504,7 +505,7 @@ std::vector<std::string> MEDFileMesh::getFamiliesNames() const
 {
   std::vector<std::string> ret(_families.size());
   int i=0;
-  for(std::map<std::string, int >::const_iterator it=_families.begin();it!=_families.end();it++,i++)
+  for(std::map<std::string, mcIdType >::const_iterator it=_families.begin();it!=_families.end();it++,i++)
     ret[i]=(*it).first;
   return ret;
 }
@@ -534,7 +535,7 @@ std::vector<std::string> MEDFileMesh::getGroupsOnSpecifiedLev(int meshDimRelToMa
   std::vector<std::string> allGrps(getGroupsNames());
   for(std::vector<std::string>::const_iterator it=allGrps.begin();it!=allGrps.end();it++)
     {
-      std::vector<int> levs(getGrpNonEmptyLevelsExt((*it)));
+      std::vector<mcIdType> levs(getGrpNonEmptyLevelsExt((*it)));
       if(std::find(levs.begin(),levs.end(),meshDimRelToMaxExt)!=levs.end())
         ret.push_back(*it);
     }
@@ -544,9 +545,9 @@ std::vector<std::string> MEDFileMesh::getGroupsOnSpecifiedLev(int meshDimRelToMa
 /*!
  * Returns all relative mesh levels (including nodes) where a given group is defined.
  *  \param [in] grp - the name of the group of interest.
- *  \return std::vector<int> - a sequence of the relative dimensions.
+ *  \return std::vector<mcIdType> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileMesh::getGrpNonEmptyLevelsExt(const std::string& grp) const
+std::vector<mcIdType> MEDFileMesh::getGrpNonEmptyLevelsExt(const std::string& grp) const
 {
   std::vector<std::string> fams(getFamiliesOnGroup(grp));
   return getFamsNonEmptyLevelsExt(fams);
@@ -556,9 +557,9 @@ std::vector<int> MEDFileMesh::getGrpNonEmptyLevelsExt(const std::string& grp) co
  * Returns all relative mesh levels (**excluding nodes**) where given groups are defined.
  * To include nodes, call getGrpsNonEmptyLevelsExt() method.
  *  \param [in] grps - a sequence of names of the groups of interest.
- *  \return std::vector<int> - a sequence of the relative dimensions.
+ *  \return std::vector<mcIdType> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileMesh::getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const
+std::vector<mcIdType> MEDFileMesh::getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const
 {
   std::vector<std::string> fams(getFamiliesOnGroups(grps));
   return getFamsNonEmptyLevels(fams);
@@ -567,9 +568,9 @@ std::vector<int> MEDFileMesh::getGrpsNonEmptyLevels(const std::vector<std::strin
 /*!
  * Returns all relative mesh levels (including nodes) where given groups are defined.
  *  \param [in] grps - a sequence of names of the groups of interest.
- *  \return std::vector<int> - a sequence of the relative dimensions.
+ *  \return std::vector<mcIdType> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileMesh::getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const
+std::vector<mcIdType> MEDFileMesh::getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const
 {
   std::vector<std::string> fams(getFamiliesOnGroups(grps));
   return getFamsNonEmptyLevelsExt(fams);
@@ -579,9 +580,9 @@ std::vector<int> MEDFileMesh::getGrpsNonEmptyLevelsExt(const std::vector<std::st
  * Returns all relative mesh levels (**excluding nodes**) where a given group is defined.
  * To include nodes, call getGrpNonEmptyLevelsExt() method.
  *  \param [in] grp - the name of the group of interest.
- *  \return std::vector<int> - a sequence of the relative dimensions.
+ *  \return std::vector<mcIdType> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileMesh::getGrpNonEmptyLevels(const std::string& grp) const
+std::vector<mcIdType> MEDFileMesh::getGrpNonEmptyLevels(const std::string& grp) const
 {
   std::vector<std::string> fams(getFamiliesOnGroup(grp));
   return getFamsNonEmptyLevels(fams);
@@ -591,9 +592,9 @@ std::vector<int> MEDFileMesh::getGrpNonEmptyLevels(const std::string& grp) const
  * Returns all relative mesh levels (**excluding nodes**) where a given family is defined.
  * To include nodes, call getFamNonEmptyLevelsExt() method.
  *  \param [in] fam - the name of the family of interest.
- *  \return std::vector<int> - a sequence of the relative dimensions.
+ *  \return std::vector<mcIdType> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileMesh::getFamNonEmptyLevels(const std::string& fam) const
+std::vector<mcIdType> MEDFileMesh::getFamNonEmptyLevels(const std::string& fam) const
 {
   std::vector<std::string> fams(1,std::string(fam));
   return getFamsNonEmptyLevels(fams);
@@ -602,9 +603,9 @@ std::vector<int> MEDFileMesh::getFamNonEmptyLevels(const std::string& fam) const
 /*!
  * Returns all relative mesh levels (including nodes) where a given family is defined.
  *  \param [in] fam - the name of the family of interest.
- *  \return std::vector<int> - a sequence of the relative dimensions.
+ *  \return std::vector<mcIdType> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileMesh::getFamNonEmptyLevelsExt(const std::string& fam) const
+std::vector<mcIdType> MEDFileMesh::getFamNonEmptyLevelsExt(const std::string& fam) const
 {
   std::vector<std::string> fams(1,std::string(fam));
   return getFamsNonEmptyLevelsExt(fams);
@@ -622,8 +623,8 @@ std::string MEDFileMesh::GetMagicFamilyStr()
 void MEDFileMesh::assignFamilyNameWithGroupName()
 {
   std::map<std::string, std::vector<std::string> > groups(_groups);
-  std::map<std::string,int> newFams;
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  std::map<std::string,mcIdType> newFams;
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       std::vector<std::string> grps=getGroupsOnFamily((*it).first);
       if(grps.size()==1 && groups[grps[0]].size()==1)
@@ -684,13 +685,13 @@ void MEDFileMesh::removeGroupAtLevel(int meshDimRelToMaxExt, const std::string&
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   const std::vector<std::string> &famsOnGrp((*it).second);
-  std::vector<int> famIds(getFamiliesIdsOnGroup(name));
-  const DataArrayInt *famArr(getFamilyFieldAtLevel(meshDimRelToMaxExt));
+  std::vector<mcIdType> famIds(getFamiliesIdsOnGroup(name));
+  const DataArrayIdType *famArr(getFamilyFieldAtLevel(meshDimRelToMaxExt));
   if(!famArr)
     return ;
-  MCAuto<DataArrayInt> vals(famArr->getDifferentValues());
-  MCAuto<DataArrayInt> famIds2(DataArrayInt::NewFromStdVector(famIds));
-  MCAuto<DataArrayInt> idsToKill(famIds2->buildIntersection(vals));
+  MCAuto<DataArrayIdType> vals(famArr->getDifferentValues());
+  MCAuto<DataArrayIdType> famIds2(DataArrayIdType::NewFromStdVector(famIds));
+  MCAuto<DataArrayIdType> idsToKill(famIds2->buildIntersection(vals));
   if(idsToKill->empty())
     return ;
   std::vector<std::string> newFamsOnGrp;
@@ -728,7 +729,7 @@ void MEDFileMesh::removeGroup(const std::string& name)
 void MEDFileMesh::removeFamily(const std::string& name)
 {
   std::string oname(name);
-  std::map<std::string, int >::iterator it=_families.find(oname);
+  std::map<std::string, mcIdType >::iterator it=_families.find(oname);
   std::vector<std::string> fams=getFamiliesNames();
   if(it==_families.end())
     {
@@ -770,17 +771,17 @@ std::vector<std::string> MEDFileMesh::removeOrphanGroups()
  */
 std::vector<std::string> MEDFileMesh::removeOrphanFamilies()
 {
-  MCAuto<DataArrayInt> allFamIdsInUse=computeAllFamilyIdsInUse();
+  MCAuto<DataArrayIdType> allFamIdsInUse=computeAllFamilyIdsInUse();
   std::vector<std::string> ret;
-  if(!((DataArrayInt*)allFamIdsInUse))
+  if(!((DataArrayIdType*)allFamIdsInUse))
     {
       ret=getFamiliesNames();
       _families.clear(); _groups.clear();
       return ret;
     }
-  std::map<std::string,int> famMap;
+  std::map<std::string,mcIdType> famMap;
   std::map<std::string, std::vector<std::string> > grps(_groups);
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       if(allFamIdsInUse->presenceOfValue((*it).second))
         famMap[(*it).first]=(*it).second;
@@ -811,9 +812,9 @@ std::vector<std::string> MEDFileMesh::removeOrphanFamilies()
  */
 void MEDFileMesh::removeFamiliesReferedByNoGroups()
 {
-  std::map<std::string,int> fams;
+  std::map<std::string,mcIdType> fams;
   std::set<std::string> sfams;
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     sfams.insert((*it).first);
   for(std::map<std::string, std::vector<std::string> >::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
     for(std::vector<std::string>::const_iterator it1=(*it0).second.begin();it1!=(*it0).second.end();it1++)
@@ -838,8 +839,8 @@ void MEDFileMesh::rearrangeFamilies()
   removeFamiliesReferedByNoGroups();
   //
   std::vector<int> levels(getNonEmptyLevelsExt());
-  std::set<int> idsRefed;
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  std::set<mcIdType> idsRefed;
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       idsRefed.insert((*it).second);
       if((*it).second==0)
@@ -853,7 +854,7 @@ void MEDFileMesh::rearrangeFamilies()
     }
   for(std::vector<int>::const_iterator it=levels.begin();it!=levels.end();it++)
     {
-      const DataArrayInt *fams(0);
+      const DataArrayIdType *fams(0);
       try
       {
           fams=getFamilyFieldAtLevel(*it);
@@ -862,12 +863,12 @@ void MEDFileMesh::rearrangeFamilies()
       if(!fams)
         continue;
       std::vector<bool> v(fams->getNumberOfTuples(),false);
-      for(std::set<int>::const_iterator pt=idsRefed.begin();pt!=idsRefed.end();pt++)
+      for(std::set<mcIdType>::const_iterator pt=idsRefed.begin();pt!=idsRefed.end();pt++)
         fams->switchOnTupleEqualTo(*pt,v);
-      MCAuto<DataArrayInt> unfetchedIds(DataArrayInt::BuildListOfSwitchedOff(v));
+      MCAuto<DataArrayIdType> unfetchedIds(DataArrayIdType::BuildListOfSwitchedOff(v));
       if(!unfetchedIds->empty())
         {
-          MCAuto<DataArrayInt> newFams(fams->deepCopy());
+          MCAuto<DataArrayIdType> newFams(fams->deepCopy());
           newFams->setPartOfValuesSimple3(0,unfetchedIds->begin(),unfetchedIds->end(),0,1,1);
           setFamilyFieldArr(*it,newFams);
         }
@@ -895,9 +896,9 @@ void MEDFileMesh::zipFamilies()
     }
   //
   std::map<std::string, std::vector<std::string> > newGroups(_groups);
-  std::map<std::string,int> newFams(_families);
+  std::map<std::string,mcIdType> newFams(_families);
   std::vector<int> levels(getNonEmptyLevelsExt());
-  std::map<int, std::vector<int> > famIdsToSubstitute;
+  std::map<mcIdType, std::vector<mcIdType> > famIdsToSubstitute;
   // iterate on all different set of groups
   std::set<std::string> familiesToKill;
   for(auto setOfCommonGrp : setOfFamilies)
@@ -936,7 +937,7 @@ void MEDFileMesh::zipFamilies()
     {
       for(std::vector<int>::const_iterator it=levels.begin();it!=levels.end();it++)
         {
-          DataArrayInt *fams(nullptr);
+          DataArrayIdType *fams(nullptr);
           try
             {
               fams=getFamilyFieldAtLevel(*it);
@@ -944,7 +945,7 @@ void MEDFileMesh::zipFamilies()
           catch(INTERP_KERNEL::Exception& e) { }
           if(!fams)
             continue;
-          MCAuto<DataArrayInt> idsToModif(fams->findIdsEqualList(famIdsSubstSession.second.data(),famIdsSubstSession.second.data()+famIdsSubstSession.second.size()));
+          MCAuto<DataArrayIdType> idsToModif(fams->findIdsEqualList(famIdsSubstSession.second.data(),famIdsSubstSession.second.data()+famIdsSubstSession.second.size()));
           fams->setPartOfValuesSimple3(famIdsSubstSession.first,idsToModif->begin(),idsToModif->end(),0,1,1);
         }
     }
@@ -1003,11 +1004,11 @@ void MEDFileMesh::changeGroupName(const std::string& oldName, const std::string&
  *  \param [in] oldId - a current id of the family.
  *  \param [in] newId - a new family id.
  */
-void MEDFileMesh::changeFamilyId(int oldId, int newId)
+void MEDFileMesh::changeFamilyId(mcIdType oldId, mcIdType newId)
 {
   changeFamilyIdArr(oldId,newId);
-  std::map<std::string,int> fam2;
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  std::map<std::string,mcIdType> fam2;
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       if((*it).second==oldId)
         fam2[(*it).first]=newId;
@@ -1027,7 +1028,7 @@ void MEDFileMesh::changeFamilyId(int oldId, int newId)
 void MEDFileMesh::changeFamilyName(const std::string& oldName, const std::string& newName)
 {
   std::string oname(oldName);
-  std::map<std::string, int >::iterator it=_families.find(oname);
+  std::map<std::string, mcIdType >::iterator it=_families.find(oname);
   std::vector<std::string> fams=getFamiliesNames();
   if(it==_families.end())
     {
@@ -1036,13 +1037,13 @@ void MEDFileMesh::changeFamilyName(const std::string& oldName, const std::string
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   std::string nname(newName);
-  std::map<std::string, int >::iterator it2=_families.find(nname);
+  std::map<std::string, mcIdType >::iterator it2=_families.find(nname);
   if(it2!=_families.end())
     {
       std::ostringstream oss; oss << "Such familyname \"" << newName << " already exists ! Kill it before !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  int cpy=(*it).second;
+  mcIdType cpy=(*it).second;
   _families.erase(it);
   _families[newName]=cpy;
   for(std::map<std::string, std::vector<std::string> >::iterator it3=_groups.begin();it3!=_groups.end();it3++)
@@ -1065,12 +1066,12 @@ bool MEDFileMesh::areFamsEqual(const MEDFileMesh *other, std::string& what) cons
 {
   if(_families==other->_families)
     return true;
-  std::map<std::string,int> fam0;
-  std::map<std::string,int> fam1;
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  std::map<std::string,mcIdType> fam0;
+  std::map<std::string,mcIdType> fam1;
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     if((*it).second!=0)
       fam0[(*it).first]=(*it).second;
-  for(std::map<std::string,int>::const_iterator it=other->_families.begin();it!=other->_families.end();it++)
+  for(std::map<std::string,mcIdType>::const_iterator it=other->_families.begin();it!=other->_families.end();it++)
     if((*it).second!=0)
       fam1[(*it).first]=(*it).second;
   return fam0==fam1;
@@ -1152,9 +1153,9 @@ bool MEDFileMesh::existsGroup(const std::string& groupName) const
  *  \param [in] famId - the family id.
  *  \return bool - \c true the family with the id \a famId exists in \a this mesh.
  */
-bool MEDFileMesh::existsFamily(int famId) const
+bool MEDFileMesh::existsFamily(mcIdType famId) const
 {
-  for(std::map<std::string,int>::const_iterator it2=_families.begin();it2!=_families.end();it2++)
+  for(std::map<std::string,mcIdType>::const_iterator it2=_families.begin();it2!=_families.end();it2++)
     if((*it2).second==famId)
       return true;
   return false;
@@ -1176,16 +1177,16 @@ bool MEDFileMesh::existsFamily(const std::string& familyName) const
  *  \param [in] familyName - the family name.
  *  \param [in] id - a new id of the family.
  */
-void MEDFileMesh::setFamilyId(const std::string& familyName, int id)
+void MEDFileMesh::setFamilyId(const std::string& familyName, mcIdType id)
 {
   std::string fname(familyName);
   _families[fname]=id;
 }
 
-void MEDFileMesh::setFamilyIdUnique(const std::string& familyName, int id)
+void MEDFileMesh::setFamilyIdUnique(const std::string& familyName, mcIdType id)
 {
   std::string fname(familyName);
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     if((*it).second==id)
       {
         if((*it).first!=familyName)
@@ -1203,13 +1204,13 @@ void MEDFileMesh::setFamilyIdUnique(const std::string& familyName, int id)
  *  \param [in] famId - an id of the family.
  *  \throw If a family with the same name or id already exists in \a this mesh.
  */
-void MEDFileMesh::addFamily(const std::string& familyName, int famId)
+void MEDFileMesh::addFamily(const std::string& familyName, mcIdType famId)
 {
   std::string fname(familyName);
-  std::map<std::string,int>::const_iterator it=_families.find(fname);
+  std::map<std::string,mcIdType>::const_iterator it=_families.find(fname);
   if(it==_families.end())
     {
-      for(std::map<std::string,int>::const_iterator it2=_families.begin();it2!=_families.end();it2++)
+      for(std::map<std::string,mcIdType>::const_iterator it2=_families.begin();it2!=_families.end();it2++)
         if((*it2).second==famId)
           {
             std::ostringstream oss;
@@ -1261,12 +1262,12 @@ void MEDFileMesh::createGroupOnAll(int meshDimRelToMaxExt, const std::string& gr
       oss << std::endl << "Please choose an another group name or call removeGroup(\"" << grpName << "\") method !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  const DataArrayInt *fieldFamIds=getFamilyFieldAtLevel(meshDimRelToMaxExt);
+  const DataArrayIdType *fieldFamIds=getFamilyFieldAtLevel(meshDimRelToMaxExt);
   if(fieldFamIds==0)
     throw INTERP_KERNEL::Exception("MEDFileMesh::createGroupOnAll : Family field arr ids is not defined for this level !");
-  MCAuto<DataArrayInt> famIds=fieldFamIds->getDifferentValues();
+  MCAuto<DataArrayIdType> famIds=fieldFamIds->getDifferentValues();
   std::vector<std::string> familiesOnWholeGroup;
-  for(const int *it=famIds->begin();it!=famIds->end();it++)
+  for(const mcIdType *it=famIds->begin();it!=famIds->end();it++)
     {
       bool tmp;
       familiesOnWholeGroup.push_back(findOrCreateAndGiveFamilyWithId(*it,tmp));
@@ -1283,28 +1284,28 @@ void MEDFileMesh::createGroupOnAll(int meshDimRelToMaxExt, const std::string& gr
  *          famIds should exclusively belong.
  *  \return bool - \c true if no modification is done in \a this mesh by this method.
  */
-bool MEDFileMesh::keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& vMeshDimRelToMaxExt)
+bool MEDFileMesh::keepFamIdsOnlyOnLevs(const std::vector<mcIdType>& famIds, const std::vector<int>& vMeshDimRelToMaxExt)
 {
   std::set<int> levsInput(vMeshDimRelToMaxExt.begin(),vMeshDimRelToMaxExt.end());
   std::vector<int> levs=getNonEmptyLevelsExt();
   std::set<int> levs2(levs.begin(),levs.end());
   std::vector<int> levsToTest;
   std::set_difference(levs2.begin(),levs2.end(),levsInput.begin(),levsInput.end(),std::back_insert_iterator< std::vector<int> >(levsToTest));
-  std::set<int> famIds2(famIds.begin(),famIds.end());
+  std::set<mcIdType> famIds2(famIds.begin(),famIds.end());
   bool ret=true;
-  int maxFamId=1;
+  mcIdType maxFamId=1;
   if(!_families.empty())
     maxFamId=getMaxFamilyId()+1;
   std::vector<std::string> allFams=getFamiliesNames();
   for(std::vector<int>::const_iterator it=levsToTest.begin();it!=levsToTest.end();it++)
     {
-      const DataArrayInt *fieldFamIds=getFamilyFieldAtLevel(*it);
+      const DataArrayIdType *fieldFamIds=getFamilyFieldAtLevel(*it);
       if(fieldFamIds)
         {
-          MCAuto<DataArrayInt> famIds3=fieldFamIds->getDifferentValues();
-          std::vector<int> tmp;
-          std::set_intersection(famIds3->begin(),famIds3->end(),famIds2.begin(),famIds2.end(),std::back_insert_iterator< std::vector<int> >(tmp));
-          for(std::vector<int>::const_iterator it2=tmp.begin();it2!=tmp.end();it2++)
+          MCAuto<DataArrayIdType> famIds3=fieldFamIds->getDifferentValues();
+          std::vector<mcIdType> tmp;
+          std::set_intersection(famIds3->begin(),famIds3->end(),famIds2.begin(),famIds2.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp));
+          for(std::vector<mcIdType>::const_iterator it2=tmp.begin();it2!=tmp.end();it2++)
             {
               ret=false;
               std::string famName=getFamilyNameGivenId(*it2);
@@ -1312,7 +1313,7 @@ bool MEDFileMesh::keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std
               std::string zeName=CreateNameNotIn(oss.str(),allFams);
               addFamilyOnAllGroupsHaving(famName,zeName);
               _families[zeName]=maxFamId;
-              (const_cast<DataArrayInt *>(fieldFamIds))->changeValue(*it2,maxFamId);
+              (const_cast<DataArrayIdType *>(fieldFamIds))->changeValue(*it2,maxFamId);
               maxFamId++;
             }
         }
@@ -1374,12 +1375,12 @@ void MEDFileMesh::addFamilyOnAllGroupsHaving(const std::string& famName, const s
     }
 }
 
-void MEDFileMesh::checkNoGroupClash(const DataArrayInt *famArr, const std::string& grpName) const
+void MEDFileMesh::checkNoGroupClash(const DataArrayIdType *famArr, const std::string& grpName) const
 {
   std::vector<std::string> grpsNames(getGroupsNames());
   if(std::find(grpsNames.begin(),grpsNames.end(),grpName)==grpsNames.end())
     return ;
-  std::vector<int> famIds(getFamiliesIdsOnGroup(grpName));
+  std::vector<mcIdType> famIds(getFamiliesIdsOnGroup(grpName));
   if(famArr->presenceOfValue(famIds))
     {
       std::ostringstream oss; oss << "MEDFileUMesh::addGroup : Group with name \"" << grpName << "\" already exists at specified level ! Destroy it before calling this method !";
@@ -1389,9 +1390,9 @@ void MEDFileMesh::checkNoGroupClash(const DataArrayInt *famArr, const std::strin
 
 /*!
  * \param [in] ids ids and group name of the new group to add. The ids should be sorted and different each other (MED file norm).
- * \parma [in,out] famArr family array on level of interest to be renumbered. The input pointer should be not \c NULL (no check of that will be performed)
+ * \param [in,out] famArr family array on level of interest to be renumbered. The input pointer should be not \c NULL (no check of that will be performed)
  */
-void MEDFileMesh::addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr)
+void MEDFileMesh::addGroupUnderground(bool isNodeGroup, const DataArrayIdType *ids, DataArrayIdType *famArr)
 {
   if(!ids)
     throw INTERP_KERNEL::Exception("MEDFileUMesh::addGroup : NULL pointer in input !");
@@ -1400,28 +1401,28 @@ void MEDFileMesh::addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids,
     throw INTERP_KERNEL::Exception("MEDFileUMesh::addGroup : empty group name ! MED file format do not accept empty group name !");
   ids->checkStrictlyMonotonic(true);
   checkNoGroupClash(famArr,grpName);
-  MCAuto<DataArrayInt> famArrTmp; famArrTmp.takeRef(famArr);
-  std::list< MCAuto<DataArrayInt> > allFamIds(getAllNonNullFamilyIds());
+  MCAuto<DataArrayIdType> famArrTmp; famArrTmp.takeRef(famArr);
+  std::list< MCAuto<DataArrayIdType> > allFamIds(getAllNonNullFamilyIds());
   allFamIds.erase(std::find(allFamIds.begin(),allFamIds.end(),famArrTmp));
-  MCAuto<DataArrayInt> famIds=famArr->selectByTupleIdSafe(ids->begin(),ids->end());
-  MCAuto<DataArrayInt> diffFamIds=famIds->getDifferentValues();
-  std::vector<int> familyIds;
-  std::vector< MCAuto<DataArrayInt> > idsPerfamiliyIds;
-  int maxVal=getTheMaxAbsFamilyId()+1;
-  std::map<std::string,int> families(_families);
+  MCAuto<DataArrayIdType> famIds=famArr->selectByTupleIdSafe(ids->begin(),ids->end());
+  MCAuto<DataArrayIdType> diffFamIds=famIds->getDifferentValues();
+  std::vector<mcIdType> familyIds;
+  std::vector< MCAuto<DataArrayIdType> > idsPerfamiliyIds;
+  mcIdType maxVal=getTheMaxAbsFamilyId()+1;
+  std::map<std::string,mcIdType> families(_families);
   std::map<std::string, std::vector<std::string> > groups(_groups);
   std::vector<std::string> fams;
   bool created(false);
-  for(const int *famId=diffFamIds->begin();famId!=diffFamIds->end();famId++)
+  for(const mcIdType *famId=diffFamIds->begin();famId!=diffFamIds->end();famId++)
     {
-      MCAuto<DataArrayInt> ids2Tmp=famIds->findIdsEqual(*famId);
-      MCAuto<DataArrayInt> ids2=ids->selectByTupleId(ids2Tmp->begin(),ids2Tmp->end());
-      MCAuto<DataArrayInt> ids1=famArr->findIdsEqual(*famId);
-      MCAuto<DataArrayInt> ret0(ids1->buildSubstractionOptimized(ids2));
+      MCAuto<DataArrayIdType> ids2Tmp=famIds->findIdsEqual(*famId);
+      MCAuto<DataArrayIdType> ids2=ids->selectByTupleId(ids2Tmp->begin(),ids2Tmp->end());
+      MCAuto<DataArrayIdType> ids1=famArr->findIdsEqual(*famId);
+      MCAuto<DataArrayIdType> ret0(ids1->buildSubstractionOptimized(ids2));
       if(ret0->empty())
         {
           bool isFamPresent=false;
-          for(std::list< MCAuto<DataArrayInt> >::const_iterator itl=allFamIds.begin();itl!=allFamIds.end() && !isFamPresent;itl++)
+          for(std::list< MCAuto<DataArrayIdType> >::const_iterator itl=allFamIds.begin();itl!=allFamIds.end() && !isFamPresent;itl++)
             isFamPresent=(*itl)->presenceOfValue(*famId);
           if(!isFamPresent && *famId!=0)
             { familyIds.push_back(*famId); idsPerfamiliyIds.push_back(ret0); fams.push_back(FindOrCreateAndGiveFamilyWithId(families,*famId,created)); } // adding *famId in grp
@@ -1453,7 +1454,7 @@ void MEDFileMesh::addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids,
     }
   for(std::size_t i=0;i<familyIds.size();i++)
     {
-      DataArrayInt *da=idsPerfamiliyIds[i];
+      DataArrayIdType *da=idsPerfamiliyIds[i];
       famArr->setPartOfValuesSimple3(familyIds[i],da->begin(),da->end(),0,1,1);
     }
   _families=families;
@@ -1496,7 +1497,7 @@ void MEDFileMesh::ChangeAllGroupsContainingFamily(std::map<std::string, std::vec
  *  \return std::string - the name of the existing or the created family.
  *  \throw If it is not possible to create a unique family name.
  */
-std::string MEDFileMesh::findOrCreateAndGiveFamilyWithId(int id, bool& created)
+std::string MEDFileMesh::findOrCreateAndGiveFamilyWithId(mcIdType id, bool& created)
 {
   return FindOrCreateAndGiveFamilyWithId(_families,id,created);
 }
@@ -1509,11 +1510,11 @@ std::string MEDFileMesh::findOrCreateAndGiveFamilyWithId(int id, bool& created)
  * will be modified.
  * This method will throws an exception if it is not possible to create a unique family name.
  */
-std::string MEDFileMesh::FindOrCreateAndGiveFamilyWithId(std::map<std::string,int>& families, int id, bool& created)
+std::string MEDFileMesh::FindOrCreateAndGiveFamilyWithId(std::map<std::string,mcIdType>& families, mcIdType id, bool& created)
 {
   std::vector<std::string> famAlreadyExisting(families.size());
   int ii=0;
-  for(std::map<std::string,int>::const_iterator it=families.begin();it!=families.end();it++,ii++)
+  for(std::map<std::string,mcIdType>::const_iterator it=families.begin();it!=families.end();it++,ii++)
     {
       if((*it).second!=id)
         {
@@ -1536,7 +1537,7 @@ std::string MEDFileMesh::FindOrCreateAndGiveFamilyWithId(std::map<std::string,in
  * Sets names and ids of all families in \a this mesh.
  *  \param [in] info - a map of a family name to a family id.
  */
-void MEDFileMesh::setFamilyInfo(const std::map<std::string,int>& info)
+void MEDFileMesh::setFamilyInfo(const std::map<std::string,mcIdType>& info)
 {
   _families=info;
 }
@@ -1554,12 +1555,12 @@ void MEDFileMesh::setGroupInfo(const std::map<std::string, std::vector<std::stri
 /*!
  * Returns an id of the family having a given name.
  *  \param [in] name - the name of the family of interest.
- *  \return int - the id of the family of interest.
+ *  \return mcIdType - the id of the family of interest.
  *  \throw If no family with such a \a name exists.
  */
-int MEDFileMesh::getFamilyId(const std::string& name) const
+mcIdType MEDFileMesh::getFamilyId(const std::string& name) const
 {
-  std::map<std::string, int>::const_iterator it=_families.find(name);
+  std::map<std::string, mcIdType>::const_iterator it=_families.find(name);
   if(it==_families.end())
     {
       std::vector<std::string> fams(getFamiliesNames());
@@ -1573,16 +1574,16 @@ int MEDFileMesh::getFamilyId(const std::string& name) const
 /*!
  * Returns ids of the families having given names.
  *  \param [in] fams - a sequence of the names of families of interest.
- *  \return std::vector<int> - a sequence of the ids of families of interest.
+ *  \return std::vector<mcIdType> - a sequence of the ids of families of interest.
  *  \throw If \a fams contains a name of an inexistent family.
  */
-std::vector<int> MEDFileMesh::getFamiliesIds(const std::vector<std::string>& fams) const
+std::vector<mcIdType> MEDFileMesh::getFamiliesIds(const std::vector<std::string>& fams) const
 {
-  std::vector<int> ret(fams.size());
+  std::vector<mcIdType> ret(fams.size());
   int i=0;
   for(std::vector<std::string>::const_iterator it=fams.begin();it!=fams.end();it++,i++)
     {
-      std::map<std::string, int>::const_iterator it2=_families.find(*it);
+      std::map<std::string, mcIdType>::const_iterator it2=_families.find(*it);
       if(it2==_families.end())
         {
           std::vector<std::string> fams2=getFamiliesNames();
@@ -1597,15 +1598,15 @@ std::vector<int> MEDFileMesh::getFamiliesIds(const std::vector<std::string>& fam
 
 /*!
  * Returns a maximal abs(id) of families in \a this mesh.
- *  \return int - the maximal norm of family id.
+ *  \return mcIdType - the maximal norm of family id.
  *  \throw If there are no families in \a this mesh.
  */
-int MEDFileMesh::getMaxAbsFamilyId() const
+mcIdType MEDFileMesh::getMaxAbsFamilyId() const
 {
   if(_families.empty())
     throw INTERP_KERNEL::Exception("MEDFileMesh::getMaxFamilyId : no families set !");
-  int ret=-std::numeric_limits<int>::max();
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  mcIdType ret=-std::numeric_limits<mcIdType>::max();
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       ret=std::max(std::abs((*it).second),ret);
     }
@@ -1614,15 +1615,15 @@ int MEDFileMesh::getMaxAbsFamilyId() const
 
 /*!
  * Returns a maximal id of families in \a this mesh.
- *  \return int - the maximal family id.
+ *  \return mcIdType - the maximal family id.
  *  \throw If there are no families in \a this mesh.
  */
-int MEDFileMesh::getMaxFamilyId() const
+mcIdType MEDFileMesh::getMaxFamilyId() const
 {
   if(_families.empty())
     throw INTERP_KERNEL::Exception("MEDFileMesh::getMaxFamilyId : no families set !");
-  int ret=-std::numeric_limits<int>::max();
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  mcIdType ret=-std::numeric_limits<mcIdType>::max();
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       ret=std::max((*it).second,ret);
     }
@@ -1631,15 +1632,15 @@ int MEDFileMesh::getMaxFamilyId() const
 
 /*!
  * Returns a minimal id of families in \a this mesh.
- *  \return int - the minimal family id.
+ *  \return mcIdType - the minimal family id.
  *  \throw If there are no families in \a this mesh.
  */
-int MEDFileMesh::getMinFamilyId() const
+mcIdType MEDFileMesh::getMinFamilyId() const
 {
   if(_families.empty())
     throw INTERP_KERNEL::Exception("MEDFileMesh::getMinFamilyId : no families set !");
-  int ret=std::numeric_limits<int>::max();
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  mcIdType ret=std::numeric_limits<mcIdType>::max();
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       ret=std::min((*it).second,ret);
     }
@@ -1649,42 +1650,42 @@ int MEDFileMesh::getMinFamilyId() const
 /*!
  * Returns a maximal id of families in \a this mesh. Not only named families are
  * considered but all family fields as well.
- *  \return int - the maximal family id.
+ *  \return mcIdType - the maximal family id.
  */
-int MEDFileMesh::getTheMaxAbsFamilyId() const
+mcIdType MEDFileMesh::getTheMaxAbsFamilyId() const
 {
-  int m1=-std::numeric_limits<int>::max();
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  mcIdType m1=-std::numeric_limits<mcIdType>::max();
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     m1=std::max(std::abs((*it).second),m1);
-  int m2=getMaxAbsFamilyIdInArrays();
+  mcIdType m2=getMaxAbsFamilyIdInArrays();
   return std::max(m1,m2);
 }
 
 /*!
  * Returns a maximal id of families in \a this mesh. Not only named families are
  * considered but all family fields as well.
- *  \return int - the maximal family id.
+ *  \return mcIdType - the maximal family id.
  */
-int MEDFileMesh::getTheMaxFamilyId() const
+mcIdType MEDFileMesh::getTheMaxFamilyId() const
 {
-  int m1=-std::numeric_limits<int>::max();
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  mcIdType m1=-std::numeric_limits<mcIdType>::max();
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     m1=std::max((*it).second,m1);
-  int m2=getMaxFamilyIdInArrays();
+  mcIdType m2=getMaxFamilyIdInArrays();
   return std::max(m1,m2);
 }
 
 /*!
  * Returns a minimal id of families in \a this mesh. Not only named families are
  * considered but all family fields as well.
- *  \return int - the minimal family id.
+ *  \return mcIdType - the minimal family id.
  */
-int MEDFileMesh::getTheMinFamilyId() const
+mcIdType MEDFileMesh::getTheMinFamilyId() const
 {
-  int m1=std::numeric_limits<int>::max();
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  mcIdType m1=std::numeric_limits<mcIdType>::max();
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     m1=std::min((*it).second,m1);
-  int m2=getMinFamilyIdInArrays();
+  mcIdType m2=getMinFamilyIdInArrays();
   return std::min(m1,m2);
 }
 
@@ -1693,13 +1694,13 @@ int MEDFileMesh::getTheMinFamilyId() const
  * 
  * \sa MEDFileMesh::computeAllFamilyIdsInUse
  */
-DataArrayInt *MEDFileMesh::getAllFamiliesIdsReferenced() const
+DataArrayIdType *MEDFileMesh::getAllFamiliesIdsReferenced() const
 {
-  MCAuto<DataArrayInt> ret=DataArrayInt::New();
-  std::set<int> v;
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  MCAuto<DataArrayIdType> ret=DataArrayIdType::New();
+  std::set<mcIdType> v;
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     v.insert((*it).second);
-  ret->alloc((int)v.size(),1);
+  ret->alloc((mcIdType)v.size(),1);
   std::copy(v.begin(),v.end(),ret->getPointer());
   return ret.retn();
 }
@@ -1709,15 +1710,15 @@ DataArrayInt *MEDFileMesh::getAllFamiliesIdsReferenced() const
  * 
  * \sa MEDFileMesh::getAllFamiliesIdsReferenced
  */
-DataArrayInt *MEDFileMesh::computeAllFamilyIdsInUse() const
+DataArrayIdType *MEDFileMesh::computeAllFamilyIdsInUse() const
 {
   std::vector<int> famLevs=getFamArrNonEmptyLevelsExt();
-  MCAuto<DataArrayInt> ret;
+  MCAuto<DataArrayIdType> ret;
   for(std::vector<int>::const_iterator it=famLevs.begin();it!=famLevs.end();it++)
     {
-      const DataArrayInt *arr=getFamilyFieldAtLevel(*it);//arr not null due to spec of getFamArrNonEmptyLevelsExt
-      MCAuto<DataArrayInt> dv=arr->getDifferentValues();
-      if((DataArrayInt *) ret)
+      const DataArrayIdType *arr=getFamilyFieldAtLevel(*it);//arr not null due to spec of getFamArrNonEmptyLevelsExt
+      MCAuto<DataArrayIdType> dv=arr->getDifferentValues();
+      if((DataArrayIdType *) ret)
         ret=dv->buildUnion(ret);
       else
         ret=dv;
@@ -1732,32 +1733,32 @@ DataArrayInt *MEDFileMesh::computeAllFamilyIdsInUse() const
 bool MEDFileMesh::ensureDifferentFamIdsPerLevel()
 {
   std::vector<int> levs=getNonEmptyLevelsExt();
-  std::set<int> allFamIds;
-  int maxId=getMaxFamilyId()+1;
-  std::map<int,std::vector<int> > famIdsToRenum;
+  std::set<mcIdType> allFamIds;
+  mcIdType maxId=getMaxFamilyId()+1;
+  std::map<int,std::vector<mcIdType> > famIdsToRenum;
   for(std::vector<int>::const_iterator it=levs.begin();it!=levs.end();it++)
     {
-      const DataArrayInt *fam=getFamilyFieldAtLevel(*it);
+      const DataArrayIdType *fam=getFamilyFieldAtLevel(*it);
       if(fam)
         {
-          MCAuto<DataArrayInt> tmp=fam->getDifferentValues();
-          std::set<int> r2;
+          MCAuto<DataArrayIdType> tmp=fam->getDifferentValues();
+          std::set<mcIdType> r2;
           std::set_intersection(tmp->begin(),tmp->end(),allFamIds.begin(),allFamIds.end(),std::inserter(r2,r2.end()));
           if(!r2.empty())
             famIdsToRenum[*it].insert(famIdsToRenum[*it].end(),r2.begin(),r2.end());
-          std::set<int> r3;
+          std::set<mcIdType> r3;
           std::set_union(tmp->begin(),tmp->end(),allFamIds.begin(),allFamIds.end(),std::inserter(r3,r3.end()));
         }
     }
   if(famIdsToRenum.empty())
     return true;
-  MCAuto<DataArrayInt> allIds=getAllFamiliesIdsReferenced();
-  for(std::map<int,std::vector<int> >::const_iterator it2=famIdsToRenum.begin();it2!=famIdsToRenum.end();it2++)
+  MCAuto<DataArrayIdType> allIds=getAllFamiliesIdsReferenced();
+  for(std::map<int,std::vector<mcIdType> >::const_iterator it2=famIdsToRenum.begin();it2!=famIdsToRenum.end();it2++)
     {
-      DataArrayInt *fam=const_cast<DataArrayInt *>(getFamilyFieldAtLevel((*it2).first));
-      int *famIdsToChange=fam->getPointer();
-      std::map<int,int> ren;
-      for(std::vector<int>::const_iterator it3=(*it2).second.begin();it3!=(*it2).second.end();it3++,maxId++)
+      DataArrayIdType *fam=const_cast<DataArrayIdType *>(getFamilyFieldAtLevel((*it2).first));
+      mcIdType *famIdsToChange=fam->getPointer();
+      std::map<mcIdType,mcIdType> ren;
+      for(std::vector<mcIdType>::const_iterator it3=(*it2).second.begin();it3!=(*it2).second.end();it3++,maxId++)
         {
           if(allIds->presenceOfValue(*it3))
             {
@@ -1770,8 +1771,8 @@ bool MEDFileMesh::ensureDifferentFamIdsPerLevel()
                 addFamilyOnGrp((*it4),newFam);
             }
         }
-      MCAuto<DataArrayInt> ids=fam->findIdsEqualList(&(*it2).second[0],&(*it2).second[0]+(*it2).second.size());
-      for(const int *id=ids->begin();id!=ids->end();id++)
+      MCAuto<DataArrayIdType> ids=fam->findIdsEqualList(&(*it2).second[0],&(*it2).second[0]+(*it2).second.size());
+      for(const mcIdType *id=ids->begin();id!=ids->end();id++)
         famIdsToChange[*id]=ren[famIdsToChange[*id]];
     }
   return false;
@@ -1787,27 +1788,27 @@ bool MEDFileMesh::ensureDifferentFamIdsPerLevel()
 void MEDFileMesh::normalizeFamIdsTrio()
 {
   ensureDifferentFamIdsPerLevel();
-  MCAuto<DataArrayInt> allIds=getAllFamiliesIdsReferenced();
+  MCAuto<DataArrayIdType> allIds=getAllFamiliesIdsReferenced();
   std::vector<int> levs=getNonEmptyLevelsExt();
   std::set<int> levsS(levs.begin(),levs.end());
   std::set<std::string> famsFetched;
-  std::map<std::string,int> families;
+  std::map<std::string,mcIdType> families;
   if(std::find(levs.begin(),levs.end(),0)!=levs.end())
     {
       levsS.erase(0);
-      const DataArrayInt *fam=getFamilyFieldAtLevel(0);
+      const DataArrayIdType *fam=getFamilyFieldAtLevel(0);
       if(fam)
         {
-          int refId=1;
-          MCAuto<DataArrayInt> tmp=fam->getDifferentValues();
-          std::map<int,int> ren;
-          for(const int *it=tmp->begin();it!=tmp->end();it++,refId++)
+          mcIdType refId=1;
+          MCAuto<DataArrayIdType> tmp=fam->getDifferentValues();
+          std::map<mcIdType,mcIdType> ren;
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++,refId++)
             ren[*it]=refId;
-          int nbOfTuples=fam->getNumberOfTuples();
-          int *start=const_cast<DataArrayInt *>(fam)->getPointer();
-          for(int *w=start;w!=start+nbOfTuples;w++)
+          mcIdType nbOfTuples=fam->getNumberOfTuples();
+          mcIdType *start=const_cast<DataArrayIdType *>(fam)->getPointer();
+          for(mcIdType *w=start;w!=start+nbOfTuples;w++)
             *w=ren[*w];
-          for(const int *it=tmp->begin();it!=tmp->end();it++)
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++)
             {
               if(allIds->presenceOfValue(*it))
                 {
@@ -1821,19 +1822,19 @@ void MEDFileMesh::normalizeFamIdsTrio()
   if(std::find(levs.begin(),levs.end(),-1)!=levs.end())
     {
       levsS.erase(-1);
-      const DataArrayInt *fam=getFamilyFieldAtLevel(-1);
+      const DataArrayIdType *fam=getFamilyFieldAtLevel(-1);
       if(fam)
         {
-          int refId=-1;
-          MCAuto<DataArrayInt> tmp=fam->getDifferentValues();
-          std::map<int,int> ren;
-          for(const int *it=tmp->begin();it!=tmp->end();it++,refId--)
+          mcIdType refId=-1;
+          MCAuto<DataArrayIdType> tmp=fam->getDifferentValues();
+          std::map<mcIdType,mcIdType> ren;
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++,refId--)
             ren[*it]=refId;
-          int nbOfTuples=fam->getNumberOfTuples();
-          int *start=const_cast<DataArrayInt *>(fam)->getPointer();
-          for(int *w=start;w!=start+nbOfTuples;w++)
+          mcIdType nbOfTuples=fam->getNumberOfTuples();
+          mcIdType *start=const_cast<DataArrayIdType *>(fam)->getPointer();
+          for(mcIdType *w=start;w!=start+nbOfTuples;w++)
             *w=ren[*w];
-          for(const int *it=tmp->begin();it!=tmp->end();it++)
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++)
             {
               if(allIds->presenceOfValue(*it))
                 {
@@ -1846,12 +1847,12 @@ void MEDFileMesh::normalizeFamIdsTrio()
     }
   for(std::set<int>::const_iterator it2=levsS.begin();it2!=levsS.end();it2++)
     {
-      DataArrayInt *fam=const_cast<DataArrayInt*>(getFamilyFieldAtLevel(*it2));
+      DataArrayIdType *fam=const_cast<DataArrayIdType*>(getFamilyFieldAtLevel(*it2));
       if(fam)
         {
-          MCAuto<DataArrayInt> tmp=fam->getDifferentValues();
+          MCAuto<DataArrayIdType> tmp=fam->getDifferentValues();
           fam->fillWithZero();
-          for(const int *it3=tmp->begin();it3!=tmp->end();it3++)
+          for(const mcIdType *it3=tmp->begin();it3!=tmp->end();it3++)
             if(allIds->presenceOfValue(*it3))
               {
                 std::string famName=getFamilyNameGivenId(*it3);
@@ -1879,27 +1880,27 @@ void MEDFileMesh::normalizeFamIdsTrio()
 void MEDFileMesh::normalizeFamIdsMEDFile()
 {
   ensureDifferentFamIdsPerLevel();
-  MCAuto<DataArrayInt> allIds=getAllFamiliesIdsReferenced();
+  MCAuto<DataArrayIdType> allIds=getAllFamiliesIdsReferenced();
   std::vector<int> levs=getNonEmptyLevelsExt();
   std::set<int> levsS(levs.begin(),levs.end());
   std::set<std::string> famsFetched;
-  std::map<std::string,int> families;
-  int refId=1;
+  std::map<std::string,mcIdType> families;
+  mcIdType refId=1;
   if(std::find(levs.begin(),levs.end(),1)!=levs.end())
     {
       levsS.erase(1);
-      const DataArrayInt *fam=getFamilyFieldAtLevel(1);
+      const DataArrayIdType *fam=getFamilyFieldAtLevel(1);
       if(fam)
         {
-          MCAuto<DataArrayInt> tmp=fam->getDifferentValues();
-          std::map<int,int> ren;
-          for(const int *it=tmp->begin();it!=tmp->end();it++,refId++)
+          MCAuto<DataArrayIdType> tmp=fam->getDifferentValues();
+          std::map<mcIdType,mcIdType> ren;
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++,refId++)
             ren[*it]=refId;
-          int nbOfTuples=fam->getNumberOfTuples();
-          int *start=const_cast<DataArrayInt *>(fam)->getPointer();
-          for(int *w=start;w!=start+nbOfTuples;w++)
+          mcIdType nbOfTuples=fam->getNumberOfTuples();
+          mcIdType *start=const_cast<DataArrayIdType *>(fam)->getPointer();
+          for(mcIdType *w=start;w!=start+nbOfTuples;w++)
             *w=ren[*w];
-          for(const int *it=tmp->begin();it!=tmp->end();it++)
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++)
             {
               if(allIds->presenceOfValue(*it))
                 {
@@ -1913,18 +1914,18 @@ void MEDFileMesh::normalizeFamIdsMEDFile()
   refId=-1;
   for(std::set<int>::const_reverse_iterator it2=levsS.rbegin();it2!=levsS.rend();it2++)
     {
-      const DataArrayInt *fam=getFamilyFieldAtLevel(*it2);
+      const DataArrayIdType *fam=getFamilyFieldAtLevel(*it2);
       if(fam)
         {
-          MCAuto<DataArrayInt> tmp=fam->getDifferentValues();
-          std::map<int,int> ren;
-          for(const int *it=tmp->begin();it!=tmp->end();it++,refId--)
+          MCAuto<DataArrayIdType> tmp=fam->getDifferentValues();
+          std::map<mcIdType,mcIdType> ren;
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++,refId--)
             ren[*it]=refId;
-          int nbOfTuples=fam->getNumberOfTuples();
-          int *start=const_cast<DataArrayInt *>(fam)->getPointer();
-          for(int *w=start;w!=start+nbOfTuples;w++)
+          mcIdType nbOfTuples=fam->getNumberOfTuples();
+          mcIdType *start=const_cast<DataArrayIdType *>(fam)->getPointer();
+          for(mcIdType *w=start;w!=start+nbOfTuples;w++)
             *w=ren[*w];
-          for(const int *it=tmp->begin();it!=tmp->end();it++)
+          for(const mcIdType *it=tmp->begin();it!=tmp->end();it++)
             {
               if(allIds->presenceOfValue(*it))
                 {
@@ -1952,9 +1953,9 @@ void MEDFileMesh::normalizeFamIdsMEDFile()
  *  \return std::string - the name of the found family.
  *  \throw If no family with the given \a id exists.
  */
-std::string MEDFileMesh::getFamilyNameGivenId(int id) const
+std::string MEDFileMesh::getFamilyNameGivenId(mcIdType id) const
 {
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     if((*it).second==id)
       return (*it).first;
   std::ostringstream oss; oss << "MEDFileUMesh::getFamilyNameGivenId : no such family id : " << id;
@@ -1979,12 +1980,12 @@ std::string MEDFileMesh::simpleRepr() const
  * This method is nearly like getFamilyFieldAtLevel method. Except that if the array does not exist at the specified level \a meshDimRelToMaxExt
  * an empty one is created.
  */
-DataArrayInt *MEDFileMesh::getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt)
+DataArrayIdType *MEDFileMesh::getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt)
 {
-  DataArrayInt *ret(getFamilyFieldAtLevel(meshDimRelToMaxExt));
+  DataArrayIdType *ret(getFamilyFieldAtLevel(meshDimRelToMaxExt));
   if(ret)
     return ret;
-  MCAuto<DataArrayInt> arr(DataArrayInt::New());
+  MCAuto<DataArrayIdType> arr(DataArrayIdType::New());
   arr->alloc(getSizeAtLevel(meshDimRelToMaxExt),1);
   arr->fillWithZero();
   setFamilyFieldArr(meshDimRelToMaxExt,arr);
@@ -1998,17 +1999,17 @@ DataArrayInt *MEDFileMesh::getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToM
  *  \param [in] grp - the name of the group of interest.
  *  \param [in] renum - if \c true, the optional numbers of entities, if available, are
  *          returned instead of ids. 
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of mesh entities of the group. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the name of a nonexistent group is specified.
  *  \throw If the family field is missing for \a meshDimRelToMaxExt.
  */
-DataArrayInt *MEDFileMesh::getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum) const
+DataArrayIdType *MEDFileMesh::getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum) const
 {
   std::vector<std::string> tmp(1);
   tmp[0]=grp;
-  DataArrayInt *ret=getGroupsArr(meshDimRelToMaxExt,tmp,renum);
+  DataArrayIdType *ret=getGroupsArr(meshDimRelToMaxExt,tmp,renum);
   ret->setName(grp);
   return ret;
 }
@@ -2020,13 +2021,13 @@ DataArrayInt *MEDFileMesh::getGroupArr(int meshDimRelToMaxExt, const std::string
  *  \param [in] grps - the names of the groups of interest.
  *  \param [in] renum - if \c true, the optional numbers of entities, if available, are
  *          returned instead of ids.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of mesh entities of the groups. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the name of a nonexistent group is present in \a grps.
  *  \throw If the family field is missing for \a meshDimRelToMaxExt.
  */
-DataArrayInt *MEDFileMesh::getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum) const
+DataArrayIdType *MEDFileMesh::getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum) const
 {
   std::vector<std::string> fams2=getFamiliesOnGroups(grps);
   return getFamiliesArr(meshDimRelToMaxExt,fams2,renum);
@@ -2039,16 +2040,16 @@ DataArrayInt *MEDFileMesh::getGroupsArr(int meshDimRelToMaxExt, const std::vecto
  *  \param [in] fam - the name of the family of interest.
  *  \param [in] renum - if \c true, the optional numbers of entities, if available, are
  *          returned instead of ids. 
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of mesh entities of the family. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the family field is missing for \a meshDimRelToMaxExt.
  */
-DataArrayInt *MEDFileMesh::getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum) const
+DataArrayIdType *MEDFileMesh::getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum) const
 {
   std::vector<std::string> tmp(1);
   tmp[0]=fam;
-  DataArrayInt *ret=getFamiliesArr(meshDimRelToMaxExt,tmp,renum);
+  DataArrayIdType *ret=getFamiliesArr(meshDimRelToMaxExt,tmp,renum);
   ret->setName(fam);
   return ret;
 }
@@ -2058,17 +2059,17 @@ DataArrayInt *MEDFileMesh::getFamilyArr(int meshDimRelToMaxExt, const std::strin
  *  \param [in] grp - the name of the group of interest.
  *  \param [in] renum - if \c true, the optional numbers of nodes, if available, are
  *          returned instead of ids. 
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of nodes of the group. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the name of a nonexistent group is specified.
  *  \throw If the family field is missing for nodes.
  */
-DataArrayInt *MEDFileMesh::getNodeGroupArr(const std::string& grp, bool renum) const
+DataArrayIdType *MEDFileMesh::getNodeGroupArr(const std::string& grp, bool renum) const
 {
   std::vector<std::string> tmp(1);
   tmp[0]=grp;
-  DataArrayInt *ret=getNodeGroupsArr(tmp,renum);
+  DataArrayIdType *ret=getNodeGroupsArr(tmp,renum);
   ret->setName(grp);
   return ret;
 }
@@ -2078,13 +2079,13 @@ DataArrayInt *MEDFileMesh::getNodeGroupArr(const std::string& grp, bool renum) c
  *  \param [in] grps - the names of the groups of interest.
  *  \param [in] renum - if \c true, the optional numbers of nodes, if available, are
  *          returned instead of ids. 
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of nodes of the groups. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the name of a nonexistent group is present in \a grps.
  *  \throw If the family field is missing for nodes.
  */
-DataArrayInt *MEDFileMesh::getNodeGroupsArr(const std::vector<std::string>& grps, bool renum) const
+DataArrayIdType *MEDFileMesh::getNodeGroupsArr(const std::vector<std::string>& grps, bool renum) const
 {
   return getGroupsArr(1,grps,renum);
 }
@@ -2094,17 +2095,17 @@ DataArrayInt *MEDFileMesh::getNodeGroupsArr(const std::vector<std::string>& grps
  *  \param [in] grp - the name of the group of interest.
  *  \param [in] renum - if \c true, the optional numbers of nodes, if available, are
  *          returned instead of ids. 
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of nodes of the group. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the name of a nonexistent group is specified.
  *  \throw If the family field is missing for nodes.
  */
-DataArrayInt *MEDFileMesh::getNodeFamilyArr(const std::string& fam, bool renum) const
+DataArrayIdType *MEDFileMesh::getNodeFamilyArr(const std::string& fam, bool renum) const
 {
   std::vector<std::string> tmp(1);
   tmp[0]=fam;
-  DataArrayInt *ret=getNodeFamiliesArr(tmp,renum);
+  DataArrayIdType *ret=getNodeFamiliesArr(tmp,renum);
   ret->setName(fam);
   return ret;
 }
@@ -2114,12 +2115,12 @@ DataArrayInt *MEDFileMesh::getNodeFamilyArr(const std::string& fam, bool renum)
  *  \param [in] fams - the names of the families of interest.
  *  \param [in] renum - if \c true, the optional numbers of nodes, if available, are
  *          returned instead of ids. 
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of nodes of the families. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the family field is missing for nodes.
  */
-DataArrayInt *MEDFileMesh::getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum) const
+DataArrayIdType *MEDFileMesh::getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum) const
 {
   return getFamiliesArr(1,fams,renum);
 }
@@ -2136,7 +2137,7 @@ DataArrayInt *MEDFileMesh::getNodeFamiliesArr(const std::vector<std::string>& fa
  *  \throw If \a grps includes invalid ids (or numbers if \a renum == \c true ).
  *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
  */
-void MEDFileMesh::setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<const DataArrayInt *>& grps, bool renum)
+void MEDFileMesh::setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<const DataArrayIdType *>& grps, bool renum)
 {
   if(grps.empty())
     return ;
@@ -2144,7 +2145,7 @@ void MEDFileMesh::setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<con
   std::vector<std::string> grpsName2(grps.size());
   int i=0;
 
-  for(std::vector<const DataArrayInt *>::const_iterator it=grps.begin();it!=grps.end();it++,i++)
+  for(std::vector<const DataArrayIdType *>::const_iterator it=grps.begin();it!=grps.end();it++,i++)
     {
       grpsName.insert((*it)->getName());
       grpsName2[i]=(*it)->getName();
@@ -2153,29 +2154,29 @@ void MEDFileMesh::setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<con
     throw INTERP_KERNEL::Exception("MEDFileUMesh::setGroupsAtLevel : groups name must be different each other !");
   if(grpsName.find(std::string(""))!=grpsName.end())
     throw INTERP_KERNEL::Exception("MEDFileUMesh::setGroupsAtLevel : groups name must be different empty string !");
-  int sz=getSizeAtLevel(meshDimRelToMaxExt);
-  MCAuto<DataArrayInt> fam;
-  std::vector< std::vector<int> > fidsOfGroups;
+  mcIdType sz=getSizeAtLevel(meshDimRelToMaxExt);
+  MCAuto<DataArrayIdType> fam;
+  std::vector< std::vector<mcIdType> > fidsOfGroups;
   if(!renum)
     {
-      fam=DataArrayInt::MakePartition(grps,sz,fidsOfGroups);
+      fam=DataArrayIdType::MakePartition(grps,sz,fidsOfGroups);
     }
   else
     {
-      std::vector< MCAuto<DataArrayInt> > grps2(grps.size());
+      std::vector< MCAuto<DataArrayIdType> > grps2(grps.size());
       for(unsigned int ii=0;ii<grps.size();ii++)
         {
           grps2[ii]=MEDFileUMeshSplitL1::Renumber(getRevNumberFieldAtLevel(meshDimRelToMaxExt),grps[ii]);
           grps2[ii]->setName(grps[ii]->getName());
         }
-      std::vector<const DataArrayInt *> grps3(grps2.begin(),grps2.end());
-      fam=DataArrayInt::MakePartition(grps3,sz,fidsOfGroups);
+      std::vector<const DataArrayIdType *> grps3(grps2.begin(),grps2.end());
+      fam=DataArrayIdType::MakePartition(grps3,sz,fidsOfGroups);
     }
-  int offset=1;
+  mcIdType offset=1;
   if(!_families.empty())
     offset=getMaxAbsFamilyId()+1;
   TranslateFamilyIds(meshDimRelToMaxExt==1?offset:-offset,fam,fidsOfGroups);
-  MCAuto<DataArrayInt> ids=fam->getDifferentValues();
+  MCAuto<DataArrayIdType> ids=fam->getDifferentValues();
   appendFamilyEntries(ids,fidsOfGroups,grpsName2);
   setFamilyFieldArr(meshDimRelToMaxExt,fam);
 }
@@ -2185,10 +2186,10 @@ void MEDFileMesh::setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<con
  * not in '_families'. Groups information are given in parameters in order to give to families representative names.
  * For the moment, the two last input parameters are not taken into account.
  */
-void MEDFileMesh::appendFamilyEntries(const DataArrayInt *famIds, const std::vector< std::vector<int> >& fidsOfGrps, const std::vector<std::string>& grpNames)
+void MEDFileMesh::appendFamilyEntries(const DataArrayIdType *famIds, const std::vector< std::vector<mcIdType> >& fidsOfGrps, const std::vector<std::string>& grpNames)
 {
-  std::map<int,std::string> famInv;
-  for(const int *it=famIds->begin();it!=famIds->end();it++)
+  std::map<mcIdType,std::string> famInv;
+  for(const mcIdType *it=famIds->begin();it!=famIds->end();it++)
     {
       std::ostringstream oss;
       oss << "Family_" << (*it);
@@ -2196,9 +2197,9 @@ void MEDFileMesh::appendFamilyEntries(const DataArrayInt *famIds, const std::vec
       famInv[*it]=oss.str();
     }
   int i=0;
-  for(std::vector< std::vector<int> >::const_iterator it1=fidsOfGrps.begin();it1!=fidsOfGrps.end();it1++,i++)
+  for(std::vector< std::vector<mcIdType> >::const_iterator it1=fidsOfGrps.begin();it1!=fidsOfGrps.end();it1++,i++)
     {
-      for(std::vector<int>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+      for(std::vector<mcIdType>::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
         {
           _groups[grpNames[i]].push_back(famInv[*it2]);
         }
@@ -2220,7 +2221,7 @@ std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileMesh::getAllGeoTypes() con
 /*!
  * \sa getAllDistributionOfTypes
  */
-std::vector<int> MEDFileMesh::getDistributionOfTypes(int meshDimRelToMax) const
+std::vector<mcIdType> MEDFileMesh::getDistributionOfTypes(int meshDimRelToMax) const
 {
   MCAuto<MEDCouplingMesh> mLev(getMeshAtLevel(meshDimRelToMax));
   return mLev->getDistributionOfTypes();
@@ -2233,14 +2234,14 @@ void MEDFileMesh::loadLLWithAdditionalItems(med_idt fid, const std::string& mNam
   loadEquivalences(fid);
 }
 
-void MEDFileMesh::TranslateFamilyIds(int offset, DataArrayInt *famArr, std::vector< std::vector<int> >& famIdsPerGrp)
+void MEDFileMesh::TranslateFamilyIds(mcIdType offset, DataArrayIdType *famArr, std::vector< std::vector<mcIdType> >& famIdsPerGrp)
 {
   famArr->applyLin(offset>0?1:-1,offset,0);
-  for(std::vector< std::vector<int> >::iterator it1=famIdsPerGrp.begin();it1!=famIdsPerGrp.end();it1++)
+  for(std::vector< std::vector<mcIdType> >::iterator it1=famIdsPerGrp.begin();it1!=famIdsPerGrp.end();it1++)
     {
       if(offset<0)
-        std::transform((*it1).begin(),(*it1).end(),(*it1).begin(),std::negate<int>());
-      std::transform((*it1).begin(),(*it1).end(),(*it1).begin(),std::bind2nd(std::plus<int>(),offset));
+        std::transform((*it1).begin(),(*it1).end(),(*it1).begin(),std::negate<mcIdType>());
+      std::transform((*it1).begin(),(*it1).end(),(*it1).begin(),std::bind2nd(std::plus<mcIdType>(),offset));
     }
 }
 
@@ -2265,7 +2266,7 @@ std::string MEDFileMesh::CreateNameNotIn(const std::string& nameTry, const std::
   //attempt #2
   if(len>=1)
     {
-      for(std::size_t i=1;i<30;i++)
+      for(char i=1;i<30;i++)
         {
           std::string tmp1(nameTry.at(0),i);
           tmp1+=nameTry;
@@ -2282,12 +2283,12 @@ std::string MEDFileMesh::CreateNameNotIn(const std::string& nameTry, const std::
   throw INTERP_KERNEL::Exception("MEDFileMesh::CreateNameNotIn : impossible to find a not already used name !");
 }
 
-int MEDFileMesh::PutInThirdComponentOfCodeOffset(std::vector<int>& code, int strt)
+mcIdType MEDFileMesh::PutInThirdComponentOfCodeOffset(std::vector<mcIdType>& code, mcIdType strt)
 {
   std::size_t nbOfChunks=code.size()/3;
   if(code.size()%3!=0)
     throw INTERP_KERNEL::Exception("MEDFileMesh::PutInThirdComponentOfCodeOffset : code has invalid size : should be of size 3*x !");
-  int ret=strt;
+  mcIdType ret=strt;
   for(std::size_t i=0;i<nbOfChunks;i++)
     {
       code[3*i+2]=ret;
@@ -2341,7 +2342,7 @@ void MEDFileMesh::dealWithTinyInfo(const MEDCouplingMesh *m)
 void MEDFileMesh::getFamilyRepr(std::ostream& oss) const
 {
   oss << "(**************************)\n(* FAMILIES OF THE MESH : *)\n(**************************)\n";
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       oss << "- Family with name \"" << (*it).first << "\" with number " << (*it).second << std::endl;
       oss << "  - Groups lying on this family : ";
@@ -2429,7 +2430,7 @@ MEDFileUMesh *MEDFileUMesh::New(const MEDCouplingMappedExtrudedMesh *mem)
   m2D->setCoords(m3D->getCoords());
   ret->setMeshAtLevel(0,m3D);
   ret->setMeshAtLevel(-1,m2D);
-  ret->setFamilyId(GetSpeStr4ExtMesh(),std::numeric_limits<int>::max()-mem->get2DCellIdForExtrusion());
+  ret->setFamilyId(GetSpeStr4ExtMesh(),std::numeric_limits<med_int>::max()-mem->get2DCellIdForExtrusion());
   return ret.retn();
 }
 
@@ -2459,7 +2460,7 @@ MEDFileUMesh *MEDFileUMesh::New()
  * \param [in] mrs - the request for what to be loaded.
  * \return MEDFileUMesh * - a new instance of MEDFileUMesh. The caller is to delete this mesh using decrRef() as it is no more needed.
  */
-MEDFileUMesh *MEDFileUMesh::LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
+MEDFileUMesh *MEDFileUMesh::LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
 {
   MEDFileUtilities::CheckFileForRead(fileName);
   MEDFileUtilities::AutoFid fid(MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY));
@@ -2470,7 +2471,7 @@ MEDFileUMesh *MEDFileUMesh::LoadPartOf(const std::string& fileName, const std::s
  * Please refer to the other MEDFileUMesh::LoadPartOf method that has the same semantic and the same parameter (excepted the first).
  * This method is \b NOT wrapped into python.
  */
-MEDFileUMesh *MEDFileUMesh::LoadPartOf(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
+MEDFileUMesh *MEDFileUMesh::LoadPartOf(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
 {
   MCAuto<MEDFileUMesh> ret(MEDFileUMesh::New());
   ret->loadPartUMeshFromFile(fid,mName,types,slicPerTyp,dt,it,mrs);
@@ -2488,10 +2489,10 @@ std::vector<const BigMemoryObject *> MEDFileUMesh::getDirectChildrenWithNull() c
 {
   std::vector<const BigMemoryObject *> ret(MEDFileMesh::getDirectChildrenWithNull());
   ret.push_back((const DataArrayDouble*)_coords);
-  ret.push_back((const DataArrayInt *)_fam_coords);
-  ret.push_back((const DataArrayInt *)_num_coords);
-  ret.push_back((const DataArrayInt *)_global_num_coords);
-  ret.push_back((const DataArrayInt *)_rev_num_coords);
+  ret.push_back((const DataArrayIdType *)_fam_coords);
+  ret.push_back((const DataArrayIdType *)_num_coords);
+  ret.push_back((const DataArrayIdType *)_global_num_coords);
+  ret.push_back((const DataArrayIdType *)_rev_num_coords);
   ret.push_back((const DataArrayAsciiChar *)_name_coords);
   ret.push_back((const PartDefinition *)_part_coords);
   for(std::vector< MCAuto<MEDFileUMeshSplitL1> >::const_iterator it=_ms.begin();it!=_ms.end();it++)
@@ -2575,7 +2576,7 @@ bool MEDFileUMesh::isEqual(const MEDFileMesh *other, double eps, std::string& wh
         }
     }
   {
-    const DataArrayInt *famc1(_fam_coords),*famc2(otherC->_fam_coords);
+    const DataArrayIdType *famc1(_fam_coords),*famc2(otherC->_fam_coords);
     if((famc1==0 && famc2!=0) || (famc1!=0 && famc2==0))
       {
         what="Mismatch of families arr on nodes ! One is defined and not other !";
@@ -2592,7 +2593,7 @@ bool MEDFileUMesh::isEqual(const MEDFileMesh *other, double eps, std::string& wh
       }
   }
   {
-    const DataArrayInt *numc1(_num_coords),*numc2(otherC->_num_coords);
+    const DataArrayIdType *numc1(_num_coords),*numc2(otherC->_num_coords);
     if((numc1==0 && numc2!=0) || (numc1!=0 && numc2==0))
       {
         what="Mismatch of numbering arr on nodes ! One is defined and not other !";
@@ -2609,7 +2610,7 @@ bool MEDFileUMesh::isEqual(const MEDFileMesh *other, double eps, std::string& wh
       }
   }
   {
-    const DataArrayInt *gnumc1(_global_num_coords),*gnumc2(otherC->_global_num_coords);
+    const DataArrayIdType *gnumc1(_global_num_coords),*gnumc2(otherC->_global_num_coords);
     if((gnumc1==0 && gnumc2!=0) || (gnumc1!=0 && gnumc2==0))
       {
         what="Mismatch of numbering arr on nodes ! One is defined and not other !";
@@ -2695,14 +2696,14 @@ void MEDFileUMesh::checkConsistency() const
     }
   else
     {
-      int nbCoo = _coords->getNumberOfTuples();
+      mcIdType nbCoo = _coords->getNumberOfTuples();
       if (_fam_coords.isNotNull())
         _fam_coords->checkNbOfTuplesAndComp(nbCoo,1,"MEDFileUMesh::checkConsistency(): inconsistent internal node family array!");
       if (_num_coords.isNotNull())
         {
           _num_coords->checkNbOfTuplesAndComp(nbCoo,1,"MEDFileUMesh::checkConsistency(): inconsistent internal node numbering array!");
-          int pos;
-          int maxValue=_num_coords->getMaxValue(pos);
+          mcIdType pos;
+          mcIdType maxValue=_num_coords->getMaxValue(pos);
           if (!_rev_num_coords || _rev_num_coords->getNumberOfTuples() != (maxValue+1))
             throw INTERP_KERNEL::Exception("MEDFileUMesh::checkConsistency(): inconsistent internal revert node numbering array!");
         }
@@ -2736,7 +2737,7 @@ void MEDFileUMesh::checkSMESHConsistency() const
   if (_ms.size())
     {
       std::vector< MCAuto<MEDFileUMeshSplitL1> >::const_iterator it=_ms.begin();
-      std::vector< const DataArrayInt * > v;
+      std::vector< const DataArrayIdType * > v;
       bool voidOrNot = ((*it)->_num == 0);
       for (it++; it != _ms.end(); it++)
         if( ((*it)->_num == 0) != voidOrNot )
@@ -2747,7 +2748,7 @@ void MEDFileUMesh::checkSMESHConsistency() const
         {
           // don't forget the 1st one:
           v.push_back(_ms[0]->_num);
-          MCAuto<DataArrayInt> inter = DataArrayInt::BuildIntersection(v);
+          MCAuto<DataArrayIdType> inter = DataArrayIdType::BuildIntersection(v);
           if (inter->getNumberOfTuples())
             throw INTERP_KERNEL::Exception("MEDFileUMesh::checkConsistency(): overlapping entity numbering between mesh sub-levels!");
         }
@@ -2820,7 +2821,7 @@ catch(INTERP_KERNEL::Exception& e)
  *
  * \sa loadLL
  */
-void MEDFileUMesh::loadPartUMeshFromFile(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
+void MEDFileUMesh::loadPartUMeshFromFile(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
 {
   MEDFileUMeshL2 loaderl2;
   MEDCoupling::MEDCouplingMeshType meshType;
@@ -2964,7 +2965,7 @@ void MEDFileUMesh::loadLL(med_idt fid, const std::string& mName, int dt, int it,
   loaderl2.loadAll(fid,mid,mName,dt,it,mrs);
   dispatchLoadedPart(fid,loaderl2,mName,mrs);
   // Structure element part...
-  int nModels(-1);
+  med_int nModels(-1);
   {
     med_bool chgt=MED_FALSE,trsf=MED_FALSE;
     nModels=MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_STRUCT_ELEMENT,MED_GEO_ALL,MED_CONNECTIVITY,MED_NODAL,&chgt,&trsf);
@@ -3020,7 +3021,7 @@ void MEDFileUMesh::writeMeshLL(med_idt fid) const
   INTERP_KERNEL::AutoPtr<char> desc=MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE);
   MEDLoaderBase::safeStrCpy(_name.c_str(),MED_NAME_SIZE,maa,_too_long_str);
   MEDLoaderBase::safeStrCpy(_desc_name.c_str(),MED_COMMENT_SIZE,desc,_too_long_str);
-  int spaceDim=coo?coo->getNumberOfComponents():0;
+  int spaceDim=(int)(coo?coo->getNumberOfComponents():0);
   int mdim(0);
   if(!_ms.empty())
     mdim=getMeshDimension();
@@ -3080,7 +3081,7 @@ std::vector<int> MEDFileUMesh::getNonEmptyLevelsExt() const
 std::vector<int> MEDFileUMesh::getFamArrNonEmptyLevelsExt() const
 {
   std::vector<int> ret;
-  const DataArrayInt *famCoo(_fam_coords);
+  const DataArrayIdType *famCoo(_fam_coords);
   if(famCoo)
     ret.push_back(1);
   int lev=0;
@@ -3133,11 +3134,11 @@ std::vector<int> MEDFileUMesh::getNameArrNonEmptyLevelsExt() const
  *  \param [in] fams - the name of the family of interest.
  *  \return std::vector<int> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileUMesh::getFamsNonEmptyLevels(const std::vector<std::string>& fams) const
+std::vector<mcIdType> MEDFileUMesh::getFamsNonEmptyLevels(const std::vector<std::string>& fams) const
 {
-  std::vector<int> ret;
+  std::vector<mcIdType> ret;
   std::vector<int> levs(getNonEmptyLevels());
-  std::vector<int> famIds(getFamiliesIds(fams));
+  std::vector<mcIdType> famIds(getFamiliesIds(fams));
   for(std::vector<int>::const_iterator it=levs.begin();it!=levs.end();it++)
     if(_ms[-(*it)]->presenceOfOneFams(famIds))
       ret.push_back(*it);
@@ -3149,16 +3150,16 @@ std::vector<int> MEDFileUMesh::getFamsNonEmptyLevels(const std::vector<std::stri
  *  \param [in] fams - the names of the families of interest.
  *  \return std::vector<int> - a sequence of the relative dimensions.
  */
-std::vector<int> MEDFileUMesh::getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const
+std::vector<mcIdType> MEDFileUMesh::getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const
 {
-  std::vector<int> ret0(getFamsNonEmptyLevels(fams));
-  const DataArrayInt *famCoords(_fam_coords);
+  std::vector<mcIdType> ret0(getFamsNonEmptyLevels(fams));
+  const DataArrayIdType *famCoords(_fam_coords);
   if(!famCoords)
     return ret0;
-  std::vector<int> famIds(getFamiliesIds(fams));
+  std::vector<mcIdType> famIds(getFamiliesIds(fams));
   if(famCoords->presenceOfValue(famIds))
     {
-      std::vector<int> ret(ret0.size()+1);
+      std::vector<mcIdType> ret(ret0.size()+1);
       ret[0]=1;
       std::copy(ret0.begin(),ret0.end(),ret.begin()+1);
       return ret;
@@ -3167,22 +3168,22 @@ std::vector<int> MEDFileUMesh::getFamsNonEmptyLevelsExt(const std::vector<std::s
     return ret0;
 }
 
-int MEDFileUMesh::getMaxAbsFamilyIdInArrays() const
+mcIdType MEDFileUMesh::getMaxAbsFamilyIdInArrays() const
 {
-  int ret=-std::numeric_limits<int>::max(),tmp=-1;
-  if((const DataArrayInt *)_fam_coords)
+  mcIdType ret=-std::numeric_limits<mcIdType>::max(),tmp=-1;
+  if((const DataArrayIdType *)_fam_coords)
     {
-      int val=_fam_coords->getMaxValue(tmp);
+      mcIdType val=_fam_coords->getMaxValue(tmp);
       ret=std::max(ret,std::abs(val));
     }
   for(std::vector< MCAuto<MEDFileUMeshSplitL1> >::const_iterator it=_ms.begin();it!=_ms.end();it++)
     {
       if((const MEDFileUMeshSplitL1 *)(*it))
         {
-          const DataArrayInt *da=(*it)->getFamilyField();
+          const DataArrayIdType *da=(*it)->getFamilyField();
           if(da)
             {
-              int val=da->getMaxValue(tmp);
+              mcIdType val=da->getMaxValue(tmp);
               ret=std::max(ret,std::abs(val));
             }
         }
@@ -3190,22 +3191,22 @@ int MEDFileUMesh::getMaxAbsFamilyIdInArrays() const
   return ret;
 }
 
-int MEDFileUMesh::getMaxFamilyIdInArrays() const
+mcIdType MEDFileUMesh::getMaxFamilyIdInArrays() const
 {
-  int ret=-std::numeric_limits<int>::max(),tmp=-1;
-  if((const DataArrayInt *)_fam_coords)
+  mcIdType ret=-std::numeric_limits<mcIdType>::max(),tmp=-1;
+  if((const DataArrayIdType *)_fam_coords)
     {
-      int val=_fam_coords->getMaxValue(tmp);
+      mcIdType val=_fam_coords->getMaxValue(tmp);
       ret=std::max(ret,val);
     }
   for(std::vector< MCAuto<MEDFileUMeshSplitL1> >::const_iterator it=_ms.begin();it!=_ms.end();it++)
     {
       if((const MEDFileUMeshSplitL1 *)(*it))
         {
-          const DataArrayInt *da=(*it)->getFamilyField();
+          const DataArrayIdType *da=(*it)->getFamilyField();
           if(da)
             {
-              int val=da->getMaxValue(tmp);
+              mcIdType val=da->getMaxValue(tmp);
               ret=std::max(ret,val);
             }
         }
@@ -3213,22 +3214,22 @@ int MEDFileUMesh::getMaxFamilyIdInArrays() const
   return ret;
 }
 
-int MEDFileUMesh::getMinFamilyIdInArrays() const
+mcIdType MEDFileUMesh::getMinFamilyIdInArrays() const
 {
-  int ret=std::numeric_limits<int>::max(),tmp=-1;
-  if((const DataArrayInt *)_fam_coords)
+  mcIdType ret=std::numeric_limits<mcIdType>::max(),tmp=-1;
+  if((const DataArrayIdType *)_fam_coords)
     {
-      int val=_fam_coords->getMinValue(tmp);
+      mcIdType val=_fam_coords->getMinValue(tmp);
       ret=std::min(ret,val);
     }
   for(std::vector< MCAuto<MEDFileUMeshSplitL1> >::const_iterator it=_ms.begin();it!=_ms.end();it++)
     {
       if((const MEDFileUMeshSplitL1 *)(*it))
         {
-          const DataArrayInt *da=(*it)->getFamilyField();
+          const DataArrayIdType *da=(*it)->getFamilyField();
           if(da)
             {
-              int val=da->getMinValue(tmp);
+              mcIdType val=da->getMinValue(tmp);
               ret=std::min(ret,val);
             }
         }
@@ -3261,7 +3262,7 @@ int MEDFileUMesh::getSpaceDimension() const
   const DataArrayDouble *coo=_coords;
   if(!coo)
     throw INTERP_KERNEL::Exception(" MEDFileUMesh::getSpaceDimension : no coords set !");
-  return coo->getNumberOfComponents();
+  return (int)coo->getNumberOfComponents();
 }
 
 /*!
@@ -3329,10 +3330,10 @@ std::string MEDFileUMesh::advancedRepr() const
 /*!
  * Returns number of mesh entities of a given relative dimension in \a this mesh.
  *  \param [in] meshDimRelToMaxExt - the relative dimension of interest.
- *  \return int - the number of entities.
+ *  \return mcIdType - the number of entities.
  *  \throw If no mesh entities of dimension \a meshDimRelToMaxExt are available in \a this mesh.
  */
-int MEDFileUMesh::getSizeAtLevel(int meshDimRelToMaxExt) const
+mcIdType MEDFileUMesh::getSizeAtLevel(int meshDimRelToMaxExt) const
 {
   if(meshDimRelToMaxExt==1)
     {
@@ -3346,10 +3347,10 @@ int MEDFileUMesh::getSizeAtLevel(int meshDimRelToMaxExt) const
 /*!
  * Returns the family field for mesh entities of a given dimension.
  *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
- *  \return const DataArrayInt * - the family field. It is an array of ids of families
+ *  \return const DataArrayIdType * - the family field. It is an array of ids of families
  *          each mesh entity belongs to. It can be \c NULL.
  */
-const DataArrayInt *MEDFileUMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const
+const DataArrayIdType *MEDFileUMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const
 {
   if(meshDimRelToMaxExt==1)
     return _fam_coords;
@@ -3357,7 +3358,7 @@ const DataArrayInt *MEDFileUMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
   return l1->getFamilyField();
 }
 
-DataArrayInt *MEDFileUMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
+DataArrayIdType *MEDFileUMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
 {
   if(meshDimRelToMaxExt==1)
     return _fam_coords;
@@ -3368,10 +3369,10 @@ DataArrayInt *MEDFileUMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
 /*!
  * Returns the optional numbers of mesh entities of a given dimension.
  *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
- *  \return const DataArrayInt * - the array of the entity numbers.
+ *  \return const DataArrayIdType * - the array of the entity numbers.
  *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
  */
-const DataArrayInt *MEDFileUMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const
+const DataArrayIdType *MEDFileUMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const
 {
   if(meshDimRelToMaxExt==1)
     return _num_coords;
@@ -3387,7 +3388,7 @@ const DataArrayAsciiChar *MEDFileUMesh::getNameFieldAtLevel(int meshDimRelToMaxE
   return l1->getNameField();
 }
 
-MCAuto<DataArrayInt> MEDFileUMesh::getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const
+MCAuto<DataArrayIdType> MEDFileUMesh::getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const
 {
   if(meshDimRelToMaxExt!=1)
     throw INTERP_KERNEL::Exception("MEDFileUMesh::getGlobalNumFieldAtLevel : not implemented yet for structured mesh !");
@@ -3409,7 +3410,7 @@ const PartDefinition *MEDFileUMesh::getPartDefAtLevel(int meshDimRelToMaxExt, IN
   return l1->getPartDef(gt);
 }
 
-int MEDFileUMesh::getNumberOfNodes() const
+mcIdType MEDFileUMesh::getNumberOfNodes() const
 {
   const DataArrayDouble *coo(_coords);
   if(!coo)
@@ -3417,7 +3418,7 @@ int MEDFileUMesh::getNumberOfNodes() const
   return coo->getNumberOfTuples();
 }
 
-int MEDFileUMesh::getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const
+mcIdType MEDFileUMesh::getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const
 {
   const MEDFileUMeshSplitL1 *l1(getMeshAtLevSafe(meshDimRelToMaxExt));
   return l1->getNumberOfCells();
@@ -3428,7 +3429,7 @@ bool MEDFileUMesh::hasImplicitPart() const
   return false;
 }
 
-int MEDFileUMesh::buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const
+mcIdType MEDFileUMesh::buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const
 {
   throw INTERP_KERNEL::Exception("MEDFileUMesh::buildImplicitPartIfAny : unstructured meshes do not have implicit part !");
 }
@@ -3448,7 +3449,7 @@ void MEDFileUMesh::whichAreNodesFetched(const MEDFileField1TSStructItem& st, con
         m->computeNodeIdsAlg(nodesFetched);
       else
         {
-          const DataArrayInt *arr(globs->getProfile(st[i].getPflName()));
+          const DataArrayIdType *arr(globs->getProfile(st[i].getPflName()));
           MCAuto<MEDCoupling1GTUMesh> m2(dynamic_cast<MEDCoupling1GTUMesh *>(m->buildPartOfMySelf(arr->begin(),arr->end(),true)));
           m2->computeNodeIdsAlg(nodesFetched);
         }
@@ -3493,13 +3494,13 @@ void MEDFileUMesh::killStructureElements()
 
 /*!
  * Returns the optional numbers of mesh entities of a given dimension transformed using
- * DataArrayInt::invertArrayN2O2O2N().
+ * DataArrayIdType::invertArrayN2O2O2N().
  *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
- *  \return const DataArrayInt * - the array of the entity numbers transformed using
- *          DataArrayInt::invertArrayN2O2O2N().
+ *  \return const DataArrayIdType * - the array of the entity numbers transformed using
+ *          DataArrayIdType::invertArrayN2O2O2N().
  *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
  */
-const DataArrayInt *MEDFileUMesh::getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const
+const DataArrayIdType *MEDFileUMesh::getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const
 {
   if(meshDimRelToMaxExt==1)
     {
@@ -3617,13 +3618,13 @@ MEDCouplingUMesh *MEDFileUMesh::getFamilies(int meshDimRelToMaxExt, const std::v
   synchronizeTinyInfoOnLeaves();
   if(meshDimRelToMaxExt==1)
     {
-      MCAuto<DataArrayInt> arr=getFamiliesArr(1,fams,renum);
+      MCAuto<DataArrayIdType> arr=getFamiliesArr(1,fams,renum);
       MCAuto<MEDCouplingUMesh> ret=MEDCouplingUMesh::New();
       MCAuto<DataArrayDouble> c=_coords->selectByTupleId(arr->getConstPointer(),arr->getConstPointer()+arr->getNbOfElems());
       ret->setCoords(c);
       return ret.retn();
     }
-  std::vector<int> famIds=getFamiliesIds(fams);
+  std::vector<mcIdType> famIds=getFamiliesIds(fams);
   const MEDFileUMeshSplitL1 *l1=getMeshAtLevSafe(meshDimRelToMaxExt);
   MCAuto<MEDCouplingUMesh> zeRet;
   if(!famIds.empty())
@@ -3642,19 +3643,19 @@ MEDCouplingUMesh *MEDFileUMesh::getFamilies(int meshDimRelToMaxExt, const std::v
  *  \param [in] fams - the names of the families of interest.
  *  \param [in] renum - if \c true, the optional numbers of entities, if available, are
  *          returned instead of ids.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of mesh entities of the families. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the family field is missing for \a meshDimRelToMaxExt.
  */
-DataArrayInt *MEDFileUMesh::getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum) const
+DataArrayIdType *MEDFileUMesh::getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum) const
 {
-  std::vector<int> famIds=getFamiliesIds(fams);
+  std::vector<mcIdType> famIds=getFamiliesIds(fams);
   if(meshDimRelToMaxExt==1)
     {
-      if((const DataArrayInt *)_fam_coords)
+      if((const DataArrayIdType *)_fam_coords)
         {
-          MCAuto<DataArrayInt> da;
+          MCAuto<DataArrayIdType> da;
           if(!famIds.empty())
             da=_fam_coords->findIdsEqualList(&famIds[0],&famIds[0]+famIds.size());
           else
@@ -3707,7 +3708,7 @@ MEDCouplingUMesh *MEDFileUMesh::getMeshAtLevel(int meshDimRelToMaxExt, bool renu
   return l1->getWholeMesh(renum);
 }
 
-std::vector<int> MEDFileUMesh::getDistributionOfTypes(int meshDimRelToMax) const
+std::vector<mcIdType> MEDFileUMesh::getDistributionOfTypes(int meshDimRelToMax) const
 {
   const MEDFileUMeshSplitL1 *l1(getMeshAtLevSafe(meshDimRelToMax));
   return l1->getDistributionOfTypes();
@@ -3815,20 +3816,20 @@ MEDCoupling1GTUMesh *MEDFileUMesh::getDirectUndergroundSingleGeoTypeMesh(INTERP_
  *
  * \sa getDistributionOfTypes
  */
-std::vector< std::pair<int,int> > MEDFileUMesh::getAllDistributionOfTypes() const
+std::vector< std::pair<int,mcIdType> > MEDFileUMesh::getAllDistributionOfTypes() const
 {
-  std::vector< std::pair<int,int> > ret;
+  std::vector< std::pair<int,mcIdType> > ret;
   std::vector<int> nel(getNonEmptyLevels());
   for(std::vector<int>::reverse_iterator it=nel.rbegin();it!=nel.rend();it++)
     {
       std::vector<INTERP_KERNEL::NormalizedCellType> gt(getGeoTypesAtLevel(*it));
       for(std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator it1=gt.begin();it1!=gt.end();it1++)
         {
-          int nbCells(getNumberOfCellsWithType(*it1));
-          ret.push_back(std::pair<int,int>(*it1,nbCells));
+          mcIdType nbCells(getNumberOfCellsWithType(*it1));
+          ret.push_back(std::pair<int,mcIdType>(*it1,nbCells));
         }
     }
-  ret.push_back(std::pair<int,int>(INTERP_KERNEL::NORM_ERROR,getNumberOfNodes()));
+  ret.push_back(std::pair<int,mcIdType>(INTERP_KERNEL::NORM_ERROR,getNumberOfNodes()));
   return ret;
 }
 
@@ -3842,7 +3843,7 @@ std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileUMesh::getGeoTypesAtLevel(
   return sp->getGeoTypes();
 }
 
-int MEDFileUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
+mcIdType MEDFileUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(ct);
   const MEDFileUMeshSplitL1 *sp(getMeshAtLevSafe( ((int)cm.getDimension())-getMeshDimension() ));
@@ -3852,11 +3853,11 @@ int MEDFileUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct)
 /*!
  * This method extracts from whole family field ids the part relative to the input parameter \a gt.
  * \param [in] gt - the geometric type for which the family field is asked.
- * \return DataArrayInt * - a pointer to DataArrayInt that the caller is to
+ * \return DataArrayIdType * - a pointer to DataArrayIdType that the caller is to
  *          delete using decrRef() as it is no more needed.
  * \sa MEDFileUMesh::extractNumberFieldOnGeoType
  */
-DataArrayInt *MEDFileUMesh::extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
+DataArrayIdType *MEDFileUMesh::extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(gt);
   int lev=(int)cm.getDimension()-getMeshDimension();
@@ -3867,11 +3868,11 @@ DataArrayInt *MEDFileUMesh::extractFamilyFieldOnGeoType(INTERP_KERNEL::Normalize
 /*!
  * This method extracts from whole number field ids the part relative to the input parameter \a gt.
  * \param [in] gt - the geometric type for which the number field is asked.
- * \return DataArrayInt * - a pointer to DataArrayInt that the caller is to
+ * \return DataArrayIdType * - a pointer to DataArrayIdType that the caller is to
  *          delete using decrRef() as it is no more needed.
  * \sa MEDFileUMesh::extractFamilyFieldOnGeoType
  */
-DataArrayInt *MEDFileUMesh::extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
+DataArrayIdType *MEDFileUMesh::extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
 {
   const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(gt);
   int lev=(int)cm.getDimension()-getMeshDimension();
@@ -3947,9 +3948,9 @@ void MEDFileUMesh::setCoords(DataArrayDouble *coords)
   if(coords==(DataArrayDouble *)_coords)
     return ;
   coords->checkAllocated();
-  int nbOfTuples(coords->getNumberOfTuples());
+  mcIdType nbOfTuples(coords->getNumberOfTuples());
   _coords.takeRef(coords);
-  _fam_coords=DataArrayInt::New();
+  _fam_coords=DataArrayIdType::New();
   _fam_coords->alloc(nbOfTuples,1);
   _fam_coords->fillWithZero();
   _num_coords.nullify(); _rev_num_coords.nullify(); _name_coords.nullify(); _global_num_coords.nullify();
@@ -3968,7 +3969,7 @@ void MEDFileUMesh::setCoordsForced(DataArrayDouble *coords)
   if(coords==(DataArrayDouble *)_coords)
     return ;
   coords->checkAllocated();
-  int nbOfTuples(coords->getNumberOfTuples());
+  mcIdType nbOfTuples(coords->getNumberOfTuples());
   if(_coords.isNull())
     {
       _coords=coords;
@@ -3976,7 +3977,7 @@ void MEDFileUMesh::setCoordsForced(DataArrayDouble *coords)
     }
   else
     {
-      int oldNbTuples(_coords->getNumberOfTuples());
+      mcIdType oldNbTuples(_coords->getNumberOfTuples());
       if(oldNbTuples!=nbOfTuples)
         throw INTERP_KERNEL::Exception("MEDFileUMesh::setCoordsForced : number of tuples is not the same -> invoke setCoords instead !");
       _coords=coords;
@@ -3996,7 +3997,7 @@ void MEDFileUMesh::eraseGroupsAtLevel(int meshDimRelToMaxExt)
 {
   if(meshDimRelToMaxExt==1)
     {
-      if((DataArrayInt *)_fam_coords)
+      if((DataArrayIdType *)_fam_coords)
         _fam_coords->fillWithZero();
       return ;
     }
@@ -4011,17 +4012,17 @@ void MEDFileUMesh::eraseGroupsAtLevel(int meshDimRelToMaxExt)
 void MEDFileUMesh::optimizeFamilies()
 {
   std::vector<int> levs=getNonEmptyLevelsExt();
-  std::set<int> allFamsIds;
+  std::set<mcIdType> allFamsIds;
   for(std::vector<int>::const_iterator it=levs.begin();it!=levs.end();it++)
     {
-      const DataArrayInt *ffield=getFamilyFieldAtLevel(*it);
-      MCAuto<DataArrayInt> ids=ffield->getDifferentValues();
-      std::set<int> res;
+      const DataArrayIdType *ffield=getFamilyFieldAtLevel(*it);
+      MCAuto<DataArrayIdType> ids=ffield->getDifferentValues();
+      std::set<mcIdType> res;
       std::set_union(ids->begin(),ids->end(),allFamsIds.begin(),allFamsIds.end(),std::inserter(res,res.begin()));
       allFamsIds=res;
     }
   std::set<std::string> famNamesToKill;
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       if(allFamsIds.find((*it).second)!=allFamsIds.end())
         famNamesToKill.insert((*it).first);
@@ -4069,32 +4070,32 @@ void MEDFileUMesh::optimizeFamilies()
  *  \param[out] cellsNotModified ids of the rest of cells bordering the new boundary whose connectivity remains unchanged.
  *  \sa clearNodeAndCellNumbers()
  */
-void MEDFileUMesh::buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, DataArrayInt *&nodesDuplicated,
-                                           DataArrayInt *&cellsModified, DataArrayInt *&cellsNotModified)
+void MEDFileUMesh::buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, DataArrayIdType *&nodesDuplicated,
+                                           DataArrayIdType *&cellsModified, DataArrayIdType *&cellsNotModified)
 {
   typedef MCAuto<MEDCouplingUMesh> MUMesh;
-  typedef MCAuto<DataArrayInt> DAInt;
+  typedef MCAuto<DataArrayIdType> DAInt;
 
   std::vector<int> levs=getNonEmptyLevels();
   if(std::find(levs.begin(),levs.end(),0)==levs.end() || std::find(levs.begin(),levs.end(),-1)==levs.end())
     throw INTERP_KERNEL::Exception("MEDFileUMesh::buildInnerBoundaryAlongM1Group : This method works only for mesh defined on level 0 and -1 !");
   MUMesh m0=getMeshAtLevel(0);
   MUMesh m1=getMeshAtLevel(-1);
-  int nbNodes=m0->getNumberOfNodes();
+  mcIdType nbNodes=m0->getNumberOfNodes();
   MUMesh m11=getGroup(-1,grpNameM1);
-  DataArrayInt *tmp00=0,*tmp11=0,*tmp22=0;
+  DataArrayIdType *tmp00=0,*tmp11=0,*tmp22=0;
   m0->findNodesToDuplicate(*m11,tmp00,tmp11,tmp22);
   DAInt nodeIdsToDuplicate(tmp00);
   DAInt cellsToModifyConn0(tmp11);
   DAInt cellsToModifyConn1(tmp22);
   MUMesh tmp0=static_cast<MEDCouplingUMesh *>(m0->buildPartOfMySelf(cellsToModifyConn0->begin(),cellsToModifyConn0->end(),true));
   // node renumbering of cells in m1 impacted by duplication of node but not in group 'grpNameM1' on level -1
-  DAInt descTmp0=DataArrayInt::New(),descITmp0=DataArrayInt::New(),revDescTmp0=DataArrayInt::New(),revDescITmp0=DataArrayInt::New();
+  DAInt descTmp0=DataArrayIdType::New(),descITmp0=DataArrayIdType::New(),revDescTmp0=DataArrayIdType::New(),revDescITmp0=DataArrayIdType::New();
   MUMesh tmp0Desc=tmp0->buildDescendingConnectivity(descTmp0,descITmp0,revDescTmp0,revDescITmp0);
   descTmp0=0; descITmp0=0; revDescTmp0=0; revDescITmp0=0;
   DAInt cellsInM1ToRenumW2=tmp0Desc->getCellIdsLyingOnNodes(nodeIdsToDuplicate->begin(),nodeIdsToDuplicate->end(),false);
   MUMesh cellsInM1ToRenumW3=static_cast<MEDCouplingUMesh *>(tmp0Desc->buildPartOfMySelf(cellsInM1ToRenumW2->begin(),cellsInM1ToRenumW2->end(),true));
-  DataArrayInt *cellsInM1ToRenumW4Tmp=0;
+  DataArrayIdType *cellsInM1ToRenumW4Tmp=0;
   m1->areCellsIncludedIn(cellsInM1ToRenumW3,2,cellsInM1ToRenumW4Tmp);
   DAInt cellsInM1ToRenumW4(cellsInM1ToRenumW4Tmp);
   DAInt cellsInM1ToRenumW5=cellsInM1ToRenumW4->findIdsInRange(0,m1->getNumberOfCells());
@@ -4113,7 +4114,7 @@ void MEDFileUMesh::buildInnerBoundaryAlongM1Group(const std::string& grpNameM1,
   _coords=m0->getCoords(); _coords->incrRef();
   // duplication of cells in group 'grpNameM1' on level -1, but not duplicating cells for which nothing has changed
   m11->duplicateNodesInConn(nodeIdsToDuplicate->begin(),nodeIdsToDuplicate->end(),nbNodes); m11->setCoords(m0->getCoords());
-  DataArrayInt * duplCells;
+  DataArrayIdType * duplCells;
   m1->areCellsIncludedIn(m11, 0, duplCells);
   DAInt zeIds = duplCells->findIdsNotInRange(-1, m1->getNumberOfCells()-1); duplCells->decrRef();
   MUMesh m11Part=static_cast<MEDCouplingUMesh *>(m11->buildPartOfMySelf(zeIds->begin(),zeIds->end(),true));
@@ -4123,21 +4124,21 @@ void MEDFileUMesh::buildInnerBoundaryAlongM1Group(const std::string& grpNameM1,
   DAInt idInMsOfCellGrpOfSameType(tmp11);
   //
   newm1->setName(getName());
-  const DataArrayInt *fam=getFamilyFieldAtLevel(-1);
+  const DataArrayIdType *fam=getFamilyFieldAtLevel(-1);
   if(!fam)
     throw INTERP_KERNEL::Exception("MEDFileUMesh::buildInnerBoundaryAlongM1Group(): internal error no family field !");
-  DAInt newFam=DataArrayInt::New();
+  DAInt newFam=DataArrayIdType::New();
   newFam->alloc(newm1->getNumberOfCells(),1);
   // Get a new family ID: care must be taken if we need a positive ID or a negative one:
   // Positive ID for family of nodes, negative for all the rest.
-  int idd;
+  mcIdType idd;
   if (m1->getMeshDimension() == 0)
     idd=getMaxFamilyId()+1;
   else
     idd=getMinFamilyId()-1;
-  int globStart=0,start=0,end,globEnd;
-  int nbOfChunks=szOfCellGrpOfSameType->getNumberOfTuples();
-  for(int i=0;i<nbOfChunks;i++)
+  mcIdType globStart=0,start=0,end,globEnd;
+  mcIdType nbOfChunks=szOfCellGrpOfSameType->getNumberOfTuples();
+  for(mcIdType i=0;i<nbOfChunks;i++)
     {
       globEnd=globStart+szOfCellGrpOfSameType->getIJ(i,0);
       if(idInMsOfCellGrpOfSameType->getIJ(i,0)==0)
@@ -4163,8 +4164,8 @@ void MEDFileUMesh::buildInnerBoundaryAlongM1Group(const std::string& grpNameM1,
   fam=_fam_coords;
   if(fam)
     {
-      int newNbOfNodes=getCoords()->getNumberOfTuples();
-      newFam=DataArrayInt::New(); newFam->alloc(newNbOfNodes,1);
+      mcIdType newNbOfNodes=getCoords()->getNumberOfTuples();
+      newFam=DataArrayIdType::New(); newFam->alloc(newNbOfNodes,1);
       newFam->setPartOfValues1(fam,0,nbNodes,1,0,1,1,true);
       newFam->setPartOfValuesSimple1(0,nbNodes,newNbOfNodes,1,0,1,1);
       _fam_coords=newFam;
@@ -4188,43 +4189,43 @@ void MEDFileUMesh::buildInnerBoundaryAlongM1Group(const std::string& grpNameM1,
  * in this method.
  *
  * \param [out] oldCode retrieves the distribution of types before the call if true is returned
- * \param [out] newCode etrieves the distribution of types after the call if true is returned
+ * \param [out] newCode retrieves the distribution of types after the call if true is returned
  * \param [out] o2nRenumCell tells for **all levels** the old 2 new renumbering of cells.
  * 
  * \return false if no modification has been performed linked to the unpolyzation. Neither cell type, not cell numbers. When false is returned no need of field on cells or on gauss renumbering.
  * Inversely, if true is returned, it means that distribution of cell by geometric type has changed and field on cell and field on gauss point must be renumbered.
  */
-bool MEDFileUMesh::unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell)
+bool MEDFileUMesh::unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell)
 {
   o2nRenumCell=0; oldCode.clear(); newCode.clear();
   std::vector<int> levs=getNonEmptyLevels();
   bool ret=false;
-  std::vector< const DataArrayInt* > renumCellsSplited;//same than memorySaverIfThrow
-  std::vector< MCAuto<DataArrayInt> > memorySaverIfThrow;//same than renumCellsSplited only in case of throw
-  int start=0;
-  int end=0;
+  std::vector< const DataArrayIdType* > renumCellsSplited;//same than memorySaverIfThrow
+  std::vector< MCAuto<DataArrayIdType> > memorySaverIfThrow;//same than renumCellsSplited only in case of throw
+  mcIdType start=0;
+  mcIdType end=0;
   for(std::vector<int>::reverse_iterator it=levs.rbegin();it!=levs.rend();it++)
     {
       MCAuto<MEDCouplingUMesh> m=getMeshAtLevel(*it);
-      std::vector<int> code1=m->getDistributionOfTypes();
+      std::vector<mcIdType> code1=m->getDistributionOfTypes();
       end=PutInThirdComponentOfCodeOffset(code1,start);
       oldCode.insert(oldCode.end(),code1.begin(),code1.end());
       bool hasChanged=m->unPolyze();
-      DataArrayInt *fake=0;
-      MCAuto<DataArrayInt> o2nCellsPart=m->getLevArrPerCellTypes(MEDCouplingUMesh::MEDMEM_ORDER,
+      DataArrayIdType *fake=0;
+      MCAuto<DataArrayIdType> o2nCellsPart=m->getLevArrPerCellTypes(MEDCouplingUMesh::MEDMEM_ORDER,
           MEDCouplingUMesh::MEDMEM_ORDER+MEDCouplingUMesh::N_MEDMEM_ORDER,fake);
       fake->decrRef();
       renumCellsSplited.push_back(o2nCellsPart); memorySaverIfThrow.push_back(o2nCellsPart);
       if(hasChanged)
         {
-          MCAuto<DataArrayInt> o2nCellsPart2=o2nCellsPart->buildPermArrPerLevel();
+          MCAuto<DataArrayIdType> o2nCellsPart2=o2nCellsPart->buildPermArrPerLevel();
           m->renumberCells(o2nCellsPart2->getConstPointer(),false);
           ret=true;
-          MCAuto<DataArrayInt> famField2,numField2;
-          const DataArrayInt *famField=getFamilyFieldAtLevel(*it); if(famField) { famField->incrRef(); famField2=const_cast<DataArrayInt *>(famField); }
-          const DataArrayInt *numField=getNumberFieldAtLevel(*it); if(numField) { numField->incrRef(); numField2=const_cast<DataArrayInt *>(numField); }
+          MCAuto<DataArrayIdType> famField2,numField2;
+          const DataArrayIdType *famField=getFamilyFieldAtLevel(*it); if(famField) { famField->incrRef(); famField2=const_cast<DataArrayIdType *>(famField); }
+          const DataArrayIdType *numField=getNumberFieldAtLevel(*it); if(numField) { numField->incrRef(); numField2=const_cast<DataArrayIdType *>(numField); }
           setMeshAtLevel(*it,m);
-          std::vector<int> code2=m->getDistributionOfTypes();
+          std::vector<mcIdType> code2=m->getDistributionOfTypes();
           end=PutInThirdComponentOfCodeOffset(code2,start);
           newCode.insert(newCode.end(),code2.begin(),code2.end());
           //
@@ -4232,12 +4233,12 @@ bool MEDFileUMesh::unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode
             continue;
           if(famField)
             {
-              MCAuto<DataArrayInt> newFamField=famField->renumber(o2nCellsPart2->getConstPointer());
+              MCAuto<DataArrayIdType> newFamField=famField->renumber(o2nCellsPart2->getConstPointer());
               setFamilyFieldArr(*it,newFamField);
             }
           if(numField)
             {
-              MCAuto<DataArrayInt> newNumField=numField->renumber(o2nCellsPart2->getConstPointer());
+              MCAuto<DataArrayIdType> newNumField=numField->renumber(o2nCellsPart2->getConstPointer());
               setRenumFieldArr(*it,newNumField);
             }
         }
@@ -4249,8 +4250,8 @@ bool MEDFileUMesh::unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode
     }
   if(ret)
     {
-      MCAuto<DataArrayInt> renumCells=DataArrayInt::Aggregate(renumCellsSplited);
-      MCAuto<DataArrayInt> o2nRenumCellRet=renumCells->buildPermArrPerLevel();
+      MCAuto<DataArrayIdType> renumCells=DataArrayIdType::Aggregate(renumCellsSplited);
+      MCAuto<DataArrayIdType> o2nRenumCellRet=renumCells->buildPermArrPerLevel();
       o2nRenumCell=o2nRenumCellRet.retn();
     }
   return ret;
@@ -4260,8 +4261,8 @@ bool MEDFileUMesh::unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode
 struct MEDLoaderAccVisit1
 {
   MEDLoaderAccVisit1():_new_nb_of_nodes(0) { }
-  int operator()(bool val) { return val?_new_nb_of_nodes++:-1; }
-  int _new_nb_of_nodes;
+  mcIdType operator()(bool val) { return val?_new_nb_of_nodes++:-1; }
+  mcIdType _new_nb_of_nodes;
 };
 /*! \endcond */
 
@@ -4276,12 +4277,12 @@ struct MEDLoaderAccVisit1
  * \throw If no coordinates are set in \a this or if there is in any available mesh in \a this a cell having a nodal connectivity containing a node id not in the range of
  *  set coordinates.
  */
-DataArrayInt *MEDFileUMesh::zipCoords()
+DataArrayIdType *MEDFileUMesh::zipCoords()
 {
   const DataArrayDouble *coo(getCoords());
   if(!coo)
     throw INTERP_KERNEL::Exception("MEDFileUMesh::zipCoords : no coordinates set in this !");
-  int nbOfNodes(coo->getNumberOfTuples());
+  mcIdType nbOfNodes(coo->getNumberOfTuples());
   std::vector<bool> nodeIdsInUse(nbOfNodes,false);
   std::vector<int> neLevs(getNonEmptyLevels());
   for(std::vector<int>::const_iterator lev=neLevs.begin();lev!=neLevs.end();lev++)
@@ -4300,18 +4301,18 @@ DataArrayInt *MEDFileUMesh::zipCoords()
           mesh->computeNodeIdsAlg(nodeIdsInUse);
         }
     }
-  int nbrOfNodesInUse((int)std::count(nodeIdsInUse.begin(),nodeIdsInUse.end(),true));
+  mcIdType nbrOfNodesInUse((mcIdType)std::count(nodeIdsInUse.begin(),nodeIdsInUse.end(),true));
   if(nbrOfNodesInUse==nbOfNodes)
     return 0;//no need to update _part_coords
-  MCAuto<DataArrayInt> ret(DataArrayInt::New()); ret->alloc(nbOfNodes,1);
+  MCAuto<DataArrayIdType> ret(DataArrayIdType::New()); ret->alloc(nbOfNodes,1);
   std::transform(nodeIdsInUse.begin(),nodeIdsInUse.end(),ret->getPointer(),MEDLoaderAccVisit1());
-  MCAuto<DataArrayInt> ret2(ret->invertArrayO2N2N2OBis(nbrOfNodesInUse));
+  MCAuto<DataArrayIdType> ret2(ret->invertArrayO2N2N2OBis(nbrOfNodesInUse));
   MCAuto<DataArrayDouble> newCoords(coo->selectByTupleIdSafe(ret2->begin(),ret2->end()));
-  MCAuto<DataArrayInt> newFamCoords;
+  MCAuto<DataArrayIdType> newFamCoords;
   MCAuto<DataArrayAsciiChar> newNameCoords;
-  if((const DataArrayInt *)_fam_coords)
+  if((const DataArrayIdType *)_fam_coords)
     newFamCoords=_fam_coords->selectByTupleIdSafe(ret2->begin(),ret2->end());
-  MCAuto<DataArrayInt> newNumCoords,newGlobalNumCoords;
+  MCAuto<DataArrayIdType> newNumCoords,newGlobalNumCoords;
   if(_num_coords.isNotNull())
     newNumCoords=_num_coords->selectByTupleIdSafe(ret2->begin(),ret2->end());
   if(_global_num_coords.isNotNull())
@@ -4342,14 +4343,14 @@ DataArrayInt *MEDFileUMesh::zipCoords()
  * The extraction of \a this is specified by the extractDef \a input map.
  * This map tells for each level of cells, the cells kept in the extraction.
  * 
- * \return - a new reference of DataArrayInt that represents sorted node ids, the extraction is lying on.
+ * \return - a new reference of DataArrayIdType that represents sorted node ids, the extraction is lying on.
  * \sa MEDFileField1TS::extractPart, MEDFileUMesh::extractPart
  */
-DataArrayInt *MEDFileUMesh::deduceNodeSubPartFromCellSubPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef) const
+DataArrayIdType *MEDFileUMesh::deduceNodeSubPartFromCellSubPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const
 {
   std::vector<int> levs(getNonEmptyLevels());
   std::vector<bool> fetchedNodes(getNumberOfNodes(),false);
-  for(std::map<int, MCAuto<DataArrayInt> >::const_iterator it=extractDef.begin();it!=extractDef.end();it++)
+  for(std::map<int, MCAuto<DataArrayIdType> >::const_iterator it=extractDef.begin();it!=extractDef.end();it++)
     {
       if((*it).first>1)
         throw INTERP_KERNEL::Exception("MEDFileUMesh::deduceNodeSubPartFromCellSubPart : invalid key ! Must be <=1 !");
@@ -4366,7 +4367,7 @@ DataArrayInt *MEDFileUMesh::deduceNodeSubPartFromCellSubPart(const std::map<int,
       MCAuto<MEDCouplingUMesh> mPart(m->buildPartOfMySelf((*it).second->begin(),(*it).second->end(),true));
       mPart->computeNodeIdsAlg(fetchedNodes);
     }
-  return DataArrayInt::BuildListOfSwitchedOn(fetchedNodes);
+  return DataArrayIdType::BuildListOfSwitchedOn(fetchedNodes);
 }
 
 /*!
@@ -4375,11 +4376,11 @@ DataArrayInt *MEDFileUMesh::deduceNodeSubPartFromCellSubPart(const std::map<int,
  * \return - a new reference of MEDFileUMesh
  * \sa MEDFileUMesh::deduceNodeSubPartFromCellSubPart, MEDFileFields::extractPart
  */
-MEDFileUMesh *MEDFileUMesh::extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef) const
+MEDFileUMesh *MEDFileUMesh::extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const
 {
   MCAuto<MEDFileUMesh> ret(MEDFileUMesh::New()); ret->setName(getName()); ret->copyFamGrpMapsFrom(*this);
   std::vector<int> levs(getNonEmptyLevels());
-  for(std::map<int, MCAuto<DataArrayInt> >::const_iterator it=extractDef.begin();it!=extractDef.end();it++)
+  for(std::map<int, MCAuto<DataArrayIdType> >::const_iterator it=extractDef.begin();it!=extractDef.end();it++)
     {
       if((*it).first>1)
         throw INTERP_KERNEL::Exception("MEDFileUMesh::extractPart : invalid key ! Must be <=1 !");
@@ -4395,39 +4396,39 @@ MEDFileUMesh *MEDFileUMesh::extractPart(const std::map<int, MCAuto<DataArrayInt>
       MCAuto<MEDCouplingUMesh> m(getMeshAtLevel((*it).first));
       MCAuto<MEDCouplingUMesh> mPart(m->buildPartOfMySelf((*it).second->begin(),(*it).second->end(),true));
       ret->setMeshAtLevel((*it).first,mPart);
-      const DataArrayInt *fam(getFamilyFieldAtLevel((*it).first)),*num(getNumberFieldAtLevel((*it).first));
+      const DataArrayIdType *fam(getFamilyFieldAtLevel((*it).first)),*num(getNumberFieldAtLevel((*it).first));
       if(fam)
         {
-          MCAuto<DataArrayInt> famPart(fam->selectByTupleIdSafe((*it).second->begin(),(*it).second->end()));
+          MCAuto<DataArrayIdType> famPart(fam->selectByTupleIdSafe((*it).second->begin(),(*it).second->end()));
           ret->setFamilyFieldArr((*it).first,famPart);
         }
       if(num)
         {
-          MCAuto<DataArrayInt> numPart(num->selectByTupleIdSafe((*it).second->begin(),(*it).second->end()));
+          MCAuto<DataArrayIdType> numPart(num->selectByTupleIdSafe((*it).second->begin(),(*it).second->end()));
           ret->setFamilyFieldArr((*it).first,numPart);
         }
     }
-  std::map<int, MCAuto<DataArrayInt> >::const_iterator it2(extractDef.find(1));
+  std::map<int, MCAuto<DataArrayIdType> >::const_iterator it2(extractDef.find(1));
   if(it2!=extractDef.end())
     {
       const DataArrayDouble *coo(ret->getCoords());
       if(!coo)
         throw INTERP_KERNEL::Exception("MEDFileUMesh::extractPart : trying to extract nodes whereas there is no nodes !");
-      MCAuto<DataArrayInt> o2nNodes(((*it2).second)->invertArrayN2O2O2N(coo->getNumberOfTuples()));
+      MCAuto<DataArrayIdType> o2nNodes(((*it2).second)->invertArrayN2O2O2N(coo->getNumberOfTuples()));
       MCAuto<DataArrayDouble> cooPart(coo->selectByTupleIdSafe((*it2).second->begin(),(*it2).second->end()));
       ret->setCoords(cooPart);
-      const DataArrayInt *fam(getFamilyFieldAtLevel(1)),*num(getNumberFieldAtLevel(1));
+      const DataArrayIdType *fam(getFamilyFieldAtLevel(1)),*num(getNumberFieldAtLevel(1));
       if(fam)
         {
-          MCAuto<DataArrayInt> famPart(fam->selectByTupleIdSafe((*it2).second->begin(),(*it2).second->end()));
+          MCAuto<DataArrayIdType> famPart(fam->selectByTupleIdSafe((*it2).second->begin(),(*it2).second->end()));
           ret->setFamilyFieldArr(1,famPart);
         }
       if(num)
         {
-          MCAuto<DataArrayInt> numPart(num->selectByTupleIdSafe((*it2).second->begin(),(*it2).second->end()));
+          MCAuto<DataArrayIdType> numPart(num->selectByTupleIdSafe((*it2).second->begin(),(*it2).second->end()));
           ret->setFamilyFieldArr(1,numPart);
         }
-      for(std::map<int, MCAuto<DataArrayInt> >::const_iterator it3=extractDef.begin();it3!=extractDef.end();it3++)
+      for(std::map<int, MCAuto<DataArrayIdType> >::const_iterator it3=extractDef.begin();it3!=extractDef.end();it3++)
         {
           if((*it3).first==1)
             continue;
@@ -4462,13 +4463,13 @@ MEDFileUMesh *MEDFileUMesh::buildExtrudedMesh(const MEDCouplingUMesh *m1D, int p
   m1D->checkConsistencyLight();
   if(m1D->getMeshDimension()!=1)
     throw INTERP_KERNEL::Exception("MEDFileUMesh::buildExtrudedMesh : input mesh must have a mesh dimension equal to one !");
-  int nbRep(m1D->getNumberOfCells());
+  mcIdType nbRep(m1D->getNumberOfCells());
   std::vector<int> levs(getNonEmptyLevels());
   std::vector<std::string> grps(getGroupsNames());
   std::vector< MCAuto<MEDCouplingUMesh> > zeList;
   DataArrayDouble *coords(0);
   std::size_t nbOfLevsOut(levs.size()+1);
-  std::vector< MCAuto<DataArrayInt> > o2ns(nbOfLevsOut);
+  std::vector< MCAuto<DataArrayIdType> > o2ns(nbOfLevsOut);
   for(std::vector<int>::const_iterator lev=levs.begin();lev!=levs.end();lev++)
     {
       MCAuto<MEDCouplingUMesh> item(getMeshAtLevel(*lev));
@@ -4496,7 +4497,7 @@ MEDFileUMesh *MEDFileUMesh::buildExtrudedMesh(const MEDCouplingUMesh *m1D, int p
         {
           MCAuto<MEDCouplingUMesh> elt1(getMeshAtLevel(lev+1));
           MCAuto<MEDCouplingUMesh> elt2(elt1->clone(false));
-          MCAuto<DataArrayInt> tmp(elt2->getNodalConnectivity()->deepCopy());
+          MCAuto<DataArrayIdType> tmp(elt2->getNodalConnectivity()->deepCopy());
           elt2->setConnectivity(tmp,elt2->getNodalConnectivityIndex());
           elt2->shiftNodeNumbersInConn(nbRep*elt1->getNumberOfNodes());
           elt1->setCoords(elt->getCoords()); elt2->setCoords(elt->getCoords());
@@ -4511,7 +4512,7 @@ MEDFileUMesh *MEDFileUMesh::buildExtrudedMesh(const MEDCouplingUMesh *m1D, int p
     }
   MCAuto<MEDCouplingUMesh> endLev(getMeshAtLevel(levs.back())),endLev2;
   endLev=endLev->clone(false); endLev->setCoords(coords);
-  MCAuto<DataArrayInt> tmp(endLev->getNodalConnectivity()->deepCopy());
+  MCAuto<DataArrayIdType> tmp(endLev->getNodalConnectivity()->deepCopy());
   endLev2=endLev->clone(false); endLev2->setConnectivity(tmp,endLev->getNodalConnectivityIndex());
   endLev2->shiftNodeNumbersInConn(nbRep*getNumberOfNodes());
   endLev=MEDCouplingUMesh::MergeUMeshesOnSameCoords(endLev,endLev2);
@@ -4522,18 +4523,18 @@ MEDFileUMesh *MEDFileUMesh::buildExtrudedMesh(const MEDCouplingUMesh *m1D, int p
   for(std::size_t ii=0;ii!=zeList.size();ii++)
     {
       int lev(levs[ii]);
-      std::vector< MCAuto<DataArrayInt> > outGrps;
-      std::vector< const DataArrayInt * > outGrps2;
+      std::vector< MCAuto<DataArrayIdType> > outGrps;
+      std::vector< const DataArrayIdType * > outGrps2;
       if(lev<=-1)
         {
           for(std::vector<std::string>::const_iterator grp=grps.begin();grp!=grps.end();grp++)
             {
-              MCAuto<DataArrayInt> grpArr(getGroupArr(lev+1,*grp));
+              MCAuto<DataArrayIdType> grpArr(getGroupArr(lev+1,*grp));
               if(!grpArr->empty())
                 {
-                  MCAuto<DataArrayInt> grpArr1(grpArr->deepCopy()),grpArr2(grpArr->deepCopy());
-                  int offset0(zeList[ii]->getNumberOfCells());
-                  int offset1(offset0+getNumberOfCellsAtLevel(lev+1));
+                  MCAuto<DataArrayIdType> grpArr1(grpArr->deepCopy()),grpArr2(grpArr->deepCopy());
+                  mcIdType offset0(zeList[ii]->getNumberOfCells());
+                  mcIdType offset1(offset0+getNumberOfCellsAtLevel(lev+1));
                   grpArr1->applyLin(1,offset0); grpArr2->applyLin(1,offset1);
                   std::ostringstream oss; oss << grpArr2->getName() << "_top";
                   grpArr2->setName(oss.str());
@@ -4547,18 +4548,18 @@ MEDFileUMesh *MEDFileUMesh::buildExtrudedMesh(const MEDCouplingUMesh *m1D, int p
       //
       for(std::vector<std::string>::const_iterator grp=grps.begin();grp!=grps.end();grp++)
         {
-          MCAuto<DataArrayInt> grpArr(getGroupArr(lev,*grp));
+          MCAuto<DataArrayIdType> grpArr(getGroupArr(lev,*grp));
           if(!grpArr->empty())
             {
-              int nbCellsB4Extrusion(getNumberOfCellsAtLevel(lev));
-              std::vector< MCAuto<DataArrayInt> > grpArrs(nbRep);
-              std::vector< const DataArrayInt *> grpArrs2(nbRep);
+              mcIdType nbCellsB4Extrusion(getNumberOfCellsAtLevel(lev));
+              std::vector< MCAuto<DataArrayIdType> > grpArrs(nbRep);
+              std::vector< const DataArrayIdType *> grpArrs2(nbRep);
               for(int iii=0;iii<nbRep;iii++)
                 {
                   grpArrs[iii]=grpArr->deepCopy(); grpArrs[iii]->applyLin(1,iii*nbCellsB4Extrusion);
                   grpArrs2[iii]=grpArrs[iii];
                 }
-              MCAuto<DataArrayInt> grpArrExt(DataArrayInt::Aggregate(grpArrs2));
+              MCAuto<DataArrayIdType> grpArrExt(DataArrayIdType::Aggregate(grpArrs2));
               grpArrExt->transformWithIndArr(o2ns[ii]->begin(),o2ns[ii]->end());
               std::ostringstream grpName; grpName << *grp << "_extruded";
               grpArrExt->setName(grpName.str());
@@ -4568,14 +4569,14 @@ MEDFileUMesh *MEDFileUMesh::buildExtrudedMesh(const MEDCouplingUMesh *m1D, int p
         }
       ret->setGroupsAtLevel(lev,outGrps2);
     }
-  std::vector< MCAuto<DataArrayInt> > outGrps;
-  std::vector< const DataArrayInt * > outGrps2;
+  std::vector< MCAuto<DataArrayIdType> > outGrps;
+  std::vector< const DataArrayIdType * > outGrps2;
   for(std::vector<std::string>::const_iterator grp=grps.begin();grp!=grps.end();grp++)
     {
-      MCAuto<DataArrayInt> grpArr1(getGroupArr(levs.back(),*grp));
+      MCAuto<DataArrayIdType> grpArr1(getGroupArr(levs.back(),*grp));
       if(grpArr1->empty())
         continue;
-      MCAuto<DataArrayInt> grpArr2(grpArr1->deepCopy());
+      MCAuto<DataArrayIdType> grpArr2(grpArr1->deepCopy());
       std::ostringstream grpName; grpName << *grp << "_top";
       grpArr2->setName(grpName.str());
       grpArr2->applyLin(1,getNumberOfCellsAtLevel(levs.back()));
@@ -4602,25 +4603,25 @@ MEDFileUMesh *MEDFileUMesh::linearToQuadratic(int conversionType, double eps) co
 {
   checkCartesian();
   MCAuto<MEDFileUMesh> ret(MEDFileUMesh::New());
-  int initialNbNodes(getNumberOfNodes());
+  mcIdType initialNbNodes(getNumberOfNodes());
   MCAuto<MEDCouplingUMesh> m0Tmp(getMeshAtLevel(0));
   MCAuto<MEDCouplingUMesh> m0(dynamic_cast<MEDCouplingUMesh *>(m0Tmp->deepCopy()));
   {
-    MCAuto<DataArrayInt> notUsed(m0->convertLinearCellsToQuadratic(conversionType));
+    MCAuto<DataArrayIdType> notUsed(m0->convertLinearCellsToQuadratic(conversionType));
   }
   DataArrayDouble *zeCoords(m0->getCoords());
   ret->setMeshAtLevel(0,m0);
   std::vector<int> levs(getNonEmptyLevels());
-  const DataArrayInt *famField(getFamilyFieldAtLevel(0));
+  const DataArrayIdType *famField(getFamilyFieldAtLevel(0));
   if(famField)
     {
-      MCAuto<DataArrayInt> famFieldCpy(famField->deepCopy());
+      MCAuto<DataArrayIdType> famFieldCpy(famField->deepCopy());
       ret->setFamilyFieldArr(0,famFieldCpy);
     }
   famField=getFamilyFieldAtLevel(1);
   if(famField)
     {
-      MCAuto<DataArrayInt> fam(DataArrayInt::New()); fam->alloc(zeCoords->getNumberOfTuples(),1);
+      MCAuto<DataArrayIdType> fam(DataArrayIdType::New()); fam->alloc(zeCoords->getNumberOfTuples(),1);
       fam->fillWithZero();
       fam->setPartOfValues1(famField,0,initialNbNodes,1,0,1,1);
       ret->setFamilyFieldArr(1,fam);
@@ -4636,21 +4637,21 @@ MEDFileUMesh *MEDFileUMesh::linearToQuadratic(int conversionType, double eps) co
       if(m1->getMeshDimension()!=0)
         {
           {
-            MCAuto<DataArrayInt> notUsed(m1->convertLinearCellsToQuadratic(conversionType));
+            MCAuto<DataArrayIdType> notUsed(m1->convertLinearCellsToQuadratic(conversionType));
           }//kill unused notUsed var
           MCAuto<DataArrayDouble> m1Coords(m1->getCoords()->selectByTupleIdSafeSlice(initialNbNodes,m1->getNumberOfNodes(),1));
-          DataArrayInt *b(0);
+          DataArrayIdType *b(0);
           bool a(partZeCoords->areIncludedInMe(m1Coords,eps,b));
-          MCAuto<DataArrayInt> bSafe(b);
+          MCAuto<DataArrayIdType> bSafe(b);
           if(!a)
             {
               std::ostringstream oss; oss << "MEDFileUMesh::linearCellsToQuadratic : for level " << *lev << " problem to identify nodes generated !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
           b->applyLin(1,initialNbNodes);
-          MCAuto<DataArrayInt> l0(DataArrayInt::New()); l0->alloc(initialNbNodes,1); l0->iota();
-          std::vector<const DataArrayInt *> v(2); v[0]=l0; v[1]=b;
-          MCAuto<DataArrayInt> renum(DataArrayInt::Aggregate(v));
+          MCAuto<DataArrayIdType> l0(DataArrayIdType::New()); l0->alloc(initialNbNodes,1); l0->iota();
+          std::vector<const DataArrayIdType *> v(2); v[0]=l0; v[1]=b;
+          MCAuto<DataArrayIdType> renum(DataArrayIdType::Aggregate(v));
           m1->renumberNodesInConn(renum->begin());
         }
       m1->setCoords(zeCoords);
@@ -4658,7 +4659,7 @@ MEDFileUMesh *MEDFileUMesh::linearToQuadratic(int conversionType, double eps) co
       famField=getFamilyFieldAtLevel(*lev);
       if(famField)
         {
-          MCAuto<DataArrayInt> famFieldCpy(famField->deepCopy());
+          MCAuto<DataArrayIdType> famFieldCpy(famField->deepCopy());
           ret->setFamilyFieldArr(*lev,famFieldCpy);
         }
     }
@@ -4686,16 +4687,16 @@ MEDFileUMesh *MEDFileUMesh::quadraticToLinear(double eps) const
   DataArrayDouble *zeCoords(m0->getCoords());
   ret->setMeshAtLevel(0,m0);
   std::vector<int> levs(getNonEmptyLevels());
-  const DataArrayInt *famField(getFamilyFieldAtLevel(0));
+  const DataArrayIdType *famField(getFamilyFieldAtLevel(0));
   if(famField)
     {
-      MCAuto<DataArrayInt> famFieldCpy(famField->deepCopy());
+      MCAuto<DataArrayIdType> famFieldCpy(famField->deepCopy());
       ret->setFamilyFieldArr(0,famFieldCpy);
     }
   famField=getFamilyFieldAtLevel(1);
   if(famField)
     {
-      MCAuto<DataArrayInt> fam(famField->selectByTupleIdSafeSlice(0,zeCoords->getNumberOfTuples(),1));
+      MCAuto<DataArrayIdType> fam(famField->selectByTupleIdSafeSlice(0,zeCoords->getNumberOfTuples(),1));
       ret->setFamilyFieldArr(1,fam);
     }
   ret->copyFamGrpMapsFrom(*this);
@@ -4707,9 +4708,9 @@ MEDFileUMesh *MEDFileUMesh::quadraticToLinear(double eps) const
       MCAuto<MEDCouplingUMesh> m1(dynamic_cast<MEDCouplingUMesh *>(m1Tmp->deepCopy()));
       m1->convertQuadraticCellsToLinear();
       m1->zipCoords();
-      DataArrayInt *b(0);
+      DataArrayIdType *b(0);
       bool a(zeCoords->areIncludedInMe(m1->getCoords(),eps,b));
-      MCAuto<DataArrayInt> bSafe(b);
+      MCAuto<DataArrayIdType> bSafe(b);
       if(!a)
         {
           std::ostringstream oss; oss << "MEDFileUMesh::quadraticToLinear : for level " << *lev << " problem to identify nodes generated !";
@@ -4721,7 +4722,7 @@ MEDFileUMesh *MEDFileUMesh::quadraticToLinear(double eps) const
       famField=getFamilyFieldAtLevel(*lev);
       if(famField)
         {
-          MCAuto<DataArrayInt> famFieldCpy(famField->deepCopy());
+          MCAuto<DataArrayIdType> famFieldCpy(famField->deepCopy());
           ret->setFamilyFieldArr(*lev,famFieldCpy);
         }
     }
@@ -4755,7 +4756,7 @@ MCAuto<MEDFileUMesh> MEDFileUMesh::Aggregate(const std::vector<const MEDFileUMes
     throw INTERP_KERNEL::Exception("MEDFileUMesh::Aggregate : empty input vector !");
   std::size_t sz(meshes.size()),i(0);
   std::vector<const DataArrayDouble *> coos(sz);
-  std::vector<const DataArrayInt *> fam_coos(sz),num_coos(sz);
+  std::vector<const DataArrayIdType *> fam_coos(sz),num_coos(sz);
   for(auto it=meshes.begin();it!=meshes.end();it++,i++)
     {
       if(!(*it))
@@ -4767,19 +4768,19 @@ MCAuto<MEDFileUMesh> MEDFileUMesh::Aggregate(const std::vector<const MEDFileUMes
   const MEDFileUMesh *ref(meshes[0]);
   int spaceDim(ref->getSpaceDimension()),meshDim(ref->getMeshDimension());
   std::vector<int> levs(ref->getNonEmptyLevels());
-  std::map<int, std::vector<const DataArrayInt *> > m_fam,m_renum;
+  std::map<int, std::vector<const DataArrayIdType *> > m_fam,m_renum;
   std::map<int, std::vector< MCAuto< MEDCouplingUMesh > > > m_mesh2;
   std::map<int, std::vector<const MEDCouplingUMesh *> > m_mesh;
-  std::map<std::string,int> famNumMap;
-  std::map<int, std::string> famNumMap_rev;
+  std::map<std::string,mcIdType> famNumMap;
+  std::map<mcIdType, std::string> famNumMap_rev;
   std::map<std::string, std::vector<std::string> > grpFamMap;
-  std::set< MCAuto<DataArrayInt> > mem_cleanup;   // Memory clean-up. At set deletion (end of method), arrays will be deallocated.
+  std::set< MCAuto<DataArrayIdType> > mem_cleanup;   // Memory clean-up. At set deletion (end of method), arrays will be deallocated.
 
   // Identify min family number used:
-  int min_fam_num(0);
+  mcIdType min_fam_num(0);
   for(const auto& msh : meshes)
     {
-      const std::map<std::string,int>& locMap1(msh->getFamilyInfo());
+      const std::map<std::string,mcIdType>& locMap1(msh->getFamilyInfo());
       for(const auto& it3 : locMap1)
         if(it3.second < min_fam_num)
           min_fam_num = it3.second;
@@ -4794,14 +4795,14 @@ MCAuto<MEDFileUMesh> MEDFileUMesh::Aggregate(const std::vector<const MEDFileUMes
       if(msh->getNonEmptyLevels()!=levs)
         throw INTERP_KERNEL::Exception("MEDFileUMesh::Aggregate : levels must be the same for elements in input vector !");
 
-      const std::map<std::string,int>& locMap1(msh->getFamilyInfo());
+      const std::map<std::string,mcIdType>& locMap1(msh->getFamilyInfo());
       std::map<std::string, std::string> substitute;
-      std::map<int, int> substituteN;
+      std::map<mcIdType, mcIdType> substituteN;
       bool fam_conflict(false);
       for(const auto& it3 : locMap1)
         {
           const std::string& famName = it3.first;
-          int famNum = it3.second;
+          mcIdType famNum = it3.second;
           if (famNumMap_rev.find(famNum) != famNumMap_rev.end()) // Family number is already used!
             {
               // Is it used by a group of the current mesh or a group from a previous mesh?
@@ -4849,8 +4850,8 @@ MCAuto<MEDFileUMesh> MEDFileUMesh::Aggregate(const std::vector<const MEDFileUMes
           // Family field - substitute new family number if needed:
           if(fam_conflict)
             {
-              DataArrayInt* dai(msh->getFamilyFieldAtLevel(level)->deepCopy());  // Need a copy
-              mem_cleanup.insert(MCAuto<DataArrayInt>(dai));      // Make sure array will decrRef() at end of method
+              DataArrayIdType* dai(msh->getFamilyFieldAtLevel(level)->deepCopy());  // Need a copy
+              mem_cleanup.insert(MCAuto<DataArrayIdType>(dai));      // Make sure array will decrRef() at end of method
               for (const auto& subN : substituteN)
                 dai->changeValue(subN.first, subN.second);
               m_fam[level].push_back(dai);
@@ -4892,14 +4893,14 @@ MCAuto<MEDFileUMesh> MEDFileUMesh::Aggregate(const std::vector<const MEDFileUMes
   MCAuto<MEDFileUMesh> ret(MEDFileUMesh::New());
   MCAuto<DataArrayDouble> coo(DataArrayDouble::Aggregate(coos));
   ret->setCoords(coo);
-  if(std::find(fam_coos.begin(),fam_coos.end(),(const DataArrayInt *)0)==fam_coos.end())
+  if(std::find(fam_coos.begin(),fam_coos.end(),(const DataArrayIdType *)0)==fam_coos.end())
     {
-      MCAuto<DataArrayInt> fam_coo(DataArrayInt::Aggregate(fam_coos));
+      MCAuto<DataArrayIdType> fam_coo(DataArrayIdType::Aggregate(fam_coos));
       ret->setFamilyFieldArr(1,fam_coo);
     }
-  if(std::find(num_coos.begin(),num_coos.end(),(const DataArrayInt *)0)==num_coos.end())
+  if(std::find(num_coos.begin(),num_coos.end(),(const DataArrayIdType *)0)==num_coos.end())
     {
-      MCAuto<DataArrayInt> num_coo(DataArrayInt::Aggregate(num_coos));
+      MCAuto<DataArrayIdType> num_coo(DataArrayIdType::Aggregate(num_coos));
       ret->setRenumFieldArr(1,num_coo);
     }
   // cells
@@ -4910,7 +4911,7 @@ MCAuto<MEDFileUMesh> MEDFileUMesh::Aggregate(const std::vector<const MEDFileUMes
         throw INTERP_KERNEL::Exception("MEDFileUMesh::Aggregate : internal error 1 !");
       MCAuto<MEDCouplingUMesh> mesh(MEDCouplingUMesh::MergeUMeshes((*it2).second));
       mesh->setCoords(coo); mesh->setName(ref->getName());
-      MCAuto<DataArrayInt> renum(mesh->sortCellsInMEDFileFrmt());
+      MCAuto<DataArrayIdType> renum(mesh->sortCellsInMEDFileFrmt());
       ret->setMeshAtLevel(level,mesh);
       auto it3(m_fam.find(level)),it4(m_renum.find(level));
       if(it3==m_fam.end()) // Should never happen (all levels exist for all meshes)
@@ -4918,18 +4919,18 @@ MCAuto<MEDFileUMesh> MEDFileUMesh::Aggregate(const std::vector<const MEDFileUMes
       if(it4==m_renum.end())
         throw INTERP_KERNEL::Exception("MEDFileUMesh::Aggregate : internal error 3!");
       // Set new family field if it was defined for all input meshes
-      const std::vector<const DataArrayInt *>& fams((*it3).second);
-      if(std::find(fams.begin(),fams.end(),(const DataArrayInt *)0)==fams.end())
+      const std::vector<const DataArrayIdType *>& fams((*it3).second);
+      if(std::find(fams.begin(),fams.end(),(const DataArrayIdType *)0)==fams.end())
         {
-          MCAuto<DataArrayInt> famm(DataArrayInt::Aggregate(fams));
+          MCAuto<DataArrayIdType> famm(DataArrayIdType::Aggregate(fams));
           famm->renumberInPlace(renum->begin());
           ret->setFamilyFieldArr(level,famm);
         }
       // Set optional number field if defined for all input meshes:
-      const std::vector<const DataArrayInt *>& renums((*it4).second);
-      if(std::find(renums.begin(),renums.end(),(const DataArrayInt *)0)==renums.end())
+      const std::vector<const DataArrayIdType *>& renums((*it4).second);
+      if(std::find(renums.begin(),renums.end(),(const DataArrayIdType *)0)==renums.end())
         {
-          MCAuto<DataArrayInt> renumm(DataArrayInt::Aggregate(renums));
+          MCAuto<DataArrayIdType> renumm(DataArrayIdType::Aggregate(renums));
           renumm->renumberInPlace(renum->begin());
           ret->setRenumFieldArr(level,renumm);
         }
@@ -4948,17 +4949,17 @@ MEDCouplingMappedExtrudedMesh *MEDFileUMesh::convertToExtrudedMesh() const
   MCAuto<MEDCouplingUMesh> m3D(getMeshAtLevel(0)),m2D(getMeshAtLevel(-1));
   if(m3D.isNull() || m2D.isNull())
     throw INTERP_KERNEL::Exception("MEDFileUMesh::convertToExtrudedMesh : this must be defined both at level 0 and level -1 !");
-  int zeId(std::numeric_limits<int>::max()-getFamilyId(GetSpeStr4ExtMesh()));
+  mcIdType zeId(std::numeric_limits<med_int>::max()-getFamilyId(GetSpeStr4ExtMesh()));
   MCAuto<MEDCouplingMappedExtrudedMesh> ret(MEDCouplingMappedExtrudedMesh::New(m3D,m2D,zeId));
   return ret.retn();
 }
 
-void MEDFileUMesh::serialize(std::vector<double>& tinyDouble, std::vector<int>& tinyInt, std::vector<std::string>& tinyStr, std::vector< MCAuto<DataArrayInt> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD)
+void MEDFileUMesh::serialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr, std::vector< MCAuto<DataArrayIdType> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD)
 {
   clearNonDiscrAttributes();
   forceComputationOfParts();
   tinyDouble.clear(); tinyInt.clear(); tinyStr.clear(); bigArraysI.clear(); bigArrayD=0;
-  std::vector<int> layer0;
+  std::vector<mcIdType> layer0;
   layer0.push_back(getAxisType());//0 i
   layer0.push_back(_order); //1 i
   layer0.push_back(_iteration);//2 i
@@ -4968,16 +4969,16 @@ void MEDFileUMesh::serialize(std::vector<double>& tinyDouble, std::vector<int>&
   tinyStr.push_back(_desc_name);//1 s
   for(int i=0;i<getSpaceDimension();i++)
     tinyStr.push_back(_coords->getInfoOnComponent(i));
-  layer0.push_back((int)_families.size());//4 i <- key info aa layer#0
-  for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+  layer0.push_back(ToIdType(_families.size()));//4 i <- key info aa layer#0
+  for(std::map<std::string,mcIdType>::const_iterator it=_families.begin();it!=_families.end();it++)
     {
       tinyStr.push_back((*it).first);
       layer0.push_back((*it).second);
     }
-  layer0.push_back((int)_groups.size());//4+aa i <- key info bb layer#0
+  layer0.push_back((mcIdType)_groups.size());//4+aa i <- key info bb layer#0
   for(std::map<std::string, std::vector<std::string> >::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
     {
-      layer0.push_back((int)(*it0).second.size());
+      layer0.push_back(ToIdType((*it0).second.size()));
       tinyStr.push_back((*it0).first);
       for(std::vector<std::string>::const_iterator it1=((*it0).second).begin();it1!=((*it0).second).end();it1++)
         tinyStr.push_back(*it1);
@@ -4991,15 +4992,15 @@ void MEDFileUMesh::serialize(std::vector<double>& tinyDouble, std::vector<int>&
     layer0.push_back(-1);
   else
     {
-      std::vector<int> tmp0;
+      std::vector<mcIdType> tmp0;
       pd->serialize(tmp0,bigArraysI);
-      tinyInt.push_back(tmp0.size());
+      tinyInt.push_back(ToIdType(tmp0.size()));
       tinyInt.insert(tinyInt.end(),tmp0.begin(),tmp0.end());
     }
   //
-  std::vector<int> layer1;
+  std::vector<mcIdType> layer1;
   std::vector<int> levs(getNonEmptyLevels());
-  layer1.push_back((int)levs.size());// 0 i <- key
+  layer1.push_back((mcIdType)levs.size());// 0 i <- key
   layer1.insert(layer1.end(),levs.begin(),levs.end());
   for(std::vector<int>::const_iterator it=levs.begin();it!=levs.end();it++)
     {
@@ -5007,19 +5008,19 @@ void MEDFileUMesh::serialize(std::vector<double>& tinyDouble, std::vector<int>&
       lev->serialize(layer1,bigArraysI);
     }
   // put layers all together.
-  tinyInt.push_back(layer0.size());
+  tinyInt.push_back(ToIdType(layer0.size()));
   tinyInt.insert(tinyInt.end(),layer0.begin(),layer0.end());
-  tinyInt.push_back(layer1.size());
+  tinyInt.push_back(ToIdType(layer1.size()));
   tinyInt.insert(tinyInt.end(),layer1.begin(),layer1.end());
 }
 
-void MEDFileUMesh::unserialize(std::vector<double>& tinyDouble, std::vector<int>& tinyInt, std::vector<std::string>& tinyStr,
-                               std::vector< MCAuto<DataArrayInt> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD)
+void MEDFileUMesh::unserialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr,
+                               std::vector< MCAuto<DataArrayIdType> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD)
 {
-  int sz0(tinyInt[0]);
-  std::vector<int> layer0(tinyInt.begin()+1,tinyInt.begin()+1+sz0);
-  int sz1(tinyInt[sz0+1]);
-  std::vector<int> layer1(tinyInt.begin()+2+sz0,tinyInt.begin()+2+sz0+sz1);
+  mcIdType sz0(tinyInt[0]);
+  std::vector<mcIdType> layer0(tinyInt.begin()+1,tinyInt.begin()+1+sz0);
+  mcIdType sz1(tinyInt[sz0+1]);
+  std::vector<mcIdType> layer1(tinyInt.begin()+2+sz0,tinyInt.begin()+2+sz0+sz1);
   //
   std::reverse(layer0.begin(),layer0.end());
   std::reverse(layer1.begin(),layer1.end());
@@ -5028,9 +5029,9 @@ void MEDFileUMesh::unserialize(std::vector<double>& tinyDouble, std::vector<int>
   std::reverse(bigArraysI.begin(),bigArraysI.end());
   //
   setAxisType((MEDCouplingAxisType)layer0.back()); layer0.pop_back();
-  _order=layer0.back(); layer0.pop_back();
-  _iteration=layer0.back(); layer0.pop_back();
-  int spaceDim(layer0.back()); layer0.pop_back();
+  _order=FromIdType<int>(layer0.back()); layer0.pop_back();
+  _iteration=FromIdType<int>(layer0.back()); layer0.pop_back();
+  mcIdType spaceDim(layer0.back()); layer0.pop_back();
   _time=tinyDouble.back(); tinyDouble.pop_back();
   _name=tinyStr.back(); tinyStr.pop_back();
   _desc_name=tinyStr.back(); tinyStr.pop_back();
@@ -5040,21 +5041,21 @@ void MEDFileUMesh::unserialize(std::vector<double>& tinyDouble, std::vector<int>
       _coords->setInfoOnComponent(i,tinyStr.back());
       tinyStr.pop_back();
     }
-  int nbOfFams(layer0.back()); layer0.pop_back();
+  mcIdType nbOfFams(layer0.back()); layer0.pop_back();
   _families.clear();
-  for(int i=0;i<nbOfFams;i++)
+  for(mcIdType i=0;i<nbOfFams;i++)
     {
       _families[tinyStr.back()]=layer0.back();
       tinyStr.pop_back(); layer0.pop_back();
     }
-  int nbGroups(layer0.back()); layer0.pop_back();
+  mcIdType nbGroups(layer0.back()); layer0.pop_back();
   _groups.clear();
-  for(int i=0;i<nbGroups;i++)
+  for(mcIdType i=0;i<nbGroups;i++)
     {
       std::string grpName(tinyStr.back()); tinyStr.pop_back();
-      int nbOfFamsOnGrp(layer0.back()); layer0.pop_back();
+      mcIdType nbOfFamsOnGrp(layer0.back()); layer0.pop_back();
       std::vector<std::string> fams(nbOfFamsOnGrp);
-      for(int j=0;j<nbOfFamsOnGrp;j++)
+      for(mcIdType j=0;j<nbOfFamsOnGrp;j++)
         {
           fams[j]=tinyStr.back(); tinyStr.pop_back();
         }
@@ -5063,32 +5064,32 @@ void MEDFileUMesh::unserialize(std::vector<double>& tinyDouble, std::vector<int>
   _fam_coords=bigArraysI.back(); bigArraysI.pop_back();
   _num_coords=bigArraysI.back(); bigArraysI.pop_back();
   _part_coords=0;
-  int isPd(layer0.back()); layer0.pop_back();
+  mcIdType isPd(layer0.back()); layer0.pop_back();
   if(isPd!=-1)
     {
-      std::vector<int> tmp0(layer0.begin(),layer0.begin()+isPd);
+      std::vector<mcIdType> tmp0(layer0.begin(),layer0.begin()+isPd);
       layer0.erase(layer0.begin(),layer0.begin()+isPd);
       _part_coords=PartDefinition::Unserialize(tmp0,bigArraysI);
     }
   if(!layer0.empty())
     throw INTERP_KERNEL::Exception("MEDFileUMesh::unserialize : something wrong during unserialization #1 !");
   //
-  int nbLevs(layer1.back()); layer1.pop_back();
-  std::vector<int> levs(layer1.rbegin(),layer1.rbegin()+nbLevs); layer1.erase(layer1.end()-nbLevs,layer1.end());
+  mcIdType nbLevs(layer1.back()); layer1.pop_back();
+  std::vector<mcIdType> levs(layer1.rbegin(),layer1.rbegin()+nbLevs); layer1.erase(layer1.end()-nbLevs,layer1.end());
   _ms.clear();
-  int maxLev(-(*std::min_element(levs.begin(),levs.end())));
+  mcIdType maxLev(-(*std::min_element(levs.begin(),levs.end())));
   _ms.resize(maxLev+1);
-  for(int i=0;i<nbLevs;i++)
+  for(mcIdType i=0;i<nbLevs;i++)
     {
-      int lev(levs[i]);
-      int pos(-lev);
+      mcIdType lev(levs[i]);
+      mcIdType pos(-lev);
       _ms[pos]=MEDFileUMeshSplitL1::Unserialize(_name,_coords,layer1,bigArraysI);
     }
 }
 
 /*!
  * Adds a group of nodes to \a this mesh.
- *  \param [in] ids - a DataArrayInt providing ids and a name of the group to add.
+ *  \param [in] ids - a DataArrayIdType providing ids and a name of the group to add.
  *          The ids should be sorted and different each other (MED file norm).
  *
  *  \warning this method can alter default "FAMILLE_ZERO" family.
@@ -5100,14 +5101,14 @@ void MEDFileUMesh::unserialize(std::vector<double>& tinyDouble, std::vector<int>
  *  \throw If \a ids does not respect the MED file norm.
  *  \throw If a group with name \a ids->getName() already exists.
  */
-void MEDFileUMesh::addNodeGroup(const DataArrayInt *ids)
+void MEDFileUMesh::addNodeGroup(const DataArrayIdType *ids)
 {
   const DataArrayDouble *coords(_coords);
   if(!coords)
     throw INTERP_KERNEL::Exception("MEDFileUMesh::addNodeGroup : no coords set !");
-  int nbOfNodes(coords->getNumberOfTuples());
+  mcIdType nbOfNodes(coords->getNumberOfTuples());
   if(_fam_coords.isNull())
-    { _fam_coords=DataArrayInt::New(); _fam_coords->alloc(nbOfNodes,1); _fam_coords->fillWithZero(); }
+    { _fam_coords=DataArrayIdType::New(); _fam_coords->alloc(nbOfNodes,1); _fam_coords->fillWithZero(); }
   //
   addGroupUnderground(true,ids,_fam_coords);
 }
@@ -5115,7 +5116,7 @@ void MEDFileUMesh::addNodeGroup(const DataArrayInt *ids)
 /*!
  * Adds a group of nodes/cells/faces/edges to \a this mesh.
  *
- *  \param [in] ids - a DataArrayInt providing ids and a name of the group to add.
+ *  \param [in] ids - a DataArrayIdType providing ids and a name of the group to add.
  *          The ids should be sorted and different each other (MED file norm).
  *
  * \warning this method can alter default "FAMILLE_ZERO" family.
@@ -5127,7 +5128,7 @@ void MEDFileUMesh::addNodeGroup(const DataArrayInt *ids)
  *  \throw If \a ids does not respect the MED file norm.
  *  \throw If a group with name \a ids->getName() already exists.
  */
-void MEDFileUMesh::addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids)
+void MEDFileUMesh::addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids)
 {
   std::vector<int> levs(getNonEmptyLevelsExt());
   if(std::find(levs.begin(),levs.end(),meshDimRelToMaxExt)==levs.end())
@@ -5138,7 +5139,7 @@ void MEDFileUMesh::addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids)
   if(meshDimRelToMaxExt==1)
     { addNodeGroup(ids); return ; }
   MEDFileUMeshSplitL1 *lev(getMeshAtLevSafe(meshDimRelToMaxExt));
-  DataArrayInt *fam(lev->getOrCreateAndGetFamilyField());
+  DataArrayIdType *fam(lev->getOrCreateAndGetFamilyField());
   addGroupUnderground(false,ids,fam);
 }
 
@@ -5148,7 +5149,7 @@ void MEDFileUMesh::addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids)
  *  \param [in] newFamName - the new family name.
  *  \throw If no family with the given \a id exists.
  */
-void MEDFileUMesh::setFamilyNameAttachedOnId(int id, const std::string& newFamName)
+void MEDFileUMesh::setFamilyNameAttachedOnId(mcIdType id, const std::string& newFamName)
 {
   std::string oldName=getFamilyNameGivenId(id);
   _families.erase(oldName);
@@ -5308,11 +5309,11 @@ void MEDFileUMesh::setGroupsFromScratch(int meshDimRelToMax, const std::vector<c
   else
     if((DataArrayDouble *)_coords!=coo)
       throw INTERP_KERNEL::Exception("MEDFileUMesh::setGroupsFromScratch : coordinates mismatches !");
-  std::vector<DataArrayInt *> corr;
+  std::vector<DataArrayIdType *> corr;
   MCAuto<MEDCouplingUMesh> m=MEDCouplingUMesh::FuseUMeshesOnSameCoords(ms,_zipconn_pol,corr);
-  std::vector< MCAuto<DataArrayInt> > corr3(corr.begin(),corr.end());
+  std::vector< MCAuto<DataArrayIdType> > corr3(corr.begin(),corr.end());
   setMeshAtLevel(meshDimRelToMax,m,renum);
-  std::vector<const DataArrayInt *> corr2(corr.begin(),corr.end());
+  std::vector<const DataArrayIdType *> corr2(corr.begin(),corr.end());
   setGroupsAtLevel(meshDimRelToMax,corr2,true);
 }
 
@@ -5353,11 +5354,11 @@ void MEDFileUMesh::setGroupsOnSetMesh(int meshDimRelToMax, const std::vector<con
     if((DataArrayDouble *)_coords!=coo)
       throw INTERP_KERNEL::Exception("MEDFileUMesh::setGroupsOnSetMesh : coordinates mismatches !");
   MEDCouplingUMesh *m=getMeshAtLevel(meshDimRelToMax,renum);
-  std::vector< MCAuto<DataArrayInt> > corr(ms.size());
+  std::vector< MCAuto<DataArrayIdType> > corr(ms.size());
   int i=0;
   for(std::vector<const MEDCouplingUMesh *>::const_iterator it=ms.begin();it!=ms.end();it++,i++)
     {
-      DataArrayInt *arr=0;
+      DataArrayIdType *arr=0;
       bool test=m->areCellsIncludedIn(*it,_zipconn_pol,arr);
       corr[i]=arr;
       if(!test)
@@ -5366,7 +5367,7 @@ void MEDFileUMesh::setGroupsOnSetMesh(int meshDimRelToMax, const std::vector<con
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
     }
-  std::vector<const DataArrayInt *> corr2(corr.begin(),corr.end());
+  std::vector<const DataArrayIdType *> corr2(corr.begin(),corr.end());
   setGroupsAtLevel(meshDimRelToMax,corr2,renum);
 }
 
@@ -5393,7 +5394,7 @@ DataArrayDouble *MEDFileUMesh::checkMultiMesh(const std::vector<const MEDCouplin
  *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
  *  \throw If \a famArr has an invalid size.
  */
-void MEDFileUMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr)
+void MEDFileUMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr)
 {
   if(meshDimRelToMaxExt==1)
     {
@@ -5426,7 +5427,7 @@ void MEDFileUMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famAr
  *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
  *  \throw If \a renumArr has an invalid size.
  */
-void MEDFileUMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr)
+void MEDFileUMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr)
 {
   if(meshDimRelToMaxExt==1)
     {
@@ -5486,7 +5487,7 @@ void MEDFileUMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiCha
   return _ms[traducedRk]->setNameArr(nameArr);
 }
 
-void MEDFileUMesh::setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayInt *globalNumArr)
+void MEDFileUMesh::setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr)
 {
   if(meshDimRelToMaxExt!=1)
     throw INTERP_KERNEL::Exception("MEDFileUMesh::setGlobalNumFieldAtLevel : Only implemented for meshDimRelToMaxExt==1 for the moment !");
@@ -5505,9 +5506,9 @@ void MEDFileUMesh::synchronizeTinyInfoOnLeaves() const
 /*!
  * This method is called by MEDFileMesh::changeFamilyId. It performs only one part of the family id modification.
  */
-void MEDFileUMesh::changeFamilyIdArr(int oldId, int newId)
+void MEDFileUMesh::changeFamilyIdArr(mcIdType oldId, mcIdType newId)
 {
-  DataArrayInt *arr=_fam_coords;
+  DataArrayIdType *arr=_fam_coords;
   if(arr)
     arr->changeValue(oldId,newId);
   for(std::vector< MCAuto<MEDFileUMeshSplitL1> >::iterator it=_ms.begin();it!=_ms.end();it++)
@@ -5520,12 +5521,12 @@ void MEDFileUMesh::changeFamilyIdArr(int oldId, int newId)
     }
 }
 
-std::list< MCAuto<DataArrayInt> > MEDFileUMesh::getAllNonNullFamilyIds() const
+std::list< MCAuto<DataArrayIdType> > MEDFileUMesh::getAllNonNullFamilyIds() const
 {
-  std::list< MCAuto<DataArrayInt> > ret;
-  const DataArrayInt *da(_fam_coords);
+  std::list< MCAuto<DataArrayIdType> > ret;
+  const DataArrayIdType *da(_fam_coords);
   if(da)
-    { da->incrRef(); ret.push_back(MCAuto<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+    { da->incrRef(); ret.push_back(MCAuto<DataArrayIdType>(const_cast<DataArrayIdType *>(da))); }
   for(std::vector< MCAuto<MEDFileUMeshSplitL1> >::const_iterator it=_ms.begin();it!=_ms.end();it++)
     {
       const MEDFileUMeshSplitL1 *elt(*it);
@@ -5533,7 +5534,7 @@ std::list< MCAuto<DataArrayInt> > MEDFileUMesh::getAllNonNullFamilyIds() const
         {
           da=elt->getFamilyField();
           if(da)
-            { da->incrRef(); ret.push_back(MCAuto<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+            { da->incrRef(); ret.push_back(MCAuto<DataArrayIdType>(const_cast<DataArrayIdType *>(da))); }
         }
     }
   return ret;
@@ -5543,8 +5544,8 @@ void MEDFileUMesh::computeRevNum() const
 {
   if(_num_coords.isNotNull())
     {
-      int pos;
-      int maxValue=_num_coords->getMaxValue(pos);
+      mcIdType pos;
+      mcIdType maxValue=_num_coords->getMaxValue(pos);
       _rev_num_coords=_num_coords->invertArrayN2O2O2N(maxValue+1);
     }
 }
@@ -5557,79 +5558,79 @@ std::size_t MEDFileStructuredMesh::getHeapMemorySizeWithoutChildren() const
 std::vector<const BigMemoryObject *> MEDFileStructuredMesh::getDirectChildrenWithNull() const
 {
   std::vector<const BigMemoryObject *> ret(MEDFileMesh::getDirectChildrenWithNull());
-  ret.push_back((const DataArrayInt *)_fam_nodes);
-  ret.push_back((const DataArrayInt *)_num_nodes);
+  ret.push_back((const DataArrayIdType *)_fam_nodes);
+  ret.push_back((const DataArrayIdType *)_num_nodes);
   ret.push_back((const DataArrayAsciiChar *)_names_nodes);
-  ret.push_back((const DataArrayInt *)_fam_cells);
-  ret.push_back((const DataArrayInt *)_num_cells);
+  ret.push_back((const DataArrayIdType *)_fam_cells);
+  ret.push_back((const DataArrayIdType *)_num_cells);
   ret.push_back((const DataArrayAsciiChar *)_names_cells);
-  ret.push_back((const DataArrayInt *)_fam_faces);
-  ret.push_back((const DataArrayInt *)_num_faces);
-  ret.push_back((const DataArrayInt *)_rev_num_nodes);
+  ret.push_back((const DataArrayIdType *)_fam_faces);
+  ret.push_back((const DataArrayIdType *)_num_faces);
+  ret.push_back((const DataArrayIdType *)_rev_num_nodes);
   ret.push_back((const DataArrayAsciiChar *)_names_faces);
-  ret.push_back((const DataArrayInt *)_rev_num_cells);
+  ret.push_back((const DataArrayIdType *)_rev_num_cells);
   ret.push_back((const MEDCoupling1SGTUMesh*)_faces_if_necessary);
   return ret;
 }
 
-int MEDFileStructuredMesh::getMaxAbsFamilyIdInArrays() const
+mcIdType MEDFileStructuredMesh::getMaxAbsFamilyIdInArrays() const
 {
-  int ret=-std::numeric_limits<int>::max(),tmp=-1;
-  if((const DataArrayInt *)_fam_nodes)
+  mcIdType ret=-std::numeric_limits<mcIdType>::max(),tmp=-1;
+  if((const DataArrayIdType *)_fam_nodes)
     {
-      int val=_fam_nodes->getMaxValue(tmp);
+      mcIdType val=_fam_nodes->getMaxValue(tmp);
       ret=std::max(ret,std::abs(val));
     }
-  if((const DataArrayInt *)_fam_cells)
+  if((const DataArrayIdType *)_fam_cells)
     {
-      int val=_fam_cells->getMaxValue(tmp);
+      mcIdType val=_fam_cells->getMaxValue(tmp);
       ret=std::max(ret,std::abs(val));
     }
-  if((const DataArrayInt *)_fam_faces)
+  if((const DataArrayIdType *)_fam_faces)
     {
-      int val=_fam_faces->getMaxValue(tmp);
+      mcIdType val=_fam_faces->getMaxValue(tmp);
       ret=std::max(ret,std::abs(val));
     }
   return ret;
 }
 
-int MEDFileStructuredMesh::getMaxFamilyIdInArrays() const
+mcIdType MEDFileStructuredMesh::getMaxFamilyIdInArrays() const
 {
-  int ret=-std::numeric_limits<int>::max(),tmp=-1;
-  if((const DataArrayInt *)_fam_nodes)
+  mcIdType ret=-std::numeric_limits<mcIdType>::max(),tmp=-1;
+  if((const DataArrayIdType *)_fam_nodes)
     {
-      int val=_fam_nodes->getMaxValue(tmp);
+      mcIdType val=_fam_nodes->getMaxValue(tmp);
       ret=std::max(ret,val);
     }
-  if((const DataArrayInt *)_fam_cells)
+  if((const DataArrayIdType *)_fam_cells)
     {
-      int val=_fam_cells->getMaxValue(tmp);
+      mcIdType val=_fam_cells->getMaxValue(tmp);
       ret=std::max(ret,val);
     }
-  if((const DataArrayInt *)_fam_faces)
+  if((const DataArrayIdType *)_fam_faces)
     {
-      int val=_fam_faces->getMaxValue(tmp);
+      mcIdType val=_fam_faces->getMaxValue(tmp);
       ret=std::max(ret,val);
     }
   return ret;
 }
 
-int MEDFileStructuredMesh::getMinFamilyIdInArrays() const
+mcIdType MEDFileStructuredMesh::getMinFamilyIdInArrays() const
 {
-  int ret=std::numeric_limits<int>::max(),tmp=-1;
-  if((const DataArrayInt *)_fam_nodes)
+  mcIdType ret=std::numeric_limits<mcIdType>::max(),tmp=-1;
+  if((const DataArrayIdType *)_fam_nodes)
     {
-      int val=_fam_nodes->getMinValue(tmp);
+      mcIdType val=_fam_nodes->getMinValue(tmp);
       ret=std::min(ret,val);
     }
-  if((const DataArrayInt *)_fam_cells)
+  if((const DataArrayIdType *)_fam_cells)
     {
-      int val=_fam_cells->getMinValue(tmp);
+      mcIdType val=_fam_cells->getMinValue(tmp);
       ret=std::min(ret,val);
     }
-  if((const DataArrayInt *)_fam_faces)
+  if((const DataArrayIdType *)_fam_faces)
     {
-      int val=_fam_faces->getMinValue(tmp);
+      mcIdType val=_fam_faces->getMinValue(tmp);
       ret=std::min(ret,val);
     }
   return ret;
@@ -5645,8 +5646,8 @@ bool MEDFileStructuredMesh::isEqual(const MEDFileMesh *other, double eps, std::s
       what="Mesh types differ ! This is structured and other is NOT !";
       return false;
     }
-  const DataArrayInt *famc1=_fam_nodes;
-  const DataArrayInt *famc2=otherC->_fam_nodes;
+  const DataArrayIdType *famc1=_fam_nodes;
+  const DataArrayIdType *famc2=otherC->_fam_nodes;
   if((famc1==0 && famc2!=0) || (famc1!=0 && famc2==0))
     {
       what="Mismatch of families arr on nodes ! One is defined and not other !";
@@ -5795,24 +5796,24 @@ bool MEDFileStructuredMesh::isEqual(const MEDFileMesh *other, double eps, std::s
 void MEDFileStructuredMesh::clearNonDiscrAttributes() const
 {
   MEDFileMesh::clearNonDiscrAttributes();
-  const DataArrayInt *tmp=_fam_nodes;
+  const DataArrayIdType *tmp=_fam_nodes;
   if(tmp)
-    (const_cast<DataArrayInt *>(tmp))->setName("");
+    (const_cast<DataArrayIdType *>(tmp))->setName("");
   tmp=_num_nodes;
   if(tmp)
-    (const_cast<DataArrayInt *>(tmp))->setName("");
+    (const_cast<DataArrayIdType *>(tmp))->setName("");
   tmp=_fam_cells;
   if(tmp)
-    (const_cast<DataArrayInt *>(tmp))->setName("");
+    (const_cast<DataArrayIdType *>(tmp))->setName("");
   tmp=_num_cells;
   if(tmp)
-    (const_cast<DataArrayInt *>(tmp))->setName("");
+    (const_cast<DataArrayIdType *>(tmp))->setName("");
   tmp=_fam_faces;
   if(tmp)
-    (const_cast<DataArrayInt *>(tmp))->setName("");
+    (const_cast<DataArrayIdType *>(tmp))->setName("");
   tmp=_num_faces;
   if(tmp)
-    (const_cast<DataArrayInt *>(tmp))->setName("");
+    (const_cast<DataArrayIdType *>(tmp))->setName("");
 }
 
 /*!
@@ -5822,21 +5823,21 @@ void MEDFileStructuredMesh::clearNonDiscrAttributes() const
  *  \param [in] fams - the names of the families of interest.
  *  \param [in] renum - if \c true, the optional numbers of entities, if available, are
  *          returned instead of ids.
- *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
+ *  \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or
  *          numbers, if available and required, of mesh entities of the families. The caller
  *          is to delete this array using decrRef() as it is no more needed. 
  *  \throw If the family field is missing for \a meshDimRelToMaxExt.
  */
-DataArrayInt *MEDFileStructuredMesh::getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum) const
+DataArrayIdType *MEDFileStructuredMesh::getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum) const
 {
-  std::vector<int> famIds(getFamiliesIds(fams));
+  std::vector<mcIdType> famIds(getFamiliesIds(fams));
   switch(meshDimRelToMaxExt)
   {
     case 1:
       {
-        if((const DataArrayInt *)_fam_nodes)
+        if((const DataArrayIdType *)_fam_nodes)
           {
-            MCAuto<DataArrayInt> da;
+            MCAuto<DataArrayIdType> da;
             if(!famIds.empty())
               da=_fam_nodes->findIdsEqualList(&famIds[0],&famIds[0]+famIds.size());
             else
@@ -5852,9 +5853,9 @@ DataArrayInt *MEDFileStructuredMesh::getFamiliesArr(int meshDimRelToMaxExt, cons
       }
     case 0:
       {
-        if((const DataArrayInt *)_fam_cells)
+        if((const DataArrayIdType *)_fam_cells)
           {
-            MCAuto<DataArrayInt> da;
+            MCAuto<DataArrayIdType> da;
             if(!famIds.empty())
               da=_fam_cells->findIdsEqualList(&famIds[0],&famIds[0]+famIds.size());
             else
@@ -5870,9 +5871,9 @@ DataArrayInt *MEDFileStructuredMesh::getFamiliesArr(int meshDimRelToMaxExt, cons
       }
     case -1:
       {
-        if((const DataArrayInt *)_fam_faces)
+        if((const DataArrayIdType *)_fam_faces)
           {
-            MCAuto<DataArrayInt> da;
+            MCAuto<DataArrayIdType> da;
             if(!famIds.empty())
               da=_fam_faces->findIdsEqualList(&famIds[0],&famIds[0]+famIds.size());
             else
@@ -5901,7 +5902,7 @@ DataArrayInt *MEDFileStructuredMesh::getFamiliesArr(int meshDimRelToMaxExt, cons
  *  \throw If \a famArr has an invalid size.
  *  \throw If \a meshDimRelToMaxExt != 0 and \a meshDimRelToMaxExt != 1 and \a meshDimRelToMaxExt != -1.
  */
-void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr)
+void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr)
 {
   const MEDCouplingStructuredMesh *mesh(getStructuredMesh());
   if(!mesh)
@@ -5910,7 +5911,7 @@ void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayI
   {
     case 0:
       {
-        int nbCells(mesh->getNumberOfCells());
+        mcIdType nbCells(mesh->getNumberOfCells());
         if(famArr)
           famArr->checkNbOfTuplesAndComp(nbCells,1,"MEDFileStructuredMesh::setFamilyFieldArr : Problem in size of Family arr ! Mismatch with number of cells of mesh !");
         _fam_cells=famArr;
@@ -5918,7 +5919,7 @@ void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayI
       }
     case 1:
       {
-        int nbNodes(mesh->getNumberOfNodes());
+        mcIdType nbNodes(mesh->getNumberOfNodes());
         if(famArr)
           famArr->checkNbOfTuplesAndComp(nbNodes,1,"MEDFileStructuredMesh::setFamilyFieldArr : Problem in size of Family arr ! Mismatch with number of nodes of mesh !");
         _fam_nodes=famArr;
@@ -5926,7 +5927,7 @@ void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayI
       }
     case -1:
       {
-        int nbCells(mesh->getNumberOfCellsOfSubLevelMesh());
+        mcIdType nbCells(mesh->getNumberOfCellsOfSubLevelMesh());
         if(famArr)
           famArr->checkNbOfTuplesAndComp(nbCells,1,"MEDFileStructuredMesh::setFamilyFieldArr : Problem in size of Family arr ! Mismatch with number of faces of mesh !");
         _fam_faces=famArr;
@@ -5947,7 +5948,7 @@ void MEDFileStructuredMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayI
  *  \throw If \a renumArr has an invalid size.
  *  \throw If \a meshDimRelToMaxExt != 0 and \a meshDimRelToMaxExt != 1.
  */
-void MEDFileStructuredMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr)
+void MEDFileStructuredMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr)
 {
   const MEDCouplingStructuredMesh *mesh=getStructuredMesh();
   if(!mesh)
@@ -5956,21 +5957,21 @@ void MEDFileStructuredMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIn
   {
     case 0:
       {
-        int nbCells=mesh->getNumberOfCells();
+        mcIdType nbCells=mesh->getNumberOfCells();
         renumArr->checkNbOfTuplesAndComp(nbCells,1,"MEDFileStructuredMesh::setRenumFieldArr : Problem in size of Renum arr ! Mismatch with number of cells of mesh !");
         _num_cells=renumArr;
         break;
       }
     case 1:
       {
-        int nbNodes=mesh->getNumberOfNodes();
+        mcIdType nbNodes=mesh->getNumberOfNodes();
         renumArr->checkNbOfTuplesAndComp(nbNodes,1,"MEDFileStructuredMesh::setRenumFieldArr : Problem in size of Family arr ! Mismatch with number of nodes of mesh !");
         _num_nodes=renumArr;
         break;
       }
     case -1:
       {
-        int nbCells=mesh->getNumberOfCellsOfSubLevelMesh();
+        mcIdType nbCells=mesh->getNumberOfCellsOfSubLevelMesh();
         renumArr->checkNbOfTuplesAndComp(nbCells,1,"MEDFileStructuredMesh::setRenumFieldArr : Problem in size of Renum arr ! Mismatch with number of faces of mesh !");
         _num_faces=renumArr;
         break;
@@ -5998,21 +5999,21 @@ void MEDFileStructuredMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArra
   {
     case 0:
       {
-        int nbCells=mesh->getNumberOfCells();
+        mcIdType nbCells=mesh->getNumberOfCells();
         nameArr->checkNbOfTuplesAndComp(nbCells,MED_SNAME_SIZE,"MEDFileStructuredMesh::setNameFieldAtLevel : Problem in size of names arr ! Mismatch with number of cells of mesh !");
         _names_cells=nameArr;
         break;
       }
     case 1:
       {
-        int nbNodes=mesh->getNumberOfNodes();
+        mcIdType nbNodes=mesh->getNumberOfNodes();
         nameArr->checkNbOfTuplesAndComp(nbNodes,MED_SNAME_SIZE,"MEDFileStructuredMesh::setNameFieldAtLevel : Problem in size of names arr ! Mismatch with number of nodes of mesh !");
         _names_nodes=nameArr;
         break;
       }
     case -1:
       {
-        int nbCells=mesh->getNumberOfCellsOfSubLevelMesh();
+        mcIdType nbCells=mesh->getNumberOfCellsOfSubLevelMesh();
         nameArr->checkNbOfTuplesAndComp(nbCells,MED_SNAME_SIZE,"MEDFileStructuredMesh::setNameFieldAtLevel : Problem in size of names arr ! Mismatch with number of faces of mesh !");
         _names_faces=nameArr;
       }
@@ -6023,14 +6024,14 @@ void MEDFileStructuredMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArra
     nameArr->incrRef();
 }
 
-void MEDFileStructuredMesh::setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayInt *globalNumArr)
+void MEDFileStructuredMesh::setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr)
 {
   throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::setGlobalNumFieldAtLevel : not implemented yet !");
 }
 
 /*!
  * Adds a group of nodes to \a this mesh.
- *  \param [in] ids - a DataArrayInt providing ids and a name of the group to add.
+ *  \param [in] ids - a DataArrayIdType providing ids and a name of the group to add.
  *          The ids should be sorted and different each other (MED file norm).
  *
  *  \warning this method can alter default "FAMILLE_ZERO" family.
@@ -6042,7 +6043,7 @@ void MEDFileStructuredMesh::setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, Dat
  *  \throw If \a ids does not respect the MED file norm.
  *  \throw If a group with name \a ids->getName() already exists.
  */
-void MEDFileStructuredMesh::addNodeGroup(const DataArrayInt *ids)
+void MEDFileStructuredMesh::addNodeGroup(const DataArrayIdType *ids)
 {
   addGroup(1,ids);
 }
@@ -6050,7 +6051,7 @@ void MEDFileStructuredMesh::addNodeGroup(const DataArrayInt *ids)
 /*!
  * Adds a group of nodes/cells/faces/edges to \a this mesh.
  *
- *  \param [in] ids - a DataArrayInt providing ids and a name of the group to add.
+ *  \param [in] ids - a DataArrayIdType providing ids and a name of the group to add.
  *          The ids should be sorted and different each other (MED file norm).
  *
  * \warning this method can alter default "FAMILLE_ZERO" family.
@@ -6062,9 +6063,9 @@ void MEDFileStructuredMesh::addNodeGroup(const DataArrayInt *ids)
  *  \throw If \a ids does not respect the MED file norm.
  *  \throw If a group with name \a ids->getName() already exists.
  */
-void MEDFileStructuredMesh::addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids)
+void MEDFileStructuredMesh::addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids)
 {
-  DataArrayInt *fam(getOrCreateAndGetFamilyFieldAtLevel(meshDimRelToMaxExt));
+  DataArrayIdType *fam(getOrCreateAndGetFamilyFieldAtLevel(meshDimRelToMaxExt));
   addGroupUnderground(false,ids,fam);
   return ;
 }
@@ -6072,11 +6073,11 @@ void MEDFileStructuredMesh::addGroup(int meshDimRelToMaxExt, const DataArrayInt
 /*!
  * Returns the family field for mesh entities of a given dimension.
  *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
- *  \return const DataArrayInt * - the family field. It is an array of ids of families
+ *  \return const DataArrayIdType * - the family field. It is an array of ids of families
  *          each mesh entity belongs to. It can be \c NULL.
  *  \throw If \a meshDimRelToMaxExt != 0 and \a meshDimRelToMaxExt != 1.
  */
-const DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const
+const DataArrayIdType *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const
 {
   switch(meshDimRelToMaxExt)
   {
@@ -6094,11 +6095,11 @@ const DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelT
 /*!
  * Returns the family field for mesh entities of a given dimension.
  *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
- *  \return const DataArrayInt * - the family field. It is an array of ids of families
+ *  \return const DataArrayIdType * - the family field. It is an array of ids of families
  *          each mesh entity belongs to. It can be \c NULL.
  *  \throw If \a meshDimRelToMaxExt != 0 and \a meshDimRelToMaxExt != 1.
  */
-DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
+DataArrayIdType *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt)
 {
   switch(meshDimRelToMaxExt)
   {
@@ -6116,11 +6117,11 @@ DataArrayInt *MEDFileStructuredMesh::getFamilyFieldAtLevel(int meshDimRelToMaxEx
 /*!
  * Returns the optional numbers of mesh entities of a given dimension.
  *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
- *  \return const DataArrayInt * - the array of the entity numbers.
+ *  \return const DataArrayIdType * - the array of the entity numbers.
  *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
  *  \throw If \a meshDimRelToMaxExt != 0 and \a meshDimRelToMaxExt != 1.
  */
-const DataArrayInt *MEDFileStructuredMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const
+const DataArrayIdType *MEDFileStructuredMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const
 {
   switch(meshDimRelToMaxExt)
   {
@@ -6137,23 +6138,23 @@ const DataArrayInt *MEDFileStructuredMesh::getNumberFieldAtLevel(int meshDimRelT
 
 /*!
  * Returns the optional numbers of mesh entities of a given dimension transformed using
- * DataArrayInt::invertArrayN2O2O2N().
+ * DataArrayIdType::invertArrayN2O2O2N().
  *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
- *  \return const DataArrayInt * - the array of the entity numbers transformed using
- *          DataArrayInt::invertArrayN2O2O2N().
+ *  \return const DataArrayIdType * - the array of the entity numbers transformed using
+ *          DataArrayIdType::invertArrayN2O2O2N().
  *  \throw If \a meshDimRelToMaxExt != 0 and \a meshDimRelToMaxExt != 1.
  *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
  */
-const DataArrayInt *MEDFileStructuredMesh::getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const
+const DataArrayIdType *MEDFileStructuredMesh::getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const
 {
   if(meshDimRelToMaxExt!=0 && meshDimRelToMaxExt!=1)
     throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getRevNumberFieldAtLevel : Only available for levels 0 or 1 !");
   if(meshDimRelToMaxExt==0)
     {
-      if((const DataArrayInt *)_num_cells)
+      if((const DataArrayIdType *)_num_cells)
         {
-          int pos;
-          int maxValue=_num_cells->getMaxValue(pos);
+          mcIdType pos;
+          mcIdType maxValue=_num_cells->getMaxValue(pos);
           _rev_num_cells=_num_cells->invertArrayN2O2O2N(maxValue+1);
           return _rev_num_cells;
         }
@@ -6162,10 +6163,10 @@ const DataArrayInt *MEDFileStructuredMesh::getRevNumberFieldAtLevel(int meshDimR
     }
   else
     {
-      if((const DataArrayInt *)_num_nodes)
+      if((const DataArrayIdType *)_num_nodes)
         {
-          int pos;
-          int maxValue=_num_nodes->getMaxValue(pos);
+          mcIdType pos;
+          mcIdType maxValue=_num_nodes->getMaxValue(pos);
           _rev_num_nodes=_num_nodes->invertArrayN2O2O2N(maxValue+1);
           return _rev_num_nodes;
         }
@@ -6189,7 +6190,7 @@ const DataArrayAsciiChar *MEDFileStructuredMesh::getNameFieldAtLevel(int meshDim
   }
 }
 
-MCAuto<DataArrayInt> MEDFileStructuredMesh::getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const
+MCAuto<DataArrayIdType> MEDFileStructuredMesh::getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const
 {
   throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getGlobalNumFieldAtLevel : not implemented yet for structured mesh !");
 }
@@ -6221,7 +6222,7 @@ std::vector<int> MEDFileStructuredMesh::getNonEmptyLevelsExt() const
 std::vector<int> MEDFileStructuredMesh::getFamArrNonEmptyLevelsExt() const
 {
   std::vector<int> ret;
-  const DataArrayInt *famNodes(_fam_nodes),*famCells(_fam_cells),*famFaces(_fam_faces);
+  const DataArrayIdType *famNodes(_fam_nodes),*famCells(_fam_cells),*famFaces(_fam_faces);
   if(famNodes)
     ret.push_back(1);
   if(famCells)
@@ -6237,7 +6238,7 @@ std::vector<int> MEDFileStructuredMesh::getFamArrNonEmptyLevelsExt() const
 std::vector<int> MEDFileStructuredMesh::getNumArrNonEmptyLevelsExt() const
 {
   std::vector<int> ret;
-  const DataArrayInt *numNodes(_num_nodes),*numCells(_num_cells),*numFaces(_num_faces);
+  const DataArrayIdType *numNodes(_num_nodes),*numCells(_num_cells),*numFaces(_num_faces);
   if(numNodes)
     ret.push_back(1);
   if(numCells)
@@ -6266,15 +6267,15 @@ std::vector<int> MEDFileStructuredMesh::getNameArrNonEmptyLevelsExt() const
 /*!
  * no implementation here, it is not a bug, but intresically no polyhedra in \a this.
  */
-bool MEDFileStructuredMesh::unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell)
+bool MEDFileStructuredMesh::unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell)
 {
   oldCode.clear(); newCode.clear(); o2nRenumCell=0;
   return false;
 }
 
-void MEDFileStructuredMesh::changeFamilyIdArr(int oldId, int newId)
+void MEDFileStructuredMesh::changeFamilyIdArr(mcIdType oldId, mcIdType newId)
 {
-  DataArrayInt *arr=_fam_nodes;
+  DataArrayIdType *arr=_fam_nodes;
   if(arr)
     arr->changeValue(oldId,newId);
   arr=_fam_cells;
@@ -6285,44 +6286,44 @@ void MEDFileStructuredMesh::changeFamilyIdArr(int oldId, int newId)
     arr->changeValue(oldId,newId);
 }
 
-std::list< MCAuto<DataArrayInt> > MEDFileStructuredMesh::getAllNonNullFamilyIds() const
+std::list< MCAuto<DataArrayIdType> > MEDFileStructuredMesh::getAllNonNullFamilyIds() const
 {
-  std::list< MCAuto<DataArrayInt> > ret;
-  const DataArrayInt *da(_fam_nodes);
+  std::list< MCAuto<DataArrayIdType> > ret;
+  const DataArrayIdType *da(_fam_nodes);
   if(da)
-    { da->incrRef(); ret.push_back(MCAuto<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+    { da->incrRef(); ret.push_back(MCAuto<DataArrayIdType>(const_cast<DataArrayIdType *>(da))); }
   da=_fam_cells;
   if(da)
-    { da->incrRef(); ret.push_back(MCAuto<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+    { da->incrRef(); ret.push_back(MCAuto<DataArrayIdType>(const_cast<DataArrayIdType *>(da))); }
   da=_fam_faces;
   if(da)
-    { da->incrRef(); ret.push_back(MCAuto<DataArrayInt>(const_cast<DataArrayInt *>(da))); }
+    { da->incrRef(); ret.push_back(MCAuto<DataArrayIdType>(const_cast<DataArrayIdType *>(da))); }
   return ret;
 }
 
 void MEDFileStructuredMesh::deepCpyAttributes()
 {
-  if((const DataArrayInt*)_fam_nodes)
+  if((const DataArrayIdType*)_fam_nodes)
     _fam_nodes=_fam_nodes->deepCopy();
-  if((const DataArrayInt*)_num_nodes)
+  if((const DataArrayIdType*)_num_nodes)
     _num_nodes=_num_nodes->deepCopy();
   if((const DataArrayAsciiChar*)_names_nodes)
     _names_nodes=_names_nodes->deepCopy();
-  if((const DataArrayInt*)_fam_cells)
+  if((const DataArrayIdType*)_fam_cells)
     _fam_cells=_fam_cells->deepCopy();
-  if((const DataArrayInt*)_num_cells)
+  if((const DataArrayIdType*)_num_cells)
     _num_cells=_num_cells->deepCopy();
   if((const DataArrayAsciiChar*)_names_cells)
     _names_cells=_names_cells->deepCopy();
-  if((const DataArrayInt*)_fam_faces)
+  if((const DataArrayIdType*)_fam_faces)
     _fam_faces=_fam_faces->deepCopy();
-  if((const DataArrayInt*)_num_faces)
+  if((const DataArrayIdType*)_num_faces)
     _num_faces=_num_faces->deepCopy();
   if((const DataArrayAsciiChar*)_names_faces)
     _names_faces=_names_faces->deepCopy();
-  if((const DataArrayInt*)_rev_num_nodes)
+  if((const DataArrayIdType*)_rev_num_nodes)
     _rev_num_nodes=_rev_num_nodes->deepCopy();
-  if((const DataArrayInt*)_rev_num_cells)
+  if((const DataArrayIdType*)_rev_num_cells)
     _rev_num_cells=_rev_num_cells->deepCopy();
 }
 
@@ -6369,10 +6370,10 @@ MEDCouplingMesh *MEDFileStructuredMesh::getMeshAtLevel(int meshDimRelToMax, bool
   }
 }
 
-std::vector<int> MEDFileStructuredMesh::getFamsNonEmptyLevels(const std::vector<std::string>& fams) const
+std::vector<mcIdType> MEDFileStructuredMesh::getFamsNonEmptyLevels(const std::vector<std::string>& fams) const
 {
-  std::vector<int> ret;
-  const DataArrayInt *famCells(_fam_cells),*famFaces(_fam_faces);
+  std::vector<mcIdType> ret;
+  const DataArrayIdType *famCells(_fam_cells),*famFaces(_fam_faces);
   if(famCells && famCells->presenceOfValue(ret))
     ret.push_back(0);
   if(famFaces && famFaces->presenceOfValue(ret))
@@ -6380,10 +6381,10 @@ std::vector<int> MEDFileStructuredMesh::getFamsNonEmptyLevels(const std::vector<
   return ret;  
 }
 
-std::vector<int> MEDFileStructuredMesh::getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const
+std::vector<mcIdType> MEDFileStructuredMesh::getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const
 {
-  std::vector<int> ret(getFamsNonEmptyLevels(fams));
-  const DataArrayInt *famNodes(_fam_nodes);
+  std::vector<mcIdType> ret(getFamsNonEmptyLevels(fams));
+  const DataArrayIdType *famNodes(_fam_nodes);
   if(famNodes && famNodes->presenceOfValue(ret))
     ret.push_back(1);
   return ret;  
@@ -6392,10 +6393,10 @@ std::vector<int> MEDFileStructuredMesh::getFamsNonEmptyLevelsExt(const std::vect
 /*!
  * Returns number of mesh entities of a given relative dimension in \a this mesh.
  *  \param [in] meshDimRelToMaxExt - the relative dimension of interest.
- *  \return int - the number of entities.
+ *  \return mcIdType - the number of entities.
  *  \throw If no mesh entities of dimension \a meshDimRelToMaxExt are available in \a this mesh.
  */
-int MEDFileStructuredMesh::getSizeAtLevel(int meshDimRelToMaxExt) const
+mcIdType MEDFileStructuredMesh::getSizeAtLevel(int meshDimRelToMaxExt) const
 {
   const MEDCouplingStructuredMesh *cmesh(getStructuredMesh());
   if(!cmesh)
@@ -6413,7 +6414,7 @@ int MEDFileStructuredMesh::getSizeAtLevel(int meshDimRelToMaxExt) const
   }
 }
 
-int MEDFileStructuredMesh::getNumberOfNodes() const
+mcIdType MEDFileStructuredMesh::getNumberOfNodes() const
 {
   const MEDCouplingStructuredMesh *cmesh(getStructuredMesh());
   if(!cmesh)
@@ -6421,7 +6422,7 @@ int MEDFileStructuredMesh::getNumberOfNodes() const
   return cmesh->getNumberOfNodes();
 }
 
-int MEDFileStructuredMesh::getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const
+mcIdType MEDFileStructuredMesh::getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const
 {
   const MEDCouplingStructuredMesh *cmesh(getStructuredMesh());
   if(!cmesh)
@@ -6445,7 +6446,7 @@ bool MEDFileStructuredMesh::hasImplicitPart() const
 /*!
  * \sa MEDFileStructuredMesh::getImplicitFaceMesh
  */
-int MEDFileStructuredMesh::buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const
+mcIdType MEDFileStructuredMesh::buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const
 {
   static const char MSG[]="MEDFileStructuredMesh::buildImplicitPartIfAny : the given geo type is not manageable by a structured mesh !";
   const MEDCoupling1SGTUMesh *zeFaceMesh(_faces_if_necessary);
@@ -6522,7 +6523,7 @@ std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileStructuredMesh::getGeoType
   }
 }
 
-int MEDFileStructuredMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
+mcIdType MEDFileStructuredMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
 {
   if(ct!=MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(getMeshDimension()))
     return 0;
@@ -6536,21 +6537,21 @@ void MEDFileStructuredMesh::whichAreNodesFetched(const MEDFileField1TSStructItem
     throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::whichAreNodesFetched : The sturture of field is not lying on single geo type ! it is not managed yet for structured mesh !");
   if(st[0].getGeo()!=MEDCouplingStructuredMesh::GetGeoTypeGivenMeshDimension(getMeshDimension()))
     throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::whichAreNodesFetched : The sturture of field is not lying on expected geo type !");
-  if(getNumberOfNodes()!=(int)nodesFetched.size())
+  if(getNumberOfNodes()!=(mcIdType)nodesFetched.size())
     throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::whichAreNodesFetched : invalid size of array !");
   if(st[0].getPflName().empty())
     {
       std::fill(nodesFetched.begin(),nodesFetched.end(),true);
       return ;
     }
-  const DataArrayInt *arr(globs->getProfile(st[0].getPflName()));
+  const DataArrayIdType *arr(globs->getProfile(st[0].getPflName()));
   const MEDCouplingStructuredMesh *cmesh=getStructuredMesh();//cmesh not null because getNumberOfNodes called before
-  int sz(nodesFetched.size());
-  for(const int *work=arr->begin();work!=arr->end();work++)
+  mcIdType sz(ToIdType(nodesFetched.size()));
+  for(const mcIdType *work=arr->begin();work!=arr->end();work++)
     {
-      std::vector<int> conn;
+      std::vector<mcIdType> conn;
       cmesh->getNodeIdsOfCell(*work,conn);
-      for(std::vector<int>::const_iterator it=conn.begin();it!=conn.end();it++)
+      for(std::vector<mcIdType>::const_iterator it=conn.begin();it!=conn.end();it++)
         if(*it>=0 && *it<sz)
           nodesFetched[*it]=true;
         else
@@ -6565,19 +6566,20 @@ med_geometry_type MEDFileStructuredMesh::GetGeoTypeFromMeshDim(int meshDim)
 }
 
 void MEDFileStructuredMesh::LoadStrMeshDAFromFile(med_idt fid, int meshDim, int dt, int it, const std::string& mName, MEDFileMeshReadSelector *mrs,
-                                                  MCAuto<DataArrayInt>& famCells, MCAuto<DataArrayInt>& numCells, MCAuto<DataArrayAsciiChar>& namesCells)
+                                                  MCAuto<DataArrayIdType>& famCells, MCAuto<DataArrayIdType>& numCells, MCAuto<DataArrayAsciiChar>& namesCells)
 {
   med_bool chgt=MED_FALSE,trsf=MED_FALSE;
   med_geometry_type geoTypeReq=MEDFileStructuredMesh::GetGeoTypeFromMeshDim(meshDim);
-  int nbOfElt(0);
+  mcIdType nbOfElt(0);
   nbOfElt=MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_CELL,geoTypeReq,MED_FAMILY_NUMBER,MED_NODAL,&chgt,&trsf);
   if(nbOfElt>0)
     {
       if(!mrs || mrs->isCellFamilyFieldReading())
         {
-          famCells=DataArrayInt::New();
-          famCells->alloc(nbOfElt,1);
-          MEDFILESAFECALLERRD0(MEDmeshEntityFamilyNumberRd,(fid,mName.c_str(),dt,it,MED_CELL,geoTypeReq,famCells->getPointer()));
+          MCAuto<DataArrayMedInt> miFamCells=DataArrayMedInt::New();
+          miFamCells->alloc(nbOfElt,1);
+          MEDFILESAFECALLERRD0(MEDmeshEntityFamilyNumberRd,(fid,mName.c_str(),dt,it,MED_CELL,geoTypeReq,miFamCells->getPointer()));
+          famCells = FromMedIntArray<mcIdType>( miFamCells );
         }
     }
   nbOfElt=MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_CELL,geoTypeReq,MED_NUMBER,MED_NODAL,&chgt,&trsf);
@@ -6585,9 +6587,10 @@ void MEDFileStructuredMesh::LoadStrMeshDAFromFile(med_idt fid, int meshDim, int
     {
       if(!mrs || mrs->isCellNumFieldReading())
         {
-          numCells=DataArrayInt::New();
-          numCells->alloc(nbOfElt,1);
-          MEDFILESAFECALLERRD0(MEDmeshEntityNumberRd,(fid,mName.c_str(),dt,it,MED_CELL,geoTypeReq,numCells->getPointer()));
+          MCAuto<DataArrayMedInt> miNumCells=DataArrayMedInt::New();
+          miNumCells->alloc(nbOfElt,1);
+          MEDFILESAFECALLERRD0(MEDmeshEntityNumberRd,(fid,mName.c_str(),dt,it,MED_CELL,geoTypeReq,miNumCells->getPointer()));
+          numCells = FromMedIntArray<mcIdType>( miNumCells );
         }
     }
   nbOfElt=MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_CELL,geoTypeReq,MED_NAME,MED_NODAL,&chgt,&trsf);
@@ -6614,19 +6617,20 @@ void MEDFileStructuredMesh::loadStrMeshFromFile(MEDFileStrMeshL2 *strm, med_idt
   setTimeUnit(strm->getTimeUnit());
   MEDFileMeshL2::ReadFamiliesAndGrps(fid,mName,_families,_groups,mrs);
   med_bool chgt=MED_FALSE,trsf=MED_FALSE;
-  int nbOfElt(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_FAMILY_NUMBER,MED_NODAL,&chgt,&trsf));
+  mcIdType nbOfElt(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_FAMILY_NUMBER,MED_NODAL,&chgt,&trsf));
   if(nbOfElt>0)
     {
       if(!mrs || mrs->isNodeFamilyFieldReading())
         {
-          int nbNodes(getNumberOfNodes());
+          mcIdType nbNodes(getNumberOfNodes());
           if(nbOfElt>nbNodes)
             throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::loadStrMeshFromFile : invalid size of family node array regarding number of nodes in this ! File seems to be corrupted !");
-          _fam_nodes=DataArrayInt::New();
-          _fam_nodes->alloc(nbNodes,1);//yes nbNodes and not nbOfElt see next line.
+          MCAuto<DataArrayMedInt> miFamNodes=DataArrayMedInt::New();
+          miFamNodes->alloc(nbNodes,1);//yes nbNodes and not nbOfElt see next line.
           if(nbNodes>nbOfElt)//yes it appends some times... It explains surely the mdump implementation. Bug revealed by PARAVIS EDF #2475 on structured.med file where only 12 first nodes are !=0 so nbOfElt=12 and nbOfNodes=378...
-            _fam_nodes->fillWithZero();
-          MEDFILESAFECALLERRD0(MEDmeshEntityFamilyNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,_fam_nodes->getPointer()));
+            miFamNodes->fillWithZero();
+          MEDFILESAFECALLERRD0(MEDmeshEntityFamilyNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,miFamNodes->getPointer()));
+          _fam_nodes = FromMedIntArray<mcIdType>( miFamNodes );
         }
     }
   nbOfElt=MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_NUMBER,MED_NODAL,&chgt,&trsf);
@@ -6634,9 +6638,10 @@ void MEDFileStructuredMesh::loadStrMeshFromFile(MEDFileStrMeshL2 *strm, med_idt
     {
       if(!mrs || mrs->isNodeNumFieldReading())
         {
-          _num_nodes=DataArrayInt::New();
-          _num_nodes->alloc(nbOfElt,1);
-          MEDFILESAFECALLERRD0(MEDmeshEntityNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,_num_nodes->getPointer()));
+          MCAuto<DataArrayMedInt> miNumNodes=DataArrayMedInt::New();
+          miNumNodes->alloc(nbOfElt,1);
+          MEDFILESAFECALLERRD0(MEDmeshEntityNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,miNumNodes->getPointer()));
+          _num_nodes = FromMedIntArray<mcIdType>( miNumNodes );
         }
     }
   nbOfElt=MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_NAME,MED_NODAL,&chgt,&trsf);
@@ -6661,18 +6666,18 @@ void MEDFileStructuredMesh::writeStructuredLL(med_idt fid, const std::string& ma
   int meshDim(getStructuredMesh()->getMeshDimension());
   med_geometry_type geoTypeReq(GetGeoTypeFromMeshDim(meshDim)),geoTypeReq2(GetGeoTypeFromMeshDim(meshDim-1));
   //
-  if((const DataArrayInt *)_fam_cells)
-    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq,_fam_cells->getNumberOfTuples(),_fam_cells->getConstPointer()));
-  if((const DataArrayInt *)_fam_faces)
-    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq2,_fam_faces->getNumberOfTuples(),_fam_faces->getConstPointer()));
-  if((const DataArrayInt *)_fam_nodes)
-    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,maa.c_str(),_iteration,_order,MED_NODE,MED_NONE,_fam_nodes->getNumberOfTuples(),_fam_nodes->getConstPointer()));
-  if((const DataArrayInt *)_num_cells)
-    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq,_num_cells->getNumberOfTuples(),_num_cells->getConstPointer()));
-  if((const DataArrayInt *)_num_faces)
-    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq2,_num_faces->getNumberOfTuples(),_num_faces->getConstPointer()));
-  if((const DataArrayInt *)_num_nodes)
-    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,maa.c_str(),_iteration,_order,MED_NODE,MED_NONE,_num_nodes->getNumberOfTuples(),_num_nodes->getConstPointer()));
+  if((const DataArrayIdType *)_fam_cells)
+    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq,ToMedInt(_fam_cells->getNumberOfTuples()),ToMedIntArray(_fam_cells)->getConstPointer()));
+  if((const DataArrayIdType *)_fam_faces)
+    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq2,ToMedInt(_fam_faces->getNumberOfTuples()),ToMedIntArray(_fam_faces)->getConstPointer()));
+  if((const DataArrayIdType *)_fam_nodes)
+    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,maa.c_str(),_iteration,_order,MED_NODE,MED_NONE,ToMedInt(_fam_nodes->getNumberOfTuples()),ToMedIntArray(_fam_nodes)->getConstPointer()));
+  if((const DataArrayIdType *)_num_cells)
+    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq,ToMedInt(_num_cells->getNumberOfTuples()),ToMedIntArray(_num_cells)->getConstPointer()));
+  if((const DataArrayIdType *)_num_faces)
+    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq2,ToMedInt(_num_faces->getNumberOfTuples()),ToMedIntArray(_num_faces)->getConstPointer()));
+  if((const DataArrayIdType *)_num_nodes)
+    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,maa.c_str(),_iteration,_order,MED_NODE,MED_NONE,ToMedInt(_num_nodes->getNumberOfTuples()),ToMedIntArray(_num_nodes)->getConstPointer()));
   if((const DataArrayAsciiChar *)_names_cells)
     {
       if(_names_cells->getNumberOfComponents()!=MED_SNAME_SIZE)
@@ -6681,7 +6686,7 @@ void MEDFileStructuredMesh::writeStructuredLL(med_idt fid, const std::string& ma
           oss << " ! The array has " << _names_cells->getNumberOfComponents() << " components !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq,_names_cells->getNumberOfTuples(),_names_cells->getConstPointer()));
+      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq,ToMedInt(_names_cells->getNumberOfTuples()),_names_cells->getConstPointer()));
     }
   if((const DataArrayAsciiChar *)_names_faces)
     {
@@ -6691,7 +6696,7 @@ void MEDFileStructuredMesh::writeStructuredLL(med_idt fid, const std::string& ma
           oss << " ! The array has " << _names_faces->getNumberOfComponents() << " components !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq2,_names_faces->getNumberOfTuples(),_names_faces->getConstPointer()));
+      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,maa.c_str(),_iteration,_order,MED_CELL,geoTypeReq2,ToMedInt(_names_faces->getNumberOfTuples()),_names_faces->getConstPointer()));
     }
   if((const DataArrayAsciiChar *)_names_nodes)
     {
@@ -6701,7 +6706,7 @@ void MEDFileStructuredMesh::writeStructuredLL(med_idt fid, const std::string& ma
           oss << " ! The array has " << _names_cells->getNumberOfComponents() << " components !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,maa.c_str(),_iteration,_order,MED_NODE,MED_NONE,_names_nodes->getNumberOfTuples(),_names_nodes->getConstPointer()));
+      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,maa.c_str(),_iteration,_order,MED_NODE,MED_NONE,ToMedInt(_names_nodes->getNumberOfTuples()),_names_nodes->getConstPointer()));
     }
   //
   MEDFileUMeshL2::WriteFamiliesAndGrps(fid,maa.c_str(),_families,_groups,_too_long_str);
@@ -6999,7 +7004,7 @@ void MEDFileCMesh::writeMeshLL(med_idt fid) const
   for(int i=0;i<spaceDim;i++)
     {
       const DataArrayDouble *da=_cmesh->getCoordsAt(i);
-      MEDFILESAFECALLERWR0(MEDmeshGridIndexCoordinateWr,(fid,maa,_iteration,_order,_time,i+1,da->getNumberOfTuples(),da->getConstPointer()));
+      MEDFILESAFECALLERWR0(MEDmeshGridIndexCoordinateWr,(fid,maa,_iteration,_order,_time,i+1,ToMedInt(da->getNumberOfTuples()),da->getConstPointer()));
     }
   //
   std::string meshName(MEDLoaderBase::buildStringFromFortran(maa,MED_NAME_SIZE));
@@ -7228,10 +7233,10 @@ void MEDFileCurveLinearMesh::writeMeshLL(med_idt fid) const
   if(_univ_wr_status)
     MEDFILESAFECALLERWR0(MEDmeshUniversalNameWr,(fid,maa));
   MEDFILESAFECALLERWR0(MEDmeshGridTypeWr,(fid,maa,MED_CURVILINEAR_GRID));
-  std::vector<int> nodeGridSt=_clmesh->getNodeGridStructure();
-  MEDFILESAFECALLERWR0(MEDmeshGridStructWr,(fid,maa,_iteration,_order,_time,&nodeGridSt[0]));
+  std::vector<mcIdType> nodeGridSt=_clmesh->getNodeGridStructure();
+  MEDFILESAFECALLERWR0(MEDmeshGridStructWr,(fid,maa,_iteration,_order,_time,ToMedIntArray(nodeGridSt)->getConstPointer()));
 
-  MEDFILESAFECALLERWR0(MEDmeshNodeCoordinateWr,(fid,maa,_iteration,_order,_time,MED_FULL_INTERLACE,coords->getNumberOfTuples(),coords->begin()));
+  MEDFILESAFECALLERWR0(MEDmeshNodeCoordinateWr,(fid,maa,_iteration,_order,_time,MED_FULL_INTERLACE,ToMedInt(coords->getNumberOfTuples()),coords->begin()));
   //
   std::string meshName(MEDLoaderBase::buildStringFromFortran(maa,MED_NAME_SIZE));
   MEDFileStructuredMesh::writeStructuredLL(fid,meshName);
@@ -7497,7 +7502,7 @@ void MEDFileMeshes::writeLL(med_idt fid) const
 
 int MEDFileMeshes::getNumberOfMeshes() const
 {
-  return _meshes.size();
+  return (int)_meshes.size();
 }
 
 MEDFileMeshesIterator *MEDFileMeshes::iterator()
index 4b54ed0ce177913ba62148c0a80270d4d82d434f..aadb0fcc30a95c665d01fd899e4874d7d3cc2671 100644 (file)
@@ -74,21 +74,21 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void setAxisType(MEDCouplingAxisType at) { _axis_type=at; }
     MEDLOADER_EXPORT MEDCouplingAxisType getAxisType() const { return _axis_type; }
     MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
-    MEDLOADER_EXPORT virtual int getNumberOfNodes() const = 0;
-    MEDLOADER_EXPORT virtual int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const = 0;
+    MEDLOADER_EXPORT virtual mcIdType getNumberOfNodes() const = 0;
+    MEDLOADER_EXPORT virtual mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const = 0;
     MEDLOADER_EXPORT virtual bool hasImplicitPart() const = 0;
-    MEDLOADER_EXPORT virtual int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const = 0;
+    MEDLOADER_EXPORT virtual mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const = 0;
     MEDLOADER_EXPORT virtual void releaseImplicitPartIfAny() const = 0;
     MEDLOADER_EXPORT virtual std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const = 0;
-    MEDLOADER_EXPORT virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const = 0;
+    MEDLOADER_EXPORT virtual mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const = 0;
     MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevels() const = 0;
     MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevelsExt() const = 0;
     MEDLOADER_EXPORT virtual std::vector<int> getFamArrNonEmptyLevelsExt() const = 0;
     MEDLOADER_EXPORT virtual std::vector<int> getNumArrNonEmptyLevelsExt() const = 0;
     MEDLOADER_EXPORT virtual std::vector<int> getNameArrNonEmptyLevelsExt() const = 0;
-    MEDLOADER_EXPORT virtual int getSizeAtLevel(int meshDimRelToMaxExt) const = 0;
+    MEDLOADER_EXPORT virtual mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const = 0;
     MEDLOADER_EXPORT virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const = 0;
-    MEDLOADER_EXPORT virtual std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const;
+    MEDLOADER_EXPORT virtual std::vector<mcIdType> getDistributionOfTypes(int meshDimRelToMax) const;
     MEDLOADER_EXPORT virtual void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const = 0;
     MEDLOADER_EXPORT virtual MEDFileMesh *cartesianize() const = 0;
     MEDLOADER_EXPORT virtual bool presenceOfStructureElements() const = 0;
@@ -97,41 +97,41 @@ namespace MEDCoupling
     MEDLOADER_EXPORT bool areFamsEqual(const MEDFileMesh *other, std::string& what) const;
     MEDLOADER_EXPORT bool areGrpsEqual(const MEDFileMesh *other, std::string& what) const;
     MEDLOADER_EXPORT bool existsGroup(const std::string& groupName) const;
-    MEDLOADER_EXPORT bool existsFamily(int famId) const;
+    MEDLOADER_EXPORT bool existsFamily(mcIdType famId) const;
     MEDLOADER_EXPORT bool existsFamily(const std::string& familyName) const;
-    MEDLOADER_EXPORT void setFamilyId(const std::string& familyName, int id);
-    MEDLOADER_EXPORT void setFamilyIdUnique(const std::string& familyName, int id);
-    MEDLOADER_EXPORT virtual void addFamily(const std::string& familyName, int id);
+    MEDLOADER_EXPORT void setFamilyId(const std::string& familyName, mcIdType id);
+    MEDLOADER_EXPORT void setFamilyIdUnique(const std::string& familyName, mcIdType id);
+    MEDLOADER_EXPORT virtual void addFamily(const std::string& familyName, mcIdType id);
     MEDLOADER_EXPORT virtual void createGroupOnAll(int meshDimRelToMaxExt, const std::string& groupName);
-    MEDLOADER_EXPORT virtual bool keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& levs);
+    MEDLOADER_EXPORT virtual bool keepFamIdsOnlyOnLevs(const std::vector<mcIdType>& famIds, const std::vector<int>& levs);
     MEDLOADER_EXPORT void addFamilyOnGrp(const std::string& grpName, const std::string& famName);
-    MEDLOADER_EXPORT std::string findOrCreateAndGiveFamilyWithId(int id, bool& created);
-    MEDLOADER_EXPORT void setFamilyInfo(const std::map<std::string,int>& info);
+    MEDLOADER_EXPORT std::string findOrCreateAndGiveFamilyWithId(mcIdType id, bool& created);
+    MEDLOADER_EXPORT void setFamilyInfo(const std::map<std::string,mcIdType>& info);
     MEDLOADER_EXPORT void setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
     MEDLOADER_EXPORT void copyFamGrpMapsFrom(const MEDFileMesh& other);
     MEDLOADER_EXPORT void clearGrpMap();
     MEDLOADER_EXPORT void clearFamMap();
     MEDLOADER_EXPORT void clearFamGrpMaps();
-    MEDLOADER_EXPORT const std::map<std::string,int>& getFamilyInfo() const { return _families; }
+    MEDLOADER_EXPORT const std::map<std::string,mcIdType>& getFamilyInfo() const { return _families; }
     MEDLOADER_EXPORT const std::map<std::string, std::vector<std::string> >& getGroupInfo() const { return _groups; }
     MEDLOADER_EXPORT std::vector<std::string> getFamiliesOnGroup(const std::string& name) const;
     MEDLOADER_EXPORT std::vector<std::string> getFamiliesOnGroups(const std::vector<std::string>& grps) const;
-    MEDLOADER_EXPORT std::vector<int> getFamiliesIdsOnGroup(const std::string& name) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamiliesIdsOnGroup(const std::string& name) const;
     MEDLOADER_EXPORT void setFamiliesOnGroup(const std::string& name, const std::vector<std::string>& fams);
-    MEDLOADER_EXPORT void setFamiliesIdsOnGroup(const std::string& name, const std::vector<int>& famIds);
+    MEDLOADER_EXPORT void setFamiliesIdsOnGroup(const std::string& name, const std::vector<mcIdType>& famIds);
     MEDLOADER_EXPORT std::vector<std::string> getGroupsOnFamily(const std::string& name) const;
     MEDLOADER_EXPORT void setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps);
     MEDLOADER_EXPORT std::vector<std::string> getGroupsNames() const;
     MEDLOADER_EXPORT std::vector<std::string> getFamiliesNames() const;
     MEDLOADER_EXPORT std::vector<std::string> getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT std::vector<int> getGrpNonEmptyLevelsExt(const std::string& grp) const;
-    MEDLOADER_EXPORT std::vector<int> getGrpNonEmptyLevels(const std::string& grp) const;
-    MEDLOADER_EXPORT std::vector<int> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const;
-    MEDLOADER_EXPORT std::vector<int> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const;
-    MEDLOADER_EXPORT virtual std::vector<int> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const = 0;
-    MEDLOADER_EXPORT virtual std::vector<int> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const = 0;
-    MEDLOADER_EXPORT std::vector<int> getFamNonEmptyLevels(const std::string& fam) const;
-    MEDLOADER_EXPORT std::vector<int> getFamNonEmptyLevelsExt(const std::string& fam) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getGrpNonEmptyLevelsExt(const std::string& grp) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getGrpNonEmptyLevels(const std::string& grp) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const;
+    MEDLOADER_EXPORT virtual std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const = 0;
+    MEDLOADER_EXPORT virtual std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const = 0;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamNonEmptyLevels(const std::string& fam) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamNonEmptyLevelsExt(const std::string& fam) const;
     MEDLOADER_EXPORT std::vector<std::string> getFamiliesNamesWithFilePointOfView() const;
     MEDLOADER_EXPORT static std::string GetMagicFamilyStr();
     MEDLOADER_EXPORT void assignFamilyNameWithGroupName();
@@ -147,22 +147,22 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void checkOrphanFamilyZero() const;
     MEDLOADER_EXPORT void changeGroupName(const std::string& oldName, const std::string& newName);
     MEDLOADER_EXPORT void changeFamilyName(const std::string& oldName, const std::string& newName);
-    MEDLOADER_EXPORT void changeFamilyId(int oldId, int newId);
+    MEDLOADER_EXPORT void changeFamilyId(mcIdType oldId, mcIdType newId);
     MEDLOADER_EXPORT void changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
-    MEDLOADER_EXPORT int getFamilyId(const std::string& name) const;
-    MEDLOADER_EXPORT int getMaxAbsFamilyId() const;
-    MEDLOADER_EXPORT int getMaxFamilyId() const;
-    MEDLOADER_EXPORT int getMinFamilyId() const;
-    MEDLOADER_EXPORT int getTheMaxAbsFamilyId() const;
-    MEDLOADER_EXPORT int getTheMaxFamilyId() const;
-    MEDLOADER_EXPORT int getTheMinFamilyId() const;
-    MEDLOADER_EXPORT virtual int getMaxAbsFamilyIdInArrays() const = 0;
-    MEDLOADER_EXPORT virtual int getMaxFamilyIdInArrays() const = 0;
-    MEDLOADER_EXPORT virtual int getMinFamilyIdInArrays() const = 0;
-    MEDLOADER_EXPORT DataArrayInt *getAllFamiliesIdsReferenced() const;
-    MEDLOADER_EXPORT DataArrayInt *computeAllFamilyIdsInUse() const;
-    MEDLOADER_EXPORT std::vector<int> getFamiliesIds(const std::vector<std::string>& famNames) const;
-    MEDLOADER_EXPORT std::string getFamilyNameGivenId(int id) const;
+    MEDLOADER_EXPORT mcIdType getFamilyId(const std::string& name) const;
+    MEDLOADER_EXPORT mcIdType getMaxAbsFamilyId() const;
+    MEDLOADER_EXPORT mcIdType getMaxFamilyId() const;
+    MEDLOADER_EXPORT mcIdType getMinFamilyId() const;
+    MEDLOADER_EXPORT mcIdType getTheMaxAbsFamilyId() const;
+    MEDLOADER_EXPORT mcIdType getTheMaxFamilyId() const;
+    MEDLOADER_EXPORT mcIdType getTheMinFamilyId() const;
+    MEDLOADER_EXPORT virtual mcIdType getMaxAbsFamilyIdInArrays() const = 0;
+    MEDLOADER_EXPORT virtual mcIdType getMaxFamilyIdInArrays() const = 0;
+    MEDLOADER_EXPORT virtual mcIdType getMinFamilyIdInArrays() const = 0;
+    MEDLOADER_EXPORT DataArrayIdType *getAllFamiliesIdsReferenced() const;
+    MEDLOADER_EXPORT DataArrayIdType *computeAllFamilyIdsInUse() const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamiliesIds(const std::vector<std::string>& famNames) const;
+    MEDLOADER_EXPORT std::string getFamilyNameGivenId(mcIdType id) const;
     MEDLOADER_EXPORT bool ensureDifferentFamIdsPerLevel();
     MEDLOADER_EXPORT void normalizeFamIdsTrio();
     MEDLOADER_EXPORT void normalizeFamIdsMEDFile();
@@ -170,30 +170,30 @@ namespace MEDCoupling
     MEDLOADER_EXPORT virtual std::string simpleRepr() const;
     MEDLOADER_EXPORT virtual std::string advancedRepr() const = 0;
     //
-    MEDLOADER_EXPORT virtual void setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<const DataArrayInt *>& grps, bool renum=false);
-    MEDLOADER_EXPORT virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr) = 0;
-    MEDLOADER_EXPORT virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr) = 0;
+    MEDLOADER_EXPORT virtual void setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<const DataArrayIdType *>& grps, bool renum=false);
+    MEDLOADER_EXPORT virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr) = 0;
+    MEDLOADER_EXPORT virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr) = 0;
     MEDLOADER_EXPORT virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr) = 0;
-    MEDLOADER_EXPORT virtual void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayInt *globalNumArr) = 0;
-    MEDLOADER_EXPORT virtual void addNodeGroup(const DataArrayInt *ids) = 0;
-    MEDLOADER_EXPORT virtual void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids) = 0;
-    MEDLOADER_EXPORT virtual const DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const = 0;
-    MEDLOADER_EXPORT virtual DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) = 0;
-    MEDLOADER_EXPORT DataArrayInt *getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt);
-    MEDLOADER_EXPORT virtual const DataArrayInt *getNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
-    MEDLOADER_EXPORT virtual const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+    MEDLOADER_EXPORT virtual void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr) = 0;
+    MEDLOADER_EXPORT virtual void addNodeGroup(const DataArrayIdType *ids) = 0;
+    MEDLOADER_EXPORT virtual void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids) = 0;
+    MEDLOADER_EXPORT virtual const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) = 0;
+    MEDLOADER_EXPORT DataArrayIdType *getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt);
+    MEDLOADER_EXPORT virtual const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+    MEDLOADER_EXPORT virtual const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
     MEDLOADER_EXPORT virtual const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const = 0;
-    MEDLOADER_EXPORT virtual MCAuto<DataArrayInt> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const = 0;
-    MEDLOADER_EXPORT virtual DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const = 0;
-    MEDLOADER_EXPORT virtual DataArrayInt *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
-    MEDLOADER_EXPORT virtual DataArrayInt *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
-    MEDLOADER_EXPORT virtual DataArrayInt *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
-    MEDLOADER_EXPORT virtual DataArrayInt *getNodeGroupArr(const std::string& grp, bool renum=false) const;
-    MEDLOADER_EXPORT virtual DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
-    MEDLOADER_EXPORT virtual DataArrayInt *getNodeFamilyArr(const std::string& fam, bool renum=false) const;
-    MEDLOADER_EXPORT virtual DataArrayInt *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const;
+    MEDLOADER_EXPORT virtual MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const = 0;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getNodeGroupArr(const std::string& grp, bool renum=false) const;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getNodeFamilyArr(const std::string& fam, bool renum=false) const;
+    MEDLOADER_EXPORT virtual DataArrayIdType *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const;
     // tools
-    MEDLOADER_EXPORT virtual bool unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell) = 0;
+    MEDLOADER_EXPORT virtual bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell) = 0;
     MEDLOADER_EXPORT int getNumberOfJoints() const;
     MEDLOADER_EXPORT MEDFileJoints *getJoints() const;
     MEDLOADER_EXPORT void setJoints( MEDFileJoints* joints );
@@ -211,17 +211,17 @@ namespace MEDCoupling
     void dealWithTinyInfo(const MEDCouplingMesh *m);
     virtual void synchronizeTinyInfoOnLeaves() const = 0;
     void getFamilyRepr(std::ostream& oss) const;
-    virtual void appendFamilyEntries(const DataArrayInt *famIds, const std::vector< std::vector<int> >& fidsOfGrps, const std::vector<std::string>& grpNames);
-    virtual void changeFamilyIdArr(int oldId, int newId) = 0;
-    virtual std::list< MCAuto<DataArrayInt> > getAllNonNullFamilyIds() const = 0;
+    virtual void appendFamilyEntries(const DataArrayIdType *famIds, const std::vector< std::vector<mcIdType> >& fidsOfGrps, const std::vector<std::string>& grpNames);
+    virtual void changeFamilyIdArr(mcIdType oldId, mcIdType newId) = 0;
+    virtual std::list< MCAuto<DataArrayIdType> > getAllNonNullFamilyIds() const = 0;
     virtual void loadLL(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs) = 0;
     void loadLLWithAdditionalItems(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
-    void addGroupUnderground(bool isNodeGroup, const DataArrayInt *ids, DataArrayInt *famArr);
-    static void TranslateFamilyIds(int offset, DataArrayInt *famArr, std::vector< std::vector<int> >& famIdsPerGrp);
+    void addGroupUnderground(bool isNodeGroup, const DataArrayIdType *ids, DataArrayIdType *famArr);
+    static void TranslateFamilyIds(mcIdType offset, DataArrayIdType *famArr, std::vector< std::vector<mcIdType> >& famIdsPerGrp);
     static void ChangeAllGroupsContainingFamily(std::map<std::string, std::vector<std::string> >& groups, const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
-    static std::string FindOrCreateAndGiveFamilyWithId(std::map<std::string,int>& families, int id, bool& created);
+    static std::string FindOrCreateAndGiveFamilyWithId(std::map<std::string,mcIdType>& families, mcIdType id, bool& created);
     static std::string CreateNameNotIn(const std::string& nameTry, const std::vector<std::string>& namesToAvoid);
-    static int PutInThirdComponentOfCodeOffset(std::vector<int>& code, int strt);
+    static mcIdType PutInThirdComponentOfCodeOffset(std::vector<mcIdType>& code, mcIdType strt);
     void writeJoints(med_idt fid) const;
     void loadJointsFromFile(med_idt fid, MEDFileJoints *toUseInstedOfReading=0);
     void loadEquivalences(med_idt fid);
@@ -229,7 +229,7 @@ namespace MEDCoupling
     bool areEquivalencesEqual(const MEDFileMesh *other, std::string& what) const;
     void getEquivalencesRepr(std::ostream& oss) const;
     void checkCartesian() const;
-    void checkNoGroupClash(const DataArrayInt *famArr, const std::string& grpName) const;
+    void checkNoGroupClash(const DataArrayIdType *famArr, const std::string& grpName) const;
   private:
     virtual void writeMeshLL(med_idt fid) const = 0;
   protected:
@@ -247,7 +247,7 @@ namespace MEDCoupling
     MCAuto<MEDFileEquivalences> _equiv;
   protected:
     std::map<std::string, std::vector<std::string> > _groups;
-    std::map<std::string,int> _families;
+    std::map<std::string,mcIdType> _families;
   public:
     MEDLOADER_EXPORT static const char DFT_FAM_NAME[];
   };
@@ -265,8 +265,8 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileUMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileUMesh>(db); }
     MEDLOADER_EXPORT static MEDFileUMesh *New(const MEDCouplingMappedExtrudedMesh *mem);
     MEDLOADER_EXPORT static MEDFileUMesh *New();
-    MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
-    MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+    MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+    MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static const char *GetSpeStr4ExtMesh() { return SPE_FAM_STR_EXTRUDED_MESH; }
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
@@ -281,28 +281,28 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void setName(const std::string& name);
     MEDLOADER_EXPORT const std::vector< MCAuto<MEDFileEltStruct4Mesh> >& getAccessOfUndergroundEltStrs() const { return _elt_str; }
     //
-    MEDLOADER_EXPORT int getMaxAbsFamilyIdInArrays() const;
-    MEDLOADER_EXPORT int getMaxFamilyIdInArrays() const;
-    MEDLOADER_EXPORT int getMinFamilyIdInArrays() const;
+    MEDLOADER_EXPORT mcIdType getMaxAbsFamilyIdInArrays() const;
+    MEDLOADER_EXPORT mcIdType getMaxFamilyIdInArrays() const;
+    MEDLOADER_EXPORT mcIdType getMinFamilyIdInArrays() const;
     MEDLOADER_EXPORT int getMeshDimension() const;
     MEDLOADER_EXPORT int getSpaceDimension() const;
     MEDLOADER_EXPORT std::string simpleRepr() const;
     MEDLOADER_EXPORT std::string advancedRepr() const;
-    MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT const DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
-    MEDLOADER_EXPORT const DataArrayInt *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
+    MEDLOADER_EXPORT const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
     MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT MCAuto<DataArrayInt> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
     MEDLOADER_EXPORT const PartDefinition *getPartDefAtLevel(int meshDimRelToMaxExt, INTERP_KERNEL::NormalizedCellType gt=INTERP_KERNEL::NORM_ERROR) const;
-    MEDLOADER_EXPORT int getNumberOfNodes() const;
-    MEDLOADER_EXPORT int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT mcIdType getNumberOfNodes() const;
+    MEDLOADER_EXPORT mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
     MEDLOADER_EXPORT bool hasImplicitPart() const;
-    MEDLOADER_EXPORT int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+    MEDLOADER_EXPORT mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
     MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
     MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
-    MEDLOADER_EXPORT int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
+    MEDLOADER_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
     MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
     MEDLOADER_EXPORT MEDFileMesh *cartesianize() const;
     MEDLOADER_EXPORT bool presenceOfStructureElements() const;
@@ -312,17 +312,17 @@ namespace MEDCoupling
     MEDLOADER_EXPORT std::vector<int> getFamArrNonEmptyLevelsExt() const;
     MEDLOADER_EXPORT std::vector<int> getNumArrNonEmptyLevelsExt() const;
     MEDLOADER_EXPORT std::vector<int> getNameArrNonEmptyLevelsExt() const;
-    MEDLOADER_EXPORT std::vector<int> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
-    MEDLOADER_EXPORT std::vector<int> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
     MEDLOADER_EXPORT DataArrayDouble *getCoords() const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getGroup(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getGroups(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
-    MEDLOADER_EXPORT DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
+    MEDLOADER_EXPORT DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
-    MEDLOADER_EXPORT std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const;
-    MEDLOADER_EXPORT std::vector< std::pair<int,int> > getAllDistributionOfTypes() const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getDistributionOfTypes(int meshDimRelToMax) const;
+    MEDLOADER_EXPORT std::vector< std::pair<int,mcIdType> > getAllDistributionOfTypes() const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const;
@@ -330,20 +330,20 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void forceComputationOfParts() const;
     MEDLOADER_EXPORT std::vector<MEDCoupling1GTUMesh *> getDirectUndergroundSingleGeoTypeMeshes(int meshDimRelToMax) const;
     MEDLOADER_EXPORT MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const;
-    MEDLOADER_EXPORT DataArrayInt *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
-    MEDLOADER_EXPORT DataArrayInt *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+    MEDLOADER_EXPORT DataArrayIdType *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+    MEDLOADER_EXPORT DataArrayIdType *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
     MEDLOADER_EXPORT int getRelativeLevOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
     //
-    MEDLOADER_EXPORT void setFamilyNameAttachedOnId(int id, const std::string& newFamName);
+    MEDLOADER_EXPORT void setFamilyNameAttachedOnId(mcIdType id, const std::string& newFamName);
     MEDLOADER_EXPORT void setCoords(DataArrayDouble *coords);
     MEDLOADER_EXPORT void setCoordsForced(DataArrayDouble *coords);
     MEDLOADER_EXPORT void eraseGroupsAtLevel(int meshDimRelToMaxExt);
-    MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr);
-    MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr);
+    MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr);
+    MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr);
     MEDLOADER_EXPORT void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
-    MEDLOADER_EXPORT void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayInt *globalNumArr);
-    MEDLOADER_EXPORT void addNodeGroup(const DataArrayInt *ids);
-    MEDLOADER_EXPORT void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids);
+    MEDLOADER_EXPORT void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr);
+    MEDLOADER_EXPORT void addNodeGroup(const DataArrayIdType *ids);
+    MEDLOADER_EXPORT void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids);
     MEDLOADER_EXPORT void removeMeshAtLevel(int meshDimRelToMax);
     MEDLOADER_EXPORT void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m);
     MEDLOADER_EXPORT void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false);
@@ -352,11 +352,11 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void setGroupsOnSetMesh(int meshDimRelToMax, const std::vector<const MEDCouplingUMesh *>& ms, bool renum=false);
     MEDLOADER_EXPORT void optimizeFamilies();
     // tools
-    MEDLOADER_EXPORT void buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, DataArrayInt *&nodesDuplicated, DataArrayInt *&cellsModified, DataArrayInt *&cellsNotModified);
-    MEDLOADER_EXPORT bool unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell);
-    MEDLOADER_EXPORT DataArrayInt *zipCoords();
-    MEDLOADER_EXPORT DataArrayInt *deduceNodeSubPartFromCellSubPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef) const;
-    MEDLOADER_EXPORT MEDFileUMesh *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef) const;
+    MEDLOADER_EXPORT void buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, DataArrayIdType *&nodesDuplicated, DataArrayIdType *&cellsModified, DataArrayIdType *&cellsNotModified);
+    MEDLOADER_EXPORT bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell);
+    MEDLOADER_EXPORT DataArrayIdType *zipCoords();
+    MEDLOADER_EXPORT DataArrayIdType *deduceNodeSubPartFromCellSubPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const;
+    MEDLOADER_EXPORT MEDFileUMesh *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const;
     MEDLOADER_EXPORT MEDFileUMesh *buildExtrudedMesh(const MEDCouplingUMesh *m1D, int policy) const;
     MEDLOADER_EXPORT MEDFileUMesh *linearToQuadratic(int conversionType=0, double eps=1e-12) const;
     MEDLOADER_EXPORT MEDFileUMesh *quadraticToLinear(double eps=1e-12) const;
@@ -364,16 +364,16 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MCAuto<MEDFileUMesh> Aggregate(const std::vector<const MEDFileUMesh *>& meshes);
     MEDLOADER_EXPORT MEDCouplingMappedExtrudedMesh *convertToExtrudedMesh() const;
     // serialization
-    MEDLOADER_EXPORT void serialize(std::vector<double>& tinyDouble, std::vector<int>& tinyInt, std::vector<std::string>& tinyStr,
-                                    std::vector< MCAuto<DataArrayInt> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD);
-    MEDLOADER_EXPORT void unserialize(std::vector<double>& tinyDouble, std::vector<int>& tinyInt, std::vector<std::string>& tinyStr,
-                                      std::vector< MCAuto<DataArrayInt> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD);
+    MEDLOADER_EXPORT void serialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr,
+                                    std::vector< MCAuto<DataArrayIdType> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD);
+    MEDLOADER_EXPORT void unserialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr,
+                                      std::vector< MCAuto<DataArrayIdType> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD);
   private:
     MEDLOADER_EXPORT ~MEDFileUMesh();
     void writeMeshLL(med_idt fid) const;
     MEDFileUMesh();
     MEDFileUMesh(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
-    void loadPartUMeshFromFile(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+    void loadPartUMeshFromFile(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     void loadLL(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
     void dispatchLoadedPart(med_idt fid, const MEDFileUMeshL2& loaderl2, const std::string& mName, MEDFileMeshReadSelector *mrs);
     const MEDFileUMeshSplitL1 *getMeshAtLevSafe(int meshDimRelToMaxExt) const;
@@ -382,19 +382,19 @@ namespace MEDCoupling
     DataArrayDouble *checkMultiMesh(const std::vector<const MEDCouplingUMesh *>& ms) const;
     void computeRevNum() const;
     void synchronizeTinyInfoOnLeaves() const;
-    void changeFamilyIdArr(int oldId, int newId);
-    std::list< MCAuto<DataArrayInt> > getAllNonNullFamilyIds() const;
+    void changeFamilyIdArr(mcIdType oldId, mcIdType newId);
+    std::list< MCAuto<DataArrayIdType> > getAllNonNullFamilyIds() const;
     MCAuto<MEDFileUMeshSplitL1>& checkAndGiveEntryInSplitL1(int meshDimRelToMax, MEDCouplingPointSet *m);
   private:
     static const char SPE_FAM_STR_EXTRUDED_MESH[];
   private:
     std::vector< MCAuto<MEDFileUMeshSplitL1> > _ms;
     MCAuto<DataArrayDouble> _coords;
-    MCAuto<DataArrayInt> _fam_coords;     ///< Node family indices
-    MCAuto<DataArrayInt> _num_coords;
-    MCAuto<DataArrayInt> _global_num_coords;
+    MCAuto<DataArrayIdType> _fam_coords;     ///< Node family indices
+    MCAuto<DataArrayIdType> _num_coords;
+    MCAuto<DataArrayIdType> _global_num_coords;
     MCAuto<DataArrayAsciiChar> _name_coords;
-    mutable MCAuto<DataArrayInt> _rev_num_coords;
+    mutable MCAuto<DataArrayIdType> _rev_num_coords;
     MCAuto<PartDefinition> _part_coords;
     std::vector< MCAuto<MEDFileEltStruct4Mesh> > _elt_str;
   };
@@ -405,50 +405,50 @@ namespace MEDCoupling
   public:
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
-    MEDLOADER_EXPORT int getMaxAbsFamilyIdInArrays() const;
-    MEDLOADER_EXPORT int getMaxFamilyIdInArrays() const;
-    MEDLOADER_EXPORT int getMinFamilyIdInArrays() const;
+    MEDLOADER_EXPORT mcIdType getMaxAbsFamilyIdInArrays() const;
+    MEDLOADER_EXPORT mcIdType getMaxFamilyIdInArrays() const;
+    MEDLOADER_EXPORT mcIdType getMinFamilyIdInArrays() const;
     MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
     MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
-    MEDLOADER_EXPORT DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
-    MEDLOADER_EXPORT const DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT DataArrayInt *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
-    MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr);
-    MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr);
+    MEDLOADER_EXPORT DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
+    MEDLOADER_EXPORT const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
+    MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr);
+    MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr);
     MEDLOADER_EXPORT void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
-    MEDLOADER_EXPORT void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayInt *globalNumArr);
-    MEDLOADER_EXPORT void addNodeGroup(const DataArrayInt *ids);
-    MEDLOADER_EXPORT void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids);
-    MEDLOADER_EXPORT const DataArrayInt *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr);
+    MEDLOADER_EXPORT void addNodeGroup(const DataArrayIdType *ids);
+    MEDLOADER_EXPORT void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids);
+    MEDLOADER_EXPORT const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
     MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT MCAuto<DataArrayInt> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
     MEDLOADER_EXPORT std::vector<int> getNonEmptyLevels() const;
     MEDLOADER_EXPORT std::vector<int> getNonEmptyLevelsExt() const;
     MEDLOADER_EXPORT std::vector<int> getFamArrNonEmptyLevelsExt() const;
     MEDLOADER_EXPORT std::vector<int> getNumArrNonEmptyLevelsExt() const;
     MEDLOADER_EXPORT std::vector<int> getNameArrNonEmptyLevelsExt() const;
     MEDLOADER_EXPORT MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
-    MEDLOADER_EXPORT std::vector<int> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
-    MEDLOADER_EXPORT std::vector<int> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
-    MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const;
-    MEDLOADER_EXPORT int getNumberOfNodes() const;
-    MEDLOADER_EXPORT int getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
+    MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
+    MEDLOADER_EXPORT mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const;
+    MEDLOADER_EXPORT mcIdType getNumberOfNodes() const;
+    MEDLOADER_EXPORT mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
     MEDLOADER_EXPORT bool hasImplicitPart() const;
-    MEDLOADER_EXPORT int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+    MEDLOADER_EXPORT mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
     MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
     MEDLOADER_EXPORT MEDCoupling1SGTUMesh *getImplicitFaceMesh() const;
     MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
-    MEDLOADER_EXPORT int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
+    MEDLOADER_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
     MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
     MEDLOADER_EXPORT bool presenceOfStructureElements() const { return false; }
     MEDLOADER_EXPORT virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0;
     // tools
-    MEDLOADER_EXPORT bool unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell);
+    MEDLOADER_EXPORT bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell);
   protected:
     ~MEDFileStructuredMesh() { }
-    void changeFamilyIdArr(int oldId, int newId);
-    std::list< MCAuto<DataArrayInt> > getAllNonNullFamilyIds() const;
+    void changeFamilyIdArr(mcIdType oldId, mcIdType newId);
+    std::list< MCAuto<DataArrayIdType> > getAllNonNullFamilyIds() const;
     void deepCpyAttributes();
     void loadStrMeshFromFile(MEDFileStrMeshL2 *strm, med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
     void writeStructuredLL(med_idt fid, const std::string& maa) const;
@@ -457,19 +457,19 @@ namespace MEDCoupling
     static med_geometry_type GetGeoTypeFromMeshDim(int meshDim);
   private:
     static void LoadStrMeshDAFromFile(med_idt fid, int meshDim, int dt, int it, const std::string& mName, MEDFileMeshReadSelector *mrs,
-                                      MCAuto<DataArrayInt>& famCells, MCAuto<DataArrayInt>& numCells, MCAuto<DataArrayAsciiChar>& namesCells);
+                                      MCAuto<DataArrayIdType>& famCells, MCAuto<DataArrayIdType>& numCells, MCAuto<DataArrayAsciiChar>& namesCells);
   private:
-    MCAuto<DataArrayInt> _fam_nodes;
-    MCAuto<DataArrayInt> _num_nodes;
+    MCAuto<DataArrayIdType> _fam_nodes;
+    MCAuto<DataArrayIdType> _num_nodes;
     MCAuto<DataArrayAsciiChar> _names_nodes;
-    MCAuto<DataArrayInt> _fam_cells;
-    MCAuto<DataArrayInt> _num_cells;
+    MCAuto<DataArrayIdType> _fam_cells;
+    MCAuto<DataArrayIdType> _num_cells;
     MCAuto<DataArrayAsciiChar> _names_cells;
-    MCAuto<DataArrayInt> _fam_faces;
-    MCAuto<DataArrayInt> _num_faces;
+    MCAuto<DataArrayIdType> _fam_faces;
+    MCAuto<DataArrayIdType> _num_faces;
     MCAuto<DataArrayAsciiChar> _names_faces;
-    mutable MCAuto<DataArrayInt> _rev_num_nodes;
-    mutable MCAuto<DataArrayInt> _rev_num_cells;
+    mutable MCAuto<DataArrayIdType> _rev_num_nodes;
+    mutable MCAuto<DataArrayIdType> _rev_num_cells;
     mutable MCAuto<MEDCoupling1SGTUMesh> _faces_if_necessary;
   };
 
index f222b32c90dfc168463e609138072082088bbd25..96982a4b18adf18907c2486887fe8432768df9ad 100644 (file)
@@ -21,6 +21,7 @@
 #include "MEDFileMeshElt.hxx"
 #include "MEDFileSafeCaller.txx"
 #include "MEDFileMeshReadSelector.hxx"
+#include "MEDFileBasis.hxx"
 
 #include "MEDCouplingUMesh.hxx"
 
@@ -39,7 +40,7 @@ MEDFileUMeshPerTypeCommon *MEDFileUMeshPerTypeCommon::New()
   return new MEDFileUMeshPerTypeCommon;
 }
 
-void MEDFileUMeshPerTypeCommon::loadCommonPart(med_idt fid, const char *mName, int dt, int it, int curNbOfElem, med_geometry_type geoElt,
+void MEDFileUMeshPerTypeCommon::loadCommonPart(med_idt fid, const char *mName, int dt, int it, mcIdType curNbOfElem, med_geometry_type geoElt,
                                                med_entity_type entity, MEDFileMeshReadSelector *mrs)
 {
   med_bool changement,transformation;
@@ -48,10 +49,11 @@ void MEDFileUMeshPerTypeCommon::loadCommonPart(med_idt fid, const char *mName, i
     {    
       if(!mrs || mrs->isCellFamilyFieldReading())
         {
-          _fam=DataArrayInt::New();
-          _fam->alloc(curNbOfElem,1);
-          if(MEDmeshEntityFamilyNumberRd(fid,mName,dt,it,entity,geoElt,_fam->getPointer())!=0)
-            std::fill(_fam->getPointer(),_fam->getPointer()+curNbOfElem,0);
+          MCAuto<DataArrayMedInt> miFam=DataArrayMedInt::New();
+          miFam->alloc(curNbOfElem,1);
+          if(MEDmeshEntityFamilyNumberRd(fid,mName,dt,it,entity,geoElt,miFam->getPointer())!=0)
+            std::fill(miFam->getPointer(),miFam->getPointer()+curNbOfElem,0);
+          _fam=FromMedIntArray<mcIdType>( miFam );
         }
     }
   _num=0;
@@ -59,10 +61,11 @@ void MEDFileUMeshPerTypeCommon::loadCommonPart(med_idt fid, const char *mName, i
     {
       if(!mrs || mrs->isCellNumFieldReading())
         {
-          _num=DataArrayInt::New();
-          _num->alloc(curNbOfElem,1);
-          if(MEDmeshEntityNumberRd(fid,mName,dt,it,entity,geoElt,_num->getPointer())!=0)
-            _num=0;
+          MCAuto<DataArrayMedInt> miNum=DataArrayMedInt::New();
+          miNum->alloc(curNbOfElem,1);
+          if(MEDmeshEntityNumberRd(fid,mName,dt,it,entity,geoElt,miNum->getPointer())!=0)
+            miNum=0;
+          _num=FromMedIntArray<mcIdType>(miNum);
         }
     }
   _names=0;
@@ -88,8 +91,8 @@ std::size_t MEDFileUMeshPerTypeCommon::getHeapMemorySizeWithoutChildren() const
 std::vector<const BigMemoryObject *> MEDFileUMeshPerTypeCommon::getDirectChildrenWithNull() const
 {
   std::vector<const BigMemoryObject *> ret;
-  ret.push_back((const DataArrayInt *)_num);
-  ret.push_back((const DataArrayInt *)_fam);
+  ret.push_back((const DataArrayIdType *)_num);
+  ret.push_back((const DataArrayIdType *)_fam);
   ret.push_back((const DataArrayAsciiChar *)_names);
   return ret;
 }
@@ -102,7 +105,7 @@ MEDFileUMeshPerType *MEDFileUMeshPerType::New(med_idt fid, const char *mName, in
   return new MEDFileUMeshPerType(fid,mName,dt,it,mdim,geoElt,geoElt2,whichEntity,mrs);
 }
 
-MEDFileUMeshPerType *MEDFileUMeshPerType::NewPart(med_idt fid, const char *mName, int dt, int it, int mdim, INTERP_KERNEL::NormalizedCellType geoElt2, int strt, int stp, int step, MEDFileMeshReadSelector *mrs)
+MEDFileUMeshPerType *MEDFileUMeshPerType::NewPart(med_idt fid, const char *mName, int dt, int it, int mdim, INTERP_KERNEL::NormalizedCellType geoElt2, mcIdType strt, mcIdType stp, mcIdType step, MEDFileMeshReadSelector *mrs)
 {
   int geoElt2i((int)geoElt2);
   if(geoElt2i<0 || geoElt2i>=34)
@@ -131,11 +134,11 @@ std::vector<const BigMemoryObject *> MEDFileUMeshPerType::getDirectChildrenWithN
 bool MEDFileUMeshPerType::isExisting(med_idt fid, const char *mName, int dt, int it, med_geometry_type geoElt, med_entity_type& whichEntity)
 {
   static const med_entity_type entities[3]={MED_CELL,MED_DESCENDING_FACE,MED_DESCENDING_EDGE};
-  int nbOfElt=0;
+  mcIdType nbOfElt=0;
   for(int i=0;i<3;i++)
     {
       med_bool changement,transformation;
-      int tmp(MEDmeshnEntity(fid,mName,dt,it,entities[i],geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
+      mcIdType tmp(MEDmeshnEntity(fid,mName,dt,it,entities[i],geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
       if(tmp>nbOfElt)
         {
           nbOfElt=tmp;
@@ -160,7 +163,7 @@ MEDFileUMeshPerType::MEDFileUMeshPerType(med_idt fid, const char *mName, int dt,
                                          med_entity_type entity, MEDFileMeshReadSelector *mrs)
 {
   med_bool changement,transformation;
-  int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
+  mcIdType curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(type));
   if(!cm.isDynamic())
     {
@@ -177,10 +180,10 @@ MEDFileUMeshPerType::MEDFileUMeshPerType(med_idt fid, const char *mName, int dt,
 }
 
 void MEDFileUMeshPerType::loadPart(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
-                                   med_entity_type entity, int strt, int end, int step, MEDFileMeshReadSelector *mrs)
+                                   med_entity_type entity, mcIdType strt, mcIdType end, mcIdType step, MEDFileMeshReadSelector *mrs)
 {
   med_bool changement,transformation;
-  int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
+  mcIdType curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
   const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(type));
   _pd=PartDefinition::New(strt,end,step);
   if(!cm.isDynamic())
@@ -191,63 +194,64 @@ void MEDFileUMeshPerType::loadPart(med_idt fid, const char *mName, int dt, int i
     throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPart : not implemented yet for the dynamic type !");
 }
 
-void MEDFileUMeshPerType::loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
+void MEDFileUMeshPerType::loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
                                              med_entity_type entity, MEDFileMeshReadSelector *mrs)
 {
   _m=MEDCoupling1SGTUMesh::New(mName,type);
   MEDCoupling1SGTUMesh *mc(dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh *)_m));
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
-  int nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
+  MCAuto<DataArrayMedInt> conn(DataArrayMedInt::New());
+  mcIdType nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
   conn->alloc(nbOfNodesPerCell*curNbOfElem,1);
   MEDFILESAFECALLERRD0(MEDmeshElementConnectivityRd,(fid,mName,dt,it,entity,geoElt,MED_NODAL,MED_FULL_INTERLACE,conn->getPointer()));
-  std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
-  mc->setNodalConnectivity(conn);
+  std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<med_int>(),-1));
+  mc->setNodalConnectivity(FromMedIntArray<mcIdType>(conn));
   loadCommonPart(fid,mName,dt,it,curNbOfElem,geoElt,entity,mrs);
 }
 
-void MEDFileUMeshPerType::loadPartStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
-                                             med_entity_type entity, int strt, int end, int step, MEDFileMeshReadSelector *mrs)
+void MEDFileUMeshPerType::loadPartStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
+                                             med_entity_type entity, mcIdType strt, mcIdType end, mcIdType step, MEDFileMeshReadSelector *mrs)
 {
   if(strt<0)
     throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPartStaticType : start pos is negative !");
   if(end>curNbOfElem)
     throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPartStaticType : end is after the authorized range !");
-  int nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(strt,end,step,"MEDFileUMeshPerType::loadPartStaticType"));
+  mcIdType nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(strt,end,step,"MEDFileUMeshPerType::loadPartStaticType"));
   _m=MEDCoupling1SGTUMesh::New(mName,type);
   MEDCoupling1SGTUMesh *mc(dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh *)_m));
-  MCAuto<DataArrayInt> conn(DataArrayInt::New());
-  int nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
+  MCAuto<DataArrayMedInt> conn(DataArrayMedInt::New());
+  mcIdType nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
   conn->alloc(nbOfNodesPerCell*nbOfEltsToLoad,1);
   med_filter filter=MED_FILTER_INIT;
-  MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/nbOfNodesPerCell,
+  MEDfilterBlockOfEntityCr(fid,/*nentity*/ToMedInt(curNbOfElem),/*nvaluesperentity*/1,/*nconstituentpervalue*/ToMedInt(nbOfNodesPerCell),
                            MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
-                           /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
+                           /*start*/ToMedInt(strt+1),/*stride*/ToMedInt(step),/*count*/1,/*blocksize*/ToMedInt(nbOfEltsToLoad),
                            /*lastblocksize=useless because count=1*/0,&filter);
   MEDFILESAFECALLERRD0(MEDmeshElementConnectivityAdvancedRd,(fid,mName,dt,it,entity,geoElt,MED_NODAL,&filter,conn->getPointer()));
   MEDfilterClose(&filter);
-  std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
-  mc->setNodalConnectivity(conn);
+  std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<med_int>(),-1));
+  mc->setNodalConnectivity(FromMedIntArray<mcIdType>(conn));
   loadPartOfCellCommonPart(fid,mName,strt,end,step,dt,it,mdim,curNbOfElem,geoElt,entity,mrs);
 }
 
-void MEDFileUMeshPerType::loadPartOfCellCommonPart(med_idt fid, const char *mName, int strt, int stp, int step, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, med_entity_type entity, MEDFileMeshReadSelector *mrs)
+void MEDFileUMeshPerType::loadPartOfCellCommonPart(med_idt fid, const char *mName, mcIdType strt, mcIdType stp, mcIdType step, int dt, int it, int mdim, mcIdType curNbOfElem, med_geometry_type geoElt, med_entity_type entity, MEDFileMeshReadSelector *mrs)
 {
   med_bool changement,transformation;
   _fam=0;
-  int nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(strt,stp,step,"MEDFileUMeshPerType::loadPartOfCellCommonPart"));
+  mcIdType nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(strt,stp,step,"MEDFileUMeshPerType::loadPartOfCellCommonPart"));
   if(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_FAMILY_NUMBER,MED_NODAL,&changement,&transformation)>0)
     {
       if(!mrs || mrs->isCellFamilyFieldReading())
         {
-          _fam=DataArrayInt::New();
-          _fam->alloc(nbOfEltsToLoad,1);
+          MCAuto<DataArrayMedInt> miFam(DataArrayMedInt::New());
+          miFam->alloc(nbOfEltsToLoad,1);
           med_filter filter=MED_FILTER_INIT;
-          MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
+          MEDfilterBlockOfEntityCr(fid,/*nentity*/ToMedInt(curNbOfElem),/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
                                    MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
-                                   /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
+                                   /*start*/ToMedInt(strt+1),/*stride*/ToMedInt(step),/*count*/1,/*blocksize*/ToMedInt(nbOfEltsToLoad),
                                    /*lastblocksize=useless because count=1*/0,&filter);
-          if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_FAMILY_NUMBER,dt,it,entity,geoElt,&filter,_fam->getPointer())!=0)
-            _fam->fillWithZero();
+          if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_FAMILY_NUMBER,dt,it,entity,geoElt,&filter,miFam->getPointer())!=0)
+            miFam->fillWithZero();
+          _fam=FromMedIntArray<mcIdType>(miFam);
           MEDfilterClose(&filter);
         }
     }
@@ -256,15 +260,16 @@ void MEDFileUMeshPerType::loadPartOfCellCommonPart(med_idt fid, const char *mNam
     {
       if(!mrs || mrs->isCellNumFieldReading())
         {
-          _num=DataArrayInt::New();
-          _num->alloc(nbOfEltsToLoad,1);
+          MCAuto<DataArrayMedInt> miNum(DataArrayMedInt::New());
+          miNum->alloc(nbOfEltsToLoad,1);
           med_filter filter=MED_FILTER_INIT;
-          MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
+          MEDfilterBlockOfEntityCr(fid,/*nentity*/ToMedInt(curNbOfElem),/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
                                    MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
-                                   /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
+                                   /*start*/ToMedInt(strt+1),/*stride*/ToMedInt(step),/*count*/1,/*blocksize*/ToMedInt(nbOfEltsToLoad),
                                    /*lastblocksize=useless because count=1*/0,&filter);
-          if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_NUMBER,dt,it,entity,geoElt,&filter,_num->getPointer())!=0)
-            _num->fillWithZero();
+          if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_NUMBER,dt,it,entity,geoElt,&filter,miNum->getPointer())!=0)
+            miNum->fillWithZero();
+          _num=FromMedIntArray<mcIdType>(miNum);
           MEDfilterClose(&filter);
         }
     }
@@ -276,9 +281,9 @@ void MEDFileUMeshPerType::loadPartOfCellCommonPart(med_idt fid, const char *mNam
           _names=DataArrayAsciiChar::New();
           _names->alloc(nbOfEltsToLoad+1,MED_SNAME_SIZE);//not a bug to avoid the memory corruption due to last \0 at the end
           med_filter filter=MED_FILTER_INIT;
-          MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
+          MEDfilterBlockOfEntityCr(fid,/*nentity*/ToMedInt(curNbOfElem),/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
                                    MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
-                                   /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
+                                   /*start*/ToMedInt(strt+1),/*stride*/ToMedInt(step),/*count*/1,/*blocksize*/ToMedInt(nbOfEltsToLoad),
                                    /*lastblocksize=useless because count=1*/0,&filter);
           if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_NAME,dt,it,entity,geoElt,&filter,_names->getPointer())!=0)
             _names=0;
@@ -289,61 +294,61 @@ void MEDFileUMeshPerType::loadPartOfCellCommonPart(med_idt fid, const char *mNam
     }
 }
 
-void MEDFileUMeshPerType::loadPolyg(med_idt fid, const char *mName, int dt, int it, int mdim, int arraySize, med_geometry_type geoElt,
+void MEDFileUMeshPerType::loadPolyg(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType arraySize, med_geometry_type geoElt,
                                     med_entity_type entity, MEDFileMeshReadSelector *mrs)
 {
   med_bool changement,transformation;
-  med_int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_INDEX_NODE,MED_NODAL,&changement,&transformation)-1);
+  mcIdType curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_INDEX_NODE,MED_NODAL,&changement,&transformation)-1);
   _m=MEDCoupling1DGTUMesh::New(mName,geoElt==MED_POLYGON?INTERP_KERNEL::NORM_POLYGON:INTERP_KERNEL::NORM_QPOLYG);
   MCAuto<MEDCoupling1DGTUMesh> mc(DynamicCast<MEDCoupling1GTUMesh,MEDCoupling1DGTUMesh>(_m));
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
+  MCAuto<DataArrayMedInt> conn(DataArrayMedInt::New()),connI(DataArrayMedInt::New());
   conn->alloc(arraySize,1); connI->alloc(curNbOfElem+1,1);
   MEDFILESAFECALLERRD0(MEDmeshPolygon2Rd,(fid,mName,dt,it,MED_CELL,geoElt,MED_NODAL,connI->getPointer(),conn->getPointer()));
-  std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
-  std::transform(connI->begin(),connI->end(),connI->getPointer(),std::bind2nd(std::plus<int>(),-1));
-  mc->setNodalConnectivity(conn,connI);
+  std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<med_int>(),-1));
+  std::transform(connI->begin(),connI->end(),connI->getPointer(),std::bind2nd(std::plus<med_int>(),-1));
+  mc->setNodalConnectivity(FromMedIntArray<mcIdType>(conn),FromMedIntArray<mcIdType>(connI));
   loadCommonPart(fid,mName,dt,it,curNbOfElem,geoElt,entity,mrs);
 }
 
-void MEDFileUMeshPerType::loadPolyh(med_idt fid, const char *mName, int dt, int it, int mdim, int connFaceLgth, med_geometry_type geoElt,
+void MEDFileUMeshPerType::loadPolyh(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType connFaceLgth, med_geometry_type geoElt,
                                     med_entity_type entity, MEDFileMeshReadSelector *mrs)
 {
   med_bool changement,transformation;
   med_int indexFaceLgth(MEDmeshnEntity(fid,mName,dt,it,MED_CELL,MED_POLYHEDRON,MED_INDEX_NODE,MED_NODAL,&changement,&transformation));
-  int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,MED_CELL,MED_POLYHEDRON,MED_INDEX_FACE,MED_NODAL,&changement,&transformation)-1);
+  mcIdType curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,MED_CELL,MED_POLYHEDRON,MED_INDEX_FACE,MED_NODAL,&changement,&transformation)-1);
   _m=MEDCoupling1DGTUMesh::New(mName,INTERP_KERNEL::NORM_POLYHED);
   MCAuto<MEDCoupling1DGTUMesh> mc(DynamicCastSafe<MEDCoupling1GTUMesh,MEDCoupling1DGTUMesh>(_m));
-  INTERP_KERNEL::AutoPtr<int> index=new int[curNbOfElem+1];
-  INTERP_KERNEL::AutoPtr<int> indexFace=new int[indexFaceLgth];
-  INTERP_KERNEL::AutoPtr<int> locConn=new int[connFaceLgth];
+  INTERP_KERNEL::AutoPtr<med_int> index=new med_int[curNbOfElem+1];
+  INTERP_KERNEL::AutoPtr<med_int> indexFace=new med_int[indexFaceLgth];
+  INTERP_KERNEL::AutoPtr<med_int> locConn=new med_int[connFaceLgth];
   MEDFILESAFECALLERRD0(MEDmeshPolyhedronRd,(fid,mName,dt,it,MED_CELL,MED_NODAL,index,indexFace,locConn));
-  MCAuto<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
-  int arraySize=connFaceLgth;
-  for(int i=0;i<curNbOfElem;i++)
+  MCAuto<DataArrayIdType> conn(DataArrayIdType::New()),connI(DataArrayIdType::New());
+  mcIdType arraySize=connFaceLgth;
+  for(mcIdType i=0;i<curNbOfElem;i++)
     arraySize+=index[i+1]-index[i]-1;
-  conn=DataArrayInt::New();
+  conn=DataArrayIdType::New();
   conn->alloc(arraySize,1);
-  int *wFinalConn=conn->getPointer();
+  mcIdType *wFinalConn=conn->getPointer();
   connI->alloc(curNbOfElem+1,1);
-  int *finalIndex(connI->getPointer());
+  mcIdType *finalIndex(connI->getPointer());
   finalIndex[0]=0;
-  for(int i=0;i<curNbOfElem;i++)
+  for(mcIdType i=0;i<curNbOfElem;i++)
     {
       finalIndex[i+1]=finalIndex[i]+index[i+1]-index[i]-1+indexFace[index[i+1]-1]-indexFace[index[i]-1];
-      wFinalConn=std::transform(locConn+indexFace[index[i]-1]-1,locConn+indexFace[index[i]]-1,wFinalConn,std::bind2nd(std::plus<int>(),-1));
-      for(int j=index[i];j<index[i+1]-1;j++)
+      wFinalConn=std::transform(locConn+indexFace[index[i]-1]-1,locConn+indexFace[index[i]]-1,wFinalConn,std::bind2nd(std::plus<mcIdType>(),-1));
+      for(mcIdType j=index[i];j<index[i+1]-1;j++)
         {
           *wFinalConn++=-1;
-          wFinalConn=std::transform(locConn+indexFace[j]-1,locConn+indexFace[j+1]-1,wFinalConn,std::bind2nd(std::plus<int>(),-1));
+          wFinalConn=std::transform(locConn+indexFace[j]-1,locConn+indexFace[j+1]-1,wFinalConn,std::bind2nd(std::plus<mcIdType>(),-1));
         }
     }
   mc->setNodalConnectivity(conn,connI);
   loadCommonPart(fid,mName,dt,it,curNbOfElem,MED_POLYHEDRON,entity,mrs);
 }
 
-void MEDFileUMeshPerType::Write(med_idt fid, const std::string& mname, int mdim, const MEDCoupling1GTUMesh *m, const DataArrayInt *fam, const DataArrayInt *num, const DataArrayAsciiChar *names)
+void MEDFileUMeshPerType::Write(med_idt fid, const std::string& mname, int mdim, const MEDCoupling1GTUMesh *m, const DataArrayIdType *fam, const DataArrayIdType *num, const DataArrayAsciiChar *names)
 {
-  int nbOfCells=m->getNumberOfCells();
+  mcIdType nbOfCells=m->getNumberOfCells();
   if(nbOfCells<1)
     return ;
   int dt,it;
@@ -356,9 +361,9 @@ void MEDFileUMeshPerType::Write(med_idt fid, const std::string& mname, int mdim,
       const MEDCoupling1SGTUMesh *m0(dynamic_cast<const MEDCoupling1SGTUMesh *>(m));
       if(!m0)
         throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::Write : internal error #1 !");
-      MCAuto<DataArrayInt> arr(m0->getNodalConnectivity()->deepCopy());
-      std::transform(arr->begin(),arr->end(),arr->getPointer(),std::bind2nd(std::plus<int>(),1));
-      MEDFILESAFECALLERWR0(MEDmeshElementConnectivityWr,(fid,mname.c_str(),dt,it,timm,MED_CELL,curMedType,MED_NODAL,MED_FULL_INTERLACE,nbOfCells,arr->begin()));
+      MCAuto<DataArrayMedInt> arr(DataArrayMedInt::Copy(m0->getNodalConnectivity()));
+      std::transform(arr->begin(),arr->end(),arr->getPointer(),std::bind2nd(std::plus<med_int>(),1));
+      MEDFILESAFECALLERWR0(MEDmeshElementConnectivityWr,(fid,mname.c_str(),dt,it,timm,MED_CELL,curMedType,MED_NODAL,MED_FULL_INTERLACE,ToMedInt(nbOfCells),arr->begin()));
     }
   else
     {
@@ -367,31 +372,31 @@ void MEDFileUMeshPerType::Write(med_idt fid, const std::string& mname, int mdim,
         throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::Write : internal error #2 !");
       if(ikt==INTERP_KERNEL::NORM_POLYGON || ikt==INTERP_KERNEL::NORM_QPOLYG)
         {
-          MCAuto<DataArrayInt> arr(m0->getNodalConnectivity()->deepCopy()),arrI(m0->getNodalConnectivityIndex()->deepCopy());
-          std::transform(arr->begin(),arr->end(),arr->getPointer(),std::bind2nd(std::plus<int>(),1));
-          std::transform(arrI->begin(),arrI->end(),arrI->getPointer(),std::bind2nd(std::plus<int>(),1));
-          MEDFILESAFECALLERWR0(MEDmeshPolygon2Wr,(fid,mname.c_str(),dt,it,timm,MED_CELL,ikt==INTERP_KERNEL::NORM_POLYGON?MED_POLYGON:MED_POLYGON2,MED_NODAL,nbOfCells+1,arrI->begin(),arr->begin()));
+          MCAuto<DataArrayMedInt> arr(DataArrayMedInt::Copy(m0->getNodalConnectivity())),arrI(DataArrayMedInt::Copy(m0->getNodalConnectivityIndex()));
+          std::transform(arr->begin(),arr->end(),arr->getPointer(),std::bind2nd(std::plus<med_int>(),1));
+          std::transform(arrI->begin(),arrI->end(),arrI->getPointer(),std::bind2nd(std::plus<med_int>(),1));
+          MEDFILESAFECALLERWR0(MEDmeshPolygon2Wr,(fid,mname.c_str(),dt,it,timm,MED_CELL,ikt==INTERP_KERNEL::NORM_POLYGON?MED_POLYGON:MED_POLYGON2,MED_NODAL,ToMedInt(nbOfCells+1),arrI->begin(),arr->begin()));
         }
       else
         {
-          const int *conn(m0->getNodalConnectivity()->begin()),*connI(m0->getNodalConnectivityIndex()->begin());
-          int meshLgth=m0->getNodalConnectivityLength();
-          int nbOfFaces=std::count(conn,conn+meshLgth,-1)+nbOfCells;
-          INTERP_KERNEL::AutoPtr<int> tab1=new int[nbOfCells+1];
-          int *w1=tab1; *w1=1;
-          INTERP_KERNEL::AutoPtr<int> tab2=new int[nbOfFaces+1];
-          int *w2=tab2; *w2=1;
-          INTERP_KERNEL::AutoPtr<int> bigtab=new int[meshLgth];
-          int *bt=bigtab;
-          for(int i=0;i<nbOfCells;i++,w1++)
+          const mcIdType *conn(m0->getNodalConnectivity()->begin()),*connI(m0->getNodalConnectivityIndex()->begin());
+          mcIdType meshLgth=m0->getNodalConnectivityLength();
+          mcIdType nbOfFaces=ToIdType(std::count(conn,conn+meshLgth,-1)+nbOfCells);
+          INTERP_KERNEL::AutoPtr<med_int> tab1=new med_int[nbOfCells+1];
+          med_int *w1=tab1; *w1=1;
+          INTERP_KERNEL::AutoPtr<med_int> tab2=new med_int[nbOfFaces+1];
+          med_int *w2=tab2; *w2=1;
+          INTERP_KERNEL::AutoPtr<med_int> bigtab=new med_int[meshLgth];
+          med_int *bt=bigtab;
+          for(mcIdType i=0;i<nbOfCells;i++,w1++)
             {
               int nbOfFaces2=0;
-              for(const int *w=conn+connI[i];w!=conn+connI[i+1];w2++)
+              for(const mcIdType *w=conn+connI[i];w!=conn+connI[i+1];w2++)
                 {
-                  const int *wend=std::find(w,conn+connI[i+1],-1);
-                  bt=std::transform(w,wend,bt,std::bind2nd(std::plus<int>(),1));
-                  int nbOfNode=std::distance(w,wend);
-                  w2[1]=w2[0]+nbOfNode;
+                  const mcIdType *wend=std::find(w,conn+connI[i+1],-1);
+                  bt=std::transform(w,wend,bt,std::bind2nd(std::plus<mcIdType>(),1));
+                  std::size_t nbOfNode=std::distance(w,wend);
+                  w2[1]=w2[0]+(med_int)nbOfNode;
                   if(wend!=conn+connI[i+1])
                     w=wend+1;
                   else
@@ -400,13 +405,13 @@ void MEDFileUMeshPerType::Write(med_idt fid, const std::string& mname, int mdim,
                 }
               w1[1]=w1[0]+nbOfFaces2;
             }
-          MEDFILESAFECALLERWR0(MEDmeshPolyhedronWr,(fid,mname.c_str(),dt,it,timm,MED_CELL,MED_NODAL,nbOfCells+1,tab1,nbOfFaces+1,tab2,bigtab));
+          MEDFILESAFECALLERWR0(MEDmeshPolyhedronWr,(fid,mname.c_str(),dt,it,timm,MED_CELL,MED_NODAL,ToMedInt(nbOfCells+1),tab1,ToMedInt(nbOfFaces+1),tab2,bigtab));
         }
     }
   if(fam)
-    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,nbOfCells,fam->getConstPointer()));
+    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,ToMedInt(nbOfCells),ToMedIntArray<mcIdType>(fam)->getConstPointer()));
   if(num)
-    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,nbOfCells,num->getConstPointer()));
+    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,ToMedInt(nbOfCells),ToMedIntArray<mcIdType>(num)->getConstPointer()));
   if(names)
     {
       if(names->getNumberOfComponents()!=MED_SNAME_SIZE)
@@ -415,6 +420,6 @@ void MEDFileUMeshPerType::Write(med_idt fid, const std::string& mname, int mdim,
           oss << " ! The array has " << names->getNumberOfComponents() << " components !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,nbOfCells,names->getConstPointer()));
+      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,ToMedInt(nbOfCells),names->getConstPointer()));
     }
 }
index c6fef7af0e76e343c1e40f699886a451e1bf5fdb..b0417ae67b08615eb60b157f7a62c1450b25eb7a 100644 (file)
@@ -39,16 +39,16 @@ namespace MEDCoupling
   {
   public:
     static MEDFileUMeshPerTypeCommon *New();
-    void loadCommonPart(med_idt fid, const char *mName, int dt, int it, int curNbOfElem, med_geometry_type geoElt,
+    void loadCommonPart(med_idt fid, const char *mName, int dt, int it, mcIdType curNbOfElem, med_geometry_type geoElt,
                         med_entity_type entity, MEDFileMeshReadSelector *mrs);
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
-    const DataArrayInt *getFam() const { return _fam; }
-    const DataArrayInt *getNum() const { return _num; }
+    const DataArrayIdType *getFam() const { return _fam; }
+    const DataArrayIdType *getNum() const { return _num; }
     const DataArrayAsciiChar *getNames() const { return _names; }
   protected:
-    MCAuto<DataArrayInt> _num;
-    MCAuto<DataArrayInt> _fam;
+    MCAuto<DataArrayIdType> _num;
+    MCAuto<DataArrayIdType> _fam;
     MCAuto<DataArrayAsciiChar> _names;
   };
 
@@ -56,29 +56,29 @@ namespace MEDCoupling
   {
   public:
     static MEDFileUMeshPerType *New(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType geoElt2, MEDFileMeshReadSelector *mrs);
-    static MEDFileUMeshPerType *NewPart(med_idt fid, const char *mName, int dt, int it, int mdim, INTERP_KERNEL::NormalizedCellType geoElt2, int strt, int stp, int step, MEDFileMeshReadSelector *mrs);
+    static MEDFileUMeshPerType *NewPart(med_idt fid, const char *mName, int dt, int it, int mdim, INTERP_KERNEL::NormalizedCellType geoElt2, mcIdType strt, mcIdType stp, mcIdType step, MEDFileMeshReadSelector *mrs);
     static bool isExisting(med_idt fid, const char *mName, int dt, int it, med_geometry_type geoElt, med_entity_type& whichEntity);
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
     int getDim() const;
     MEDCoupling1GTUMesh *getMesh() const { return const_cast<MEDCoupling1GTUMesh *>((const MEDCoupling1GTUMesh *)_m); }
     const PartDefinition *getPartDef() const { return _pd; }
-    static void Write(med_idt fid, const std::string& mname, int mdim, const MEDCoupling1GTUMesh *m, const DataArrayInt *fam, const DataArrayInt *num, const DataArrayAsciiChar *names);
+    static void Write(med_idt fid, const std::string& mname, int mdim, const MEDCoupling1GTUMesh *m, const DataArrayIdType *fam, const DataArrayIdType *num, const DataArrayAsciiChar *names);
   private:
     MEDFileUMeshPerType();
     MEDFileUMeshPerType(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
                         med_entity_type entity, MEDFileMeshReadSelector *mrs);
     void loadPart(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
-                  med_entity_type entity, int strt, int end, int step, MEDFileMeshReadSelector *mrs);
-    void loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
+                  med_entity_type entity, mcIdType strt, mcIdType end, mcIdType step, MEDFileMeshReadSelector *mrs);
+    void loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
                             med_entity_type entity, MEDFileMeshReadSelector *mrs);
-    void loadPartStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
-                            med_entity_type entity, int strt, int end, int step, MEDFileMeshReadSelector *mrs);
-    void loadPolyg(med_idt fid, const char *mName, int dt, int it, int mdim, int arraySize, med_geometry_type geoElt,
+    void loadPartStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
+                            med_entity_type entity, mcIdType strt, mcIdType end, mcIdType step, MEDFileMeshReadSelector *mrs);
+    void loadPolyg(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType arraySize, med_geometry_type geoElt,
                    med_entity_type entity, MEDFileMeshReadSelector *mrs);
-    void loadPolyh(med_idt fid, const char *mName, int dt, int it, int mdim, int connFaceLgth, med_geometry_type geoElt,
+    void loadPolyh(med_idt fid, const char *mName, int dt, int it, int mdim, mcIdType connFaceLgth, med_geometry_type geoElt,
                    med_entity_type entity, MEDFileMeshReadSelector *mrs);
-    void loadPartOfCellCommonPart(med_idt fid, const char *mName, int strt, int stp, int step, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, med_entity_type entity, MEDFileMeshReadSelector *mrs);
+    void loadPartOfCellCommonPart(med_idt fid, const char *mName, mcIdType strt, mcIdType stp, mcIdType step, int dt, int it, int mdim, mcIdType curNbOfElem, med_geometry_type geoElt, med_entity_type entity, MEDFileMeshReadSelector *mrs);
   private:
     MCAuto<MEDCoupling1GTUMesh> _m;
     MCAuto<PartDefinition> _pd;
index 898c501450d98740fde68fd77f76f409b12c7bc2..c58d94320f37b40091463131afe1c2751c1a4524 100644 (file)
@@ -47,17 +47,19 @@ int MEDFileMeshL2::ZE_SEP2_FOR_FAMILY_KILLERS=4;
 std::vector<std::string> MeshCls::getAxisInfoOnMesh(med_idt fid, const std::string& mName, MEDCoupling::MEDCouplingMeshType& meshType, MEDCoupling::MEDCouplingAxisType& axType, int& nstep, int& Mdim, MEDFileString& description, MEDFileString& dtunit, MEDFileString& univName) const
 {
   med_mesh_type type_maillage;
-  med_int spaceDim;
+  med_int spaceDim, meshDim, nbSteps;
   med_sorting_type stype;
   med_axis_type axistype;
-  int naxis(MEDmeshnAxis(fid,getID()));
+  med_int naxis(MEDmeshnAxis(fid,getID()));
   INTERP_KERNEL::AutoPtr<char> nameTmp(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> axisname(MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> axisunit(MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> univTmp(MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE));
-  if(MEDmeshInfo(fid,getID(),nameTmp,&spaceDim,&Mdim,&type_maillage,description.getPointer(),dtunit.getPointer(),
-      &stype,&nstep,&axistype,axisname,axisunit)!=0)
+  if(MEDmeshInfo(fid,getID(),nameTmp,&spaceDim,&meshDim,&type_maillage,description.getPointer(),dtunit.getPointer(),
+      &stype,&nbSteps,&axistype,axisname,axisunit)!=0)
     throw INTERP_KERNEL::Exception("A problem has been detected when trying to get info on mesh !");
+  Mdim=FromMedInt<int>(meshDim);
+  nstep=FromMedInt<int>(nbSteps);
   MEDmeshUniversalNameRd(fid,nameTmp,univName.getPointer());// do not protect  MEDFILESAFECALLERRD0 call : Thanks to fra.med.
   axType=MEDFileMeshL2::TraduceAxisType(axistype);
   switch(type_maillage)
@@ -127,9 +129,9 @@ std::vector<std::string> StructMeshCls::getAxisInfoOnMesh(med_idt fid, const std
   INTERP_KERNEL::AutoPtr<char> msn(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> zeDescription(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE));
   med_axis_type medAxType;
-  int nAxis(MEDsupportMeshnAxis(fid,getID()));
+  med_int nAxis(MEDsupportMeshnAxis(fid,getID()));
   INTERP_KERNEL::AutoPtr<char> axisName(new char[MED_SNAME_SIZE*nAxis+1]),axisUnit(new char[MED_SNAME_SIZE*nAxis+1]);
-  int spaceDim(0),meshDim(0);
+  med_int spaceDim(0),meshDim(0);
   MEDFILESAFECALLERRD0(MEDsupportMeshInfo,(fid,getID(),msn,&spaceDim,&meshDim,zeDescription,&medAxType,axisName,axisUnit));
   std::string descriptionCpp(MEDLoaderBase::buildStringFromFortran(zeDescription,MED_COMMENT_SIZE));
   description.set(descriptionCpp.c_str());
@@ -179,11 +181,11 @@ INTERP_KERNEL::AutoCppPtr<MeshOrStructMeshCls> MEDFileMeshL2::GetMeshIdFromName(
   int ret=-1;
   med_sorting_type stype;
   std::vector<std::string> ms;
-  int nstep;
+  med_int nstep;
   med_axis_type axistype;
   for(int i=0;i<n && found==0;i++)
     {
-      int naxis(MEDmeshnAxis(fid,i+1));
+      med_int naxis(MEDmeshnAxis(fid,i+1));
       INTERP_KERNEL::AutoPtr<char> axisname(MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE)),axisunit(MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE));
       MEDFILESAFECALLERRD0(MEDmeshInfo,(fid,i+1,nommaa,&spaceDim,&dim,&type_maillage,maillage_description,dtunit,&stype,&nstep,&axistype,axisname,axisunit));      
       dtunit1=MEDLoaderBase::buildStringFromFortran(dtunit,sizeof(dtunit));
@@ -197,10 +199,10 @@ INTERP_KERNEL::AutoCppPtr<MeshOrStructMeshCls> MEDFileMeshL2::GetMeshIdFromName(
     }
   if(found==0)
     {//last chance ! Is it a support mesh ?
-      int nbSM(MEDnSupportMesh(fid));
+      med_int nbSM(MEDnSupportMesh(fid));
       for(int i=0;i<nbSM && found==0;i++)
         {
-          int naxis(MEDsupportMeshnAxis(fid,i+1));
+          med_int naxis(MEDsupportMeshnAxis(fid,i+1));
           INTERP_KERNEL::AutoPtr<char> axisname(MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE)),axisunit(MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE));
           MEDFILESAFECALLERRD0(MEDsupportMeshInfo,(fid,i+1,nommaa,&spaceDim,&dim,maillage_description,&axistype,axisname,axisunit));
           std::string cur(MEDLoaderBase::buildStringFromFortran(nommaa,sizeof(nommaa)));
@@ -249,14 +251,14 @@ INTERP_KERNEL::AutoCppPtr<MeshOrStructMeshCls> MEDFileMeshL2::GetMeshIdFromName(
         med_int numdt,numit;
         med_float dtt;
         MEDFILESAFECALLERRD0(MEDmeshComputationStepInfo,(fid,mName.c_str(),1,&numdt,&numit,&dtt));
-        dt=numdt; it=numit;
+        dt=FromMedInt<int>(numdt); it=FromMedInt<int>(numit);
         return new MeshCls(ret);
       }
     case 2:
       {
         meshType=UNSTRUCTURED;
         dt=MED_NO_DT; it=MED_NO_IT; dtunit1.clear();
-        axType=axType=TraduceAxisType(axistype);
+        axType=TraduceAxisType(axistype);
         return new StructMeshCls(ret);
       }
     default:
@@ -278,17 +280,17 @@ std::vector<std::string> MEDFileMeshL2::getAxisInfoOnMesh(med_idt fid, const Mes
   return mId->getAxisInfoOnMesh(fid,mName,meshType,axType,nstep,Mdim,_description,_dt_unit,_univ_name);
 }
 
-void MEDFileMeshL2::ReadFamiliesAndGrps(med_idt fid, const std::string& meshName, std::map<std::string,int>& fams, std::map<std::string, std::vector<std::string> >& grps, MEDFileMeshReadSelector *mrs)
+void MEDFileMeshL2::ReadFamiliesAndGrps(med_idt fid, const std::string& meshName, std::map<std::string,mcIdType>& fams, std::map<std::string, std::vector<std::string> >& grps, MEDFileMeshReadSelector *mrs)
 {
   if(mrs && !(mrs->isCellFamilyFieldReading() || mrs->isNodeFamilyFieldReading()))
     return ;
   char nomfam[MED_NAME_SIZE+1];
   med_int numfam;
-  int nfam=MEDnFamily(fid,meshName.c_str());
-  std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > > crudeFams(nfam);
+  med_int nfam=MEDnFamily(fid,meshName.c_str());
+  std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > > crudeFams(nfam);
   for(int i=0;i<nfam;i++)
     {
-      int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
+      med_int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
       med_int natt=MEDnFamily23Attribute(fid,meshName.c_str(),i+1);
       INTERP_KERNEL::AutoPtr<med_int> attide=new med_int[natt];
       INTERP_KERNEL::AutoPtr<med_int> attval=new med_int[natt];
@@ -299,10 +301,10 @@ void MEDFileMeshL2::ReadFamiliesAndGrps(med_idt fid, const std::string& meshName
       std::vector<std::string> grps(ngro);
       for(int j=0;j<ngro;j++)
         grps[j]=MEDLoaderBase::buildStringFromFortran(gro+j*MED_LNAME_SIZE,MED_LNAME_SIZE);
-      crudeFams[i]=std::pair<std::string,std::pair<int,std::vector<std::string> > >(famName,std::pair<int,std::vector<std::string> >(numfam,grps));
+      crudeFams[i]=std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > >(famName,std::pair<mcIdType,std::vector<std::string> >(numfam,grps));
     }
   RenameFamiliesFromFileToMemInternal(crudeFams);
-  for(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >::const_iterator it0=crudeFams.begin();it0!=crudeFams.end();it0++)
+  for(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >::const_iterator it0=crudeFams.begin();it0!=crudeFams.end();it0++)
     {
       fams[(*it0).first]=(*it0).second.first;
       for(std::vector<std::string>::const_iterator it1=(*it0).second.second.begin();it1!=(*it0).second.second.end();it1++)
@@ -310,11 +312,11 @@ void MEDFileMeshL2::ReadFamiliesAndGrps(med_idt fid, const std::string& meshName
     }
 }
 
-void MEDFileMeshL2::WriteFamiliesAndGrps(med_idt fid, const std::string& mname, const std::map<std::string,int>& fams, const std::map<std::string, std::vector<std::string> >& grps, int tooLongStrPol)
+void MEDFileMeshL2::WriteFamiliesAndGrps(med_idt fid, const std::string& mname, const std::map<std::string,mcIdType>& fams, const std::map<std::string, std::vector<std::string> >& grps, int tooLongStrPol)
 {
-  std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > > crudeFams(fams.size());
+  std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > > crudeFams(fams.size());
   std::size_t ii(0);
-  for(std::map<std::string,int>::const_iterator it=fams.begin();it!=fams.end();it++,ii++)
+  for(std::map<std::string,mcIdType>::const_iterator it=fams.begin();it!=fams.end();it++,ii++)
     {
       std::vector<std::string> grpsOfFam;
       for(std::map<std::string, std::vector<std::string> >::const_iterator it1=grps.begin();it1!=grps.end();it1++)
@@ -322,33 +324,33 @@ void MEDFileMeshL2::WriteFamiliesAndGrps(med_idt fid, const std::string& mname,
           if(std::find((*it1).second.begin(),(*it1).second.end(),(*it).first)!=(*it1).second.end())
             grpsOfFam.push_back((*it1).first);
         }
-      crudeFams[ii]=std::pair<std::string,std::pair<int,std::vector<std::string> > >((*it).first,std::pair<int,std::vector<std::string> >((*it).second,grpsOfFam));
+      crudeFams[ii]=std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > >((*it).first,std::pair<mcIdType,std::vector<std::string> >((*it).second,grpsOfFam));
     }
   RenameFamiliesFromMemToFileInternal(crudeFams);
-  for(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >::const_iterator it=crudeFams.begin();it!=crudeFams.end();it++)
+  for(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >::const_iterator it=crudeFams.begin();it!=crudeFams.end();it++)
     {
-      int ngro((*it).second.second.size());
+      std::size_t ngro((*it).second.second.size());
       INTERP_KERNEL::AutoPtr<char> groName=MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE*ngro);
       int i=0;
       for(std::vector<std::string>::const_iterator it2=(*it).second.second.begin();it2!=(*it).second.second.end();it2++,i++)
         MEDLoaderBase::safeStrCpy2((*it2).c_str(),MED_LNAME_SIZE,groName+i*MED_LNAME_SIZE,tooLongStrPol);
       INTERP_KERNEL::AutoPtr<char> famName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
       MEDLoaderBase::safeStrCpy((*it).first.c_str(),MED_NAME_SIZE,famName,tooLongStrPol);
-      int ret=MEDfamilyCr(fid,mname.c_str(),famName,(*it).second.first,ngro,groName);
+      med_int ret=MEDfamilyCr(fid,mname.c_str(),famName,ToMedInt((*it).second.first),ToMedInt(ngro),groName);
       ret++;
     }
 }
 
-void MEDFileMeshL2::RenameFamiliesPatternInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams, RenameFamiliesPatternFunc func)
+void MEDFileMeshL2::RenameFamiliesPatternInternal(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >& crudeFams, RenameFamiliesPatternFunc func)
 {
   std::size_t ii(0);
   std::vector<std::string> fams(crudeFams.size());
-  for(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >::const_iterator it=crudeFams.begin();it!=crudeFams.end();it++,ii++)
+  for(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >::const_iterator it=crudeFams.begin();it!=crudeFams.end();it++,ii++)
     fams[ii]=(*it).first;
   if(!func(fams))
     return ;
   ii=0;
-  for(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >::iterator it=crudeFams.begin();it!=crudeFams.end();it++,ii++)
+  for(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >::iterator it=crudeFams.begin();it!=crudeFams.end();it++,ii++)
     (*it).first=fams[ii];
 }
 
@@ -356,14 +358,14 @@ void MEDFileMeshL2::RenameFamiliesPatternInternal(std::vector< std::pair<std::st
  * This method is dedicated to the killers that use a same family name to store different family ids. MED file API authorizes it.
  * So this method renames families (if needed generally not !) in order to have a discriminant name for families.
  */
-void MEDFileMeshL2::RenameFamiliesFromFileToMemInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams)
+void MEDFileMeshL2::RenameFamiliesFromFileToMemInternal(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >& crudeFams)
 {
   RenameFamiliesPatternInternal(crudeFams,RenameFamiliesFromFileToMem);
 }
 
 bool MEDFileMeshL2::RenameFamiliesFromFileToMem(std::vector< std::string >& famNames)
 {
-  std::map<std::string,int> m;
+  std::map<std::string,mcIdType> m;
   std::set<std::string> s;
   for(std::vector< std::string >::const_iterator it=famNames.begin();it!=famNames.end();it++)
     {
@@ -375,7 +377,7 @@ bool MEDFileMeshL2::RenameFamiliesFromFileToMem(std::vector< std::string >& famN
     return false;// the general case !
   for(std::vector< std::string >::iterator it=famNames.begin();it!=famNames.end();it++)
     {
-      std::map<std::string,int>::iterator it2(m.find(*it));
+      std::map<std::string,mcIdType>::iterator it2(m.find(*it));
       if(it2!=m.end())
         {
           std::ostringstream oss; oss << *it << ZE_SEP_FOR_FAMILY_KILLERS << std::setfill('0') << std::setw(ZE_SEP2_FOR_FAMILY_KILLERS) << (*it2).second++;
@@ -389,7 +391,7 @@ bool MEDFileMeshL2::RenameFamiliesFromFileToMem(std::vector< std::string >& famN
  * This method is dedicated to the killers that use a same family name to store different family ids. MED file API authorizes it.
  * So this method renames families (if needed generally not !) in order to have a discriminant name for families.
  */
-void MEDFileMeshL2::RenameFamiliesFromMemToFileInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams)
+void MEDFileMeshL2::RenameFamiliesFromMemToFileInternal(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >& crudeFams)
 {
   RenameFamiliesPatternInternal(crudeFams,RenameFamiliesFromMemToFile);
 }
@@ -413,7 +415,7 @@ bool MEDFileMeshL2::RenameFamiliesFromMemToFile(std::vector< std::string >& famN
       if(found!=std::string::npos && found>=1)
         {
           std::string s1((*it).substr(found+sizeof(ZE_SEP_FOR_FAMILY_KILLERS)-1));
-          if(s1.size()!=ZE_SEP2_FOR_FAMILY_KILLERS)
+          if((int)s1.size()!=ZE_SEP2_FOR_FAMILY_KILLERS)
             continue;
           int k(-1);
           std::istringstream iss(s1);
@@ -544,7 +546,7 @@ void MEDFileUMeshL2::loadAll(med_idt fid, const MeshOrStructMeshCls *mId, const
   loadCoords(fid,infosOnComp,mName,dt,it);
 }
 
-void MEDFileUMeshL2::loadPart(med_idt fid, const MeshOrStructMeshCls *mId, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
+void MEDFileUMeshL2::loadPart(med_idt fid, const MeshOrStructMeshCls *mId, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
 {
   int Mdim;
   std::vector<std::string> infosOnComp(loadCommonPart(fid,mId,mName,dt,it,Mdim));
@@ -552,13 +554,13 @@ void MEDFileUMeshL2::loadPart(med_idt fid, const MeshOrStructMeshCls *mId, const
     return ;
   loadPartOfConnectivity(fid,Mdim,mName,types,slicPerTyp,dt,it,mrs);
   med_bool changement,transformation;
-  int nCoords(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation));
+  mcIdType nCoords(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation));
   std::vector<bool> fetchedNodeIds(nCoords,false);
   for(std::vector< std::vector< MCAuto<MEDFileUMeshPerType> > >::const_iterator it0=_per_type_mesh.begin();it0!=_per_type_mesh.end();it0++)
     for(std::vector< MCAuto<MEDFileUMeshPerType> >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
       (*it1)->getMesh()->computeNodeIdsAlg(fetchedNodeIds);
-  int nMin(std::distance(fetchedNodeIds.begin(),std::find(fetchedNodeIds.begin(),fetchedNodeIds.end(),true)));
-  int nMax(std::distance(fetchedNodeIds.rbegin(),std::find(fetchedNodeIds.rbegin(),fetchedNodeIds.rend(),true)));
+  mcIdType nMin(ToIdType(std::distance(fetchedNodeIds.begin(),std::find(fetchedNodeIds.begin(),fetchedNodeIds.end(),true))));
+  mcIdType nMax(ToIdType(std::distance(fetchedNodeIds.rbegin(),std::find(fetchedNodeIds.rbegin(),fetchedNodeIds.rend(),true))));
   nMax=nCoords-nMax;
   for(std::vector< std::vector< MCAuto<MEDFileUMeshPerType> > >::const_iterator it0=_per_type_mesh.begin();it0!=_per_type_mesh.end();it0++)
     for(std::vector< MCAuto<MEDFileUMeshPerType> >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
@@ -579,7 +581,7 @@ void MEDFileUMeshL2::loadConnectivity(med_idt fid, int mdim, const std::string&
   sortTypes();
 }
 
-void MEDFileUMeshL2::loadPartOfConnectivity(med_idt fid, int mdim, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
+void MEDFileUMeshL2::loadPartOfConnectivity(med_idt fid, int mdim, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
 {
   std::size_t nbOfTypes(types.size());
   if(slicPerTyp.size()!=3*nbOfTypes)
@@ -591,7 +593,7 @@ void MEDFileUMeshL2::loadPartOfConnectivity(med_idt fid, int mdim, const std::st
   _per_type_mesh[0].clear();
   for(std::size_t ii=0;ii<nbOfTypes;ii++)
     {
-      int strt(slicPerTyp[3*ii+0]),stp(slicPerTyp[3*ii+1]),step(slicPerTyp[3*ii+2]);
+      mcIdType strt(slicPerTyp[3*ii+0]),stp(slicPerTyp[3*ii+1]),step(slicPerTyp[3*ii+2]);
       MCAuto<MEDFileUMeshPerType> tmp(MEDFileUMeshPerType::NewPart(fid,mName.c_str(),dt,it,mdim,types[ii],strt,stp,step,mrs));
       _per_type_mesh[0].push_back(tmp);
     }
@@ -602,7 +604,7 @@ void MEDFileUMeshL2::loadCoords(med_idt fid, const std::vector<std::string>& inf
 {
   int spaceDim((int)infosOnComp.size());
   med_bool changement,transformation;
-  int nCoords(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation));
+  med_int nCoords(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation));
   _coords=DataArrayDouble::New();
   _coords->alloc(nCoords,spaceDim);
   double *coordsPtr(_coords->getPointer());
@@ -610,17 +612,19 @@ void MEDFileUMeshL2::loadCoords(med_idt fid, const std::vector<std::string>& inf
     MEDFILESAFECALLERRD0(MEDmeshNodeCoordinateRd,(fid,mName.c_str(),dt,it,MED_FULL_INTERLACE,coordsPtr));
   if(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,MED_FAMILY_NUMBER,MED_NODAL,&changement,&transformation)>0)
     {
-      _fam_coords=DataArrayInt::New();
-      _fam_coords->alloc(nCoords,1);
-      MEDFILESAFECALLERRD0(MEDmeshEntityFamilyNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,_fam_coords->getPointer()));
+      MCAuto<DataArrayMedInt> miFamCoord=DataArrayMedInt::New();
+      miFamCoord->alloc(nCoords,1);
+      MEDFILESAFECALLERRD0(MEDmeshEntityFamilyNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,miFamCoord->getPointer()));
+      _fam_coords=FromMedIntArray<mcIdType>(miFamCoord);
     }
   else
     _fam_coords=0;
   if(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,MED_NUMBER,MED_NODAL,&changement,&transformation)>0)
     {
-      _num_coords=DataArrayInt::New();
-      _num_coords->alloc(nCoords,1);
-      MEDFILESAFECALLERRD0(MEDmeshEntityNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,_num_coords->getPointer()));
+      MCAuto<DataArrayMedInt> miNumCoord=DataArrayMedInt::New();
+      miNumCoord->alloc(nCoords,1);
+      MEDFILESAFECALLERRD0(MEDmeshEntityNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,miNumCoord->getPointer()));
+      _num_coords=FromMedIntArray<mcIdType>(miNumCoord);
     }
   else
     _num_coords=0;
@@ -635,44 +639,47 @@ void MEDFileUMeshL2::loadCoords(med_idt fid, const std::vector<std::string>& inf
     _name_coords=0;
   if(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,MED_GLOBAL_NUMBER,MED_NODAL,&changement,&transformation)>0)
     {
-      _global_num_coords=DataArrayInt::New();
-      _global_num_coords->alloc(nCoords,1);
-      MEDFILESAFECALLERRD0(MEDmeshGlobalNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,_global_num_coords->getPointer()));
+      MCAuto<DataArrayMedInt> miNumCoord=DataArrayMedInt::New();
+      miNumCoord->alloc(nCoords,1);
+      MEDFILESAFECALLERRD0(MEDmeshGlobalNumberRd,(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,miNumCoord->getPointer()));
+      _global_num_coords=FromMedIntArray<mcIdType>(miNumCoord);
     }
   for(int i=0;i<spaceDim;i++)
     _coords->setInfoOnComponent(i,infosOnComp[i]);
 }
 
-void MEDFileUMeshL2::loadPartCoords(med_idt fid, const std::vector<std::string>& infosOnComp, const std::string& mName, int dt, int it, int nMin, int nMax)
+void MEDFileUMeshL2::loadPartCoords(med_idt fid, const std::vector<std::string>& infosOnComp, const std::string& mName, int dt, int it, mcIdType nMin, mcIdType nMax)
 {
   med_bool changement,transformation;
-  int spaceDim((int)infosOnComp.size()),nCoords(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation));
+  med_int spaceDim((int)infosOnComp.size()),nCoords(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation));
   _coords=DataArrayDouble::New();
-  int nbNodesToLoad(nMax-nMin);
+  mcIdType nbNodesToLoad(nMax-nMin);
   _coords->alloc(nbNodesToLoad,spaceDim);
   med_filter filter=MED_FILTER_INIT,filter2=MED_FILTER_INIT;
   MEDfilterBlockOfEntityCr(fid,/*nentity*/nCoords,/*nvaluesperentity*/1,/*nconstituentpervalue*/spaceDim,
                            MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
-                           /*start*/nMin+1,/*stride*/1,/*count*/1,/*blocksize*/nbNodesToLoad,
+                           /*start*/ToMedInt(nMin+1),/*stride*/1,/*count*/1,/*blocksize*/ToMedInt(nbNodesToLoad),
                            /*lastblocksize=useless because count=1*/0,&filter);
   MEDFILESAFECALLERRD0(MEDmeshNodeCoordinateAdvancedRd,(fid,mName.c_str(),dt,it,&filter,_coords->getPointer()));
   _part_coords=PartDefinition::New(nMin,nMax,1);
   MEDfilterClose(&filter);
   MEDfilterBlockOfEntityCr(fid,nCoords,1,1,MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,
-                           MED_NO_PROFILE,nMin+1,1,1,nbNodesToLoad,0,&filter2);
+                           MED_NO_PROFILE,ToMedInt(nMin+1),1,1,ToMedInt(nbNodesToLoad),0,&filter2);
   if(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,MED_FAMILY_NUMBER,MED_NODAL,&changement,&transformation)>0)
     {
-      _fam_coords=DataArrayInt::New();
-      _fam_coords->alloc(nbNodesToLoad,1);
-      MEDFILESAFECALLERRD0(MEDmeshEntityAttributeAdvancedRd,(fid,mName.c_str(),MED_FAMILY_NUMBER,dt,it,MED_NODE,MED_NO_GEOTYPE,&filter2,_fam_coords->getPointer()));
+      MCAuto<DataArrayMedInt> miFamCoord=DataArrayMedInt::New();
+      miFamCoord->alloc(nbNodesToLoad,1);
+      MEDFILESAFECALLERRD0(MEDmeshEntityAttributeAdvancedRd,(fid,mName.c_str(),MED_FAMILY_NUMBER,dt,it,MED_NODE,MED_NO_GEOTYPE,&filter2,miFamCoord->getPointer()));
+      _fam_coords=FromMedIntArray<mcIdType>(miFamCoord);
     }
   else
     _fam_coords=0;
   if(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,MED_NUMBER,MED_NODAL,&changement,&transformation)>0)
     {
-      _num_coords=DataArrayInt::New();
-      _num_coords->alloc(nbNodesToLoad,1);
-      MEDFILESAFECALLERRD0(MEDmeshEntityAttributeAdvancedRd,(fid,mName.c_str(),MED_NUMBER,dt,it,MED_NODE,MED_NO_GEOTYPE,&filter2,_num_coords->getPointer()));
+      MCAuto<DataArrayMedInt> miNumCoord=DataArrayMedInt::New();
+      miNumCoord->alloc(nbNodesToLoad,1);
+      MEDFILESAFECALLERRD0(MEDmeshEntityAttributeAdvancedRd,(fid,mName.c_str(),MED_NUMBER,dt,it,MED_NODE,MED_NO_GEOTYPE,&filter2,miNumCoord->getPointer()));
+      _num_coords=FromMedIntArray<mcIdType>(miNumCoord);
     }
   else
     _num_coords=0;
@@ -722,15 +729,15 @@ void MEDFileUMeshL2::sortTypes()
   _per_type_mesh.resize(_per_type_mesh.size()-nbOfUselessLev);
 }
 
-void MEDFileUMeshL2::WriteCoords(med_idt fid, const std::string& mname, int dt, int it, double time, const DataArrayDouble *coords, const DataArrayInt *famCoords, const DataArrayInt *numCoords, const DataArrayAsciiChar *nameCoords, const DataArrayInt *globalNumCoords)
+void MEDFileUMeshL2::WriteCoords(med_idt fid, const std::string& mname, int dt, int it, double time, const DataArrayDouble *coords, const DataArrayIdType *famCoords, const DataArrayIdType *numCoords, const DataArrayAsciiChar *nameCoords, const DataArrayIdType *globalNumCoords)
 {
   if(!coords)
     return ;
-  MEDFILESAFECALLERWR0(MEDmeshNodeCoordinateWr,(fid,mname.c_str(),dt,it,time,MED_FULL_INTERLACE,coords->getNumberOfTuples(),coords->begin()));
+  MEDFILESAFECALLERWR0(MEDmeshNodeCoordinateWr,(fid,mname.c_str(),dt,it,time,MED_FULL_INTERLACE,ToMedInt(coords->getNumberOfTuples()),coords->begin()));
   if(famCoords)
-    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,famCoords->getNumberOfTuples(),famCoords->begin()));
+    MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,ToMedInt(famCoords->getNumberOfTuples()),ToMedIntArray<mcIdType>(famCoords)->begin()));
   if(numCoords)
-    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,numCoords->getNumberOfTuples(),numCoords->begin()));
+    MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,ToMedInt(numCoords->getNumberOfTuples()),ToMedIntArray<mcIdType>(numCoords)->begin()));
   if(nameCoords)
     {
       if(nameCoords->getNumberOfComponents()!=MED_SNAME_SIZE)
@@ -739,10 +746,10 @@ void MEDFileUMeshL2::WriteCoords(med_idt fid, const std::string& mname, int dt,
           oss << " ! The array has " << nameCoords->getNumberOfComponents() << " components !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,nameCoords->getNumberOfTuples(),nameCoords->begin()));
+      MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NO_GEOTYPE,ToMedInt(nameCoords->getNumberOfTuples()),nameCoords->begin()));
     }
   if(globalNumCoords)
-    MEDFILESAFECALLERWR0(MEDmeshGlobalNumberWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NONE,globalNumCoords->getNumberOfTuples(),globalNumCoords->begin()));
+    MEDFILESAFECALLERWR0(MEDmeshGlobalNumberWr,(fid,mname.c_str(),dt,it,MED_NODE,MED_NONE,ToMedInt(globalNumCoords->getNumberOfTuples()),ToMedIntArray<mcIdType>(globalNumCoords)->begin()));
 }
 
 bool MEDFileUMeshL2::isFamDefinedOnLev(int levId) const
@@ -797,7 +804,7 @@ void MEDFileCMeshL2::loadAll(med_idt fid, const MeshOrStructMeshCls *mId, const
     {
       med_data_type dataTypeReq=GetDataTypeCorrespondingToSpaceId(i);
       med_bool chgt=MED_FALSE,trsf=MED_FALSE;
-      int nbOfElt(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,dataTypeReq,MED_NO_CMODE,&chgt,&trsf));
+      med_int nbOfElt(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,dataTypeReq,MED_NO_CMODE,&chgt,&trsf));
       MCAuto<DataArrayDouble> da=DataArrayDouble::New();
       da->alloc(nbOfElt,1);
       da->setInfoOnComponent(0,infosOnComp[i]);
@@ -840,11 +847,13 @@ void MEDFileCLMeshL2::loadAll(med_idt fid, const MeshOrStructMeshCls *mId, const
   _order=it;
   //
   _clmesh=MEDCouplingCurveLinearMesh::New();
-  INTERP_KERNEL::AutoPtr<int> stGrid=new int[Mdim];
-  MEDFILESAFECALLERRD0(MEDmeshGridStructRd,(fid,mName.c_str(),dt,it,stGrid));
-  _clmesh->setNodeGridStructure(stGrid,((int *)stGrid)+Mdim);
+  MCAuto<DataArrayMedInt> miStGrid=DataArrayMedInt::New();
+  miStGrid->alloc(Mdim,1);
+  MEDFILESAFECALLERRD0(MEDmeshGridStructRd,(fid,mName.c_str(),dt,it,miStGrid->getPointer()));
+  MCAuto<DataArrayIdType> stGrid=FromMedIntArray<mcIdType>(miStGrid);
+  _clmesh->setNodeGridStructure(stGrid->begin(),stGrid->end());
   med_bool chgt=MED_FALSE,trsf=MED_FALSE;
-  int nbNodes(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&chgt,&trsf));
+  med_int nbNodes(MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&chgt,&trsf));
   MCAuto<DataArrayDouble> da=DataArrayDouble::New();
   da->alloc(nbNodes,infosOnComp.size());
   da->setInfoOnComponents(infosOnComp);
@@ -915,12 +924,12 @@ MEDFileUMeshSplitL1::MEDFileUMeshSplitL1(const MEDFileUMeshL2& l2, const std::st
   const std::vector< MCAuto<MEDFileUMeshPerType> >& v=l2.getLev(id);
   if(v.empty())
     return;
-  int sz=v.size();
+  std::size_t sz=v.size();
   std::vector<const MEDCoupling1GTUMesh *> ms(sz);
-  std::vector<const DataArrayInt *> fams(sz),nums(sz);
+  std::vector<const DataArrayIdType *> fams(sz),nums(sz);
   std::vector<const DataArrayChar *> names(sz);
   std::vector<const PartDefinition *> pds(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     {
       MEDCoupling1GTUMesh *elt(v[i]->getMesh());
       MCAuto<DataArrayDouble> tmp2=l2.getCoords();
@@ -932,32 +941,32 @@ MEDFileUMeshSplitL1::MEDFileUMeshSplitL1(const MEDFileUMeshL2& l2, const std::st
   _m_by_types.assignDefParts(pds);
   if(l2.isFamDefinedOnLev(id))
     {
-      for(int i=0;i<sz;i++)
+      for(std::size_t i=0;i<sz;i++)
         fams[i]=v[i]->getFam();
       if(sz!=1)
-        _fam=DataArrayInt::Aggregate(fams);
+        _fam=DataArrayIdType::Aggregate(fams);
       else
         {
           fams[0]->incrRef();
-          _fam=const_cast<DataArrayInt *>(fams[0]);
+          _fam=const_cast<DataArrayIdType *>(fams[0]);
         }
     }
   if(l2.isNumDefinedOnLev(id))
     {
-      for(int i=0;i<sz;i++)
+      for(std::size_t i=0;i<sz;i++)
         nums[i]=v[i]->getNum();
       if(sz!=1)
-        _num=DataArrayInt::Aggregate(nums);
+        _num=DataArrayIdType::Aggregate(nums);
       else
         {
           nums[0]->incrRef();
-          _num=const_cast<DataArrayInt *>(nums[0]);
+          _num=const_cast<DataArrayIdType *>(nums[0]);
         }
       computeRevNum();
     }
   if(l2.isNamesDefinedOnLev(id))
     {
-      for(int i=0;i<sz;i++)
+      for(std::size_t i=0;i<sz;i++)
         names[i]=v[i]->getNames();
       _names=dynamic_cast<DataArrayAsciiChar *>(DataArrayChar::Aggregate(names));
     }
@@ -995,9 +1004,9 @@ std::vector<const BigMemoryObject *> MEDFileUMeshSplitL1::getDirectChildrenWithN
   std::vector<const BigMemoryObject *> ret;
   ret.push_back(&_m_by_types);
   ret.push_back(&_m);
-  ret.push_back((const DataArrayInt*)_fam);
-  ret.push_back((const DataArrayInt*)_num);
-  ret.push_back((const DataArrayInt*)_rev_num);
+  ret.push_back((const DataArrayIdType*)_fam);
+  ret.push_back((const DataArrayIdType*)_num);
+  ret.push_back((const DataArrayIdType*)_rev_num);
   ret.push_back((const DataArrayAsciiChar*)_names);
   return ret;
 }
@@ -1014,11 +1023,11 @@ MEDFileUMeshSplitL1 *MEDFileUMeshSplitL1::deepCopy(DataArrayDouble *coords) cons
 {
   MCAuto<MEDFileUMeshSplitL1> ret(new MEDFileUMeshSplitL1(*this));
   ret->_m_by_types=_m_by_types.deepCopy(coords);
-  if((const DataArrayInt *)_fam)
+  if((const DataArrayIdType *)_fam)
     ret->_fam=_fam->deepCopy();
-  if((const DataArrayInt *)_num)
+  if((const DataArrayIdType *)_num)
     ret->_num=_num->deepCopy();
-  if((const DataArrayInt *)_rev_num)
+  if((const DataArrayIdType *)_rev_num)
     ret->_rev_num=_rev_num->deepCopy();
   if((const DataArrayAsciiChar *)_names)
     ret->_names=_names->deepCopy();
@@ -1029,12 +1038,12 @@ void MEDFileUMeshSplitL1::checkConsistency() const
 {
   if (!_fam || _fam->getNumberOfTuples() != getSize())
     throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::checkConsistency(): internal family array has an invalid size!");
-  int nbCells = getSize();
+  mcIdType nbCells = getSize();
   if (_num)
     {
       _num->checkNbOfTuplesAndComp(nbCells,1,"MEDFileUMeshSplitL1::checkConsistency(): inconsistent internal node numbering array!");
-      int pos;
-      int maxValue=_num->getMaxValue(pos);
+      mcIdType pos;
+      mcIdType maxValue=_num->getMaxValue(pos);
       if (!_rev_num || _rev_num->getNumberOfTuples() != (maxValue+1))
         throw INTERP_KERNEL::Exception("MEDFileUMeshSplitL1::checkConsistency(): inconsistent internal revert node numbering array!");
     }
@@ -1052,8 +1061,8 @@ bool MEDFileUMeshSplitL1::isEqual(const MEDFileUMeshSplitL1 *other, double eps,
 {
   if(!_m_by_types.isEqual(other->_m_by_types,eps,what))
     return false;
-  const DataArrayInt *d1=_fam;
-  const DataArrayInt *d2=other->_fam;
+  const DataArrayIdType *d1=_fam;
+  const DataArrayIdType *d2=other->_fam;
   if((d1==0 && d2!=0) || (d1!=0 && d2==0))
     {
       what="Presence of family arr in one sublevel and not in other!";
@@ -1126,7 +1135,7 @@ void MEDFileUMeshSplitL1::assignMesh(MEDCouplingUMesh *m, bool newOrOld)
       m->incrRef();
       _m=m;
       _m_by_types.assignUMesh(dynamic_cast<MEDCouplingUMesh *>(m->deepCopy()));
-      MCAuto<DataArrayInt> da=_m_by_types.getUmesh()->getRenumArrForConsecutiveCellTypesSpec(typmai2,typmai2+MED_N_CELL_FIXED_GEO);
+      MCAuto<DataArrayIdType> da=_m_by_types.getUmesh()->getRenumArrForConsecutiveCellTypesSpec(typmai2,typmai2+MED_N_CELL_FIXED_GEO);
       if(!da->isIota(m->getNumberOfCells()))
         {
           _num=da->invertArrayO2N2N2O(m->getNumberOfCells());
@@ -1162,7 +1171,7 @@ MEDFileUMeshSplitL1::MEDFileUMeshSplitL1():_m(this)
 
 void MEDFileUMeshSplitL1::assignCommonPart()
 {
-  _fam=DataArrayInt::New();
+  _fam=DataArrayIdType::New();
   _fam->alloc(_m_by_types.getSize(),1);
   _fam->fillWithValue(0);
 }
@@ -1172,9 +1181,9 @@ bool MEDFileUMeshSplitL1::empty() const
   return _m_by_types.empty();
 }
 
-bool MEDFileUMeshSplitL1::presenceOfOneFams(const std::vector<int>& ids) const
+bool MEDFileUMeshSplitL1::presenceOfOneFams(const std::vector<mcIdType>& ids) const
 {
-  const DataArrayInt *fam=_fam;
+  const DataArrayIdType *fam=_fam;
   if(!fam)
     return false;
   return fam->presenceOfValue(ids);
@@ -1187,32 +1196,32 @@ int MEDFileUMeshSplitL1::getMeshDimension() const
 
 void MEDFileUMeshSplitL1::simpleRepr(std::ostream& oss) const
 {
-  std::vector<int> code=_m_by_types.getDistributionOfTypes();
-  int nbOfTypes=code.size()/3;
-  for(int i=0;i<nbOfTypes;i++)
+  std::vector<mcIdType> code=_m_by_types.getDistributionOfTypes();
+  std::size_t nbOfTypes=code.size()/3;
+  for(std::size_t i=0;i<nbOfTypes;i++)
     {
       INTERP_KERNEL::NormalizedCellType typ=(INTERP_KERNEL::NormalizedCellType) code[3*i];
       oss << "    - Number of cells with type " << INTERP_KERNEL::CellModel::GetCellModel(typ).getRepr() << " : " << code[3*i+1] << std::endl;
     }
 }
 
-int MEDFileUMeshSplitL1::getSize() const
+mcIdType MEDFileUMeshSplitL1::getSize() const
 {
   return _m_by_types.getSize();
 }
 
-MEDCouplingUMesh *MEDFileUMeshSplitL1::getFamilyPart(const int *idsBg, const int *idsEnd, bool renum) const
+MEDCouplingUMesh *MEDFileUMeshSplitL1::getFamilyPart(const mcIdType *idsBg, const mcIdType *idsEnd, bool renum) const
 {
-  MCAuto<DataArrayInt> eltsToKeep=_fam->findIdsEqualList(idsBg,idsEnd);
+  MCAuto<DataArrayIdType> eltsToKeep=_fam->findIdsEqualList(idsBg,idsEnd);
   MEDCouplingUMesh *m=(MEDCouplingUMesh *)_m_by_types.getUmesh()->buildPartOfMySelf(eltsToKeep->begin(),eltsToKeep->end(),true);
   if(renum)
     return renumIfNeeded(m,eltsToKeep->begin());
   return m;
 }
 
-DataArrayInt *MEDFileUMeshSplitL1::getFamilyPartArr(const int *idsBg, const int *idsEnd, bool renum) const
+DataArrayIdType *MEDFileUMeshSplitL1::getFamilyPartArr(const mcIdType *idsBg, const mcIdType *idsEnd, bool renum) const
 {
-  MCAuto<DataArrayInt> da=_fam->findIdsEqualList(idsBg,idsEnd);
+  MCAuto<DataArrayIdType> da=_fam->findIdsEqualList(idsBg,idsEnd);
   if(renum)
     return renumIfNeededArr(da);
   return da.retn();
@@ -1223,7 +1232,7 @@ std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileUMeshSplitL1::getGeoTypes(
   return _m_by_types.getGeoTypes();
 }
 
-int MEDFileUMeshSplitL1::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
+mcIdType MEDFileUMeshSplitL1::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
 {
   return _m_by_types.getNumberOfCellsWithType(ct);
 }
@@ -1231,58 +1240,58 @@ int MEDFileUMeshSplitL1::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellT
 MEDCouplingUMesh *MEDFileUMeshSplitL1::getWholeMesh(bool renum) const
 {
   MCAuto<MEDCouplingUMesh> tmp;
-  if(renum && ((const DataArrayInt *)_num))
+  if(renum && ((const DataArrayIdType *)_num))
     tmp=_m;
   else
     { tmp=_m_by_types.getUmesh(); if(tmp) tmp->incrRef(); }
   return tmp.retn();
 }
 
-int MEDFileUMeshSplitL1::getNumberOfCells() const
+mcIdType MEDFileUMeshSplitL1::getNumberOfCells() const
 {
   return _m_by_types.getNumberOfCells();
 }
 
-DataArrayInt *MEDFileUMeshSplitL1::extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
+DataArrayIdType *MEDFileUMeshSplitL1::extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
 {
-  const DataArrayInt *fam(_fam);
+  const DataArrayIdType *fam(_fam);
   if(!fam)
     return 0;
-  int start(0),stop(0);
+  mcIdType start(0),stop(0);
   _m_by_types.getStartStopOfGeoTypeWithoutComputation(gt,start,stop);
   return fam->selectByTupleIdSafeSlice(start,stop,1);
 }
 
-DataArrayInt *MEDFileUMeshSplitL1::extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
+DataArrayIdType *MEDFileUMeshSplitL1::extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const
 {
-  const DataArrayInt *num(_num);
+  const DataArrayIdType *num(_num);
   if(!num)
     return 0;
-  int start(0),stop(0);
+  mcIdType start(0),stop(0);
   _m_by_types.getStartStopOfGeoTypeWithoutComputation(gt,start,stop);
   return num->selectByTupleIdSafeSlice(start,stop,1);
 }
 
-DataArrayInt *MEDFileUMeshSplitL1::getOrCreateAndGetFamilyField()
+DataArrayIdType *MEDFileUMeshSplitL1::getOrCreateAndGetFamilyField()
 {
-  if((DataArrayInt *)_fam)
+  if((DataArrayIdType *)_fam)
     return _fam;
-  int nbOfTuples=_m_by_types.getSize();
-  _fam=DataArrayInt::New(); _fam->alloc(nbOfTuples,1); _fam->fillWithZero();
+  mcIdType nbOfTuples=_m_by_types.getSize();
+  _fam=DataArrayIdType::New(); _fam->alloc(nbOfTuples,1); _fam->fillWithZero();
   return _fam;
 }
 
-const DataArrayInt *MEDFileUMeshSplitL1::getFamilyField() const
+const DataArrayIdType *MEDFileUMeshSplitL1::getFamilyField() const
 {
   return _fam;
 }
 
-const DataArrayInt *MEDFileUMeshSplitL1::getNumberField() const
+const DataArrayIdType *MEDFileUMeshSplitL1::getNumberField() const
 {
   return _num;
 }
 
-const DataArrayInt *MEDFileUMeshSplitL1::getRevNumberField() const
+const DataArrayIdType *MEDFileUMeshSplitL1::getRevNumberField() const
 {
   return _rev_num;
 }
@@ -1305,37 +1314,37 @@ void MEDFileUMeshSplitL1::eraseFamilyField()
 /*!
  * This method ignores _m and _m_by_types.
  */
-void MEDFileUMeshSplitL1::setGroupsFromScratch(const std::vector<const MEDCouplingUMesh *>& ms, std::map<std::string,int>& familyIds,
+void MEDFileUMeshSplitL1::setGroupsFromScratch(const std::vector<const MEDCouplingUMesh *>& ms, std::map<std::string,mcIdType>& familyIds,
                                                std::map<std::string, std::vector<std::string> >& groups)
 {
-  std::vector< DataArrayInt * > corr;
+  std::vector< DataArrayIdType * > corr;
   _m=MEDCouplingUMesh::FuseUMeshesOnSameCoords(ms,0,corr);
-  std::vector< MCAuto<DataArrayInt> > corrMSafe(corr.begin(),corr.end());
-  std::vector< std::vector<int> > fidsOfGroups;
-  std::vector< const DataArrayInt * > corr2(corr.begin(),corr.end());
-  _fam=DataArrayInt::MakePartition(corr2,((MEDCouplingUMesh *)_m)->getNumberOfCells(),fidsOfGroups);
-  int nbOfCells=((MEDCouplingUMesh *)_m)->getNumberOfCells();
-  std::map<int,std::string> newfams;
-  std::map<int,int> famIdTrad;
+  std::vector< MCAuto<DataArrayIdType> > corrMSafe(corr.begin(),corr.end());
+  std::vector< std::vector<mcIdType> > fidsOfGroups;
+  std::vector< const DataArrayIdType * > corr2(corr.begin(),corr.end());
+  _fam=DataArrayIdType::MakePartition(corr2,((MEDCouplingUMesh *)_m)->getNumberOfCells(),fidsOfGroups);
+  mcIdType nbOfCells=((MEDCouplingUMesh *)_m)->getNumberOfCells();
+  std::map<mcIdType,std::string> newfams;
+  std::map<mcIdType,mcIdType> famIdTrad;
   TraduceFamilyNumber(fidsOfGroups,familyIds,famIdTrad,newfams);
-  int *w=_fam->getPointer();
-  for(int i=0;i<nbOfCells;i++,w++)
+  mcIdType *w=_fam->getPointer();
+  for(mcIdType i=0;i<nbOfCells;i++,w++)
     *w=famIdTrad[*w];
 }
 
 void MEDFileUMeshSplitL1::write(med_idt fid, const std::string& mName, int mdim) const
 {
   std::vector<MEDCoupling1GTUMesh *> ms(_m_by_types.getParts());
-  int start=0;
+  mcIdType start=0;
   for(std::vector<MEDCoupling1GTUMesh *>::const_iterator it=ms.begin();it!=ms.end();it++)
     {
-      int nbCells=(*it)->getNumberOfCells();
-      int end=start+nbCells;
-      MCAuto<DataArrayInt> fam,num;
+      mcIdType nbCells=(*it)->getNumberOfCells();
+      mcIdType end=start+nbCells;
+      MCAuto<DataArrayIdType> fam,num;
       MCAuto<DataArrayAsciiChar> names;
-      if((const DataArrayInt *)_fam)
+      if((const DataArrayIdType *)_fam)
         fam=_fam->subArray(start,end);
-      if((const DataArrayInt *)_num)
+      if((const DataArrayIdType *)_num)
         num=_num->subArray(start,end);
       if((const DataArrayAsciiChar *)_names)
         names=static_cast<DataArrayAsciiChar *>(_names->subArray(start,end));
@@ -1344,51 +1353,51 @@ void MEDFileUMeshSplitL1::write(med_idt fid, const std::string& mName, int mdim)
     }
 }
 
-void MEDFileUMeshSplitL1::renumberNodesInConn(const int *newNodeNumbersO2N)
+void MEDFileUMeshSplitL1::renumberNodesInConn(const mcIdType *newNodeNumbersO2N)
 {
   _m_by_types.renumberNodesInConnWithoutComputation(newNodeNumbersO2N);
 }
 
-void MEDFileUMeshSplitL1::serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const
+void MEDFileUMeshSplitL1::serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const
 {
   bigArraysI.push_back(_fam);
   bigArraysI.push_back(_num);
   _m_by_types.serialize(tinyInt,bigArraysI);
 }
 
-void MEDFileUMeshSplitL1::unserialize(const std::string& name, DataArrayDouble *coo, std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI)
+void MEDFileUMeshSplitL1::unserialize(const std::string& name, DataArrayDouble *coo, std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI)
 {
   _fam=bigArraysI.back(); bigArraysI.pop_back();
   _num=bigArraysI.back(); bigArraysI.pop_back();
   _m_by_types.unserialize(name,coo,tinyInt,bigArraysI);
 }
 
-void MEDFileUMeshSplitL1::changeFamilyIdArr(int oldId, int newId)
+void MEDFileUMeshSplitL1::changeFamilyIdArr(mcIdType oldId, mcIdType newId)
 {
-  DataArrayInt *arr=_fam;
+  DataArrayIdType *arr=_fam;
   if(arr)
     arr->changeValue(oldId,newId);
 }
 
-void MEDFileUMeshSplitL1::setFamilyArr(DataArrayInt *famArr)
+void MEDFileUMeshSplitL1::setFamilyArr(DataArrayIdType *famArr)
 {
   if(!famArr)
     {
       _fam=0;
       return ;
     }
-  int sz(_m_by_types.getSize());
+  mcIdType sz(_m_by_types.getSize());
   famArr->checkNbOfTuplesAndComp(sz,1,"MEDFileUMeshSplitL1::setFamilyArr : Problem in size of Family arr ! ");
   famArr->incrRef();
   _fam=famArr;
 }
 
-DataArrayInt *MEDFileUMeshSplitL1::getFamilyField()
+DataArrayIdType *MEDFileUMeshSplitL1::getFamilyField()
 {
   return _fam;
 }
 
-void MEDFileUMeshSplitL1::setRenumArr(DataArrayInt *renumArr)
+void MEDFileUMeshSplitL1::setRenumArr(DataArrayIdType *renumArr)
 {
   if(!renumArr)
     {
@@ -1396,7 +1405,7 @@ void MEDFileUMeshSplitL1::setRenumArr(DataArrayInt *renumArr)
       _rev_num=0;
       return ;
     }
-  int sz(_m_by_types.getSize());
+  mcIdType sz(_m_by_types.getSize());
   renumArr->checkNbOfTuplesAndComp(sz,1,"MEDFileUMeshSplitL1::setRenumArr : Problem in size of numbering arr ! ");
   renumArr->incrRef();
   _num=renumArr;
@@ -1410,13 +1419,13 @@ void MEDFileUMeshSplitL1::setNameArr(DataArrayAsciiChar *nameArr)
       _names=0;
       return ;
     }
-  int sz(_m_by_types.getSize());
+  mcIdType sz(_m_by_types.getSize());
   nameArr->checkNbOfTuplesAndComp(sz,MED_SNAME_SIZE,"MEDFileUMeshSplitL1::setNameArr : Problem in size of name arr ! ");
   nameArr->incrRef();
   _names=nameArr;
 }
 
-MEDCouplingUMesh *MEDFileUMeshSplitL1::Renumber2(const DataArrayInt *renum, MEDCouplingUMesh *m, const int *cellIds)
+MEDCouplingUMesh *MEDFileUMeshSplitL1::Renumber2(const DataArrayIdType *renum, MEDCouplingUMesh *m, const mcIdType *cellIds)
 {
   if(renum==0)
     return m;
@@ -1424,63 +1433,63 @@ MEDCouplingUMesh *MEDFileUMeshSplitL1::Renumber2(const DataArrayInt *renum, MEDC
     m->renumberCells(renum->begin(),true);
   else
     {
-      MCAuto<DataArrayInt> locnum=renum->selectByTupleId(cellIds,cellIds+m->getNumberOfCells());
+      MCAuto<DataArrayIdType> locnum=renum->selectByTupleId(cellIds,cellIds+m->getNumberOfCells());
       m->renumberCells(locnum->begin(),true);
     }
   return m;
 }
 
-MEDFileUMeshSplitL1 *MEDFileUMeshSplitL1::Unserialize(const std::string& name, DataArrayDouble *coo, std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI)
+MEDFileUMeshSplitL1 *MEDFileUMeshSplitL1::Unserialize(const std::string& name, DataArrayDouble *coo, std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI)
 {
   MCAuto<MEDFileUMeshSplitL1> ret(new MEDFileUMeshSplitL1);
   ret->unserialize(name,coo,tinyInt,bigArraysI);
   return ret.retn();
 }
 
-MEDCouplingUMesh *MEDFileUMeshSplitL1::renumIfNeeded(MEDCouplingUMesh *m, const int *cellIds) const
+MEDCouplingUMesh *MEDFileUMeshSplitL1::renumIfNeeded(MEDCouplingUMesh *m, const mcIdType *cellIds) const
 {
   return Renumber2(_num,m,cellIds);
 }
 
-DataArrayInt *MEDFileUMeshSplitL1::Renumber(const DataArrayInt *renum, const DataArrayInt *da)
+DataArrayIdType *MEDFileUMeshSplitL1::Renumber(const DataArrayIdType *renum, const DataArrayIdType *da)
 {
-  if((const DataArrayInt *)renum==0)
+  if((const DataArrayIdType *)renum==0)
     {
       da->incrRef();
-      return const_cast<DataArrayInt *>(da);
+      return const_cast<DataArrayIdType *>(da);
     }
   return renum->selectByTupleId(da->begin(),da->end());
 }
 
-DataArrayInt *MEDFileUMeshSplitL1::renumIfNeededArr(const DataArrayInt *da) const
+DataArrayIdType *MEDFileUMeshSplitL1::renumIfNeededArr(const DataArrayIdType *da) const
 {
   return Renumber(_num,da);
 }
 
-std::vector<int> MEDFileUMeshSplitL1::GetNewFamiliesNumber(int nb, const std::map<std::string,int>& families)
+std::vector<mcIdType> MEDFileUMeshSplitL1::GetNewFamiliesNumber(mcIdType nb, const std::map<std::string,mcIdType>& families)
 {
-  int id=-1;
-  for(std::map<std::string,int>::const_iterator it=families.begin();it!=families.end();it++)
+  mcIdType id=-1;
+  for(std::map<std::string,mcIdType>::const_iterator it=families.begin();it!=families.end();it++)
     id=std::max(id,(*it).second);
   if(id==-1)
     id=0;
-  std::vector<int> ret(nb);
-  for(int i=1;i<=nb;i++)
+  std::vector<mcIdType> ret(nb);
+  for(mcIdType i=1;i<=nb;i++)
     ret[i]=id+i;
   return ret;
 }
 
-void MEDFileUMeshSplitL1::TraduceFamilyNumber(const std::vector< std::vector<int> >& fidsGrps, std::map<std::string,int>& familyIds,
-                                              std::map<int,int>& famIdTrad, std::map<int,std::string>& newfams)
+void MEDFileUMeshSplitL1::TraduceFamilyNumber(const std::vector< std::vector<mcIdType> >& fidsGrps, std::map<std::string,mcIdType>& familyIds,
+                                              std::map<mcIdType,mcIdType>& famIdTrad, std::map<mcIdType,std::string>& newfams)
 {
-  std::set<int> allfids;
+  std::set<mcIdType> allfids;
   //tony
 }
 
 void MEDFileUMeshSplitL1::computeRevNum() const
 {
-  int pos;
-  int maxValue=_num->getMaxValue(pos);
+  mcIdType pos;
+  mcIdType maxValue=_num->getMaxValue(pos);
   _rev_num=_num->invertArrayN2O2O2N(maxValue+1);
 }
 
@@ -1561,11 +1570,11 @@ MEDCouplingUMesh *MEDFileUMeshAggregateCompute::getUmesh() const
   return _m;
 }
 
-int MEDFileUMeshAggregateCompute::getNumberOfCells() const
+mcIdType MEDFileUMeshAggregateCompute::getNumberOfCells() const
 {
   if(_mp_time<=_m_time)
     return _m->getNumberOfCells();
-  int ret(0);
+  mcIdType ret(0);
   for(std::vector< MCAuto<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();it!=_m_parts.end();it++)
     ret+=(*it)->getNumberOfCells();
   return ret;
@@ -1585,7 +1594,7 @@ std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileUMeshAggregateCompute::get
     return _m->getAllGeoTypesSorted();
 }
 
-int MEDFileUMeshAggregateCompute::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
+mcIdType MEDFileUMeshAggregateCompute::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const
 {
   if(_mp_time>=_m_time)
     {
@@ -1636,7 +1645,7 @@ MEDCoupling1GTUMesh *MEDFileUMeshAggregateCompute::retrievePartWithoutComputatio
   throw INTERP_KERNEL::Exception("MEDFileUMeshAggregateCompute::getPartWithoutComputation : the geometric type is not existing !");
 }
 
-void MEDFileUMeshAggregateCompute::getStartStopOfGeoTypeWithoutComputation(INTERP_KERNEL::NormalizedCellType gt, int& start, int& stop) const
+void MEDFileUMeshAggregateCompute::getStartStopOfGeoTypeWithoutComputation(INTERP_KERNEL::NormalizedCellType gt, mcIdType& start, mcIdType& stop) const
 {
   start=0; stop=0;
   std::vector<MEDCoupling1GTUMesh *> v(retrievePartsWithoutComputation());
@@ -1657,7 +1666,7 @@ void MEDFileUMeshAggregateCompute::getStartStopOfGeoTypeWithoutComputation(INTER
   throw INTERP_KERNEL::Exception("MEDFileUMeshAggregateCompute::getStartStopOfGeoTypeWithoutComputation : the geometric type is not existing !");
 }
 
-void MEDFileUMeshAggregateCompute::renumberNodesInConnWithoutComputation(const int *newNodeNumbersO2N)
+void MEDFileUMeshAggregateCompute::renumberNodesInConnWithoutComputation(const mcIdType *newNodeNumbersO2N)
 {
   if(_mp_time>_m_time)
     {
@@ -1715,12 +1724,12 @@ const PartDefinition *MEDFileUMeshAggregateCompute::getPartDefOfWithoutComputati
   throw INTERP_KERNEL::Exception("MEDFileUMeshAggregateCompute::getPartDefOfWithoutComputation : The input geo type is not existing in this !");
 }
 
-void MEDFileUMeshAggregateCompute::serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const
+void MEDFileUMeshAggregateCompute::serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const
 {
   if(_mp_time<_m_time)
     throw INTERP_KERNEL::Exception("MEDFileUMeshAggregateCompute::serialize : the parts require a computation !");
   std::size_t sz(_m_parts.size());
-  tinyInt.push_back((int)sz);
+  tinyInt.push_back((mcIdType)sz);
   for(std::size_t i=0;i<sz;i++)
     {
       const MEDCoupling1GTUMesh *mesh(_m_parts[i]);
@@ -1731,20 +1740,20 @@ void MEDFileUMeshAggregateCompute::serialize(std::vector<int>& tinyInt, std::vec
       const MEDCoupling1DGTUMesh *mesh2(dynamic_cast<const MEDCoupling1DGTUMesh *>(mesh));
       if(mesh1)
         {
-          DataArrayInt *elt(mesh1->getNodalConnectivity());
+          DataArrayIdType *elt(mesh1->getNodalConnectivity());
           if(elt)
             elt->incrRef();
-          MCAuto<DataArrayInt> elt1(elt);
+          MCAuto<DataArrayIdType> elt1(elt);
           bigArraysI.push_back(elt1);
         }
       else if(mesh2)
         {
-          DataArrayInt *elt1(mesh2->getNodalConnectivity()),*elt2(mesh2->getNodalConnectivityIndex());
+          DataArrayIdType *elt1(mesh2->getNodalConnectivity()),*elt2(mesh2->getNodalConnectivityIndex());
           if(elt1)
             elt1->incrRef();
           if(elt2)
             elt2->incrRef();
-          MCAuto<DataArrayInt> elt11(elt1),elt22(elt2);
+          MCAuto<DataArrayIdType> elt11(elt1),elt22(elt2);
           bigArraysI.push_back(elt11); bigArraysI.push_back(elt22);
         }
       else
@@ -1754,20 +1763,20 @@ void MEDFileUMeshAggregateCompute::serialize(std::vector<int>& tinyInt, std::vec
         tinyInt.push_back(-1);
       else
         {
-          std::vector<int> tinyTmp;
+          std::vector<mcIdType> tinyTmp;
           pd->serialize(tinyTmp,bigArraysI);
-          tinyInt.push_back((int)tinyTmp.size());
+          tinyInt.push_back((mcIdType)tinyTmp.size());
           tinyInt.insert(tinyInt.end(),tinyTmp.begin(),tinyTmp.end());
         }
     }
 }
 
-void MEDFileUMeshAggregateCompute::unserialize(const std::string& name, DataArrayDouble *coo, std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI)
+void MEDFileUMeshAggregateCompute::unserialize(const std::string& name, DataArrayDouble *coo, std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI)
 {
-  int nbParts(tinyInt.back()); tinyInt.pop_back();
+  mcIdType nbParts(tinyInt.back()); tinyInt.pop_back();
   _part_def.clear(); _part_def.resize(nbParts);
   _m_parts.clear(); _m_parts.resize(nbParts);
-  for(int i=0;i<nbParts;i++)
+  for(mcIdType i=0;i<nbParts;i++)
     {
       INTERP_KERNEL::NormalizedCellType tp((INTERP_KERNEL::NormalizedCellType) tinyInt.back()); tinyInt.pop_back();
       MCAuto<MEDCoupling1GTUMesh> mesh(MEDCoupling1GTUMesh::New(name,tp));
@@ -1780,7 +1789,7 @@ void MEDFileUMeshAggregateCompute::unserialize(const std::string& name, DataArra
         }
       else if(mesh2)
         {
-          MCAuto<DataArrayInt> elt0,elt1;
+          MCAuto<DataArrayIdType> elt0,elt1;
           elt0=bigArraysI.back(); bigArraysI.pop_back();
           elt1=bigArraysI.back(); bigArraysI.pop_back();
           mesh2->setNodalConnectivity(elt0,elt1);
@@ -1788,7 +1797,7 @@ void MEDFileUMeshAggregateCompute::unserialize(const std::string& name, DataArra
       else
         throw INTERP_KERNEL::Exception("MEDFileUMeshAggregateCompute::unserialize : unrecognized single geo type mesh !");
       _m_parts[i]=mesh;
-      int pdid(tinyInt.back()); tinyInt.pop_back();
+      mcIdType pdid(tinyInt.back()); tinyInt.pop_back();
       if(pdid!=-1)
         _part_def[i]=PartDefinition::Unserialize(tinyInt,bigArraysI);
       _mp_time=std::max(_mp_time,_m_time)+1;
@@ -2005,7 +2014,7 @@ int MEDFileUMeshAggregateCompute::getMeshDimension() const
     }
 }
 
-std::vector<int> MEDFileUMeshAggregateCompute::getDistributionOfTypes() const
+std::vector<mcIdType> MEDFileUMeshAggregateCompute::getDistributionOfTypes() const
 {
   if(_mp_time<_m_time)
     {
@@ -2016,20 +2025,20 @@ std::vector<int> MEDFileUMeshAggregateCompute::getDistributionOfTypes() const
     }
   else
     {
-      std::vector<int> ret;
+      std::vector<mcIdType> ret;
       for(std::vector< MCAuto<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();it!=_m_parts.end();it++)
         {
           const MEDCoupling1GTUMesh *tmp(*it);
           if(!tmp)
             throw INTERP_KERNEL::Exception("MEDFileUMeshAggregateCompute::getDistributionOfTypes : part mesh contains null instance !");
-          std::vector<int> ret0(tmp->getDistributionOfTypes());
+          std::vector<mcIdType> ret0(tmp->getDistributionOfTypes());
           ret.insert(ret.end(),ret0.begin(),ret0.end());
         }
       return ret;
     }
 }
 
-int MEDFileUMeshAggregateCompute::getSize() const
+mcIdType MEDFileUMeshAggregateCompute::getSize() const
 {
   if(_mp_time<_m_time)
     {
@@ -2040,7 +2049,7 @@ int MEDFileUMeshAggregateCompute::getSize() const
     }
   else
     {
-      int ret=0;
+      mcIdType ret=0;
       for(std::vector< MCAuto<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();it!=_m_parts.end();it++)
         {
           const MEDCoupling1GTUMesh *m(*it);
@@ -2092,16 +2101,17 @@ MEDFileEltStruct4Mesh::MEDFileEltStruct4Mesh(med_idt fid, const std::string& mNa
   MEDFILESAFECALLERRD0(MEDmeshEntityInfo,(fid,mName.c_str(),dt,it,MED_STRUCT_ELEMENT,iterOnStEltOfMesh+1,geoTypeName,&geoType));
   _geo_type=geoType;
   _geo_type_name=MEDLoaderBase::buildStringFromFortran(geoTypeName,MED_NAME_SIZE);
-  int nCells(0);
+  mcIdType nCells(0);
   {
     med_bool chgt=MED_FALSE,trsf=MED_FALSE;
     nCells=MEDmeshnEntity(fid,mName.c_str(),dt,it,MED_STRUCT_ELEMENT,geoType,MED_CONNECTIVITY,MED_NODAL,&chgt,&trsf);
   }
   MCAuto<MEDFileMeshSupports> mss(MEDFileMeshSupports::New(fid));
   MCAuto<MEDFileStructureElements> mse(MEDFileStructureElements::New(fid,mss));
-  int nbEntities(mse->getNumberOfNodesPerSE(_geo_type_name));
-  _conn=DataArrayInt::New(); _conn->alloc(nCells*nbEntities);
-  MEDFILESAFECALLERRD0(MEDmeshElementConnectivityRd,(fid,mName.c_str(),dt,it,MED_STRUCT_ELEMENT,_geo_type,MED_NODAL,MED_FULL_INTERLACE,_conn->getPointer()));
+  mcIdType nbEntities(mse->getNumberOfNodesPerSE(_geo_type_name));
+  MCAuto<DataArrayMedInt> miConn=DataArrayMedInt::New(); miConn->alloc(nCells*nbEntities);
+  MEDFILESAFECALLERRD0(MEDmeshElementConnectivityRd,(fid,mName.c_str(),dt,it,MED_STRUCT_ELEMENT,_geo_type,MED_NODAL,MED_FULL_INTERLACE,miConn->getPointer()));
+  _conn=FromMedIntArray<mcIdType>(miConn);
   _conn->applyLin(1,-1);
   _conn->rearrange(nbEntities);
   _common=MEDFileUMeshPerTypeCommon::New();
index f57b311f463c79bcf6c69ca05e23598eb2952f5f..21cb9c494708be34c0d25c982c15918a3420e5c1 100644 (file)
@@ -86,8 +86,8 @@ namespace MEDCoupling
     MCAuto<PartDefinition> getPartDefOfCoo() const { return _part_coords; }
     std::vector<std::string> getAxisInfoOnMesh(med_idt fid, const MeshOrStructMeshCls *mId, const std::string& mName, MEDCoupling::MEDCouplingMeshType& meshType, MEDCoupling::MEDCouplingAxisType& axType, int& nstep, int& Mdim);
     static INTERP_KERNEL::AutoCppPtr<MeshOrStructMeshCls> GetMeshIdFromName(med_idt fid, const std::string& mName, MEDCoupling::MEDCouplingMeshType& meshType, MEDCoupling::MEDCouplingAxisType& axType, int& dt, int& it, std::string& dtunit1);
-    static void ReadFamiliesAndGrps(med_idt fid, const std::string& mname, std::map<std::string,int>& fams, std::map<std::string, std::vector<std::string> >& grps, MEDFileMeshReadSelector *mrs);
-    static void WriteFamiliesAndGrps(med_idt fid, const std::string& mname, const std::map<std::string,int>& fams, const std::map<std::string, std::vector<std::string> >& grps, int tooLongStrPol);
+    static void ReadFamiliesAndGrps(med_idt fid, const std::string& mname, std::map<std::string,mcIdType>& fams, std::map<std::string, std::vector<std::string> >& grps, MEDFileMeshReadSelector *mrs);
+    static void WriteFamiliesAndGrps(med_idt fid, const std::string& mname, const std::map<std::string,mcIdType>& fams, const std::map<std::string, std::vector<std::string> >& grps, int tooLongStrPol);
     static bool RenameFamiliesFromFileToMem(std::vector< std::string >& famNames);
     static bool RenameFamiliesFromMemToFile(std::vector< std::string >& famNames);
     static MEDCoupling::MEDCouplingAxisType TraduceAxisType(med_axis_type at);
@@ -96,9 +96,9 @@ namespace MEDCoupling
     static med_grid_type TraduceAxisTypeRevStruct(MEDCoupling::MEDCouplingAxisType at);
   private:
     typedef bool (*RenameFamiliesPatternFunc)(std::vector< std::string >&);
-    static void RenameFamiliesPatternInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams, RenameFamiliesPatternFunc func);
-    static void RenameFamiliesFromFileToMemInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams);
-    static void RenameFamiliesFromMemToFileInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams);
+    static void RenameFamiliesPatternInternal(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >& crudeFams, RenameFamiliesPatternFunc func);
+    static void RenameFamiliesFromFileToMemInternal(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >& crudeFams);
+    static void RenameFamiliesFromMemToFileInternal(std::vector< std::pair<std::string,std::pair<mcIdType,std::vector<std::string> > > >& crudeFams);
   public:
     static const char ZE_SEP_FOR_FAMILY_KILLERS[];
     static int ZE_SEP2_FOR_FAMILY_KILLERS;
@@ -119,31 +119,31 @@ namespace MEDCoupling
     MEDFileUMeshL2();
     std::vector<std::string> loadCommonPart(med_idt fid, const MeshOrStructMeshCls *mId, const std::string& mName, int dt, int it, int& Mdim);
     void loadAll(med_idt fid, const MeshOrStructMeshCls *mId, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
-    void loadPart(med_idt fid, const MeshOrStructMeshCls *mId, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs);
+    void loadPart(med_idt fid, const MeshOrStructMeshCls *mId, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs);
     void loadConnectivity(med_idt fid, int mdim, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
-    void loadPartOfConnectivity(med_idt fid, int mdim, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs);
+    void loadPartOfConnectivity(med_idt fid, int mdim, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs);
     void loadCoords(med_idt fid, const std::vector<std::string>& infosOnComp, const std::string& mName, int dt, int it);
-    void loadPartCoords(med_idt fid, const std::vector<std::string>& infosOnComp, const std::string& mName, int dt, int it, int nMin, int nMax);
-    int getNumberOfLevels() const { return _per_type_mesh.size(); }
+    void loadPartCoords(med_idt fid, const std::vector<std::string>& infosOnComp, const std::string& mName, int dt, int it, mcIdType nMin, mcIdType nMax);
+    int getNumberOfLevels() const { return (int)_per_type_mesh.size(); }
     bool emptyLev(int levId) const { return _per_type_mesh[levId].empty(); }
     const std::vector< MCAuto<MEDFileUMeshPerType> >& getLev(int levId) const { return _per_type_mesh[levId]; }
     bool isFamDefinedOnLev(int levId) const;
     bool isNumDefinedOnLev(int levId) const;
     bool isNamesDefinedOnLev(int levId) const;
     MCAuto<DataArrayDouble> getCoords() const { return _coords; }
-    MCAuto<DataArrayInt> getCoordsFamily() const { return _fam_coords; }
-    MCAuto<DataArrayInt> getCoordsNum() const { return _num_coords; }
-    MCAuto<DataArrayInt> getCoordsGlobalNum() const { return _global_num_coords; }
+    MCAuto<DataArrayIdType> getCoordsFamily() const { return _fam_coords; }
+    MCAuto<DataArrayIdType> getCoordsNum() const { return _num_coords; }
+    MCAuto<DataArrayIdType> getCoordsGlobalNum() const { return _global_num_coords; }
     MCAuto<DataArrayAsciiChar> getCoordsName() const { return _name_coords; }
-    static void WriteCoords(med_idt fid, const std::string& mname, int dt, int it, double time, const DataArrayDouble *coords, const DataArrayInt *famCoords, const DataArrayInt *numCoords, const DataArrayAsciiChar *nameCoords, const DataArrayInt *globalNumCoords);
+    static void WriteCoords(med_idt fid, const std::string& mname, int dt, int it, double time, const DataArrayDouble *coords, const DataArrayIdType *famCoords, const DataArrayIdType *numCoords, const DataArrayAsciiChar *nameCoords, const DataArrayIdType *globalNumCoords);
   private:
     void sortTypes();
   private:
     std::vector< std::vector< MCAuto<MEDFileUMeshPerType> > > _per_type_mesh;
     MCAuto<DataArrayDouble> _coords;
-    MCAuto<DataArrayInt> _fam_coords;
-    MCAuto<DataArrayInt> _num_coords;
-    MCAuto<DataArrayInt> _global_num_coords;
+    MCAuto<DataArrayIdType> _fam_coords;
+    MCAuto<DataArrayIdType> _num_coords;
+    MCAuto<DataArrayIdType> _global_num_coords;
     MCAuto<DataArrayAsciiChar> _name_coords;
   };
 
@@ -203,14 +203,14 @@ namespace MEDCoupling
     void assignDefParts(const std::vector<const PartDefinition *>& partDefs);
     void assignUMesh(MEDCouplingUMesh *m);
     MEDCouplingUMesh *getUmesh() const;
-    int getNumberOfCells() const;
+    mcIdType getNumberOfCells() const;
     std::vector<MEDCoupling1GTUMesh *> getParts() const;
     std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypes() const;
-    int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
+    mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
     std::vector<MEDCoupling1GTUMesh *> retrievePartsWithoutComputation() const;
     MEDCoupling1GTUMesh *retrievePartWithoutComputation(INTERP_KERNEL::NormalizedCellType gt) const;
-    void getStartStopOfGeoTypeWithoutComputation(INTERP_KERNEL::NormalizedCellType gt, int& start, int& stop) const;
-    void renumberNodesInConnWithoutComputation(const int *newNodeNumbersO2N);
+    void getStartStopOfGeoTypeWithoutComputation(INTERP_KERNEL::NormalizedCellType gt, mcIdType& start, mcIdType& stop) const;
+    void renumberNodesInConnWithoutComputation(const mcIdType *newNodeNumbersO2N);
     bool isStoredSplitByType() const;
     std::size_t getTimeOfThis() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
@@ -223,13 +223,13 @@ namespace MEDCoupling
     void synchronizeTinyInfo(const MEDFileMesh& master) const;
     bool empty() const;
     int getMeshDimension() const;
-    std::vector<int> getDistributionOfTypes() const;
-    int getSize() const;
+    std::vector<mcIdType> getDistributionOfTypes() const;
+    mcIdType getSize() const;
     void setCoords(DataArrayDouble *coords);
     void forceComputationOfPartsFromUMesh() const;
     const PartDefinition *getPartDefOfWithoutComputation(INTERP_KERNEL::NormalizedCellType gt) const;
-    void serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const;
-    void unserialize(const std::string& name, DataArrayDouble *coo, std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI);
+    void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
+    void unserialize(const std::string& name, DataArrayDouble *coo, std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI);
   private:
     std::size_t getTimeOfParts() const;
     std::size_t getTimeOfUMesh() const;
@@ -265,64 +265,64 @@ namespace MEDCoupling
     void assignParts(const std::vector< const MEDCoupling1GTUMesh * >& mParts);
     void forceComputationOfParts() const;
     bool empty() const;
-    bool presenceOfOneFams(const std::vector<int>& ids) const;
+    bool presenceOfOneFams(const std::vector<mcIdType>& ids) const;
     int getMeshDimension() const;
     void simpleRepr(std::ostream& oss) const;
-    int getSize() const;
-    MEDCouplingUMesh *getFamilyPart(const int *idsBg, const int *idsEnd, bool renum) const;
-    DataArrayInt *getFamilyPartArr(const int *idsBg, const int *idsEnd, bool renum) const;
+    mcIdType getSize() const;
+    MEDCouplingUMesh *getFamilyPart(const mcIdType *idsBg, const mcIdType *idsEnd, bool renum) const;
+    DataArrayIdType *getFamilyPartArr(const mcIdType *idsBg, const mcIdType *idsEnd, bool renum) const;
     MEDCouplingUMesh *getWholeMesh(bool renum) const;
-    int getNumberOfCells() const;
+    mcIdType getNumberOfCells() const;
     bool isMeshStoredSplitByType() const { return _m_by_types.isStoredSplitByType(); }
     std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypes() const;
-    int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
+    mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
     std::vector<MEDCoupling1GTUMesh *> getDirectUndergroundSingleGeoTypeMeshes() const { return _m_by_types.retrievePartsWithoutComputation(); }
     MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const { return _m_by_types.retrievePartWithoutComputation(gt); }
-    DataArrayInt *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
-    DataArrayInt *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
-    std::vector<int> getDistributionOfTypes() const { return _m_by_types.getDistributionOfTypes(); }
-    DataArrayInt *getOrCreateAndGetFamilyField();
-    const DataArrayInt *getFamilyField() const;
-    const DataArrayInt *getNumberField() const;
+    DataArrayIdType *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+    DataArrayIdType *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+    std::vector<mcIdType> getDistributionOfTypes() const { return _m_by_types.getDistributionOfTypes(); }
+    DataArrayIdType *getOrCreateAndGetFamilyField();
+    const DataArrayIdType *getFamilyField() const;
+    const DataArrayIdType *getNumberField() const;
     const DataArrayAsciiChar *getNameField() const;
-    const DataArrayInt *getRevNumberField() const;
+    const DataArrayIdType *getRevNumberField() const;
     const PartDefinition *getPartDef(INTERP_KERNEL::NormalizedCellType gt) const;
     void eraseFamilyField();
-    void setGroupsFromScratch(const std::vector<const MEDCouplingUMesh *>& ms, std::map<std::string,int>& familyIds,
+    void setGroupsFromScratch(const std::vector<const MEDCouplingUMesh *>& ms, std::map<std::string,mcIdType>& familyIds,
                               std::map<std::string, std::vector<std::string> >& groups);
     void write(med_idt fid, const std::string& mName, int mdim) const;
     //
-    void setFamilyArr(DataArrayInt *famArr);
-    DataArrayInt *getFamilyField();
-    void setRenumArr(DataArrayInt *renumArr);
+    void setFamilyArr(DataArrayIdType *famArr);
+    DataArrayIdType *getFamilyField();
+    void setRenumArr(DataArrayIdType *renumArr);
     void setNameArr(DataArrayAsciiChar *nameArr);
-    void changeFamilyIdArr(int oldId, int newId);
+    void changeFamilyIdArr(mcIdType oldId, mcIdType newId);
     //
-    void renumberNodesInConn(const int *newNodeNumbersO2N);
+    void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
     //
-    void serialize(std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI) const;
-    void unserialize(const std::string& name, DataArrayDouble *coo, std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI);
+    void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
+    void unserialize(const std::string& name, DataArrayDouble *coo, std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI);
     //
     static void ClearNonDiscrAttributes(const MEDCouplingMesh *tmp);
-    static std::vector<int> GetNewFamiliesNumber(int nb, const std::map<std::string,int>& families);
-    static void TraduceFamilyNumber(const std::vector< std::vector<int> >& fidsGrps, std::map<std::string,int>& familyIds,
-                                    std::map<int,int>& famIdTrad, std::map<int,std::string>& newfams);
-    static DataArrayInt *Renumber(const DataArrayInt *renum, const DataArrayInt *da);
-    static MEDCouplingUMesh *Renumber2(const DataArrayInt *renum, MEDCouplingUMesh *m, const int *cellIds);
-    static MEDFileUMeshSplitL1 *Unserialize(const std::string& name, DataArrayDouble *coo, std::vector<int>& tinyInt, std::vector< MCAuto<DataArrayInt> >& bigArraysI);
+    static std::vector<mcIdType> GetNewFamiliesNumber(mcIdType nb, const std::map<std::string,mcIdType>& families);
+    static void TraduceFamilyNumber(const std::vector< std::vector<mcIdType> >& fidsGrps, std::map<std::string,mcIdType>& familyIds,
+                                    std::map<mcIdType,mcIdType>& famIdTrad, std::map<mcIdType,std::string>& newfams);
+    static DataArrayIdType *Renumber(const DataArrayIdType *renum, const DataArrayIdType *da);
+    static MEDCouplingUMesh *Renumber2(const DataArrayIdType *renum, MEDCouplingUMesh *m, const mcIdType *cellIds);
+    static MEDFileUMeshSplitL1 *Unserialize(const std::string& name, DataArrayDouble *coo, std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI);
   private:
     MEDFileUMeshSplitL1();
     void assignCommonPart();
-    MEDCouplingUMesh *renumIfNeeded(MEDCouplingUMesh *m, const int *cellIds) const;
-    DataArrayInt *renumIfNeededArr(const DataArrayInt *da) const;
+    MEDCouplingUMesh *renumIfNeeded(MEDCouplingUMesh *m, const mcIdType *cellIds) const;
+    DataArrayIdType *renumIfNeededArr(const DataArrayIdType *da) const;
     void computeRevNum() const;
   private:
     MEDFileUMeshAggregateCompute _m_by_types;
-    MCAuto<DataArrayInt> _fam;
-    MCAuto<DataArrayInt> _num;
-    MCAuto<DataArrayInt> _global_num;
+    MCAuto<DataArrayIdType> _fam;
+    MCAuto<DataArrayIdType> _num;
+    MCAuto<DataArrayIdType> _global_num;
     MCAuto<DataArrayAsciiChar> _names;
-    mutable MCAuto<DataArrayInt> _rev_num;
+    mutable MCAuto<DataArrayIdType> _rev_num;
     MEDFileUMeshPermCompute _m;
   };
 
@@ -331,7 +331,7 @@ namespace MEDCoupling
   public:
     static MEDFileEltStruct4Mesh *New(med_idt fid, const std::string& mName, int dt, int it, int iterOnStEltOfMesh, MEDFileMeshReadSelector *mrs);
     std::string getGeoTypeName() const { return _geo_type_name; }
-    MCAuto<DataArrayInt> getConn() const { return _conn; }
+    MCAuto<DataArrayIdType> getConn() const { return _conn; }
     MCAuto<MEDFileUMeshPerTypeCommon> getMeshDef() const { return _common; }
     const std::vector< MCAuto<DataArray> >& getVars() const { return _vars; }
   private:
@@ -344,7 +344,7 @@ namespace MEDCoupling
   private:
     std::string _geo_type_name;
     int _geo_type;
-    MCAuto<DataArrayInt> _conn;
+    MCAuto<DataArrayIdType> _conn;
     MCAuto<MEDFileUMeshPerTypeCommon> _common;
     std::vector< MCAuto<DataArray> > _vars;
   };
index c1fb5c051c7b8ee8b05625dbf3244940d2d280aa..4be2a9116d2d2d5f42b155fd34eb5f037d1eecdc 100644 (file)
@@ -45,16 +45,16 @@ MEDFileMeshSupports *MEDFileMeshSupports::New()
 
 MEDFileMeshSupports::MEDFileMeshSupports(med_idt fid)
 {
-  int nbSM(MEDnSupportMesh(fid));
+  med_int nbSM(MEDnSupportMesh(fid));
   _supports.resize(nbSM);
   for(int i=0;i<nbSM;i++)
     {
       INTERP_KERNEL::AutoPtr<char> msn(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
       INTERP_KERNEL::AutoPtr<char> description(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE));
       med_axis_type axType;
-      int nAxis(MEDsupportMeshnAxis(fid,i+1));
+      med_int nAxis(MEDsupportMeshnAxis(fid,i+1));
       INTERP_KERNEL::AutoPtr<char> axisName(new char[MED_SNAME_SIZE*nAxis+1]),axisUnit(new char[MED_SNAME_SIZE*nAxis+1]);
-      int spaceDim(0),meshDim(0);
+      med_int spaceDim(0),meshDim(0);
       MEDFILESAFECALLERRD0(MEDsupportMeshInfo,(fid,i+1,msn,&spaceDim,&meshDim,description,&axType,axisName,axisUnit));
       std::string name(MEDLoaderBase::buildStringFromFortran(msn,MED_NAME_SIZE));
       _supports[i]=MEDFileUMesh::New(fid,name);
@@ -120,7 +120,7 @@ const MEDFileUMesh *MEDFileMeshSupports::getSupMeshWithName(const std::string& n
   throw INTERP_KERNEL::Exception(oss.str());
 }
 
-int MEDFileMeshSupports::getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const
+mcIdType MEDFileMeshSupports::getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const
 {
   const MEDFileUMesh *sup(getSupMeshWithName(name));
   switch(entity)
index f3caabc16727fd9d395b36b41d5928891a4e899d..00634fdb2c347e2599ea0941ec5da802eca27150 100644 (file)
@@ -41,7 +41,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void writeLL(med_idt fid) const;
     MEDLOADER_EXPORT std::vector<std::string> getSupMeshNames() const;
     MEDLOADER_EXPORT const MEDFileUMesh *getSupMeshWithName(const std::string& name) const;
-    MEDLOADER_EXPORT int getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const;
+    MEDLOADER_EXPORT mcIdType getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const;
   private:
     MEDFileMeshSupports(med_idt fid);
     MEDFileMeshSupports();
index e978b51afb6992c6d8811486b9379d6b517f86e5..c08481883b7b0e10551d2dc7c8c088301a69165c 100644 (file)
@@ -21,6 +21,7 @@
 #include "MEDFileParameter.hxx"
 #include "MEDFileSafeCaller.txx"
 #include "MEDLoaderBase.hxx"
+#include "MEDFileBasis.hxx"
 
 #include "InterpKernelAutoPtr.hxx"
 
@@ -110,12 +111,12 @@ void MEDFileParameterDouble1TSWTI::finishLoading(med_idt fid, const std::string&
   std::ostringstream oss; oss << "MEDFileParameterDouble1TS::finishLoading : no specified time step (" << dt << "," << it << ") ! Time steps available : ";
   for(int i=0;i<nbOfSteps;i++)
     {
-      int locDt,locIt;
+      med_int locDt,locIt;
       double tim;
       MEDFILESAFECALLERRD0(MEDparameterComputationStepInfo,(fid,name.c_str(),i+1,&locDt,&locIt,&tim));
       if(dt==locDt && it==locIt)
         {
-          _iteration=locDt; _order=locIt; _time=tim;
+          _iteration=FromMedInt<int>(locDt); _order=FromMedInt<int>(locIt); _time=tim;
           MEDFILESAFECALLERRD0(MEDparameterValueRd,(fid,name.c_str(),_iteration,_order,reinterpret_cast<unsigned char *const>(&_arr)));
           return ;
         }
@@ -136,10 +137,10 @@ void MEDFileParameterDouble1TSWTI::readValue(med_idt fid, const std::string& nam
 
 void MEDFileParameterDouble1TSWTI::finishLoading(med_idt fid, const std::string& name, int timeStepId)
 {
-  int locDt,locIt;
+  med_int locDt,locIt;
   double dt;
   MEDFILESAFECALLERRD0(MEDparameterComputationStepInfo,(fid,name.c_str(),timeStepId+1,&locDt,&locIt,&dt));
-  _iteration=locDt; _order=locIt; _time=dt;
+  _iteration=FromMedInt<int>(locDt); _order=FromMedInt<int>(locIt); _time=dt;
   MEDFILESAFECALLERRD0(MEDparameterValueRd,(fid,name.c_str(),_iteration,_order,reinterpret_cast<unsigned char *const>(&_arr)));
 }
 
@@ -212,7 +213,7 @@ MEDFileParameterDouble1TS::MEDFileParameterDouble1TS(const std::string& fileName
 {
   MEDFileUtilities::CheckFileForRead(fileName);
   MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
-  int nbPar=MEDnParameter(fid);
+  med_int nbPar=MEDnParameter(fid);
   std::ostringstream oss; oss << "MEDFileParameterDouble1TS : no double param name \"" << paramName << "\" ! Double Parameters available are : ";
   INTERP_KERNEL::AutoPtr<char> pName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
   INTERP_KERNEL::AutoPtr<char> descName=MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE);
@@ -220,7 +221,7 @@ MEDFileParameterDouble1TS::MEDFileParameterDouble1TS(const std::string& fileName
   med_parameter_type paramType;
   for(int i=0;i<nbPar;i++)
     {
-      int nbOfSteps;
+      med_int nbOfSteps;
       MEDFILESAFECALLERRD0(MEDparameterInfo,(fid,i+1,pName,&paramType,descName,unitName,&nbOfSteps));
       std::string paramNameCpp=MEDLoaderBase::buildStringFromFortran(pName,MED_NAME_SIZE);
       if(paramNameCpp==paramName && paramType==MED_FLOAT64)
@@ -228,7 +229,7 @@ MEDFileParameterDouble1TS::MEDFileParameterDouble1TS(const std::string& fileName
           _dt_unit=MEDLoaderBase::buildStringFromFortran(unitName,MED_SNAME_SIZE);
           _name=paramNameCpp;
           _desc_name=MEDLoaderBase::buildStringFromFortran(descName,MED_COMMENT_SIZE);
-          finishLoading(fid,_name,dt,it,nbOfSteps);
+          finishLoading(fid,_name,dt,it,FromMedInt<int>(nbOfSteps));
           return ;
         }
       else
@@ -244,7 +245,7 @@ MEDFileParameterDouble1TS::MEDFileParameterDouble1TS(const std::string& fileName
 {
   MEDFileUtilities::CheckFileForRead(fileName);
   MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
-  int nbPar=MEDnParameter(fid);
+  med_int nbPar=MEDnParameter(fid);
   std::ostringstream oss; oss << "MEDFileParameterDouble1TS : no double param name \"" << paramName << "\" ! Double Parameters available are : ";
   INTERP_KERNEL::AutoPtr<char> pName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
   INTERP_KERNEL::AutoPtr<char> descName=MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE);
@@ -252,7 +253,7 @@ MEDFileParameterDouble1TS::MEDFileParameterDouble1TS(const std::string& fileName
   med_parameter_type paramType;
   for(int i=0;i<nbPar;i++)
     {
-      int nbOfSteps;
+      med_int nbOfSteps;
       MEDFILESAFECALLERRD0(MEDparameterInfo,(fid,i+1,pName,&paramType,descName,unitName,&nbOfSteps));
       std::string paramNameCpp=MEDLoaderBase::buildStringFromFortran(pName,MED_NAME_SIZE);
       if(paramNameCpp==paramName && paramType==MED_FLOAT64)
@@ -284,7 +285,7 @@ MEDFileParameterDouble1TS::MEDFileParameterDouble1TS(const std::string& fileName
 {
   MEDFileUtilities::CheckFileForRead(fileName);
   MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
-  int nbPar=MEDnParameter(fid);
+  med_int nbPar=MEDnParameter(fid);
   if(nbPar<1)
     {
       std::ostringstream oss2; oss2 << "No parameter in file \"" << fileName << "\" !";  
@@ -294,7 +295,7 @@ MEDFileParameterDouble1TS::MEDFileParameterDouble1TS(const std::string& fileName
   INTERP_KERNEL::AutoPtr<char> descName=MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE);
   INTERP_KERNEL::AutoPtr<char> unitName=MEDLoaderBase::buildEmptyString(MED_SNAME_SIZE);
   med_parameter_type paramType;
-  int nbOfSteps;
+  med_int nbOfSteps;
   MEDFILESAFECALLERRD0(MEDparameterInfo,(fid,1,pName,&paramType,descName,unitName,&nbOfSteps));
   std::string paramNameCpp=MEDLoaderBase::buildStringFromFortran(pName,MED_NAME_SIZE);
   if(paramType==MED_FLOAT64)
@@ -407,7 +408,7 @@ MEDFileParameterMultiTS::MEDFileParameterMultiTS(const MEDFileParameterMultiTS&
 
 MEDFileParameterMultiTS::MEDFileParameterMultiTS(med_idt fid)
 {
-  int nbPar(MEDnParameter(fid));
+  med_int nbPar(MEDnParameter(fid));
   if(nbPar<1)
     {
       std::ostringstream oss; oss << "MEDFileParameterMultiTS : no parameter in file \"" << FileNameFromFID(fid) << "\" !" ;
@@ -417,18 +418,18 @@ MEDFileParameterMultiTS::MEDFileParameterMultiTS(med_idt fid)
   INTERP_KERNEL::AutoPtr<char> descName(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE));
   INTERP_KERNEL::AutoPtr<char> unitName(MEDLoaderBase::buildEmptyString(MED_SNAME_SIZE));
   med_parameter_type paramType;
-  int nbOfSteps;
+  med_int nbOfSteps;
   MEDFILESAFECALLERRD0(MEDparameterInfo,(fid,1,pName,&paramType,descName,unitName,&nbOfSteps));
   std::string paramNameCpp(MEDLoaderBase::buildStringFromFortran(pName,MED_NAME_SIZE));
   _dt_unit=MEDLoaderBase::buildStringFromFortran(unitName,MED_SNAME_SIZE);
   _name=paramNameCpp;
   _desc_name=MEDLoaderBase::buildStringFromFortran(descName,MED_COMMENT_SIZE);
-  finishLoading(fid,paramType,nbOfSteps);
+  finishLoading(fid,paramType,FromMedInt<int>(nbOfSteps));
 }
 
 MEDFileParameterMultiTS::MEDFileParameterMultiTS(med_idt fid, const std::string& paramName)
 {
-  int nbPar(MEDnParameter(fid));
+  med_int nbPar(MEDnParameter(fid));
   std::ostringstream oss; oss << "MEDFileParameterDouble1TS : no double param name \"" << paramName << "\" ! Double Parameters available are : ";
   INTERP_KERNEL::AutoPtr<char> pName(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> descName(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE));
@@ -436,7 +437,7 @@ MEDFileParameterMultiTS::MEDFileParameterMultiTS(med_idt fid, const std::string&
   med_parameter_type paramType;
   for(int i=0;i<nbPar;i++)
     {
-      int nbOfSteps;
+      med_int nbOfSteps;
       MEDFILESAFECALLERRD0(MEDparameterInfo,(fid,i+1,pName,&paramType,descName,unitName,&nbOfSteps));
       std::string paramNameCpp(MEDLoaderBase::buildStringFromFortran(pName,MED_NAME_SIZE));
       if(paramNameCpp==paramName)
@@ -446,7 +447,7 @@ MEDFileParameterMultiTS::MEDFileParameterMultiTS(med_idt fid, const std::string&
               _dt_unit=MEDLoaderBase::buildStringFromFortran(unitName,MED_SNAME_SIZE);
               _name=paramNameCpp;
               _desc_name=MEDLoaderBase::buildStringFromFortran(descName,MED_COMMENT_SIZE);
-              finishLoading(fid,paramType,nbOfSteps);
+              finishLoading(fid,paramType,FromMedInt<int>(nbOfSteps));
               return ;
             }
           else
@@ -469,13 +470,13 @@ void MEDFileParameterMultiTS::finishLoading(med_idt fid, med_parameter_type typ,
   _param_per_ts.resize(nbOfSteps);
   for(int i=0;i<nbOfSteps;i++)
     {
-      int dt,it;
+      med_int dt,it;
       double tim;
       MEDFILESAFECALLERRD0(MEDparameterComputationStepInfo,(fid,_name.c_str(),i+1,&dt,&it,&tim));
       switch(typ)
       {
         case MED_FLOAT64:
-          _param_per_ts[i]=MEDFileParameterDouble1TSWTI::New(dt,it,tim);
+          _param_per_ts[i]=MEDFileParameterDouble1TSWTI::New(FromMedInt<int>(dt),FromMedInt<int>(it),tim);
           _param_per_ts[i]->readValue(fid,_name.c_str());
           break;
           /*case MED_INT32;
@@ -724,7 +725,7 @@ MEDFileParameters *MEDFileParameters::New(med_idt fid)
 
 MEDFileParameters::MEDFileParameters(med_idt fid)
 {
-  int nbPar=MEDnParameter(fid);
+  med_int nbPar=MEDnParameter(fid);
   _params.resize(nbPar);
   INTERP_KERNEL::AutoPtr<char> pName(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   INTERP_KERNEL::AutoPtr<char> descName(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE));
@@ -732,7 +733,7 @@ MEDFileParameters::MEDFileParameters(med_idt fid)
   med_parameter_type paramType;
   for(int i=0;i<nbPar;i++)
     {
-      int nbOfSteps;
+      med_int nbOfSteps;
       MEDFILESAFECALLERRD0(MEDparameterInfo,(fid,i+1,pName,&paramType,descName,unitName,&nbOfSteps));
       std::string paramNameCpp(MEDLoaderBase::buildStringFromFortran(pName,MED_NAME_SIZE));
       _params[i]=MEDFileParameterMultiTS::New(fid,paramNameCpp);
index b53ff049a64655dd7087ad90b1e90d605a38dd28..19a5f33ac8b73544b613a607a9fb3243f03c5fbb 100644 (file)
@@ -61,17 +61,18 @@ MEDFileSEConstAtt::MEDFileSEConstAtt(med_idt fid, MEDFileStructureElement *fathe
   std::string modelName(getModelName());
   INTERP_KERNEL::AutoPtr<char> constattname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE)),profilename(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   med_attribute_type constatttype;
-  int nbCompo;
+  med_int nbCompo;
   med_entity_type met;
-  int pflSz;
-  MEDFILESAFECALLERRD0(MEDstructElementConstAttInfo,(fid,modelName.c_str(),idCstAtt+1,constattname,&constatttype,&nbCompo,&met,profilename,&pflSz));
+  med_int miPflSz;
+  MEDFILESAFECALLERRD0(MEDstructElementConstAttInfo,(fid,modelName.c_str(),idCstAtt+1,constattname,&constatttype,&nbCompo,&met,profilename,&miPflSz));
   std::string name(MEDLoaderBase::buildStringFromFortran(constattname,MED_NAME_SIZE));
   setName(name);
   setProfile(MEDLoaderBase::buildStringFromFortran(profilename,MED_NAME_SIZE));
   _tof=MEDFileMesh::ConvertFromMEDFileEntity(met);
   //
   _val=MEDFileStructureElement::BuildFrom(constatttype);
-  nbCompo=MEDFileStructureElement::EffectiveNbCompo(constatttype,nbCompo);
+  nbCompo=MEDFileStructureElement::EffectiveNbCompo(constatttype,FromMedInt<int>(nbCompo));
+  mcIdType pflSz = miPflSz;
   if(pflSz==0 && getProfile().empty())
     {
       switch(met)
@@ -140,8 +141,10 @@ MEDFileSEVarAtt::MEDFileSEVarAtt(med_idt fid, MEDFileStructureElement *father, i
   INTERP_KERNEL::AutoPtr<char> varattname(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE)),profilename(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   med_attribute_type varatttype;
   {
-    int pflSz;
-    MEDFILESAFECALLERRD0(MEDstructElementVarAttInfo,(fid,modelName.c_str(),idVarAtt+1,varattname,&varatttype,&_nb_compo));
+    //int pflSz;
+    med_int nbComp;
+    MEDFILESAFECALLERRD0(MEDstructElementVarAttInfo,(fid,modelName.c_str(),idVarAtt+1,varattname,&varatttype,&nbComp));
+    _nb_compo=FromMedInt<int>(nbComp);
   }
   setName(MEDLoaderBase::buildStringFromFortran(varattname,MED_NAME_SIZE));
   _gen=MEDFileStructureElement::BuildFrom(varatttype);
@@ -174,11 +177,14 @@ MEDFileStructureElement::MEDFileStructureElement(med_idt fid, int idSE, const ME
   INTERP_KERNEL::AutoPtr<char> modelName(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE)),supportMeshName(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
   med_geometry_type sgeoType;
   med_entity_type entiyType;
-  int nConsAttr(0),nVarAttr(0);
+  med_int nConsAttr(0),nVarAttr(0);
   {
     med_bool anyPfl;
-    int nnode(0),ncell(0);
-    MEDFILESAFECALLERRD0(MEDstructElementInfo,(fid,idSE+1,modelName,&_id_type,&_dim,supportMeshName,&entiyType,&nnode,&ncell,&sgeoType,&nConsAttr,&anyPfl,&nVarAttr));
+    med_int nnode(0),ncell(0),dim(0);
+    med_geometry_type idType;
+    MEDFILESAFECALLERRD0(MEDstructElementInfo,(fid,idSE+1,modelName,&idType,&dim,supportMeshName,&entiyType,&nnode,&ncell,&sgeoType,&nConsAttr,&anyPfl,&nVarAttr));
+    _id_type=(int)idType;
+    _dim=FromMedInt<int>(dim);
   }
   _name=MEDLoaderBase::buildStringFromFortran(modelName,MED_NAME_SIZE);
   _sup_mesh_name=MEDLoaderBase::buildStringFromFortran(supportMeshName,MED_NAME_SIZE);
@@ -327,7 +333,7 @@ void MEDFileStructureElements::writeLL(med_idt fid) const
 
 MEDFileStructureElements::MEDFileStructureElements(med_idt fid, const MEDFileMeshSupports *ms)
 {
-  int nbSE(MEDnStructElement(fid));
+  med_int nbSE(MEDnStructElement(fid));
   _elems.resize(nbSE);
   for(int i=0;i<nbSE;i++)
     _elems[i]=MEDFileStructureElement::New(fid,i,ms);
@@ -344,7 +350,7 @@ MEDFileStructureElements::~MEDFileStructureElements()
 
 int MEDFileStructureElements::getNumberOf() const
 {
-  return _elems.size();
+  return (int)_elems.size();
 }
 
 std::vector<int> MEDFileStructureElements::getDynGTAvail() const
@@ -371,7 +377,7 @@ const MEDFileStructureElement *MEDFileStructureElements::getWithGT(int idGT) con
   throw INTERP_KERNEL::Exception(oss.str());
 }
 
-int MEDFileStructureElements::getNumberOfNodesPerSE(const std::string& seName) const
+mcIdType MEDFileStructureElements::getNumberOfNodesPerSE(const std::string& seName) const
 {
   if(seName=="MED_PARTICLE")
     return 1;
index 5cfeee1edf0dc2fb7f6ff603d20199a5f35972f4..b31802b36d14289b5da28b82a3b1e6352b368bab 100644 (file)
@@ -121,7 +121,7 @@ class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlon
     MEDLOADER_EXPORT int getNumberOf() const;
     MEDLOADER_EXPORT std::vector<int> getDynGTAvail() const;
     MEDLOADER_EXPORT const MEDFileStructureElement *getWithGT(int idGT) const;
-    MEDLOADER_EXPORT int getNumberOfNodesPerSE(const std::string& seName) const;
+    MEDLOADER_EXPORT mcIdType getNumberOfNodesPerSE(const std::string& seName) const;
     MEDLOADER_EXPORT const MEDFileStructureElement *getSEWithName(const std::string& seName) const;
     MEDLOADER_EXPORT std::vector<std::string> getVarAttsOf(const std::string& seName) const;
     MEDLOADER_EXPORT const MEDFileSEVarAtt *getVarAttOf(const std::string &seName, const std::string& varName) const;
index e05a25c80a820e85823acd1cdb658321d57811de..d30377eaeb8c7c9a9d6ee96fae56930698f531c1 100644 (file)
@@ -22,6 +22,7 @@
 #include "MEDFileSafeCaller.txx"
 #include "MEDLoaderBase.hxx"
 #include "MEDLoader.hxx"
+#include "MEDFileBasis.hxx"
 
 #include "InterpKernelAutoPtr.hxx"
 
@@ -103,7 +104,7 @@ void MEDFileUtilities::CheckFileForRead(const std::string& fileName)
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
   oss << " has been detected readable but ";
-  int major,minor,release;
+  med_int major,minor,release;
   MEDfileNumVersionRd(fid,&major,&minor,&release);
   if(major<2 || (major==2 && minor<2))
     {
@@ -155,7 +156,7 @@ void MEDCoupling::MEDFileWritable::setZipConnPolicy(int newVal)
 
 std::string MEDCoupling::MEDFileWritable::FileNameFromFID(med_idt fid)
 {
-  int lgth(MEDfileName(fid,0,0));
+  med_int lgth(MEDfileName(fid,0,0));
   if(lgth<=0)
     return std::string();
   INTERP_KERNEL::AutoPtr<char> tmp(new char[lgth+1]);
@@ -185,7 +186,7 @@ void MEDCoupling::MEDFileWritableStandAlone::write(const std::string& fileName,
   med_access_mode medmod(MEDFileUtilities::TraduceWriteMode(mode));
   MEDFileUtilities::AutoFid fid(MEDfileOpen(fileName.c_str(),medmod));
   std::ostringstream oss; oss << "MEDFileWritableStandAlone : error on attempt to write in file : \"" << fileName << "\""; 
-  MEDFileUtilities::CheckMEDCode(fid,fid,oss.str());
+  MEDFileUtilities::CheckMEDCode((int)fid,fid,oss.str());
   writeLL(fid);
 }
 
index 8b1ffc7c63e135d9d86c4c8430190cd36070d1ce..07d3e939303ae91c27ad3f7c39bae035f8d70f48 100644 (file)
@@ -163,12 +163,12 @@ int MEDLoaderNS::readUMeshDimFromFile(const std::string& fileName, const std::st
   med_mesh_type type_maillage;
   med_int Sdim,Mdim;
   std::string trueMeshName;
-  med_int meshId=getIdFromMeshName(fid,meshName,trueMeshName);
+  int meshId=FromMedInt<int>(getIdFromMeshName(fid,meshName,trueMeshName));
   INTERP_KERNEL::AutoPtr<char> dt_unit=MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE);
   med_sorting_type sortingType;
   med_int nstep;
   med_axis_type axisType;
-  int naxis(MEDmeshnAxis(fid,meshId));
+  med_int naxis(MEDmeshnAxis(fid,meshId));
   INTERP_KERNEL::AutoPtr<char> axisname=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
   INTERP_KERNEL::AutoPtr<char> axisunit=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
   MEDFILESAFECALLERRD0(MEDmeshInfo,(fid,meshId,nommaa,&Sdim,&Mdim,&type_maillage,maillage_description,dt_unit,&sortingType,&nstep,&axisType,axisname,axisunit));
@@ -185,9 +185,9 @@ int MEDLoaderNS::readUMeshDimFromFile(const std::string& fileName, const std::st
     {
       med_geometry_type curMedType=typmai[i];
       med_bool changement,transformation;
-      int curNbOfElemM(MEDmeshnEntity(fid,nommaa,numdt,numit,MED_CELL,curMedType,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
-      int curNbOfElemF(MEDmeshnEntity(fid,nommaa,numdt,numit,MED_CELL,curMedType,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));//limitation
-      int curNbOfElem;
+      med_int curNbOfElemM(MEDmeshnEntity(fid,nommaa,numdt,numit,MED_CELL,curMedType,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
+      med_int curNbOfElemF(MEDmeshnEntity(fid,nommaa,numdt,numit,MED_CELL,curMedType,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));//limitation
+      med_int curNbOfElem;
       med_entity_type whichEntity;
       MEDLoaderNS::dispatchElems(curNbOfElemM,curNbOfElemF,curNbOfElem,whichEntity);
       if(curNbOfElem>0)
@@ -208,8 +208,8 @@ int MEDLoaderNS::readUMeshDimFromFile(const std::string& fileName, const std::st
   return ret;
 }
 
-med_int MEDLoaderNS::getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName)
-    {
+int MEDLoaderNS::getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName)
+{
   if(meshName.empty())
     {
       std::vector<std::string> meshes=getMeshNamesFid(fid);
@@ -231,8 +231,8 @@ med_int MEDLoaderNS::getIdFromMeshName(med_idt fid, const std::string& meshName,
       throw INTERP_KERNEL::Exception(os2.str().c_str());
     }
   trueMeshName=meshName;
-  return iter-meshes.begin()+1;
-    }
+  return (int)( iter-meshes.begin()+1 );
+}
 
 std::vector<std::string> MEDLoaderNS::getMeshNamesFid(med_idt fid)
 {
@@ -248,10 +248,10 @@ std::vector<std::string> MEDLoaderNS::getMeshNamesFid(med_idt fid)
   std::vector<std::string> ret(n);
   for(int i=0;i<n;i++)
     {
-      int naxis(MEDmeshnAxis(fid,i+1));
+      med_int naxis(MEDmeshnAxis(fid,i+1));
       INTERP_KERNEL::AutoPtr<char> axisname=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
       INTERP_KERNEL::AutoPtr<char> axisunit=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
-      int nstep;
+      med_int nstep;
       MEDFILESAFECALLERRD0(MEDmeshInfo,(fid,i+1,nommaa,&space_dim,&mesh_dim,&type_maillage,maillage_description,dtunit,&stype,&nstep,&axistype,axisname,axisunit));
       std::string cur=MEDLoaderBase::buildStringFromFortran(nommaa,sizeof(nommaa));
       ret[i]=cur;
@@ -262,7 +262,7 @@ std::vector<std::string> MEDLoaderNS::getMeshNamesFid(med_idt fid)
 /*!
  * This methods allows to merger all entities and to considerate only cell types.
  */
-void MEDLoaderNS::dispatchElems(int nbOfElemCell, int nbOfElemFace, int& nbOfElem, med_entity_type& whichEntity)
+void MEDLoaderNS::dispatchElems(med_int nbOfElemCell, med_int nbOfElemFace, med_int& nbOfElem, med_entity_type& whichEntity)
 {
   if(nbOfElemCell>=nbOfElemFace)
     {
@@ -340,9 +340,9 @@ void MEDCoupling::MEDFileVersion(int& major, int& minor, int& release)
   med_err ret(MEDlibraryNumVersion(&majj,&minn,&rell));
   if(ret!=0)
     throw INTERP_KERNEL::Exception("MEDFileVersion : fail to call MEDlibraryNumVersion ! It looks very bad !");
-  major=majj;
-  minor=minn;
-  release=rell;
+  major=FromMedInt<int>(majj);
+  minor=FromMedInt<int>(minn);
+  release=FromMedInt<int>(rell);
 }
 
 /*!
@@ -378,7 +378,7 @@ void MEDCoupling::SetTooLongStrPolicy(int val)
  * - the space dimension
  * - the number of nodes
  */
-std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > MEDCoupling::GetUMeshGlobalInfo(const std::string& fileName, const std::string& meshName, int &meshDim, int& spaceDim, int& numberOfNodes)
+std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > MEDCoupling::GetUMeshGlobalInfo(const std::string& fileName, const std::string& meshName, int &meshDim, int& spaceDim, mcIdType& numberOfNodes)
 {
   MEDFileUtilities::AutoFid fid(MEDCoupling::OpenMEDFileForRead(fileName));
   std::set<int> poss;
@@ -386,15 +386,17 @@ std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > M
   char maillage_description[MED_COMMENT_SIZE+1];
   med_mesh_type type_maillage;
   std::string trueMeshName;
-  med_int meshId=MEDLoaderNS::getIdFromMeshName(fid,meshName,trueMeshName);
+  int meshId=MEDLoaderNS::getIdFromMeshName(fid,meshName,trueMeshName);
   INTERP_KERNEL::AutoPtr<char> dt_unit=MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE);
   med_sorting_type sortingType;
-  med_int nstep;
+  med_int nstep, mDim, sDim;
   med_axis_type axisType;
-  int naxis(MEDmeshnAxis(fid,meshId));
+  med_int naxis(MEDmeshnAxis(fid,meshId));
   INTERP_KERNEL::AutoPtr<char> axisname=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
   INTERP_KERNEL::AutoPtr<char> axisunit=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
-  MEDFILESAFECALLERRD0(MEDmeshInfo,(fid,meshId,nommaa,&spaceDim,&meshDim,&type_maillage,maillage_description,dt_unit,&sortingType,&nstep,&axisType,axisname,axisunit));
+  MEDFILESAFECALLERRD0(MEDmeshInfo,(fid,meshId,nommaa,&sDim,&mDim,&type_maillage,maillage_description,dt_unit,&sortingType,&nstep,&axisType,axisname,axisunit));
+  meshDim=FromMedInt<int>(mDim);
+  spaceDim=FromMedInt<int>(sDim);
   if(type_maillage!=MED_UNSTRUCTURED_MESH)
     {
       std::ostringstream oss; oss << "GetUMeshGlobalInfo : Mesh \""<< meshName << "\" in file \"" << fileName;
@@ -414,7 +416,7 @@ std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > M
   for(int i=0;i<MED_N_CELL_FIXED_GEO;i++)
     {
       med_geometry_type curMedType=typmai[i];
-      int curNbOfElemM(MEDmeshnEntity(fid,nommaa,numdt,numit,MED_CELL,curMedType,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
+      med_int curNbOfElemM(MEDmeshnEntity(fid,nommaa,numdt,numit,MED_CELL,curMedType,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
       if(curNbOfElemM>0)
         {
           INTERP_KERNEL::NormalizedCellType typp=typmai2[i];
@@ -431,7 +433,7 @@ std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > M
     {
       ret[maxLev-dims[i]].push_back(geoTypes[i]);
     }
-  numberOfNodes=MEDmeshnEntity(fid,nommaa,numdt,numit,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation);
+  numberOfNodes=ToIdType(MEDmeshnEntity(fid,nommaa,numdt,numit,MED_NODE,MED_NONE,MED_COORDINATE,MED_NO_CMODE,&changement,&transformation));
   return ret;
 }
 
@@ -518,7 +520,7 @@ std::vector<std::string> MEDCoupling::GetMeshFamiliesNames(const std::string& fi
   med_int numfam;
   for(int i=0;i<nfam;i++)
     {
-      int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
+      med_int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
       med_int natt=MEDnFamily23Attribute(fid,meshName.c_str(),i+1);
       INTERP_KERNEL::AutoPtr<med_int> attide=new med_int[natt];
       INTERP_KERNEL::AutoPtr<med_int> attval=new med_int[natt];
@@ -541,7 +543,7 @@ std::vector<std::string> MEDCoupling::GetMeshFamiliesNamesOnGroup(const std::str
   med_int numfam;
   for(int i=0;i<nfam;i++)
     {
-      int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
+      med_int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
       med_int natt=MEDnFamily23Attribute(fid,meshName.c_str(),i+1);
       INTERP_KERNEL::AutoPtr<med_int> attide=new med_int[natt];
       INTERP_KERNEL::AutoPtr<med_int> attval=new med_int[natt];
@@ -569,7 +571,7 @@ std::vector<std::string> MEDCoupling::GetMeshGroupsNamesOnFamily(const std::stri
   bool found=false;
   for(int i=0;i<nfam && !found;i++)
     {
-      int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
+      med_int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
       med_int natt=MEDnFamily23Attribute(fid,meshName.c_str(),i+1);
       INTERP_KERNEL::AutoPtr<med_int> attide=new med_int[natt];
       INTERP_KERNEL::AutoPtr<med_int> attval=new med_int[natt];
@@ -604,7 +606,7 @@ std::vector<std::string> MEDCoupling::GetMeshGroupsNames(const std::string& file
   med_int numfam;
   for(int i=0;i<nfam;i++)
     {
-      int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
+      med_int ngro=MEDnFamilyGroup(fid,meshName.c_str(),i+1);
       med_int natt=MEDnFamily23Attribute(fid,meshName.c_str(),i+1);
       INTERP_KERNEL::AutoPtr<med_int> attide=new med_int[natt];
       INTERP_KERNEL::AutoPtr<med_int> attval=new med_int[natt];
@@ -746,7 +748,7 @@ std::vector<std::string> MEDCoupling::GetCellFieldNamesOnMesh(const std::string&
       MEDFILESAFECALLERRD0(MEDfieldInfo,(fid,i+1,nomcha,maa_ass,&localmesh,&typcha,comp,unit,dt_unit,&nbPdt));
       std::string curFieldName=MEDLoaderBase::buildStringFromFortran(nomcha,MED_NAME_SIZE+1);
       std::string curMeshName=MEDLoaderBase::buildStringFromFortran(maa_ass,MED_NAME_SIZE+1);
-      int profilesize,nbi;
+      med_int profilesize,nbi;
       if(curMeshName==meshName)
         {
           bool found=false;
@@ -796,7 +798,7 @@ std::vector<std::string> MEDCoupling::GetNodeFieldNamesOnMesh(const std::string&
       std::string curMeshName=MEDLoaderBase::buildStringFromFortran(maa_ass,MED_NAME_SIZE+1);
       if(nbPdt>0)
         {
-          int profilesize,nbi;
+          med_int profilesize,nbi;
           MEDFILESAFECALLERRD0(MEDfieldComputingStepInfo,(fid,nomcha,1,&numdt,&numo,&dt));
           med_int nbOfVal(MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_NODE,MED_NONE,1,MED_COMPACT_PFLMODE,
                                                     pflname,&profilesize,locname,&nbi));
@@ -946,7 +948,7 @@ std::vector< std::pair<int,int> > MEDCoupling::GetCellFieldIterations(const std:
             {
               for(int k=0;k<nbPdt;k++)
                 {
-                  int profilesize,nbi;
+                  med_int profilesize,nbi;
                   MEDFILESAFECALLERRD0(MEDfieldComputingStepInfo,(fid,nomcha,k+1,&numdt,&numo,&dt));
                   med_int nbOfVal(MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_CELL,typmai[j],1,MED_COMPACT_PFLMODE,
                                                             pflname,&profilesize,locname,&nbi));
@@ -1014,7 +1016,7 @@ std::vector< std::pair<int,int> > MEDCoupling::GetNodeFieldIterations(const std:
         {
           for(int k=0;k<nbPdt;k++)
             {
-              int profilesize,nbi;
+              med_int profilesize,nbi;
               MEDFILESAFECALLERRD0(MEDfieldComputingStepInfo,(fid,nomcha,k+1,&numdt,&numo,&dt));
               med_int nbOfVal(MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_NODE,MED_NONE,1,MED_COMPACT_PFLMODE,
                                                         pflname,&profilesize,locname,&nbi));
@@ -1270,7 +1272,7 @@ std::vector<MEDCoupling::MEDCouplingFieldDouble *> MEDCoupling::ReadFieldsOnSame
   if(!mmuPtr)
     throw INTERP_KERNEL::Exception("ReadFieldsOnSameMesh : only unstructured mesh is managed !");
   MCAuto<MEDCouplingUMesh> m=mmuPtr->getMeshAtLevel(meshDimRelToMax);
-  const DataArrayInt *o2n=mmuPtr->getNumberFieldAtLevel(meshDimRelToMax);
+  const DataArrayIdType *o2n=mmuPtr->getNumberFieldAtLevel(meshDimRelToMax);
   MCAuto<MEDCouplingUMesh> m2(m->clone(true));
   if(o2n)
     m2->renumberCells(o2n->begin(),true);
@@ -1325,7 +1327,7 @@ namespace MEDCoupling
     MCAuto<typename Traits<T>::FieldType> ret(ff->getFieldOnMeshAtLevel(type,m));
     if(muPtr.isNotNull())
       {
-        const DataArrayInt *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
+        const DataArrayIdType *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
         if(num)
           ret->renumberCells(num->begin());
       }
@@ -1373,27 +1375,27 @@ namespace MEDCoupling
       {
         if(muPtr.isNotNull())
           {
-            const DataArrayInt *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
+            const DataArrayIdType *num(muPtr->getNumberFieldAtLevel(meshDimRelToMax));
             if(num)
               ret->renumberCells(num->begin());
           }
       }
     else
       {
-        DataArrayInt *pfl(nullptr),*arr2(nullptr);
+        DataArrayIdType *pfl(nullptr),*arr2(nullptr);
         MCAuto<typename Traits<T>::ArrayType> arr(ff->getFieldWithProfile(ON_NODES,meshDimRelToMax,mm,pfl));
-        MCAuto<DataArrayInt> pflSafe(pfl);
-        MCAuto<DataArrayInt> mp(m->getCellIdsFullyIncludedInNodeIds(pfl->begin(),pfl->end()));
+        MCAuto<DataArrayIdType> pflSafe(pfl);
+        MCAuto<DataArrayIdType> mp(m->getCellIdsFullyIncludedInNodeIds(pfl->begin(),pfl->end()));
         MCAuto<MEDCouplingUMesh> mzip(static_cast<MEDCouplingUMesh *>(m->buildPartAndReduceNodes(mp->begin(),mp->end(),arr2)));
-        MCAuto<DataArrayInt> arr2Safe(arr2);
-        MCAuto<DataArrayInt> arr3(arr2->invertArrayO2N2N2O(mzip->getNumberOfNodes()));
-        MCAuto<DataArrayInt> pflSorted(pflSafe->deepCopy()); pflSorted->sort(true);
+        MCAuto<DataArrayIdType> arr2Safe(arr2);
+        MCAuto<DataArrayIdType> arr3(arr2->invertArrayO2N2N2O(mzip->getNumberOfNodes()));
+        MCAuto<DataArrayIdType> pflSorted(pflSafe->deepCopy()); pflSorted->sort(true);
         if(!arr3->isEqualWithoutConsideringStr(*pflSorted))
           throw INTERP_KERNEL::Exception("ReadFieldNode : not implemented yet !");
         if(!arr3->isEqualWithoutConsideringStr(*pflSafe))
           {
-            MCAuto<DataArrayInt> o2n2(pflSafe->checkAndPreparePermutation());
-            MCAuto<DataArrayInt> n2o2(o2n2->invertArrayO2N2N2O(o2n2->getNumberOfTuples()));
+            MCAuto<DataArrayIdType> o2n2(pflSafe->checkAndPreparePermutation());
+            MCAuto<DataArrayIdType> n2o2(o2n2->invertArrayO2N2N2O(o2n2->getNumberOfTuples()));
             mzip->renumberNodes(n2o2->begin(),n2o2->getNumberOfTuples());
             arr->setName("");
             ret->setArray(arr);
@@ -1557,8 +1559,8 @@ void MEDLoaderNS::writeFieldWithoutReadingAndMappingOfMeshInFile(const std::stri
     {
       MCAuto<MEDFileUMesh> mmu(MEDFileUMesh::New());
       AssignStaticWritePropertiesTo(*mmu);
-      MCAuto<DataArrayInt> o2n(um->getRenumArrForMEDFileFrmt());
-      MCAuto<DataArrayInt> n2o(o2n->invertArrayO2N2N2O(o2n->getNumberOfTuples()));
+      MCAuto<DataArrayIdType> o2n(um->getRenumArrForMEDFileFrmt());
+      MCAuto<DataArrayIdType> n2o(o2n->invertArrayO2N2N2O(o2n->getNumberOfTuples()));
       f2->renumberCells(o2n->begin(),false);
       mmu->setMeshAtLevel(0,const_cast<MEDCouplingUMesh *>(static_cast<const MEDCouplingUMesh *>(f2->getMesh())));
       mmu->setRenumFieldArr(0,n2o);
@@ -1630,7 +1632,7 @@ void WriteFieldT(const std::string& fileName, const typename MEDCoupling::Traits
           MEDCouplingUMesh *m(dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh())));
           if(!m)
             throw INTERP_KERNEL::Exception("WriteField : only umesh in input field supported !");
-          MCAuto<DataArrayInt> o2n(m->getRenumArrForMEDFileFrmt());
+          MCAuto<DataArrayIdType> o2n(m->getRenumArrForMEDFileFrmt());
           f2->renumberCells(o2n->begin(),false);
           m=static_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
           MCAuto<MEDCouplingUMesh> mread(mmuPtr->getMeshAtLevel(m->getMeshDimension()-mm->getMeshDimension()));
@@ -1640,9 +1642,9 @@ void WriteFieldT(const std::string& fileName, const typename MEDCoupling::Traits
                 m->tryToShareSameCoordsPermute(*mread,_EPS_FOR_NODE_COMP);
               else
                 mread->setCoords(m->getCoords());
-              DataArrayInt *part(NULL);
+              DataArrayIdType *part(NULL);
               bool b(mread->areCellsIncludedIn(m,_COMP_FOR_CELL,part));
-              MCAuto<DataArrayInt> partSafe(part);
+              MCAuto<DataArrayIdType> partSafe(part);
               if(!b)
                 {
                   std::ostringstream oss; oss << "WriteField : The file \""<< fileName << "\" already contains a mesh named \""<< f->getMesh()->getName() << "\" and this mesh in the file is not compatible (a subpart) with the mesh you intend to write ! This is maybe due to a too strict policy ! Try with to lease it by calling SetCompPolicyForCell !";
@@ -1662,9 +1664,9 @@ void WriteFieldT(const std::string& fileName, const typename MEDCoupling::Traits
             }
           else
             {
-              DataArrayInt *part(NULL);
+              DataArrayIdType *part(NULL);
               bool b(mread->getCoords()->areIncludedInMe(m->getCoords(),_EPS_FOR_NODE_COMP,part));
-              MCAuto<DataArrayInt> partSafe(part);
+              MCAuto<DataArrayIdType> partSafe(part);
               if(!b)
                 {
                   std::ostringstream oss; oss << "WriteField : The file \""<< fileName << "\" already contains a mesh named \""<< f->getMesh()->getName() << "\" and this mesh in the file is not compatible (a subpart regarding nodes) with the mesh you intend to write ! This is maybe due to a too strict epsilon ! Try with to lease it by calling SetEpsilonForNodeComp !";
@@ -1738,7 +1740,7 @@ void WriteFieldUsingAlreadyWrittenMeshT(const std::string& fileName, const typen
   MEDCouplingUMesh *m(dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f->getMesh())));
   if(m)
     {
-      MCAuto<DataArrayInt> o2n(m->getRenumArrForMEDFileFrmt());
+      MCAuto<DataArrayIdType> o2n(m->getRenumArrForMEDFileFrmt());
       MCAuto< typename MEDCoupling::Traits<T>::FieldType > f2(f->deepCopy());
       f2->renumberCells(o2n->begin(),false);
       f1ts->setFieldNoProfileSBT(f2);
index e4471e2d242223299aaaf29a03a5e3bdbd8fe096..6dfadb3f62b0fae710b1295863897ce5437de61c 100644 (file)
@@ -26,6 +26,7 @@
 #include "MEDCouplingRefCountObject.hxx"
 #include "NormalizedUnstructuredMesh.hxx"
 #include "MCAuto.hxx"
+#include "MCIdType.hxx"
 
 #include <list>
 #include <vector>
@@ -48,7 +49,7 @@ namespace MEDCoupling
   MEDLOADER_EXPORT void MEDFileVersion(int& major, int& minor, int& release);
   MEDLOADER_EXPORT void CheckFileForRead(const std::string& fileName);
   MEDLOADER_EXPORT std::vector<std::string> GetMeshNames(const std::string& fileName);
-  MEDLOADER_EXPORT std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > GetUMeshGlobalInfo(const std::string& fileName, const std::string& meshName, int &meshDim, int& spaceDim, int& numberOfNodes);
+  MEDLOADER_EXPORT std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > GetUMeshGlobalInfo(const std::string& fileName, const std::string& meshName, int &meshDim, int& spaceDim, mcIdType& numberOfNodes);
   MEDLOADER_EXPORT std::vector< std::pair<std::string,std::string> > GetComponentsNamesOfField(const std::string& fileName, const std::string& fieldName);
   MEDLOADER_EXPORT std::vector<std::string> GetMeshNamesOnField(const std::string& fileName, const std::string& fieldName);
   MEDLOADER_EXPORT std::vector<std::string> GetMeshGroupsNames(const std::string& fileName, const std::string& meshName);
index b2f8fd78a5e53b3cf84b2559bff8811449dbf451..7fdbbae76a1e4deb448352ec58a381fe37baa45a 100644 (file)
@@ -45,7 +45,7 @@ int MEDLoaderBase::getStatusOfFile(const std::string& fileName)
   return EXIST_RW;
 }
 
-char *MEDLoaderBase::buildEmptyString(int lgth)
+char *MEDLoaderBase::buildEmptyString(std::size_t lgth)
 {
   char *ret=new char[lgth+1];
   std::fill(ret,ret+lgth,' ');
@@ -177,7 +177,7 @@ void MEDLoaderBase::safeStrCpy2(const char *src, int maxLgth, char *dest, int be
           return ;
         }
     }
-  int n(strlen(src));
+  std::size_t n(strlen(src));
   std::fill(dest,dest+maxLgth,' ');
   strncpy(dest,src,n);
 }
index 0b6ea093f99e05c3252980d8d41c238f5fa5b415..bc11fe2280dfa5d13dc1fea6d4a552fcbaed4c81 100644 (file)
@@ -30,7 +30,7 @@ class MEDLOADER_EXPORT MEDLoaderBase
 {
 public:
   static int getStatusOfFile(const std::string& fileName);
-  static char *buildEmptyString(int lgth);
+  static char *buildEmptyString(std::size_t lgth);
   static void getDirAndBaseName(const std::string& fullName, std::string& dirName, std::string& baseName);
   static std::string getPathSep();
   static std::string joinPath(const std::string& dirName, const std::string& baseName);
index 4726172f869205d3d5f3bc7ffc5381299c75fa1f..b637292b62d7e952dde8b290985640b19775e3ec 100644 (file)
@@ -34,10 +34,10 @@ namespace MEDCoupling
 namespace MEDLoaderNS
 {
   int readUMeshDimFromFile(const std::string& fileName, const std::string& meshName, std::vector<int>& possibilities);
-  void dispatchElems(int nbOfElemCell, int nbOfElemFace, int& nbOfElem, med_entity_type& whichEntity);
+  void dispatchElems(med_int nbOfElemCell, med_int nbOfElemFace, med_int& nbOfElem, med_entity_type& whichEntity);
   template<class T>
   void writeFieldWithoutReadingAndMappingOfMeshInFile(const std::string& fileName, const typename MEDCoupling::Traits<T>::FieldType *f, bool writeFromScratch);
-  med_int getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName);
+  int getIdFromMeshName(med_idt fid, const std::string& meshName, std::string& trueMeshName);
   std::vector<std::string> getMeshNamesFid(med_idt fid);
 }
 
index 75fe2242a95f4731b070515099870931fcef9da9..ad9e3511817b3415c70b46b84a0e92e212f9e92d 100644 (file)
@@ -262,7 +262,7 @@ namespace // define default GAUSS points
 
     TInt GetNbRef() const { return myNbRef; }
 
-    TCoordSlice GetCoord(TInt theRefId) { return &myRefCoord[0] + theRefId * myDim; }
+    TCoordSlice GetCoord(std::size_t theRefId) { return &myRefCoord[0] + theRefId * myDim; }
   };
   //---------------------------------------------------------------
   /*!
@@ -291,7 +291,7 @@ namespace // define default GAUSS points
     TGaussDef(const int geomType, const int nbPoints, const int variant=1);
 
     int dim() const { return SauvUtilities::getDimension( NormalizedCellType( myType )); }
-    int nbPoints() const { return myWeights.capacity(); }
+    std::size_t nbPoints() const { return myWeights.capacity(); }
 
   private:
     void add(const double x, const double weight);
@@ -669,8 +669,8 @@ namespace // define default GAUSS points
   THexa20a::THexa20a(TInt theDim, TInt theNbRef):
     TShapeFun(theDim,theNbRef)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] = -1.0;  aCoord[1] = -1.0;  aCoord[2] = -1.0; break;
@@ -701,8 +701,8 @@ namespace // define default GAUSS points
   THexa27a::THexa27a():
     THexa20a(3,27)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case 20: aCoord[0] =  0.0;  aCoord[1] =  0.0;  aCoord[2] = -1.0; break;
@@ -738,8 +738,8 @@ namespace // define default GAUSS points
   THexa20b::THexa20b(TInt theDim, TInt theNbRef):
     TShapeFun(theDim,theNbRef)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] = -1.0;  aCoord[1] = -1.0;  aCoord[2] = -1.0; break;
@@ -770,8 +770,8 @@ namespace // define default GAUSS points
   TPenta6a::TPenta6a():
     TShapeFun(3,6)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] = -1.0;  aCoord[1] =  1.0;  aCoord[2] =  0.0; break;
@@ -787,8 +787,8 @@ namespace // define default GAUSS points
   TPenta6b::TPenta6b():
     TShapeFun(3,6)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] = -1.0;  aCoord[1] =  1.0;  aCoord[2] =  0.0; break;
@@ -804,8 +804,8 @@ namespace // define default GAUSS points
   TPenta15a::TPenta15a():
     TShapeFun(3,15)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] = -1.0;  aCoord[1] =  1.0;  aCoord[2] =  0.0; break;
@@ -831,8 +831,8 @@ namespace // define default GAUSS points
   TPenta15b::TPenta15b():
     TShapeFun(3,15)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] = -1.0;  aCoord[1] =  1.0;  aCoord[2] =  0.0; break;
@@ -858,8 +858,8 @@ namespace // define default GAUSS points
   TPyra5a::TPyra5a():
     TShapeFun(3,5)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] =  1.0;  aCoord[1] =  0.0;  aCoord[2] =  0.0; break;
@@ -874,8 +874,8 @@ namespace // define default GAUSS points
   TPyra5b::TPyra5b():
     TShapeFun(3,5)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] =  1.0;  aCoord[1] =  0.0;  aCoord[2] =  0.0; break;
@@ -890,8 +890,8 @@ namespace // define default GAUSS points
   TPyra13a::TPyra13a():
     TShapeFun(3,13)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] =  1.0;  aCoord[1] =  0.0;  aCoord[2] =  0.0; break;
@@ -915,8 +915,8 @@ namespace // define default GAUSS points
   TPyra13b::TPyra13b():
     TShapeFun(3,13)
   {
-    TInt aNbRef = myRefCoord.size();
-    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
+    std::size_t aNbRef = myRefCoord.size();
+    for(std::size_t aRefId = 0; aRefId < aNbRef; aRefId++){
       TCoordSlice aCoord = GetCoord(aRefId);
       switch(aRefId){
       case  0: aCoord[0] =  1.0;  aCoord[1] =  0.0;  aCoord[2] =  0.0; break;
@@ -1497,7 +1497,7 @@ Cell::Cell(const Cell& ma)
 {
   if ( ma._sortedNodeIDs )
     {
-      _sortedNodeIDs = new int[ _nodes.size() ];
+      _sortedNodeIDs = new TID[ _nodes.size() ];
       std::copy( ma._sortedNodeIDs, ma._sortedNodeIDs + _nodes.size(), _sortedNodeIDs );
     }
 }
@@ -1510,7 +1510,7 @@ Cell::Cell(const Cell& ma)
 
 SauvUtilities::Link Cell::link(int i) const
 {
-  int i2 = ( i + 1 ) % _nodes.size();
+  std::size_t i2 = ( i + 1 ) % _nodes.size();
   if ( _reverse )
     return std::make_pair( _nodes[i2]->_number, _nodes[i]->_number );
   else
@@ -1528,7 +1528,7 @@ const TID* Cell::getSortedNodes() const
   if ( !_sortedNodeIDs )
     {
       size_t l=_nodes.size();
-      _sortedNodeIDs = new int[ l ];
+      _sortedNodeIDs = new TID[ l ];
 
       for (size_t i=0; i!=l; ++i)
         _sortedNodeIDs[i]=_nodes[i]->_number;
@@ -1548,9 +1548,9 @@ bool Cell::operator< (const Cell& ma) const
   if ( _nodes.size() == 1 )
     return _nodes[0] < ma._nodes[0];
 
-  const int* v1 = getSortedNodes();
-  const int* v2 = ma.getSortedNodes();
-  for ( const int* vEnd = v1 + _nodes.size(); v1 < vEnd; ++v1, ++v2 )
+  const TID* v1 = getSortedNodes();
+  const TID* v2 = ma.getSortedNodes();
+  for ( const TID* vEnd = v1 + _nodes.size(); v1 < vEnd; ++v1, ++v2 )
     if(*v1 != *v2)
       return *v1 < *v2;
   return false;
@@ -1588,9 +1588,9 @@ std::ostream& SauvUtilities::operator<< (std::ostream& os, const SauvUtilities::
  */
 //================================================================================
 
-int Group::size() const
+mcIdType Group::size() const
 {
-  int sizze = 0;
+  std::size_t sizze = 0;
   if ( !_relocTable.empty() )
     sizze =  _relocTable.size();
   else if ( _medGroup )
@@ -1600,7 +1600,7 @@ int Group::size() const
   else
     for ( size_t i = 0; i < _groups.size(); ++i )
       sizze += _groups[i]->size();
-  return sizze;
+  return ToIdType( sizze );
 }
 
 //================================================================================
@@ -1739,13 +1739,13 @@ bool ASCIIReader::getLine(char* & line)
   bool aResult = true;
   // Check the state of the buffer;
   // if there is too little left, read the next portion of data
-  int nBytesRest = _eptr - _ptr;
+  std::size_t nBytesRest = _eptr - _ptr;
   if (nBytesRest < GIBI_MaxOutputLen)
     {
       if (nBytesRest > 0)
         {
           // move the remaining portion to the buffer beginning
-          for ( int i = 0; i < nBytesRest; ++i )
+          for ( std::size_t i = 0; i < nBytesRest; ++i )
             _start[i] = _ptr[i];
           //memcpy (_tmpBuf, _ptr, nBytesRest);
           //memcpy (_start, _tmpBuf, nBytesRest);
@@ -1755,9 +1755,9 @@ bool ASCIIReader::getLine(char* & line)
           nBytesRest = 0;
         }
       _ptr = _start;
-      const int nBytesRead = ::read (_file,
-                                     &_start [nBytesRest],
-                                     GIBI_BufferSize - nBytesRest);
+      const std::size_t nBytesRead = ::read (_file,
+                                             &_start [nBytesRest],
+                                             GIBI_BufferSize - nBytesRest);
       nBytesRest += nBytesRead;
       _eptr = &_start [nBytesRest];
     }
@@ -1942,7 +1942,7 @@ int ASCIIReader::getInt() const
 
 float ASCIIReader::getFloat() const
 {
-  return getDouble();
+  return (float)getDouble();
 }
 
 //================================================================================
@@ -2327,7 +2327,7 @@ Group* IntermediateMED::addNewGroup(std::vector<SauvUtilities::Group*>* groupsTo
           // correct pointers to sub-groups
           for ( size_t j = 0; j < _groups[i]._groups.size(); ++j )
             {
-              int iG = _groups[i]._groups[j] - &_groups[0];
+              std::size_t iG = _groups[i]._groups[j] - &_groups[0];
               newGroups[i]._groups[j] = & newGroups[ iG ];
             }
         }
@@ -2337,7 +2337,7 @@ Group* IntermediateMED::addNewGroup(std::vector<SauvUtilities::Group*>* groupsTo
         for ( size_t i = 0; i < groupsToFix->size(); ++i )
           if ( (*groupsToFix)[i] )
             {
-              int iG = (*groupsToFix)[i] - &_groups[0];
+              std::size_t iG = (*groupsToFix)[i] - &_groups[0];
               (*groupsToFix)[i] = & newGroups[ iG ];
             }
 
@@ -2351,12 +2351,12 @@ Group* IntermediateMED::addNewGroup(std::vector<SauvUtilities::Group*>* groupsTo
               for ( size_t j = 0; j < fields[i]->_sub.size(); ++j )
                 if ( fields[i]->_sub[j]._support )
                   {
-                    int iG = fields[i]->_sub[j]._support - &_groups[0];
+                    std::size_t iG = fields[i]->_sub[j]._support - &_groups[0];
                     fields[i]->_sub[j]._support = & newGroups[ iG ];
                   }
               if ( fields[i]->_group )
                 {
-                  int iG = fields[i]->_group - &_groups[0];
+                  std::size_t iG = fields[i]->_group - &_groups[0];
                   fields[i]->_group = & newGroups[ iG ];
                 }
             }
@@ -2557,8 +2557,8 @@ void IntermediateMED::setFieldLongNames(std::set< std::string >& usedNames)
               if (medName.find( fields[ifi]->_name + "." ) == 0 )
                 {
                   std::vector<DoubleField::_Sub_data>& aSubDs = fields[ifi]->_sub;
-                  int nbSub = aSubDs.size();
-                  for (int isu = 0; isu < nbSub; isu++)
+                  std::size_t nbSub = aSubDs.size();
+                  for (std::size_t isu = 0; isu < nbSub; isu++)
                     for (int ico = 0; ico < aSubDs[isu].nbComponents(); ico++)
                       {
                         if (aSubDs[isu].compName(ico) == gibiName)
@@ -2837,7 +2837,7 @@ void IntermediateMED::orientFaces3D()
         for ( size_t j = 0; j < grp._cells.size(); ++j )
           if ( faces.insert( grp._cells[j] ).second )
             {
-              for ( size_t k = 0; k < grp._cells[j]->_nodes.size(); ++k )
+              for ( unsigned int k = 0; k < grp._cells[j]->_nodes.size(); ++k )
                 linkFacesMap[ grp._cells[j]->link( k ) ].push_back( grp._cells[j] );
               fgm.insert( std::make_pair( grp._cells[j], &grp ));
             }
@@ -3089,7 +3089,7 @@ void IntermediateMED::numberElements()
       // check if re-numeration is needed (to try to keep elem oreder as in sauve file )
       bool ok = true, renumEntity = false;
       CellsByDimIterator cellsIt( *this, dim );
-      int prevNbElems = 0;
+      mcIdType prevNbElems = 0;
       while ( const std::set<Cell> * typeCells = cellsIt.nextType() )
         {
           TID minNumber = std::numeric_limits<TID>::max(), maxNumber = 0;
@@ -3098,7 +3098,7 @@ void IntermediateMED::numberElements()
               if ( elemIt->_number < minNumber ) minNumber = elemIt->_number;
               if ( elemIt->_number > maxNumber ) maxNumber = elemIt->_number;
             }
-          TID typeSize = typeCells->size();
+          mcIdType typeSize = ToIdType( typeCells->size() );
           if ( typeSize != maxNumber - minNumber + 1 )
             ok = false;
           if ( prevNbElems+1 != (int)minNumber )
@@ -3112,12 +3112,12 @@ void IntermediateMED::numberElements()
       if ( ok && renumEntity ) // each geom type was numerated separately
         {
           cellsIt.init( dim );
-          prevNbElems = cellsIt.nextType()->size(); // no need to renumber the first type
+          prevNbElems = ToIdType( cellsIt.nextType()->size()); // no need to renumber the first type
           while ( const std::set<Cell> * typeCells = cellsIt.nextType() )
             {
               for ( elemIt = typeCells->begin(), elemEnd = typeCells->end(); elemIt!=elemEnd; ++elemIt)
                 elemIt->_number += prevNbElems;
-              prevNbElems += typeCells->size();
+              prevNbElems += ToIdType( typeCells->size() );
             }
         }
       if ( !ok )
@@ -3142,7 +3142,7 @@ MEDCoupling::DataArrayDouble * IntermediateMED::getCoords()
   DataArrayDouble* coordArray = DataArrayDouble::New();
   coordArray->alloc( _nbNodes, _spaceDim );
   double * coordPrt = coordArray->getPointer();
-  for ( int i = 0, nb = _points.size(); i < nb; ++i )
+  for ( unsigned int i = 0; i < _points.size(); ++i )
     {
       Node* n = getNode( i+1 );
       if ( n->isUsed() )
@@ -3175,9 +3175,9 @@ void IntermediateMED::setConnectivity( MEDCoupling::MEDFileUMesh*    mesh,
     {
       CellsByDimIterator dimCells( *this, dim );
 
-      int nbOfCells = 0;
+      mcIdType nbOfCells = 0;
       while ( const std::set<Cell > * cells = dimCells.nextType() )
-        nbOfCells += cells->size();
+        nbOfCells += ToIdType( cells->size() );
       if ( nbOfCells == 0 )
         continue;
 
@@ -3188,27 +3188,27 @@ void IntermediateMED::setConnectivity( MEDCoupling::MEDFileUMesh*    mesh,
       dimMesh->setMeshDimension( dim );
       dimMesh->allocateCells( nbOfCells );
 
-      int prevNbCells = 0;
+      mcIdType prevNbCells = 0;
       dimCells.init( dim );
       while ( const std::set<Cell > * cells = dimCells.nextType() )
         {
           // fill connectivity array to take into account order of elements in the sauv file
-          const int nbCellNodes = cells->begin()->_nodes.size();
+          const mcIdType nbCellNodes = ToIdType( cells->begin()->_nodes.size() );
           std::vector< TID > connectivity( cells->size() * nbCellNodes );
-          int * nodalConnOfCell;
+          TID * nodalConnOfCell;
           for ( elemIt = cells->begin(), elemEnd = cells->end(); elemIt != elemEnd; ++elemIt )
             {
               const Cell& cell = *elemIt;
-              const int index = cell._number - 1 - prevNbCells;
+              const TID index = cell._number - 1 - prevNbCells;
               nodalConnOfCell = &connectivity[ index * nbCellNodes ];
               if ( cell._reverse )
-                for ( int i = nbCellNodes-1; i >= 0; --i )
+                for ( mcIdType i = nbCellNodes-1; i >= 0; --i )
                   *nodalConnOfCell++ = cell._nodes[i]->_number - 1;
               else
-                for ( int i = 0; i < nbCellNodes; ++i )
+                for ( mcIdType i = 0; i < nbCellNodes; ++i )
                   *nodalConnOfCell++ = cell._nodes[i]->_number - 1;
             }
-          prevNbCells += cells->size();
+          prevNbCells += ToIdType( cells->size() );
 
           // fill dimMesh
           TCellType cellType = dimCells.type();
@@ -3237,8 +3237,8 @@ void IntermediateMED::setGroups( MEDCoupling::MEDFileUMesh* mesh )
     {
       const int meshDimRelToMaxExt = ( dim == 0 ? 1 : dim - meshDim );
 
-      std::vector<const DataArrayInt *> medGroups;
-      std::vector<MCAuto<DataArrayInt> > refGroups;
+      std::vector<const DataArrayIdType *> medGroups;
+      std::vector<MCAuto<DataArrayIdType> > refGroups;
       for ( size_t i = 0; i < _groups.size(); ++i )
         {
           Group& grp = _groups[i];
@@ -3284,10 +3284,10 @@ void IntermediateMED::setGroups( MEDCoupling::MEDFileUMesh* mesh )
                 }
             }
           // create a med group
-          grp._medGroup = DataArrayInt::New();
+          grp._medGroup = DataArrayIdType::New();
           grp._medGroup->setName( grp._name.c_str() );
           grp._medGroup->alloc( cell2order.size(), /*nbOfCompo=*/1 );
-          int * idsPtr = grp._medGroup->getPointer();
+          TID * idsPtr = grp._medGroup->getPointer();
           TCellToOrderMap::iterator cell2orderIt, cell2orderEnd = cell2order.end();
           for ( cell2orderIt = cell2order.begin(); cell2orderIt != cell2orderEnd; ++cell2orderIt )
             *idsPtr++ = (*cell2orderIt).first->_number - 1;
@@ -3336,7 +3336,7 @@ bool IntermediateMED::isOnAll( const Group* grp, int & dimRel ) const
 {
   int dim = getDim( grp );
 
-  int nbElems = 0;
+  mcIdType nbElems = 0;
   if ( dim == 0 )
     {
       nbElems = _nbNodes;
@@ -3346,7 +3346,7 @@ bool IntermediateMED::isOnAll( const Group* grp, int & dimRel ) const
     {
       CellsByDimIterator dimCells( *this, dim );
       while ( const std::set<Cell > * cells = dimCells.nextType() )
-        nbElems += cells->size();
+        nbElems += ToIdType( cells->size() );
 
       int meshDim = 3;
       for ( ; meshDim > 0; --meshDim )
@@ -3378,10 +3378,10 @@ MEDCoupling::MEDFileFields * IntermediateMED::makeMEDFileFields(MEDCoupling::MED
 
   MEDFileFields* fields = MEDFileFields::New();
 
-  for ( size_t i = 0; i < _nodeFields.size(); ++i )
+  for ( unsigned int i = 0; i < _nodeFields.size(); ++i )
     setFields( _nodeFields[i], fields, mesh, i+1, usedFieldNames );
 
-  for ( size_t i = 0; i < _cellFields.size(); ++i )
+  for ( unsigned int i = 0; i < _cellFields.size(); ++i )
     setFields( _cellFields[i], fields, mesh, i+1, usedFieldNames );
 
   return fields;
@@ -3415,7 +3415,7 @@ void IntermediateMED::setFields( SauvUtilities::DoubleField* fld,
     std::cout << "Castem field #" << castemID << " <" << fld->_name
               << "> is incompatible with MED format, so we split it into several fields:" << std::endl;
 
-  for ( size_t iSub = 0; iSub < fld->_sub.size(); )
+  for ( unsigned int iSub = 0; iSub < fld->_sub.size(); )
     {
       // set field name
       if ( !uniteSubs || fld->_name.empty() )
@@ -3429,8 +3429,8 @@ void IntermediateMED::setFields( SauvUtilities::DoubleField* fld,
       double * valPtr = values->getPointer();
       if ( uniteSubs )
         {
-          int nbElems = fld->_group->size();
-          for ( int elemShift = 0; elemShift < nbElems && iSub < fld->_sub.size(); )
+          mcIdType nbElems = fld->_group->size();
+          for ( mcIdType elemShift = 0; elemShift < nbElems && iSub < fld->_sub.size(); )
             elemShift += fld->setValues( valPtr, iSub++, elemShift );
           setTS( fld, values, medFields, mesh );
         }
@@ -3660,7 +3660,7 @@ bool DoubleField::isMultiTimeStamps() const
 
 bool DoubleField::isMedCompatible(bool& sameNbGauss) const
 {
-  for ( size_t iSub = 0; iSub < _sub.size(); ++iSub )
+  for ( unsigned int iSub = 0; iSub < _sub.size(); ++iSub )
     {
       if ( !getSupport(iSub) || !getSupport(iSub)->_medGroup )
         THROW_IK_EXCEPTION("SauvReader INTERNAL ERROR: NULL field support");
@@ -3741,9 +3741,9 @@ MEDCoupling::TypeOfTimeDiscretization DoubleField::getMedTimeDisc() const
  */
 //================================================================================
 
-int DoubleField::getNbTuples( const int iSub ) const
+mcIdType DoubleField::getNbTuples( const int iSub ) const
 {
-  int nb = 0;
+  mcIdType nb = 0;
   if ( hasCommonSupport() && !_group->_groups.empty() )
     for ( size_t i = 0; i < _group->_groups.size(); ++i )
       nb += _sub[i].nbGauss() * _sub[i]._support->size();
@@ -3758,7 +3758,7 @@ int DoubleField::getNbTuples( const int iSub ) const
  */
 //================================================================================
 
-int DoubleField::setValues( double * valPtr, const int iSub, const int elemShift ) const
+mcIdType DoubleField::setValues( double * valPtr, const int iSub, const mcIdType elemShift ) const
 {
   // find values for iSub
   int iComp = 0;
@@ -3768,41 +3768,41 @@ int DoubleField::setValues( double * valPtr, const int iSub, const int elemShift
 
   // Set values
 
-  const std::vector< unsigned >& relocTable = getSupport( iSub )->_relocTable;
+  const std::vector< mcIdType >& relocTable = getSupport( iSub )->_relocTable;
 
-  const int nbElems      = _sub[iSub]._support->size();
+  const mcIdType nbElems = _sub[iSub]._support->size();
   const int nbGauss      = _sub[iSub].nbGauss();
   const int nbComponents = _sub[iSub].nbComponents();
   const int nbValsByElem = nbComponents * nbGauss;
 
   // check nb values
-  int nbVals = 0;
+  mcIdType nbVals = 0;
   for ( iComp = 0; iComp < nbComponents; ++iComp )
-    nbVals += compValues[iComp].size();
+    nbVals += ToIdType( compValues[iComp].size() );
   const bool isConstField = ( nbVals == nbComponents ); // one value per component (issue 22321)
   if ( !isConstField && nbVals != nbElems * nbValsByElem )
     THROW_IK_EXCEPTION("SauvMedConvertor.cxx: support size mismatches field size");
 
   // compute nb values in previous subs
-  int valsShift = 0;
-  for ( int iS = iSub-1, shift = elemShift; shift > 0; --iS)
+  mcIdType valsShift = 0;
+  for ( mcIdType iS = iSub-1, shift = elemShift; shift > 0; --iS)
     {
-      int nbE = _sub[iS]._support->size();
+      mcIdType nbE = _sub[iS]._support->size();
       shift -= nbE;
       valsShift += nbE * _sub[iS].nbComponents() * _sub[iS].nbGauss();
     }
 
   if ( isConstField )
-    for ( int iE = 0; iE < nbElems; ++iE )
+    for ( mcIdType iE = 0; iE < nbElems; ++iE )
       {
-        int iMed = valsShift + nbValsByElem * ( relocTable.empty() ? iE : relocTable[iE+elemShift]-elemShift );
+        mcIdType iMed = valsShift + nbValsByElem * ( relocTable.empty() ? iE : relocTable[iE+elemShift]-elemShift );
         for ( iComp = 0; iComp < nbComponents; ++iComp )
           valPtr[ iMed + iComp ] = compValues[iComp][ 0 ];
       }
   else
-    for ( int iE = 0; iE < nbElems; ++iE )
+    for ( mcIdType iE = 0; iE < nbElems; ++iE )
       {
-        int iMed = valsShift + nbValsByElem * ( relocTable.empty() ? iE : relocTable[iE+elemShift]-elemShift );
+        mcIdType iMed = valsShift + nbValsByElem * ( relocTable.empty() ? iE : relocTable[iE+elemShift]-elemShift );
         for ( iComp = 0; iComp < nbComponents; ++iComp )
           for ( int iG = 0; iG < nbGauss; ++iG )
             valPtr[ iMed + iG * nbComponents + iComp ] = compValues[iComp][ iE * nbGauss + iG ];
index 3505e486cc1f26f1fd98dcc13bea99f2687e8f30..9fc216225eab01f6ac5e2a475537d8d4c7e31b40 100644 (file)
@@ -51,7 +51,7 @@ namespace SauvUtilities
   struct IntermediateMED;
 
   // ==============================================================================
-  typedef int                TID;  // an ID countered from 1
+  typedef mcIdType           TID;  // an ID countered from 1
   typedef std::pair<TID,TID> Link; // a pair of node numbers
 
   typedef INTERP_KERNEL::NormalizedCellType TCellType;
@@ -103,11 +103,11 @@ namespace SauvUtilities
                                             reference is converted into a copy of the medGroup
                                             (issue 0021311)
                                          */
-    MEDCoupling::DataArrayInt* _medGroup;   // result of conversion
-    std::vector< unsigned >   _relocTable; // for _cells[i] gives its index in _medGroup
+    MEDCoupling::DataArrayIdType* _medGroup;   // result of conversion
+    std::vector< mcIdType >       _relocTable; // for _cells[i] gives its index in _medGroup
 
     bool empty() const { return _cells.empty() && _groups.empty(); }
-    int  size()  const;
+    mcIdType  size()  const;
     Group():_cellType(INTERP_KERNEL::NORM_ERROR), _isProfile(false), _medGroup(NULL) {}
   };
 
@@ -126,7 +126,7 @@ namespace SauvUtilities
 
       void setData( int nb_comp, Group* supp )
       { _support = supp; _comp_names.resize(nb_comp); _nb_gauss.resize(nb_comp,1); }
-      int  nbComponents() const { return _comp_names.size(); }
+      int  nbComponents() const { return (int)_comp_names.size(); }
       std::string & compName( int i_comp ) { return _comp_names[ i_comp ]; }
       bool isSameNbGauss() const { return *std::max_element( _nb_gauss.begin(), _nb_gauss.end() ) ==
           *std::min_element( _nb_gauss.begin(), _nb_gauss.end() ); }
@@ -158,11 +158,11 @@ namespace SauvUtilities
     bool isMedCompatible(bool& sameNbGauss) const;
     MEDCoupling::TypeOfField getMedType( const int iSub=0 ) const;
     MEDCoupling::TypeOfTimeDiscretization getMedTimeDisc() const;
-    int getNbTuples( const int iSub=0 ) const;
+    mcIdType getNbTuples( const int iSub=0 ) const;
     int getNbValuesPerElement( const int iSub=0 ) const;
     int getNbGauss( const int iSub=0 ) const;
     const Group* getSupport( const int iSub=0 ) const;
-    int setValues( double * valPtr, const int iSub, const int elemShift=0 ) const;
+    mcIdType setValues( double * valPtr, const int iSub, const mcIdType elemShift=0 ) const;
     void splitSubWithDiffNbGauss();
 
     //virtual void dump(std::ostream&) const;
@@ -253,7 +253,7 @@ namespace SauvUtilities
     ~IntermediateMED();
 
     Node* getNode( TID nID ) { return _points.getNode( nID ); }
-    int getNbCellsOfType( TCellType type ) const { return _cellsByType[type].size(); }
+    mcIdType getNbCellsOfType( TCellType type ) const { return ToIdType(_cellsByType[type].size()); }
     const Cell* insert(TCellType type, const Cell& ma) { return &( *_cellsByType[type].insert( ma ).first ); }
     Group* addNewGroup(std::vector<SauvUtilities::Group*>* groupsToFix=0);
     MEDCoupling::MEDFileData* convertInMEDFileDS();
index 30a62fecbe913530f3a61ad35fe08233e0120b63..931d35255e85cbfe3731da16330b557450a710b1 100644 (file)
@@ -735,10 +735,10 @@ void SauvReader::setFieldSupport(const vector<SauvUtilities::Group*>& supports,
           while ( isSwapped )
             {
               isSwapped = false;
-              for ( size_t i = 1; i < groups.size(); ++i )
+              for ( std::size_t i = 1; i < groups.size(); ++i )
                 {
-                  int nbN1 = groups[i-1]->empty() ? 0 : groups[i-1]->_cells[0]->_nodes.size();
-                  int nbN2 = groups[i  ]->empty() ? 0 : groups[i  ]->_cells[0]->_nodes.size();
+                  std::size_t nbN1 = groups[i-1]->empty() ? 0 : groups[i-1]->_cells[0]->_nodes.size();
+                  std::size_t nbN2 = groups[i  ]->empty() ? 0 : groups[i  ]->_cells[0]->_nodes.size();
                   if ( nbN1 > nbN2 )
                     {
                       isSwapped = isModified = true;
@@ -1204,7 +1204,7 @@ void SauvReader::read_PILE_STRINGS (const int                 nbObjects,
       const int fixedLength = 71;
       while ((int)aWholeString.length() < stringLen)
         {
-          int remainLen = stringLen - aWholeString.length();
+          int remainLen = (int)(stringLen - aWholeString.length());
           int len;
           if ( remainLen > fixedLength )
             {
@@ -1226,7 +1226,7 @@ void SauvReader::read_PILE_STRINGS (const int                 nbObjects,
       while ((int)aWholeString.length() < stringLen)
         {
           getNextLine( line );
-          int remainLen = stringLen - aWholeString.length();
+          int remainLen = (int)(stringLen - aWholeString.length());
           if ( remainLen > fixedLength )
             {
               aWholeString += line + 1;
index 55ed3c39328d89bef07de1a6c445a96ed545d777..fbdbe0bff4df8d7fdb19b3f929c38cdf714e8264 100644 (file)
@@ -130,9 +130,9 @@ namespace
     if (!healedName.empty())
       {
         string name = healedName;
-        int len = name.length();
-        for (int i = 0; i < len; ++i)
-          name[i] = toupper(name[i]);
+        std::size_t len = name.length();
+        for (std::size_t i = 0; i < len; ++i)
+          name[i] = (char)toupper(name[i]);
 
         bool doResave = false; // only for tracing
 
@@ -316,7 +316,7 @@ int SauvWriter::SubMesh::nbTypes() const
 void SauvWriter::fillSubMeshes( int& nbSauvObjects, map<string,int>& nameNbMap )
 {
   // evaluate nb of _subs in order to avoid re-allocation of _subs
-  int nbSubs = 1; // for the very mesh
+  std::size_t nbSubs = 1; // for the very mesh
   nbSubs += _fileMesh->getFamilyInfo().size() + 4;  // + 4 zero families (for each dimRelExt)
   nbSubs += _fileMesh->getGroupInfo().size();
   nbSubs += evaluateNbProfileSubMeshes();
@@ -375,21 +375,21 @@ void SauvWriter::fillFamilySubMeshes()
     {
       int dimRelExt = dims[ iDim ];
       MCAuto< MEDCouplingMesh > mesh = _fileMesh->getMeshAtLevel(dimRelExt);
-      const DataArrayInt * famIds = _fileMesh->getFamilyFieldAtLevel(dimRelExt);
+      const DataArrayIdType * famIds = _fileMesh->getFamilyFieldAtLevel(dimRelExt);
       if ( !famIds ) continue;
 
-      int curFamID = 0;
+      mcIdType curFamID = 0;
       SubMesh* curSubMesh = addSubMesh( "", dimRelExt ); // submesh of zero family
       _famIDs2Sub[0] = curSubMesh;
-      int sub0Index = _subs.size()-1;
+      std::size_t sub0Index = _subs.size()-1;
 
-      const int * famID = famIds->begin(), * famIDEnd = famIds->end();
-      for ( int cellID = 0; famID < famIDEnd; ++famID, cellID++ )
+      const mcIdType * famID = famIds->begin(), * famIDEnd = famIds->end();
+      for ( mcIdType cellID = 0; famID < famIDEnd; ++famID, cellID++ )
         {
           if ( *famID != curFamID )
             {
               curFamID = *famID;
-              map< int, SubMesh* >::iterator f2s = _famIDs2Sub.insert( make_pair( curFamID, nilSm )).first;
+              map< mcIdType, SubMesh* >::iterator f2s = _famIDs2Sub.insert( make_pair( curFamID, nilSm )).first;
               if ( !f2s->second )
                 f2s->second = addSubMesh( "", dimRelExt ); // no names for families
               curSubMesh = f2s->second;
@@ -407,7 +407,7 @@ void SauvWriter::fillFamilySubMeshes()
       else if ( dimRelExt == 0 )
         {
           // make a submesh including all cells
-          if ( sub0Index == (int)(_subs.size()-1) )
+          if ( sub0Index == _subs.size()-1 )
             {
               _famIDs2Sub[0]->_name = _fileMesh->getName(); // there is the zero family only
             }
@@ -416,7 +416,7 @@ void SauvWriter::fillFamilySubMeshes()
               curSubMesh = addSubMesh( _fileMesh->getName(), dimRelExt );
               if ( _famIDs2Sub[0]->nbTypes() == 0 )
                 sub0Index++; // skip an empty zero family
-              for ( size_t i = sub0Index; i < _subs.size()-1; ++i )
+              for ( std::size_t i = sub0Index; i < _subs.size()-1; ++i )
                 curSubMesh->_subs.push_back( & _subs[i] );
             }
         }
@@ -442,8 +442,8 @@ void SauvWriter::fillGroupSubMeshes()
       std::size_t k = 0;
       for ( size_t i = 0; i < famNames.size(); ++i )
         {
-          int famID = _fileMesh->getFamilyId( famNames[i].c_str() );
-          map< int, SubMesh* >::iterator i2f = _famIDs2Sub.find( famID );
+          mcIdType famID = _fileMesh->getFamilyId( famNames[i].c_str() );
+          map< mcIdType, SubMesh* >::iterator i2f = _famIDs2Sub.find( famID );
           if ( i2f != _famIDs2Sub.end() )
             {
               famSubMeshes[ k ] = i2f->second;
@@ -519,7 +519,7 @@ void SauvWriter::fillProfileSubMeshes()
                   if ( !pfl2sm->second )
                     {
                       SubMesh* sm = pfl2sm->second = addSubMesh( "", dimRelExt ); // no names for profiles
-                      const DataArrayInt * pfl = isOnAll ? 0 : fields[i]->getProfile( pfls[iType][iPfl].c_str() );
+                      const DataArrayIdType * pfl = isOnAll ? 0 : fields[i]->getProfile( pfls[iType][iPfl].c_str() );
                       makeProfileIDs( sm, types[iType], pfl );
                     }
                 }
@@ -536,11 +536,11 @@ void SauvWriter::fillProfileSubMeshes()
 
 int SauvWriter::evaluateNbProfileSubMeshes() const
 {
-  int nb = 0;
-  for ( size_t i = 0; i < _nodeFields.size(); ++i )
+  std::size_t nb = 0;
+  for ( std::size_t i = 0; i < _nodeFields.size(); ++i )
     nb += 1 + _nodeFields[i]->getPflsReallyUsed().size();
 
-  for ( size_t i = 0; i < _cellFields.size(); ++i )
+  for ( std::size_t i = 0; i < _cellFields.size(); ++i )
     {
       nb += _cellFields[i]->getPflsReallyUsed().size();
 
@@ -554,7 +554,7 @@ int SauvWriter::evaluateNbProfileSubMeshes() const
       nb += 2 * types.size(); // x 2 - a type can be on nodes and on cells at the same time
     }
 
-  return nb;
+  return (int)nb;
 }
 
 //================================================================================
@@ -565,14 +565,14 @@ int SauvWriter::evaluateNbProfileSubMeshes() const
 
 void SauvWriter::makeProfileIDs( SubMesh*                          sm,
                                  INTERP_KERNEL::NormalizedCellType type,
-                                 const DataArrayInt*               profile )
+                                 const DataArrayIdType*            profile )
 {
   MCAuto< MEDCouplingMesh >
     mesh = _fileMesh->getMeshAtLevel(sm->_dimRelExt);
   const MEDCouplingUMesh* uMesh = dynamic_cast< const MEDCouplingUMesh* > ((const MEDCouplingMesh*) mesh );
 
   if ( sm->_dimRelExt == 1 ) type = INTERP_KERNEL::NORM_POINT1;
-  vector< int >& ids = sm->_cellIDsByType[ type ];
+  vector< mcIdType >& ids = sm->_cellIDsByType[ type ];
 
   if ( sm->_dimRelExt == 1 || !uMesh )
     {
@@ -585,13 +585,13 @@ void SauvWriter::makeProfileIDs( SubMesh*                          sm,
         {
           ids.resize( sm->_dimRelExt == 1 ? mesh->getNumberOfNodes() : mesh->getNumberOfCells() );
           for ( size_t i = 0; i < ids.size(); ++i )
-            ids[i]=i;
+            ids[i] = ToIdType( i );
         }
     }
   else
     {
       // profile on cells
-      vector<int> code(3);
+      vector<mcIdType> code(3);
       code[0] = type;
       if ( profile ) // on profile
         {
@@ -603,16 +603,16 @@ void SauvWriter::makeProfileIDs( SubMesh*                          sm,
           code[1] = mesh->getNumberOfCellsWithType( type );
           code[2] = -1;
         }
-      vector<const DataArrayInt *> idsPerType( 1, profile );
-      MCAuto<DataArrayInt>
+      vector<const DataArrayIdType *> idsPerType( 1, profile );
+      MCAuto<DataArrayIdType>
         resIDs = uMesh->checkTypeConsistencyAndContig( code, idsPerType );
-      if (( const DataArrayInt *) resIDs )
+      if (( const DataArrayIdType *) resIDs )
       {
         ids.assign( resIDs->begin(), resIDs->end() );
       }
       else // mesh includes only one type
       {
-        int nbE = code[1];
+        mcIdType nbE = code[1];
         for ( ids.resize( nbE ); nbE; --nbE )
           ids[ nbE-1 ] = nbE-1;
       }
@@ -727,7 +727,7 @@ void SauvWriter::writeSubMeshes()
 
   TFieldCounter fcount( *_sauvFile, 10 ); // 10 integers per line
 
-  for ( size_t iSub = 0; iSub < _subs.size(); ++iSub )
+  for ( unsigned int iSub = 0; iSub < _subs.size(); ++iSub )
     {
       SubMesh& sm = _subs[iSub];
       if ( sm._nbSauvObjects < 1 ) continue;
@@ -753,7 +753,7 @@ void SauvWriter::writeSubMeshes()
 
           for ( int iType=0; iType < sm.cellIDsByTypeSize(); ++iType )
             {
-              const vector<int>& cellIDs = sm._cellIDsByType[iType];
+              const vector<mcIdType>& cellIDs = sm._cellIDsByType[iType];
               if ( cellIDs.empty() ) continue;
 
               INTERP_KERNEL::NormalizedCellType
@@ -762,7 +762,7 @@ void SauvWriter::writeSubMeshes()
                 cell = INTERP_KERNEL::CellModel::GetCellModel( cellType );
               int castemType       = SauvUtilities::med2gibiGeom( cellType );
               unsigned nbElemNodes = cell.getNumberOfNodes();
-              unsigned nbElems     = cellIDs.size();
+              std::size_t  nbElems = cellIDs.size();
 
               *_sauvFile << setw(8) << castemType
                         << zeroI8
@@ -772,14 +772,14 @@ void SauvWriter::writeSubMeshes()
 
               // write color of each element
               // * 8000 FORMAT(10I8)
-              for ( size_t i = 0; i < nbElems; ++i, fcount++ ) *_sauvFile << zeroI8;
+              for ( std::size_t i = 0; i < nbElems; ++i, fcount++ ) *_sauvFile << zeroI8;
               fcount.stop();
 
               // write connectivity
               // gibi IDs are in FORTRAN mode while MEDCoupling IDs are in C mode
               if ( sm._dimRelExt == 1 ) // nodes
                 {
-                  for ( size_t i = 0; i < nbElems; ++i, fcount++ )
+                  for ( std::size_t i = 0; i < nbElems; ++i, fcount++ )
                     *_sauvFile << setw(8) << ( cellIDs[i] + 1 );
                 }
               else
@@ -787,8 +787,8 @@ void SauvWriter::writeSubMeshes()
                   // indices to transform MED connectivity to GIBI one
                   const int * toMedConn = getGibi2MedQuadraticInterlace( cellType );
 
-                  vector< int > cellConn( nbElemNodes ), transformedConn( nbElemNodes );
-                  for ( size_t i = 0; i < nbElems; ++i )
+                  vector< mcIdType > cellConn( nbElemNodes ), transformedConn( nbElemNodes );
+                  for ( std::size_t i = 0; i < nbElems; ++i )
                     {
                       cellConn.clear();
                       umesh->getNodeIdsOfCell( cellIDs[i], cellConn );
@@ -850,13 +850,13 @@ void SauvWriter::writeNodes()
 
   // write the index connecting nodes with their coordinates
 
-  const int nbNodes = umesh->getNumberOfNodes();
+  const mcIdType nbNodes = umesh->getNumberOfNodes();
   *_sauvFile << " ENREGISTREMENT DE TYPE   2" << endl
              << " PILE NUMERO  32NBRE OBJETS NOMMES       0NBRE OBJETS" << setw(8) << nbNodes << endl;
   *_sauvFile << setw(8) << nbNodes << endl;
   //
   TFieldCounter fcount( *_sauvFile, 10 );// * 8000 FORMAT(10I8)
-  for ( int i = 0; i < nbNodes; ++i, fcount++ )
+  for ( mcIdType i = 0; i < nbNodes; ++i, fcount++ )
     *_sauvFile << setw(8) << i + 1; 
   fcount.stop();
 
@@ -865,8 +865,8 @@ void SauvWriter::writeNodes()
   *_sauvFile << " ENREGISTREMENT DE TYPE   2" << endl;
   *_sauvFile << " PILE NUMERO  33NBRE OBJETS NOMMES       0NBRE OBJETS       1" << endl;
   // 
-  const int dim = umesh->getSpaceDimension();
-  const int nbValues = nbNodes * ( dim + 1 );
+  const int           dim = umesh->getSpaceDimension();
+  const mcIdType nbValues = nbNodes * ( dim + 1 );
   *_sauvFile << setw(8) << nbValues << endl;
 
   // * 8003   FORMAT(1P,3E22.14)
@@ -923,7 +923,7 @@ void SauvWriter::writeLongNames()
   *_sauvFile << endl;
 
   string theWholeString; // concatenated long names
-  vector<int> theOffsets;
+  vector<std::size_t> theOffsets;
   int iStr = 1;
   TFieldCounter fcount (*_sauvFile, 10);
 
@@ -976,7 +976,7 @@ void SauvWriter::writeLongNames()
   // Write the STRING pile
   // ----------------------
 
-  const int nbNames = theOffsets.size();
+  const std::size_t nbNames = theOffsets.size();
   *_sauvFile << " ENREGISTREMENT DE TYPE   2" << endl
         << " PILE NUMERO  27NBRE OBJETS NOMMES" << zeroI8 << "NBRE OBJETS" << setw(8) << nbNames << endl
         << setw(8) << theWholeString.length() << setw(8) << nbNames << endl;
@@ -987,7 +987,7 @@ void SauvWriter::writeLongNames()
     *_sauvFile << setw(72) << theWholeString.substr(aPos, fixedLength) << endl;
 
   // write the offsets
-  for ( size_t i = 0; i < theOffsets.size(); ++i, fcount++ )
+  for ( std::size_t i = 0; i < theOffsets.size(); ++i, fcount++ )
     *_sauvFile << setw(8) << theOffsets[i];
 }
 
@@ -1004,7 +1004,7 @@ void SauvWriter::writeFieldNames( const bool                 isNodal,
     flds = isNodal ? _nodeFields : _cellFields;
   map<string,int> nameNbMap;
 
-  for ( size_t iF = 0; iF < flds.size(); ++iF )
+  for ( unsigned int iF = 0; iF < flds.size(); ++iF )
     {
       string name = addName( nameNbMap, fldNamePrefixMap, flds[iF]->getName(), iF+1 );
       nameGIBItoMED aMEDName;
@@ -1089,9 +1089,9 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
       // (1) write nb subcomponents, nb components(total)
       vector< pair<int,int> >  iters = _nodeFields[iF]->getIterations();
       const vector<string>& compInfo = _nodeFields[iF]->getInfo();
-      const int nbSub = iters.size();
-      const int nbComp = compInfo.size();
-      const int totalNbComp = nbSub * nbComp;
+      const std::size_t nbSub = iters.size();
+      const std::size_t nbComp = compInfo.size();
+      const std::size_t totalNbComp = nbSub * nbComp;
       *_sauvFile << setw(8) << nbSub
                  << setw(8) << totalNbComp
                  << setw(8) << -1         // IFOUR
@@ -1100,7 +1100,7 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
       // (2) for each sub-component (iteration)
       // write support, number of values and number of components
       fcount.init(10);
-      vector< int > vals(3);
+      vector< mcIdType > vals(3);
       for ( std::size_t iIt = 0; iIt < iters.size(); ++iIt )
         {
           pair<int,int> it = iters[iIt];
@@ -1108,7 +1108,7 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
           vector<INTERP_KERNEL::NormalizedCellType> types;
           vector< vector<TypeOfField> > typesF;
           vector< vector<string> > pfls, locs;
-          vector< vector< std::pair<int,int> > > valsVec;
+          vector< vector< std::pair<mcIdType,mcIdType> > > valsVec;
           valsVec=_nodeFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName().c_str(),
                                                           types, typesF, pfls, locs);
           // believe that there can be only one type in a nodal field,
@@ -1120,7 +1120,7 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
                                 << pfls[0][0] << "|");
           vals[0] = -pfl2Sub->second->_id;
           vals[1] = (valsVec[0][0].second-valsVec[0][0].first);
-          vals[2] = compInfo.size();
+          vals[2] = ToIdType( compInfo.size() );
           for ( size_t i = 0; i < vals.size(); ++i, fcount++ )
             *_sauvFile << setw(8) << vals[i];
         }
@@ -1132,7 +1132,7 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
       fcount.init(8);
       *_sauvFile << left;
       for ( std::size_t iIt = 0; iIt < iters.size(); ++iIt )
-        for ( size_t i = 0; i < compInfo.size(); ++i, fcount++ )
+        for ( std::size_t i = 0; i < compInfo.size(); ++i, fcount++ )
           *_sauvFile << " "  << setw(4) << mapMedToGibi[compInfo[i]];
       *_sauvFile << right;
       fcount.stop();
@@ -1157,7 +1157,7 @@ void SauvWriter::writeNodalFields(map<string,int>& fldNamePrefixMap)
           vector<INTERP_KERNEL::NormalizedCellType> types;
           vector< vector<TypeOfField> > typesF;
           vector< vector<string> > pfls, locs;
-          vector< vector< std::pair<int,int> > > valsVec;
+          vector< vector< std::pair<mcIdType,mcIdType> > > valsVec;
           valsVec = _nodeFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName().c_str(),
                                                             types, typesF, pfls, locs);
           // believe that there can be only one type in a nodal field,
@@ -1206,10 +1206,10 @@ void SauvWriter::writeElemFields(map<string,int>& fldNamePrefixMap)
   // (10)  1.00000000000000E+02  1.00000000000000E+02  1.00000000000000E+02
   // (10)  ...
 
-  for ( size_t iF = 0; iF < _cellFields.size(); ++iF )
+  for ( unsigned int iF = 0; iF < _cellFields.size(); ++iF )
     {
       // count nb of sub-components
-      int iSub, nbSub = 0;
+      std::size_t iSub, nbSub = 0;
       vector< pair<int,int> >  iters = _cellFields[iF]->getIterations();
       for ( std::size_t iIt = 0; iIt < iters.size(); ++iIt )
         {
@@ -1218,7 +1218,7 @@ void SauvWriter::writeElemFields(map<string,int>& fldNamePrefixMap)
           vector<INTERP_KERNEL::NormalizedCellType> types;
           vector< vector<TypeOfField> > typesF;
           vector< vector<string> > pfls, locs;
-          vector< vector< std::pair<int,int> > > valsVec;
+          vector< vector< std::pair<mcIdType,mcIdType> > > valsVec;
           valsVec = _cellFields[iF]->getFieldSplitedByType( it.first, it.second, _fileMesh->getName().c_str(),
                                                             types, typesF, pfls, locs);
           for ( size_t i = 0; i < valsVec.size(); ++i )
@@ -1235,9 +1235,9 @@ void SauvWriter::writeElemFields(map<string,int>& fldNamePrefixMap)
       *_sauvFile << setw(72) << " " << endl;
 
       // (3) support, nb components
-      vector<int> vals(9, 0);
+      vector<mcIdType> vals(9, 0);
       const vector<string>& compInfo = _cellFields[iF]->getInfo();
-      vals[2] = compInfo.size();
+      vals[2] = ToIdType( compInfo.size() );
       fcount.init(10);
       for ( std::size_t iIt = 0; iIt < iters.size(); ++iIt )
         {
@@ -1311,7 +1311,7 @@ void SauvWriter::writeElemTimeStamp(int iF, int iter, int order)
   vector<INTERP_KERNEL::NormalizedCellType> types;
   vector< vector<TypeOfField> > typesF;
   vector< vector<string> > pfls, locs;
-  vector< vector< std::pair<int,int> > > valsVec;
+  vector< vector< std::pair<mcIdType,mcIdType> > > valsVec;
   valsVec = _cellFields[iF]->getFieldSplitedByType( iter, order, _fileMesh->getName().c_str(),
                                                     types, typesF, pfls, locs);
   for ( size_t iType = 0; iType < pfls.size(); ++iType )
@@ -1320,7 +1320,7 @@ void SauvWriter::writeElemTimeStamp(int iF, int iter, int order)
         const vector<string>& compInfo = _cellFields[iF]->getInfo();
 
         // (6) component addresses
-        int iComp = 0, nbComp = compInfo.size();
+        std::size_t iComp = 0, nbComp = compInfo.size();
         for ( fcount.init(10); iComp < nbComp; ++iComp, fcount++ )
           *_sauvFile << setw(8) << 777; // a good number
         fcount.stop();
index 31efd1ab4cdb54956da6ab95dbe189c9e15b3830..3bdb3d3a7c0713b726287904b3aef3376d3b38a0 100644 (file)
@@ -39,7 +39,7 @@ namespace MEDCoupling
   class MEDFileData;
   class MEDFileMesh;
   class MEDFileFieldMultiTS;
-  class DataArrayInt;
+  class DataArrayIdType;
 
   /*!
    * \brief Class to write a MEDFileData into a SAUVE format file
@@ -62,7 +62,7 @@ namespace MEDCoupling
      */
     struct SubMesh
     {
-      std::vector<int>      _cellIDsByType[ INTERP_KERNEL::NORM_MAXTYPE+1 ];
+      std::vector<mcIdType> _cellIDsByType[ INTERP_KERNEL::NORM_MAXTYPE+1 ];
       std::vector<SubMesh*> _subs;
       std::string           _name;
       int                   _id;
@@ -83,7 +83,7 @@ namespace MEDCoupling
                        std::map<std::string, std::string>& compMedToGibi );
     void makeProfileIDs( SubMesh*                          sm,
                          INTERP_KERNEL::NormalizedCellType type,
-                         const DataArrayInt*               profile );
+                         const DataArrayIdType*            profile );
     void writeFileHead();
     void writeSubMeshes();
     void writeCompoundSubMesh(int iSub);
@@ -103,7 +103,7 @@ namespace MEDCoupling
     std::vector< MCAuto< MEDFileFieldMultiTS > > _cellFields;
 
     std::vector<SubMesh>                      _subs;
-    std::map< int, SubMesh* >                 _famIDs2Sub;
+    std::map< mcIdType, SubMesh* >            _famIDs2Sub;
     std::map< std::string, SubMesh* >         _profile2Sub;
     enum
       {
index 6f110db0e1086b3db05b0fb78aa60651480137af..428263cd2bd944b673d1df158e206081f53e6c5c 100644 (file)
@@ -32,6 +32,9 @@ ELSE()
   SET_SOURCE_FILES_PROPERTIES(MEDLoader.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 ENDIF()
 SET(SWIG_MODULE_MEDLoader_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
+IF(MEDCOUPLING_USE_64BIT_IDS)
+  STRING(APPEND SWIG_MODULE_MEDLoader_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
 SET (MEDLoader_SWIG_DPYS_FILES
     MEDLoaderCommon.i
index 1438d85dde0559fcbf80fed300896eb527509671..9d74a063593681674503668cd83d4e9efd32820b 100644 (file)
@@ -65,24 +65,42 @@ def MEDCouplingDataArrayFloatImul(self,*args):
 def MEDCouplingDataArrayFloatIdiv(self,*args):
     import _MEDLoader
     return _MEDLoader.DataArrayFloat____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayInt32Iadd(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayInt____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntIsub(self,*args):
+    return _MEDLoader.DataArrayInt32____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32Isub(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayInt____isub___(self, self, *args)
-def MEDCouplingDataArrayIntImul(self,*args):
+    return _MEDLoader.DataArrayInt32____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32Imul(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayInt____imul___(self, self, *args)
-def MEDCouplingDataArrayIntIdiv(self,*args):
+    return _MEDLoader.DataArrayInt32____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32Idiv(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayInt____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntImod(self,*args):
+    return _MEDLoader.DataArrayInt32____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32Imod(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayInt____imod___(self, self, *args)
-def MEDCouplingDataArrayIntIpow(self,*args):
+    return _MEDLoader.DataArrayInt32____imod___(self, self, *args)
+def MEDCouplingDataArrayInt32Ipow(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayInt____ipow___(self, self, *args)
+    return _MEDLoader.DataArrayInt32____ipow___(self, self, *args)
+def MEDCouplingDataArrayInt64Iadd(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt64____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64Isub(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt64____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64Imul(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt64____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64Idiv(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt64____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64Imod(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt64____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64Ipow(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt64____ipow___(self, self, *args)
 def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
     import _MEDLoader
     return _MEDLoader.DataArrayDoubleTuple____iadd___(self, self, *args)
@@ -95,21 +113,36 @@ def MEDCouplingDataArrayDoubleTupleImul(self,*args):
 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
     import _MEDLoader
     return _MEDLoader.DataArrayDoubleTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayInt32TupleIadd(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt32Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIsub(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt32Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImul(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt32Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIdiv(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt32Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImod(self,*args):
+    import _MEDLoader
+    return _MEDLoader.DataArrayInt32Tuple____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIadd(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayIntTuple____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIsub(self,*args):
+    return _MEDLoader.DataArrayInt64Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIsub(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayIntTuple____isub___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImul(self,*args):
+    return _MEDLoader.DataArrayInt64Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImul(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayIntTuple____imul___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIdiv(self,*args):
+    return _MEDLoader.DataArrayInt64Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIdiv(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayIntTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImod(self,*args):
+    return _MEDLoader.DataArrayInt64Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImod(self,*args):
     import _MEDLoader
-    return _MEDLoader.DataArrayIntTuple____imod___(self, self, *args)
+    return _MEDLoader.DataArrayInt64Tuple____imod___(self, self, *args)
 def MEDCouplingDenseMatrixIadd(self,*args):
     import _MEDLoader
     return _MEDLoader.DenseMatrix____iadd___(self, self, *args)
index dd03b5580d858ba9103248928473bddf0e4823e4..457fefbdafad975a59dd26f0adb80db10e210b61 100644 (file)
@@ -507,7 +507,8 @@ namespace MEDCoupling
 
   PyObject *GetUMeshGlobalInfoSwig(const std::string& fileName, const std::string& meshName)
     {
-      int meshDim,spaceDim,numberOfNodes;
+      int meshDim,spaceDim;
+      mcIdType numberOfNodes;
       std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > res=MEDCoupling::GetUMeshGlobalInfo(fileName,meshName,meshDim,spaceDim,numberOfNodes);
       PyObject *ret=PyTuple_New(4);
       PyObject *elt0=PyList_New(res.size());
@@ -529,7 +530,7 @@ namespace MEDCoupling
       PyTuple_SetItem(ret,0,elt0);
       PyTuple_SetItem(ret,1,SWIG_From_int(meshDim));
       PyTuple_SetItem(ret,2,SWIG_From_int(spaceDim));
-      PyTuple_SetItem(ret,3,SWIG_From_int(numberOfNodes));
+      PyTuple_SetItem(ret,3,SWIG_From_long(numberOfNodes));
       return ret;
     }
   
@@ -565,9 +566,9 @@ namespace MEDCoupling
   PyObject *GetTypesOfFieldSwig(const std::string& fileName, const std::string& meshName, const std::string& fieldName)
     {
       std::vector< MEDCoupling::TypeOfField > v=MEDCoupling::GetTypesOfField(fileName,meshName,fieldName);
-      int size=v.size();
+      std::size_t size=v.size();
       PyObject *ret=PyList_New(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         PyList_SetItem(ret,i,PyInt_FromLong((int)v[i]));
       return ret;
     }
@@ -666,9 +667,9 @@ namespace MEDCoupling
   {
   public:
     static MEDFileJointCorrespondence *New();
-    static MEDFileJointCorrespondence *New(DataArrayInt* correspondence) // nodes
+    static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence) // nodes
      ;
-    static MEDFileJointCorrespondence *New(DataArrayInt* correspondence,  // cells
+    static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence,  // cells
                                            INTERP_KERNEL::NormalizedCellType loc_geo_type,
                                            INTERP_KERNEL::NormalizedCellType rem_geo_type)
      ;
@@ -682,7 +683,7 @@ namespace MEDCoupling
     INTERP_KERNEL::NormalizedCellType getLocalGeometryType() const;
     void setRemoteGeometryType(INTERP_KERNEL::NormalizedCellType type);
     INTERP_KERNEL::NormalizedCellType getRemoteGeometryType() const;
-    void setCorrespondence(DataArrayInt *corr);
+    void setCorrespondence(DataArrayIdType *corr);
     void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const;
     std::string simpleRepr() const;
     %extend
@@ -691,11 +692,11 @@ namespace MEDCoupling
       {
         return MEDFileJointCorrespondence::New();
       }
-      MEDFileJointCorrespondence(DataArrayInt* correspondence)
+      MEDFileJointCorrespondence(DataArrayIdType* correspondence)
       {
         return MEDFileJointCorrespondence::New(correspondence);
       }
-      MEDFileJointCorrespondence(DataArrayInt* correspondence,  // cells
+      MEDFileJointCorrespondence(DataArrayIdType* correspondence,  // cells
                                  INTERP_KERNEL::NormalizedCellType loc_geo_type,
                                  INTERP_KERNEL::NormalizedCellType rem_geo_type)
       {
@@ -707,12 +708,12 @@ namespace MEDCoupling
         return self->simpleRepr();
       }
       
-      DataArrayInt *getCorrespondence() const
+      DataArrayIdType *getCorrespondence() const
       {
-        const DataArrayInt *ret(self->getCorrespondence());
+        const DataArrayIdType *ret(self->getCorrespondence());
         if(ret)
           ret->incrRef();
-        return const_cast<DataArrayInt *>(ret);
+        return const_cast<DataArrayIdType *>(ret);
       }
     }
   };
@@ -907,12 +908,12 @@ namespace MEDCoupling
   private:
     MEDFileEquivalenceData();
   public:
-    void setArray(DataArrayInt *data);
+    void setArray(DataArrayInt32 *data);
     %extend
     {
-      DataArrayInt *getArray()
+      DataArrayInt32 *getArray()
       {
-        DataArrayInt *ret(self->getArray());
+        DataArrayInt32 *ret(self->getArray());
         if(ret) ret->incrRef();
         return ret;
       }
@@ -932,13 +933,13 @@ namespace MEDCoupling
   public:
     void clear();
     std::size_t size() const;
-    void setArray(int meshDimRelToMax, DataArrayInt *da);
-    void setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da);
+    void setArray(int meshDimRelToMax, DataArrayInt32 *da);
+    void setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt32 *da);
     %extend
     {
-      DataArrayInt *getArray(INTERP_KERNEL::NormalizedCellType type)
+      DataArrayInt32 *getArray(INTERP_KERNEL::NormalizedCellType type)
       {
-        DataArrayInt *ret(self->getArray(type));
+        DataArrayInt32 *ret(self->getArray(type));
         if(ret) ret->incrRef();
         return ret;
       }
@@ -964,7 +965,7 @@ namespace MEDCoupling
     void setName(const std::string& name);
     std::string getDescription() const;
     void setDescription(const std::string& descr);
-    void setArray(int meshDimRelToMaxExt, DataArrayInt *da);;
+    void setArray(int meshDimRelToMaxExt, DataArrayInt32 *da);;
     %extend
     {
       MEDFileEquivalenceCell *initCell()
@@ -1068,7 +1069,7 @@ namespace MEDCoupling
     virtual std::vector<int> getFamArrNonEmptyLevelsExt() const;
     virtual std::vector<int> getNumArrNonEmptyLevelsExt() const;
     virtual std::vector<int> getNameArrNonEmptyLevelsExt() const;
-    virtual std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const;
+    virtual std::vector<mcIdType> getDistributionOfTypes(int meshDimRelToMax) const;
     virtual MEDFileMesh *cartesianize() const;
     std::vector<int> getNonEmptyLevels() const;
     std::vector<int> getNonEmptyLevelsExt() const;
@@ -1082,7 +1083,7 @@ namespace MEDCoupling
     void addFamily(const std::string& familyName, int id);
     void addFamilyOnGrp(const std::string& grpName, const std::string& famName);
     virtual void createGroupOnAll(int meshDimRelToMaxExt, const std::string& groupName);
-    virtual bool keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& levs);
+    virtual bool keepFamIdsOnlyOnLevs(const std::vector<mcIdType>& famIds, const std::vector<int>& levs);
     void copyFamGrpMapsFrom(const MEDFileMesh& other);
     void clearGrpMap();
     void clearFamMap();
@@ -1091,22 +1092,22 @@ namespace MEDCoupling
     const std::map<std::string, std::vector<std::string> >& getGroupInfo() const;
     std::vector<std::string> getFamiliesOnGroup(const std::string& name) const;
     std::vector<std::string> getFamiliesOnGroups(const std::vector<std::string>& grps) const;
-    std::vector<int> getFamiliesIdsOnGroup(const std::string& name) const;
+    std::vector<mcIdType> getFamiliesIdsOnGroup(const std::string& name) const;
     void setFamiliesOnGroup(const std::string& name, const std::vector<std::string>& fams);
-    void setFamiliesIdsOnGroup(const std::string& name, const std::vector<int>& famIds);
+    void setFamiliesIdsOnGroup(const std::string& name, const std::vector<mcIdType>& famIds);
     std::vector<std::string> getGroupsOnFamily(const std::string& name) const;
     void setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps);
     std::vector<std::string> getGroupsNames() const;
     std::vector<std::string> getFamiliesNames() const;
     std::vector<std::string> getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const;
-    std::vector<int> getGrpNonEmptyLevelsExt(const std::string& grp) const;
-    std::vector<int> getGrpNonEmptyLevels(const std::string& grp) const;
-    std::vector<int> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
-    std::vector<int> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
-    std::vector<int> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const;
-    std::vector<int> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const;
-    std::vector<int> getFamNonEmptyLevels(const std::string& fam) const;
-    std::vector<int> getFamNonEmptyLevelsExt(const std::string& fam) const;
+    std::vector<mcIdType> getGrpNonEmptyLevelsExt(const std::string& grp) const;
+    std::vector<mcIdType> getGrpNonEmptyLevels(const std::string& grp) const;
+    std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
+    std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
+    std::vector<mcIdType> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const;
+    std::vector<mcIdType> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const;
+    std::vector<mcIdType> getFamNonEmptyLevels(const std::string& fam) const;
+    std::vector<mcIdType> getFamNonEmptyLevelsExt(const std::string& fam) const;
     std::vector<std::string> getFamiliesNamesWithFilePointOfView() const;
     static std::string GetMagicFamilyStr();
     void assignFamilyNameWithGroupName();
@@ -1124,7 +1125,7 @@ namespace MEDCoupling
     void changeFamilyName(const std::string& oldName, const std::string& newName);
     void changeFamilyId(int oldId, int newId);
     void changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
-    void setFamilyInfo(const std::map<std::string,int>& info);
+    void setFamilyInfo(const std::map<std::string,mcIdType>& info);
     void setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
     int getFamilyId(const std::string& name) const;
     int getMaxAbsFamilyId() const;
@@ -1136,9 +1137,9 @@ namespace MEDCoupling
     virtual int getMaxAbsFamilyIdInArrays() const;
     virtual int getMaxFamilyIdInArrays() const;
     virtual int getMinFamilyIdInArrays() const;
-    DataArrayInt *getAllFamiliesIdsReferenced() const;
-    DataArrayInt *computeAllFamilyIdsInUse() const;
-    std::vector<int> getFamiliesIds(const std::vector<std::string>& famNames) const;
+    DataArrayIdType *getAllFamiliesIdsReferenced() const;
+    DataArrayIdType *computeAllFamilyIdsInUse() const;
+    std::vector<mcIdType> getFamiliesIds(const std::vector<std::string>& famNames) const;
     std::string getFamilyNameGivenId(int id) const;
     bool ensureDifferentFamIdsPerLevel();
     void normalizeFamIdsTrio();
@@ -1148,20 +1149,20 @@ namespace MEDCoupling
     virtual std::string advancedRepr() const;
     //
     virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
-    virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr);
-    virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr);
+    virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr);
+    virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr);
     virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
-    virtual void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayInt *globalNumArr);
-    virtual void addNodeGroup(const DataArrayInt *ids);
-    virtual void addGroup(int meshDimRelToMaxExt, const DataArrayInt *ids);
-    virtual DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
-    virtual DataArrayInt *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
-    virtual DataArrayInt *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
-    virtual DataArrayInt *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
-    virtual DataArrayInt *getNodeGroupArr(const std::string& grp, bool renum=false) const;
-    virtual DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
-    virtual DataArrayInt *getNodeFamilyArr(const std::string& fam, bool renum=false) const;
-    virtual DataArrayInt *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const;
+    virtual void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr);
+    virtual void addNodeGroup(const DataArrayIdType *ids);
+    virtual void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids);
+    virtual DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
+    virtual DataArrayIdType *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
+    virtual DataArrayIdType *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
+    virtual DataArrayIdType *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
+    virtual DataArrayIdType *getNodeGroupArr(const std::string& grp, bool renum=false) const;
+    virtual DataArrayIdType *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
+    virtual DataArrayIdType *getNodeFamilyArr(const std::string& fam, bool renum=false) const;
+    virtual DataArrayIdType *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const;
     int getNumberOfJoints();
     MEDFileJoints *getJoints();
     void setJoints( MEDFileJoints* joints );
@@ -1206,8 +1207,8 @@ namespace MEDCoupling
 
          void setGroupsAtLevel(int meshDimRelToMaxExt, PyObject *li, bool renum=false)
          {
-           std::vector<const DataArrayInt *> grps;
-           convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayInt *>(li,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",grps);
+           std::vector<const DataArrayIdType *> grps;
+           convertFromPyObjVectorOfObj<const MEDCoupling::DataArrayIdType *>(li,SWIGTITraits<mcIdType>::TI,"DataArrayInt",grps);
            self->setGroupsAtLevel(meshDimRelToMaxExt,grps,renum);
          }
          
@@ -1257,34 +1258,34 @@ namespace MEDCoupling
 
          PyObject *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const
          {
-           const DataArrayInt *tmp=self->getFamilyFieldAtLevel(meshDimRelToMaxExt);
+           const DataArrayIdType *tmp=self->getFamilyFieldAtLevel(meshDimRelToMaxExt);
            if(tmp)
              tmp->incrRef();
-           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
          }
 
          PyObject *getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt)
          {
-           const DataArrayInt *tmp=self->getOrCreateAndGetFamilyFieldAtLevel(meshDimRelToMaxExt);
+           const DataArrayIdType *tmp=self->getOrCreateAndGetFamilyFieldAtLevel(meshDimRelToMaxExt);
            if(tmp)
              tmp->incrRef();
-           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
          }
 
          PyObject *getNumberFieldAtLevel(int meshDimRelToMaxExt) const
          {
-           const DataArrayInt *tmp=self->getNumberFieldAtLevel(meshDimRelToMaxExt);
+           const DataArrayIdType *tmp=self->getNumberFieldAtLevel(meshDimRelToMaxExt);
            if(tmp)
              tmp->incrRef();
-           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
          }
 
          PyObject *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const
          {
-           const DataArrayInt *tmp=self->getRevNumberFieldAtLevel(meshDimRelToMaxExt);
+           const DataArrayIdType *tmp=self->getRevNumberFieldAtLevel(meshDimRelToMaxExt);
            if(tmp)
              tmp->incrRef();
-           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+           return SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
          }
          
          PyObject *getNameFieldAtLevel(int meshDimRelToMaxExt) const
@@ -1307,8 +1308,8 @@ namespace MEDCoupling
          
          PyObject *unPolyze()
          {
-           DataArrayInt *ret3=0;
-           std::vector<int> ret1,ret2;
+           DataArrayIdType *ret3=0;
+           std::vector<mcIdType> ret1,ret2;
            bool ret0=self->unPolyze(ret1,ret2,ret3);
            PyObject *ret=PyTuple_New(4);
            PyTuple_SetItem(ret,0,SWIG_From_bool(ret0));
@@ -1317,9 +1318,9 @@ namespace MEDCoupling
            for(int j=0;j<(int)ret1.size()/3;j++)
              {
                PyObject *retLev2=PyList_New(3);
-               PyList_SetItem(retLev2,0,SWIG_From_int(ret1[3*j]));
-               PyList_SetItem(retLev2,1,SWIG_From_int(ret1[3*j+1]));
-               PyList_SetItem(retLev2,2,SWIG_From_int(ret1[3*j+2]));
+               PyList_SetItem(retLev2,0,PyInt_FromLong(ret1[3*j]));
+               PyList_SetItem(retLev2,1,PyInt_FromLong(ret1[3*j+1]));
+               PyList_SetItem(retLev2,2,PyInt_FromLong(ret1[3*j+2]));
                PyList_SetItem(retLev1_0,j,retLev2);
              }
            PyTuple_SetItem(ret,1,retLev1_0);
@@ -1328,14 +1329,14 @@ namespace MEDCoupling
            for(int j=0;j<(int)ret2.size()/3;j++)
              {
                PyObject *retLev2=PyList_New(3);
-               PyList_SetItem(retLev2,0,SWIG_From_int(ret2[3*j]));
-               PyList_SetItem(retLev2,1,SWIG_From_int(ret2[3*j+1]));
-               PyList_SetItem(retLev2,2,SWIG_From_int(ret2[3*j+2]));
+               PyList_SetItem(retLev2,0,PyInt_FromLong(ret2[3*j]));
+               PyList_SetItem(retLev2,1,PyInt_FromLong(ret2[3*j+1]));
+               PyList_SetItem(retLev2,2,PyInt_FromLong(ret2[3*j+2]));
                PyList_SetItem(retLev1_1,j,retLev2);
              }
            PyTuple_SetItem(ret,2,retLev1_1);
            //
-           PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(ret3),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(ret3),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
 
@@ -1346,9 +1347,9 @@ namespace MEDCoupling
            return ret;
          }
 
-         virtual DataArrayInt *getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const
+         virtual DataArrayIdType *getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const
          {
-           MCAuto<DataArrayInt> ret(self->getGlobalNumFieldAtLevel(meshDimRelToMaxExt));
+           MCAuto<DataArrayIdType> ret(self->getGlobalNumFieldAtLevel(meshDimRelToMaxExt));
            return ret.retn();
          }
        }
@@ -1374,7 +1375,7 @@ namespace MEDCoupling
     MEDCouplingUMesh *getGroups(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
     MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
     MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
-    DataArrayInt *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
+    DataArrayIdType *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
     MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const;
     MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const;
     MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const;
@@ -1389,9 +1390,9 @@ namespace MEDCoupling
     void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m);
     void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false);
     void optimizeFamilies();
-    DataArrayInt *zipCoords();
-    DataArrayInt *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
-    DataArrayInt *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+    DataArrayIdType *zipCoords();
+    DataArrayIdType *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+    DataArrayIdType *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
     MEDFileUMesh *buildExtrudedMesh(const MEDCouplingUMesh *m1D, int policy) const;
     MEDFileUMesh *linearToQuadratic(int conversionType=0, double eps=1e-12) const;
     MEDFileUMesh *quadraticToLinear(double eps=1e-12) const;
@@ -1423,7 +1424,7 @@ namespace MEDCoupling
            return MEDFileUMesh::New();
          }
 
-         static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, PyObject *types, const std::vector<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
+         static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, PyObject *types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0)
          {
            std::vector<int> typesCpp1;
            convertPyToNewIntArr3(types,typesCpp1);
@@ -1437,27 +1438,27 @@ namespace MEDCoupling
          PyObject *__getstate__()
          {
            std::vector<double> a0;
-           std::vector<int> a1;
+           std::vector<mcIdType> a1;
            std::vector<std::string> a2;
-           std::vector< MCAuto<DataArrayInt> > a3;
+           std::vector< MCAuto<DataArrayIdType> > a3;
            MCAuto<DataArrayDouble> a4;
            self->serialize(a0,a1,a2,a3,a4);
            PyObject *ret(PyTuple_New(5));
            PyTuple_SetItem(ret,0,convertDblArrToPyList2(a0));
            PyTuple_SetItem(ret,1,convertIntArrToPyList2(a1));
-           int sz(a2.size());
+           std::size_t sz(a2.size());
            PyObject *ret2(PyList_New(sz));
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              PyList_SetItem(ret2,i,PyString_FromString(a2[i].c_str()));
            PyTuple_SetItem(ret,2,ret2);
            sz=a3.size();
            PyObject *ret3(PyList_New(sz));
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
-               DataArrayInt *elt(a3[i]);
+               DataArrayIdType *elt(a3[i]);
                if(elt)
                  elt->incrRef();
-               PyList_SetItem(ret3,i,SWIG_NewPointerObj(SWIG_as_voidptr(elt),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+               PyList_SetItem(ret3,i,SWIG_NewPointerObj(SWIG_as_voidptr(elt),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
              }
            PyTuple_SetItem(ret,3,ret3);
            DataArrayDouble *ret4(a4);
@@ -1472,17 +1473,17 @@ namespace MEDCoupling
            static const char MSG[]="MEDFileUMesh.__setstate__ : expected input is a tuple of size 4 !";
            if(!PyTuple_Check(inp))
              throw INTERP_KERNEL::Exception(MSG);
-           int sz(PyTuple_Size(inp));
+           std::size_t sz(PyTuple_Size(inp));
            if(sz!=5)
              throw INTERP_KERNEL::Exception(MSG);
            std::vector<double> a0;
-           std::vector<int> a1;
+           std::vector<mcIdType> a1;
            std::vector<std::string> a2;
-           std::vector< MCAuto<DataArrayInt> > a3;
+           std::vector< MCAuto<DataArrayIdType> > a3;
            MCAuto<DataArrayDouble> a4;
            //
            PyObject *a0py(PyTuple_GetItem(inp,0)),*a1py(PyTuple_GetItem(inp,1)),*a2py(PyTuple_GetItem(inp,2));
-           int tmp(-1);
+           mcIdType tmp(-1);
            fillArrayWithPyListDbl3(a0py,tmp,a0);
            convertPyToNewIntArr3(a1py,a1);
            fillStringVector(a2py,a2);
@@ -1496,8 +1497,8 @@ namespace MEDCoupling
            if((DataArrayDouble *)a4)
              a4->incrRef();
            {
-             std::vector< DataArrayInt * > a3Tmp;
-             convertFromPyObjVectorOfObj<MEDCoupling::DataArrayInt *>(b0py,SWIGTYPE_p_MEDCoupling__DataArrayInt,"DataArrayInt",a3Tmp);
+             std::vector< DataArrayIdType * > a3Tmp;
+             convertFromPyObjVectorOfObj<MEDCoupling::DataArrayIdType *>(b0py,SWIGTITraits<mcIdType>::TI,"DataArrayInt",a3Tmp);
              std::size_t sz(a3Tmp.size());
              a3.resize(sz);
              for(std::size_t i=0;i<sz;i++)
@@ -1541,7 +1542,7 @@ namespace MEDCoupling
            DataArrayDouble *a,*a2;
            DataArrayDoubleTuple *aa,*aa2;
            std::vector<double> bb,bb2;
-           int sw;
+           mcIdType sw;
            const double *centerPtr(convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,msg,1,3,true));
            const double *vectorPtr(convertObjToPossibleCpp5_Safe(normalVector,sw,val2,a2,aa2,bb2,msg,1,3,true));
            MCAuto<MEDFileUMesh> ret(self->symmetry3DPlane(centerPtr,vectorPtr));
@@ -1558,20 +1559,20 @@ namespace MEDCoupling
 
          PyObject *getAllDistributionOfTypes() const
          {
-           std::vector< std::pair<int,int> > ret(self->getAllDistributionOfTypes());
+           std::vector< std::pair<int,mcIdType> > ret(self->getAllDistributionOfTypes());
            return convertVecPairIntToPy(ret);
          }
          
-         DataArrayInt *deduceNodeSubPartFromCellSubPart(PyObject *extractDef) const
+         DataArrayIdType *deduceNodeSubPartFromCellSubPart(PyObject *extractDef) const
          {
-           std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
+           std::map<int, MCAuto<DataArrayIdType> > extractDefCpp;
            convertToMapIntDataArrayInt(extractDef,extractDefCpp);
            return self->deduceNodeSubPartFromCellSubPart(extractDefCpp);
          }
 
          MEDFileUMesh *extractPart(PyObject *extractDef) const
          {
-           std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
+           std::map<int, MCAuto<DataArrayIdType> > extractDefCpp;
            convertToMapIntDataArrayInt(extractDef,extractDefCpp);
            return self->extractPart(extractDefCpp);
          }
@@ -1615,12 +1616,12 @@ namespace MEDCoupling
 
          PyObject *buildInnerBoundaryAlongM1Group(const std::string& grpNameM1)
          {
-           DataArrayInt *ret0=0,*ret1=0,*ret2=0;
+           DataArrayIdType *ret0=0,*ret1=0,*ret2=0;
            self->buildInnerBoundaryAlongM1Group(grpNameM1,ret0,ret1,ret2);
            PyObject *ret=PyTuple_New(3);
-           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-           PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
          
@@ -1946,18 +1947,18 @@ namespace MEDCoupling
      {
        PyObject *getProfile(const std::string& pflName) const
        {
-         const DataArrayInt *ret=self->getProfile(pflName);
+         const DataArrayIdType *ret=self->getProfile(pflName);
          if(ret)
            ret->incrRef();
-         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
        }
 
        PyObject *getProfileFromId(int pflId) const
        {
-         const DataArrayInt *ret=self->getProfileFromId(pflId);
+         const DataArrayIdType *ret=self->getProfileFromId(pflId);
          if(ret)
            ret->incrRef();
-         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 );
+         return SWIG_NewPointerObj(SWIG_as_voidptr(ret),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 );
        }
 
        PyObject *getLocalizationFromId(int locId) const
@@ -2148,24 +2149,24 @@ namespace MEDCoupling
         std::vector< std::vector<TypeOfField> > typesF;
         std::vector< std::vector<std::string> > pfls;
         std::vector< std::vector<std::string> > locs;
-        std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(mname,types,typesF,pfls,locs);
-        int sz=ret.size();
+        std::vector< std::vector< std::pair<mcIdType,mcIdType> > > ret=self->getFieldSplitedByType(mname,types,typesF,pfls,locs);
+        std::size_t sz=ret.size();
         PyObject *ret2=PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
-               const std::vector< std::pair<int,int> >& dadsI=ret[i];
+               const std::vector< std::pair<mcIdType,mcIdType> >& dadsI=ret[i];
                const std::vector<TypeOfField>& typesFI=typesF[i];
                const std::vector<std::string>& pflsI=pfls[i];
                const std::vector<std::string>& locsI=locs[i];
                PyObject *elt=PyTuple_New(2);
                PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
-               int sz2=ret[i].size();
+               std::size_t sz2=ret[i].size();
                PyObject *elt2=PyList_New(sz2);
-               for(int j=0;j<sz2;j++)
+               for(std::size_t j=0;j<sz2;j++)
                  {
                    PyObject *elt3=PyTuple_New(4);
                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
-                   PyObject *elt4=PyTuple_New(2); PyTuple_SetItem(elt4,0,SWIG_From_int(dadsI[j].first)); PyTuple_SetItem(elt4,1,SWIG_From_int(dadsI[j].second));
+                   PyObject *elt4=PyTuple_New(2); PyTuple_SetItem(elt4,0,PyInt_FromLong(dadsI[j].first)); PyTuple_SetItem(elt4,1,PyInt_FromLong(dadsI[j].second));
                    PyTuple_SetItem(elt3,1,elt4);
                    PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
                    PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
@@ -2209,7 +2210,7 @@ namespace MEDCoupling
 
       MEDFileAnyTypeField1TS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const
       {
-        std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
+        std::map<int, MCAuto<DataArrayIdType> > extractDefCpp;
         convertToMapIntDataArrayInt(extractDef,extractDefCpp);
         return self->extractPart(extractDefCpp,mm);
       }
@@ -2234,8 +2235,8 @@ namespace MEDCoupling
     MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
     //
     void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
-    void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
-    void setFieldProfileFlatly(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
+    void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void setFieldProfileFlatly(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
     void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false);
     %extend
@@ -2290,9 +2291,9 @@ namespace MEDCoupling
            std::vector< std::vector<std::string> > pfls;
            std::vector< std::vector<std::string> > locs;
            std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(mname,types,typesF,pfls,locs);
-           int sz=ret.size();
+           std::size_t sz=ret.size();
            PyObject *ret2=PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
                const std::vector<DataArrayDouble *>& dadsI=ret[i];
                const std::vector<TypeOfField>& typesFI=typesF[i];
@@ -2300,9 +2301,9 @@ namespace MEDCoupling
                const std::vector<std::string>& locsI=locs[i];
                PyObject *elt=PyTuple_New(2);
                PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
-               int sz2=ret[i].size();
+               std::size_t sz2=ret[i].size();
                PyObject *elt2=PyList_New(sz2);
-               for(int j=0;j<sz2;j++)
+               for(std::size_t j=0;j<sz2;j++)
                  {
                    PyObject *elt3=PyTuple_New(4);
                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
@@ -2343,8 +2344,8 @@ namespace MEDCoupling
     MEDCoupling::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
     //
     void setFieldNoProfileSBT(const MEDCouplingFieldInt *field);
-    void setFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
-    void setFieldProfileFlatly(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
+    void setFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void setFieldProfileFlatly(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     void copyTimeInfoFrom(MEDCouplingFieldInt *mcf);
     MEDCouplingFieldInt *field(const MEDFileMesh *mesh) const;
     MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
@@ -2389,9 +2390,9 @@ namespace MEDCoupling
          return MEDFileField1TS_getFieldWithProfile<int>(self,type,meshDimRelToMax,mesh);
       }
       
-      DataArrayInt *getUndergroundDataArray() const
+      DataArrayInt32 *getUndergroundDataArray() const
       {
-        DataArrayInt *ret=self->getUndergroundDataArray();
+        DataArrayInt32 *ret=self->getUndergroundDataArray();
         if(ret)
           ret->incrRef();
         return ret;
@@ -2415,8 +2416,8 @@ namespace MEDCoupling
     MEDCoupling::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
     //
     void setFieldNoProfileSBT(const MEDCouplingFieldFloat *field);
-    void setFieldProfile(const MEDCouplingFieldFloat *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
-    void setFieldProfileFlatly(const MEDCouplingFieldFloat *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
+    void setFieldProfile(const MEDCouplingFieldFloat *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+    void setFieldProfileFlatly(const MEDCouplingFieldFloat *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     void copyTimeInfoFrom(MEDCouplingFieldFloat *mcf);
     MEDCouplingFieldFloat *field(const MEDFileMesh *mesh) const;
     MEDCouplingFieldFloat *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
@@ -2537,7 +2538,7 @@ namespace MEDCoupling
       {
         if(elt0 && PyInt_Check(elt0))
           {//fmts[3]
-            int pos=PyInt_AS_LONG(elt0);
+            int pos=(int)PyInt_AS_LONG(elt0);
             return pos;
           }
         else if(elt0 && PyTuple_Check(elt0))
@@ -2548,8 +2549,8 @@ namespace MEDCoupling
                 PyObject *o1=PyTuple_GetItem(elt0,1);
                 if(PyInt_Check(o0) && PyInt_Check(o1))
                   {//fmts(1,-1)
-                    int iter=PyInt_AS_LONG(o0);
-                    int order=PyInt_AS_LONG(o1);
+                    int iter=(int)PyInt_AS_LONG(o0);
+                    int order=(int)PyInt_AS_LONG(o1);
                     return self->getPosOfTimeStep(iter,order);
                   }
                 else
@@ -2621,24 +2622,24 @@ namespace MEDCoupling
         std::vector< std::vector<TypeOfField> > typesF;
         std::vector< std::vector<std::string> > pfls;
         std::vector< std::vector<std::string> > locs;
-        std::vector< std::vector< std::pair<int,int> > > ret=self->getFieldSplitedByType(iteration,order,mname,types,typesF,pfls,locs);
-        int sz=ret.size();
+        std::vector< std::vector< std::pair<mcIdType,mcIdType> > > ret=self->getFieldSplitedByType(iteration,order,mname,types,typesF,pfls,locs);
+        std::size_t sz=ret.size();
         PyObject *ret2=PyList_New(sz);
-        for(int i=0;i<sz;i++)
+        for(std::size_t i=0;i<sz;i++)
           {
-            const std::vector< std::pair<int,int> >& dadsI=ret[i];
+            const std::vector< std::pair<mcIdType,mcIdType> >& dadsI=ret[i];
             const std::vector<TypeOfField>& typesFI=typesF[i];
             const std::vector<std::string>& pflsI=pfls[i];
             const std::vector<std::string>& locsI=locs[i];
             PyObject *elt=PyTuple_New(2);
             PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
-            int sz2=ret[i].size();
+            std::size_t sz2=ret[i].size();
             PyObject *elt2=PyList_New(sz2);
-            for(int j=0;j<sz2;j++)
+            for(std::size_t j=0;j<sz2;j++)
               {
                 PyObject *elt3=PyTuple_New(4);
                 PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
-                PyObject *elt4=PyTuple_New(2); PyTuple_SetItem(elt4,0,SWIG_From_int(dadsI[j].first)); PyTuple_SetItem(elt4,1,SWIG_From_int(dadsI[j].second));
+                PyObject *elt4=PyTuple_New(2); PyTuple_SetItem(elt4,0,PyInt_FromLong(dadsI[j].first)); PyTuple_SetItem(elt4,1,PyInt_FromLong(dadsI[j].second));
                 PyTuple_SetItem(elt3,1,elt4);
                 PyTuple_SetItem(elt3,2,PyString_FromString(pflsI[j].c_str()));
                 PyTuple_SetItem(elt3,3,PyString_FromString(locsI[j].c_str()));
@@ -2654,9 +2655,9 @@ namespace MEDCoupling
       {
         if(PyList_Check(elts))
           {
-            int sz=PyList_Size(elts);
+            std::size_t sz=PyList_Size(elts);
             std::vector<int> ret(sz);
-            for(int i=0;i<sz;i++)
+            for(std::size_t i=0;i<sz;i++)
               {
                 PyObject *elt=PyList_GetItem(elts,i);
                 ret[i]=MEDCoupling_MEDFileAnyTypeFieldMultiTS_getTimeId(self,elt);
@@ -2677,7 +2678,7 @@ namespace MEDCoupling
           {
             Py_ssize_t strt=2,stp=2,step=2;
             GetIndicesOfSlice(elts,self->getNumberOfTS(),&strt,&stp,&step,"MEDFileAnyTypeFieldMultiTS.__delitem__ : error in input slice !");
-            self->eraseTimeStepIds2(strt,stp,step);
+            self->eraseTimeStepIds2((int)strt,(int)stp,(int)step);
           }
         else
           {
@@ -2689,10 +2690,10 @@ namespace MEDCoupling
       
       void eraseTimeStepIds(PyObject *li)
       {
-        int sw;
+        mcIdType sw;
         int pos1;
         std::vector<int> pos2;
-        DataArrayInt *pos3=0;
+        DataArrayInt32 *pos3=0;
         DataArrayIntTuple *pos4=0;
         convertIntStarLikePyObjToCpp(li,sw,pos1,pos2,pos3,pos4);
         switch(sw)
@@ -2728,10 +2729,10 @@ namespace MEDCoupling
       {
         if(elt0 && PyList_Check(elt0))
           {
-            int sz=PyList_Size(elt0);
-            MCAuto<DataArrayInt> da=DataArrayInt::New(); da->alloc(sz,1);
+            std::size_t sz=PyList_Size(elt0);
+            MCAuto<DataArrayInt32> da=DataArrayInt32::New(); da->alloc(sz,1);
             int *pt=da->getPointer();
-            for(int i=0;i<sz;i++,pt++)
+            for(std::size_t i=0;i<sz;i++,pt++)
               {
                 PyObject *elt1=PyList_GetItem(elt0,i);
                 *pt=MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(self,elt1);
@@ -2742,7 +2743,7 @@ namespace MEDCoupling
           {
             Py_ssize_t strt=2,stp=2,step=2;
             GetIndicesOfSlice(elt0,self->getNumberOfTS(),&strt,&stp,&step,"MEDFileAnyTypeFieldMultiTS.__getitem__ : error in input slice !");
-            return convertMEDFileFieldMultiTS(self->buildSubPartSlice(strt,stp,step),SWIG_POINTER_OWN | 0);
+            return convertMEDFileFieldMultiTS(self->buildSubPartSlice((int)strt,(int)stp,(int)step),SWIG_POINTER_OWN | 0);
           }
         else
           return convertMEDFileField1TS(self->getTimeStepAtPos(MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(self,elt0)),SWIG_POINTER_OWN | 0);
@@ -2802,7 +2803,7 @@ namespace MEDCoupling
 
       MEDFileAnyTypeFieldMultiTS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const
       {
-        std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
+        std::map<int, MCAuto<DataArrayIdType> > extractDefCpp;
         convertToMapIntDataArrayInt(extractDef,extractDefCpp);
         return self->extractPart(extractDefCpp,mm);
       }
@@ -2882,7 +2883,7 @@ namespace MEDCoupling
     MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
     //
     void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field);
-    void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
+    void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     MEDFileIntFieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const;
     %extend
        {
@@ -2926,11 +2927,11 @@ namespace MEDCoupling
 
          PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const
          {
-           DataArrayInt *ret1=0;
+           DataArrayIdType *ret1=0;
            DataArrayDouble *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
            PyObject *ret=PyTuple_New(2);
            PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
-           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+           PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
            return ret;
          }
 
@@ -2941,9 +2942,9 @@ namespace MEDCoupling
            std::vector< std::vector<std::string> > pfls;
            std::vector< std::vector<std::string> > locs;
            std::vector< std::vector<DataArrayDouble *> > ret=self->getFieldSplitedByType2(iteration,order,mname,types,typesF,pfls,locs);
-           int sz=ret.size();
+           std::size_t sz=ret.size();
            PyObject *ret2=PyList_New(sz);
-           for(int i=0;i<sz;i++)
+           for(std::size_t i=0;i<sz;i++)
              {
                const std::vector<DataArrayDouble *>& dadsI=ret[i];
                const std::vector<TypeOfField>& typesFI=typesF[i];
@@ -2951,9 +2952,9 @@ namespace MEDCoupling
                const std::vector<std::string>& locsI=locs[i];
                PyObject *elt=PyTuple_New(2);
                PyTuple_SetItem(elt,0,SWIG_From_int(types[i]));
-               int sz2=ret[i].size();
+               std::size_t sz2=ret[i].size();
                PyObject *elt2=PyList_New(sz2);
-               for(int j=0;j<sz2;j++)
+               for(std::size_t j=0;j<sz2;j++)
                  {
                    PyObject *elt3=PyTuple_New(4);
                    PyTuple_SetItem(elt3,0,SWIG_From_int(typesFI[j]));
@@ -2977,7 +2978,7 @@ namespace MEDCoupling
          
          PyObject *getUndergroundDataArrayExt(int iteration, int order) const
          {
-           std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > > elt1Cpp;
+           std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > > elt1Cpp;
            DataArrayDouble *elt0=self->getUndergroundDataArrayExt(iteration,order,elt1Cpp);
            if(elt0)
              elt0->incrRef();
@@ -2992,8 +2993,8 @@ namespace MEDCoupling
                PyTuple_SetItem(elt2,0,SWIG_From_int(elt1Cpp[i].first.first));
                PyTuple_SetItem(elt2,1,SWIG_From_int(elt1Cpp[i].first.second));
                PyObject *elt3=PyTuple_New(2);
-               PyTuple_SetItem(elt3,0,SWIG_From_int(elt1Cpp[i].second.first));
-               PyTuple_SetItem(elt3,1,SWIG_From_int(elt1Cpp[i].second.second));
+               PyTuple_SetItem(elt3,0,PyInt_FromLong(elt1Cpp[i].second.first));
+               PyTuple_SetItem(elt3,1,PyInt_FromLong(elt1Cpp[i].second.second));
                PyTuple_SetItem(elt1,0,elt2);
                PyTuple_SetItem(elt1,1,elt3);
                PyList_SetItem(elt,i,elt1);
@@ -3032,7 +3033,7 @@ namespace MEDCoupling
     static MEDFileIntFieldMultiTS *New(DataArrayByte *db);
     //
     void appendFieldNoProfileSBT(const MEDCouplingFieldInt *field);
-    void appendFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
+    void appendFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     MEDCoupling::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
     MEDCouplingFieldInt *field(int iteration, int order, const MEDFileMesh *mesh) const;
     MEDCouplingFieldInt *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
@@ -3076,17 +3077,17 @@ namespace MEDCoupling
 
       PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const
       {
-         DataArrayInt *ret1=0;
-         DataArrayInt *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
+         DataArrayIdType *ret1=0;
+         DataArrayInt32 *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
          PyObject *ret=PyTuple_New(2);
-         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<int>::TI, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
          return ret;
       }
 
-      DataArrayInt *getUndergroundDataArray(int iteration, int order) const
+      DataArrayInt32 *getUndergroundDataArray(int iteration, int order) const
       {
-        DataArrayInt *ret=self->getUndergroundDataArray(iteration,order);
+        DataArrayInt32 *ret=self->getUndergroundDataArray(iteration,order);
         if(ret)
           ret->incrRef();
         return ret;
@@ -3103,7 +3104,7 @@ namespace MEDCoupling
     static MEDFileFloatFieldMultiTS *New(DataArrayByte *db);
     //
     void appendFieldNoProfileSBT(const MEDCouplingFieldFloat *field);
-    void appendFieldProfile(const MEDCouplingFieldFloat *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile);
+    void appendFieldProfile(const MEDCouplingFieldFloat *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
     MEDCoupling::MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
     MEDCouplingFieldFloat *field(int iteration, int order, const MEDFileMesh *mesh) const;
     MEDCouplingFieldFloat *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
@@ -3147,11 +3148,11 @@ namespace MEDCoupling
 
       PyObject *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh) const
       {
-         DataArrayInt *ret1=0;
+         DataArrayIdType *ret1=0;
          DataArrayFloat *ret0=self->getFieldWithProfile(type,iteration,order,meshDimRelToMax,mesh,ret1);
          PyObject *ret=PyTuple_New(2);
          PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayFloat, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
          return ret;
       }
 
@@ -3320,10 +3321,10 @@ namespace MEDCoupling
          {
            if(obj && PyList_Check(obj))
              {
-               int sz=PyList_Size(obj);
+               std::size_t sz=PyList_Size(obj);
                MCAuto<DataArrayInt> da=DataArrayInt::New(); da->alloc(sz,1);
                int *pt=da->getPointer();
-               for(int i=0;i<sz;i++,pt++)
+               for(std::size_t i=0;i<sz;i++,pt++)
                  {
                    PyObject *elt1=PyList_GetItem(obj,i);
                    *pt=MEDFileFieldsgetitemSingleTS__(self,elt1);
@@ -3363,7 +3364,7 @@ namespace MEDCoupling
              throw INTERP_KERNEL::Exception(msg);
            if(PyInt_Check(elt0))
              {//fmts[3]
-               return PyInt_AS_LONG(elt0);
+               return (int)PyInt_AS_LONG(elt0);
              }
            return self->getPosFromFieldName(convertPyObjectToStr(elt0,msg));
          }
@@ -3372,9 +3373,9 @@ namespace MEDCoupling
          {
            if(PyList_Check(elts))
              {
-               int sz=PyList_Size(elts);
+               std::size_t sz=PyList_Size(elts);
                std::vector<int> ret(sz);
-               for(int i=0;i<sz;i++)
+               for(std::size_t i=0;i<sz;i++)
                  {
                    PyObject *elt=PyList_GetItem(elts,i);
                    ret[i]=MEDCoupling_MEDFileFields_getPosOfField(self,elt);
@@ -3402,7 +3403,7 @@ namespace MEDCoupling
              {
                Py_ssize_t strt=2,stp=2,step=2;
                GetIndicesOfSlice(elts,self->getNumberOfFields(),&strt,&stp,&step,"MEDFileFields.__delitem__ : error in input slice !");
-               self->destroyFieldsAtPos2(strt,stp,step);
+               self->destroyFieldsAtPos2((int)strt,(int)stp,(int)step);
              }
            else
              {
@@ -3414,7 +3415,7 @@ namespace MEDCoupling
 
          MEDFileFields *extractPart(PyObject *extractDef, MEDFileMesh *mm) const
          {
-           std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
+           std::map<int, MCAuto<DataArrayIdType> > extractDefCpp;
            convertToMapIntDataArrayInt(extractDef,extractDefCpp);
            return self->extractPart(extractDefCpp,mm);
          }
@@ -3569,7 +3570,7 @@ namespace MEDCoupling
       
       void eraseTimeStepIds(PyObject *ids)
       {
-        int sw;
+        mcIdType sw;
         int pos1;
         std::vector<int> pos2;
         DataArrayInt *pos3=0;
@@ -3614,8 +3615,8 @@ namespace MEDCoupling
                 PyObject *o1=PyTuple_GetItem(elt0,1);
                 if(PyInt_Check(o0) && PyInt_Check(o1))
                   {//fmts(1,-1)
-                    int iter=PyInt_AS_LONG(o0);
-                    int order=PyInt_AS_LONG(o1);
+                    int iter=(int)PyInt_AS_LONG(o0);
+                    int order=(int)PyInt_AS_LONG(o1);
                     return self->getPosOfTimeStep(iter,order);
                   }
                 else
@@ -3645,9 +3646,9 @@ namespace MEDCoupling
       {
         if(PyList_Check(elts))
           {
-            int sz=PyList_Size(elts);
+            std::size_t sz=PyList_Size(elts);
             std::vector<int> ret(sz);
-            for(int i=0;i<sz;i++)
+            for(std::size_t i=0;i<sz;i++)
               {
                 PyObject *elt=PyList_GetItem(elts,i);
                 ret[i]=MEDCoupling_MEDFileParameterMultiTS_getTimeStepId(self,elt);
@@ -3935,7 +3936,7 @@ namespace MEDCoupling
   public:
     virtual MEDMeshMultiLev *prepare() const;
     DataArray *buildDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const;
-    DataArrayInt *retrieveGlobalNodeIdsIfAny() const;
+    DataArrayIdType *retrieveGlobalNodeIdsIfAny() const;
   protected:
     ~MEDMeshMultiLev();
   public:
@@ -3943,52 +3944,52 @@ namespace MEDCoupling
     {
       PyObject *retrieveFamilyIdsOnCells() const
       {
-        DataArrayInt *famIds(0);
+        DataArrayIdType *famIds(0);
         bool isWithoutCopy(false);
         self->retrieveFamilyIdsOnCells(famIds,isWithoutCopy);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
         Py_XINCREF(ret1Py);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         PyTuple_SetItem(ret,1,ret1Py);
         return ret;
       }
 
       PyObject *retrieveNumberIdsOnCells() const
       {
-        DataArrayInt *numIds(0);
+        DataArrayIdType *numIds(0);
         bool isWithoutCopy(false);
         self->retrieveNumberIdsOnCells(numIds,isWithoutCopy);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
         Py_XINCREF(ret1Py);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         PyTuple_SetItem(ret,1,ret1Py);
         return ret;
       }
       
       PyObject *retrieveFamilyIdsOnNodes() const
       {
-        DataArrayInt *famIds(0);
+        DataArrayIdType *famIds(0);
         bool isWithoutCopy(false);
         self->retrieveFamilyIdsOnNodes(famIds,isWithoutCopy);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
         Py_XINCREF(ret1Py);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(famIds),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         PyTuple_SetItem(ret,1,ret1Py);
         return ret;
       }
 
       PyObject *retrieveNumberIdsOnNodes() const
       {
-        DataArrayInt *numIds(0);
+        DataArrayIdType *numIds(0);
         bool isWithoutCopy(false);
         self->retrieveNumberIdsOnNodes(numIds,isWithoutCopy);
         PyObject *ret=PyTuple_New(2);
         PyObject *ret1Py=isWithoutCopy?Py_True:Py_False;
         Py_XINCREF(ret1Py);
-        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+        PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(numIds),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
         PyTuple_SetItem(ret,1,ret1Py);
         return ret;
       }
@@ -4014,7 +4015,7 @@ namespace MEDCoupling
      {
        PyObject *buildVTUArrays() const
        {
-         DataArrayDouble *coords(0); DataArrayByte *types(0); DataArrayInt *cellLocations(0),*cells(0),*faceLocations(0),*faces(0);
+         DataArrayDouble *coords(0); DataArrayByte *types(0); DataArrayIdType *cellLocations(0),*cells(0),*faceLocations(0),*faces(0);
          bool ncc(self->buildVTUArrays(coords,types,cellLocations,cells,faceLocations,faces));
          PyObject *ret0Py=ncc?Py_True:Py_False;
          Py_XINCREF(ret0Py);
@@ -4022,10 +4023,10 @@ namespace MEDCoupling
          PyTuple_SetItem(ret,0,ret0Py);
          PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(coords),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
          PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(types),SWIGTYPE_p_MEDCoupling__DataArrayByte, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellLocations),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(cells),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(faceLocations),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-         PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(faces),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(cellLocations),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(cells),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,5,SWIG_NewPointerObj(SWIG_as_voidptr(faceLocations),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+         PyTuple_SetItem(ret,6,SWIG_NewPointerObj(SWIG_as_voidptr(faces),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
          return ret;
        }
      }
@@ -4072,7 +4073,7 @@ namespace MEDCoupling
       PyObject *buildVTUArrays() const
       {
         DataArrayDouble *ret0(0);
-        std::vector<int> ret1;
+        std::vector<mcIdType> ret1;
         bool ret2;
         self->buildVTUArrays(ret0,ret1,ret2);
         std::size_t sz(ret1.size());
@@ -4080,7 +4081,7 @@ namespace MEDCoupling
         PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
         PyObject *ret1Py=PyList_New(sz);
         for(std::size_t i=0;i<sz;i++)
-          PyList_SetItem(ret1Py,i,SWIG_From_int(ret1[i]));
+          PyList_SetItem(ret1Py,i,PyInt_FromLong(ret1[i]));
         PyTuple_SetItem(ret,1,ret1Py);
         PyObject *ret2Py(ret2?Py_True:Py_False);
         Py_XINCREF(ret2Py);
index 1b51583a4ef23e938899336710d380c9d28b3cbd..6596505fa31f68650dcf80e7ec8c4581480a073e 100644 (file)
@@ -2256,12 +2256,16 @@ class MEDLoaderTest3(unittest.TestCase):
         m=m.buildUnstructured()
         m.setName("mm")
         f=m.getMeasureField(False)
-        self.assertIn(m.getHeapMemorySize(), list(range(3552 - 100, 3552 + 100 + 4 * strMulFac)))
-        self.assertIn(f.getHeapMemorySize(), list(range(4215 - 100, 4215 + 100 + 8 * strMulFac)))
+        cooMem = 100 * 2 * 8
+        nodalMem = 5 * 81 * MEDCouplingSizeOfIDs()//8
+        indexMem = 82 * MEDCouplingSizeOfIDs()//8
+        meshMem = cooMem + nodalMem + indexMem
+        self.assertIn(m.getHeapMemorySize(), list(range(meshMem - 100, meshMem + 100 + 4 * strMulFac)))
+        self.assertIn(f.getHeapMemorySize(), list(range(meshMem + 81*8 - 100, meshMem + 81*8 + 100 + 8 * strMulFac)))
         #
         mm=MEDFileUMesh()
         mm.setMeshAtLevel(0,m)
-        self.assertIn(mm.getHeapMemorySize(), list(range(3889 - 100, 4225 + 100 + 10 * strMulFac)))
+        self.assertIn(mm.getHeapMemorySize(), list(range(meshMem + 81*(MEDCouplingSizeOfIDs()//8) - 100, meshMem + 81*(MEDCouplingSizeOfIDs()//8) + 100 + 10 * strMulFac)))
         ff=MEDFileField1TS()
         ff.setFieldNoProfileSBT(f)
         self.assertIn(ff.getHeapMemorySize(), list(range(771 - 40, 871 + 21 + (4 + 1) * strMulFac)))
@@ -2278,8 +2282,8 @@ class MEDLoaderTest3(unittest.TestCase):
         pfl=DataArrayInt.Range(0,50,1) ; pfl.setName("pfl")
         fff.appendFieldProfile(f2,mm,0,pfl)
         self.assertIn(fff.getHeapMemorySize(), list(range(2348 - 130, 2608 + 100 + (10 + 2) * strMulFac)))
-        self.assertIn(fff.getProfile("pfl").getHeapMemorySize(), list(range(204 - 10, 204 + 10 + 2 * strMulFac)))
-        self.assertIn(fff[1, -1].getHeapMemorySize(), list(range(738 - 50, 838 + 30 + 4 * strMulFac)))
+        self.assertIn(fff.getProfile("pfl").getHeapMemorySize(), list(range(50 *(MEDCouplingSizeOfIDs()//8) - 10, 50 *(MEDCouplingSizeOfIDs()//8) + 10 + 2 * strMulFac)))
+        self.assertIn(fff[1, -1].getHeapMemorySize(), list(range(538 + (50 *(MEDCouplingSizeOfIDs()//8)) - 50, 638 + (50 *(MEDCouplingSizeOfIDs()//8))  + 30 + 4 * strMulFac)))
         pass
 
     def internalCurveLinearMesh1(self):
@@ -2749,7 +2753,7 @@ class MEDLoaderTest3(unittest.TestCase):
         self.assertTrue(a.getArray().isEqual(2*f1.getArray()))
         f1.setTime(3.,1,2) ; f1.getArray()[:]*=2
         self.assertTrue(a.isEqual(f1,1e-12,0)) ; f1.getArray()[:]/=2
-        bc=DataArrayInt(6,3) ; bc[:]=0 ; bc.setInfoOnComponents(['power [MW/m^3]','density [g/cm^3]','temperature [K]'])
+        bc=DataArrayInt32(6,3) ; bc[:]=0 ; bc.setInfoOnComponents(['power [MW/m^3]','density [g/cm^3]','temperature [K]'])
         for it in ffs1:
             a=it.getFieldOnMeshAtLevel(ON_CELLS,0,mm1)
             bc+=a.getArray()
@@ -2758,7 +2762,7 @@ class MEDLoaderTest3(unittest.TestCase):
         nf1=MEDCouplingFieldInt(ON_NODES)
         nf1.setTime(9.,10,-1)
         nf1.setMesh(f1.getMesh())
-        narr=DataArrayInt(12,2) ; narr.setInfoOnComponents(["aa [u1]","bbbvv [ppp]"]) ; narr[:,0]=list(range(12)) ; narr[:,1]=2*narr[:,0]
+        narr=DataArrayInt32(12,2) ; narr.setInfoOnComponents(["aa [u1]","bbbvv [ppp]"]) ; narr[:,0]=list(range(12)) ; narr[:,1]=2*narr[:,0]
         nf1.setName("VectorFieldOnNodes") ; nf1.setArray(narr)
         nff1=MEDFileIntField1TS.New()
         nff1.setFieldNoProfileSBT(nf1)
@@ -2769,7 +2773,7 @@ class MEDLoaderTest3(unittest.TestCase):
         nf2=MEDCouplingFieldInt(ON_NODES)
         nf2.setTime(19.,20,-11)
         nf2.setMesh(f1.getMesh())
-        narr2=DataArrayInt(8,2) ; narr.setInfoOnComponents(["aapfl [u1]","bbbvvpfl [ppp]"]) ; narr2[:,0]=list(range(8)) ; narr2[:,0]+=10  ; narr2[:,1]=3*narr2[:,0]
+        narr2=DataArrayInt32(8,2) ; narr.setInfoOnComponents(["aapfl [u1]","bbbvvpfl [ppp]"]) ; narr2[:,0]=list(range(8)) ; narr2[:,0]+=10  ; narr2[:,1]=3*narr2[:,0]
         nf2.setName("VectorFieldOnNodesPfl") ; narr2.setName(nf2.getName()) ; nf2.setArray(narr2)
         nff2=MEDFileIntField1TS.New()
         npfl=DataArrayInt([1,2,4,5,6,7,10,11]) ; npfl.setName("npfl")
@@ -3143,7 +3147,7 @@ class MEDLoaderTest3(unittest.TestCase):
         for delt,(dt,it,t) in  zip([0,100,200],ff1.getTimeSteps()):
             self.assertEqual(ff1.getFieldSplitedByType(dt,it),fspExp)
             arr=ff1.getUndergroundDataArray(dt,it)
-            arr.isEqualWithoutConsideringStr(DataArrayInt.Range(delt,delt+7,1))
+            arr.isEqualWithoutConsideringStr(DataArrayInt32.Range(delt,delt+7,1))
             pass
         self.assertEqual(ff1.getPfls(),('pfl_NORM_QUAD4', 'pfl_NORM_QUAD4', 'pfl_NORM_QUAD4'))
         #
@@ -3166,7 +3170,7 @@ class MEDLoaderTest3(unittest.TestCase):
         for delt,(dt,it,t) in  zip([0,100,200],ff1.getTimeSteps()):
             self.assertTrue(ff1.getFieldSplitedByType(dt,it),fspExp)
             arr=ff1.getUndergroundDataArray(dt,it)
-            arr.isEqualWithoutConsideringStr(DataArrayInt.Range(delt,delt+7,1))
+            arr.isEqualWithoutConsideringStr(DataArrayInt32.Range(delt,delt+7,1))
             pass
         self.assertEqual(ff1.getPfls(),('pfl_NORM_QUAD4',))
         pass
@@ -4933,7 +4937,7 @@ class MEDLoaderTest3(unittest.TestCase):
       eqs=mm.getEquivalences()
       eq0=eqs.appendEmptyEquivalenceWithName(eqName)
       eq0.setDescription(descEq)
-      corr=DataArrayInt([(0,3),(0,4),(0,5),(0,6),(1,7),(1,8),(1,9),(1,10),(2,11),(2,12),(2,13),(2,14)])
+      corr=DataArrayInt32([(0,3),(0,4),(0,5),(0,6),(1,7),(1,8),(1,9),(1,10),(2,11),(2,12),(2,13),(2,14)])
       eq0.setArray(-1,corr)
       self.assertEqual(eq0.getCell().size(),1)
       self.assertTrue(eq0.getCell().getArray(NORM_QUAD4).isEqual(corr))
@@ -5248,7 +5252,7 @@ class MEDLoaderTest3(unittest.TestCase):
       f=MEDCouplingFieldInt(ON_CELLS) ; f.setMesh(mesh)
       fieldName="FieldOnCell"
       f.setTime(1.2,1,1) ; f.setName(fieldName)
-      arr=DataArrayInt([101,102,103]) ; f.setArray(arr)
+      arr=DataArrayInt32([101,102,103]) ; f.setArray(arr)
       fmts.appendFieldProfile(f,mm,0,pfl)
       #
       mm.write(fname,2)
@@ -5359,7 +5363,7 @@ class MEDLoaderTest3(unittest.TestCase):
         m.insertNextCell(NORM_QUAD4,[104,105,106,107])
         mm[0]=m
         mm.write(fname,2)
-        arr0=DataArrayInt([10,11,12,13,100,101])
+        arr0=DataArrayInt32([10,11,12,13,100,101])
         f=MEDCouplingFieldInt(ON_CELLS) ; f.setArray(arr0) ; f.setMesh(m)
         f.setName(fieldName) ; f.setTime(2.,6,7)
         f0=f.deepCopy()
@@ -5380,7 +5384,7 @@ class MEDLoaderTest3(unittest.TestCase):
         fmts=MEDFileIntFieldMultiTS(fname,fieldName)
         self.assertTrue(f1.isEqual(fmts.field(8,9,mm),1e-12,0))
         ## Basic test on nodes on top level
-        f2=MEDCouplingFieldInt(ON_NODES) ; arr2=DataArrayInt([200,201,202]) ; arr2.setInfoOnComponent(0,"tutu") ; f2.setArray(arr2) ; f2.setMesh(m) ; f2.setTime(22.,23,24)
+        f2=MEDCouplingFieldInt(ON_NODES) ; arr2=DataArrayInt32([200,201,202]) ; arr2.setInfoOnComponent(0,"tutu") ; f2.setArray(arr2) ; f2.setMesh(m) ; f2.setTime(22.,23,24)
         f2.setName(fieldName)
         mm.write(fname,2)
         ff=MEDFileIntField1TS() ; ff.setFieldNoProfileSBT(f2) ; ff.write(fname,0)
@@ -5391,7 +5395,7 @@ class MEDLoaderTest3(unittest.TestCase):
         fmts=MEDFileIntFieldMultiTS(fname,fieldName)
         self.assertTrue(f2.isEqual(fmts.field(23,24,mm),1e-12,0))
         ## Node on elements
-        f3=MEDCouplingFieldInt(ON_GAUSS_NE) ; f3.setMesh(m) ; arr3=DataArrayInt([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]) ; f3.setArray(arr3) ; f3.setTime(0.5,2,3)
+        f3=MEDCouplingFieldInt(ON_GAUSS_NE) ; f3.setMesh(m) ; arr3=DataArrayInt32([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]) ; f3.setArray(arr3) ; f3.setTime(0.5,2,3)
         f3.setName(fieldName) ; f3.checkConsistencyLight()
         mm.write(fname,2) ; ff=MEDFileIntField1TS() ; ff.setFieldNoProfileSBT(f3) ; ff.write(fname,0)
         #
@@ -5402,7 +5406,7 @@ class MEDLoaderTest3(unittest.TestCase):
         f4=MEDCouplingFieldInt(ON_GAUSS_PT) ; f4.setMesh(m) ; f4.setName(fieldName)
         f4.setGaussLocalizationOnType(NORM_TRI3,[0.,0.,1.,0.,1.,1.],[0.1,0.1, 0.2,0.2, 0.3,0.3, 0.4,0.4, 0.5,0.5],[0.2,0.3,0.1,0.05,0.35])
         f4.setGaussLocalizationOnType(NORM_QUAD4,[0.,0.,1.,0.,1.,1.,0.,1.],[0.3,0.4, 0.6,0.7],[0.7,0.3]) ; f4.setTime(0.25,4,5)
-        arr4=DataArrayInt([0,1,2,3,4 ,10,11,12,13,14, 20,21,22,23,24, 30,31,32,33,34, 45,46, 55,56]) ; arr4.setInfoOnComponent(0,"abc") ; f4.setArray(arr4)
+        arr4=DataArrayInt32([0,1,2,3,4 ,10,11,12,13,14, 20,21,22,23,24, 30,31,32,33,34, 45,46, 55,56]) ; arr4.setInfoOnComponent(0,"abc") ; f4.setArray(arr4)
         f4.checkConsistencyLight()
         mm.write(fname,2) ; ff=MEDFileIntField1TS() ; ff.setFieldNoProfileSBT(f4) ; ff.write(fname,0)
         #
@@ -5494,13 +5498,13 @@ class MEDLoaderTest3(unittest.TestCase):
         mm[0]=m0
         mm.write(fname,2)
         # start slowly
-        f1=MEDCouplingFieldInt(ON_CELLS) ; f1.setName(fieldName) ; f1.setArray(DataArrayInt([(0,100),(1,101)])) ; f1.setMesh(mm[0]) ; f1.setTime(4.,1,2)
+        f1=MEDCouplingFieldInt(ON_CELLS) ; f1.setName(fieldName) ; f1.setArray(DataArrayInt32([(0,100),(1,101)])) ; f1.setMesh(mm[0]) ; f1.setTime(4.,1,2)
         f1ts=MEDFileIntField1TS() ; f1ts.setFieldNoProfileSBT(f1) ; f1ts.write(fname,0)
         #
         mm=MEDFileMesh.New(fname) ; f1ts=MEDFileIntField1TS(fname,fieldName,1,2)
         self.assertTrue(f1.isEqual(f1ts.field(mm),1e-12,0))
         # here f1 lying on level -1 not 0 check if "field" method detect it !
-        f1=MEDCouplingFieldInt(ON_CELLS) ; f1.setName(fieldName) ; f1.setArray(DataArrayInt([(0,100),(1,101),(0,100),(1,101),(0,100),(1,101)]))
+        f1=MEDCouplingFieldInt(ON_CELLS) ; f1.setName(fieldName) ; f1.setArray(DataArrayInt32([(0,100),(1,101),(0,100),(1,101),(0,100),(1,101)]))
         f1.setMesh(mm[-1]) # -1 is very important
         f1.setTime(16.,3,4)
         f1.checkConsistencyLight()
@@ -5512,7 +5516,7 @@ class MEDLoaderTest3(unittest.TestCase):
         # nodes on elements
         f3=MEDCouplingFieldInt(ON_GAUSS_NE)
         f3.setMesh(mm[-1]) # this line is important
-        arr3=DataArrayInt([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]) ; f3.setArray(arr3) ; f3.setTime(0.5,2,3)
+        arr3=DataArrayInt32([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]) ; f3.setArray(arr3) ; f3.setTime(0.5,2,3)
         f3.setName(fieldName) ; f3.checkConsistencyLight()
         mm.write(fname,2) ; ff=MEDFileIntField1TS() ; ff.setFieldNoProfileSBT(f3) ; ff.write(fname,0)
         #
@@ -5524,7 +5528,7 @@ class MEDLoaderTest3(unittest.TestCase):
         f4.setName(fieldName)
         f4.setGaussLocalizationOnType(NORM_TRI3,[0.,0.,1.,0.,1.,1.],[0.1,0.1, 0.2,0.2, 0.3,0.3, 0.4,0.4, 0.5,0.5],[0.2,0.3,0.1,0.05,0.35])
         f4.setGaussLocalizationOnType(NORM_QUAD4,[0.,0.,1.,0.,1.,1.,0.,1.],[0.3,0.4, 0.6,0.7],[0.7,0.3]) ; f4.setTime(0.25,4,5)
-        arr4=DataArrayInt([0,1,2,3,4 ,10,11,12,13,14, 20,21,22,23,24, 30,31,32,33,34, 45,46, 55,56]) ; arr4.setInfoOnComponent(0,"abc") ; f4.setArray(arr4)
+        arr4=DataArrayInt32([0,1,2,3,4 ,10,11,12,13,14, 20,21,22,23,24, 30,31,32,33,34, 45,46, 55,56]) ; arr4.setInfoOnComponent(0,"abc") ; f4.setArray(arr4)
         f4.checkConsistencyLight()
         mm.write(fname,2) ; ff=MEDFileIntField1TS() ; ff.setFieldNoProfileSBT(f4) ; ff.write(fname,0)
         mm=MEDFileMesh.New(fname) ; f1ts=MEDFileIntField1TS(fname,fieldName,4,5)
index 3c2dbc575aabff3b821a5780a0994d9255c4bd33..e32be543f05e4431de6644a4a06117f7075759f9 100644 (file)
@@ -118,15 +118,15 @@ static std::vector<std::pair<int,int> > convertTimePairIdsFromPy(PyObject *pyLi)
   std::vector<std::pair<int,int> > ret;
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       ret.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
               std::pair<int,int> p;
-              int size2=PyTuple_Size(o);
+              std::size_t size2=PyTuple_Size(o);
               if(size2!=2)
                 throw INTERP_KERNEL::Exception("tuples in list must be of size 2 (dt,it) !");
               PyObject *o0=PyTuple_GetItem(o,0);
@@ -169,9 +169,9 @@ static void converPyListToVecString(PyObject *pyLi, std::vector<std::string>& v)
   static const char msg2[]="Unrecognized python argument : expected a list of string or tuple of string or string !";
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       v.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           v[i]=convertPyObjectToStr(o,msg0);
@@ -180,9 +180,9 @@ static void converPyListToVecString(PyObject *pyLi, std::vector<std::string>& v)
     }
   else if(PyTuple_Check(pyLi))
     {
-      int size=PyTuple_Size(pyLi);
+      std::size_t size=PyTuple_Size(pyLi);
       v.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyTuple_GetItem(pyLi,i);
           v[i]=convertPyObjectToStr(o,msg1);
@@ -195,9 +195,9 @@ static void converPyListToVecString(PyObject *pyLi, std::vector<std::string>& v)
 
 static PyObject *convertFieldDoubleVecToPy(const std::vector<MEDCoupling::MEDCouplingFieldDouble *>& li)
 {
-  int sz=li.size();
+  std::size_t sz=li.size();
   PyObject *ret=PyList_New(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     {
       PyObject *o=SWIG_NewPointerObj((void*)li[i],SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble,SWIG_POINTER_OWN | 0);
       PyList_SetItem(ret,i,o);
@@ -205,15 +205,16 @@ static PyObject *convertFieldDoubleVecToPy(const std::vector<MEDCoupling::MEDCou
   return ret;
 }
 
-PyObject *convertVecPairIntToPy(const std::vector< std::pair<int,int> >& vec)
+template< class T >
+PyObject *convertVecPairIntToPy(const std::vector< std::pair<int,T> >& vec)
 {
   PyObject *ret(PyList_New(vec.size()));
   int rk=0;
-  for(std::vector< std::pair<int,int> >::const_iterator iter=vec.begin();iter!=vec.end();iter++,rk++)
+  for(typename std::vector< std::pair<int,T> >::const_iterator iter=vec.begin();iter!=vec.end();iter++,rk++)
     {
       PyObject *elt=PyTuple_New(2);
       PyTuple_SetItem(elt,0,SWIG_From_int((*iter).first));
-      PyTuple_SetItem(elt,1,SWIG_From_int((*iter).second));
+      PyTuple_SetItem(elt,1,PyInt_FromLong((*iter).second));
       PyList_SetItem(ret,rk,elt);
     }
   return ret;
@@ -221,9 +222,9 @@ PyObject *convertVecPairIntToPy(const std::vector< std::pair<int,int> >& vec)
 
 PyObject *convertVecPairVecStToPy(const std::vector< std::pair<std::vector<std::string>, std::string > >& vec)
 {
-  int sz=(int)vec.size();
+  std::size_t sz=vec.size();
   PyObject *ret=PyList_New(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     {
       PyObject *t=PyTuple_New(2);
       int sz2=(int)vec[i].first.size();
@@ -239,9 +240,9 @@ PyObject *convertVecPairVecStToPy(const std::vector< std::pair<std::vector<std::
 
 PyObject *convertVectPairStToPy(const std::vector< std::pair<std::string, std::string > >& vec)
 {
-  int sz=(int)vec.size();
+  std::size_t sz=vec.size();
   PyObject *ret=PyList_New(sz);
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     {
       PyObject *t=PyTuple_New(2);
       PyTuple_SetItem(t,0,PyString_FromString(vec[i].first.c_str()));
@@ -257,15 +258,15 @@ std::vector< std::pair<std::string, std::string > > convertVecPairStStFromPy(PyO
   const char *msg="convertVecPairStStFromPy : Expecting PyList of Tuples of size 2 ! The first elt in tuple is one string and the 2nd one a string !";
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       ret.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
               std::pair<std::string, std::string> p;
-              int size2=PyTuple_Size(o);
+              std::size_t size2=PyTuple_Size(o);
               if(size2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               PyObject *o0=PyTuple_GetItem(o,0);
@@ -288,23 +289,23 @@ std::vector< std::pair<std::vector<std::string>, std::string > > convertVecPairV
   const char *msg="convertVecPairVecStFromPy : Expecting PyList of Tuples of size 2 ! The first elt in tuple is a list of strings and the 2nd one a string !";
   if(PyList_Check(pyLi))
     {
-      int size=PyList_Size(pyLi);
+      std::size_t size=PyList_Size(pyLi);
       ret.resize(size);
-      for(int i=0;i<size;i++)
+      for(std::size_t i=0;i<size;i++)
         {
           PyObject *o=PyList_GetItem(pyLi,i);
           if(PyTuple_Check(o))
             {
               std::pair<std::vector<std::string>, std::string> p;
-              int size2=PyTuple_Size(o);
+              std::size_t size2=PyTuple_Size(o);
               if(size2!=2)
                 throw INTERP_KERNEL::Exception(msg);
               PyObject *o0=PyTuple_GetItem(o,0);
               if(PyList_Check(o0))
                 {
-                  int size3=PyList_Size(o0);
+                  std::size_t size3=PyList_Size(o0);
                   p.first.resize(size3);
-                  for(int j=0;j<size3;j++)
+                  for(std::size_t j=0;j<size3;j++)
                     {
                       PyObject *o0j=PyList_GetItem(o0,j);
                       p.first[j]=convertPyObjectToStr(o0j,msg);
@@ -342,8 +343,8 @@ int MEDFileAnyTypeFieldMultiTSgetitemSingleTS__(const MEDFileAnyTypeFieldMultiTS
           PyObject *o1=PyTuple_GetItem(elt0,1);
           if(PyInt_Check(o0) && PyInt_Check(o1))
             {//fmts(1,-1)
-              int iter=PyInt_AS_LONG(o0);
-              int order=PyInt_AS_LONG(o1);
+              int iter=(int)PyInt_AS_LONG(o0);
+              int order=(int)PyInt_AS_LONG(o1);
               return self->getPosOfTimeStep(iter,order);
             }
           else
@@ -370,12 +371,12 @@ int MEDFileFieldsgetitemSingleTS__(const MEDFileFields *self, PyObject *obj)
   static const char msg[]="MEDFileFields::__getitem__ : only integer or string with fieldname supported !";
   if(PyInt_Check(obj))
     {
-      return InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfFields());
+      return InterpreteNegativeInt(PyInt_AS_LONG(obj),self->getNumberOfFields());
     }
   return self->getPosFromFieldName(convertPyObjectToStr(obj,msg));
 }
 
-void convertToMapIntDataArrayInt(PyObject *pyMap, std::map<int, MCAuto<DataArrayInt> >& cppMap)
+void convertToMapIntDataArrayInt(PyObject *pyMap, std::map<int, MCAuto<DataArrayIdType> >& cppMap)
 {
   if(!PyDict_Check(pyMap))
     throw INTERP_KERNEL::Exception("convertToMapIntDataArrayInt : input is not a python map !");
@@ -386,16 +387,16 @@ void convertToMapIntDataArrayInt(PyObject *pyMap, std::map<int, MCAuto<DataArray
     {
       if(!PyInt_Check(key))
         throw INTERP_KERNEL::Exception("convertToMapIntDataArrayInt : keys in map must be PyInt !");
-      long k(PyInt_AS_LONG(key));
+      int k((int)PyInt_AS_LONG(key));
       void *argp(0);
-      int status(SWIG_ConvertPtr(value,&argp,SWIGTYPE_p_MEDCoupling__DataArrayInt,0|0));
+      int status(SWIG_ConvertPtr(value,&argp,SWIGTITraits<mcIdType>::TI,0|0));
       if(!SWIG_IsOK(status))
         {
           std::ostringstream oss; oss << "convertToMapIntDataArrayInt : values in map must be DataArrayInt !";
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
-      DataArrayInt *arg(reinterpret_cast<DataArrayInt*>(argp));
-      MCAuto<DataArrayInt> arg2(arg);
+      DataArrayIdType *arg(reinterpret_cast<DataArrayIdType*>(argp));
+      MCAuto<DataArrayIdType> arg2(arg);
       if(arg)
         arg->incrRef();
       cppMap[k]=arg2;
@@ -405,18 +406,18 @@ void convertToMapIntDataArrayInt(PyObject *pyMap, std::map<int, MCAuto<DataArray
 template<class T>
 PyObject *MEDFileField1TS_getFieldWithProfile(const typename MLFieldTraits<T>::F1TSType *self, TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh) 
 {
-  DataArrayInt *ret1(NULL);
+  DataArrayIdType *ret1(NULL);
   typename MEDCoupling::Traits<T>::ArrayType *ret0(self->getFieldWithProfile(type,meshDimRelToMax,mesh,ret1));
   PyObject *ret(PyTuple_New(2));
   PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTITraits<T>::TI, SWIG_POINTER_OWN | 0 ));
-  PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+  PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
   return ret;
 }
 
 template<class T>
 PyObject *MEDFileField1TS_getUndergroundDataArrayExt(const typename MLFieldTraits<T>::F1TSType *self)
 {
-  std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > > elt1Cpp;
+  std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > > elt1Cpp;
   typename MEDCoupling::Traits<T>::ArrayType *elt0=self->getUndergroundDataArrayExt(elt1Cpp);
   if(elt0)
     elt0->incrRef();
@@ -431,8 +432,8 @@ PyObject *MEDFileField1TS_getUndergroundDataArrayExt(const typename MLFieldTrait
       PyTuple_SetItem(elt2,0,SWIG_From_int((int)elt1Cpp[i].first.first));
       PyTuple_SetItem(elt2,1,SWIG_From_int(elt1Cpp[i].first.second));
       PyObject *elt3=PyTuple_New(2);
-      PyTuple_SetItem(elt3,0,SWIG_From_int(elt1Cpp[i].second.first));
-      PyTuple_SetItem(elt3,1,SWIG_From_int(elt1Cpp[i].second.second));
+      PyTuple_SetItem(elt3,0,PyInt_FromLong(elt1Cpp[i].second.first));
+      PyTuple_SetItem(elt3,1,PyInt_FromLong(elt1Cpp[i].second.second));
       PyTuple_SetItem(elt1,0,elt2);
       PyTuple_SetItem(elt1,1,elt3);
       PyList_SetItem(elt,i,elt1);
index b3284e9be9fd57119c1a623da37cedbe9922a77e..68484f81c362ecf663f81c78e7e2675db3ee5d61 100644 (file)
@@ -264,17 +264,17 @@ void MEDLoaderTest::testMultiMeshRW1()
 {
   const char fileName[]="file10.med";
   MEDCouplingUMesh *mesh1=build3DMesh_1();
-  const int part1[5]={1,2,4,13,15};
+  const mcIdType part1[5]={1,2,4,13,15};
   MEDCouplingUMesh *mesh2=(MEDCouplingUMesh *)mesh1->buildPartOfMySelf(part1,part1+5,true);
   mesh2->setName("mesh2");
-  const int part2[4]={3,4,13,14};
+  const mcIdType part2[4]={3,4,13,14};
   MEDCouplingUMesh *mesh3=(MEDCouplingUMesh *)mesh1->buildPartOfMySelf(part2,part2+4,true);
   mesh3->setName("mesh3");
   MEDCouplingUMesh *mesh4=MEDCouplingUMesh::New();
   mesh4->setName("mesh4");
   mesh4->setMeshDimension(3);
   mesh4->allocateCells(1);
-  int conn[4]={0,11,1,3};
+  mcIdType conn[4]={0,11,1,3};
   mesh4->insertNextCell(INTERP_KERNEL::NORM_TETRA4,4,conn);
   mesh4->finishInsertingCells();
   mesh4->setCoords(mesh1->getCoords());
@@ -288,7 +288,7 @@ void MEDLoaderTest::testMultiMeshRW1()
   //
   MEDCouplingUMesh *mesh5=ReadUMeshFromFile(fileName,mnane);
   mesh1->setName(mnane);
-  const int part3[18]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
+  const mcIdType part3[18]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
   MEDCouplingUMesh *mesh6=(MEDCouplingUMesh *)mesh5->buildPartOfMySelf(part3,part3+18,true);
   mesh6->setName(mnane);
   mesh5->decrRef();
@@ -352,16 +352,16 @@ void MEDLoaderTest::testFieldProfilRW1()
   const char fileName[]="file12.med";
   MEDCouplingUMesh *mesh1=build3DMesh_1();
   bool b;
-  int newNbOfNodes;
-  DataArrayInt *da=mesh1->mergeNodes(1e-12,b,newNbOfNodes);
+  mcIdType newNbOfNodes;
+  DataArrayIdType *da=mesh1->mergeNodes(1e-12,b,newNbOfNodes);
   da->decrRef();
   WriteUMesh(fileName,mesh1,true);
-  const int part1[5]={1,2,4,13,15};
+  const mcIdType part1[5]={1,2,4,13,15};
   MEDCouplingUMesh *mesh2=(MEDCouplingUMesh *)mesh1->buildPartOfMySelf(part1,part1+5,true);
   mesh2->setName(mesh1->getName().c_str());//<- important for the test
   //
-  int nbOfCells=mesh2->getNumberOfCells();
-  CPPUNIT_ASSERT_EQUAL(5,nbOfCells);
+  mcIdType nbOfCells=mesh2->getNumberOfCells();
+  CPPUNIT_ASSERT_EQUAL(ToIdType(5),nbOfCells);
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   f1->setName("VectorFieldOnCells");
   f1->setMesh(mesh2);
@@ -398,7 +398,7 @@ void MEDLoaderTest::testFieldNodeProfilRW1()
   const char fileName[]="file19.med";
   const char fileName2[]="file20.med";
   MEDCouplingUMesh *m=build2DMesh_1();
-  int nbOfNodes=m->getNumberOfNodes();
+  mcIdType nbOfNodes=m->getNumberOfNodes();
   WriteUMesh(fileName,m,true);
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_NODES,ONE_TIME);
   f1->setName("VFieldOnNodes");
@@ -413,7 +413,7 @@ void MEDLoaderTest::testFieldNodeProfilRW1()
   array->decrRef();
   f1->setTime(3.14,2,7);
   f1->checkConsistencyLight();
-  const int arr2[2]={1,4};//node ids are 2,4,5,3,6,7
+  const mcIdType arr2[2]={1,4};//node ids are 2,4,5,3,6,7
   MEDCouplingFieldDouble *f2=f1->buildSubPart(arr2,arr2+2);
   (const_cast<MEDCouplingMesh *>(f2->getMesh()))->setName(f1->getMesh()->getName().c_str());
   WriteField(fileName,f2,false);//<- false important for the test
@@ -423,7 +423,7 @@ void MEDLoaderTest::testFieldNodeProfilRW1()
   CPPUNIT_ASSERT(f3->isEqual(f2,1e-12,1e-12));
   f3->decrRef();
   //
-  const int arr3[6]={1,3,0,5,2,4};
+  const mcIdType arr3[6]={1,3,0,5,2,4};
   f2->renumberNodes(arr3);
   WriteUMesh(fileName2,m,true);
   WriteField(fileName2,f2,false);//<- false important for the test
@@ -460,7 +460,7 @@ void MEDLoaderTest::testFieldNodeProfilRW2()
   std::copy(arr2,arr2+24,tmp);
   f1->setTime(3.17,2,7);
   //
-  const int renumArr[12]={3,7,2,1,5,11,10,0,9,6,8,4};
+  const mcIdType renumArr[12]={3,7,2,1,5,11,10,0,9,6,8,4};
   f1->renumberNodes(renumArr);
   f1->checkConsistencyLight();
   WriteField(fileName,f1,false);//<- false important for the test
@@ -532,7 +532,7 @@ void MEDLoaderTest::testMesh3DSurfShuffleRW()
 {
   const char fileName[]="file15.med";
   MEDCouplingUMesh *mesh=build3DSurfMesh_1();
-  const int renumber1[6]={2,5,1,0,3,4};
+  const mcIdType renumber1[6]={2,5,1,0,3,4};
   mesh->renumberCells(renumber1,false);
   mesh->checkConsistencyLight();
   WriteUMesh(fileName,mesh,true);
@@ -559,7 +559,7 @@ void MEDLoaderTest::testFieldShuffleRW1()
   f1->setTime(3.14,2,7);
   f1->checkConsistencyLight();
   //
-  const int renumber1[6]={2,1,5,0,3,4};
+  const mcIdType renumber1[6]={2,1,5,0,3,4};
   f1->renumberCells(renumber1,false);
   WriteField(fileName,f1,true);
   MEDCouplingFieldDouble *f2=dynamic_cast<MEDCouplingFieldDouble *>((MEDCouplingField *)ReadFieldCell(fileName,mesh->getName().c_str(),0,f1->getName().c_str(),2,7));
@@ -578,11 +578,11 @@ void MEDLoaderTest::testMultiFieldShuffleRW1()
   const char fileName[]="file17.med";
   MEDCouplingUMesh *m=build3DMesh_2();
   CPPUNIT_ASSERT_EQUAL(20,(int)m->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(45,m->getNumberOfNodes());
-  const int polys[3]={1,4,6};
-  std::vector<int> poly2(polys,polys+3);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(45),m->getNumberOfNodes());
+  const mcIdType polys[3]={1,4,6};
+  std::vector<mcIdType> poly2(polys,polys+3);
   m->convertToPolyTypes(&poly2[0],&poly2[0]+poly2.size());
-  const int renum[20]={1,3,2,8,9,12,13,16,19,0,4,7,5,15,14,17,10,18,6,11};
+  const mcIdType renum[20]={1,3,2,8,9,12,13,16,19,0,4,7,5,15,14,17,10,18,6,11};
   m->renumberCells(renum,false);
   m->orientCorrectlyPolyhedrons();
   // Writing
@@ -631,10 +631,10 @@ void MEDLoaderTest::testWriteUMeshesRW1()
   MEDCouplingUMesh *m3d=build3DMesh_2();
   const double pt[3]={0.,0.,-0.3};
   const double vec[3]={0.,0.,1.};
-  std::vector<int> nodes;
+  std::vector<mcIdType> nodes;
   m3d->findNodesOnPlane(pt,vec,1e-12,nodes);
   MEDCouplingUMesh *m2d=(MEDCouplingUMesh *)m3d->buildFacePartOfMySelfNode(&nodes[0],&nodes[0]+nodes.size(),true);
-  const int renumber[5]={1,2,0,4,3};
+  const mcIdType renumber[5]={1,2,0,4,3};
   m2d->renumberCells(renumber,false);
   m2d->setName("ExampleOfMultiDimW");
   std::vector<const MEDCouplingUMesh *> meshes;
@@ -788,7 +788,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(16,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllGeoTypes().size());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(i));
@@ -796,7 +796,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,mesh->getTypeOfCell(13));
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,mesh->getTypeOfCell(14));
   CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(15));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)90,mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(90),mesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(701,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+90,0));
   CPPUNIT_ASSERT_EQUAL(705,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+17,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12);
@@ -812,11 +812,11 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
   CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0));
   CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(1));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)11,mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(11),mesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(132,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+11,0));
   CPPUNIT_ASSERT_EQUAL(16,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+3,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12);
@@ -835,12 +835,12 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(7,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(i));
   CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(6));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)36,mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(36),mesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(254,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+36,0));
   CPPUNIT_ASSERT_EQUAL(141,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+8,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12);
@@ -874,7 +874,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),constMesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i));
@@ -882,7 +882,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(13));
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(14));
   CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(15));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)90,constMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(90),constMesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getConstPointer(),constMesh->getNodalConnectivity()->getConstPointer()+90,0));
   CPPUNIT_ASSERT_EQUAL(705,std::accumulate(constMesh->getNodalConnectivityIndex()->getConstPointer(),constMesh->getNodalConnectivityIndex()->getConstPointer()+17,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getConstPointer(),constMesh->getCoords()->getConstPointer()+57,0),1e-12);
@@ -903,7 +903,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),constMesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i));
@@ -911,7 +911,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(13));
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(14));
   CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(15));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)90,constMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(90),constMesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getConstPointer(),constMesh->getNodalConnectivity()->getConstPointer()+90,0));
   CPPUNIT_ASSERT_EQUAL(705,std::accumulate(constMesh->getNodalConnectivityIndex()->getConstPointer(),constMesh->getNodalConnectivityIndex()->getConstPointer()+17,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getConstPointer(),constMesh->getCoords()->getConstPointer()+57,0),1e-12);
@@ -957,7 +957,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),constMesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i));
@@ -965,7 +965,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(13));
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(14));
   CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(15));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)90,constMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(90),constMesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getConstPointer(),constMesh->getNodalConnectivity()->getConstPointer()+90,0));
   CPPUNIT_ASSERT_EQUAL(705,std::accumulate(constMesh->getNodalConnectivityIndex()->getConstPointer(),constMesh->getNodalConnectivityIndex()->getConstPointer()+17,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getConstPointer(),constMesh->getCoords()->getConstPointer()+57,0),1e-12);
@@ -985,7 +985,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),constMesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i));
@@ -993,7 +993,7 @@ void MEDLoaderTest::testMEDLoaderRead1()
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(13));
   CPPUNIT_ASSERT_EQUAL(NORM_HEXA8,constMesh->getTypeOfCell(14));
   CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(15));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)90,constMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(90),constMesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(701,std::accumulate(constMesh->getNodalConnectivity()->getConstPointer(),constMesh->getNodalConnectivity()->getConstPointer()+90,0));
   CPPUNIT_ASSERT_EQUAL(705,std::accumulate(constMesh->getNodalConnectivityIndex()->getConstPointer(),constMesh->getNodalConnectivityIndex()->getConstPointer()+17,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(46.,std::accumulate(constMesh->getCoords()->getConstPointer(),constMesh->getCoords()->getConstPointer()+57,0),1e-12);
@@ -1014,7 +1014,7 @@ void MEDLoaderTest::testMEDLoaderPolygonRead()
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(538,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(579,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(579),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
   for(int i=0;i<514;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(i));
@@ -1026,7 +1026,7 @@ void MEDLoaderTest::testMEDLoaderPolygonRead()
   std::transform(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+12,expectedVals1,diffValue1,std::minus<double>());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue1,diffValue1+12),1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue1,diffValue1+12),1e-12);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2768,mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2768),mesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(651050,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+2768,0));
   CPPUNIT_ASSERT_EQUAL(725943,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+539,0));
   mesh->decrRef();
@@ -1048,7 +1048,7 @@ void MEDLoaderTest::testMEDLoaderPolygonRead()
   CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,constMesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(538,(int)constMesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(579,constMesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(579),constMesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,(int)constMesh->getAllGeoTypes().size());
   for(int i=0;i<514;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,constMesh->getTypeOfCell(i));
@@ -1058,7 +1058,7 @@ void MEDLoaderTest::testMEDLoaderPolygonRead()
   std::transform(constMesh->getCoords()->getConstPointer(),constMesh->getCoords()->getConstPointer()+12,expectedVals1,diffValue1,std::minus<double>());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue1,diffValue1+12),1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::min_element(diffValue1,diffValue1+12),1e-12);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)2768,constMesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2768),constMesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(651050,std::accumulate(constMesh->getNodalConnectivity()->getConstPointer(),constMesh->getNodalConnectivity()->getConstPointer()+2768,0));
   CPPUNIT_ASSERT_EQUAL(725943,std::accumulate(constMesh->getNodalConnectivityIndex()->getConstPointer(),constMesh->getNodalConnectivityIndex()->getConstPointer()+539,0));
   const double *values=field->getArray()->getPointer();
@@ -1080,12 +1080,12 @@ void MEDLoaderTest::testMEDLoaderPolyhedronRead()
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
   CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0));
   CPPUNIT_ASSERT_EQUAL(NORM_POLYHED,mesh->getTypeOfCell(1));
   CPPUNIT_ASSERT_EQUAL(NORM_POLYHED,mesh->getTypeOfCell(2));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)98,mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(98),mesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(725,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+98,0));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(110.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12);
   CPPUNIT_ASSERT_EQUAL(155,std::accumulate(mesh->getNodalConnectivityIndex()->getPointer(),mesh->getNodalConnectivityIndex()->getPointer()+4,0));
@@ -1096,7 +1096,7 @@ void MEDLoaderTest::testMEDLoaderPolyhedronRead()
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(17,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllGeoTypes().size());
   CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(0));
   CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(1));
@@ -1116,7 +1116,7 @@ void MEDLoaderTest::testMEDLoaderPolyhedronRead()
   CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(15));
   CPPUNIT_ASSERT_EQUAL(NORM_TRI3,mesh->getTypeOfCell(16));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(110.,std::accumulate(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+57,0),1e-12);
-  CPPUNIT_ASSERT_EQUAL((std::size_t)83,mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(83),mesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(619,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+83,0));
   mesh->decrRef();
   //
@@ -1133,18 +1133,18 @@ void MEDLoaderTest::testMEDLoaderPolyhedronRead()
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(1,(int)mesh->getAllGeoTypes().size());
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(i));
-  CPPUNIT_ASSERT_EQUAL((std::size_t)19,mesh->getNodalConnectivity()->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNodalConnectivity()->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(117,std::accumulate(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+19,0));
   mesh->decrRef();
   //
   mesh=ReadUMeshFromFamilies(fileName.c_str(),meshNames[0].c_str(),0,families2);
   CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(0,(int)mesh->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(19),mesh->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
   CPPUNIT_ASSERT_EQUAL(0,(int)mesh->getAllGeoTypes().size());
   mesh->decrRef();
@@ -1153,7 +1153,7 @@ void MEDLoaderTest::testMEDLoaderPolyhedronRead()
 MEDCouplingUMesh *MEDLoaderTest::build1DMesh_1()
 {
   double coords[6]={ 0.0, 0.3, 0.75, 1.0, 1.4, 1.3 };
-  int conn[9]={ 0,1, 1,2, 2,3 , 3,4,5};
+  mcIdType conn[9]={ 0,1, 1,2, 2,3 , 3,4,5};
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setName("1DMesh_1");
   mesh->setMeshDimension(1);
@@ -1175,7 +1175,7 @@ MEDCouplingUMesh *MEDLoaderTest::build1DMesh_1()
 MEDCouplingUMesh *MEDLoaderTest::build2DCurveMesh_1()
 {
   double coords[12]={ 0.0,0.0, 0.3,0.3, 0.75,0.75, 1.0,1.0, 1.4,1.4, 1.3,1.3 };
-  int conn[9]={ 0,1, 1,2, 2,3 , 3,4,5};
+  mcIdType conn[9]={ 0,1, 1,2, 2,3 , 3,4,5};
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setName("2DCurveMesh_1");
   mesh->setMeshDimension(1);
@@ -1196,7 +1196,7 @@ MEDCouplingUMesh *MEDLoaderTest::build2DCurveMesh_1()
 MEDCouplingUMesh *MEDLoaderTest::build2DMesh_1()
 {
   double targetCoords[24]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7, -0.05,0.95, 0.2,1.2, 0.45,0.95 };
-  int targetConn[24]={1,4,2, 4,5,2, 6,10,8,9,11,7, 0,3,4,1, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[24]={1,4,2, 4,5,2, 6,10,8,9,11,7, 0,3,4,1, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(6);
@@ -1224,7 +1224,7 @@ MEDCouplingUMesh *MEDLoaderTest::build2DMesh_2()
     -0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7,
     -0.05,0.95, 0.2,1.2, 0.45,0.95
   };
-  int targetConn[24]={1,4,2, 4,5,2, 6,10,8,9,11,7, 0,3,4,1, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[24]={1,4,2, 4,5,2, 6,10,8,9,11,7, 0,3,4,1, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(5);
@@ -1251,7 +1251,7 @@ MEDCouplingUMesh *MEDLoaderTest::build3DSurfMesh_1()
     -0.3,-0.3,-0.3, 0.2,-0.3,-0.3, 0.7,-0.3,-0.3, -0.3,0.2,-0.3, 0.2,0.2,-0.3, 0.7,0.2,-0.3, -0.3,0.7,-0.3, 0.2,0.7,-0.3, 0.7,0.7,-0.3
     ,-0.05,0.95,-0.3, 0.2,1.2,-0.3, 0.45,0.95,-0.3
   };
-  int targetConn[24]={1,4,2, 4,5,2, 6,10,8,9,11,7, 0,3,4,1, 6,7,4,3, 7,8,5,4};
+  mcIdType targetConn[24]={1,4,2, 4,5,2, 6,10,8,9,11,7, 0,3,4,1, 6,7,4,3, 7,8,5,4};
   MEDCouplingUMesh *targetMesh=MEDCouplingUMesh::New();
   targetMesh->setMeshDimension(2);
   targetMesh->allocateCells(6);
@@ -1285,7 +1285,7 @@ MEDCouplingUMesh *MEDLoaderTest::build3DMesh_1()
     0.,0.,3., 1.,1.,3., 1.,1.25,3., 0.,1.,3., 1.,1.5,3., 2.,0.,3., 2.,1.,3., 1.,2.,3., 0.,2.,3., 3.,1.,3.,
     3.,2.,3., 0.,1.,3., 1.,3.,3., 2.,2.,3., 2.,3.,3.};
 
-  int conn[354]={
+  mcIdType conn[354]={
     // 0
     0,11,1,3,15,26,16,18,   1,2,4,7,13,6,-1,1,16,21,6,-1,6,21,28,13,-1,13,7,22,28,-1,7,4,19,22,-1,4,2,17,19,-1,2,1,16,17,-1,16,21,28,22,19,17,
     1,6,5,3,16,21,20,18,   13,10,9,6,28,25,24,21,
@@ -1345,11 +1345,11 @@ MEDCouplingUMesh *MEDLoaderTest::build3DMesh_1()
 MEDCouplingUMesh *MEDLoaderTest::build3DMesh_2()
 {
   MEDCouplingUMesh *m3dsurfBase=build3DSurfMesh_1();
-  int numbers[5]={0,1,2,3,5};
+  mcIdType numbers[5]={0,1,2,3,5};
   MEDCouplingUMesh *m3dsurf=(MEDCouplingUMesh *)m3dsurfBase->buildPartOfMySelf(numbers,numbers+5,false);
   m3dsurfBase->decrRef();
   MEDCouplingUMesh *m1dBase=build1DMesh_1();
-  int numbers2[4]={0,1,2,3};
+  mcIdType numbers2[4]={0,1,2,3};
   MEDCouplingUMesh *m1d=(MEDCouplingUMesh *)m1dBase->buildPartOfMySelf(numbers2,numbers2+4,false);
   m1dBase->decrRef();
   m1d->changeSpaceDimension(3);
@@ -1365,7 +1365,7 @@ MEDCouplingUMesh *MEDLoaderTest::build3DMesh_2()
 MEDCouplingFieldDouble *MEDLoaderTest::buildVecFieldOnCells_1()
 {
   MEDCouplingUMesh *mesh=build3DSurfMesh_1();
-  int nbOfCells=mesh->getNumberOfCells();
+  mcIdType nbOfCells=mesh->getNumberOfCells();
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   f1->setName("VectorFieldOnCells");
   f1->setMesh(mesh);
@@ -1388,7 +1388,7 @@ MEDCouplingFieldDouble *MEDLoaderTest::buildVecFieldOnCells_1()
 MEDCouplingFieldDouble *MEDLoaderTest::buildVecFieldOnNodes_1()
 {
   MEDCouplingUMesh *mesh=build3DSurfMesh_1();
-  int nbOfNodes=mesh->getNumberOfNodes();
+  mcIdType nbOfNodes=mesh->getNumberOfNodes();
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_NODES,ONE_TIME);
   f1->setName("VectorFieldOnNodes");
   f1->setMesh(mesh);
index 018317f95961600b34649bafaa7006fb83591de2..52ff60323104aaad2933d5a1e2dfb0485e944be9 100644 (file)
@@ -58,7 +58,7 @@ void SauvLoaderTest::testMed2SauvOnAMeshWithVoidFamily()
   const int spaceDim = 2;
   const int nbOfNodes = 6;
   double coords[nbOfNodes*spaceDim] = {0,0, 1,0, 1,1, 0,1, 2,0, 2,1};
-  int conn[8]={0,1,2,3, 1,4,5,2};
+  mcIdType conn[8]={0,1,2,3, 1,4,5,2};
   MCAuto<MEDCouplingUMesh> mesh2d=MEDCouplingUMesh::New("Mesh",spaceDim);
   mesh2d->allocateCells(2);
   mesh2d->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
@@ -75,14 +75,14 @@ void SauvLoaderTest::testMed2SauvOnAMeshWithVoidFamily()
 
   // Create families and groups
 
-  MCAuto<DataArrayInt> fam = DataArrayInt::New();
+  MCAuto<DataArrayIdType> fam = DataArrayIdType::New();
   fam->alloc(2,1);
-  int elemsFams[2] = {-2,-3};
+  mcIdType elemsFams[2] = {-2,-3};
   std::copy(elemsFams,elemsFams+2,fam->getPointer());
 
   m->setFamilyFieldArr(0,fam);
 
-  std::map<std::string,int> theFamilies;
+  std::map<std::string,mcIdType> theFamilies;
   theFamilies["FAM_-1"]=-1;
   theFamilies["FAM_-2"]=-2;
   theFamilies["FAM_-3"]=-3;
@@ -160,7 +160,7 @@ void SauvLoaderTest::testSauv2MedOnA3SubsField()
       -6.111413346910e-07,
       -6.111413346910e-07};
 
-  for (int i=0; i < field1d->getNumberOfTuples(); i++)
+  for (mcIdType i=0; i < field1d->getNumberOfTuples(); i++)
   {
     CPPUNIT_ASSERT_DOUBLES_EQUAL( values[i], field1d->getIJ(i, 0), 1e-12 );
   }
@@ -179,7 +179,7 @@ void SauvLoaderTest::testMed2Sauv()
   pointeM1D->setCoords( coords );
   pointeM1D->setMeshDimension( 2 );
   pointeM1D->allocateCells( 3 );
-  int conn[]=
+  mcIdType conn[]=
     {
       0,1,2, 0,1,3, 10,11,12,13
     };
@@ -205,8 +205,8 @@ void SauvLoaderTest::testMed2Sauv()
     };
   std::copy(vals,vals+d->getNbOfElems(),d->getPointer());
   f1->setArray(d);
-  MCAuto<DataArrayInt> da=DataArrayInt::New();
-  int ids[] =
+  MCAuto<DataArrayIdType> da=DataArrayIdType::New();
+  mcIdType ids[] =
     {
       0,2
     };
@@ -249,7 +249,7 @@ void SauvLoaderTest::testMed2Sauv()
   CPPUNIT_ASSERT( std::find(groups.begin(),groups.end(),"groupe4") != groups.end() );
   CPPUNIT_ASSERT( std::find(groups.begin(),groups.end(),"groupe5") != groups.end() );
   CPPUNIT_ASSERT( std::find(groups.begin(),groups.end(),"maa1") != groups.end() );
-  CPPUNIT_ASSERT_EQUAL(16,m->getSizeAtLevel(0));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(16),m->getSizeAtLevel(0));
   MCAuto<MEDCouplingMesh> um0 = m->getMeshAtLevel(0);
   CPPUNIT_ASSERT_EQUAL(12, (int)um0->getNumberOfCellsWithType( INTERP_KERNEL::NORM_TETRA4 ));
   CPPUNIT_ASSERT_EQUAL(2,  (int)um0->getNumberOfCellsWithType( INTERP_KERNEL::NORM_PYRA5 ));
@@ -328,10 +328,10 @@ void SauvLoaderTest::testCellsWithLingNames()
   // - Nombre de mailles de type MED_HEXA8 : 24
   // - Nombre de mailles de type MED_PENTA6 : 3
   MEDFileUMesh* m = static_cast<MEDFileUMesh*>( d2->getMeshes()->getMeshAtPos(0));
-  CPPUNIT_ASSERT_EQUAL(6,  m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_TRI3 ));
-  CPPUNIT_ASSERT_EQUAL(43, m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_QUAD4 ));
-  CPPUNIT_ASSERT_EQUAL(24, m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_HEXA8 ));
-  CPPUNIT_ASSERT_EQUAL(3,  m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_PENTA6 ));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(6),  m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_TRI3 ));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(43), m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_QUAD4 ));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(24), m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_HEXA8 ));
+  CPPUNIT_ASSERT_EQUAL(ToIdType(3),  m->getNumberOfCellsWithType( INTERP_KERNEL::NORM_PENTA6 ));
 }
 
 void SauvLoaderTest::tearDown()
@@ -350,7 +350,7 @@ void SauvLoaderTest::tearDown()
       if (access(fileToRemove[i], F_OK) == 0)
 #endif
 #if defined(WIN32) && defined(UNICODE)
-               _wremove(fileToRemove[i]);
+                _wremove(fileToRemove[i]);
 #else
         remove(fileToRemove[i]);
 #endif
index 9f27daa1677c256d7cf9482522be54371bb1141e..41eceb565516e91036d4578c07f3da97881ffcc7 100644 (file)
 
 ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${LIBXML2_DEFINITIONS})
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 INCLUDE_DIRECTORIES(
   ${LIBXML2_INCLUDE_DIR}
   ${MEDFILE_INCLUDE_DIRS}
index 7297e48b67c4ef1042e878c60c9f2dbd3842c96c..870fd4f0fbb56cfed794b42bbaa5c4e894375f27 100644 (file)
@@ -30,16 +30,16 @@ MEDPARTITIONER::ConnectZone::ConnectZone():
   ,_description("")
   ,_local_domain_number(0)
   ,_distant_domain_number(0)
-  ,_node_corresp(0)
-  ,_face_corresp(0)
   ,_local_mesh(0)
   ,_distant_mesh(0)
+  ,_node_corresp(0)
+  ,_face_corresp(0)
 {
 }
 
 MEDPARTITIONER::ConnectZone::~ConnectZone()
 {
-  for(std::map < std::pair <int, int>,MEDCouplingSkyLineArray * >::iterator iter=_entity_corresp.begin(); iter!=_entity_corresp.end();iter++)
+  for(std::map < std::pair <mcIdType, mcIdType>,MEDCouplingSkyLineArray * >::iterator iter=_entity_corresp.begin(); iter!=_entity_corresp.end();iter++)
     {
       iter->second->decrRef();
     }
@@ -50,11 +50,11 @@ MEDPARTITIONER::ConnectZone::ConnectZone(const ConnectZone & myConnectZone):
   ,_description(myConnectZone._description)
   ,_local_domain_number(myConnectZone._local_domain_number)
   ,_distant_domain_number(myConnectZone._distant_domain_number)
+  ,_local_mesh(0)
+  ,_distant_mesh(0)
   ,_node_corresp(myConnectZone._node_corresp)
   ,_face_corresp(myConnectZone._face_corresp)
   ,_entity_corresp(myConnectZone._entity_corresp)
-  ,_local_mesh(0)
-  ,_distant_mesh(0)
 {
 }
 
@@ -88,9 +88,9 @@ MEDCouplingUMesh *MEDPARTITIONER::ConnectZone::getDistantMesh() const
   return _distant_mesh;
 }
 
-bool MEDPARTITIONER::ConnectZone::isEntityCorrespPresent(int localEntity, int distantEntity) const
+bool MEDPARTITIONER::ConnectZone::isEntityCorrespPresent(mcIdType localEntity, mcIdType distantEntity) const
 {
-  typedef std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
+  typedef std::map<std::pair<mcIdType,mcIdType>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
   for(map_iter iter=_entity_corresp.begin(); iter != _entity_corresp.end(); iter++)
     {
       if ((iter->first).first==localEntity && (iter->first).second==distantEntity)
@@ -99,17 +99,17 @@ bool MEDPARTITIONER::ConnectZone::isEntityCorrespPresent(int localEntity, int di
   return false;
 }
 
-const int *MEDPARTITIONER::ConnectZone::getNodeCorrespIndex() const
+const mcIdType *MEDPARTITIONER::ConnectZone::getNodeCorrespIndex() const
 {
   return _node_corresp->getIndex();
 }
 
-const int *MEDPARTITIONER::ConnectZone::getNodeCorrespValue() const
+const mcIdType *MEDPARTITIONER::ConnectZone::getNodeCorrespValue() const
 {
   return _node_corresp->getValues();
 }
 
-int MEDPARTITIONER::ConnectZone::getNodeNumber() const
+mcIdType MEDPARTITIONER::ConnectZone::getNodeNumber() const
 {
   return _node_corresp->getNumberOf();
 }
@@ -119,17 +119,17 @@ const MEDCouplingSkyLineArray * MEDPARTITIONER::ConnectZone::getNodeCorresp() co
   return (const MEDCouplingSkyLineArray *)_node_corresp;
 }
 
-const int *MEDPARTITIONER::ConnectZone::getFaceCorrespIndex() const
+const mcIdType *MEDPARTITIONER::ConnectZone::getFaceCorrespIndex() const
 {
   return _face_corresp->getIndex();
 }
 
-const int *MEDPARTITIONER::ConnectZone::getFaceCorrespValue() const
+const mcIdType *MEDPARTITIONER::ConnectZone::getFaceCorrespValue() const
 {
   return _face_corresp->getValues();
 }
 
-int MEDPARTITIONER::ConnectZone::getFaceNumber() const
+mcIdType MEDPARTITIONER::ConnectZone::getFaceNumber() const
 {
   return _face_corresp->getNumberOf();
 }
@@ -139,10 +139,10 @@ const MEDCouplingSkyLineArray * MEDPARTITIONER::ConnectZone::getFaceCorresp() co
   return _face_corresp;
 }
 
-const int *MEDPARTITIONER::ConnectZone::getEntityCorrespIndex(int localEntity,
-                                                              int distantEntity) const
+const mcIdType *MEDPARTITIONER::ConnectZone::getEntityCorrespIndex(mcIdType localEntity,
+                                                                   mcIdType distantEntity) const
 {
-  typedef std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
+  typedef std::map<std::pair<mcIdType,mcIdType>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
 
   for(map_iter iter=_entity_corresp.begin();iter!=_entity_corresp.end();iter++)
   {
@@ -152,10 +152,10 @@ const int *MEDPARTITIONER::ConnectZone::getEntityCorrespIndex(int localEntity,
   return 0;
 }
 
-const int *MEDPARTITIONER::ConnectZone::getEntityCorrespValue(int localEntity,
-                                                              int distantEntity) const
+const mcIdType *MEDPARTITIONER::ConnectZone::getEntityCorrespValue(mcIdType localEntity,
+                                                                   mcIdType distantEntity) const
 {
-  typedef std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
+  typedef std::map<std::pair<mcIdType,mcIdType>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
 
   for (map_iter iter=_entity_corresp.begin();iter!=_entity_corresp.end();iter++)
   {
@@ -165,10 +165,10 @@ const int *MEDPARTITIONER::ConnectZone::getEntityCorrespValue(int localEntity,
   return 0;
 }
 
-int MEDPARTITIONER::ConnectZone::getEntityCorrespNumber(int localEntity,
-                                                        int distantEntity) const
+mcIdType MEDPARTITIONER::ConnectZone::getEntityCorrespNumber(mcIdType localEntity,
+                                                             mcIdType distantEntity) const
 {
-  typedef std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
+  typedef std::map<std::pair<mcIdType,mcIdType>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
 
   for(map_iter iter=_entity_corresp.begin();iter!=_entity_corresp.end();iter++)
   {
@@ -178,10 +178,10 @@ int MEDPARTITIONER::ConnectZone::getEntityCorrespNumber(int localEntity,
   return 0;
 }
 
-int MEDPARTITIONER::ConnectZone::getEntityCorrespLength(int localEntity,
-                                                        int distantEntity) const
+mcIdType MEDPARTITIONER::ConnectZone::getEntityCorrespLength(mcIdType localEntity,
+                                                        mcIdType distantEntity) const
 {
-  typedef std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
+  typedef std::map<std::pair<mcIdType,mcIdType>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
 
   for (map_iter iter=_entity_corresp.begin(); iter != _entity_corresp.end(); iter++)
   {
@@ -192,9 +192,9 @@ int MEDPARTITIONER::ConnectZone::getEntityCorrespLength(int localEntity,
 }
 
 const MEDCouplingSkyLineArray *
-MEDPARTITIONER::ConnectZone::getEntityCorresp(int localEntity, int distantEntity) const
+MEDPARTITIONER::ConnectZone::getEntityCorresp(mcIdType localEntity, mcIdType distantEntity) const
 {
-  typedef std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
+  typedef std::map<std::pair<mcIdType,mcIdType>, MEDCouplingSkyLineArray*>::const_iterator map_iter;
 
   for (map_iter iter=_entity_corresp.begin(); iter != _entity_corresp.end(); iter++)
   {
@@ -204,11 +204,11 @@ MEDPARTITIONER::ConnectZone::getEntityCorresp(int localEntity, int distantEntity
   return 0;
 }
 
-std::vector< std::pair< int,int > > MEDPARTITIONER::ConnectZone::getEntities() const
+std::vector< std::pair< mcIdType,mcIdType > > MEDPARTITIONER::ConnectZone::getEntities() const
 {
-  std::vector< std::pair< int,int > > types;
+  std::vector< std::pair< mcIdType,mcIdType > > types;
 
-  std::map<std::pair<int,int>, MEDCouplingSkyLineArray*>::const_iterator
+  std::map<std::pair<mcIdType,mcIdType>, MEDCouplingSkyLineArray*>::const_iterator
     iter = _entity_corresp.begin();
   for ( ; iter != _entity_corresp.end(); iter++)
     {
@@ -252,15 +252,15 @@ void MEDPARTITIONER::ConnectZone::setDistantMesh(MEDCouplingUMesh * distantMesh)
  * the node-node connections
  * to a MEDCouplingSkyLineArray
  */
-void MEDPARTITIONER::ConnectZone::setNodeCorresp(const int * nodeCorresp, int nbnode)
+void MEDPARTITIONER::ConnectZone::setNodeCorresp(const mcIdType * nodeCorresp, mcIdType nbnode)
 {
-  MCAuto<DataArrayInt> indexArr( DataArrayInt::New() );
-  MCAuto<DataArrayInt> valueArr( DataArrayInt::New() );
+  MCAuto<DataArrayIdType> indexArr( DataArrayIdType::New() );
+  MCAuto<DataArrayIdType> valueArr( DataArrayIdType::New() );
   indexArr->alloc( nbnode+1 );
   valueArr->alloc( 2*nbnode );
-  int * index = indexArr->getPointer();
-  int * value = valueArr->getPointer();
-  for (int i=0; i<nbnode; i++)
+  mcIdType * index = indexArr->getPointer();
+  mcIdType * value = valueArr->getPointer();
+  for (mcIdType i=0; i<nbnode; i++)
     {
       index[i]=2*i;
       value[2*i  ]=nodeCorresp[2*i];
@@ -280,15 +280,15 @@ void MEDPARTITIONER::ConnectZone::setNodeCorresp(MEDCouplingSkyLineArray* array)
  * the face-face connections
  * to a MEDCouplingSkyLineArray
  */
-void MEDPARTITIONER::ConnectZone::setFaceCorresp(const int * faceCorresp, int nbface)
+void MEDPARTITIONER::ConnectZone::setFaceCorresp(const mcIdType * faceCorresp, mcIdType nbface)
 {
-  MCAuto<DataArrayInt> indexArr( DataArrayInt::New() );
-  MCAuto<DataArrayInt> valueArr( DataArrayInt::New() );
+  MCAuto<DataArrayIdType> indexArr( DataArrayIdType::New() );
+  MCAuto<DataArrayIdType> valueArr( DataArrayIdType::New() );
   indexArr->alloc( nbface+1 );
   valueArr->alloc( 2*nbface );
-  int * index = indexArr->getPointer();
-  int * value = valueArr->getPointer();
-  for (int i=0; i<nbface; i++)
+  mcIdType * index = indexArr->getPointer();
+  mcIdType * value = valueArr->getPointer();
+  for (mcIdType i=0; i<nbface; i++)
     {
       index[i]=2*i;
       value[2*i]=faceCorresp[2*i];
@@ -310,16 +310,16 @@ void MEDPARTITIONER::ConnectZone::setFaceCorresp(MEDCouplingSkyLineArray* array)
  * 
  * the resulting MEDCouplingSkyLineArray is put in the map
  */
-void MEDPARTITIONER::ConnectZone::setEntityCorresp(int localEntity, int distantEntity,
-                                                   const int *entityCorresp, int nbentity)
+void MEDPARTITIONER::ConnectZone::setEntityCorresp(mcIdType localEntity, mcIdType distantEntity,
+                                                   const mcIdType *entityCorresp, mcIdType nbentity)
 { 
-  MCAuto<DataArrayInt> indexArr( DataArrayInt::New() );
-  MCAuto<DataArrayInt> valueArr( DataArrayInt::New() );
+  MCAuto<DataArrayIdType> indexArr( DataArrayIdType::New() );
+  MCAuto<DataArrayIdType> valueArr( DataArrayIdType::New() );
   indexArr->alloc( nbentity+1 );
   valueArr->alloc( 2*nbentity );
-  int * index = indexArr->getPointer();
-  int * value = valueArr->getPointer();
-  for (int i=0; i<nbentity; i++)
+  mcIdType * index = indexArr->getPointer();
+  mcIdType * value = valueArr->getPointer();
+  for (mcIdType i=0; i<nbentity; i++)
     {
       index[i]=2*i;
       value[2*i  ]=entityCorresp[2*i];
@@ -329,11 +329,11 @@ void MEDPARTITIONER::ConnectZone::setEntityCorresp(int localEntity, int distantE
   setEntityCorresp( localEntity, distantEntity, MEDCouplingSkyLineArray::New(indexArr,valueArr));
 }
 
-void MEDPARTITIONER::ConnectZone::setEntityCorresp(int localEntity, int distantEntity,
+void MEDPARTITIONER::ConnectZone::setEntityCorresp(mcIdType localEntity, mcIdType distantEntity,
                                                    MEDCouplingSkyLineArray *array)
 {
   MEDCouplingSkyLineArray * nullArray = 0;
-  std::map < std::pair <int,int>, MEDCouplingSkyLineArray * >::iterator it;
+  std::map < std::pair <mcIdType,mcIdType>, MEDCouplingSkyLineArray * >::iterator it;
   it = _entity_corresp.insert
     ( std::make_pair( std::make_pair(localEntity,distantEntity), nullArray )).first;
   if ( it->second != nullArray ) it->second->decrRef();
index ea4ffd3fb954d5c6638a1e06fa64c75953398327..6cf3eff68b03735dce1c8bd3def4e285da7a32b2 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "MEDPARTITIONER.hxx"
 #include "MCAuto.hxx"
+#include "MCType.hxx"
 
 namespace MEDCoupling
 {
@@ -51,26 +52,26 @@ namespace MEDPARTITIONER
     MEDCouplingUMesh *getLocalMesh() const ;
     MEDCouplingUMesh *getDistantMesh() const ;
 
-    bool isEntityCorrespPresent(int localEntity,int distantEntity) const;
-    const int *getNodeCorrespIndex() const;
-    const int *getNodeCorrespValue() const;
-    int getNodeNumber() const;
+    bool isEntityCorrespPresent(mcIdType localEntity,mcIdType distantEntity) const;
+    const mcIdType *getNodeCorrespIndex() const;
+    const mcIdType *getNodeCorrespValue() const;
+    mcIdType getNodeNumber() const;
     const MEDCouplingSkyLineArray * getNodeCorresp() const;
-    const int *getFaceCorrespIndex() const;
-    const int *getFaceCorrespValue() const;
-    int getFaceNumber() const;
+    const mcIdType *getFaceCorrespIndex() const;
+    const mcIdType *getFaceCorrespValue() const;
+    mcIdType getFaceNumber() const;
     const MEDCouplingSkyLineArray * getFaceCorresp() const;
-    const int *getEntityCorrespIndex(int localEntity,
-                                     int distantEntity) const;
-    const int *getEntityCorrespValue(int localEntity,
-                                     int distantEntity) const;
-    int getEntityCorrespNumber(int localEntity,
-                               int distantEntity) const;
-    int getEntityCorrespLength(int localEntity,
-                               int distantEntity) const;
-    const MEDCouplingSkyLineArray * getEntityCorresp(int localEntity,
-                                                                 int distantEntity) const;
-    std::vector< std::pair< int,int > > getEntities() const;
+    const mcIdType *getEntityCorrespIndex(mcIdType localEntity,
+                                          mcIdType distantEntity) const;
+    const mcIdType *getEntityCorrespValue(mcIdType localEntity,
+                                          mcIdType distantEntity) const;
+    mcIdType getEntityCorrespNumber(mcIdType localEntity,
+                                    mcIdType distantEntity) const;
+    mcIdType getEntityCorrespLength(mcIdType localEntity,
+                                    mcIdType distantEntity) const;
+    const MEDCouplingSkyLineArray * getEntityCorresp(mcIdType localEntity,
+                                                     mcIdType distantEntity) const;
+    std::vector< std::pair< mcIdType,mcIdType > > getEntities() const;
 
     void setName(const std::string& name) ;
     void setDescription(const std::string& description) ;
@@ -79,13 +80,13 @@ namespace MEDPARTITIONER
     void setLocalMesh(MEDCouplingUMesh * localMesh) ;
     void setDistantMesh(MEDCouplingUMesh * distantMesh) ;
 
-    void setNodeCorresp(const int * nodeCorresp, int nbnode);
+    void setNodeCorresp(const mcIdType * nodeCorresp, mcIdType nbnode);
     void setNodeCorresp(MEDCouplingSkyLineArray* array);
-    void setFaceCorresp(const int * faceCorresp, int nbface);
+    void setFaceCorresp(const mcIdType * faceCorresp, mcIdType nbface);
     void setFaceCorresp(MEDCouplingSkyLineArray* array);
-    void setEntityCorresp(int localEntity, int distantEntity,
-                          const int * entityCorresp, int nbentity);
-    void setEntityCorresp(int localEntity, int distantEntity,
+    void setEntityCorresp(mcIdType localEntity, mcIdType distantEntity,
+                          const mcIdType * entityCorresp, mcIdType nbentity);
+    void setEntityCorresp(mcIdType localEntity, mcIdType distantEntity,
                           MEDCouplingSkyLineArray *array);
   private :
     std::string _name;
@@ -99,7 +100,7 @@ namespace MEDPARTITIONER
     MCAuto<MEDCouplingSkyLineArray> _node_corresp;
     MCAuto<MEDCouplingSkyLineArray> _face_corresp;
   
-    std::map < std::pair <int,int>, MEDCouplingSkyLineArray * > _entity_corresp;
+    std::map < std::pair <mcIdType,mcIdType>, MEDCouplingSkyLineArray * > _entity_corresp;
   };
 }
 # endif
index 51e7ee7af5bc3ba7407d5862eedc53de08c71daf..17df2fc01d8ef31d709b0f7cbfbd1d76dbf9e71c 100644 (file)
@@ -43,22 +43,22 @@ namespace MEDPARTITIONER
 
   int Graph::nbDomains() const
   {
-    std::set<int> domains;
+    std::set<mcIdType> domains;
     if ( _partition.isNotNull() )
-      if ( MEDCoupling::DataArrayInt* array = _partition->getValuesArray() )
+      if ( MEDCoupling::DataArrayIdType* array = _partition->getValuesArray() )
       {
-        for ( const int * dom = array->begin(); dom != array->end(); ++dom )
+        for ( const mcIdType * dom = array->begin(); dom != array->end(); ++dom )
           domains.insert( *dom );
       }
-    return domains.size();
+    return (int)domains.size();
   }
 
-  const int *Graph::getPart() const
+  const mcIdType *Graph::getPart() const
   {
     return _partition->getValues();
   }
 
-  int Graph::nbVertices() const
+  mcIdType Graph::nbVertices() const
   {
     return _graph->getNumberOf();
   }
index 605718bd988095cbf7057f6763ff0cf3e77dc6b3..c860416e62b4801e8c5d7d998a52e41223402710 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "MEDPARTITIONER.hxx"
 #include "MCAuto.hxx"
+#include "MCType.hxx"
 
 #include <string>
 
@@ -52,14 +53,14 @@ namespace MEDPARTITIONER
     virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0) = 0;
     
     //returns the partitioning
-    const int *getPart() const;
+    const mcIdType *getPart() const;
     
     //returns the number of graph vertices (which can correspond to the cells in the mesh!)
-    int nbVertices() const;
+    mcIdType nbVertices() const;
 
     // returns nb of domains in _partition
     int nbDomains() const;
-    
+
     const MEDCouplingSkyLineArray *getGraph() const { return (const MEDCouplingSkyLineArray*)_graph; }
     const MEDCouplingSkyLineArray *getPartition() const { return (const MEDCouplingSkyLineArray*)_partition; }
 
index 9e02fd968a976344ff9c3449591addd184472d39..36aa24052dd54c706e69acfd711520c3ef138278 100644 (file)
@@ -50,9 +50,9 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
   int nbproc=_domain_selector->nbProcs();
   std::vector<BBTreeOfDim* > bbtree(nbdomain,(BBTreeOfDim*) 0);
   std::vector<double* > bbxi(nbdomain,(double*) 0);
-  std::vector<MEDCoupling::DataArrayInt*> rev(nbdomain,(MEDCoupling::DataArrayInt*) 0);
-  std::vector<MEDCoupling::DataArrayInt*> revIndx(nbdomain,(MEDCoupling::DataArrayInt*) 0);
-  int meshDim=-1;
+  std::vector<MEDCoupling::DataArrayIdType*> rev(nbdomain,(MEDCoupling::DataArrayIdType*) 0);
+  std::vector<MEDCoupling::DataArrayIdType*> revIndx(nbdomain,(MEDCoupling::DataArrayIdType*) 0);
+  //int meshDim=-1;
   int spaceDim=-1;
 
   //init rev and revIndx and bbtree for my domain (of me:proc n)
@@ -61,10 +61,10 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
       if(!_domain_selector->isMyDomain(mydomain))
         continue;
       const MEDCoupling::MEDCouplingUMesh* myMesh=_mesh_collection.getMesh(mydomain);
-      meshDim = myMesh->getMeshDimension();
+      //meshDim = myMesh->getMeshDimension();
       spaceDim= myMesh->getSpaceDimension();
-      rev[mydomain] = MEDCoupling::DataArrayInt::New();
-      revIndx[mydomain] = MEDCoupling::DataArrayInt::New();
+      rev[mydomain] = MEDCoupling::DataArrayIdType::New();
+      revIndx[mydomain] = MEDCoupling::DataArrayIdType::New();
       myMesh->getReverseNodalConnectivity(rev[mydomain],revIndx[mydomain]);
       double* bbx=new double[2*spaceDim*myMesh->getNumberOfNodes()];
       for (int i=0; i<myMesh->getNumberOfNodes()*spaceDim; i++)
@@ -97,7 +97,7 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
               SendDoubleVec(vec,targetProc);
 
               //retrieving target data for storage in commonDistantNodes array
-              std::vector<int> localCorrespondency;
+              std::vector<mcIdType> localCorrespondency;
               RecvIntVec(localCorrespondency, targetProc);
               for (std::size_t i=0; i<localCorrespondency.size()/2; i++)
                 {
@@ -112,8 +112,8 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
               int sourceProc = isource%nbproc;
               std::vector<double> recvVec;
               RecvDoubleVec(recvVec,sourceProc);
-              std::map<int,int> commonNodes; // (local nodes, distant nodes) list
-              for (int inode=0; inode<(recvVec.size()/spaceDim); inode++)
+              std::map<mcIdType,mcIdType> commonNodes; // (local nodes, distant nodes) list
+              for (mcIdType inode=0; inode<ToIdType(recvVec.size()/spaceDim); inode++)
                 {
                   double* bbox=new double[2*spaceDim];
                   for (int i=0; i<spaceDim; i++)
@@ -121,7 +121,7 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
                       bbox[2*i]=recvVec[inode*spaceDim+i]-1e-12;
                       bbox[2*i+1]=bbox[2*i]+2e-12;
                     }
-                  std::vector<int> inodes;
+                  std::vector<mcIdType> inodes;
                   bbtree[itarget]->getIntersectingElems(bbox,inodes);
                   delete [] bbox;
       
@@ -131,16 +131,16 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
                     }
           
                 }
-              std::vector<int> nodeCellCorrespondency;
-              for (std::map<int,int>::iterator iter=commonNodes.begin(); iter!=commonNodes.end(); iter++)
+              std::vector<mcIdType> nodeCellCorrespondency;
+              for (std::map<mcIdType,mcIdType>::iterator iter=commonNodes.begin(); iter!=commonNodes.end(); iter++)
                 {
                   _node_node[itarget][isource].push_back(std::make_pair(iter->first, iter->second));//storing node pairs in a vector
-                  const int* revIndxPtr=revIndx[itarget]->getConstPointer();
-                  const int* revPtr=rev[itarget]->getConstPointer();
-                  for (int icell=revIndxPtr[iter->first]; icell<revIndxPtr[iter->first+1]; icell++)
+                  const mcIdType* revIndxPtr=revIndx[itarget]->getConstPointer();
+                  const mcIdType* revPtr=rev[itarget]->getConstPointer();
+                  for (mcIdType icell=revIndxPtr[iter->first]; icell<revIndxPtr[iter->first+1]; icell++)
                     {
                       nodeCellCorrespondency.push_back(iter->second); //
-                      int globalCell=_topology->convertCellToGlobal(itarget,revPtr[icell]);
+                      mcIdType globalCell=_topology->convertCellToGlobal(itarget,revPtr[icell]);
                       nodeCellCorrespondency.push_back(globalCell);
                     }
                 }
@@ -166,12 +166,12 @@ void MEDPARTITIONER::JointFinder::findCommonDistantNodes()
     std::cout << "proc " << _domain_selector->rank() << " : end JointFinder::findCommonDistantNodes" << std::endl;
 }
 
-std::vector<std::vector<std::multimap<int,int> > >& MEDPARTITIONER::JointFinder::getDistantNodeCell()
+std::vector<std::vector<std::multimap<mcIdType,mcIdType> > >& MEDPARTITIONER::JointFinder::getDistantNodeCell()
 {
   return _distant_node_cell;
 }
 
-std::vector<std::vector<std::vector<std::pair<int,int> > > >& MEDPARTITIONER::JointFinder::getNodeNode()
+std::vector<std::vector<std::vector<std::pair<mcIdType,mcIdType> > > >& MEDPARTITIONER::JointFinder::getNodeNode()
 {
   return _node_node;
 }
@@ -200,7 +200,7 @@ void MEDPARTITIONER::JointFinder::print()
     {
       for (int itarget=0; itarget<nbdomain; itarget++)
         {
-          std::multimap<int,int>::iterator it;
+          std::multimap<mcIdType,mcIdType>::iterator it;
           for (it=_distant_node_cell[isource][itarget].begin() ; it!=_distant_node_cell[isource][itarget].end(); it++)
             {
               std::cout << " nc" << _domain_selector->rank() << "|" << itarget << "|" << isource << "|" << (*it).first << "=" << (*it).second;
index a83d3449ac5309399433059662e59d897978451a..ed51e926c42c69ddee982a2d6c17b7047af5c631 100644 (file)
@@ -21,6 +21,7 @@
 #define __MEDPARTITIONER_JOINTFINDER_HXX__
 
 #include "MEDPARTITIONER.hxx"
+#include "MCType.hxx"
 
 #include <map>
 #include <vector>
@@ -38,14 +39,14 @@ namespace MEDPARTITIONER
     ~JointFinder();
     void findCommonDistantNodes();
     void print();
-    std::vector<std::vector<std::multimap<int,int> > >& getDistantNodeCell();
-    std::vector<std::vector<std::vector<std::pair<int,int> > > >& getNodeNode();
+    std::vector<std::vector<std::multimap<mcIdType,mcIdType> > >& getDistantNodeCell();
+    std::vector<std::vector<std::vector<std::pair<mcIdType,mcIdType> > > >& getNodeNode();
   private:
     const MeshCollection& _mesh_collection;
     const ParaDomainSelector *_domain_selector;
     const Topology *_topology;
-    std::vector<std::vector<std::multimap<int,int> > > _distant_node_cell;
-    std::vector<std::vector<std::vector<std::pair<int,int> > > > _node_node;
+    std::vector<std::vector<std::multimap<mcIdType,mcIdType> > > _distant_node_cell;
+    std::vector<std::vector<std::vector<std::pair<mcIdType,mcIdType> > > > _node_node;
    
   };
 }
index 130ffc701b1ea3f7cbc6a9b44bf64e4c21cd861b..bbaba7b05bf3c85aacc7ecbf5916788e72774726 100644 (file)
@@ -105,8 +105,8 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
     _create_empty_groups(create_empty_groups),
     _joint_finder(0)
 {
-  std::vector<std::vector<std::vector<int> > > new2oldIds(initialCollection.getTopology()->nbDomain());
-  std::vector<MEDCoupling::DataArrayInt*> o2nRenumber;
+  std::vector<std::vector<std::vector<mcIdType> > > new2oldIds(initialCollection.getTopology()->nbDomain());
+  std::vector<MEDCoupling::DataArrayIdType*> o2nRenumber;
 
   castCellMeshes(initialCollection, new2oldIds, o2nRenumber );
 
@@ -127,7 +127,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
   //nodeMapping contains the mapping between old nodes and new nodes
   // (iolddomain,ioldnode)->(inewdomain,inewnode)
   createNodeMapping(initialCollection, nodeMapping);
-  std::vector<std::vector<std::vector<int> > > new2oldFaceIds;
+  std::vector<std::vector<std::vector<mcIdType> > > new2oldFaceIds;
   castFaceMeshes(initialCollection, nodeMapping, new2oldFaceIds);
 
   ////////////////////
@@ -175,7 +175,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
   castAllFields(initialCollection,"cellFieldDouble");
   if (_i_non_empty_mesh<0)
     {
-      for (size_t i=0; i<_mesh.size(); i++)
+      for (int i=0; i<getNbOfGlobalMeshes(); i++)
         {
           if (_mesh[i])
             {
@@ -205,8 +205,8 @@ MEDPARTITIONER::MeshCollection::MeshCollection(MeshCollection& initialCollection
 */
 
 void MEDPARTITIONER::MeshCollection::castCellMeshes(MeshCollection& initialCollection,
-                                                    std::vector<std::vector<std::vector<int> > >& new2oldIds,
-                                                    std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber)
+                                                    std::vector<std::vector<std::vector<mcIdType> > >& new2oldIds,
+                                                    std::vector<MEDCoupling::DataArrayIdType*> & o2nRenumber)
 {
   if (MyGlobals::_Verbose>10)
     std::cout << "proc " << MyGlobals::_Rank << " : castCellMeshes" << std::endl;
@@ -231,10 +231,10 @@ void MEDPARTITIONER::MeshCollection::castCellMeshes(MeshCollection& initialColle
     {
       if (!isParallelMode() || initialCollection._domain_selector->isMyDomain(iold))
         {
-          int size=(initialCollection._mesh)[iold]->getNumberOfCells();
-          std::vector<int> globalids(size);
+          mcIdType size=(initialCollection._mesh)[iold]->getNumberOfCells();
+          std::vector<mcIdType> globalids(size);
           initialCollection.getTopology()->getCellList(iold, &globalids[0]);
-          std::vector<int> ilocalnew(size); //local
+          std::vector<mcIdType> ilocalnew(size); //local
           std::vector<int> ipnew(size);     //idomain old
           _topology->convertGlobalCellList(&globalids[0],size,&ilocalnew[0],&ipnew[0]);
       
@@ -299,10 +299,10 @@ void MEDPARTITIONER::MeshCollection::castCellMeshes(MeshCollection& initialColle
               _mesh[inew]=MEDCoupling::MEDCouplingUMesh::MergeUMeshes(meshes);
               o2nRenumber[inew]=_mesh[inew]->sortCellsInMEDFileFrmt();
               bool areNodesMerged;
-              int nbNodesMerged;
+              mcIdType nbNodesMerged;
               if (meshes.size()>1)
                 {
-                  MEDCoupling::DataArrayInt* array=_mesh[inew]->mergeNodes(1e-12,areNodesMerged,nbNodesMerged);
+                  MEDCoupling::DataArrayIdType* array=_mesh[inew]->mergeNodes(1e-12,areNodesMerged,nbNodesMerged);
                   array->decrRef(); // array is not used in this case
                 }
               _mesh[inew]->zipCoords();
@@ -336,8 +336,8 @@ void MEDPARTITIONER::MeshCollection::createNodeMapping( MeshCollection& initialC
           //      std::map<pair<double,pair<double, double> >, int > nodeClassifier;
           MEDCoupling::DataArrayDouble* coords = initialCollection.getMesh(iold)->getCoords();
           double* coordsPtr=coords->getPointer();
-          dim = coords->getNumberOfComponents();
-          int nvertices=initialCollection.getMesh(iold)->getNumberOfNodes();
+          dim = (int)coords->getNumberOfComponents();
+          mcIdType nvertices=initialCollection.getMesh(iold)->getNumberOfNodes();
           bbox=new double[nvertices*2*dim];
 
           for (int i=0; i<nvertices*dim;i++)
@@ -362,7 +362,7 @@ void MEDPARTITIONER::MeshCollection::createNodeMapping( MeshCollection& initialC
               for (int inode=0; inode<mesh->getNumberOfNodes();inode++)
                 {
                   double* coordsPtr=coords->getPointer()+inode*dim;
-                  vector<int> elems;
+                  vector<mcIdType> elems;
                   tree->getElementsAroundPoint(coordsPtr,elems);
                   if (elems.size()==0) continue;
                   nodeMapping.insert(make_pair(make_pair(iold,elems[0]),make_pair(inew,inode)));
@@ -378,7 +378,7 @@ void MEDPARTITIONER::MeshCollection::createNodeMapping( MeshCollection& initialC
                 for (int inode=0; inode<_mesh[inew]->getNumberOfNodes();inode++)
                   {
                     double* coordsPtr=coords->getPointer()+inode*dim;
-                    vector<int> elems;
+                    vector<mcIdType> elems;
                     tree->getElementsAroundPoint(coordsPtr,elems);
                     if (elems.size()==0) continue;
                     nodeMapping.insert(make_pair(make_pair(iold,elems[0]),make_pair(inew,inode)));
@@ -394,16 +394,16 @@ void MEDPARTITIONER::MeshCollection::createNodeMapping( MeshCollection& initialC
 
 }
 
-void getNodeIds(MEDCoupling::MEDCouplingUMesh& meshOne, MEDCoupling::MEDCouplingUMesh& meshTwo, std::vector<int>& nodeIds)
+void getNodeIds(MEDCoupling::MEDCouplingUMesh& meshOne, MEDCoupling::MEDCouplingUMesh& meshTwo, std::vector<mcIdType>& nodeIds)
 {
   using std::vector;
   using MEDPARTITIONER::BBTreeOfDim;
   //if (!&meshOne || !&meshTwo) return;  //empty or not existing
   double* bbox;
   BBTreeOfDim* tree = 0;
-  int nv1=meshOne.getNumberOfNodes();
+  mcIdType nv1=meshOne.getNumberOfNodes();
   MEDCoupling::DataArrayDouble* coords=meshOne.getCoords();
-  int dim = coords->getNumberOfComponents();
+  int dim = (int)coords->getNumberOfComponents();
 
   bbox=new double[nv1*2*dim];
   double* coordsPtr=coords->getPointer();
@@ -414,13 +414,13 @@ void getNodeIds(MEDCoupling::MEDCouplingUMesh& meshOne, MEDCoupling::MEDCoupling
     }
   tree=new BBTreeOfDim( dim, bbox,0,0,nv1,1e-9);
 
-  int nv2=meshTwo.getNumberOfNodes();
+  mcIdType nv2=meshTwo.getNumberOfNodes();
   nodeIds.resize(nv2,-1);
   coords=meshTwo.getCoords();
   for (int inode=0; inode<nv2; inode++)
     {
       double* coordsPtr2=coords->getPointer()+inode*dim;
-      vector<int> elems;
+      vector<mcIdType> elems;
       tree->getElementsAroundPoint(coordsPtr2,elems);
       if (elems.size()==0) continue;
       nodeIds[inode]=elems[0];
@@ -434,8 +434,8 @@ void getNodeIds(MEDCoupling::MEDCouplingUMesh& meshOne, MEDCoupling::MEDCoupling
   faces at the interface are duplicated
 */
 void MEDPARTITIONER::MeshCollection::castFaceMeshes(MeshCollection& initialCollection,
-                                                    const std::multimap<std::pair<int,int>, std::pair<int,int> >& nodeMapping,
-                                                    std::vector<std::vector<std::vector<int> > >& new2oldIds)
+                                                    const std::multimap<std::pair<int,mcIdType>, std::pair<int,mcIdType> >& nodeMapping,
+                                                    std::vector<std::vector<std::vector<mcIdType> > >& new2oldIds)
 {
   //splitMeshes structure will contain the partition of 
   //the old faces on the new ones
@@ -489,12 +489,12 @@ void MEDPARTITIONER::MeshCollection::castFaceMeshes(MeshCollection& initialColle
       //initial face mesh known : in my domain
       if (meshesCastFrom[iold] != 0)
         {
-          for (int ielem=0; ielem<meshesCastFrom[iold]->getNumberOfCells(); ielem++)
+          for (mcIdType ielem=0; ielem<meshesCastFrom[iold]->getNumberOfCells(); ielem++)
             {
-              vector<int> nodes;
+              vector<mcIdType> nodes;
               meshesCastFrom[iold]->getNodeIdsOfCell(ielem,nodes);
           
-              map <int,int> faces;
+              map <int,mcIdType> faces;
 
               //analysis of element ielem
               //counters are set for the element
@@ -502,10 +502,10 @@ void MEDPARTITIONER::MeshCollection::castFaceMeshes(MeshCollection& initialColle
               //are incremented for each target node
               //the face is considered as going to target domains if the counter of the domain 
               //is equal to the number of nodes
-              for (int inode=0; inode<(int)nodes.size(); inode++)
+              for (std::size_t inode=0; inode<nodes.size(); inode++)
                 {
-                  typedef multimap<pair<int,int>,pair<int,int> >::const_iterator MI;
-                  int mynode=nodes[inode];
+                  typedef multimap<pair<int,mcIdType>,pair<int,mcIdType> >::const_iterator MI;
+                  mcIdType mynode=nodes[inode];
 
                   pair <MI,MI> myRange = nodeMapping.equal_range(make_pair(iold,mynode));
                   for (MI iter=myRange.first; iter!=myRange.second; iter++)
@@ -518,9 +518,9 @@ void MEDPARTITIONER::MeshCollection::castFaceMeshes(MeshCollection& initialColle
                     }
                 }
           
-              for (map<int,int>::iterator iter=faces.begin(); iter!=faces.end(); iter++)
+              for (map<int,mcIdType>::iterator iter=faces.begin(); iter!=faces.end(); iter++)
                 {
-                  if (iter->second==(int)nodes.size())
+                  if (iter->second==ToIdType(nodes.size()))
                     //cvw eligible but may be have to be face of a cell of this->getMesh()[inew]?
                     //it is not sure here...
                     //done before writeMedfile on option?... see filterFaceOnCell()
@@ -635,13 +635,13 @@ void MEDPARTITIONER::MeshCollection::castFaceMeshes(MeshCollection& initialColle
 
 void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastFrom,
                                                   std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastTo,
-                                                  std::vector<MEDCoupling::DataArrayInt*>& arrayFrom,
+                                                  std::vector<MEDCoupling::DataArrayIdType*>& arrayFrom,
                                                   std::string nameArrayTo)
 {
   using std::vector;
   
-  int ioldMax=meshesCastFrom.size();
-  int inewMax=meshesCastTo.size();
+  std::size_t ioldMax=meshesCastFrom.size();
+  std::size_t inewMax=meshesCastTo.size();
 
 
   //preparing bounding box trees for accelerating source-target node identifications
@@ -649,7 +649,7 @@ void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCo
     std::cout<<"making accelerating structures"<<std::endl;
   std::vector<BBTreeOfDim* > acceleratingStructures(ioldMax);
   std::vector<MEDCoupling::DataArrayDouble*>bbox(ioldMax);
-  for (int iold =0; iold< ioldMax; iold++)
+  for (unsigned int iold =0; iold< ioldMax; iold++)
     if (isParallelMode() && _domain_selector->isMyDomain(iold))
       {
         MEDCoupling::DataArrayDouble* sourceCoords=meshesCastFrom[iold]->computeCellCenterOfMass();
@@ -659,9 +659,9 @@ void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCo
       }
   // send-recv operations
 #ifdef HAVE_MPI
-  for (int inew=0; inew<inewMax; inew++)
+  for (unsigned int inew=0; inew<inewMax; inew++)
     {
-      for (int iold=0; iold<ioldMax; iold++)
+      for (unsigned int iold=0; iold<ioldMax; iold++)
         {
           //sending arrays for distant domains
           if (isParallelMode() && _domain_selector->isMyDomain(iold) && !_domain_selector->isMyDomain(inew))
@@ -669,8 +669,8 @@ void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCo
               //send mesh
               _domain_selector->sendMesh(*meshesCastFrom[iold],_domain_selector->getProcessorID(inew));
               //send vector
-              int size=arrayFrom[iold]->getNumberOfTuples(); //cvw may be -1!
-              vector<int>sendIds;
+              mcIdType size=arrayFrom[iold]->getNumberOfTuples(); //cvw may be -1!
+              vector<mcIdType> sendIds;
               if (MyGlobals::_Verbose>400) std::cout<<"proc "<<_domain_selector->rank()<<" : castIntField SendIntVec size "<<size<<std::endl;
               if (size>0) //no empty
                 {
@@ -688,7 +688,7 @@ void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCo
           if (isParallelMode() && !_domain_selector->isMyDomain(iold) && _domain_selector->isMyDomain(inew))
             {
               //receive mesh
-              vector<int> recvIds;
+              vector<mcIdType> recvIds;
               MEDCoupling::MEDCouplingUMesh* recvMesh;
               _domain_selector->recvMesh(recvMesh,_domain_selector->getProcessorID(iold));
               //receive vector
@@ -701,16 +701,16 @@ void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCo
     }
 #endif
   
-  //local contributions and aggregation
-  for (int inew=0; inew<inewMax; inew++)    
+  //localontributions and aggregation
+  for (unsigned int inew=0; inew<inewMax; inew++)    
     {
-      for (int iold=0; iold<ioldMax; iold++)
+      for (unsigned int iold=0; iold<ioldMax; iold++)
         if (!isParallelMode() || ( _domain_selector->isMyDomain(iold) && _domain_selector->isMyDomain(inew)))
           {
             remapIntField(inew,iold,*meshesCastFrom[iold],*meshesCastTo[inew],arrayFrom[iold]->getConstPointer(),nameArrayTo,acceleratingStructures[iold]);
           }
     }
-  for (int iold=0; iold<ioldMax;iold++)
+  for (unsigned int iold=0; iold<ioldMax;iold++)
     if (isParallelMode() && _domain_selector->isMyDomain(iold)) 
       {
         bbox[iold]->decrRef();
@@ -721,7 +721,7 @@ void MEDPARTITIONER::MeshCollection::castIntField(std::vector<MEDCoupling::MEDCo
 void MEDPARTITIONER::MeshCollection::remapIntField(int inew, int iold,
                                                     const MEDCoupling::MEDCouplingUMesh& sourceMesh,
                                                     const MEDCoupling::MEDCouplingUMesh& targetMesh,
-                                                    const int* fromArray,
+                                                    const mcIdType* fromArray,
                                                     std::string nameArrayTo,
                                                     const BBTreeOfDim* myTree)
 {
@@ -729,20 +729,20 @@ void MEDPARTITIONER::MeshCollection::remapIntField(int inew, int iold,
   if (sourceMesh.getNumberOfCells()<=0) return; //empty mesh could exist
   MEDCoupling::DataArrayDouble* targetCoords=targetMesh.computeCellCenterOfMass();
   const double*  tc=targetCoords->getConstPointer();
-  int targetSize=targetMesh.getNumberOfCells();
-  int sourceSize=sourceMesh.getNumberOfCells();
+  mcIdType targetSize=targetMesh.getNumberOfCells();
+  mcIdType sourceSize=sourceMesh.getNumberOfCells();
   if (MyGlobals::_Verbose>200)
     std::cout<<"remap vers target de taille "<<targetSize<<std::endl;
-  std::vector<int> ccI;
+  std::vector<mcIdType> ccI;
   std::string str,cle;
   str=nameArrayTo+"_toArray";
   cle=Cle1ToStr(str,inew);
-  int* toArray;
+  mcIdType* toArray;
   
   const BBTreeOfDim* tree;
   bool cleantree=false;
   MEDCoupling::DataArrayDouble* sourceBBox=0;
-  int dim = targetCoords->getNumberOfComponents();
+  int dim = (int)targetCoords->getNumberOfComponents();
   if (myTree==0)
     {
       sourceBBox=sourceMesh.computeCellCenterOfMass()->computeBBoxPerTuple(1e-8);
@@ -755,7 +755,7 @@ void MEDPARTITIONER::MeshCollection::remapIntField(int inew, int iold,
     {
       if (MyGlobals::_Is0verbose>100)
         std::cout << "create " << cle << " size " << targetSize << std::endl;
-      MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
+      MEDCoupling::DataArrayIdType* p=MEDCoupling::DataArrayIdType::New();
       p->alloc(targetSize,1);
       p->fillWithZero();
       toArray=p->getPointer();
@@ -766,16 +766,16 @@ void MEDPARTITIONER::MeshCollection::remapIntField(int inew, int iold,
       toArray=_map_dataarray_int.find(cle)->second->getPointer();
     }
 
-  std::map< int, int > isource2nb; // count coincident elements
-  std::map<int,int>::iterator i2nb;
+  std::map< mcIdType, int > isource2nb; // count coincident elements
+  std::map< mcIdType, int>::iterator i2nb;
 
-  for (int itargetnode=0; itargetnode<targetSize; itargetnode++)    
+  for (mcIdType itargetnode=0; itargetnode<targetSize; itargetnode++)    
     {
-      std::vector<int> intersectingElems;
+      std::vector<mcIdType> intersectingElems;
       tree->getElementsAroundPoint(tc+itargetnode*dim,intersectingElems);
       if (intersectingElems.size()!=0)
         {
-          int isourcenode=intersectingElems[0];
+          mcIdType isourcenode=intersectingElems[0];
           if ( intersectingElems.size() > 1 )
             {
               i2nb = isource2nb.insert( std::make_pair( isourcenode, 0 )).first;
@@ -810,21 +810,21 @@ void MEDPARTITIONER::MeshCollection::castAllFields(MeshCollection& initialCollec
 
   std::string nameTo="typeData=6"; //resume the type of field casted 
   // send-recv operations
-  int ioldMax=initialCollection.getMesh().size();
-  int inewMax=this->getMesh().size();
-  int iFieldMax=initialCollection.getFieldDescriptions().size();
+  std::size_t ioldMax=initialCollection.getMesh().size();
+  std::size_t inewMax=this->getMesh().size();
+  std::size_t iFieldMax=initialCollection.getFieldDescriptions().size();
   if (MyGlobals::_Verbose>10)
     std::cout << "castAllFields with:\n" << ReprVectorOfString(initialCollection.getFieldDescriptions()) << std::endl;
   //see collection.prepareFieldDescriptions()
-  for (int ifield=0; ifield<iFieldMax; ifield++)
+  for (std::size_t ifield=0; ifield<iFieldMax; ifield++)
     {
       std::string descriptionField=initialCollection.getFieldDescriptions()[ifield];
       if (descriptionField.find(nameTo)==std::string::npos)
         continue; //only nameTo accepted in Fields name description
 #ifdef HAVE_MPI
-      for (int inew=0; inew<inewMax; inew++)
+      for (unsigned int inew=0; inew<inewMax; inew++)
         {
-          for (int iold=0; iold<ioldMax; iold++)
+          for (unsigned int iold=0; iold<ioldMax; iold++)
             {
               //sending arrays for distant domains
               if (isParallelMode() && _domain_selector->isMyDomain(iold) && !_domain_selector->isMyDomain(inew))
@@ -849,9 +849,9 @@ void MEDPARTITIONER::MeshCollection::castAllFields(MeshCollection& initialCollec
         }
 #endif
       //local contributions and aggregation
-      for (int inew=0; inew<inewMax; inew++)
+      for (unsigned int inew=0; inew<inewMax; inew++)
         {
-          for (int iold=0; iold<ioldMax; iold++)
+          for (unsigned int iold=0; iold<ioldMax; iold++)
             if (!isParallelMode() || ( _domain_selector->isMyDomain(iold) && _domain_selector->isMyDomain(inew)))
               {
                 MEDCoupling::DataArrayDouble* field=initialCollection.getField(descriptionField,iold);
@@ -871,7 +871,7 @@ void MEDPARTITIONER::MeshCollection::remapDoubleField(int inew, int iold,
     throw INTERP_KERNEL::Exception("Error remapDoubleField only on cellFieldDouble");
   std::string key=Cle2ToStr("cellFamily_ccI",inew,iold);
   
-  std::map<std::string,MEDCoupling::DataArrayInt*>::iterator it1;
+  std::map<std::string,MEDCoupling::DataArrayIdType*>::iterator it1;
   it1=_map_dataarray_int.find(key);
   if (it1==_map_dataarray_int.end())
     {
@@ -880,19 +880,19 @@ void MEDPARTITIONER::MeshCollection::remapDoubleField(int inew, int iold,
       return;
     }
   //create ccI in remapIntField
-  MEDCoupling::DataArrayInt *ccI=it1->second;
+  MEDCoupling::DataArrayIdType *ccI=it1->second;
   if (MyGlobals::_Verbose>300)
     std::cout << "proc " << MyGlobals::_Rank << " : remapDoubleField " << key << " size " << ccI->getNbOfElems() << std::endl;
   
-  int nbcell=this->getMesh()[inew]->getNumberOfCells();
-  int nbcomp=fromArray->getNumberOfComponents();
+  mcIdType nbcell=this->getMesh()[inew]->getNumberOfCells();
+  std::size_t nbcomp=fromArray->getNumberOfComponents();
   int nbPtGauss=StrToInt(ExtractFromDescription(descriptionField, "nbPtGauss="));
   
   std::string tag="inewFieldDouble="+IntToStr(inew);
   key=descriptionField+SerializeFromString(tag);
-  int fromArrayNbOfElem=fromArray->getNbOfElems();
-  int fromArrayNbOfComp=fromArray->getNumberOfComponents();
-  int fromArrayNbOfCell=fromArrayNbOfElem/fromArrayNbOfComp/nbPtGauss;
+  mcIdType fromArrayNbOfElem=fromArray->getNbOfElems();
+  mcIdType fromArrayNbOfComp=ToIdType(fromArray->getNumberOfComponents());
+  mcIdType fromArrayNbOfCell=fromArrayNbOfElem/fromArrayNbOfComp/nbPtGauss;
   
   if (MyGlobals::_Verbose>1000)
     {
@@ -933,20 +933,20 @@ void MEDPARTITIONER::MeshCollection::remapDoubleField(int inew, int iold,
   else
     {
       //replaced by setPartOfValuesAdv if nbPtGauss==1
-      int iMax=ccI->getNbOfElems();
-      int* pccI=ccI->getPointer();
+      mcIdType iMax=ccI->getNbOfElems();
+      mcIdType* pccI=ccI->getPointer();
       double* pField=field->getPointer();
       double* pFrom=fromArray->getPointer();
-      int itarget, isource, delta=nbPtGauss*nbcomp;
-      for (int i=0; i<iMax; i=i+2)  //cell
+      mcIdType itarget, isource, delta=ToIdType(nbPtGauss*nbcomp);
+      for (mcIdType i=0; i<iMax; i=i+2)  //cell
         {
           itarget=pccI[i];
           isource=pccI[i+1];
           if ((itarget<0) || (itarget>=nbcell) || (isource<0) || (isource>=fromArrayNbOfCell))
             throw INTERP_KERNEL::Exception("Error field override");
-          int ita=itarget*delta;
-          int iso=isource*delta;
-          for (int k=0; k<delta; k++) pField[ita+k]=pFrom[iso+k]; //components and gausspoints
+          mcIdType ita=itarget*delta;
+          mcIdType iso=isource*delta;
+          for (mcIdType k=0; k<delta; k++) pField[ita+k]=pFrom[iso+k]; //components and gausspoints
         }
     }
 }
@@ -965,13 +965,13 @@ namespace
    */
   //================================================================================
 
-  DataArrayInt* sortCorrespondences( DataArrayInt* ids1,
-                                     DataArrayInt* ids2,
-                                     int           delta,
-                                     bool removeEqual = false)
+  DataArrayIdType* sortCorrespondences( DataArrayIdType* ids1,
+                                        DataArrayIdType* ids2,
+                                        int              delta,
+                                        bool             removeEqual = false)
   {
     // sort
-    MCAuto< DataArrayInt > renumN2O = ids1->buildPermArrPerLevel();
+    MCAuto< DataArrayIdType > renumN2O = ids1->buildPermArrPerLevel();
     ids1->renumberInPlaceR( renumN2O->begin() );
     ids2->renumberInPlaceR( renumN2O->begin() );
 
@@ -982,7 +982,7 @@ namespace
       }
     if ( delta != 0 )
       {
-        int * id = ids1->getPointer();
+        mcIdType * id = ids1->getPointer();
         for ( ; id < ids1->end(); ++id )
           ++(*id);
         id = ids2->getPointer();
@@ -991,7 +991,7 @@ namespace
       }
 
     // join
-    DataArrayInt* ids12 = DataArrayInt::Meld( ids1, ids2 ); // two components
+    DataArrayIdType* ids12 = DataArrayIdType::Meld( ids1, ids2 ); // two components
     ids12->rearrange( 1 ); // make one component
     return ids12;
   }
@@ -1004,12 +1004,12 @@ namespace
    */
   //================================================================================
 
-  void renumber( DataArrayInt* ids, const DataArrayInt* o2nRenumber )
+  void renumber( DataArrayIdType* ids, const DataArrayIdType* o2nRenumber )
   {
     if ( !ids || !o2nRenumber )
       return;
-    int *        id = ids->getPointer();
-    const int * o2n = o2nRenumber->getConstPointer();
+    mcIdType *        id = ids->getPointer();
+    const mcIdType * o2n = o2nRenumber->getConstPointer();
     for ( ; id < ids->end(); ++id )
       {
         *id = o2n[ *id ];
@@ -1029,7 +1029,7 @@ namespace
 //================================================================================
 
 void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeMapping,
-                                                        const std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber,
+                                                        const std::vector<MEDCoupling::DataArrayIdType*> & o2nRenumber,
                                                         int                nbInitialDomains)
 {
   if ( !MyGlobals::_Create_Joints || _topology->nbDomain() < 2 )
@@ -1053,7 +1053,7 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM
   // 1) add node correspondences
   // ==================================
 
-  std::vector< std::vector< std::vector< int > > > nodeCorresp( nb_domains );
+  std::vector< std::vector< std::vector< mcIdType > > > nodeCorresp( nb_domains );
   for ( int idomain = 0; idomain < nb_domains; ++idomain )
     {
       nodeCorresp[ idomain ].resize( nb_domains );
@@ -1076,11 +1076,11 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM
               if ( ++nmIt2 == nmEnd )
                 break;
               int dom1  = nmIt1->second.first;
-              int node1 = nmIt1->second.second;
+              mcIdType node1 = nmIt1->second.second;
               for ( ; nmIt2 != nmEnd; ++nmIt2 )
                 {
                   int dom2  = nmIt2->second.first;
-                  int node2 = nmIt2->second.second;
+                  mcIdType node2 = nmIt2->second.second;
                   if ( dom1 != dom2 )
                     {
                       nodeCorresp[ dom1 ][ dom2 ].push_back( node1 );
@@ -1101,7 +1101,7 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM
     {
       for ( int idomainNear = 0; idomainNear < nb_domains; ++idomainNear )
         {
-          std::vector< int > & corresp = nodeCorresp[ idomain ][ idomainNear ];
+          std::vector< mcIdType > & corresp = nodeCorresp[ idomain ][ idomainNear ];
           if ( corresp.empty() )
             continue;
 
@@ -1121,7 +1121,7 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM
               czVec.push_back(cz);
             }
 
-          cz->setNodeCorresp( &corresp[0], corresp.size()/2 );
+          cz->setNodeCorresp( &corresp[0], ToIdType( corresp.size()/2 ));
         }
     }
 
@@ -1142,8 +1142,8 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM
 
       // separate ids of two domains
       const MEDCoupling::MEDCouplingSkyLineArray *corrArray = cz->getEntityCorresp( 0, 0 );
-      const DataArrayInt* ids12 = corrArray->getValuesArray();
-      MCAuto<DataArrayInt> ids1, ids2, ids12Sorted;
+      const DataArrayIdType* ids12 = corrArray->getValuesArray();
+      MCAuto<DataArrayIdType> ids1, ids2, ids12Sorted;
       ids1 = ids12->selectByTupleIdSafeSlice( 0, corrArray->getLength(), 2 );
       ids2 = ids12->selectByTupleIdSafeSlice( 1, corrArray->getLength(), 2 );
 
@@ -1180,13 +1180,13 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM
         }
       else // split and sort
         {
-          typedef std::pair< std::vector< int >, std::vector< int > > T2Vecs;
+          typedef std::pair< std::vector< mcIdType >, std::vector< mcIdType > > T2Vecs;
           T2Vecs idsByType[ INTERP_KERNEL::NORM_MAXTYPE ][ INTERP_KERNEL::NORM_MAXTYPE ];
           int t1, t2;
 
-          const int nbIds = ids1->getNbOfElems();
-          const int * p1 = ids1->begin(), * p2 = ids2->begin();
-          for ( int i = 0; i < nbIds; ++i )
+          const mcIdType nbIds = ids1->getNbOfElems();
+          const mcIdType * p1 = ids1->begin(), * p2 = ids2->begin();
+          for ( mcIdType i = 0; i < nbIds; ++i )
             {
               t1 = mesh1->getTypeOfCell( p1[ i ]);
               t2 = mesh2->getTypeOfCell( p2[ i ]);
@@ -1252,8 +1252,8 @@ void MEDPARTITIONER::MeshCollection::buildConnectZones( const NodeMapping& nodeM
 
       // separate ids of two domains
       const MEDCoupling::MEDCouplingSkyLineArray *corrArray = cz->getNodeCorresp();
-      const DataArrayInt *ids12 = corrArray->getValuesArray();
-      MCAuto<DataArrayInt> ids1, ids2, ids12Sorted;
+      const DataArrayIdType *ids12 = corrArray->getValuesArray();
+      MCAuto<DataArrayIdType> ids1, ids2, ids12Sorted;
       ids1 = ids12->selectByTupleIdSafeSlice( 0, corrArray->getLength(), 2 );
       ids2 = ids12->selectByTupleIdSafeSlice( 1, corrArray->getLength(), 2 );
 
@@ -1288,12 +1288,12 @@ void MEDPARTITIONER::MeshCollection::buildBoundaryFaces()
   using MEDCoupling::DataArrayInt;
 
   std::vector<MEDCouplingUMesh*>& faceMeshes = getFaceMesh();
-  int nbMeshes = faceMeshes.size();
+  std::size_t nbMeshes = faceMeshes.size();
 
   //preparing bounding box trees for accelerating search of coincident faces
   std::vector<BBTreeOfDim* >   bbTrees(nbMeshes);
   std::vector<DataArrayDouble*>bbox   (nbMeshes);
-  for (int inew = 0; inew < nbMeshes-1; inew++)
+  for (unsigned int inew = 0; inew < nbMeshes-1; inew++)
     if ( !isParallelMode() || _domain_selector->isMyDomain(inew) )
       {
         DataArrayDouble* bcCoords = faceMeshes[inew]->computeCellCenterOfMass();
@@ -1305,9 +1305,9 @@ void MEDPARTITIONER::MeshCollection::buildBoundaryFaces()
       }
 
   // loop on domains to find joint faces between them
-  for (int inew1 = 0; inew1 < nbMeshes; inew1++ )
+  for (unsigned int inew1 = 0; inew1 < nbMeshes; inew1++ )
     {
-      for (int inew2 = inew1+1; inew2 < nbMeshes; inew2++ )
+      for (unsigned int inew2 = inew1+1; inew2 < nbMeshes; inew2++ )
         {
           MEDCouplingUMesh* mesh1 = 0;
           MEDCouplingUMesh* mesh2 = 0;
@@ -1338,22 +1338,22 @@ void MEDPARTITIONER::MeshCollection::buildBoundaryFaces()
           if ( mesh2Here && !mesh2 ) mesh2 = faceMeshes[ inew2 ];
 
           // find coincident faces
-          std::vector< int > faces1, faces2;
+          std::vector< mcIdType > faces1, faces2;
           if ( mesh1 && mesh2 )
             {
               const DataArrayDouble* coords2 = mesh2->computeCellCenterOfMass();
-              const double*   c2 = coords2->getConstPointer();
-              const int      dim = coords2->getNumberOfComponents();
-              const int nbFaces2 = mesh2->getNumberOfCells();
-              const int nbFaces1 = mesh1->getNumberOfCells();
+              const double*        c2 = coords2->getConstPointer();
+              const std::size_t   dim = coords2->getNumberOfComponents();
+              const mcIdType nbFaces2 = mesh2->getNumberOfCells();
+              const mcIdType nbFaces1 = mesh1->getNumberOfCells();
 
-              for (int i2 = 0; i2 < nbFaces2; i2++)
+              for (mcIdType i2 = 0; i2 < nbFaces2; i2++)
                 {
-                  std::vector<int> coincFaces;
+                  std::vector<mcIdType> coincFaces;
                   bbTrees[inew1]->getElementsAroundPoint( c2+i2*dim, coincFaces );
                   if (coincFaces.size()!=0)
                     {
-                      int i1 = coincFaces[0];
+                      mcIdType i1 = coincFaces[0];
                       // if ( coincFaces.size() > 1 )
                       //   {
                       //     i2nb = isource2nb.insert( std::make_pair( i1 , 0 )).first;
@@ -1399,7 +1399,7 @@ void MEDPARTITIONER::MeshCollection::buildBoundaryFaces()
 
 
   // delete bounding box trees
-  for (int inew = 0; inew < nbMeshes-1; inew++)
+  for (unsigned int inew = 0; inew < nbMeshes-1; inew++)
     if (isParallelMode() && _domain_selector->isMyDomain(inew))
       {
         bbox[inew]->decrRef();
@@ -1417,7 +1417,7 @@ void MEDPARTITIONER::MeshCollection::buildBoundaryFaces()
  */
 //================================================================================
 
-void MEDPARTITIONER::MeshCollection::createJointGroup( const std::vector< int >& faces,
+void MEDPARTITIONER::MeshCollection::createJointGroup( const std::vector< mcIdType >& faces,
                                                        const int                 inew1,
                                                        const int                 inew2,
                                                        const bool                is2nd )
@@ -1437,15 +1437,15 @@ void MEDPARTITIONER::MeshCollection::createJointGroup( const std::vector< int >&
   _group_info.erase( groupName );
 
   // get family IDs array
-  int* famIDs = 0;
+  mcIdType* famIDs = 0;
   int inew = (is2nd ? inew2 : inew1 );
-  int totalNbFaces =  _face_mesh[ inew ] ? _face_mesh[ inew ]->getNumberOfCells() : 0;
+  mcIdType totalNbFaces =  _face_mesh[ inew ] ? _face_mesh[ inew ]->getNumberOfCells() : 0;
   std::string cle = Cle1ToStr( "faceFamily_toArray", inew );
   if ( !_map_dataarray_int.count(cle) )
     {
       if ( totalNbFaces > 0 )
         {
-          MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
+          MEDCoupling::DataArrayIdType* p=MEDCoupling::DataArrayIdType::New();
           p->alloc( totalNbFaces, 1 );
           p->fillWithZero();
           famIDs = p->getPointer();
@@ -1457,14 +1457,14 @@ void MEDPARTITIONER::MeshCollection::createJointGroup( const std::vector< int >&
       famIDs = _map_dataarray_int.find(cle)->second->getPointer();
     }
   // find a family ID of an existing JOINT group
-  int familyID = 0;
-  std::map<std::string, int>::iterator name2id = _family_info.find( groupName );
+  mcIdType familyID = 0;
+  std::map<std::string, mcIdType>::iterator name2id = _family_info.find( groupName );
   if ( name2id != _family_info.end() )
     familyID = name2id->second;
 
   // remove faces from the familyID-the family
   if ( familyID != 0 && famIDs )
-    for ( int i = 0; i < totalNbFaces; ++i )
+    for ( mcIdType i = 0; i < totalNbFaces; ++i )
       if ( famIDs[i] == familyID )
         famIDs[i] = 0;
 
@@ -1473,7 +1473,7 @@ void MEDPARTITIONER::MeshCollection::createJointGroup( const std::vector< int >&
 
   if ( familyID == 0 )  // generate a family ID for JOINT group
     {
-      std::set< int > familyIDs;
+      std::set< mcIdType > familyIDs;
       for ( name2id = _family_info.begin(); name2id != _family_info.end(); ++name2id )
         familyIDs.insert( name2id->second );
       // find the next free family ID
@@ -1535,7 +1535,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename)
           throw INTERP_KERNEL::Exception("file does not comply with any recognized format");
         }
     }
-  for ( int idomain = 0; idomain < (int)_mesh.size(); ++idomain )
+  for ( unsigned int idomain = 0; idomain < _mesh.size(); ++idomain )
     if ( _mesh[idomain] && _mesh[idomain]->getNumberOfNodes() > 0 )
       _i_non_empty_mesh = idomain;
 }
@@ -1654,7 +1654,7 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename, Para
         }
     }
   // find non-empty domain mesh
-  for ( int idomain = 0; idomain < (int)_mesh.size(); ++idomain )
+  for ( unsigned int idomain = 0; idomain < _mesh.size(); ++idomain )
     if ( _mesh[idomain] && _mesh[idomain]->getNumberOfNodes() > 0 )
       _i_non_empty_mesh = idomain;
   
@@ -1733,22 +1733,22 @@ MEDPARTITIONER::MeshCollection::MeshCollection(const std::string& filename, cons
 
 MEDPARTITIONER::MeshCollection::~MeshCollection()
 {
-  for (int i=0; i<(int)_mesh.size();i++)
+  for (std::size_t i=0; i<_mesh.size();i++)
     if (_mesh[i]!=0) _mesh[i]->decrRef(); 
   
-  for (int i=0; i<(int)_cell_family_ids.size();i++)
+  for (std::size_t i=0; i<_cell_family_ids.size();i++)
     if (_cell_family_ids[i]!=0)
       _cell_family_ids[i]->decrRef();
   
-  for (int i=0; i<(int)_face_mesh.size();i++)
+  for (std::size_t i=0; i<_face_mesh.size();i++)
     if (_face_mesh[i]!=0)
       _face_mesh[i]->decrRef();
   
-  for (int i=0; i<(int)_face_family_ids.size();i++)
+  for (std::size_t i=0; i<_face_family_ids.size();i++)
     if (_face_family_ids[i]!=0)
       _face_family_ids[i]->decrRef();
   
-  for (std::map<std::string, MEDCoupling::DataArrayInt*>::iterator it=_map_dataarray_int.begin() ; it!=_map_dataarray_int.end(); it++ )
+  for (std::map<std::string, MEDCoupling::DataArrayIdType*>::iterator it=_map_dataarray_int.begin() ; it!=_map_dataarray_int.end(); it++ )
     if ((*it).second!=0)
       (*it).second->decrRef();
   
@@ -1830,9 +1830,9 @@ int MEDPARTITIONER::MeshCollection::getNbOfLocalMeshes() const
   return nb;
 }
 
-int MEDPARTITIONER::MeshCollection::getNbOfLocalCells() const
+mcIdType MEDPARTITIONER::MeshCollection::getNbOfLocalCells() const
 {
-  int nb=0;
+  mcIdType nb=0;
   for (size_t i=0; i<_mesh.size(); i++)
     {
       if (_mesh[i]) nb=nb+_mesh[i]->getNumberOfCells();
@@ -1840,9 +1840,9 @@ int MEDPARTITIONER::MeshCollection::getNbOfLocalCells() const
   return nb;
 }
 
-int MEDPARTITIONER::MeshCollection::getNbOfLocalFaces() const
+mcIdType MEDPARTITIONER::MeshCollection::getNbOfLocalFaces() const
 {
-  int nb=0;
+  mcIdType nb=0;
   for (size_t i=0; i<_face_mesh.size(); i++)
     {
       if (_face_mesh[i]) nb=nb+_face_mesh[i]->getNumberOfCells();
@@ -1919,8 +1919,8 @@ void MEDPARTITIONER::MeshCollection::buildCellGraph(MEDCoupling::MEDCouplingSkyL
   //looking for reverse nodal connectivity i global numbering
   if (isParallelMode() && !_domain_selector->isMyDomain(0))
      {
-        vector<int> value;
-        vector<int> index(1,0);
+        vector<mcIdType> value;
+        vector<mcIdType> index(1,0);
         
         array = MEDCoupling::MEDCouplingSkyLineArray::New(index,value);
         return;
@@ -1940,11 +1940,11 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCoup
   using std::make_pair;
   using std::pair;
   
-  std::multimap< int, int > node2cell;
-  std::map< pair<int,int>, int > cell2cellcounter;
-  std::multimap<int,int> cell2cell;
+  std::multimap< mcIdType, mcIdType > node2cell;
+  std::map< pair<mcIdType,mcIdType>, mcIdType > cell2cellcounter;
+  std::multimap<mcIdType,mcIdType> cell2cell;
 
-  std::vector<std::vector<std::multimap<int,int> > > commonDistantNodes;
+  std::vector<std::vector<std::multimap<mcIdType,mcIdType> > > commonDistantNodes;
   int nbdomain=_topology->nbDomain();
 #ifdef HAVE_MPI
   if (isParallelMode())
@@ -1968,21 +1968,21 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCoup
         continue;
       meshDim = _mesh[idomain]->getMeshDimension();
     
-      MEDCoupling::DataArrayInt* index=MEDCoupling::DataArrayInt::New();
-      MEDCoupling::DataArrayInt* revConn=MEDCoupling::DataArrayInt::New();
-      int nbNodes=_mesh[idomain]->getNumberOfNodes();
+      MEDCoupling::DataArrayIdType* index=MEDCoupling::DataArrayIdType::New();
+      MEDCoupling::DataArrayIdType* revConn=MEDCoupling::DataArrayIdType::New();
+      mcIdType nbNodes=_mesh[idomain]->getNumberOfNodes();
       _mesh[idomain]->getReverseNodalConnectivity(revConn,index);
       //problem saturation over 1 000 000 nodes for 1 proc
       if (MyGlobals::_Verbose>100)
         std::cout << "proc " << MyGlobals::_Rank << " : getReverseNodalConnectivity done on " << nbNodes << " nodes" << std::endl;
-      int* index_ptr=index->getPointer();
-      int* revConnPtr=revConn->getPointer();
-      for (int i=0; i<nbNodes; i++)
+      mcIdType* index_ptr=index->getPointer();
+      mcIdType* revConnPtr=revConn->getPointer();
+      for (mcIdType i=0; i<nbNodes; i++)
         {
-          for (int icell=index_ptr[i]; icell<index_ptr[i+1]; icell++)
+          for (mcIdType icell=index_ptr[i]; icell<index_ptr[i+1]; icell++)
             {
-              int globalNode=_topology->convertNodeToGlobal(idomain,i);
-              int globalCell=_topology->convertCellToGlobal(idomain,revConnPtr[icell]);
+              mcIdType globalNode=_topology->convertNodeToGlobal(idomain,i);
+              mcIdType globalCell=_topology->convertCellToGlobal(idomain,revConnPtr[icell]);
               node2cell.insert(make_pair(globalNode, globalCell));
             }
         }
@@ -1991,14 +1991,14 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCoup
 #ifdef HAVE_MPI
       for (int iother=0; iother<nbdomain; iother++)
         {
-          std::multimap<int,int>::iterator it;
+          std::multimap<mcIdType,mcIdType>::iterator it;
           int isource=idomain;
           int itarget=iother;
           for (it=_joint_finder->getDistantNodeCell()[isource][itarget].begin(); 
                it!=_joint_finder->getDistantNodeCell()[isource][itarget].end(); it++)
             {
-              int globalNode=_topology->convertNodeToGlobal(idomain,(*it).first);
-              int globalCell=(*it).second;
+              mcIdType globalNode=_topology->convertNodeToGlobal(idomain,(*it).first);
+              mcIdType globalCell=(*it).second;
               node2cell.insert(make_pair(globalNode, globalCell));
             }
         }
@@ -2018,32 +2018,32 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCoup
   if (MyGlobals::_Verbose>50)
     std::cout<< "proc " << MyGlobals::_Rank << " : creating graph arcs on nbNodes " << _topology->nbNodes() << std::endl;
  
-  for (int inode=0;inode<_topology->nbNodes();inode++)
+  for (mcIdType inode=0;inode<_topology->nbNodes();inode++)
     {
-      typedef multimap<int,int>::const_iterator MI;
+      typedef multimap<mcIdType,mcIdType>::const_iterator MI;
       std::pair <MI,MI> nodeRange=node2cell.equal_range(inode);
       for (MI cell1=nodeRange.first;cell1!=nodeRange.second;cell1++)
         for (MI cell2=nodeRange.first;cell2!=cell1;cell2++)
           {
-            int icell1=cell1->second;
-            int icell2=cell2->second;
-            if (icell1>icell2) {int tmp=icell1; icell1=icell2; icell2=tmp;}
-            std::map<pair<int,int>,int>::iterator it=cell2cellcounter.find(make_pair(icell1,icell2));
+            mcIdType icell1=cell1->second;
+            mcIdType icell2=cell2->second;
+            if (icell1>icell2) std::swap(icell1,icell2);
+            std::map<pair<mcIdType,mcIdType>,mcIdType>::iterator it=cell2cellcounter.find(make_pair(icell1,icell2));
             if (it==cell2cellcounter.end()) cell2cellcounter.insert(make_pair(make_pair(icell1,icell2),1));
             else (it->second)++;
           }
     }      
-  // for (int icell1=0; icell1<_topology->nbCells(); icell1++)  //on all nodes
+  // for (mcIdType icell1=0; icell1<_topology->nbCells(); icell1++)  //on all nodes
   //   {
-  //     typedef multimap<int,int>::const_iterator MI;
+  //     typedef multimap<int,mcIdType>::const_iterator MI;
   //     std::pair <MI,MI> nodeRange=cell2node.equal_range(icell1);
   //     for (MI node1=nodeRange.first; node1!=nodeRange.second; node1++)  //on nodes with icell
   //       {
   //         std::pair<MI,MI> cellRange=node2cell.equal_range(node1->second);
   //         for (MI cell2=cellRange.first; cell2!=cellRange.second; cell2++)  //on one of these cell
   //           {
-  //             int icell2=cell2->second;
-  //             std::map<pair<int,int>,int>::iterator it=cell2cellcounter.find(make_pair(icell1,icell2));
+  //             mcIdType icell2=cell2->second;
+  //             std::map<pair<int,mcIdType>,mcIdType>::iterator it=cell2cellcounter.find(make_pair(icell1,icell2));
   //             if (it==cell2cellcounter.end()) cell2cellcounter.insert(make_pair(make_pair(icell1,icell2),1));
   //             else (it->second)++;
   //           }
@@ -2052,7 +2052,7 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCoup
 
 
   //converting the counter to a multimap structure
-  for (std::map<pair<int,int>,int>::const_iterator it=cell2cellcounter.begin();
+  for (std::map<pair<mcIdType,mcIdType>,mcIdType>::const_iterator it=cell2cellcounter.begin();
        it!=cell2cellcounter.end();
        it++)
     if (it->second>=meshDim)
@@ -2065,25 +2065,25 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCoup
   if (MyGlobals::_Verbose>50)
     std::cout << "proc " << MyGlobals::_Rank << " : create skylinearray" << std::endl;
   //filling up index and value to create skylinearray structure
-  std::vector <int> index,value;
+  std::vector <mcIdType> index,value;
   index.push_back(0);
-  int idep=0;
+  mcIdType idep=0;
   
   for (int idomain=0; idomain<nbdomain; idomain++)
     {
       if (isParallelMode() && !_domain_selector->isMyDomain(idomain)) continue;
-      int nbCells=_mesh[idomain]->getNumberOfCells();
-      for (int icell=0; icell<nbCells; icell++)
+      mcIdType nbCells=_mesh[idomain]->getNumberOfCells();
+      for (mcIdType icell=0; icell<nbCells; icell++)
         {
-          int size=0;
-          int globalCell=_topology->convertCellToGlobal(idomain,icell);
-          multimap<int,int>::iterator it;
-          pair<multimap<int,int>::iterator,multimap<int,int>::iterator> ret;
+          mcIdType size=0;
+          mcIdType globalCell=_topology->convertCellToGlobal(idomain,icell);
+          multimap<mcIdType,mcIdType>::iterator it;
+          pair<multimap<mcIdType,mcIdType>::iterator,multimap<mcIdType,mcIdType>::iterator> ret;
           ret=cell2cell.equal_range(globalCell);
           for (it=ret.first; it!=ret.second; ++it)
             {
-              int ival=(*it).second; //no adding one existing yet
-              for (int i=idep ; i<idep+size ; i++)
+              mcIdType ival=(*it).second; //no adding one existing yet
+              for (mcIdType i=idep ; i<idep+size ; i++)
                 {
                   if (value[i]==ival)
                     {
@@ -2107,15 +2107,15 @@ void MEDPARTITIONER::MeshCollection::buildParallelCellGraph(MEDCoupling::MEDCoup
     {
       std::cout << "\nproc " << _domain_selector->rank() << " : end MeshCollection::buildCellGraph " <<
         index.size()-1 << " " << value.size() << std::endl;
-      int max=index.size()>15?15:index.size();
+      std::size_t max=index.size()>15?15:index.size();
       if (index.size()>1)
         {
-          for (int i=0; i<max; ++i)
+          for (std::size_t i=0; i<max; ++i)
             std::cout<<index[i]<<" ";
           std::cout << "... " << index[index.size()-1] << std::endl;
-          for (int i=0; i<max; ++i)
+          for (std::size_t i=0; i<max; ++i)
             std::cout<< value[i] << " ";
-          int ll=index[index.size()-1]-1;
+          mcIdType ll=index[index.size()-1]-1;
           std::cout << "... (" << ll << ") " << value[ll-1] << " " << value[ll] << std::endl;
         }
     }
@@ -2224,7 +2224,7 @@ MEDPARTITIONER::Topology* MEDPARTITIONER::MeshCollection::createPartition(const
 
   Graph* cellGraph;
   std::set<int> domains;
-  for (int i=0; i<_topology->nbCells(); i++)
+  for (mcIdType i=0; i<_topology->nbCells(); i++)
     {
       domains.insert(partition[i]);
     }
@@ -2232,7 +2232,7 @@ MEDPARTITIONER::Topology* MEDPARTITIONER::MeshCollection::createPartition(const
   
   //cellGraph is a shared pointer 
   Topology *topology=0;
-  int nbdomain=domains.size();
+  int nbdomain=(int)domains.size();
   topology=new ParallelTopology (cellGraph, getTopology(), nbdomain, getMeshDimension());
   //  if (array!=0) delete array;
   delete cellGraph;
@@ -2293,22 +2293,22 @@ void MEDPARTITIONER::MeshCollection::prepareFieldDescriptions()
 //to have unique valid fields names/pointers/descriptions for partitionning
 //filter _field_descriptions to be in all procs compliant and equal
 {
-  int nbfiles=MyGlobals::_File_Names.size(); //nb domains
+  std::size_t nbfiles=MyGlobals::_File_Names.size(); //nb domains
   if (nbfiles==0)
     {
       nbfiles=_topology->nbDomain();
     }
   std::vector<std::string> r2;
   //from allgatherv then vector(procs) of serialised vector(fields) of vector(description) data
-  for (int i=0; i<(int)_field_descriptions.size(); i++)
+  for (std::size_t i=0; i<_field_descriptions.size(); i++)
     {
       std::vector<std::string> r1=DeserializeToVectorOfString(_field_descriptions[i]);
-      for (int ii=0; ii<(int)r1.size(); ii++)
+      for (std::size_t ii=0; ii<r1.size(); ii++)
         r2.push_back(r1[ii]);
     }
   //here vector(procs*fields) of serialised vector(description) data
   _field_descriptions=r2;
-  int nbfields=_field_descriptions.size(); //on all domains
+  std::size_t nbfields=_field_descriptions.size(); //on all domains
   if ((nbfields%nbfiles)!=0)
     {
       if (MyGlobals::_Rank==0)
@@ -2322,7 +2322,7 @@ void MEDPARTITIONER::MeshCollection::prepareFieldDescriptions()
       throw INTERP_KERNEL::Exception("incoherent number of fields references in all files .med\n");
     }
   _field_descriptions.resize(nbfields/nbfiles);
-  for (int i=0; i<(int)_field_descriptions.size(); i++)
+  for (std::size_t i=0; i<_field_descriptions.size(); i++)
     {
       std::string str=_field_descriptions[i];
       str=EraseTagSerialized(str,"idomain=");
@@ -2332,16 +2332,16 @@ void MEDPARTITIONER::MeshCollection::prepareFieldDescriptions()
 }
 
 //returns true if inodes of a face are in inodes of a cell
-bool isFaceOncell(std::vector< int >& inodesFace, std::vector< int >&  inodesCell)
+bool isFaceOncell(std::vector< mcIdType >& inodesFace, std::vector< mcIdType >&  inodesCell)
 {
-  int ires=0;
-  int nbok=inodesFace.size();
-  for (int i=0; i<nbok; i++)
+  std::size_t ires=0;
+  std::size_t nbok=inodesFace.size();
+  for (std::size_t i=0; i<nbok; i++)
     {
-      int ii=inodesFace[i];
+      mcIdType ii=inodesFace[i];
       if (ii<0)
         std::cout << "isFaceOncell problem inodeface<0" << std::endl;
-      for (int j=0; j<(int)inodesCell.size(); j++)
+      for (std::size_t j=0; j<inodesCell.size(); j++)
         {
           if (ii==inodesCell[j])
             {
@@ -2367,26 +2367,26 @@ void MEDPARTITIONER::MeshCollection::filterFaceOnCell()
           MEDCoupling::MEDCouplingUMesh* mfac=_face_mesh[inew];
       
           //to have cellnode=f(facenode)... inodeCell=nodeIds[inodeFace]
-          std::vector<int> nodeIds;
+          std::vector<mcIdType> nodeIds;
           getNodeIds(*mcel, *mfac, nodeIds);
           if (nodeIds.size()==0)
             continue;  //one empty mesh nothing to do
 
-          MEDCoupling::DataArrayInt *revNodalCel=MEDCoupling::DataArrayInt::New();
-          MEDCoupling::DataArrayInt *revNodalIndxCel=MEDCoupling::DataArrayInt::New();
+          MEDCoupling::DataArrayIdType *revNodalCel=MEDCoupling::DataArrayIdType::New();
+          MEDCoupling::DataArrayIdType *revNodalIndxCel=MEDCoupling::DataArrayIdType::New();
           mcel->getReverseNodalConnectivity(revNodalCel,revNodalIndxCel);
-          int *revC=revNodalCel->getPointer();
-          int *revIndxC=revNodalIndxCel->getPointer();
+          mcIdType *revC=revNodalCel->getPointer();
+          mcIdType *revIndxC=revNodalIndxCel->getPointer();
 
-          std::vector< int > faceOnCell;
-          std::vector< int > faceNotOnCell;
-          int nbface=mfac->getNumberOfCells();
-          for (int iface=0; iface<nbface; iface++)
+          std::vector< mcIdType > faceOnCell;
+          std::vector< mcIdType > faceNotOnCell;
+          mcIdType nbface=mfac->getNumberOfCells();
+          for (mcIdType iface=0; iface<nbface; iface++)
             {
               bool ok;
-              std::vector< int > inodesFace;
+              std::vector< mcIdType > inodesFace;
               mfac->getNodeIdsOfCell(iface, inodesFace);
-              int nbnodFace=inodesFace.size();
+              mcIdType nbnodFace=ToIdType(inodesFace.size());
               if ( nbnodFace != mfac->getNumberOfNodesInCell( iface ))
                 continue; // invalid node ids
               //set inodesFace in mcel
@@ -2395,17 +2395,17 @@ void MEDPARTITIONER::MeshCollection::filterFaceOnCell()
                 nbok += (( inodesFace[i]=nodeIds[inodesFace[i]] ) >= 0 );
               if ( nbok != nbnodFace )
                 continue;
-              int inod=inodesFace[0];
+              mcIdType inod=inodesFace[0];
               if (inod<0)
                 {
                   std::cout << "filterFaceOnCell problem 1" << std::endl;
                   continue;
                 }
-              int nbcell=revIndxC[inod+1]-revIndxC[inod];
-              for (int j=0; j<nbcell; j++) //look for each cell with inod
+              mcIdType nbcell=revIndxC[inod+1]-revIndxC[inod];
+              for (mcIdType j=0; j<nbcell; j++) //look for each cell with inod
                 {
-                  int icel=revC[revIndxC[inod]+j];
-                  std::vector< int > inodesCell;
+                  mcIdType icel=revC[revIndxC[inod]+j];
+                  std::vector< mcIdType > inodesCell;
                   mcel->getNodeIdsOfCell(icel, inodesCell);
                   ok=isFaceOncell(inodesFace, inodesCell);
                   if (ok) break;
@@ -2443,11 +2443,11 @@ void MEDPARTITIONER::MeshCollection::filterFaceOnCell()
           std::string key = Cle1ToStr("faceFamily_toArray",inew);
           if ( getMapDataArrayInt().count( key ))
             {
-              MEDCoupling::DataArrayInt * &     fam = getMapDataArrayInt()[ key ];
-              MEDCoupling::DataArrayInt * famFilter = MEDCoupling::DataArrayInt::New();
+              MEDCoupling::DataArrayIdType * &     fam = getMapDataArrayInt()[ key ];
+              MEDCoupling::DataArrayIdType * famFilter = MEDCoupling::DataArrayIdType::New();
               famFilter->alloc(faceOnCell.size(),1);
-              int* pfamFilter = famFilter->getPointer();
-              int* pfam       = fam->getPointer();
+              mcIdType* pfamFilter = famFilter->getPointer();
+              mcIdType* pfam       = fam->getPointer();
               for ( size_t i=0; i<faceOnCell.size(); i++ )
                 pfamFilter[i]=pfam[faceOnCell[i]];
               fam->decrRef();
index c20901c84be6b7ce5d424b07768c20e19af747a4..8d24d8a970e38814f460f056e494b1730115deaf 100644 (file)
@@ -46,7 +46,7 @@ namespace MEDPARTITIONER
   class JointFinder;
   
   typedef enum{MedAscii, MedXml, Undefined} DriverType;
-  typedef std::multimap<std::pair<int,int>, std::pair<int,int> > NodeMapping ;
+  typedef std::multimap<std::pair<int,mcIdType>, std::pair<int,mcIdType> > NodeMapping ;
   typedef std::vector<std::pair<int,int> >  NodeList;
   
   class MEDPARTITIONER_EXPORT MeshCollection
@@ -87,9 +87,9 @@ namespace MEDPARTITIONER
     //getting mesh dimension
     int getMeshDimension() const;
     int getNbOfLocalMeshes() const;
-    int getNbOfGlobalMeshes() const { return _mesh.size(); }
-    int getNbOfLocalCells() const;
-    int getNbOfLocalFaces() const;
+    int getNbOfGlobalMeshes() const { return (int)_mesh.size(); }
+    mcIdType getNbOfLocalCells() const;
+    mcIdType getNbOfLocalFaces() const;
     
     //getting a reference to mesh vector
     std::vector<MEDCoupling::MEDCouplingUMesh*>& getMesh();
@@ -100,13 +100,13 @@ namespace MEDPARTITIONER
     MEDCoupling::MEDCouplingUMesh* getFaceMesh(int idomain);
     std::vector<MEDCoupling::MEDCouplingUMesh*>& getGroupMeshes(int idomain);
 
-    std::vector<MEDCoupling::DataArrayInt*>& getCellFamilyIds() { return _cell_family_ids; }
-    std::vector<MEDCoupling::DataArrayInt*>& getFaceFamilyIds() { return _face_family_ids; }
+    std::vector<MEDCoupling::DataArrayIdType*>& getCellFamilyIds() { return _cell_family_ids; }
+    std::vector<MEDCoupling::DataArrayIdType*>& getFaceFamilyIds() { return _face_family_ids; }
     
-    std::map<std::string, MEDCoupling::DataArrayInt*>& getMapDataArrayInt() { return _map_dataarray_int; }
+    std::map<std::string, MEDCoupling::DataArrayIdType*>& getMapDataArrayInt() { return _map_dataarray_int; }
     std::map<std::string, MEDCoupling::DataArrayDouble*>& getMapDataArrayDouble() { return _map_dataarray_double; }
 
-    std::map<std::string,int>& getFamilyInfo() { return _family_info; }
+    std::map<std::string,mcIdType>& getFamilyInfo() { return _family_info; }
     std::map<std::string, std::vector<std::string> >& getGroupInfo() { return _group_info; }
 
     MEDCoupling::DataArrayDouble* getField(std::string descriptionField, int iold);
@@ -138,20 +138,20 @@ namespace MEDPARTITIONER
 
     //creates the node mapping between an old collection and the present one
     void createNodeMapping(MeshCollection& initialCollection, 
-                           std::multimap<std::pair<int,int>,std::pair<int,int> >& nodeMapping);
+                           std::multimap<std::pair<int,mcIdType>,std::pair<int,mcIdType> >& nodeMapping);
     
     void castCellMeshes(MeshCollection& initialCollection, 
-                        std::vector<std::vector<std::vector<int> > >& new2oldIds,
-                        std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber);
+                        std::vector<std::vector<std::vector<mcIdType> > >& new2oldIds,
+                        std::vector<MEDCoupling::DataArrayIdType*> & o2nRenumber);
     
     //creates faces on the new collection
     void castFaceMeshes(MeshCollection& initialCollection,
-                        const std::multimap<std::pair<int,int>, std::pair<int,int> >& nodeMapping,
-                        std::vector<std::vector<std::vector<int> > >& new2oldIds);
+                        const std::multimap<std::pair<int,mcIdType>, std::pair<int,mcIdType> >& nodeMapping,
+                        std::vector<std::vector<std::vector<mcIdType> > >& new2oldIds);
 
     //constructing connect zones
     void buildConnectZones( const NodeMapping& nodeMapping,
-                            const std::vector<MEDCoupling::DataArrayInt*> & o2nRenumber,
+                            const std::vector<MEDCoupling::DataArrayIdType*> & o2nRenumber,
                             int nbInitialDomains );
 
     // Find faces common with neighbor domains and put them in groups
@@ -160,19 +160,19 @@ namespace MEDPARTITIONER
   private:
     void castIntField(std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastFrom,
                        std::vector<MEDCoupling::MEDCouplingUMesh*>& meshesCastTo,
-                       std::vector<MEDCoupling::DataArrayInt*>& arrayFrom,
+                       std::vector<MEDCoupling::DataArrayIdType*>& arrayFrom,
                        std::string nameArrayTo);
 
     void castAllFields(MeshCollection& initialCollection,
                        std::string nameArrayTo);
 
-    void findCommonDistantNodes(std::vector<std::vector<std::multimap<int,int> > >& commonDistantNodes);
+    void findCommonDistantNodes(std::vector<std::vector<std::multimap<int,mcIdType> > >& commonDistantNodes);
 
     
     void remapIntField(int inew, int iold, 
                        const MEDCoupling::MEDCouplingUMesh& sourceMesh,
                        const MEDCoupling::MEDCouplingUMesh& targetMesh,
-                       const int* fromArray,
+                       const mcIdType* fromArray,
                        std::string nameArrayTo,
                        const BBTreeOfDim* tree);
 
@@ -181,7 +181,7 @@ namespace MEDPARTITIONER
                            std::string nameArrayTo,
                            std::string descriptionField);
 
-    void createJointGroup( const std::vector< int >& faces,
+    void createJointGroup( const std::vector< mcIdType >& faces,
                            const int                 inew1,
                            const int                 inew2,
                            const bool                is2nd );
@@ -207,11 +207,11 @@ namespace MEDPARTITIONER
     int _i_non_empty_mesh;
     
     //family ids storages
-    std::vector<MEDCoupling::DataArrayInt*> _cell_family_ids;
-    std::vector<MEDCoupling::DataArrayInt*> _face_family_ids;
+    std::vector<MEDCoupling::DataArrayIdType*> _cell_family_ids;
+    std::vector<MEDCoupling::DataArrayIdType*> _face_family_ids;
     
     //DataArrayInt* storages
-    std::map<std::string, MEDCoupling::DataArrayInt*> _map_dataarray_int;
+    std::map<std::string, MEDCoupling::DataArrayIdType*> _map_dataarray_int;
     //DataArrayDouble* storages
     std::map<std::string, MEDCoupling::DataArrayDouble*> _map_dataarray_double;
     
@@ -219,7 +219,7 @@ namespace MEDPARTITIONER
     std::vector<std::string> _field_descriptions;
     
     //group family conversion
-    std::map<std::string, int> _family_info;
+    std::map<std::string, mcIdType> _family_info;
     std::map<std::string, std::vector<std::string> > _group_info;
   
     //list of groups that are not to be split
index d01d9e0680c6f7328bf77bc331deecfd191b78fa..2e6ec0e46730b28d37a4d1542495f78a51e3033e 100644 (file)
@@ -72,8 +72,8 @@ int MeshCollectionDriver::readSeq(const char* filename, const char* meshname)
   (_collection->getFaceMesh()).push_back(mfm->getLevelM1Mesh(false));
 
   //reading family ids
-  MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCopy());
-  MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCopy());
+  MEDCoupling::DataArrayIdType* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCopy());
+  MEDCoupling::DataArrayIdType* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCopy());
   (_collection->getCellFamilyIds()).push_back(cellIds);
   (_collection->getFaceFamilyIds()).push_back(faceIds); 
 
@@ -136,13 +136,13 @@ void MeshCollectionDriver::readData(MEDCoupling::MEDFileUMesh* mfm, int idomain)
     {
       (_collection->getMesh())[idomain]=mfm->getLevel0Mesh(false);
       //reading families groups
-      MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCopy());
+      MEDCoupling::DataArrayIdType* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCopy());
       (_collection->getCellFamilyIds())[idomain]=cellIds;
     }
   catch(...)
     {
       (_collection->getMesh())[idomain]=CreateEmptyMEDCouplingUMesh(); // or 0 if you want tests;
-      MEDCoupling::DataArrayInt* empty=MEDCoupling::DataArrayInt::New();
+      MEDCoupling::DataArrayIdType* empty=MEDCoupling::DataArrayIdType::New();
       empty->alloc(0,1);
       (_collection->getCellFamilyIds())[idomain]=empty;
       std::cout<<"\nNO Level0Mesh (Cells)\n";
@@ -153,7 +153,7 @@ void MeshCollectionDriver::readData(MEDCoupling::MEDFileUMesh* mfm, int idomain)
         {
           (_collection->getFaceMesh())[idomain]=mfm->getLevelM1Mesh(false);
           //reading families groups
-          MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCopy());
+          MEDCoupling::DataArrayIdType* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCopy());
           (_collection->getFaceFamilyIds())[idomain]=faceIds;
           if (MyGlobals::_Verbose>10)
             std::cout << "proc " << MyGlobals::_Rank << " : WITH Faces\n";
@@ -166,7 +166,7 @@ void MeshCollectionDriver::readData(MEDCoupling::MEDFileUMesh* mfm, int idomain)
   catch(...)
     {
       (_collection->getFaceMesh())[idomain]=CreateEmptyMEDCouplingUMesh(); // or 0 if you want test;
-      MEDCoupling::DataArrayInt* empty=MEDCoupling::DataArrayInt::New();
+      MEDCoupling::DataArrayIdType* empty=MEDCoupling::DataArrayIdType::New();
       (_collection->getFaceFamilyIds())[idomain]=empty;
       if (MyGlobals::_Verbose>10)
         std::cout << "proc " << MyGlobals::_Rank << " : WITHOUT Faces\n";
@@ -304,7 +304,7 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const
               j1st->pushCorrespondence( corr );
             }
 
-          std::vector< std::pair< int,int > > types = cz->getEntities();
+          std::vector< std::pair< mcIdType,mcIdType > > types = cz->getEntities();
           INTERP_KERNEL::NormalizedCellType t1, t2;
           for ( size_t it = 0; it < types.size(); ++it )
             {
@@ -368,10 +368,10 @@ MEDCoupling::MEDCouplingFieldDouble* MeshCollectionDriver::getField(std::string
       r1=SelectTagsInVectorOfString(r1,"DT="+IntToStr(DT));
       r1=SelectTagsInVectorOfString(r1,"IT="+IntToStr(IT));
       //not saved in file? field->setDescription(ExtractFromDescription(r1[0], "fieldDescription="));
-      int nbc=StrToInt(ExtractFromDescription(r1[0], "nbComponents="));
+      std::size_t nbc=StrToInt(ExtractFromDescription(r1[0], "nbComponents="));
       if (nbc==da->getNumberOfComponents())
         {
-          for (int i=0; i<nbc; i++)
+          for (unsigned int i=0; i<nbc; i++)
             da->setInfoOnComponent(i,ExtractFromDescription(r1[0], "componentInfo"+IntToStr(i)+"="));
         }
       else
@@ -429,7 +429,7 @@ MEDCoupling::MEDFileData* MeshCollectionDriver::getMEDFileData()
   meshes = MEDCoupling::MEDFileMeshes::New();
   fields = MEDCoupling::MEDFileFields::New();
 
-  for (size_t i=0; i<_collection->getMesh().size(); i++)
+  for (unsigned int i=0; i<_collection->getMesh().size(); i++)
     {
       MEDCoupling::MEDFileMesh* mfm = getMesh( i );
       meshes->pushMesh(mfm);
index 3da899e5fe5f7da1eacabe6b0f6da0e7208a6831..0fd977b0613bf181af280b46e1e9664795ba4d17 100644 (file)
@@ -58,14 +58,14 @@ int MeshCollectionMedAsciiDriver::read(MEDCoupling::MEDFileData* filedata)
   readMEDFileData(filedata);
 
   std::vector<MEDPARTITIONER::ConnectZone*> cz; // to fill from filedata
-  std::vector<int*> cellglobal;
-  std::vector<int*> nodeglobal;
-  std::vector<int*> faceglobal;
-  int size = (_collection->getMesh()).size();
+  std::vector<mcIdType*> cellglobal;
+  std::vector<mcIdType*> nodeglobal;
+  std::vector<mcIdType*> faceglobal;
+  std::size_t size = _collection->getMesh().size();
   cellglobal.resize(size);
   nodeglobal.resize(size);
   faceglobal.resize(size);
-  for ( int idomain = 0; idomain < size; ++idomain )
+  for ( unsigned int idomain = 0; idomain < size; ++idomain )
     {
       cellglobal[idomain]=0;
       faceglobal[idomain]=0;
@@ -90,9 +90,9 @@ int MeshCollectionMedAsciiDriver::read(MEDCoupling::MEDFileData* filedata)
 int MeshCollectionMedAsciiDriver::read(const char* filename, ParaDomainSelector* domainSelector)
 {
   //distributed meshes
-  std::vector<int*> cellglobal;
-  std::vector<int*> nodeglobal;
-  std::vector<int*> faceglobal;
+  std::vector<mcIdType*> cellglobal;
+  std::vector<mcIdType*> nodeglobal;
+  std::vector<mcIdType*> faceglobal;
   int nbdomain;
 
   //reading ascii master file
@@ -168,12 +168,12 @@ int MeshCollectionMedAsciiDriver::read(const char* filename, ParaDomainSelector*
  */
 void MeshCollectionMedAsciiDriver::write(const char* filename, ParaDomainSelector* domainSelector) const
 {
-  int nbdomains=_collection->getMesh().size();
+  std::size_t nbdomains=_collection->getMesh().size();
   std::vector<std::string> filenames;
   filenames.resize(nbdomains);
 
   //loop on the domains
-  for (int idomain=0; idomain<nbdomains; idomain++)
+  for (unsigned idomain=0; idomain<nbdomains; idomain++)
     {
       std::string distfilename;
       std::ostringstream suffix;
@@ -198,7 +198,7 @@ void MeshCollectionMedAsciiDriver::write(const char* filename, ParaDomainSelecto
       file << "#" << " " << std::endl;
       file << _collection->getMesh().size() << " " << std::endl;
 
-      for (int idomain=0; idomain<nbdomains; idomain++)
+      for (std::size_t idomain=0; idomain<nbdomains; idomain++)
         file << _collection->getName() <<" "<< idomain+1 << " "
              << (_collection->getMesh())[idomain]->getName() << " localhost "
              << filenames[idomain] << " "<< std::endl;
index ba130e9b512fd0d2cfc117a56fa9579fe8ec421d..79a47276427e76804b5ebf7d660d3350e1c02c0a 100644 (file)
@@ -242,7 +242,7 @@ void MeshCollectionMedXmlDriver::write(const char* filename, ParaDomainSelector*
   xmlNodePtr mesh_node = xmlNewChild(node, 0, BAD_CAST "mesh",0);
   xmlNewProp(mesh_node, BAD_CAST "name", BAD_CAST _collection->getName().c_str());
 
-  int nbdomains= _collection->getMesh().size();
+  int nbdomains= _collection->getNbOfGlobalMeshes();
 
   //loop on the domains
   std::string finalMeshName="";
index 561d366ec68b2fc4ff7b4a65a99349f2052d8d31..6f20908ee86c10200474fe49e886bf904f372e95 100644 (file)
@@ -55,10 +55,17 @@ void METISGraph::partGraph(int ndomain,
     std::cout << "proc " << MyGlobals::_Rank << " : METISGraph::partGraph" << std::endl;
   
   //number of graph vertices
-  int n=_graph->getNumberOf();
+  int n=FromIdType<int>(_graph->getNumberOf());
   //graph
+#ifdef MEDCOUPLING_USE_64BIT_IDS
+  std::vector<int> indexVec( _graph->getIndex(), _graph->getIndexArray()->end() );
+  std::vector<int> valueVec( _graph->getValues(), _graph->getValuesArray()->end() );
+  int * xadj=indexVec.data();
+  int * adjncy=valueVec.data();
+#else
   int * xadj=const_cast<int*>(_graph->getIndex());
   int * adjncy=const_cast<int*>(_graph->getValues());
+#endif
   //constraints
   int * vwgt=_cell_weight;
   int * adjwgt=_edge_weight;
@@ -100,13 +107,13 @@ void METISGraph::partGraph(int ndomain,
       for (int i=0; i<n; i++)
         partition[i]=0;
     }
-  vector<int> index(n+1);
-  vector<int> value(n);
+  vector<mcIdType> index(n+1);
+  vector<mcIdType> value(n);
   index[0]=0;
   for (int i=0; i<n; i++)
     {
       index[i+1]=index[i]+1;
-      value[i]=partition[i];
+      value[i]=ToIdType(partition[i]);
     }
   delete [] partition;
 
index 9a23993945d4d800f9d35507933aad1651801ed3..3d44cb216c01286afcff6d0ecd2a419bf8b10a3f 100644 (file)
@@ -52,10 +52,17 @@ void PTSCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Pa
     std::cout << "proc " << MyGlobals::_Rank << " : PTSCOTCHGraph::partGraph" << std::endl;
   
   //number of graph vertices
-  int n = _graph->getNumberOf();
+  int n = FromIdType<int>(_graph->getNumberOf());
   //graph
+#ifdef MEDCOUPLING_USE_64BIT_IDS
+  std::vector<int> indexVec( _graph->getIndex(), _graph->getIndexArray()->end() );
+  std::vector<int> valueVec( _graph->getValues(), _graph->getValuesArray()->end() );
+  int * xadj=indexVec.data();
+  int * adjncy=valueVec.data();
+#else
   int * xadj=const_cast<int*>(_graph->getIndex());
   int * adjncy=const_cast<int*>(_graph->getValues());
+#endif
   //ndomain
   int nparts=ndomain;
 
@@ -104,13 +111,13 @@ void PTSCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Pa
   SCOTCH_stratExit(&scotch_strategy);
   SCOTCH_dgraphExit(&scotch_graph);
 
-  std::vector<int> index(n+1);
-  std::vector<int> value(n);
+  std::vector<mcIdType> index(n+1);
+  std::vector<mcIdType> value(n);
   index[0]=0;
   for (int i=0; i<n; i++)
     {
       index[i+1]=index[i]+1;
-      value[i]=partition[i];
+      value[i]=ToIdType(partition[i]);
     }
   delete [] partition;
   
@@ -120,4 +127,3 @@ void PTSCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Pa
   _partition = MEDCoupling::MEDCouplingSkyLineArray::New(index,value);
 #endif
 }
-
index 1dc6919c587b5e82dda2bc1605e970a8afa9763a..4ced8513eb8e899b3c8e53466cb2d10d16c066f4 100644 (file)
@@ -59,10 +59,17 @@ void ParMETISGraph::partGraph(int ndomain,
     std::cout << "proc " << MyGlobals::_Rank << " : ParMETISGraph::partGraph" << std::endl;
   
   // number of graph vertices
-  int n=_graph->getNumberOf();
+  int n=FromIdType<int>(_graph->getNumberOf());
   //graph
+#ifdef MEDCOUPLING_USE_64BIT_IDS
+  std::vector<int> indexVec( _graph->getIndex(), _graph->getIndexArray()->end() );
+  std::vector<int> valueVec( _graph->getValues(), _graph->getValuesArray()->end() );
+  int * xadj=indexVec.data();
+  int * adjncy=valueVec.data();
+#else
   int * xadj=const_cast<int*>(_graph->getIndex());
   int * adjncy=const_cast<int*>(_graph->getValues());
++#endif
   //constraints
   int * vwgt=_cell_weight;
   int * adjwgt=_edge_weight;
@@ -110,8 +117,8 @@ void ParMETISGraph::partGraph(int ndomain,
     MPI_Comm *comm);
   */
 
-  vector<int> index(n+1);
-  vector<int> value(n);
+  vector<mcIdType> index(n+1);
+  vector<mcIdType> value(n);
   index[0]=0;
   if (ran.size()>0 && MyGlobals::_Atomize==0) //there is randomize
     {
@@ -120,7 +127,7 @@ void ParMETISGraph::partGraph(int ndomain,
       for (int i=0; i<n; i++)
         {
           index[i+1]=index[i]+1;
-          value[ran[i]]=partition[i];
+          value[ran[i]]=ToIdType(partition[i]);
         }
     }
   else
@@ -128,7 +135,7 @@ void ParMETISGraph::partGraph(int ndomain,
       for (int i=0; i<n; i++)
         {
           index[i+1]=index[i]+1;
-          value[i]=partition[i];
+          value[i]=ToIdType(partition[i]);
         }
     }
   delete [] partition;
index 2557c0e3a2fb5ca228bbd03917d496eeefeed51d..d13886c5487756118e8dac1fa49ffb9486a3768c 100644 (file)
 #include "MEDPARTITIONER_ParaDomainSelector.hxx"
 #include "MEDPARTITIONER_UserGraph.hxx"
 #include "MEDPARTITIONER_Utils.hxx"
+#include "MEDPARTITIONER_Utils.hxx"
 
 #include "MEDCouplingUMesh.hxx"
 #include "MEDCouplingSkyLineArray.hxx"
+#include "MCIdType.hxx"
 
 #include <iostream>
 #include <numeric>
 
 #ifdef HAVE_MPI
+
 #include <mpi.h>
+
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+#define MPI_ID_TYPE MPI_INT
+#else
+#define MPI_ID_TYPE MPI_LONG
+#endif
+
 #endif
 
 /*!
@@ -137,8 +147,8 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<MEDCouplin
 {
   evaluateMemory();
   // get nb of elems of each domain mesh
-  int nb_domains=domain_meshes.size();
-  std::vector<int> nb_elems(nb_domains*2, 0); //NumberOfCells & NumberOfNodes
+  int nb_domains=(int)domain_meshes.size();
+  std::vector<mcIdType> nb_elems(nb_domains*2, 0); //NumberOfCells & NumberOfNodes
   for (int i=0; i<nb_domains; ++i)
     if ( domain_meshes[i] )
       {
@@ -146,7 +156,7 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<MEDCouplin
         nb_elems[i*2+1] = domain_meshes[i]->getNumberOfNodes();
       }
   // receive nb of elems from other procs
-  std::vector<int> all_nb_elems;
+  std::vector<mcIdType> all_nb_elems;
   if (MyGlobals::_World_Size==1)
     {
       all_nb_elems=nb_elems;
@@ -155,12 +165,12 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<MEDCouplin
     {
 #ifdef HAVE_MPI
       all_nb_elems.resize( nb_domains*2 );
-      MPI_Allreduce((void*)&nb_elems[0], (void*)&all_nb_elems[0], nb_domains*2, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
+      MPI_Allreduce((void*)&nb_elems[0], (void*)&all_nb_elems[0], nb_domains*2, MPI_ID_TYPE, MPI_SUM, MPI_COMM_WORLD);
 #else
       throw INTERP_KERNEL::Exception("not(HAVE_MPI) incompatible with MPI_World_Size>1");
 #endif
    }
-  int total_nb_cells=0, total_nb_nodes=0;
+  mcIdType total_nb_cells=0, total_nb_nodes=0;
   for (int i=0; i<nb_domains; ++i)
     {
       total_nb_cells+=all_nb_elems[i*2];
@@ -170,18 +180,18 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<MEDCouplin
   if (MyGlobals::_Is0verbose>10)
     std::cout << "totalNbCells " << total_nb_cells << " totalNbNodes " << total_nb_nodes << std::endl;
   
-  std::vector<int>& cell_shift_by_domain=_cell_shift_by_domain;
-  std::vector<int>& node_shift_by_domain=_node_shift_by_domain;
-  std::vector<int>& face_shift_by_domain=_face_shift_by_domain;
+  std::vector<mcIdType>& cell_shift_by_domain=_cell_shift_by_domain;
+  std::vector<mcIdType>& node_shift_by_domain=_node_shift_by_domain;
+  std::vector<mcIdType>& face_shift_by_domain=_face_shift_by_domain;
  
-  std::vector< int > ordered_nbs_cell, ordered_nbs_node, domain_order(nb_domains);
+  std::vector< mcIdType > ordered_nbs_cell, ordered_nbs_node, domain_order(nb_domains);
   ordered_nbs_cell.push_back(0);
   ordered_nbs_node.push_back(0);
   for (int iproc=0; iproc<nbProcs(); ++iproc)
     for (int idomain=0; idomain<nb_domains; ++idomain)
       if (getProcessorID( idomain )==iproc)
         {
-          domain_order[idomain] = ordered_nbs_cell.size() - 1;
+          domain_order[idomain] = ToIdType( ordered_nbs_cell.size() - 1 );
           ordered_nbs_cell.push_back( ordered_nbs_cell.back() + all_nb_elems[idomain*2] );
           ordered_nbs_node.push_back( ordered_nbs_node.back() + all_nb_elems[idomain*2+1] );
         }
@@ -238,12 +248,12 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbOf(const std::vector<MEDCouplin
  * The result array is to be used as the first arg of ParMETIS_V3_PartKway() and
  * is freed by ParaDomainSelector.
  */
-int *MEDPARTITIONER::ParaDomainSelector::getProcVtxdist() const
+mcIdType *MEDPARTITIONER::ParaDomainSelector::getProcVtxdist() const
 {
   evaluateMemory();
   if (_nb_vert_of_procs.empty())
     throw INTERP_KERNEL::Exception("_nb_vert_of_procs not set");
-  return const_cast<int*>(& _nb_vert_of_procs[0]);
+  return const_cast<mcIdType*>(& _nb_vert_of_procs[0]);
 }
 
 /*!
@@ -252,7 +262,7 @@ int *MEDPARTITIONER::ParaDomainSelector::getProcVtxdist() const
  * gatherNbOf() must be called before.
  * Result added to local id on given domain gives id in the whole distributed mesh
  */
-int MEDPARTITIONER::ParaDomainSelector::getDomainCellShift(int domainIndex) const
+mcIdType MEDPARTITIONER::ParaDomainSelector::getDomainCellShift(int domainIndex) const
 {
   evaluateMemory();
   if (_cell_shift_by_domain.empty())
@@ -260,7 +270,7 @@ int MEDPARTITIONER::ParaDomainSelector::getDomainCellShift(int domainIndex) cons
   return _cell_shift_by_domain[domainIndex];
 }
 
-int MEDPARTITIONER::ParaDomainSelector::getDomainNodeShift(int domainIndex) const
+mcIdType MEDPARTITIONER::ParaDomainSelector::getDomainNodeShift(int domainIndex) const
 {
   evaluateMemory();
   if (_node_shift_by_domain.empty())
@@ -274,7 +284,7 @@ int MEDPARTITIONER::ParaDomainSelector::getDomainNodeShift(int domainIndex) cons
  * gatherNbOf() must be called before.
  * Result added to global id on this processor gives id in the whole distributed mesh
  */
-int MEDPARTITIONER::ParaDomainSelector::getProcNodeShift() const
+mcIdType MEDPARTITIONER::ParaDomainSelector::getProcNodeShift() const
 {
   evaluateMemory();
   if (_nb_vert_of_procs.empty())
@@ -298,20 +308,21 @@ std::unique_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gathe
 
   std::vector<int> index_size_of_proc( nbProcs() ); // index sizes - 1
   for ( std::size_t i = 1; i < _nb_vert_of_procs.size(); ++i )
-    index_size_of_proc[i-1] = _nb_vert_of_procs[ i ] - _nb_vert_of_procs[ i-1 ];
+    index_size_of_proc[i-1] = FromIdType<int>(_nb_vert_of_procs[ i ] - _nb_vert_of_procs[ i-1 ]);
 
-  int index_size = 1 + _cell_shift_by_domain.back();
-  int *graph_index = new int[ index_size ];
-  const int *index = graph->getGraph()->getIndex();
-  int *proc_index_displacement = const_cast<int*>( & _nb_vert_of_procs[0] );
+  mcIdType index_size = 1 + _cell_shift_by_domain.back();
+  mcIdType *graph_index = new mcIdType[ index_size ];
+  const mcIdType *index = graph->getGraph()->getIndex();
+  MCAuto< DataArrayInt > nb_vert_of_procs = FromIdTypeVec( _nb_vert_of_procs );
+  int *proc_index_displacement = nb_vert_of_procs->getPointer();
 
   MPI_Allgatherv((void*) (index+1),         // send local index except first 0 (or 1)
                  index_size_of_proc[_rank], // index size on this proc
-                 MPI_INT,
+                 MPI_ID_TYPE,
                  (void*) graph_index,       // receive indices
                  & index_size_of_proc[0],   // index size on each proc
                  proc_index_displacement,   // displacement of each proc index
-                 MPI_INT,
+                 MPI_ID_TYPE,
                  MPI_COMM_WORLD);
   graph_index[0] = index[0]; // it is not overwritten thanks to proc_index_displacement[0]==1
 
@@ -320,7 +331,7 @@ std::unique_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gathe
   for ( int i = 0; i < nbProcs(); ++i )
     {
       if ( index_size_of_proc[i] > 0 )
-        value_size_of_proc[i] = graph_index[ proc_index_displacement[ i+1 ]-1 ] - graph_index[0];
+        value_size_of_proc[i] = (int)(graph_index[ proc_index_displacement[ i+1 ]-1 ] - graph_index[0]);
       else
         value_size_of_proc[i] = 0;
       proc_value_displacement.push_back( proc_value_displacement.back() + value_size_of_proc[i] );
@@ -329,7 +340,7 @@ std::unique_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gathe
   // update graph_index
   for ( int i = 1; i < nbProcs(); ++i )
     {
-      int shift = graph_index[ proc_index_displacement[i]-1 ]-graph_index[0];
+      mcIdType shift = graph_index[ proc_index_displacement[i]-1 ]-graph_index[0];
       for ( int j = proc_index_displacement[i]; j < proc_index_displacement[i+1]; ++j )
         graph_index[ j ] += shift;
     }
@@ -338,33 +349,33 @@ std::unique_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gathe
   // Gather values
   // --------------
 
-  int value_size = graph_index[ index_size-1 ] - graph_index[ 0 ];
-  int *graph_value = new int[ value_size ];
-  const int *value = graph->getGraph()->getValues();
+  mcIdType value_size = graph_index[ index_size-1 ] - graph_index[ 0 ];
+  mcIdType *graph_value = new mcIdType[ value_size ];
+  const mcIdType *value = graph->getGraph()->getValues();
 
   MPI_Allgatherv((void*) value,                // send local value
                  value_size_of_proc[_rank],    // value size on this proc
-                 MPI_INT,
+                 MPI_ID_TYPE,
                  (void*) graph_value,          // receive values
                  & value_size_of_proc[0],      // value size on each proc
                  & proc_value_displacement[0], // displacement of each proc value
-                 MPI_INT,
+                 MPI_ID_TYPE,
                  MPI_COMM_WORLD);
 
   // -----------------
   // Gather partition
   // -----------------
 
-  int * partition = new int[ _cell_shift_by_domain.back() ];
-  const int* part = graph->getPart();
+  mcIdType * partition = new mcIdType[ _cell_shift_by_domain.back() ];
+  const mcIdType* part = graph->getPart();
   
   MPI_Allgatherv((void*) part,              // send local partition
                  index_size_of_proc[_rank], // index size on this proc
-                 MPI_INT,
+                 MPI_ID_TYPE,
                  (void*)(partition-1),      // -1 compensates proc_index_displacement[0]==1
                  & index_size_of_proc[0],   // index size on each proc
                  proc_index_displacement,   // displacement of each proc index
-                 MPI_INT,
+                 MPI_ID_TYPE,
                  MPI_COMM_WORLD);
 
   // -----------
@@ -389,7 +400,7 @@ std::unique_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gathe
 /*!
  * \brief Set nb of cell/cell pairs in a joint between domains
  */
-void MEDPARTITIONER::ParaDomainSelector::setNbCellPairs( int nb_cell_pairs, int dist_domain, int loc_domain )
+void MEDPARTITIONER::ParaDomainSelector::setNbCellPairs( mcIdType nb_cell_pairs, int dist_domain, int loc_domain )
 {
   // This method is needed for further computing global numbers of faces in joint.
   // Store if both domains are on this proc else on one of procs only
@@ -410,7 +421,7 @@ void MEDPARTITIONER::ParaDomainSelector::setNbCellPairs( int nb_cell_pairs, int
  */
 //================================================================================
 
-int MEDPARTITIONER::ParaDomainSelector::getNbCellPairs( int dist_domain, int loc_domain ) const
+mcIdType MEDPARTITIONER::ParaDomainSelector::getNbCellPairs( int dist_domain, int loc_domain ) const
 {
   evaluateMemory();
 
@@ -430,12 +441,12 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbCellPairs()
     _nb_cell_pairs_by_joint.resize( _nb_result_domains*(_nb_result_domains+1), 0);
   evaluateMemory();
 
-  std::vector< int > send_buf = _nb_cell_pairs_by_joint;
+  std::vector< mcIdType > send_buf = _nb_cell_pairs_by_joint;
 #ifdef HAVE_MPI
   MPI_Allreduce((void*)&send_buf[0],
                 (void*)&_nb_cell_pairs_by_joint[0],
-                _nb_cell_pairs_by_joint.size(),
-                MPI_INT, MPI_SUM, MPI_COMM_WORLD);
+                (int)_nb_cell_pairs_by_joint.size(),
+                MPI_ID_TYPE, MPI_SUM, MPI_COMM_WORLD);
 #endif
   // check that the set nbs of cell pairs are correct,
   // namely that each joint is treated on one proc only
@@ -450,14 +461,14 @@ void MEDPARTITIONER::ParaDomainSelector::gatherNbCellPairs()
  */
 //================================================================================
 
-int MEDPARTITIONER::ParaDomainSelector::getFisrtGlobalIdOfSubentity( int loc_domain, int dist_domain ) const
+mcIdType MEDPARTITIONER::ParaDomainSelector::getFisrtGlobalIdOfSubentity( int loc_domain, int dist_domain ) const
 {
   // total_nb_faces includes faces existing before creation of joint faces
   // (got in gatherNbOf( MED_FACE )).
   evaluateMemory();
 
-  int total_nb_faces = _face_shift_by_domain.empty() ? 0 : _face_shift_by_domain.back();
-  int id = total_nb_faces + 1;
+  mcIdType total_nb_faces = _face_shift_by_domain.empty() ? 0 : _face_shift_by_domain.back();
+  mcIdType id = total_nb_faces + 1;
 
   if ( _nb_cell_pairs_by_joint.empty() )
     throw INTERP_KERNEL::Exception("gatherNbCellPairs() must be called before");
@@ -482,8 +493,8 @@ int *MEDPARTITIONER::ParaDomainSelector::exchangeSubentityIds( int loc_domain, i
   int dest = getProcessorID( dist_domain );
   int tag  = 2002 + jointId( loc_domain, dist_domain );
   MPI_Status status;
-  MPI_Sendrecv((void*)&loc_ids_here[0], loc_ids_here.size(), MPI_INT, dest, tag,
-               (void*) loc_ids_dist,    loc_ids_here.size(), MPI_INT, dest, tag,
+  MPI_Sendrecv((void*)&loc_ids_here[0], (int)loc_ids_here.size(), MPI_INT, dest, tag,
+               (void*) loc_ids_dist,    (int)loc_ids_here.size(), MPI_INT, dest, tag,
                MPI_COMM_WORLD, &status);  
 #endif
   evaluateMemory();
@@ -539,36 +550,36 @@ void MEDPARTITIONER::ParaDomainSelector::sendMesh(const MEDCoupling::MEDCoupling
     std::cout << "proc " << _rank << " : sendMesh '" << mesh.getName() << "' size " << mesh.getNumberOfCells() << " to " << target << std::endl;
   // First stage : sending sizes
   // ------------------------------
-  std::vector<int> tinyInfoLocal;
+  std::vector<mcIdType> tinyInfoLocal;
   std::vector<std::string> tinyInfoLocalS;
   std::vector<double> tinyInfoLocalD;
   //Getting tiny info of local mesh to allow the distant proc to initialize and allocate
   //the transmitted mesh.
   mesh.getTinySerializationInformation(tinyInfoLocalD,tinyInfoLocal,tinyInfoLocalS);
   tinyInfoLocal.push_back(mesh.getNumberOfCells());
-  int tinySize=tinyInfoLocal.size();
+  int tinySize=(int)tinyInfoLocal.size();
   MPI_Send(&tinySize, 1, MPI_INT, target, 1113, MPI_COMM_WORLD);
-  MPI_Send(&tinyInfoLocal[0], tinyInfoLocal.size(), MPI_INT, target, 1112, MPI_COMM_WORLD);
+  MPI_Send(&tinyInfoLocal[0], (int)tinyInfoLocal.size(), MPI_ID_TYPE, target, 1112, MPI_COMM_WORLD);
 
   if (mesh.getNumberOfCells()>0) //no sends if empty
     {
-      MEDCoupling::DataArrayInt *v1Local=0;
+      MEDCoupling::DataArrayIdType *v1Local=0;
       MEDCoupling::DataArrayDouble *v2Local=0;
       //serialization of local mesh to send data to distant proc.
       mesh.serialize(v1Local,v2Local);
       int nbLocalElems=0;
-      int* ptLocal=0;
+      mcIdType* ptLocal=0;
       if(v1Local) //if empty getNbOfElems() is 1!
         {
-          nbLocalElems=v1Local->getNbOfElems(); // if empty be 1!
+          nbLocalElems=FromIdType<int>(v1Local->getNbOfElems()); // if empty be 1!
           ptLocal=v1Local->getPointer();
         }
-      MPI_Send(ptLocal, nbLocalElems, MPI_INT, target, 1111, MPI_COMM_WORLD);
+      MPI_Send(ptLocal, nbLocalElems, MPI_ID_TYPE, target, 1111, MPI_COMM_WORLD);
       int nbLocalElems2=0;
       double *ptLocal2=0;
       if(v2Local) //if empty be 0!
         {
-          nbLocalElems2=v2Local->getNbOfElems();
+          nbLocalElems2=FromIdType<int>(v2Local->getNbOfElems());
           ptLocal2=v2Local->getPointer();
         }
       MPI_Send(ptLocal2, nbLocalElems2, MPI_DOUBLE, target, 1110, MPI_COMM_WORLD);
@@ -590,7 +601,7 @@ void MEDPARTITIONER::ParaDomainSelector::recvMesh(MEDCoupling::MEDCouplingUMesh*
 #else
   // First stage : exchanging sizes
   // ------------------------------
-  std::vector<int> tinyInfoDistant;
+  std::vector<mcIdType> tinyInfoDistant;
   std::vector<std::string> tinyInfoLocalS;
   std::vector<double> tinyInfoDistantD(1);
   //Getting tiny info of local mesh to allow the distant proc to initialize and allocate
@@ -601,12 +612,12 @@ void MEDPARTITIONER::ParaDomainSelector::recvMesh(MEDCoupling::MEDCouplingUMesh*
   tinyInfoDistant.resize(tinyVecSize);
   std::fill(tinyInfoDistant.begin(),tinyInfoDistant.end(),0);
 
-  MPI_Recv(&tinyInfoDistant[0], tinyVecSize, MPI_INT,source,1112,MPI_COMM_WORLD, &status);
+  MPI_Recv(&tinyInfoDistant[0], tinyVecSize, MPI_ID_TYPE,source,1112,MPI_COMM_WORLD, &status);
   //there was tinyInfoLocal.push_back(mesh.getNumberOfCells());
-  int NumberOfCells=tinyInfoDistant[tinyVecSize-1];
+  mcIdType NumberOfCells=tinyInfoDistant[tinyVecSize-1];
   if (NumberOfCells>0)
     {
-      MEDCoupling::DataArrayInt *v1Distant=MEDCoupling::DataArrayInt::New();
+      MEDCoupling::DataArrayIdType *v1Distant=MEDCoupling::DataArrayIdType::New();
       MEDCoupling::DataArrayDouble *v2Distant=MEDCoupling::DataArrayDouble::New();
       //Building the right instance of copy of distant mesh.
       MEDCoupling::MEDCouplingPointSet *distant_mesh_tmp=
@@ -617,18 +628,18 @@ void MEDPARTITIONER::ParaDomainSelector::recvMesh(MEDCoupling::MEDCouplingUMesh*
  
       mesh->resizeForUnserialization(tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
       int nbDistElem=0;
-      int *ptDist=0;
+      mcIdType *ptDist=0;
       if(v1Distant)
         {
-          nbDistElem=v1Distant->getNbOfElems();
+          nbDistElem=FromIdType<int>(v1Distant->getNbOfElems());
           ptDist=v1Distant->getPointer();
         }
-      MPI_Recv(ptDist, nbDistElem, MPI_INT, source,1111, MPI_COMM_WORLD, &status);
+      MPI_Recv(ptDist, nbDistElem, MPI_ID_TYPE, source,1111, MPI_COMM_WORLD, &status);
       double *ptDist2=0;
       nbDistElem=0;
       if(v2Distant)
         {
-          nbDistElem=v2Distant->getNbOfElems();
+          nbDistElem=FromIdType<int>(v2Distant->getNbOfElems());
           ptDist2=v2Distant->getPointer();
         }
       MPI_Recv(ptDist2, nbDistElem, MPI_DOUBLE,source, 1110, MPI_COMM_WORLD, &status);
@@ -662,7 +673,7 @@ int MEDPARTITIONER::ParaDomainSelector::evaluateMemory() const
       struct sysinfo si;
       int err = sysinfo( &si );
       if ( !err )
-        used_memory = (( si.totalram - si.freeram + si.totalswap - si.freeswap ) * si.mem_unit ) / 1024;
+        used_memory = (int)(( si.totalram - si.freeram + si.totalswap - si.freeswap ) * si.mem_unit ) / 1024;
 #endif
       if ( used_memory > _max_memory )
         _max_memory = used_memory;
index 9a371e498cc5372a8395f93f0d7ca9ce4accc8b8..ef94256a339bddfadee8f93d244a7729af52f107 100644 (file)
@@ -21,6 +21,7 @@
 #define __MEDPARTITIONER_PARADOMAINSELECTOR_HXX__
 
 #include "MEDPARTITIONER.hxx"
+#include "MCType.hxx"
 
 #include <memory>
 #include <vector>
@@ -59,35 +60,35 @@ namespace MEDPARTITIONER
     //identifier for a joint
     int jointId( int local_domain, int distant_domain ) const;
   
-    int getNbTotalCells() { return _cell_shift_by_domain.back(); }
-    int getNbTotalNodes() { return _node_shift_by_domain.back(); };
-    int getNbTotalFaces() { return _face_shift_by_domain.back(); };
+    mcIdType getNbTotalCells() { return _cell_shift_by_domain.back(); }
+    mcIdType getNbTotalNodes() { return _node_shift_by_domain.back(); };
+    mcIdType getNbTotalFaces() { return _face_shift_by_domain.back(); };
 
     //Collect nb of entities on procs
     void gatherNbOf(const std::vector<MEDCoupling::MEDCouplingUMesh*>& domain_meshes);
   
     //distribution of the graph vertices among the processors
-    int* getProcVtxdist() const;
+    mcIdType* getProcVtxdist() const;
 
     //nb of nodes on processors with lower rank
-    int getProcNodeShift() const;
+    mcIdType getProcNodeShift() const;
     //nb of cells in domains with lower index
-    int getDomainCellShift(int domainIndex) const;
+    mcIdType getDomainCellShift(int domainIndex) const;
     //nb of nodes in domains with lower index
-    int getDomainNodeShift(int domainIndex) const;
+    mcIdType getDomainNodeShift(int domainIndex) const;
 
     //Gather graphs from all processors into one
     std::unique_ptr<Graph> gatherGraph(const Graph* graph) const;
 
     //Set nb of cell/cell pairs in a joint between domains
-    void setNbCellPairs( int nb_cell_pairs, int dist_domain, int loc_domain );
+    void setNbCellPairs( mcIdType nb_cell_pairs, int dist_domain, int loc_domain );
     //Gather size of each proc/proc joint
     void gatherNbCellPairs();
     //nb of cell/cell pairs in a joint between domains on different procs
-    int getNbCellPairs( int dist_domain, int loc_domain ) const;
+    mcIdType getNbCellPairs( int dist_domain, int loc_domain ) const;
 
     //get the first global id of sub-entity for the joint
-    int getFisrtGlobalIdOfSubentity( int loc_domain, int dist_domain ) const;
+    mcIdType getFisrtGlobalIdOfSubentity( int loc_domain, int dist_domain ) const;
     //Send-receive local ids of joint faces
     int* exchangeSubentityIds( int loc_domain, int dist_domain,
                                const std::vector<int>& loc_ids_here ) const;
@@ -104,11 +105,11 @@ namespace MEDPARTITIONER
     int _world_size; //nb of processors
     int _nb_result_domains; //required nb of domains
 
-    std::vector< int > _nb_cell_pairs_by_joint;
-    std::vector< int > _nb_vert_of_procs; //graph vertices
-    std::vector< int > _cell_shift_by_domain;
-    std::vector< int > _node_shift_by_domain;
-    std::vector< int > _face_shift_by_domain;
+    std::vector< mcIdType > _nb_cell_pairs_by_joint;
+    std::vector< mcIdType > _nb_vert_of_procs; //graph vertices
+    std::vector< mcIdType > _cell_shift_by_domain;
+    std::vector< mcIdType > _node_shift_by_domain;
+    std::vector< mcIdType > _face_shift_by_domain;
 
     double _init_time;
     bool _mesure_memory;
index 99c62b4a91c1fe26fcdf3be0d978126e5e7186e7..af874d65848cd51b6c60b39c30d697421f7f79a0 100644 (file)
@@ -28,6 +28,7 @@
 #include "MEDCouplingSkyLineArray.hxx"
 #include "MEDCouplingUMesh.hxx"
 #include "InterpKernelHashMap.hxx"
+#include "MCIdType.hxx"
 
 #include <set>
 #include <map>
@@ -47,7 +48,7 @@ ParallelTopology::ParallelTopology():_nb_domain(0),_mesh_dimension(0)
 //constructing topology according to mesh collection without global numerotation (use setGlobalNumerotation later)
 ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>& meshes)
 {
-  _nb_domain=meshes.size();
+  _nb_domain=(int)meshes.size();
   _nb_cells.resize(_nb_domain);
   _nb_nodes.resize(_nb_domain);
   //  _nb_faces.resize(_nb_domain);
@@ -98,10 +99,10 @@ void ParallelTopology::setGlobalNumerotationDefault(ParaDomainSelector* domainSe
   for (int idomain=0; idomain<_nb_domain; idomain++)
     {
       _loc_to_glob[idomain].resize(_nb_cells[idomain]);
-      int domainCellShift=domainSelector->getDomainCellShift(idomain);
-      for (int i=0; i<_nb_cells[idomain]; i++)
+      mcIdType domainCellShift=domainSelector->getDomainCellShift(idomain);
+      for (mcIdType i=0; i<_nb_cells[idomain]; i++)
         {
-          int global=domainCellShift+i ;
+          mcIdType global=domainCellShift+i ;
           _glob_to_loc.insert(std::make_pair(global,std::make_pair(idomain,i)));
           _loc_to_glob[idomain][i]=global;
           if (MyGlobals::_Verbose>500)
@@ -117,10 +118,10 @@ void ParallelTopology::setGlobalNumerotationDefault(ParaDomainSelector* domainSe
   for (int idomain=0; idomain<_nb_domain; idomain++)
     {
       _node_loc_to_glob[idomain].resize(_nb_nodes[idomain]);
-      int domainNodeShift=domainSelector->getDomainNodeShift(idomain);
-      for (int i=0; i<_nb_nodes[idomain]; i++)
+      mcIdType domainNodeShift=domainSelector->getDomainNodeShift(idomain);
+      for (mcIdType i=0; i<_nb_nodes[idomain]; i++)
         {
-          int global=domainNodeShift+i ;
+          mcIdType global=domainNodeShift+i ;
           _node_glob_to_loc.insert(std::make_pair(global,std::make_pair(idomain,i)));
           _node_loc_to_glob[idomain][i]=global;
           if (MyGlobals::_Verbose>500)
@@ -142,14 +143,14 @@ void ParallelTopology::setGlobalNumerotationDefault(ParaDomainSelector* domainSe
 //constructing topology according to mesh collection
 ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>& meshes, 
                                    const std::vector<MEDPARTITIONER::ConnectZone*>& cz,
-                                   std::vector<int*>& cellglobal,
-                                   std::vector<int*>& nodeglobal,
-                                   std::vector<int*>& faceglobal)
+                                   std::vector<mcIdType*>& cellglobal,
+                                   std::vector<mcIdType*>& nodeglobal,
+                                   std::vector<mcIdType*>& faceglobal)
 {
-  _nb_domain=meshes.size();
-  int index_global=0;
-  int index_node_global=0;
-  int index_face_global=0;
+  _nb_domain=(int)meshes.size();
+  mcIdType index_global=0;
+  mcIdType index_node_global=0;
+  mcIdType index_face_global=0;
 
   _nb_cells.resize(_nb_domain);
   _nb_nodes.resize(_nb_domain);
@@ -177,9 +178,9 @@ ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMe
         {
           //int cellDomainShift=_cell_shift_by_domain[idomain];
           //creating global numbering from scratch
-          for (int i=0; i<_nb_cells[idomain]; i++)
+          for (mcIdType i=0; i<_nb_cells[idomain]; i++)
             {
-              int global=i ;//cellDomainShift+i;
+              mcIdType global=i ;//cellDomainShift+i;
               _glob_to_loc.insert(std::make_pair(global,std::make_pair(idomain,i)));
               _loc_to_glob[idomain][i]=global;
               index_global++;
@@ -188,9 +189,9 @@ ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMe
       //using global numbering coming from a previous numbering
       else
         {
-          for (int i=0; i<_nb_cells[idomain]; i++)
+          for (mcIdType i=0; i<_nb_cells[idomain]; i++)
             {
-              int global=cellglobal[idomain][i];
+              mcIdType global=cellglobal[idomain][i];
               _glob_to_loc.insert(std::make_pair(global,std::make_pair(idomain,i)));
               //_loc_to_glob[make_pair(idomain,i+1)]=global;
               _loc_to_glob[idomain][i]=global;
@@ -204,7 +205,7 @@ ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMe
           _nb_total_cells=index_global;
           _nb_cells[0]=index_global;
           _node_loc_to_glob[idomain].resize(meshes[idomain]->getNumberOfNodes());
-          for (int i=0; i<meshes[idomain]->getNumberOfNodes(); i++)
+          for (mcIdType i=0; i<meshes[idomain]->getNumberOfNodes(); i++)
             {
               _node_glob_to_loc.insert(std::make_pair(i,std::make_pair(0,i)));
               _node_loc_to_glob[0][i]=i;
@@ -216,20 +217,20 @@ ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMe
 
       //creating node maps
       _nb_nodes[idomain]=meshes[idomain]->getNumberOfNodes();
-      INTERP_KERNEL::HashMap <int,std::pair<int,int> > local2distant;
+      INTERP_KERNEL::HashMap <mcIdType,std::pair<int,mcIdType> > local2distant;
       _node_loc_to_glob[idomain].resize(_nb_nodes[idomain]);
       for (std::size_t icz=0; icz<cz.size(); icz++)
         {
           if (cz[icz]->getLocalDomainNumber() == idomain && 
               cz[icz]->getLocalDomainNumber()>cz[icz]->getDistantDomainNumber())
             {
-              int nb_node= cz[icz]->getNodeNumber();
-              const int* node_corresp=cz[icz]->getNodeCorrespValue();
+              mcIdType nb_node= cz[icz]->getNodeNumber();
+              const mcIdType* node_corresp=cz[icz]->getNodeCorrespValue();
               int distant_ip = cz[icz]->getDistantDomainNumber();
-              for (int i=0; i< nb_node; i++)
+              for (mcIdType i=0; i< nb_node; i++)
                 {
-                  int local= node_corresp[i*2];
-                  int distant = node_corresp[i*2+1];
+                  mcIdType local= node_corresp[i*2];
+                  mcIdType distant = node_corresp[i*2+1];
                   local2distant.insert(std::make_pair(local, std::make_pair(distant_ip,distant)));    
                 }
             }
@@ -237,7 +238,7 @@ ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMe
       // setting mappings for all nodes
       if (nodeglobal[idomain]==0)
         {
-          for (int inode=0; inode<_nb_nodes[idomain]; inode++)
+          for (mcIdType inode=0; inode<_nb_nodes[idomain]; inode++)
             {
               if (local2distant.find(inode)==local2distant.end())
                 {
@@ -249,8 +250,8 @@ ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMe
               else
                 {
                   int ip = (local2distant.find(inode)->second).first;
-                  int distant = (local2distant.find(inode)->second).second;
-                  int global_number=_loc_to_glob[ip][distant];
+                  mcIdType distant = (local2distant.find(inode)->second).second;
+                  mcIdType global_number=_loc_to_glob[ip][distant];
                   _node_glob_to_loc.insert(std::make_pair(global_number,std::make_pair(idomain,inode)));
                   _node_loc_to_glob[idomain][inode]=global_number;
                 } 
@@ -259,9 +260,9 @@ ParallelTopology::ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMe
       //using former node numbering
       else
         {
-          for (int inode=0; inode<_nb_nodes[idomain]; inode++)
+          for (mcIdType inode=0; inode<_nb_nodes[idomain]; inode++)
             {
-              int global_number=nodeglobal[idomain][inode];
+              mcIdType global_number=nodeglobal[idomain][inode];
               _node_glob_to_loc.insert(std::make_pair(global_number,std::make_pair(idomain,inode)));
               _node_loc_to_glob[idomain][inode]=global_number;
             }
@@ -292,7 +293,7 @@ ParallelTopology::ParallelTopology(Graph* graph, Topology* oldTopology, int nb_d
   _node_loc_to_glob.resize(_nb_domain);
   _face_loc_to_glob.resize(_nb_domain);
   
-  const int* part=graph->getPart(); //all cells for this proc (may be more domains)
+  const mcIdType* part=graph->getPart(); //all cells for this proc (may be more domains)
   _nb_total_cells=graph->nbVertices(); //all cells for this proc (may be more domains)
   if (MyGlobals::_Verbose>300)
     std::cout << "proc " << MyGlobals::_Rank << " : topology from partition, nbTotalCells " << _nb_total_cells << std::endl;
@@ -300,17 +301,17 @@ ParallelTopology::ParallelTopology(Graph* graph, Topology* oldTopology, int nb_d
   int icellProc=0; //all cells of my domains are concatenated in part
   for (int iold=0; iold<oldTopology->nbDomain(); iold++)
     {
-      int ioldNbCell=oldTopology->getCellNumber(iold);
+      mcIdType ioldNbCell=oldTopology->getCellNumber(iold);
       //std::cout<<"proc "<<MyGlobals::_Rank<<" : cell number old domain "<<iold<<" : "<<ioldNbCell<<std::endl;
       //if not my old domains getCellNumber is 0
-      std::vector<int> globalids(ioldNbCell);
+      std::vector<mcIdType> globalids(ioldNbCell);
       oldTopology->getCellList(iold, &globalids[0]); //unique global numerotation
-      for (int icell=0; icell<ioldNbCell; icell++)
+      for (mcIdType icell=0; icell<ioldNbCell; icell++)
         {
-          int idomain=part[icellProc];
+          int idomain=FromIdType<int>(part[icellProc]);
           _nb_cells[idomain]++;
           icellProc++;
-          int iGlobalCell=globalids[icell];
+          mcIdType iGlobalCell=globalids[icell];
           _loc_to_glob[idomain].push_back(iGlobalCell);
           _glob_to_loc.insert(std::make_pair(iGlobalCell, std::make_pair(idomain, _nb_cells[idomain])));
         }
@@ -324,29 +325,29 @@ ParallelTopology::ParallelTopology(Graph* graph, Topology* oldTopology, int nb_d
 
   if ( MyGlobals::_Create_Joints && nb_domain > 1 )
     {
-      std::vector< std::vector< std::vector< int > > > cellCorresp( nb_domain );
+      std::vector< std::vector< std::vector< mcIdType > > > cellCorresp( nb_domain );
       for ( int idomain = 0; idomain < nb_domain; ++idomain )
         {
           cellCorresp[ idomain ].resize( nb_domain );
         }
       const MEDCoupling::MEDCouplingSkyLineArray* skylinegraph = graph->getGraph();
-      const int*  index = skylinegraph->getIndex();
-      const int*  value = skylinegraph->getValues();
-      const int nbCells = skylinegraph->getNumberOf();
+      const mcIdType*  index = skylinegraph->getIndex();
+      const mcIdType*  value = skylinegraph->getValues();
+      const mcIdType nbCells = skylinegraph->getNumberOf();
 
-      for ( int iGlob = 0; iGlob < nbCells; ++iGlob )
+      for ( mcIdType iGlob = 0; iGlob < nbCells; ++iGlob )
         {
-          int iGlobDom = part[ iGlob ];
-          for ( int i = index[ iGlob ]; i < index[ iGlob+1 ]; i++ )
+          int iGlobDom = FromIdType<int>(part[ iGlob ]);
+          for ( mcIdType i = index[ iGlob ]; i < index[ iGlob+1 ]; i++ )
             {
-              int iGlobNear = value[ i ];
+              mcIdType iGlobNear = value[ i ];
               if ( iGlob > iGlobNear )
                 continue; // treat ( iGlob, iGlobNear ) pair once
-              int iGlobNearDom = part[ iGlobNear ];
+              int iGlobNearDom = FromIdType<int>(part[ iGlobNear ]);
               if ( iGlobDom != iGlobNearDom )
                 {
-                  int iLoc     = convertGlobalCell( iGlob ).second     - 1; // to MEDCoupling fmt
-                  int iLocNear = convertGlobalCell( iGlobNear ).second - 1;
+                  mcIdType iLoc     = convertGlobalCell( iGlob ).second     - 1; // to MEDCoupling fmt
+                  mcIdType iLocNear = convertGlobalCell( iGlobNear ).second - 1;
                   cellCorresp[ iGlobDom ][ iGlobNearDom ].push_back( iLoc );
                   cellCorresp[ iGlobDom ][ iGlobNearDom ].push_back( iLocNear );
                   cellCorresp[ iGlobNearDom ][ iGlobDom ].push_back( iLocNear );
@@ -358,14 +359,14 @@ ParallelTopology::ParallelTopology(Graph* graph, Topology* oldTopology, int nb_d
         {
           for ( int idomainNear = 0; idomainNear < nb_domain; ++idomainNear )
             {
-              std::vector< int > & corresp = cellCorresp[ idomain ][ idomainNear ];
+              std::vector< mcIdType > & corresp = cellCorresp[ idomain ][ idomainNear ];
               if ( corresp.empty() )
                 continue;
               MEDPARTITIONER::ConnectZone* cz = new MEDPARTITIONER::ConnectZone();
               cz->setName( "Connect Zone defined by MEDPARTITIONER" );
               cz->setDistantDomainNumber( idomainNear );
               cz->setLocalDomainNumber  ( idomain );
-              cz->setEntityCorresp( 0,0, &corresp[0], corresp.size()/2 );
+              cz->setEntityCorresp( 0,0, &corresp[0], ToIdType( corresp.size()/2 ));
               _connect_zones.push_back( cz );
             }
         }
@@ -388,13 +389,13 @@ ParallelTopology::~ParallelTopology()
  * If a node in the list is represented on several domains,
  * only the first value is returned
  * */
-void ParallelTopology::convertGlobalNodeList(const int* node_list, int nbnode, int* local, int* ip)
+void ParallelTopology::convertGlobalNodeList(const mcIdType* node_list, mcIdType nbnode, mcIdType* local, int* ip)
 {
   if (_node_glob_to_loc.empty())
     throw INTERP_KERNEL::Exception("Node mapping has not yet been built");
-  for (int i=0; i< nbnode; i++)
+  for (mcIdType i=0; i< nbnode; i++)
     {
-      std::pair<int,int> local_node = _node_glob_to_loc.find(node_list[i])->second;
+      std::pair<int,mcIdType> local_node = _node_glob_to_loc.find(node_list[i])->second;
       ip[i]=local_node.first;
       local[i]=local_node.second;
     }
@@ -407,14 +408,14 @@ void ParallelTopology::convertGlobalNodeList(const int* node_list, int nbnode, i
  * only the value with domain ip is returned
  * 
  * */
-void ParallelTopology::convertGlobalNodeList(const int* node_list, int nbnode, int* local, int ip)
+void ParallelTopology::convertGlobalNodeList(const mcIdType* node_list, mcIdType nbnode, mcIdType* local, int ip)
 {
   if (_node_glob_to_loc.empty()) 
     throw INTERP_KERNEL::Exception("Node mapping has not yet been built");
 
-  for (int i=0; i< nbnode; i++)
+  for (mcIdType i=0; i< nbnode; i++)
     {
-      typedef INTERP_KERNEL::HashMultiMap<int,std::pair<int,int> >::iterator mmiter;
+      typedef INTERP_KERNEL::HashMultiMap<mcIdType,std::pair<int,mcIdType> >::iterator mmiter;
       std::pair<mmiter,mmiter> range=_node_glob_to_loc.equal_range(node_list[i]);
       for (mmiter it=range.first; it !=range.second; it++)
         { 
@@ -431,24 +432,24 @@ void ParallelTopology::convertGlobalNodeList(const int* node_list, int nbnode, i
  * If a node in the list is represented on several domains,
  * all the values are put in the array
  * */
-void ParallelTopology::convertGlobalNodeListWithTwins(const int* node_list, int nbnode, int*& local, int*& ip,int*& full_array, int& size)
+void ParallelTopology::convertGlobalNodeListWithTwins(const mcIdType* node_list, mcIdType nbnode, mcIdType*& local, int*& ip,mcIdType*& full_array, mcIdType& size)
 {
   if (_node_glob_to_loc.empty()) 
     throw INTERP_KERNEL::Exception("Node mapping has not yet been built");
 
   size=0;
-  for (int i=0; i< nbnode; i++)
+  for (mcIdType i=0; i< nbnode; i++)
     {
-      int count= _node_glob_to_loc.count(node_list[i]);
+      mcIdType count= ToIdType( _node_glob_to_loc.count(node_list[i]));
       size+=count;
     }
-  int index=0;
+  mcIdType index=0;
   ip=new int[size];
-  local=new int[size];
-  full_array=new int[size];
-  for (int i=0; i< nbnode; i++)
+  local=new mcIdType[size];
+  full_array=new mcIdType[size];
+  for (mcIdType i=0; i< nbnode; i++)
     {
-      typedef INTERP_KERNEL::HashMultiMap<int,std::pair<int,int> >::iterator mmiter;
+      typedef INTERP_KERNEL::HashMultiMap<mcIdType,std::pair<int,mcIdType> >::iterator mmiter;
       std::pair<mmiter,mmiter> range=_node_glob_to_loc.equal_range(node_list[i]);
       for (mmiter it=range.first; it !=range.second; it++)
         { 
@@ -467,22 +468,22 @@ void ParallelTopology::convertGlobalNodeListWithTwins(const int* node_list, int
  * If a face in the list is represented on several domains,
  * all the values are put in the array
  * */
-void ParallelTopology::convertGlobalFaceListWithTwins(const int* face_list, int nbface, int*& local, int*& ip, int*& full_array,int& size)
+void ParallelTopology::convertGlobalFaceListWithTwins(const mcIdType* face_list, mcIdType nbface, mcIdType*& local, int*& ip, mcIdType*& full_array,mcIdType& size)
 {
   size=0;
-  for (int i=0; i< nbface; i++)
+  for (mcIdType i=0; i< nbface; i++)
     {
       //int count = _face_glob_to_loc.count(face_list[i]);
       //if (count >1) MESSAGE_MED("face en doublon "<<face_list[i]);
-      size+= _face_glob_to_loc.count(face_list[i]);
+      size+= ToIdType(_face_glob_to_loc.count(face_list[i]));
     }
-  int index=0;
+  mcIdType index=0;
   ip=new int[size];
-  local=new int[size];
-  full_array=new int[size];
-  for (int i=0; i< nbface; i++)
+  local=new mcIdType[size];
+  full_array=new mcIdType[size];
+  for (mcIdType i=0; i< nbface; i++)
     {
-      typedef INTERP_KERNEL::HashMultiMap<int,std::pair<int,int> >::iterator mmiter;
+      typedef INTERP_KERNEL::HashMultiMap<mcIdType,std::pair<int,mcIdType> >::iterator mmiter;
       std::pair<mmiter,mmiter> range=_face_glob_to_loc.equal_range(face_list[i]);
       for (mmiter it=range.first; it !=range.second; it++)
         { 
@@ -497,11 +498,11 @@ void ParallelTopology::convertGlobalFaceListWithTwins(const int* face_list, int
 
 //!converts a list of global cell numbers
 //!to a distributed array with local cell numbers 
-void ParallelTopology::convertGlobalCellList(const int* cell_list, int nbcell, int* local, int* ip)
+void ParallelTopology::convertGlobalCellList(const mcIdType* cell_list, mcIdType nbcell, mcIdType* local, int* ip)
 {
-  for (int i=0; i<nbcell; i++)
+  for (mcIdType i=0; i<nbcell; i++)
     {
-      INTERP_KERNEL::HashMap<int, std::pair<int,int> >::const_iterator iter = _glob_to_loc.find(cell_list[i]);
+      INTERP_KERNEL::HashMap<mcIdType, std::pair<int,mcIdType> >::const_iterator iter = _glob_to_loc.find(cell_list[i]);
       if (iter == _glob_to_loc.end())
         {
           std::cerr << "proc " << MyGlobals::_Rank << " : KO cell_list[" << i << "] : " << cell_list[i] << std::endl;
@@ -518,11 +519,11 @@ void ParallelTopology::convertGlobalCellList(const int* cell_list, int nbcell, i
 /*!Converts a list of global face numbers
  * to a distributed array with local face numbers
  */ 
-void ParallelTopology::convertGlobalFaceList(const int* face_list, int nbface, int* local, int* ip)
+void ParallelTopology::convertGlobalFaceList(const mcIdType* face_list, mcIdType nbface, mcIdType* local, int* ip)
 {
-  for (int i=0; i< nbface; i++)
+  for (mcIdType i=0; i< nbface; i++)
     {
-      INTERP_KERNEL::HashMap<int, std::pair<int,int> >::const_iterator iter = _face_glob_to_loc.find(face_list[i]);
+      INTERP_KERNEL::HashMap<mcIdType, std::pair<int,mcIdType> >::const_iterator iter = _face_glob_to_loc.find(face_list[i]);
       if (iter == _face_glob_to_loc.end())
         {
           throw INTERP_KERNEL::Exception("ParallelTopology::convertGlobalFaceList : Face not found");
@@ -539,11 +540,11 @@ void ParallelTopology::convertGlobalFaceList(const int* face_list, int nbface, i
  * only the value with domain ip is returned
  * 
  */
-void ParallelTopology::convertGlobalFaceList(const int* face_list, int nbface, int* local, int ip)
+void ParallelTopology::convertGlobalFaceList(const mcIdType* face_list, mcIdType nbface, mcIdType* local, int ip)
 {
-  for (int i=0; i< nbface; i++)
+  for (mcIdType i=0; i< nbface; i++)
     {
-      typedef INTERP_KERNEL::HashMultiMap<int,std::pair<int,int> >::iterator mmiter;
+      typedef INTERP_KERNEL::HashMultiMap<mcIdType,std::pair<int,mcIdType> >::iterator mmiter;
       std::pair<mmiter,mmiter> range=_face_glob_to_loc.equal_range(face_list[i]);
       for (mmiter it=range.first; it !=range.second; it++)
         { 
@@ -558,13 +559,13 @@ void ParallelTopology::convertGlobalFaceList(const int* face_list, int nbface, i
 //replacing a table of global numbering with a table with local numberings
 // type_connectivity contains global connectivity for each type in input
 // type_connectivity contains local connectivity for each type in output
-void ParallelTopology::convertToLocal2ndVersion(int* nodes, int nbnodes, int idomain)
+void ParallelTopology::convertToLocal2ndVersion(mcIdType* nodes, mcIdType nbnodes, int idomain)
 {
-  for (int inode=0; inode<nbnodes; inode++)
+  for (mcIdType inode=0; inode<nbnodes; inode++)
     {
       //      cout <<" inode :"<<inode<< " global = "<<type_connectivity[type][inode];
-      int global = nodes[inode];
-      typedef INTERP_KERNEL::HashMultiMap<int,std::pair<int,int> >::iterator mmiter;
+      mcIdType global = nodes[inode];
+      typedef INTERP_KERNEL::HashMultiMap<mcIdType,std::pair<int,mcIdType> >::iterator mmiter;
       std::pair<mmiter,mmiter> range=_node_glob_to_loc.equal_range(global);
       for (mmiter it=range.first; it !=range.second; it++)
         {
@@ -577,9 +578,9 @@ void ParallelTopology::convertToLocal2ndVersion(int* nodes, int nbnodes, int ido
 /*!
  * \brief Return max global face number
  */
-int ParallelTopology::getMaxGlobalFace() const
+mcIdType ParallelTopology::getMaxGlobalFace() const
 {
-  int max = 0;
+  mcIdType max = 0;
   TGlob2LocsMap::const_iterator g_l_l = _face_glob_to_loc.begin();
   for ( ; g_l_l != _face_glob_to_loc.end(); ++g_l_l )
     if ( g_l_l->first > max )
@@ -587,59 +588,59 @@ int ParallelTopology::getMaxGlobalFace() const
   return max;
 }
 
-int ParallelTopology::getNodeNumber() const
+mcIdType ParallelTopology::getNodeNumber() const
 {
   if (_node_glob_to_loc.empty()) return 0;
-  std::set <int> keys;
-  for (INTERP_KERNEL::HashMultiMap<int, std::pair<int,int> >::const_iterator iter= _node_glob_to_loc.begin(); iter!=_node_glob_to_loc.end(); iter++)
+  std::set <mcIdType> keys;
+  for (INTERP_KERNEL::HashMultiMap<mcIdType, std::pair<int,mcIdType> >::const_iterator iter= _node_glob_to_loc.begin(); iter!=_node_glob_to_loc.end(); iter++)
     {
       keys.insert(iter->first);
     }
-  return keys.size();
+  return ToIdType(keys.size());
 }
 
 /*!
  * retrieving list of nodes in global numbers
  */
-void ParallelTopology::getNodeList(int idomain, int *list) const
+void ParallelTopology::getNodeList(int idomain, mcIdType *list) const
 {
-  for (int i=0; i<_nb_nodes[idomain]; i++) 
+  for (mcIdType i=0; i<_nb_nodes[idomain]; i++) 
     list[i]=_node_loc_to_glob[idomain][i];
 }
 
 /*!
  * retrieving list of nodes in global numbers
  */
-void ParallelTopology::getCellList(int idomain, int *list) const
+void ParallelTopology::getCellList(int idomain, mcIdType *list) const
 {
-  for (int i=0; i<_nb_cells[idomain];i++)
+  for (mcIdType i=0; i<_nb_cells[idomain];i++)
     list[i]=_loc_to_glob[idomain][i];
 }
 
-int ParallelTopology::getFaceNumber() const
+mcIdType ParallelTopology::getFaceNumber() const
 {
   if (_face_glob_to_loc.empty())
     return 0;
-  std::set <int> keys;
-  for (INTERP_KERNEL::HashMultiMap<int, std::pair<int,int> >::const_iterator iter= _face_glob_to_loc.begin(); iter!=_face_glob_to_loc.end(); iter++)
+  std::set <mcIdType> keys;
+  for (INTERP_KERNEL::HashMultiMap<mcIdType, std::pair<int,mcIdType> >::const_iterator iter= _face_glob_to_loc.begin(); iter!=_face_glob_to_loc.end(); iter++)
     {
       keys.insert(iter->first);
     }
-  return keys.size();
+  return ToIdType(keys.size());
 }
 
 /*!
  * retrieving list of faces in global numbers
  */
-void ParallelTopology::getFaceList(int idomain, int *list) const
+void ParallelTopology::getFaceList(int idomain, mcIdType *list) const
 {
-  for (int i=0; i<_nb_faces[idomain];i++)   
+  for (mcIdType i=0; i<_nb_faces[idomain];i++)   
     list[i]=_face_loc_to_glob[idomain][i];
 }
 
-int ParallelTopology::convertGlobalFace(int iglobal, int idomain)
+mcIdType ParallelTopology::convertGlobalFace(mcIdType iglobal, int idomain)
 {
-  typedef INTERP_KERNEL::HashMultiMap<int, std::pair<int,int> >::const_iterator MMiter;
+  typedef INTERP_KERNEL::HashMultiMap<mcIdType, std::pair<int,mcIdType> >::const_iterator MMiter;
   std::pair<MMiter,MMiter> eq = _face_glob_to_loc.equal_range(iglobal);
   for (MMiter it=eq.first; it != eq.second; it++) 
     if (it->second.first == idomain)
@@ -647,9 +648,9 @@ int ParallelTopology::convertGlobalFace(int iglobal, int idomain)
   return -1;
 }
 
-int ParallelTopology::convertGlobalNode(int iglobal, int idomain)
+mcIdType ParallelTopology::convertGlobalNode(mcIdType iglobal, int idomain)
 {
-  typedef INTERP_KERNEL::HashMultiMap<int, std::pair<int,int> >::const_iterator MMiter;
+  typedef INTERP_KERNEL::HashMultiMap<mcIdType, std::pair<int,mcIdType> >::const_iterator MMiter;
   std::pair<MMiter,MMiter> eq = _node_glob_to_loc.equal_range(iglobal);
   for (MMiter it=eq.first; it != eq.second; it++)
     {
@@ -667,7 +668,7 @@ std::vector<MEDPARTITIONER::ConnectZone*>& ParallelTopology::getCZ()
 /*!
  * adding a face to the topology
  */
-void ParallelTopology::appendFace(int idomain, int ilocal, int iglobal)
+void ParallelTopology::appendFace(int idomain, mcIdType ilocal, mcIdType iglobal)
 {
   _face_loc_to_glob[idomain].push_back(iglobal);
   _face_glob_to_loc.insert(std::make_pair(iglobal,std::make_pair(idomain,ilocal)));
index c60bc070225b863ffb7aae0dfc37f7a5b5c2b262..fb453c9af0bb437ba0aff1233655e546f18bceb5 100644 (file)
@@ -43,9 +43,9 @@ namespace MEDPARTITIONER
     ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>&);
     ParallelTopology(const std::vector<MEDCoupling::MEDCouplingUMesh*>&,
                      const std::vector<MEDPARTITIONER::ConnectZone*>&,
-                     std::vector<int*>&,
-                     std::vector<int*>&,
-                     std::vector<int*>&);
+                     std::vector<mcIdType*>&,
+                     std::vector<mcIdType*>&,
+                     std::vector<mcIdType*>&);
     ParallelTopology(Graph* graph, Topology* oldTopology, int nbdomain, int mesh_dimension);
     ~ParallelTopology();
     
@@ -54,135 +54,135 @@ namespace MEDPARTITIONER
     /*! converts a list of global cell numbers
      * to a distributed array with local cell numbers
      */
-    void convertGlobalNodeList(const int*, int,int*,int*);
-    void convertGlobalNodeList(const int*, int,int*,int);
-    void convertGlobalNodeListWithTwins(const int* face_list, int nbnode, int*& local, int*& ip, int*& full_array, int& size);
+    void convertGlobalNodeList(const mcIdType*, mcIdType,mcIdType*,int*);
+    void convertGlobalNodeList(const mcIdType*, mcIdType,mcIdType*,int);
+    void convertGlobalNodeListWithTwins(const mcIdType* face_list, mcIdType nbnode, mcIdType*& local, int*& ip, mcIdType*& full_array, mcIdType& size);
 
     /*! converts a list of global node numbers
      * to a distributed array with local cell numbers
      */
-    void convertGlobalCellList(const int*, int , int*, int *);
+    void convertGlobalCellList(const mcIdType*, mcIdType , mcIdType*, int *);
 
     /*! converts a list of global face numbers
      *  to a distributed array with local face numbers
      */
-    void convertGlobalFaceList(const int*, int , int*, int *);  
-    void convertGlobalFaceList(const int*, int , int*, int);  
-    void convertGlobalFaceListWithTwins(const int* face_list, int nbface, int*& local, int*& ip, int*& full_array,int& size);
+    void convertGlobalFaceList(const mcIdType*, mcIdType , mcIdType*, int *);  
+    void convertGlobalFaceList(const mcIdType*, mcIdType , mcIdType*, int);  
+    void convertGlobalFaceListWithTwins(const mcIdType* face_list, mcIdType nbface, mcIdType*& local, int*& ip, mcIdType*& full_array,mcIdType& size);
 
     /*! converting node global numberings to local numberings */
-    void convertToLocal2ndVersion(int* nodes, int nbnodes, int idomain);
+    void convertToLocal2ndVersion(mcIdType* nodes, mcIdType nbnodes, int idomain);
 
     /*! converting node local numbering to global */
-    int convertNodeToGlobal(int ip, int icell) const { return _node_loc_to_glob[ip][icell]; }
+    mcIdType convertNodeToGlobal(int ip, mcIdType icell) const { return _node_loc_to_glob[ip][icell]; }
 
     /*! converting face local numbering to global */
-    int convertFaceToGlobal(int ip, int iface) const { return _face_loc_to_glob[ip][iface]; }
+    mcIdType convertFaceToGlobal(int ip, mcIdType iface) const { return _face_loc_to_glob[ip][iface]; }
 
     /*! converting cell global numbering to local */
-    int convertCellToGlobal(int ip, int icell) const { return _loc_to_glob[ip][icell]; }
+    mcIdType convertCellToGlobal(int ip, mcIdType icell) const { return _loc_to_glob[ip][icell]; }
 
-    void convertNodeToGlobal(int ip, const int* local, int n, int *global) const
+    void convertNodeToGlobal(int ip, const mcIdType* local, mcIdType n, mcIdType *global) const
     {
-      for (int i=0; i<n; i++)
+      for (mcIdType i=0; i<n; i++)
         global[i]=_node_loc_to_glob[ip][local[i]];
     }
 
-    void convertCellToGlobal(int ip, const int* local, int n, int *global) const
+    void convertCellToGlobal(int ip, const mcIdType* local, mcIdType n, mcIdType *global) const
     {
-      for (int i=0; i<n; i++)
+      for (mcIdType i=0; i<n; i++)
         global[i]=_loc_to_glob[ip][local[i]];  
     }
 
-    void convertFaceToGlobal(int ip, const int* local, int n, int *global) const
+    void convertFaceToGlobal(int ip, const mcIdType* local, mcIdType n, mcIdType *global) const
     {
-      for (int i=0; i<n; i++) 
+      for (mcIdType i=0; i<n; i++) 
         global[i]=_face_loc_to_glob[ip][local[i]];
     }
 
     int nbDomain() const { return _nb_domain; }
 
-    int nbCells() const { return _nb_total_cells; }
+    mcIdType nbCells() const { return _nb_total_cells; }
     
-    int nbNodes() const { return _nb_total_nodes; }
+    mcIdType nbNodes() const { return _nb_total_nodes; }
 
-    int nbCells( int idomain) const { return _nb_cells[idomain]; }
+    mcIdType nbCells( int idomain) const { return _nb_cells[idomain]; }
 
     /*! retrieving number of nodes */
-    int getNodeNumber(int idomain) const { return _nb_nodes[idomain]; }
+    mcIdType getNodeNumber(int idomain) const { return _nb_nodes[idomain]; }
 
-    int getNodeNumber() const;
+    mcIdType getNodeNumber() const;
 
-    void getNodeList(int idomain, int* list) const;
+    void getNodeList(int idomain, mcIdType* list) const;
 
     /*! retrieving cell numbers after merging in parallel mode */
-    std::vector<int> & getFusedCellNumbers(int idomain) { return _cell_loc_to_glob_fuse[idomain]; }
+    std::vector<mcIdType> & getFusedCellNumbers(int idomain) { return _cell_loc_to_glob_fuse[idomain]; }
     
-    const std::vector<int>& getFusedCellNumbers(int idomain) const { return _cell_loc_to_glob_fuse[idomain]; }
+    const std::vector<mcIdType>& getFusedCellNumbers(int idomain) const { return _cell_loc_to_glob_fuse[idomain]; }
 
     /*! retrieving face numbers after merging in parallel mode */
-    std::vector<int> & getFusedFaceNumbers(int idomain) { return _face_loc_to_glob_fuse[idomain]; }
+    std::vector<mcIdType> & getFusedFaceNumbers(int idomain) { return _face_loc_to_glob_fuse[idomain]; }
 
-    const std::vector<int>& getFusedFaceNumbers(int idomain) const { return _face_loc_to_glob_fuse[idomain]; }
+    const std::vector<mcIdType>& getFusedFaceNumbers(int idomain) const { return _face_loc_to_glob_fuse[idomain]; }
 
     /*! retrieving number of nodes */
-    int getCellNumber(int idomain) const { return _nb_cells[idomain]; }
+    mcIdType getCellNumber(int idomain) const { return _nb_cells[idomain]; }
 
-    int getCellDomainNumber(int global) const { return (_glob_to_loc.find(global)->second).first; }
+    mcIdType getCellDomainNumber(int global) const { return (_glob_to_loc.find(global)->second).first; }
 
-    void getCellList(int idomain, int* list) const;
+    void getCellList(int idomain, mcIdType* list) const;
 
-    int getFaceNumber(int idomain) const { return _nb_faces[idomain]; }
+    mcIdType getFaceNumber(int idomain) const { return _nb_faces[idomain]; }
 
-    int getFaceNumber() const;
+    mcIdType getFaceNumber() const;
 
-    void getFaceList(int idomain, int* list) const;
+    void getFaceList(int idomain, mcIdType* list) const;
 
     /*! converting a global cell number to a local representation (domain + local number) */
-    std::pair<int,int> convertGlobalCell(int iglobal) const { return _glob_to_loc.find(iglobal)->second; }
+    std::pair<int,mcIdType> convertGlobalCell(mcIdType iglobal) const { return _glob_to_loc.find(iglobal)->second; }
 
-    int convertGlobalFace(int iglobal, int idomain);
+    mcIdType convertGlobalFace(mcIdType iglobal, int idomain);
 
-    int convertGlobalNode(int iglobal, int idomain);
+    mcIdType convertGlobalNode(mcIdType iglobal, int idomain);
     
     std::vector<MEDPARTITIONER::ConnectZone*>& getCZ();
 
     //adding a face to the topology
-    void appendFace(int idomain, int ilocal, int iglobal);
+    void appendFace(int idomain, mcIdType ilocal, mcIdType iglobal);
 
     //return max global face number
-    int getMaxGlobalFace() const;
+    mcIdType getMaxGlobalFace() const;
 
   private:
-    bool hasCellWithNodes( const MeshCollection&, int dom, const std::set<int>& nodes );
+    bool hasCellWithNodes( const MeshCollection&, int dom, const std::set<mcIdType>& nodes );
 
   private:
     //mapping global -> local
-    typedef INTERP_KERNEL::HashMultiMap<int,std::pair<int,int> > TGlob2DomainLoc;
+    typedef INTERP_KERNEL::HashMultiMap<mcIdType,std::pair<int,mcIdType> > TGlob2DomainLoc;
 
     TGlob2DomainLoc _glob_to_loc;
     TGlob2DomainLoc _node_glob_to_loc;
 
     //mapping local -> global
-    std::vector<std::vector<int> >  _loc_to_glob;
-    std::vector<std::vector <int> > _node_loc_to_glob;
+    std::vector<std::vector<mcIdType> >  _loc_to_glob;
+    std::vector<std::vector <mcIdType> > _node_loc_to_glob;
 
     // global numbers in parallel mode
-    std::vector<std::vector <int> > _cell_loc_to_glob_fuse; // glob nums after merging
-    std::vector<std::vector <int> > _face_loc_to_glob_fuse; // glob nums after merging
+    std::vector<std::vector <mcIdType> > _cell_loc_to_glob_fuse; // glob nums after merging
+    std::vector<std::vector <mcIdType> > _face_loc_to_glob_fuse; // glob nums after merging
 
     //mapping global -> local
-    typedef INTERP_KERNEL::HashMultiMap<int,std::pair<int,int> > TGlob2LocsMap;
+    typedef INTERP_KERNEL::HashMultiMap<mcIdType,std::pair<int,mcIdType> > TGlob2LocsMap;
     TGlob2LocsMap _face_glob_to_loc;
 
     //mapping local -> global
-    std::vector<std::vector <int> > _face_loc_to_glob;
-    std::vector<int> _nb_cells;
-    std::vector<int> _nb_nodes;
-    std::vector<int> _nb_faces;
-    int _nb_total_cells;
-    int _nb_total_nodes;
-    int _nb_total_faces;
+    std::vector<std::vector <mcIdType> > _face_loc_to_glob;
+    std::vector<mcIdType> _nb_cells;
+    std::vector<mcIdType> _nb_nodes;
+    std::vector<mcIdType> _nb_faces;
+    mcIdType _nb_total_cells;
+    mcIdType _nb_total_nodes;
+    mcIdType _nb_total_faces;
     int _nb_domain;
     int _mesh_dimension;
 
index 8718430a36711059c5513589944c05f13ac1dd96..68fb6d7e7f7a804124961d9e62f49ef69d649dd3 100644 (file)
@@ -53,10 +53,17 @@ void SCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Para
     std::cout << "proc " << MyGlobals::_Rank << " : SCOTCHGraph::partGraph" << std::endl;
   
   //number of graph vertices
-  int n = _graph->getNumberOf();
+  int n = FromIdType<int>(_graph->getNumberOf());
   //graph
+#ifdef MEDCOUPLING_USE_64BIT_IDS
+  std::vector<int> indexVec( _graph->getIndex(), _graph->getIndexArray()->end() );
+  std::vector<int> valueVec( _graph->getValues(), _graph->getValuesArray()->end() );
+  int * xadj=indexVec.data();
+  int * adjncy=valueVec.data();
+#else
   int * xadj=const_cast<int*>(_graph->getIndex());
   int * adjncy=const_cast<int*>(_graph->getValues());
+#endif
   //ndomain
   int nparts=ndomain;
 
@@ -99,13 +106,13 @@ void SCOTCHGraph::partGraph(int ndomain, const std::string& options_string, Para
   SCOTCH_stratExit(&scotch_strategy);
   SCOTCH_graphExit(&scotch_graph);
 
-  std::vector<int> index(n+1);
-  std::vector<int> value(n);
+  std::vector<mcIdType> index(n+1);
+  std::vector<mcIdType> value(n);
   index[0]=0;
   for (int i=0; i<n; i++)
     {
       index[i+1]=index[i]+1;
-      value[i]=partition[i];
+      value[i]=ToIdType(partition[i]);
     }
   delete [] partition;
   
index 6197f4ed6f9586ac92a3f739e670b39d937608cb..3a26a5e6be525eb000a052c82d8332cc8336c71a 100644 (file)
@@ -21,6 +21,7 @@
 #define __MEDPARTITIONER_TOPOLOGY_HXX__
 
 #include "MEDPARTITIONER.hxx"
+#include "MCType.hxx"
 
 #include <map>
 #include <vector>
@@ -47,63 +48,63 @@ namespace MEDPARTITIONER
     /*! converts a list of global cell numbers
      *  to a distributed array with local cell numbers
      */
-    virtual void convertGlobalNodeList(const int *list, int nb, int *local, int*ip) = 0;
-    virtual void convertGlobalNodeList(const int *list, int nb, int *local, int ip) = 0;
+    virtual void convertGlobalNodeList(const mcIdType *list, mcIdType nb, mcIdType *local, int*ip) = 0;
+    virtual void convertGlobalNodeList(const mcIdType *list, mcIdType nb, mcIdType *local, int ip) = 0;
     //converts a list of global node numbers
     /*! to a distributed array with local cell numbers */
-    virtual void convertGlobalCellList(const int*list , int nb, int *local, int*ip) = 0;
+    virtual void convertGlobalCellList(const mcIdType*list , mcIdType nb, mcIdType *local, int*ip) = 0;
     
     /*! converts a list of global face numbers
      *  to a distributed array with local face numbers
      */
-     virtual void convertGlobalFaceList(const int*list , int nb, int* local, int*ip) = 0;
-    virtual void convertGlobalFaceList(const int*list , int nb, int* local, int ip) = 0;
-    virtual void convertGlobalFaceListWithTwins(const int *face_list, int nbface, int*& local, int*& ip, int*& full_array, int& size) = 0;
-    virtual void convertGlobalNodeListWithTwins(const int *face_list, int nbnode, int*& local, int*& ip, int*& full_array, int& size) = 0;
+     virtual void convertGlobalFaceList(const mcIdType*list , mcIdType nb, mcIdType* local, int*ip) = 0;
+    virtual void convertGlobalFaceList(const mcIdType*list , mcIdType nb, mcIdType* local, int ip) = 0;
+    virtual void convertGlobalFaceListWithTwins(const mcIdType *face_list, mcIdType nbface, mcIdType*& local, int*& ip, mcIdType*& full_array, mcIdType& size) = 0;
+    virtual void convertGlobalNodeListWithTwins(const mcIdType *face_list, mcIdType nbnode, mcIdType*& local, int*& ip, mcIdType*& full_array, mcIdType& size) = 0;
     /*! number of doamins */
     virtual int nbDomain() const = 0;
     /*! number of cells */
-    virtual int nbCells() const = 0;
+    virtual mcIdType nbCells() const = 0;
     /*! number of nodes */
-    virtual int nbNodes() const = 0;
+    virtual mcIdType nbNodes() const = 0;
     /*! number of cells on a specific domain */
-    virtual int nbCells(int idomain) const = 0;
+    virtual mcIdType nbCells(int idomain) const = 0;
     /*! converting node global numberings to local numberings */
-    virtual void convertToLocal2ndVersion(int*,int,int) = 0;
-    virtual int convertNodeToGlobal(int ip,int icell) const = 0;
-    virtual int convertFaceToGlobal(int ip,int icell) const = 0;
-    virtual int convertCellToGlobal(int ip,int icell) const = 0;
-    virtual void convertNodeToGlobal(int ip,const int *local, int n, int *global) const = 0;
-    virtual void convertCellToGlobal(int ip,const int *local, int n, int *global) const = 0;
-    virtual void convertFaceToGlobal(int ip,const int *local, int n, int *global) const = 0;
+    virtual void convertToLocal2ndVersion(mcIdType*,mcIdType,int) = 0;
+    virtual mcIdType convertNodeToGlobal(int ip,mcIdType icell) const = 0;
+    virtual mcIdType convertFaceToGlobal(int ip,mcIdType icell) const = 0;
+    virtual mcIdType convertCellToGlobal(int ip,mcIdType icell) const = 0;
+    virtual void convertNodeToGlobal(int ip,const mcIdType *local, mcIdType n, mcIdType *global) const = 0;
+    virtual void convertCellToGlobal(int ip,const mcIdType *local, mcIdType n, mcIdType *global) const = 0;
+    virtual void convertFaceToGlobal(int ip,const mcIdType *local, mcIdType n, mcIdType *global) const = 0;
     /*! retrieving number of nodes */
-    virtual int getNodeNumber(int idomain) const = 0;
-    virtual int getNodeNumber() const = 0;
+    virtual mcIdType getNodeNumber(int idomain) const = 0;
+    virtual mcIdType getNodeNumber() const = 0;
     /*! retrieving list of nodes */
-    virtual void getNodeList(int idomain, int *list) const = 0;
-    virtual std::vector<int> & getFusedCellNumbers(int idomain) = 0;
-    virtual const std::vector<int> & getFusedCellNumbers(int idomain) const = 0;
-    virtual std::vector<int> & getFusedFaceNumbers(int idomain) = 0;
-    virtual const std::vector<int> & getFusedFaceNumbers(int idomain) const = 0;
+    virtual void getNodeList(int idomain, mcIdType *list) const = 0;
+    virtual std::vector<mcIdType> & getFusedCellNumbers(int idomain) = 0;
+    virtual const std::vector<mcIdType> & getFusedCellNumbers(int idomain) const = 0;
+    virtual std::vector<mcIdType> & getFusedFaceNumbers(int idomain) = 0;
+    virtual const std::vector<mcIdType> & getFusedFaceNumbers(int idomain) const = 0;
     /*! retrieving number of nodes */
-    virtual int getCellNumber(int idomain) const = 0;
+    virtual mcIdType getCellNumber(int idomain) const = 0;
     /*! retrieving list of nodes */
-    virtual void getCellList(int idomain, int *list) const = 0;
+    virtual void getCellList(int idomain, mcIdType *list) const = 0;
     /*! retrieving number of faces */
-    virtual int getFaceNumber(int idomain) const = 0;
-    virtual int getFaceNumber() const = 0;
+    virtual mcIdType getFaceNumber(int idomain) const = 0;
+    virtual mcIdType getFaceNumber() const = 0;
     /*! retrieving list of nodes */
-    virtual void getFaceList(int idomain, int *list) const = 0;
+    virtual void getFaceList(int idomain, mcIdType *list) const = 0;
     /*! adding a face to the mapping */
-    virtual void appendFace(int idomain, int ilocal, int iglobal) = 0;
+    virtual void appendFace(int idomain, mcIdType ilocal, mcIdType iglobal) = 0;
     /*! returns max global face number */
-    virtual int getMaxGlobalFace() const = 0;
+    virtual mcIdType getMaxGlobalFace() const = 0;
     /*! converting a global cell number to a local representation */
-    virtual std::pair<int,int> convertGlobalCell(int iglobal) const = 0;
+    virtual std::pair<int,mcIdType> convertGlobalCell(mcIdType iglobal) const = 0;
     /*! converting a global face number to a local representation */
-    virtual int convertGlobalFace(int iglobal, int idomain) = 0;
+    virtual mcIdType convertGlobalFace(mcIdType iglobal, int idomain) = 0;
     /*! converting a global node number to a local representation */
-    virtual int convertGlobalNode(int iglobal, int idomain) = 0;
+    virtual mcIdType convertGlobalNode(mcIdType iglobal, int idomain) = 0;
     /*! getting a reference to connect zones vector */
     virtual std::vector<MEDPARTITIONER::ConnectZone*>& getCZ() = 0;
   };
index b00d29eb3bf919ec07ba654f2e2ce446a344c6b1..9098d93c7960a5db2fdea2d2ae2b926f707f00df 100644 (file)
@@ -32,13 +32,13 @@ using namespace MEDPARTITIONER;
  *        (domain numbers range from 0 to ndomain-1
  * \param n number of cells in the mesh
  */
-UserGraph::UserGraph(MEDCoupling::MEDCouplingSkyLineArray *array, const int *partition, int n):Graph(array,0)
+UserGraph::UserGraph(MEDCoupling::MEDCouplingSkyLineArray *array, const int *partition, mcIdType n):Graph(array,0)
 {
 
-  std::vector<int> index(n+1),value(n);
+  std::vector<mcIdType> index(n+1),value(n);
 
   index[0]=0;
-  for (int i=0; i<n; i++)
+  for (mcIdType i=0; i<n; i++)
     {
       index[i+1]=index[i]+1;
       value[i]=partition[i];
index dff8e0d2ed3002bb299c62f375578b8f1312e995..eef6a2e35239676ea991eaf3815085f846246343 100644 (file)
@@ -30,7 +30,7 @@ namespace MEDPARTITIONER
   class MEDPARTITIONER_EXPORT UserGraph : public Graph
   {
   public:
-    UserGraph(MEDCoupling::MEDCouplingSkyLineArray*, const int*, int);
+    UserGraph(MEDCoupling::MEDCouplingSkyLineArray*, const int*, mcIdType);
     virtual ~UserGraph();
     void partGraph(int, const std::string& options=std::string(""), ParaDomainSelector *sel=0);
   };
index 581c353699be52b0c794e317387b20dc9402a9ac..d462f9fd3def9460637d45376734921fc38e8182 100644 (file)
@@ -131,16 +131,16 @@ void MEDPARTITIONER::RandomizeAdj(int* xadj, int* adjncy, std::vector<int>& ran,
       std::cerr << "MEDPARTITIONER::RandomizeAdj only works on one proc!" << std::endl;
       return;
     }
-  int size=ran.size();
+  std::size_t size=ran.size();
   std::vector<int> invran(size);
-  for (int i=0; i<size; i++)
+  for (unsigned int i=0; i<size; i++)
     invran[ran[i]]=i;
   vx.resize(size+1);
   int lga=xadj[size];
   va.resize(lga);
   int jj=0;
   vx[0]=0;
-  for (int i=0; i<size; i++)
+  for (std::size_t i=0; i<size; i++)
     {
       int ir=ran[i];
       int ii=xadj[ir];
@@ -187,12 +187,12 @@ std::string MEDPARTITIONER::ReprVectorOfString(const std::vector<std::string>& v
   return oss.str();
 }
 
-std::string MEDPARTITIONER::ReprMapOfStringInt(const std::map<std::string,int>& mymap)
+std::string MEDPARTITIONER::ReprMapOfStringInt(const std::map<std::string,mcIdType>& mymap)
 {
   if (mymap.size()==0)
     return std::string(" NONE\n");
   std::ostringstream oss;
-  for (std::map<std::string,int>::const_iterator i=mymap.begin(); i!=mymap.end(); ++i) 
+  for (std::map<std::string,mcIdType>::const_iterator i=mymap.begin(); i!=mymap.end(); ++i) 
     oss << " -> [" << (*i).first << "]=" << (*i).second << std::endl;
   return oss.str();
 }
@@ -285,10 +285,10 @@ std::string MEDPARTITIONER::EraseTagSerialized(const std::string& fromStr, const
  * elements first and second of map give one elements in result vector of string
  * converting formatted the int second as firsts characters ending at first slash
  */
-std::vector<std::string> MEDPARTITIONER::VectorizeFromMapOfStringInt(const std::map<std::string,int>& mymap)
+std::vector<std::string> MEDPARTITIONER::VectorizeFromMapOfStringInt(const std::map<std::string,mcIdType>& mymap)
 {
   std::vector<std::string> res;
-  for (std::map<std::string,int>::const_iterator i=mymap.begin(); i!=mymap.end(); ++i)
+  for (std::map<std::string,mcIdType>::const_iterator i=mymap.begin(); i!=mymap.end(); ++i)
     {
       std::ostringstream oss;
       oss << (*i).second << "/" << (*i).first;
@@ -300,9 +300,9 @@ std::vector<std::string> MEDPARTITIONER::VectorizeFromMapOfStringInt(const std::
 /*
  * if existing identicals (first,second) in vector no problem, else Exception
  */
-std::map<std::string,int> MEDPARTITIONER::DevectorizeToMapOfStringInt(const std::vector<std::string>& vec)
+std::map<std::string,mcIdType> MEDPARTITIONER::DevectorizeToMapOfStringInt(const std::vector<std::string>& vec)
 {
-  std::map<std::string,int> res;
+  std::map<std::string,mcIdType> res;
   for (std::vector<std::string>::const_iterator i=vec.begin(); i!=vec.end(); ++i)
     {
       std::size_t pos=0;
@@ -310,11 +310,11 @@ std::map<std::string,int> MEDPARTITIONER::DevectorizeToMapOfStringInt(const std:
       std::size_t found=(*i).find('/'); //first slash
       if ((found==std::string::npos) || (found<1))
         throw INTERP_KERNEL::Exception("Error aIntNumber/anyString is expected");
-      int second;
+      mcIdType second;
       std::istringstream iss((*i).substr(pos,found));
       iss >> second;
       std::string first=(*i).substr(pos+found+1,posmax-found);
-      std::map<std::string,int>::iterator it=res.find(first);
+      std::map<std::string,mcIdType>::iterator it=res.find(first);
       if (it!=res.end())
         if ((*it).second!=second)
           throw INTERP_KERNEL::Exception("Error not the same map value");
@@ -506,17 +506,17 @@ void MEDPARTITIONER::FieldShortDescriptionToData(const std::string& description,
   IT=StrToInt(ExtractFromDescription(description,"IT="));
 }
 
-MEDCoupling::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v)
+MEDCoupling::DataArrayIdType *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<mcIdType>& v)
 {
-  MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
+  MEDCoupling::DataArrayIdType* p=MEDCoupling::DataArrayIdType::New();
   p->alloc(v.size(),1);
   std::copy(v.begin(),v.end(),p->getPointer());
   return p;
 }
 
-MEDCoupling::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v,const int nbComponents)
+MEDCoupling::DataArrayIdType *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<mcIdType>& v,const int nbComponents)
 {
-  MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
+  MEDCoupling::DataArrayIdType* p=MEDCoupling::DataArrayIdType::New();
   if (v.size()%nbComponents!=0)
     throw INTERP_KERNEL::Exception("Problem size modulo nbComponents != 0");
   p->alloc(v.size()/nbComponents,nbComponents);
@@ -539,9 +539,9 @@ std::vector<std::string> MEDPARTITIONER::BrowseFieldDouble(const MEDCoupling::ME
   std::vector<std::string> res;
   if (fd->getArray())
     {
-      int nb=fd->getArray()->getNumberOfComponents();
-      res.push_back("nbComponents="); res.back()+=IntToStr(nb);
-      for (int i=0; i<nb; i++)
+      std::size_t nb=fd->getArray()->getNumberOfComponents();
+      res.push_back("nbComponents="); res.back()+=IntToStr((int)nb);
+      for (unsigned int i=0; i<nb; i++)
         {
           res.push_back("componentInfo");
           res.back()+=IntToStr(i)+"="+fd->getArray()->getInfoOnComponent(i);
@@ -704,7 +704,7 @@ std::vector<std::string> MEDPARTITIONER::GetInfosOfField(const char *fileName, c
             {
               for (int j=0; j<lggeom; j++)
                 {
-                  int profilesize=0,nbi=0;
+                  med_int profilesize=0,nbi=0;
                   med_entity_type enttype=ENTITYTYPE[ie];
                   //enttype=MED_NODE;enttype=MED_CELL;enttype=MED_NODE_ELEMENT;
                   char pflname[MED_NAME_SIZE+1]="";
@@ -801,6 +801,15 @@ std::vector<std::string> MEDPARTITIONER::GetInfosOfField(const char *fileName, c
   return res;
 }
 
+MEDCoupling::MCAuto< MEDCoupling::DataArrayInt32 > MEDPARTITIONER::FromIdTypeVec( const std::vector< mcIdType >& vec )
+{
+  MEDCoupling::DataArrayInt32* array = MEDCoupling::DataArrayInt32::New();
+  array->alloc( vec.size(), 1 );
+  std::copy( vec.begin(), vec.end(), array->getPointer() );
+  return array;
+}
+
+
 /*!
  * quick almost human readable information on all fields on a mesh in a .med file
  */
@@ -830,27 +839,27 @@ MEDCoupling::MEDCouplingUMesh* MEDPARTITIONER::CreateEmptyMEDCouplingUMesh()
 
 namespace MEDPARTITIONER
 {
-  BBTreeOfDim::BBTreeOfDim( int           dim,
+  BBTreeOfDim::BBTreeOfDim( std::size_t   dim,
                             const double* bbs,
-                            int*          elems,
+                            mcIdType*     elems,
                             int           level,
-                            int           nbelems,
+                            mcIdType      nbelems,
                             double        epsilon)
   {
     switch ( dim )
       {
       case 3:
-        _tree=new BBTree<3> (bbs,elems,level,nbelems,epsilon);
+        _tree=new BBTree<3,mcIdType> (bbs,elems,level,nbelems,epsilon);
         _PgetElementsAroundPoint = & BBTreeOfDim::_getElementsAroundPoint< 3 >;
         _PgetIntersectingElems   = & BBTreeOfDim::_getIntersectingElems< 3 >;
         break;
       case 2:
-        _tree=new BBTree<2> (bbs,elems,level,nbelems,epsilon);
+        _tree=new BBTree<2,mcIdType> (bbs,elems,level,nbelems,epsilon);
         _PgetElementsAroundPoint = & BBTreeOfDim::_getElementsAroundPoint< 2 >;
         _PgetIntersectingElems   = & BBTreeOfDim::_getIntersectingElems< 2 >;
         break;
       case 1:
-        _tree=new BBTree<1> (bbs,elems,level,nbelems,epsilon);
+        _tree=new BBTree<1,mcIdType> (bbs,elems,level,nbelems,epsilon);
         _PgetElementsAroundPoint = & BBTreeOfDim::_getElementsAroundPoint< 1 >;
         _PgetIntersectingElems   = & BBTreeOfDim::_getIntersectingElems< 1 >;
         break;
@@ -866,13 +875,13 @@ namespace MEDPARTITIONER
   }
 
   void BBTreeOfDim::getElementsAroundPoint( const double* coordsPtr,
-                                            std::vector<int>& elems ) const
+                                            std::vector<mcIdType>& elems ) const
   {
     BBTreeOfDim* me = (BBTreeOfDim*) this;
     (me->*_PgetElementsAroundPoint) ( coordsPtr, elems );
   }
   void BBTreeOfDim::getIntersectingElems(const double* bb,
-                                         std::vector<int>& elems) const
+                                         std::vector<mcIdType>& elems) const
   {
     BBTreeOfDim* me = (BBTreeOfDim*) this;
     (me->*_PgetIntersectingElems) ( bb, elems );
index 3b00ab7bf0b8cdf6c051f8081a6d839a87eac9a6..57de1814beb007a2924891d84584266fd4ad9cbe 100644 (file)
@@ -45,7 +45,7 @@ namespace MEDPARTITIONER
                        
   MEDPARTITIONER_EXPORT std::string ReprVectorOfString(const std::vector<std::string>& vec);
   MEDPARTITIONER_EXPORT std::string ReprVectorOfString(const std::vector<std::string>& vec, const std::string separator);
-  MEDPARTITIONER_EXPORT std::string ReprMapOfStringInt(const std::map<std::string,int>& mymap);
+  MEDPARTITIONER_EXPORT std::string ReprMapOfStringInt(const std::map<std::string,mcIdType>& mymap);
   MEDPARTITIONER_EXPORT std::string ReprMapOfStringVectorOfString(const std::map< std::string,std::vector<std::string> >& mymap);
   MEDPARTITIONER_EXPORT std::string ReprFieldDescriptions(const std::vector<std::string>& vec,const  std::string separator);
   
@@ -54,8 +54,8 @@ namespace MEDPARTITIONER
   MEDPARTITIONER_EXPORT std::vector<std::string> DeserializeToVectorOfString(const std::string& str);
   MEDPARTITIONER_EXPORT std::string EraseTagSerialized(const std::string& fromStr, const std::string& tag);
   
-  MEDPARTITIONER_EXPORT std::vector<std::string> VectorizeFromMapOfStringInt(const std::map<std::string,int>& mymap);
-  MEDPARTITIONER_EXPORT std::map<std::string,int> DevectorizeToMapOfStringInt(const std::vector<std::string>& vec);
+  MEDPARTITIONER_EXPORT std::vector<std::string> VectorizeFromMapOfStringInt(const std::map<std::string,mcIdType>& mymap);
+  MEDPARTITIONER_EXPORT std::map<std::string,mcIdType> DevectorizeToMapOfStringInt(const std::vector<std::string>& vec);
   
   MEDPARTITIONER_EXPORT std::vector<std::string> VectorizeFromMapOfStringVectorOfString(const std::map< std::string,std::vector<std::string> >& mymap);
   MEDPARTITIONER_EXPORT std::map< std::string,std::vector<std::string> > DevectorizeToMapOfStringVectorOfString(const std::vector<std::string>& vec);
@@ -75,10 +75,10 @@ namespace MEDPARTITIONER
                               int& idomain, std::string& fileName, std::string& meshName, std::string& fieldName,
                               int& typeField, int& DT, int& IT);
   MEDPARTITIONER_EXPORT void FieldShortDescriptionToData(const std::string& description,
-                                   std::string& fieldName, int& typeField, int& entity, int& DT, int& IT);
-  
-  MEDCoupling::DataArrayInt *CreateDataArrayIntFromVector(const std::vector<int>& v);
-  MEDCoupling::DataArrayInt *CreateDataArrayIntFromVector(const std::vector<int>& v, const int nbComponents);
+                                                         std::string& fieldName, int& typeField, int& entity, int& DT, int& IT);
+
+  MEDCoupling::DataArrayIdType *CreateDataArrayIntFromVector(const std::vector<mcIdType>& v);
+  MEDCoupling::DataArrayIdType *CreateDataArrayIntFromVector(const std::vector<mcIdType>& v, const int nbComponents);
   MEDCoupling::DataArrayDouble *CreateDataArrayDoubleFromVector(const std::vector<double>& v);
   
   MEDCoupling::MEDCouplingUMesh *CreateEmptyMEDCouplingUMesh();
@@ -88,6 +88,9 @@ namespace MEDPARTITIONER
   std::vector<std::string> BrowseAllFieldsOnMesh(const std::string& myfile, const std::string& mymesh, const int idomain);
   std::vector<std::string> GetInfosOfField(const char *fileName, const char *meshName, const int idomain );
 
+  MEDCoupling::MCAuto< MEDCoupling::DataArrayInt32 > FromIdTypeVec( const std::vector< mcIdType >& vec );
+
+
 #ifdef HAVE_MPI
   //not advised, interblocking, use sendAndReceive
   //void SendVectorOfString(const std::vector<std::string>& vec, const int target);
@@ -100,9 +103,9 @@ namespace MEDPARTITIONER
   std::vector<double> *RecvDoubleVec(const int source);
   void RecvDoubleVec(std::vector<double>& vec, const int source);
     
-  void SendIntVec(const std::vector<int>& vec, const int target);
+  void SendIntVec(const std::vector<mcIdType>& vec, const int target);
   std::vector<int>* RecvIntVec(int source);
-  void RecvIntVec(std::vector<int>& vec, const int source);
+  void RecvIntVec(std::vector<mcIdType>& vec, const int source);
   
   void SendDataArrayInt(const MEDCoupling::DataArrayInt* da, const int target);
   MEDCoupling::DataArrayInt *RecvDataArrayInt(const int source);
@@ -146,33 +149,33 @@ namespace MEDPARTITIONER
   {
     void * _tree;
     void (BBTreeOfDim::*_PgetElementsAroundPoint)( const double* coordsPtr,
-                                                   std::vector<int>& elems ) const;
+                                                   std::vector<mcIdType>& elems ) const;
     void (BBTreeOfDim::*_PgetIntersectingElems)( const double* bb,
-                                                 std::vector<int>& elems ) const;
+                                                 std::vector<mcIdType>& elems ) const;
 
     template< int dim>
     void _getElementsAroundPoint( const double* coordsPtr,
-                                  std::vector<int>& elems ) const
+                                  std::vector<mcIdType>& elems ) const
     {
-      ((BBTree<dim,int>*)_tree)->getElementsAroundPoint( coordsPtr, elems );
+      ((BBTree<dim,mcIdType>*)_tree)->getElementsAroundPoint( coordsPtr, elems );
     }
     template< int dim>
     void _getIntersectingElems(const double* bb,
-                               std::vector<int>& elems) const
+                               std::vector<mcIdType>& elems) const
     {
-      ((BBTree<dim,int>*)_tree)->getIntersectingElems( bb, elems );
+      ((BBTree<dim,mcIdType>*)_tree)->getIntersectingElems( bb, elems );
     }
   public:
 
-    BBTreeOfDim( int           dim,
+    BBTreeOfDim( std::size_t   dim,
                  const double* bbs,
-                 int*          elems,
+                 mcIdType*     elems,
                  int           level,
-                 int           nbelems,
+                 mcIdType      nbelems,
                  double        epsilon=1e-12);
     ~BBTreeOfDim();
-    void getElementsAroundPoint(const double* coordsPtr, std::vector<int>& elems ) const;
-    void getIntersectingElems  (const double* bb,        std::vector<int>& elems)  const;
+    void getElementsAroundPoint(const double* coordsPtr, std::vector<mcIdType>& elems ) const;
+    void getIntersectingElems  (const double* bb,        std::vector<mcIdType>& elems)  const;
   };
 }
 #endif
index fcd43eaadaf329b2d385269f9a458e659183bfaf..f0231898428d5a96eecaf37d422adbc0feaac970 100644 (file)
@@ -27,6 +27,7 @@
 #include "MEDCouplingFieldDouble.hxx"
 #include "InterpKernelException.hxx"
 #include "MCAuto.hxx"
+#include "MEDCouplingMemArray.txx"
 #include "InterpKernelAutoPtr.hxx"
 
 #include <fstream>
 #include <string>
 
 #ifdef HAVE_MPI
+
 #include <mpi.h>
+
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+#define MPI_ID_TYPE MPI_INT
+#else
+#define MPI_ID_TYPE MPI_LONG
+#endif
+
 #endif
 
 using namespace MEDPARTITIONER;
@@ -54,9 +63,9 @@ std::vector<std::string> MEDPARTITIONER::SendAndReceiveVectorOfString(const std:
   if (rank == source)
     {
       std::string str=SerializeFromVectorOfString(vec);
-      int size=str.length();
+      int size=(int)str.length();
       MPI_Send( &size, 1, MPI_INT, target, tag, MPI_COMM_WORLD );
-      MPI_Send( (void*)str.data(), str.length(), MPI_CHAR, target, tag+100, MPI_COMM_WORLD );
+      MPI_Send( (void*)str.data(), (int)str.length(), MPI_CHAR, target, tag+100, MPI_COMM_WORLD );
     }
   
   int recSize=0;
@@ -83,7 +92,7 @@ std::vector<std::string> MEDPARTITIONER::AllgathervVectorOfString(const std::vec
   std::string str=SerializeFromVectorOfString(vec);
   
   std::vector<int> indexes(world_size);
-  int size=str.length();
+  int size=(int)str.length();
   MPI_Allgather(&size, 1, MPI_INT, 
                 &indexes[0], 1, MPI_INT, MPI_COMM_WORLD);
   
@@ -92,7 +101,7 @@ std::vector<std::string> MEDPARTITIONER::AllgathervVectorOfString(const std::vec
   for (int i=0; i<world_size; i++) disp.push_back( disp.back() + indexes[i] );
   
   std::string recData(disp.back(),'x');
-  MPI_Allgatherv((void*)str.data(), str.length(), MPI_CHAR,
+  MPI_Allgatherv((void*)str.data(), (int)str.length(), MPI_CHAR,
                  (void*)recData.data(), &indexes[0], &disp[0], MPI_CHAR,
                  MPI_COMM_WORLD);
   
@@ -115,7 +124,7 @@ std::vector<std::string> MEDPARTITIONER::AllgathervVectorOfString(const std::vec
 void MEDPARTITIONER::SendDoubleVec(const std::vector<double>& vec, const int target)
 {
   int tag = 111002;
-  int size=vec.size();
+  int size=(int)vec.size();
   if (MyGlobals::_Verbose>1000) 
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendDoubleVec " << size << std::endl;
 #ifdef HAVE_MPI
@@ -164,15 +173,15 @@ void MEDPARTITIONER::RecvDoubleVec(std::vector<double>& vec, const int source)
   \param vec vector to be sent
   \param target processor id of the target
 */
-void MEDPARTITIONER::SendIntVec(const std::vector<int>& vec, const int target)
+void MEDPARTITIONER::SendIntVec(const std::vector<mcIdType>& vec, const int target)
 {
   int tag = 111003;
-  int size=vec.size();
+  int size=(int)vec.size();
   if (MyGlobals::_Verbose>1000)
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendIntVec " << size << std::endl;
 #ifdef HAVE_MPI
-  MPI_Send(&size, 1, MPI_INT, target, tag, MPI_COMM_WORLD);
-  MPI_Send(const_cast<int*>(&vec[0]), size,MPI_INT, target, tag+100, MPI_COMM_WORLD);
+  MPI_Send(&size, 1, MPI_ID_TYPE, target, tag, MPI_COMM_WORLD);
+  MPI_Send(const_cast<mcIdType*>(&vec[0]), size,MPI_ID_TYPE, target, tag+100, MPI_COMM_WORLD);
 #endif
 }
 
@@ -197,7 +206,7 @@ std::vector<int> *MEDPARTITIONER::RecvIntVec(const int source)
   return vec;
 }
 
-void MEDPARTITIONER::RecvIntVec(std::vector<int>& vec, const int source)
+void MEDPARTITIONER::RecvIntVec(std::vector<mcIdType>& vec, const int source)
 {
   int tag = 111003;
   int size;
@@ -207,7 +216,7 @@ void MEDPARTITIONER::RecvIntVec(std::vector<int>& vec, const int source)
   if (MyGlobals::_Verbose>1000)
     std::cout << "proc " << MyGlobals::_Rank << " : <-- RecvIntVec " << size << std::endl;
   vec.resize(size);
-  MPI_Recv(&vec[0], size, MPI_INT, source, tag+100, MPI_COMM_WORLD,&status);
+  MPI_Recv(&vec[0], size, MPI_ID_TYPE, source, tag+100, MPI_COMM_WORLD,&status);
 #endif
 }
 
@@ -223,9 +232,9 @@ void MEDPARTITIONER::SendDataArrayInt(const MEDCoupling::DataArrayInt *da, const
     throw INTERP_KERNEL::Exception("Problem send DataArrayInt* NULL");
   int tag = 111004;
   int size[3];
-  size[0]=da->getNbOfElems();
-  size[1]=da->getNumberOfTuples();
-  size[2]=da->getNumberOfComponents();
+  size[0]=(int)da->getNbOfElems();
+  size[1]=(int)da->getNumberOfTuples();
+  size[2]=(int)da->getNumberOfComponents();
   if (MyGlobals::_Verbose>1000) 
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendDataArrayInt " << size[0] << std::endl;
 #ifdef HAVE_MPI
@@ -271,9 +280,9 @@ void MEDPARTITIONER::SendDataArrayDouble(const MEDCoupling::DataArrayDouble *da,
     throw INTERP_KERNEL::Exception("Problem send DataArrayDouble* NULL");
   int tag = 111005;
   int size[3];
-  size[0]=da->getNbOfElems();
-  size[1]=da->getNumberOfTuples();
-  size[2]=da->getNumberOfComponents();
+  size[0]=(int)da->getNbOfElems();
+  size[1]=(int)da->getNumberOfTuples();
+  size[2]=(int)da->getNumberOfComponents();
   if (MyGlobals::_Verbose>1000) 
     std::cout << "proc " << MyGlobals::_Rank << " : --> SendDataArrayDouble " << size[0] << std::endl;
 #ifdef HAVE_MPI
@@ -380,7 +389,7 @@ void MEDPARTITIONER::TestVectorOfStringMpi()
 void MEDPARTITIONER::TestMapOfStringIntMpi()
 {
   int rank=MyGlobals::_Rank;
-  std::map<std::string,int> myMap;
+  std::map<std::string,mcIdType> myMap;
   myMap["one"]=1;
   myMap["two"]=22;  //a bug
   myMap["three"]=3;
@@ -389,7 +398,7 @@ void MEDPARTITIONER::TestMapOfStringIntMpi()
   if (rank==0)
     {
       std::vector<std::string> v2=VectorizeFromMapOfStringInt(myMap);
-      std::map<std::string,int> m3=DevectorizeToMapOfStringInt(v2);
+      std::map<std::string,mcIdType> m3=DevectorizeToMapOfStringInt(v2);
       if (ReprMapOfStringInt(m3)!=ReprMapOfStringInt(myMap))
         throw INTERP_KERNEL::Exception("Problem in (de)vectorize MapOfStringInt");
     }
@@ -399,7 +408,7 @@ void MEDPARTITIONER::TestMapOfStringIntMpi()
     {
       std::cout << "v2 is : a vector of size " << v2.size() << std::endl;
       std::cout << ReprVectorOfString(v2) << std::endl;
-      std::map<std::string,int> m2=DevectorizeToMapOfStringInt(v2);
+      std::map<std::string,mcIdType> m2=DevectorizeToMapOfStringInt(v2);
       std::cout << "m2 is : a map of size " << m2.size() << std::endl;
       std::cout << ReprMapOfStringInt(m2) << std::endl;
     }
index 1c1b781020ee9a0c717ce76678915b3910c190e1..21a25cecb6345e4d9cad25fdb5c4f114ed407176 100644 (file)
@@ -163,7 +163,7 @@ void MEDPARTITIONERTest::tearDown()
 MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildCUBE3DMesh()
 //only hexa8
 {
-  vector<int> conn;
+  vector<mcIdType> conn;
   vector<double> coor;
   for (int k=0; k<=_nk; k++)
     for (int j=0; j<=_nj; j++)
@@ -213,12 +213,12 @@ MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildCUBE3DMesh()
 
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(3);
-  int nbc=conn.size()/8; //nb of cells
-  int nbv=coor.size()/3; //nb of vertices
-  mesh->allocateCells(nbc);
-  for(int i=0; i<nbc; i++)
+  std::size_t nbc=conn.size()/8; //nb of cells
+  std::size_t nbv=coor.size()/3; //nb of vertices
+  mesh->allocateCells(ToIdType(nbc));
+  for(std::size_t i=0; i<nbc; i++)
     {
-      int onehexa[8];
+      mcIdType onehexa[8];
       std::copy(conn.begin()+i*8,conn.begin()+(i+1)*8,onehexa);
       if (false) //(_verbose)
         {
@@ -241,7 +241,7 @@ MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildCUBE3DMesh()
 MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildCARRE3DMesh()
 //only quad4 in oblique (k=j)
 {
-  vector<int> conn;
+  vector<mcIdType> conn;
   vector<double> coor;
   for (int j=0; j<=_nj; j++)
     for (int i=0; i<=_ni; i++)
@@ -281,12 +281,12 @@ MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildCARRE3DMesh()
 
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
-  int nbc=conn.size()/4; //nb of cells
-  int nbv=coor.size()/3; //nb of vertices
-  mesh->allocateCells(nbc);
-  for(int i=0; i<nbc; i++)
+  std::size_t nbc=conn.size()/4; //nb of cells
+  std::size_t nbv=coor.size()/3; //nb of vertices
+  mesh->allocateCells(ToIdType(nbc));
+  for(std::size_t i=0; i<nbc; i++)
     {
-      int onequa[4];
+      mcIdType onequa[4];
       std::copy(conn.begin()+i*4,conn.begin()+(i+1)*4,onequa);
       if (false) //(_verbose)
         {
@@ -350,12 +350,12 @@ MEDCoupling::MEDCouplingUMesh * MEDPARTITIONERTest::buildFACE3DMesh()
 
   MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
   mesh->setMeshDimension(2);
-  int nbc=conn.size()/4; //nb of cells
-  int nbv=coor.size()/3; //nb of vertices
-  mesh->allocateCells(nbc);
-  for(int i=0; i<nbc; i++)
+  std::size_t nbc=conn.size()/4; //nb of cells
+  std::size_t nbv=coor.size()/3; //nb of vertices
+  mesh->allocateCells(ToIdType(nbc));
+  for(std::size_t i=0; i<nbc; i++)
     {
-      int onequa[4];
+      mcIdType onequa[4];
       std::copy(conn.begin()+i*4,conn.begin()+(i+1)*4,onequa);
       if (false) //(_verbose)
         {
@@ -389,7 +389,7 @@ MEDCouplingFieldDouble * MEDPARTITIONERTest::buildVecFieldOnCells(string myfileN
         }
 
   MEDCouplingUMesh *mesh=ReadUMeshFromFile(myfileName.c_str(),_mesh_name.c_str(),0);
-  int nbOfCells=mesh->getNumberOfCells();
+  mcIdType nbOfCells=mesh->getNumberOfCells();
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   f1->setName("VectorFieldOnCells");
   f1->setDescription("DescriptionOfFieldOnCells"); //not saved in file?
@@ -422,7 +422,7 @@ MEDCouplingFieldDouble * MEDPARTITIONERTest::buildVecFieldOnNodes()
         }
 
   MEDCouplingUMesh *mesh=ReadUMeshFromFile(_file_name.c_str(),_mesh_name.c_str(),0);
-  int nbOfNodes=mesh->getNumberOfNodes();
+  mcIdType nbOfNodes=mesh->getNumberOfNodes();
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_NODES,ONE_TIME);
   f1->setName("VectorFieldOnNodes");
   f1->setDescription("DescriptionOfFieldOnNodes"); //not saved in file?
@@ -472,15 +472,15 @@ void MEDPARTITIONERTest::createTestMeshWithoutField()
     WriteUMeshes(_file_name_with_faces.c_str(), meshes, true);
 
     MEDCoupling::MEDFileUMesh* mfm=MEDCoupling::MEDFileUMesh::New(_file_name_with_faces.c_str(), mesh1->getName().c_str());
-    DataArrayInt* FacesFam=DataArrayInt::New();
+    DataArrayIdType* FacesFam=DataArrayIdType::New();
     FacesFam->alloc(mfm->getSizeAtLevel(-1),1);
     FacesFam->fillWithValue(-1);
-    DataArrayInt* CellsFam=DataArrayInt::New();
+    DataArrayIdType* CellsFam=DataArrayIdType::New();
     CellsFam->alloc(mfm->getSizeAtLevel(0),1);
     CellsFam->fillWithValue(1);
     mfm->setFamilyFieldArr(-1,FacesFam);
     mfm->setFamilyFieldArr(0,CellsFam);
-    map<string,int> theFamilies;
+    map<string,mcIdType> theFamilies;
     theFamilies["FAMILLE_ZERO"]=0;
     theFamilies["FamilyFaces"]=-1;
     theFamilies["FamilyCells"]=1;
@@ -594,10 +594,10 @@ void MEDPARTITIONERTest::createHugeTestMesh(int ni, int nj, int nk, int nbx, int
 
               DataArrayDouble* coords=mesh->getCoords();
               //int nbOfComp=coords->getNumberOfComponents();  //be 3D
-              int nbOfTuple=coords->getNumberOfTuples();
+              mcIdType nbOfTuple=coords->getNumberOfTuples();
               double* ptr=coords->getPointer();
               double* ptrini=ptrInit;
-              for (int i=0; i<nbOfTuple; i++)
+              for (mcIdType i=0; i<nbOfTuple; i++)
                 {
                   *ptr=(*ptrini)+dx; ptr++; ptrini++; //be 3D
                   *ptr=(*ptrini)+dy; ptr++; ptrini++;
@@ -682,8 +682,8 @@ void MEDPARTITIONERTest::createTestMeshWithVecFieldOnCells()
     //more nbptgauss=8 by default needs set MEDCouplingFieldDiscretizationPerCell
     //theory: (may be) http://www.code-aster.org/V2/doc/v9/fr/man_r/r3/r3.06.03.pdf
     int nbptgauss=8; //nb pt de gauss by cell
-    int nbcell=f3->getMesh()->getNumberOfCells();
-    int nb=nbcell*nbptgauss;
+    mcIdType nbcell=f3->getMesh()->getNumberOfCells();
+    mcIdType nb=nbcell*nbptgauss;
     int nbcomp=2;
     array->alloc(nb,nbcomp);
     double *ptr=array->getPointer();
@@ -805,8 +805,8 @@ void MEDPARTITIONERTest::testMeshCollectionSingle()
   CPPUNIT_ASSERT(collection.getName()=="testMesh");
   CPPUNIT_ASSERT_EQUAL(1,collection.getNbOfLocalMeshes());
   CPPUNIT_ASSERT_EQUAL(1,collection.getNbOfGlobalMeshes());
-  CPPUNIT_ASSERT_EQUAL(_ni*_nj*_nk,collection.getNbOfLocalCells());
-  CPPUNIT_ASSERT_EQUAL(_ni*_nj,collection.getNbOfLocalFaces());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(_ni*_nj*_nk),collection.getNbOfLocalCells());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(_ni*_nj),collection.getNbOfLocalFaces());
 }
 
 void MEDPARTITIONERTest::testMeshCollectionXml()
@@ -821,8 +821,8 @@ void MEDPARTITIONERTest::testMeshCollectionXml()
   CPPUNIT_ASSERT(collection.getName()=="testMesh");
   CPPUNIT_ASSERT_EQUAL(8,collection.getNbOfLocalMeshes());
   CPPUNIT_ASSERT_EQUAL(8,collection.getNbOfGlobalMeshes());
-  CPPUNIT_ASSERT_EQUAL(_ni*_nj*_nk*8,collection.getNbOfLocalCells());
-  CPPUNIT_ASSERT_EQUAL(0,collection.getNbOfLocalFaces());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(_ni*_nj*_nk*8),collection.getNbOfLocalCells());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(0),collection.getNbOfLocalFaces());
 }
 
 
@@ -1064,17 +1064,17 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForMesh(std
   CPPUNIT_ASSERT_EQUAL(3, collection.getMeshDimension());
   std::vector<MEDCoupling::MEDCouplingUMesh*>cellMeshes=collection.getMesh();
   CPPUNIT_ASSERT_EQUAL(5, (int) cellMeshes.size());
-  int nbcells=0;
+  mcIdType nbcells=0;
   for (std::size_t i = 0; i < cellMeshes.size(); i++)
     nbcells+=cellMeshes[i]->getNumberOfCells();
-  CPPUNIT_ASSERT_EQUAL((int)cellMesh->getNumberOfCells(), nbcells);
+  CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), nbcells);
 
   std::vector<MEDCoupling::MEDCouplingUMesh*>faceMeshes=collection.getFaceMesh();
   CPPUNIT_ASSERT_EQUAL(5, (int) faceMeshes.size());
-  int nbfaces=0;
+  mcIdType nbfaces=0;
   for (std::size_t i=0; i < faceMeshes.size(); i++)
     nbfaces+=faceMeshes[i]->getNumberOfCells();
-  CPPUNIT_ASSERT_EQUAL((int)faceMesh->getNumberOfCells(), nbfaces);
+  CPPUNIT_ASSERT_EQUAL(faceMesh->getNumberOfCells(), nbfaces);
 
   //merge split meshes and test equality
   cmd=execName+" --ndomains=1 --split-method="+MetisOrScotch;  //on same proc
@@ -1105,7 +1105,7 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForMesh(std
   */
 
   std::vector<const MEDCouplingUMesh *> meshes;
-  std::vector<DataArrayInt *> corr;
+  std::vector<DataArrayIdType *> corr;
   meshes.push_back(cellMesh);
   refusedCellMesh->tryToShareSameCoordsPermute(*cellMesh, 1e-9);
   meshes.push_back(refusedCellMesh);
@@ -1175,7 +1175,7 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForFieldOnC
   CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
 
   std::vector<const MEDCouplingUMesh *> meshes;
-  std::vector<DataArrayInt *> corr;
+  std::vector<DataArrayIdType *> corr;
   meshes.push_back(cellMesh);
   refusedCellMesh->tryToShareSameCoordsPermute(*cellMesh, 1e-9);
   meshes.push_back(refusedCellMesh);
@@ -1186,8 +1186,8 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForFieldOnC
   MCAuto<MEDCouplingField> field2Tmp(ReadFieldCell(refusedName.c_str(),refusedCellMesh->getName().c_str(),0,"VectorFieldOnCells",0,1));
   MCAuto<MEDCouplingFieldDouble> field1(MEDCoupling::DynamicCast<MEDCouplingField,MEDCouplingFieldDouble>(field1Tmp)),field2(MEDCoupling::DynamicCast<MEDCouplingField,MEDCouplingFieldDouble>(field2Tmp));
 
-  int nbcells=corr[1]->getNumberOfTuples();
-  CPPUNIT_ASSERT_EQUAL((int)cellMesh->getNumberOfCells(), nbcells);
+  mcIdType nbcells=corr[1]->getNumberOfTuples();
+  CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), nbcells);
   //use corr to test equality of field
   DataArrayDouble* f1=field1->getArray();
   DataArrayDouble* f2=field2->getArray();
@@ -1200,21 +1200,21 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForFieldOnC
 
     }
   int nbequal=0;
-  int nbcomp=field1->getNumberOfComponents();
+  std::size_t nbcomp=field1->getNumberOfComponents();
   double* p1=f1->getPointer();
   double* p2=f2->getPointer();
-  int* pc=corr[1]->getPointer();
+  mcIdType* pc=corr[1]->getPointer();
   for (int i = 0; i < nbcells; i++)
     {
-      int i1=pc[i]*nbcomp;
-      int i2=i*nbcomp;
-      for (int j = 0; j < nbcomp; j++)
+      std::size_t i1=pc[i]*nbcomp;
+      std::size_t i2=i*nbcomp;
+      for (std::size_t j = 0; j < nbcomp; j++)
         {
           if (p1[i1+j]==p2[i2+j]) nbequal++;
           //cout<<" "<<p1[i1+j]<<"="<<p2[i2+j];
         }
     }
-  CPPUNIT_ASSERT_EQUAL(nbcells*nbcomp, nbequal);
+  CPPUNIT_ASSERT_EQUAL((int)(nbcells*nbcomp), nbequal);
 
   for (std::size_t i = 0; i < corr.size(); i++)
     corr[i]->decrRef();
@@ -1263,7 +1263,7 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForFieldOnG
   CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), refusedCellMesh->getNumberOfCells());
 
   std::vector<const MEDCouplingUMesh *> meshes;
-  std::vector<DataArrayInt *> corr;
+  std::vector<DataArrayIdType *> corr;
   meshes.push_back(cellMesh);
   refusedCellMesh->tryToShareSameCoordsPermute(*cellMesh, 1e-9);
   meshes.push_back(refusedCellMesh);
@@ -1274,8 +1274,8 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForFieldOnG
   MCAuto<MEDCouplingField> field2Tmp=ReadField(ON_GAUSS_NE,refusedName.c_str(),refusedCellMesh->getName().c_str(),0,"MyFieldOnGaussNE",5,6);
   MCAuto<MEDCouplingFieldDouble> field1(MEDCoupling::DynamicCast<MEDCouplingField,MEDCouplingFieldDouble>(field1Tmp)),field2(MEDCoupling::DynamicCast<MEDCouplingField,MEDCouplingFieldDouble>(field2Tmp));
 
-  int nbcells=corr[1]->getNumberOfTuples();
-  CPPUNIT_ASSERT_EQUAL((int)cellMesh->getNumberOfCells(), nbcells);
+  mcIdType nbcells=corr[1]->getNumberOfTuples();
+  CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), nbcells);
   //use corr to test equality of field
   DataArrayDouble* f1=field1->getArray();
   DataArrayDouble* f2=field2->getArray();
@@ -1289,21 +1289,21 @@ void MEDPARTITIONERTest::verifyMetisOrScotchMedpartitionerOnSmallSizeForFieldOnG
     }
   int nbequal=0;
   int nbptgauss=8;
-  int nbcomp=field1->getNumberOfComponents();
+  std::size_t nbcomp=field1->getNumberOfComponents();
   double* p1=f1->getPointer();
   double* p2=f2->getPointer();
-  int* pc=corr[1]->getPointer();
+  mcIdType* pc=corr[1]->getPointer();
   for (int i = 0; i < nbcells; i++)
     {
-      int i1=pc[i]*nbcomp*nbptgauss;
-      int i2=i*nbcomp*nbptgauss;
-      for (int j = 0; j < nbcomp*nbptgauss; j++)
+      std::size_t i1=pc[i]*nbcomp*nbptgauss;
+      std::size_t i2=i*nbcomp*nbptgauss;
+      for (std::size_t j = 0; j < nbcomp*nbptgauss; j++)
         {
           if (p1[i1+j]==p2[i2+j]) nbequal++;
           //cout<<" "<<p1[i1+j]<<"="<<p2[i2+j];
         }
     }
-  CPPUNIT_ASSERT_EQUAL(nbcells*nbcomp*nbptgauss, nbequal);
+  CPPUNIT_ASSERT_EQUAL((int)(nbcells*nbcomp*nbptgauss), nbequal);
 
   for (std::size_t i = 0; i < corr.size(); i++)
     corr[i]->decrRef();
@@ -1336,7 +1336,7 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
   int nbFam1, nbFam2, nbc;
   {
     const int nbX = 20, nbY = 15;
-    vector<int> conn;
+    vector<mcIdType> conn;
     vector<double> coor;
     for (int j=0; j<=nbY; j++)
       for (int i=0; i<=nbX; i++)
@@ -1358,14 +1358,14 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
     MEDCouplingUMesh *mesh=MEDCouplingUMesh::New();
     mesh->setMeshDimension(2);
 
-    nbc=conn.size()/4; //nb of cells
+    nbc=(int)conn.size()/4; //nb of cells
     mesh->allocateCells(nbc);
-    int* pConn = &conn[0];
+    mcIdType* pConn = &conn[0];
     for(int i=0; i<nbc; i++, pConn+=4)
       mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,pConn);
     mesh->finishInsertingCells();
 
-    int nbv=coor.size()/2; //nb of vertices
+    int nbv=(int)coor.size()/2; //nb of vertices
     DataArrayDouble *myCoords=DataArrayDouble::New();
     myCoords->useArray( &coor[0], /*ownership=*/false, DeallocType::CPP_DEALLOC, nbv, 2 );
     mesh->setCoords(myCoords);
@@ -1374,14 +1374,14 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
     mesh->checkConsistencyLight();
 
     // groups of cells
-    DataArrayInt* cellsFam=DataArrayInt::New();
+    DataArrayIdType* cellsFam=DataArrayIdType::New();
     cellsFam->alloc(nbc,1);
     nbFam1 = nbc/3, nbFam2 = nbc/2;
     int iE = 0;
     for ( int i = 0; i < nbFam1; ++i ) cellsFam->getPointer()[ iE++ ] = idFam1;
     for ( int i = 0; i < nbFam2; ++i ) cellsFam->getPointer()[ iE++ ] = idFam2;
     for (            ; iE < nbc;     ) cellsFam->getPointer()[ iE++ ] = 0;
-    map<string,int> theFamilies;
+    map<string,mcIdType> theFamilies;
     theFamilies["FAMILLE_ZERO"]=0;
     theFamilies["Family1"     ]=idFam1;
     theFamilies["Family2"     ]=idFam2;
@@ -1432,7 +1432,7 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
     CPPUNIT_ASSERT_EQUAL(ndomains,new_collection.getNbOfLocalMeshes());
     CPPUNIT_ASSERT_EQUAL(ndomains,new_collection.getNbOfGlobalMeshes());
     CPPUNIT_ASSERT_EQUAL(collection.getNbOfLocalCells(),new_collection.getNbOfLocalCells());
-    CPPUNIT_ASSERT_EQUAL(0,collection.getNbOfLocalFaces());
+    CPPUNIT_ASSERT_EQUAL(ToIdType(0),collection.getNbOfLocalFaces());
     CPPUNIT_ASSERT      (new_collection.getNbOfLocalFaces() > 0 );
 
     MyGlobals::_General_Informations.clear();
@@ -1443,14 +1443,14 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
   // Check that "groups and family handling is NOT bugged"
 
   MeshCollection new_collection(std::string(xmlName)+".xml");
-  std::map< int, int > famId2nb; // count total nb of cells in divided families
-  std::map< int, int >::iterator id2nn;
+  std::map< mcIdType, int > famId2nb; // count total nb of cells in divided families
+  std::map< mcIdType, int >::iterator id2nn;
   {
-    const std::vector<MEDCoupling::DataArrayInt*>& famIdsVec = new_collection.getCellFamilyIds();
+    const std::vector<MEDCoupling::DataArrayIdType*>& famIdsVec = new_collection.getCellFamilyIds();
     for ( size_t i = 0; i < famIdsVec.size(); ++i )
       {
-        MEDCoupling::DataArrayInt* famIdsArr = famIdsVec[i];
-        for ( int j = famIdsArr->getNbOfElems()-1; j >= 0; --j )
+        MEDCoupling::DataArrayIdType* famIdsArr = famIdsVec[i];
+        for ( mcIdType j = famIdsArr->getNbOfElems()-1; j >= 0; --j )
           {
             id2nn = famId2nb.insert( make_pair( famIdsArr->getPointer()[j], 0 )).first;
             id2nn->second++;
@@ -1468,11 +1468,11 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
   // Check that "creates boundary faces option is handled"
 
   famId2nb.clear();
-  const std::vector<MEDCoupling::DataArrayInt*>& famIdsVec = new_collection.getFaceFamilyIds();
+  const std::vector<MEDCoupling::DataArrayIdType*>& famIdsVec = new_collection.getFaceFamilyIds();
   for ( size_t i = 0; i < famIdsVec.size(); ++i )
     {
-      MEDCoupling::DataArrayInt* famIdsArr = famIdsVec[i];
-      for ( int j = famIdsArr->getNbOfElems()-1; j >= 0; --j )
+      MEDCoupling::DataArrayIdType* famIdsArr = famIdsVec[i];
+      for ( mcIdType j = famIdsArr->getNbOfElems()-1; j >= 0; --j )
         {
           id2nn = famId2nb.insert( make_pair( famIdsArr->getPointer()[j], 0 )).first;
           id2nn->second++;
@@ -1483,9 +1483,9 @@ void MEDPARTITIONERTest::testCreateBoundaryFaces2D()
 
   // for each "JOINT_n_p_..." group there must be "JOINT_p_n_..." group
   // of the same size
-  std::map<std::string,int>& famName2id = new_collection.getFamilyInfo();
-  std::map<std::string,int>::iterator na2id = famName2id.begin(), na2id2;
-  std::set< int > okFamIds;
+  std::map<std::string,mcIdType>& famName2id = new_collection.getFamilyInfo();
+  std::map<std::string,mcIdType>::iterator na2id = famName2id.begin(), na2id2;
+  std::set< mcIdType > okFamIds;
   okFamIds.insert(0);
   for ( ; na2id != famName2id.end(); ++na2id )
     {
index c24e4cf3e1555f7771acad41a7f7f8656f967467..a5ef082df115f229dd4d25b65b0095a463a4898b 100644 (file)
@@ -21,6 +21,10 @@ INCLUDE(${SWIG_USE_FILE})
 
 ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 SET_SOURCE_FILES_PROPERTIES(MEDPartitioner.i PROPERTIES CPLUSPLUS ON)
 IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
   SET_SOURCE_FILES_PROPERTIES(MEDPartitioner.i PROPERTIES SWIG_FLAGS "-py3")
index 1bf934ecddae5ad316a01e213e88c9874ecb6f97..bd76a83324a25600b1f5862a3ded5a1915f442da 100644 (file)
@@ -24,6 +24,10 @@ IF(HDF5_ENABLE_PARALLEL OR HDF5_IS_PARALLEL)
   ADD_DEFINITIONS("-DHDF5_IS_PARALLEL")
 ENDIF(HDF5_ENABLE_PARALLEL OR HDF5_IS_PARALLEL)
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 INCLUDE_DIRECTORIES(
   ${MPI_INCLUDE_DIRS}
   ${MEDFILE_INCLUDE_DIRS}
index dbf9c110390b1d5ea8184df30d6d718ba78f0ff3..69f94c8b859207a839fb0c75d5653617482c5f5d 100644 (file)
@@ -88,15 +88,16 @@ MEDFileUMesh *ParaMEDFileUMesh::ParaNew(int iPart, int nbOfParts, const MPI_Comm
 MEDFileUMesh *ParaMEDFileUMesh::NewPrivate(med_idt fid, int iPart, int nbOfParts, const std::string& fileName, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
 {
   MCAuto<MEDFileUMesh> ret;
-  int meshDim, spaceDim, numberOfNodes;
+  int meshDim, spaceDim;
+  mcIdType numberOfNodes;
   std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > typesDistrib(GetUMeshGlobalInfo(fileName,mName,meshDim,spaceDim,numberOfNodes));
   std::vector<INTERP_KERNEL::NormalizedCellType> types;
-  std::vector<int> distrib;
+  std::vector<mcIdType> distrib;
   for(std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > >::const_iterator it0=typesDistrib.begin();it0!=typesDistrib.end();it0++)
     for(std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
       {
         types.push_back((*it1).first);
-        int tmp[3];
+        mcIdType tmp[3];
         DataArray::GetSlice(0,(*it1).second,1,iPart,nbOfParts,tmp[0],tmp[1]);
         tmp[2]=1;
         distrib.insert(distrib.end(),tmp,tmp+3);
index 4c72d0be98297773258b469bbaeeeed0d03f9357..dbd238af10989506f8f22812baa6da6314fdd68b 100644 (file)
@@ -56,11 +56,11 @@ void ParaMEDLoader::WriteParaMesh(const char *fileName, MEDCoupling::ParaMESH *m
  */
 void ParaMEDLoader::WriteMasterFile(const char *fileName, const std::vector<std::string>& fileNames, const char *meshName)
 {
-  int nbOfDom=fileNames.size();
+  std::size_t nbOfDom=fileNames.size();
   std::ofstream fs(fileName);
   fs << "#MED Fichier V 2.3" << " " << std::endl;
   fs << "#"<<" " << std::endl;
   fs << nbOfDom <<" " << std::endl;
-  for(int i=0;i<nbOfDom;i++)
+  for(std::size_t i=0;i<nbOfDom;i++)
     fs << meshName << " " << i+1 << " " << meshName << "_" << i+1 << " localhost " << fileNames[i] << " " << std::endl;
 }
index 5471c596459947153e1a7a8bea3f00c6d1733a2e..59ddb3070bcb1d4cbe3d68e699e8c4eec24cfc36 100644 (file)
@@ -54,7 +54,7 @@ namespace MEDCoupling
   BlockTopology::BlockTopology(const ProcessorGroup& group, MEDCouplingCMesh *grid):
     _dimension(grid->getSpaceDimension()), _proc_group(&group), _owns_processor_group(false)
   {
-    vector <int> axis_length(_dimension);
+    vector <mcIdType> axis_length(_dimension);
     _nb_elems=1;
     for (int idim=0; idim <_dimension; idim++)
       {
@@ -119,7 +119,7 @@ namespace MEDCoupling
           _proc_group=geom_topo.getProcGroup();
         _local_array_indices=geom_topo._local_array_indices;
         vector<int> comp_indices = *(comp_topo.getBlockIndices());
-        _local_array_indices.push_back(comp_indices);
+        _local_array_indices.emplace_back( comp_indices.begin(), comp_indices.end() );
         _nb_procs_per_dim=geom_topo._nb_procs_per_dim;
         _nb_procs_per_dim.push_back(comp_topo.nbBlocks());
         _cycle_type=geom_topo._cycle_type;
@@ -137,16 +137,16 @@ namespace MEDCoupling
    * to \a group will cause an MPI error, while calling from a subset
    * of \a group will result in a deadlock. 
    */
-  BlockTopology::BlockTopology(const ProcessorGroup& group, int nb_elem):_dimension(1),_proc_group(&group),_owns_processor_group(false)
+  BlockTopology::BlockTopology(const ProcessorGroup& group, mcIdType nb_elem):_dimension(1),_proc_group(&group),_owns_processor_group(false)
   {
-    int* nbelems_per_proc = new int[group.size()];
+    mcIdType* nbelems_per_proc = new mcIdType[group.size()];
     const MPIProcessorGroup* mpi_group=dynamic_cast<const MPIProcessorGroup*>(_proc_group);
     const MPI_Comm* comm=mpi_group->getComm();
-    int nbtemp=nb_elem;
-    mpi_group->getCommInterface().allGather(&nbtemp, 1, MPI_INT
-                                            nbelems_per_proc, 1, MPI_INT
+    mcIdType nbtemp=nb_elem;
+    mpi_group->getCommInterface().allGather(&nbtemp, 1, MPI_ID_TYPE
+                                            nbelems_per_proc, 1, MPI_ID_TYPE
                                             *comm);
-    _nb_elems=0;  
+    _nb_elems=0;
   
     //splitting along only dimension
     _local_array_indices.resize(1);
@@ -174,22 +174,22 @@ namespace MEDCoupling
   }
 
   //!converts a pair <subdomainid,local> to a global number
-  std::pair<int,int> BlockTopology::globalToLocal(const int global) const
+  std::pair<int,mcIdType> BlockTopology::globalToLocal(const mcIdType global) const
   {
     int subdomain_id=0;
-    int position=global;
-    int size=_nb_elems;
-    int size_procs=_proc_group->size();
-    int increment=size;
-    vector<int>axis_position(_dimension);
-    vector<int>axis_offset(_dimension);
+    mcIdType position=global;
+    mcIdType size=_nb_elems;
+    std::size_t size_procs=_proc_group->size();
+    mcIdType increment=size;
+    vector<mcIdType>axis_position(_dimension);
+    vector<mcIdType>axis_offset(_dimension);
     for (int idim=0; idim<_dimension; idim++)
       {
-        int axis_size=_local_array_indices[idim].size()-1;
-        int axis_nb_elem=_local_array_indices[idim][axis_size];
+        std::size_t axis_size=_local_array_indices[idim].size()-1;
+        mcIdType axis_nb_elem=_local_array_indices[idim][axis_size];
         increment=increment/axis_nb_elem;
-        int proc_increment = size_procs/(axis_size);
-        int axis_pos=position/increment;
+        int proc_increment = (int)(size_procs/axis_size);
+        mcIdType axis_pos=position/increment;
         position=position%increment;
         int iaxis=1;
         while (_local_array_indices[idim][iaxis]<=axis_pos)
@@ -200,8 +200,8 @@ namespace MEDCoupling
         axis_position[idim]=axis_pos-_local_array_indices[idim][iaxis-1];
         axis_offset[idim]=iaxis;
       }
-    int local=0;
-    int local_increment=1;
+    mcIdType local=0;
+    mcIdType local_increment=1;
     for (int idim=_dimension-1; idim>=0; idim--)
       {
         local+=axis_position[idim]*local_increment;
@@ -211,26 +211,26 @@ namespace MEDCoupling
   }
 
   //!converts local number to a global number
-  int BlockTopology::localToGlobal(const pair<int,int> local) const
+  mcIdType BlockTopology::localToGlobal(const pair<int,mcIdType> local) const
   {
 
-    int subdomain_id=local.first;
-    int global=0;
-    int loc=local.second;
-    int increment=_nb_elems;
-    int proc_increment=_proc_group->size();
-    int local_increment=getNbLocalElements();
+    std::size_t subdomain_id=local.first;
+    mcIdType global=0;
+    mcIdType loc=local.second;
+    mcIdType increment=_nb_elems;
+    std::size_t proc_increment=_proc_group->size();
+    mcIdType local_increment=getNbLocalElements();
     for (int idim=0; idim < _dimension; idim++)
       {
-        int axis_size=_local_array_indices[idim].size()-1;
-        int axis_nb_elem=_local_array_indices[idim][axis_size];
+        std::size_t axis_size=_local_array_indices[idim].size()-1;
+        mcIdType axis_nb_elem=_local_array_indices[idim][axis_size];
         increment=axis_nb_elem==0?0:increment/axis_nb_elem;
-        proc_increment = proc_increment/(axis_size);
-        int proc_axis=subdomain_id/proc_increment;
+        proc_increment = proc_increment/axis_size;
+        std::size_t proc_axis=subdomain_id/proc_increment;
         subdomain_id=subdomain_id%proc_increment;
-        int local_axis_nb_elem=_local_array_indices[idim][proc_axis+1]-_local_array_indices[idim][proc_axis];
+        mcIdType local_axis_nb_elem=_local_array_indices[idim][proc_axis+1]-_local_array_indices[idim][proc_axis];
         local_increment = (local_axis_nb_elem==0)?0:(local_increment/local_axis_nb_elem);
-        int iaxis=((local_increment==0)?0:(loc/local_increment))+_local_array_indices[idim][proc_axis];
+        mcIdType iaxis=((local_increment==0)?0:(loc/local_increment))+_local_array_indices[idim][proc_axis];
         global+=increment*iaxis;
         loc = (local_increment==0)?0:(loc%local_increment);
       }
@@ -238,18 +238,18 @@ namespace MEDCoupling
   }
 
   //Retrieves the local number of elements
-  int BlockTopology::getNbLocalElements()const
+  mcIdType BlockTopology::getNbLocalElements()const
   {
     int position=_proc_group->myRank();
-    int nb_elem = 1;
+    mcIdType nb_elem = 1;
     int increment=1;
     for (int i=_dimension-1; i>=0; i--)
       {
         increment *=_nb_procs_per_dim[i];
         int idim=position%increment;
         position=position/increment;
-        int imin=_local_array_indices[i][idim];
-        int imax=_local_array_indices[i][idim+1];
+        mcIdType imin=_local_array_indices[i][idim];
+        mcIdType imax=_local_array_indices[i][idim+1];
         nb_elem*=(imax-imin);
       }
     return nb_elem;
@@ -260,16 +260,16 @@ namespace MEDCoupling
    * as a size and each pair <int,int> contains min and max. Indices 
    * range from min to max-1.
    */
-  std::vector<std::pair<int,int> > BlockTopology::getLocalArrayMinMax() const
+  std::vector<std::pair<int,mcIdType> > BlockTopology::getLocalArrayMinMax() const
   {
-    vector<pair<int,int> > local_indices (_dimension);
+    vector<pair<int,mcIdType> > local_indices (_dimension);
     int myrank=_proc_group->myRank();
     int increment=1;
     for (int i=_dimension-1; i>=0; i--)
       {  
         increment *=_nb_procs_per_dim[i];
         int idim=myrank%increment;
-        local_indices[i].first=_local_array_indices[i][idim];
+        local_indices[i].first=(int)_local_array_indices[i][idim];
         local_indices[i].second=_local_array_indices[i][idim+1];
         cout << local_indices[i].first << " "<< local_indices[i].second<<endl;
       }
@@ -278,9 +278,9 @@ namespace MEDCoupling
 
   /*! Serializes the data contained in the Block Topology
    * for communication purposes*/
-  void BlockTopology::serialize(int* & serializer, int& size) const 
+  void BlockTopology::serialize(mcIdType* & serializer, mcIdType& size) const 
   {
-    vector<int> buffer;
+    vector<mcIdType> buffer;
   
     buffer.push_back(_dimension);
     buffer.push_back(_nb_elems);
@@ -288,13 +288,13 @@ namespace MEDCoupling
       {
         buffer.push_back(_nb_procs_per_dim[i]);
         buffer.push_back(_cycle_type[i]);
-        buffer.push_back(_local_array_indices[i].size());
-        for (int j=0; j<(int)_local_array_indices[i].size(); j++)
+        buffer.push_back(ToIdType(_local_array_indices[i].size()));
+        for (std::size_t j=0; j<_local_array_indices[i].size(); j++)
           buffer.push_back(_local_array_indices[i][j]);
       }
   
     //serializing the comm group
-    int size_comm=_proc_group->size();
+    mcIdType size_comm=_proc_group->size();
     buffer.push_back(size_comm);
     MPIProcessorGroup world_group(_proc_group->getCommInterface());
     for (int i=0; i<size_comm;i++)
@@ -303,8 +303,8 @@ namespace MEDCoupling
         buffer.push_back(world_rank);
       }
   
-    serializer=new int[buffer.size()];
-    size=buffer.size();
+    serializer=new mcIdType[buffer.size()];
+    size=ToIdType(buffer.size());
     copy(buffer.begin(), buffer.end(), serializer);
   }
 
@@ -314,11 +314,11 @@ namespace MEDCoupling
    * after communication. Uses the same structure as the one used for serialize() 
    *
    */
-  void BlockTopology::unserialize(const int* serializer,const CommInterface& comm_interface)
+  void BlockTopology::unserialize(const mcIdType* serializer,const CommInterface& comm_interface)
   {
-    const int* ptr_serializer=serializer;
+    const mcIdType* ptr_serializer=serializer;
     cout << "unserialize..."<<endl;
-    _dimension=*(ptr_serializer++);
+    _dimension=(int)*(ptr_serializer++);
     cout << "dimension "<<_dimension<<endl;
     _nb_elems=*(ptr_serializer++);
     cout << "nbelems "<<_nb_elems<<endl;
@@ -327,16 +327,16 @@ namespace MEDCoupling
     _local_array_indices.resize(_dimension);
     for (int i=0; i<_dimension; i++)
       {
-        _nb_procs_per_dim[i]=*(ptr_serializer++);
+        _nb_procs_per_dim[i]=(int)*(ptr_serializer++);
         _cycle_type[i]=(CYCLE_TYPE)*(ptr_serializer++);
         _local_array_indices[i].resize(*(ptr_serializer++));
-        for (int j=0; j<(int)_local_array_indices[i].size(); j++)
+        for (std::size_t j=0; j<_local_array_indices[i].size(); j++)
           _local_array_indices[i][j]=*(ptr_serializer++);
       }
     set<int> procs;
-    int size_comm=*(ptr_serializer++);
+    mcIdType size_comm=*(ptr_serializer++);
     for (int i=0; i<size_comm; i++)
-      procs.insert(*(ptr_serializer++));
+      procs.insert((int)*(ptr_serializer++));
     cout << "unserialize..."<<procs.size()<<endl;
     _proc_group=new MPIProcessorGroup(comm_interface,procs);
     _owns_processor_group=true;
index 9ca24ed173e711b8508eb93d1f1a634a79d47ca1..9e46b54c6af08da8c1a66aceb0b93d6e9af3ea48 100644 (file)
@@ -48,31 +48,31 @@ namespace MEDCoupling
     BlockTopology();
     BlockTopology(const ProcessorGroup& group, MEDCouplingCMesh *grid); 
     BlockTopology(const BlockTopology& geom_topo, const ComponentTopology& comp_topo);
-    BlockTopology(const ProcessorGroup& group, int nb_elem);
+    BlockTopology(const ProcessorGroup& group, mcIdType nb_elem);
     virtual ~BlockTopology();
     //!Retrieves the number of elements for a given topology
-    int getNbElements()const { return _nb_elems; }
-    int getNbLocalElements() const;
+    mcIdType getNbElements()const { return _nb_elems; }
+    mcIdType getNbLocalElements() const;
     const ProcessorGroup* getProcGroup()const { return _proc_group; }
-    std::pair<int,int> globalToLocal (const int) const ;
-    int localToGlobal (const std::pair<int,int>) const;
-    std::vector<std::pair<int,int> > getLocalArrayMinMax() const ;
+    std::pair<int,mcIdType> globalToLocal (const mcIdType) const ;
+    mcIdType localToGlobal (const std::pair<int,mcIdType>) const;
+    std::vector<std::pair<int,mcIdType> > getLocalArrayMinMax() const ;
     int getDimension() const { return _dimension; }
-    void serialize(int* & serializer, int& size) const ;
-    void unserialize(const int* serializer, const CommInterface& comm_interface);
+    void serialize(mcIdType* & serializer, mcIdType& size) const ;
+    void unserialize(const mcIdType* serializer, const CommInterface& comm_interface);
   private:
     //dimension : 2 or 3
     int _dimension;
     //proc array
     std::vector<int> _nb_procs_per_dim;
     //stores the offsets vector  
-    std::vector<std::vector<int> > _local_array_indices;
+    std::vector<std::vector<mcIdType> > _local_array_indices;
     //stores the cycle type (block or cyclic)
     std::vector<CYCLE_TYPE> _cycle_type;
     //Processor group
     const ProcessorGroup* _proc_group;
     //nb of elements
-    int _nb_elems;
+    mcIdType _nb_elems;
     bool _owns_processor_group;
   };
 }
index 98aa37d054302e1d7f68ff556c84a553413d3ff1..7324dd19d0a4f87f8e30eb529668d4df0dc6d240 100644 (file)
 
 ADD_DEFINITIONS(${MPI_DEFINITIONS})
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 INCLUDE_DIRECTORIES(
   ${MPI_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}
index c24c4fcfc06398690314fe5d7478c3784becceea..e76f22e6efe438b99b348fdd0938a17c960b6eb3 100644 (file)
@@ -21,6 +21,9 @@
 #define __COMMINTERFACE_HXX__
 
 #include <mpi.h>
+
+#include "ParaIdType.hxx"
+
 namespace MEDCoupling
 {
 
index 429bac2367e16910e48f92475f0be55060453b79..90048bc1789edc7ae1515b16030e3bfcd30c7921 100644 (file)
@@ -51,7 +51,7 @@ namespace MEDCoupling
     //!returns the number of the first MED component on local processor
     int firstLocalComponent() const ;
     //!returns the number of blocks in the topology
-    int nbBlocks()const {return _component_array.size()-1;}
+    int nbBlocks()const {return (int)_component_array.size()-1;}
     //!returns the block structure
     const std::vector<int>* getBlockIndices() const { return &_component_array; }
     const ProcessorGroup* getProcGroup()const { return _proc_group; } 
index 334af2106f09093e1d5d718ee61f037e841b9e44..48d90c5c48979e87ebebd7c6440cfeb09d3ec7be 100644 (file)
@@ -133,9 +133,9 @@ namespace MEDCoupling
                            const std::set<int>& target_ids,
                            const MPI_Comm& world_comm):
      _local_field(0),
+     _comm_interface(0),
      _owns_field(false),
      _owns_groups(true),
-     _comm_interface(0),
      _union_comm(MPI_COMM_NULL)
   {
     MEDCoupling::CommInterface comm;
@@ -151,7 +151,7 @@ namespace MEDCoupling
     // Create a communicator on these procs
     MPI_Group union_group,world_group;
     comm.commGroup(world_comm,&world_group);
-    comm.groupIncl(world_group,union_ids.size(),union_ranks_world,&union_group);
+    comm.groupIncl(world_group,(int)union_ids.size(),union_ranks_world,&union_group);
     comm.commCreate(world_comm,union_group,&_union_comm);
     delete[] union_ranks_world;
     if (_union_comm==MPI_COMM_NULL)
@@ -171,8 +171,8 @@ namespace MEDCoupling
     int* target_ranks_world=new int[target_ids.size()]; // ranks of targets in world_comm
     std::copy(target_ids.begin(), target_ids.end(),target_ranks_world);
     int* target_ranks_union=new int[target_ids.size()]; // ranks of targets in union_comm
-    MPI_Group_translate_ranks(world_group,source_ids.size(),source_ranks_world,union_group,source_ranks_union);
-    MPI_Group_translate_ranks(world_group,target_ids.size(),target_ranks_world,union_group,target_ranks_union);
+    MPI_Group_translate_ranks(world_group,(int)source_ids.size(),source_ranks_world,union_group,source_ranks_union);
+    MPI_Group_translate_ranks(world_group,(int)target_ids.size(),target_ranks_world,union_group,target_ranks_union);
     std::set<int> source_ids_union;
     for (int i=0;i<(int)source_ids.size();i++)
       source_ids_union.insert(source_ranks_union[i]);
@@ -237,7 +237,7 @@ namespace MEDCoupling
     std::set<int> union_ids; // source and target ids in world_comm
     union_ids.insert(src->getProcIDs().begin(),src->getProcIDs().end());
     union_ids.insert(tgt->getProcIDs().begin(),tgt->getProcIDs().end());
-    if(union_ids.size()!=size)
+    if((int)union_ids.size()!=size)
       throw INTERP_KERNEL::Exception("DisjointDEC constructor: source_ids and target_ids do not form a partition of the communicator! Restrain the world communicator passed to MPIProcessorGroup ctor.");
   }
 
@@ -331,7 +331,7 @@ namespace MEDCoupling
   void DisjointDEC::renormalizeTargetField(bool isWAbs)
   {
     if (_source_group->containsMyRank())
-      for (int icomp=0; icomp<_local_field->getField()->getArray()->getNumberOfComponents(); icomp++)
+      for (int icomp=0; icomp<(int)_local_field->getField()->getArray()->getNumberOfComponents(); icomp++)
         {
           double total_norm = _local_field->getVolumeIntegral(icomp+1,isWAbs);
           double source_norm = total_norm;
@@ -340,7 +340,7 @@ namespace MEDCoupling
         }
     if (_target_group->containsMyRank())
       {
-        for (int icomp=0; icomp<_local_field->getField()->getArray()->getNumberOfComponents(); icomp++)
+        for (int icomp=0; icomp<(int)_local_field->getField()->getArray()->getNumberOfComponents(); icomp++)
           {
             double total_norm = _local_field->getVolumeIntegral(icomp+1,isWAbs);
             double source_norm=total_norm;
index 6f09ce2dc47be2a183fd2f7af9ea2a650a6427ec..75324917097ce754f3092f39469d4530e02f005b 100644 (file)
@@ -81,14 +81,14 @@ namespace MEDCoupling
   */
   void ElementLocator::exchangeMesh(int idistantrank,
                                     MEDCouplingPointSet*& distant_mesh,
-                                    int*& distant_ids)
+                                    mcIdType*& distant_ids)
   {
     int rank = _union_group->translateRank(&_distant_group,idistantrank);
 
     if (find(_distant_proc_ids.begin(), _distant_proc_ids.end(),rank)==_distant_proc_ids.end())
       return;
    
-    MCAuto<DataArrayInt> elems;
+    MCAuto<DataArrayIdType> elems;
 #ifdef USE_DIRECTED_BB
     INTERP_KERNEL::DirectedBoundingBox dbb;
     double* distant_bb = _domain_bounding_boxes+rank*dbb.dataSize(_local_cell_mesh_space_dim);
@@ -99,7 +99,7 @@ namespace MEDCoupling
     elems=_local_cell_mesh->getCellsInBoundingBox(distant_bb,getBoundingBoxAdjustment());
 #endif
     
-    DataArrayInt *distant_ids_send;
+    DataArrayIdType *distant_ids_send;
     MEDCouplingPointSet *send_mesh = (MEDCouplingPointSet *)_local_para_field.getField()->buildSubMeshData(elems->begin(),elems->end(),distant_ids_send);
     _exchangeMesh(send_mesh, distant_mesh, idistantrank, distant_ids_send, distant_ids);
     distant_ids_send->decrRef();
@@ -227,15 +227,15 @@ namespace MEDCoupling
   void ElementLocator::_exchangeMesh( MEDCouplingPointSet* local_mesh,
                                       MEDCouplingPointSet*& distant_mesh,
                                       int iproc_distant,
-                                      const DataArrayInt* distant_ids_send,
-                                      int*& distant_ids_recv)
+                                      const DataArrayIdType* distant_ids_send,
+                                      mcIdType*& distant_ids_recv)
   {
     CommInterface comm_interface=_union_group->getCommInterface();
   
     // First stage : exchanging sizes
     // ------------------------------
     vector<double> tinyInfoLocalD,tinyInfoDistantD(1);//not used for the moment
-    vector<int> tinyInfoLocal,tinyInfoDistant;
+    vector<mcIdType> tinyInfoLocal,tinyInfoDistant;
     vector<string> tinyInfoLocalS;
     //Getting tiny info of local mesh to allow the distant proc to initialize and allocate
     //the transmitted mesh.
@@ -252,12 +252,12 @@ namespace MEDCoupling
     int iprocdistant_in_union = group->translateRank(&_distant_group,
                                                      iproc_distant);
     
-    comm_interface.sendRecv(&tinyInfoLocal[0], tinyInfoLocal.size(), MPI_INT, iprocdistant_in_union, 1112,
-                            &tinyInfoDistant[0], tinyInfoDistant.size(), MPI_INT,iprocdistant_in_union,1112,
+    comm_interface.sendRecv(&tinyInfoLocal[0], (int)tinyInfoLocal.size(), MPI_ID_TYPE, iprocdistant_in_union, 1112,
+                            &tinyInfoDistant[0], (int)tinyInfoDistant.size(), MPI_ID_TYPE,iprocdistant_in_union,1112,
                             *comm, &status);
-    DataArrayInt *v1Local=0;
+    DataArrayIdType *v1Local=0;
     DataArrayDouble *v2Local=0;
-    DataArrayInt *v1Distant=DataArrayInt::New();
+    DataArrayIdType *v1Distant=DataArrayIdType::New();
     DataArrayDouble *v2Distant=DataArrayDouble::New();
     //serialization of local mesh to send data to distant proc.
     local_mesh->serialize(v1Local,v2Local);
@@ -265,10 +265,10 @@ namespace MEDCoupling
     MEDCouplingPointSet *distant_mesh_tmp=MEDCouplingPointSet::BuildInstanceFromMeshType((MEDCouplingMeshType)tinyInfoDistant[0]);
     std::vector<std::string> unusedTinyDistantSts;
     distant_mesh_tmp->resizeForUnserialization(tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
-    int nbLocalElems=0;
-    int nbDistElem=0;
-    int *ptLocal=0;
-    int *ptDist=0;
+    mcIdType nbLocalElems=0;
+    mcIdType nbDistElem=0;
+    mcIdType *ptLocal=0;
+    mcIdType *ptDist=0;
     if(v1Local)
       {
         nbLocalElems=v1Local->getNbOfElems();
@@ -279,9 +279,9 @@ namespace MEDCoupling
         nbDistElem=v1Distant->getNbOfElems();
         ptDist=v1Distant->getPointer();
       }
-    comm_interface.sendRecv(ptLocal, nbLocalElems, MPI_INT,
+    comm_interface.sendRecv(ptLocal, (int)nbLocalElems, MPI_ID_TYPE,
                             iprocdistant_in_union, 1111,
-                            ptDist, nbDistElem, MPI_INT,
+                            ptDist, (int)nbDistElem, MPI_ID_TYPE,
                             iprocdistant_in_union,1111,
                             *comm, &status);
     nbLocalElems=0;
@@ -298,9 +298,9 @@ namespace MEDCoupling
         nbDistElem=v2Distant->getNbOfElems();
         ptDist2=v2Distant->getPointer();
       }
-    comm_interface.sendRecv(ptLocal2, nbLocalElems, MPI_DOUBLE,
+    comm_interface.sendRecv(ptLocal2, (int)nbLocalElems, MPI_DOUBLE,
                             iprocdistant_in_union, 1112,
-                            ptDist2, nbDistElem, MPI_DOUBLE,
+                            ptDist2, (int)nbDistElem, MPI_DOUBLE,
                             iprocdistant_in_union, 1112, 
                             *comm, &status);
     //
@@ -308,10 +308,10 @@ namespace MEDCoupling
     //finish unserialization
     distant_mesh->unserialization(tinyInfoDistantD,tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
     //
-    distant_ids_recv=new int[tinyInfoDistant.back()];
-    comm_interface.sendRecv(const_cast<void *>(reinterpret_cast<const void *>(distant_ids_send->getConstPointer())),tinyInfoLocal.back(), MPI_INT,
+    distant_ids_recv=new mcIdType[tinyInfoDistant.back()];
+    comm_interface.sendRecv(const_cast<void *>(reinterpret_cast<const void *>(distant_ids_send->getConstPointer())),(int)tinyInfoLocal.back(), MPI_ID_TYPE,
                             iprocdistant_in_union, 1113,
-                            distant_ids_recv,tinyInfoDistant.back(), MPI_INT,
+                            distant_ids_recv,(int)tinyInfoDistant.back(), MPI_ID_TYPE,
                             iprocdistant_in_union,1113,
                             *comm, &status);
     if(v1Local)
@@ -344,17 +344,17 @@ namespace MEDCoupling
   /*!
    * connected with ElementLocator::recvFromWorkingSideL
    */
-  void ElementLocator::sendSumToLazySideW(const std::vector< std::vector<int> >& distantLocEltIds, const std::vector< std::vector<double> >& partialSumRelToDistantIds)
+  void ElementLocator::sendSumToLazySideW(const std::vector< std::vector<mcIdType> >& distantLocEltIds, const std::vector< std::vector<double> >& partialSumRelToDistantIds)
   {
     int procId=0;
     CommInterface comm;
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        const vector<int>& eltIds=distantLocEltIds[procId];
+        const vector<mcIdType>& eltIds=distantLocEltIds[procId];
         const vector<double>& valued=partialSumRelToDistantIds[procId];
-        int lgth=eltIds.size();
+        int lgth=(int)eltIds.size();
         comm.send(&lgth,1,MPI_INT,*iter,1114,*_comm);
-        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&eltIds[0])),lgth,MPI_INT,*iter,1115,*_comm);
+        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&eltIds[0])),lgth,MPI_ID_TYPE,*iter,1115,*_comm);
         comm.send(const_cast<void *>(reinterpret_cast<const void *>(&valued[0])),lgth,MPI_DOUBLE,*iter,1116,*_comm);
       }
   }
@@ -370,30 +370,30 @@ namespace MEDCoupling
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
         std::vector<double>& vec=globalSumRelToDistantIds[procId];
-        comm.recv(&vec[0],vec.size(),MPI_DOUBLE,*iter,1117,*_comm,&status);
+        comm.recv(&vec[0],(int)vec.size(),MPI_DOUBLE,*iter,1117,*_comm,&status);
       }
   }
 
   /*!
    * connected with ElementLocator::recvLocalIdsFromWorkingSideL
    */
-  void ElementLocator::sendLocalIdsToLazyProcsW(const std::vector< std::vector<int> >& distantLocEltIds)
+  void ElementLocator::sendLocalIdsToLazyProcsW(const std::vector< std::vector<mcIdType> >& distantLocEltIds)
   {
     int procId=0;
     CommInterface comm;
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        const vector<int>& eltIds=distantLocEltIds[procId];
-        int lgth=eltIds.size();
+        const vector<mcIdType>& eltIds=distantLocEltIds[procId];
+        int lgth=(int)eltIds.size();
         comm.send(&lgth,1,MPI_INT,*iter,1121,*_comm);
-        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&eltIds[0])),lgth,MPI_INT,*iter,1122,*_comm);
+        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&eltIds[0])),lgth,MPI_ID_TYPE,*iter,1122,*_comm);
       }
   }
 
   /*!
    * connected with ElementLocator::sendGlobalIdsToWorkingSideL
    */
-  void ElementLocator::recvGlobalIdsFromLazyProcsW(const std::vector< std::vector<int> >& distantLocEltIds, std::vector< std::vector<int> >& globalIds)
+  void ElementLocator::recvGlobalIdsFromLazyProcsW(const std::vector< std::vector<mcIdType> >& distantLocEltIds, std::vector< std::vector<mcIdType> >& globalIds)
   {
     int procId=0;
     CommInterface comm;
@@ -401,17 +401,17 @@ namespace MEDCoupling
     globalIds.resize(_distant_proc_ids.size());
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        const std::vector<int>& vec=distantLocEltIds[procId];
-        std::vector<int>& global=globalIds[procId];
+        const std::vector<mcIdType>& vec=distantLocEltIds[procId];
+        std::vector<mcIdType>& global=globalIds[procId];
         global.resize(vec.size());
-        comm.recv(&global[0],vec.size(),MPI_INT,*iter,1123,*_comm,&status);
+        comm.recv(&global[0],(int)vec.size(),MPI_ID_TYPE,*iter,1123,*_comm,&status);
       }
   }
   
   /*!
    * connected with ElementLocator::sendCandidatesGlobalIdsToWorkingSideL
    */
-  void ElementLocator::recvCandidatesGlobalIdsFromLazyProcsW(std::vector< std::vector<int> >& globalIds)
+  void ElementLocator::recvCandidatesGlobalIdsFromLazyProcsW(std::vector< std::vector<mcIdType> >& globalIds)
   {
     int procId=0;
     CommInterface comm;
@@ -419,26 +419,26 @@ namespace MEDCoupling
     globalIds.resize(_distant_proc_ids.size());
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        std::vector<int>& global=globalIds[procId];
+        std::vector<mcIdType>& global=globalIds[procId];
         int lgth;
         comm.recv(&lgth,1,MPI_INT,*iter,1132,*_comm,&status);
         global.resize(lgth);
-        comm.recv(&global[0],lgth,MPI_INT,*iter,1133,*_comm,&status);
+        comm.recv(&global[0],lgth,MPI_ID_TYPE,*iter,1133,*_comm,&status);
       }
   }
   
   /*!
    * connected with ElementLocator::recvSumFromWorkingSideL
    */
-  void ElementLocator::sendPartialSumToLazyProcsW(const std::vector<int>& distantGlobIds, const std::vector<double>& sum)
+  void ElementLocator::sendPartialSumToLazyProcsW(const std::vector<mcIdType>& distantGlobIds, const std::vector<double>& sum)
   {
     int procId=0;
     CommInterface comm;
-    int lgth=distantGlobIds.size();
+    int lgth=(int)distantGlobIds.size();
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
         comm.send(&lgth,1,MPI_INT,*iter,1124,*_comm);
-        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&distantGlobIds[0])),lgth,MPI_INT,*iter,1125,*_comm);
+        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&distantGlobIds[0])),lgth,MPI_ID_TYPE,*iter,1125,*_comm);
         comm.send(const_cast<void *>(reinterpret_cast<const void *>(&sum[0])),lgth,MPI_DOUBLE,*iter,1126,*_comm);
       }
   }
@@ -446,35 +446,35 @@ namespace MEDCoupling
   /*!
    * connected with ElementLocator::recvCandidatesForAddElementsL
    */
-  void ElementLocator::sendCandidatesForAddElementsW(const std::vector<int>& distantGlobIds)
+  void ElementLocator::sendCandidatesForAddElementsW(const std::vector<mcIdType>& distantGlobIds)
   {
     int procId=0;
     CommInterface comm;
-    int lgth=distantGlobIds.size();
+    int lgth=(int)distantGlobIds.size();
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
         comm.send(const_cast<void *>(reinterpret_cast<const void *>(&lgth)),1,MPI_INT,*iter,1128,*_comm);
-        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&distantGlobIds[0])),lgth,MPI_INT,*iter,1129,*_comm);
+        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&distantGlobIds[0])),lgth,MPI_ID_TYPE,*iter,1129,*_comm);
       }
   }
   
   /*!
    * connected with ElementLocator::sendAddElementsToWorkingSideL
    */
-  void ElementLocator::recvAddElementsFromLazyProcsW(std::vector<std::vector<int> >& elementsToAdd)
+  void ElementLocator::recvAddElementsFromLazyProcsW(std::vector<std::vector<mcIdType> >& elementsToAdd)
   {
     int procId=0;
     CommInterface comm;
     MPI_Status status;
-    int lgth=_distant_proc_ids.size();
+    int lgth=(int)_distant_proc_ids.size();
     elementsToAdd.resize(lgth);
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
         int locLgth;
-        std::vector<int>& eltToFeed=elementsToAdd[procId];
+        std::vector<mcIdType>& eltToFeed=elementsToAdd[procId];
         comm.recv(&locLgth,1,MPI_INT,*iter,1130,*_comm,&status);
         eltToFeed.resize(locLgth);
-        comm.recv(&eltToFeed[0],locLgth,MPI_INT,*iter,1131,*_comm,&status);
+        comm.recv(&eltToFeed[0],locLgth,MPI_ID_TYPE,*iter,1131,*_comm,&status);
       }
   }
 
@@ -485,7 +485,7 @@ namespace MEDCoupling
   {
     CommInterface comm;
     int toSend;
-    DataArrayInt *isCumulative=_local_para_field.returnCumulativeGlobalNumbering();
+    DataArrayIdType *isCumulative=_local_para_field.returnCumulativeGlobalNumbering();
     if(isCumulative)
       {
         toSend=CUMULATIVE_POLICY;
@@ -512,12 +512,12 @@ namespace MEDCoupling
       {
         int lgth;
         comm.recv(&lgth,1,MPI_INT,*iter,1114,*_comm,&status);
-        vector<int>& ids=_ids_per_working_proc[procId];
+        vector<mcIdType>& ids=_ids_per_working_proc[procId];
         ids.resize(lgth);
         vector<double> values(lgth);
-        comm.recv(&ids[0],lgth,MPI_INT,*iter,1115,*_comm,&status);
+        comm.recv(&ids[0],lgth,MPI_ID_TYPE,*iter,1115,*_comm,&status);
         comm.recv(&values[0],lgth,MPI_DOUBLE,*iter,1116,*_comm,&status);
-        for(int i=0;i<lgth;i++)
+        for(mcIdType i=0;i<lgth;i++)
           _values_added[ids[i]]+=values[i];
       }
   }
@@ -531,12 +531,12 @@ namespace MEDCoupling
     CommInterface comm;
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        vector<int>& ids=_ids_per_working_proc[procId];
+        vector<mcIdType>& ids=_ids_per_working_proc[procId];
         vector<double> valsToSend(ids.size());
         vector<double>::iterator iter3=valsToSend.begin();
-        for(vector<int>::const_iterator iter2=ids.begin();iter2!=ids.end();iter2++,iter3++)
+        for(vector<mcIdType>::const_iterator iter2=ids.begin();iter2!=ids.end();iter2++,iter3++)
           *iter3=_values_added[*iter2];
-        comm.send(&valsToSend[0],ids.size(),MPI_DOUBLE,*iter,1117,*_comm);
+        comm.send(&valsToSend[0],(int)ids.size(),MPI_DOUBLE,*iter,1117,*_comm);
         //ids.clear();
       }
     //_ids_per_working_proc.clear();
@@ -554,10 +554,10 @@ namespace MEDCoupling
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
         int lgth;
-        vector<int>& ids=_ids_per_working_proc[procId];
+        vector<mcIdType>& ids=_ids_per_working_proc[procId];
         comm.recv(&lgth,1,MPI_INT,*iter,1121,*_comm,&status);
         ids.resize(lgth);
-        comm.recv(&ids[0],lgth,MPI_INT,*iter,1122,*_comm,&status);
+        comm.recv(&ids[0],lgth,MPI_ID_TYPE,*iter,1122,*_comm,&status);
       }
   }
 
@@ -568,16 +568,16 @@ namespace MEDCoupling
   {
     int procId=0;
     CommInterface comm;
-    DataArrayInt *globalIds=_local_para_field.returnGlobalNumbering();
-    const int *globalIdsC=globalIds->getConstPointer();
+    DataArrayIdType *globalIds=_local_para_field.returnGlobalNumbering();
+    const mcIdType *globalIdsC=globalIds->getConstPointer();
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        const vector<int>& ids=_ids_per_working_proc[procId];
-        vector<int> valsToSend(ids.size());
-        vector<int>::iterator iter1=valsToSend.begin();
-        for(vector<int>::const_iterator iter2=ids.begin();iter2!=ids.end();iter2++,iter1++)
+        const vector<mcIdType>& ids=_ids_per_working_proc[procId];
+        vector<mcIdType> valsToSend(ids.size());
+        vector<mcIdType>::iterator iter1=valsToSend.begin();
+        for(vector<mcIdType>::const_iterator iter2=ids.begin();iter2!=ids.end();iter2++,iter1++)
           *iter1=globalIdsC[*iter2];
-        comm.send(&valsToSend[0],ids.size(),MPI_INT,*iter,1123,*_comm);
+        comm.send(&valsToSend[0],(int)ids.size(),MPI_ID_TYPE,*iter,1123,*_comm);
       }
     if(globalIds)
       globalIds->decrRef();
@@ -588,24 +588,24 @@ namespace MEDCoupling
    */
   void ElementLocator::recvSumFromWorkingSideL()
   {
-    int procId=0;
-    int wProcSize=_distant_proc_ids.size();
+    std::size_t procId=0;
+    std::size_t wProcSize=_distant_proc_ids.size();
     CommInterface comm;
     _ids_per_working_proc.resize(wProcSize);
     _values_per_working_proc.resize(wProcSize);
     MPI_Status status;
-    std::map<int,double> sums;
+    std::map<mcIdType,double> sums;
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
         int lgth;
         comm.recv(&lgth,1,MPI_INT,*iter,1124,*_comm,&status);
-        vector<int>& ids=_ids_per_working_proc[procId];
+        vector<mcIdType>& ids=_ids_per_working_proc[procId];
         vector<double>& vals=_values_per_working_proc[procId];
         ids.resize(lgth);
         vals.resize(lgth);
-        comm.recv(&ids[0],lgth,MPI_INT,*iter,1125,*_comm,&status);
+        comm.recv(&ids[0],lgth,MPI_ID_TYPE,*iter,1125,*_comm,&status);
         comm.recv(&vals[0],lgth,MPI_DOUBLE,*iter,1126,*_comm,&status);
-        vector<int>::const_iterator iter1=ids.begin();
+        vector<mcIdType>::const_iterator iter1=ids.begin();
         vector<double>::const_iterator iter2=vals.begin();
         for(;iter1!=ids.end();iter1++,iter2++)
           sums[*iter1]+=*iter2;
@@ -613,9 +613,9 @@ namespace MEDCoupling
     //assign sum to prepare sending to working side
     for(procId=0;procId<wProcSize;procId++)
       {
-        vector<int>& ids=_ids_per_working_proc[procId];
+        vector<mcIdType>& ids=_ids_per_working_proc[procId];
         vector<double>& vals=_values_per_working_proc[procId];
-        vector<int>::const_iterator iter1=ids.begin();
+        vector<mcIdType>::const_iterator iter1=ids.begin();
         vector<double>::iterator iter2=vals.begin();
         for(;iter1!=ids.end();iter1++,iter2++)
           *iter2=sums[*iter1];
@@ -633,38 +633,38 @@ namespace MEDCoupling
    */
   void ElementLocator::recvCandidatesForAddElementsL()
   {
-    int procId=0;
-    int wProcSize=_distant_proc_ids.size();
+    std::size_t procId=0;
+    std::size_t wProcSize=_distant_proc_ids.size();
     CommInterface comm;
     _ids_per_working_proc3.resize(wProcSize);
     MPI_Status status;
     std::map<int,double> sums;
-    DataArrayInt *globalIds=_local_para_field.returnGlobalNumbering();
-    const int *globalIdsC=globalIds->getConstPointer();
-    int nbElts=globalIds->getNumberOfTuples();
-    std::set<int> globalIdsS(globalIdsC,globalIdsC+nbElts);
+    DataArrayIdType *globalIds=_local_para_field.returnGlobalNumbering();
+    const mcIdType *globalIdsC=globalIds->getConstPointer();
+    mcIdType nbElts=globalIds->getNumberOfTuples();
+    std::set<mcIdType> globalIdsS(globalIdsC,globalIdsC+nbElts);
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        const std::vector<int>& ids0=_ids_per_working_proc[procId];
-        int lgth0=ids0.size();
-        std::set<int> elts0;
-        for(int i=0;i<lgth0;i++)
+        const std::vector<mcIdType>& ids0=_ids_per_working_proc[procId];
+        std::size_t lgth0=ids0.size();
+        std::set<mcIdType> elts0;
+        for(std::size_t i=0;i<lgth0;i++)
           elts0.insert(globalIdsC[ids0[i]]);
         int lgth;
         comm.recv(&lgth,1,MPI_INT,*iter,1128,*_comm,&status);
-        vector<int> ids(lgth);
-        comm.recv(&ids[0],lgth,MPI_INT,*iter,1129,*_comm,&status);
-        set<int> ids1(ids.begin(),ids.end());
+        vector<mcIdType> ids(lgth);
+        comm.recv(&ids[0],lgth,MPI_ID_TYPE,*iter,1129,*_comm,&status);
+        set<mcIdType> ids1(ids.begin(),ids.end());
         ids.clear();
         set<int> tmp5,tmp6;
         set_intersection(globalIdsS.begin(),globalIdsS.end(),ids1.begin(),ids1.end(),inserter(tmp5,tmp5.begin()));
         set_difference(tmp5.begin(),tmp5.end(),elts0.begin(),elts0.end(),inserter(tmp6,tmp6.begin()));
-        std::vector<int>& ids2=_ids_per_working_proc3[procId];
+        std::vector<mcIdType>& ids2=_ids_per_working_proc3[procId];
         ids2.resize(tmp6.size());
         std::copy(tmp6.begin(),tmp6.end(),ids2.begin());
         //global->local
-        for(std::vector<int>::iterator iter2=ids2.begin();iter2!=ids2.end();iter2++)
-          *iter2=std::find(globalIdsC,globalIdsC+nbElts,*iter2)-globalIdsC;
+        for(std::vector<mcIdType>::iterator iter2=ids2.begin();iter2!=ids2.end();iter2++)
+          *iter2=ToIdType(std::find(globalIdsC,globalIdsC+nbElts,*iter2)-globalIdsC);
       }
     if(globalIds)
       globalIds->decrRef();
@@ -679,10 +679,10 @@ namespace MEDCoupling
     CommInterface comm;
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        const std::vector<int>& vals=_ids_per_working_proc3[procId];
-        int size=vals.size();
+        const std::vector<mcIdType>& vals=_ids_per_working_proc3[procId];
+        int size=(int)vals.size();
         comm.send(const_cast<void *>(reinterpret_cast<const void *>(&size)),1,MPI_INT,*iter,1130,*_comm);
-        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&vals[0])),size,MPI_INT,*iter,1131,*_comm);
+        comm.send(const_cast<void *>(reinterpret_cast<const void *>(&vals[0])),size,MPI_ID_TYPE,*iter,1131,*_comm);
       }
   }
 
@@ -694,25 +694,25 @@ namespace MEDCoupling
   { 
     int procId=0;
     CommInterface comm;
-    DataArrayInt *globalIds=_local_para_field.returnGlobalNumbering();
-    const int *globalIdsC=globalIds->getConstPointer();
-    MCAuto<DataArrayInt> candidates=_local_para_field.getSupport()->getCellMesh()->findBoundaryNodes();
-    for(int *iter1=candidates->getPointer();iter1!=candidates->getPointer()+candidates->getNumberOfTuples();iter1++)
+    DataArrayIdType *globalIds=_local_para_field.returnGlobalNumbering();
+    const mcIdType *globalIdsC=globalIds->getConstPointer();
+    MCAuto<DataArrayIdType> candidates=_local_para_field.getSupport()->getCellMesh()->findBoundaryNodes();
+    for(mcIdType *iter1=candidates->getPointer();iter1!=candidates->getPointer()+candidates->getNumberOfTuples();iter1++)
       (*iter1)=globalIdsC[*iter1];
-    std::set<int> candidatesS(candidates->begin(),candidates->end());
+    std::set<mcIdType> candidatesS(candidates->begin(),candidates->end());
     for(vector<int>::const_iterator iter=_distant_proc_ids.begin();iter!=_distant_proc_ids.end();iter++,procId++)
       {
-        const vector<int>& ids=_ids_per_working_proc[procId];
-        vector<int> valsToSend(ids.size());
-        vector<int>::iterator iter1=valsToSend.begin();
-        for(vector<int>::const_iterator iter2=ids.begin();iter2!=ids.end();iter2++,iter1++)
+        const vector<mcIdType>& ids=_ids_per_working_proc[procId];
+        vector<mcIdType> valsToSend(ids.size());
+        vector<mcIdType>::iterator iter1=valsToSend.begin();
+        for(vector<mcIdType>::const_iterator iter2=ids.begin();iter2!=ids.end();iter2++,iter1++)
           *iter1=globalIdsC[*iter2];
-        std::set<int> tmp2(valsToSend.begin(),valsToSend.end());
-        std::vector<int> tmp3;
-        set_intersection(candidatesS.begin(),candidatesS.end(),tmp2.begin(),tmp2.end(),std::back_insert_iterator< std::vector<int> >(tmp3));
-        int lgth=tmp3.size();
+        std::set<mcIdType> tmp2(valsToSend.begin(),valsToSend.end());
+        std::vector<mcIdType> tmp3;
+        set_intersection(candidatesS.begin(),candidatesS.end(),tmp2.begin(),tmp2.end(),std::back_insert_iterator< std::vector<mcIdType> >(tmp3));
+        int lgth=(int)tmp3.size();
         comm.send(&lgth,1,MPI_INT,*iter,1132,*_comm);
-        comm.send(&tmp3[0],lgth,MPI_INT,*iter,1133,*_comm);
+        comm.send(&tmp3[0],lgth,MPI_ID_TYPE,*iter,1133,*_comm);
       }
     if(globalIds)
       globalIds->decrRef();
index f5704949fba3f8ada6279c204184e3e3f7aa31e8..b5013f8e09604fb2e8763212056e71745a34f698 100644 (file)
@@ -47,7 +47,7 @@ namespace MEDCoupling
     virtual ~ElementLocator();
     void exchangeMesh(int idistantrank,
                       MEDCouplingPointSet*& target_mesh,
-                      int*& distant_ids);
+                      mcIdType*& distant_ids);
     void exchangeMethod(const std::string& sourceMeth, int idistantrank, std::string& targetMeth);
     const std::vector<int>& getDistantProcIds() const { return _distant_proc_ids; }
     const MPI_Comm *getCommunicator() const;
@@ -56,15 +56,15 @@ namespace MEDCoupling
     bool isM1DCorr() const { return _is_m1d_corr; }
     //Working side methods
     void recvPolicyFromLazySideW(std::vector<int>& policy);
-    void sendSumToLazySideW(const std::vector< std::vector<int> >& distantLocEltIds, const std::vector< std::vector<double> >& partialSumRelToDistantIds);
+    void sendSumToLazySideW(const std::vector< std::vector<mcIdType> >& distantLocEltIds, const std::vector< std::vector<double> >& partialSumRelToDistantIds);
     void recvSumFromLazySideW(std::vector< std::vector<double> >& globalSumRelToDistantIds);
-    void sendCandidatesForAddElementsW(const std::vector<int>& distantGlobIds);
-    void recvAddElementsFromLazyProcsW(std::vector<std::vector<int> >& elementsToAdd);
+    void sendCandidatesForAddElementsW(const std::vector<mcIdType>& distantGlobIds);
+    void recvAddElementsFromLazyProcsW(std::vector<std::vector<mcIdType> >& elementsToAdd);
     //
-    void sendLocalIdsToLazyProcsW(const std::vector< std::vector<int> >& distantLocEltIds);
-    void recvGlobalIdsFromLazyProcsW(const std::vector< std::vector<int> >& distantLocEltIds, std::vector< std::vector<int> >& globalIds);
-    void recvCandidatesGlobalIdsFromLazyProcsW(std::vector< std::vector<int> >& globalIds);
-    void sendPartialSumToLazyProcsW(const std::vector<int>& distantGlobIds, const std::vector<double>& sum);
+    void sendLocalIdsToLazyProcsW(const std::vector< std::vector<mcIdType> >& distantLocEltIds);
+    void recvGlobalIdsFromLazyProcsW(const std::vector< std::vector<mcIdType> >& distantLocEltIds, std::vector< std::vector<mcIdType> >& globalIds);
+    void recvCandidatesGlobalIdsFromLazyProcsW(std::vector< std::vector<mcIdType> >& globalIds);
+    void sendPartialSumToLazyProcsW(const std::vector<mcIdType>& distantGlobIds, const std::vector<double>& sum);
     //Lazy side methods
     int sendPolicyToWorkingSideL();
     void recvFromWorkingSideL();
@@ -81,8 +81,8 @@ namespace MEDCoupling
     void _computeBoundingBoxes();
     bool _intersectsBoundingBox(int irank);
     void _exchangeMesh(MEDCouplingPointSet* local_mesh, MEDCouplingPointSet*& distant_mesh,
-                       int iproc_distant, const DataArrayInt* distant_ids_send,
-                       int*& distant_ids_recv);
+                       int iproc_distant, const DataArrayIdType* distant_ids_send,
+                       mcIdType*& distant_ids_recv);
   private:
     const ParaFIELD&  _local_para_field ;
     MEDCouplingPointSet* _local_cell_mesh;
@@ -99,8 +99,8 @@ namespace MEDCoupling
     const MPI_Comm *_comm;
     //Attributes only used by lazy side
     std::vector<double> _values_added;
-    std::vector< std::vector<int> > _ids_per_working_proc;
-    std::vector< std::vector<int> > _ids_per_working_proc3;
+    std::vector< std::vector<mcIdType> > _ids_per_working_proc;
+    std::vector< std::vector<mcIdType> > _ids_per_working_proc3;
     std::vector< std::vector<double> > _values_per_working_proc;
   public:
     static const int CUMULATIVE_POLICY=3;
index d0e0abed85a959d002c9cd631f98beca2da09158..c7b62a8799c70c353f4b4643b9902aade96a36da 100644 (file)
@@ -145,16 +145,16 @@ namespace MEDCoupling
   
     vector<int>* target_arrays=new vector<int>[target_size];
   
-    int nb_local = _toposource-> getNbLocalElements();
+    mcIdType nb_local = _toposource-> getNbLocalElements();
 
-    int union_size=group->size();
+    std::size_t union_size=group->size();
   
     _sendcounts=new int[union_size];
     _senddispls=new int[union_size];
     _recvcounts=new int[union_size];
     _recvdispls=new int[union_size];
   
-    for (int i=0; i< union_size; i++)
+    for (std::size_t i=0; i< union_size; i++)
       {
         _sendcounts[i]=0;
         _recvcounts[i]=0;
@@ -177,7 +177,7 @@ namespace MEDCoupling
     int* counter=new int [target_size];
     counter[0]=0;  
     for (int i=1; i<target_size; i++)
-      counter[i]=counter[i-1]+target_arrays[i-1].size();
+      counter[i]=counter[i-1]+(int)target_arrays[i-1].size();
   
   
     const double* value = _local_field->getField()->getArray()->getPointer();
@@ -205,21 +205,21 @@ namespace MEDCoupling
       return;
     MPIProcessorGroup* group=new MPIProcessorGroup(_topotarget->getProcGroup()->getCommInterface());
 
-    vector < vector <int> > source_arrays(_sourcegroup->size());
-    int nb_local = _topotarget-> getNbLocalElements();
-    for (int ielem=0; ielem< nb_local ; ielem++)
+    vector < vector <mcIdType> > source_arrays(_sourcegroup->size());
+    mcIdType nb_local = _topotarget-> getNbLocalElements();
+    for (mcIdType ielem=0; ielem< nb_local ; ielem++)
       {
-        //pair<int,int> source_local =_distant_elems[ielem];
-        pair <int,int> source_local=_explicit_mapping.getDistantNumbering(ielem);
-        source_arrays[source_local.first].push_back(source_local.second); 
+        //pair<int,mcIdType> source_local =_distant_elems[ielem];
+        pair <int,mcIdType> source_local=_explicit_mapping.getDistantNumbering(ielem);
+        source_arrays[source_local.first].push_back(source_local.second);
       }  
-    int union_size=group->size();
+    std::size_t union_size=group->size();
     _recvcounts=new int[union_size];
     _recvdispls=new int[union_size];
     _sendcounts=new int[union_size];
     _senddispls=new int[union_size];
     
-    for (int i=0; i< union_size; i++)
+    for (std::size_t i=0; i< union_size; i++)
       {
         _sendcounts[i]=0;
         _recvcounts[i]=0;
@@ -229,9 +229,9 @@ namespace MEDCoupling
       {
         //converts the rank in target to the rank in union communicator
         int unionrank=group->translateRank(_sourcegroup,iproc);
-        _recvcounts[unionrank]=source_arrays[iproc].size()*_topotarget->getNbComponents();
+        _recvcounts[unionrank]=(int)(source_arrays[iproc].size()*_topotarget->getNbComponents());
       }
-    for (int i=1; i<union_size; i++)
+    for (std::size_t i=1; i<union_size; i++)
       _recvdispls[i]=_recvdispls[i-1]+_recvcounts[i-1];
     _recvbuffer=new double[nb_local*_topotarget->getNbComponents()];
     
@@ -249,8 +249,8 @@ namespace MEDCoupling
   {
     MPI_Status status;
   
-    int* serializer=0;
-    int size;
+    mcIdType* serializer=0;
+    mcIdType size;
   
     MPIProcessorGroup* group=new MPIProcessorGroup(*_comm_interface);
   
@@ -264,8 +264,8 @@ namespace MEDCoupling
             int itarget=iproc;
             if (!toposend->getProcGroup()->contains(itarget))
               {
-                _comm_interface->send(&size,1,MPI_INT, itarget,tag+itarget,*(group->getComm()));
-                _comm_interface->send(serializer, size, MPI_INT, itarget, tag+itarget,*(group->getComm()));          
+                _comm_interface->send(&size,1,MPI_ID_TYPE, itarget,tag+itarget,*(group->getComm()));
+                _comm_interface->send(serializer, (int)size, MPI_ID_TYPE, itarget, tag+itarget,*(group->getComm()));          
               }
           }
       }
@@ -278,19 +278,19 @@ namespace MEDCoupling
             int isource = iproc;
             if (!toporecv->getProcGroup()->contains(isource))
               {
-                int nbelem;
-                _comm_interface->recv(&nbelem, 1, MPI_INT, isource, tag+myworldrank, *(group->getComm()), &status);
-                int* buffer = new int[nbelem];
-                _comm_interface->recv(buffer, nbelem, MPI_INT, isource,tag+myworldrank, *(group->getComm()), &status);        
+                mcIdType nbelem;
+                _comm_interface->recv(&nbelem, 1, MPI_ID_TYPE, isource, tag+myworldrank, *(group->getComm()), &status);
+                mcIdType* buffer = new mcIdType[nbelem];
+                _comm_interface->recv(buffer, (int)nbelem, MPI_ID_TYPE, isource,tag+myworldrank, *(group->getComm()), &status);        
       
                 ExplicitTopology* topotemp=new ExplicitTopology();
                 topotemp->unserialize(buffer, *_comm_interface);
                 delete[] buffer;
         
-                for (int ielem=0; ielem<toporecv->getNbLocalElements(); ielem++)
+                for (mcIdType ielem=0; ielem<toporecv->getNbLocalElements(); ielem++)
                   {
-                    int global = toporecv->localToGlobal(ielem);
-                    int sendlocal=topotemp->globalToLocal(global);
+                    mcIdType global = toporecv->localToGlobal(ielem);
+                    mcIdType sendlocal=topotemp->globalToLocal(global);
                     if (sendlocal!=-1)
                       {
                         size2[iproc]++;
@@ -327,7 +327,7 @@ namespace MEDCoupling
           }
         _comm_interface->allToAll(nb_transfer_union, 1, MPI_INT, dummy_recv, 1, MPI_INT, MPI_COMM_WORLD);
       
-        int* sendbuffer= _explicit_mapping.serialize(_topotarget->getProcGroup()->myRank());
+        mcIdType* sendbuffer= _explicit_mapping.serialize(_topotarget->getProcGroup()->myRank());
       
         int* sendcounts= new int [world_size];
         int* senddispls = new int [world_size];
@@ -347,7 +347,7 @@ namespace MEDCoupling
             recvcounts[i]=0;
             recvdispls[i]=0;
           }
-        _comm_interface->allToAllV(sendbuffer, sendcounts, senddispls, MPI_INT, dummyrecv, recvcounts, senddispls, MPI_INT, MPI_COMM_WORLD);
+        _comm_interface->allToAllV(sendbuffer, sendcounts, senddispls, MPI_ID_TYPE, dummyrecv, recvcounts, senddispls, MPI_ID_TYPE, MPI_COMM_WORLD);
       
       }
     //receiving in the source subdomains the mapping sent by targets
@@ -367,7 +367,7 @@ namespace MEDCoupling
         int* targetranks = new int[ nbtarget];
         for (int i=0; i<nbtarget; i++)
           targetranks[i]=group->translateRank(_targetgroup,i);
-        int* mappingbuffer= new int [total_size*2];
+        mcIdType* mappingbuffer= new mcIdType [total_size*2];
         int* sendcounts= new int [world_size];
         int* senddispls = new int [world_size];
         int* recvcounts=new int[world_size];
@@ -387,7 +387,7 @@ namespace MEDCoupling
             sendcounts[i]=0;
             senddispls[i]=0;
           }
-        _comm_interface->allToAllV(dummysend, sendcounts, senddispls, MPI_INT, mappingbuffer, recvcounts, recvdispls, MPI_INT, MPI_COMM_WORLD);
+        _comm_interface->allToAllV(dummysend, sendcounts, senddispls, MPI_ID_TYPE, mappingbuffer, recvcounts, recvdispls, MPI_ID_TYPE, MPI_COMM_WORLD);
         _explicit_mapping.unserialize(world_size,nb_transfer_union,nbtarget, targetranks, mappingbuffer);
       }
   }
@@ -402,7 +402,7 @@ namespace MEDCoupling
     _comm_interface->allToAllV(_sendbuffer, _sendcounts, _senddispls, MPI_DOUBLE, 
                                _recvbuffer, _recvcounts, _recvdispls, MPI_DOUBLE,MPI_COMM_WORLD);
     cout<<"end AllToAll"<<endl;
-    int nb_local = _topotarget->getNbLocalElements();
+    mcIdType nb_local = _topotarget->getNbLocalElements();
     double* value=new double[nb_local*_topotarget->getNbComponents()];
 
     vector<int> counters(_sourcegroup->size());
index 7eff1780d8609dc67b3b0eea13d1d1c0a4556329..b82eaa7b54fffe7acac88d607a4046aa4b7197cf 100644 (file)
@@ -35,12 +35,12 @@ namespace MEDCoupling
     if (_comm_buffer!=0) delete[] _comm_buffer;
   }
 
-  void ExplicitMapping::pushBackElem(std::pair<int,int> idistant)
+  void ExplicitMapping::pushBackElem(std::pair<int,mcIdType> idistant)
   {
     _mapping.push_back(idistant);
   }
 
-  void  ExplicitMapping::setDistantElem(int ilocal, std::pair<int,int> idistant)
+  void  ExplicitMapping::setDistantElem(mcIdType ilocal, std::pair<int,mcIdType> idistant)
   {
     _mapping[ilocal]=idistant;
   }
@@ -49,15 +49,15 @@ namespace MEDCoupling
   {
     if (_distant_domains.empty())
       {
-        for (std::vector <std::pair<int,int> >::const_iterator iter= _mapping.begin();
+        for (std::vector <std::pair<int,mcIdType> >::const_iterator iter= _mapping.begin();
             iter!=_mapping.end();
             iter++)
           _distant_domains.insert(iter->first);
       }
-    return _distant_domains.size();
+    return (int)_distant_domains.size();
   }
 
-  std::pair <int,int> ExplicitMapping::getDistantNumbering(int ielem)const
+  std::pair <int,mcIdType> ExplicitMapping::getDistantNumbering(mcIdType ielem)const
   {
     return _mapping[ielem];
   }
@@ -77,17 +77,17 @@ namespace MEDCoupling
     return _numbers[i];
   }
 
-  int* ExplicitMapping::serialize(int idproc)
+  mcIdType* ExplicitMapping::serialize(int idproc)
   {
-    _comm_buffer=new int[_mapping.size()*2];
-    std::vector<int> offsets(_distant_domains.size());
+    _comm_buffer=new mcIdType[_mapping.size()*2];
+    std::vector<mcIdType> offsets(_distant_domains.size());
     offsets[0]=0;
     for (int i=1; i<(int)_distant_domains.size();i++)
       offsets[i]=offsets[i-1]+_numbers[i-1];
 
     for (int i=0; i<(int)_mapping.size(); i++)
       {
-        int offset= offsets[_mapping[i].first];
+        mcIdType offset= offsets[_mapping[i].first];
         _comm_buffer[offset*2]=idproc;
         _comm_buffer[offset*2+1]=_mapping[i].second;
         offsets[_mapping[i].first]++;
@@ -95,7 +95,7 @@ namespace MEDCoupling
     return _comm_buffer;
   }
 
-  void ExplicitMapping::unserialize(int nbprocs, int* sizes,int nbtarget, int* targetrank, int* commbuffer)
+  void ExplicitMapping::unserialize(int nbprocs, int* sizes,int nbtarget, int* targetrank, mcIdType* commbuffer)
   {
     int total_size=0;
     for (int i=0; i< nbprocs; i++)
@@ -109,7 +109,7 @@ namespace MEDCoupling
         {
           _mapping[indmap].first=i;
           _mapping[indmap].second=commbuffer[indmap*2+1];
-          _buffer_index[indmap]=commbuffer[indmap*2+1];
+          _buffer_index[indmap]=(int)commbuffer[indmap*2+1];
           indmap++;
         }
     _numbers=new int [nbtarget];
index dcd69cf7eb11fc4952c91f0f5a78a9a33775551c..95717ea31fb091b1ba7e6386166e8d96a900b39f 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef __EXPLICITMAPPING_HXX__
 #define __EXPLICITMAPPING_HXX__
 
+#include "MCIdType.hxx"
+
 #include <vector>
 #include <map>
 #include <set>
@@ -37,24 +39,24 @@ namespace MEDCoupling
     ExplicitMapping();
     ~ExplicitMapping();
     
-    void pushBackElem(std::pair<int,int> idistant);
-    void  setDistantElem(int ilocal, std::pair<int,int> idistant);
+    void pushBackElem(std::pair<int,mcIdType> idistant);
+    void  setDistantElem(mcIdType ilocal, std::pair<int,mcIdType> idistant);
     int nbDistantDomains();
-    std::pair <int,int> getDistantNumbering(int ielem) const;
+    std::pair <int,mcIdType> getDistantNumbering(mcIdType ielem) const;
     
     int getDistantDomain(int i);
     int getNbDistantElems(int i);
-    int* serialize(int idproc);
-    void unserialize(int nbprocs, int* sizes,int nbtarget, int* targetrank, int* commbuffer);
+    mcIdType* serialize(int idproc);
+    void unserialize(int nbprocs, int* sizes,int nbtarget, int* targetrank, mcIdType* commbuffer);
     
     int* getBufferIndex() const { return _buffer_index; }
     int* getCounts() const { return _send_counts; }
   private:
-    std::vector <std::pair<int,int> > _mapping;
+    std::vector <std::pair<int,mcIdType> > _mapping;
     std::set<int> _distant_domains;
     int* _numbers;
     int* _domains;
-    int* _comm_buffer;
+    mcIdType* _comm_buffer;
     int* _buffer_index;
     int* _send_counts;
 
index d6cf32c83fcb66295971bddbce99dd00ca05a5d0..0d46627db0acb29c9345f960528b4103ea761d64 100644 (file)
@@ -43,10 +43,10 @@ _proc_group(paramesh.getBlockTopology()->getProcGroup()),
 _nb_components(1)
 {
   _nb_elems=paramesh.getCellMesh()->getNumberOfCells();
-  const int* global=paramesh.getGlobalNumberingCell();
-  _loc2glob=new int[_nb_elems]; 
+  const mcIdType* global=paramesh.getGlobalNumberingCell();
+  _loc2glob=new mcIdType[_nb_elems]; 
   
-    for (int i=0; i<_nb_elems; i++)
+    for (mcIdType i=0; i<_nb_elems; i++)
     {
       _loc2glob[i]=global[i];
       _glob2loc[global[i]]=i;
@@ -58,8 +58,8 @@ ExplicitTopology::ExplicitTopology(const ExplicitTopology& topo, int nb_componen
   _proc_group = topo._proc_group;
   _nb_elems = topo._nb_elems;
   _nb_components = nb_components;
-  _loc2glob=new int[_nb_elems];
-  for (int i=0; i<_nb_elems; i++)
+  _loc2glob=new mcIdType[_nb_elems];
+  for (mcIdType i=0; i<_nb_elems; i++)
     {
       _loc2glob[i]=topo._loc2glob[i];
     }
@@ -75,18 +75,18 @@ ExplicitTopology::~ExplicitTopology()
 
 /*! Serializes the data contained in the Explicit Topology
  * for communication purposes*/
-void ExplicitTopology::serialize(int* & serializer, int& size) const 
+void ExplicitTopology::serialize(mcIdType* & serializer, mcIdType& size) const 
 {
-  vector <int> buffer;
+  vector <mcIdType> buffer;
   
   buffer.push_back(_nb_elems);
-  for (int i=0; i<_nb_elems; i++)
+  for (mcIdType i=0; i<_nb_elems; i++)
   {
     buffer.push_back(_loc2glob[i]);
   }
     
-  serializer=new int[buffer.size()];
-  size=  buffer.size();
+  serializer=new mcIdType[buffer.size()];
+  size=ToIdType(buffer.size());
   copy(buffer.begin(), buffer.end(), serializer);
   
 }
@@ -94,14 +94,14 @@ void ExplicitTopology::serialize(int* & serializer, int& size) const
  * after communication. Uses the same structure as the one used for serialize()
  * 
  * */
-void ExplicitTopology::unserialize(const int* serializer,const CommInterface& comm_interface)
+void ExplicitTopology::unserialize(const mcIdType* serializer,const CommInterface& comm_interface)
 {
-  const int* ptr_serializer=serializer;
+  const mcIdType* ptr_serializer=serializer;
   cout << "unserialize..."<<endl;
   _nb_elems=*ptr_serializer++;
   cout << "nbelems "<<_nb_elems<<endl;
-  _loc2glob=new int[_nb_elems];
-  for (int i=0; i<_nb_elems; i++)
+  _loc2glob=new mcIdType[_nb_elems];
+  for (mcIdType i=0; i<_nb_elems; i++)
   {
     _loc2glob[i]=*ptr_serializer;
     _glob2loc[*ptr_serializer]=i;
index 6f2d42bc80c7321c55b8eec0b885382895ef7402..229d8797c2408ac554a3ef2110e3e29bfa97ab3b 100644 (file)
@@ -48,50 +48,50 @@ namespace MEDCoupling
     ExplicitTopology(const ParaMESH &mesh);
     virtual ~ExplicitTopology();
     
-    inline int getNbElements()const;
-    inline int getNbLocalElements() const;
+    inline mcIdType getNbElements()const;
+    inline mcIdType getNbLocalElements() const;
     const ProcessorGroup* getProcGroup()const { return _proc_group; }
-    int localToGlobal (const std::pair<int,int> local) const { return localToGlobal(local.second); }
-    inline int localToGlobal(int) const;
-    inline int globalToLocal(int) const;
-    void serialize(int* & serializer, int& size) const ;
-    void unserialize(const int* serializer, const CommInterface& comm_interface);
+    mcIdType localToGlobal (const std::pair<int,mcIdType> local) const { return localToGlobal(local.second); }
+    inline mcIdType localToGlobal(mcIdType) const;
+    inline mcIdType globalToLocal(mcIdType) const;
+    void serialize(mcIdType* & serializer, mcIdType& size) const ;
+    void unserialize(const mcIdType* serializer, const CommInterface& comm_interface);
     int getNbComponents() const { return _nb_components; }
   private:
     //Processor group
     const ProcessorGroup* _proc_group;
     //nb of elements
-    int _nb_elems;
+    mcIdType _nb_elems;
     //nb of components
     int _nb_components;
     //mapping local to global
-    int* _loc2glob;
+    mcIdType* _loc2glob;
     //mapping global to local
-    INTERP_KERNEL::HashMap<int,int> _glob2loc;
+    INTERP_KERNEL::HashMap<mcIdType,mcIdType> _glob2loc;
   };
 
   //!converts a pair <subdomainid,local> to a global number 
-  inline int ExplicitTopology::globalToLocal(const int global) const
+  inline mcIdType ExplicitTopology::globalToLocal(const mcIdType global) const
   {
-    return (_glob2loc.find(global))->second;;
+    return (_glob2loc.find(global))->second;
   }
 
   //!converts local number to a global number
-  int ExplicitTopology::localToGlobal(int local) const
+  mcIdType ExplicitTopology::localToGlobal(mcIdType local) const
   {
     return _loc2glob[local];
   }
   
   //!Retrieves the number of elements for a given topology
-  inline int ExplicitTopology::getNbElements() const
+  inline mcIdType ExplicitTopology::getNbElements() const
   {
     return _nb_elems;
   }
 
   //Retrieves the local number of elements 
-  inline int ExplicitTopology::getNbLocalElements()const 
+  inline mcIdType ExplicitTopology::getNbLocalElements()const 
   {
-    return _glob2loc.size();
+    return ToIdType(_glob2loc.size());
   }
 }
 
index 5d87ac87302fb33da60f657c4e5fe22a24a436af..93919747e57808e23446d28015897f02c7d2eb76 100644 (file)
@@ -204,7 +204,7 @@ namespace MEDCoupling
         //transferring option from InterpKernelDEC to ElementLocator   
         locator.copyOptions(*this);
         MEDCouplingPointSet* distant_mesh=0; 
-        int* distant_ids=0;
+        mcIdType* distant_ids=0;
         std::string distantMeth;
         for (int i=0; i<_target_group->size(); i++)
           {
@@ -235,7 +235,7 @@ namespace MEDCoupling
         //transferring option from InterpKernelDEC to ElementLocator
         locator.copyOptions(*this);
         MEDCouplingPointSet* distant_mesh=0;
-        int* distant_ids=0;
+        mcIdType* distant_ids=0;
         for (int i=0; i<_source_group->size(); i++)
           {
             //        int idistant_proc = (i+_target_group->myRank())%_source_group->size();
index c3d813dd97060bbabb54dcbd41e3e30afe198303..021e9ac6eb80cc20987004e1fa7960691590e1cb 100644 (file)
@@ -66,7 +66,7 @@ namespace MEDCoupling
     _source_group(source_group),
     _target_group(target_group)
   {
-    int nbelems = source_field->getField()->getNumberOfTuples();
+    mcIdType nbelems = source_field->getField()->getNumberOfTuples();
     _row_offsets.resize(nbelems+1);
     _coeffs.resize(nbelems);
     _target_volume.resize(nbelems);
@@ -94,14 +94,14 @@ namespace MEDCoupling
    */
   void InterpolationMatrix::addContribution ( MEDCouplingPointSet& distant_support,
                                               int iproc_distant,
-                                              const int* distant_elems,
+                                              const mcIdType* distant_elems,
                                               const std::string& srcMeth,
                                               const std::string& targetMeth)
   {
     std::string interpMethod(targetMeth);
     interpMethod+=srcMeth;
     //creating the interpolator structure
-    vector<map<int,double> > surfaces;
+    vector<map<mcIdType,double> > surfaces;
     //computation of the intersection volumes between source and target elements
     MEDCouplingUMesh *distant_supportC=dynamic_cast<MEDCouplingUMesh *>(&distant_support);
     MEDCouplingUMesh *source_supportC=dynamic_cast<MEDCouplingUMesh *>(_source_support);
@@ -258,30 +258,30 @@ namespace MEDCoupling
       target_triangle_surf->decrRef();
   }
 
-  void InterpolationMatrix::fillDSFromVM(int iproc_distant, const int* distant_elems, const std::vector< std::map<int,double> >& values, MEDCouplingFieldDouble *surf)
+  void InterpolationMatrix::fillDSFromVM(int iproc_distant, const mcIdType* distant_elems, const std::vector< std::map<mcIdType,double> >& values, MEDCouplingFieldDouble *surf)
   {
     //loop over the elements to build the interpolation
     //matrix structures
-    int source_size=values.size();
-    for (int ielem=0; ielem < source_size; ielem++) 
+    std::size_t source_size=values.size();
+    for (std::size_t ielem=0; ielem < source_size; ielem++) 
       {
-        _row_offsets[ielem+1] += values[ielem].size();
-        for(map<int,double>::const_iterator iter=values[ielem].begin();iter!=values[ielem].end();iter++)
+        _row_offsets[ielem+1] += ToIdType(values[ielem].size());
+        for(map<mcIdType,double>::const_iterator iter=values[ielem].begin();iter!=values[ielem].end();iter++)
           {
-            int localId;
+            mcIdType localId;
             if(distant_elems)
               localId=distant_elems[iter->first];
             else
               localId=iter->first;
             //locating the (iproc, itriangle) pair in the list of columns
-            map<pair<int,int>,int >::iterator iter2 = _col_offsets.find(make_pair(iproc_distant,localId));
-            int col_id;
+            map<pair<int,mcIdType>,mcIdType >::iterator iter2 = _col_offsets.find(make_pair(iproc_distant,localId));
+            mcIdType col_id;
 
             if (iter2 == _col_offsets.end())
               {
                 //(iproc, itriangle) is not registered in the list
                 //of distant elements
-                col_id =_col_offsets.size();
+                col_id =ToIdType(_col_offsets.size());
                 _col_offsets.insert(make_pair(make_pair(iproc_distant,localId),col_id));
                 _mapping.addElementFromSource(iproc_distant,localId);
               }
@@ -303,13 +303,13 @@ namespace MEDCoupling
       }
   }
 
-  void InterpolationMatrix::serializeMe(std::vector< std::vector< std::map<int,double> > >& data1, std::vector<int>& data2) const
+  void InterpolationMatrix::serializeMe(std::vector< std::vector< std::map<mcIdType,double> > >& data1, std::vector<int>& data2) const
   {
     data1.clear();
     data2.clear();
-    const std::vector<std::pair<int,int> >& sendingIds=_mapping.getSendingIds();
+    const std::vector<std::pair<int,mcIdType> >& sendingIds=_mapping.getSendingIds();
     std::set<int> procsS;
-    for(std::vector<std::pair<int,int> >::const_iterator iter1=sendingIds.begin();iter1!=sendingIds.end();iter1++)
+    for(std::vector<std::pair<int,mcIdType> >::const_iterator iter1=sendingIds.begin();iter1!=sendingIds.end();iter1++)
       procsS.insert((*iter1).first);
     data1.resize(procsS.size());
     data2.resize(procsS.size());
@@ -318,15 +318,15 @@ namespace MEDCoupling
     int id=0;
     for(std::set<int>::const_iterator iter2=procsS.begin();iter2!=procsS.end();iter2++,id++)
       fastProcAcc[*iter2]=id;
-    int nbOfSrcElt=_coeffs.size();
-    for(std::vector< std::vector< std::map<int,double> > >::iterator iter3=data1.begin();iter3!=data1.end();iter3++)
+    mcIdType nbOfSrcElt=ToIdType(_coeffs.size());
+    for(std::vector< std::vector< std::map<mcIdType,double> > >::iterator iter3=data1.begin();iter3!=data1.end();iter3++)
       (*iter3).resize(nbOfSrcElt);
     id=0;
     for(std::vector< std::vector< std::pair<int,double> > >::const_iterator iter4=_coeffs.begin();iter4!=_coeffs.end();iter4++,id++)
       {
         for(std::vector< std::pair<int,double> >::const_iterator iter5=(*iter4).begin();iter5!=(*iter4).end();iter5++)
           {
-            const std::pair<int,int>& elt=sendingIds[(*iter5).first];
+            const std::pair<int,mcIdType>& elt=sendingIds[(*iter5).first];
             data1[fastProcAcc[elt.first]][id][elt.second]=(*iter5).second;
           }
       }
@@ -334,7 +334,7 @@ namespace MEDCoupling
 
   void InterpolationMatrix::initialize()
   {
-    int lgth=_coeffs.size();
+    mcIdType lgth=ToIdType(_coeffs.size());
     _row_offsets.clear(); _row_offsets.resize(lgth+1);
     _coeffs.clear(); _coeffs.resize(lgth);
     _target_volume.clear(); _target_volume.resize(lgth);
@@ -495,7 +495,7 @@ namespace MEDCoupling
   void InterpolationMatrix::computeGlobalRowSum(ElementLocator& elementLocator, std::vector<std::vector<double> >& denoStrorage, std::vector<std::vector<double> >& denoStrorageInv)
   {
     //stores id in distant procs sorted by lazy procs connected with
-    vector< vector<int> > rowsPartialSumI;
+    vector< vector<mcIdType> > rowsPartialSumI;
     //stores for each lazy procs connected with, if global info is available and if it's the case the policy
     vector<int> policyPartial;
     //stores the corresponding values.
@@ -513,11 +513,11 @@ namespace MEDCoupling
         //updateWithNewAdditionnalElements(addingElements);
         //stores for each lazy procs connected with, the ids in global mode if it exists (regarding policyPartial). This array has exactly the size of  rowsPartialSumI,
         //if policyPartial has CUMALATIVE_POLICY in each.
-        vector< vector<int> > globalIdsPartial;
+        vector< vector<mcIdType> > globalIdsPartial;
         computeLocalRowSum(elementLocator.getDistantProcIds(),rowsPartialSumI,rowsPartialSumD);
         elementLocator.sendLocalIdsToLazyProcsW(rowsPartialSumI);
         elementLocator.recvCandidatesGlobalIdsFromLazyProcsW(globalIdsPartial);
-        std::vector< std::vector<int> > addingElements;
+        std::vector< std::vector<mcIdType> > addingElements;
         findAdditionnalElements(elementLocator,addingElements,rowsPartialSumI,globalIdsPartial);
         addGhostElements(elementLocator.getDistantProcIds(),addingElements);
         rowsPartialSumI.clear();
@@ -542,7 +542,7 @@ namespace MEDCoupling
    *                    It contains the element ids (2nd dimension) of the corresponding lazy proc.
    * @param  resPerProcD out parameter with the same format than 'resPerProcI'. It contains corresponding sum values.
    */
-  void InterpolationMatrix::computeLocalRowSum(const std::vector<int>& distantProcs, std::vector<std::vector<int> >& resPerProcI,
+  void InterpolationMatrix::computeLocalRowSum(const std::vector<int>& distantProcs, std::vector<std::vector<mcIdType> >& resPerProcI,
                                                std::vector<std::vector<double> >& resPerProcD) const
   {
     resPerProcI.resize(distantProcs.size());
@@ -552,9 +552,9 @@ namespace MEDCoupling
       for(vector<pair<int,double> >::const_iterator iter3=(*iter).begin();iter3!=(*iter).end();iter3++)
         res[(*iter3).first]+=(*iter3).second;
     set<int> procsSet;
-    int id=-1;
-    const vector<std::pair<int,int> >& mapping=_mapping.getSendingIds();
-    for(vector<std::pair<int,int> >::const_iterator iter2=mapping.begin();iter2!=mapping.end();iter2++)
+    std::size_t id=-1;
+    const vector<std::pair<int,mcIdType> >& mapping=_mapping.getSendingIds();
+    for(vector<std::pair<int,mcIdType> >::const_iterator iter2=mapping.begin();iter2!=mapping.end();iter2++)
       {
         std::pair<set<int>::iterator,bool> isIns=procsSet.insert((*iter2).first);
         if(isIns.second)
@@ -568,56 +568,56 @@ namespace MEDCoupling
    * This method is only usable when CUMULATIVE_POLICY detected. This method finds elements ids (typically nodes) lazy side that
    * are not present in columns of 'this' and that should regarding cumulative merge of elements regarding their global ids.
    */
-  void InterpolationMatrix::findAdditionnalElements(ElementLocator& elementLocator, std::vector<std::vector<int> >& elementsToAdd,
-                                                    const std::vector<std::vector<int> >& resPerProcI, const std::vector<std::vector<int> >& globalIdsPartial)
+  void InterpolationMatrix::findAdditionnalElements(ElementLocator& elementLocator, std::vector<std::vector<mcIdType> >& elementsToAdd,
+                                                    const std::vector<std::vector<mcIdType> >& resPerProcI, const std::vector<std::vector<mcIdType> >& globalIdsPartial)
   {
-    std::set<int> globalIds;
-    int nbLazyProcs=globalIdsPartial.size();
-    for(int i=0;i<nbLazyProcs;i++)
+    std::set<mcIdType> globalIds;
+    std::size_t nbLazyProcs=globalIdsPartial.size();
+    for(std::size_t i=0;i<nbLazyProcs;i++)
       globalIds.insert(globalIdsPartial[i].begin(),globalIdsPartial[i].end());
-    std::vector<int> tmp(globalIds.size());
+    std::vector<mcIdType> tmp(globalIds.size());
     std::copy(globalIds.begin(),globalIds.end(),tmp.begin());
     globalIds.clear();
     elementLocator.sendCandidatesForAddElementsW(tmp);
     elementLocator.recvAddElementsFromLazyProcsW(elementsToAdd);
   }
 
-  void InterpolationMatrix::addGhostElements(const std::vector<int>& distantProcs, const std::vector<std::vector<int> >& elementsToAdd)
+  void InterpolationMatrix::addGhostElements(const std::vector<int>& distantProcs, const std::vector<std::vector<mcIdType> >& elementsToAdd)
   {
-    std::vector< std::vector< std::map<int,double> > > data1;
+    std::vector< std::vector< std::map<mcIdType,double> > > data1;
     std::vector<int> data2;
     serializeMe(data1,data2);
     initialize();
-    int nbOfDistProcs=distantProcs.size();
-    for(int i=0;i<nbOfDistProcs;i++)
+    std::size_t nbOfDistProcs=distantProcs.size();
+    for(std::size_t i=0;i<nbOfDistProcs;i++)
       {
         int procId=distantProcs[i];
-        const std::vector<int>& eltsForThisProc=elementsToAdd[i];
+        const std::vector<mcIdType>& eltsForThisProc=elementsToAdd[i];
         if(!eltsForThisProc.empty())
           {
             std::vector<int>::iterator iter1=std::find(data2.begin(),data2.end(),procId);
-            std::map<int,double> *toFeed=0;
+            std::map<mcIdType,double> *toFeed=0;
             if(iter1!=data2.end())
               {//to test
-                int rank=iter1-data2.begin();
+                std::size_t rank=iter1-data2.begin();
                 toFeed=&(data1[rank].back());
               }
             else
               {
                 iter1=std::lower_bound(data2.begin(),data2.end(),procId);
-                int rank=iter1-data2.begin();
+                std::size_t rank=iter1-data2.begin();
                 data2.insert(iter1,procId);
-                std::vector< std::map<int,double> > tmp(data1.front().size());
+                std::vector< std::map<mcIdType,double> > tmp(data1.front().size());
                 data1.insert(data1.begin()+rank,tmp);
                 toFeed=&(data1[rank].back());
               }
-            for(std::vector<int>::const_iterator iter2=eltsForThisProc.begin();iter2!=eltsForThisProc.end();iter2++)
+            for(std::vector<mcIdType>::const_iterator iter2=eltsForThisProc.begin();iter2!=eltsForThisProc.end();iter2++)
               (*toFeed)[*iter2]=0.;
           }
       }
     //
     nbOfDistProcs=data2.size();
-    for(int j=0;j<nbOfDistProcs;j++)
+    for(std::size_t j=0;j<nbOfDistProcs;j++)
       fillDSFromVM(data2[j],0,data1[j],0);
   }
 
@@ -644,27 +644,27 @@ namespace MEDCoupling
    * @param globalIdsLazySideInteraction : out parameter, constituted from all global ids of lazy procs connected with.
    * @para sumCorresponding : out parameter, relative to 'globalIdsLazySideInteraction'
    */
-  void InterpolationMatrix::mergeRowSum(const std::vector< std::vector<double> >& rowsPartialSumD, const std::vector< std::vector<int> >& globalIdsPartial,
-                                        std::vector<int>& globalIdsLazySideInteraction, std::vector<double>& sumCorresponding)
+  void InterpolationMatrix::mergeRowSum(const std::vector< std::vector<double> >& rowsPartialSumD, const std::vector< std::vector<mcIdType> >& globalIdsPartial,
+                                        std::vector<mcIdType>& globalIdsLazySideInteraction, std::vector<double>& sumCorresponding)
   {
-    std::map<int,double> sumToReturn;
-    int nbLazyProcs=rowsPartialSumD.size();
-    for(int i=0;i<nbLazyProcs;i++)
+    std::map<mcIdType,double> sumToReturn;
+    std::size_t nbLazyProcs=rowsPartialSumD.size();
+    for(std::size_t i=0;i<nbLazyProcs;i++)
       {
         const std::vector<double>& rowSumOfP=rowsPartialSumD[i];
-        const std::vector<int>& globalIdsOfP=globalIdsPartial[i];
+        const std::vector<mcIdType>& globalIdsOfP=globalIdsPartial[i];
         std::vector<double>::const_iterator iter1=rowSumOfP.begin();
-        std::vector<int>::const_iterator iter2=globalIdsOfP.begin();
+        std::vector<mcIdType>::const_iterator iter2=globalIdsOfP.begin();
         for(;iter1!=rowSumOfP.end();iter1++,iter2++)
           sumToReturn[*iter2]+=*iter1;
       }
     //
-    int lgth=sumToReturn.size();
+    std::size_t lgth=sumToReturn.size();
     globalIdsLazySideInteraction.resize(lgth);
     sumCorresponding.resize(lgth);
-    std::vector<int>::iterator iter3=globalIdsLazySideInteraction.begin();
+    std::vector<mcIdType>::iterator iter3=globalIdsLazySideInteraction.begin();
     std::vector<double>::iterator iter4=sumCorresponding.begin();
-    for(std::map<int,double>::const_iterator iter5=sumToReturn.begin();iter5!=sumToReturn.end();iter5++,iter3++,iter4++)
+    for(std::map<mcIdType,double>::const_iterator iter5=sumToReturn.begin();iter5!=sumToReturn.end();iter5++,iter3++,iter4++)
       {
         *iter3=(*iter5).first;
         *iter4=(*iter5).second;
@@ -679,35 +679,35 @@ namespace MEDCoupling
    * @param globalIdsLazySideInteraction : in parameter that represents ALL the global ids of every lazy procs in interaction
    * @param sumCorresponding : in parameter with same size as 'globalIdsLazySideInteraction' that stores the corresponding sum of 'globalIdsLazySideInteraction'
    */
-  void InterpolationMatrix::mergeRowSum2(const std::vector< std::vector<int> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD,
-                                         const std::vector<int>& globalIdsLazySideInteraction, const std::vector<double>& sumCorresponding)
+  void InterpolationMatrix::mergeRowSum2(const std::vector< std::vector<mcIdType> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD,
+                                         const std::vector<mcIdType>& globalIdsLazySideInteraction, const std::vector<double>& sumCorresponding)
   {
-    std::map<int,double> acc;
-    std::vector<int>::const_iterator iter1=globalIdsLazySideInteraction.begin();
+    std::map<mcIdType,double> acc;
+    std::vector<mcIdType>::const_iterator iter1=globalIdsLazySideInteraction.begin();
     std::vector<double>::const_iterator iter2=sumCorresponding.begin();
     for(;iter1!=globalIdsLazySideInteraction.end();iter1++,iter2++)
       acc[*iter1]=*iter2;
     //
-    int nbLazyProcs=globalIdsPartial.size();
-    for(int i=0;i<nbLazyProcs;i++)
+    std::size_t nbLazyProcs=globalIdsPartial.size();
+    for(std::size_t i=0;i<nbLazyProcs;i++)
       {
-        const std::vector<int>& tmp1=globalIdsPartial[i];
+        const std::vector<mcIdType>& tmp1=globalIdsPartial[i];
         std::vector<double>& tmp2=rowsPartialSumD[i];
-        std::vector<int>::const_iterator iter3=tmp1.begin();
+        std::vector<mcIdType>::const_iterator iter3=tmp1.begin();
         std::vector<double>::iterator iter4=tmp2.begin();
         for(;iter3!=tmp1.end();iter3++,iter4++)
           *iter4=acc[*iter3];
       }
   }
   
-  void InterpolationMatrix::mergeRowSum3(const std::vector< std::vector<int> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD)
+  void InterpolationMatrix::mergeRowSum3(const std::vector< std::vector<mcIdType> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD)
   {
-    std::map<int,double> sum;
-    std::vector< std::vector<int> >::const_iterator iter1=globalIdsPartial.begin();
+    std::map<mcIdType,double> sum;
+    std::vector< std::vector<mcIdType> >::const_iterator iter1=globalIdsPartial.begin();
     std::vector< std::vector<double> >::iterator iter2=rowsPartialSumD.begin();
     for(;iter1!=globalIdsPartial.end();iter1++,iter2++)
       {
-        std::vector<int>::const_iterator iter3=(*iter1).begin();
+        std::vector<mcIdType>::const_iterator iter3=(*iter1).begin();
         std::vector<double>::const_iterator iter4=(*iter2).begin();
         for(;iter3!=(*iter1).end();iter3++,iter4++)
           sum[*iter3]+=*iter4;
@@ -715,7 +715,7 @@ namespace MEDCoupling
     iter2=rowsPartialSumD.begin();
     for(iter1=globalIdsPartial.begin();iter1!=globalIdsPartial.end();iter1++,iter2++)
       {
-        std::vector<int>::const_iterator iter3=(*iter1).begin();
+        std::vector<mcIdType>::const_iterator iter3=(*iter1).begin();
         std::vector<double>::iterator iter4=(*iter2).begin();
         for(;iter3!=(*iter1).end();iter3++,iter4++)
           *iter4=sum[*iter3];
@@ -729,36 +729,36 @@ namespace MEDCoupling
    * @param rowsPartialSumI input parameter : local ids of distant lazy procs elements in interaction with
    * @param globalIdsPartial input parameter : global ids of distant lazy procs elements in interaction with
    */
-  void InterpolationMatrix::mergeCoeffs(const std::vector<int>& procsInInteraction, const std::vector< std::vector<int> >& rowsPartialSumI,
-                                        const std::vector<std::vector<int> >& globalIdsPartial, std::vector<std::vector<double> >& denoStrorageInv)
+  void InterpolationMatrix::mergeCoeffs(const std::vector<int>& procsInInteraction, const std::vector< std::vector<mcIdType> >& rowsPartialSumI,
+                                        const std::vector<std::vector<mcIdType> >& globalIdsPartial, std::vector<std::vector<double> >& denoStrorageInv)
   {
     //preparing fast access structures
     std::map<int,int> procT;
     int localProcId=0;
     for(std::vector<int>::const_iterator iter1=procsInInteraction.begin();iter1!=procsInInteraction.end();iter1++,localProcId++)
       procT[*iter1]=localProcId;
-    int size=procsInInteraction.size();
-    std::vector<std::map<int,int> > localToGlobal(size);
-    for(int i=0;i<size;i++)
-      {
-        std::map<int,int>& myLocalToGlobal=localToGlobal[i];
-        const std::vector<int>& locals=rowsPartialSumI[i];
-        const std::vector<int>& globals=globalIdsPartial[i];
-        std::vector<int>::const_iterator iter3=locals.begin();
-        std::vector<int>::const_iterator iter4=globals.begin();
+    std::size_t size=procsInInteraction.size();
+    std::vector<std::map<mcIdType,mcIdType> > localToGlobal(size);
+    for(std::size_t i=0;i<size;i++)
+      {
+        std::map<mcIdType,mcIdType>& myLocalToGlobal=localToGlobal[i];
+        const std::vector<mcIdType>& locals=rowsPartialSumI[i];
+        const std::vector<mcIdType>& globals=globalIdsPartial[i];
+        std::vector<mcIdType>::const_iterator iter3=locals.begin();
+        std::vector<mcIdType>::const_iterator iter4=globals.begin();
         for(;iter3!=locals.end();iter3++,iter4++)
           myLocalToGlobal[*iter3]=*iter4;
       }
     //
-    const vector<std::pair<int,int> >& mapping=_mapping.getSendingIds();
-    std::map<int,double> globalIdVal;
+    const vector<std::pair<int,mcIdType> >& mapping=_mapping.getSendingIds();
+    std::map<mcIdType,double> globalIdVal;
     //accumulate for same global id on lazy part.
     for(vector<vector<pair<int,double> > >::iterator iter1=_coeffs.begin();iter1!=_coeffs.end();iter1++)
       for(vector<pair<int,double> >::iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
         {
-          const std::pair<int,int>& distantLocalLazyId=mapping[(*iter2).first];
+          const std::pair<int,mcIdType>& distantLocalLazyId=mapping[(*iter2).first];
           int localLazyProcId=procT[distantLocalLazyId.first];
-          int globalDistantLazyId=localToGlobal[localLazyProcId][distantLocalLazyId.second];
+          mcIdType globalDistantLazyId=localToGlobal[localLazyProcId][distantLocalLazyId.second];
           globalIdVal[globalDistantLazyId]+=(*iter2).second;
         }
     //perform merge
@@ -770,9 +770,9 @@ namespace MEDCoupling
         std::vector<double>::iterator iter4=(*iter3).begin();
         for(vector<pair<int,double> >::iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++,iter4++)
           {
-            const std::pair<int,int>& distantLocalLazyId=mapping[(*iter2).first];
+            const std::pair<int,mcIdType>& distantLocalLazyId=mapping[(*iter2).first];
             int localLazyProcId=procT[distantLocalLazyId.first];
-            int globalDistantLazyId=localToGlobal[localLazyProcId][distantLocalLazyId.second];
+            mcIdType globalDistantLazyId=localToGlobal[localLazyProcId][distantLocalLazyId.second];
             double newVal=globalIdVal[globalDistantLazyId];
             if((*iter2).second!=0.)
               (*iter4)=val*newVal/(*iter2).second;
@@ -783,17 +783,17 @@ namespace MEDCoupling
       }
   }
 
-  void InterpolationMatrix::divideByGlobalRowSum(const std::vector<int>& distantProcs, const std::vector<std::vector<int> >& resPerProcI,
+  void InterpolationMatrix::divideByGlobalRowSum(const std::vector<int>& distantProcs, const std::vector<std::vector<mcIdType> >& resPerProcI,
                                                  const std::vector<std::vector<double> >& resPerProcD, std::vector<std::vector<double> >& deno)
   {
-    map<int,double> fastSums;
+    map<mcIdType,double> fastSums;
     int procId=0;
     for(vector<int>::const_iterator iter1=distantProcs.begin();iter1!=distantProcs.end();iter1++,procId++)
       {
-        const std::vector<int>& currentProcI=resPerProcI[procId];
+        const std::vector<mcIdType>& currentProcI=resPerProcI[procId];
         const std::vector<double>& currentProcD=resPerProcD[procId];
         vector<double>::const_iterator iter3=currentProcD.begin();
-        for(vector<int>::const_iterator iter2=currentProcI.begin();iter2!=currentProcI.end();iter2++,iter3++)
+        for(vector<mcIdType>::const_iterator iter2=currentProcI.begin();iter2!=currentProcI.end();iter2++,iter3++)
           fastSums[_col_offsets[std::make_pair(*iter1,*iter2)]]=*iter3;
       }
     deno.resize(_coeffs.size());
@@ -841,8 +841,8 @@ namespace MEDCoupling
      */
   void InterpolationMatrix::prepare()
   {
-    int nbelems = _source_field->getField()->getNumberOfTuples();
-    for (int ielem=0; ielem < nbelems; ielem++)
+    mcIdType nbelems = _source_field->getField()->getNumberOfTuples();
+    for (mcIdType ielem=0; ielem < nbelems; ielem++)
       {
         _row_offsets[ielem+1]+=_row_offsets[ielem];
       }
@@ -864,24 +864,24 @@ namespace MEDCoupling
    */
   void InterpolationMatrix::multiply(MEDCouplingFieldDouble& field) const
   {
-    int nbcomp = field.getArray()->getNumberOfComponents();
+    mcIdType nbcomp = ToIdType(field.getArray()->getNumberOfComponents());
     vector<double> target_value(_col_offsets.size()* nbcomp,0.0);
 
     //computing the matrix multiply on source side
     if (_source_group.containsMyRank())
       {
-        int nbrows = _coeffs.size();
+        mcIdType nbrows = ToIdType(_coeffs.size());
 
         // performing W.S
         // W is the intersection matrix
         // S is the source vector
 
-        for (int irow=0; irow<nbrows; irow++)
+        for (mcIdType irow=0; irow<nbrows; irow++)
           {
-            for (int icomp=0; icomp< nbcomp; icomp++)
+            for (mcIdType icomp=0; icomp< nbcomp; icomp++)
               {
                 double coeff_row = field.getIJ(irow,icomp);
-                for (int icol=_row_offsets[irow]; icol< _row_offsets[irow+1];icol++)
+                for (mcIdType icol=_row_offsets[irow]; icol< _row_offsets[irow+1];icol++)
                   {
                     int colid= _coeffs[irow][icol-_row_offsets[irow]].first;
                     double value = _coeffs[irow][icol-_row_offsets[irow]].second;
@@ -894,9 +894,9 @@ namespace MEDCoupling
 
     if (_target_group.containsMyRank())
       {
-        int nbelems = field.getArray()->getNumberOfTuples() ;
+        mcIdType nbelems = field.getArray()->getNumberOfTuples() ;
         double* value = const_cast<double*> (field.getArray()->getPointer());
-        for (int i=0; i<nbelems*nbcomp; i++)
+        for (mcIdType i=0; i<nbelems*nbcomp; i++)
           {
             value[i]=0.0;
           }
@@ -923,15 +923,15 @@ namespace MEDCoupling
      */
   void InterpolationMatrix::transposeMultiply(MEDCouplingFieldDouble& field) const
   {
-    int nbcomp = field.getArray()->getNumberOfComponents();
+    std::size_t nbcomp = field.getArray()->getNumberOfComponents();
     vector<double> source_value(_col_offsets.size()* nbcomp,0.0);
     _mapping.reverseSendRecv(&source_value[0],field);
 
     //treatment of the transpose matrix multiply on the source side
     if (_source_group.containsMyRank())
       {
-        int nbrows    = _coeffs.size();
-        double *array = field.getArray()->getPointer() ;
+        mcIdType nbrows = ToIdType( _coeffs.size() );
+        double   *array = field.getArray()->getPointer() ;
 
         // Initialization
         std::fill(array, array+nbrows*nbcomp, 0.0) ;
@@ -939,14 +939,14 @@ namespace MEDCoupling
         //performing WT.T
         //WT is W transpose
         //T is the target vector
-        for (int irow = 0; irow < nbrows; irow++)
+        for (mcIdType irow = 0; irow < nbrows; irow++)
           {
-            for (int icol = _row_offsets[irow]; icol < _row_offsets[irow+1]; icol++)
+            for (mcIdType icol = _row_offsets[irow]; icol < _row_offsets[irow+1]; icol++)
               {
                 int colid    = _coeffs[irow][icol-_row_offsets[irow]].first;
                 double value = _coeffs[irow][icol-_row_offsets[irow]].second;
                 double deno = _deno_reverse_multiply[irow][icol-_row_offsets[irow]];
-                for (int icomp=0; icomp<nbcomp; icomp++)
+                for (std::size_t icomp=0; icomp<nbcomp; icomp++)
                   {
                     double coeff_row = source_value[colid*nbcomp+icomp];
                     array[irow*nbcomp+icomp] += value*coeff_row/deno;
index 050ffcf4a766345120ebc6bdd3795ad31cf57e3d..3543875d42b10f0a63dec3a7e65ad7f33e8a9261 100644 (file)
@@ -51,13 +51,13 @@ namespace MEDCoupling
     
     virtual ~InterpolationMatrix();
     void addContribution(MEDCouplingPointSet& distant_support, int iproc_distant,
-                         const int* distant_elems, const std::string& srcMeth, const std::string& targetMeth);
+                         const mcIdType* distant_elems, const std::string& srcMeth, const std::string& targetMeth);
     void finishContributionW(ElementLocator& elementLocator);
     void finishContributionL(ElementLocator& elementLocator);
     void multiply(MEDCouplingFieldDouble& field) const;
     void transposeMultiply(MEDCouplingFieldDouble& field)const;
     void prepare();
-    int getNbRows() const { return _row_offsets.size(); }
+    mcIdType getNbRows() const { return ToIdType(_row_offsets.size()); }
     MPIAccessDEC* getAccessDEC() { return _mapping.getAccessDEC(); }
   private:
     void computeConservVolDenoW(ElementLocator& elementLocator);
@@ -69,33 +69,33 @@ namespace MEDCoupling
     void computeRevIntegralDenoL(ElementLocator& elementLocator);
     
     void computeLocalColSum(std::vector<double>& res) const;
-    void computeLocalRowSum(const std::vector<int>& distantProcs, std::vector<std::vector<int> >& resPerProcI,
+    void computeLocalRowSum(const std::vector<int>& distantProcs, std::vector<std::vector<mcIdType> >& resPerProcI,
                             std::vector<std::vector<double> >& resPerProcD) const;
     void computeGlobalRowSum(ElementLocator& elementLocator, std::vector<std::vector<double> >& denoStrorage, std::vector<std::vector<double> >& denoStrorageInv);
     void computeGlobalColSum(std::vector<std::vector<double> >& denoStrorage);
     void resizeGlobalColSum(std::vector<std::vector<double> >& denoStrorage);
-    void fillDSFromVM(int iproc_distant, const int* distant_elems, const std::vector< std::map<int,double> >& values, MEDCouplingFieldDouble *surf);
-    void serializeMe(std::vector< std::vector< std::map<int,double> > >& data1, std::vector<int>& data2) const;
+    void fillDSFromVM(int iproc_distant, const mcIdType* distant_elems, const std::vector< std::map<mcIdType,double> >& values, MEDCouplingFieldDouble *surf);
+    void serializeMe(std::vector< std::vector< std::map<mcIdType,double> > >& data1, std::vector<int>& data2) const;
     void initialize();
-    void findAdditionnalElements(ElementLocator& elementLocator, std::vector<std::vector<int> >& elementsToAdd,
-                                 const std::vector<std::vector<int> >& resPerProcI, const std::vector<std::vector<int> >& globalIdsPartial);
-    void addGhostElements(const std::vector<int>& distantProcs, const std::vector<std::vector<int> >& elementsToAdd);
+    void findAdditionnalElements(ElementLocator& elementLocator, std::vector<std::vector<mcIdType> >& elementsToAdd,
+                                 const std::vector<std::vector<mcIdType> >& resPerProcI, const std::vector<std::vector<mcIdType> >& globalIdsPartial);
+    void addGhostElements(const std::vector<int>& distantProcs, const std::vector<std::vector<mcIdType> >& elementsToAdd);
     int mergePolicies(const std::vector<int>& policyPartial);
-    void mergeRowSum(const std::vector< std::vector<double> >& rowsPartialSumD, const std::vector< std::vector<int> >& globalIdsPartial,
-                     std::vector<int>& globalIdsLazySideInteraction, std::vector<double>& sumCorresponding);
-    void mergeRowSum2(const std::vector< std::vector<int> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD,
-                      const std::vector<int>& globalIdsLazySideInteraction, const std::vector<double>& sumCorresponding);
-    void mergeRowSum3(const std::vector< std::vector<int> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD);
-    void mergeCoeffs(const std::vector<int>& procsInInteraction, const std::vector< std::vector<int> >& rowsPartialSumI,
-                     const std::vector<std::vector<int> >& globalIdsPartial, std::vector<std::vector<double> >& denoStrorageInv);
-    void divideByGlobalRowSum(const std::vector<int>& distantProcs, const std::vector<std::vector<int> >& resPerProcI,
+    void mergeRowSum(const std::vector< std::vector<double> >& rowsPartialSumD, const std::vector< std::vector<mcIdType> >& globalIdsPartial,
+                     std::vector<mcIdType>& globalIdsLazySideInteraction, std::vector<double>& sumCorresponding);
+    void mergeRowSum2(const std::vector< std::vector<mcIdType> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD,
+                      const std::vector<mcIdType>& globalIdsLazySideInteraction, const std::vector<double>& sumCorresponding);
+    void mergeRowSum3(const std::vector< std::vector<mcIdType> >& globalIdsPartial, std::vector< std::vector<double> >& rowsPartialSumD);
+    void mergeCoeffs(const std::vector<int>& procsInInteraction, const std::vector< std::vector<mcIdType> >& rowsPartialSumI,
+                     const std::vector<std::vector<mcIdType> >& globalIdsPartial, std::vector<std::vector<double> >& denoStrorageInv);
+    void divideByGlobalRowSum(const std::vector<int>& distantProcs, const std::vector<std::vector<mcIdType> >& resPerProcI,
                               const std::vector<std::vector<double> >& resPerProcD, std::vector<std::vector<double> >& deno);
   private:
     bool isSurfaceComputationNeeded(const std::string& method) const;
   private:
     const MEDCoupling::ParaFIELD *_source_field;
-    std::vector<int> _row_offsets;
-    std::map<std::pair<int,int>, int > _col_offsets;
+    std::vector<mcIdType> _row_offsets;
+    std::map<std::pair<int,mcIdType>, mcIdType > _col_offsets;
     MEDCouplingPointSet *_source_support;
     MxN_Mapping _mapping;
  
index 8b5878dc939d18b4b7d541609801d7176a29da23..27d19d91e08150300ebf485086b532116c5b1afc 100644 (file)
@@ -290,7 +290,7 @@ namespace MEDCoupling
   {
     int size = 0;
     for (int i = 0 ; i < _processor_group_size ; i++ )
-      size += _send_requests[ i ].size() ;
+      size += (int)_send_requests[ i ].size() ;
     return size ;
   }
 
@@ -315,7 +315,7 @@ namespace MEDCoupling
   {
     int size = 0 ;
     for (int i = 0 ; i < _processor_group_size ; i++ )
-      size += _recv_requests[ i ].size() ;
+      size += (int)_recv_requests[ i ].size() ;
     return size ;
   }
 
@@ -344,7 +344,7 @@ namespace MEDCoupling
     list< int >::const_iterator iter ;
     for (iter = _send_requests[ destrank ].begin() ; iter != _send_requests[destrank].end() ; iter++ )
       ArrayOfSendRequests[i++] = *iter ;
-    return _send_requests[destrank].size() ;
+    return (int)_send_requests[destrank].size() ;
   }
 
   // Returns in ArrayOfRecvRequests with the dimension "size" all the
@@ -358,7 +358,7 @@ namespace MEDCoupling
     _recv_requests[ sourcerank ] ;
     for (iter = _recv_requests[ sourcerank ].begin() ; iter != _recv_requests[sourcerank].end() ; iter++ )
       ArrayOfRecvRequests[i++] = *iter ;
-    return _recv_requests[sourcerank].size() ;
+    return (int)_recv_requests[sourcerank].size() ;
   }
 
   // Send in synchronous mode count values of type datatype from buffer to target
@@ -1052,6 +1052,14 @@ namespace MEDCoupling
     return aextent ;
   }
 
+  // Returns the MPI size of a MPI_LONG
+  MPI_Aint MPIAccess::longExtent() const
+  {
+    MPI_Aint aextent, lbound ;
+    MPI_Type_get_extent( MPI_LONG , &lbound, &aextent ) ;
+    return aextent ;
+  }
+
   // Returns the MPI size of a MPI_DOUBLE
   MPI_Aint MPIAccess::doubleExtent() const
   {
index 782c68a253df158ca6e73f99b9f3335ec2623106..196fd41b6a6bf1eefd4e8140a60ee7842b8f1668 100644 (file)
@@ -124,6 +124,7 @@ namespace MEDCoupling
     bool isTimeMessage( int MPITag ) const ;
     MPI_Aint timeExtent() const ;
     MPI_Aint intExtent() const ;
+    MPI_Aint longExtent() const ;
     MPI_Aint doubleExtent() const ;
     MPI_Aint extent( MPI_Datatype datatype ) const ;
 
@@ -236,14 +237,14 @@ namespace MEDCoupling
   // used to allocate ArrayOfSendRequests for the call to SendRequestIds
   inline int MPIAccess::sendRequestIdsSize(int destrank)
   {
-    return _send_requests[destrank].size() ;
+    return (int)_send_requests[destrank].size() ;
   }
 
   // Returns the number of all RecvRequestIds matching a source rank. It may be
   // used to allocate ArrayOfRecvRequests for the call to RecvRequestIds
   inline int MPIAccess::recvRequestIdsSize(int sourcerank)
   {
-    return _recv_requests[sourcerank].size() ;
+    return (int)_recv_requests[sourcerank].size() ;
   }
 
   // Returns the MPI_Datatype (registered in MPI in the constructor with
@@ -266,6 +267,8 @@ namespace MEDCoupling
       return timeExtent() ;
     if ( adatatype == MPI_INT )
       return intExtent() ;
+    if ( adatatype == MPI_LONG )
+      return longExtent() ;
     if ( adatatype == MPI_DOUBLE )
       return doubleExtent() ;
     return 0 ;
index 5c74dbec7acf0a4d9e8e6b320c639be9638d162d..f6bd1732575d8c577b364d029b0278151df4aa5e 100644 (file)
@@ -152,6 +152,11 @@ namespace MEDCoupling
             sts = _MPI_access->ISend( &((int *) sendbuf)[offset] , sendcount , sendtype ,
                                       target , SendRequestId ) ;
           }
+        else if ( sendtype == MPI_LONG )
+          {
+            sts = _MPI_access->ISend( &((long *) sendbuf)[offset] , sendcount , sendtype ,
+                                      target , SendRequestId ) ;
+          }
         else
           {
             sts = _MPI_access->ISend( &((double *) sendbuf)[offset] , sendcount , sendtype ,
@@ -165,6 +170,11 @@ namespace MEDCoupling
             sts = _MPI_access->send( &((int *) sendbuf)[offset] , sendcount , sendtype ,
                                      target , SendRequestId ) ;
           }
+        else if ( sendtype == MPI_LONG )
+          {
+            sts = _MPI_access->send( &((long *) sendbuf)[offset] , sendcount , sendtype ,
+                                     target , SendRequestId ) ;
+          }
         else
           {
             sts = _MPI_access->send( &((double *) sendbuf)[offset] , sendcount , sendtype ,
@@ -192,6 +202,11 @@ namespace MEDCoupling
             sts = _MPI_access->IRecv( &((int *) recvbuf)[offset] , recvcount , recvtype ,
                                       target , RecvRequestId ) ;
           }
+        else if ( recvtype == MPI_LONG )
+          {
+            sts = _MPI_access->IRecv( &((long *) recvbuf)[offset] , recvcount , recvtype ,
+                                      target , RecvRequestId ) ;
+          }
         else
           {
             sts = _MPI_access->IRecv( &((double *) recvbuf)[offset] , recvcount , recvtype ,
@@ -205,6 +220,11 @@ namespace MEDCoupling
             sts = _MPI_access->recv( &((int *) recvbuf)[offset] , recvcount , recvtype ,
                                      target , RecvRequestId ) ;
           }
+        else if ( recvtype == MPI_LONG )
+          {
+            sts = _MPI_access->recv( &((long *) recvbuf)[offset] , recvcount , recvtype ,
+                                     target , RecvRequestId ) ;
+          }
         else
           {
             sts = _MPI_access->recv( &((double *) recvbuf)[offset] , recvcount , recvtype ,
@@ -565,7 +585,7 @@ namespace MEDCoupling
       {
         for ( target = 0 ; target < _group_size ; target++ )
           {
-            int recvsize = recvcount*_MPI_access->extent( recvtype ) ;
+            int recvsize = (int)(recvcount*_MPI_access->extent( recvtype ));
             checkTime( recvcount , recvtype , target , false ) ;
             //===========================================================================
             //TODO : it is assumed actually that we have only 1 timestep before and after
@@ -714,7 +734,7 @@ namespace MEDCoupling
           {
             if ( recvcounts[target] )
               {
-                int recvsize = recvcounts[target]*_MPI_access->extent( recvtype ) ;
+                int recvsize = (int)(recvcounts[target]*_MPI_access->extent( recvtype ));
                 checkTime( recvcounts[target] , recvtype , target , false ) ;
                 //===========================================================================
                 //TODO : it is assumed actually that we have only 1 timestep before nad after
index 7cbdb769204297e7a9d286b1ce6922c5d3f752f1..91ec6faf756e464322ebaedff089af53f5709a9c 100644 (file)
@@ -115,7 +115,7 @@ namespace MEDCoupling
           throw INTERP_KERNEL::Exception("invalid rank in set<int> argument of MPIProcessorGroup constructor");
         }
       
-    _comm_interface.groupIncl(group_world, _proc_ids.size(), ranks, &_group);
+    _comm_interface.groupIncl(group_world, (int)_proc_ids.size(), ranks, &_group);
   
     _comm_interface.commCreate(_world_comm, _group, &_comm);
 
index b7d561304f6a23d323365f41675e063039714a44..d3a930b0c933c34b83b4d1a61d5e2ba25a16c0fb 100644 (file)
@@ -52,7 +52,7 @@ namespace MEDCoupling
     \param distant_proc proc rank of the distant processor (in terms of the union group)
     \param distant_element id of the element on the distant processor
   */
-  void MxN_Mapping::addElementFromSource(int distant_proc, int distant_element)
+  void MxN_Mapping::addElementFromSource(int distant_proc, mcIdType distant_element)
   {
     _sending_ids.push_back(make_pair(distant_proc,distant_element));
     for (int i=distant_proc; i<_union_group->size(); i++)
@@ -93,12 +93,12 @@ namespace MEDCoupling
     delete[] nbrecv;
 
     _recv_ids.resize(_recv_proc_offsets[_union_group->size()]);
-    int* isendbuf=0;
-    int* irecvbuf=0;
+    mcIdType* isendbuf=0;
+    mcIdType* irecvbuf=0;
     if (_sending_ids.size()>0)
-      isendbuf = new int[_sending_ids.size()];
+      isendbuf = new mcIdType[_sending_ids.size()];
     if (_recv_ids.size()>0)  
-      irecvbuf = new int[_recv_ids.size()];
+      irecvbuf = new mcIdType[_recv_ids.size()];
     int* sendcounts = new int[_union_group->size()];
     int* senddispls=new int[_union_group->size()];
     int* recvcounts=new int[_union_group->size()];
@@ -111,14 +111,14 @@ namespace MEDCoupling
         recvdispls[i]=_recv_proc_offsets[i];
       }
     vector<int> offsets = _send_proc_offsets;
-    for (int i=0; i<(int)_sending_ids.size();i++)
+    for (std::size_t i=0; i<_sending_ids.size();i++)
       {
         int iproc = _sending_ids[i].first;
         isendbuf[offsets[iproc]]=_sending_ids[i].second;
         offsets[iproc]++;
       }
-    comm_interface.allToAllV(isendbuf, sendcounts, senddispls, MPI_INT,
-                             irecvbuf, recvcounts, recvdispls, MPI_INT,
+    comm_interface.allToAllV(isendbuf, sendcounts, senddispls, MPI_ID_TYPE,
+                             irecvbuf, recvcounts, recvdispls, MPI_ID_TYPE,
                              *comm);
                            
     for (int i=0; i< _recv_proc_offsets[_union_group->size()]; i++)
@@ -146,7 +146,7 @@ namespace MEDCoupling
     CommInterface comm_interface=_union_group->getCommInterface();
     const MPIProcessorGroup* group = static_cast<const MPIProcessorGroup*>(_union_group);
  
-    int nbcomp=field.getArray()->getNumberOfComponents();
+    int nbcomp=(int)field.getArray()->getNumberOfComponents();
     double* sendbuf=0;
     double* recvbuf=0;
     if (_sending_ids.size() >0)
@@ -190,7 +190,7 @@ namespace MEDCoupling
         break;
       case PointToPoint:
         _access_DEC->allToAllv(sendbuf, sendcounts, senddispls, MPI_DOUBLE,
-                              recvbuf, recvcounts, recvdispls, MPI_DOUBLE);
+                               recvbuf, recvcounts, recvdispls, MPI_DOUBLE);
         break;
       }
   
@@ -229,7 +229,7 @@ namespace MEDCoupling
     CommInterface comm_interface=_union_group->getCommInterface();
     const MPIProcessorGroup* group = static_cast<const MPIProcessorGroup*>(_union_group);
 
-    int nbcomp=field.getArray()->getNumberOfComponents();
+    int nbcomp=(int)field.getArray()->getNumberOfComponents();
     double* sendbuf=0;
     double* recvbuf=0;
     if (_recv_ids.size() >0)
index c19493db2f7cab8d51676591ba705388b01bd490..792a2948550bc1c6d456fee1d3ade5952b0d6b95 100644 (file)
@@ -42,14 +42,14 @@ namespace MEDCoupling
   public:
     MxN_Mapping(const ProcessorGroup& source_group, const ProcessorGroup& target_group, const DECOptions& dec_options);
     virtual ~MxN_Mapping();
-    void addElementFromSource(int distant_proc, int distant_elem);
+    void addElementFromSource(int distant_proc, mcIdType distant_elem);
     void prepareSendRecv();
     void sendRecv(MEDCouplingFieldDouble& field);
     void sendRecv(double* sendfield, MEDCouplingFieldDouble& field) const ;
     void reverseSendRecv(double* recvfield, MEDCouplingFieldDouble& field) const ;
  
     //
-    const std::vector<std::pair<int,int> >& getSendingIds() const { return _sending_ids; }
+    const std::vector<std::pair<int,mcIdType> >& getSendingIds() const { return _sending_ids; }
     const std::vector<int>& getSendProcsOffsets() const { return _send_proc_offsets; }
     void initialize();
 
@@ -58,8 +58,8 @@ namespace MEDCoupling
     ProcessorGroup* _union_group;
     MPIAccessDEC * _access_DEC;
     int _nb_comps;
-    std::vector<std::pair<int,int> > _sending_ids;
-    std::vector<int> _recv_ids;
+    std::vector<std::pair<int,mcIdType> > _sending_ids;
+    std::vector<mcIdType> _recv_ids;
     std::vector<int> _send_proc_offsets;
     std::vector<int> _recv_proc_offsets;
   };
index fe06c5290979b152e82f2d38142630ef78aa6f8f..8cf45102550460fd6ee16617613e09cc263c393a 100644 (file)
@@ -212,9 +212,9 @@ namespace MEDCoupling
   OverlapDEC::OverlapDEC(const std::set<int>& procIds, const MPI_Comm& world_comm):
       _load_balancing_algo(1),
       _own_group(true),_interpolation_matrix(0), _locator(0),
+      _default_field_value(0.0),
       _source_field(0),_own_source_field(false),
       _target_field(0),_own_target_field(false),
-      _default_field_value(0.0),
       _comm(MPI_COMM_NULL)
   {
     MEDCoupling::CommInterface comm;
@@ -222,7 +222,7 @@ namespace MEDCoupling
     std::copy(procIds.begin(),procIds.end(),ranks_world);
     MPI_Group group,world_group;
     comm.commGroup(world_comm,&world_group);
-    comm.groupIncl(world_group,procIds.size(),ranks_world,&group);
+    comm.groupIncl(world_group,(int)procIds.size(),ranks_world,&group);
     delete [] ranks_world;
     comm.commCreate(world_comm,group,&_comm);
     comm.groupFree(&group);
@@ -233,7 +233,7 @@ namespace MEDCoupling
         return ;
       }
     std::set<int> idsUnion;
-    for(std::size_t i=0;i<procIds.size();i++)
+    for(unsigned int i=0;i<procIds.size();i++)
       idsUnion.insert(i);
     _group=new MPIProcessorGroup(comm,idsUnion,_comm);
   }
@@ -296,9 +296,9 @@ namespace MEDCoupling
     for(std::vector< std::pair<int,int> >::const_iterator it=jobs.begin();it!=jobs.end();it++)
       {
         const MEDCouplingPointSet *src=_locator->getSourceMesh((*it).first);
-        const DataArrayInt *srcIds=_locator->getSourceIds((*it).first);
+        const DataArrayIdType *srcIds=_locator->getSourceIds((*it).first);
         const MEDCouplingPointSet *trg=_locator->getTargetMesh((*it).second);
-        const DataArrayInt *trgIds=_locator->getTargetIds((*it).second);
+        const DataArrayIdType *trgIds=_locator->getTargetIds((*it).second);
         _interpolation_matrix->computeLocalIntersection(src,srcIds,srcMeth,(*it).first,trg,trgIds,trgMeth,(*it).second);
       }
     _interpolation_matrix->prepare(_locator->getProcsToSendFieldData());
index 0138eec6e06e59137b5dd3e38c9e5bd74b9a0797..db769075c8a4bafab271ae746082bb90e30d0584 100644 (file)
@@ -48,8 +48,8 @@ namespace MEDCoupling
       _local_source_mesh(0),
       _local_target_mesh(0),
       _domain_bounding_boxes(0),
-      _group(group),
-      _epsAbs(epsAbs)
+      _epsAbs(epsAbs),
+      _group(group)
   { 
     if(_local_source_field)
       _local_source_mesh=_local_source_field->getSupport()->getCellMesh();
@@ -201,9 +201,9 @@ namespace MEDCoupling
           else
             {
             if(cpl.first == procID)
-              (*itMap).second = full_set[cpl.second].size();
+              (*itMap).second = (int)full_set[cpl.second].size();
             else // cpl.second == srcProcID
-              (*itMap).second = full_set[cpl.first].size();
+              (*itMap).second = (int)full_set[cpl.first].size();
             }
         }
     INTERP_KERNEL::AutoPtr<bool> proc_valid = new bool[grp_size];
@@ -216,7 +216,7 @@ namespace MEDCoupling
         int max_sz = -1, max_id = -1;
         for(itVector = full_set.begin(), procID=0; itVector != full_set.end(); itVector++, procID++)
           {
-            int sz = (*itVector).size();
+            int sz = (int)(*itVector).size();
             if (proc_valid[procID] && sz > max_sz)
               {
                 max_sz = sz;
@@ -393,7 +393,7 @@ namespace MEDCoupling
     return (*it).second;
   }
 
-  const DataArrayInt *OverlapElementLocator::getSourceIds(int procId) const
+  const DataArrayIdType *OverlapElementLocator::getSourceIds(int procId) const
   {
     int myProcId=_group.myRank();
     if(myProcId==procId)
@@ -413,7 +413,7 @@ namespace MEDCoupling
     return (*it).second;
   }
 
-  const DataArrayInt *OverlapElementLocator::getTargetIds(int procId) const
+  const DataArrayIdType *OverlapElementLocator::getTargetIds(int procId) const
   {
     int myProcId=_group.myRank();
     if(myProcId==procId)
@@ -469,7 +469,7 @@ namespace MEDCoupling
        field=_local_target_field;
      }
    AutoDAInt elems=local_mesh->getCellsInBoundingBox(distant_bb,getBoundingBoxAdjustment());
-   DataArrayInt *old2new_map;
+   DataArrayIdType *old2new_map;
    MEDCouplingPointSet *send_mesh=static_cast<MEDCouplingPointSet *>(field->getField()->buildSubMeshData(elems->begin(),elems->end(),old2new_map));
    if(sourceOrTarget)
      matrix.keepTracksOfSourceIds(procId,old2new_map);
@@ -486,7 +486,7 @@ namespace MEDCoupling
    */
   void OverlapElementLocator::receiveRemoteMeshFrom(int procId, bool sourceOrTarget)
   {
-    DataArrayInt *old2new_map=0;
+    DataArrayIdType *old2new_map=0;
     MEDCouplingPointSet *m=0;
     receiveMesh(procId,m,old2new_map);
     Proc_SrcOrTgt p(procId,sourceOrTarget);
@@ -494,57 +494,57 @@ namespace MEDCoupling
     _remote_elems[p]=old2new_map;
   }
 
-  void OverlapElementLocator::sendMesh(int procId, const MEDCouplingPointSet *mesh, const DataArrayInt *idsToSend) const
+  void OverlapElementLocator::sendMesh(int procId, const MEDCouplingPointSet *mesh, const DataArrayIdType *idsToSend) const
   {
     CommInterface comInterface=_group.getCommInterface();
 
     // First stage : exchanging sizes
     vector<double> tinyInfoLocalD;//tinyInfoLocalD not used for the moment
-    vector<int> tinyInfoLocal;
+    vector<mcIdType> tinyInfoLocal;
     vector<string> tinyInfoLocalS;
     mesh->getTinySerializationInformation(tinyInfoLocalD,tinyInfoLocal,tinyInfoLocalS);
     const MPI_Comm *comm=getCommunicator();
     //
-    int lgth[2];
-    lgth[0]=tinyInfoLocal.size();
+    mcIdType lgth[2];
+    lgth[0]=ToIdType(tinyInfoLocal.size());
     lgth[1]=idsToSend->getNbOfElems();
-    comInterface.send(&lgth,2,MPI_INT,procId,START_TAG_MESH_XCH,*_comm);
-    comInterface.send(&tinyInfoLocal[0],tinyInfoLocal.size(),MPI_INT,procId,START_TAG_MESH_XCH+1,*comm);
+    comInterface.send(&lgth,2,MPI_ID_TYPE,procId,START_TAG_MESH_XCH,*_comm);
+    comInterface.send(&tinyInfoLocal[0],(int)tinyInfoLocal.size(),MPI_ID_TYPE,procId,START_TAG_MESH_XCH+1,*comm);
     //
-    DataArrayInt *v1Local=0;
+    DataArrayIdType *v1Local=0;
     DataArrayDouble *v2Local=0;
     mesh->serialize(v1Local,v2Local);
-    comInterface.send(v1Local->getPointer(),v1Local->getNbOfElems(),MPI_INT,procId,START_TAG_MESH_XCH+2,*comm);
-    comInterface.send(v2Local->getPointer(),v2Local->getNbOfElems(),MPI_DOUBLE,procId,START_TAG_MESH_XCH+3,*comm);
+    comInterface.send(v1Local->getPointer(),(int)v1Local->getNbOfElems(),MPI_ID_TYPE,procId,START_TAG_MESH_XCH+2,*comm);
+    comInterface.send(v2Local->getPointer(),(int)v2Local->getNbOfElems(),MPI_DOUBLE,procId,START_TAG_MESH_XCH+3,*comm);
     //finished for mesh, ids now
-    comInterface.send(const_cast<int *>(idsToSend->getConstPointer()),lgth[1],MPI_INT,procId,START_TAG_MESH_XCH+4,*comm);
+    comInterface.send(const_cast<mcIdType *>(idsToSend->getConstPointer()),(int)lgth[1],MPI_ID_TYPE,procId,START_TAG_MESH_XCH+4,*comm);
     //
     v1Local->decrRef();
     v2Local->decrRef();
   }
 
-  void OverlapElementLocator::receiveMesh(int procId, MEDCouplingPointSet* &mesh, DataArrayInt *&ids) const
+  void OverlapElementLocator::receiveMesh(int procId, MEDCouplingPointSet* &mesh, DataArrayIdType *&ids) const
   {
-    int lgth[2];
+    mcIdType lgth[2];
     MPI_Status status;
     const MPI_Comm *comm=getCommunicator();
     CommInterface comInterface=_group.getCommInterface();
-    comInterface.recv(lgth,2,MPI_INT,procId,START_TAG_MESH_XCH,*_comm,&status);
-    std::vector<int> tinyInfoDistant(lgth[0]);
-    ids=DataArrayInt::New();
+    comInterface.recv(lgth,2,MPI_ID_TYPE,procId,START_TAG_MESH_XCH,*_comm,&status);
+    std::vector<mcIdType> tinyInfoDistant(lgth[0]);
+    ids=DataArrayIdType::New();
     ids->alloc(lgth[1],1);
-    comInterface.recv(&tinyInfoDistant[0],lgth[0],MPI_INT,procId,START_TAG_MESH_XCH+1,*comm,&status);
+    comInterface.recv(&tinyInfoDistant[0],(int)lgth[0],MPI_ID_TYPE,procId,START_TAG_MESH_XCH+1,*comm,&status);
     mesh=MEDCouplingPointSet::BuildInstanceFromMeshType((MEDCouplingMeshType)tinyInfoDistant[0]);
     std::vector<std::string> unusedTinyDistantSts;
     vector<double> tinyInfoDistantD(1);//tinyInfoDistantD not used for the moment
-    DataArrayInt *v1Distant=DataArrayInt::New();
+    DataArrayIdType *v1Distant=DataArrayIdType::New();
     DataArrayDouble *v2Distant=DataArrayDouble::New();
     mesh->resizeForUnserialization(tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
-    comInterface.recv(v1Distant->getPointer(),v1Distant->getNbOfElems(),MPI_INT,procId,START_TAG_MESH_XCH+2,*comm,&status);
-    comInterface.recv(v2Distant->getPointer(),v2Distant->getNbOfElems(),MPI_DOUBLE,procId,START_TAG_MESH_XCH+3,*comm,&status);
+    comInterface.recv(v1Distant->getPointer(),(int)v1Distant->getNbOfElems(),MPI_ID_TYPE,procId,START_TAG_MESH_XCH+2,*comm,&status);
+    comInterface.recv(v2Distant->getPointer(),(int)v2Distant->getNbOfElems(),MPI_DOUBLE,procId,START_TAG_MESH_XCH+3,*comm,&status);
     mesh->unserialization(tinyInfoDistantD,tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
     //finished for mesh, ids now
-    comInterface.recv(ids->getPointer(),lgth[1],MPI_INT,procId,1144,*comm,&status);
+    comInterface.recv(ids->getPointer(),(int)lgth[1],MPI_ID_TYPE,procId,1144,*comm,&status);
     //
     v1Distant->decrRef();
     v2Distant->decrRef();
index fff82010fee63fed1b226684d4f2b90bfea4f3d6..59232d3ad18561c773ac4080f9f1d8d854842f4d 100644 (file)
@@ -55,9 +55,9 @@ namespace MEDCoupling
     std::string getSourceMethod() const;
     std::string getTargetMethod() const;
     const MEDCouplingPointSet *getSourceMesh(int procId) const;
-    const DataArrayInt *getSourceIds(int procId) const;
+    const DataArrayIdType *getSourceIds(int procId) const;
     const MEDCouplingPointSet *getTargetMesh(int procId) const;
-    const DataArrayInt *getTargetIds(int procId) const;
+    const DataArrayIdType *getTargetIds(int procId) const;
     bool isInMyTodoList(int i, int j) const;
     void debugPrintWorkSharing(std::ostream & ostr) const;
   private:
@@ -68,11 +68,11 @@ namespace MEDCoupling
     bool intersectsBoundingBox(int i, int j) const;
     void sendLocalMeshTo(int procId, bool sourceOrTarget, OverlapInterpolationMatrix& matrix) const;
     void receiveRemoteMeshFrom(int procId, bool sourceOrTarget);
-    void sendMesh(int procId, const MEDCouplingPointSet *mesh, const DataArrayInt *idsToSend) const;
-    void receiveMesh(int procId, MEDCouplingPointSet* &mesh, DataArrayInt *&ids) const;
+    void sendMesh(int procId, const MEDCouplingPointSet *mesh, const DataArrayIdType *idsToSend) const;
+    void receiveMesh(int procId, MEDCouplingPointSet* &mesh, DataArrayIdType *&ids) const;
   private:
     typedef MCAuto< MEDCouplingPointSet >  AutoMCPointSet;
-    typedef MCAuto< DataArrayInt >         AutoDAInt;
+    typedef MCAuto< DataArrayIdType >      AutoDAInt;
     typedef std::pair<int,bool>  Proc_SrcOrTgt;  // a key indicating a proc ID and whether the data is for source mesh/field or target mesh/field
 
     static const int START_TAG_MESH_XCH;
index 5e03f9d6a42f2755c4911ccc590c70f1391cebcc..3f5479f3abecde130b360c060ade209922e8f0d1 100644 (file)
@@ -61,12 +61,12 @@ namespace MEDCoupling
   {
   }
 
-  void OverlapInterpolationMatrix::keepTracksOfSourceIds(int procId, DataArrayInt *ids)
+  void OverlapInterpolationMatrix::keepTracksOfSourceIds(int procId, DataArrayIdType *ids)
   {
     _mapping.keepTracksOfSourceIds(procId,ids);
   }
 
-  void OverlapInterpolationMatrix::keepTracksOfTargetIds(int procId, DataArrayInt *ids)
+  void OverlapInterpolationMatrix::keepTracksOfTargetIds(int procId, DataArrayIdType *ids)
   {
     _mapping.keepTracksOfTargetIds(procId,ids);
   }
@@ -84,14 +84,14 @@ namespace MEDCoupling
    *
    * One of the 2 is necessarily null (the two can be null together)
    */
-  void OverlapInterpolationMatrix::computeLocalIntersection(const MEDCouplingPointSet *src, const DataArrayInt *srcIds, const std::string& srcMeth, int srcProcId,
-                                                   const MEDCouplingPointSet *trg, const DataArrayInt *trgIds, const std::string& trgMeth, int trgProcId)
+  void OverlapInterpolationMatrix::computeLocalIntersection(const MEDCouplingPointSet *src, const DataArrayIdType *srcIds, const std::string& srcMeth, int srcProcId,
+                                                   const MEDCouplingPointSet *trg, const DataArrayIdType *trgIds, const std::string& trgMeth, int trgProcId)
   {
     std::string interpMethod(srcMeth);
     interpMethod+=trgMeth;
     //creating the interpolator structure
     vector<SparseDoubleVec > sparse_matrix_part;
-    int colSize=0;
+    mcIdType colSize=0;
     //computation of the intersection volumes between source and target elements
     const MEDCouplingUMesh *trgC=dynamic_cast<const MEDCouplingUMesh *>(trg);
     const MEDCouplingUMesh *srcC=dynamic_cast<const MEDCouplingUMesh *>(src);
@@ -160,7 +160,7 @@ namespace MEDCoupling
         vector<SparseDoubleVec > matrixTranspose;
         colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,sparse_matrix_part,interpMethod);//not a bug target in source.
         TransposeMatrix(matrixTranspose,colSize,sparse_matrix_part);
-        colSize=matrixTranspose.size();
+        colSize=ToIdType(matrixTranspose.size());
       }
     else if ( src->getMeshDimension() == 1 && trg->getMeshDimension() == 2
               && trg->getSpaceDimension() == 2 && src->getSpaceDimension() == 2 )
@@ -181,7 +181,7 @@ namespace MEDCoupling
         vector<SparseDoubleVec > matrixTranspose;
         colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,matrixTranspose,interpMethod);//not a bug target in source.
         TransposeMatrix(matrixTranspose,colSize,sparse_matrix_part);
-        colSize=matrixTranspose.size();
+        colSize=ToIdType(matrixTranspose.size());
       }
     else if (trg->getMeshDimension() != _source_support->getMeshDimension())
       {
@@ -291,7 +291,7 @@ namespace MEDCoupling
   }
   
   void OverlapInterpolationMatrix::TransposeMatrix(const std::vector<SparseDoubleVec >& matIn,
-                                                   int nbColsMatIn, std::vector<SparseDoubleVec >& matOut)
+                                                   mcIdType nbColsMatIn, std::vector<SparseDoubleVec >& matOut)
   {
     matOut.resize(nbColsMatIn);
     int id=0;
index 89715ec74517f223e5d95f3248ea2d2f2ff1f543..44945a79d38c4a734f4b34482e3a549d96992f50 100644 (file)
@@ -48,12 +48,12 @@ namespace MEDCoupling
                                const InterpolationOptions& i_opt,
                                const OverlapElementLocator & loc);
 
-    void keepTracksOfSourceIds(int procId, DataArrayInt *ids);
+    void keepTracksOfSourceIds(int procId, DataArrayIdType *ids);
 
-    void keepTracksOfTargetIds(int procId, DataArrayInt *ids);
+    void keepTracksOfTargetIds(int procId, DataArrayIdType *ids);
 
-    void computeLocalIntersection(const MEDCouplingPointSet *src, const DataArrayInt *srcIds, const std::string& srcMeth, int srcProcId,
-                         const MEDCouplingPointSet *trg, const DataArrayInt *trgIds, const std::string& trgMeth, int trgProcId);
+    void computeLocalIntersection(const MEDCouplingPointSet *src, const DataArrayIdType *srcIds, const std::string& srcMeth, int srcProcId,
+                         const MEDCouplingPointSet *trg, const DataArrayIdType *trgIds, const std::string& trgMeth, int trgProcId);
 
     void prepare(const std::vector< int > & procsToSendField);
     
@@ -66,7 +66,7 @@ namespace MEDCoupling
     virtual ~OverlapInterpolationMatrix();
   private:
 
-    static void TransposeMatrix(const std::vector<SparseDoubleVec>& matIn, int nbColsMatIn,
+    static void TransposeMatrix(const std::vector<SparseDoubleVec>& matIn, mcIdType nbColsMatIn,
                                 std::vector<SparseDoubleVec>& matOut);
   private:
     ParaFIELD           *_source_field;
index 3a68b78e6d610dbf33911afdb62a57f6c9c0ad35..b9aa4be122aab6912b30335894d2326706b38f64 100644 (file)
@@ -39,7 +39,7 @@ OverlapMapping::OverlapMapping(const ProcessorGroup& group, const OverlapElement
 /*!
  * Keeps the link between a given a proc holding source mesh data, and the corresponding cell IDs.
  */
-void OverlapMapping::keepTracksOfSourceIds(int procId, DataArrayInt *ids)
+void OverlapMapping::keepTracksOfSourceIds(int procId, DataArrayIdType *ids)
 {
   ids->incrRef();
   _sent_src_ids[procId] = ids;
@@ -48,7 +48,7 @@ void OverlapMapping::keepTracksOfSourceIds(int procId, DataArrayInt *ids)
 /*!
  * Same as keepTracksOfSourceIds() but for target mesh data.
 */
-void OverlapMapping::keepTracksOfTargetIds(int procId, DataArrayInt *ids)
+void OverlapMapping::keepTracksOfTargetIds(int procId, DataArrayIdType *ids)
 {
   ids->incrRef();
   _sent_trg_ids[procId] = ids;
@@ -64,7 +64,7 @@ void OverlapMapping::keepTracksOfTargetIds(int procId, DataArrayInt *ids)
  *
  * One of the 2 is necessarily null (the two can be null together)
  */
-void OverlapMapping::addContributionST(const std::vector< SparseDoubleVec >& matrixST, const DataArrayInt *srcIds, int srcProcId, const DataArrayInt *trgIds, int trgProcId)
+void OverlapMapping::addContributionST(const std::vector< SparseDoubleVec >& matrixST, const DataArrayIdType *srcIds, int srcProcId, const DataArrayIdType *trgIds, int trgProcId)
 {
   _matrixes_st.push_back(matrixST);
   _source_proc_id_st.push_back(srcProcId);
@@ -73,12 +73,12 @@ void OverlapMapping::addContributionST(const std::vector< SparseDoubleVec >& mat
       _nb_of_rcv_src_ids[srcProcId] = srcIds->getNumberOfTuples();
   else        // source mesh part is local
     {
-      std::set<int> s;
+      std::set<mcIdType> s;
       // For all source IDs (=col indices) in the sparse matrix:
       for(std::vector< SparseDoubleVec >::const_iterator it1=matrixST.begin();it1!=matrixST.end();it1++)
         for(SparseDoubleVec::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
           s.insert((*it2).first);
-      vector<int> v(s.begin(), s.end());  // turn set into vector
+      vector<mcIdType> v(s.begin(), s.end());  // turn set into vector
       _src_ids_zip_comp[trgProcId] = v;
     }
 }
@@ -91,7 +91,7 @@ void OverlapMapping::addContributionST(const std::vector< SparseDoubleVec >& mat
  *
  * After the call of this method, 'this' contains the matrixST for all source cells of the current proc
  */
-void OverlapMapping::prepare(const std::vector< int >& procsToSendField, int nbOfTrgElems)
+void OverlapMapping::prepare(const std::vector< int >& procsToSendField, mcIdType nbOfTrgElems)
 {
 #ifdef DEC_DEBUG
   printMatrixesST();
@@ -100,45 +100,45 @@ void OverlapMapping::prepare(const std::vector< int >& procsToSendField, int nbO
   CommInterface commInterface=_group.getCommInterface();
   const MPIProcessorGroup *group=static_cast<const MPIProcessorGroup*>(&_group);
   const MPI_Comm *comm=group->getComm();
-  int grpSize=_group.size();
-  INTERP_KERNEL::AutoPtr<int> nbsend=new int[grpSize];
+  std::size_t grpSize=_group.size();
+  INTERP_KERNEL::AutoPtr<mcIdType> nbsend=new mcIdType[grpSize];
   INTERP_KERNEL::AutoPtr<int> nbsend2=new int[grpSize];
   INTERP_KERNEL::AutoPtr<int> nbsend3=new int[grpSize];
-  std::fill<int *>(nbsend,nbsend+grpSize,0);
+  std::fill<mcIdType *>(nbsend,nbsend+grpSize,0);
   int myProcId=_group.myRank();
   for(std::size_t i=0;i<_matrixes_st.size();i++)
     if(_source_proc_id_st[i]==myProcId)
-      nbsend[_target_proc_id_st[i]]=_matrixes_st[i].size();
-  INTERP_KERNEL::AutoPtr<int> nbrecv=new int[grpSize];
-  commInterface.allToAll(nbsend,1,MPI_INT,nbrecv,1,MPI_INT,*comm);
+      nbsend[_target_proc_id_st[i]]=(int)_matrixes_st[i].size();
+  INTERP_KERNEL::AutoPtr<mcIdType> nbrecv=new mcIdType[grpSize];
+  commInterface.allToAll(nbsend,1,MPI_ID_TYPE,nbrecv,1,MPI_ID_TYPE,*comm);
   //exchanging matrix
   //first exchanging offsets+ids_source
   INTERP_KERNEL::AutoPtr<int> nbrecv1=new int[grpSize];
   INTERP_KERNEL::AutoPtr<int> nbrecv2=new int[grpSize];
   //
-  int *tmp=0;
+  mcIdType *tmp=0;
   serializeMatrixStep0ST(nbrecv,
                          tmp,nbsend2,nbsend3,
                          nbrecv1,nbrecv2);
-  INTERP_KERNEL::AutoPtr<int> bigArr=tmp;
-  INTERP_KERNEL::AutoPtr<int> bigArrRecv=new int[nbrecv2[grpSize-1]+nbrecv1[grpSize-1]];
-  commInterface.allToAllV(bigArr,nbsend2,nbsend3,MPI_INT,
-                          bigArrRecv,nbrecv1,nbrecv2,MPI_INT,
+  INTERP_KERNEL::AutoPtr<mcIdType> bigArr=tmp;
+  INTERP_KERNEL::AutoPtr<mcIdType> bigArrRecv=new mcIdType[nbrecv2[grpSize-1]+nbrecv1[grpSize-1]];
+  commInterface.allToAllV(bigArr,nbsend2,nbsend3,MPI_ID_TYPE,
+                          bigArrRecv,nbrecv1,nbrecv2,MPI_ID_TYPE,
                           *comm);// sending ids of sparse matrix (n+1 elems)
   //second phase echange target ids
   std::fill<int *>(nbsend2,nbsend2+grpSize,0);
   INTERP_KERNEL::AutoPtr<int> nbrecv3=new int[grpSize];
   INTERP_KERNEL::AutoPtr<int> nbrecv4=new int[grpSize];
   double *tmp2=0;
-  int lgthOfArr=serializeMatrixStep1ST(nbrecv,bigArrRecv,nbrecv1,nbrecv2,
+  mcIdType lgthOfArr=serializeMatrixStep1ST(nbrecv,bigArrRecv,nbrecv1,nbrecv2,
                                        tmp,tmp2,
                                        nbsend2,nbsend3,nbrecv3,nbrecv4);
-  INTERP_KERNEL::AutoPtr<int> bigArr2=tmp;
+  INTERP_KERNEL::AutoPtr<mcIdType> bigArr2=tmp;
   INTERP_KERNEL::AutoPtr<double> bigArrD2=tmp2;
-  INTERP_KERNEL::AutoPtr<int> bigArrRecv2=new int[lgthOfArr];
+  INTERP_KERNEL::AutoPtr<mcIdType> bigArrRecv2=new mcIdType[lgthOfArr];
   INTERP_KERNEL::AutoPtr<double> bigArrDRecv2=new double[lgthOfArr];
-  commInterface.allToAllV(bigArr2,nbsend2,nbsend3,MPI_INT,
-                          bigArrRecv2,nbrecv3,nbrecv4,MPI_INT,
+  commInterface.allToAllV(bigArr2,nbsend2,nbsend3,MPI_ID_TYPE,
+                          bigArrRecv2,nbrecv3,nbrecv4,MPI_ID_TYPE,
                           *comm);
   commInterface.allToAllV(bigArrD2,nbsend2,nbsend3,MPI_DOUBLE,
                           bigArrDRecv2,nbrecv3,nbrecv4,MPI_DOUBLE,
@@ -238,7 +238,7 @@ void OverlapMapping::computeDenoRevIntegral(const DataArrayDouble & targetAreas)
 /*!
  * Compute denominators for ConvervativeVolumic interp.
  */
-void OverlapMapping::computeDenoConservativeVolumic(int nbOfTuplesTrg)
+void OverlapMapping::computeDenoConservativeVolumic(mcIdType nbOfTuplesTrg)
 {
   int myProcId=_group.myRank();
   //
@@ -251,8 +251,8 @@ void OverlapMapping::computeDenoConservativeVolumic(int nbOfTuplesTrg)
     {
       const std::vector< SparseDoubleVec >& mat=_the_matrix_st[i];
       int curSrcId=_the_matrix_st_source_proc_id[i];
-      map < int, MCAuto<DataArrayInt> >::const_iterator isItem1 = _sent_trg_ids.find(curSrcId);
-      int rowId=0;
+      map < int, MCAuto<DataArrayIdType> >::const_iterator isItem1 = _sent_trg_ids.find(curSrcId);
+      mcIdType rowId=0;
       if(isItem1==_sent_trg_ids.end() || curSrcId==myProcId) // Local computation: simple, because rowId of mat are directly target cell ids.
         {
           for(std::vector< SparseDoubleVec >::const_iterator it1=mat.begin();it1!=mat.end();it1++,rowId++)
@@ -261,8 +261,8 @@ void OverlapMapping::computeDenoConservativeVolumic(int nbOfTuplesTrg)
         }
       else  // matrix was received, remote computation
         {
-          const DataArrayInt *trgIds = (*isItem1).second;
-          const int *trgIds2=trgIds->getConstPointer();
+          const DataArrayIdType *trgIds = (*isItem1).second;
+          const mcIdType *trgIds2=trgIds->getConstPointer();
           for(std::vector< SparseDoubleVec >::const_iterator it1=mat.begin();it1!=mat.end();it1++,rowId++)
             for(SparseDoubleVec::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
               deno[trgIds2[rowId]]+=(*it2).second;
@@ -271,23 +271,23 @@ void OverlapMapping::computeDenoConservativeVolumic(int nbOfTuplesTrg)
   // Broadcast the vector into a structure similar to the initial sparse matrix of numerators:
   for(std::size_t i=0;i<sz1;i++)
     {
-      int rowId=0;
+      mcIdType rowId=0;
       const std::vector< SparseDoubleVec >& mat=_the_matrix_st[i];
       int curSrcId=_the_matrix_st_source_proc_id[i];
-      map < int, MCAuto<DataArrayInt> >::const_iterator isItem1 = _sent_trg_ids.find(curSrcId);
+      map < int, MCAuto<DataArrayIdType> >::const_iterator isItem1 = _sent_trg_ids.find(curSrcId);
       std::vector< SparseDoubleVec >& denoM=_the_deno_st[i];
       denoM.resize(mat.size());
       if(isItem1==_sent_trg_ids.end() || curSrcId==myProcId)//item1 of step2 main algo. Simple, because rowId of mat are directly target ids.
         {
-          int rowId=0;
+          mcIdType rowId=0;
           for(std::vector< SparseDoubleVec >::const_iterator it1=mat.begin();it1!=mat.end();it1++,rowId++)
             for(SparseDoubleVec::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
               denoM[rowId][(*it2).first]=deno[rowId];
         }
       else
         {
-          const DataArrayInt *trgIds = (*isItem1).second;
-          const int *trgIds2=trgIds->getConstPointer();
+          const DataArrayIdType *trgIds = (*isItem1).second;
+          const mcIdType *trgIds2=trgIds->getConstPointer();
           for(std::vector< SparseDoubleVec >::const_iterator it1=mat.begin();it1!=mat.end();it1++,rowId++)
             for(SparseDoubleVec::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
               denoM[rowId][(*it2).first]=deno[trgIds2[rowId]];
@@ -302,43 +302,43 @@ void OverlapMapping::computeDenoConservativeVolumic(int nbOfTuplesTrg)
  * \param offsets tells for a proc i where to start serialize#0 matrix. size equal to _group.size().
  * \param nbOfElemsSrc of size _group.size(). Comes from previous all2all call. tells how many srcIds per proc contains matrix for current proc.
  */
-void OverlapMapping::serializeMatrixStep0ST(const int *nbOfElemsSrc, int *&bigArr, int *count, int *offsets,
+void OverlapMapping::serializeMatrixStep0ST(const mcIdType *nbOfElemsSrc, mcIdType *&bigArr, int *count, int *offsets,
                                             int *countForRecv, int *offsetsForRecv) const
 {
-  int grpSize=_group.size();
+  std::size_t grpSize=_group.size();
   std::fill<int *>(count,count+grpSize,0);
-  int szz=0;
+  std::size_t szz=0;
   int myProcId=_group.myRank();
   for(std::size_t i=0;i<_matrixes_st.size();i++)
     {
       if(_source_proc_id_st[i]==myProcId)// && _target_proc_id_st[i]!=myProcId
         {
-          count[_target_proc_id_st[i]]=_matrixes_st[i].size()+1;
+          count[_target_proc_id_st[i]]=(int)_matrixes_st[i].size()+1;
           szz+=_matrixes_st[i].size()+1;
         }
     }
-  bigArr=new int[szz];
+  bigArr=new mcIdType[szz];
   offsets[0]=0;
-  for(int i=1;i<grpSize;i++)
+  for(std::size_t i=1;i<grpSize;i++)
     offsets[i]=offsets[i-1]+count[i-1];
   for(std::size_t i=0;i<_matrixes_st.size();i++)
     {
       if(_source_proc_id_st[i]==myProcId)
         {
-          int start=offsets[_target_proc_id_st[i]];
-          int *work=bigArr+start;
+          mcIdType start=offsets[_target_proc_id_st[i]];
+          mcIdType *work=bigArr+start;
           *work=0;
           const std::vector< SparseDoubleVec >& mat=_matrixes_st[i];
           for(std::vector< SparseDoubleVec >::const_iterator it=mat.begin();it!=mat.end();it++,work++)
-            work[1]=work[0]+(*it).size();
+            work[1]=work[0]+ToIdType((*it).size());
         }
     }
   //
   offsetsForRecv[0]=0;
-  for(int i=0;i<grpSize;i++)
+  for(std::size_t i=0;i<grpSize;i++)
     {
       if(nbOfElemsSrc[i]>0)
-        countForRecv[i]=nbOfElemsSrc[i]+1;
+        countForRecv[i]=(int)nbOfElemsSrc[i]+1;
       else
         countForRecv[i]=0;
       if(i>0)
@@ -350,18 +350,18 @@ void OverlapMapping::serializeMatrixStep0ST(const int *nbOfElemsSrc, int *&bigAr
  * This method performs step#1 and step#2/3. It returns the size of expected array to get allToAllV.
  * It is where the locally computed matrices are serialized to be sent to adequate final proc.
  */
-int OverlapMapping::serializeMatrixStep1ST(const int *nbOfElemsSrc, const int *recvStep0, const int *countStep0, const int *offsStep0,
-                                           int *&bigArrI, double *&bigArrD, int *count, int *offsets,
+mcIdType OverlapMapping::serializeMatrixStep1ST(const mcIdType *nbOfElemsSrc, const mcIdType *recvStep0, const int *countStep0, const int *offsStep0,
+                                           mcIdType *&bigArrI, double *&bigArrD, int *count, int *offsets,
                                            int *countForRecv, int *offsForRecv) const
 {
-  int grpSize=_group.size();
+  std::size_t grpSize=_group.size();
   int myProcId=_group.myRank();
   offsForRecv[0]=0;
-  int szz=0;
-  for(int i=0;i<grpSize;i++)
+  mcIdType szz=0;
+  for(std::size_t i=0;i<grpSize;i++)
     {
       if(nbOfElemsSrc[i]!=0)
-        countForRecv[i]=recvStep0[offsStep0[i]+nbOfElemsSrc[i]];
+        countForRecv[i]=(int)recvStep0[offsStep0[i]+nbOfElemsSrc[i]];
       else
         countForRecv[i]=0;
       szz+=countForRecv[i];
@@ -371,23 +371,23 @@ int OverlapMapping::serializeMatrixStep1ST(const int *nbOfElemsSrc, const int *r
   //
   std::fill(count,count+grpSize,0);
   offsets[0]=0;
-  int fullLgth=0;
+  std::size_t fullLgth=0;
   for(std::size_t i=0;i<_matrixes_st.size();i++)
     {
       if(_source_proc_id_st[i]==myProcId)
         {
           const std::vector< SparseDoubleVec >& mat=_matrixes_st[i];
-          int lgthToSend=0;
+          mcIdType lgthToSend=0;
           for(std::vector< SparseDoubleVec >::const_iterator it=mat.begin();it!=mat.end();it++)
-            lgthToSend+=(*it).size();
-          count[_target_proc_id_st[i]]=lgthToSend;
+            lgthToSend+=ToIdType((*it).size());
+          count[_target_proc_id_st[i]]=(int)lgthToSend;
           fullLgth+=lgthToSend;
         }
     }
-  for(int i=1;i<grpSize;i++)
+  for(std::size_t i=1;i<grpSize;i++)
     offsets[i]=offsets[i-1]+count[i-1];
   //
-  bigArrI=new int[fullLgth];
+  bigArrI=new mcIdType[fullLgth];
   bigArrD=new double[fullLgth];
   // feeding arrays
   fullLgth=0;
@@ -398,7 +398,7 @@ int OverlapMapping::serializeMatrixStep1ST(const int *nbOfElemsSrc, const int *r
           const std::vector< SparseDoubleVec >& mat=_matrixes_st[i];
           for(std::vector< SparseDoubleVec >::const_iterator it1=mat.begin();it1!=mat.end();it1++)
             {
-              int j=0;
+              mcIdType j=0;
               for(SparseDoubleVec::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++,j++)
                 {
                   bigArrI[fullLgth+j]=(*it2).first;
@@ -418,31 +418,31 @@ int OverlapMapping::serializeMatrixStep1ST(const int *nbOfElemsSrc, const int *r
  *      - The second is the pseudo id of source proc (correspondence with true id is in attribute _the_matrix_st_source_proc_id and _the_matrix_st_source_ids)
  *      - the third is the srcId in the pseudo source proc
  */
-void OverlapMapping::unserializationST(int nbOfTrgElems,
-                                       const int *nbOfElemsSrcPerProc,//first all2all
-                                       const int *bigArrRecv, const int *bigArrRecvCounts, const int *bigArrRecvOffs,//2nd all2all
-                                       const int *bigArrRecv2, const double *bigArrDRecv2, const int *bigArrRecv2Count, const int *bigArrRecv2Offs)//3rd and 4th all2alls
+void OverlapMapping::unserializationST(mcIdType nbOfTrgElems,
+                                       const mcIdType *nbOfElemsSrcPerProc,//first all2all
+                                       const mcIdType *bigArrRecv, const int *bigArrRecvCounts, const int *bigArrRecvOffs,//2nd all2all
+                                       const mcIdType *bigArrRecv2, const double *bigArrDRecv2, const int *bigArrRecv2Count, const int *bigArrRecv2Offs)//3rd and 4th all2alls
 {
   _the_matrix_st.clear();
   _the_matrix_st_source_proc_id.clear();
   //
-  int grpSize=_group.size();
-  for(int i=0;i<grpSize;i++)
+  std::size_t grpSize=_group.size();
+  for(unsigned int i=0;i<grpSize;i++)
     if(nbOfElemsSrcPerProc[i]!=0)
       _the_matrix_st_source_proc_id.push_back(i);
-  int nbOfPseudoProcs=_the_matrix_st_source_proc_id.size();//_the_matrix_st_target_proc_id.size() contains number of matrix fetched remotely whose sourceProcId==myProcId
+  std::size_t nbOfPseudoProcs=_the_matrix_st_source_proc_id.size();//_the_matrix_st_target_proc_id.size() contains number of matrix fetched remotely whose sourceProcId==myProcId
   _the_matrix_st.resize(nbOfPseudoProcs);
   //
-  int j=0;
-  for(int i=0;i<grpSize;i++)
+  std::size_t j=0;
+  for(std::size_t i=0;i<grpSize;i++)
     if(nbOfElemsSrcPerProc[i]!=0)
       {
         _the_matrix_st[j].resize(nbOfElemsSrcPerProc[i]);
-        for(int k=0;k<nbOfElemsSrcPerProc[i];k++)
+        for(mcIdType k=0;k<nbOfElemsSrcPerProc[i];k++)
           {
-            int offs=bigArrRecv[bigArrRecvOffs[i]+k];
-            int lgthOfMap=bigArrRecv[bigArrRecvOffs[i]+k+1]-offs;
-            for(int l=0;l<lgthOfMap;l++)
+            mcIdType offs=bigArrRecv[bigArrRecvOffs[i]+k];
+            mcIdType lgthOfMap=bigArrRecv[bigArrRecvOffs[i]+k+1]-offs;
+            for(mcIdType l=0;l<lgthOfMap;l++)
               _the_matrix_st[j][k][bigArrRecv2[bigArrRecv2Offs[i]+offs+l]]=bigArrDRecv2[bigArrRecv2Offs[i]+offs+l];
           }
         j++;
@@ -458,18 +458,18 @@ void OverlapMapping::unserializationST(int nbOfTrgElems,
 void OverlapMapping::finishToFillFinalMatrixST()
 {
   int myProcId=_group.myRank();
-  int sz=_matrixes_st.size();
+  std::size_t sz=_matrixes_st.size();
   int nbOfEntryToAdd=0;
-  for(int i=0;i<sz;i++)
+  for(std::size_t i=0;i<sz;i++)
     if(_source_proc_id_st[i]!=myProcId)
       nbOfEntryToAdd++;
   if(nbOfEntryToAdd==0)
     return ;
-  int oldNbOfEntry=_the_matrix_st.size();
-  int newNbOfEntry=oldNbOfEntry+nbOfEntryToAdd;
+  std::size_t oldNbOfEntry=_the_matrix_st.size();
+  std::size_t newNbOfEntry=oldNbOfEntry+nbOfEntryToAdd;
   _the_matrix_st.resize(newNbOfEntry);
-  int j=oldNbOfEntry;
-  for(int i=0;i<sz;i++)
+  std::size_t j=oldNbOfEntry;
+  for(std::size_t i=0;i<sz;i++)
     if(_source_proc_id_st[i]!=myProcId)
       {
         const std::vector<SparseDoubleVec >& mat=_matrixes_st[i];
@@ -488,7 +488,7 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
 {
   using namespace std;
 
-  int nbOfCompo=fieldInput->getNumberOfComponents();//to improve same number of components to test
+  std::size_t nbOfCompo=fieldInput->getNumberOfComponents();//to improve same number of components to test
   CommInterface commInterface=_group.getCommInterface();
   const MPIProcessorGroup *group=static_cast<const MPIProcessorGroup*>(&_group);
   const MPI_Comm *comm=group->getComm();
@@ -530,21 +530,21 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
             MCAuto<DataArrayDouble> vals;
             if(_locator.isInMyTodoList(myProcID, procID))
               {
-                map<int, vector<int> >::const_iterator isItem11 = _src_ids_zip_comp.find(procID);
+                map<int, vector<mcIdType> >::const_iterator isItem11 = _src_ids_zip_comp.find(procID);
                 if (isItem11 == _src_ids_zip_comp.end())
                   throw INTERP_KERNEL::Exception("OverlapMapping::multiply(): internal error: SEND: unexpected end iterator in _src_ids_zip_comp!");
-                const vector<int> & v = (*isItem11).second;
-                int sz = v.size();
+                const vector<mcIdType> & v = (*isItem11).second;
+                std::size_t sz = v.size();
                 vals=fieldInput->getArray()->selectByTupleId(&(v[0]),&(v[0])+sz);
               }
             else
               {
-                map < int, MCAuto<DataArrayInt> >::const_iterator isItem11 = _sent_src_ids.find( procID );
+                map < int, MCAuto<DataArrayIdType> >::const_iterator isItem11 = _sent_src_ids.find( procID );
                 if (isItem11 == _sent_src_ids.end())
                   throw INTERP_KERNEL::Exception("OverlapMapping::multiply(): internal error: SEND: unexpected end iterator in _sent_src_ids!");
                 vals=fieldInput->getArray()->selectByTupleId(*(*isItem11).second);
               }
-            nbsend[procID] = vals->getNbOfElems();
+            nbsend[procID] = (int)vals->getNbOfElems();
             valsToSend.insert(valsToSend.end(),vals->getConstPointer(),vals->getConstPointer()+nbsend[procID]);
           }
 
@@ -566,17 +566,17 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
           {
             if(_locator.isInMyTodoList(procID, myProcID))
               {
-                map <int,int>::const_iterator isItem11 = _nb_of_rcv_src_ids.find(procID);
+                map <int,mcIdType>::const_iterator isItem11 = _nb_of_rcv_src_ids.find(procID);
                 if (isItem11 == _nb_of_rcv_src_ids.end())
                   throw INTERP_KERNEL::Exception("OverlapMapping::multiply(): internal error: RCV: unexpected end iterator in _nb_of_rcv_src_ids!");
-                nbrecv[procID] = (*isItem11).second;
+                nbrecv[procID] = (int)((*isItem11).second);
               }
             else
               {
-                map<int, vector<int> >::const_iterator isItem11 = _src_ids_zip_recv.find(procID);
+                map<int, vector<mcIdType> >::const_iterator isItem11 = _src_ids_zip_recv.find(procID);
                 if (isItem11 == _src_ids_zip_recv.end())
                   throw INTERP_KERNEL::Exception("OverlapMapping::multiply(): internal error: RCV: unexpected end iterator in _src_ids_zip_recv!");
-                nbrecv[procID] = (*isItem11).second.size()*nbOfCompo;
+                nbrecv[procID] = (int)((*isItem11).second.size()*nbOfCompo);
               }
           }
     }
@@ -624,7 +624,7 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
   // For each source processor corresponding to a locally held matrix:
     {
       int srcProcID = *itProc;
-      int id = distance(_the_matrix_st_source_proc_id.begin(),itProc);
+      std::size_t id = std::distance(_the_matrix_st_source_proc_id.begin(),itProc);
       const vector< SparseDoubleVec >& mat =_the_matrix_st[id];
       const vector< SparseDoubleVec >& deno = _the_deno_st[id];
 
@@ -636,9 +636,9 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
        */
       if (srcProcID == myProcID)
         {
-          int nbOfTrgTuples=mat.size();
+          std::size_t nbOfTrgTuples=mat.size();
           double * targetBase = fieldOutput->getArray()->getPointer();
-          for(int j=0; j<nbOfTrgTuples; j++)
+          for(std::size_t j=0; j<nbOfTrgTuples; j++)
             {
               const SparseDoubleVec& mat1=mat[j];
               const SparseDoubleVec& deno1=deno[j];
@@ -677,23 +677,24 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
       if(!_locator.isInMyTodoList(srcProcID, myProcID))
         {
           // invert _src_ids_zip_recv
-          map<int,int> revert_zip;
-          map<int, vector<int> >::const_iterator it11= _src_ids_zip_recv.find(srcProcID);
+          map<mcIdType,int> revert_zip;
+          map<int, vector<mcIdType> >::const_iterator it11= _src_ids_zip_recv.find(srcProcID);
           if (it11 == _src_ids_zip_recv.end())
             throw INTERP_KERNEL::Exception("OverlapMapping::multiply(): internal error: MULTIPLY: unexpected end iterator in _src_ids_zip_recv!");
-          const vector<int> & vec = (*it11).second;
+
+          const vector<mcIdType> & vec = (*it11).second;
           int newId=0;
-          for(vector<int>::const_iterator it=vec.begin();it!=vec.end();it++,newId++)
+          for(vector<mcIdType>::const_iterator it=vec.begin();it!=vec.end();it++,newId++)
             revert_zip[*it]=newId;
-          map < int, MCAuto<DataArrayInt> >::const_iterator isItem24 = _sent_trg_ids.find(srcProcID);
+          map < int, MCAuto<DataArrayIdType> >::const_iterator isItem24 = _sent_trg_ids.find(srcProcID);
           if (isItem24 == _sent_trg_ids.end())
             throw INTERP_KERNEL::Exception("OverlapMapping::multiply(): internal error: MULTIPLY: unexpected end iterator in _sent_trg_ids!");
-          const DataArrayInt *tgrIdsDA = (*isItem24).second;
-          const int *tgrIds = tgrIdsDA->getConstPointer();
+          const DataArrayIdType *tgrIdsDA = (*isItem24).second;
+          const mcIdType *tgrIds = tgrIdsDA->getConstPointer();
 
-          int nbOfTrgTuples=mat.size();
+          std::size_t nbOfTrgTuples=mat.size();
           double * targetBase = fieldOutput->getArray()->getPointer();
-          for(int j=0;j<nbOfTrgTuples;j++)
+          for(std::size_t j=0;j<nbOfTrgTuples;j++)
             {
               const SparseDoubleVec& mat1=mat[j];
               const SparseDoubleVec& deno1=deno[j];
@@ -701,7 +702,7 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
               double * targetPt = targetBase+tgrIds[j]*nbOfCompo;
               for(SparseDoubleVec::const_iterator it3=mat1.begin();it3!=mat1.end();it3++,it5++)
                 {
-                  map<int,int>::const_iterator it4=revert_zip.find((*it3).first);
+                  map<mcIdType,int>::const_iterator it4=revert_zip.find((*it3).first);
                   if(it4==revert_zip.end())
                     throw INTERP_KERNEL::Exception("OverlapMapping::multiply(): internal error: MULTIPLY: unexpected end iterator in revert_zip!");
                   double ratio = (*it3).second/(*it5).second;
@@ -722,9 +723,9 @@ void OverlapMapping::multiply(const MEDCouplingFieldDouble *fieldInput, MEDCoupl
          */
         {
           // Same loop as in the case srcProcID == myProcID, except that instead of working on local field data, we work on bigArr
-          int nbOfTrgTuples=mat.size();
+          std::size_t nbOfTrgTuples=mat.size();
           double * targetBase = fieldOutput->getArray()->getPointer();
-          for(int j=0;j<nbOfTrgTuples;j++)
+          for(std::size_t j=0;j<nbOfTrgTuples;j++)
             {
               const SparseDoubleVec& mat1=mat[j];
               const SparseDoubleVec& deno1=deno[j];
@@ -776,18 +777,18 @@ void OverlapMapping::fillSourceIdsZipReceivedForMultiply()
 
   CommInterface commInterface=_group.getCommInterface();
   int myProcId=_group.myRank();
-  int nbOfMatrixRecveived=_the_matrix_st_source_proc_id.size();
-  for(int i=0;i<nbOfMatrixRecveived;i++)
+  std::size_t nbOfMatrixRecveived=_the_matrix_st_source_proc_id.size();
+  for(std::size_t i=0;i<nbOfMatrixRecveived;i++)
     {
       int curSrcProcId=_the_matrix_st_source_proc_id[i];
       if(curSrcProcId!=myProcId)  // if =, data has been populated by addContributionST()
         {
           const std::vector< SparseDoubleVec >& mat=_the_matrix_st[i];
-          std::set<int> s;
+          std::set<mcIdType> s;
           for(std::vector< SparseDoubleVec >::const_iterator it1=mat.begin();it1!=mat.end();it1++)
             for(SparseDoubleVec::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
               s.insert((*it2).first);
-          vector<int> vec(s.begin(),s.end());
+          vector<mcIdType> vec(s.begin(),s.end());
           _src_ids_zip_recv[curSrcProcId] = vec;
         }
     }
index ef3ed4c49018797d93861612cdf4532a56785cd3..fc541413facd5ac03fd1806ec41e05bbb26ff359 100644 (file)
@@ -35,7 +35,7 @@ namespace MEDCoupling
   class MEDCouplingFieldDouble;
 
   using namespace std;
-  typedef map<int,double> SparseDoubleVec;
+  typedef map<mcIdType,double> SparseDoubleVec;
 
   /*!
    * Internal class, not part of the public API.
@@ -48,11 +48,11 @@ namespace MEDCoupling
   public:
 
     OverlapMapping(const ProcessorGroup& group, const OverlapElementLocator& locator);
-    void keepTracksOfSourceIds(int procId, DataArrayInt *ids);
-    void keepTracksOfTargetIds(int procId, DataArrayInt *ids);
-    void addContributionST(const vector< SparseDoubleVec >& matrixST, const DataArrayInt *srcIds, int srcProcId, const DataArrayInt *trgIds, int trgProcId);
-    void prepare(const vector< int >& procsToSendField, int nbOfTrgElems);
-    void computeDenoConservativeVolumic(int nbOfTuplesTrg);
+    void keepTracksOfSourceIds(int procId, DataArrayIdType *ids);
+    void keepTracksOfTargetIds(int procId, DataArrayIdType *ids);
+    void addContributionST(const vector< SparseDoubleVec >& matrixST, const DataArrayIdType *srcIds, int srcProcId, const DataArrayIdType *trgIds, int trgProcId);
+    void prepare(const vector< int >& procsToSendField, mcIdType nbOfTrgElems);
+    void computeDenoConservativeVolumic(mcIdType nbOfTuplesTrg);
 //    void computeDenoIntegralGlobConstraint();
 //    void computeDenoIntegral();
     void computeDenoRevIntegral(const DataArrayDouble & targetAreas);
@@ -60,13 +60,13 @@ namespace MEDCoupling
     void multiply(const MEDCouplingFieldDouble *fieldInput, MEDCouplingFieldDouble *fieldOutput, double default_val) const;
     void transposeMultiply(const MEDCouplingFieldDouble *fieldInput, MEDCouplingFieldDouble *fieldOutput);
   private:
-    void serializeMatrixStep0ST(const int *nbOfElemsSrc, int *&bigArr, int *count, int *offsets,
+    void serializeMatrixStep0ST(const mcIdType *nbOfElemsSrc, mcIdType *&bigArr, int *count, int *offsets,
                                 int *countForRecv, int *offsetsForRecv) const;
-    int serializeMatrixStep1ST(const int *nbOfElemsSrc, const int *recvStep0, const int *countStep0, const int *offsStep0,
-                               int *&bigArrI, double *&bigArrD, int *count, int *offsets,
+    mcIdType serializeMatrixStep1ST(const mcIdType *nbOfElemsSrc, const mcIdType *recvStep0, const int *countStep0, const int *offsStep0,
+                               mcIdType *&bigArrI, double *&bigArrD, int *count, int *offsets,
                                int *countForRecv, int *offsForRecv) const;
-    void unserializationST(int nbOfTrgElems, const int *nbOfElemsSrcPerProc, const int *bigArrRecv, const int *bigArrRecvCounts, const int *bigArrRecvOffs,
-                           const int *bigArrRecv2, const double *bigArrDRecv2, const int *bigArrRecv2Count, const int *bigArrRecv2Offs);
+    void unserializationST(mcIdType nbOfTrgElems, const mcIdType *nbOfElemsSrcPerProc, const mcIdType *bigArrRecv, const int *bigArrRecvCounts, const int *bigArrRecvOffs,
+                           const mcIdType *bigArrRecv2, const double *bigArrDRecv2, const int *bigArrRecv2Count, const int *bigArrRecv2Offs);
     void finishToFillFinalMatrixST();
     void fillSourceIdsZipReceivedForMultiply();
 
@@ -83,10 +83,10 @@ namespace MEDCoupling
      * gives an old2new map for the local part of the source mesh that has been sent to proc#i, just based on the
      * bounding box computation (this is potentially a larger set than what is finally in the interp matrix).
      * Second member gives proc ID.  */
-    map < int, MCAuto<DataArrayInt> > _sent_src_ids;
+    map < int, MCAuto<DataArrayIdType> > _sent_src_ids;
 
     //! See _sent_src_ids. Same for target mesh.
-    map < int, MCAuto<DataArrayInt> > _sent_trg_ids;
+    map < int, MCAuto<DataArrayIdType> > _sent_trg_ids;
 
     /**! Vector of matrixes (partial interpolation ratios), result of the LOCAL interpolator run.
      * Indexing shared with _source_proc_id_st, and _target_proc_id_st.   */
@@ -99,16 +99,16 @@ namespace MEDCoupling
     /**! Number of received source mesh IDs at mesh data exchange.
      Counting the number of IDs suffices, as we just need this to prepare the receive side, when doing the final vector matrix multiplication.
      First dimension is the remote proc ID from which we received. */
-    map <int, int > _nb_of_rcv_src_ids;
+    map <int, mcIdType > _nb_of_rcv_src_ids;
 
     /**! Specifies for each (target) remote proc ID (first dim of the map) the corresponding
      * source cell IDs to use.
      * This information is stored from the *locally* COMPuted matrices, and corresponds hence to field value that will need to
      * sent later on, if this matrix bit itself is sent aways.  */
-    map<int, vector<int> > _src_ids_zip_comp;
+    map<int, vector<mcIdType> > _src_ids_zip_comp;
 
     /**! Same idea as _src_ids_zip_comp above, but for RECEIVED matrix. */
-    map<int, vector<int> > _src_ids_zip_recv;
+    map<int, vector<mcIdType> > _src_ids_zip_recv;
 
     /**! THE matrix for matrix-vector product. The first dimension is indexed in the set of target procs
     * that interacts with local source mesh. The second dim is the target cell ID.
index e1e1886fc75ce0696e37642c8587a550de86678e..b3e65716bfc2777526544aed0653861939c26546 100644 (file)
@@ -112,7 +112,7 @@ namespace MEDCoupling
   */
   ParaFIELD::ParaFIELD(MEDCouplingFieldDouble* subdomain_field, ParaMESH *sup, const ProcessorGroup& proc_group):
     _field(subdomain_field),
-    _component_topology(ComponentTopology(_field->getNumberOfComponents())),_topology(0),_own_support(false),
+    _component_topology(ComponentTopology((int)_field->getNumberOfComponents())),_topology(0),_own_support(false),
     _support(sup)
   {
     if(_field)
@@ -174,7 +174,7 @@ namespace MEDCoupling
    * For example if _field is a nodal field : returned array will be the nodal global numbers.
    * The content of this method is used to inform Working side to accumulate data received by lazy side.
    */
-  DataArrayInt* ParaFIELD::returnCumulativeGlobalNumbering() const
+  DataArrayIdType* ParaFIELD::returnCumulativeGlobalNumbering() const
   {
     if(!_field)
       return 0;
@@ -190,7 +190,7 @@ namespace MEDCoupling
       }
   }
 
-  DataArrayInt* ParaFIELD::returnGlobalNumbering() const
+  DataArrayIdType* ParaFIELD::returnGlobalNumbering() const
   {
     if(!_field)
       return 0;
index afdfbc0073694b54d74f1e2093b4dfb08998006f..7ca217363c55f4919cf60527057ac290dc6b7853 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "MEDCouplingRefCountObject.hxx"
 #include "ComponentTopology.hxx"
+#include "MCType.hxx"
 
 namespace MEDCoupling
 {
@@ -43,8 +44,8 @@ namespace MEDCoupling
     void synchronizeSource( MEDCoupling::ParaFIELD* target_field);
     MEDCouplingFieldDouble* getField() const { return _field; }
     void setOwnSupport(bool v) const { _own_support=v; }
-    DataArrayInt* returnCumulativeGlobalNumbering() const;
-    DataArrayInt* returnGlobalNumbering() const;
+    DataArrayIdType* returnCumulativeGlobalNumbering() const;
+    DataArrayIdType* returnGlobalNumbering() const;
     Topology* getTopology() const { return _topology; }
     ParaMESH* getSupport() const  { return _support; }
     int nbComponents() const;
diff --git a/src/ParaMEDMEM/ParaIdType.hxx b/src/ParaMEDMEM/ParaIdType.hxx
new file mode 100644 (file)
index 0000000..8bc4dbb
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef __ParaIdType_HXX__
+#define __ParaIdType_HXX__
+
+#include <mpi.h>
+
+#ifndef MEDCOUPLING_USE_64BIT_IDS
+#define MPI_ID_TYPE MPI_INT
+#else
+#define MPI_ID_TYPE MPI_LONG
+#endif
+
+#endif
index cc559819404c7cbb5bc90244ad6fcb68813892be..1fe4ddf9cb6481cc4b6b6b1e9edd7cc8ac175075 100644 (file)
@@ -34,8 +34,8 @@ using namespace std;
 namespace MEDCoupling
 {
   ParaMESH::ParaMESH( MEDCouplingPointSet *subdomain_mesh, MEDCouplingPointSet *subdomain_face,
-            DataArrayInt *CorrespElt_local2global, DataArrayInt *CorrespFace_local2global,
-            DataArrayInt *CorrespNod_local2global, const ProcessorGroup& proc_group ):
+            DataArrayIdType *CorrespElt_local2global, DataArrayIdType *CorrespFace_local2global,
+            DataArrayIdType *CorrespNod_local2global, const ProcessorGroup& proc_group ):
     _cell_mesh(subdomain_mesh),
     _face_mesh(subdomain_face),
     _my_domain_id(proc_group.myRank()),
@@ -67,20 +67,20 @@ namespace MEDCoupling
   {
     if(_cell_mesh)
       _cell_mesh->incrRef();
-    int nb_elem=mesh->getNumberOfCells();
+    mcIdType nb_elem=mesh->getNumberOfCells();
     _explicit_topology=new BlockTopology(proc_group,nb_elem);
-    int nbOfCells=mesh->getNumberOfCells();
-    _cell_global = DataArrayInt::New();
+    mcIdType nbOfCells=mesh->getNumberOfCells();
+    _cell_global = DataArrayIdType::New();
     _cell_global->alloc(nbOfCells,1);
-    int *cellglobal=_cell_global->getPointer();
-    int offset = _block_topology->localToGlobal(make_pair(_my_domain_id,0));
-    for (int i=0; i<nbOfCells; i++)
+    mcIdType *cellglobal=_cell_global->getPointer();
+    mcIdType offset = _block_topology->localToGlobal(make_pair(_my_domain_id,0));
+    for (mcIdType i=0; i<nbOfCells; i++)
       {
         cellglobal[i]=offset+i;
       }
   }
 
-  void ParaMESH::setNodeGlobal(DataArrayInt *nodeGlobal)
+  void ParaMESH::setNodeGlobal(DataArrayIdType *nodeGlobal)
   {
     if(nodeGlobal!=_node_global)
       {
@@ -92,7 +92,7 @@ namespace MEDCoupling
       }
   }
 
-  void ParaMESH::setCellGlobal(DataArrayInt *cellGlobal)
+  void ParaMESH::setCellGlobal(DataArrayIdType *cellGlobal)
   {
     if(cellGlobal!=_cell_global)
       {
index d66fe0f4cb5bde79ad228ba6847c47926825aaf7..eee91dfe93d14322303495316431e2c91e2ed478 100644 (file)
@@ -51,26 +51,26 @@ namespace MEDCoupling
               const ProcessorGroup& proc_group, const std::string& name);
     ParaMESH( MEDCouplingPointSet *subdomain_mesh,
               MEDCouplingPointSet *subdomain_face,
-              DataArrayInt *CorrespElt_local2global,
-              DataArrayInt *CorrespFace_local2global,
-              DataArrayInt *CorrespNod_local2global,
+              DataArrayIdType *CorrespElt_local2global,
+              DataArrayIdType *CorrespFace_local2global,
+              DataArrayIdType *CorrespNod_local2global,
               const ProcessorGroup& proc_group ) ;
 
     virtual ~ParaMESH();
-    void setNodeGlobal(DataArrayInt *nodeGlobal);
-    void setCellGlobal(DataArrayInt *cellGlobal);
+    void setNodeGlobal(DataArrayIdType *nodeGlobal);
+    void setCellGlobal(DataArrayIdType *cellGlobal);
     Topology* getTopology() const { return _explicit_topology; }
     bool isStructured() const { return _cell_mesh->isStructured(); }
     MEDCouplingPointSet *getCellMesh() const { return _cell_mesh; }
     MEDCouplingPointSet *getFaceMesh() const { return _face_mesh; }
     BlockTopology* getBlockTopology() const { return _block_topology; }
 
-    DataArrayInt* getGlobalNumberingNodeDA() const { if(_node_global) _node_global->incrRef(); return _node_global; }
-    DataArrayInt* getGlobalNumberingFaceDA() const { if(_face_global) _face_global->incrRef(); return _face_global; }
-    DataArrayInt* getGlobalNumberingCellDA() const { if(_cell_global) _cell_global->incrRef(); return _cell_global; }
-    const int* getGlobalNumberingNode() const { if(_node_global) return _node_global->getConstPointer(); return 0; }
-    const int* getGlobalNumberingFace() const { if(_face_global) return _face_global->getConstPointer(); return 0; }
-    const int* getGlobalNumberingCell() const { if(_cell_global) return _cell_global->getConstPointer(); return 0; }
+    DataArrayIdType* getGlobalNumberingNodeDA() const { if(_node_global) _node_global->incrRef(); return _node_global; }
+    DataArrayIdType* getGlobalNumberingFaceDA() const { if(_face_global) _face_global->incrRef(); return _face_global; }
+    DataArrayIdType* getGlobalNumberingCellDA() const { if(_cell_global) _cell_global->incrRef(); return _cell_global; }
+    const mcIdType* getGlobalNumberingNode() const { if(_node_global) return _node_global->getConstPointer(); return 0; }
+    const mcIdType* getGlobalNumberingFace() const { if(_face_global) return _face_global->getConstPointer(); return 0; }
+    const mcIdType* getGlobalNumberingCell() const { if(_cell_global) return _cell_global->getConstPointer(); return 0; }
 
   private:
     //mesh object underlying the ParaMESH object
@@ -84,9 +84,9 @@ namespace MEDCoupling
     MEDCoupling::BlockTopology* _block_topology;
     Topology*  _explicit_topology;
     // pointers to global numberings
-    DataArrayInt* _node_global;
-    DataArrayInt* _face_global;
-    DataArrayInt* _cell_global;
+    DataArrayIdType* _node_global;
+    DataArrayIdType* _face_global;
+    DataArrayIdType* _cell_global;
   };
 }
 
index 2b10a21844614198f730dbb2d2f934b2df9ac2e2..f4cd902f0694ae99032f125ba6ffdf2d841f61d8 100644 (file)
@@ -49,7 +49,7 @@ namespace MEDCoupling
     virtual void intersect (ProcessorGroup&) = 0;
     bool contains(int rank) const { return _proc_ids.find(rank)!=_proc_ids.end(); }
     virtual bool containsMyRank() const = 0;
-    int size() const  { return _proc_ids.size(); }
+    int size() const  { return (int)_proc_ids.size(); }
     const CommInterface& getCommInterface()const { return _comm_interface; }
     virtual int myRank() const = 0;
     virtual int translateRank(const ProcessorGroup*, int) const = 0;
index 2a8acfc2903a60752eecaad14311a05bf543afe2..36454c959ff4b84b676dbca7c5ef1788da0500a3 100644 (file)
@@ -152,29 +152,29 @@ namespace MEDCoupling
 
     int myranksource = _topo_source->getProcGroup()->myRank();
 
-    vector <int>* target_arrays=new vector<int>[_topo_target->getProcGroup()->size()];
+    vector <mcIdType>* target_arrays=new vector<mcIdType>[_topo_target->getProcGroup()->size()];
 
     //cout<<" topotarget size"<<  _topo_target->getProcGroup()->size()<<endl;
 
-    int nb_local = _topo_source-> getNbLocalElements();
-    for (int ielem=0; ielem< nb_local ; ielem++)
+    mcIdType nb_local = _topo_source-> getNbLocalElements();
+    for (mcIdType ielem=0; ielem< nb_local ; ielem++)
       {
         //  cout <<"source local :"<<myranksource<<","<<ielem<<endl;
-        int global = _topo_source->localToGlobal(make_pair(myranksource, ielem));
+        mcIdType global = _topo_source->localToGlobal(make_pair(myranksource, ielem));
         //  cout << "global "<<global<<endl;
-        pair<int,int> target_local =_topo_target->globalToLocal(global);
+        pair<int,mcIdType> target_local =_topo_target->globalToLocal(global);
         //  cout << "target local : "<<target_local.first<<","<<target_local.second<<endl;
         target_arrays[target_local.first].push_back(target_local.second);
       }
 
-    int union_size=group->size();
+    std::size_t union_size=group->size();
 
     _send_counts=new int[union_size];
     _send_displs=new int[union_size];
     _recv_counts=new int[union_size];
     _recv_displs=new int[union_size];
 
-    for (int i=0; i< union_size; i++)
+    for (std::size_t i=0; i< union_size; i++)
       {
         _send_counts[i]=0;
         _recv_counts[i]=0;
@@ -186,7 +186,7 @@ namespace MEDCoupling
       {
         //converts the rank in target to the rank in union communicator
         int unionrank=group->translateRank(_topo_target->getProcGroup(),iproc);
-        _send_counts[unionrank]=target_arrays[iproc].size();
+        _send_counts[unionrank]=(int)target_arrays[iproc].size();
       }
 
     for (int iproc=1; iproc<group->size();iproc++)
@@ -200,15 +200,15 @@ namespace MEDCoupling
     int* counter=new int [_topo_target->getProcGroup()->size()];
     counter[0]=0;
     for (int i=1; i<_topo_target->getProcGroup()->size(); i++)
-      counter[i]=counter[i-1]+target_arrays[i-1].size();
+      counter[i]=counter[i-1]+(int)target_arrays[i-1].size();
 
 
     const double* value = _local_field->getField()->getArray()->getPointer();
     //cout << "Nb local " << nb_local<<endl;
     for (int ielem=0; ielem<nb_local ; ielem++)
       {
-        int global = _topo_source->localToGlobal(make_pair(myranksource, ielem));
-        pair<int,int> target_local =_topo_target->globalToLocal(global);
+        mcIdType global = _topo_source->localToGlobal(make_pair(myranksource, ielem));
+        pair<int,mcIdType> target_local =_topo_target->globalToLocal(global);
         //cout <<"global : "<< global<<" local :"<<target_local.first<<" "<<target_local.second;
         //cout <<"counter[]"<<counter[target_local.first]<<endl;
         _send_buffer[counter[target_local.first]++]=value[ielem];
@@ -230,24 +230,24 @@ namespace MEDCoupling
 
     int myranktarget = _topo_target->getProcGroup()->myRank();
 
-    vector < vector <int> > source_arrays(_topo_source->getProcGroup()->size());
-    int nb_local = _topo_target-> getNbLocalElements();
-    for (int ielem=0; ielem< nb_local ; ielem++)
+    vector < vector <mcIdType> > source_arrays(_topo_source->getProcGroup()->size());
+    mcIdType nb_local = _topo_target-> getNbLocalElements();
+    for (mcIdType ielem=0; ielem< nb_local ; ielem++)
       {
         //  cout <<"TS target local :"<<myranktarget<<","<<ielem<<endl;
-        int global = _topo_target->localToGlobal(make_pair(myranktarget, ielem));
+        mcIdType global = _topo_target->localToGlobal(make_pair(myranktarget, ielem));
         //cout << "TS global "<<global<<endl;
-        pair<int,int> source_local =_topo_source->globalToLocal(global);
+        pair<int,mcIdType> source_local =_topo_source->globalToLocal(global);
         //  cout << "TS source local : "<<source_local.first<<","<<source_local.second<<endl;
         source_arrays[source_local.first].push_back(source_local.second);
       }
-    int union_size=group->size();
+    std::size_t union_size=group->size();
     _recv_counts=new int[union_size];
     _recv_displs=new int[union_size];
     _send_counts=new int[union_size];
     _send_displs=new int[union_size];
 
-    for (int i=0; i< union_size; i++)
+    for (std::size_t i=0; i< union_size; i++)
       {
         _send_counts[i]=0;
         _recv_counts[i]=0;
@@ -257,9 +257,9 @@ namespace MEDCoupling
       {
         //converts the rank in target to the rank in union communicator
         int unionrank=group->translateRank(_topo_source->getProcGroup(),iproc);
-        _recv_counts[unionrank]=source_arrays[iproc].size();
+        _recv_counts[unionrank]=(int)source_arrays[iproc].size();
       }
-    for (int i=1; i<union_size; i++)
+    for (std::size_t i=1; i<union_size; i++)
       _recv_displs[i]=_recv_displs[i-1]+_recv_counts[i-1];
     _recv_buffer=new double[nb_local];
 
@@ -278,8 +278,8 @@ namespace MEDCoupling
   {
     MPI_Status status;
 
-    int* serializer=0;
-    int size;
+    mcIdType* serializer=0;
+    mcIdType size;
 
     MPIProcessorGroup* group=new MPIProcessorGroup(*_comm_interface);
 
@@ -307,12 +307,12 @@ namespace MEDCoupling
         MESSAGE(" rank "<<group->myRank()<< "received master rank"<<rank_master);
       }
     // The topology is broadcasted to all processors in the group
-    _comm_interface->broadcast(&size, 1,MPI_INT,rank_master,*(group->getComm()));
+    _comm_interface->broadcast(&size, 1,MPI_ID_TYPE,rank_master,*(group->getComm()));
 
-    int* buffer=new int[size];
+    mcIdType* buffer=new mcIdType[size];
     if (topo!=0 && topo->getProcGroup()->myRank()==0)
       copy(serializer, serializer+size, buffer);
-    _comm_interface->broadcast(buffer,size,MPI_INT,rank_master,*(group->getComm()));
+    _comm_interface->broadcast(buffer,(int)size,MPI_ID_TYPE,rank_master,*(group->getComm()));
 
     // Processors which did not possess the source topology
     // unserialize it
@@ -353,7 +353,7 @@ namespace MEDCoupling
                                _recv_buffer, _recv_counts, _recv_displs, MPI_DOUBLE,comm);
     cout<<"end AllToAll"<<endl;
 
-    int nb_local = _topo_target->getNbLocalElements();
+    mcIdType nb_local = _topo_target->getNbLocalElements();
     //double* value=new double[nb_local];
     double* value=const_cast<double*>(_local_field->getField()->getArray()->getPointer());
 
@@ -368,10 +368,10 @@ namespace MEDCoupling
         delete group;
       }
 
-    for (int ielem=0; ielem<nb_local ; ielem++)
+    for (mcIdType ielem=0; ielem<nb_local ; ielem++)
       {
-        int global = _topo_target->localToGlobal(make_pair(myranktarget, ielem));
-        pair<int,int> source_local =_topo_source->globalToLocal(global);
+        mcIdType global = _topo_target->localToGlobal(make_pair(myranktarget, ielem));
+        pair<int,mcIdType> source_local =_topo_source->globalToLocal(global);
         value[ielem]=_recv_buffer[counters[source_local.first]++];
       }
 
index 101ecbbe0e136af61872a5458c7d3afa1327ba9f..168b5bbd534e9b560bbdbbf7e209a542cad39b58 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef __TOPOLOGY_HXX__
 #define __TOPOLOGY_HXX__
 
+#include "MCType.hxx"
+
 namespace MEDCoupling
 {
   class ProcessorGroup;
@@ -36,8 +38,8 @@ namespace MEDCoupling
   public:
     Topology() { }
     virtual ~Topology() { }
-    virtual int getNbElements() const = 0;
-    virtual int getNbLocalElements() const  = 0;
+    virtual mcIdType getNbElements() const = 0;
+    virtual mcIdType getNbLocalElements() const  = 0;
     virtual const ProcessorGroup* getProcGroup()const  = 0;
   };
 }
index cb3725380754485f6e9726ac7b1520b0d8759d03..ebacc6dc68a21127028ad6661cdbd30d25ee1dff 100644 (file)
@@ -80,7 +80,7 @@ void MPI2ParaMEDMEMTest::testBasicMPI2_1()
   const double sourceCoordsAll[2][8]={{0.4,0.5,0.4,1.5,1.6,1.5,1.6,0.5},
                                       {0.3,-0.5,1.6,-0.5,1.6,-1.5,0.3,-1.5}};
   
-  int conn4All[8]={0,1,2,3,4,5,6,7};
+  mcIdType conn4All[8]={0,1,2,3,4,5,6,7};
   
   std::ostringstream stream; stream << "sourcemesh2D proc " << grank;
   mesh=MEDCouplingUMesh::New(stream.str().c_str(),2);
index 29265f665ce2e701d2ab2e19e5d93c20b0005908..b7a10c8ad85a16c82a6d35dff86aefeb703f7aad 100644 (file)
@@ -82,7 +82,7 @@ void MPI2ParaMEDMEMTest::testBasicMPI2_1()
   const double targetCoordsAll[3][16]={{0.7,1.45,0.7,1.65,0.9,1.65,0.9,1.45,  1.1,1.4,1.1,1.6,1.3,1.6,1.3,1.4},
                                        {0.7,-0.6,0.7,0.7,0.9,0.7,0.9,-0.6,  1.1,-0.7,1.1,0.6,1.3,0.6,1.3,-0.7},
                                        {0.7,-1.55,0.7,-1.35,0.9,-1.35,0.9,-1.55,  1.1,-1.65,1.1,-1.45,1.3,-1.45,1.3,-1.65}};
-  int conn4All[8]={0,1,2,3,4,5,6,7};
+  mcIdType conn4All[8]={0,1,2,3,4,5,6,7};
   double targetResults[3][2]={{34.,34.},{38.333333333333336,42.666666666666664},{47.,47.}};
 
   std::ostringstream stream; stream << "targetmesh2D proc " << grank-(gsize-lsize);
index c8521a8cb4a0caf7c8e587e7fc2599fd34f47731..408084e310e3225d51e6ce2b93833d87158c4ac3 100644 (file)
@@ -69,8 +69,8 @@ void ParaMEDMEMTest::testBlockTopology_constructor()
   CommInterface interface;
   MPIProcessorGroup group(interface);
   BlockTopology blocktopo(group,1);
-  CPPUNIT_ASSERT_EQUAL(1,blocktopo.getNbLocalElements());
-  CPPUNIT_ASSERT_EQUAL(size,blocktopo.getNbElements());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(1),blocktopo.getNbLocalElements());
+  CPPUNIT_ASSERT_EQUAL(ToIdType(size),blocktopo.getNbElements());
   CPPUNIT_ASSERT_EQUAL(1,blocktopo.getDimension());
   
   //checking access methods
@@ -93,11 +93,11 @@ void ParaMEDMEMTest::testBlockTopology_constructor()
   global=blocktopo2.localToGlobal(local);
   CPPUNIT_ASSERT_EQUAL(global,2*size-1);
 
-  std::vector<std::pair<int,int> > bounds = blocktopo2.getLocalArrayMinMax();
+  std::vector<std::pair<int,mcIdType> > bounds = blocktopo2.getLocalArrayMinMax();
   int vecsize = bounds.size();
   CPPUNIT_ASSERT_EQUAL(1,vecsize);
   CPPUNIT_ASSERT_EQUAL(2*rank, (bounds[0]).first);
-  CPPUNIT_ASSERT_EQUAL(2*rank+2, (bounds[0]).second);
+  CPPUNIT_ASSERT_EQUAL(ToIdType(2*rank+2), (bounds[0]).second);
  }
  
 void ParaMEDMEMTest::testBlockTopology_serialize()
@@ -114,8 +114,8 @@ void ParaMEDMEMTest::testBlockTopology_serialize()
 //testing the serialization process that is used to transfer a
 //block topology via a MPI_Send/Recv comm  
   BlockTopology blocktopo_recv;
-  int* serializer;
-  int sersize;
+  mcIdType* serializer;
+  mcIdType sersize;
   blocktopo.serialize(serializer,sersize);
   blocktopo_recv.unserialize(serializer,interface);
   CPPUNIT_ASSERT_EQUAL(blocktopo.getNbElements(),blocktopo_recv.getNbElements());
index 6e3d5a80c2f6fb11ea059e82aec265822e9b3d47..514251c47bfb6da06cf2663ee074c383ad38807a 100644 (file)
@@ -65,7 +65,7 @@ void ParaMEDMEMTest::testFabienAPI1()
       std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
       mesh->setCoords(myCoords);
       myCoords->decrRef();
-      int targetConn[4]={0,2,3,1};
+      mcIdType targetConn[4]={0,2,3,1};
       mesh->allocateCells(1);
       mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
       mesh->finishInsertingCells();
@@ -85,7 +85,7 @@ void ParaMEDMEMTest::testFabienAPI1()
       std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
       mesh->setCoords(myCoords);
       myCoords->decrRef();
-      int targetConn[6]={0,2,1,2,3,1};
+      mcIdType targetConn[6]={0,2,1,2,3,1};
       mesh->allocateCells(2);
       mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
       mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
@@ -150,7 +150,7 @@ void ParaMEDMEMTest::testFabienAPI2()
       std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
       mesh->setCoords(myCoords);
       myCoords->decrRef();
-      int targetConn[4]={0,2,3,1};
+      mcIdType targetConn[4]={0,2,3,1};
       mesh->allocateCells(1);
       mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
       mesh->finishInsertingCells();
@@ -170,7 +170,7 @@ void ParaMEDMEMTest::testFabienAPI2()
       std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
       mesh->setCoords(myCoords);
       myCoords->decrRef();
-      int targetConn[6]={0,2,1,2,3,1};
+      mcIdType targetConn[6]={0,2,1,2,3,1};
       mesh->allocateCells(2);
       mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
       mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
index 5c05af4fa4f9600913393667158b5ed5ad7140d7..c8e2d49481a17ac1530df7e71238191a58aad94c 100644 (file)
@@ -60,7 +60,7 @@ MEDCouplingUMesh *init_quadGauthier1(int is_master)
       const double dataCoo[24]={0,0,0,1,0,0,0,0,1,1,0,1,0,1,0,1,1,0,0,1,1,1,1,1};
       coo->alloc(8,3);
       std::copy(dataCoo,dataCoo+24,coo->getPointer());
-      const int conn[8]={0,1,3,2,4,5,7,6};
+      const mcIdType conn[8]={0,1,3,2,4,5,7,6};
       m->allocateCells(2);
       m->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
       m->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+4);
@@ -83,7 +83,7 @@ MEDCouplingUMesh *init_triangleGauthier1(int is_master)
       const double dataCoo[24]={0,0,0,1,0,0,0,0,1,1,0,1,0,1,0,1,1,0,0,1,1,1,1,1};
       coo->alloc(8,3);
       std::copy(dataCoo,dataCoo+24,coo->getPointer());
-      const int conn[12]={0,1,2,1,2,3,4,5,7,4,6,7};
+      const mcIdType conn[12]={0,1,2,1,2,3,4,5,7,4,6,7};
       m->allocateCells(2);
       for(int i=0;i<4;i++)
         m->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+3*i);
@@ -285,7 +285,7 @@ void ParaMEDMEMTest::testGauthier2()
           std::copy(cooData,cooData+189,arr->getPointer());
           mesh->setCoords(arr);
           mesh->allocateCells(80);
-          const int conn[240]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,2,1,31,5,4,32,8,7,33,11,10,34,14,13,35,17,16,36,20,19,37,23,22,38,26,25,39,29,28,30,40,2,31,41,5,32,42,8,33,43,11,34,44,14,35,45,17,36,46,20,37,47,23,38,48,26,39,49,29,31,2,40,32,5,41,33,8,42,34,11,43,35,14,44,36,17,45,37,20,46,38,23,47,39,26,48,50,29,49,3,2,4,6,5,7,9,8,10,12,11,13,15,14,16,18,17,19,21,20,22,24,23,25,27,26,28,51,29,52,31,4,2,32,7,5,33,10,8,34,13,11,35,16,14,36,19,17,37,22,20,38,25,23,39,28,26,50,52,29,0,2,53,3,5,54,6,8,55,9,11,56,12,14,57,15,17,58,18,20,59,21,23,60,24,26,61,27,29,62,3,53,2,6,54,5,9,55,8,12,56,11,15,57,14,18,58,17,21,59,20,24,60,23,27,61,26,51,62,29};
+          const mcIdType conn[240]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,2,1,31,5,4,32,8,7,33,11,10,34,14,13,35,17,16,36,20,19,37,23,22,38,26,25,39,29,28,30,40,2,31,41,5,32,42,8,33,43,11,34,44,14,35,45,17,36,46,20,37,47,23,38,48,26,39,49,29,31,2,40,32,5,41,33,8,42,34,11,43,35,14,44,36,17,45,37,20,46,38,23,47,39,26,48,50,29,49,3,2,4,6,5,7,9,8,10,12,11,13,15,14,16,18,17,19,21,20,22,24,23,25,27,26,28,51,29,52,31,4,2,32,7,5,33,10,8,34,13,11,35,16,14,36,19,17,37,22,20,38,25,23,39,28,26,50,52,29,0,2,53,3,5,54,6,8,55,9,11,56,12,14,57,15,17,58,18,20,59,21,23,60,24,26,61,27,29,62,3,53,2,6,54,5,9,55,8,12,56,11,15,57,14,18,58,17,21,59,20,24,60,23,27,61,26,51,62,29};
           for(int i=0;i<80;i++)
             mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+3*i);
           MCAuto<MEDCouplingFieldDouble> f(MEDCouplingFieldDouble::New(ON_NODES,ONE_TIME));
@@ -307,7 +307,7 @@ void ParaMEDMEMTest::testGauthier2()
           std::copy(cooData,cooData+66,arr->getPointer());
           mesh->setCoords(arr);
           mesh->allocateCells(10);
-          const int conn[40]={0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,8,9,11,10,10,11,13,12,12,13,15,14,14,15,17,16,16,17,19,18,18,19,21,20};
+          const mcIdType conn[40]={0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,8,9,11,10,10,11,13,12,12,13,15,14,14,15,17,16,16,17,19,18,18,19,21,20};
           for(int i=0;i<10;i++)
             mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+4*i);
           MCAuto<MEDCouplingFieldDouble> f(MEDCouplingFieldDouble::New(type==0?ON_CELLS:ON_NODES,ONE_TIME));
@@ -338,7 +338,7 @@ void ParaMEDMEMTest::testGauthier2()
         {
           double pmin=1e38, pmax=-1e38;
           const double *p(vitesse->getField()->getArray()->begin());
-          for(std::size_t i=0;i<vitesse->getField()->getArray()->getNbOfElems();i++,p++)
+          for(mcIdType i=0;i<vitesse->getField()->getArray()->getNbOfElems();i++,p++)
             {
               if (*p<pmin) pmin=*p;
               if (*p>pmax) pmax=*p;
@@ -555,12 +555,12 @@ void ParaMEDMEMTest::testGauthier4()
 {
   //
   const double sourceCoords[19*3]={0.5,0.5,0.1,0.5,0.5,1.2,0.5,0.5,1.6,0.5,0.5,1.8,0.5,0.5,2.43,0.5,0.5,2.55,0.5,0.5,4.1,0.5,0.5,4.4,0.5,0.5,4.9,0.5,0.5,5.1,0.5,0.5,7.6,0.5,0.5,7.7,0.5,0.5,8.2,0.5,0.5,8.4,0.5,0.5,8.6,0.5,0.5,8.8,0.5,0.5,9.2,0.5,0.5,9.6,0.5,0.5,11.5};
-  const int sourceConn[18*2]={0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18};
+  const mcIdType sourceConn[18*2]={0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18};
   const double sourceVals[19]={0.49,2.8899999999999997,7.29,13.69,22.09,32.49,44.89,59.29,75.69,94.09, 114.49,136.89,161.29,187.69,216.09,246.49,278.89,313.29,349.69};
   const double targetCoords0[20*3]={0.,0.,0.,1.,0.,0.,0.,1.,0.,1.,1.,0.,0.,0.,1.,1.,0.,1.,0.,1.,1.,1.,1.,1.,0.,0.,2.,1.,0.,2.,0.,1.,2.,1.,1.,2.,0.,0.,3.,1.,0.,3.,0.,1.,3.,1.,1.,3.,0.,0.,4.,1.,0.,4.,0.,1.,4.,1.,1.,4.};
-  const int targetConn0[8*4]={1,0,2,3,5,4,6,7,5,4,6,7,9,8,10,11,9,8,10,11,13,12,14,15,13,12,14,15,17,16,18,19};
+  const mcIdType targetConn0[8*4]={1,0,2,3,5,4,6,7,5,4,6,7,9,8,10,11,9,8,10,11,13,12,14,15,13,12,14,15,17,16,18,19};
   const double targetCoords1[28*3]={0.,0.,4.,1.,0.,4.,0.,1.,4.,1.,1.,4.,0.,0.,5.,1.,0.,5.,0.,1.,5.,1.,1.,5.,0.,0.,6.,1.,0.,6.,0.,1.,6.,1.,1.,6.,0.,0.,7.,1.,0.,7.,0.,1.,7.,1.,1.,7.,0.,0.,8.,1.,0.,8.,0.,1.,8.,1.,1.,8.,0.,0.,9.,1.,0.,9.,0.,1.,9.,1.,1.,9.,0.,0.,10.,1.,0.,10.,0.,1.,10.,1.,1.,10.};
-  const int targetConn1[8*6]={1,0,2,3,5,4,6,7,5,4,6,7,9,8,10,11,9,8,10,11,13,12,14,15,13,12,14,15,17,16,18,19,17,16,18,19,21,20,22,23,21,20,22,23,25,24,26,27};
+  const mcIdType targetConn1[8*6]={1,0,2,3,5,4,6,7,5,4,6,7,9,8,10,11,9,8,10,11,13,12,14,15,13,12,14,15,17,16,18,19,17,16,18,19,21,20,22,23,21,20,22,23,25,24,26,27};
   //
   int size;
   int rank;
index 46b42b8ca80a92ccabcff46dddfa0b1a8ec2a4b9..2c846ac2089df023666d4c869b519f0601ba7659 100644 (file)
@@ -72,7 +72,7 @@ MEDCouplingUMesh *init_quad()
   const double dataCoo[24]={0.,0.,0.,1.,0.,0.,0.,0.,1.,1.,0.,1.,0.,1e-05,0.,1.,1e-05,0.,0.,1e-05,1.,1.,1e-05,1.};
   coo->alloc(8,3);
   std::copy(dataCoo,dataCoo+24,coo->getPointer());
-  const int conn[8]={0,1,3,2,4,5,7,6};
+  const mcIdType conn[8]={0,1,3,2,4,5,7,6};
   m->allocateCells(2);
   m->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
   m->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn+4);
@@ -87,7 +87,7 @@ MEDCouplingUMesh *init_triangle()
   const double dataCoo[24]={0.,0.,0.,1.,0.,0.,0.,0.,1.,1.,0.,1.,0.,1e-05,0.,1.,1e-05,0.,0.,1e-05,1.,1.,1e-05,1.};
   coo->alloc(8,3);
   std::copy(dataCoo,dataCoo+24,coo->getPointer());
-  const int conn[12]={0,1,2,1,2,3,4,5,7,4,6,7};
+  const mcIdType conn[12]={0,1,2,1,2,3,4,5,7,4,6,7};
   m->allocateCells(4);
   for(int i=0;i<4;i++)
     m->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,conn+3*i);
@@ -144,7 +144,6 @@ void ParaMEDMEMTest::testICoco1()
       champ_recepteur->setOwnSupport(true);
     }
   
-  
   MPI_Barrier(MPI_COMM_WORLD);
 
   clock_t clock0(clock());
index 7be3eb00351c727bb3d1d074963472de237a9870..d6aee48e816aca078ffce9c758e2093c73e1c421 100644 (file)
@@ -105,7 +105,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_1D()
       if(rank==0)
         {
           double coords[4]={0.3,0.7, 0.9,1.0};
-          int conn[4]={0,1,2,3};
+          mcIdType conn[4]={0,1,2,3};
           mesh=MEDCouplingUMesh::New("Source mesh Proc0",1);
           mesh->allocateCells(2);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -120,7 +120,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_1D()
       if(rank==1)
         {
           double coords[2]={0.7,0.9};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Source mesh Proc1",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -134,7 +134,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_1D()
       if(rank==2)
         {
           double coords[2]={1.,1.12};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Source mesh Proc2",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -169,7 +169,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_1D()
       if(rank==3)
         {
           double coords[2]={0.5,0.75};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Target mesh Proc3",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -184,7 +184,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_1D()
       if(rank==4)
         {
           double coords[2]={0.75,1.2};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Target mesh Proc4",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -294,7 +294,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_2DCurve()
       if(rank==0)
         {
           double coords[8]={0.3,0.3,0.7,0.7, 0.9,0.9,1.0,1.0};
-          int conn[4]={0,1,2,3};
+          mcIdType conn[4]={0,1,2,3};
           mesh=MEDCouplingUMesh::New("Source mesh Proc0",1);
           mesh->allocateCells(2);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -309,7 +309,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_2DCurve()
       if(rank==1)
         {
           double coords[4]={0.7,0.7,0.9,0.9};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Source mesh Proc1",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -323,7 +323,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_2DCurve()
       if(rank==2)
         {
           double coords[4]={1.,1.,1.12,1.12};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Source mesh Proc2",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -358,7 +358,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_2DCurve()
       if(rank==3)
         {
           double coords[4]={0.5,0.5,0.75,0.75};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Target mesh Proc3",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -373,7 +373,7 @@ void ParaMEDMEMTest::testInterpKernelDEC_2DCurve()
       if(rank==4)
         {
           double coords[4]={0.75,0.75,1.2,1.2};
-          int conn[2]={0,1};
+          mcIdType conn[2]={0,1};
           mesh=MEDCouplingUMesh::New("Target mesh Proc4",1);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn);
@@ -1091,7 +1091,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P0()
   const double targetCoordsAll[3][16]={{0.7,1.45,0.7,1.65,0.9,1.65,0.9,1.45,  1.1,1.4,1.1,1.6,1.3,1.6,1.3,1.4},
                                        {0.7,-0.6,0.7,0.7,0.9,0.7,0.9,-0.6,  1.1,-0.7,1.1,0.6,1.3,0.6,1.3,-0.7},
                                        {0.7,-1.55,0.7,-1.35,0.9,-1.35,0.9,-1.55,  1.1,-1.65,1.1,-1.45,1.3,-1.45,1.3,-1.65}};
-  int conn4All[8]={0,1,2,3,4,5,6,7};
+  mcIdType conn4All[8]={0,1,2,3,4,5,6,7};
   double targetResults[3][2]={{34.,34.},{38.333333333333336,42.666666666666664},{47.,47.}};
   double targetResults2[3][2]={{0.28333333333333344,0.56666666666666687},{1.8564102564102569,2.0128205128205132},{1.0846153846153845,0.36153846153846159}};
   double targetResults3[3][2]={{3.7777777777777781,7.5555555555555562},{24.511111111111113,26.355555555555558},{14.1,4.7}};
@@ -1410,7 +1410,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
       if(rank==0)
         {
           double coords[6]={-0.3,-0.3, 0.7,0.7, 0.7,-0.3};
-          int conn[3]={0,1,2};
+          mcIdType conn[3]={0,1,2};
           //int globalNode[3]={1,2,0};
           mesh=MEDCouplingUMesh::New("Source mesh Proc0",2);
           mesh->allocateCells(1);
@@ -1425,7 +1425,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
       if(rank==1)
         {
           double coords[6]={-0.3,-0.3, -0.3,0.7, 0.7,0.7};
-          int conn[3]={0,1,2};
+          mcIdType conn[3]={0,1,2};
           //int globalNode[3]={1,3,2};
           mesh=MEDCouplingUMesh::New("Source mesh Proc1",2);
           mesh->allocateCells(1);
@@ -1462,7 +1462,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
       if(rank==2)
         {
           double coords[10]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2 };
-          int conn[7]={0,3,4,1, 1,4,2};
+          mcIdType conn[7]={0,3,4,1, 1,4,2};
           //int globalNode[5]={4,3,0,2,1};
           mesh=MEDCouplingUMesh::New("Target mesh Proc2",2);
           mesh->allocateCells(2);
@@ -1475,8 +1475,8 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
           mesh->setCoords(myCoords);
           myCoords->decrRef();
           paramesh=new ParaMESH(mesh,*target_group,targetMeshName);
-          DataArrayInt *da=DataArrayInt::New();
-          const int globalNumberingP2[5]={0,1,2,3,4};
+          DataArrayIdType *da=DataArrayIdType::New();
+          const mcIdType globalNumberingP2[5]={0,1,2,3,4};
           da->useArray(globalNumberingP2,false,DeallocType::CPP_DEALLOC,5,1);
           paramesh->setNodeGlobal(da);
           da->decrRef();
@@ -1484,7 +1484,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
       if(rank==3)
         {
           double coords[6]={0.2,0.2, 0.7,-0.3, 0.7,0.2};
-          int conn[3]={0,2,1};
+          mcIdType conn[3]={0,2,1};
           //int globalNode[3]={1,0,5};
           mesh=MEDCouplingUMesh::New("Target mesh Proc3",2);
           mesh->allocateCells(1);
@@ -1496,8 +1496,8 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
           mesh->setCoords(myCoords);
           myCoords->decrRef();
           paramesh=new ParaMESH(mesh,*target_group,targetMeshName);
-          DataArrayInt *da=DataArrayInt::New();
-          const int globalNumberingP3[3]={4,2,5};
+          DataArrayIdType *da=DataArrayIdType::New();
+          const mcIdType globalNumberingP3[3]={4,2,5};
           da->useArray(globalNumberingP3,false,DeallocType::CPP_DEALLOC,3,1);
           paramesh->setNodeGlobal(da);
           da->decrRef();
@@ -1505,7 +1505,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
       if(rank==4)
         {
           double coords[12]={-0.3,0.2, -0.3,0.7, 0.2,0.7, 0.2,0.2, 0.7,0.7, 0.7,0.2};
-          int conn[8]={0,1,2,3, 3,2,4,5};
+          mcIdType conn[8]={0,1,2,3, 3,2,4,5};
           //int globalNode[6]={2,6,7,1,8,5};
           mesh=MEDCouplingUMesh::New("Target mesh Proc4",2);
           mesh->allocateCells(2);
@@ -1518,8 +1518,8 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
           mesh->setCoords(myCoords);
           myCoords->decrRef();
           paramesh=new ParaMESH(mesh,*target_group,targetMeshName);
-          DataArrayInt *da=DataArrayInt::New();
-          const int globalNumberingP4[6]={3,6,7,4,8,5};
+          DataArrayIdType *da=DataArrayIdType::New();
+          const mcIdType globalNumberingP4[6]={3,6,7,4,8,5};
           da->useArray(globalNumberingP4,false,DeallocType::CPP_DEALLOC,6,1);
           paramesh->setNodeGlobal(da);
           da->decrRef();
@@ -1636,7 +1636,7 @@ void ParaMEDMEMTest::testInterpKernelDEC2DM1D_P0P0()
       myCoords->decrRef();
       if(rank==0)
         {
-          int targetConn[7]={0,3,4,1, 1,4,2};
+          mcIdType targetConn[7]={0,3,4,1, 1,4,2};
           mesh->allocateCells(2);
           mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
           mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+4);
@@ -1644,7 +1644,7 @@ void ParaMEDMEMTest::testInterpKernelDEC2DM1D_P0P0()
         }
       else
         { 
-          int targetConn[11]={4,5,2, 6,7,4,3, 7,8,5,4};
+          mcIdType targetConn[11]={4,5,2, 6,7,4,3, 7,8,5,4};
           mesh->allocateCells(3);
           mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
           mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+3);
@@ -1869,7 +1869,7 @@ void ParaMEDMEMTest::testInterpKernelDECPartialProcs()
           std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
           mesh->setCoords(myCoords);
           myCoords->decrRef();
-          int targetConn[4]={0,2,3,1};
+          mcIdType targetConn[4]={0,2,3,1};
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn);
           mesh->finishInsertingCells();
@@ -1894,7 +1894,7 @@ void ParaMEDMEMTest::testInterpKernelDECPartialProcs()
           std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
           mesh->setCoords(myCoords);
           myCoords->decrRef();
-          int targetConn[6]={0,2,1,2,3,1};
+          mcIdType targetConn[6]={0,2,1,2,3,1};
           mesh->allocateCells(2);
           mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn);
           mesh->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,targetConn+3);
@@ -1962,7 +1962,7 @@ void ParaMEDMEMTest::testInterpKernelDEC3DSurfEmptyBBox()
   if(source_group->containsMyRank())
     {
       double coords[15]={1.,0.,0., 2.,0.,0., 2.,2.,0., 0.,2.,0., 0.5,0.5,1.};
-      int conn[7]={0,1,2,3,0,3,4};
+      mcIdType conn[7]={0,1,2,3,0,3,4};
       mesh=MEDCouplingUMesh::New("Source mesh Proc0",2);
       mesh->allocateCells(2);
       mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
@@ -1987,7 +1987,7 @@ void ParaMEDMEMTest::testInterpKernelDEC3DSurfEmptyBBox()
       if(rank==1)
         {
           double coords[12]={0.25,0.25,0.5, 0.,0.25,0.5, 0.,0.,0.5, 0.25,0.,0.5};
-          int conn[4]={0,1,2,3};
+          mcIdType conn[4]={0,1,2,3};
           mesh=MEDCouplingUMesh::New("Target mesh Proc1",2);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
@@ -2002,7 +2002,7 @@ void ParaMEDMEMTest::testInterpKernelDEC3DSurfEmptyBBox()
       if(rank==2)
         {
           double coords[12]={0.,0.25,0.5, 0.,0.,0.5, -1.,0.,0.5, -1.,0.25,0.5};
-          int conn[4]={0,1,2,3};
+          mcIdType conn[4]={0,1,2,3};
           mesh=MEDCouplingUMesh::New("Target mesh Proc2",2);
           mesh->allocateCells(1);
           mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,conn);
index 410b5ce6a3a6ca6154e8c6f0c6b9298f3b621c00..06c081ebbb4784b49910d9d66eea119f4a2b23a5 100644 (file)
@@ -196,7 +196,7 @@ void prepareData1(int rank, NatureOfField nature,
       std::copy(coordsS,coordsS+10,myCoords->getPointer());
       meshS->setCoords(myCoords);
       myCoords->decrRef();
-      int connS[7]={0,3,4,1, 1,4,2};
+      mcIdType connS[7]={0,3,4,1, 1,4,2};
       meshS->allocateCells(2);
       meshS->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,connS);
       meshS->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,connS+4);
@@ -215,7 +215,7 @@ void prepareData1(int rank, NatureOfField nature,
       std::copy(coordsT,coordsT+6,myCoords->getPointer());
       meshT->setCoords(myCoords);
       myCoords->decrRef();
-      int connT[3]={0,2,1};
+      mcIdType connT[3]={0,2,1};
       meshT->allocateCells(1);
       meshT->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,connT);
       meshT->finishInsertingCells();
@@ -238,7 +238,7 @@ void prepareData1(int rank, NatureOfField nature,
       std::copy(coordsS,coordsS+10,myCoords->getPointer());
       meshS->setCoords(myCoords);
       myCoords->decrRef();
-      int connS[7]={0,1,2, 1,3,4,2};
+      mcIdType connS[7]={0,1,2, 1,3,4,2};
       meshS->allocateCells(2);
       meshS->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,connS);
       meshS->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,connS+3);
@@ -257,7 +257,7 @@ void prepareData1(int rank, NatureOfField nature,
       std::copy(coordsT,coordsT+6,myCoords->getPointer());
       meshT->setCoords(myCoords);
       myCoords->decrRef();
-      int connT[3]={0,2,1};
+      mcIdType connT[3]={0,2,1};
       meshT->allocateCells(1);
       meshT->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,connT);
       meshT->finishInsertingCells();
@@ -280,7 +280,7 @@ void prepareData1(int rank, NatureOfField nature,
       std::copy(coordsS,coordsS+8,myCoords->getPointer());
       meshS->setCoords(myCoords);
       myCoords->decrRef();
-      int connS[4]={0,2,3,1};
+      mcIdType connS[4]={0,2,3,1};
       meshS->allocateCells(1);
       meshS->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,connS);
       meshS->finishInsertingCells();
@@ -298,7 +298,7 @@ void prepareData1(int rank, NatureOfField nature,
       std::copy(coordsT,coordsT+6,myCoords->getPointer());
       meshT->setCoords(myCoords);
       myCoords->decrRef();
-      int connT[3]={0,1,2};
+      mcIdType connT[3]={0,1,2};
       meshT->allocateCells(1);
       meshT->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,connT);
       meshT->finishInsertingCells();
@@ -319,7 +319,7 @@ void prepareData2_buildOneSquare(MEDCouplingUMesh* & meshS_0, MEDCouplingUMesh*
   myCoords->alloc(5,2);
   std::copy(coords,coords+10,myCoords->getPointer());
   meshS_0->setCoords(myCoords);  myCoords->decrRef();
-  int connS[4]={0,1,2,3};
+  mcIdType connS[4]={0,1,2,3};
   meshS_0->allocateCells(2);
   meshS_0->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,connS);
   //
@@ -329,7 +329,7 @@ void prepareData2_buildOneSquare(MEDCouplingUMesh* & meshS_0, MEDCouplingUMesh*
   std::copy(coords,coords+10,myCoords->getPointer());
   meshT_0->setCoords(myCoords);
   myCoords->decrRef();
-  int connT[12]={0,1,4,  1,2,4,  2,3,4,  3,0,4};
+  mcIdType connT[12]={0,1,4,  1,2,4,  2,3,4,  3,0,4};
   meshT_0->allocateCells(4);
   meshT_0->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,connT);
   meshT_0->insertNextCell(INTERP_KERNEL::NORM_TRI3,3,connT+3);
index b538f7317c6c5ed895fdd15f032ce78306d3f195..b898cd4fd9554168ab4e98896c7baf50d1fbd21d 100644 (file)
@@ -106,7 +106,7 @@ void ParaMEDMEMTest::testStructuredCoincidentDEC() {
     parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
 
     int nb_local=mesh->getNumberOfCells();
-    const int* global_numbering = paramesh->getGlobalNumberingCell();
+    const mcIdType* global_numbering = paramesh->getGlobalNumberingCell();
     
     double *value=parafield->getField()->getArray()->getPointer();
     for(int ielem=0; ielem<nb_local;ielem++)
index 0b2d44139a544251f36bdf80b21e4e2b706c413f..9a3b6cc1d9d4b1794219dcc15447887e599b1eca 100644 (file)
@@ -213,8 +213,8 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
           mpi_access.status( RecvRequestId[i] , source , tag , error ,
                              outcount ) ;
           if ( i != 0 ) {
-            if ( outcount != 1000*i |
-                 (recvbuf[i][outcount-1] != (outcount-1)) ) {
+            if (( outcount != 1000*i ) ||
+                ((recvbuf[i][outcount-1] != (outcount-1)))) {
               ostringstream strstream ;
               strstream << "========================================================"
                         << endl << "test" << myrank << " outcount " << outcount
index 1e77d563232b7dd301aee6fadecc1a5c4f7320e2..c25c523cd3fce7dac83dfd4377076b498f51638e 100644 (file)
 
 ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
@@ -29,6 +33,9 @@ ELSE()
   SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 ENDIF()
 SET(SWIG_MODULE_ParaMEDMEM_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
+IF(MEDCOUPLING_USE_64BIT_IDS)
+  STRING(APPEND SWIG_MODULE_ParaMEDMEM_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
index 66266c53833c1e9815ad8f5b4fcb2dcda690407f..411fcae2280d7b8656afe43501956122107be9c1 100644 (file)
@@ -77,6 +77,42 @@ def MEDCouplingDataArrayIntImod(self,*args):
 def MEDCouplingDataArrayIntIpow(self,*args):
     import _ParaMEDMEM
     return _ParaMEDMEM.DataArrayInt____ipow___(self, self, *args)
+def MEDCouplingDataArrayInt32Iadd(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32Isub(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32Imul(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32Idiv(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32Imod(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32____imod___(self, self, *args)
+def MEDCouplingDataArrayInt32Ipow(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32____ipow___(self, self, *args)
+def MEDCouplingDataArrayInt64Iadd(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt64____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64Isub(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt64____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64Imul(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt64____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64Idiv(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt64____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64Imod(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt64____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64Ipow(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt64____ipow___(self, self, *args)
 def MEDCouplingDataArrayFloatIadd(self,*args):
     import _ParaMEDMEM
     return _ParaMEDMEM.DataArrayFloat____iadd___(self, self, *args)
@@ -101,21 +137,36 @@ def MEDCouplingDataArrayDoubleTupleImul(self,*args):
 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
     import _ParaMEDMEM
     return _ParaMEDMEM.DataArrayDoubleTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayInt32TupleIadd(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIsub(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImul(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIdiv(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImod(self,*args):
+    import _ParaMEDMEM
+    return _ParaMEDMEM.DataArrayInt32Tuple____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIadd(self,*args):
     import _ParaMEDMEM
-    return _ParaMEDMEM.DataArrayIntTuple____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIsub(self,*args):
+    return _ParaMEDMEM.DataArrayInt64Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIsub(self,*args):
     import _ParaMEDMEM
-    return _ParaMEDMEM.DataArrayIntTuple____isub___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImul(self,*args):
+    return _ParaMEDMEM.DataArrayInt64Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImul(self,*args):
     import _ParaMEDMEM
-    return _ParaMEDMEM.DataArrayIntTuple____imul___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIdiv(self,*args):
+    return _ParaMEDMEM.DataArrayInt64Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIdiv(self,*args):
     import _ParaMEDMEM
-    return _ParaMEDMEM.DataArrayIntTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImod(self,*args):
+    return _ParaMEDMEM.DataArrayInt64Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImod(self,*args):
     import _ParaMEDMEM
-    return _ParaMEDMEM.DataArrayIntTuple____imod___(self, self, *args)
+    return _ParaMEDMEM.DataArrayInt64Tuple____imod___(self, self, *args)
 def MEDCouplingDenseMatrixIadd(self,*args):
     import _ParaMEDMEM
     return _ParaMEDMEM.DenseMatrix____iadd___(self, self, *args)
index ce712e1f9752e641854dfdad59c989458a7ff8b2..a75ae3074f2dbe7aaf21a0a72ac871eb5e137440 100644 (file)
@@ -72,30 +72,30 @@ public:
 {
   PyObject *getGlobalNumberingCell2() const
   {
-    const int *tmp=self->getGlobalNumberingCell();
-    int size=self->getCellMesh()->getNumberOfCells();
+    const mcIdType *tmp=self->getGlobalNumberingCell();
+    mcIdType size=self->getCellMesh()->getNumberOfCells();
     PyObject *ret=PyList_New(size);
-    for(int i=0;i<size;i++)
+    for(mcIdType i=0;i<size;i++)
       PyList_SetItem(ret,i,PyInt_FromLong(tmp[i])); 
     return ret;
   }
 
   PyObject *getGlobalNumberingFace2() const
   {
-    const int *tmp=self->getGlobalNumberingFace();
-    int size=self->getFaceMesh()->getNumberOfCells();
+    const mcIdType *tmp=self->getGlobalNumberingFace();
+    mcIdType size=self->getFaceMesh()->getNumberOfCells();
     PyObject *ret=PyList_New(size);
-    for(int i=0;i<size;i++)
+    for(mcIdType i=0;i<size;i++)
       PyList_SetItem(ret,i,PyInt_FromLong(tmp[i])); 
     return ret;
   }
 
   PyObject *getGlobalNumberingNode2() const
   {
-    const int *tmp=self->getGlobalNumberingNode();
-    int size=self->getCellMesh()->getNumberOfNodes();
+    const mcIdType *tmp=self->getGlobalNumberingNode();
+    mcIdType size=self->getCellMesh()->getNumberOfNodes();
     PyObject *ret=PyList_New(size);
-    for(int i=0;i<size;i++)
+    for(mcIdType i=0;i<size;i++)
       PyList_SetItem(ret,i,PyInt_FromLong(tmp[i])); 
     return ret;
   }
index 56c928ff391617f5e87176ad458a07f956414294..11430ce9895ff222a848594a5d2508b72d4698ef 100644 (file)
@@ -30,6 +30,9 @@ ELSE()
   SET_SOURCE_FILES_PROPERTIES(medcoupling.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 ENDIF()
 SET(SWIG_MODULE_medcoupling_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
+IF(MEDCOUPLING_USE_64BIT_IDS)
+  STRING(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
 SET(medcoupling_SWIG_DPYS_FILES medcoupling.i)
 
index 72032a3a470d8629dbb660b85007d36fdad47aeb..b77d4dc2bfadbe903ba15ce702da54f55a94410b 100644 (file)
@@ -179,24 +179,42 @@ def MEDCouplingFieldDoubleIdiv(self,*args):
 def MEDCouplingFieldDoubleIpow(self,*args):
     import _medcoupling
     return _medcoupling.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def MEDCouplingDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayInt32Iadd(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayInt____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntIsub(self,*args):
+    return _medcoupling.DataArrayInt32____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32Isub(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayInt____isub___(self, self, *args)
-def MEDCouplingDataArrayIntImul(self,*args):
+    return _medcoupling.DataArrayInt32____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32Imul(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayInt____imul___(self, self, *args)
-def MEDCouplingDataArrayIntIdiv(self,*args):
+    return _medcoupling.DataArrayInt32____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32Idiv(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayInt____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntImod(self,*args):
+    return _medcoupling.DataArrayInt32____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32Imod(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayInt____imod___(self, self, *args)
-def MEDCouplingDataArrayIntIpow(self,*args):
+    return _medcoupling.DataArrayInt32____imod___(self, self, *args)
+def MEDCouplingDataArrayInt32Ipow(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayInt____ipow___(self, self, *args)
+    return _medcoupling.DataArrayInt32____ipow___(self, self, *args)
+def MEDCouplingDataArrayInt64Iadd(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt64____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64Isub(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt64____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64Imul(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt64____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64Idiv(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt64____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64Imod(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt64____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64Ipow(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt64____ipow___(self, self, *args)
 def MEDCouplingDataArrayFloatIadd(self,*args):
     import _medcoupling
     return _medcoupling.DataArrayFloat____iadd___(self, self, *args)
@@ -221,21 +239,36 @@ def MEDCouplingDataArrayDoubleTupleImul(self,*args):
 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
     import _medcoupling
     return _medcoupling.DataArrayDoubleTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayInt32TupleIadd(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt32Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIsub(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt32Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImul(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt32Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIdiv(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt32Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImod(self,*args):
+    import _medcoupling
+    return _medcoupling.DataArrayInt32Tuple____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIadd(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayIntTuple____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIsub(self,*args):
+    return _medcoupling.DataArrayInt64Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIsub(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayIntTuple____isub___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImul(self,*args):
+    return _medcoupling.DataArrayInt64Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImul(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayIntTuple____imul___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIdiv(self,*args):
+    return _medcoupling.DataArrayInt64Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIdiv(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayIntTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImod(self,*args):
+    return _medcoupling.DataArrayInt64Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImod(self,*args):
     import _medcoupling
-    return _medcoupling.DataArrayIntTuple____imod___(self, self, *args)
+    return _medcoupling.DataArrayInt64Tuple____imod___(self, self, *args)
 def MEDCouplingDenseMatrixIadd(self,*args):
     import _medcoupling
     return _medcoupling.DenseMatrix____iadd___(self, self, *args)
index 1b9b419b69561942e8fe80fc493b5f44ba85631f..d320291f195e83d89641bcd7dd50890bb1eb73f3 100644 (file)
@@ -23,6 +23,10 @@ IF(Boost_FOUND)
   ADD_DEFINITIONS("-DENABLE_BOOST")
 ENDIF(Boost_FOUND)
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 # Include directories
 INCLUDE_DIRECTORIES(
   ${MEDFILE_INCLUDE_DIRS}
index 094446a650d7b0920375ef6183a72570641547f8..dab38c8688a7782447c6e75f7cb5029f400f61f6 100644 (file)
 #include <boost/graph/properties.hpp>
 #include <boost/graph/bandwidth.hpp>
 
-void BOOSTRenumbering::renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm)
+void BOOSTRenumbering::renumber(const mcIdType *graph, const mcIdType *index_graph, mcIdType nbCell, MEDCoupling::DataArrayIdType *&iperm, MEDCoupling::DataArrayIdType *&perm)
 {
-  MEDCoupling::MCAuto<MEDCoupling::DataArrayInt> out0(MEDCoupling::DataArrayInt::New()),out1(MEDCoupling::DataArrayInt::New());
+  MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType> out0(MEDCoupling::DataArrayIdType::New()),out1(MEDCoupling::DataArrayIdType::New());
   out0->alloc(nbCell,1); out1->alloc(nbCell,1);
   out0->fillWithZero(); out1->fillWithZero();
   //
   typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, 
      boost::property<boost::vertex_color_t, boost::default_color_type,
-       boost::property<boost::vertex_degree_t,int> > > Graph;
+       boost::property<boost::vertex_degree_t,mcIdType> > > Graph;
   typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
   typedef boost::graph_traits<Graph>::vertices_size_type size_type;
   Graph G(nbCell);
-  for (int i=0;i<nbCell;++i)
-    for (int j=index_graph[i];j<index_graph[i+1];++j)
+  for (mcIdType i=0;i<nbCell;++i)
+    for (mcIdType j=index_graph[i];j<index_graph[i+1];++j)
       add_edge(i,graph[j],G);
   boost::property_map<Graph, boost::vertex_index_t>::type
     index_map = boost::get(boost::vertex_index, G);
   boost::cuthill_mckee_ordering(G, out0->getPointer(), boost::get(boost::vertex_color, G),
                            boost::make_degree_map(G));
-  int *out0Ptr(out0->getPointer()),*out1Ptr(out1->getPointer());
-  for(int c=0;c!=nbCell;++c)
+  mcIdType *out0Ptr(out0->getPointer()),*out1Ptr(out1->getPointer());
+  for(mcIdType c=0;c!=nbCell;++c)
     out1Ptr[index_map[out0Ptr[nbCell-c-1]]]=c;
   out0->reverse();
   iperm=out0.retn(); perm=out1.retn();
index f82bab2a73c255a49d29689f98bc251163dd055d..4a62e4f66b8c9256d95888a7920a68bc7308a866 100644 (file)
@@ -26,7 +26,7 @@
 class RENUMBER_EXPORT BOOSTRenumbering:public Renumbering
 {
 public:
-  void renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm);
+  void renumber(const mcIdType *graph, const mcIdType *index_graph, mcIdType nbCell, MEDCoupling::DataArrayIdType *&iperm, MEDCoupling::DataArrayIdType *&perm);
 };
 
 #endif /*BOOSTRENUMBERING_HXX_*/
index 3fb90960e6cda8a991937ab8acc6ad14038a0eda..f2593b0519e136414b14c009dd3c8c42c37d28de 100644 (file)
@@ -33,13 +33,36 @@ extern "C"
 
 #include "RENUMBER_METISRenumbering.hxx"
 
-void METISRenumbering::renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm)
+#ifdef MEDCOUPLING_USE_64BIT_IDS
+#define ID_TYPE_SIZE 64
+#else
+#define ID_TYPE_SIZE 32
+#endif
+
+void METISRenumbering::renumber(const mcIdType *graph, const mcIdType *index_graph, mcIdType nbCell, MEDCoupling::DataArrayIdType *&iperm, MEDCoupling::DataArrayIdType *&perm)
 {
-  MEDCoupling::MCAuto<MEDCoupling::DataArrayInt> out0(MEDCoupling::DataArrayInt::New()),out1(MEDCoupling::DataArrayInt::New());
+  MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType> out0(MEDCoupling::DataArrayIdType::New()),out1(MEDCoupling::DataArrayIdType::New());
   out0->alloc(nbCell,1); out1->alloc(nbCell,1);
   out0->fillWithZero(); out1->fillWithZero();
   int num_flag=1;
   int options=0;
-  METIS_NodeND(&nbCell,(int*)index_graph,(int*)graph,&num_flag,&options,out0->getPointer(),out1->getPointer());
+
+#if ID_TYPE_SIZE == IDXTYPEWIDTH
+
+  METIS_NodeND(&nbCell,(idx_t*)index_graph,(idx_t*)graph,&num_flag,&options,out0->getPointer(),out1->getPointer());
+
+#else
+
+  mcIdType indexSize = nbCell + 1, graphSize = index_graph[indexSize];
+  std::vector<idx_t> indexVec( index_graph, index_graph + indexSize );
+  std::vector<idx_t> graphVec( graph, graph + graphSize );
+  std::vector<idx_t> out0Vec( nbCell ), out1Vec( nbCell );
+  idx_t nb = static_cast<idx_t>( nbCell );
+  METIS_NodeND(&nb,indexVec.data(),graphVec.data(),&num_flag,&options,out0Vec.data(),out1Vec.data());
+  std::copy( out0Vec.begin(),out0Vec.end(),out0->getPointer() );
+  std::copy( out1Vec.begin(),out1Vec.end(),out1->getPointer() );
+
+#endif
+
   iperm=out0.retn(); perm=out1.retn();
 }
index c29dd241992198ff22bee475bdb928bc1a4bc3a5..4fa31399d252a3b5b198d6b5ae01481582a2fbd0 100644 (file)
@@ -26,7 +26,7 @@
 class RENUMBER_EXPORT METISRenumbering:public Renumbering
 {
 public:
-  virtual void renumber(const int *graph, const int *index_graph, int nb_cell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm);
+  virtual void renumber(const mcIdType *graph, const mcIdType *index_graph, mcIdType nb_cell, MEDCoupling::DataArrayIdType *&iperm, MEDCoupling::DataArrayIdType *&perm);
 };
 
 #endif /*METISRENUMBERING_HXX_*/
index 12e034b494ce618a395b5d33d245cb166e924a9a..df2c83d7f1f5dc5ebd721ca71191ec54dc21b311 100644 (file)
 
 namespace MEDCoupling
 {
-  class DataArrayInt;
+  class DataArrayIdType;
 }
 
 class RENUMBER_EXPORT Renumbering
 {
 public:
-  virtual void renumber(const int *graph, const int *index_graph, int nbCell, MEDCoupling::DataArrayInt *&iperm, MEDCoupling::DataArrayInt *&perm) = 0;
+  virtual void renumber(const mcIdType *graph, const mcIdType *index_graph, mcIdType nbCell, MEDCoupling::DataArrayIdType *&iperm, MEDCoupling::DataArrayIdType *&perm) = 0;
   virtual ~Renumbering() { }
 }; 
 
index 50d78d78e73ba9a8b6bf65ad8c106522608bfdaa..8b2a7782cc9bb693625259f2fe37808d07bb45e8 100644 (file)
@@ -38,7 +38,7 @@ using namespace MED_RENUMBER;
 int main(int argc, char** argv)
 {
   double t_begin,t_read_st,t_compute_graph,t_family,t_field;
-  t_begin=clock();
+  t_begin=(double)clock();
   if (argc <5)
     {
       cerr << "Usage : " << argv[0] 
@@ -65,39 +65,39 @@ int main(int argc, char** argv)
       std::ostringstream oss; oss << "In file \"" << filename_in << "\" the mesh name \"" << meshname<< "\" exists but is not unstructured !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
-  t_read_st=clock();
+  t_read_st=(double)clock();
   cout << (t_read_st-t_begin)/(double) CLOCKS_PER_SEC << "s" << endl << flush;
   // Reading mesh
   MCAuto<MEDCouplingUMesh> workMesh=mc->getMeshAtLevel(0);
-  std::vector<int> code=workMesh->getDistributionOfTypes();
+  //std::vector<mcIdType> code=workMesh->getDistributionOfTypes();
   cout << "Building the graph : " << flush;
-  DataArrayInt *neighb=0,*neighbI=0;
+  DataArrayIdType *neighb=0,*neighbI=0;
   workMesh->computeNeighborsOfCells(neighb,neighbI);
-  MCAuto<DataArrayInt> neighbSafe(neighb),neighbISafe(neighbI),ipermSafe,permSafe;
-  const int *graph=neighbSafe->begin();
-  const int *graph_index=neighbISafe->begin();
+  MCAuto<DataArrayIdType> neighbSafe(neighb),neighbISafe(neighbI),ipermSafe,permSafe;
+  const mcIdType *graph=neighbSafe->begin();
+  const mcIdType *graph_index=neighbISafe->begin();
   // Compute permutation iperm->new2old perm->old2new
-  DataArrayInt *iperm(0),*perm(0);
+  DataArrayIdType *iperm(0),*perm(0);
   Renumbering *renumb=RenumberingFactory(type_renum);
   renumb->renumber(graph,graph_index,workMesh->getNumberOfCells(),iperm,perm);
   ipermSafe=iperm; permSafe=perm;
   delete renumb;
   ipermSafe=0;//erase new2old, we are using only old 2 new
-  t_compute_graph=clock();
+  t_compute_graph=(double)clock();
   cout << " : " << (t_compute_graph-t_read_st)/(double) CLOCKS_PER_SEC << "s" << endl;
   cout.flush();
   // Connectivity
   cout << "Reordering connectivity & families and writing : " << flush;
   workMesh->renumberCells(perm->begin(),false);
   mc->setMeshAtLevel(0,workMesh);
-  const DataArrayInt *famField=mc->getFamilyFieldAtLevel(0);
+  const DataArrayIdType *famField=mc->getFamilyFieldAtLevel(0);
   if(famField)
     {
-      MCAuto<DataArrayInt> famField2=famField->renumber(perm->begin());
+      MCAuto<DataArrayIdType> famField2=famField->renumber(perm->begin());
       mc->setFamilyFieldArr(0,famField2);
     }
   mc->write(filename_out,2);
-  t_family=clock();
+  t_family=(double)clock();
   cout << " : " << (t_family-t_compute_graph)/(double) CLOCKS_PER_SEC << "s" << endl << flush;
   // Fields
   cout << "Reordering fields and writing : " << flush;
@@ -122,7 +122,7 @@ int main(int argc, char** argv)
       fs->write(filename_out,0);
       //fs->renumberEntitiesLyingOnMesh(meshname,code,code,o2n); bugged
     }
-  t_field=clock();
+  t_field=(double)clock();
   cout << " : " << (t_field-t_family)/(double) CLOCKS_PER_SEC << "s" << endl << flush;
   return 0;
 }
index 9c265924bdd52341b984c92399f76a0cd90c81ec..a85a1a6bebdde939ab64bdf77f0366c255b7b327 100644 (file)
@@ -21,6 +21,10 @@ INCLUDE(${SWIG_USE_FILE})
 
 ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
 
+IF (NOT DEFINED MSVC)
+  ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
 SET_SOURCE_FILES_PROPERTIES(MEDRenumber.i PROPERTIES CPLUSPLUS ON)
 IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
   SET_SOURCE_FILES_PROPERTIES(MEDRenumber.i PROPERTIES SWIG_FLAGS "-py3")
@@ -28,6 +32,9 @@ ELSE()
   SET_SOURCE_FILES_PROPERTIES(MEDRenumber.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 ENDIF()
 SET(SWIG_MODULE_MEDRenumber_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS};-DWITHOUT_AUTOFIELD")
+IF(MEDCOUPLING_USE_64BIT_IDS)
+  STRING(APPEND SWIG_MODULE_MEDRenumber_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
+ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
 SET (MEDRenumber_SWIG_DPYS_FILES
   MEDRenumberCommon.i
index 2060dd0e1cd11a46d60886821e139293a81eece8..1a4c7bdbe97336efcc7785f36a36dfed52a09eeb 100644 (file)
@@ -37,24 +37,42 @@ def MEDCouplingDataArrayDoubleIdiv(self,*args):
 def MEDCouplingDataArrayDoubleIpow(self,*args):
     import _MEDRenumber
     return _MEDRenumber.DataArrayDouble____ipow___(self, self, *args)
-def MEDCouplingDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayInt32Iadd(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayInt____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntIsub(self,*args):
+    return _MEDRenumber.DataArrayInt32____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32Isub(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayInt____isub___(self, self, *args)
-def MEDCouplingDataArrayIntImul(self,*args):
+    return _MEDRenumber.DataArrayInt32____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32Imul(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayInt____imul___(self, self, *args)
-def MEDCouplingDataArrayIntIdiv(self,*args):
+    return _MEDRenumber.DataArrayInt32____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32Idiv(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayInt____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntImod(self,*args):
+    return _MEDRenumber.DataArrayInt32____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32Imod(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayInt____imod___(self, self, *args)
-def MEDCouplingDataArrayIntIpow(self,*args):
+    return _MEDRenumber.DataArrayInt32____imod___(self, self, *args)
+def MEDCouplingDataArrayInt32Ipow(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayInt____ipow___(self, self, *args)
+    return _MEDRenumber.DataArrayInt32____ipow___(self, self, *args)
+def MEDCouplingDataArrayInt64Iadd(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64Isub(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64Imul(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64Idiv(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64Imod(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64Ipow(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64____ipow___(self, self, *args)
 def MEDCouplingDataArrayFloatIadd(self,*args):
     import _MEDRenumber
     return _MEDRenumber.DataArrayFloat____iadd___(self, self, *args)
@@ -79,21 +97,36 @@ def MEDCouplingDataArrayDoubleTupleImul(self,*args):
 def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
     import _MEDRenumber
     return _MEDRenumber.DataArrayDoubleTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayInt32TupleIadd(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt32Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIsub(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayIntTuple____iadd___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIsub(self,*args):
+    return _MEDRenumber.DataArrayInt32Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImul(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayIntTuple____isub___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImul(self,*args):
+    return _MEDRenumber.DataArrayInt32Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleIdiv(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayIntTuple____imul___(self, self, *args)
-def MEDCouplingDataArrayIntTupleIdiv(self,*args):
+    return _MEDRenumber.DataArrayInt32Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt32TupleImod(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayIntTuple____idiv___(self, self, *args)
-def MEDCouplingDataArrayIntTupleImod(self,*args):
+    return _MEDRenumber.DataArrayInt32Tuple____imod___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIadd(self,*args):
     import _MEDRenumber
-    return _MEDRenumber.DataArrayIntTuple____imod___(self, self, *args)
+    return _MEDRenumber.DataArrayInt64Tuple____iadd___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIsub(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64Tuple____isub___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImul(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64Tuple____imul___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleIdiv(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64Tuple____idiv___(self, self, *args)
+def MEDCouplingDataArrayInt64TupleImod(self,*args):
+    import _MEDRenumber
+    return _MEDRenumber.DataArrayInt64Tuple____imod___(self, self, *args)
 %}
 
 
@@ -106,44 +139,79 @@ DataArrayDouble.__imul__=MEDCouplingDataArrayDoubleImul
 DataArrayDouble.__idiv__=MEDCouplingDataArrayDoubleIdiv
 DataArrayDouble.__ipow__=MEDCouplingDataArrayDoubleIpow
 
-DataArrayInt.__reduce__=MEDCouplingDataArrayIntReduce
-DataArrayInt.__iadd__=MEDCouplingDataArrayIntIadd
-DataArrayInt.__isub__=MEDCouplingDataArrayIntIsub
-DataArrayInt.__imul__=MEDCouplingDataArrayIntImul
-DataArrayInt.__idiv__=MEDCouplingDataArrayIntIdiv
-DataArrayInt.__imod__=MEDCouplingDataArrayIntImod
-DataArrayInt.__ipow__=MEDCouplingDataArrayIntIpow
+DataArrayInt32.__reduce__=MEDCouplingDataArrayInt32Reduce
+DataArrayInt32.__iadd__=MEDCouplingDataArrayInt32Iadd
+DataArrayInt32.__isub__=MEDCouplingDataArrayInt32Isub
+DataArrayInt32.__imul__=MEDCouplingDataArrayInt32Imul
+DataArrayInt32.__idiv__=MEDCouplingDataArrayInt32Idiv
+DataArrayInt32.__imod__=MEDCouplingDataArrayInt32Imod
+DataArrayInt32.__ipow__=MEDCouplingDataArrayInt32Ipow
+DataArrayInt64.__reduce__=MEDCouplingDataArrayInt64Reduce
+DataArrayInt64.__iadd__=MEDCouplingDataArrayInt64Iadd
+DataArrayInt64.__isub__=MEDCouplingDataArrayInt64Isub
+DataArrayInt64.__imul__=MEDCouplingDataArrayInt64Imul
+DataArrayInt64.__idiv__=MEDCouplingDataArrayInt64Idiv
+DataArrayInt64.__imod__=MEDCouplingDataArrayInt64Imod
+DataArrayInt64.__ipow__=MEDCouplingDataArrayInt64Ipow
 
 DataArrayDoubleTuple.__iadd__=MEDCouplingDataArrayDoubleTupleIadd
 DataArrayDoubleTuple.__isub__=MEDCouplingDataArrayDoubleTupleIsub
 DataArrayDoubleTuple.__imul__=MEDCouplingDataArrayDoubleTupleImul
 DataArrayDoubleTuple.__idiv__=MEDCouplingDataArrayDoubleTupleIdiv
 
-DataArrayIntTuple.__iadd__=MEDCouplingDataArrayIntTupleIadd
-DataArrayIntTuple.__isub__=MEDCouplingDataArrayIntTupleIsub
-DataArrayIntTuple.__imul__=MEDCouplingDataArrayIntTupleImul
-DataArrayIntTuple.__idiv__=MEDCouplingDataArrayIntTupleIdiv
-DataArrayIntTuple.__imod__=MEDCouplingDataArrayIntTupleImod
+DataArrayInt32Tuple.__iadd__=MEDCouplingDataArrayInt32TupleIadd
+DataArrayInt32Tuple.__isub__=MEDCouplingDataArrayInt32TupleIsub
+DataArrayInt32Tuple.__imul__=MEDCouplingDataArrayInt32TupleImul
+DataArrayInt32Tuple.__idiv__=MEDCouplingDataArrayInt32TupleIdiv
+DataArrayInt32Tuple.__itruediv__=MEDCouplingDataArrayInt32TupleIdiv
+DataArrayInt32Tuple.__ifloordiv__=MEDCouplingDataArrayInt32TupleIdiv
+DataArrayInt32Tuple.__imod__=MEDCouplingDataArrayInt32TupleImod
+
+DataArrayInt64Tuple.__iadd__=MEDCouplingDataArrayInt64TupleIadd
+DataArrayInt64Tuple.__isub__=MEDCouplingDataArrayInt64TupleIsub
+DataArrayInt64Tuple.__imul__=MEDCouplingDataArrayInt64TupleImul
+DataArrayInt64Tuple.__idiv__=MEDCouplingDataArrayInt64TupleIdiv
+DataArrayInt64Tuple.__itruediv__=MEDCouplingDataArrayInt64TupleIdiv
+DataArrayInt64Tuple.__ifloordiv__=MEDCouplingDataArrayInt64TupleIdiv
+DataArrayInt64Tuple.__imod__=MEDCouplingDataArrayInt64TupleImod
+
+
+
 
 del INTERPKERNELExceptionReduce
-del MEDCouplingDataArrayDoubleReduce
-del MEDCouplingDataArrayIntReduce
 del MEDCouplingDataArrayDoubleIadd
-del MEDCouplingDataArrayDoubleIsub
-del MEDCouplingDataArrayDoubleImul
 del MEDCouplingDataArrayDoubleIdiv
-del MEDCouplingDataArrayIntIadd
-del MEDCouplingDataArrayIntIsub
-del MEDCouplingDataArrayIntImul
-del MEDCouplingDataArrayIntIdiv
-del MEDCouplingDataArrayIntImod
+del MEDCouplingDataArrayDoubleImul
+del MEDCouplingDataArrayDoubleIpow
+del MEDCouplingDataArrayDoubleIsub
+del MEDCouplingDataArrayDoubleReduce
 del MEDCouplingDataArrayDoubleTupleIadd
-del MEDCouplingDataArrayDoubleTupleIsub
-del MEDCouplingDataArrayDoubleTupleImul
 del MEDCouplingDataArrayDoubleTupleIdiv
-del MEDCouplingDataArrayIntTupleIadd
-del MEDCouplingDataArrayIntTupleIsub
-del MEDCouplingDataArrayIntTupleImul
-del MEDCouplingDataArrayIntTupleIdiv
-del MEDCouplingDataArrayIntTupleImod
+del MEDCouplingDataArrayDoubleTupleImul
+del MEDCouplingDataArrayDoubleTupleIsub
+del MEDCouplingDataArrayInt32Iadd
+del MEDCouplingDataArrayInt32Idiv
+del MEDCouplingDataArrayInt32Imod
+del MEDCouplingDataArrayInt32Imul
+del MEDCouplingDataArrayInt32Ipow
+del MEDCouplingDataArrayInt32Isub
+del MEDCouplingDataArrayInt32Reduce
+del MEDCouplingDataArrayInt32TupleIadd
+del MEDCouplingDataArrayInt32TupleIdiv
+del MEDCouplingDataArrayInt32TupleImod
+del MEDCouplingDataArrayInt32TupleImul
+del MEDCouplingDataArrayInt32TupleIsub
+del MEDCouplingDataArrayInt64Iadd
+del MEDCouplingDataArrayInt64Idiv
+del MEDCouplingDataArrayInt64Imod
+del MEDCouplingDataArrayInt64Imul
+del MEDCouplingDataArrayInt64Ipow
+del MEDCouplingDataArrayInt64Isub
+del MEDCouplingDataArrayInt64Reduce
+del MEDCouplingDataArrayInt64TupleIadd
+del MEDCouplingDataArrayInt64TupleIdiv
+del MEDCouplingDataArrayInt64TupleImod
+del MEDCouplingDataArrayInt64TupleImul
+del MEDCouplingDataArrayInt64TupleIsub
+
 %}
index 21c5c8e9d88dbffe517feecb01e28b527f0ca284..3b116cb842fc3a14a6713e38004dcfde7bf9fb5a 100644 (file)
@@ -32,17 +32,17 @@ class Renumbering
 public:
   %extend
   {
-    virtual PyObject *renumber(const MEDCoupling::DataArrayInt *graph, const MEDCoupling::DataArrayInt *index_graph)
+    virtual PyObject *renumber(const MEDCoupling::DataArrayIdType *graph, const MEDCoupling::DataArrayIdType *index_graph)
     {
       if(!graph || !index_graph)
         throw INTERP_KERNEL::Exception("wrap of Renumbering::renumber : One of the input arrays is NULL !");
       if(!graph->isAllocated() || !index_graph->isAllocated())
         throw INTERP_KERNEL::Exception("wrap of Renumbering::renumber : One of the input arrays is not allocated !");
-      MEDCoupling::DataArrayInt *out0(0),*out1(0);
+      MEDCoupling::DataArrayIdType *out0(0),*out1(0);
       self->renumber(graph->begin(),index_graph->begin(),index_graph->getNumberOfTuples()-1,out0,out1);
       PyObject *ret=PyTuple_New(2);
-      PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(out0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
-      PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(out1),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+      PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(out0),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
+      PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(out1),SWIGTITraits<mcIdType>::TI, SWIG_POINTER_OWN | 0 ));
       return ret;
     }
   }