diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index e3b45b9b..1de31c97 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -38,7 +38,7 @@ namespace netgen NgMPI_Comm comm; /// line-segments at edges - Array segments; + Array segments; /// surface elements, 2d-inner elements Array surfelements; /// volume elements diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index 2f49ad70..8644b6aa 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -306,13 +306,17 @@ namespace netgen SegmentIndex & operator= (const SegmentIndex & ai) { i = ai.i; return *this; } SegmentIndex & operator= (int ai) { i = ai; return *this; } - operator int () const { return i; } + constexpr operator int () const { return i; } SegmentIndex& operator++ () { ++i; return *this; } SegmentIndex& operator-- () { --i; return *this; } SegmentIndex operator++ (int) { return i++; } SegmentIndex operator-- (int) { return i--; } }; + inline void SetInvalid (SegmentIndex & id) { id = -1; } + inline bool IsInvalid (SegmentIndex & id) { return id == -1; } + + inline istream & operator>> (istream & ist, SegmentIndex & pi) { int i; ist >> i; pi = i; return ist; diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index fe1c6f8a..111cb4b9 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -603,7 +603,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) ExportArray(m); ExportArray(m); - ExportArray(m); + ExportArray(m); ExportArray(m); ExportArray(m); ExportArray(m); @@ -823,7 +823,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) py::return_value_policy::reference) .def("Elements1D", - static_cast&(Mesh::*)()> (&Mesh::LineSegments), + static_cast&(Mesh::*)()> (&Mesh::LineSegments), py::return_value_policy::reference) .def("Elements0D", FunctionPointer([] (Mesh & self) -> Array&