Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -861,8 +861,8 @@ patterns with “more structure”.
!!! note
By default, the SparseArrays.jl are implemented for efficiency by caching the
symbolic factorization. If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`.
If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid
symbolic factorization. If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`.
If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid
unnecessary recomputation. To further reduce computational overhead, you can disable
pattern checks entirely by setting `check_pattern = false`. Note that this may error
if the sparsity pattern does change unexpectedly.
Expand All @@ -887,8 +887,8 @@ A fast sparse LU-factorization which specializes on sparsity patterns with “le
!!! note
By default, the SparseArrays.jl are implemented for efficiency by caching the
symbolic factorization. If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`.
If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid
symbolic factorization. If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`.
If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid
unnecessary recomputation. To further reduce computational overhead, you can disable
pattern checks entirely by setting `check_pattern = false`. Note that this may error
if the sparsity pattern does change unexpectedly.
Expand Down
2 changes: 1 addition & 1 deletion src/simplegmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function SciMLBase.solve!(cache::SimpleGMRESCache{false}, lincache::LinearCache)
# [cₖ sₖ] [ r̄ₖ.ₖ ] = [rₖ.ₖ]
# [s̄ₖ -cₖ] [hₖ₊₁.ₖ] [ 0 ]
(c[inner_iter], s[inner_iter],
R[nr + inner_iter]) = _sym_givens(
R[nr + inner_iter]) = _sym_givens(
R[nr + inner_iter],
Hbis)

Expand Down
2 changes: 1 addition & 1 deletion test/adjoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A = rand(n, n);
b1 = rand(n);

_ff = (x,
y) -> f(x,
y) -> f(x,
y;
alg = LinearSolve.DefaultLinearSolver(LinearSolve.DefaultAlgorithmChoice.LUFactorization))
_ff(copy(A), copy(b1))
Expand Down
8 changes: 4 additions & 4 deletions test/hypretests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function test_interface(alg; kw...)

# Solve prob directly (without cache)
y = solve(prob, alg; cache_kwargs..., Pl = HYPRE.BoomerAMG)
@test A * to_array(y.u)b atol=atol rtol=rtol
@test A*to_array(y.u)b atol=atol rtol=rtol
@test y.iters > 0
@test y.resid < rtol

Expand All @@ -99,7 +99,7 @@ function test_interface(alg; kw...)
cache = y.cache
@test cache.isfresh == cache.cacheval.isfresh_A ==
cache.cacheval.isfresh_b == cache.cacheval.isfresh_u == false
@test A * to_array(y.u)b atol=atol rtol=rtol
@test A*to_array(y.u)b atol=atol rtol=rtol

# Update A
cache.A = A
Expand All @@ -109,7 +109,7 @@ function test_interface(alg; kw...)
cache = y.cache
@test cache.isfresh == cache.cacheval.isfresh_A ==
cache.cacheval.isfresh_b == cache.cacheval.isfresh_u == false
@test A * to_array(y.u)b atol=atol rtol=rtol
@test A*to_array(y.u)b atol=atol rtol=rtol

# Update b
b2 = 2 * to_array(b)
Expand All @@ -123,7 +123,7 @@ function test_interface(alg; kw...)
cache = y.cache
@test cache.isfresh == cache.cacheval.isfresh_A ==
cache.cacheval.isfresh_b == cache.cacheval.isfresh_u == false
@test A * to_array(y.u)to_array(b2) atol=atol rtol=rtol
@test A*to_array(y.u)to_array(b2) atol=atol rtol=rtol
end
return
end
Expand Down
4 changes: 2 additions & 2 deletions test/nopre/enzyme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ b1 = rand(n);
db1 = zeros(n);

_ff = (x,
y) -> f(x,
y) -> f(x,
y;
alg = LinearSolve.DefaultLinearSolver(LinearSolve.DefaultAlgorithmChoice.LUFactorization))
_ff(copy(A), copy(b1))

Enzyme.autodiff(Reverse,
(x,
y) -> f(x,
y) -> f(x,
y;
alg = LinearSolve.DefaultLinearSolver(LinearSolve.DefaultAlgorithmChoice.LUFactorization)),
Duplicated(copy(A), dA),
Expand Down
Loading