Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.14] - 2026-03-20

### Changed

- Added support for Gridap 0.20.0. Since PR[#200](https://github.com/gridap/GridapDistributed.jl/pull/200).

## [0.4.13] - 2026-03-16

### Fixed

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

### Added

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

## [0.4.12] - 2026-03-14
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GridapDistributed"
uuid = "f9701e48-63b3-45aa-9a63-9bc6c271f355"
authors = ["S. Badia <santiago.badia@monash.edu>", "A. F. Martin <alberto.f.martin@anu.edu.au>", "F. Verdugo <f.verdugo.rojano@vu.nl>"]
version = "0.4.13"
version = "0.4.14"

[deps]
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
Expand All @@ -21,7 +21,7 @@ BlockArrays = "1"
CircularArrays = "1.4.0"
FillArrays = "1"
ForwardDiff = "0.10, 1"
Gridap = "0.19.9"
Gridap = "0.20.0"
LinearAlgebra = "1"
MPI = "0.16, 0.17, 0.18, 0.19, 0.20"
PartitionedArrays = "0.3.3"
Expand Down
177 changes: 0 additions & 177 deletions src/DivAndCurlConformingFESpaces.jl

This file was deleted.

106 changes: 83 additions & 23 deletions src/FESpaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -437,22 +437,26 @@ function FESpaces.HomogeneousTrialFESpace(f::DistributedSingleFieldFESpace)
end

function generate_gids(
model::DistributedDiscreteModel{Dc},
model::DistributedDiscreteModel,
spaces::AbstractArray{<:SingleFieldFESpace}
) where Dc
cell_to_ldofs = map(get_cell_dof_ids,spaces)
nldofs = map(num_free_dofs,spaces)
)
cell_gids = get_cell_gids(model)
generate_gids(cell_gids,cell_to_ldofs,nldofs)
generate_gids(cell_gids,spaces)
end

function generate_gids(
trian::DistributedTriangulation{Dc},
trian::DistributedTriangulation,
spaces::AbstractArray{<:SingleFieldFESpace}
) where Dc
)
cell_gids = generate_cell_gids(trian)
generate_gids(cell_gids,spaces)
end

function generate_gids(
cell_gids::PRange, spaces::AbstractArray{<:SingleFieldFESpace}
)
cell_to_ldofs = map(get_cell_dof_ids,spaces)
nldofs = map(num_free_dofs,spaces)
cell_gids = generate_cell_gids(trian)
generate_gids(cell_gids,cell_to_ldofs,nldofs)
end

Expand Down Expand Up @@ -537,30 +541,76 @@ end

# Factories

# function FESpaces.FESpace(
# model::DistributedDiscreteModel,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
# )
# spaces = map(local_views(model)) do m
# FESpace(m,reffe;kwargs...)
# end
# gids = generate_gids(model,spaces)
# trian = DistributedTriangulation(map(get_triangulation,spaces),model)
# vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
# space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
# return _add_distributed_constraint(space,reffe,constraint)
# end
#
# function FESpaces.FESpace(
# _trian::DistributedTriangulation,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
# )
# trian = add_ghost_cells(_trian)
# spaces = map(local_views(trian)) do t
# FESpace(t,reffe;kwargs...)
# end
# gids = generate_gids(trian,spaces)
# vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
# space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
# return _add_distributed_constraint(space,reffe,constraint)
# end

function FESpaces.FESpace(
model::DistributedDiscreteModel,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
model::DistributedDiscreteModel,args...;kwargs...
)
spaces = map(local_views(model)) do m
FESpace(m,reffe;kwargs...)
end
gids = generate_gids(model,spaces)
trian = DistributedTriangulation(map(get_triangulation,spaces),model)
vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
return _add_distributed_constraint(space,reffe,constraint)
trian = Triangulation(with_ghost,model)
cell_gids = get_cell_gids(model)
DistributedSingleFieldFESpace(model,trian,cell_gids,args...;kwargs...)
end

function FESpaces.FESpace(
_trian::DistributedTriangulation,reffe;split_own_and_ghost=false,constraint=nothing,kwargs...
_trian::DistributedTriangulation,args...;kwargs...
)
trian = add_ghost_cells(_trian)
spaces = map(local_views(trian)) do t
FESpace(t,reffe;kwargs...)
cell_gids = generate_cell_gids(trian)
model = DistributedDiscreteModel(map(get_active_model,local_views(trian)), cell_gids)
DistributedSingleFieldFESpace(model,trian,cell_gids,args...;kwargs...)
end

function DistributedSingleFieldFESpace(
model::DistributedDiscreteModel,
trian::DistributedTriangulation,
cell_gids::PRange, reffe; kwargs...
)
cell_reffe = map(local_views(model)) do model
ReferenceFE(model,reffe)
end
gids = generate_gids(trian,spaces)
vector_type = _find_vector_type(spaces,gids;split_own_and_ghost=split_own_and_ghost)
DistributedSingleFieldFESpace(model,trian,cell_gids,cell_reffe;kwargs...)
end

function DistributedSingleFieldFESpace(
model::DistributedDiscreteModel, # Active model, not bg model
trian::DistributedTriangulation,
cell_gids::PRange,
cell_reffe::AbstractArray;
split_own_and_ghost=false,
constraint=nothing,
kwargs...
)
spaces = map(local_views(model),local_views(trian),cell_reffe) do model, trian, cell_reffe
FESpace(model,cell_reffe;trian,kwargs...)
end
gids = generate_gids(cell_gids,spaces)
vector_type = _find_vector_type(spaces,gids;split_own_and_ghost)
space = DistributedSingleFieldFESpace(spaces,gids,trian,vector_type)
return _add_distributed_constraint(space,reffe,constraint)
return _add_distributed_constraint(space,cell_reffe,constraint)
end

function _find_vector_type(spaces,gids;split_own_and_ghost=false)
Expand Down Expand Up @@ -595,6 +645,16 @@ function _add_distributed_constraint(
_add_distributed_constraint(F,order,constraint)
end

function _add_distributed_constraint(
F::DistributedFESpace,cell_reffe::AbstractArray,constraint
)
reffe = map(cell_reffe) do cell_reffe
reffes, ctypes = compress_cell_data(cell_reffe)
return only(reffes)
end |> getany
_add_distributed_constraint(F,reffe,constraint)
Comment on lines +651 to +655
end

function _add_distributed_constraint(F::DistributedFESpace,order::Integer,constraint)
if isnothing(constraint)
V = F
Expand Down
2 changes: 1 addition & 1 deletion src/GridapDistributed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ include("Visualization.jl")

include("FESpaces.jl")

include("DivAndCurlConformingFESpaces.jl")
include("Pullbacks.jl")

include("MultiField.jl")

Expand Down
Loading
Loading