Skip to content

Commit

Permalink
Promote A1,A2 to ComplexF32 and use as A3,A4
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-sadeghi committed Oct 28, 2023
1 parent 77bfaf1 commit e1dd64e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/basictests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ x1 = zero(b);
A2 = A / 2;
b2 = rand(n);
x2 = zero(b);
# Complex systems + mismatch types with eltype(tol)
A3 = (A .+ rand(n) .* im) .|> ComplexF32;
# Make sure A3 is posdef symmetric (some solvers require this, like CG)
A3 = A3 + A3' + 100 * I
b3 = rand(n) .|> ComplexF32;
x3 = zero(b) .|> ComplexF32;
# Complex systems + mismatched types with eltype(tol)
A3 = A1 .|> ComplexF32
b3 = b1 .|> ComplexF32
x3 = x1 .|> ComplexF32
# A4 is similar to A3; created to test cache reuse
A4 = A3 / 2;
b4 = b3 / 4 .|> ComplexF32;
x4 = zero(b) .|> ComplexF32;
A4 = A2 .|> ComplexF32
b4 = b2 .|> ComplexF32
x4 = x2 .|> ComplexF32

prob1 = LinearProblem(A1, b1; u0 = x1)
prob2 = LinearProblem(A2, b2; u0 = x2)
Expand Down

0 comments on commit e1dd64e

Please sign in to comment.