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