Skip to content

Commit

Permalink
Added options for analytic_gradient_error bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Nov 28, 2024
1 parent 80025e2 commit 7158d3f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scripts/Embedded/Bugs/analytic_gradient_error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)


0 comments on commit 7158d3f

Please sign in to comment.