Salome HOME
use vtkIdType to be independant of architecture
authorsecher <secher>
Wed, 15 Dec 2010 10:13:32 +0000 (10:13 +0000)
committersecher <secher>
Wed, 15 Dec 2010 10:13:32 +0000 (10:13 +0000)
src/SMDS/SMDS_Downward.cxx
src/SMDS/SMDS_Downward.hxx
src/SMDS/SMDS_Mesh.cxx
src/SMDS/SMDS_Mesh.hxx
src/SMDS/SMDS_UnstructuredGrid.cxx
src/SMDS/SMDS_UnstructuredGrid.hxx
src/SMDS/SMDS_VtkCellIterator.cxx
src/SMESHDS/SMESHDS_Mesh.cxx

index 67a31ff1f04aa3849e8b2ac9ae84f60178a51b4b..a83430ee811c8a07e111597a44b9a67a6be07676 100644 (file)
@@ -1100,7 +1100,7 @@ SMDS_DownTetra::~SMDS_DownTetra()
 {
 }
 
-void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   set<int> setNodes;
   setNodes.clear();
@@ -1207,7 +1207,7 @@ SMDS_DownQuadTetra::~SMDS_DownQuadTetra()
 {
 }
 
-void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   // TODO
 }
@@ -1303,7 +1303,7 @@ SMDS_DownPyramid::~SMDS_DownPyramid()
 {
 }
 
-void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   // TODO
 }
@@ -1407,7 +1407,7 @@ SMDS_DownQuadPyramid::~SMDS_DownQuadPyramid()
 {
 }
 
-void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   // TODO
 }
@@ -1528,7 +1528,7 @@ SMDS_DownPenta::~SMDS_DownPenta()
 {
 }
 
-void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   // TODO
 }
@@ -1636,7 +1636,7 @@ SMDS_DownQuadPenta::~SMDS_DownQuadPenta()
 {
 }
 
-void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   // TODO
 }
@@ -1764,7 +1764,7 @@ SMDS_DownHexa::~SMDS_DownHexa()
 {
 }
 
-void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   // TODO
 }
@@ -1867,7 +1867,7 @@ SMDS_DownQuadHexa::~SMDS_DownQuadHexa()
 {
 }
 
-void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes)
+void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes)
 {
   // TODO
 }
index d9b12a05470ae671f99b043f66c38b027a735ae6..173f463f423a54ceb49d825b77ba70fe38bb92ca 100644 (file)
@@ -160,7 +160,7 @@ public:
   virtual const int* getUpCells(int cellId);
   virtual const unsigned char* getUpTypes(int cellId);
   virtual void getNodeIds(int cellId, std::set<int>& nodeSet);
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes) = 0;
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes) = 0;
 protected:
   SMDS_Down3D(SMDS_UnstructuredGrid *grid, int nbDownCells);
   ~SMDS_Down3D();
