mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 14:40:35 +05:00
Merge branch 'master' of data.asc.tuwien.ac.at:jschoeberl/netgen
This commit is contained in:
commit
046f473619
@ -163,10 +163,12 @@ deploy_sourceforge:
|
||||
- docker
|
||||
script:
|
||||
- git remote add sourceforge ssh://mhochste@git.code.sf.net/p/netgen-mesher/git || true
|
||||
- git remote add github git@github.com:NGSolve/netgen.git || true
|
||||
- git remote update
|
||||
- git checkout master
|
||||
- git pull origin master
|
||||
- git push sourceforge master
|
||||
- git push github master
|
||||
only:
|
||||
- master
|
||||
|
||||
|
@ -145,22 +145,25 @@ get_filename_component(NETGEN_CMAKE_DIR_ABSOLUTE ${NG_INSTALL_DIR_CMAKE} ABSOLUT
|
||||
get_filename_component(NETGEN_BINARY_DIR_ABSOLUTE ${NG_INSTALL_DIR_BIN} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
get_filename_component(NETGEN_LIBRARY_DIR_ABSOLUTE ${NG_INSTALL_DIR_LIB} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
get_filename_component(NETGEN_INCLUDE_DIR_ABSOLUTE ${NG_INSTALL_DIR_INCLUDE} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
get_filename_component(NETGEN_PYTHON_DIR_ABSOLUTE ${NG_INSTALL_DIR_PYTHON} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
get_filename_component(NETGEN_RESOURCE_DIR_ABSOLUTE ${NG_INSTALL_DIR_RES} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
file(RELATIVE_PATH NETGEN_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${CMAKE_INSTALL_PREFIX})
|
||||
file(RELATIVE_PATH NETGEN_BINARY_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_BINARY_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_LIBRARY_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_LIBRARY_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_INCLUDE_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_INCLUDE_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_PYTHON_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_PYTHON_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_RESOURCE_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_RESOURCE_DIR_ABSOLUTE})
|
||||
|
||||
file(RELATIVE_PATH NETGEN_RPATH ${NETGEN_BINARY_DIR_ABSOLUTE} ${NETGEN_LIBRARY_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_PYTHON_RPATH_BIN ${NETGEN_PYTHON_DIR_ABSOLUTE} ${NETGEN_BINARY_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_PYTHON_RPATH ${NETGEN_PYTHON_DIR_ABSOLUTE} ${NETGEN_LIBRARY_DIR_ABSOLUTE})
|
||||
if(WIN32)
|
||||
set(NETGEN_PYTHON_RPATH ${NETGEN_PYTHON_RPATH_BIN})
|
||||
endif(WIN32)
|
||||
|
||||
if(USE_PYTHON)
|
||||
get_filename_component(NETGEN_PYTHON_DIR_ABSOLUTE ${NG_INSTALL_DIR_PYTHON} ABSOLUTE BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
file(RELATIVE_PATH NETGEN_PYTHON_DIR ${NETGEN_CMAKE_DIR_ABSOLUTE} ${NETGEN_PYTHON_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_PYTHON_RPATH_BIN ${NETGEN_PYTHON_DIR_ABSOLUTE} ${NETGEN_BINARY_DIR_ABSOLUTE})
|
||||
file(RELATIVE_PATH NETGEN_PYTHON_RPATH ${NETGEN_PYTHON_DIR_ABSOLUTE} ${NETGEN_LIBRARY_DIR_ABSOLUTE})
|
||||
if(WIN32)
|
||||
set(NETGEN_PYTHON_RPATH ${NETGEN_PYTHON_RPATH_BIN})
|
||||
endif(WIN32)
|
||||
endif(USE_PYTHON)
|
||||
|
||||
set(NG_INSTALL_DIR EXPORT netgen-targets RUNTIME DESTINATION ${NG_INSTALL_DIR_BIN} COMPONENT netgen LIBRARY DESTINATION ${NG_INSTALL_DIR_LIB} COMPONENT netgen_devel ARCHIVE DESTINATION ${NG_INSTALL_DIR_LIB} COMPONENT netgen_devel)
|
||||
install(EXPORT netgen-targets DESTINATION ${NG_INSTALL_DIR_CMAKE} COMPONENT netgen_devel)
|
||||
|
@ -592,8 +592,8 @@ namespace netgen
|
||||
///
|
||||
DLL_HEADER void SetMaterial (int domnr, const string & mat);
|
||||
///
|
||||
const string & GetMaterial (int domnr) const;
|
||||
static string defaultmat;
|
||||
DLL_HEADER const string & GetMaterial (int domnr) const;
|
||||
DLL_HEADER static string defaultmat;
|
||||
const string * GetMaterialPtr (int domnr) const // 1-based
|
||||
{
|
||||
return domnr <= materials.Size() ? materials.Get(domnr) : &defaultmat;
|
||||
@ -603,13 +603,13 @@ namespace netgen
|
||||
|
||||
DLL_HEADER void SetBCName ( int bcnr, const string & abcname );
|
||||
|
||||
const string & GetBCName ( int bcnr ) const;
|
||||
DLL_HEADER const string & GetBCName ( int bcnr ) const;
|
||||
|
||||
DLL_HEADER void SetNCD2Names (int ncd2n);
|
||||
DLL_HEADER void SetCD2Name (int cd2nr, const string & abcname);
|
||||
|
||||
const string & GetCD2Name (int cd2nr ) const;
|
||||
static string cd2_default_name;
|
||||
DLL_HEADER const string & GetCD2Name (int cd2nr ) const;
|
||||
DLL_HEADER static string cd2_default_name;
|
||||
string * GetCD2NamePtr (int cd2nr ) const
|
||||
{
|
||||
if (cd2nr < cd2names.Size() && cd2names[cd2nr]) return cd2names[cd2nr];
|
||||
|
@ -760,7 +760,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
.def(py::init<>())
|
||||
.def("__init__",
|
||||
[](MP *instance, double maxh, bool quad_dominated, int optsteps2d, int optsteps3d,
|
||||
MESHING_STEP perfstepsend, int only3D_domain, const string & meshsizefilename)
|
||||
MESHING_STEP perfstepsend, int only3D_domain, const string & meshsizefilename,
|
||||
double grading, double curvaturesafety, double segmentsperedge)
|
||||
{
|
||||
new (instance) MeshingParameters;
|
||||
instance->maxh = maxh;
|
||||
@ -770,6 +771,10 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
instance->only3D_domain_nr = only3D_domain;
|
||||
instance->perfstepsend = perfstepsend;
|
||||
instance->meshsizefilename = meshsizefilename;
|
||||
|
||||
instance->grading = grading;
|
||||
instance->curvaturesafety = curvaturesafety;
|
||||
instance->segmentsperedge = segmentsperedge;
|
||||
},
|
||||
py::arg("maxh")=1000,
|
||||
py::arg("quad_dominated")=false,
|
||||
@ -778,6 +783,9 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
py::arg("perfstepsend") = MESHCONST_OPTVOLUME,
|
||||
py::arg("only3D_domain") = 0,
|
||||
py::arg("meshsizefilename") = "",
|
||||
py::arg("grading")=0.3,
|
||||
py::arg("curvaturesafety")=2,
|
||||
py::arg("segmentsperedge")=1,
|
||||
"create meshing parameters"
|
||||
)
|
||||
.def("__str__", &ToString<MP>)
|
||||
|
@ -164,7 +164,10 @@ class Mpeg {
|
||||
enc->bit_rate = BITRATE;
|
||||
enc->width = width;
|
||||
enc->height = height;
|
||||
st->time_base = (AVRational){ 1, framerate };
|
||||
AVRational tb;
|
||||
tb.num=1;
|
||||
tb.den=framerate;
|
||||
st->time_base = tb;
|
||||
enc->time_base = st->time_base;
|
||||
|
||||
enc->gop_size = 200;
|
||||
|
@ -3,9 +3,7 @@ add_definitions(-DNGLIB_EXPORTS)
|
||||
if(WIN32)
|
||||
set(nglib_objects
|
||||
$<TARGET_OBJECTS:mesh>
|
||||
$<TARGET_OBJECTS:stlvis>
|
||||
$<TARGET_OBJECTS:stl>
|
||||
$<TARGET_OBJECTS:geom2dvis>
|
||||
$<TARGET_OBJECTS:interface>
|
||||
$<TARGET_OBJECTS:geom2d>
|
||||
$<TARGET_OBJECTS:csg>
|
||||
@ -15,9 +13,15 @@ if(WIN32)
|
||||
$<TARGET_OBJECTS:gprim>
|
||||
|
||||
$<TARGET_OBJECTS:visual>
|
||||
$<TARGET_OBJECTS:csgvis>
|
||||
$<TARGET_OBJECTS:occ>
|
||||
)
|
||||
if(USE_GUI)
|
||||
set(nglib_objects ${nglib_objects}
|
||||
$<TARGET_OBJECTS:stlvis>
|
||||
$<TARGET_OBJECTS:geom2dvis>
|
||||
$<TARGET_OBJECTS:csgvis>
|
||||
)
|
||||
endif(USE_GUI)
|
||||
endif(WIN32)
|
||||
|
||||
add_library(nglib SHARED nglib.cpp ${nglib_objects})
|
||||
|
@ -1,6 +1,5 @@
|
||||
import libngpy
|
||||
from libngpy._NgOCC import *
|
||||
from libngpy._meshing import MeshingParameters
|
||||
from netgen.libngpy._NgOCC import *
|
||||
from netgen.libngpy._meshing import MeshingParameters
|
||||
|
||||
def NgOCC_meshing_func (geom, **args):
|
||||
if "mp" in args:
|
||||
|
Loading…
Reference in New Issue
Block a user