Accessing connectivity for a mesh object

I am experimenting with the python interface and trying to obtain a second order mesh. Consider the following MWE:

# Some code to generate a `geo` object

mesh = geo.GenerateMesh(maxh=10)
mesh.SecondOrder()
Elems = mesh.Elements2D()
for elem in Elems:
    print(elem.vertices)

This outputs only 3 vertices, and if I am correct, the first three. How to access the complete connectivity for each element ? What is a better approach to generate a 6-noded triangular mesh.

Hi bhaveshshrimali,

with

elem.vertices

you get always only the three vertex points of the triangle. Use

elem.points

instead to get all 6. The first three will coincide with the result from elem.vertices.

Best
Michael

Ah I see, Thanks. Makes complete sense. What I meant was the points on the triangle (and not just the vertices).

Thank you very much!!
Bhavesh