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

change sign

parent 97157af2
No related branches found
No related tags found
No related merge requests found
...@@ -35,14 +35,14 @@ function run() ...@@ -35,14 +35,14 @@ function run()
end end
function rundd() function rundd()
f = zeros(8) f = zeros(8,8)
f[1,:] .= 1 f[1,:] .= 1
#g = [0. 2; 1 0.] #g = [0. 2; 1 0.]
A = diagm(ones(length(f))) A = diagm(ones(length(f)))
α = 0.25 α = 0.25
md = DualTVDD.DualTVDDModel(f, A, α, 0., 0.) md = DualTVDD.DualTVDDModel(f, A, α, 0., 0.)
alg = DualTVDD.DualTVDDAlgorithm(M=(2,), overlap=(2,), σ=0.25) alg = DualTVDD.DualTVDDAlgorithm(M=(2,2), overlap=(2,2), σ=0.25)
ctx = DualTVDD.init(md, alg) ctx = DualTVDD.init(md, alg)
md2 = DualTVDD.OpROFModel(f, A, α) md2 = DualTVDD.OpROFModel(f, A, α)
...@@ -50,7 +50,7 @@ function rundd() ...@@ -50,7 +50,7 @@ function rundd()
ctx2 = DualTVDD.init(md2, alg2) ctx2 = DualTVDD.init(md2, alg2)
for i in 1:150 for i in 1:1000
step!(ctx) step!(ctx)
step!(ctx2) step!(ctx2)
end end
......
...@@ -69,7 +69,7 @@ function step!(ctx::DualTVDDContext) ...@@ -69,7 +69,7 @@ function step!(ctx::DualTVDDContext)
ax = axes(ctx.p) ax = axes(ctx.p)
overlap = ctx.algorithm.overlap overlap = ctx.algorithm.overlap
@inline kfΛ(w) = @inbounds divergence_global(w) @inline kfΛ(w) = @inbounds -divergence_global(w)
= Kernel{ntuple(_->-1:1, d)}(kfΛ) = Kernel{ntuple(_->-1:1, d)}(kfΛ)
println("global p") println("global p")
...@@ -83,7 +83,7 @@ function step!(ctx::DualTVDDContext) ...@@ -83,7 +83,7 @@ function step!(ctx::DualTVDDContext)
# g_i = (A*f - Λ(1-theta_i)p^n)|_{\Omega_i} # g_i = (A*f - Λ(1-theta_i)p^n)|_{\Omega_i}
# subctx[i].p is used as a buffer # subctx[i].p is used as a buffer
tmp = (1 .- theta.(Ref(ax), Ref(sax), Ref(overlap), CartesianIndices(ctx.p))) .* ctx.p tmp = .-(1 .- theta.(Ref(ax), Ref(sax), Ref(overlap), CartesianIndices(ctx.p))) .* ctx.p
#tmp3 = .-(1 .- theta.(Ref(ax), Ref(sax), Ref(overlap), CartesianIndices(ctx.p))) #tmp3 = .-(1 .- theta.(Ref(ax), Ref(sax), Ref(overlap), CartesianIndices(ctx.p)))
#ctx.subctx[i].p .= .-(1 .- theta.(Ref(ax), Ref(sax), Ref(overlap), ci)) .* ctx.p[ctx.subax[i]...] #ctx.subctx[i].p .= .-(1 .- theta.(Ref(ax), Ref(sax), Ref(overlap), ci)) .* ctx.p[ctx.subax[i]...]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment