mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
all tests passing for PointIndex::BASE=0
This commit is contained in:
parent
aca27f6421
commit
ce5f6d695c
@ -327,7 +327,7 @@ template <> NGX_INLINE DLL_HEADER const Ng_Node<2> Ngx_Mesh :: GetNode<2> (int n
|
||||
{
|
||||
Ng_Node<2> node;
|
||||
node.vertices.ptr = (const int*)mesh->GetTopology().GetFaceVerticesPtr(nr);
|
||||
node.vertices.nv = (node.vertices.ptr[3] == 0) ? 3 : 4;
|
||||
node.vertices.nv = (node.vertices.ptr[3]+1 == PointIndex::BASE) ? 3 : 4;
|
||||
node.surface_el = mesh->GetTopology().GetFace2SurfaceElement (nr+1)-1;
|
||||
return node;
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ namespace netgen
|
||||
|
||||
|
||||
|
||||
class PointIndex : public Index<int,PointIndex,0>
|
||||
class PointIndex : public Index<int,PointIndex,1>
|
||||
{
|
||||
public:
|
||||
using Index::Index;
|
||||
|
@ -160,7 +160,7 @@ namespace netgen
|
||||
|
||||
{ // triangle
|
||||
PointIndices<4> face(el[elfaces[j][0]], el[elfaces[j][1]],
|
||||
el[elfaces[j][2]], 0);
|
||||
el[elfaces[j][2]], PointIndex(PointIndex::INVALID));
|
||||
|
||||
|
||||
[[maybe_unused]] int facedir = 0;
|
||||
@ -266,7 +266,7 @@ namespace netgen
|
||||
|
||||
PointIndices<4> face(el.PNum(elfaces[0][0]),
|
||||
el.PNum(elfaces[0][1]),
|
||||
el.PNum(elfaces[0][2]),0);
|
||||
el.PNum(elfaces[0][2]), PointIndex(PointIndex::INVALID));
|
||||
|
||||
// facedir = 0;
|
||||
if (face[0] > face[1])
|
||||
@ -1161,7 +1161,7 @@ namespace netgen
|
||||
size_t pos;
|
||||
if (vert2face.PositionCreate(face, pos))
|
||||
{
|
||||
face2vert[nfa] = { face[0], face[1], face[2], 0 }; // i4;
|
||||
face2vert[nfa] = { face[0], face[1], face[2], PointIndex::BASE-1 }; // i4;
|
||||
vert2face.SetData (pos, face, nfa);
|
||||
nfa++;
|
||||
}
|
||||
@ -2136,7 +2136,7 @@ namespace netgen
|
||||
if (elfaces[j][3] < 0)
|
||||
{ // triangle
|
||||
INDEX_4 face(el[elfaces[j][0]], el[elfaces[j][1]],
|
||||
el[elfaces[j][2]], 0);
|
||||
el[elfaces[j][2]], PointIndex::BASE-1 );
|
||||
|
||||
int facedir = 0;
|
||||
if (face.I1() > face.I2())
|
||||
@ -2203,7 +2203,7 @@ namespace netgen
|
||||
if (elfaces[j][3] < 0)
|
||||
{ // triangle
|
||||
INDEX_4 face(el[elfaces[j][0]], el[elfaces[j][1]],
|
||||
el[elfaces[j][2]], 0);
|
||||
el[elfaces[j][2]], PointIndex(PointIndex::INVALID));
|
||||
|
||||
int facedir = 0;
|
||||
if (face.I1() > face.I2())
|
||||
@ -2272,7 +2272,7 @@ namespace netgen
|
||||
vertices.SetSize(4);
|
||||
for (int i = 0; i < 4; i++)
|
||||
vertices[i] = face2vert[fnr-1][i];
|
||||
if (vertices[3] == 0)
|
||||
if (vertices[3]+1==PointIndex::BASE)
|
||||
vertices.SetSize(3);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user