From 1f7581fe436ed3182ec3708b5d561a5cf3820ace Mon Sep 17 00:00:00 2001 From: secher Date: Wed, 15 Dec 2010 10:13:32 +0000 Subject: [PATCH] use vtkIdType to be independant of architecture --- src/SMDS/SMDS_Downward.cxx | 16 ++++++++-------- src/SMDS/SMDS_Downward.hxx | 18 +++++++++--------- src/SMDS/SMDS_Mesh.cxx | 4 ++-- src/SMDS/SMDS_Mesh.hxx | 4 ++-- src/SMDS/SMDS_UnstructuredGrid.cxx | 2 +- src/SMDS/SMDS_UnstructuredGrid.hxx | 2 +- src/SMDS/SMDS_VtkCellIterator.cxx | 2 +- src/SMESHDS/SMESHDS_Mesh.cxx | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/SMDS/SMDS_Downward.cxx b/src/SMDS/SMDS_Downward.cxx index 67a31ff1f..a83430ee8 100644 --- a/src/SMDS/SMDS_Downward.cxx +++ b/src/SMDS/SMDS_Downward.cxx @@ -1100,7 +1100,7 @@ SMDS_DownTetra::~SMDS_DownTetra() { } -void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { set setNodes; setNodes.clear(); @@ -1207,7 +1207,7 @@ SMDS_DownQuadTetra::~SMDS_DownQuadTetra() { } -void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { // TODO } @@ -1303,7 +1303,7 @@ SMDS_DownPyramid::~SMDS_DownPyramid() { } -void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownPyramid::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { // TODO } @@ -1407,7 +1407,7 @@ SMDS_DownQuadPyramid::~SMDS_DownQuadPyramid() { } -void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownQuadPyramid::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { // TODO } @@ -1528,7 +1528,7 @@ SMDS_DownPenta::~SMDS_DownPenta() { } -void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownPenta::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { // TODO } @@ -1636,7 +1636,7 @@ SMDS_DownQuadPenta::~SMDS_DownQuadPenta() { } -void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownQuadPenta::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { // TODO } @@ -1764,7 +1764,7 @@ SMDS_DownHexa::~SMDS_DownHexa() { } -void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownHexa::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { // TODO } @@ -1867,7 +1867,7 @@ SMDS_DownQuadHexa::~SMDS_DownQuadHexa() { } -void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) +void SMDS_DownQuadHexa::getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) { // TODO } diff --git a/src/SMDS/SMDS_Downward.hxx b/src/SMDS/SMDS_Downward.hxx index d9b12a054..173f463f4 100644 --- a/src/SMDS/SMDS_Downward.hxx +++ b/src/SMDS/SMDS_Downward.hxx @@ -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& nodeSet); - virtual void getOrderedNodesOfFace(int cellId, std::vector& orderedNodes) = 0; + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& 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& orderedNodes); + virtual void getOrderedNodesOfFace(int cellId, std::vector& orderedNodes); protected: SMDS_DownQuadHexa(SMDS_UnstructuredGrid *grid); ~SMDS_DownQuadHexa(); diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index b5a86f8dc..792e3e221 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -1310,7 +1310,7 @@ SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume return v; } -SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIds(const std::vector& vtkNodeIds) +SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIds(const std::vector& 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& vtkNodeI return v; } -SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIdsWithID(const std::vector& vtkNodeIds, const int ID) +SMDS_MeshVolume* SMDS_Mesh::AddVolumeFromVtkIdsWithID(const std::vector& vtkNodeIds, const int ID) { SMDS_VtkVolume *volvtk = myVolumePool->getNew(); volvtk->init(vtkNodeIds, this); diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index 6daf98478..dd09cd832 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -444,9 +444,9 @@ public: (std::vector nodes, std::vector quantities); - virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector& vtkNodeIds); + virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector& vtkNodeIds); - virtual SMDS_MeshVolume* AddVolumeFromVtkIdsWithID(const std::vector& vtkNodeIds, + virtual SMDS_MeshVolume* AddVolumeFromVtkIdsWithID(const std::vector& vtkNodeIds, const int ID); virtual void RemoveElement(const SMDS_MeshElement * elem, diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index 00d50a9d4..2db632a74 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -879,7 +879,7 @@ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map 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& orderedNodes) +int SMDS_UnstructuredGrid::getOrderedNodesOfFace(int vtkVolId, std::vector& orderedNodes) { int vtkType = this->GetCellType(vtkVolId); int cellDim = SMDS_Downward::getCellDimension(vtkType); diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index 2d5025ca1..f69012f02 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.hxx +++ b/src/SMDS/SMDS_UnstructuredGrid.hxx @@ -64,7 +64,7 @@ public: int GetNeighbors(int* neighborsVtkIds, int* downIds, unsigned char* downTypes, int vtkId); void GetNodeIds(std::set& nodeSet, int downId, unsigned char downType); void ModifyCellNodes(int vtkVolId, std::map localClonedNodeIds); - int getOrderedNodesOfFace(int vtkVolId, std::vector& orderedNodes); + int getOrderedNodesOfFace(int vtkVolId, std::vector& orderedNodes); void BuildLinks(); vtkCellLinks* GetLinks() { diff --git a/src/SMDS/SMDS_VtkCellIterator.cxx b/src/SMDS/SMDS_VtkCellIterator.cxx index 0a4163bb9..cd0af3a48 100644 --- a/src/SMDS/SMDS_VtkCellIterator.cxx +++ b/src/SMDS/SMDS_VtkCellIterator.cxx @@ -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) diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index 4d522b5d7..ce6f4680b 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -1997,7 +1997,7 @@ bool SMESHDS_Mesh::ModifyCellNodes(int vtkVolId, std::map localClonedNo bool SMESHDS_Mesh::extrudeVolumeFromFace(int vtkVolId, std::map& localClonedNodeIds) { //MESSAGE("extrudeVolumeFromFace " << vtkVolId); - vector orderedNodes; + vector orderedNodes; orderedNodes.clear(); map::const_iterator it = localClonedNodeIds.begin(); for (; it != localClonedNodeIds.end(); ++it) -- 2.39.2