Commit 1c229b97 authored by Anton Akhmerov's avatar Anton Akhmerov Committed by Christoph Groth
Browse files

solvers.sparse: stop multiplying by an invertible matrix

parent 3b678b2b
......@@ -176,9 +176,9 @@ def make_linear_sys(sys, out_leads, in_leads, energy=0,
u_out))
lead_mat = - ulinv_out
else:
v_sp = sp.csc_matrix(v) * tmp
v_sp = tmp
vdaguout_sp = tmp.T * sp.csr_matrix(np.dot(v.T.conj(), u_out))
lead_mat = - np.dot(v, ulinv_out)
lead_mat = - ulinv_out
h_sys = sp.bmat([[h_sys, vdaguout_sp], [v_sp, lead_mat]])
......@@ -190,7 +190,7 @@ def make_linear_sys(sys, out_leads, in_leads, energy=0,
else:
vdaguin_sp = tmp.T * sp.csr_matrix(-np.dot(v.T.conj(),
u_in))
lead_mat_in = np.dot(v, ulinv_in)
lead_mat_in = ulinv_in
rhs.append(sp.bmat([[vdaguin_sp], [lead_mat_in]]))
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment