mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
quad-dominated wrapped to python
This commit is contained in:
parent
833adca785
commit
9a58654055
@ -485,16 +485,20 @@ DLL_HEADER void ExportNetgenMeshing()
|
|||||||
typedef MeshingParameters MP;
|
typedef MeshingParameters MP;
|
||||||
bp::class_<MP> ("MeshingParameters", bp::init<>())
|
bp::class_<MP> ("MeshingParameters", bp::init<>())
|
||||||
.def("__init__", bp::make_constructor
|
.def("__init__", bp::make_constructor
|
||||||
(FunctionPointer ([](double maxh)
|
(FunctionPointer ([](double maxh, bool quad_dominated)
|
||||||
{
|
{
|
||||||
auto tmp = new MeshingParameters;
|
auto tmp = new MeshingParameters;
|
||||||
tmp->maxh = maxh;
|
tmp->maxh = maxh;
|
||||||
|
tmp->quad = int(quad_dominated);
|
||||||
return tmp;
|
return tmp;
|
||||||
}),
|
}),
|
||||||
bp::default_call_policies(), // need it to use arguments
|
bp::default_call_policies(), // need it to use arguments
|
||||||
(bp::arg("maxh")=1000)),
|
(
|
||||||
|
bp::arg("maxh")=1000,
|
||||||
|
bp::arg("quad_dominated")=false
|
||||||
|
)),
|
||||||
"create meshing parameters"
|
"create meshing parameters"
|
||||||
)
|
)
|
||||||
.def("__str__", &ToString<MP>)
|
.def("__str__", &ToString<MP>)
|
||||||
.add_property("maxh",
|
.add_property("maxh",
|
||||||
FunctionPointer ([](const MP & mp ) { return mp.maxh; }),
|
FunctionPointer ([](const MP & mp ) { return mp.maxh; }),
|
||||||
|
Loading…
Reference in New Issue
Block a user