2 %This
function is used to process
a large number of wavefunctions to examine
3 %the kinetic energy spectra. I
'd love to port these to CUDA, but time is a 4 %precious resource that I have little of right now 5 % wfc_str is the string of the wavefunction name. For time-ev this is 6 % usually wfc_ev; wfc_0_const or wfc_0_ramp for ground-states 7 % dimSize is a vector with the dimenion size, so that the wavefunctions 8 % can be appropriately reshaped when loaded 9 % dx is the increment along x. dx==dy 10 % qSpec enables classical (0) or quantum (1) variant of energy spectra 11 % init,incr,fin are the loop values for specifiying the range of the data 13 %Load initial wavefunction to setup grid 14 wfc = reshape(load([wfc_str,'_
',int2str(0)]) + 1i*load([wfc_str,'i_
',int2str(0)]),dimSize(1),dimSize(2)); 15 [~,~,EKc,EKi,k_bin] = quKineticSpec(wfc,mass,dx,qSpec,1,0); 17 wfc = reshape(load([wfc_str,'_
',int2str(ii)]) + 1i*load([wfc_str,'i_
',int2str(ii)]),dimSize(1),dimSize(2)); 18 [~,~,ekc,eki,~] = quKineticSpec(wfc,mass,dx,qSpec,1,ii); 19 EKc=vertcat(EKc,ekc);EKi=vertcat(EKi,eki); %Prealloc may improve speed here
int init(Grid &par)
Initializes data structures.
% If at least one of the indices is