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
Definition: findNN.m:6
int pos
Definition: vort.py:95
end if sqrt(sum([x(ii), y(ii)].^ 2))< radius %% ignore edges if(length(DT.vertexAttachments
Y within radius r
Definition: findNN.m:5
neighbours
Definition: findNN.m:7
Struct for an x, y, z position.
Definition: ds.h:42
X
Definition: en.py:69
Y
Definition: en.py:70
Y Y range of points % radius
Definition: psi6.m:1