From 00855acfec2f7aa953f27a1b8a59f5aadb1da3be Mon Sep 17 00:00:00 2001 From: "mhochsteger@cerbsim.com" Date: Thu, 23 Sep 2021 09:14:58 +0200 Subject: [PATCH] fix GetSurfaceElementOfPoint only call GetElementOfPoint, if there are volume elements (otherwise we get an endless loop of mutual function calls here...) --- libsrc/meshing/meshclass.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 4ed54ae4..50b1e5e6 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -5757,7 +5757,10 @@ namespace netgen else { double vlam[3]; - int velement = GetElementOfPoint(p,vlam,NULL,build_searchtree,allowindex); + int velement = 0; + + if(GetNE()) + GetElementOfPoint(p,vlam,NULL,build_searchtree,allowindex); //(*testout) << "p " << p << endl; //(*testout) << "velement " << velement << endl;