So as a quick fix for your problem:
def f_mesh_expr(x):
cells = dolfinx.geometry.compute_closest_entity(tree, midpoint_tree, submesh, x.T)
return np.ascontiguousarray(f_submesh.eval(x.T, cells).T)
So as a quick fix for your problem:
def f_mesh_expr(x):
cells = dolfinx.geometry.compute_closest_entity(tree, midpoint_tree, submesh, x.T)
return np.ascontiguousarray(f_submesh.eval(x.T, cells).T)