From: Viktor UZLOV Date: Tue, 2 Feb 2021 17:00:36 +0000 (+0300) Subject: rollback quantities. add SMESH::smIdType X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3176814024f68aac730c0beeb3c9d1161015a0c1;p=modules%2Fsmesh.git rollback quantities. add SMESH::smIdType --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6796fcfe9..28d1bac3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,7 @@ OPTION(SALOME_BUILD_GUI "Enable GUI" ON) OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF) OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF) OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" ON) +OPTION(SALOME_USE_64BIT_IDS "Size of IDs to refer cells and nodes. 32 bits when OFF (default), 64 bits when ON." ON) OPTION(SMESH_USE_MESHGEMS_HYPOSET "Prefer MeshGems algorithms in sets of hypotheses" OFF) CMAKE_DEPENDENT_OPTION(SALOME_SMESH_BUILD_FRENCH_DOC "Generate SALOME SMESH French documentation" OFF "SALOME_BUILD_DOC" OFF) diff --git a/SalomeSMESHConfig.cmake.in b/SalomeSMESHConfig.cmake.in index fba20e0cb..4e3c909d9 100644 --- a/SalomeSMESHConfig.cmake.in +++ b/SalomeSMESHConfig.cmake.in @@ -123,6 +123,7 @@ SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@") SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@") SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@") SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@") +SET(SALOME_USE_64BIT_IDS @SALOME_USE_64BIT_IDS@) # Include GEOM targets if they were not already loaded: IF(NOT (TARGET GEOMbasic)) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 900de9fd8..24d23c8b3 100644 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -26,6 +26,14 @@ INCLUDE_DIRECTORIES( ${PROJECT_BINARY_DIR}/idl ) +IF(SALOME_USE_64_BITS_IDS) + SET(SMESH_ID_TYPE "long long") +ELSE() + SET(SMESH_ID_TYPE "long") +ENDIF() + +SALOME_CONFIGURE_FILE(SMESH_smIdType.idl.in SMESH_smIdType.idl) + SET(SalomeIDLSMESH_IDLSOURCES SMESH_Gen.idl SMESH_Mesh.idl @@ -36,12 +44,13 @@ SET(SalomeIDLSMESH_IDLSOURCES SMESH_Pattern.idl SMESH_MeshEditor.idl SMESH_Measurements.idl - SMESH_smIdType.idl + ${CMAKE_CURRENT_BINARY_DIR}/SMESH_smIdType.idl ) SET(_idl_include_dirs ${KERNEL_ROOT_DIR}/idl/salome ${GEOM_ROOT_DIR}/idl/salome + ${PROJECT_BINARY_DIR}/idl ) SET(_idl_link_flags diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index 9fdde321f..adc181668 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -29,6 +29,7 @@ #include "SALOME_Exception.idl" #include "SALOME_GenericObj.idl" #include "GEOM_Gen.idl" +#include "SMESH_smIdType.idl" module SMESH { diff --git a/idl/SMESH_smIdType.idl b/idl/SMESH_smIdType.idl deleted file mode 100644 index 6adc915d4..000000000 --- a/idl/SMESH_smIdType.idl +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef __SMESH_SMIDTYPE_IDL__ -#define __SMESH_SMIDTYPE_IDL__ - -module SMESH -{ - #ifndef SALOME_USE_64BIT_IDS - typedef long smIdType; - #else - typedef long long smIdType; - #endif -}; - -#endif \ No newline at end of file diff --git a/idl/SMESH_smIdType.idl.in b/idl/SMESH_smIdType.idl.in new file mode 100644 index 000000000..5627249d7 --- /dev/null +++ b/idl/SMESH_smIdType.idl.in @@ -0,0 +1,28 @@ +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef __SMESH_SMIDTYPE_IDL__ +#define __SMESH_SMIDTYPE_IDL__ + +module SMESH +{ + typedef @SMESH_ID_TYPE@ smIdType; +}; + +#endif \ No newline at end of file diff --git a/src/DriverCGNS/DriverCGNS_Read.cxx b/src/DriverCGNS/DriverCGNS_Read.cxx index 08ba5de54..4ac3e92c6 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 6413b62bf..3440ee09a 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 421419dec..ac7cb640f 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_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index c5fbc28e6..c512d7109 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); @@ -1467,7 +1467,7 @@ smIdType SMDS_Mesh::NbNodes() const /////////////////////////////////////////////////////////////////////////////// /// Return the number of elements /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::NbElements() const +smIdType SMDS_Mesh::NbElements() const { return myInfo.NbElements(); } @@ -1482,7 +1482,7 @@ smIdType SMDS_Mesh::Nb0DElements() const /////////////////////////////////////////////////////////////////////////////// /// Return the number of 0D elements /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::NbBalls() const +smIdType SMDS_Mesh::NbBalls() const { return myInfo.NbBalls(); } @@ -1490,7 +1490,7 @@ int SMDS_Mesh::NbBalls() const /////////////////////////////////////////////////////////////////////////////// /// Return the number of edges (including construction edges) /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::NbEdges() const +smIdType SMDS_Mesh::NbEdges() const { return myInfo.NbEdges(); } @@ -1498,7 +1498,7 @@ int SMDS_Mesh::NbEdges() const /////////////////////////////////////////////////////////////////////////////// /// Return the number of faces (including construction faces) /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::NbFaces() const +smIdType SMDS_Mesh::NbFaces() const { return myInfo.NbFaces(); } @@ -1506,7 +1506,7 @@ int SMDS_Mesh::NbFaces() const /////////////////////////////////////////////////////////////////////////////// /// Return the number of volumes /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::NbVolumes() const +smIdType SMDS_Mesh::NbVolumes() const { return myInfo.NbVolumes(); } @@ -1515,7 +1515,7 @@ int SMDS_Mesh::NbVolumes() const /// Return the number of child mesh of this mesh. /// Note that the tree structure of SMDS_Mesh is unused in SMESH /////////////////////////////////////////////////////////////////////////////// -int SMDS_Mesh::NbSubMesh() const +smIdType SMDS_Mesh::NbSubMesh() const { return myChildren.size(); } diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index d582c6993..616a0b2b6 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 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); @@ -690,13 +690,13 @@ public: const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; } virtual smIdType NbNodes() const; - virtual int NbElements() const; + virtual smIdType NbElements() const; virtual smIdType Nb0DElements() const; - virtual int NbBalls() const; - virtual int NbEdges() const; - virtual int NbFaces() const; - virtual int NbVolumes() const; - virtual int NbSubMesh() const; + virtual smIdType NbBalls() const; + virtual smIdType NbEdges() const; + virtual smIdType NbFaces() const; + virtual smIdType NbVolumes() const; + virtual smIdType NbSubMesh() const; virtual ~SMDS_Mesh(); diff --git a/src/SMDS/SMDS_MeshVolume.cxx b/src/SMDS/SMDS_MeshVolume.cxx index 18d466763..67b3c773d 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++ ) { - smIdType nf = nbNodesPerFace[iF]; + int nf = nbNodesPerFace[iF]; ptIds.push_back(nf); - for (smIdType n = 0; n < nf; n++) + for (int 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 smIdType ind) const +const SMDS_MeshNode* SMDS_MeshVolume::GetNode(const int 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 ); - smIdType id = 0; - for (smIdType i = 0; i < nFaces; i++) + int id = 0; + for (int i = 0; i < nFaces; i++) { - smIdType nodesInFace = ptIds[id]; // nodeIds in ptIds[id+1 .. id+nodesInFace] + int 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 615a0d760..02d95aa82 100644 --- a/src/SMDS/SMDS_MeshVolume.hxx +++ b/src/SMDS/SMDS_MeshVolume.hxx @@ -31,8 +31,6 @@ #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 @@ -41,7 +39,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 ); @@ -49,7 +47,7 @@ class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell public: virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; } - virtual const SMDS_MeshNode* GetNode(const smIdType ind) const; + virtual const SMDS_MeshNode* GetNode(const int ind) const; virtual int NbNodes() const; virtual int NbFaces() const; virtual int NbEdges() const; @@ -71,7 +69,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 f17609c92..57f4bda6e 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 = (smIdType*)(Tetra_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(Pyramid_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(Penta_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(Hexa_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(QuadTetra_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(QuadPyram_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(QuadPenta_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(QuadHexa_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(TriQuadHexa_nbN); + myAllFacesNbNodes = 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 = (smIdType*)(HexPrism_nbN); + myAllFacesNbNodes = 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 95dd8cb1a..2c7f619ae 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -31,8 +31,6 @@ #include "SMESH_SMDS.hxx" -#include - class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_MeshVolume; @@ -263,7 +261,7 @@ class SMDS_EXPORT SMDS_VolumeTool int myNbFaces; std::vector myVolumeNodes; std::vector< int > myPolyIndices; // of a myCurFace - std::vector myPolyQuantities; + std::vector myPolyQuantities; std::vector< int > myPolyFacetOri; // -1-in, +1-out, 0-undef typedef std::pair Link; @@ -273,7 +271,7 @@ class SMDS_EXPORT SMDS_VolumeTool mutable const int* myAllFacesNodeIndices_F; mutable const int* myAllFacesNodeIndices_RE; - mutable const smIdType* myAllFacesNbNodes; + mutable const int* myAllFacesNbNodes; mutable int myMaxFaceNbNodes; struct SaveFacet; diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index ef6b0a6ca..b49ab919c 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -3124,7 +3124,7 @@ public: 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()))); + return ( std::min(n1->GetID(),n2->GetID()) * myMaxID + std::max(n1->GetID(),n2->GetID())); } bool GetNodes (const long theLinkID, @@ -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 90987ef9e..3a50a629a 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 dd7caabe6..ed97f5cc2 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 71012dd3f..b95092a68 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 f572360bb..a6e36e0d7 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 bee1d0161..bc964a280 100644 --- a/src/SMESH/SMESH_Pattern.hxx +++ b/src/SMESH/SMESH_Pattern.hxx @@ -28,7 +28,6 @@ #define SMESH_Pattern_HeaderFile #include "SMESH_SMESH.hxx" -#include #include #include @@ -329,7 +328,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 @@ -393,7 +392,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 4ba213754..fc6ec00ff 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -203,13 +203,13 @@ namespace //======================================================================= inline void AddQuadsWithID(SMDS_Mesh* theMesh, SMESH::log_array_var theSeq, - CORBA::Long theId) + SMESH::smIdType theId) { const SMESH::long_array& anIndexes = theSeq[theId].indexes; - CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; - if(5*aNbElems != (CORBA::Long) anIndexes.length()) + SMESH::smIdType anElemId = 0, aNbElems = theSeq[theId].number; + if(5*aNbElems != (SMESH::smIdType) anIndexes.length()) EXCEPTION(runtime_error,"AddQuadsWithID - 4*aNbElems != anIndexes.length()"); - for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){ + for(SMESH::smIdType anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){ SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1], anIndexes[anIndexId+2], anIndexes[anIndexId+3], @@ -226,12 +226,12 @@ namespace //======================================================================= inline void AddPolygonsWithID(SMDS_Mesh* theMesh, SMESH::log_array_var& theSeq, - CORBA::Long theId) + SMESH::smIdType theId) { const SMESH::long_array& anIndexes = theSeq[theId].indexes; - CORBA::Long anIndexId = 0, aNbElems = theSeq[theId].number; + SMESH::smIdType anIndexId = 0, aNbElems = theSeq[theId].number; - for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) { + for (SMESH::smIdType anElemId = 0; anElemId < aNbElems; anElemId++) { smIdType aFaceId = anIndexes[anIndexId++]; int aNbNodes = anIndexes[anIndexId++]; @@ -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 62c5db0bf..371515ab6 100644 --- a/src/SMESHDS/SMESHDS_Command.cxx +++ b/src/SMESHDS/SMESHDS_Command.cxx @@ -52,7 +52,7 @@ SMESHDS_Command::~SMESHDS_Command() //function : //purpose : //======================================================================= -void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z) +void SMESHDS_Command::AddNode(smIdType NewNodeID, double x, double y, double z) { if ( myType != SMESHDS_AddNode) { @@ -70,7 +70,7 @@ void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z) //function : //purpose : //======================================================================= -void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z) +void SMESHDS_Command::MoveNode(smIdType NodeID, double x, double y, double z) { if ( myType != SMESHDS_MoveNode) { @@ -88,7 +88,7 @@ void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z) //function : //purpose : //======================================================================= -void SMESHDS_Command::Add0DElement(int New0DElementID, int idnode) +void SMESHDS_Command::Add0DElement(smIdType New0DElementID, smIdType idnode) { if ( myType != SMESHDS_Add0DElement) { @@ -104,7 +104,7 @@ void SMESHDS_Command::Add0DElement(int New0DElementID, int idnode) //function : //purpose : //======================================================================= -void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2) +void SMESHDS_Command::AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2) { if ( myType != SMESHDS_AddEdge) { @@ -121,8 +121,8 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2) //function : //purpose : //======================================================================= -void SMESHDS_Command::AddFace(int NewFaceID, - int idnode1, int idnode2, int idnode3) +void SMESHDS_Command::AddFace(smIdType NewFaceID, + smIdType idnode1, smIdType idnode2, smIdType idnode3) { if ( myType != SMESHDS_AddTriangle) { @@ -140,8 +140,8 @@ void SMESHDS_Command::AddFace(int NewFaceID, //function : //purpose : //======================================================================= -void SMESHDS_Command::AddFace(int NewFaceID, - int idnode1, int idnode2, int idnode3, int idnode4) +void SMESHDS_Command::AddFace(smIdType NewFaceID, + smIdType idnode1, smIdType idnode2, smIdType idnode3, smIdType idnode4) { if ( myType != SMESHDS_AddQuadrangle) { @@ -286,7 +286,7 @@ void SMESHDS_Command::AddPolygonalFace (const smIdType ElementID, } myIntegers.push_back(ElementID); - int i, nbNodes = nodes_ids.size(); + smIdType i, nbNodes = nodes_ids.size(); myIntegers.push_back(nbNodes); for (i = 0; i < nbNodes; i++) { myIntegers.push_back(nodes_ids[i]); @@ -308,7 +308,7 @@ void SMESHDS_Command::AddQuadPolygonalFace (const smIdType Element } myIntegers.push_back(ElementID); - int i, nbNodes = nodes_ids.size(); + smIdType i, nbNodes = nodes_ids.size(); myIntegers.push_back(nbNodes); for (i = 0; i < nbNodes; i++) { myIntegers.push_back(nodes_ids[i]); @@ -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"); @@ -331,13 +331,13 @@ void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementI } myIntegers.push_back(ElementID); - int i, nbNodes = nodes_ids.size(); + smIdType i, nbNodes = nodes_ids.size(); myIntegers.push_back(nbNodes); for (i = 0; i < nbNodes; i++) { myIntegers.push_back(nodes_ids[i]); } - int nbFaces = quantities.size(); + smIdType nbFaces = quantities.size(); myIntegers.push_back(nbFaces); for (i = 0; i < nbFaces; i++) { myIntegers.push_back(quantities[i]); @@ -350,7 +350,7 @@ void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementI //function : //purpose : //======================================================================= -void SMESHDS_Command::RemoveNode(int NodeID) +void SMESHDS_Command::RemoveNode(smIdType NodeID) { if ( myType != SMESHDS_RemoveNode) { @@ -365,7 +365,7 @@ void SMESHDS_Command::RemoveNode(int NodeID) //function : //purpose : //======================================================================= -void SMESHDS_Command::RemoveElement(int ElementID) +void SMESHDS_Command::RemoveElement(smIdType ElementID) { if ( myType != SMESHDS_RemoveElement) { @@ -381,7 +381,7 @@ void SMESHDS_Command::RemoveElement(int ElementID) //purpose : //======================================================================= -void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes) +void SMESHDS_Command::ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes) { if ( myType != SMESHDS_ChangeElementNodes) { @@ -390,7 +390,7 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes } myIntegers.push_back(ElementID); myIntegers.push_back(nbnodes); - for ( int i = 0; i < nbnodes; i++ ) + for ( smIdType i = 0; i < nbnodes; i++ ) myIntegers.push_back( nodes[ i ] ); myNumber++; @@ -400,8 +400,8 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes //function : ChangePolyhedronNodes //purpose : //======================================================================= -void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID, - const std::vector& nodes_ids, +void SMESHDS_Command::ChangePolyhedronNodes (const smIdType ElementID, + const std::vector& nodes_ids, const std::vector& quantities) { if (myType != SMESHDS_ChangePolyhedronNodes) @@ -411,7 +411,7 @@ void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID, } myIntegers.push_back(ElementID); - int i, nbNodes = nodes_ids.size(); + smIdType i, nbNodes = nodes_ids.size(); myIntegers.push_back(nbNodes); for (i = 0; i < nbNodes; i++) { myIntegers.push_back(nodes_ids[i]); @@ -431,7 +431,7 @@ void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID, //purpose : //======================================================================= -void SMESHDS_Command::Renumber (const bool isNodes, const int startID, const int deltaID) +void SMESHDS_Command::Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID) { if ( myType != SMESHDS_Renumber) { @@ -457,7 +457,7 @@ SMESHDS_CommandType SMESHDS_Command::GetType() //function : //purpose : //======================================================================= -int SMESHDS_Command::GetNumber() +smIdType SMESHDS_Command::GetNumber() { return myNumber; } @@ -466,7 +466,7 @@ int SMESHDS_Command::GetNumber() //function : //purpose : //======================================================================= -const list < int >&SMESHDS_Command::GetIndexes() +const list < smIdType >&SMESHDS_Command::GetIndexes() { return myIntegers; } @@ -489,7 +489,7 @@ const list < double >&SMESHDS_Command::GetCoords() //function : AddEdge //purpose : //======================================================================= -void SMESHDS_Command::AddEdge(int NewEdgeID, int n1, int n2, int n12) +void SMESHDS_Command::AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12) { if ( myType != SMESHDS_AddQuadEdge) { MESSAGE("SMESHDS_Command::AddEdge : Bad Type"); @@ -506,9 +506,9 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int n1, int n2, int n12) //function : AddFace //purpose : //======================================================================= -void SMESHDS_Command::AddFace(int NewFaceID, - int n1, int n2, int n3, - int n12, int n23, int n31) +void SMESHDS_Command::AddFace(smIdType NewFaceID, + smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31) { if ( myType != SMESHDS_AddQuadTriangle) { MESSAGE("SMESHDS_Command::AddFace : Bad Type"); @@ -528,9 +528,9 @@ void SMESHDS_Command::AddFace(int NewFaceID, //function : AddFace //purpose : //======================================================================= -void SMESHDS_Command::AddFace(int NewFaceID, - int n1, int n2, int n3, - int n12, int n23, int n31, int nCenter) +void SMESHDS_Command::AddFace(smIdType NewFaceID, + smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31, smIdType nCenter) { if ( myType != SMESHDS_AddBiQuadTriangle) { MESSAGE("SMESHDS_Command::AddFace : Bad Type"); @@ -551,9 +551,9 @@ void SMESHDS_Command::AddFace(int NewFaceID, //function : AddFace //purpose : //======================================================================= -void SMESHDS_Command::AddFace(int NewFaceID, - int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41) +void SMESHDS_Command::AddFace(smIdType NewFaceID, + smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41) { if ( myType != SMESHDS_AddQuadQuadrangle) { MESSAGE("SMESHDS_Command::AddFace : Bad Type"); @@ -575,9 +575,9 @@ void SMESHDS_Command::AddFace(int NewFaceID, //function : AddFace //purpose : //======================================================================= -void SMESHDS_Command::AddFace(int NewFaceID, - int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41, int nCenter) +void SMESHDS_Command::AddFace(smIdType NewFaceID, + smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter) { if (myType != SMESHDS_AddBiQuadQuadrangle) { MESSAGE("SMESHDS_Command::AddFace : Bad Type"); @@ -600,9 +600,9 @@ void SMESHDS_Command::AddFace(int NewFaceID, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n12, int n23, int n31, - int n14, int n24, int n34) +void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n31, + smIdType n14, smIdType n24, smIdType n34) { if ( myType != SMESHDS_AddQuadTetrahedron) { MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); @@ -626,10 +626,10 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, - int n3, int n4, int n5, - int n12, int n23, int n34, int n41, - int n15, int n25, int n35, int n45) +void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, + smIdType n3, smIdType n4, smIdType n5, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n15, smIdType n25, smIdType n35, smIdType n45) { if ( myType != SMESHDS_AddQuadPyramid) { MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); @@ -656,11 +656,11 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, - int n3, int n4, int n5,int n6, - int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36) +void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, + smIdType n3, smIdType n4, smIdType n5,smIdType n6, + smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36) { if ( myType != SMESHDS_AddQuadPentahedron) { MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); @@ -688,12 +688,12 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, - int n3, int n4, int n5,int n6, - int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36, - int n1245, int n2356, int n1346) +void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, + smIdType n3, smIdType n4, smIdType n5,smIdType n6, + smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36, + smIdType n1245, smIdType n2356, smIdType n1346) { if ( myType != SMESHDS_AddBiQuadPentahedron) { MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); @@ -726,11 +726,11 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48) +void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48) { if ( myType != SMESHDS_AddQuadHexahedron) { MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); @@ -764,13 +764,13 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48, - int n1234,int n1256,int n2367,int n3478, - int n1458,int n5678,int nCenter) +void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48, + smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478, + smIdType n1458,smIdType n5678,smIdType nCenter) { if ( myType != SMESHDS_AddTriQuadHexa) { MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); @@ -813,7 +813,7 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, */ //================================================================================ -void SMESHDS_Command::AddBall(int NewBallID, int node, double diameter) +void SMESHDS_Command::AddBall(smIdType NewBallID, smIdType node, double diameter) { if ( myType != SMESHDS_AddBall) { diff --git a/src/SMESHDS/SMESHDS_Command.hxx b/src/SMESHDS/SMESHDS_Command.hxx index a4d9f29f9..c89471140 100644 --- a/src/SMESHDS/SMESHDS_Command.hxx +++ b/src/SMESHDS/SMESHDS_Command.hxx @@ -39,12 +39,12 @@ class SMESHDS_EXPORT SMESHDS_Command public: SMESHDS_Command(const SMESHDS_CommandType aType); - void AddNode(int NewNodeID, double x, double y, double z); - void Add0DElement(int New0DElementID, int idnode); - void AddEdge(int NewEdgeID, int idnode1, int idnode2); - void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3); - void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, - int idnode4); + void AddNode(smIdType NewNodeID, double x, double y, double z); + void Add0DElement(smIdType New0DElementID, smIdType idnode); + void AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2); + void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3); + void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4); void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, smIdType idnode4); void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, @@ -62,64 +62,64 @@ class SMESHDS_EXPORT SMESHDS_Command const std::vector& nodes_ids); void AddPolyhedralVolume (const smIdType ElementID, const std::vector& nodes_ids, - const std::vector& quantities); - void AddBall(int NewBallID, int node, double diameter); + const std::vector& quantities); + void AddBall(smIdType NewBallID, smIdType node, double diameter); // special methods for quadratic elements - void AddEdge(int NewEdgeID, int n1, int n2, int n12); - void AddFace(int NewFaceID, int n1, int n2, int n3, - int n12, int n23, int n31); - void AddFace(int NewFaceID, int n1, int n2, int n3, - int n12, int n23, int n31, int nCenter); - void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41); - void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41, int nCenter); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n12, int n23, int n31, int n14, int n24, int n34); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5, - int n12, int n23, int n34, int n41, - int n15, int n25, int n35, int n45); - void AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, - int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36); - void AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, - int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36, - int n1245, int n2356, int n1346); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48, - int n1234,int n1256,int n2367,int n3478, - int n1458,int n5678,int nCenter); + void AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31, smIdType nCenter); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n31, smIdType n14, smIdType n24, smIdType n34); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, smIdType n5, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n15, smIdType n25, smIdType n35, smIdType n45); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, + smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, + smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36, + smIdType n1245, smIdType n2356, smIdType n1346); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48, + smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478, + smIdType n1458,smIdType n5678,smIdType nCenter); - void MoveNode(int NewNodeID, double x, double y, double z); - void RemoveNode(int NodeID); - void RemoveElement(int ElementID); - void ChangeElementNodes(int ElementID, int nodes[], int nbnodes); - void ChangePolyhedronNodes(const int ElementID, - const std::vector& nodes_ids, + void MoveNode(smIdType NewNodeID, double x, double y, double z); + void RemoveNode(smIdType NodeID); + void RemoveElement(smIdType ElementID); + void ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes); + void ChangePolyhedronNodes(const smIdType ElementID, + const std::vector& nodes_ids, const std::vector& quantities); - void Renumber (const bool isNodes, const int startID, const int deltaID); + void Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID); SMESHDS_CommandType GetType(); - int GetNumber(); - const std::list & GetIndexes(); + smIdType GetNumber(); + const std::list & GetIndexes(); const std::list & GetCoords(); ~SMESHDS_Command(); private: SMESHDS_CommandType myType; int myNumber; std::list myReals; - std::list myIntegers; + std::list myIntegers; }; #endif diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index c4d0f80d5..460d939a2 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -223,8 +223,8 @@ bool SMESHDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem, if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes )) return false; - std::vector IDs( nbnodes ); - for ( int i = 0; i < nbnodes; i++ ) + std::vector IDs( nbnodes ); + for ( smIdType i = 0; i < nbnodes; i++ ) IDs [ i ] = nodes[ i ]->GetID(); myScript->ChangeElementNodes( elem->GetID(), &IDs[0], nbnodes); @@ -258,8 +258,8 @@ bool SMESHDS_Mesh if ( !SMDS_Mesh::ChangePolyhedronNodes( elem, nodes, quantities )) return false; - int i, len = nodes.size(); - std::vector nodes_ids (len); + smIdType i, len = nodes.size(); + std::vector nodes_ids (len); for (i = 0; i < len; i++) { nodes_ids[i] = nodes[i]->GetID(); } @@ -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,7 +802,7 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (const std::vector& nodes, - const std::vector& quantities, + const std::vector& quantities, const smIdType ID) { SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID); @@ -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 b68e2716d..d32fe9cdf 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 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 3458e7a14..a30aa8de3 100644 --- a/src/SMESHDS/SMESHDS_Script.cxx +++ b/src/SMESHDS/SMESHDS_Script.cxx @@ -89,7 +89,7 @@ SMESHDS_Command* SMESHDS_Script::getCommand(const SMESHDS_CommandType aType) //function : //purpose : //======================================================================= -void SMESHDS_Script::AddNode(int NewNodeID, double x, double y, double z) +void SMESHDS_Script::AddNode(smIdType NewNodeID, double x, double y, double z) { if(myIsEmbeddedMode){ myIsModified = true; @@ -102,7 +102,7 @@ void SMESHDS_Script::AddNode(int NewNodeID, double x, double y, double z) //function : //purpose : //======================================================================= -void SMESHDS_Script::Add0DElement (int New0DElementID, int idnode) +void SMESHDS_Script::Add0DElement (smIdType New0DElementID, smIdType idnode) { if (myIsEmbeddedMode) { myIsModified = true; @@ -115,7 +115,7 @@ void SMESHDS_Script::Add0DElement (int New0DElementID, int idnode) //function : //purpose : //======================================================================= -void SMESHDS_Script::AddEdge(int NewEdgeID, int idnode1, int idnode2) +void SMESHDS_Script::AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2) { if(myIsEmbeddedMode){ myIsModified = true; @@ -128,8 +128,8 @@ void SMESHDS_Script::AddEdge(int NewEdgeID, int idnode1, int idnode2) //function : //purpose : //======================================================================= -void SMESHDS_Script::AddFace(int NewFaceID, - int idnode1, int idnode2, int idnode3) +void SMESHDS_Script::AddFace(smIdType NewFaceID, + smIdType idnode1, smIdType idnode2, smIdType idnode3) { if(myIsEmbeddedMode){ myIsModified = true; @@ -143,9 +143,9 @@ void SMESHDS_Script::AddFace(int NewFaceID, //function : //purpose : //======================================================================= -void SMESHDS_Script::AddFace(int NewFaceID, - int idnode1, int idnode2, - int idnode3, int idnode4) +void SMESHDS_Script::AddFace(smIdType NewFaceID, + smIdType idnode1, smIdType idnode2, + smIdType idnode3, smIdType idnode4) { 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; @@ -289,7 +289,7 @@ void SMESHDS_Script::AddPolyhedralVolume (smIdType NewID, //purpose : Record adding a Ball //======================================================================= -void SMESHDS_Script::AddBall(int NewBallID, int node, double diameter) +void SMESHDS_Script::AddBall(smIdType NewBallID, smIdType node, double diameter) { if ( myIsEmbeddedMode ) myIsModified = true; @@ -301,7 +301,7 @@ void SMESHDS_Script::AddBall(int NewBallID, int node, double diameter) //function : //purpose : //======================================================================= -void SMESHDS_Script::MoveNode(int NewNodeID, double x, double y, double z) +void SMESHDS_Script::MoveNode(smIdType NewNodeID, double x, double y, double z) { if(myIsEmbeddedMode){ myIsModified = true; @@ -314,7 +314,7 @@ void SMESHDS_Script::MoveNode(int NewNodeID, double x, double y, double z) //function : //purpose : //======================================================================= -void SMESHDS_Script::RemoveNode(int ID) +void SMESHDS_Script::RemoveNode(smIdType ID) { if(myIsEmbeddedMode){ myIsModified = true; @@ -327,7 +327,7 @@ void SMESHDS_Script::RemoveNode(int ID) //function : //purpose : //======================================================================= -void SMESHDS_Script::RemoveElement(int ElementID) +void SMESHDS_Script::RemoveElement(smIdType ElementID) { if(myIsEmbeddedMode){ myIsModified = true; @@ -341,7 +341,7 @@ void SMESHDS_Script::RemoveElement(int ElementID) //purpose : //======================================================================= -void SMESHDS_Script::ChangeElementNodes(int ElementID, int nodes[], int nbnodes) +void SMESHDS_Script::ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes) { if(myIsEmbeddedMode){ myIsModified = true; @@ -354,8 +354,8 @@ void SMESHDS_Script::ChangeElementNodes(int ElementID, int nodes[], int nbnodes) //function : ChangePolyhedronNodes //purpose : //======================================================================= -void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID, - const std::vector& nodes_ids, +void SMESHDS_Script::ChangePolyhedronNodes (const smIdType ElementID, + const std::vector& nodes_ids, const std::vector& quantities) { if(myIsEmbeddedMode){ @@ -370,7 +370,7 @@ void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID, //function : Renumber //purpose : //======================================================================= -void SMESHDS_Script::Renumber (const bool isNodes, const int startID, const int deltaID) +void SMESHDS_Script::Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID) { if(myIsEmbeddedMode){ myIsModified = true; @@ -424,7 +424,7 @@ const list& SMESHDS_Script::GetCommands() //function : AddEdge //purpose : //======================================================================= -void SMESHDS_Script::AddEdge(int NewEdgeID, int n1, int n2, int n12) +void SMESHDS_Script::AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12) { if(myIsEmbeddedMode){ myIsModified = true; @@ -437,8 +437,8 @@ void SMESHDS_Script::AddEdge(int NewEdgeID, int n1, int n2, int n12) //function : AddFace //purpose : //======================================================================= -void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, - int n12, int n23, int n31) +void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31) { if(myIsEmbeddedMode){ myIsModified = true; @@ -452,8 +452,8 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, //function : AddFace //purpose : //======================================================================= -void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, - int n12, int n23, int n31, int nCenter) +void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31, smIdType nCenter) { if(myIsEmbeddedMode){ myIsModified = true; @@ -467,8 +467,8 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, //function : AddFace //purpose : //======================================================================= -void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41) +void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41) { if(myIsEmbeddedMode){ myIsModified = true; @@ -482,8 +482,8 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4, //function : AddFace //purpose : //======================================================================= -void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41, int nCenter) +void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter) { if(myIsEmbeddedMode){ myIsModified = true; @@ -497,9 +497,9 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n12, int n23, int n31, - int n14, int n24, int n34) +void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n31, + smIdType n14, smIdType n24, smIdType n34) { if(myIsEmbeddedMode){ myIsModified = true; @@ -514,9 +514,9 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n5, int n12, int n23, int n34, int n41, - int n15, int n25, int n35, int n45) +void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n5, smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n15, smIdType n25, smIdType n35, smIdType n45) { if(myIsEmbeddedMode){ myIsModified = true; @@ -531,10 +531,10 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n5,int n6, int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36) +void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n5,smIdType n6, smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36) { if(myIsEmbeddedMode){ myIsModified = true; @@ -550,11 +550,11 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n5,int n6, int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36, - int n1245, int n2356, int n1346) +void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n5,smIdType n6, smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36, + smIdType n1245, smIdType n2356, smIdType n1346) { if(myIsEmbeddedMode){ myIsModified = true; @@ -571,11 +571,11 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48) +void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48) { if(myIsEmbeddedMode){ myIsModified = true; @@ -592,13 +592,13 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, //function : AddVolume //purpose : //======================================================================= -void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48, - int n1234,int n1256,int n2367,int n3478, - int n1458,int n5678,int nCenter) +void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48, + smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478, + smIdType n1458,smIdType n5678,smIdType nCenter) { if(myIsEmbeddedMode){ myIsModified = true; diff --git a/src/SMESHDS/SMESHDS_Script.hxx b/src/SMESHDS/SMESHDS_Script.hxx index 21bd652eb..a50d919fe 100644 --- a/src/SMESHDS/SMESHDS_Script.hxx +++ b/src/SMESHDS/SMESHDS_Script.hxx @@ -46,12 +46,12 @@ class SMESHDS_EXPORT SMESHDS_Script void SetModified(bool theModified); bool IsModified(); - void AddNode(int NewNodeID, double x, double y, double z); - void Add0DElement(int New0DElementID, int idnode); - void AddEdge(int NewEdgeID, int idnode1, int idnode2); - void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3); - void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, - int idnode4); + void AddNode(smIdType NewNodeID, double x, double y, double z); + void Add0DElement(smIdType New0DElementID, smIdType idnode); + void AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2); + void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3); + void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3, + smIdType idnode4); void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, smIdType idnode4); void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, @@ -70,55 +70,55 @@ class SMESHDS_EXPORT SMESHDS_Script const std::vector& nodes_ids); void AddPolyhedralVolume (const smIdType NewVolID, const std::vector& nodes_ids, - const std::vector& quantities); - void AddBall(int NewBallID, int node, double diameter); + const std::vector& quantities); + void AddBall(smIdType NewBallID, smIdType node, double diameter); // special methods for quadratic elements - void AddEdge(int NewEdgeID, int n1, int n2, int n12); - void AddFace(int NewFaceID, int n1, int n2, int n3, - int n12, int n23, int n31); - void AddFace(int NewFaceID, int n1, int n2, int n3, - int n12, int n23, int n31, int nCenter); - void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41); - void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, - int n12, int n23, int n34, int n41, int nCenter); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n12, int n23, int n31, int n14, int n24, int n34); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5, - int n12, int n23, int n34, int n41, - int n15, int n25, int n35, int n45); - void AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, - int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36); - void AddVolume(int NewVolID, int n1, int n2, int n3, - int n4, int n5, int n6, - int n12, int n23, int n31, - int n45, int n56, int n64, - int n14, int n25, int n36, - int n1245, int n2356, int n1346); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48); - void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, - int n5, int n6, int n7, int n8, - int n12, int n23, int n34, int n41, - int n56, int n67, int n78, int n85, - int n15, int n26, int n37, int n48, - int n1234,int n1256,int n2367,int n3478, - int n1458,int n5678,int nCenter); - void MoveNode(int NewNodeID, double x, double y, double z); - void RemoveNode(int NodeID); - void RemoveElement(int ElementID); - void ChangeElementNodes(int ElementID, int nodes[], int nbnodes); - void ChangePolyhedronNodes(const int ElementID, - const std::vector& nodes_ids, + void AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, + smIdType n12, smIdType n23, smIdType n31, smIdType nCenter); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41); + void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n12, smIdType n23, smIdType n31, smIdType n14, smIdType n24, smIdType n34); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, smIdType n5, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n15, smIdType n25, smIdType n35, smIdType n45); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, + smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, + smIdType n4, smIdType n5, smIdType n6, + smIdType n12, smIdType n23, smIdType n31, + smIdType n45, smIdType n56, smIdType n64, + smIdType n14, smIdType n25, smIdType n36, + smIdType n1245, smIdType n2356, smIdType n1346); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48); + void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, + smIdType n5, smIdType n6, smIdType n7, smIdType n8, + smIdType n12, smIdType n23, smIdType n34, smIdType n41, + smIdType n56, smIdType n67, smIdType n78, smIdType n85, + smIdType n15, smIdType n26, smIdType n37, smIdType n48, + smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478, + smIdType n1458,smIdType n5678,smIdType nCenter); + void MoveNode(smIdType NewNodeID, double x, double y, double z); + void RemoveNode(smIdType NodeID); + void RemoveElement(smIdType ElementID); + void ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes); + void ChangePolyhedronNodes(const smIdType ElementID, + const std::vector& nodes_ids, const std::vector& quantities); - void Renumber (const bool isNodes, const int startID, const int deltaID); + void Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID); void ClearMesh(); void Clear(); const std::list & GetCommands(); diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 217dc5b3f..d542d9c85 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/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 0ed91d9d6..7ce1d35c1 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -3343,9 +3343,9 @@ SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet) SMESHDS_Command *com = *its; int comType = com->GetType(); int lgcom = com->GetNumber(); - const list < int >&intList = com->GetIndexes(); + const list < smIdType >&intList = com->GetIndexes(); int inum = intList.size(); - list < int >::const_iterator ii = intList.begin(); + list < smIdType >::const_iterator ii = intList.begin(); const list < double >&coordList = com->GetCoords(); int rnum = coordList.size(); list < double >::const_iterator ir = coordList.begin(); diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index 1add9f252..223fb04d6 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -818,7 +818,7 @@ namespace }; vector< _nodeDef > _nodes; - vector< smIdType > _quantities; + vector< int > _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< smIdType > newQuantities; + std::vector< int > 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 27686440d..eeb19d48e 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< smIdType > & quantities, + const std::vector< int > & 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< smIdType > & quantities, + const std::vector< int > & 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< smIdType > & quantities, + const std::vector< int > & 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< smIdType > & quantities, + const std::vector< int > & 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< smIdType > & quantities, + const std::vector< int > & 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< smIdType > & quantities, + const std::vector< int > & 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< smIdType > quantities( faces.size() ); + std::vector< int > 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 5dce53e59..421710511 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 ];