this is my code ,but an error is
cell = cpp.geometry.compute_colliding_cells(mesh, cell_candidates, x)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: compute_colliding_cells(): incompatible function arguments.
x_r = Function(W)
xr.copy(x_r.vector)
x_i = Function(W)
xi.copy(x_i.vector)
xt_r, xz_r = x_r.split()
xt_i, xz_i = x_i.split()
print(xt_r.vector.array.shape)
print(xz_r.vector.array.shape)
x0 = [0, 0, 0]
xs = np.array([[x, x, 0] for x in np.linspace(0, 10, 100000)])
tree = geometry.bb_tree(mesh,mesh.geometry.dim)
print(‘tree’,type(tree))
e_ts =
e_zs =
rs = (xs[:, 0]**2 + xs[:, 1]**2)**0.5
for x in xs:
print(‘xxx’,type(x))
print(‘xxx’,x.dtype)
cell_candidates = geometry.compute_collisions_points(tree, x)
print(type(mesh))
print(type(cell_candidates))
print(type(x))
print(x.dtype)
#cell = cpp.geometry.compute_colliding_cells(mesh, cell_candidates, x, 1)
cell = cpp.geometry.compute_colliding_cells(mesh, cell_candidates, x)
e_t = xt_r.eval(x, cell)
e_t_abs = np.sqrt(np.sum(e_t*np.conj(e_t))).real
e_ts.append(e_t_abs)
e_zs.append(np.absolute(xz_r.eval(x, cell)))