use vtkIdType to be independant of architecture

This commit is contained in:
secher 2010-12-15 10:13:32 +00:00
parent 2b665e09bb
commit 1f7581fe43
8 changed files with 25 additions and 25 deletions

View 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
}

View 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();

View 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);

View 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,

View 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);

View 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()
{

View 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)

View 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)