From 890f59b8b4c483d4e3cc9988ac69bd43801604ad Mon Sep 17 00:00:00 2001 From: Umberto Zerbinati Date: Mon, 15 Jan 2024 11:42:00 +0000 Subject: [PATCH] Exposed Alfeld splits --- libsrc/meshing/python_mesh.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 1a50a250..284b7997 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -1350,7 +1350,15 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) }), py::arg("adaptive")=false, py::call_guard()) .def("ZRefine", &Mesh::ZRefine) - + .def("Split2Tets", &Mesh::Split2Tets) + .def ("SplitAlfeld", FunctionPointer + ([](Mesh & self) + { + NgLock meshlock (self.MajorMutex(), true); + Refinement & ref = const_cast (self.GetGeometry()->GetRefinement()); + ::netgen::HPRefinement (self, &ref, SPLIT_ALFELD, 1, 0.5, true, true); + } + ), py::call_guard()) .def ("SecondOrder", [](Mesh & self) { self.GetGeometry()->GetRefinement().MakeSecondOrder(self);