From db398fe775f9212cfdd5c7a3f83b4cad4976b331 Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Fri, 22 Nov 2024 16:31:49 +0100 Subject: [PATCH] Added comments to explain the code. --- .../+BdGSolver2D/solveBogoliubovdeGennesIn2D.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dipolar-Gas-Simulator/+BdGSolver2D/solveBogoliubovdeGennesIn2D.m b/Dipolar-Gas-Simulator/+BdGSolver2D/solveBogoliubovdeGennesIn2D.m index e68a59d..59df0a6 100644 --- a/Dipolar-Gas-Simulator/+BdGSolver2D/solveBogoliubovdeGennesIn2D.m +++ b/Dipolar-Gas-Simulator/+BdGSolver2D/solveBogoliubovdeGennesIn2D.m @@ -1,6 +1,6 @@ function [evals, modes] = solveBogoliubovdeGennesIn2D(psi, Params, VDk, VParams, Transf, muchem) - -Size = length(psi(:)); % 2-D matrix will be unwrapped and the corresponding matrix of (N^2)^2 elements solved for. +% 2-D matrix will be unravelled to a single column vector and the corresponding BdG matrix of (N^2)^2 elements solved for. +Size = length(psi(:)); Neigs = length(psi(:)); opts.tol = 1e-16; opts.disp = 1; @@ -8,8 +8,8 @@ opts.issym = 0; opts.isreal = 1; opts.maxit = 1e4; -BdGVec = @(g) BdGSolver2D.BdGMatrix(g, psi, Params, VDk, VParams, Transf, muchem); - +BdGVec = @(g) BdGSolver2D.BdGMatrix(g, psi, Params, VDk, VParams, Transf, muchem); % This function takes a column vector as input and returns a + % matrix-vector product which is also a column vector [g,D] = eigs(BdGVec,Size,Neigs,'sr',opts); evals = diag(D); clear D;