get rid of 10000 segments limit in hp-refinement

This commit is contained in:
Joachim Schöberl 2019-12-04 17:33:16 +01:00
parent 2fc30ce10e
commit e5ead2065b
2 changed files with 11 additions and 3 deletions

View File

@ -600,11 +600,15 @@ namespace netgen
HPRefElement hpel(mesh[i]);
hpel.coarse_elnr = i;
hpel.type = HP_SEGM;
hpel.index = seg.edgenr + 10000*seg.si;
// hpel.index = seg.edgenr + 10000*seg.si;
hpel.index = seg.edgenr;
hpel.si = seg.si;
/*
if(seg.edgenr >= 10000)
{
throw NgException("assumption that seg.edgenr < 10000 is wrong");
}
*/
elements.Append(hpel);
}
}
@ -925,6 +929,7 @@ namespace netgen
for (int k = 0; k < 8; k++)
newel.pnums[k] = newpnums[hprs->newels[j][k]-1];
newel.index = el.index;
newel.si = el.si;
newel.coarse_elnr = el.coarse_elnr;
newel.levelx = newel.levely = newel.levelz = newlevel;
@ -1361,8 +1366,10 @@ namespace netgen
seg[0] = hpel.pnums[0];
seg[1] = hpel.pnums[1];
// NOTE: only for less than 10000 elements (HACK) !!!
seg.edgenr = hpel.index % 10000;
seg.si = hpel.index / 10000;
// seg.edgenr = hpel.index % 10000;
// seg.si = hpel.index / 10000;
seg.edgenr = hpel.index;
seg.si = hpel.si;
/*
seg.epgeominfo[0].dist = hpel.param[0][0]; // he: war hpel.param[0][0]

View File

@ -291,6 +291,7 @@ public:
PointIndex pnums[8];
double param[8][3];
int index;
int si;
int levelx;
int levely;
int levelz;