Skip to content
Snippets Groups Projects
Commit e20c2fcc authored by Stephan Hilb's avatar Stephan Hilb
Browse files

make chambolle create views in `step!()`

parent 1b15e99a
Branches
Tags
No related merge requests found
......@@ -93,17 +93,17 @@ function LinearAlgebra.mul!(Y::AbstractVector{<:SVector}, A, B::AbstractVector{<
end
function step!(ctx::ChambolleState)
display(ctx.p)
alg = ctx.algorithm
sv = vec(parent(ctx.s))
rv = vec(ctx.r)
# r = div(p) + g
map!(ctx.k1, ctx.r, ctx.p)
# s = B * r
mul!(ctx.sv, alg.problem.B, ctx.rv)
#display(ctx.algorithm.problem.g)
display(ctx.r)
mul!(sv, alg.problem.B, rv)
# p = (p + τ*grad(s)) / (1 + τ/λ|grad(s)|)
ctx.p .= deepcopy(map!(ctx.k2, ctx.p, ctx.s))
ctx.p .+= 1
map!(ctx.k2, ctx.p, ctx.s)
return ctx
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment