@@ -3,7 +3,7 @@ using Test
3
3
4
4
@testset " LinearSolve.jl" begin
5
5
using LinearAlgebra
6
- n = 32
6
+ n = 8
7
7
8
8
A = Matrix (I,n,n)
9
9
b = ones (n)
@@ -21,25 +21,26 @@ using Test
21
21
A3 = prob3. A; b3 = prob3. b; x3 = prob3. u0
22
22
23
23
@eval begin
24
- y = solve ($ prob1, $ alg ($ kwargs... ))
24
+ y = solve ($ prob1, $ alg (; $ kwargs... ))
25
25
@test $ A1 * y ≈ $ b1 # out of place
26
26
@test $ A1 * $ x1 ≈ $ b1 # in place
27
27
28
- y = $ alg ($ kwargs... )($ x2, $ A2, $ b2) # alg is callable
28
+ y = $ alg (; $ kwargs... )($ x2, $ A2, $ b2) # alg is callable
29
29
@test $ A2 * y ≈ $ b2
30
30
@test $ A2 * $ x2 ≈ $ b2
31
31
32
- cache = SciMLBase. init ($ prob1, $ alg ($ kwargs... )) # initialize cache
33
- y = cache ($ x3, $ A1, $ b1) # cache is callable
32
+ cache = SciMLBase. init ($ prob1, # initialize cache
33
+ $ alg (;$ kwargs... ))
34
+ y = cache ($ x3, $ A1, $ b1) # cache is callable
34
35
@test $ A1 * y ≈ $ b1
35
36
@test $ A1 * $ x3 ≈ $ b1
36
37
37
- y = cache ($ x3, $ A1, $ b2) # reuse factorization
38
+ y = cache ($ x3, $ A1, $ b2) # reuse factorization
38
39
@test $ A1 * y ≈ $ b2
39
40
@test $ A1 * $ x3 ≈ $ b2
40
41
41
- y = cache ($ x3, $ A2, $ b3) # new factorization
42
- @test $ A2 * y ≈ $ b3 # same old cache
42
+ y = cache ($ x3, $ A2, $ b3) # new factorization
43
+ @test $ A2 * y ≈ $ b3 # same old cache
43
44
@test $ A2 * $ x3 ≈ $ b3
44
45
end
45
46
@@ -57,7 +58,7 @@ using Test
57
58
end
58
59
59
60
# KrylovJL
60
- kwargs = :(verbose= 1 , abstol= 1e-1 , reltol= 1e-1 , maxiters = 3 , restart= 5 )
61
+ kwargs = :(verbose= 1 , abstol= 1e-1 , reltol= 1e-1 , maxiter = 3 , restart= 5 )
61
62
for alg in (
62
63
:KrylovJL ,
63
64
:KrylovJL_CG ,
@@ -69,7 +70,7 @@ using Test
69
70
end
70
71
71
72
# IterativeSolversJL
72
- kwargs = :(abstol= 1e-1 , reltol= 1e-1 , maxiters = 3 , restart= 5 )
73
+ kwargs = :(abstol= 1e-1 , reltol= 1e-1 , maxiter = 3 , restart= 5 )
73
74
for alg in (
74
75
:IterativeSolversJL ,
75
76
:IterativeSolversJL_CG ,
0 commit comments