Skip to content

Commit 256a332

Browse files
Merge branch 'Ferrite-FEM:master' into L2-pyr-wed
2 parents cffa3b1 + eb76ddc commit 256a332

57 files changed

Lines changed: 2245 additions & 1231 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
pre-commit:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
1515
env:
1616
# Skip runic-pre-commit since we use runic-action below instead
@@ -20,7 +20,7 @@ jobs:
2020
name: "Runic"
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v6
2424
- uses: julia-actions/setup-julia@v2
2525
with:
2626
version: '1.11'
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-latest
3434
name: "ExplicitImports.jl"
3535
steps:
36-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@v6
3737
# - uses: julia-actions/setup-julia@v2
3838
# with:
3939
# version: '1'

.github/workflows/Documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
tags: ['*']
77
jobs:
88
docs:
9-
name: Julia 1.11 - ubuntu-latest
9+
name: Julia 1.12 - ubuntu-latest
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 60
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414
- uses: julia-actions/setup-julia@v2
1515
with:
16-
version: '1.11'
16+
version: '1.12'
1717
- uses: julia-actions/cache@v2
1818
- name: Install dependencies
1919
run: julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()'

.github/workflows/Downstream.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
- {user: 'Ferrite-FEM', repo: 'FerriteInterfaceElements.jl'}
3030
# - {user: 'Ferrite-FEM', repo: 'FerriteViz.jl'} # Requires release
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6
3333
- uses: julia-actions/setup-julia@v2
3434
with:
3535
version: ${{ matrix.julia-version }}
3636
- uses: julia-actions/cache@v2
3737
# - uses: julia-actions/julia-buildpkg@v1
3838
- name: Clone Downstream
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@v6
4040
with:
4141
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
4242
path: downstream

.github/workflows/Test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ jobs:
99
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }}
1010
runs-on: ${{ matrix.os }}
1111
timeout-minutes: 40
12-
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
12+
continue-on-error: ${{ matrix.julia-version == 'pre' }}
1313
strategy:
1414
matrix:
15-
julia-version: ['1.10', '1', 'nightly']
15+
julia-version: ['lts', '1', 'pre']
1616
os: ['ubuntu-latest']
1717
include:
1818
- os: windows-latest
1919
julia-version: '1'
2020
- os: macOS-latest
2121
julia-version: '1'
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v6
2424
- uses: julia-actions/setup-julia@v2
2525
with:
2626
version: ${{ matrix.julia-version }}
@@ -34,7 +34,7 @@ jobs:
3434
Pkg.add("JET")
3535
Pkg.develop(path = pwd())
3636
include(joinpath(pwd(), "test/jet.jl"))
37-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.julia-version != 'nightly' }}
37+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.julia-version != 'pre' }}
3838
- uses: julia-actions/julia-processcoverage@v1
3939
with:
4040
directories: 'src,ext'

CHANGELOG.md

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

88
## [Next] - xxxx-xx-xx
99

