diff --git a/NEWS.md b/NEWS.md index f02f40c9..233d9831 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.2] - 2026-03-29 + +### Added + +- Added support for Gridap v0.20. + ## [0.3.1] - 2025-06-13 ### Added diff --git a/Project.toml b/Project.toml index 3f33b940..f618fd0e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "STLCutters" uuid = "284f087d-c8bb-44c4-af3c-39d0e1f330a5" authors = ["Pere Antoni Martorell", "Large Scale Scientific Computing"] -version = "0.3.1" +version = "0.3.2" [deps] AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" @@ -24,7 +24,7 @@ AlgebraicMultigrid = "0.5, 0.6" Downloads = "1.4" FileIO = "1.6" FillArrays = "0.11, 0.13, 1" -Gridap = "0.18.3, 0.19" +Gridap = "0.18.3, 0.19, 0.20" GridapDistributed = "0.4" GridapEmbedded = "0.9.4" IterativeSolvers = "0.9" diff --git a/examples/Poisson.jl b/examples/Poisson.jl index 4cb0795d..37095f95 100644 --- a/examples/Poisson.jl +++ b/examples/Poisson.jl @@ -5,6 +5,7 @@ using AlgebraicMultigrid using STLCutters using Gridap +using Gridap.ReferenceFEs using GridapEmbedded using Test @@ -50,7 +51,7 @@ function main(filename;n=20,δ=0.2,output=nothing) order = 1 degree = 2*order dΩ = Measure(Ω,degree) - dΓd = Measure(Γd,degree) + dΓd = Measure(Γd,Quadrature(duffy,degree)) # Setup FESpace Ω_act = Triangulation(cutgeo,ACTIVE) diff --git a/test/DistributedTests/Poisson.jl b/test/DistributedTests/Poisson.jl index 7195aa52..37180f4f 100644 --- a/test/DistributedTests/Poisson.jl +++ b/test/DistributedTests/Poisson.jl @@ -7,6 +7,8 @@ using PartitionedArrays using GridapEmbedded using Test +using Gridap.ReferenceFEs + function main(distribute; np = (1,1,1), nc = (2,2,2), @@ -49,7 +51,10 @@ function main(distribute; n_Γ = get_normal_vector(Γ) degree = 2 dΩ = Measure(Ω,degree) - dΓ = Measure(Γ,degree) + + dΓ = Measure(Γ,Quadrature(duffy,degree)) # 4 integration points when order = 1 + # See also https://github.com/gridap/Gridap.jl/issues/1242 + # for more details. # Setup FESpace order = 1 diff --git a/test/Poisson.jl b/test/Poisson.jl index 4314e32c..ff057f5a 100644 --- a/test/Poisson.jl +++ b/test/Poisson.jl @@ -3,6 +3,7 @@ module PoisonTests using STLCutters using Gridap import Gridap: ∇ +using Gridap.ReferenceFEs using GridapEmbedded using Test @@ -56,7 +57,23 @@ n_Γd = get_normal_vector(Γd) order = 1 degree = 2*order dΩ = Measure(Ω,degree) -dΓd = Measure(Γd,degree) + +# Remark: Strictly, the measure on the EmbeddedBoundary +# should exactly integrate the mass term of tensor-product +# shape functions restricted to the planes of the Embedded +# boundary. This is achieved by setting the integration +# degree to 2*order*dim. +# dΓ = Measure(Γ,degree*num_dims(Ω)) +# In many cases, however, we can subintegrate while keeping +# convergence and accuracy. For this problem, here are some +# working examples: +# quad = Quadrature(witherden_vincent,degree+1) +# dΓ = Measure(Γ,quad) # 6 integration points when order = 1 +# quad = Quadrature(strang,degree+1) +# dΓ = Measure(Γ,quad) # 4 integration points when order = 1 +dΓd = Measure(Γd,Quadrature(duffy,degree)) # 4 integration points when order = 1 +# See also https://github.com/gridap/Gridap.jl/issues/1242 +# for more details. vol = sum( ∫(1)*dΩ ) surf = sum( ∫(1)*dΓd ) diff --git a/test/PoissonAgFEM.jl b/test/PoissonAgFEM.jl index baa8c23d..ad0be504 100644 --- a/test/PoissonAgFEM.jl +++ b/test/PoissonAgFEM.jl @@ -8,6 +8,7 @@ using Gridap using GridapEmbedded using Test +using Gridap.ReferenceFEs using STLCutters: compute_stl_model using STLCutters: read_stl, merge_nodes, get_bounding_box @@ -53,8 +54,11 @@ n_Γd = get_normal_vector(Γd) order = 1 degree = 2*order dΩ = Measure(Ω,degree) -dΓd = Measure(Γd,degree) -#dΓg = Measure(Γg,degree) + +dΓd = Measure(Γd,Quadrature(duffy,degree)) # 4 integration points when order = 1 +# See also https://github.com/gridap/Gridap.jl/issues/1242 +# for more details. + vol = sum( ∫(1)*dΩ ) surf = sum( ∫(1)*dΓd )