From: Viktor UZLOV Date: Mon, 1 Feb 2021 17:42:08 +0000 (+0300) Subject: fix after review. Build completed X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=364f6b23463b5f9dc9c893da7fbed865d5995c19;p=modules%2Fsmesh.git fix after review. Build completed --- diff --git a/src/DriverCGNS/DriverCGNS_Read.cxx b/src/DriverCGNS/DriverCGNS_Read.cxx index 4ac3e92c6..08ba5de54 100644 --- a/src/DriverCGNS/DriverCGNS_Read.cxx +++ b/src/DriverCGNS/DriverCGNS_Read.cxx @@ -892,7 +892,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform() // ... // NfacesM, Face1M, Face2M, ... FaceNM const int nbFaces = elemData[ pos++ ]; - vector quantities( nbFaces ); + vector quantities( nbFaces ); vector nodes, faceNodes; nodes.reserve( nbFaces * 4 ); for ( int iF = 0; iF < nbFaces; ++iF ) diff --git a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx index 3440ee09a..6413b62bf 100644 --- a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx +++ b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx @@ -139,7 +139,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() if (( v = myMesh->DownCast< SMDS_MeshVolume >( elem ))) { - std::vector quant = v->GetQuantities(); + std::vector quant = v->GetQuantities(); if ( !quant.empty() ) { fprintf(aFileId, "%d %d ", (int)quant.size(), quant[0]); diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index ac7cb640f..421419dec 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -400,7 +400,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() for(TInt iElem = 0; iElem < aNbElem; iElem++){ MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(iElem); TInt aNbFaces = aConnSliceArr.size(); - typedef MED::TVector TQuantities; + typedef MED::TVector TQuantities; TQuantities aQuantities(aNbFaces); TInt aNbNodes = aPolyedreInfo->GetNbNodes(iElem); TNodeIds aNodeIds(aNbNodes); diff --git a/src/SMDS/SMDS_ElementFactory.cxx b/src/SMDS/SMDS_ElementFactory.cxx index a0bc0ff91..526ecbbb9 100644 --- a/src/SMDS/SMDS_ElementFactory.cxx +++ b/src/SMDS/SMDS_ElementFactory.cxx @@ -383,9 +383,9 @@ void SMDS_NodeFactory::Compact( std::vector& theVtkIDsOldToNew ) // in the chunks. So we remove holes and report relocation in theVtkIDsOldToNew: // theVtkIDsOldToNew[ old VtkID ] = new VtkID - int oldNbNodes = myMesh->GetGrid()->GetNumberOfPoints(); - int newNbNodes = NbUsedElements(); - int newNbChunks = newNbNodes / theChunkSize + bool ( newNbNodes % theChunkSize ); + smIdType oldNbNodes = myMesh->GetGrid()->GetNumberOfPoints(); + smIdType newNbNodes = NbUsedElements(); + smIdType newNbChunks = newNbNodes / theChunkSize + bool ( newNbNodes % theChunkSize ); smIdType maxNodeID = GetMaxID(); theVtkIDsOldToNew.resize( oldNbNodes, -1 ); diff --git a/src/SMDS/SMDS_ElementFactory.hxx b/src/SMDS/SMDS_ElementFactory.hxx index 7372550ca..1a07fd5dc 100644 --- a/src/SMDS/SMDS_ElementFactory.hxx +++ b/src/SMDS/SMDS_ElementFactory.hxx @@ -98,7 +98,7 @@ public: const SMDS_MeshElement* FindElement( const smIdType id ) const; //! Return a number of used elements - int NbUsedElements() const { return myNbUsedElements; } + smIdType NbUsedElements() const { return myNbUsedElements; } //! Return an iterator on all element filtered using a given filter. // nbElemsToReturn is used to optimize by stopping the iteration as soon as diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index b878c679d..c5fbc28e6 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -908,7 +908,7 @@ SMDS_MeshFace* SMDS_Mesh::AddQuadPolygonalFace (const std::vector & nodes_ids, - const std::vector & quantities, + const std::vector & quantities, const smIdType ID) { int nbNodes = nodes_ids.size(); @@ -928,7 +928,7 @@ SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector& nodes, - const std::vector & quantities, + const std::vector & quantities, const smIdType ID) { if ( nodes.empty() || quantities.empty() ) @@ -952,7 +952,7 @@ SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector& n SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume (const std::vector & nodes, - const std::vector & quantities) + const std::vector & quantities) { smIdType ID = myCellFactory->GetFreeID(); return SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID); @@ -1459,7 +1459,7 @@ int SMDS_Mesh::GetElementsByNodes(const std::vector& node /////////////////////////////////////////////////////////////////////////////// /// Return the number of nodes /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::NbNodes() const +smIdType SMDS_Mesh::NbNodes() const { return myInfo.NbNodes(); } @@ -1474,7 +1474,7 @@ int SMDS_Mesh::NbElements() const /////////////////////////////////////////////////////////////////////////////// /// Return the number of 0D elements /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::Nb0DElements() const +smIdType SMDS_Mesh::Nb0DElements() const { return myInfo.Nb0DElements(); } @@ -1589,7 +1589,7 @@ SMDS_NodeIteratorPtr SMDS_Mesh::nodesIterator() const SMDS_ElemIteratorPtr SMDS_Mesh::elementGeomIterator(SMDSAbs_GeometryType type) const { - int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type ); + smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type ); return myCellFactory->GetIterator< SMDS_ElemIterator >( new SMDS_MeshElement::GeomFilter( type ), nbElems); } @@ -1600,7 +1600,7 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementEntityIterator(SMDSAbs_EntityType type) c { return myNodeFactory->GetIterator< SMDS_ElemIterator >( new SMDS_MeshElement::NonNullFilter ); } - int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type ); + smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type ); return myCellFactory->GetIterator( new SMDS_MeshElement::EntityFilter( type ), nbElems); } @@ -1620,7 +1620,7 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementsIterator(SMDSAbs_ElementType type) const return myNodeFactory->GetIterator< TIterator >( new SMDS_MeshElement::NonNullFilter ); default: - int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type ); + smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type ); return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( type ), nbElems); } @@ -1634,7 +1634,7 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementsIterator(SMDSAbs_ElementType type) const SMDS_EdgeIteratorPtr SMDS_Mesh::edgesIterator() const { typedef SMDS_EdgeIterator TIterator; - int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbEdges(); + smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbEdges(); return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Edge ), nbElems); } @@ -1646,7 +1646,7 @@ SMDS_EdgeIteratorPtr SMDS_Mesh::edgesIterator() const SMDS_FaceIteratorPtr SMDS_Mesh::facesIterator() const { typedef SMDS_FaceIterator TIterator; - int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbFaces(); + smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbFaces(); return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Face ), nbElems); } @@ -1658,7 +1658,7 @@ SMDS_FaceIteratorPtr SMDS_Mesh::facesIterator() const SMDS_VolumeIteratorPtr SMDS_Mesh::volumesIterator() const { typedef SMDS_VolumeIterator TIterator; - int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbVolumes(); + smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbVolumes(); return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Volume ), nbElems ); @@ -2981,8 +2981,8 @@ void SMDS_Mesh::CompactMesh() myCellFactory->Compact( idCellsNewToOld ); // make VTK IDs correspond to SMDS IDs - int newNodeSize = myNodeFactory->NbUsedElements(); - int newCellSize = myCellFactory->NbUsedElements(); + smIdType newNodeSize = myNodeFactory->NbUsedElements(); + smIdType newCellSize = myCellFactory->NbUsedElements(); myGrid->compactGrid( idNodesOldToNew, newNodeSize, idCellsNewToOld, newCellSize ); if ( idsChange && !myElemHolders.empty() ) diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index 1150ca044..d582c6993 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -575,17 +575,17 @@ public: virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID (const std::vector & nodes_ids, - const std::vector & quantities, + const std::vector & quantities, const smIdType ID); virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID (const std::vector & nodes, - const std::vector & quantities, - const smIdType ID); + const std::vector & quantities, + const smIdType ID); virtual SMDS_MeshVolume* AddPolyhedralVolume (const std::vector & nodes, - const std::vector & quantities); + const std::vector & quantities); virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector& vtkNodeIds); @@ -689,9 +689,9 @@ public: const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; } - virtual int NbNodes() const; + virtual smIdType NbNodes() const; virtual int NbElements() const; - virtual int Nb0DElements() const; + virtual smIdType Nb0DElements() const; virtual int NbBalls() const; virtual int NbEdges() const; virtual int NbFaces() const; diff --git a/src/SMDS/SMDS_MeshVolume.cxx b/src/SMDS/SMDS_MeshVolume.cxx index 67b3c773d..18d466763 100644 --- a/src/SMDS/SMDS_MeshVolume.cxx +++ b/src/SMDS/SMDS_MeshVolume.cxx @@ -36,7 +36,7 @@ // init a polyherdon void SMDS_MeshVolume::init( const std::vector& nodes, - const std::vector& nbNodesPerFace ) + const std::vector& nbNodesPerFace ) { std::vector ptIds; ptIds.reserve( nodes.size() + nbNodesPerFace.size() + 1 ); @@ -44,9 +44,9 @@ void SMDS_MeshVolume::init( const std::vector& nodes, size_t nbFaces = nbNodesPerFace.size(); for ( size_t iN = 0, iF = 0; iF < nbFaces; iF++ ) { - int nf = nbNodesPerFace[iF]; + smIdType nf = nbNodesPerFace[iF]; ptIds.push_back(nf); - for (int n = 0; n < nf; n++) + for (smIdType n = 0; n < nf; n++) ptIds.push_back( nodes[ iN++ ]->GetVtkID() ); } @@ -115,7 +115,7 @@ bool SMDS_MeshVolume::ChangeNodes(const std::vector& nodes return true; } -const SMDS_MeshNode* SMDS_MeshVolume::GetNode(const int ind) const +const SMDS_MeshNode* SMDS_MeshVolume::GetNode(const smIdType ind) const { if ( !IsPoly() ) return SMDS_MeshCell::GetNode( ind ); @@ -266,18 +266,18 @@ const SMDS_MeshNode* SMDS_MeshVolume::GetFaceNode (const int face_ind, const int return 0; } -std::vector SMDS_MeshVolume::GetQuantities() const +std::vector SMDS_MeshVolume::GetQuantities() const { - std::vector quantities; + std::vector quantities; if ( IsPoly() ) { vtkIdType nFaces = 0; vtkIdType const *ptIds(nullptr); getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds ); - int id = 0; - for (int i = 0; i < nFaces; i++) + smIdType id = 0; + for (smIdType i = 0; i < nFaces; i++) { - int nodesInFace = ptIds[id]; // nodeIds in ptIds[id+1 .. id+nodesInFace] + smIdType nodesInFace = ptIds[id]; // nodeIds in ptIds[id+1 .. id+nodesInFace] quantities.push_back( nodesInFace ); id += (nodesInFace + 1); } diff --git a/src/SMDS/SMDS_MeshVolume.hxx b/src/SMDS/SMDS_MeshVolume.hxx index 02d95aa82..615a0d760 100644 --- a/src/SMDS/SMDS_MeshVolume.hxx +++ b/src/SMDS/SMDS_MeshVolume.hxx @@ -31,6 +31,8 @@ #include "SMDS_MeshCell.hxx" +#include + /*! * \brief Mesh volume. This type is not allocated. * It is only used as function argument type to provide more clear semantic @@ -39,7 +41,7 @@ class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell { void init( const std::vector& nodes, - const std::vector& nbNodesPerFace ); // init a polyherdon + const std::vector& nbNodesPerFace ); // init a polyherdon void init( const std::vector& vtkNodeIds ); @@ -47,7 +49,7 @@ class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell public: virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; } - virtual const SMDS_MeshNode* GetNode(const int ind) const; + virtual const SMDS_MeshNode* GetNode(const smIdType ind) const; virtual int NbNodes() const; virtual int NbFaces() const; virtual int NbEdges() const; @@ -69,7 +71,7 @@ class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell // 1 <= node_ind <= NbFaceNodes() const SMDS_MeshNode* GetFaceNode (const int face_ind, const int node_ind) const; - std::vector GetQuantities() const; + std::vector GetQuantities() const; static SMDSAbs_ElementType Type() { return SMDSAbs_Volume; } }; diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 57f4bda6e..f17609c92 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -1983,49 +1983,49 @@ bool SMDS_VolumeTool::setFace( int faceIndex ) const myAllFacesNodeIndices_F = &Tetra_F [0][0]; //myAllFacesNodeIndices_FE = &Tetra_F [0][0]; myAllFacesNodeIndices_RE = &Tetra_RE[0][0]; - myAllFacesNbNodes = Tetra_nbN; + myAllFacesNbNodes = (smIdType*)(Tetra_nbN); myMaxFaceNbNodes = sizeof(Tetra_F[0])/sizeof(Tetra_F[0][0]); break; case 5: myAllFacesNodeIndices_F = &Pyramid_F [0][0]; //myAllFacesNodeIndices_FE = &Pyramid_F [0][0]; myAllFacesNodeIndices_RE = &Pyramid_RE[0][0]; - myAllFacesNbNodes = Pyramid_nbN; + myAllFacesNbNodes = (smIdType*)(Pyramid_nbN); myMaxFaceNbNodes = sizeof(Pyramid_F[0])/sizeof(Pyramid_F[0][0]); break; case 6: myAllFacesNodeIndices_F = &Penta_F [0][0]; //myAllFacesNodeIndices_FE = &Penta_FE[0][0]; myAllFacesNodeIndices_RE = &Penta_RE[0][0]; - myAllFacesNbNodes = Penta_nbN; + myAllFacesNbNodes = (smIdType*)(Penta_nbN); myMaxFaceNbNodes = sizeof(Penta_F[0])/sizeof(Penta_F[0][0]); break; case 8: myAllFacesNodeIndices_F = &Hexa_F [0][0]; ///myAllFacesNodeIndices_FE = &Hexa_FE[0][0]; myAllFacesNodeIndices_RE = &Hexa_RE[0][0]; - myAllFacesNbNodes = Hexa_nbN; + myAllFacesNbNodes = (smIdType*)(Hexa_nbN); myMaxFaceNbNodes = sizeof(Hexa_F[0])/sizeof(Hexa_F[0][0]); break; case 10: myAllFacesNodeIndices_F = &QuadTetra_F [0][0]; //myAllFacesNodeIndices_FE = &QuadTetra_F [0][0]; myAllFacesNodeIndices_RE = &QuadTetra_RE[0][0]; - myAllFacesNbNodes = QuadTetra_nbN; + myAllFacesNbNodes = (smIdType*)(QuadTetra_nbN); myMaxFaceNbNodes = sizeof(QuadTetra_F[0])/sizeof(QuadTetra_F[0][0]); break; case 13: myAllFacesNodeIndices_F = &QuadPyram_F [0][0]; //myAllFacesNodeIndices_FE = &QuadPyram_F [0][0]; myAllFacesNodeIndices_RE = &QuadPyram_RE[0][0]; - myAllFacesNbNodes = QuadPyram_nbN; + myAllFacesNbNodes = (smIdType*)(QuadPyram_nbN); myMaxFaceNbNodes = sizeof(QuadPyram_F[0])/sizeof(QuadPyram_F[0][0]); break; case 15: myAllFacesNodeIndices_F = &QuadPenta_F [0][0]; //myAllFacesNodeIndices_FE = &QuadPenta_FE[0][0]; myAllFacesNodeIndices_RE = &QuadPenta_RE[0][0]; - myAllFacesNbNodes = QuadPenta_nbN; + myAllFacesNbNodes = (smIdType*)(QuadPenta_nbN); myMaxFaceNbNodes = sizeof(QuadPenta_F[0])/sizeof(QuadPenta_F[0][0]); break; case 20: @@ -2033,14 +2033,14 @@ bool SMDS_VolumeTool::setFace( int faceIndex ) const myAllFacesNodeIndices_F = &QuadHexa_F [0][0]; //myAllFacesNodeIndices_FE = &QuadHexa_FE[0][0]; myAllFacesNodeIndices_RE = &QuadHexa_RE[0][0]; - myAllFacesNbNodes = QuadHexa_nbN; + myAllFacesNbNodes = (smIdType*)(QuadHexa_nbN); myMaxFaceNbNodes = sizeof(QuadHexa_F[0])/sizeof(QuadHexa_F[0][0]); if ( !myIgnoreCentralNodes && myVolumeNodes.size() == 27 ) { myAllFacesNodeIndices_F = &TriQuadHexa_F [0][0]; //myAllFacesNodeIndices_FE = &TriQuadHexa_FE[0][0]; myAllFacesNodeIndices_RE = &TriQuadHexa_RE[0][0]; - myAllFacesNbNodes = TriQuadHexa_nbN; + myAllFacesNbNodes = (smIdType*)(TriQuadHexa_nbN); myMaxFaceNbNodes = sizeof(TriQuadHexa_F[0])/sizeof(TriQuadHexa_F[0][0]); } break; @@ -2048,7 +2048,7 @@ bool SMDS_VolumeTool::setFace( int faceIndex ) const myAllFacesNodeIndices_F = &HexPrism_F [0][0]; //myAllFacesNodeIndices_FE = &HexPrism_FE[0][0]; myAllFacesNodeIndices_RE = &HexPrism_RE[0][0]; - myAllFacesNbNodes = HexPrism_nbN; + myAllFacesNbNodes = (smIdType*)(HexPrism_nbN); myMaxFaceNbNodes = sizeof(HexPrism_F[0])/sizeof(HexPrism_F[0][0]); break; default: diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index f33d68f24..95dd8cb1a 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -31,6 +31,8 @@ #include "SMESH_SMDS.hxx" +#include + class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_MeshVolume; @@ -261,7 +263,7 @@ class SMDS_EXPORT SMDS_VolumeTool int myNbFaces; std::vector myVolumeNodes; std::vector< int > myPolyIndices; // of a myCurFace - std::vector< int > myPolyQuantities; + std::vector myPolyQuantities; std::vector< int > myPolyFacetOri; // -1-in, +1-out, 0-undef typedef std::pair Link; @@ -271,7 +273,7 @@ class SMDS_EXPORT SMDS_VolumeTool mutable const int* myAllFacesNodeIndices_F; mutable const int* myAllFacesNodeIndices_RE; - mutable const int* myAllFacesNbNodes; + mutable const smIdType* myAllFacesNbNodes; mutable int myMaxFaceNbNodes; struct SaveFacet; diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index b8317ea1b..ef6b0a6ca 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -3121,7 +3121,7 @@ public: :myMesh( theMesh ), myMaxID( theMesh->MaxNodeID() + 1) {} - long GetLinkID (const SMDS_MeshNode * n1, + smIdType GetLinkID (const SMDS_MeshNode * n1, const SMDS_MeshNode * n2) const { return ( Min(FromIdType(n1->GetID()),FromIdType(n2->GetID())) * myMaxID + Max(FromIdType(n1->GetID()),FromIdType(n2->GetID()))); @@ -4603,7 +4603,7 @@ void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem, baseType = SMDSEntity_Polygon; // WARNING: change baseType !!!! } vector polyedre_nodes (nbNodes*2 + 4*nbNodes); - vector quantities (nbNodes + 2); + vector quantities (nbNodes + 2); polyedre_nodes.clear(); quantities.clear(); @@ -6774,7 +6774,7 @@ void SMESH_MeshEditor::FindCoincidentNodes (TIDSortedNodeSet & theNodes, int SMESH_MeshEditor::SimplifyFace (const vector& faceNodes, vector& poly_nodes, - vector& quantities) const + vector& quantities) const { int nbNodes = faceNodes.size(); while ( faceNodes[ 0 ] == faceNodes[ nbNodes-1 ] && nbNodes > 2 ) @@ -7078,7 +7078,7 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem, // a polygon can divide into several elements vector polygons_nodes; - vector quantities; + vector quantities; nbResElems = SimplifyFace( curNodes, polygons_nodes, quantities ); newElemDefs.resize( nbResElems ); for ( int inode = 0, iface = 0; iface < nbResElems; iface++ ) @@ -7118,7 +7118,7 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem, int nbFaces = aPolyedre->NbFaces(); vector& poly_nodes = newElemDefs[0].myNodes; - vector & quantities = newElemDefs[0].myPolyhedQuantities; + vector & quantities = newElemDefs[0].myPolyhedQuantities; vector faceNodes; poly_nodes.clear(); quantities.clear(); @@ -7370,7 +7370,7 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem, ////////////////// HEXAHEDRON ---> polyhedron hexa.SetExternalNormal(); vector& poly_nodes = newElemDefs[0].myNodes; - vector & quantities = newElemDefs[0].myPolyhedQuantities; + vector & quantities = newElemDefs[0].myPolyhedQuantities; poly_nodes.reserve( 6 * 4 ); poly_nodes.clear(); quantities.reserve( 6 ); quantities.clear(); for ( int iFace = 0; iFace < 6; iFace++ ) @@ -8607,7 +8607,7 @@ void SMESH_MeshEditor::UpdateVolumes (const SMDS_MeshNode* theBetweenNode // insert new nodes in all faces of the volume, sharing link theBetweenNode1 - theBetweenNode2 int iface, nbFaces = aVolume.NbFaces(); vector poly_nodes; - vector quantities (nbFaces); + vector quantities (nbFaces); for (iface = 0; iface < nbFaces; iface++) { int nbFaceNodes = aVolume.NbFaceNodes(iface), nbInserted = 0; @@ -8672,7 +8672,7 @@ namespace void volumeToPolyhedron( const SMDS_MeshElement* elem, vector & nodes, - vector & nbNodeInFaces ) + vector & nbNodeInFaces ) { nodes.clear(); nbNodeInFaces.clear(); @@ -8701,7 +8701,7 @@ int SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm, int nbElem = 0; if( !theSm ) return nbElem; - vector nbNodeInFaces; + vector nbNodeInFaces; vector nodes; SMDS_ElemIteratorPtr ElemItr = theSm->GetElements(); while(ElemItr->more()) @@ -8948,7 +8948,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT } // convert volumes - vector nbNodeInFaces; + vector nbNodeInFaces; SMDS_VolumeIteratorPtr aVolumeItr = meshDS->volumesIterator(); while(aVolumeItr->more()) { diff --git a/src/SMESH/SMESH_MeshEditor.hxx b/src/SMESH/SMESH_MeshEditor.hxx index 3a50a629a..90987ef9e 100644 --- a/src/SMESH/SMESH_MeshEditor.hxx +++ b/src/SMESH/SMESH_MeshEditor.hxx @@ -89,7 +89,7 @@ public: bool myIsPoly, myIsQuad; int myID; double myBallDiameter; - std::vector myPolyhedQuantities; + std::vector myPolyhedQuantities; std::vector myNodes; // not managed by ElemFeatures SMESH_EXPORT ElemFeatures( SMDSAbs_ElementType type=SMDSAbs_All, bool isPoly=false, bool isQuad=false ) @@ -103,11 +103,11 @@ public: SMESH_EXPORT ElemFeatures& Init( double diameter ) { myType = SMDSAbs_Ball; myBallDiameter = diameter; return *this; } - SMESH_EXPORT ElemFeatures& Init( std::vector& quanities, bool isQuad=false ) + SMESH_EXPORT ElemFeatures& Init( std::vector& quanities, bool isQuad=false ) { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; myPolyhedQuantities.swap( quanities ); return *this; } - SMESH_EXPORT ElemFeatures& Init( const std::vector& quanities, bool isQuad=false ) + SMESH_EXPORT ElemFeatures& Init( const std::vector& quanities, bool isQuad=false ) { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; myPolyhedQuantities = quanities; return *this; } @@ -517,7 +517,7 @@ public: int SimplifyFace (const std::vector& faceNodes, std::vector& poly_nodes, - std::vector& quantities) const; + std::vector& quantities) const; // Split face, defined by , into several faces by repeating nodes. // Is used by MergeNodes() diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index ed97f5cc2..dd7caabe6 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -2441,7 +2441,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1, SMDS_MeshVolume* SMESH_MesherHelper::AddPolyhedralVolume (const std::vector& nodes, - const std::vector& quantities, + const std::vector& quantities, const int id, const bool force3d) { @@ -2457,7 +2457,7 @@ SMESH_MesherHelper::AddPolyhedralVolume (const std::vector else { vector newNodes; - vector newQuantities; + vector newQuantities; for ( size_t iFace = 0, iN = 0; iFace < quantities.size(); ++iFace ) { int nbNodesInFace = quantities[iFace]; diff --git a/src/SMESH/SMESH_MesherHelper.hxx b/src/SMESH/SMESH_MesherHelper.hxx index b95092a68..71012dd3f 100644 --- a/src/SMESH/SMESH_MesherHelper.hxx +++ b/src/SMESH/SMESH_MesherHelper.hxx @@ -440,7 +440,7 @@ public: * Creates polyhedron. In quadratic mesh, adds medium nodes */ SMDS_MeshVolume* AddPolyhedralVolume (const std::vector& nodes, - const std::vector& quantities, + const std::vector& quantities, const int ID=0, const bool force3d = true); /*! diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index a6e36e0d7..f572360bb 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -3732,9 +3732,9 @@ void SMESH_Pattern:: if ( !volTool.Set( elem ) || !avoidSet.insert( elem ).second ) continue; // skip faces or refined elements // add polyhedron definition - myPolyhedronQuantities.push_back(vector ()); + myPolyhedronQuantities.push_back(vector ()); myPolyElemXYZIDs.push_back(TElemDef()); - vector& quantity = myPolyhedronQuantities.back(); + vector& quantity = myPolyhedronQuantities.back(); TElemDef & elemDef = myPolyElemXYZIDs.back(); // get definitions of new elements on volume faces bool makePoly = false; @@ -3767,7 +3767,7 @@ bool SMESH_Pattern:: const int theNbBndNodes, const vector< const SMDS_MeshNode* >& theNodes, list< int >& theFaceDefs, - vector& theQuantity) + vector& theQuantity) { bool makePoly = false; @@ -4257,7 +4257,7 @@ void SMESH_Pattern::createElements(SMESH_Mesh* theMes bool is2d = myIs2D; list< TElemDef >::const_iterator enIt = theElemNodeIDs.begin(); - list< vector >::iterator quantity = myPolyhedronQuantities.begin(); + list< vector >::iterator quantity = myPolyhedronQuantities.begin(); for ( int iElem = 0; enIt != theElemNodeIDs.end(); enIt++, iElem++ ) { const TElemDef & elemNodeInd = *enIt; diff --git a/src/SMESH/SMESH_Pattern.hxx b/src/SMESH/SMESH_Pattern.hxx index bc964a280..bee1d0161 100644 --- a/src/SMESH/SMESH_Pattern.hxx +++ b/src/SMESH/SMESH_Pattern.hxx @@ -28,6 +28,7 @@ #define SMESH_Pattern_HeaderFile #include "SMESH_SMESH.hxx" +#include #include #include @@ -328,7 +329,7 @@ private: const int theNbBndNodes, const std::vector< const SMDS_MeshNode* >& theNodes, std::list< int >& theFaceDefs, - std::vector& theQuantity); + std::vector& theQuantity); // fill faces definition for a volume face defined by theBndNodes // return true if a face definition changes @@ -392,7 +393,7 @@ private: std::vector myPolyElems; // definitions of new poly elements std::list< TElemDef > myPolyElemXYZIDs; - std::list< std::vector > myPolyhedronQuantities; + std::list< std::vector > myPolyhedronQuantities; // map a boundary to XYZs on it; // a boundary (edge or face) is defined as a set of its nodes, diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index bab264dbc..4ba213754 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -424,7 +424,7 @@ namespace } int aNbFaces = anIndexes[anIndexId++]; - std::vector quantities (aNbFaces); + std::vector quantities (aNbFaces); for (int i = 0; i < aNbFaces; i++) { quantities[i] = anIndexes[anIndexId++]; } diff --git a/src/SMESHDS/SMESHDS_Command.cxx b/src/SMESHDS/SMESHDS_Command.cxx index 755adf730..62c5db0bf 100644 --- a/src/SMESHDS/SMESHDS_Command.cxx +++ b/src/SMESHDS/SMESHDS_Command.cxx @@ -160,8 +160,8 @@ void SMESHDS_Command::AddFace(int NewFaceID, //function : //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, - int idnode1, int idnode2, int idnode3, int idnode4) +void SMESHDS_Command::AddVolume(smIdType NewVolID, + smIdType idnode1, smIdType idnode2, smIdType idnode3, smIdType idnode4) { if ( myType != SMESHDS_AddTetrahedron) { @@ -180,8 +180,8 @@ void SMESHDS_Command::AddVolume(int NewVolID, //function : //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, - int idnode1, int idnode2, int idnode3, int idnode4, int idnode5) +void SMESHDS_Command::AddVolume(smIdType NewVolID, + smIdType idnode1, smIdType idnode2, smIdType idnode3, smIdType idnode4, smIdType idnode5) { if ( myType != SMESHDS_AddPyramid) { @@ -201,9 +201,9 @@ void SMESHDS_Command::AddVolume(int NewVolID, //function : //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, - int idnode1, - int idnode2, int idnode3, int idnode4, int idnode5, int idnode6) +void SMESHDS_Command::AddVolume(smIdType NewVolID, + smIdType idnode1, + smIdType idnode2, smIdType idnode3, smIdType idnode4, smIdType idnode5, smIdType idnode6) { if ( myType != SMESHDS_AddPrism) { @@ -224,11 +224,11 @@ void SMESHDS_Command::AddVolume(int NewVolID, //function : //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, - int idnode1, - int idnode2, - int idnode3, - int idnode4, int idnode5, int idnode6, int idnode7, int idnode8) +void SMESHDS_Command::AddVolume(smIdType NewVolID, + smIdType idnode1, + smIdType idnode2, + smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8) { if ( myType != SMESHDS_AddHexahedron) { @@ -247,10 +247,10 @@ void SMESHDS_Command::AddVolume(int NewVolID, myNumber++; } -void SMESHDS_Command::AddVolume(int NewVolID, - int idnode1,int idnode2,int idnode3,int idnode4, - int idnode5, int idnode6, int idnode7, int idnode8, - int idnode9, int idnode10, int idnode11, int idnode12) +void SMESHDS_Command::AddVolume(smIdType NewVolID, + smIdType idnode1,smIdType idnode2,smIdType idnode3,smIdType idnode4, + smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8, + smIdType idnode9, smIdType idnode10, smIdType idnode11, smIdType idnode12) { if (myType != SMESHDS_AddHexagonalPrism) { @@ -323,7 +323,7 @@ void SMESHDS_Command::AddQuadPolygonalFace (const smIdType Element //======================================================================= void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementID, const std::vector& nodes_ids, - const std::vector& quantities) + const std::vector& quantities) { if ( myType != SMESHDS_AddPolyhedron) { MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type"); diff --git a/src/SMESHDS/SMESHDS_Command.hxx b/src/SMESHDS/SMESHDS_Command.hxx index eb3f943cc..a4d9f29f9 100644 --- a/src/SMESHDS/SMESHDS_Command.hxx +++ b/src/SMESHDS/SMESHDS_Command.hxx @@ -45,24 +45,24 @@ class SMESHDS_EXPORT SMESHDS_Command void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3); void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, int idnode4); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6, int idnode7, int idnode8); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6, int idnode7, int idnode8, - int idnode9, int idnode10, int idnode11, int idnode12); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8, + smIdType idnode9, smIdType idnode10, smIdType idnode11, smIdType idnode12); void AddPolygonalFace (const smIdType ElementID, const std::vector& nodes_ids); void AddQuadPolygonalFace (const smIdType ElementID, const std::vector& nodes_ids); void AddPolyhedralVolume (const smIdType ElementID, const std::vector& nodes_ids, - const std::vector& quantities); + const std::vector& quantities); void AddBall(int NewBallID, int node, double diameter); // special methods for quadratic elements void AddEdge(int NewEdgeID, int n1, int n2, int n12); diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index c7dc8bbd1..c4d0f80d5 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -790,7 +790,7 @@ SMESHDS_Mesh::AddQuadPolygonalFace (const std::vector& nod //purpose : //======================================================================= SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (const std::vector& nodes_ids, - const std::vector& quantities, + const std::vector& quantities, const smIdType ID) { SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes_ids, quantities, ID); @@ -802,8 +802,8 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (const std::vector& nodes, - const std::vector& quantities, - const smIdType ID) + const std::vector& quantities, + const smIdType ID) { SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID); if (anElem) { @@ -819,7 +819,7 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolume (const std::vector& nodes, - const std::vector& quantities) + const std::vector& quantities) { SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolume(nodes, quantities); if (anElem) { diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index c8b35400e..b68e2716d 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -567,17 +567,17 @@ class SMESHDS_EXPORT SMESHDS_Mesh : public SMDS_Mesh virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID (const std::vector& nodes_ids, - const std::vector& quantities, + const std::vector& quantities, const smIdType ID); virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID (const std::vector& nodes, - const std::vector& quantities, - const smIdType ID); + const std::vector& quantities, + const smIdType ID); virtual SMDS_MeshVolume* AddPolyhedralVolume (const std::vector& nodes, - const std::vector& quantities); + const std::vector& quantities); virtual void MoveNode(const SMDS_MeshNode *, double x, double y, double z); virtual void RemoveNode(const SMDS_MeshNode *); diff --git a/src/SMESHDS/SMESHDS_Script.cxx b/src/SMESHDS/SMESHDS_Script.cxx index 368fa16fa..3458e7a14 100644 --- a/src/SMESHDS/SMESHDS_Script.cxx +++ b/src/SMESHDS/SMESHDS_Script.cxx @@ -160,9 +160,9 @@ void SMESHDS_Script::AddFace(int NewFaceID, //function : //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewID, - int idnode1, int idnode2, - int idnode3, int idnode4) +void SMESHDS_Script::AddVolume(smIdType NewID, + smIdType idnode1, smIdType idnode2, + smIdType idnode3, smIdType idnode4) { if(myIsEmbeddedMode){ myIsModified = true; @@ -177,9 +177,9 @@ void SMESHDS_Script::AddVolume(int NewID, //function : //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewID, - int idnode1, int idnode2, - int idnode3, int idnode4, int idnode5) +void SMESHDS_Script::AddVolume(smIdType NewID, + smIdType idnode1, smIdType idnode2, + smIdType idnode3, smIdType idnode4, smIdType idnode5) { if(myIsEmbeddedMode){ myIsModified = true; @@ -194,9 +194,9 @@ void SMESHDS_Script::AddVolume(int NewID, //function : //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewID, - int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6) +void SMESHDS_Script::AddVolume(smIdType NewID, + smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6) { if(myIsEmbeddedMode){ myIsModified = true; @@ -211,9 +211,9 @@ void SMESHDS_Script::AddVolume(int NewID, //function : //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewID, - int idnode1, int idnode2, int idnode3, int idnode4, - int idnode5, int idnode6, int idnode7, int idnode8) +void SMESHDS_Script::AddVolume(smIdType NewID, + smIdType idnode1, smIdType idnode2, smIdType idnode3, smIdType idnode4, + smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8) { if(myIsEmbeddedMode){ myIsModified = true; @@ -228,9 +228,9 @@ void SMESHDS_Script::AddVolume(int NewID, //function : //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6, int idnode7, int idnode8, - int idnode9, int idnode10, int idnode11, int idnode12) +void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8, + smIdType idnode9, smIdType idnode10, smIdType idnode11, smIdType idnode12) { if(myIsEmbeddedMode){ myIsModified = true; @@ -274,7 +274,7 @@ void SMESHDS_Script::AddQuadPolygonalFace(smIdType NewFaceID, const std::vector< //======================================================================= void SMESHDS_Script::AddPolyhedralVolume (smIdType NewID, const std::vector& nodes_ids, - const std::vector& quantities) + const std::vector& quantities) { if(myIsEmbeddedMode){ myIsModified = true; diff --git a/src/SMESHDS/SMESHDS_Script.hxx b/src/SMESHDS/SMESHDS_Script.hxx index d5a84134e..21bd652eb 100644 --- a/src/SMESHDS/SMESHDS_Script.hxx +++ b/src/SMESHDS/SMESHDS_Script.hxx @@ -52,17 +52,17 @@ class SMESHDS_EXPORT SMESHDS_Script void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3); void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, int idnode4); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6, int idnode7, int idnode8); - void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3, - int idnode4, int idnode5, int idnode6, int idnode7, int idnode8, - int idnode9, int idnode10, int idnode11, int idnode12); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8); + void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4, smIdType idnode5, smIdType idnode6, smIdType idnode7, smIdType idnode8, + smIdType idnode9, smIdType idnode10, smIdType idnode11, smIdType idnode12); void AddPolygonalFace (const smIdType NewFaceID, const std::vector& nodes_ids); @@ -70,7 +70,7 @@ class SMESHDS_EXPORT SMESHDS_Script const std::vector& nodes_ids); void AddPolyhedralVolume (const smIdType NewVolID, const std::vector& nodes_ids, - const std::vector& quantities); + const std::vector& quantities); void AddBall(int NewBallID, int node, double diameter); // special methods for quadratic elements diff --git a/src/SMESHUtils/SMESH_Offset.cxx b/src/SMESHUtils/SMESH_Offset.cxx index 22c68fd79..97e299261 100644 --- a/src/SMESHUtils/SMESH_Offset.cxx +++ b/src/SMESHUtils/SMESH_Offset.cxx @@ -277,7 +277,7 @@ namespace static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper) { - return ::HashCode( (int)(f.myInitFace->GetID()), upper ); + return ::HashCode( FromIdType(f.myInitFace->GetID()), upper ); } static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 ) { diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index d542d9c85..217dc5b3f 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -1190,7 +1190,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I } int NbFaces = Quantities.length(); - std::vector q (NbFaces); + std::vector q (NbFaces); for (int j = 0; j < NbFaces; j++) q[j] = Quantities[j]; @@ -1220,7 +1220,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_ar int NbFaces = IdsOfFaces.length(); std::vector poly_nodes; - std::vector quantities (NbFaces); + std::vector quantities (NbFaces); for (int i = 0; i < NbFaces; i++) { const SMDS_MeshElement* aFace = getMeshDS()->FindElement(IdsOfFaces[i]); diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index a741b0f01..1add9f252 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -818,7 +818,7 @@ namespace }; vector< _nodeDef > _nodes; - vector< int > _quantities; + vector< smIdType > _quantities; _volumeDef* _next; // to store several _volumeDefs in a chain TGeomID _solidID; const SMDS_MeshElement* _volume; // new volume @@ -5257,7 +5257,7 @@ namespace if ( loopsJoined ) { // set unchanged polygons - std::vector< int > newQuantities; + std::vector< smIdType > newQuantities; std::vector< _volumeDef::_nodeDef > newNodes; vector< SMESH_Block::TShapeID > newNames; newQuantities.reserve( volDef->_quantities.size() ); diff --git a/src/StdMeshers/StdMeshers_PolyhedronPerSolid_3D.cxx b/src/StdMeshers/StdMeshers_PolyhedronPerSolid_3D.cxx index eeb19d48e..27686440d 100644 --- a/src/StdMeshers/StdMeshers_PolyhedronPerSolid_3D.cxx +++ b/src/StdMeshers/StdMeshers_PolyhedronPerSolid_3D.cxx @@ -63,7 +63,7 @@ namespace //======================================================================= const SMDS_MeshElement* addHexa( std::vector< const SMDS_MeshElement* >& faces, - const std::vector< int > & quantities, + const std::vector< smIdType > & quantities, SMESH_MesherHelper & helper ) { const SMDS_MeshElement* newHexa = 0; @@ -134,7 +134,7 @@ namespace //======================================================================= const SMDS_MeshElement* addTetra( std::vector< const SMDS_MeshElement* >& faces, - const std::vector< int > & quantities, + const std::vector< smIdType > & quantities, SMESH_MesherHelper & helper ) { const SMDS_MeshElement* newTetra = 0; @@ -173,7 +173,7 @@ namespace //======================================================================= const SMDS_MeshElement* addPenta( std::vector< const SMDS_MeshElement* >& faces, - const std::vector< int > & quantities, + const std::vector< smIdType > & quantities, SMESH_MesherHelper & helper ) { const SMDS_MeshElement* newPenta = 0; @@ -232,7 +232,7 @@ namespace //======================================================================= const SMDS_MeshElement* addPyra( std::vector< const SMDS_MeshElement* >& faces, - const std::vector< int > & quantities, + const std::vector< smIdType > & quantities, SMESH_MesherHelper & helper ) { const SMDS_MeshElement* newPyra = 0; @@ -276,7 +276,7 @@ namespace //======================================================================= const SMDS_MeshElement* addHPrism( std::vector< const SMDS_MeshElement* >& faces, - const std::vector< int > & quantities, + const std::vector< smIdType > & quantities, SMESH_MesherHelper & helper ) { const SMDS_MeshElement* newHexPrism = 0; @@ -357,7 +357,7 @@ namespace //======================================================================= const SMDS_MeshElement* addPoly( std::vector< const SMDS_MeshElement* >& faces, - const std::vector< int > & quantities, + const std::vector< smIdType > & quantities, SMESH_MesherHelper & helper ) { const SMDS_MeshElement* newPoly = 0; @@ -508,7 +508,7 @@ bool StdMeshers_PolyhedronPerSolid_3D::Compute(SMESH_Mesh& theMesh, for ( size_t i = 0; i < faces.size() && !useMediumNodes ; ++i ) useMediumNodes = faces[ i ]->IsQuadratic(); - std::vector< int > quantities( faces.size() ); + std::vector< smIdType > quantities( faces.size() ); std::set< const SMDS_MeshNode* > nodes; for ( size_t i = 0; i < faces.size(); ++i ) { diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 421710511..5dce53e59 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -2329,7 +2329,7 @@ bool StdMeshers_Prism_3D::AddPrisms( vector & columns, break; } default: // ---------- polyhedra - vector quantities( 2 + nbNodes, 4 ); + vector quantities( 2 + nbNodes, 4 ); quantities[0] = quantities[1] = nbNodes; columns.resize( nbNodes + 1 ); columns[ nbNodes ] = columns[ 0 ];