diff --git a/scripts/run_experiments.jl b/scripts/run_experiments.jl index 94670c932dfe694e39a6797d3717273f2fe7d6c8..70dd2da7bf4058b29f407e4eb3f3e139f515ebb1 100644 --- a/scripts/run_experiments.jl +++ b/scripts/run_experiments.jl @@ -20,7 +20,7 @@ using SemiSmoothNewton using SemiSmoothNewton: HMesh, ncells, refine, area, mesh_size, ndofs, diam, elmap, assemble_lumped, norm_gradient, integrate_lumped using SemiSmoothNewton: project!, project_l2_lagrange!, project_qi_lagrange!, - project_l2_pixel! + project_l2_pixel!, compute_local_error using SemiSmoothNewton: vtk_mesh, vtk_append!, vtk_save include("util.jl") @@ -1375,6 +1375,14 @@ function inpaint(ctx) println("refine ...") #estimate_res!(st) marked_cells = Set(mark(st; theta = 0.5)) + + # EXPERIMENTAL: mark according to projection error + g_err = compute_local_error(st.g, g_arr) + # st.est was written out above and used for marking and is no + # longer needed + st.est.data .= g_err.data + union!(marked_cells, Set(mark(st; theta = 0.5))) + # manually mark all cell within inpainting domain, since the # estimator is not reliable there for cell in cells(mesh) @@ -1427,7 +1435,7 @@ function experiment_inpaint_denoise(ctx) params = ( name = "test", - n_refine = 0, + n_refine = 5, g_arr, mask_arr, mesh, noise_sigma = 0.1, noise_p = 0.02, alpha1 = 0.2, alpha2 = 8., lambda = 1., #= beta see below =#