Hello,
In dolfinx, is the following code fragment from the Static condensation of linear elasticity example:
# Create bounding box for function evaluation
bb_tree = geometry.bb_tree(msh, 2)
# Check against standard table value
p = np.array([[48.0, 52.0, 0.0]], dtype=np.float64)
cell_candidates = geometry.compute_collisions_points(bb_tree, p)
cells = geometry.compute_colliding_cells(msh, cell_candidates, p).array
uc.x.scatter_forward()
if len(cells) > 0:
value = uc.eval(p, cells[0])
print(value[1])
the best way to find the value of a FEM solution (in this case uc
, which is a function defined over some space V
on the mesh msh
) at a specified point (in this case p
)? Is there a simpler way? I have seen that in fenics there was the more intuitively obvious uc(p)
.
Thanks in advance for any advice.
Peter.