mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
Further corrections
This commit is contained in:
parent
57c1f8af17
commit
a39871a637
@ -46,7 +46,7 @@ using namespace MEDCoupling;
|
||||
*
|
||||
* @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);
|
||||
@ -70,7 +70,7 @@ std::string getMeshName(std::string mesh_file){
|
||||
*
|
||||
* @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);
|
||||
@ -87,7 +87,8 @@ int importMesh(const std::string mesh_file, SMESH_Mesh& aMesh){
|
||||
*
|
||||
* @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
|
||||
|
@ -30,16 +30,18 @@
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
#include "SMESH_SMESH.hxx"
|
||||
|
||||
class SMESH_Mesh;
|
||||
|
||||
bool diffMEDFile(const std::string mesh_file1,
|
||||
class SMESH_EXPORT SMESH_DriverMesh{
|
||||
public:
|
||||
static bool diffMEDFile(const std::string mesh_file1,
|
||||
const std::string mesh_file2,
|
||||
const std::string mesh_name);
|
||||
int importMesh(const std::string mesh_file,
|
||||
static int importMesh(const std::string mesh_file,
|
||||
SMESH_Mesh& aMesh);
|
||||
int exportMesh(const std::string mesh_file,
|
||||
static int exportMesh(const std::string mesh_file,
|
||||
SMESH_Mesh& aMesh,
|
||||
const std::string meshName);
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -147,7 +147,7 @@ int exportBREPShape(const std::string shape_file, const TopoDS_Shape& aShape){
|
||||
*
|
||||
* @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);
|
||||
@ -171,7 +171,7 @@ int importShape(const std::string shape_file, TopoDS_Shape& aShape){
|
||||
*
|
||||
* @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);
|
||||
|
@ -30,10 +30,11 @@
|
||||
|
||||
#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);
|
||||
|
||||
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
|
@ -340,7 +340,7 @@ bool SMESH_Gen::parallelComputeSubMeshes(
|
||||
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
|
||||
|
@ -395,7 +395,7 @@ class SMESH_EXPORT SMESH_Mesh
|
||||
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(){};
|
||||
@ -407,7 +407,7 @@ class SMESH_EXPORT SMESH_Mesh
|
||||
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;};
|
||||
|
@ -26,10 +26,11 @@
|
||||
//
|
||||
#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();
|
||||
|
@ -7042,7 +7042,7 @@ TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes()
|
||||
* \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);
|
||||
}
|
||||
|
||||
|
@ -673,7 +673,7 @@ private:
|
||||
SMESH::submesh_array_array& theSubMeshOrder,
|
||||
const bool theIsDump);
|
||||
|
||||
void SetNbThreads(long nbThreads);
|
||||
void SetNbThreads(CORBA::Long nbThreads);
|
||||
|
||||
/*!
|
||||
* \brief Finds concurrent sub-meshes
|
||||
|
Loading…
Reference in New Issue
Block a user