From: eap Date: Wed, 17 Mar 2021 14:59:13 +0000 (+0300) Subject: bos #20256: [CEA 18523] Porting SMESH to int 64 bits X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df3d1e00fbeb49e397b579c60401988a06e0bf09;p=plugins%2Fgmshplugin.git bos #20256: [CEA 18523] Porting SMESH to int 64 bits --- diff --git a/src/GMSHPlugin/GMSHPlugin_GMSH.cxx b/src/GMSHPlugin/GMSHPlugin_GMSH.cxx index 3576789..8c07d96 100644 --- a/src/GMSHPlugin/GMSHPlugin_GMSH.cxx +++ b/src/GMSHPlugin/GMSHPlugin_GMSH.cxx @@ -34,7 +34,7 @@ using namespace std; //============================================================================= /*! - * + * */ //============================================================================= @@ -53,7 +53,7 @@ GMSHPlugin_GMSH::GMSHPlugin_GMSH(int hypId, SMESH_Gen* gen) //============================================================================= /*! - * + * */ //============================================================================= @@ -64,19 +64,18 @@ GMSHPlugin_GMSH::~GMSHPlugin_GMSH() //============================================================================= /*! - * + * */ //============================================================================= -bool GMSHPlugin_GMSH::CheckHypothesis - (SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - SMESH_Hypothesis::Hypothesis_Status& aStatus) +bool GMSHPlugin_GMSH::CheckHypothesis (SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + SMESH_Hypothesis::Hypothesis_Status& aStatus) { MESSAGE("GMSHPlugin_GMSH::CheckHypothesis"); - + _hypothesis = NULL; - + const list& hyps = GetUsedHypothesis(aMesh, aShape); int nbHyp = hyps.size(); if (!nbHyp) @@ -86,7 +85,7 @@ bool GMSHPlugin_GMSH::CheckHypothesis } // use only the first hypothesis const SMESHDS_Hypothesis* theHyp = hyps.front(); - + string hypName = theHyp->GetName(); if ( find( _compatibleHypothesis.begin(), _compatibleHypothesis.end(), hypName ) != _compatibleHypothesis.end() ) @@ -109,7 +108,7 @@ bool GMSHPlugin_GMSH::CheckHypothesis //============================================================================= bool GMSHPlugin_GMSH::Compute(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape) + const TopoDS_Shape& aShape) { GMSHPlugin_Mesher mesher(&aMesh, aShape); mesher.SetParameters(dynamic_cast(_hypothesis)); @@ -128,15 +127,15 @@ void GMSHPlugin_GMSH::CancelCompute() //============================================================================= bool GMSHPlugin_GMSH::Evaluate(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - MapShapeNbElems& aResMap) + const TopoDS_Shape& aShape, + MapShapeNbElems& aResMap) { - std::vector aResVec(SMDSEntity_Last); - for(int i=SMDSEntity_Node; i aResVec(SMDSEntity_Last); + for(smIdType i=SMDSEntity_Node; iGetComputeError(); smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Evaluation is not implemented",this)); - + return true; } diff --git a/src/GMSHPlugin/GMSHPlugin_GMSH_2D.cxx b/src/GMSHPlugin/GMSHPlugin_GMSH_2D.cxx index aff91d9..c1fa79b 100644 --- a/src/GMSHPlugin/GMSHPlugin_GMSH_2D.cxx +++ b/src/GMSHPlugin/GMSHPlugin_GMSH_2D.cxx @@ -131,8 +131,8 @@ bool GMSHPlugin_GMSH_2D::Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, MapShapeNbElems& aResMap) { - std::vector aResVec(SMDSEntity_Last); - for(int i=SMDSEntity_Node; i aResVec(SMDSEntity_Last); + for(smIdType i=SMDSEntity_Node; iGetComputeError(); diff --git a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx index 8d64720..3dce541 100644 --- a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx +++ b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx @@ -239,7 +239,7 @@ void GMSHPlugin_Mesher::SetGmshOptions() printf("We chose _useIncomplElem %d \n", (_useIncomplElem)?1:0); printf("We are in dimension %d \n", (_is2d)?2:3); //*/ - + std::map mapAlgo2d; mapAlgo2d[0]=2; mapAlgo2d[1]=1; mapAlgo2d[2]=5; mapAlgo2d[3]=6; mapAlgo2d[4]=8; mapAlgo2d[5]=9; std::map mapAlgo3d; @@ -249,10 +249,10 @@ void GMSHPlugin_Mesher::SetGmshOptions() ok = GmshSetOption("Mesh", "Algorithm" , mapAlgo2d[_algo2d]) ; ASSERT(ok); if ( !_is2d) - { + { ok = GmshSetOption("Mesh", "Algorithm3D" , mapAlgo2d[_algo3d]) ; ASSERT(ok); - } + } ok = GmshSetOption("Mesh", "RecombinationAlgorithm" , (double)_recomb2DAlgo) ; ASSERT(ok); ok = GmshSetOption("Mesh", "RecombineAll" , (_recombineAll)?1.:0.) ; @@ -274,10 +274,10 @@ void GMSHPlugin_Mesher::SetGmshOptions() ok = GmshSetOption("Mesh", "ElementOrder" , (_secondOrder)?2.:1.) ; ASSERT(ok); if (_secondOrder) - { + { ok = GmshSetOption("Mesh", "SecondOrderIncomplete" ,(_useIncomplElem)?1.:0.); ASSERT(ok); - } + } } //================================================================================ @@ -289,9 +289,9 @@ void GMSHPlugin_Mesher::SetGmshOptions() void GMSHPlugin_Mesher::CreateGmshCompounds() { MESSAGE("GMSHPlugin_Mesher::CreateGmshCompounds"); - + SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen(); - + OCC_Internals* occgeo = _gModel->getOCCInternals(); bool toSynchronize = false;