Skip to content

Commit 9f5ce67

Browse files
committed
Final revision to polytopal drivers
1 parent 26a41c8 commit 9f5ce67

File tree

4 files changed

+33
-5
lines changed

4 files changed

+33
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ tmp/
1010
.vscode/
1111
*.code-workspace
1212
*.DS_Store
13+
CLAUDE.md

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Tutorials"
22
uuid = "ab87341f-2653-5384-8dc6-691ea82e91b3"
33
authors = ["Santiago Badia <santiago.badia@monash.edu>", "Francesc Verdugo <fverdugo@cimne.upc.edu>"]
4-
version = "0.19.0"
4+
version = "0.19.9"
55

66
[deps]
77
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"

src/poisson_hdg.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#
12
# In this tutorial, we will implement a Hybridizable Discontinuous Galerkin (HDG) method
23
# for solving the Poisson equation. The HDG method is an efficient variant of DG methods
34
# that introduces an auxiliary variable m on mesh interfaces to reduce the global system size.
@@ -163,3 +164,15 @@ writevtk(Ω,"output_path/results",cellfields=["uh"=>uh,"qh"=>qh,"eh"=>eh])
163164
# solving the same problem on a polytopal mesh is available [in the Gridap repository](https://github.com/gridap/Gridap.jl/blob/75efc9a7a7e286c27e7ca3ddef5468e591845484/test/GridapTests/HDGPolytopalTests.jl).
164165
# A tutorial for HHO on polytopal meshes is also available.
165166
#
167+
# You can also check out the following reference:
168+
#
169+
# @misc{GridapHybrid,
170+
# title={A natural language framework for non-conforming hybrid polytopal methods in Gridap.jl},
171+
# author={Jordi Manyer and Jai Tushar and Santiago Badia},
172+
# year={2026},
173+
# eprint={2603.00880},
174+
# archivePrefix={arXiv},
175+
# primaryClass={cs.MS},
176+
# url={https://arxiv.org/abs/2603.00880},
177+
# }
178+
#

src/poisson_hho.jl

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,13 @@ function patch_weakform()
264264
end
265265

266266
op = MultiField.StaticCondensationOperator(X,patch_assem,patch_weakform())
267-
ui, ub = solve(op)
267+
xh = solve(op)
268268

269-
eu = ui - u
270-
l2u = sqrt(sum( (eu * eu)dΩp))
271-
h1u = l2u + sqrt(sum( ((eu) (eu))dΩp))
269+
uT, uF = xh
270+
271+
eh = R(xh) - u
272+
l2err = sqrt(sum( (eh * eh)dΩp))
273+
h1err = l2err + sqrt(sum( ((eh) (eh))dΩp))
272274

273275
# ## Going further
274276
#
@@ -280,3 +282,15 @@ h1u = l2u + sqrt(sum( ∫(∇(eu) ⋅ ∇(eu))dΩp))
280282
# - [Incompressible Stokes](https://github.com/gridap/Gridap.jl/blob/75efc9a7a7e286c27e7ca3ddef5468e591845484/test/GridapTests/HHOMixedStokesPolytopal.jl)
281283
# - [Linear Elasticity](https://github.com/gridap/Gridap.jl/blob/75efc9a7a7e286c27e7ca3ddef5468e591845484/test/GridapTests/HHOMixedElasticity.jl)
282284
#
285+
# You can also check out the following reference:
286+
#
287+
# @misc{GridapHybrid,
288+
# title={A natural language framework for non-conforming hybrid polytopal methods in Gridap.jl},
289+
# author={Jordi Manyer and Jai Tushar and Santiago Badia},
290+
# year={2026},
291+
# eprint={2603.00880},
292+
# archivePrefix={arXiv},
293+
# primaryClass={cs.MS},
294+
# url={https://arxiv.org/abs/2603.00880},
295+
# }
296+
#

0 commit comments

Comments
 (0)