Skip to content

Commit

Permalink
make krylovdim to large, test detection; bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Jun 18, 2020
1 parent 7c16322 commit 31bf207
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "KrylovKit"
uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
authors = ["Jutho Haegeman"]
version = "0.5.0"
version = "0.5.1"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 1 addition & 1 deletion src/matrixfun/expintegrator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function expintegrator(A, t::Number, u::Tuple, alg::Union{Lanczos,Arnoldi})
K = length(fact)
V = basis(fact)

if K == krylovdim || β <= tol
if K == krylovdim || normres(fact) <= η
Δτ = min(Δτ, τ-τ₀)

# Small matrix exponential and error estimation
Expand Down
4 changes: 2 additions & 2 deletions test/eigsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
A = rand(T,(n,n)) .- one(T)/2
A = (A+A')/2
v = rand(T,(n,))
alg = Lanczos(orth = orth, krylovdim = n, maxiter = 1, tol = 10*n*eps(real(T)))
alg = Lanczos(orth = orth, krylovdim = 2*n, maxiter = 1, tol = 10*n*eps(real(T)))
n1 = div(n,2)
D1, V1, info = eigsolve(wrapop(A), wrapvec(v), n1, :SR; orth = orth, krylovdim = n, maxiter = 1, tol = 10*n*eps(real(T)))
@test KrylovKit.eigselector(A, eltype(v); orth = orth, krylovdim = n, maxiter = 1, tol = 10*n*eps(real(T))) isa Lanczos
Expand Down Expand Up @@ -59,7 +59,7 @@ end
@testset for orth in (cgs2, mgs2, cgsr, mgsr)
A = rand(T,(n,n)) .- one(T)/2
v = rand(T,(n,))
alg = Arnoldi(orth = orth, krylovdim = n, maxiter = 1, tol = 10*n*eps(real(T)))
alg = Arnoldi(orth = orth, krylovdim = 2*n, maxiter = 1, tol = 10*n*eps(real(T)))
n1 = div(n,2)
D1, V1, info1 = eigsolve(wrapop(A), wrapvec(v), n1, :SR; orth = orth, krylovdim = n, maxiter = 1, tol = 10*n*eps(real(T)))
@test KrylovKit.eigselector(A, eltype(v); orth = orth, krylovdim = n, maxiter = 1, tol = 10*n*eps(real(T))) isa Arnoldi
Expand Down
4 changes: 2 additions & 2 deletions test/factorize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@test V'*V I
@test A*V V*H

@inferred initialize!(iter, deepcopy(fact); verbosity = 1, krylovdim = 2*n)
@inferred initialize!(iter, deepcopy(fact); verbosity = 1)
states = collect(Iterators.take(iter, n)) # collect tests size and eltype?
@test rayleighquotient(last(states)) H
end
Expand All @@ -43,7 +43,7 @@ end
@test V'*V I
@test A*V V*H

@inferred initialize!(iter, deepcopy(fact); verbosity = 1, krylovdim = 2*n)
@inferred initialize!(iter, deepcopy(fact); verbosity = 1)
states = collect(Iterators.take(iter, n)) # collect tests size and eltype?
@test rayleighquotient(last(states)) H
end
Expand Down
2 changes: 1 addition & 1 deletion test/svdsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@testset for T in (Float32, Float64, ComplexF32, ComplexF64)
@testset for orth in (cgs2, mgs2, cgsr, mgsr)
A = rand(T, (n,n))
alg = GKL(orth = orth, krylovdim = n, maxiter = 1, tol = 10*n*eps(real(T)))
alg = GKL(orth = orth, krylovdim = 2*n, maxiter = 1, tol = 10*n*eps(real(T)))
S, lvecs, rvecs, info = @inferred svdsolve(wrapop(A), wrapvec(A[:,1]), n, :LR, alg)

@test S svdvals(A)
Expand Down

2 comments on commit 31bf207

@Jutho
Copy link
Owner Author

@Jutho Jutho commented on 31bf207 Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/16618

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" 31bf207b52b9d3f57fc2fcd723c5ce2dcde7dea6
git push origin v0.5.1

Please sign in to comment.