Minor mods
This commit is contained in:
parent
5068491cc8
commit
0f3a261973
@ -3,6 +3,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
|||||||
format long;
|
format long;
|
||||||
|
|
||||||
AdditionalParams.GradientDescentMethod = this.GradientDescentMethod;
|
AdditionalParams.GradientDescentMethod = this.GradientDescentMethod;
|
||||||
|
SimulationMode = this.SimulationMode;
|
||||||
|
|
||||||
switch this.GradientDescentMethod
|
switch this.GradientDescentMethod
|
||||||
case 'HeavyBall'
|
case 'HeavyBall'
|
||||||
@ -17,7 +18,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
|||||||
|
|
||||||
% Live Plotter
|
% Live Plotter
|
||||||
if this.PlotLive
|
if this.PlotLive
|
||||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||||
drawnow
|
drawnow
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -63,7 +64,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
|||||||
Observ.res_idx = Observ.res_idx + 1;
|
Observ.res_idx = Observ.res_idx + 1;
|
||||||
|
|
||||||
if this.PlotLive
|
if this.PlotLive
|
||||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||||
drawnow
|
drawnow
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -84,9 +85,8 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
|||||||
E = this.Calculator.calculateTotalEnergy(psi,Params,Transf,VDk,V) / Norm;
|
E = this.Calculator.calculateTotalEnergy(psi,Params,Transf,VDk,V) / Norm;
|
||||||
Observ.EVec = [Observ.EVec E];
|
Observ.EVec = [Observ.EVec E];
|
||||||
|
|
||||||
disp('Saving data...');
|
|
||||||
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs.mat'),Params.njob),'psi','muchem','Observ','Transf','Params','VDk','V');
|
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs.mat'),Params.njob),'psi','muchem','Observ','Transf','Params','VDk','V');
|
||||||
disp('Save complete!');
|
disp('Completed and saved!');
|
||||||
|
|
||||||
case 'NonLinearCGD'
|
case 'NonLinearCGD'
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
|||||||
|
|
||||||
% Live plotter
|
% Live plotter
|
||||||
if this.PlotLive
|
if this.PlotLive
|
||||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||||
drawnow
|
drawnow
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
|||||||
|
|
||||||
% Live plotter
|
% Live plotter
|
||||||
if this.PlotLive
|
if this.PlotLive
|
||||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||||
drawnow
|
drawnow
|
||||||
end
|
end
|
||||||
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs.mat'),Params.njob),'psi','muchem','Observ','Transf','Params','VDk','V');
|
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs.mat'),Params.njob),'psi','muchem','Observ','Transf','Params','VDk','V');
|
||||||
|
Loading…
Reference in New Issue
Block a user