From 72426061d6daffaf3db542a7f8b769f116e47969 Mon Sep 17 00:00:00 2001 From: Antoine Marteau Date: Fri, 27 Feb 2026 11:22:39 +1100 Subject: [PATCH 1/6] update GridapEmbeded --- Project.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 8f5e792..deda2a2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Tutorials" uuid = "ab87341f-2653-5384-8dc6-691ea82e91b3" -authors = ["Santiago Badia ", "Francesc Verdugo "] version = "0.19.0" +authors = ["Santiago Badia ", "Francesc Verdugo "] [deps] BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" @@ -40,6 +40,7 @@ BlockArrays = "1.6.3" DataStructures = "0.18.22" Gridap = "0.19" GridapDistributed = "0.4" +GridapEmbedded = "0.9.9" GridapGmsh = "0.7" GridapP4est = "0.3" GridapPETSc = "0.5" From d9197b1a27b5cf81306f1ad725e65c440fc3daac Mon Sep 17 00:00:00 2001 From: Antoine Marteau Date: Fri, 27 Feb 2026 17:01:30 +1100 Subject: [PATCH 2/6] document scale_dof and global_meshsize in tutorials --- src/darcy.jl | 10 +++++++--- src/inc_navier_stokes.jl | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/darcy.jl b/src/darcy.jl index 69421ab..b8c0bea 100644 --- a/src/darcy.jl +++ b/src/darcy.jl @@ -63,14 +63,18 @@ model = CartesianDiscreteModel(domain,partition) # Next, we build the FE spaces. We consider the first order RT space for the flux and the discontinuous pressure space as described above. This mixed FE pair satisfies the inf-sup condition and, thus, it is stable. order = 1 +h = 1/100 V = FESpace(model, ReferenceFE(raviart_thomas,Float64,order), - conformity=:HDiv, dirichlet_tags=[5,6]) + conformity=:HDiv, dirichlet_tags=[5,6], scale_dof=true, global_meshsize=h) Q = FESpace(model, ReferenceFE(lagrangian,Float64,order), - conformity=:L2) + conformity=:L2, scale_dof=true, global_meshsize=h) -# Note that the Dirichlet boundary for the flux are the bottom and top sides of the squared domain (identified with the boundary tags 5, and 6 respectively), whereas no Dirichlet data can be imposed on the pressure space. We select `conformity=:HDiv` for the flux (i.e., shape functions with $H^1(\mathrm{div};\Omega)$ regularity) and `conformity=:L2` for the pressure (i.e. discontinuous shape functions). +# We select `conformity=:HDiv` for the flux (i.e., shape functions with $H^1(\mathrm{div};\Omega)$ regularity) and `conformity=:L2` for the pressure (i.e. discontinuous shape functions). +# Note that the Dirichlet boundary for the flux are the bottom and top sides of the squared domain (identified with the boundary tags 5, and 6 respectively), whereas no Dirichlet data can be imposed on the pressure space. +# +# The `scale_dof=true` argument is given to cancel the scaling of the DoFs with the meshsize `h` that is introduced by the piola map, e.g. `h`$^{2-1}$ (2 is the dimension) for the div-conforming contra-variant Piola map. This is usefull for mixed elements of different conformity that use small or non-uniform meshsize. On a uniform Cartesian mesh like `model` used here, we also passed `global_meshsize=1/100`. This argument fixes the local meshsize estimate needed to re-scale the DoFs, avoiding the computation of the volume of each face of the mesh that own a DoF. But this should only be used on quasi-uniform and shape-regular meshes. # # From these objects, we construct the trial spaces. Note that we impose homogeneous boundary conditions for the flux. diff --git a/src/inc_navier_stokes.jl b/src/inc_navier_stokes.jl index 5ce7f9f..d1ccafe 100644 --- a/src/inc_navier_stokes.jl +++ b/src/inc_navier_stokes.jl @@ -105,6 +105,8 @@ P = TrialFESpace(Q) Y = MultiFieldFESpace([V, Q]) X = MultiFieldFESpace([U, P]) +# `scale_dof` is not used here, because currently $H^1$ and $L^2$ conforming elements both use the same Piola map in Gridap (the trivial one). + # ## Triangulation and integration quadrature # # From the discrete model we can define the triangulation and integration measure From 2e81a79968fd7e80cec19adffa8de1d3289f9aeb Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Tue, 24 Mar 2026 18:54:47 +1100 Subject: [PATCH 3/6] Bump compats --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 840726e..9136b45 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Tutorials" uuid = "ab87341f-2653-5384-8dc6-691ea82e91b3" authors = ["Santiago Badia ", "Francesc Verdugo "] -version = "0.19.9" +version = "0.20.0" [deps] BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" @@ -38,7 +38,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] BlockArrays = "1.6.3" DataStructures = "0.18.22" -Gridap = "0.19.9" +Gridap = "0.20" GridapDistributed = "0.4" GridapGmsh = "0.7" GridapP4est = "0.3" From 29ad9586ee6d4059ad6c06b2c8f5f09d409369b4 Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Tue, 24 Mar 2026 19:01:42 +1100 Subject: [PATCH 4/6] Updated compats --- .github/workflows/ci.yml | 1 + Project.toml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb978d2..09a8570 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ jobs: matrix: version: - '1.10' + - '1' os: - ubuntu-latest arch: diff --git a/Project.toml b/Project.toml index e2649c2..cce38ff 100644 --- a/Project.toml +++ b/Project.toml @@ -36,8 +36,8 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] -BlockArrays = "1.6.3" -DataStructures = "0.18.22" +BlockArrays = "1" +DataStructures = "0.19" Gridap = "0.20" GridapDistributed = "0.4" GridapEmbedded = "0.9.9" @@ -47,7 +47,7 @@ GridapPETSc = "0.5" GridapSolvers = "0.6" MPI = "0.20" SpecialFunctions = "1" -julia = "1.6" +julia = "1.10" [extras] MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" From 3be64000f848fc46b91965f38258991dcd42652a Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Tue, 24 Mar 2026 19:22:36 +1100 Subject: [PATCH 5/6] Updated Documenter version --- docs/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Project.toml b/docs/Project.toml index 626e449..c3b9bb4 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -4,4 +4,4 @@ Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" Tutorials = "ab87341f-2653-5384-8dc6-691ea82e91b3" [compat] -Documenter = "0.24" +Documenter = "1" From 2bdbb56944dbfc629957280bde42ee2007d9a387 Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Mon, 30 Mar 2026 09:20:41 +1100 Subject: [PATCH 6/6] Updated compats for GridapSolvers --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index cce38ff..fe6efcd 100644 --- a/Project.toml +++ b/Project.toml @@ -44,7 +44,7 @@ GridapEmbedded = "0.9.9" GridapGmsh = "0.7" GridapP4est = "0.3" GridapPETSc = "0.5" -GridapSolvers = "0.6" +GridapSolvers = "0.7" MPI = "0.20" SpecialFunctions = "1" julia = "1.10"