From f5b7e27e5dcc4afbc477b858b444e9ea28939f90 Mon Sep 17 00:00:00 2001 From: "mhochsteger@cerbsim.com" Date: Fri, 3 Dec 2021 14:54:39 +0100 Subject: [PATCH] save FaceDescriptors in mesh file --- libsrc/meshing/meshclass.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 8748c36e..51a9c9f0 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -665,6 +665,13 @@ namespace netgen outfile << "geomtype\n" << int(geomtype) << "\n"; + outfile << "\n"; + outfile << "# surfnr\tdomin\tdomout\ttlosurf\tbcprop\n"; + outfile << "facedescriptors\n"; + outfile << GetNFD() << "\n"; + for(auto & fd : FaceDescriptors()) + outfile << fd.SurfNr() << ' ' << fd.DomainIn() << ' ' << fd.DomainOut() << ' ' << fd.TLOSurface() << ' ' << fd.BCProperty() << '\n'; + outfile << "\n"; outfile << "# surfnr bcnr domin domout np p1 p2 p3" @@ -1192,6 +1199,19 @@ namespace netgen geomtype = GEOM_TYPE(hi); } + if (strcmp (str, "facedescriptors") == 0) + { + int nfd; + infile >> nfd; + for(auto i : Range(nfd)) + { + int surfnr, domin, domout, tlosurf, bcprop; + infile >> surfnr >> domin >> domout >> tlosurf >> bcprop; + auto faceind = AddFaceDescriptor (FaceDescriptor(surfnr, domin, domout, tlosurf)); + GetFaceDescriptor(faceind).SetBCProperty(bcprop); + } + } + if (strcmp (str, "surfaceelements") == 0 || strcmp (str, "surfaceelementsgi")==0 || strcmp (str, "surfaceelementsuv") == 0) {