Skip to content

Commit d76b3e3

Browse files
committed
activated arbitrary order RTk element from ExtendableFEMBase package, used in Example202 now
1 parent 1e5290e commit d76b3e3

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ExtendableFEM"
22
uuid = "a722555e-65e0-4074-a036-ca7ce79a4aed"
33
authors = ["Christian Merdon <[email protected]>"]
4-
version = "0.1.0"
4+
version = "0.2.0"
55

66
[deps]
77
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
@@ -30,7 +30,7 @@ ExtendableFEMDiffEQExt = "DifferentialEquations"
3030
CommonSolve = "0.2"
3131
DiffResults = "1"
3232
DocStringExtensions = "0.8,0.9"
33-
ExtendableFEMBase = "^0.1.0"
33+
ExtendableFEMBase = "^0.2, 0.3"
3434
ExtendableGrids = "1.0"
3535
ExtendableSparse = "1.2"
3636
ForwardDiff = "^0.10.35"

examples/Example202_MixedPoissonProblem.jl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ using Test #hide
2828
## define unknowns
2929
σ = Unknown("σ"; name = "pseudostress")
3030
u = Unknown("u"; name = "potential")
31-
p = Unknown("p"; name = "LM hdiv continuity") # only_used if hdivdg == true
3231

3332
## bilinearform kernel for mixed Poisson problem
3433
function blf!(result, u_ops, qpinfo)
@@ -51,27 +50,21 @@ function boundarydata!(result, qpinfo)
5150
return nothing
5251
end
5352

54-
function main(; nrefs = 5, μ = 0.25, hdivdg = false, Plotter = nothing, kwargs...)
53+
function main(; nrefs = 5, μ = 0.25, order = 0, Plotter = nothing, kwargs...)
5554

5655
## problem description
5756
PD = ProblemDescription()
5857
assign_unknown!(PD, u)
5958
assign_unknown!(PD, σ)
60-
if hdivdg
61-
assign_unknown!(PD, p)
62-
assign_operator!(PD, BilinearOperator([jump(normalflux(σ))], [id(p)]; transposed_copy = 1, entities = ON_IFACES, kwargs...))
63-
assign_operator!(PD, HomogeneousData(p; regions = 1:4))
64-
end
6559
assign_operator!(PD, BilinearOperator(blf!, [id(σ), div(σ), id(u)]; params = [μ], kwargs...))
6660
assign_operator!(PD, LinearOperator(boundarydata!, [normalflux(σ)]; entities = ON_BFACES, regions = 1:4, kwargs...))
6761
assign_operator!(PD, LinearOperator(f!, [id(u)]; kwargs...))
6862
assign_operator!(PD, FixDofs(u; dofs = [1], vals = [0]))
6963

7064
## discretize
7165
xgrid = uniform_refine(grid_unitsquare(Triangle2D), nrefs)
72-
FES = Dict(u => FESpace{L2P0{1}}(xgrid),
73-
σ => FESpace{HDIVRT0{2}}(xgrid; broken = hdivdg),
74-
p => hdivdg ? FESpace{L2P0{1}, ON_FACES}(xgrid) : nothing)
66+
FES = Dict(u => FESpace{order == 0 ? L2P0{1} : H1Pk{1,2,order}}(xgrid; broken = true),
67+
σ => FESpace{HDIVRTk{2, order}}(xgrid))
7568

7669
## solve
7770
sol = ExtendableFEM.solve(PD, FES; kwargs...)
@@ -84,7 +77,7 @@ end
8477

8578
generateplots = default_generateplots(Example202_MixedPoissonProblem, "example202.svg") #hide
8679
function runtests() #hide
87-
sol, plt = main(; μ = 0.25, nrefs = 2) #hide
80+
sol, plt = main(; μ = 0.25, order = 0, nrefs = 2) #hide
8881
@test maximum(view(sol[1])) 0.08463539106946043 #hide
8982
end #hide
9083
end # module

src/ExtendableFEM.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export FESpace, FEMatrix, FEVector
2424
export H1P1, H1P2, H1P3, H1Pk
2525
export H1Q1, H1Q2
2626
export H1CR, H1BR, H1P2B, H1MINI,H1P1TEB, H1BUBBLE
27-
export HDIVRT0, HDIVRT1
27+
export HDIVRT0, HDIVRT1, HDIVRTk
2828
export HDIVBDM1, HDIVBDM2
2929
export HCURLN0, HCURLN1
3030
export HDIVRTkENRICH

0 commit comments

Comments
 (0)