GPUE
v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
findNN.m
Go to the documentation of this file.
1
function
[neighbours,locations] = findNN(
pos
,
X
,
Y
,
radius
)
2
% Returns values and indices of nearest
neighbours
to location
pos
in
3
% positions
X
,
Y
within
radius
.
4
5
r
=
sqrt
(bsxfun(@minus,
pos
(1),
X
).^2 + bsxfun(@minus,
pos
(2),
Y
).^2);
6
locations
= find(
r
<
radius
&
r
~=0);
7
neighbours
= [X(locations) Y(locations)];
8
end
locations
locations
Definition:
findNN.m:6
vort.pos
int pos
Definition:
vort.py:95
sqrt
end if sqrt(sum([x(ii), y(ii)].^ 2))< radius %% ignore edges if(length(DT.vertexAttachments
Definition:
defectTriangulation.m:57
r
Y within radius r
Definition:
findNN.m:5
neighbours
neighbours
Definition:
findNN.m:7
pos
Struct for an x, y, z position.
Definition:
ds.h:42
en.X
X
Definition:
en.py:69
en.Y
Y
Definition:
en.py:70
radius
Y Y range of points % radius
Definition:
psi6.m:1
matlab
findNN.m
Generated by
1.8.14