@@ -252,7 +252,7 @@ class SMDS_DownTetra: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownTetra(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownTetra();
@@ -264,7 +264,7 @@ class SMDS_DownQuadTetra: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownQuadTetra(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownQuadTetra();
@@ -276,7 +276,7 @@ class SMDS_DownPyramid: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownPyramid(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownPyramid();
@@ -288,7 +288,7 @@ class SMDS_DownQuadPyramid: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownQuadPyramid(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownQuadPyramid();
@@ -300,7 +300,7 @@ class SMDS_DownPenta: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownPenta(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownPenta();
@@ -312,7 +312,7 @@ class SMDS_DownQuadPenta: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownQuadPenta(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownQuadPenta();
@@ -324,7 +324,7 @@ class SMDS_DownHexa: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownHexa(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownHexa();
@@ -336,7 +336,7 @@ class SMDS_DownQuadHexa: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<int>& orderedNodes);
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes);
 protected:
   SMDS_DownQuadHexa(SMDS_UnstructuredGrid *grid);
   ~SMDS_DownQuadHexa();
index b5a86f8dcfaef86b57cd5326fd7ce234e4716902..792e3e22194316b58ad769f68141883481966b28 100644 (file)
@@ -1310,7 +1310,7 @@ SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume
   return v;
 }
 
-SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIds(const std::vector<int>& vtkNodeIds)
+SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIds(const std::vector<vtkIdType>& vtkNodeIds)
 {
   int ID = myElementIDFactory->GetFreeID();
   SMDS_MeshVolume * v = SMDS_Mesh::AddVolumeFromVtkIdsWithID(vtkNodeIds, ID);
@@ -1318,7 +1318,7 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIds(const std::vector<int>& vtkNodeI
   return v;
 }
 
-SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIdsWithID(const std::vector<int>& vtkNodeIds, const int ID)
+SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIdsWithID(const std::vector<vtkIdType>& vtkNodeIds, const int ID)
 {
   SMDS_VtkVolume *volvtk = myVolumePool->getNew();
   volvtk->init(vtkNodeIds, this);
index 6daf98478b4a9f255c2e844a2c9a3e3751a7a616..dd09cd8323ea41deaff2bccda41b23fbf41970cd 100644 (file)
@@ -444,9 +444,9 @@ public:
                            (std::vector<const SMDS_MeshNode*> nodes,
                             std::vector<int>                  quantities);
 
-  virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector<int>& vtkNodeIds);
+  virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector<vtkIdType>& vtkNodeIds);
 
-  virtual SMDS_MeshVolume* AddVolumeFromVtkIdsWithID(const std::vector<int>& vtkNodeIds,
+  virtual SMDS_MeshVolume* AddVolumeFromVtkIdsWithID(const std::vector<vtkIdType>& vtkNodeIds,
                                                      const int ID);
 
   virtual void RemoveElement(const SMDS_MeshElement *        elem,
index 00d50a9d4b2d05ece0f25bcb580ab039109a78e6..2db632a74cb71114a4e0be8169f65c979efcee56 100644 (file)
@@ -879,7 +879,7 @@ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map<int, int> loc
  * @param localClonedNodeIds map old node id to new node id.
  * @return vtk id of the new volume.
  */
-int SMDS_UnstructuredGrid::getOrderedNodesOfFace(int vtkVolId, std::vector<int>& orderedNodes)
+int SMDS_UnstructuredGrid::getOrderedNodesOfFace(int vtkVolId, std::vector<vtkIdType>& orderedNodes)
 {
   int vtkType = this->GetCellType(vtkVolId);
   int cellDim = SMDS_Downward::getCellDimension(vtkType);
index 2d5025ca18f11bbaacbda0a4775074adc7c6b213..f69012f02dcae6b7a1bb82a61197657558c92ad3 100644 (file)
@@ -64,7 +64,7 @@ public:
   int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId);
   void GetNodeIds(std::set<int>& nodeSet, int downId, unsigned char downType);
   void ModifyCellNodes(int vtkVolId, std::map<int, int> localClonedNodeIds);
-  int getOrderedNodesOfFace(int vtkVolId, std::vector<int>& orderedNodes);
+  int getOrderedNodesOfFace(int vtkVolId, std::vector<vtkIdType>& orderedNodes);
   void BuildLinks();
   vtkCellLinks* GetLinks()
   {
index 0a4163bb9f98f2ef6ad387f7e242d3f8ffa631f8..cd0af3a487bc02df0b7d4c1707a5a2f969a55cb7 100644 (file)
@@ -105,7 +105,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCel
   _vtkIdList = vtkIdList::New();
   vtkIdType* pts;
   vtkUnstructuredGrid* grid = _mesh->getGrid();
-  grid->GetCellPoints(_cellId, _nbNodes, pts);
+  grid->GetCellPoints((vtkIdType)_cellId, (vtkIdType&)_nbNodes, pts);
   _vtkIdList->SetNumberOfIds(_nbNodes);
   int *ids = 0;
   switch (_type)
index 4d522b5d770ed3bc0ccc4308533175fd12ca7333..ce6f4680b43f696476c3ea46eade2bd1b7c8b43b 100644 (file)
@@ -1997,7 +1997,7 @@ bool SMESHDS_Mesh::ModifyCellNodes(int vtkVolId, std::map<int,int> localClonedNo
 bool SMESHDS_Mesh::extrudeVolumeFromFace(int vtkVolId, std::map<int,int>& localClonedNodeIds)
 {
   //MESSAGE("extrudeVolumeFromFace " << vtkVolId);
-  vector<int> orderedNodes;
+  vector<vtkIdType> orderedNodes;
   orderedNodes.clear();
   map<int, int>::const_iterator it = localClonedNodeIds.begin();
   for (; it != localClonedNodeIds.end(); ++it)