diff --git a/NEWS.md b/NEWS.md index 4a9476cfd..f72c81df7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- A couple of broken tests in DivConformingFESpacesTests.jl related to NormalSignMap facet cell owners default criterion. Since PR[#1292](https://github.com/gridap/Gridap.jl/pull/1292) + ## [0.20.5] - 2026-04-28 ### Fixed diff --git a/test/FESpacesTests/DivConformingFESpacesTests.jl b/test/FESpacesTests/DivConformingFESpacesTests.jl index 2d5c72e99..1500c9673 100644 --- a/test/FESpacesTests/DivConformingFESpacesTests.jl +++ b/test/FESpacesTests/DivConformingFESpacesTests.jl @@ -294,4 +294,41 @@ test_div_v_q_equiv(U,V,P,Q,Ω) end +# This test checks that the facet owner cell criterion +# underlying the normal sign map is consistent no matter +# how cells sharing a facet are listed in the model. +@testset "NormalSignMap" begin + + # Create domain + domain = (0,1,0,1) + cells = (2,1) + model = CartesianDiscreteModel(domain,cells) + order = 0 + reffe = ReferenceFE(raviart_thomas,Float64,order) + V1 = TestFESpace(model,reffe) + uh1 = FEFunction(V1,ones(num_free_dofs(V1))) + + topo = get_grid_topology(model) + facet_cells = get_faces(topo,1,2) + interior_facets = 0 + for facet in 1:(length(facet_cells.ptrs)-1) + first_cell = facet_cells.ptrs[facet] + last_cell = facet_cells.ptrs[facet+1] - 1 + if last_cell - first_cell + 1 == 2 + facet_cells.data[first_cell], facet_cells.data[last_cell] = + facet_cells.data[last_cell], facet_cells.data[first_cell] + interior_facets += 1 + end + end + @test interior_facets == 1 + V2 = TestFESpace(model,reffe) + uh2 = FEFunction(V2,get_free_dof_values(uh1)) + + data_uh1 = get_data(uh1) + data_uh2 = get_data(uh2) + + @test_broken evaluate(data_uh1[1],[Point(0.5,0.5)])[1] ≈ evaluate(data_uh2[1],[Point(0.5,0.5)])[1] + @test_broken evaluate(data_uh1[2],[Point(0.5,0.5)])[1] ≈ evaluate(data_uh2[2],[Point(0.5,0.5)])[1] +end + end # module