Skip to content

Commit e3613f9

Browse files
authored
Merge pull request #109 from gridap/geometrical-derivatives
Geometrical derivatives
2 parents 92a1c5a + 5ff3fb0 commit e3613f9

35 files changed

+2451
-76
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
/docs/build/
77
/docs/site/
88
Manifest.toml
9+
LocalPreferences.toml
910
.vscode/
1011
*.swp

NEWS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [0.9.6] - 2025-04-19
88

99
### Added
1010

1111
- Added support for distributed level-set geometries. Since PR[#99](https://github.com/gridap/GridapEmbedded.jl/pull/99).
1212
- Refactored the distributed code to allow for ghosted/unghosted geometries and triangulations. Since PR[#100](https://github.com/gridap/GridapEmbedded.jl/pull/100).
13+
- Implemented geometrical derivatives. Since PR[#109](https://github.com/gridap/GridapEmbedded.jl/pull/109).
14+
- Added a proper documentation. Since PR[#109](https://github.com/gridap/GridapEmbedded.jl/pull/109).
1315

1416
### Changed
1517

Project.toml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
1+
authors = ["Francesc Verdugo <[email protected]>", "Eric Neiva <[email protected]>", "Pere Antoni Martorell <[email protected]>", "Santiago Badia <[email protected]>"]
12
name = "GridapEmbedded"
23
uuid = "8838a6a3-0006-4405-b874-385995508d5d"
3-
authors = ["Francesc Verdugo <[email protected]>", "Eric Neiva <[email protected]>", "Pere Antoni Martorell <[email protected]>", "Santiago Badia <[email protected]>"]
4-
version = "0.9.5"
4+
version = "0.9.6"
5+
6+
[compat]
7+
AbstractTrees = "0.3.3, 0.4"
8+
Algoim = "0.2.2"
9+
Combinatorics = "1"
10+
CxxWrap = "0.16"
11+
FillArrays = "0.10, 0.11, 0.12, 0.13, 1"
12+
FiniteDiff = "2.27.0"
13+
ForwardDiff = "0.10.38, 1"
14+
Graphs = "1.12.0"
15+
Gridap = "0.18.12"
16+
GridapDistributed = "0.3, 0.4"
17+
MPI = "0.20"
18+
MiniQhull = "0.1.0, 0.2, 0.3, 0.4"
19+
PartitionedArrays = "0.3.4"
20+
julia = "1.3"
521

622
[deps]
723
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
824
Algoim = "0eb9048c-21de-4c7a-bfac-056de1940b74"
925
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
1026
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4"
1127
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
28+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1229
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
1330
Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
1431
GridapDistributed = "f9701e48-63b3-45aa-9a63-9bc6c271f355"
@@ -20,22 +37,10 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2037
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2138
algoimWrapper_jll = "3c43aa7b-5398-51f3-8d75-8f051e6faa4d"
2239

23-
[compat]
24-
AbstractTrees = "0.3.3, 0.4"
25-
Algoim = "0.2.2"
26-
Combinatorics = "1"
27-
CxxWrap = "0.16"
28-
FillArrays = "0.10, 0.11, 0.12, 0.13, 1"
29-
Graphs = "1.12.0"
30-
Gridap = "0.17, 0.18"
31-
GridapDistributed = "0.3, 0.4"
32-
MPI = "0.20"
33-
MiniQhull = "0.1.0, 0.2, 0.3, 0.4"
34-
PartitionedArrays = "0.3.4"
35-
julia = "1.3"
36-
3740
[extras]
41+
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
42+
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
3843
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3944

4045
[targets]
41-
test = ["Test"]
46+
test = ["Test", "FiniteDiff"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Embedded finite element methods, level set surface descriptions and constructive solid geometry.
44

5+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://gridap.github.io/GridapEmbedded.jl/stable)
56
[![Build Status](https://github.com/gridap/GridapEmbedded.jl/workflows/CI/badge.svg?branch=master)](https://github.com/gridap/GridapEmbedded.jl/actions?query=workflow%3ACI)
67
[![Codecov](https://codecov.io/gh/gridap/GridapEmbedded.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/gridap/GridapEmbedded.jl)
78

@@ -40,4 +41,3 @@ julia> BimaterialLinElastCutFEM.main(n=4,outputfile="results3")
4041
```
4142

4243
<img src="https://raw.githubusercontent.com/gridap/GridapEmbedded.jl/master/examples/BimaterialLinElastCutFEM/BimaterialLinElastCutFEM_solution.png" width="400">
43-

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
GridapEmbedded = "8838a6a3-0006-4405-b874-385995508d5d"

docs/make.jl

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
using Documenter, GridapEmbedded
22

3+
pages = [
4+
"Home" => "index.md",
5+
"Constructive Solid Geometry (CSG)" => "CSG.md",
6+
"Embedded Interfaces" => "Interfaces.md",
7+
"Level Set Cutters" => "LevelSetCutters.md",
8+
"Aggregated FEM" => "AggregatedFEM.md",
9+
"Moment-Fitted Quadratures" => "MomentFittedQuadratures.md",
10+
"Geometrical Derivatives" => "GeometricalDerivatives.md",
11+
"Distributed computing" => "Distributed.md",
12+
]
13+
314
makedocs(;
4-
modules=[GridapEmbedded],
5-
format=Documenter.HTML(),
6-
pages=[
7-
"Home" => "index.md",
8-
],
9-
repo="https://github.com/gridap/GridapEmbedded.jl/blob/{commit}{path}#L{line}",
10-
sitename="GridapEmbedded.jl",
11-
authors="Francesc Verdugo <[email protected]>, Eric Neiva <[email protected]> and Santiago Badia <[email protected]>",
15+
modules = [GridapEmbedded],
16+
format = Documenter.HTML(
17+
size_threshold=nothing
18+
),
19+
sitename = "GridapEmbedded.jl",
20+
authors = "Francesc Verdugo <[email protected]>, Eric Neiva <[email protected]> and Santiago Badia <[email protected]>",
21+
pages = pages,
22+
warnonly = false,
1223
)
1324

1425
deploydocs(;

docs/src/AggregatedFEM.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
# Aggregated FEM
3+
4+
```@meta
5+
CurrentModule = GridapEmbedded.AgFEM
6+
```
7+
8+
```@autodocs
9+
Modules = [AgFEM,]
10+
Order = [:type, :constant, :macro, :function]
11+
Pages = [
12+
"/AgFEM.jl",
13+
"/AgFEMSpaces.jl",
14+
"CellAggregation.jl"
15+
]
16+
```

docs/src/CSG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
# Constructive Solid Geometry (CSG)
3+
4+
```@meta
5+
CurrentModule = GridapEmbedded.CSG
6+
```
7+
8+
```@autodocs
9+
Modules = [CSG,]
10+
Order = [:type, :constant, :macro, :function]
11+
Pages = [
12+
"/Nodes.jl",
13+
"/Geometries.jl",
14+
]
15+
```

docs/src/Distributed.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# Distributed computing
3+
4+
```@meta
5+
CurrentModule = GridapEmbedded.Distributed
6+
```
7+
8+
We support distributed computing through [GridapDistributed.jl](https://github.com/gridap/GridapDistributed.jl). As per usual, we design our libraries so that the high-level API is unchanged when using distributed computing. This means that for most users, the changes to your driver will be minimal.
9+
10+
The following features are currently supported:
11+
12+
- Level-Set Cutters
13+
- STL Cutters
14+
15+
The folowing features are not yet supported:
16+
17+
- Aggregated FEM
18+
- Moment-Fitted Quadratures
19+
20+
```@autodocs
21+
Modules = [Distributed,]
22+
Order = [:type, :constant, :macro, :function]
23+
```

docs/src/GeometricalDerivatives.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Geometrical Derivatives
2+
3+
```@meta
4+
CurrentModule = GridapEmbedded
5+
```
6+
7+
The geometrical differentiation capabilities are based on the following work:
8+
9+
!!! note "Reference"
10+
"Level-set topology optimisation with unfitted finite elements and automatic shape differentiation",
11+
by Z. J. Wegert, J. Manyer, C. Mallon, S. Badia, V. J. Challis (2025)
12+
13+
To see examples of usage, please refer to the tests in `test/LevelSetCuttersTests/GeometricalDifferentiationTests.jl`.
14+
15+
## Discretize then differentiate
16+
17+
```@autodocs
18+
Modules = [GridapEmbedded.Interfaces]
19+
Order = [:type, :constant, :macro, :function]
20+
Pages = [
21+
"/CutFaceBoundaryTriangulations.jl",
22+
]
23+
```
24+
25+
## Autodiff
26+
27+
```@autodocs
28+
Modules = [GridapEmbedded.LevelSetCutters]
29+
Order = [:type, :constant, :macro, :function]
30+
Pages = [
31+
"/DifferentiableTriangulations.jl",
32+
]
33+
```

0 commit comments

Comments
 (0)