function [psi,V,VDk] = initialize(this,Params,VParams,Transf) % == User-defined potential == % V = this.Potential; assert(~anynan(V), 'Potential not defined! Specify as .Potential = .trap() + .'); % == Calculating the DDIs == % if isfile(strcat(this.SaveDirectory, '/VDk_M.mat')) VDk = load(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat'))); VDk = VDk.VDk; else VDk = this.Calculator.calculateVDkWithCutoff(Transf, Params, VParams); save(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')),'VDk'); fprintf('Computed and saved DDI potential in Fourier space with cutoff.\n') end % == Setting up the initial wavefunction == % psi = this.setupWavefunction(Params,Transf); if this.RunOnGPU psi = gpuArray(psi); end end