Skip to content

Commit

Permalink
Fix diagonal operator spawning
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsch committed Aug 4, 2023
1 parent e3730f8 commit 8ac9b08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StochasticStyles/spawning.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ end

@inline function spawn!(s::Exact, w, offdiags::AbstractVector, add, val, boost=1)
T = valtype(w)
spawns = sum(offdiags) do (new_add, mat_elem)
spawns = sum(offdiags; init=zero(T)) do (new_add, mat_elem)
abs(projected_deposit!(
w, new_add, val * mat_elem, add => val, s.threshold
))
Expand Down

0 comments on commit 8ac9b08

Please sign in to comment.