]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
update for MEDCoupling 64 bits
authorBernard Sécherà <bernard.secher@cea.fr>
Wed, 14 Oct 2020 12:13:25 +0000 (14:13 +0200)
committerBernard Sécherà <bernard.secher@cea.fr>
Wed, 14 Oct 2020 12:13:25 +0000 (14:13 +0200)
26 files changed:
CDMATH/IJKmesh/inc/IJKMesh.hxx
CDMATH/IJKmesh/src/Field.cxx
CDMATH/IJKmesh/src/IJKMesh.cxx
CDMATH/mesh/inc/Mesh.hxx
CDMATH/mesh/src/Field.cxx
CDMATH/mesh/src/Mesh.cxx
CDMATH/tests/ressources/2DBrickWall/create_mesh_brickWall.py
CDMATH/tests/ressources/2DCartesien/create_mesh_of_squares_with_squares.py
CDMATH/tests/ressources/2DCheckerboard/create_checkerboard_2d_quad_meshes_amr.py
CDMATH/tests/ressources/2DCrossTriangles/create_mesh_of_square_with_cross_triangles.py
CDMATH/tests/ressources/2DDiskSpiderWeb/create_mesh_diskSpiderWeb.py
CDMATH/tests/ressources/2DDiskWithHexagons/create_mesh_diskWithHexagons.py
CDMATH/tests/ressources/2DEquilateralTriangles/create_mesh_squareWithEquilateralTriangles.py
CDMATH/tests/ressources/2DFlatCrossTriangles/create_mesh_of_square_with_cross_triangles.py
CDMATH/tests/ressources/2DHexagons/create_mesh_squareWithHexagons.py
CDMATH/tests/ressources/2DLocRefinedSquares/create_locally_refined_2d_quad_meshes_amr.py
CDMATH/tests/ressources/2DLongRectangles/create_mesh_of_rectangle_with_rectangles.py
CDMATH/tests/ressources/2DRightTriangles/create_mesh_right_triangles.py
CDMATH/tests/ressources/2DSkinnyTriangles/create_mesh_of_rectangle_with_right_triangles.py
CDMATH/tests/ressources/2DdiskWithSquares/create_mesh_diskWithSquares.py
CDMATH/tests/ressources/3DHexahedra/create_mesh_of_cube_with_cuboids.py
CDMATH/tests/ressources/3DLocRefinedCubes/create_locally_refined_3d_quad_meshes_amr.py
CDMATH/tests/ressources/scripts/convert_gmsh_to_med.py
CDMATH/tests/ressources/scripts/convert_typ_to_med.py
CDMATH/tests/ressources/scripts/weird_mesh.py
CDMATH/tests/swig/BoySurface/VTKnewReader.py

index e997137d1486189318e02958dae8430a0903b3eb..d2182c5e916a768a16ae6d4367a56131c9cc5485 100644 (file)
@@ -35,11 +35,11 @@ namespace MEDCoupling
 class MEDFileCMesh;
 class MEDCouplingMesh;
 class MEDCouplingIMesh;
-class DataArrayInt32;
+class DataArrayIdType;
 }
 namespace ParaMEDMEM
 {
-class DataArrayInt;
+class DataArrayIdType;
 }
 #include <MCAuto.hxx>
 #include "NormalizedGeometricTypes"
@@ -356,7 +356,7 @@ private: //----------------------------------------------------------------
        /*
         * The list of node groups.
         */
-       std::vector<MEDCoupling::DataArrayInt32 *> _nodeGroups;
+       std::vector<MEDCoupling::DataArrayIdType *> _nodeGroups;
        /*
         * The mesh MEDCouplingIMesh
         */
index 8169ba8eee0e1a14228331099d1e8dbd14d9c6a9..23c40733faec139aca12799a35cbd44ce007ff4a 100644 (file)
@@ -68,10 +68,10 @@ void Field::buildFieldMemoryStructure()
        {
                _field=MEDCouplingFieldDouble::New(ON_CELLS);
                array->alloc(_mesh.getNumberOfFaces(),_numberOfComponents);
-               DataArrayInt *desc=DataArrayInt::New();
-               DataArrayInt *descI=DataArrayInt::New();
-               DataArrayInt *revDesc=DataArrayInt::New();
-               DataArrayInt *revDescI=DataArrayInt::New();
+               DataArrayIdType *desc=DataArrayIdType::New();
+               DataArrayIdType *descI=DataArrayIdType::New();
+               DataArrayIdType *revDesc=DataArrayIdType::New();
+               DataArrayIdType *revDescI=DataArrayIdType::New();
                MEDCouplingUMesh *m3=mu->buildDescendingConnectivity(desc,descI,revDesc,revDescI);
                _field->setMesh(m3);
                desc->decrRef();
index b214fac1dbc92fffa0872c0724cf7942edb63b4e..5559c2dbc741f177ba931fc9824e7e696e34b3ac 100644 (file)
@@ -619,7 +619,7 @@ Mesh::getNameOfNodeGroups( void )  const
        return _nodeGroupNames;
 }
 
