Skip to content

Commit cbd7197

Browse files
authored
Merge pull request #200 from gridap/gridap-0.20
Support for Gridap 0.20
2 parents 03499e6 + a08290d commit cbd7197

13 files changed

+441
-417
lines changed

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.4.14] - 2026-03-20
11+
12+
### Changed
13+
14+
- Added support for Gridap 0.20.0. Since PR[#200](https://github.com/gridap/GridapDistributed.jl/pull/200).
15+
1016
## [0.4.13] - 2026-03-16
1117

1218
### Fixed
19+
1320
- BUG fix in `_generate_sign_flips(...)` private helper function for Nedelec elements. Since PR[#199](https://github.com/gridap/GridapDistributed.jl/pull/199).
1421

1522
### Added
23+
1624
- An Hcurl projection test case. Since PR[#199](https://github.com/gridap/GridapDistributed.jl/pull/199).
1725

1826
## [0.4.12] - 2026-03-14

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GridapDistributed"
22
uuid = "f9701e48-63b3-45aa-9a63-9bc6c271f355"
33
authors = ["S. Badia <santiago.badia@monash.edu>", "A. F. Martin <alberto.f.martin@anu.edu.au>", "F. Verdugo <f.verdugo.rojano@vu.nl>"]
4-
version = "0.4.13"
4+
version = "0.4.14"
55

66
[deps]
77
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
@@ -21,7 +21,7 @@ BlockArrays = "1"
2121
CircularArrays = "1.4.0"
2222
FillArrays = "1"
2323
ForwardDiff = "0.10, 1"
24-
Gridap = "0.19.9"
24+
Gridap = "0.20.0"
2525
LinearAlgebra = "1"
2626
MPI = "0.16, 0.17, 0.18, 0.19, 0.20"
2727
PartitionedArrays = "0.3.3"

src/DivAndCurlConformingFESpaces.jl

Lines changed: 0 additions & 177 deletions
This file was deleted.

src/FESpaces.jl

Lines changed: 83 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -437,22 +437,26 @@ function FESpaces.HomogeneousTrialFESpace(f::DistributedSingleFieldFESpace)
437437
end
438438

439439
function generate_gids(
440-
model::DistributedDiscreteModel{Dc},
440+
model::DistributedDiscreteModel,
441441
spaces::AbstractArray{<:SingleFieldFESpace}
442-
) where Dc
443-
cell_to_ldofs = map(get_cell_dof_ids,spaces)
444-
nldofs = map(num_free_dofs,spaces)
442+
)
445443
cell_gids = get_cell_gids(model)
446-
generate_gids(cell_gids,cell_to_ldofs,nldofs)
444+
generate_gids(cell_gids,spaces)
447445
end
448446

449447
function generate_gids(
450-
trian::DistributedTriangulation{Dc},
448+
trian::DistributedTriangulation,
451449
spaces::AbstractArray{<:SingleFieldFESpace}
452-
) where Dc
450+
)
451+
cell_gids = generate_cell_gids(trian)
452+
generate_gids(cell_gids,spaces)
453+
end
454+
455+
function generate_gids(
456+
cell_gids::PRange, spaces::AbstractArray{<:SingleFieldFESpace}
457+
)
453458
cell_to_ldofs = map(get_cell_dof_ids,spaces)
454459
nldofs = map(num_free_dofs,spaces)
455-
cell_gids = generate_cell_gids(trian)
456460
generate_gids(cell_gids,cell_to_ldofs,nldofs)
457461
end
458462

@@ -537,30 +541,76 @@ end
537541

538542
# Factories
539543

544+
# function FESpaces.FESpace(
545+
# model::DistributedDiscreteModel,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
546+
# )
547+
# spaces = map(local_views(model)) do m
548+
# FESpace(m,reffe;kwargs...)
549+
# end
550+
# gids = generate_gids(model,spaces)
551+
# trian = DistributedTriangulation(map(get_triangulation,spaces),model)
552+
# vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
553+
# space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
554+
# return _add_distributed_constraint(space,reffe,constraint)
555+
# end
556+
#
557+
# function FESpaces.FESpace(
558+
# _trian::DistributedTriangulation,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
559+
# )
560+
# trian = add_ghost_cells(_trian)
561+
# spaces = map(local_views(trian)) do t
562+
# FESpace(t,reffe;kwargs...)
563+
# end
564+
# gids = generate_gids(trian,spaces)
565+
# vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
566+
# space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
567+
# return _add_distributed_constraint(space,reffe,constraint)
568+
# end
569+
540570
function FESpaces.FESpace(
541-
model::DistributedDiscreteModel,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
571+
model::DistributedDiscreteModel,args...;kwargs...
542572
)
543-
spaces = map(local_views(model)) do m
544-
FESpace(m,reffe;kwargs...)
545-
end
546-
gids = generate_gids(model,spaces)
547-
trian = DistributedTriangulation(map(get_triangulation,spaces),model)
548-
vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
549-
space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
550-
return _add_distributed_constraint(space,reffe,constraint)
573+
trian = Triangulation(with_ghost,model)
574+
cell_gids = get_cell_gids(model)
575+
DistributedSingleFieldFESpace(model,trian,cell_gids,args...;kwargs...)
551576
end
552577

553578
function FESpaces.FESpace(
554-
_trian::DistributedTriangulation,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
579+
_trian::DistributedTriangulation,args...;kwargs...
555580
)
556581
trian = add_ghost_cells(_trian)
557-
spaces = map(local_views(trian)) do t
558-
FESpace(t,reffe;kwargs...)
582+
cell_gids = generate_cell_gids(trian)
583+
model = DistributedDiscreteModel(map(get_active_model,local_views(trian)), cell_gids)
584+
DistributedSingleFieldFESpace(model,trian,cell_gids,args...;kwargs...)
585+
end
586+
587+
function DistributedSingleFieldFESpace(
588+
model::DistributedDiscreteModel,
589+
trian::DistributedTriangulation,
590+
cell_gids::PRange, reffe; kwargs...
591+
)
592+
cell_reffe = map(local_views(model)) do model
593+
ReferenceFE(model,reffe)
559594
end
560-
gids = generate_gids(trian,spaces)
561-
vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
595+
DistributedSingleFieldFESpace(model,trian,cell_gids,cell_reffe;kwargs...)
596+
end
597+
598+
function DistributedSingleFieldFESpace(
599+
model::DistributedDiscreteModel, # Active model, not bg model
600+
trian::DistributedTriangulation,
601+
cell_gids::PRange,
602+
cell_reffe::AbstractArray;
603+
split_own_and_ghost=false,
604+
constraint=nothing,
605+
kwargs...
606+
)
607+
spaces = map(local_views(model),local_views(trian),cell_reffe) do model, trian, cell_reffe
608+
FESpace(model,cell_reffe;trian,kwargs...)
609+
end
610+
gids = generate_gids(cell_gids,spaces)
611+
vector_type = _find_vector_type(spaces,gids;split_own_and_ghost)
562612
space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
563-
return _add_distributed_constraint(space,reffe,constraint)
613+
return _add_distributed_constraint(space,cell_reffe,constraint)
564614
end
565615

566616
function _find_vector_type(spaces,gids;split_own_and_ghost=false)
@@ -595,6 +645,16 @@ function _add_distributed_constraint(
595645
_add_distributed_constraint(F,order,constraint)
596646
end
597647

648+
function _add_distributed_constraint(
649+
F::DistributedFESpace,cell_reffe::AbstractArray,constraint
650+
)
651+
reffe = map(cell_reffe) do cell_reffe
652+
reffes, ctypes = compress_cell_data(cell_reffe)
653+
return only(reffes)
654+
end |> getany
655+
_add_distributed_constraint(F,reffe,constraint)
656+
end
657+
598658
function _add_distributed_constraint(F::DistributedFESpace,order::Integer,constraint)
599659
if isnothing(constraint)
600660
V = F

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("DivAndCurlConformingFESpaces.jl")
61+
include("Pullbacks.jl")
6262

6363
include("MultiField.jl")
6464

0 commit comments

Comments
 (0)