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
|
* @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* medmesh1 = MEDFileUMesh::New(mesh_file1, mesh_name);
|
||||||
MEDFileUMesh* medmesh2 = MEDFileUMesh::New(mesh_file2, mesh_name);
|
MEDFileUMesh* medmesh2 = MEDFileUMesh::New(mesh_file2, mesh_name);
|
||||||
MEDCouplingUMesh *m0_1=medmesh1->getMeshAtLevel(0,false);
|
MEDCouplingUMesh *m0_1=medmesh1->getMeshAtLevel(0,false);
|
||||||
@ -70,7 +70,7 @@ std::string getMeshName(std::string mesh_file){
|
|||||||
*
|
*
|
||||||
* @return error code
|
* @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
|
// TODO: change that as it depends on the language
|
||||||
std::string mesh_name = getMeshName(mesh_file);
|
std::string mesh_name = getMeshName(mesh_file);
|
||||||
MESSAGE("Importing mesh from " << mesh_file << " mesh " << mesh_name);
|
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
|
* @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);
|
MESSAGE("Exporting mesh to " << mesh_file);
|
||||||
aMesh.ExportMED(mesh_file.c_str(), // theFile
|
aMesh.ExportMED(mesh_file.c_str(), // theFile
|
||||||
|
@ -30,16 +30,18 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include "SMESH_SMESH.hxx"
|
||||||
|
|
||||||
class SMESH_Mesh;
|
class SMESH_Mesh;
|
||||||
|
class SMESH_EXPORT SMESH_DriverMesh{
|
||||||
bool diffMEDFile(const std::string mesh_file1,
|
public:
|
||||||
const std::string mesh_file2,
|
static bool diffMEDFile(const std::string mesh_file1,
|
||||||
const std::string mesh_name);
|
const std::string mesh_file2,
|
||||||
int importMesh(const std::string mesh_file,
|
const std::string mesh_name);
|
||||||
SMESH_Mesh& aMesh);
|
static int importMesh(const std::string mesh_file,
|
||||||
int exportMesh(const std::string mesh_file,
|
SMESH_Mesh& aMesh);
|
||||||
SMESH_Mesh& aMesh,
|
static int exportMesh(const std::string mesh_file,
|
||||||
const std::string meshName);
|
SMESH_Mesh& aMesh,
|
||||||
|
const std::string meshName);
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -147,7 +147,7 @@ int exportBREPShape(const std::string shape_file, const TopoDS_Shape& aShape){
|
|||||||
*
|
*
|
||||||
* @return error code
|
* @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
|
#ifndef WIN32
|
||||||
std::string type = fs::path(shape_file).extension().string();
|
std::string type = fs::path(shape_file).extension().string();
|
||||||
boost::algorithm::to_lower(type);
|
boost::algorithm::to_lower(type);
|
||||||
@ -171,7 +171,7 @@ int importShape(const std::string shape_file, TopoDS_Shape& aShape){
|
|||||||
*
|
*
|
||||||
* @return error code
|
* @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
|
#ifndef WIN32
|
||||||
std::string type = fs::path(shape_file).extension().string();
|
std::string type = fs::path(shape_file).extension().string();
|
||||||
boost::algorithm::to_lower(type);
|
boost::algorithm::to_lower(type);
|
||||||
|
@ -30,10 +30,11 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include "SMESH_SMESH.hxx"
|
||||||
class TopoDS_Shape;
|
class TopoDS_Shape;
|
||||||
|
class SMESH_EXPORT SMESH_DriverShape{
|
||||||
int importShape(const std::string shape_file, TopoDS_Shape& aShape);
|
public:
|
||||||
int exportShape(const std::string shape_file, const TopoDS_Shape& aShape);
|
static int importShape(const std::string shape_file, TopoDS_Shape& aShape);
|
||||||
|
static int exportShape(const std::string shape_file, const TopoDS_Shape& aShape);
|
||||||
#endif
|
};
|
||||||
|
#endif
|
||||||
|
@ -340,7 +340,7 @@ bool SMESH_Gen::parallelComputeSubMeshes(
|
|||||||
if(file_name != "")
|
if(file_name != "")
|
||||||
{
|
{
|
||||||
fs::path mesh_file = fs::path(aMesh.tmp_folder) / fs::path(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
|
//Resetting threaded pool info
|
||||||
|
@ -395,7 +395,7 @@ class SMESH_EXPORT SMESH_Mesh
|
|||||||
void Unlock() {};
|
void Unlock() {};
|
||||||
|
|
||||||
int GetNbThreads(){return _NbThreads;};
|
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 InitPoolThreads(){};
|
||||||
void DeletePoolThreads(){};
|
void DeletePoolThreads(){};
|
||||||
@ -407,7 +407,7 @@ class SMESH_EXPORT SMESH_Mesh
|
|||||||
void Unlock() {_my_lock.unlock();};
|
void Unlock() {_my_lock.unlock();};
|
||||||
|
|
||||||
int GetNbThreads(){return _NbThreads;};
|
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 InitPoolThreads(){_pool = new boost::asio::thread_pool(_NbThreads);};
|
||||||
void DeletePoolThreads(){delete _pool;};
|
void DeletePoolThreads(){delete _pool;};
|
||||||
|
@ -26,10 +26,11 @@
|
|||||||
//
|
//
|
||||||
#ifndef _SMESH_MESHLOCKER_HXX_
|
#ifndef _SMESH_MESHLOCKER_HXX_
|
||||||
#define _SMESH_MESHLOCKER_HXX_
|
#define _SMESH_MESHLOCKER_HXX_
|
||||||
|
#include "SMESH_SMESH.hxx"
|
||||||
|
|
||||||
class SMESH_Mesh;
|
class SMESH_Mesh;
|
||||||
|
|
||||||
class SMESH_MeshLocker{
|
class SMESH_EXPORT SMESH_MeshLocker{
|
||||||
public:
|
public:
|
||||||
SMESH_MeshLocker(SMESH_Mesh * aMesh);
|
SMESH_MeshLocker(SMESH_Mesh * aMesh);
|
||||||
~SMESH_MeshLocker();
|
~SMESH_MeshLocker();
|
||||||
|
@ -7042,7 +7042,7 @@ TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes()
|
|||||||
* \brief Set the number of threads for a parallel computation
|
* \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);
|
_impl->SetNbThreads(nbThreads);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ private:
|
|||||||
SMESH::submesh_array_array& theSubMeshOrder,
|
SMESH::submesh_array_array& theSubMeshOrder,
|
||||||
const bool theIsDump);
|
const bool theIsDump);
|
||||||
|
|
||||||
void SetNbThreads(long nbThreads);
|
void SetNbThreads(CORBA::Long nbThreads);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Finds concurrent sub-meshes
|
* \brief Finds concurrent sub-meshes
|
||||||
|
Loading…
Reference in New Issue
Block a user