GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
defectTriangulation.m
Go to the documentation of this file.
1 function [h,DefCount] = defectTriangulation(x, y, dx, dimSize, plotit, radius)
2 %Plots delaunay triangulation of input data points, with (5,7) (3,9) and
3 %(4,8) dislocations indicated. Can be used to calculate the defects numbers with
4 %no plotting by setting plotit to 0
5 % radius defines the distance from 0,0, for which the defects will be
6 %considered. This can be used to avoid defects that arise naturally from
7 %the edge of the triangulation
8 % h is a handle for generated plot
9 % DefCount is a vector of the total number of defects counted for each
10 % type with the index representing the number of connected edges
11 
12 %some useful colours
13 RGB=[0 0.4470 0.7410
14 0.8500 0.3250 0.0980
15 0.9290 0.6940 0.1250
16 0.4940 0.1840 0.5560
17 0.4660 0.6740 0.1880
18 0.3010 0.7450 0.9330
19 0.6350 0.0780 0.1840];
20 
21 %Rescale values to be centred on zero, and in meters
22 x=dx*(x-dimSize/2)';
23 y=dx*(y-dimSize/2)';
24 
25 %Calculate delaunay triangulation, and setup figure
26 DT = delaunayTriangulation([x y]);
27 if plotit
28  triplot(DT, 'color',[0.6 0.6 0.6],'LineWidth',2);
29  %triplot(DT, 'color',RGB(1,:),'LineWidth',3);
30 
31  hold on;
32  %set(gca,'Color',[0 0 0]);
33  set(gca,'TickLabelInterpreter', 'latex');
34  set(gca,'DefaultTextInterpreter','Latex')
35  set(gca,'FontName','Latin Modern Roman','FontSize',24);
36  axis square;
37  h=plot(x,y,'ko','MarkerSize',10);
38  xlabel('$x$ (m)','Interpreter','latex');
39  ylabel('$y$ (m)','Interpreter','latex')
40 
41  %Defect marker size
42  MarkerSize = 18;
43 else
44  h=-1;
45 end
46 %Loop over vortices and check the number of edges per index, and place
47 %appropriate marker.
48 for jj=1:9
49  DefCount(1,jj)=0;
50 end
51 % idx 1 is for time, idx 2 is for type.
52 for ii=1:length(x)
53  for jj=1:9
54  DefCount(ii+1,jj)=0;
55  end
56 
57  if sqrt(sum([x(ii),y(ii)].^2)) < radius %%ignore edges
58  if (length(DT.vertexAttachments{ii})==6)
59  DefCount(ii+1,6)= DefCount(ii+1,6) +1;
60  end
61 
62  if (length(DT.vertexAttachments{ii})==5)
63  if plotit
64  plot(x(ii),y(ii),'p','MarkerEdgeColor','k','MarkerSize',MarkerSize-2,'MarkerFaceColor','w','LineWidth',1.5);
65  end
66  DefCount(ii+1,5)= DefCount(ii+1,5) +1;
67  elseif length(DT.vertexAttachments{ii})==7
68  if plotit
69  plot(x(ii),y(ii),'h','MarkerEdgeColor','k','MarkerSize',MarkerSize,'MarkerFaceColor',[0.3 0.3 0.3],'LineWidth',1.5);
70  end
71  DefCount(ii+1,7)= DefCount(ii+1,7) +1;
72  end
73 
74  if (length(DT.vertexAttachments{ii})==3)
75  if plotit
76  plot(x(ii),y(ii),'^','MarkerEdgeColor','k','MarkerSize',MarkerSize-2,'MarkerFaceColor',RGB(4,:),'LineWidth',1.5);
77  end
78  DefCount(ii+1,3)= DefCount(ii+1,3) +1;
79  elseif length(DT.vertexAttachments{ii})==9
80  if plotit
81  plot(x(ii),y(ii),'v','MarkerEdgeColor','k','MarkerSize',MarkerSize-2,'MarkerFaceColor',RGB(5,:), 'LineWidth',1.5);
82  end
83  DefCount(ii+1,9)= DefCount(ii+1,9) +1;
84  end
85 
86  if (length(DT.vertexAttachments{ii})==4)
87  if plotit
88  plot(x(ii),y(ii),'d','MarkerEdgeColor','k','MarkerSize',MarkerSize-2,'MarkerFaceColor',RGB(2,:),'LineWidth',1.5);
89  end
90  DefCount(ii+1,4)= DefCount(ii+1,4) +1;
91 
92  elseif length(DT.vertexAttachments{ii})==8
93  if plotit
94  plot(x(ii),y(ii),'o','MarkerEdgeColor','k','MarkerSize',MarkerSize-2,'MarkerFaceColor',RGB(6,:),'LineWidth',1.5);
95  end
96  DefCount(ii+1,8)= DefCount(ii+1,8) +1;
97  end
98  end
99 end
101 
102 end
tuple dx
Definition: en.py:59
vtxLost idx
Definition: loadVtx.m:15
% Calculate delaunay triangulation
def plot(par)
Definition: plot.py:218
ylabel(' $y$(m)', 'Interpreter', 'latex') % Defect marker size MarkerSize
figure
Definition: GPE_2d.m:5
and for which the defects will be % considered This can be used to avoid defects that arise naturally from % the edge of the triangulation % h is a handle for generated plot % DefCount is a vector of the total number of defects counted for each % type with the index representing the number of connected edges % some useful colours RGB
% Rescale values to be centred on zero
end % Loop over vortices and check the number of edges per index
and extended by(Dr?) Lee James O 'Riordan. % Ek
end % idx is for time
elseif length(DT.vertexAttachments{ii})
def delaunay(dataName, dataType, value)
Definition: vis.py:76
Latin Modern axis square
end if sqrt(sum([x(ii), y(ii)].^ 2))< radius %% ignore edges if(length(DT.vertexAttachments
end % Calculate all n choose k pairings of points
Definition: g6_struct.m:16
with(5, 7)(3
end MarkerSize
tic for a
Definition: GPE_2d.m:90
if plotit triplot(DT, 'color', [0.6 0.6 0.6], 'LineWidth', 2)
% 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
% Calculate delaunay and setup figure DT
% axis([1e4 1e7 5e-18 1e-10])
% Rescale values to be centred on and in meters x
% If at least one of the indices is
Definition: plot.py:1
end end end DefCount
hold on
end % Loop over vortices and check the number of edges per and place % appropriate marker for jj
id no()
Y Y range of points % radius
Definition: psi6.m:1
% Indexing needs to % be modified if you wish to use the ordered data sets % Calculate the Voronoi diagram of the resulting and plot with the % chosen color scheme The local orientational correlations are returned % as and arr holds the values of the cell color scheme quantity edges
Definition: VtxCorr.m:39
xlabel(' $x$(m)', 'Interpreter', 'latex')
end % idx is for idx is for type for ii
dimSize
Definition: quKineticSpec.m:73