From 7158d3ffe7f4b76d7008e346891d02e6175ce1c4 Mon Sep 17 00:00:00 2001 From: JordiManyer Date: Fri, 29 Nov 2024 09:08:12 +1100 Subject: [PATCH] Added options for analytic_gradient_error bug --- .../Embedded/Bugs/analytic_gradient_error.jl | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/Embedded/Bugs/analytic_gradient_error.jl b/scripts/Embedded/Bugs/analytic_gradient_error.jl index c43e0b39..65736680 100644 --- a/scripts/Embedded/Bugs/analytic_gradient_error.jl +++ b/scripts/Embedded/Bugs/analytic_gradient_error.jl @@ -66,3 +66,23 @@ dJ_int_exact2(w) = ∫((-n_Γ⋅∇(g(fh)))*w/(norm ∘ (∇(φh))))dΓ + ∫(-n_S_Λ ⋅ (jump(g(fh)*m_k_Λ) * mean(w) / ∇ˢφ_Λ))dΛ + ∫(-n_S_Σ ⋅ (g(fh)*m_k_Σ * w / ∇ˢφ_Σ))dΣ dJ_int_exact_vec2 = assemble_vector(dJ_int_exact2,V_φ) + +Ω = Triangulation(model) +x = get_cell_points(Ω) + +using Gridap.CellData: get_data + +∇g(fh) = ∇∇(fh)⋅∇(fh) + ∇(fh)⋅∇∇(fh) +∇g2(∇∇f,∇f) = ∇∇f⋅∇f + ∇f⋅∇∇f + +h = g(fh) +∇h = ∇(h) +∇h_exact = ∇g(fh) +∇h_exact2 = ∇g2∘(∇∇(fh),∇(fh)) + +h(x) +∇h(x) +∇h_exact(x) +∇h_exact2(x) + +