-vector<MEDCoupling::DataArrayInt *>
+vector<MEDCoupling::DataArrayIdType *>
 Mesh::getNodeGroups( void )  const
 {
        return _nodeGroups;
index a3f8a285d66d79c96ce1d98ffd27364f9fcd12c3..5a9deff5325aaed8152aae6923e20a147fac9dd5 100644 (file)
@@ -8,6 +8,10 @@
 #ifndef MESH_HXX_
 #define MESH_HXX_
 
+#include "MEDCouplingUMesh.hxx"
+#include "MEDCouplingIMesh.hxx"
+#include "MEDCouplingFieldDouble.hxx"
+
 /**
  * Mesh class is defined by
  * - case 1: file name of mesh med file (general unstructured)
@@ -25,11 +29,11 @@ class MEDFileUMesh;
 class MEDCouplingMesh;
 class MEDCouplingIMesh;
 class MEDCouplingUMesh;
-class DataArrayInt32;
+class DataArrayIdType;
 }
 namespace ParaMEDMEM
 {
-class DataArrayInt;
+class DataArrayIdType;
 }
 #include <MCAuto.hxx>
 #include "NormalizedGeometricTypes"
@@ -237,7 +241,7 @@ public: //----------------------------------------------------------------
 
        std::vector<double> getDXYZ() const ;// for structured meshes
 
-       std::vector<int> getCellGridStructure() const;// for structured meshes
+       std::vector<mcIdType> getCellGridStructure() const;// for structured meshes
 
        /**
         * \brief surcharge operator =
@@ -278,7 +282,7 @@ public: //----------------------------------------------------------------
         * \brief return the list of node groups
         * @return _nodeGroups
         */
-       std::vector<MEDCoupling::DataArrayInt32 *> getNodeGroups( void )  const ;
+       std::vector<MEDCoupling::DataArrayIdType *> getNodeGroups( void )  const ;
 
     /*
      * Functions to extract boundary nodes and faces Ids
@@ -387,7 +391,7 @@ private: //----------------------------------------------------------------
 
        double _zMax;
 
-       std::vector<int> _nxyz;
+       std::vector<mcIdType> _nxyz;
 
        std::vector<double> _dxyz;
        /*
@@ -442,7 +446,7 @@ private: //----------------------------------------------------------------
        /*
         * The list of node groups.
         */
-       std::vector<MEDCoupling::DataArrayInt32 *> _nodeGroups;
+       std::vector<MEDCoupling::DataArrayIdType *> _nodeGroups;
        /*
         * The mesh MEDCoupling
         */
index 699285d0faab1fbb84ec51cbeb450ce5df66272e..ad36403692359a2d75f48bca04e1d0d77469db02 100755 (executable)
@@ -68,10 +68,10 @@ void Field::buildFieldMemoryStructure()
        {
                _field=MEDCouplingFieldDouble::New(ON_CELLS);
                array->alloc(_mesh.getNumberOfFaces(),_numberOfComponents);
-               DataArrayInt *desc=DataArrayInt::New();
-               DataArrayInt *descI=DataArrayInt::New();
-               DataArrayInt *revDesc=DataArrayInt::New();
-               DataArrayInt *revDescI=DataArrayInt::New();
+               DataArrayIdType *desc=DataArrayIdType::New();
+               DataArrayIdType *descI=DataArrayIdType::New();
+               DataArrayIdType *revDesc=DataArrayIdType::New();
+               DataArrayIdType *revDescI=DataArrayIdType::New();
                MEDCouplingUMesh *m3=mu->buildDescendingConnectivity(desc,descI,revDesc,revDescI);
                _field->setMesh(m3);
                desc->decrRef();
index fce9fbf25ddf7d9de11671f66a5d7f04ed54962f..b1eb21614205232670d275021b83db14f1fcd833 100644 (file)
 #include "Cell.hxx"
 #include "Face.hxx"
 
+#include "CdmathException.hxx"
 #include "MEDFileMesh.hxx"
 #include "MEDLoader.hxx"
-#include "MEDCouplingUMesh.hxx"
-#include "MEDCouplingIMesh.hxx"
-#include "MEDCouplingFieldDouble.hxx"
-
-#include "CdmathException.hxx"
 
 #include <iostream>
 #include <stdio.h>
@@ -104,7 +100,7 @@ Mesh::Mesh( const MEDCoupling::MEDCouplingIMesh* mesh )
 
        double *originPtr = new double[_spaceDim];
        double *dxyzPtr = new double[_spaceDim];
-       int *nodeStrctPtr = new int[_spaceDim];
+       mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
 
        for(int i=0;i<_spaceDim;i++)
        {
@@ -552,10 +548,10 @@ Mesh::setGroups( const MEDFileUMesh* medmesh, MEDCouplingUMesh*  mu)
        for (unsigned int i=0;i<faceGroups.size();i++ )
        {
                string groupName=faceGroups[i];
-               vector<int> nonEmptyGrp(medmesh->getGrpNonEmptyLevels(groupName));
+               vector<mcIdType> nonEmptyGrp(medmesh->getGrpNonEmptyLevels(groupName));
                //We check if the group has a relative dimension equal to -1 
                //before call to the function getGroup(-1,groupName.c_str())
-               vector<int>::iterator it = find(nonEmptyGrp.begin(), nonEmptyGrp.end(), -1);
+               vector<mcIdType>::iterator it = find(nonEmptyGrp.begin(), nonEmptyGrp.end(), -1);
                if (it != nonEmptyGrp.end())
                {
                        cout<<"Boundary face group named "<< groupName << " found"<<endl;
@@ -614,8 +610,8 @@ Mesh::setGroups( const MEDFileUMesh* medmesh, MEDCouplingUMesh*  mu)
        for (unsigned int i=0;i<nodeGroups.size();i++ )
        {
                string groupName=nodeGroups[i];
-               DataArrayInt * nodeGroup=medmesh->getNodeGroupArr( groupName );
-               const int *nodeids=nodeGroup->getConstPointer();
+               DataArrayIdType * nodeGroup=medmesh->getNodeGroupArr( groupName );
+               const mcIdType *nodeids=nodeGroup->getConstPointer();
 
                if(nodeids!=NULL)
                {
@@ -659,10 +655,10 @@ MEDCouplingUMesh*
 Mesh::setMesh( void )
 //----------------------------------------------------------------------
 {
-       DataArrayInt *desc  = DataArrayInt::New();
-       DataArrayInt *descI = DataArrayInt::New();
-       DataArrayInt *revDesc  = DataArrayInt::New();
-       DataArrayInt *revDescI = DataArrayInt::New();
+       DataArrayIdType *desc  = DataArrayIdType::New();
+       DataArrayIdType *descI = DataArrayIdType::New();
+       DataArrayIdType *revDesc  = DataArrayIdType::New();
+       DataArrayIdType *revDescI = DataArrayIdType::New();
        MEDCouplingUMesh* mu = _mesh->buildUnstructured();
 
        mu->unPolyze();
@@ -671,11 +667,11 @@ Mesh::setMesh( void )
        
        MEDCouplingUMesh* mu2=mu->buildDescendingConnectivity2(desc,descI,revDesc,revDescI);//mesh of dimension N-1 containing the cell interfaces
     
-    const int *tmp = desc->getConstPointer();
-    const int *tmpI=descI->getConstPointer();
+    const mcIdType *tmp = desc->getConstPointer();
+    const mcIdType *tmpI=descI->getConstPointer();
 
-       const int *tmpA =revDesc->getConstPointer();
-       const int *tmpAI=revDescI->getConstPointer();
+       const mcIdType *tmpA =revDesc->getConstPointer();
+       const mcIdType *tmpAI=revDescI->getConstPointer();
 
     //const int *work=tmp+tmpI[id];//corresponds to buildDescendingConnectivity
 
@@ -707,22 +703,22 @@ Mesh::setMesh( void )
        DataArrayDouble *coo = mu->getCoords() ;
        const double    *cood=coo->getConstPointer();
 
-       DataArrayInt *revNode =DataArrayInt::New();
-       DataArrayInt *revNodeI=DataArrayInt::New();
+       DataArrayIdType *revNode =DataArrayIdType::New();
+       DataArrayIdType *revNodeI=DataArrayIdType::New();
        mu->getReverseNodalConnectivity(revNode,revNodeI) ;
-       const int *tmpN =revNode->getConstPointer();
-       const int *tmpNI=revNodeI->getConstPointer();
+       const mcIdType *tmpN =revNode->getConstPointer();
+       const mcIdType *tmpNI=revNodeI->getConstPointer();
 
-       DataArrayInt *revCell =DataArrayInt::New();
-       DataArrayInt *revCellI=DataArrayInt::New();
+       DataArrayIdType *revCell =DataArrayIdType::New();
+       DataArrayIdType *revCellI=DataArrayIdType::New();
        mu2->getReverseNodalConnectivity(revCell,revCellI) ;
-       const int *tmpC =revCell->getConstPointer();
-       const int *tmpCI=revCellI->getConstPointer();
+       const mcIdType *tmpC =revCell->getConstPointer();
+       const mcIdType *tmpCI=revCellI->getConstPointer();
 
-       const DataArrayInt *nodal  = mu2->getNodalConnectivity() ;
-       const DataArrayInt *nodalI = mu2->getNodalConnectivityIndex() ;
-       const int *tmpNE =nodal->getConstPointer();
-       const int *tmpNEI=nodalI->getConstPointer();
+       const DataArrayIdType *nodal  = mu2->getNodalConnectivity() ;
+       const DataArrayIdType *nodalI = mu2->getNodalConnectivityIndex() ;
+       const mcIdType *tmpNE =nodal->getConstPointer();
+       const mcIdType *tmpNEI=nodalI->getConstPointer();
 
        _numberOfCells = mu->getNumberOfCells() ;
        _cells      = new Cell[_numberOfCells] ;
@@ -736,14 +732,14 @@ Mesh::setMesh( void )
     _indexFacePeriodicSet=false;
 
     //Definition used if _meshDim =3 to determine the edges
-    DataArrayInt *desc2 =DataArrayInt::New();
-    DataArrayInt *descI2=DataArrayInt::New();
-    DataArrayInt *revDesc2 =DataArrayInt::New();
-    DataArrayInt *revDescI2=DataArrayInt::New();
-    DataArrayInt *revNode2 =DataArrayInt::New();
-    DataArrayInt *revNodeI2=DataArrayInt::New();
-    const int *tmpN2 ;
-    const int *tmpNI2;
+    DataArrayIdType *desc2 =DataArrayIdType::New();
+    DataArrayIdType *descI2=DataArrayIdType::New();
+    DataArrayIdType *revDesc2 =DataArrayIdType::New();
+    DataArrayIdType *revDescI2=DataArrayIdType::New();
+    DataArrayIdType *revNode2 =DataArrayIdType::New();
+    DataArrayIdType *revNodeI2=DataArrayIdType::New();
+    const mcIdType *tmpN2 ;
+    const mcIdType *tmpNI2;
     MEDCouplingUMesh* mu3;
     
        if (_meshDim == 1)
@@ -764,14 +760,14 @@ Mesh::setMesh( void )
        {
                for( int id=0;id<_numberOfCells;id++ )
                {
-                       const int *work=tmp+tmpI[id];
+                       const mcIdType *work=tmp+tmpI[id];
             int nbFaces=tmpI[id+1]-tmpI[id];
                        
                        int nbVertices=mu->getNumberOfNodesInCell(id) ;
             
                        Cell ci( nbVertices, nbFaces, surf[id], Point(coorBary[id], 0.0, 0.0) ) ;
 
-                       std::vector<int> nodeIdsOfCell ;
+                       std::vector<mcIdType> nodeIdsOfCell ;
                        mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
                        for( int el=0;el<nbVertices;el++ )
             {
@@ -796,13 +792,13 @@ Mesh::setMesh( void )
                for( int id(0), k(0); id<_numberOfNodes; id++, k+=_spaceDim)
                {
                        Point p(cood[k], 0.0, 0.0) ;
-                       const int *workc=tmpN+tmpNI[id];
-                       int nbCells=tmpNI[id+1]-tmpNI[id];
+                       const mcIdType *workc=tmpN+tmpNI[id];
+                       mcIdType nbCells=tmpNI[id+1]-tmpNI[id];
 
-                       const int *workf=tmpC+tmpCI[id];
-                       int nbFaces=tmpCI[id+1]-tmpCI[id];
-            const int *workn=tmpA+tmpAI[id];
-            int nbNeighbourNodes=tmpAI[id+1]-tmpAI[id];
+                       const mcIdType *workf=tmpC+tmpCI[id];
+                       mcIdType nbFaces=tmpCI[id+1]-tmpCI[id];
+            const mcIdType *workn=tmpA+tmpAI[id];
+            mcIdType nbNeighbourNodes=tmpAI[id+1]-tmpAI[id];
                        Node vi( nbCells, nbFaces, nbNeighbourNodes, p ) ;
 
                        for( int el=0;el<nbCells;el++ )
@@ -819,10 +815,10 @@ Mesh::setMesh( void )
                for(int id(0), k(0); id<_numberOfFaces; id++, k+=_spaceDim)
                {
                        Point p(cood[k], 0.0, 0.0) ;
-                       const int *workc=tmpA+tmpAI[id];
-                       int nbCells=tmpAI[id+1]-tmpAI[id];
+                       const mcIdType *workc=tmpA+tmpAI[id];
+                       mcIdType nbCells=tmpAI[id+1]-tmpAI[id];
 
-                       const int *workv=tmpNE+tmpNEI[id]+1;
+                       const mcIdType *workv=tmpNE+tmpNEI[id]+1;
                        Face fi( 1, nbCells, 1.0, p, 1.0, 0.0, 0.0) ;
                        fi.addNodeId(0,workv[0]) ;
 
@@ -854,10 +850,10 @@ Mesh::setMesh( void )
                /*Building mesh cells */
                for(int id(0), k(0); id<_numberOfCells; id++, k+=_spaceDim)
                {
-            const int *work=tmp+tmpI[id];      
-                       int nbFaces=tmpI[id+1]-tmpI[id];
+            const mcIdType *work=tmp+tmpI[id];      
+                       mcIdType nbFaces=tmpI[id+1]-tmpI[id];
             
-                       int nbVertices=mu->getNumberOfNodesInCell(id) ;
+                       mcIdType nbVertices=mu->getNumberOfNodesInCell(id) ;
 
                        vector<double> coorBaryXyz(3,0);
                        for (int d=0; d<_spaceDim; d++)
@@ -867,7 +863,7 @@ Mesh::setMesh( void )
                        Cell ci( nbVertices, nbFaces, surf[id], p ) ;
 
                        /* Filling cell nodes */
-                       std::vector<int> nodeIdsOfCell ;
+                       std::vector<mcIdType> nodeIdsOfCell ;
                        mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
                        for( int el=0;el<nbVertices;el++ )
                                ci.addNodeId(el,nodeIdsOfCell[el]) ;
@@ -876,7 +872,7 @@ Mesh::setMesh( void )
                        if(_spaceDim==_meshDim)//use the normal field generated by buildOrthogonalField()
                                for( int el=0;el<nbFaces;el++ )
                                {
-                    int faceIndex=(abs(work[el])-1);//=work[el] since Fortran type numbering was used, and negative sign means anticlockwise numbering
+                    mcIdType faceIndex=(abs(work[el])-1);//=work[el] since Fortran type numbering was used, and negative sign means anticlockwise numbering
                                        vector<double> xyzn(3,0);//Outer normal to the cell
                                        if (work[el]<0)
                                                for (int d=0; d<_spaceDim; d++)
@@ -891,10 +887,10 @@ Mesh::setMesh( void )
                        {
                                if(_meshDim==1)//we know in this case there are only two faces around the cell id, each face is composed of a single node
                                {//work[0]= first face global number, work[1]= second face global number
-                    int indexFace0=abs(work[0])-1;//=work[0] since Fortran type numbering was used, and negative sign means anticlockwise numbering
-                    int indexFace1=abs(work[1])-1;//=work[1] since Fortran type numbering was used, and negative sign means anticlockwise numbering
-                                       int idNodeA=(tmpNE+tmpNEI[indexFace0]+1)[0];//global number of the first  face node work[0]=(abs(work[0])-1)
-                                       int idNodeB=(tmpNE+tmpNEI[indexFace1]+1)[0];//global number of the second face node work[1]=(abs(work[1])-1)
+                    mcIdType indexFace0=abs(work[0])-1;//=work[0] since Fortran type numbering was used, and negative sign means anticlockwise numbering
+                    mcIdType indexFace1=abs(work[1])-1;//=work[1] since Fortran type numbering was used, and negative sign means anticlockwise numbering
+                                       mcIdType idNodeA=(tmpNE+tmpNEI[indexFace0]+1)[0];//global number of the first  face node work[0]=(abs(work[0])-1)
+                                       mcIdType idNodeB=(tmpNE+tmpNEI[indexFace1]+1)[0];//global number of the second face node work[1]=(abs(work[1])-1)
                                        Vector vecAB(3);
                                        for(int i=0;i<_spaceDim;i++)
                                                vecAB[i]=coo->getIJ(idNodeB,i) - coo->getIJ(idNodeA,i);
@@ -912,8 +908,8 @@ Mesh::setMesh( void )
                                        for( int el=0;el<nbFaces;el++ )
                                        {
                         int faceIndex=(abs(work[el])-1);//=work[el] since Fortran type numbering was used, and negative sign means anticlockwise numbering
-                                               const int *workv=tmpNE+tmpNEI[faceIndex]+1;
-                                               int nbNodes= tmpNEI[faceIndex+1]-tmpNEI[faceIndex]-1;
+                                               const mcIdType *workv=tmpNE+tmpNEI[faceIndex]+1;
+                                               mcIdType nbNodes= tmpNEI[faceIndex+1]-tmpNEI[faceIndex]-1;
                                                if(nbNodes!=2)//We want to compute the normal to a straight line, not a curved interface composed of more thant 2 points
                                                {
                                                        cout<<"Mesh name "<< mu->getName()<< " space dim= "<< _spaceDim <<" mesh dim= "<< _meshDim <<endl;
@@ -921,8 +917,8 @@ Mesh::setMesh( void )
                                                        throw CdmathException("Mesh::setMesh number of nodes around a face should be 2");
                                                }
 
-                                               int idNodeA=workv[0];
-                                               int idNodeB=workv[1];
+                                               mcIdType idNodeA=workv[0];
+                                               mcIdType idNodeB=workv[1];
                                                vector<double> nodeA(_spaceDim), nodeB(_spaceDim), nodeP(_spaceDim);
                                                for(int i=0;i<_spaceDim;i++)
                                                {
@@ -971,8 +967,8 @@ Mesh::setMesh( void )
                        for (int d=0; d<_spaceDim; d++)
                                coorBarySegXyz[d] = coorBarySeg[k+d];
                        Point p(coorBarySegXyz[0],coorBarySegXyz[1],coorBarySegXyz[2]) ;
-                       const int *workc=tmpA+tmpAI[id];
-                       int nbCells=tmpAI[id+1]-tmpAI[id];
+                       const mcIdType *workc=tmpA+tmpAI[id];
+                       mcIdType nbCells=tmpAI[id+1]-tmpAI[id];
             
             if (nbCells>2 && _spaceDim==_meshDim)
             {
@@ -986,8 +982,8 @@ Mesh::setMesh( void )
             if (nbCells==1)
                 _boundaryFaceIds.push_back(id);
                 
-                       const int *workv=tmpNE+tmpNEI[id]+1;
-                       int nbNodes= tmpNEI[id+1]-tmpNEI[id]-1;
+                       const mcIdType *workv=tmpNE+tmpNEI[id]+1;
+                       mcIdType nbNodes= tmpNEI[id+1]-tmpNEI[id]-1;
 
                        Face fi;
                        if(_spaceDim==_meshDim)//Euclidean flat mesh geometry
@@ -1023,12 +1019,12 @@ Mesh::setMesh( void )
                                coorP[d] = cood[k+d];
                        Point p(coorP[0],coorP[1],coorP[2]) ;
 
-                       const int *workc=tmpN+tmpNI[id];
-                       int nbCells=tmpNI[id+1]-tmpNI[id];
-                       const int *workf=tmpC+tmpCI[id];
-                       int nbFaces=tmpCI[id+1]-tmpCI[id];
-                       const int *workn;
-                       int nbNeighbourNodes;
+                       const mcIdType *workc=tmpN+tmpNI[id];
+                       mcIdType nbCells=tmpNI[id+1]-tmpNI[id];
+                       const mcIdType *workf=tmpC+tmpCI[id];
+                       mcIdType nbFaces=tmpCI[id+1]-tmpCI[id];
+                       const mcIdType *workn;
+                       mcIdType nbNeighbourNodes;
             if (_meshDim == 1)
             {
                 workn=tmpA+tmpAI[id];
@@ -1151,7 +1147,7 @@ Mesh::Mesh( double xmin, double xmax, int nx, std::string meshName )
 
        double *originPtr = new double[_spaceDim];
        double *dxyzPtr = new double[_spaceDim];
-       int *nodeStrctPtr = new int[_spaceDim];
+       mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
 
        originPtr[0]=xmin;
        nodeStrctPtr[0]=nx+1;
@@ -1169,18 +1165,18 @@ Mesh::Mesh( double xmin, double xmax, int nx, std::string meshName )
        delete [] dxyzPtr;
        delete [] nodeStrctPtr;
 
-       DataArrayInt *desc=DataArrayInt::New();
-       DataArrayInt *descI=DataArrayInt::New();
-       DataArrayInt *revDesc=DataArrayInt::New();
-       DataArrayInt *revDescI=DataArrayInt::New();
+       DataArrayIdType *desc=DataArrayIdType::New();
+       DataArrayIdType *descI=DataArrayIdType::New();
+       DataArrayIdType *revDesc=DataArrayIdType::New();
+       DataArrayIdType *revDescI=DataArrayIdType::New();
        MEDCouplingUMesh* mu=_mesh->buildUnstructured();
        MEDCouplingUMesh *mu2=mu->buildDescendingConnectivity(desc,descI,revDesc,revDescI);
 
-       const int *tmp=desc->getConstPointer();
-       const int *tmpI=descI->getConstPointer();
+       const mcIdType *tmp=desc->getConstPointer();
+       const mcIdType *tmpI=descI->getConstPointer();
 
-       const int *tmpA =revDesc->getConstPointer();
-       const int *tmpAI=revDescI->getConstPointer();
+       const mcIdType *tmpA =revDesc->getConstPointer();
+       const mcIdType *tmpAI=revDescI->getConstPointer();
 
        _eltsTypes=mu->getAllGeoTypesSorted();
 
@@ -1212,7 +1208,7 @@ Mesh::Mesh( double xmin, double xmax, int nx, std::string meshName )
                Point p(coorBary[id],0.0,0.0) ;
                Cell ci( nbVertices, nbVertices, lon[id], p ) ;
 
-               std::vector<int> nodeIdsOfCell ;
+               std::vector<mcIdType> nodeIdsOfCell ;
                mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
                for( int el=0;el<nbVertices;el++ )
                {
@@ -1222,8 +1218,8 @@ Mesh::Mesh( double xmin, double xmax, int nx, std::string meshName )
 
         double xn = (cood[nodeIdsOfCell[nbVertices-1]] - cood[nodeIdsOfCell[0]] > 0.0) ? -1.0 : 1.0;
 
-        int nbFaces=tmpI[id+1]-tmpI[id];
-        const int *work=tmp+tmpI[id];
+        mcIdType nbFaces=tmpI[id+1]-tmpI[id];
+        const mcIdType *work=tmp+tmpI[id];
                
         for( int el=0;el<nbFaces;el++ )
                {
@@ -1238,22 +1234,22 @@ Mesh::Mesh( double xmin, double xmax, int nx, std::string meshName )
        }
 
     //Suppress the following since tmpN=tmpA
-       DataArrayInt *revNode=DataArrayInt::New();
-       DataArrayInt *revNodeI=DataArrayInt::New();
+       DataArrayIdType *revNode=DataArrayIdType::New();
+       DataArrayIdType *revNodeI=DataArrayIdType::New();
        mu->getReverseNodalConnectivity(revNode,revNodeI) ;
-       const int *tmpN=revNode->getConstPointer();
-       const int *tmpNI=revNodeI->getConstPointer();
+       const mcIdType *tmpN=revNode->getConstPointer();
+       const mcIdType *tmpNI=revNodeI->getConstPointer();
 
        for( int id=0;id<_numberOfNodes;id++ )
        {
                std::vector<double> coo ;
                mu->getCoordinatesOfNode(id,coo);
                Point p(coo[0],0.0,0.0) ;
-               const int *workc=tmpN+tmpNI[id];
-               int nbCells=tmpNI[id+1]-tmpNI[id];
-               int nbFaces=1;
-        const int *workn=tmpA+tmpAI[id];
-        int nbNeighbourNodes=tmpAI[id+1]-tmpAI[id];
+               const mcIdType *workc=tmpN+tmpNI[id];
+               mcIdType nbCells=tmpNI[id+1]-tmpNI[id];
+               mcIdType nbFaces=1;
+        const mcIdType *workn=tmpA+tmpAI[id];
+        mcIdType nbNeighbourNodes=tmpAI[id+1]-tmpAI[id];
         
                Node vi( nbCells, nbFaces, nbNeighbourNodes, p ) ;
         for( int el=0;el<nbCells;el++ )
@@ -1328,7 +1324,7 @@ Mesh::Mesh( std::vector<double> points, std::string meshName )
     MEDCouplingUMesh * mesh1d = MEDCouplingUMesh::New(meshName, 1);
     mesh1d->allocateCells(nx - 1);
     double * coords = new double[nx];
-    int * nodal_con = new int[2];
+    mcIdType * nodal_con = new mcIdType[2];
     coords[0]=points[0];
     for(int i=0; i<nx- 1 ; i++)
     {
@@ -1349,10 +1345,10 @@ Mesh::Mesh( std::vector<double> points, std::string meshName )
 
     _mesh=mesh1d;
     
-       DataArrayInt *desc=DataArrayInt::New();
-       DataArrayInt *descI=DataArrayInt::New();
-       DataArrayInt *revDesc=DataArrayInt::New();
-       DataArrayInt *revDescI=DataArrayInt::New();
+       DataArrayIdType *desc=DataArrayIdType::New();
+       DataArrayIdType *descI=DataArrayIdType::New();
+       DataArrayIdType *revDesc=DataArrayIdType::New();
+       DataArrayIdType *revDescI=DataArrayIdType::New();
     MEDCouplingUMesh* mu=_mesh->buildUnstructured();
        MEDCouplingUMesh *mu2=mu->buildDescendingConnectivity(desc,descI,revDesc,revDescI);
 
@@ -1377,7 +1373,7 @@ Mesh::Mesh( std::vector<double> points, std::string meshName )
                Point p(coorBary[id],0.0,0.0) ;
                Cell ci( nbVertices, nbVertices, lon[id], p ) ;
 
-               std::vector<int> nodeIdsOfCell ;
+               std::vector<mcIdType> nodeIdsOfCell ;
                mu->getNodeIdsOfCell(id,nodeIdsOfCell) ;
                for( int el=0;el<nbVertices;el++ )
                {
@@ -1390,11 +1386,11 @@ Mesh::Mesh( std::vector<double> points, std::string meshName )
 
 
     //Suppress the following since tmpN=tmpA
-       DataArrayInt *revNode=DataArrayInt::New();
-       DataArrayInt *revNodeI=DataArrayInt::New();
+       DataArrayIdType *revNode=DataArrayIdType::New();
+       DataArrayIdType *revNodeI=DataArrayIdType::New();
        mu->getReverseNodalConnectivity(revNode,revNodeI) ;
-       const int *tmpN=revNode->getConstPointer();
-       const int *tmpNI=revNodeI->getConstPointer();
+       const mcIdType *tmpN=revNode->getConstPointer();
+       const mcIdType *tmpNI=revNodeI->getConstPointer();
 
        _numberOfNodes = mu->getNumberOfNodes() ;
        _nodes    = new Node[_numberOfNodes] ;
@@ -1406,11 +1402,11 @@ Mesh::Mesh( std::vector<double> points, std::string meshName )
                std::vector<double> coo ;
                mu->getCoordinatesOfNode(id,coo);
                Point p(coo[0],0.0,0.0) ;
-               const int *workc=tmpN+tmpNI[id];
-               int nbCells=tmpNI[id+1]-tmpNI[id];
-               int nbFaces=1;
-        const int *workn=tmpN+tmpNI[id];
-        int nbNeighbourNodes=tmpNI[id+1]-tmpNI[id];
+               const mcIdType *workc=tmpN+tmpNI[id];
+               mcIdType nbCells=tmpNI[id+1]-tmpNI[id];
+               mcIdType nbFaces=1;
+        const mcIdType *workn=tmpN+tmpNI[id];
+        mcIdType nbNeighbourNodes=tmpNI[id+1]-tmpNI[id];
                Node vi( nbCells, nbFaces, nbNeighbourNodes, p ) ;
                int nbVertices=1;
                /* provisoire !!!!!!!!!!!!*/
@@ -1488,7 +1484,7 @@ Mesh::Mesh( double xmin, double xmax, int nx, double ymin, double ymax, int ny,
 
        double *originPtr = new double[_spaceDim];
        double *dxyzPtr   = new double[_spaceDim];
-       int *nodeStrctPtr = new int[_spaceDim];
+       mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
 
        originPtr[0]=xmin;
        originPtr[1]=ymin;
@@ -1565,7 +1561,7 @@ Mesh::Mesh( double xmin, double xmax, int nx, double ymin, double ymax, int ny,
 
        double *originPtr = new double[_spaceDim];
        double *dxyzPtr = new double[_spaceDim];
-       int *nodeStrctPtr = new int[_spaceDim];
+       mcIdType *nodeStrctPtr = new mcIdType[_spaceDim];
 
        originPtr[0]=xmin;
        originPtr[1]=ymin;
@@ -1634,7 +1630,7 @@ Mesh::getDXYZ() const
        return _dxyz;
 }
 
-std::vector<int>
+std::vector<mcIdType>
 Mesh::getCellGridStructure() const
 {
     if(!_isStructured)
@@ -1834,7 +1830,7 @@ Mesh::getNameOfNodeGroups( void )  const
        return _nodeGroupNames;
 }
 
-vector<MEDCoupling::DataArrayInt *>
+vector<MEDCoupling::DataArrayIdType *>
 Mesh::getNodeGroups( void )  const
 {
        return _nodeGroups;
index 2f7d2b2b4afe34bfd17c638c0be60b77bf90cfb7..bdd4e1ea68ff186d563c55e79a9d469d8a3b2598 100644 (file)
@@ -88,10 +88,10 @@ def createBrickWallMesh( xmin=0., xmax=1., nx=15, ymin=0., ymax=1., ny=15,mesh_n
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index 1697271a30e21d1e87f4191a2057f36debbfcd66..edf670acfbeaf152583d48b4b16f73701773191f 100644 (file)
@@ -42,10 +42,10 @@ def mesh_rectangle_with_rectangles(xmin, xmax, nx, ymin, ymax, ny, mesh_name="Me
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index 6b2385fbaec68af15ccf253239d06d49bc8cf1d7..0e4dc288d877e8d618cc5cfc5fcd3c4b133cfc24 100644 (file)
@@ -88,10 +88,10 @@ def createCheckerboardMesh(nb_segs_x, mesh_name=""):
     elif abs(y-1) < tol:
       ids_top.append(i)
 
-  arr_left = MC.DataArrayInt(ids_left)
-  arr_right = MC.DataArrayInt(ids_right)
-  arr_bottom = MC.DataArrayInt(ids_bottom)
-  arr_top = MC.DataArrayInt(ids_top)
+  arr_left = MC.DataArrayIdType(ids_left)
+  arr_right = MC.DataArrayIdType(ids_right)
+  arr_bottom = MC.DataArrayIdType(ids_bottom)
+  arr_top = MC.DataArrayIdType(ids_top)
   
   arr_left.setName("Left")
   arr_right.setName("Right")
index 110be3d58e2dd4494da52e6ccb14ac6e64ce2627..37584775ea1f3e49266d5d8d2eedbda32f5a0728 100644 (file)
@@ -47,7 +47,7 @@ def mesh_square_with_cross_triangles(xmin,xmax,nx,ymin,ymax,ny,mesh_name="square
     
     nCells = myQuadMesh.getNumberOfCells()
     c, cI = myQuadMesh.getNodalConnectivity(), myQuadMesh.getNodalConnectivityIndex()
-    cNew, cINew = mc.DataArrayInt(nCells*16), mc.DataArrayInt(nCells*4+1)
+    cNew, cINew = mc.DataArrayIdType(nCells*16), mc.DataArrayIdType(nCells*4+1)
     
     # Et hop:
     cINew.iota()
@@ -88,10 +88,10 @@ def mesh_square_with_cross_triangles(xmin,xmax,nx,ymin,ymax,ny,mesh_name="square
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index cba29c9d48bc43515d596f8b101b98056a5dbda7..607f1792fcb7dd0a06389ef99a7a9e3c31496eed 100644 (file)
@@ -55,7 +55,7 @@ def drawPolarGrid(center_x, center_y, r0, r1, angle0, angle1, n_r, n_theta):
   # Ecrit le maillage 1D
   meshMEDFile.setMeshAtLevel(-1,mesh_1d)
   # Ecrit les groupes
-  arr_circle = mc.DataArrayInt(range(mesh_1d.getNumberOfCells()))
+  arr_circle = mc.DataArrayIdType(range(mesh_1d.getNumberOfCells()))
   arr_circle.setName("Circle")
   meshMEDFile.addGroup(-1, arr_circle)
 
index 2161d46f925cfd73a463c36cb53e8c434e382df6..a19dc4a985afc6e4e2dfd9e247b70f0f32dab6b4 100644 (file)
@@ -54,7 +54,7 @@ def mesh_disk_with_hexagons(xcenter=0., ycenter=0.,Radius=1.,ny=16,mesh_name="di
     a = cI.deltaShiftIndex()
     b = a - 1
     myNewNbOfTuples = oldNbOfTuples - sum(b.getValues())
-    o2n, newNbOfTuples = mc.DataArrayInt.ConvertIndexArrayToO2N(oldNbOfTuples,c,cI)
+    o2n, newNbOfTuples = mc.DataArrayIdType.ConvertIndexArrayToO2N(oldNbOfTuples,c,cI)
     print( "Have I got the right number of tuples ?" )
     print( "myNewNbOfTuples = %d, newNbOfTuples = %d" % (myNewNbOfTuples, newNbOfTuples) )
     assert(myNewNbOfTuples == newNbOfTuples)
@@ -90,7 +90,7 @@ def mesh_disk_with_hexagons(xcenter=0., ycenter=0.,Radius=1.,ny=16,mesh_name="di
     # Ecrit le maillage 1D
     meshMEDFile.setMeshAtLevel(-1,mesh_1d)
     # Ecrit les groupes
-    arr_circle = mc.DataArrayInt(range(mesh_1d.getNumberOfCells()))
+    arr_circle = mc.DataArrayIdType(range(mesh_1d.getNumberOfCells()))
     arr_circle.setName("Circle")
     meshMEDFile.addGroup(-1, arr_circle)
     
index 55c83f2bced22eb919e3f12fec1f419e51ba4556..5645e29b49b51487a0d5d65793553c61ce6dd697 100644 (file)
@@ -98,10 +98,10 @@ def mesh_square_with_EquilateralTriangles(xmin=0,xmax=1,ymin=0,ymax=1,ny=10,mesh
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index 2068462e49bbce21045681353eb1cbb91ea724ff..18177403283bec587bc92355673283e19e971659 100644 (file)
@@ -47,7 +47,7 @@ def mesh_square_with_cross_triangles(xmin,xmax,nx,ymin,ymax,ny,mesh_name="square
     
     nCells = myQuadMesh.getNumberOfCells()
     c, cI = myQuadMesh.getNodalConnectivity(), myQuadMesh.getNodalConnectivityIndex()
-    cNew, cINew = mc.DataArrayInt(nCells*16), mc.DataArrayInt(nCells*4+1)
+    cNew, cINew = mc.DataArrayIdType(nCells*16), mc.DataArrayIdType(nCells*4+1)
     
     # Et hop:
     cINew.iota()
@@ -88,10 +88,10 @@ def mesh_square_with_cross_triangles(xmin,xmax,nx,ymin,ymax,ny,mesh_name="square
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index 0763442516fc65bc6e2a53d986753c099baa791d..92be56d805ae5e994f28ea9d593de6dd6f7636af 100644 (file)
@@ -79,10 +79,10 @@ def mesh_square_with_hexagons(xmin=0,xmax=1,ymin=0,ymax=1,ny=14,mesh_name="squar
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index e49e7505cb02763bceca587bf75809bd11bab95a..7145e6903ed97287dc3034b14bb369f65ec6b32a 100644 (file)
@@ -66,10 +66,10 @@ def createLocallyRefinedMesh(nb_segs_x, mesh_name):
     elif abs(y-1) < tol:
       ids_top.append(i)
 
-  arr_left = MC.DataArrayInt(ids_left)
-  arr_right = MC.DataArrayInt(ids_right)
-  arr_bottom = MC.DataArrayInt(ids_bottom)
-  arr_top = MC.DataArrayInt(ids_top)
+  arr_left = MC.DataArrayIdType(ids_left)
+  arr_right = MC.DataArrayIdType(ids_right)
+  arr_bottom = MC.DataArrayIdType(ids_bottom)
+  arr_top = MC.DataArrayIdType(ids_top)
   
   arr_left.setName("Left")
   arr_right.setName("Right")
index 9fb8dc182067bdf2229991172c90f4426bd2eaa2..f96459fb7716c8b631a90aa857409b95ae02e4b1 100644 (file)
@@ -42,10 +42,10 @@ def mesh_rectangle_with_rectangles(xmin, xmax, nx, ymin, ymax, ny, mesh_name="Me
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index 252435c4749aee41c5d20814457fea3cab9472b3..88642954656cd73ebf8b4b7d4f7424c8b7fb78b4 100644 (file)
@@ -90,10 +90,10 @@ def mesh_square_with_RightTriangles(xmin=0,xmax=1.,ymin=0,ymax=1.,nx=10,ny=10,me
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index b73ce6777d16956230f3039657e0fb837b52d0b4..da8d377419b2cb79fbc9885d65dbb37ed837e598 100644 (file)
@@ -54,10 +54,10 @@ def mesh_square_with_regular_triangles(xmin,xmax,nx,ymin,ymax,ny,mesh_name="squa
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index 7a3d3a318a6b225b904ff5432f736e23b60c8cc6..0c02e27acf5896b2fc5b62c72e45eaf676c1689d 100644 (file)
@@ -80,7 +80,7 @@ def mesh_disk_with_squares(xcenter=0.,ycenter=0., Radius=1.,n=17,mesh_name="disk
     # Ecrit le maillage 1D
     meshMEDFile.setMeshAtLevel(-1,mesh_1d)
     # Ecrit les groupes
-    arr_circle = mc.DataArrayInt(range(mesh_1d.getNumberOfCells()))
+    arr_circle = mc.DataArrayIdType(range(mesh_1d.getNumberOfCells()))
     arr_circle.setName("Circle")
     meshMEDFile.addGroup(-1, arr_circle)
     
index 4bc20b996cc0967ba724bb95bf4dbc64a5723cea..baec532f7d6b51cb085aba2e167a9d43721b2f7a 100644 (file)
@@ -64,12 +64,12 @@ def mesh_cube_with_cuboids(xmin,xmax,nx,ymin,ymax,ny,zmin, zmax, nz, mesh_name="
         else:
             raise ValueError("Pb with boundary construction : barycenter does not belong to any border group")
         
-    arr_left = mc.DataArrayInt(ids_left)
-    arr_right = mc.DataArrayInt(ids_right)
-    arr_bottom = mc.DataArrayInt(ids_bottom)
-    arr_top = mc.DataArrayInt(ids_top)
-    arr_front = mc.DataArrayInt(ids_front)
-    arr_back = mc.DataArrayInt(ids_back)
+    arr_left = mc.DataArrayIdType(ids_left)
+    arr_right = mc.DataArrayIdType(ids_right)
+    arr_bottom = mc.DataArrayIdType(ids_bottom)
+    arr_top = mc.DataArrayIdType(ids_top)
+    arr_front = mc.DataArrayIdType(ids_front)
+    arr_back = mc.DataArrayIdType(ids_back)
     
     arr_left.setName("Left")
     arr_right.setName("Right")
index 10807dc216a1f3d068c2f48fe008a45e57bd6c0d..2ed1d629a76b08b6813a8c6b9afe2f9714c1c03f 100644 (file)
@@ -71,12 +71,12 @@ def createLocallyRefinedMesh(nb_segs_x, mesh_name):
     elif abs(z-1) < tol:\r
       ids_front.append(i)\r
 \r
-  arr_left = MC.DataArrayInt(ids_left)\r
-  arr_right = MC.DataArrayInt(ids_right)\r
-  arr_bottom = MC.DataArrayInt(ids_bottom)\r
-  arr_top = MC.DataArrayInt(ids_top)\r
-  arr_back = MC.DataArrayInt(ids_back)\r
-  arr_front = MC.DataArrayInt(ids_front)\r
+  arr_left = MC.DataArrayIdType(ids_left)\r
+  arr_right = MC.DataArrayIdType(ids_right)\r
+  arr_bottom = MC.DataArrayIdType(ids_bottom)\r
+  arr_top = MC.DataArrayIdType(ids_top)\r
+  arr_back = MC.DataArrayIdType(ids_back)\r
+  arr_front = MC.DataArrayIdType(ids_front)\r
 \r
   arr_left.setName("Left")\r
   arr_right.setName("Right")\r
index 2f4a9025a3534a908cdeabd24cae6b1d4a691c35..82aa133be3896f16a905ebfc6836a48972d82c41 100755 (executable)
@@ -136,12 +136,12 @@ for i, coord in enumerate(barycenters):
   elif abs(z-1) < tol:
     ids_front.append(i)
 
-arr_left = MC.DataArrayInt(ids_left)
-arr_right = MC.DataArrayInt(ids_right)
-arr_bottom = MC.DataArrayInt(ids_bottom)
-arr_top = MC.DataArrayInt(ids_top)
-arr_back = MC.DataArrayInt(ids_back)
-arr_front = MC.DataArrayInt(ids_front)
+arr_left = MC.DataArrayIdType(ids_left)
+arr_right = MC.DataArrayIdType(ids_right)
+arr_bottom = MC.DataArrayIdType(ids_bottom)
+arr_top = MC.DataArrayIdType(ids_top)
+arr_back = MC.DataArrayIdType(ids_back)
+arr_front = MC.DataArrayIdType(ids_front)
 
 arr_left.setName("Left")
 arr_right.setName("Right")
index 2018f57daca19c610d739ecd93836d526ffafa1a..c84cbed4ab02c85d370bb91c81b4e9ce5683ea0b 100644 (file)
@@ -32,7 +32,7 @@ def read_typ2(fichier, nom_med):
     nb_vois = ri.deltaShiftIndex()\r
     for i in range(mf.getNumberOfCells()):\r
         if nb_vois[i] == 1: g.append(i)\r
-    grp = ml.DataArrayInt.New(g)\r
+    grp = ml.DataArrayIdType.New(g)\r
     grp.setName("boundary")\r
     mm.addGroup(-1, grp)\r
 \r
@@ -106,7 +106,7 @@ def read_typ3(fichier, nom_med):
     nb_vois = ri.deltaShiftIndex()\r
     for i in range(mf.getNumberOfCells()):\r
         if nb_vois[i] == 1: g.append(i)\r
-    grp = ml.DataArrayInt.New(g)\r
+    grp = ml.DataArrayIdType.New(g)\r
     grp.setName("boundary")\r
     mm.addGroup(-1, grp)\r
 \r
index 57958ba79ac85380ab6b18520aca49a0a07640ef..b26afcb12530cbff852b144133b47df5046882b7 100644 (file)
@@ -76,7 +76,7 @@ def getWeirdMesh(xmin, xmax, ymin, ymax, lx, ly, str, func=None, extr=-1, unpo=F
             for idx, b in enumerate(bf):\r
                 if abs(b[i] - [[xmin, xmax], [ymin, ymax], [0., 1.]][i][j]) < 1e-5:\r
                     g.append(idx)\r
-            grp = ml.DataArrayInt.New(g)\r
+            grp = ml.DataArrayIdType.New(g)\r
             grp.setName(noms_cl[i][j])\r
             mm.addGroup(-1, grp)\r
 \r
index fcf57d61a0265e0521bf5438d819eea4129c5b53..e6e96cda82dd5ba20d8a901e3c479b148c5a88c8 100644 (file)
@@ -172,19 +172,19 @@ class VTURawReader:
         m.setCoords(coo)\r
         # connectivity\r
         offsets=np.memmap(fd,dtype=rd._type_off,mode='r',offset=ref+rd._off_off,shape=(rd._nb_cells,))\r
-        offsets=self.__swapIfNecessary(rd._bo,offsets) ; connLgth=offsets[-1] ; offsets2=DataArrayInt(rd._nb_cells+1) ; offsets2.setIJ(0,0,0)\r
-        offsets2[1:]=DataArrayInt([int(o) for o in offsets])\r
+        offsets=self.__swapIfNecessary(rd._bo,offsets) ; connLgth=offsets[-1] ; offsets2=DataArrayIdType(rd._nb_cells+1) ; offsets2.setIJ(0,0,0)\r
+        offsets2[1:]=DataArrayIdType([int(o) for o in offsets])\r
         offsets3=offsets2.deltaShiftIndex() ; offsets2=offsets3.deepCopy() ; offsets3+=1 ; offsets3.computeOffsetsFull()\r
         offsets=offsets3\r
-        tmp1=DataArrayInt(len(offsets2),2) ; tmp1[:,0]=1 ; tmp1[:,1]=offsets2 ; tmp1.rearrange(1) ; tmp1.computeOffsetsFull()\r
-        tmp1=DataArrayInt.Range(1,2*len(offsets2),2).buildExplicitArrByRanges(tmp1)\r
+        tmp1=DataArrayIdType(len(offsets2),2) ; tmp1[:,0]=1 ; tmp1[:,1]=offsets2 ; tmp1.rearrange(1) ; tmp1.computeOffsetsFull()\r
+        tmp1=DataArrayIdType.Range(1,2*len(offsets2),2).buildExplicitArrByRanges(tmp1)\r
         conn=np.memmap(fd,dtype=rd._type_conn,mode='r',offset=ref+rd._off_conn,shape=(connLgth,))\r
         conn=self.__swapIfNecessary(rd._bo,conn)\r
-        types=np.array(types,dtype='int32') ; types=DataArrayInt(types) ; \r
+        types=np.array(types,dtype='int32') ; types=DataArrayIdType(types) ; \r
         types.transformWithIndArr(self.VTKTypes_2_MC)\r
-        conn2=DataArrayInt(offsets.back())\r
+        conn2=DataArrayIdType(offsets.back())\r
         conn2[offsets[0:-1]]=types\r
-        conn2[tmp1]=DataArrayInt([int(c) for c in conn])\r
+        conn2[tmp1]=DataArrayIdType([int(c) for c in conn])\r
         m.setConnectivity(conn2,offsets,True)\r
         m.checkConsistencyLight() ; mm=MEDFileUMesh() ; mm.setMeshAtLevel(0,m) ; ms.pushMesh(mm)\r
         # Fields on nodes and on cells\r