From: Viktor UZLOV Date: Thu, 25 Feb 2021 11:10:19 +0000 (+0300) Subject: fix for 64bit mode X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f45ffc3fa9c805221a491fa8a03253455b015f91;p=plugins%2Fghs3dplugin.git fix for 64bit mode --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 3f8335c..ed912dc 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -2765,7 +2765,7 @@ bool GHS3DPlugin_GHS3D::Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, MapShapeNbElems& aResMap) { - int nbtri = 0, nbqua = 0; + smIdType nbtri = 0, nbqua = 0; double fullArea = 0.0; for (TopExp_Explorer exp(aShape, TopAbs_FACE); exp.More(); exp.Next()) { TopoDS_Face F = TopoDS::Face( exp.Current() ); @@ -2787,7 +2787,7 @@ bool GHS3DPlugin_GHS3D::Evaluate(SMESH_Mesh& aMesh, } // collect info from edges - int nb0d_e = 0, nb1d_e = 0; + smIdType nb0d_e = 0, nb1d_e = 0; bool IsQuadratic = false; bool IsFirst = true; TopTools_MapOfShape tmpMap; @@ -2815,11 +2815,11 @@ bool GHS3DPlugin_GHS3D::Evaluate(SMESH_Mesh& aMesh, double aVolume = G.Mass(); double tetrVol = 0.1179*ELen*ELen*ELen; double CoeffQuality = 0.9; - int nbVols = int(aVolume/tetrVol/CoeffQuality); - int nb1d_f = (nbtri*3 + nbqua*4 - nb1d_e) / 2; - int nb1d_in = (int) ( nbVols*6 - nb1d_e - nb1d_f ) / 5; + smIdType nbVols = smIdType(aVolume/tetrVol/CoeffQuality); + smIdType nb1d_f = (nbtri*3 + nbqua*4 - nb1d_e) / 2; + smIdType nb1d_in = (smIdType) ( nbVols*6 - nb1d_e - nb1d_f ) / 5; std::vector aVec(SMDSEntity_Last); - for(int i=SMDSEntity_Node; ilength() == 0 ){MESSAGE("The source group is empty");} - for ( CORBA::ULong i=0; i < theIDs->length(); i++) { - CORBA::Long ind = theIDs[i]; + for ( SMESH::smIdType i=0; i < theIDs->length(); i++) { + SMESH::smIdType ind = theIDs[i]; if (elementType == SMESH::NODE) { const SMDS_MeshNode * node = theMeshDS->FindNode(ind); diff --git a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx index 8ad0381..83a7639 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx @@ -234,8 +234,8 @@ namespace int nbNodes = theMGOutput->GmfStatKwd( inFile, GmfVertices ); int nbTet = theMGOutput->GmfStatKwd( inFile, GmfTetrahedra ); - int nbNodesOld = meshDS->NbNodes(); - int nbTetOld = meshDS->GetMeshInfo().NbTetras(); + smIdType nbNodesOld = meshDS->NbNodes(); + smIdType nbTetOld = meshDS->GetMeshInfo().NbTetras(); std::cout << "Optimization input: " << nbNodesOld << " nodes, \t" << nbTetOld << " tetra" << std::endl; std::cout << "Optimization output: " @@ -359,7 +359,7 @@ namespace void getNodeByGhsId( SMESH_Mesh& mesh, std::vector & nodeByGhsId ) { SMESHDS_Mesh* meshDS = mesh.GetMeshDS(); - const int nbNodes = meshDS->NbNodes(); + const smIdType nbNodes = meshDS->NbNodes(); nodeByGhsId.resize( nbNodes + 1 ); SMDS_NodeIteratorPtr nodeIt = meshDS->nodesIterator(); while ( nodeIt->more() )