@@ -69,6 +69,21 @@ if Int == Int64
69
69
test_linear_solver (ps, A, b, x)
70
70
end
71
71
72
+ I = Vector {Int32} (); J = Vector {Int32} (); V = Vector {Complex{Float64}} ()
73
+ for (ik, jk, vk) in zip (I_,J_,V_)
74
+ push_coo! (SparseMatrixCSC,I,J,V,ik,jk,vk)
75
+ end
76
+ finalize_coo! (SparseMatrixCSC,I,J,V,rows, cols)
77
+ A = sparse (I,J,V,rows,cols)
78
+ b = ones (Complex{Float64},size (A)[2 ])
79
+ x = similar (b)
80
+ ps = PardisoSolver (msglvl= GridapPardiso. MSGLVL_VERBOSE)
81
+ ss = symbolic_setup (ps, A)
82
+ ns = numerical_setup (ss, A)
83
+ solve! (x, ns, b)
84
+ @test maximum (abs .(A* x- b)) < tol
85
+ test_linear_solver (ps, A, b, x)
86
+
72
87
# ####################################################
73
88
# SparseMatrixCSR
74
89
# ####################################################
@@ -130,6 +145,21 @@ for Bi in (0,1)
130
145
@test maximum (abs .(A* x- b)) < tol
131
146
test_linear_solver (ps, A, b, x)
132
147
end
148
+
149
+ I = Vector {Int32} (); J = Vector {Int32} (); V = Vector {Complex{Float64}} ()
150
+ for (ik, jk, vk) in zip (I_,J_,V_)
151
+ push_coo! (SparseMatrixCSR,I,J,V,ik,jk,vk)
152
+ end
153
+ finalize_coo! (SparseMatrixCSR,I,J,V,rows,cols)
154
+ A = sparsecsr (Val {Bi} (),I,J,V,rows,cols)
155
+ b = ones (Complex{Float64},size (A)[2 ])
156
+ x = similar (b)
157
+ ps = PardisoSolver (msglvl= GridapPardiso. MSGLVL_VERBOSE)
158
+ ss = symbolic_setup (ps, A)
159
+ ns = numerical_setup (ss, A)
160
+ solve! (x, ns, b)
161
+ @test maximum (abs .(A* x- b)) < tol
162
+ test_linear_solver (ps, A, b, x)
133
163
end
134
164
135
165
# ####################################################
@@ -197,6 +227,22 @@ for Bi in (0,1)
197
227
@test maximum (abs .(A* x- b)) < tol
198
228
test_linear_solver (ps, A, b, x)
199
229
end
230
+
231
+ I = Vector {Int32} (); J = Vector {Int32} (); V = Vector {Complex{Float64}} ()
232
+ for (ik, jk, vk) in zip (I_,J_,V_)
233
+ push_coo! (SymSparseMatrixCSR,I,J,V,ik,jk,vk)
234
+ end
235
+ finalize_coo! (SymSparseMatrixCSR,I,J,V,rows,cols)
236
+ A = symsparsecsr (Val {Bi} (),I,J,V,rows,cols)
237
+ b = ones (Complex{Float64},size (A)[2 ])
238
+ x = similar (b)
239
+ ps = PardisoSolver (msglvl= GridapPardiso. MSGLVL_VERBOSE)
240
+ ss = symbolic_setup (ps, A)
241
+ ns = numerical_setup (ss, A)
242
+ solve! (x, ns, b)
243
+ @test maximum (abs .(A* x- b)) < tol
244
+ test_linear_solver (ps, A, b, x)
245
+
200
246
end
201
247
202
248
end
0 commit comments