Skip to content

Commit ee04cc6

Browse files
Merge pull request #198 from gridap/add_sign_flip_for_nedelec_hexa_facet_dofs
Sign flip for HEX Nedelec FEs
2 parents e1d5547 + 872c537 commit ee04cc6

7 files changed

Lines changed: 29 additions & 16 deletions

File tree

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Fixed `local_views(::BlockPMatrix, rows, cols)` indexing 1D block-range vectors with a 2D `CartesianIndex`, causing `BoundsError` for any multi-field problem with ≥2 fields. Since PR[#194](https://github.com/gridap/GridapDistributed.jl/pull/194/).
1919
- Fixed `mul!(y::BlockPVector, A::BlockPMatrix, x::BlockPVector, α, β)` computing `α*β*(A*x)` instead of `α*(A*x) + β*y`; the 3-arg `mul!` was also updated to correctly zero `y` before accumulating. Since PR[#194](https://github.com/gridap/GridapDistributed.jl/pull/194/).
2020
- Replaced fragile closure side-effect in `DistributedVisualizationData.filebase` with `getany(map(...))` for correct and idiomatic behaviour in both debug and MPI modes. Since PR[#195](https://github.com/gridap/GridapDistributed.jl/pull/195/).
21+
- Changes required to generalize Nedelec Hexahedral elements for meshes beyond Cartesian Meshes. Since PR[#198](https://github.com/gridap/GridapDistributed.jl/pull/198/).
2122

2223
## [0.4.11] - 2026-02-20
2324

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ BlockArrays = "1"
2121
CircularArrays = "1.4.0"
2222
FillArrays = "1"
2323
ForwardDiff = "0.10, 1"
24-
Gridap = "0.19.8"
24+
Gridap = "0.19.9"
2525
LinearAlgebra = "1"
2626
MPI = "0.16, 0.17, 0.18, 0.19, 0.20"
2727
PartitionedArrays = "0.3.3"
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
const RTorNedelec = Union{RaviartThomas,Nedelec}
2+
13
function FESpaces.FESpace(model::DistributedDiscreteModel,
2-
reffe::Tuple{RaviartThomas,Any,Any};
4+
reffe::Tuple{<:RTorNedelec,Any,Any};
35
conformity=nothing,
46
split_own_and_ghost=false,
57
constraint=nothing,
@@ -13,7 +15,7 @@ function FESpaces.FESpace(model::DistributedDiscreteModel,
1315
end
1416

1517
function FESpaces.FESpace(model::DistributedDiscreteModel,
16-
reffe::GenericRefFE{RaviartThomas};
18+
reffe::GenericRefFE{<:RTorNedelec};
1719
conformity=nothing,
1820
split_own_and_ghost=false,
1921
constraint=nothing,
@@ -34,7 +36,7 @@ end
3436

3537
function FESpaces.FESpace(
3638
_trian::DistributedTriangulation,
37-
reffe::Tuple{RaviartThomas,Any,Any};
39+
reffe::Tuple{<:RTorNedelec,Any,Any};
3840
conformity=nothing,
3941
split_own_and_ghost=false,
4042
constraint=nothing,kwargs...
@@ -48,7 +50,7 @@ function FESpaces.FESpace(
4850
end
4951

5052
function FESpaces.FESpace(_trian::DistributedTriangulation,
51-
reffe::GenericRefFE{RaviartThomas};
53+
reffe::GenericRefFE{<:RTorNedelec};
5254
conformity=nothing,
5355
split_own_and_ghost=false,
5456
constraint=nothing,

src/GridapDistributed.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ include("Visualization.jl")
5858

5959
include("FESpaces.jl")
6060

61-
include("DivConformingFESpaces.jl")
61+
include("DivAndCurlConformingFESpaces.jl")
6262

6363
include("MultiField.jl")
6464

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module DivConformingTests
1+
module DivAndCurlConformingTests
22
using SparseMatricesCSR
33
import Gridap: ∇, divergence, DIV
44
using Gridap
@@ -60,7 +60,7 @@ function setup_p2_model()
6060
end
6161

6262
function f(model,reffe,trian,das)
63-
V = FESpace(model,reffe,conformity=:Hdiv)
63+
V = FESpace(model,reffe)
6464
U = TrialFESpace(V)
6565

6666
degree = 2
@@ -133,6 +133,16 @@ function main(distribute,nranks)
133133
f(model,reffe,trian,das)
134134
f(trian,reffe,trian,das)
135135
f(Triangulation(model),reffe,trian,das)
136+
137+
reffe=ReferenceFE(nedelec,Float64,0)
138+
f(model,reffe,trian,das)
139+
f(trian,reffe,trian,das)
140+
f(Triangulation(model),reffe,trian,das)
141+
142+
reffe=ReferenceFE(QUAD, nedelec, 0)
143+
f(model,reffe,trian,das)
144+
f(trian,reffe,trian,das)
145+
f(Triangulation(model),reffe,trian,das)
136146
end
137147

138148
end # module
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module DivConformingTestsSeq
22
using PartitionedArrays
3-
include("../DivConformingTests.jl")
3+
include("../DivAndCurlConformingTests.jl")
44

55
with_debug() do distribute
6-
DivConformingTests.main(distribute,2)
6+
DivAndCurlConformingTests.main(distribute,2)
77
end
88

99
end # module

test/sequential/runtests.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ if TESTCASE ∈ ("all", "seq-fespaces")
1818
end
1919

2020
if TESTCASE ("all", "seq-physics")
21-
@time @testset "Poisson" begin include("PoissonTests.jl") end
22-
@time @testset "PLaplacian" begin include("PLaplacianTests.jl") end
23-
@time @testset "DivConformingTests" begin include("DivConformingTests.jl") end
24-
@time @testset "SurfaceCouplingTests" begin include("SurfaceCouplingTests.jl") end
25-
@time @testset "StokesHdivDGTests" begin include("StokesHdivDGTests.jl") end
26-
@time @testset "StokesOpenBoundary" begin include("StokesOpenBoundaryTests.jl") end
21+
@time @testset "Poisson" begin include("PoissonTests.jl") end
22+
@time @testset "PLaplacian" begin include("PLaplacianTests.jl") end
23+
@time @testset "DivAndCurlConformingTests" begin include("DivAndCurlConformingTests.jl") end
24+
@time @testset "SurfaceCouplingTests" begin include("SurfaceCouplingTests.jl") end
25+
@time @testset "StokesHdivDGTests" begin include("StokesHdivDGTests.jl") end
26+
@time @testset "StokesOpenBoundary" begin include("StokesOpenBoundaryTests.jl") end
2727
end
2828

2929
if TESTCASE ("all", "seq-transient")

0 commit comments

Comments
 (0)