Skip to content

Commit aa1904e

Browse files
committed
Ensure test cases are symmetric (required by solvers like CG)
1 parent 59268fc commit aa1904e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/basictests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ b2 = rand(n);
1919
x2 = zero(b);
2020
# Complex systems + mismatch types with eltype(tol)
2121
A3 = (A .+ rand(n) .* im) .|> ComplexF32;
22+
# Make sure A3 is posdef symmetric (some solvers require this, like CG)
23+
A3 = A3 + A3' + 100 * I
2224
b3 = rand(n) .|> ComplexF32;
2325
x3 = zero(b) .|> ComplexF32;
2426
# A4 is similar to A3; created to test cache reuse
25-
A4 = (A .+ rand(n) .* im) .|> ComplexF32;
27+
A4 = A3 / 2;
2628
b4 = b3 / 4 .|> ComplexF32;
2729
x4 = zero(b) .|> ComplexF32;
2830

0 commit comments

Comments
 (0)