Calculations/Dipolar Gas Simulator/+Simulator/@DipolarGas/initialize.m

22 lines
637 B
Mathematica
Raw Normal View History

2024-06-13 02:02:44 +02:00
function [psi,V,VDk] = initialize(this,calcObj,Params,Transf,TransfRad)
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')));
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');
end
disp('Finished DDI')
% == Setting up the initial wavefunction == %
2024-06-13 02:02:44 +02:00
psi = this.setupWavefunction(Params,Transf);
end