mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
Merge branch 'emscripten' into 'master'
Emscripten See merge request ngsolve/netgen!603
This commit is contained in:
commit
ef93b7c145
@ -319,7 +319,7 @@ if (USE_PYTHON)
|
|||||||
|
|
||||||
target_include_directories(netgen_python INTERFACE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
target_include_directories(netgen_python INTERFACE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
||||||
target_include_directories(nglib PRIVATE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
target_include_directories(nglib PRIVATE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
||||||
if(Python3_LIBRARIES)
|
if(Python3_LIBRARIES AND NOT BUILD_FOR_CONDA)
|
||||||
target_link_libraries(netgen_python INTERFACE ${Python3_LIBRARIES})
|
target_link_libraries(netgen_python INTERFACE ${Python3_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -230,10 +230,13 @@ endif(USE_MPI)
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
# propagate cmake variables to Netgen subproject
|
# propagate cmake variables to Netgen subproject
|
||||||
set_vars( NETGEN_CMAKE_ARGS
|
set_vars( NETGEN_CMAKE_ARGS
|
||||||
|
CMAKE_MODULE_LINKER_FLAGS
|
||||||
|
CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||||
CMAKE_SHARED_LINKER_FLAGS
|
CMAKE_SHARED_LINKER_FLAGS
|
||||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||||
CMAKE_CXX_FLAGS
|
CMAKE_CXX_FLAGS
|
||||||
CMAKE_CXX_FLAGS_RELEASE
|
CMAKE_CXX_FLAGS_RELEASE
|
||||||
|
CMAKE_STRIP
|
||||||
|
|
||||||
USE_GUI
|
USE_GUI
|
||||||
USE_PYTHON
|
USE_PYTHON
|
||||||
|
@ -24,8 +24,8 @@ if(status AND NOT status EQUAL 0)
|
|||||||
string(REGEX REPLACE "^netgen(.*)" "\\1" git_version_string "${git_version_string}")
|
string(REGEX REPLACE "^netgen(.*)" "\\1" git_version_string "${git_version_string}")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
MESSAGE(WARNING "Could not determine git-version from source code - assuming 6.2.0.0")
|
MESSAGE(WARNING "Could not determine git-version from source code - assuming 6.2.0-0")
|
||||||
set(git_version_string "v6.2.0.0")
|
set(git_version_string "v6.2.0-0")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
string(STRIP ${git_version_string} git_version_string)
|
string(STRIP ${git_version_string} git_version_string)
|
||||||
|
@ -18,6 +18,7 @@ string(REPLACE "|" ";" ng_compile_flags_replace_sep "${NG_COMPILE_FLAGS}")
|
|||||||
target_compile_options(ngcore PUBLIC ${ng_compile_flags_replace_sep})
|
target_compile_options(ngcore PUBLIC ${ng_compile_flags_replace_sep})
|
||||||
|
|
||||||
if(EMSCRIPTEN)
|
if(EMSCRIPTEN)
|
||||||
|
set(PYTHON_MODULE_EXTENSION ".so")
|
||||||
target_link_options(ngcore PUBLIC -sALLOW_MEMORY_GROWTH -sENVIRONMENT=web)
|
target_link_options(ngcore PUBLIC -sALLOW_MEMORY_GROWTH -sENVIRONMENT=web)
|
||||||
target_compile_options(ngcore PUBLIC -sNO_DISABLE_EXCEPTION_CATCHING)
|
target_compile_options(ngcore PUBLIC -sNO_DISABLE_EXCEPTION_CATCHING)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1628,7 +1628,9 @@ namespace netgen
|
|||||||
MeshOptimize3d meshopt(mp);
|
MeshOptimize3d meshopt(mp);
|
||||||
tempmesh.Compress();
|
tempmesh.Compress();
|
||||||
tempmesh.FindOpenElements ();
|
tempmesh.FindOpenElements ();
|
||||||
|
#ifndef EMSCRIPTEN
|
||||||
RegionTaskManager rtm(mp.parallel_meshing ? mp.nthreads : 0);
|
RegionTaskManager rtm(mp.parallel_meshing ? mp.nthreads : 0);
|
||||||
|
#endif // EMSCRIPTEN
|
||||||
for (auto i : Range(10))
|
for (auto i : Range(10))
|
||||||
{
|
{
|
||||||
PrintMessage (5, "Num open: ", tempmesh.GetNOpenElements());
|
PrintMessage (5, "Num open: ", tempmesh.GetNOpenElements());
|
||||||
|
@ -631,7 +631,9 @@ namespace netgen
|
|||||||
// const CSGeometry * geometry)
|
// const CSGeometry * geometry)
|
||||||
{
|
{
|
||||||
static Timer t("OptimizeVolume"); RegionTimer reg(t);
|
static Timer t("OptimizeVolume"); RegionTimer reg(t);
|
||||||
|
#ifndef EMSCRIPTEN
|
||||||
RegionTaskManager rtm(mp.parallel_meshing ? mp.nthreads : 0);
|
RegionTaskManager rtm(mp.parallel_meshing ? mp.nthreads : 0);
|
||||||
|
#endif // EMSCRIPTEN
|
||||||
const char* savetask = multithread.task;
|
const char* savetask = multithread.task;
|
||||||
multithread.task = "Optimize Volume";
|
multithread.task = "Optimize Volume";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user