Commit 6a9891c7 authored by Alessandro 's avatar Alessandro

uwLinAlg deleted and performance improvement in juobs_linalg.jl

parent dbb425c4
......@@ -117,12 +117,13 @@ The columns of such matrix are the eigenvectors associated with eigenvalues eval
The keyword iter, set by default to 30, selects the number of iterations of the qr algorithm before stopping.
"""
function uwgevp_tot(mat_list::Vector{Matrix}, tnot::Int64; iter::Int64 = 30, evec::Bool = false)
c_inv = invert(mat_list[tnot])
if !evec
aux_evals = uwgevp.(mat_list, c_tnot=mat_list[tnot], iter = iter)
aux_evals = uwgevp.(mat_list, c_tnot_inv=c_inv, iter = iter)
evals = get_diag.(aux_evals)
return evals
else
aux_evals, aux_evec = uwgevp.(mat_list, c_tnot=mat_list[tnot], iter = iter, evec= true)
aux_evals, aux_evec = uwgevp.(mat_list, c_tnot_inv=c_inv, iter = iter, evec= true)
evals = get_diag.(aux_evals)
evecs = aux_evec
return evals, evecs
......@@ -139,8 +140,7 @@ C(t)V = C(t_0)D V, where V is the eigenvector matrix and D is the diagonal matri
If evec = true also the eigenvectors are returned as columns of the orthogonal matrix u.
The keyword iter, set by default to 30, selects the number of iterations of the qr algorithm before stopping.
"""
function uwgevp(c_t:: Matrix{uwreal}; c_tnot::Matrix{uwreal}, iter::Int64 = 30, evec::Bool = false)
c_tnot_inv = invert(c_tnot)
function uwgevp(c_t:: Matrix{uwreal}; c_tnot_inv::Matrix{uwreal}, iter::Int64 = 30, evec::Bool = false)
c = uwdot(c_tnot_inv, c_t) #matrix to diagonalize
return uwevp(c, iter = iter, evec = evec)
end
......
This diff is collapsed.
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