-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimes_script.m
More file actions
48 lines (35 loc) · 1007 Bytes
/
Times_script.m
File metadata and controls
48 lines (35 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Times plotting
clear
close all
clc
PSI_128 = load('Data/Stirred_grid_128');
PSI_256 = load('Data/Stirred_grid_256');
PSI_512 = load('Data/Stirred_grid_512');
PSI_1024 = load('Data/Stirred_grid_1024');
PSI = PSI_1024.PSI;
tstart1 = tic;
Plaquette_Vortex_Grid = fPlaquette(PSI);
Plaquette_time = toc(tstart1);
length = size(PSI);
Points = length(1);
Range = 150;
DeltaX = Range/Points;
x = linspace(-Range/2,Range/2 - DeltaX,Points);
[X,Y] = meshgrid(x,x);
dk = (2*pi)/Range;
kmax = (2*pi)/(DeltaX);
k = (-kmax/2:dk:kmax/2 -dk);
[Kx,Ky] = meshgrid(k,k);
Kx = fftshift(Kx);
Ky = fftshift(Ky);
r2 = X.^2 + Y.^2;
Thomas_Fermi = 20; % This number is an educated guess
Vtrap = 1/2 * r2 / Thomas_Fermi^2;
tstart2 = tic;
Nordic_Vortex_Grid = fNordic(PSI,Vtrap, Kx, Ky);
Nordic_time = toc(tstart2);
tstart3 = tic;
Otago_Vortex_Grid = fOtago(PSI);
Otago_time = toc(tstart3);
Counting_Time = [Plaquette_time,Nordic_time,Otago_time]
save(['./Data/Times_Grid_' num2str(Points) '.mat'],'Counting_Time');