Skip to content

Commit 4b45329

Browse files
Merge master
2 parents 0f42594 + 62c1e4c commit 4b45329

62 files changed

Lines changed: 2874 additions & 1878 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: julia-actions/cache@v2
2828
- uses: fredrikekre/runic-action@v1
2929
with:
30-
version: "d9a27b9d6279a103fedc7202258207a7b7afe18c"
30+
version: "1.4" # Keep version in sync with .pre-commit-config.yaml
3131

3232
explicit-imports:
3333
runs-on: ubuntu-latest

.github/workflows/Test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ jobs:
3838
- uses: julia-actions/julia-processcoverage@v1
3939
with:
4040
directories: 'src,ext'
41-
- uses: codecov/codecov-action@v4
41+
- uses: codecov/codecov-action@v5
4242
with:
43-
file: lcov.info
43+
files: lcov.info
44+
plugins: noop
45+
disable_search: true
4446
env:
4547
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ repos:
1010
- id: mixed-line-ending
1111
- id: trailing-whitespace
1212
- repo: 'https://github.com/fredrikekre/runic-pre-commit'
13-
rev: v1.0.0
13+
rev: v2.0.1
1414
hooks:
1515
- id: runic
16+
additional_dependencies:
17+
- 'Runic@1.4' # Keep version in sync with .github/workflows/Check.yml

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ more discussion).
153153
- ip_function = Lagrange{2, RefTetrahedron, 2}()
154154
- ip_geometry = Lagrange{2, RefTetrahedron, 1}()
155155
- cv = CellScalarValues(qr, ip_function, ip_geometry)
156-
+ ip_function = Lagrange{2, RefTetrahedron, 2}()
156+
+ ip_function = Lagrange{RefTriangle, 2}()
157157
+ cv = CellValues(qr, ip_function)
158158
```
159159
and if you have quadratic (or higher order) elements in the grid you must now pass the
@@ -162,8 +162,8 @@ more discussion).
162162
qr = QuadratureRule(...)
163163
- ip_function = Lagrange{2, RefTetrahedron, 2}()
164164
- cv = CellScalarValues(qr, ip_function)
165-
+ ip_function = Lagrange{2, RefTetrahedron, 2}()
166-
+ ip_geometry = Lagrange{2, RefTetrahedron, 1}()
165+
+ ip_function = Lagrange{RefTriangle, 2}()
166+
+ ip_geometry = Lagrange{RefTriangle, 1}()
167167
+ cv = CellValues(qr, ip_function, ip_geometry)
168168
```
169169

CONTRIBUTING.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,39 +70,21 @@ issues][open-issues].
7070
Remember to always include (when applicable): i) unit tests which exercises the new code,
7171
ii) documentation, iii) a note in the [CHANGELOG.md](CHANGELOG.md) file.
7272

73-
### Code formatting
73+
### Code formatting and pre-commit hooks
7474

75-
Ferrite uses [Runic.jl][runic] for code formatting. You can install Runic with the following
76-
command:
75+
Ferrite uses [Runic.jl][runic] for code formatting, see the [README][runic-readme] for
76+
details on how to install and run manually. Alternatively, you can use Ferrite's
77+
[pre-commit] setup to run the same formatting checks as the github actions,
78+
including Runic formatting.
7779

78-
```shell
79-
julia --project=@runic -e 'using Pkg; Pkg.add(url = "https://github.com/fredrikekre/Runic.jl")'
80-
```
81-
82-
and you can then run the formatter from the root of the repository with:
83-
84-
```shell
85-
julia --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace .
86-
```
87-
88-
Refer to the Runic.jl [README][runic-readme] for more details (such as editor integration).
89-
90-
91-
### pre-commit hooks
92-
93-
Ferrite uses [pre-commit] to run various checks (including Runic formatting). After
94-
installing pre-commit (refer to the [pre-commit installation
95-
instructions][pre-commit-install]) run the following from the root of the repository to
80+
After installing pre-commit (refer to the [pre-commit installation
81+
instructions][pre-commit-install]), run the following from the root of the repository to
9682
configure pre-commit to run before each commit:
9783

9884
```shell
9985
pre-commit install
10086
```
10187

