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

simplify

parent ec430751
No related branches found
No related tags found
No related merge requests found
......@@ -1366,7 +1366,8 @@ function experiment_optflow_middlebury_all(ctx)
"RubberWhale", "Urban2", "Urban3", "Venus"]
ctx(experiment_optflow_middlebury, example;
alpha1 = 10., alpha2 = 0., lambda = 1., beta = 1e-5,
gamma1 = 1e-3, gamma2 = 1e-3)
gamma1 = 1e-4, gamma2 = 1e-4)
return
end
end
......
......@@ -3,19 +3,15 @@ using Reduce
# explicitly calculate l1 integral over reference triangle with first order
# lagrange discretization
function l1triangle()
integrand_2 = :(abs(u0 * (1-x1-x2) + u1 * x1 + u2 * x2))
integral_2 = Reduce.Algebra.int(integrand_2, :x2)
integrand_1 = Reduce.Algebra.:-(
Reduce.Algebra.sub(:x2 => :(1 - x1), integral_2),
Reduce.Algebra.sub(:x2 => 0, integral_2))
integral_1 = Reduce.Algebra.int(integrand_1, :x1)
result = Reduce.Algebra.:-(
Reduce.Algebra.sub(:x1 => 1, integral_1),
Reduce.Algebra.sub(:x1 => 0, integral_1))
int3 = :(abs(u0 * (1-x1-x2) + u1 * x1 + u2 * x2))
int2 = Reduce.Algebra.int(int3, :x2, 0, :(1 - x1))
int1 = Reduce.Algebra.int(int2, :x1, 0, 1)
return int1
end
return result
function l1interval()
integrand = :(abs(u0 * (1-x) + u1 * x))
return Reduce.Algebra.int(integrand, :x, 0, 1)
end
function norm_grad()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment