#1474 3D alugrid insertion indices not behaving as expected
Metadata
Property | Value |
---|---|
Reported by | Elias Pipping (elias.pipping@fu-berlin.de) |
Reported at | Jun 26, 2014 10:02 |
Type | Bug Report |
Version | 2.3 |
Operating System | Linux |
Description
I'm constructing a grid by first inserting vertices, then simplex elements, and finally marking some boundary segments. Since I've previously handled the boundary differently, I am new to boundary segments and might be making a silly mistake. Otherwise, what I'm describing is a bug:
I'm considering a very simple domain, consisting of a prism (two triangles UVW and U'V'W' in the xy plane with edges in the z-direction that join U/U', V/V', W/W'). My grid consists of three tetrahedrons.
This gives me: 6 vertices, 3 tetrahedrons, and 8 (boundary) faces.
The points U and V form the bottom of the triangle, since they have y-coordinate zero and W has y-coordinate 0.5 (the same goes for U', V', W'). We thus have a rectangle (U,V,U',V'), which is made up of two triangular faces and forms the bottom of the domain. These two faces I would like to assign an insertion index to. So I call insertBoundarySegment() for each and expect them to get the insertion indices 0 and 1 (something that my gridfactory should be able to tell me).
In the sample code I've attached, these insertion indices instead end up on different faces. Can somebody explain, why?
The code generates the following output for me:
2 lower front points:
v[0] = 0 0 1
v[1] = 1 0 1
2 lower rear points:
v[3] = 0 0 0
v[4] = 1 0 0
Inserting the following face: (0, 1, 3).
The insertion index should be: 0
Inserting the following face: (1, 4, 3).
The insertion index should be: 1
Created serial ALUGrid<3,3,simplex,conforming> from macro grid file ''.
Iterating over the boundary faces
Centre of the face: 0.166667 0.166667 0.666667, insertion index: 1
Error: Mismatch! (should not have an index)
Centre of the face: 0.500000 0.166667 1.000000, insertion index: 0
Error: Mismatch! (should not have an index)
Centre of the face: 0.333333 0.000000 0.666667, lower boundary
Error: Mismatch! (missing index)
Centre of the face: 0.666667 0.000000 0.333333, lower boundary
Error: Mismatch! (missing index)
Centre of the face: 0.833333 0.166667 0.666667
Centre of the face: 0.500000 0.166667 0.000000
Centre of the face: 0.666667 0.333333 0.333333
Centre of the face: 0.333333 0.333333 0.333333
Note how each face that I've marked should have a centre with y-coordinate equal to zero.