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

15 lines
546 B
Matlab

function [psi,V,VDk] = initialize(this,Params,VParams,Transf)
% == User-defined potential == %
V = this.Potential;
assert(~anynan(V), 'Potential not defined! Specify as <SimulatorObject>.Potential = <PotentialsObject>.trap() + <AdditionalTerms>.');
% == Calculating the DDIs == %
VDk = this.Calculator.calculateVDkWithCutoff(Transf, Params, VParams.ell);
% == Setting up the initial wavefunction == %
psi = this.setupWavefunction(Params,Transf);
if this.RunOnGPU
psi = gpuArray(psi);
end
end