39 integer*4,
dimension(1) :: pos
45 real*8,
dimension(n) :: xs,ys,zs
46 real*8,
dimension(n) :: dist_all
62 dist_all = (xs-xt)*(xs-xt) + (ys-yt)*(ys-yt) + (zs-zt)*(zs-zt)
63 dist_min = minval(dist_all)
64 pos = minloc(dist_all); nt = pos(1)
subroutine get_nearest_node(n, xs, ys, zs, xt, yt, zt, nt, dist_min)
Computes the nearest node with respet to (xt,yt,zt).