From 55203ae730fe00b7ac6e5d3790a9495862d49a69 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 26 Aug 2019 13:16:28 +0200 Subject: [PATCH] fix mpi mesh curving --- libsrc/meshing/curvedelems.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libsrc/meshing/curvedelems.cpp b/libsrc/meshing/curvedelems.cpp index 77a06f72..392ef0ef 100644 --- a/libsrc/meshing/curvedelems.cpp +++ b/libsrc/meshing/curvedelems.cpp @@ -1295,10 +1295,17 @@ namespace netgen Point<3> pp = xa[jj]; // ref -> ProjectToSurface (pp, mesh.GetFaceDescriptor(el.GetIndex()).SurfNr()); + /** + with MPI and an interior surface element between volume elements assigned to different + procs, only one of them has the surf-el + **/ SurfaceElementIndex sei = top.GetFace2SurfaceElement (f+1)-1; - PointGeomInfo gi = mesh[sei].GeomInfoPi(1); - - ref -> ProjectToSurface (pp, surfnr[facenr], gi); + if (sei != SurfaceElementIndex(-1)) { + PointGeomInfo gi = mesh[sei].GeomInfoPi(1); + ref -> ProjectToSurface (pp, surfnr[facenr], gi); + } + else + { ref -> ProjectToSurface (pp, surfnr[facenr]); } Vec<3> dist = pp-xa[jj]; CalcTrigShape (order1, lami[fnums[1]]-lami[fnums[0]],