Skip to content

Commit e1dd64e

Browse files
committed
Promote A1,A2 to ComplexF32 and use as A3,A4
1 parent 77bfaf1 commit e1dd64e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

test/basictests.jl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@ x1 = zero(b);
1717
A2 = A / 2;
1818
b2 = rand(n);
1919
x2 = zero(b);
20-
# Complex systems + mismatch types with eltype(tol)
21-
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
24-
b3 = rand(n) .|> ComplexF32;
25-
x3 = zero(b) .|> ComplexF32;
20+
# Complex systems + mismatched types with eltype(tol)
21+
A3 = A1 .|> ComplexF32
22+
b3 = b1 .|> ComplexF32
23+
x3 = x1 .|> ComplexF32
2624
# A4 is similar to A3; created to test cache reuse
27-
A4 = A3 / 2;
28-
b4 = b3 / 4 .|> ComplexF32;
29-
x4 = zero(b) .|> ComplexF32;
25+
A4 = A2 .|> ComplexF32
26+
b4 = b2 .|> ComplexF32
27+
x4 = x2 .|> ComplexF32
3028

3129
prob1 = LinearProblem(A1, b1; u0 = x1)
3230
prob2 = LinearProblem(A2, b2; u0 = x2)

0 commit comments

Comments
 (0)