I don't understand why the tabulated coordinates are duplicated when using P2 elements.
# Mesh details
uplim = 1
size = 50
# Create Mesh
domain = Rectangle(Point(0., 0.), Point(uplim, uplim))
mesh = generate_mesh(domain,size)
# Define Function Space
V = VectorFunctionSpace(mesh, 'CG', pdim, dim=2)
# Cartesian coordinates:
dim = V.dim()
print dim
N = mesh.geometry().dim()
coor = V.tabulate_dof_coordinates().reshape(dim,N)
print coor[0:10,:]
print coor.size
This shows that each 2D coordinate is doubled. When using p2 elements I would expect a higher number of points (not necessarily doubled with respect to p1 elements), some of which are nodes and some others are edges middle points.
Moreover, what can I use in python to obtain the size of an object as an ndarray? size gives the number of all elements, while I'm looking for an output of type (dim,N).
Thanks