10+
## [v1.3.0] - 2026-01-09
11+
1012
### Added
11-
- Support for directly assembling to `SparseMatrixCSR` (from `SparseMatricesCSR.jl`). ([#864])
13+
- New function `Ferrite.write_facetset` for exporting facet sets to VTK. ([#1132], [#1259])
14+
15+
### Documentation
16+
- Fix errors in incompressible elasticity tutorial. ([#1251])
17+
- Add utility for downloading meshes (and other assets) for tutorials. ([#1037])
18+
19+
## [v1.2.0] - 2025-11-14
20+
21+
### Added
22+
- Support for directly assembling to `SparseMatrixCSR` (from `SparseMatricesCSR.jl`). ([#864])
23+
- Enhance `generate_grid` to support outputting line meshes embedded in two and three
24+
spatial dimentions. ([#1122], [#1214])
25+
26+
### Fixes
27+
- Fix L2 projection of tensor fields on discontinuous interpolations. ([#1197], [#1198])
28+
- Fix VTK output of tensor data in embedded domains. ([#1212], [#1213])
29+
- Fix VTK nodal output for discontinuous output. ([#1194])
30+
- Fix `facetskeleton` for mixed grids. ([#1223])
31+
- Fix normal vector computation for boundary integration in embedded domains. ([#1226],
32+
[#1235])
33+
- Relax vector input type from `Vector` to `AbstractVector` in `evaluate_at_points!`.
34+
([#1183])
35+
- The result of grid coloring is now not dependent on iteration order of dictionaries and sets. This may change the coloring obtained from `create_coloring`
36+
compared to previous Ferrite versions.
1237

1338
### Documentation updates
14-
- Extended assembly docs with information on how to support direct assembly into new matrix types. ([#864])
39+
- Extended assembly docs with information on how to support direct assembly into new matrix
40+
types. ([#864])
41+
- Add a list of reserach papers where Ferrite was used for numbeir simulations. Please add
42+
your paper! ([#1221])
43+
- Add section on global and local DoF numbering. ([#1089])
44+
- Fix some typos and grammar ([#1210], [#1224], [#1228])
1545

1646
## [v1.1.0] - 2025-05-01
1747

@@ -873,6 +903,8 @@ poking into Ferrite internals:
873903
[v0.3.13]: https://github.com/Ferrite-FEM/Ferrite.jl/releases/tag/v0.3.13
874904
[v0.3.14]: https://github.com/Ferrite-FEM/Ferrite.jl/releases/tag/v0.3.14
875905
[v1.0.0]: https://github.com/Ferrite-FEM/Ferrite.jl/releases/tag/v1.0.0
906+
[v1.1.0]: https://github.com/Ferrite-FEM/Ferrite.jl/releases/tag/v1.1.0
907+
[v1.2.0]: https://github.com/Ferrite-FEM/Ferrite.jl/releases/tag/v1.2.0
876908
[#352]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/352
877909
[#363]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/363
878910
[#378]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/378
@@ -1045,6 +1077,8 @@ poking into Ferrite internals:
10451077
[#779]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/779
10461078
[#835]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/835
10471079
[#855]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/855
1080+
[#864]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/864
1081+
[#867]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/867
10481082
[#880]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/880
10491083
[#888]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/888
10501084
[#914]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/914
@@ -1054,7 +1088,31 @@ poking into Ferrite internals:
10541088
[#949]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/949
10551089
[#953]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/953
10561090
[#974]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/974
1091+
[#1044]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1044
1092+
[#1045]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1045
10571093
[#1058]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1058
10581094
[#1059]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1059
1095+
[#1063]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1063
10591096
[#1083]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1083
1097+
[#1089]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1089
10601098
[#1096]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1096
1099+
[#1122]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1122
1100+
[#1146]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1146
1101+
[#1151]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1151
1102+
[#1162]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1162
1103+
[#1176]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1176
1104+
[#1178]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1178
1105+
[#1183]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1183
1106+
[#1194]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1194
1107+
[#1197]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1197
1108+
[#1198]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1198
1109+
[#1210]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1210
1110+
[#1212]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1212
1111+
[#1213]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1213
1112+
[#1214]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1214
1113+
[#1221]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1221
1114+
[#1223]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1223
1115+
[#1224]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1224
1116+
[#1226]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1226
1117+
[#1228]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1228
1118+
[#1235]: https://github.com/Ferrite-FEM/Ferrite.jl/issues/1235

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Ferrite"
22
uuid = "c061ca5d-56c9-439f-9c0e-210fe06d3992"
3-
version = "1.1.0"
3+
version = "1.3.0"
44

55
[deps]
66
EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56"

benchmark/benchmark-cellvalues.jl

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
using Ferrite, BenchmarkTools
2+
3+
function element_routine(cv::CellValues)
4+
s = 0.0
5+
for q_point in 1:getnquadpoints(cv)
6+
= getdetJdV(cv, q_point)
7+
for i in 1:getnbasefunctions(cv)
8+
for j in 1:getnbasefunctions(cv)
9+
s += norm(shape_value(cv, q_point, i)) * norm(shape_gradient(cv, q_point, j)) *
10+
end
11+
end
12+
end
13+
return s
14+
end
15+
16+
function element_routine(cv::MultiFieldCellValues)
17+
s = 0.0
18+
for q_point in 1:getnquadpoints(cv)
19+
= getdetJdV(cv, q_point)
20+
for i in 1:getnbasefunctions(cv.s1)
21+
for j in 1:getnbasefunctions(cv.s1)
22+
s += norm(shape_value(cv.s1, q_point, i)) * norm(shape_gradient(cv.s1, q_point, j)) *
23+
end
24+
end
25+
end
26+
return s
27+
end
28+
29+
30+
CT = QuadraticHexahedron
31+
ip_geo = geometric_interpolation(CT)
32+
x = Ferrite.reference_coordinates(ip_geo)
33+
dim = Ferrite.getrefdim(ip_geo)
34+
RefShape = getrefshape(ip_geo)
35+
qr = QuadratureRule{RefShape}(2)
36+
ip1 = Lagrange{RefShape, 1}()
37+
ip2 = Lagrange{RefShape, 2}()
38+
39+
update_gradients = true
40+
update_hessians = false
41+
42+
cv_s1 = CellValues(qr, ip1, ip_geo; update_gradients, update_hessians)
43+
cv_v1 = CellValues(qr, ip1^dim, ip_geo; update_gradients, update_hessians)
44+
cv_s2 = CellValues(qr, ip2, ip_geo; update_gradients, update_hessians)
45+
cv_v2 = CellValues(qr, ip2^dim, ip_geo; update_gradients, update_hessians)
46+
47+
cmv_s1 = MultiFieldCellValues(qr, (s1 = ip1,), ip_geo; update_gradients, update_hessians)
48+
cmv_s1_square = MultiFieldCellValues(qr, (s1 = ip1, s2 = ip1), ip_geo; update_gradients, update_hessians)
49+
cmv_s1_v1 = MultiFieldCellValues(qr, (s1 = ip1, v1 = ip1^dim), ip_geo; update_gradients, update_hessians)
50+
cmv_s2_v2 = MultiFieldCellValues(qr, (s2 = ip2, v2 = ip2^dim), ip_geo; update_gradients, update_hessians)
51+
cmv_s1_v1_s2_v2 = MultiFieldCellValues(qr, (s1 = ip1, v1 = ip1^dim, s2 = ip2, v2 = ip2^dim), ip_geo; update_gradients, update_hessians)
52+
53+
for key in (
54+
:cv_s1, :cv_v1, :cv_s2, :cv_v2,
55+
:cmv_s1, :cmv_s1_square, :cmv_s1_v1, :cmv_s2_v2, :cmv_s1_v1_s2_v2,
56+
)
57+
cv = getproperty(Main, key)
58+
print(key, ": ")
59+
@btime reinit!($cv, $x)
60+
end
61+
62+
# Check that the indexing inside the element routine doesn't affect the performance
63+
for key in (:cv_s1, :cmv_s1_v1_s2_v2)
64+
cv = getproperty(Main, key)
65+
reinit!(cv, x)
66+
@btime element_routine($cv)
67+
end

0 commit comments

Comments
 (0)