vertex2pointelement ... 0 based

This commit is contained in:
Joachim Schöberl 2016-08-18 09:50:11 +02:00
parent a7b413944d
commit 5413493c64
2 changed files with 6 additions and 6 deletions

View File

@ -526,7 +526,7 @@ namespace netgen
double * x, double * x,
double * dxdxi) const double * dxdxi) const
{ {
PointIndex pnum = mesh->pointelements[elnr-1].pnum; PointIndex pnum = mesh->pointelements[elnr].pnum;
if (x) x[0] = (*mesh)[pnum](0); if (x) x[0] = (*mesh)[pnum](0);
// if (dxdxi) dxdxi[0] = 0; // if (dxdxi) dxdxi[0] = 0;
// Jacobi-matrix is 1 x 0 !!! // Jacobi-matrix is 1 x 0 !!!

View File

@ -377,17 +377,17 @@ namespace netgen
cnt = 0; cnt = 0;
for (int pi = 0; pi < mesh.pointelements.Size(); pi++) for (int pei = 0; pei < mesh.pointelements.Size(); pei++)
{ {
const Element0d & pointel = mesh.pointelements[pi]; const Element0d & pointel = mesh.pointelements[pei];
cnt[pointel.pnum]++; cnt[pointel.pnum]++;
} }
vert2pointelement = new TABLE<int,PointIndex::BASE> (cnt); vert2pointelement = new TABLE<int,PointIndex::BASE> (cnt);
for (int pi = 0; pi < mesh.pointelements.Size(); pi++) for (int pei = 0; pei < mesh.pointelements.Size(); pei++)
{ {
const Element0d & pointel = mesh.pointelements[pi]; const Element0d & pointel = mesh.pointelements[pei];
vert2pointelement->AddSave (pointel.pnum, pi+1); vert2pointelement->AddSave (pointel.pnum, pei);
} }