Skip to content

Commit

Permalink
Add a macro kfill!
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 16, 2024
1 parent 87597d2 commit 84079a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/bicgstab.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ kwargs_bicgstab = (:c, :M, :N, :ldiv, :atol, :rtol, :itmax, :timemax, :verbose,
r₀ .= b
end

@kfill!(x, zero(FC) # x₀
@kfill!(s, zero(FC) # s₀
@kfill!(v, zero(FC) # v₀
@kfill!(x, zero(FC)) # x₀
@kfill!(s, zero(FC)) # s₀
@kfill!(v, zero(FC)) # v₀
MisI || mulorldiv!(r, M, r₀, ldiv) # r₀
p .= r # p₁

Expand Down
2 changes: 1 addition & 1 deletion src/block_krylov_solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ for (KS, fun, nsol, nA, nAt, warm_start) in [
SM = typeof(solver.X)
(n == n2 && p == p2) || error("X0 should have size ($n, $p)")
allocate_if(true, solver, :ΔX, SM, n, p)
@kcopyto!(solver.ΔX, X0)
copyto!(solver.ΔX, X0)
solver.warm_start = true
return solver
end
Expand Down

0 comments on commit 84079a9

Please sign in to comment.