diff --git a/NEWS.md b/NEWS.md index bf10ca45..5d4678dd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.16] - 2026-04-29 + +### Fixed + +- `get_facet_owners(::DistributeDiscreteModel)` now chooses the owner with maximum gid. Since PR[#205](https://github.com/gridap/GridapDistributed.jl/pull/205). + ## [0.4.15] - 2026-03-23 ### Fixed diff --git a/Project.toml b/Project.toml index 3cf1ed81..8bb21ec8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GridapDistributed" uuid = "f9701e48-63b3-45aa-9a63-9bc6c271f355" authors = ["S. Badia ", "A. F. Martin ", "F. Verdugo "] -version = "0.4.15" +version = "0.4.16" [deps] BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" @@ -21,14 +21,14 @@ BlockArrays = "1" CircularArrays = "1.4.0" FillArrays = "1" ForwardDiff = "0.10, 1" -Gridap = "0.20.1" +Gridap = "0.20.6" LinearAlgebra = "1" MPI = "0.16, 0.17, 0.18, 0.19, 0.20" PartitionedArrays = "0.3.3" SparseArrays = "1.3" SparseMatricesCSR = "0.6.6" WriteVTK = "1.12.0" -julia = "1.3" +julia = "1.10" [extras] MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" diff --git a/src/Pullbacks.jl b/src/Pullbacks.jl index d8d0bbae..420f89fe 100644 --- a/src/Pullbacks.jl +++ b/src/Pullbacks.jl @@ -4,7 +4,7 @@ # simply go through the local FESpace constructor. const PullbackReffes = Union{ GenericRefFE{RaviartThomas}, - GenericRefFE{Nedelec}, + GenericRefFE{<:Nedelec}, } function DistributedSingleFieldFESpace( @@ -89,7 +89,7 @@ function FESpaces.compute_cell_bases_changes( poly = map(get_polytopes, local_views(model)) |> getany |> only if (D==2) || is_simplex(poly) # For these cases, we do not need to apply a sign flip - return nothing + return map(_->nothing,cell_reffe) elseif (D==3) && is_n_cube(poly) change = FESpaces.get_sign_flip(model, cell_reffe) return map(c -> (c, c), change) @@ -109,7 +109,22 @@ function FESpaces.compute_facet_owners(model::DistributedDiscreteModel) Dc = num_cell_dims(model) cell_ids = partition(get_cell_gids(model)) facet_ids = partition(get_face_gids(model, Dc-1)) - facet_to_owner = map(FESpaces.compute_facet_owners, local_views(model)) + + function select_nbor_with_max_gid(nbor_lids, lid_to_gid) + max_lid, max_gid = -1, -1 + for lid in nbor_lids + gid = lid_to_gid[lid] + if gid > max_gid + max_lid, max_gid = lid, gid + end + end + return max_lid + end + facet_to_owner = map(local_views(model), cell_ids) do model, cell_ids + lid_to_gid = local_to_global(cell_ids) + select_nbor = Base.Fix2(select_nbor_with_max_gid, lid_to_gid) + return FESpaces.compute_facet_owners(model, select_nbor) + end # Map local owners to global ids map(facet_to_owner, cell_ids) do facet_to_owner, cell_ids