// Author : Yoann AUDOUIN, EDF
// Module : SMESH
//
-
#include <utilities.h>
#include <Utils_SALOME_Exception.hxx>
#include "SMESH_DriverShape.hxx"
//Occ include
#include <TopoDS.hxx>
+#ifndef WIN32
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
namespace fs = boost::filesystem;
+#endif
/**
* @brief Import the content of a shape file (STEP) into a TopDS_Shape object
* @return error code
*/
int 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);
if (type == ".brep"){
} else {
throw SALOME_Exception("Unknow format for importShape: " + type);
}
+#endif
}
/**
* @return error code
*/
int 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);
if (type == ".brep"){
} else {
throw SALOME_Exception("Unknow format for exportShape: " + type);
}
+#endif
}
// Author : Paul RASCLE, EDF
// Module : SMESH
//
-
//#define CHRONODEF
//
#ifndef WIN32
#include <Basics_Utils.hxx>
using namespace std;
+#ifndef WIN32
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
+#endif
// Environment variable separator
#ifdef WIN32
const bool complexShapeFirst,
const bool aShapeOnly)
{
+#ifdef WIN32
+ throw SALOME_Exception("ParallelMesh is not working on Windows");
+#else
bool ret = true;
smToCompute->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
continue;
}
-#ifdef WIN32
- compute_function(smToCompute, computeEvent,
- shapeSM, aShapeOnly, allowedSubShapes,
- aShapesId);
-#else
boost::asio::post(*(aMesh._pool), std::bind(compute_function, smToCompute, computeEvent,
shapeSM, aShapeOnly, allowedSubShapes,
aShapesId));
-#endif
}
// Waiting for the thread for Solids to finish
aMesh.DeleteTmpFolder();
return ret;
+#endif
};
//=============================================================================
#include <pthread.h>
#endif
+#ifndef WIN32
#include <boost/filesystem.hpp>
namespace fs=boost::filesystem;
+#endif
// maximum stored group name length in MED file
#define MAX_MED_GROUP_NAME_LENGTH 80
int result=pthread_create(&thread, NULL, deleteMeshDS, (void*)_meshDS);
#endif
}
-#ifndef WIN32
if(_pool)
DeletePoolThreads();
-#endif
}
//================================================================================
//=============================================================================
void SMESH_Mesh::CreateTmpFolder()
{
+#ifndef WIN32
// Temporary folder that will be used by parallel computation
tmp_folder = fs::temp_directory_path()/fs::unique_path(fs::path("SMESH_%%%%-%%%%"));
fs::create_directories(tmp_folder);
+#endif
}
//
//=============================================================================
//=============================================================================
void SMESH_Mesh::DeleteTmpFolder()
{
-#ifndef _DEBUG_
+#ifndef WIN32
fs::remove_all(tmp_folder);
#endif
}
#include "SMESH_SMESH.hxx"
-
#include "SMDSAbs_ElementType.hxx"
#include "SMESH_ComputeError.hxx"
#include "SMESH_Controls.hxx"
#include <vector>
#include <ostream>
-#include <boost/filesystem.hpp>
#ifndef WIN32
+#include <boost/filesystem.hpp>
#include <boost/asio/thread_pool.hpp>
-#include <boost/thread.hpp>
#endif
+#include <boost/thread.hpp>
#ifdef WIN32
#pragma warning(disable:4251) // Warning DLL Interface ...
void DeleteTmpFolder();
// Temporary folder used during parallel Computation
+#ifndef WIN32
boost::filesystem::path tmp_folder;
- #ifndef WIN32
boost::asio::thread_pool * _pool = nullptr; //thread pool for computation
- #endif
+#else
+ std::string tmp_folder;
+ bool _pool = false;
+#endif
private:
print("Time elapsed (seq, par): ", time_seq, time_par)
def main():
+ if sys.platform == "win32":
+ print("Test disabled on Windows")
+ return
nbox = 2
boxsize = 100
run_test(nbox, boxsize)
main()
-
assert nb_tetras > 0
if __name__ == "__main__":
+ if sys.platform == "win32":
+ print("Disabled on windows")
+ sys.exit(0)
test_netgen3d()