*
* @return true if the mesh within the files are identical
*/
-bool diffMEDFile(const std::string mesh_file1, const std::string mesh_file2, const std::string mesh_name){
+bool SMESH_DriverMesh::diffMEDFile(const std::string mesh_file1, const std::string mesh_file2, const std::string mesh_name){
MEDFileUMesh* medmesh1 = MEDFileUMesh::New(mesh_file1, mesh_name);
MEDFileUMesh* medmesh2 = MEDFileUMesh::New(mesh_file2, mesh_name);
MEDCouplingUMesh *m0_1=medmesh1->getMeshAtLevel(0,false);
*
* @return error code
*/
-int importMesh(const std::string mesh_file, SMESH_Mesh& aMesh){
+int SMESH_DriverMesh::importMesh(const std::string mesh_file, SMESH_Mesh& aMesh){
// TODO: change that as it depends on the language
std::string mesh_name = getMeshName(mesh_file);
MESSAGE("Importing mesh from " << mesh_file << " mesh " << mesh_name);
*
* @return error code
*/
-int exportMesh(const std::string mesh_file, SMESH_Mesh& aMesh, const std::string mesh_name){
+
+int SMESH_DriverMesh::exportMesh(const std::string mesh_file, SMESH_Mesh& aMesh, const std::string mesh_name){
MESSAGE("Exporting mesh to " << mesh_file);
aMesh.ExportMED(mesh_file.c_str(), // theFile
#include <string>
#include <cassert>
+#include "SMESH_SMESH.hxx"
class SMESH_Mesh;
-
-bool diffMEDFile(const std::string mesh_file1,
- const std::string mesh_file2,
- const std::string mesh_name);
-int importMesh(const std::string mesh_file,
- SMESH_Mesh& aMesh);
-int exportMesh(const std::string mesh_file,
- SMESH_Mesh& aMesh,
- const std::string meshName);
-
+class SMESH_EXPORT SMESH_DriverMesh{
+ public:
+ static bool diffMEDFile(const std::string mesh_file1,
+ const std::string mesh_file2,
+ const std::string mesh_name);
+ static int importMesh(const std::string mesh_file,
+ SMESH_Mesh& aMesh);
+ static int exportMesh(const std::string mesh_file,
+ SMESH_Mesh& aMesh,
+ const std::string meshName);
+};
#endif
*
* @return error code
*/
-int importShape(const std::string shape_file, TopoDS_Shape& aShape){
+int SMESH_DriverShape::importShape(const std::string shape_file, TopoDS_Shape& aShape){
#ifndef WIN32
std::string type = fs::path(shape_file).extension().string();
boost::algorithm::to_lower(type);
*
* @return error code
*/
-int exportShape(const std::string shape_file, const TopoDS_Shape& aShape){
+int SMESH_DriverShape::exportShape(const std::string shape_file, const TopoDS_Shape& aShape){
#ifndef WIN32
std::string type = fs::path(shape_file).extension().string();
boost::algorithm::to_lower(type);
#include <string>
#include <cassert>
-
+#include "SMESH_SMESH.hxx"
class TopoDS_Shape;
-
-int importShape(const std::string shape_file, TopoDS_Shape& aShape);
-int exportShape(const std::string shape_file, const TopoDS_Shape& aShape);
-
-#endif
\ No newline at end of file
+class SMESH_EXPORT SMESH_DriverShape{
+ public:
+ static int importShape(const std::string shape_file, TopoDS_Shape& aShape);
+ static int exportShape(const std::string shape_file, const TopoDS_Shape& aShape);
+};
+#endif
if(file_name != "")
{
fs::path mesh_file = fs::path(aMesh.tmp_folder) / fs::path(file_name);
- exportMesh(mesh_file.string(), aMesh, "MESH");
+ SMESH_DriverMesh::exportMesh(mesh_file.string(), aMesh, "MESH");
}
//Resetting threaded pool info
void Unlock() {};
int GetNbThreads(){return _NbThreads;};
- void SetNbThreads(int nbThreads){std::cout << "Warning Parallel Meshing is disabled on Windows it will behave as a slower normal compute" << std::endl;_NbThreads=nbThreads;};
+ void SetNbThreads(long nbThreads){std::cout << "Warning Parallel Meshing is disabled on Windows it will behave as a slower normal compute" << std::endl;_NbThreads=nbThreads;};
void InitPoolThreads(){};
void DeletePoolThreads(){};
void Unlock() {_my_lock.unlock();};
int GetNbThreads(){return _NbThreads;};
- void SetNbThreads(int nbThreads){_NbThreads=nbThreads;};
+ void SetNbThreads(long nbThreads){_NbThreads=nbThreads;};
void InitPoolThreads(){_pool = new boost::asio::thread_pool(_NbThreads);};
void DeletePoolThreads(){delete _pool;};
//
#ifndef _SMESH_MESHLOCKER_HXX_
#define _SMESH_MESHLOCKER_HXX_
+#include "SMESH_SMESH.hxx"
class SMESH_Mesh;
-class SMESH_MeshLocker{
+class SMESH_EXPORT SMESH_MeshLocker{
public:
SMESH_MeshLocker(SMESH_Mesh * aMesh);
~SMESH_MeshLocker();
* \brief Set the number of threads for a parallel computation
*/
//=============================================================================
- void SMESH_Mesh_i::SetNbThreads(long nbThreads){
+void SMESH_Mesh_i::SetNbThreads(CORBA::Long nbThreads){
_impl->SetNbThreads(nbThreads);
}
SMESH::submesh_array_array& theSubMeshOrder,
const bool theIsDump);
- void SetNbThreads(long nbThreads);
+ void SetNbThreads(CORBA::Long nbThreads);
/*!
* \brief Finds concurrent sub-meshes