102-
Note that this currently requires Runic.jl to be installed in the shared `@runic`
103-
environment according to the instructions above.
104-
105-
10688
[documenter]: https://juliadocs.github.io/Documenter.jl/
10789
[first-contributions]: https://github.com/firstcontributions/first-contributions
10890
[gh-edit-files]: https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files#editing-files-in-another-users-repository

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b"
5252
NBInclude = "0db19996-df87-5ea3-a455-e3a50d440464"
5353
OhMyThreads = "67456a42-1dca-4109-a031-0a68de7e3ad5"
5454
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
55+
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
5556
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
5657
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
5758
SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1"
@@ -60,4 +61,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6061
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
6162

6263
[targets]
63-
test = ["BlockArrays", "Downloads", "FerriteGmsh", "ForwardDiff", "Gmsh", "IterativeSolvers", "Metis", "NBInclude", "OhMyThreads", "ProgressMeter", "Random", "SHA", "SparseMatricesCSR", "TaskLocalValues", "Test", "TimerOutputs", "Logging"]
64+
test = ["BlockArrays", "Downloads", "FerriteGmsh", "ForwardDiff", "Gmsh", "IterativeSolvers", "Metis", "NBInclude", "OhMyThreads", "ProgressMeter", "Random", "SHA", "SparseMatricesCSR", "TaskLocalValues", "Test", "TimerOutputs", "Logging", "QuadGK"]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<img alt="Ferrite.jl logo." src="https://github.com/Ferrite-FEM/Ferrite.jl/blob/master/docs/src/assets/logo-horizontal.svg">
55
</picture>
66

7-
![Build Status](https://github.com/Ferrite-FEM/Ferrite.jl/workflows/CI/badge.svg?event=push)
7+
[![Test Status](https://github.com/Ferrite-FEM/Ferrite.jl/actions/workflows/Test.yml/badge.svg?branch=master&event=push)](https://github.com/Ferrite-FEM/Ferrite.jl/actions/workflows/Test.yml)
88
[![codecov.io](https://codecov.io/github/Ferrite-FEM/Ferrite.jl/coverage.svg?branch=master)](https://codecov.io/github/Ferrite-FEM/Ferrite.jl?branch=master)
9+
[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl)
910
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13862652.svg)](https://doi.org/10.5281/zenodo.13862652)
1011

1112
A finite element toolbox written in Julia.

benchmark/benchmarks-dofs.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,30 @@ for spatial_dim in [3] # 1:3
3636

3737
LAGRANGE_SUITE["DofHandler"] = BenchmarkGroup()
3838

39-
close_helper = function(grid, ip)
39+
close_helper = function (grid, ip)
4040
dh = DofHandler(grid)
4141
push!(dh, :u, field_dim, ip)
4242
return close!(dh)
4343
end
4444
LAGRANGE_SUITE["DofHandler"]["one-field"] = @benchmarkable $close_helper($grid, $ip)
4545

46-
close_helper = function(grid, ip, ip2)
46+
close_helper = function (grid, ip, ip2)
4747
dh = DofHandler(grid)
4848
push!(dh, :u, field_dim, ip)
4949
push!(dh, :p, 1, ip2)
5050
return close!(dh)
5151
end
5252
LAGRANGE_SUITE["DofHandler"]["two-fields"] = @benchmarkable $close_helper($grid, $ip, $ip2)
5353

54-
close_helper = function(grid)
54+
close_helper = function (grid)
5555
dh = DofHandler(grid)
5656
sdh = SubDofHandler(dh, Set(1:Int(round(getncells(grid) / 2))))
5757
add!(sdh, :u, ip^field_dim)
5858
return close!(dh)
5959
end
6060
LAGRANGE_SUITE["DofHandler"]["one-field-subdomain"] = @benchmarkable $close_helper($grid)
6161

62-
close_helper = function(grid)
62+
close_helper = function (grid)
6363
dh = DofHandler(grid)
6464
sdh = SubDofHandler(dh, Set(1:Int(round(getncells(grid) / 2))))
6565
add!(sdh, :u, ip^field_dim)

docs/src/devdocs/FEValues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Ferrite.BCValues
2222
## Internal utilities
2323
```@docs
2424
Ferrite.embedding_det
25-
Ferrite.shape_value_type
25+
Ferrite.shape_value_type(::Ferrite.AbstractValues)
2626
Ferrite.shape_gradient_type
2727
Ferrite.ValuesUpdateFlags
2828
```

docs/src/devdocs/dofhandler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Dof Handler](@id dofhandler-interpolations)
1+
# [Dof handler](@id dofhandler-interpolations)
22

33
## Type definitions
44

0 commit comments

Comments
 (0)