From 055ca7ddc9177fc5cab20a669d02ed26c2f33e13 Mon Sep 17 00:00:00 2001 From: Karthik Date: Tue, 29 Apr 2025 22:11:29 +0200 Subject: [PATCH] FULLY WORKING VERSION ACHIEVED - fixed all remaining bugs, adjusted parameters for heavy ball method. Both now return density modulated states similar to Santo Roccuzzo's result. --- Dipolar-Gas-Simulator/+Scripts/run_locally.m | 2 +- .../+Simulator/@DipolarGas/runGradientDescent.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dipolar-Gas-Simulator/+Scripts/run_locally.m b/Dipolar-Gas-Simulator/+Scripts/run_locally.m index 945e7ad..c701d08 100644 --- a/Dipolar-Gas-Simulator/+Scripts/run_locally.m +++ b/Dipolar-Gas-Simulator/+Scripts/run_locally.m @@ -20,7 +20,7 @@ OptionsStruct.UseApproximationForLHY = true; OptionsStruct.IncludeDDICutOff = true; OptionsStruct.CutoffType = 'Cylindrical'; OptionsStruct.SimulationMode = 'EnergyMinimization'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution' | 'EnergyMinimization' -OptionsStruct.GradientDescentMethod = 'NonLinearCGD'; % 'HeavyBall' | 'NonLinearCGD' +OptionsStruct.GradientDescentMethod = 'HeavyBall'; % 'HeavyBall' | 'NonLinearCGD' OptionsStruct.MaxIterationsForGD = 2E5; OptionsStruct.TimeStepSize = 1E-4; % in s OptionsStruct.MinimumTimeStepSize = 2E-10; % in s diff --git a/Dipolar-Gas-Simulator/+Simulator/@DipolarGas/runGradientDescent.m b/Dipolar-Gas-Simulator/+Simulator/@DipolarGas/runGradientDescent.m index 562c07b..8357c19 100644 --- a/Dipolar-Gas-Simulator/+Simulator/@DipolarGas/runGradientDescent.m +++ b/Dipolar-Gas-Simulator/+Simulator/@DipolarGas/runGradientDescent.m @@ -8,9 +8,9 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ) switch this.GradientDescentMethod case 'HeavyBall' % Convergence Criteria: - alpha = 1E-6; + alpha = 1E-3; beta = 0.9; - epsilon = 1E-8; + epsilon = 1E-6; Observ.residual = 1; Observ.res = 1;