Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Dofs/ConstraintHandler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ function add!(ch::ConstraintHandler, dbc::Dirichlet)
if !all(c -> 0 < c <= n_comp, components)
error("components $(components) not within range of field :$(dbc.field_name) ($(n_comp) dimension(s))")
end
# Create BCValues for coordinate evalutation at dof-locations
# Create BCValues for coordinate evaluation at dof-locations
EntityType = eltype(dbc.faces) # (Face|Edge|Vertex)Index
if EntityType <: Integer
# BCValues are just dummy for nodesets so set to FaceIndex
Expand Down Expand Up @@ -1299,7 +1299,7 @@ system. For other types of periodicities the `transform` function can be used. T
`transform` function is applied on the coordinates of the image face, and is expected to
transform the coordinates to the matching locations in the mirror set.

The keyword `tol` specifies the tolerence (i.e. distance and deviation in face-normals)
The keyword `tol` specifies the tolerance (i.e. distance and deviation in face-normals)
between a image-face and mirror-face, for them to be considered matched.

See also: [`collect_periodic_faces!`](@ref), [`PeriodicDirichlet`](@ref).
Expand Down
10 changes: 5 additions & 5 deletions src/Dofs/DofHandler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ For most scalar-valued interpolations we can simply compensate for this by rever
numbering on all edges that do not match the global edge direction, i.e. for the edge on
element B in the example.

In addition, we also have to preverse the ordering at each dof location.
In addition, we also have to preserve the ordering at each dof location.

For more details we refer to Scroggs et al. [Scroggs2022](@cite) as we follow the methodology
described therein.
Expand Down Expand Up @@ -778,7 +778,7 @@ Return the index of the field with name `field_name` in a `DofHandler`. The inde
field was found and the 2nd entry is the index of the field within the `SubDofHandler`.

!!! note
Always finds the 1st occurence of a field within `DofHandler`.
Always finds the 1st occurrence of a field within `DofHandler`.

See also: [`find_field(sdh::SubDofHandler, field_name::Symbol)`](@ref),
[`_find_field(sdh::SubDofHandler, field_name::Symbol)`](@ref).
Expand Down Expand Up @@ -843,7 +843,7 @@ index, where `field_idx` represents the index of a field within a `SubDofHandler
The `dof_range` of a field can vary between different `SubDofHandler`s. Therefore, it is
advised to use the `field_idxs` or refer to a given `SubDofHandler` directly in case
several `SubDofHandler`s exist. Using the `field_name` will always refer to the first
occurence of `field` within the `DofHandler`.
occurrence of `field` within the `DofHandler`.

Example:
```jldoctest
Expand Down Expand Up @@ -903,7 +903,7 @@ getfieldinterpolation(sdh::SubDofHandler, field_name::Symbol) = getfieldinterpol
Evaluate the approximated solution for field `fieldname` at the node
coordinates of the grid given the Dof handler `dh` and the solution vector `u`.

