Skip to content

Commit 2ecfdd4

Browse files
Add spellchecking action (#865)
Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
1 parent bb00660 commit 2ecfdd4

21 files changed

Lines changed: 76 additions & 33 deletions

.github/workflows/SpellCheck.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Spell Check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
typos-check:
7+
name: Spell Check with Typos
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions Repository
11+
uses: actions/checkout@v6
12+
- name: Check spelling
13+
uses: crate-ci/typos@v1.44.0

.typos.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[files]
2+
extend-exclude = ["*.svg", "*.toml"]
3+
4+
[default.extend-words]
5+
ue = "ue"
6+
ba = "ba"
7+
nd = "nd"
8+
9+
[type.qrtables]
10+
extend-glob = ["**/gaussquad_*_table.jl", "**/generate_quadrature.jl"]
11+
12+
[type.qrtables.extend-words]
13+
Methode = "Methode"
14+
Numer = "Numer"
15+
Secrest = "Secrest"
16+
17+
[type.feintro]
18+
extend-glob = ["**/fe_intro.md"]
19+
20+
[type.feintro.extend-words]
21+
Strang = "Strang"

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
### Added
2222
- Support for directly assembling to `SparseMatrixCSR` (from `SparseMatricesCSR.jl`). ([#864])
2323
- Enhance `generate_grid` to support outputting line meshes embedded in two and three
24-
spatial dimentions. ([#1122], [#1214])
24+
spatial dimensions. ([#1122], [#1214])
2525

2626
### Fixes
2727
- Fix L2 projection of tensor fields on discontinuous interpolations. ([#1197], [#1198])
@@ -38,7 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3838
### Documentation updates
3939
- Extended assembly docs with information on how to support direct assembly into new matrix
4040
types. ([#864])
41-
- Add a list of reserach papers where Ferrite was used for numbeir simulations. Please add
41+
- Add a list of research papers where Ferrite was used for simulations. Please add
4242
your paper! ([#1221])
4343
- Add section on global and local DoF numbering. ([#1089])
4444
- Fix some typos and grammar ([#1210], [#1224], [#1228])
@@ -687,7 +687,7 @@ poking into Ferrite internals:
687687
- Fix grid coloring for cell sets with 0 or 1 cells. ([#600])
688688
### Other improvements
689689
- Documentation improvements:
690-
- Simplications and clarifications to hyperelasticity example. ([#591])
690+
- Simplifications and clarifications to hyperelasticity example. ([#591])
691691
- Remove duplicate docstring entry for `vtk_point_data`. ([#602])
692692
- Update documentation about initial conditions. ([#601], [#604])
693693

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ configure pre-commit to run before each commit:
8585
pre-commit install
8686
```
8787

88+
### Spell-checking
89+
Ferrite uses [typos] for spell checking. If you have that installed,
90+
you run it locally with by running `typos` from the top level directory.
91+
To fix mistakes automatically, run `typos -w`, but be careful as e.g. names
92+
and words from other languages might be incorrectly corrected (which is why
93+
it is not included as a [pre-commit] hook). Exceptions should be added to
94+
`.typos.toml`.
95+
8896
[documenter]: https://juliadocs.github.io/Documenter.jl/
8997
[first-contributions]: https://github.com/firstcontributions/first-contributions
9098
[gh-edit-files]: https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files#editing-files-in-another-users-repository
@@ -101,3 +109,4 @@ pre-commit install
101109
[so-mre]: https://stackoverflow.com/help/minimal-reproducible-example
102110
[tim-doc]: https://youtu.be/ZpH1ry8qqfw
103111
[tim-git]: https://youtu.be/cquJ9kPkwR8
112+
[typos]: https://github.com/crate-ci/typos

docs/src/devdocs/interpolations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Ferrite.adjust_dofs_during_distribution(::QTI) = false
177177
```
178178

179179
Finally, our interpolation results in continuous function values across
180-
cell borders, but the derivatives are discontinous. Hence, it describes
180+
cell borders, but the derivatives are discontinuous. Hence, it describes
181181
a $H_1$ conformity,
182182
```@example InterpolationExample
183183
Ferrite.conformity(::QTI) = Ferrite.H1Conformity()

docs/src/literate-gallery/topology_optimization.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# \nabla \chi_p \cdot \textbf{n} = \frac{1}{\Delta h} (\chi_w - \chi_e) = 0
5959
# ```
6060
# from which follows $\chi_w = \chi_e$. Thus for boundary elements we can replace the value for the missing neighbor by the value of the opposite neighbor.
61-
# In order to find the corresponding neighbor elements, we will make use of Ferrites grid topology funcionalities.
61+
# In order to find the corresponding neighbor elements, we will make use of Ferrite's grid topology functionalities.
6262
#
6363
# ## Commented Program
6464
# We now solve the problem in Ferrite. What follows is a program spliced with comments.
@@ -188,7 +188,7 @@ function compute_densities(states, dh)
188188
end
189189
#md nothing # hide
190190

191-
# For the Laplacian we need some neighboorhood information which is constant throughout the analysis so we compute it once and cache it.
191+
# For the Laplacian we need some neighborhood information which is constant throughout the analysis so we compute it once and cache it.
192192
# We iterate through each facet of each element,
193193
# obtaining the neighboring element by using the `getneighborhood` function. For boundary facets,
194194
# the function call will return an empty object. In that case we use the dictionary to instead find the opposite
@@ -218,7 +218,7 @@ function cache_neighborhood(dh, topology)
218218
end
219219
#md nothing # hide
220220

221-
# Now we calculate the Laplacian using the previously cached neighboorhood information.
221+
# Now we calculate the Laplacian using the previously cached neighborhood information.
222222
function approximate_laplacian(nbgs, χn, Δh)
223223
∇²χ = zeros(length(nbgs))
224224
for i in 1:length(nbgs)
@@ -290,13 +290,13 @@ end
290290
# Finally, we put everything together to update the density. The loop ensures the stability of the
291291
# updated solution.
292292

293-
function update_density(dh, states, mp, ρ, neighboorhoods, Δh)
293+
function update_density(dh, states, mp, ρ, neighborhoods, Δh)
294294
n_j = Int(ceil(6 * mp.β / (mp.η * Δh^2))) # iterations needed for stability
295295
χn = compute_densities(states, dh) # old density field
296296
χn1 = zeros(length(χn))
297297

298298
for j in 1:n_j
299-
∇²χ = approximate_laplacian(neighboorhoods, χn, Δh) # Laplacian
299+
∇²χ = approximate_laplacian(neighborhoods, χn, Δh) # Laplacian
300300
= compute_driving_forces(states, mp, dh, χn) # driving forces
301301
p_Ω = compute_average_driving_force(mp, pΨ, χn) # average driving force
302302

@@ -442,7 +442,7 @@ function topopt(ra, ρ, n, filename; output = :false)
442442
conv = :false
443443

444444
topology = ExclusiveTopology(grid)
445-
neighboorhoods = cache_neighborhood(dh, topology)
445+
neighborhoods = cache_neighborhood(dh, topology)
446446

447447
## Newton-Raphson loop
448448
NEWTON_TOL = 1.0e-8
@@ -496,7 +496,7 @@ function topopt(ra, ρ, n, filename; output = :false)
496496
end
497497

498498
## update density
499-
χ = update_density(dh, states, mp, ρ, neighboorhoods, Δh)
499+
χ = update_density(dh, states, mp, ρ, neighborhoods, Δh)
500500

501501
## update old displacement, density and compliance
502502
un .= u

docs/src/literate-howto/postprocessing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# different ways. Ferrite provides several tools to facilitate these tasks:
1818
#
1919
# - L2 projection of (discrete) data onto FE interpolations using the `L2Projector`
20-
# - Evalutation of fields (solutions, projections, etc) at arbitrary, user-defined, points
20+
# - Evaluation of fields (solutions, projections, etc) at arbitrary, user-defined, points
2121
# using the `PointEvalHandler`
2222
# - Builtin functionality for exporting data (solutions, cell data, projections, etc) to
2323
# the VTK format
@@ -30,7 +30,7 @@
3030
# domain.
3131

3232
# !!! warning "Custom visualization"
33-
# A common assumption is that the numbering of degrees of freedom matche the numbering
33+
# A common assumption is that the numbering of degrees of freedom matches the numbering
3434
# of the nodes in the grid. This is *NOT* the case in Ferrite. If the available tools
3535
# don't suit your needs and you decide to "roll your own" visualization you need to be
3636
# aware of this and take it into account. For the specific case of evaluating the

docs/src/literate-howto/threaded_assembly.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# commutative.
3030
# - **Assembler task**: By using a designated task for the assembling we (obviously)
3131
# ensure that only a single task assembles. The worker tasks (the tasks computing the
32-
# element contributions) would then hand off their results to the assemly task. This
32+
# element contributions) would then hand off their results to the assembly task. This
3333
# can be a useful approach if computing the element contributions is much slower than
3434
# the assembly -- otherwise the assembler task can't keep up with the worker tasks.
3535
# There might also be some extra overhead because of task switching in the scheduler.
@@ -207,7 +207,7 @@ nothing # hide
207207
# For a different problem setup where some cells might take longer to process (perhaps
208208
# they experience plastic deformation and we need to solve a local problem) we might
209209
# benefit from load balancing. The `DynamicScheduler` can be used also for load
210-
# balancing by specifiying `nchunks` or `chunksize`. However, the `DynamicScheduler`
210+
# balancing by specifying `nchunks` or `chunksize`. However, the `DynamicScheduler`
211211
# will always spawn `nchunks` tasks which can become costly since we are allocating
212212
# scratch data for every task. To limit the number of tasks, while allowing for more
213213
# than `ntasks` chunks, we can use the `GreedyScheduler` *with chunking*. For example,

docs/src/literate-tutorials/computational_homogenization.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
# \bar{\boldsymbol{\varepsilon}} = \begin{pmatrix}0 & 0.5\\ 0.5 & 0\end{pmatrix}
159159
# ```
160160
#
161-
# as the input to the RVE problem. When the sensitivies are solved we can compute the
161+
# as the input to the RVE problem. When the sensitivities are solved we can compute the
162162
# entries of the homogenized stiffness as follows
163163
#
164164
# ```math
@@ -288,7 +288,7 @@ Em = SymmetricTensor{4, 2}(
288288
Ei = 10 * Em;
289289

290290
# As mentioned above, in order to compute the apparent/homogenized stiffness we will solve
291-
# the problem repeatedly with different macroscale strain tensors to compute the sensitvity
291+
# the problem repeatedly with different macroscale strain tensors to compute the sensitivity
292292
# of the homogenized stress, ``\bar{\boldsymbol{\sigma}}``, w.r.t. the macroscopic strain,
293293
# ``\bar{\boldsymbol{\varepsilon}}``. The corresponding unit strains are defined below,
294294
# and will result in three different right-hand-sides:

docs/src/literate-tutorials/plasticity.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ function solve()
296296

297297
## Newton-Raphson loop
298298
NEWTON_TOL = 1 # 1 N
299-
print("\n Starting Netwon iterations:\n")
299+
print("\n Starting Newton iterations:\n")
300300

301301
for timestep in 1:n_timesteps
302302
t = timestep # actual time (used for evaluating d-bndc)

0 commit comments

Comments
 (0)