Skip to content

Commit

Permalink
expand the tests of the default algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Nov 24, 2021
1 parent c4f8ed5 commit 073a9c8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function SciMLBase.solve(cache::LinearCache, alg::AbstractFactorization)
cache = set_cacheval(cache, fact)
end

ldiv!(cache.u,cache.cacheval, cache.b)
ldiv!(cache.u, cache.cacheval, cache.b)
end

## LUFactorization
Expand Down
22 changes: 21 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using LinearSolve, LinearAlgebra
using LinearSolve, LinearAlgebra, SparseArrays
using Test

n = 8
Expand Down Expand Up @@ -38,6 +38,26 @@ end
A1 = prob1.A; b1 = prob1.b; x1 = prob1.u0
y = solve(prob1)
@test A1 * y b1

_prob = LinearProblem(SymTridiagonal(A1.A), b1; u0=x1)
y = solve(prob1)
@test A1 * y b1

_prob = LinearProblem(Tridiagonal(A1.A), b1; u0=x1)
y = solve(prob1)
@test A1 * y b1

_prob = LinearProblem(Symmetric(A1.A), b1; u0=x1)
y = solve(prob1)
@test A1 * y b1

_prob = LinearProblem(Hermitian(A1.A), b1; u0=x1)
y = solve(prob1)
@test A1 * y b1

_prob = LinearProblem(sparse(A1.A), b1; u0=x1)
y = solve(prob1)
@test A1 * y b1
end

@testset "Concrete Factorizations" begin
Expand Down

0 comments on commit 073a9c8

Please sign in to comment.