From 10c0fd350a5b6f3e570c3f7e0b7ee72a411ddaca Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 30 Oct 2020 15:28:00 +0100 Subject: [PATCH] save/load pointelements --- libsrc/meshing/meshclass.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 572547b9..85b37419 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -602,7 +602,20 @@ namespace netgen outfile << (*this)[pi](1)/scale << " "; outfile.width(22); outfile << (*this)[pi](2)/scale << "\n"; - } + } + + outfile << "\n" << "\n"; + outfile << "# pnum index" << "\n"; + outfile << "pointelements" << "\n"; + outfile << pointelements.Size() << "\n"; + + for (i = 0; i < pointelements.Size(); i++) + { + outfile.width(8); + outfile << pointelements[i].pnum << " "; + outfile.width(8); + outfile << pointelements[i].index << "\n"; + } if (ident -> GetMaxNr() > 0) { @@ -1083,6 +1096,19 @@ namespace netgen PrintMessage (3, n, " points done"); } + if (strcmp (str, "pointelements") == 0) + { + infile >> n; + PrintMessage (3, n, " pointelements"); + for (i = 1; i <= n; i++) + { + Element0d el; + infile >> el.pnum >> el.index; + pointelements.Append (el); + } + PrintMessage (3, n, " pointelements done"); + } + if (strcmp (str, "identifications") == 0) { infile >> n;