Hi @dokken, thanks for your reply. I’ve tried implementing the recipe of the tutorial but I only get an empty list. Could you please help me identify the problem?
points = np.array([[0.1, np.pi*1.7], [0.2, np.pi*1.2], [0.03, np.pi]])
m_values = []
tree = geometry.BoundingBoxTree(domain, domain.topology.dim)
cells = []
points_on_proc = []
cell_candidates = geometry.compute_collisions(tree, points.T) # Find cells whose bounding-box collide with the the points
colliding_cells = geometry.compute_colliding_cells(domain, cell_candidates, points.T) # Choose one of the cells that contains the point
for i, point in enumerate(points.T):
if len(colliding_cells.links(i))>0:
points_on_proc.append(point)
cells.append(colliding_cells.links(i)[0])
points_on_proc = np.array(points_on_proc, dtype=np.float64)
m_values = m.eval(points_on_proc, cells)
print(m_values)
I already found the problem – in the way I’m defining the points, I don’t need to transpose the array.