From f9d848fd8aaa815b1e08e970b506e92f7f5837b7 Mon Sep 17 00:00:00 2001 From: Z J Wegert <60646897+zjwegert@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:58:05 +1100 Subject: [PATCH] shorten MWE --- scripts/Embedded/Bugs/change_domain_bug.jl | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/scripts/Embedded/Bugs/change_domain_bug.jl b/scripts/Embedded/Bugs/change_domain_bug.jl index 11aea81..a2de91a 100644 --- a/scripts/Embedded/Bugs/change_domain_bug.jl +++ b/scripts/Embedded/Bugs/change_domain_bug.jl @@ -12,23 +12,13 @@ model = ref_model.model Ω = Triangulation(model) dΩ = Measure(Ω,2*order) V_φ = TestFESpace(model,ReferenceFE(lagrangian,Float64,order)) -Λ = SkeletonTriangulation(Ω) -dΛ = Measure(Λ,2order) φh = interpolate(x->-cos(4π*x[1])*cos(4π*x[2])-0.2,V_φ) -x_φ = get_free_dof_values(φh) -idx = findall(isapprox(0.0;atol=10^-10),x_φ) -@assert isempty(idx) - -Ωs = EmbeddedCollection(model,φh) do cutgeo - Γ = DifferentiableTriangulation(EmbeddedBoundary(cutgeo)) - (; - :Γ => Γ, - :dΓ => Measure(Γ,2*order) - ) -end +geo = DiscreteGeometry(φh,model) +cutgeo = cut(model,geo) +Γ = DifferentiableTriangulation(EmbeddedBoundary(cutgeo)) +dΓ = Measure(Γ,2order) vh = zero(V_φ) - -∫(vh)Ωs.dΓ -∫(vh*vh)Ωs.dΓ \ No newline at end of file +∫(vh)dΓ +∫(vh*vh)dΓ \ No newline at end of file