Integration with LinearSolve.jl

Starting with version 0.9.6, ExtendableSparse is compatible with LinearSolve.jl. Since version 0.9.7, this is facilitated via the AbstractSparseMatrixCSC interface.

We can create a test problem and solve it with the \ operator.

A = fdrand(10, 10, 10; matrixtype = ExtendableSparseMatrix)
x = ones(1000)
b = A * x
y = A \ b
sum(y)
1000.0000000000002

The same problem can be solved by the tools available via LinearSolve.jl:

A = fdrand(10, 10, 10; matrixtype = ExtendableSparseMatrix)
x = ones(1000)
b = A * x
y = solve(LinearProblem(A, b), SparspakFactorization()).u
sum(y)
1000.0

Also, the iterative method interface works with ExtendableSparse.

A = fdrand(10, 10, 10; matrixtype = ExtendableSparseMatrix)
x = ones(1000)
b = A * x
y = LinearSolve.solve(LinearProblem(A, b), KrylovJL_CG();
                      Pl = ILUZero.ilu0(SparseMatrixCSC(A))).u
sum(y)
999.999999988474

However, ExtendableSparse provides a number of wrappers around preconditioners from various Julia packages.

A = fdrand(10, 10, 10; matrixtype = ExtendableSparseMatrix)
x = ones(1000)
b = A * x
y = LinearSolve.solve(LinearProblem(A, b), KrylovJL_CG();
                      Pl = ILUZeroPreconditioner(A)).u
sum(y)
1000.0000000147089