diff --git a/libsrc/include/nginterface_v2_impl.hpp b/libsrc/include/nginterface_v2_impl.hpp index 53147aca..973310a2 100644 --- a/libsrc/include/nginterface_v2_impl.hpp +++ b/libsrc/include/nginterface_v2_impl.hpp @@ -116,7 +116,8 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (size_t nr) const template <> NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<2> (size_t nr) const { - const Element2d & el = mesh->SurfaceElement (SurfaceElementIndex (nr)); + // const Element2d & el = mesh->SurfaceElement (SurfaceElementIndex (nr)); + const Element2d & el = mesh->SurfaceElements()[nr]; Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); @@ -155,7 +156,8 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<2> (size_t nr) const template <> NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<3> (size_t nr) const { - const Element & el = mesh->VolumeElement (ElementIndex (nr)); + // const Element & el = mesh->VolumeElement (ElementIndex (nr)); + const Element & el = mesh->VolumeElements()[nr]; Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index c1135649..7fc6ca1a 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -24,8 +24,9 @@ namespace netgen { public: typedef ::netgen::T_POINTS T_POINTS; - typedef Array T_VOLELEMENTS; - typedef Array T_SURFELEMENTS; + typedef Array T_VOLELEMENTS; + // typedef Array T_SURFELEMENTS; + typedef Array T_SURFELEMENTS; private: /// point coordinates diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index a12d21c9..c589676f 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -458,11 +458,11 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) .def_property("dim", &Mesh::GetDimension, &Mesh::SetDimension) .def("Elements3D", - static_cast&(Mesh::*)()> (&Mesh::VolumeElements), + static_cast&(Mesh::*)()> (&Mesh::VolumeElements), py::return_value_policy::reference) .def("Elements2D", - static_cast&(Mesh::*)()> (&Mesh::SurfaceElements), + static_cast&(Mesh::*)()> (&Mesh::SurfaceElements), py::return_value_policy::reference) .def("Elements1D",