From cb54ef251b7427156fcec1530b474acebc83c213 Mon Sep 17 00:00:00 2001 From: amartin Date: Fri, 22 Apr 2022 10:04:20 +1000 Subject: [PATCH] Cosmetic changes in the driver --- test/PoissonHHOTests.jl | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/test/PoissonHHOTests.jl b/test/PoissonHHOTests.jl index ef2cea9..f5ed56d 100644 --- a/test/PoissonHHOTests.jl +++ b/test/PoissonHHOTests.jl @@ -2,20 +2,17 @@ module PoissonHHOTests using Gridap using GridapHybrid using Test - using LinearAlgebra function setup_reconstruction_operator(model, order, dΩ, d∂K) - T = Float64 nK = get_cell_normal_vector(d∂K.quad.trian) - refferecᵤ = ReferenceFE(orthogonal_basis, T, order+1) - reffe_nzm = ReferenceFE(orthogonal_basis, T, order+1; subspace=:NonZeroMean) - reffe_zm = ReferenceFE(orthogonal_basis, T, order+1; subspace=:ZeroMean) - reffe_c = ReferenceFE(monomial_basis , T, order+1; subspace=:OnlyConstant) - reffe_nc = ReferenceFE(monomial_basis , T, order+1; subspace=:ExcludeConstant) + refferecᵤ = ReferenceFE(orthogonal_basis, Float64, order+1) + reffe_nzm = ReferenceFE(orthogonal_basis, Float64, order+1; subspace=:NonZeroMean) + reffe_zm = ReferenceFE(orthogonal_basis, Float64, order+1; subspace=:ZeroMean) + reffe_c = ReferenceFE(monomial_basis , Float64, order+1; subspace=:OnlyConstant) + reffe_nc = ReferenceFE(monomial_basis , Float64, order+1; subspace=:ExcludeConstant) VKR = TestFESpace(Ω , refferecᵤ; conformity=:L2) UKR = TrialFESpace(VKR) - UKR_NZM = TrialFESpace(TestFESpace(Ω, reffe_nzm; conformity=:L2)) UKR_ZM = TrialFESpace(TestFESpace(Ω, reffe_zm; conformity=:L2)) VKR_C = TestFESpace(Ω, reffe_c ; conformity=:L2, vector_type=Vector{Float64}) @@ -24,9 +21,7 @@ module PoissonHHOTests VKR_DS_DECOMP = MultiFieldFESpace([VKR_C,VKR_NC]) UKR_DS_DECOMP = MultiFieldFESpace([UKR_NZM,UKR_ZM]) - - m( (u_nzm,u_zm), (v_c,v_nc) ) = ∫(∇(v_nc)⋅∇(u_zm))dΩ + - ∫(∇(v_nc)⋅∇(u_nzm))dΩ + + m( (u_nzm,u_zm), (v_c,v_nc) ) = ∫(∇(v_nc)⋅∇(u_zm))dΩ + ∫(∇(v_nc)⋅∇(u_nzm))dΩ + ∫(v_c*u_nzm)dΩ n( (uK,u∂K), (v_c,v_nc) ) = ∫(-Δ(v_nc)*uK)dΩ + ∫(v_c*uK)dΩ + ∫((∇(v_nc)⋅nK)*u∂K)d∂K @@ -51,18 +46,14 @@ module PoissonHHOTests f(x)=-Δ(u)(x) model=CartesianDiscreteModel((0,1,0,1),(2,2)) - - # Geometry D = num_cell_dims(model) Ω = Triangulation(ReferenceFE{D},model) Γ = Triangulation(ReferenceFE{D-1},model) ∂K = GridapHybrid.Skeleton(model) - # Reference FEs order = 1 reffeᵤ = ReferenceFE(lagrangian,Float64,order ;space=:P) - # Define test and trial spaces VK = TestFESpace(Ω , reffeᵤ; conformity=:L2) V∂K = TestFESpace(Γ , reffeᵤ; conformity=:L2,dirichlet_tags=collect(5:8)) UK = TrialFESpace(VK) @@ -92,8 +83,6 @@ module PoissonHHOTests δv∂K_K,δv∂K_∂K=δv∂K δu∂K_K,δu∂K_∂K=δu∂K ∫(δvK_K*δuK_K)dΩ+∫(δvK_K*δuK_∂K)dΩ+∫(δvK_∂K*δuK_K)dΩ+∫(δvK_∂K*δuK_∂K)dΩ+ - # All these terms are zero numerically - #∫(δv∂K_K*δu∂K_K)d∂K+∫(δv∂K_K*δu∂K_∂K)d∂K+∫(δv∂K_∂K*δu∂K_K)d∂K+ ∫(δv∂K_∂K*δu∂K_∂K)d∂K end