GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
loadVtx.m
Go to the documentation of this file.
1 function [vorts] = loadVtx(start, step, fin, lostCheck)
2 %loads the processed vorts from the output of vort.py, and structures them
3 %into Matlab structs for Vortex position and index
4 % start step and fin are the initial dataset, step size, and final
5 % dataset to load for the vortex postions
6 % lostCheck turns on the ability to test for vortex losses and ensure
7 % that these vortices do not contribute to the dataset.
8 % The Data should be in the format of [X Y Sign UID IsLost]
9 
10  %vorts=zeros(1,1,2);
11  a=zeros(2,1);
12  steps=start:step:fin;
13 
14  vtxLost.count=0;
15  vtxLost.idx=[];
16 
17  %Check if a vortex vanishes (goes outside the boundary) over
18  %the course of the simulations. If so, we can choose to discard it.
19  %This is indicated by a 0 in the 5th column, whose UID is then tagged
20  if lostCheck==1
21  for ii=steps
22  f=csvread(strcat(strcat('vort_ord_',int2str(ii)),'.csv'),0,0);
23  for jj=1:size(f,1)
24  if f(jj,5) == 0
25  vtxLost.idx = union(vtxLost.idx,f(jj,4));
26  end
27  end
28  end
29  vtxLost.count = length(vtxLost.idx);
30  end
31 
32  %Arrange vortices in appropriate ordering and structuring for
33  %trajectory plotting which are return by vorts data structure
34  for ii=steps
35  count((ii/1000))=0;
36  f=csvread(strcat(strcat('vort_ord_',int2str(ii)),'.csv'),0,0);
37  for jj=1:(size(f,1))
38  if ( round(f(jj,1) == 0) || round(f(jj,2) == 0)) || ismember(f(jj,4),vtxLost.idx)
39  0;
40  else
41  count(ii/1000 ) = count(ii/1000 ) +1;
42  vorts(count(ii/1000 ),ii/1000 ).x = f(jj,1);
43  vorts(count(ii/1000 ),ii/1000 ).y = f(jj,2);
44  vorts(count(ii/1000 ),ii/1000 ).uid = round(f(jj,4));
45  end
46  end
47  end
48 end
% Check if a vortex vanishes(goes outside the boundary) over % the course of the simulations. If so
end if(length(DT.vertexAttachments{ii})==5) if plotit plot(x(ii)
% Imaginary time unitary evolution operators for position
Definition: GPE_2d.m:82
end % Arrange vortices in appropriate ordering and structuring for % trajectory plotting which are return by vorts data structure for ii
Definition: loadVtx.m:34
and structures them % into Matlab structs for Vortex position and index % start step and fin are the initial step size
Definition: loadVtx.m:1
vtxLost idx
Definition: loadVtx.m:15
for jj
Definition: loadVtx.m:23
end % Loop over vortices and check the number of edges per index
and extended by(Dr?) Lee James O 'Riordan. % Ek
steps
Definition: loadVtx.m:12
% Check if a vortex we can choose to discard it % This is indicated by a in the column
Definition: loadVtx.m:19
% Check if a vortex we can choose to discard it % This is indicated by a in the whose UID is then tagged if lostCheck
Definition: loadVtx.m:20
a
Definition: loadVtx.m:11
__global__ void zeros(double *field, int n)
Creates a field of all zeros ,.
and structures them % into Matlab structs for Vortex position and index % start step and fin are the initial dataset
Definition: loadVtx.m:1
f
Definition: loadVtx.m:36
end % Calculate all n choose k pairings of and give distance between % them
Definition: g6_struct.m:16
Definition: vort.py:1
and structures them % into Matlab structs for Vortex position and index % start step and fin are the initial step and final % dataset to load for the vortex postions % lostCheck turns on the ability to test for vortex losses and ensure % that these vortices do not contribute to the dataset % The Data should be in the format of [X Y Sign UID IsLost] % vorts
Definition: loadVtx.m:10
% Indexing needs to % be modified if you wish to use the ordered data sets % Calculate the Voronoi diagram of the resulting data
Definition: VtxCorr.m:36
uid
Definition: vort.py:39
% If at least one of the indices is
vtxLost count
Definition: loadVtx.m:14
hold on
length
Definition: vort.py:75