Merge branch 'master' of gitlab.asc.tuwien.ac.at:jschoeberl/netgen

This commit is contained in:
Joachim Schöberl 2016-05-09 12:54:20 +02:00
commit 0c803d5175
2 changed files with 17 additions and 4 deletions

View File

@ -110,10 +110,9 @@ add_definitions(-DHAVE_CONFIG_H)
# platform specific definitions and flags # platform specific definitions and flags
macro(get_WIN32_WINNT version) macro(get_WIN32_WINNT version)
if (WIN32 AND CMAKE_SYSTEM_VERSION) if (WIN32 AND CMAKE_SYSTEM_VERSION)
set(ver ${CMAKE_SYSTEM_VERSION}) if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)")
string(REPLACE "." "" ver ${ver}) math(EXPR ver "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}")
string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver}) endif()
set(${version} "0x${ver}") set(${version} "0x${ver}")
endif() endif()
endmacro() endmacro()

View File

@ -6,6 +6,8 @@
#include <mystdlib.h> #include <mystdlib.h>
#include "meshing.hpp" #include "meshing.hpp"
#include <csg.hpp>
#include <geometry2d.hpp>
using namespace netgen; using namespace netgen;
@ -454,6 +456,18 @@ DLL_HEADER void ExportNetgenMeshing()
Refinement().Refine(self); Refinement().Refine(self);
})) }))
.def ("SetGeometry", FunctionPointer
([](Mesh & self, shared_ptr<CSGeometry> geo)
{
self.SetGeometry(geo);
}))
.def ("SetGeometry", FunctionPointer
([](Mesh & self, shared_ptr<SplineGeometry2d> geo)
{
self.SetGeometry(geo);
}))
.def ("BuildSearchTree", &Mesh::BuildElementSearchTree) .def ("BuildSearchTree", &Mesh::BuildElementSearchTree)
.def ("BoundaryLayer", FunctionPointer .def ("BoundaryLayer", FunctionPointer