Merge branch 'geom_info_2d_element' into 'master'

export geom info of 2d elements

See merge request ngsolve/netgen!614
This commit is contained in:
Lackner, Christopher 2023-11-16 14:22:14 +01:00
commit 1565e149c0

View File

@ -512,6 +512,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
.def_property("index", &Element2d::GetIndex, &Element2d::SetIndex) .def_property("index", &Element2d::GetIndex, &Element2d::SetIndex)
.def_property("curved", &Element2d::IsCurved, &Element2d::SetCurved) .def_property("curved", &Element2d::IsCurved, &Element2d::SetCurved)
.def_property("refine", &Element2d::TestRefinementFlag, &Element2d::SetRefinementFlag) .def_property("refine", &Element2d::TestRefinementFlag, &Element2d::SetRefinementFlag)
.def_property_readonly("geominfo", [](const Element2d& self) -> py::list
{
py::list li;
for (const auto &pgi : self.GeomInfo())
li.append(py::make_tuple(pgi.trignum, pgi.u, pgi.v));
return li;
})
.def_property_readonly("vertices", .def_property_readonly("vertices",
FunctionPointer([](const Element2d & self) -> py::list FunctionPointer([](const Element2d & self) -> py::list
{ {