Skip to content

Commit 9d67671

Browse files
committed
increase tolerance for iterative methods
1 parent e44abad commit 9d67671

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/inversemap.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays, IterativeSolvers
1010
# Cholesky
1111
@test A \ b InverseMap(cholesky(A)) * b
1212
# Specify solver
13-
@test A \ b InverseMap(A; solver=IterativeSolvers.cg!) * b
13+
@test A \ b InverseMap(A; solver=IterativeSolvers.cg!) * b atol=1e-8
1414
# Composition with other maps
1515
@test A \ B * b InverseMap(lu(A)) * B * b
1616
# Composition: make sure solvers called with vector B * b and not matrix B
@@ -29,7 +29,7 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays, IterativeSolvers
2929
my_ldiv! = (y, A, x) -> copy!(y, A \ x)
3030
@test A \ b InverseMap(cholesky(A); solver=my_ldiv!) * b
3131
# Specify solver
32-
@test A \ b InverseMap(A; solver=IterativeSolvers.cg!) * b
32+
@test A \ b InverseMap(A; solver=IterativeSolvers.cg!) * b atol=1e-8
3333
# Composition with other maps
3434
@test A \ (B * b) InverseMap(lu(A)) * B * b
3535
# Composition: make sure solver is called with vector B * b and not matrix B
@@ -59,5 +59,5 @@ using Test, LinearMaps, LinearAlgebra, SparseArrays, IterativeSolvers
5959
U = IterativeSolvers.cg(M, F - B * P)
6060

6161
# Solve using standard method and compare
62-
@test [M B; B' 0I] \ [F; G] [U; P]
62+
@test [M B; B' 0I] \ [F; G] [U; P] atol=1e-8
6363
end

0 commit comments

Comments
 (0)