Return a vector of length `getnnodes(grid)` where entry `i` contains the evalutation of the
Return a vector of length `getnnodes(grid)` where entry `i` contains the evaluation of the
approximation in the coordinate of node `i`. If the field does not live on parts of the
grid, the corresponding values for those nodes will be returned as `NaN`s.
"""
Expand All @@ -925,7 +925,7 @@ function _evaluate_at_grid_nodes(dh::DofHandler, u::Vector{T}, fieldname::Symbol
vtk_dim = n_c == 2 ? 3 : n_c # VTK wants vectors padded to 3D
data = fill(NaN * zero(T), vtk_dim, getnnodes(get_grid(dh)))
else
# Just evalutation at grid nodes
# Just evaluation at grid nodes
data = fill(NaN * zero(RT), getnnodes(get_grid(dh)))
end
# Loop over the subdofhandlers
Expand Down
2 changes: 1 addition & 1 deletion src/FEValues/FunctionValues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ sdim_from_gradtype(::Type{<:AbstractTensor{<:Any,sdim}}) where sdim = sdim
sdim_from_gradtype(::Type{<:SVector{sdim}}) where sdim = sdim
sdim_from_gradtype(::Type{<:SMatrix{<:Any,sdim}}) where sdim = sdim

# For performance, these must be fully inferrable for the compiler.
# For performance, these must be fully inferable for the compiler.
# args: valname (:CellValues or :FaceValues), shape_gradient_type, eltype(x)
function check_reinit_sdim_consistency(valname, gradtype::Type, ::Type{<:Vec{sdim}}) where {sdim}
check_reinit_sdim_consistency(valname, Val(sdim_from_gradtype(gradtype)), Val(sdim))
Expand Down
2 changes: 1 addition & 1 deletion src/FEValues/InterfaceValues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function reinit!(
# TODO: This is the bottleneck, cache it?
@assert length(quad_points_a) <= length(quad_points_b)

# Re-evalutate shape functions in the transformed quadrature points
# Re-evaluate shape functions in the transformed quadrature points
precompute_values!(get_fun_values(iv.there), quad_points_b)
precompute_values!(get_geo_mapping(iv.there), quad_points_b)

Expand Down
2 changes: 1 addition & 1 deletion test/test_deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Ferrite, Test
@testset "Deprecations" begin

@testset "Deprecation of auto-vectorized methods" begin
# Deprecation of auto-selecing the interpolation
# Deprecation of auto-selecting the interpolation
grid = generate_grid(Quadrilateral, (1, 1))
dh = DofHandler(grid)
@test_deprecated r"interpolation explicitly, and vectorize it" add!(dh, :u, 2)
Expand Down
12 changes: 6 additions & 6 deletions test/test_interfacevalues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@
dim = getcelltypedim(cell_shape)
grid = generate_grid(cell_shape, ntuple(i -> 2, dim))
ip = scalar_interpol isa DiscontinuousLagrange ? Lagrange{Ferrite.getrefshape(scalar_interpol), Ferrite.getorder(scalar_interpol)}() : scalar_interpol
@testset "faces nodes indicies" begin
@testset "faces nodes indices" begin
cell = getcells(grid, 1)
geom_ip_faces_indices = Ferrite.facedof_indices(ip)
Ferrite.getdim(ip) > 1 && (geom_ip_faces_indices = Tuple([face[collect(face .∉ Ref(interior))] for (face, interior) in [(geom_ip_faces_indices[i], Ferrite.facedof_interior_indices(ip)[i]) for i in 1:nfaces(ip)]]))
faces_indicies = Ferrite.reference_faces(Ferrite.getrefshape(Ferrite.default_interpolation(typeof(cell))))
faces_indices = Ferrite.reference_faces(Ferrite.getrefshape(Ferrite.default_interpolation(typeof(cell))))
node_ids = Ferrite.get_node_ids(cell)
@test getindex.(Ref(node_ids), collect.(faces_indicies)) == Ferrite.faces(cell) == getindex.(Ref(node_ids), collect.(geom_ip_faces_indices))
@test getindex.(Ref(node_ids), collect.(faces_indices)) == Ferrite.faces(cell) == getindex.(Ref(node_ids), collect.(geom_ip_faces_indices))
end
@testset "error paths" begin
cell = getcells(grid, 1)
Expand All @@ -161,14 +161,14 @@
quad_rule = Ferrite.create_face_quad_rule(RefTetrahedron, weights, points)
dim = getcelltypedim(cell_shape)
grid = generate_grid(cell_shape, ntuple(i -> 2, dim))
@testset "faces nodes indicies" begin
@testset "faces nodes indices" begin
ip = scalar_interpol isa DiscontinuousLagrange ? Lagrange{Ferrite.getrefshape(scalar_interpol), Ferrite.getorder(scalar_interpol)}() : scalar_interpol
cell = getcells(grid, 1)
geom_ip_faces_indices = Ferrite.facedof_indices(ip)
Ferrite.getdim(ip) > 1 && (geom_ip_faces_indices = Tuple([face[collect(face .∉ Ref(interior))] for (face, interior) in [(geom_ip_faces_indices[i], Ferrite.facedof_interior_indices(ip)[i]) for i in 1:nfaces(ip)]]))
faces_indicies = Ferrite.reference_faces(Ferrite.getrefshape(Ferrite.default_interpolation(typeof(cell))))
faces_indices = Ferrite.reference_faces(Ferrite.getrefshape(Ferrite.default_interpolation(typeof(cell))))
node_ids = Ferrite.get_node_ids(cell)
@test getindex.(Ref(node_ids), collect.(faces_indicies)) == Ferrite.faces(cell) == getindex.(Ref(node_ids), collect.(geom_ip_faces_indices))
@test getindex.(Ref(node_ids), collect.(faces_indices)) == Ferrite.faces(cell) == getindex.(Ref(node_ids), collect.(geom_ip_faces_indices))
end
@testset "error paths" begin
cell = getcells(grid, 1)
Expand Down