Skip to content

Commit

Permalink
Merge pull request #9 from jpthiele/codespell
Browse files Browse the repository at this point in the history
Add and apply codespell config
  • Loading branch information
chmerdon authored Nov 20, 2024
2 parents 0315272 + 5893610 commit c5b054d
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## October 28, 2024

Moved repositiory from https://github.com/chmerdon/ExtendableFEMBase.jl to https://github.com/WIAS-PDELib/ExtendableFEMBase.jl.
Moved repository from https://github.com/chmerdon/ExtendableFEMBase.jl to https://github.com/WIAS-PDELib/ExtendableFEMBase.jl.
[WIAS-PDELib](https://github.com/WIAS-PDELib/) is a github organization created to collectively manage the Julia packages developed under
the lead of the [WIAS Numerical Mathematics and Scientific Computing](https://wias-berlin.de/research/rgs/fg3) research group.
According to the [github docs on repository transfer](https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository#whats-transferred-with-a-repository),
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The examples have been designed with the following issues in mind:

## Running the examples

In order to run `ExampleXXX`, peform the following steps:
In order to run `ExampleXXX`, perform the following steps:

- Download the example file (e.g. via the source code link at the top)
- Make sure all used packages are installed in your Julia environment
Expand Down
8 changes: 4 additions & 4 deletions docs/src/fems.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ AbstractFiniteElement

#### Remarks
- each type depends on one/two or three parameters, the first one is always the number of components (ncomponents) that determines if the
finite element is scalar- or veector-valued; some elements additionaly require the parameter edim <: Int if they are structurally different in different space dimensions; arbitrary order elements require a third parameter that determines the order
finite element is scalar- or veector-valued; some elements additionally require the parameter edim <: Int if they are structurally different in different space dimensions; arbitrary order elements require a third parameter that determines the order
- each finite elements mainly comes with a set of basis functions in reference coordinates for each applicable AbstractElementGeometry and degrees of freedom maps for each mesh entity
- broken finite elements are possible via the broken switch in the [FESpace](@ref) constructor
- the type steers how the basis functions are transformed from local to global coordinates and how FunctionOperators are evaluated
Expand All @@ -54,7 +54,7 @@ AbstractFiniteElement

## List of implemented Finite Elements

The following table lists all curently implemented finite elements and on which geometries they are available (in brackets a dofmap pattern for CellDofs is shown and the number of local degrees of freedom for a vector-valued realisation). Click on the FEType to find out more details.
The following table lists all currently implemented finite elements and on which geometries they are available (in brackets a dofmap pattern for CellDofs is shown and the number of local degrees of freedom for a vector-valued realisation). Click on the FEType to find out more details.

| FEType | Triangle2D | Parallelogram2D | Tetrahedron3D | Parallelepiped3D |
| :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
Expand Down Expand Up @@ -93,7 +93,7 @@ Note: the dofmap pattern describes the connection of the local degrees of freedo

### P0 finite element

Piecewise constant finite element that has one degree of freedom on each cell of the grid. (It is masked as a H1-conforming finite element, because it uses the same operator evaulations.)
Piecewise constant finite element that has one degree of freedom on each cell of the grid. (It is masked as a H1-conforming finite element, because it uses the same operator evaluations.)

The interpolation of a given function into this space preserves the cell integrals.

Expand Down Expand Up @@ -205,7 +205,7 @@ H1P3

### Pk finite element (experimental)

The Pk finite element method generically generates polynomials of abitrary order k on simplices (Edge1D, Triangle2D so far).
The Pk finite element method generically generates polynomials of arbitrary order k on simplices (Edge1D, Triangle2D so far).

The interpolation of a given function into this space performs point evaluations at the nodes and preserves cell and face integrals in 2D (moment order depends on the order and the element dimension).

Expand Down
2 changes: 1 addition & 1 deletion docs/src/interpolations.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The qpinfo argument communicates vast information of the current quadrature poin
| qpinfo.region | Integer | region number of item |
| qpinfo.xref | Vector{Real} | reference coordinates within item of qpinfo.x |
| qpinfo.volume | Real | volume of item |
| qpinfo.params | Vector{Any} | parameters that can be transfered via keyword arguments |
| qpinfo.params | Vector{Any} | parameters that can be transferred via keyword arguments |


## Standard Interpolations
Expand Down
2 changes: 1 addition & 1 deletion docs/src/notebooks_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

This sections contains [Pluto.jl](https://github.com/fonsp/Pluto.jl) notebooks.

Plese note, that in the html version, interactive elements like sliders are disabled.
Please note, that in the html version, interactive elements like sliders are disabled.
Navigation via the table of contents does work, though.

2 changes: 1 addition & 1 deletion examples/Example200_LowLevelPoisson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function runtests(; order = 2, kwargs...) #hide
## first assembly causes allocations when filling sparse matrix
loop_allocations = assemble!(A.entries, b.entries, FES, f, μ)
@info "allocations in 1st assembly: $loop_allocations"
## second assebly in same matrix should have allocation-free inner loop
## second assembly in same matrix should have allocation-free inner loop
loop_allocations = assemble!(A.entries, b.entries, FES, f, μ)
@info "allocations in 2nd assembly: $loop_allocations"
@test loop_allocations == 0
Expand Down
2 changes: 1 addition & 1 deletion pluto-examples/LowLevelNavierStokes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ function solve_stokes_lowlevel(FES, μ, f!)
Alin = deepcopy(A) # = keep linear part of system matrix
blin = deepcopy(b) # = keep linear part of right-hand side

println("Pepare boundary conditions...")
println("Prepare boundary conditions...")
@time begin
u_init = FEVector(FES)
interpolate!(u_init[1], u!; time = teval)
Expand Down
2 changes: 1 addition & 1 deletion src/dofmaps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ EffAT4AssemblyType(::Type{ON_EDGES}, ::Type{<:ON_EDGES}) = ON_CELLS
"""
$(TYPEDEF)
Abstrat type for all dof types
Abstract type for all dof types
"""
abstract type DofType end

Expand Down
8 changes: 4 additions & 4 deletions src/fedefs/h1_pk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function ExtendableGrids.interpolate!(Target, FE::FESpace{Tv, Ti, H1Pk{ncomponen
end
end

## standard interpolation on cells = perserve cell moments up to order-3
## standard interpolation on cells = preserve cell moments up to order-3
function ExtendableGrids.interpolate!(Target, FE::FESpace{Tv, Ti, H1Pk{ncomponents, edim, order}, APT}, ::Type{ON_CELLS}, exact_function!; items = [], kwargs...) where {ncomponents, edim, order, Tv, Ti, APT}
if edim == 2
# delegate cell faces to face interpolation
Expand All @@ -116,7 +116,7 @@ function ExtendableGrids.interpolate!(Target, FE::FESpace{Tv, Ti, H1Pk{ncomponen
# subitems = slice(FE.dofgrid[CellEdges], items)
# interpolate!(Target, FE, ON_EDGES, exact_function!; items = subitems, time = time)

# # fixe face means
# # fix face means

# # fix cell bubble value by preserving integral mean
# ensure_cell_moments!(Target, FE, exact_function!; facedofs = 1, edgedofs = 2, items = items, time = time)
Expand Down Expand Up @@ -194,7 +194,7 @@ function get_basis(::Type{<:AssemblyType}, FEType::Type{H1Pk{ncomponents, edim,
end
if order > 3 # use recursion to fill the interior dofs (+multiplication with cell bubble)
interior_basis = get_basis(ON_CELLS, H1Pk{1, edim, order - 3}, Triangle2D)
# todo: scaling factors for interior dofs (but may be ommited)
# todo: scaling factors for interior dofs (but may be omitted)
end
function closure(refbasis, xref)
fill!(refbasis, 0)
Expand All @@ -217,7 +217,7 @@ function get_basis(::Type{<:AssemblyType}, FEType::Type{H1Pk{ncomponents, edim,
# edge basis functions
if order > 1
for k 1:order-1
# on each face find basis funktion that is 1 at s = k//order
# on each face find basis function that is 1 at s = k//order

# first face (nodes [1,2])
refbasis[3+k, 1] = refbasis[end] * xref[1] / factors_face[k]
Expand Down
2 changes: 1 addition & 1 deletion src/fedefs/h1v_p1teb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ abstract type H1P1TEB{edim} <: AbstractH1FiniteElementWithCoefficients where {ed
````
vector-valued (ncomponents = edim) element that uses P1 functions + tangential-weighted edge bubbles
as suggested by [Diening, L., Storn, J. & Tscherpel, T., "Fortin operator for the Taylor–Hood element", Numer. Math. 150, 671–689 (2022)]
as suggested by [Diening, L., Storn, J. & Tscherpel, T., "Fortin operator for the Taylor–Hood element", Num. Math. 150, 671–689 (2022)]
(is inf-sup stable for Stokes if paired with continuous P1 pressure space, less degrees of freedom than MINI)
Expand Down
2 changes: 1 addition & 1 deletion src/fedefs/hdiv_rtk_enrich.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function get_basis(::Type{ON_CELLS}, ::Type{HDIVRTkENRICH{3, order, false}}, EG:
refbasis[3, 3] = 2 * xref[1] * xref[3]

if order == 1
# nothing to add (but enrichment need additional RT0 handled by seperate FESpace/FEVectorBlock)
# nothing to add (but enrichment need additional RT0 handled by separate FESpace/FEVectorBlock)
elseif order == 2
for k 1:3
refbasis[4, k] = (6 * (1 - xref[1] - xref[2] - xref[3]) - 1) * refbasis[3, k] + (6 * xref[1] - 1) * (-refbasis[1, k] - refbasis[2, k] - refbasis[3, k]) # (1,2)
Expand Down
10 changes: 5 additions & 5 deletions src/interpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function ensure_moments!(target::AbstractArray{T, 1}, FE::FESpace{Tv, Ti, FEType
xItemDofs::DofMapTypes{Ti} = Dofmap4AssemblyType(FE, AT)
EGs = xgrid[GridComponentUniqueGeometries4AssemblyType(AT)]

bestapprox::Bool = false # if true interior dofs are set acoording to a constrained bestapproximation, otherwise to preserve the moments up to order, might become a kwarg later
bestapprox::Bool = false # if true interior dofs are set according to a constrained bestapproximation, otherwise to preserve the moments up to order, might become a kwarg later

@assert length(EGs) == 1 "ensure_moments! currently only works with grids with a single element geometry"
EG = EGs[1]
Expand Down Expand Up @@ -292,7 +292,7 @@ function ExtendableGrids.interpolate!(target::FEVectorBlock,
````
Interpolates the given source into the finite elements space assigned to the target FEVectorBlock with the specified AssemblyType
(usualy ON_CELLS).
(usually ON_CELLS).
The source functions should adhere to the interface
```julia
Expand All @@ -301,7 +301,7 @@ The source functions should adhere to the interface
The qpinfo argument communicates vast information of the current quadrature/evaluation point.
The bonus_quadorder argument can be used to steer the quadrature order of integrals that needs to be computed
for the interpolation (the default quadrature order corressponds to the polynomial order of the finite element).
for the interpolation (the default quadrature order corresponds to the polynomial order of the finite element).
"""
function ExtendableGrids.interpolate!(
target::FEVectorBlock{T, Tv, Ti},
Expand All @@ -312,7 +312,7 @@ function ExtendableGrids.interpolate!(

FEType = eltype(target.FES)
if target.FES.broken == true
## interpolate continously
## interpolate continuously
FESc = FESpace{FEType}(target.FES.dofgrid)
Targetc = FEVector{T}(FESc)
interpolate!(Targetc[1], FESc, AT, source; items = items, kwargs...)
Expand Down Expand Up @@ -358,7 +358,7 @@ The source functions should adhere to the interface
The qpinfo argument communicates vast information of the current quadrature/evaluation point.
The bonus_quadorder argument can be used to steer the quadrature order of integrals that needs to be computed
for the interpolation (the default quadrature order corressponds to the polynomial order of the finite element).
for the interpolation (the default quadrature order corresponds to the polynomial order of the finite element).
"""
function ExtendableGrids.interpolate!(target::FEVectorBlock, source; kwargs...)
interpolate!(target, ON_CELLS, source; kwargs...)
Expand Down
2 changes: 1 addition & 1 deletion src/lazy_interpolate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ search. To activate this put 'use_cellparents' = true). By some given kernel fun
the operator evaluation (=input) can be further postprocessed. The qpinfo argument
allows to access information at the current quadrature point.
Note: discontinuous quantities at vertices of the target grid will be evaluted in the first found cell of the
Note: discontinuous quantities at vertices of the target grid will be evaluated in the first found cell of the
source grid. No averaging is performed. With eps the tolerances of the cell search via ExtendableGrids.CellFinder can be steered.
"""
function lazy_interpolate!(
Expand Down
2 changes: 1 addition & 1 deletion src/point_evaluator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function initialize!(O::PointEvaluator{T, UT}, sol; time = 0, kwargs...) where {
# update basis evaluations at xref
relocate_xref!(BE_args[id], xref)

# update operator eveluation on item
# update operator evaluation on item
update_basis!(BE_args[id], item)
end

Expand Down
2 changes: 1 addition & 1 deletion src/quadrature.jl
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ function get_generic_quadrature_Stroud(order::Int)
r = F.values
a = 2 * F.vectors[1, :] .^ 2

# compute 1D Gauss-Jacobi Points for Intervall [-1,1] and weights
# compute 1D Gauss-Jacobi Points for Interval [-1,1] and weights
delta = -1 ./ (4 .* (1:ngpts) .^ 2 .- ones(ngpts, 1))
gamma = sqrt.((2:ngpts) .* (1:ngpts-1)) ./ (2 .* (2:ngpts) .- ones(ngpts - 1, 1))
F = eigen(diagm(0 => delta[:], 1 => gamma[:], -1 => gamma[:]))
Expand Down
2 changes: 1 addition & 1 deletion src/reconstructionoperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function FEEvaluator(
xgrid = FE.xgrid
FE2 = FESpace{FETypeReconst}(xgrid)

## collect dimension informations
## collect dimension information
ncomponents::Int = get_ncomponents(FEType)
ncomponents2::Int = get_ncomponents(FETypeReconst)
if AT <: Union{ON_BFACES, <:ON_FACES}
Expand Down
6 changes: 3 additions & 3 deletions src/segment_integrator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ segment_geometry(::SegmentIntegrator{Tv, UT, KFT, EG}) where {Tv, UT, KFT, EG} =
default_segint_kwargs() = Dict{Symbol, Tuple{Any, String}}(
:name => ("SegmentIntegrator", "name for operator used in printouts"),
:resultdim => (0, "dimension of result field (default = length of arguments)"),
:matrix_mode => (false, "integrator integrates basis functions of FEspace seperately to assembly a matrix that maps solution to segment integrations (requires that kernel is linear)"),
:matrix_mode => (false, "integrator integrates basis functions of FEspace separately to assembly a matrix that maps solution to segment integrations (requires that kernel is linear)"),
:entry_tolerance => (0, "threshold to add entry to sparse matrix (only in matrix_mode)"),
:params => (nothing, "array of parameters that should be made available in qpinfo argument of kernel function"),
:factor => (1, "factor that should be multiplied during assembly"),
Expand All @@ -44,7 +44,7 @@ function SegmentIntegrator(
kwargs...)
````
Generates an SegmentIntegrator that can intgrate over segments
Generates an SegmentIntegrator that can integrate over segments
of the specified geometry EG.
To do so, it evaluates, at each quadrature point, the specified operator evaluations,
postprocesses them with the kernel function (if provided)
Expand Down Expand Up @@ -105,7 +105,7 @@ function initialize!(O::SegmentIntegrator{T, UT}, sol; time = 0, kwargs...) wher
xgrid = FES_args[1].xgrid
itemregions = xgrid[CellRegions]

## prepare quadrature formuale
## prepare quadrature formulae
SG = segment_geometry(O)
EG = xgrid[UniqueCellGeometries][1]
dimfill = dim_element(EG) - dim_element(SG)
Expand Down

0 comments on commit c5b054d

Please sign in to comment.