small mesh load improvement

This commit is contained in:
Joachim Schoeberl 2012-02-12 02:58:02 +00:00
parent db216f1836
commit f51a58296a

View File

@ -860,6 +860,11 @@ namespace netgen
{ {
infile >> n; infile >> n;
PrintMessage (3, n, " surface elements"); PrintMessage (3, n, " surface elements");
bool geominfo = strcmp (str, "surfaceelementsgi") == 0;
bool uv = strcmp (str, "surfaceelementsuv") == 0;
for (i = 1; i <= n; i++) for (i = 1; i <= n; i++)
{ {
int surfnr, bcp, domin, domout, nep, faceind = 0; int surfnr, bcp, domin, domout, nep, faceind = 0;
@ -883,6 +888,8 @@ namespace netgen
GetFaceDescriptor(j).DomainOut() == domout) GetFaceDescriptor(j).DomainOut() == domout)
faceind = j; faceind = j;
// if (facedecoding.Size()) faceind = 1; // for timing
if (!faceind) if (!faceind)
{ {
faceind = AddFaceDescriptor (FaceDescriptor(surfnr, domin, domout, 0)); faceind = AddFaceDescriptor (FaceDescriptor(surfnr, domin, domout, 0));
@ -898,18 +905,16 @@ namespace netgen
for (int j = 1; j <= nep; j++) for (int j = 1; j <= nep; j++)
infile >> tri.PNum(j); infile >> tri.PNum(j);
if (strcmp (str, "surfaceelementsgi") == 0) if (geominfo)
for (int j = 1; j <= nep; j++) for (int j = 1; j <= nep; j++)
infile >> tri.GeomInfoPi(j).trignum; infile >> tri.GeomInfoPi(j).trignum;
if (strcmp (str, "surfaceelementsuv") == 0) if (uv)
for (int j = 1; j <= nep; j++) for (int j = 1; j <= nep; j++)
infile >> tri.GeomInfoPi(j).u >> tri.GeomInfoPi(j).v; infile >> tri.GeomInfoPi(j).u >> tri.GeomInfoPi(j).v;
if (invertsurf) if (invertsurf) tri.Invert();
tri.Invert(); if (invert_el) tri.Invert();
if (invert_el)
tri.Invert();
AddSurfaceElement (tri); AddSurfaceElement (tri);
} }