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

22 lines
504 B
Matlab

function [psi,V,VDk] = initialize(Params,Transf)
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 == %
if isfile('./Data/VDk_M.mat')
VDk = load(sprintf('./Data/VDk_M.mat'));
VDk = VDk.VDk;
else
VDk = VDCutoff(Params, Transf);
save(sprintf('./Data/VDk_M.mat'),'VDk');
end
disp('Finished DDI')
% == Setting up the initial wavefunction == %
psi = SetupWavefunction();
end