Skip to content

Commit 8ca66b6

Browse files
committed
Merge branch 'master' of github.com:gridap/GridapDistributed.jl into polytopal
2 parents 3ccf163 + 779c7fa commit 8ca66b6

6 files changed

Lines changed: 281 additions & 118 deletions

File tree

NEWS.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [0.4.10] - 2025-09-29
99

1010
### Added
1111

1212
- Added support for multiple ghost layers on cartesian models. Since PR[#182](https://github.com/gridap/GridapDistributed.jl/pull/182).
13+
- Added new way of doing AD for MultiField, where partials are computed separately for each field then merged together. Since PR[#176](https://github.com/gridap/GridapDistributed.jl/pull/176).
14+
15+
### Fixed
16+
17+
- Fixed issue [#177](https://github.com/gridap/GridapDistributed.jl/issues/177) and [#170](https://github.com/gridap/GridapDistributed.jl/issues/170). Since PR[#180](https://github.com/gridap/GridapDistributed.jl/pull/180).
18+
- Fixed issue where calling `Boundary(with_ghost, dmodel)` would return the local processor boundaries (which include the faces at the interface between processors) instead of returning the local part of the global boundary. Since PR[#180](https://github.com/gridap/GridapDistributed.jl/pull/180).
1319

1420
## [0.4.9] - 2025-08-08
1521

@@ -154,7 +160,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
154160

155161
### Fixed
156162

157-
- Added missing parameter to `allocate_jacobian`, needed after Gridap v0.17.18. Since PR [126](https://github.com/gridap/GridapDistributed.jl/pull/126).
163+
- Added missing parameter to `allocate_jacobian`, needed after Gridap v0.17.18. Since PR [126](https://github.com/gridap/GridapDistributed.jl/pull/126).
158164

159165
## [0.2.8] - 2023-07-31
160166

Project.toml

Lines changed: 1 addition & 1 deletion
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.9"
4+
version = "0.4.10"
55

66
[deps]
77
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"

src/Autodiff.jl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,34 @@ function FESpaces._change_argument(op,f,local_trians,uh::DistributedADTypes)
8080
g
8181
end
8282

83+
# Distributed counterpart of: src/MultiField/MultiFieldAutodiff.jl
84+
85+
for (op,_op) in ((:gradient,:_gradient),(:jacobian,:_jacobian))
86+
@eval begin
87+
function FESpaces.$(op)(f::Function,uh::DistributedMultiFieldFEFunction;ad_type=:split)
88+
fuh = f(uh)
89+
if ad_type == :split
90+
MultiField.multifield_autodiff_split($op,f,uh,fuh)
91+
elseif ad_type == :monolithic
92+
FESpaces.$(_op)(f,uh,fuh)
93+
else
94+
@notimplemented """Unknown ad_type = $ad_type
95+
Options:
96+
- :split -- compute the gradient for each field separately, then merge
97+
- :monolithic -- compute the gradient for all fields together
98+
"""
99+
end
100+
end
101+
end
102+
end
103+
104+
function MultiField._combine_contributions(op::Function,terms,fuh::DistributedDomainContribution)
105+
local_terms = map(local_views(fuh),local_views.(terms)...) do fuh,terms...
106+
MultiField._combine_contributions(op,terms,fuh)
107+
end
108+
DistributedDomainContribution(local_terms)
109+
end
110+
83111
# Distributed counterpart of: src/Arrays/Autodiff.jl
84112
# autodiff_array_xxx
85113

0 commit comments

Comments
 (0)