Skip to content

Commit

Permalink
Cosmetic changes in the driver
Browse files Browse the repository at this point in the history
  • Loading branch information
amartinhuertas committed Apr 22, 2022
1 parent 0d3737e commit cb54ef2
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions test/PoissonHHOTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand All @@ -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

Expand All @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit cb54ef2

Please sign in to comment.