This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

problem to use entities(3) in ubuntu

0 votes

Hello every one:

I want to get all elements containing a node with the idx known

Vertex(omega, idx).entities(3)
>>[]

I have this problem after an ubuntu upgrade, but I want to see your opinion for fix this problem.

asked Jun 19, 2014 by ljofre FEniCS Novice (720 points)

Please provide a minimal but complete example.

1 Answer

+1 vote

Hi, is this your problem?

from dolfin import *
mesh = UnitCubeMesh(2, 2, 2)
d = mesh.topology().dim()

# There's always cell-vertex connectivity
print Cell(mesh, 0).entities(0)

# Not the other way around
print Vertex(mesh, 0).entities(d)

# You must initialize it
mesh.init(0, d)
print Vertex(mesh, 0).entities(d)
answered Jun 19, 2014 by MiroK FEniCS Expert (80,920 points)

Works fine locally with FEniCS 1.4.0

It helped me also. Thanks.

...