Skip to content
Snippets Groups Projects
Commit a5ddef60 authored by Kostas Vilkelis's avatar Kostas Vilkelis :flamingo:
Browse files

remove dim from function arguments

parent 19eb7a51
No related branches found
No related tags found
1 merge request!3create solvers and interface modules
...@@ -78,7 +78,7 @@ def convolution(M1, M2): ...@@ -78,7 +78,7 @@ def convolution(M1, M2):
return V_output return V_output
def compute_mf(rho, H_int, dim): def compute_mf(rho, H_int):
""" """
Compute mean-field correction at self-consistent loop. Compute mean-field correction at self-consistent loop.
...@@ -96,6 +96,7 @@ def compute_mf(rho, H_int, dim): ...@@ -96,6 +96,7 @@ def compute_mf(rho, H_int, dim):
""" """
nk = rho.shape[0] nk = rho.shape[0]
dim = len(rho.shape) - 2
if dim > 0: if dim > 0:
H0_int = H_int[*([0]*dim)] H0_int = H_int[*([0]*dim)]
...@@ -154,6 +155,5 @@ def updated_matrices(mf_k, model): ...@@ -154,6 +155,5 @@ def updated_matrices(mf_k, model):
rho = density_matrix(vals=vals, vecs=vecs, E_F=E_F, dim=model.dim) rho = density_matrix(vals=vals, vecs=vecs, E_F=E_F, dim=model.dim)
return rho, compute_mf( return rho, compute_mf(
rho=rho, rho=rho,
H_int=model.H_int, H_int=model.H_int) - E_F * np.eye(model.hamiltonians_0.shape[-1])
dim=model.dim) - E_F * np.eye(model.hamiltonians_0.shape[-1])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment