diff --git a/Dipolar Gas Simulator/+Scripts/test.m b/Dipolar Gas Simulator/+Scripts/test.m index a828fe5..a00acea 100644 --- a/Dipolar Gas Simulator/+Scripts/test.m +++ b/Dipolar Gas Simulator/+Scripts/test.m @@ -21,7 +21,7 @@ OptionsStruct.Dimensions = [40, 40, 20]; OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' OptionsStruct.TimeStepSize = 50E-6; % in s -OptionsStruct.NumberOfTimeSteps = 10; % in s +OptionsStruct.NumberOfTimeSteps = 100; % in s OptionsStruct.EnergyTolerance = 5E-10; OptionsStruct.SaveData = true; diff --git a/Dipolar Gas Simulator/+Simulator/@DipolarGas/propagateWavefunction.m b/Dipolar Gas Simulator/+Simulator/@DipolarGas/propagateWavefunction.m index b2907de..edf232f 100644 --- a/Dipolar Gas Simulator/+Simulator/@DipolarGas/propagateWavefunction.m +++ b/Dipolar Gas Simulator/+Simulator/@DipolarGas/propagateWavefunction.m @@ -17,8 +17,6 @@ function [psi] = propagateWavefunction(this,psi,Params,Transf,VDk,V,t_idx,Observ while t_idx < Params.sim_time_cut_off - pb.run(t_idx); - %kin psi = fftn(psi); psi = psi.*exp(-0.5*1i*dt*KEop); @@ -81,6 +79,7 @@ function [psi] = propagateWavefunction(this,psi,Params,Transf,VDk,V,t_idx,Observ break end t_idx=t_idx+1; + pb.run(100*t_idx/Params.sim_time_cut_off); end %Change in Energy @@ -93,8 +92,11 @@ function [psi] = propagateWavefunction(this,psi,Params,Transf,VDk,V,t_idx,Observ Observ.PCVec = [Observ.PCVec PhaseC]; Observ.res_idx = Observ.res_idx + 1; + + pb.run(' - Job Completed!'); + disp('Saving data...'); save(sprintf('./Data/Run_%03i/psi_gs.mat',Params.njob),'psi','muchem','Observ','t_idx','Transf','Params','VDk','V'); - pb.run(' - Job Completed!\n'); + disp('Save complete!'); case 'RealTimeEvolution' @@ -109,8 +111,6 @@ function [psi] = propagateWavefunction(this,psi,Params,Transf,VDk,V,t_idx,Observ while t_idx < Params.sim_time_cut_off - pb.run(t_idx); - % Parameters at time t %kin @@ -156,6 +156,7 @@ function [psi] = propagateWavefunction(this,psi,Params,Transf,VDk,V,t_idx,Observ break end t_idx=t_idx+1; + pb.run(100*t_idx/Params.sim_time_cut_off); end %Change in Normalization @@ -172,10 +173,12 @@ function [psi] = propagateWavefunction(this,psi,Params,Transf,VDk,V,t_idx,Observ Observ.PCVec = [Observ.PCVec PhaseC]; Observ.tVecPlot = [Observ.tVecPlot tVal]; - Observ.res_idx = Observ.res_idx + 1; + + pb.run(' - Job Completed!'); + disp('Saving data...'); save(sprintf('./Data/Run_%03i/TimeEvolution/psi_%i.mat',Params.njob,Observ.res_idx),'psi','muchem','Observ','t_idx'); - pb.run(' - Job Completed!\n'); + disp('Save complete!'); otherwise disp('Choose a valid DDI cutoff type!')