Yes, just a kd tree should work wonders here. However, most of the kd trees I’m aware of in Julia right now search points, whereas you want to search simplices, and the two problems are not quite equivalent (a simplex can lie on both sides of a separating plane). Fortunately, implementing this is not too hard, and it would be useful to have for finite-element packages — I linked some sample code in: Error with the interpolation of 3D model · Issue #831 · gridap/Gridap.jl · GitHub (and maybe one of the many FEM packages has already done it too?).