Merge branch 'save_facedescriptors' into 'master'

save FaceDescriptors in mesh file

See merge request jschoeberl/netgen!461
This commit is contained in:
Joachim Schöberl 2021-12-03 14:15:19 +00:00
commit 27a7a5ebcd

View File

@ -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)
{