From 9b12ac22210f293bb199f14fcea6482d95176881 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 15 Mar 2007 06:55:40 +0000 Subject: [PATCH] A patch by Paul RASCLE for ASTER cluster (64 bits). --- idl/SMESH_Mesh.idl | 2 +- src/SMESH/SMESH_MeshEditor.cxx | 6 +++++- src/SMESHClient/SMESH_Client.cxx | 6 +++++- src/SMESH_I/SMESH_Mesh_i.cxx | 6 ++++-- src/SMESH_I/SMESH_Mesh_i.hxx | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index a8ffd3a0b..0e9d8ceb8 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -503,7 +503,7 @@ module SMESH /*! * Get mesh pointer */ - long GetMeshPtr(); + long long GetMeshPtr(); /*! * Get XYZ coordinates of node as list of double diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index e9de338f0..6c9417453 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -2745,7 +2745,11 @@ static void sweepElement(SMESHDS_Mesh* aMesh, // Loop on elem nodes: // find new nodes and detect same nodes indices int nbNodes = elem->NbNodes(); - list::const_iterator itNN[ nbNodes ]; + //---PR + //list::const_iterator itNN[ nbNodes ]; + vector < list< const SMDS_MeshNode* >::const_iterator > itNN; + itNN.reserve(nbNodes); + //---PR const SMDS_MeshNode* prevNod[ nbNodes ], *nextNod[ nbNodes ], *midlNod[ nbNodes ]; int iNode, nbSame = 0, iNotSameNode = 0, iSameNode = 0; vector sames(nbNodes); diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index bd52bc042..990bfa634 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -621,7 +621,11 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB, if ( MYDEBUG ) MESSAGE("Info: The same process, update mesh by pointer "); // just set client mesh pointer to server mesh pointer - SMESH_Mesh* aMesh = reinterpret_cast(theMesh->GetMeshPtr()); + //SMESH_Mesh* aMesh = reinterpret_cast(theMesh->GetMeshPtr()); + CORBA::LongLong pointeur = theMesh->GetMeshPtr(); + cerr <<"SMESH_Client::SMESH_Client pointeur " << pointeur << endl; + SMESH_Mesh* aMesh = reinterpret_cast (pointeur); + cerr <<"SMESH_Client::SMESH_Client aMesh " << aMesh << endl; if(aMesh->GetMeshDS()->IsEmbeddedMode()){ mySMESHDSMesh = aMesh->GetMeshDS(); mySMDSMesh = mySMESHDSMesh; diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index da4a9b2a0..8374856d0 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -1813,9 +1813,11 @@ SMESH::ElementType SMESH_Mesh_i::GetSubMeshElementType(const CORBA::Long ShapeID */ //============================================================================= -CORBA::Long SMESH_Mesh_i::GetMeshPtr() +CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() { - return CORBA::Long(size_t(_impl)); + CORBA::LongLong pointeur = CORBA::LongLong(_impl); + cerr << "CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() " << pointeur << endl; + return pointeur; } diff --git a/src/SMESH_I/SMESH_Mesh_i.hxx b/src/SMESH_I/SMESH_Mesh_i.hxx index 7074e1783..4ced88de0 100644 --- a/src/SMESH_I/SMESH_Mesh_i.hxx +++ b/src/SMESH_I/SMESH_Mesh_i.hxx @@ -309,7 +309,7 @@ public: virtual SMESH::long_array* GetIDs(); - CORBA::Long GetMeshPtr(); + CORBA::LongLong GetMeshPtr(); /*! -- 2.30.2