Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with new ritz values in 1:nlock range #117

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function _partialschur(A, ::Type{T}, mindim::Int, maxdim::Int, nev::Int, tol::Tt
# Update the Ritz values
copyto!(ritz.ord, OneTo(maxdim))
copy_eigenvalues!(ritz.λs, H)
copy_residuals!(ritz.rs, H, Q, H[maxdim+1,maxdim], x, active:maxdim)
copy_residuals!(ritz.rs, H, Q, H[maxdim+1,maxdim], x, 1:maxdim)

# Create a permutation that sorts Ritz values from most wanted to least wanted
sort!(ritz.ord, 1, maxdim, QuickSort, OrderPerm(ritz.λs, ordering))
Expand All @@ -222,7 +222,7 @@ function _partialschur(A, ::Type{T}, mindim::Int, maxdim::Int, nev::Int, tol::Tt
effective_nev = include_conjugate_pair(T, ritz, nev)

# Partition in converged & not converged.
first_not_conv_idx = partition!(isconverged, ritz.ord, active:effective_nev)
first_not_conv_idx = partition!(isconverged, ritz.ord, 1:effective_nev)

# Now ritz.ord[1:nlock] are converged eigenvalues that we want to lock, and
# nlock ≤ effective_nev, so it's really just these that we are after!
Expand Down
Loading