File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 5353 # @test norm(A * x - b) / norm(b) ≤ reltol
5454end
5555
56+ @testset " Block Creation {$T }" for T in (Float32, Float64, ComplexF32, ComplexF64)
57+ # Guaranteed to create blocks during Lanczos process
58+ # This satisfies the condition that in the V-W sequence, the first
59+ # iterates are orthogonal: <Av - v<A, v>, Atv - v<At, v>> under transpose inner product
60+ dl = fill (one (T), n- 1 )
61+ du = fill (one (T), n- 1 )
62+ d = fill (one (T), n)
63+ dl[1 ] = - 1
64+ A = Tridiagonal (dl, d, du)
65+ b = fill (zero (T), n)
66+ b[2 ] = 1.0
67+
68+ reltol = √ eps (real (T))
69+
70+ x, history = lalqmr (A, b, log = true )
71+ @test norm (A * x - b) / norm (b) ≤ reltol
72+ end
73+
5674@testset " Linear operator defined as a function" begin
5775 A = LinearMap (cumsum!, 100 ; ismutating= true )
5876 b = rand (100 )
You can’t perform that action at this time.
0 commit comments