GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
g6_struct.m
Go to the documentation of this file.
1 function [g6C] = g6_struct(X,Y,rad)
2 %Determine the orientational correlation function between every pairing of
3 %points, and sorts the results based on distance between points. This gives
4 %g6(r).
5 % X,Y: Vectors of x,y values for points.
6 % rad: Radius in which to examine for neighbouring points.
7 %Return:
8 % g6C: Matrix of g6 values and parameters
9 
10 %Determine all orientational order values for points
11 psi6p = zeros(length(X),1);
12 for ii=1:length(X)
13  psi6p(ii) = psi6([X(ii),Y(ii)],X,Y,rad);
14 end
15 
16 %Calculate all n choose k pairings of points, and give distance between
17 %them, values for the respective orientational orders, and g6 values. Sort
18 %the values based on separated distance
19 S = uniqPairIdx_precalc([X,Y],psi6p);
20 [~,order] = sort([S(:).rabs],'ascend');
21 SSorted = S(order);
22 
23 %Create output structure for next stage of calculation
24 for ii=1:size(SSorted,2)
25  g6S(ii).r = SSorted(ii).rabs;
26  psi6_1 = SSorted(ii).cor0;
27  psi6_2 = SSorted(ii).cor1;
28  g6S(ii).val = abs(conj(psi6_1)*conj(psi6_1));
29 end
30 g6C = cell2mat(squeeze(struct2cell(g6S)));
31 end
and sorts the results based on distance between points This gives % g6(r). % X
and sorts the results based on distance between points This gives % Y
Definition: g6_struct.m:5
psi6_2
Definition: g6_struct.m:27
__global__ void zeros(double *field, int n)
Creates a field of all zeros ,.
end % Calculate all n choose k pairings of points
Definition: g6_struct.m:16
end % Calculate all n choose k pairings of and give distance between % values for the respective orientational orders
Definition: g6_struct.m:16
psi6_1
Definition: g6_struct.m:26
end % Calculate all n choose k pairings of and give distance between % them
Definition: g6_struct.m:16
g6S(ii).val
int val
Definition: vort.py:104
SSorted
Definition: g6_struct.m:21
end % Calculate all n choose k pairings of and give distance between % values for the respective orientational and g6 values Sort % the values based on separated distance S
Definition: g6_struct.m:19
X
Definition: en.py:69
r
Definition: vort.py:64
and sorts the results based on distance between points This gives % y values for points % rad
Definition: g6_struct.m:5
next
Definition: vort.py:44
hold on
end k
and sorts the results based on distance between points This gives % y values for points % for ii
Definition: g6_struct.m:12
double2 conj(double2 c)
Calculates complex conjugate.
end g6C
Definition: g6_struct.m:30
length
Definition: vort.py:75