2024-06-13 02:02:44 +02:00
|
|
|
function [psi,V,VDk] = initialize(this,calcObj,Params,Transf,TransfRad)
|
2024-06-12 19:09:15 +02:00
|
|
|
|
|
|
|
format long
|
|
|
|
X = Transf.X; Y = Transf.Y; Z = Transf.Z;
|
|
|
|
|
|
|
|
% == Trap potential == %
|
|
|
|
V = 0.5*(Params.gx.*X.^2+Params.gy.*Y.^2+Params.gz*Z.^2);
|
|
|
|
|
|
|
|
% == Calculating the DDIs == %
|
2024-06-12 20:05:27 +02:00
|
|
|
if isfile(strcat(this.SaveDirectory, '/VDk_M.mat'))
|
|
|
|
VDk = load(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')));
|
2024-06-12 19:09:15 +02:00
|
|
|
VDk = VDk.VDk;
|
|
|
|
else
|
2024-06-13 02:02:44 +02:00
|
|
|
VDk = calcObj.calculateVDCutoff(Params,Transf,TransfRad);
|
2024-06-12 20:05:27 +02:00
|
|
|
save(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')),'VDk');
|
2024-06-12 19:09:15 +02:00
|
|
|
end
|
2024-06-13 11:30:12 +02:00
|
|
|
fprintf('Computed and saved DDI potential in Fourier space with %s cutoff.', calcObj.CutoffType)
|
2024-06-12 19:09:15 +02:00
|
|
|
|
|
|
|
% == Setting up the initial wavefunction == %
|
2024-06-13 02:02:44 +02:00
|
|
|
psi = this.setupWavefunction(Params,Transf);
|
2024-06-12 19:09:15 +02:00
|
|
|
|
|
|
|
end
|