X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Mesh.hxx;h=81495db9cf1e4cc090d127fc92ec8b51a51e6895;hp=18da4e93f0830dd7201c943af091a4b08ece2cfd;hb=HEAD;hpb=60aec28a5528da6969b1bb90310a0bf1a4d2fa59 diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index 18da4e93f..b831998d5 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -33,6 +33,7 @@ #include "SMESH_ComputeError.hxx" #include "SMESH_Controls.hxx" #include "SMESH_Hypothesis.hxx" +#include "SMESH_subMesh.hxx" #include "SMDS_Iterator.hxx" #include "Utils_SALOME_Exception.hxx" @@ -48,8 +49,9 @@ #include #include +#ifndef WIN32 #include -#include +#endif #include #ifdef WIN32 @@ -70,6 +72,7 @@ class TopoDS_Solid; class DriverMED_W_SMESHDS_Mesh; +typedef std::set TSetOfInt; typedef std::list TListOfInt; typedef std::list TListOfListOfInt; @@ -388,23 +391,25 @@ class SMESH_EXPORT SMESH_Mesh // Parallel computation functions - void Lock() {_my_lock.lock();}; - void Unlock() {_my_lock.unlock();}; - - int GetNbThreads(){return _NbThreads;}; - void SetNbThreads(int nbThreads){_NbThreads=nbThreads;}; - - void InitPoolThreads(){_pool = new boost::asio::thread_pool(_NbThreads);}; - void DeletePoolThreads(){delete _pool;}; + virtual void Lock(){}; + virtual void Unlock(){}; - void wait(){_pool->join(); DeletePoolThreads(); InitPoolThreads(); } + virtual void wait(){}; - bool IsParallel(){return _NbThreads > 0;} - - // Temporary folder used during parallel Computation - boost::filesystem::path tmp_folder; - boost::asio::thread_pool * _pool = nullptr; //thread pool for computation + virtual bool IsParallel(){throw SALOME_Exception("Calling SMESH_Mesh::IsParallel");return false;}; + virtual int GetParallelElement(){throw SALOME_Exception("Calling SMESH_Mesh::GetParallelElement");return 0;}; + virtual bool ComputeSubMeshes( + SMESH_Gen* gen, + SMESH_Mesh & aMesh, + const TopoDS_Shape & aShape, + const ::MeshDimension aDim, + TSetOfInt* aShapesId /*=0*/, + TopTools_IndexedMapOfShape* allowedSubShapes, + SMESH_subMesh::compute_event &computeEvent, + const bool includeSelf, + const bool complexShapeFirst, + const bool aShapeOnly){(void) gen;(void) aMesh;(void) aShape;(void) aDim;(void) aShapesId;(void) allowedSubShapes;(void) computeEvent;(void) includeSelf;(void) complexShapeFirst;(void) aShapeOnly;throw SALOME_Exception("Calling SMESH_Mesh::ComputeSubMeshes");return false;}; private: @@ -452,10 +457,6 @@ protected: // 2) to forget not loaded mesh data at hyp modification TCallUp* _callUp; - // Mutex for multhitreading write in SMESH_Mesh - boost::mutex _my_lock; - int _NbThreads=0; - protected: SMESH_Mesh(); SMESH_Mesh(const SMESH_Mesh&) {};