diff --git a/docs/src/literate-tutorials/ns_vs_diffeq.jl b/docs/src/literate-tutorials/ns_vs_diffeq.jl index c5b8a53ef4..67871b872e 100644 --- a/docs/src/literate-tutorials/ns_vs_diffeq.jl +++ b/docs/src/literate-tutorials/ns_vs_diffeq.jl @@ -373,7 +373,7 @@ jac_sparsity = sparse(K); # To apply the nonlinear portion of the Navier-Stokes problem we simply hand # over the dof handler and cell values to the right-hand-side (RHS) as a parameter. -# Furthermore the pre-assembled linear part, our Stokes opeartor (which is time independent) +# Furthermore the pre-assembled linear part, our Stokes operator (which is time independent) # is passed to save some additional runtime. To apply the time-dependent Dirichlet BCs, we # also need to hand over the constraint handler. # The basic idea to apply the Dirichlet BCs consistently is that we copy the diff --git a/docs/src/topics/sparse_matrix.md b/docs/src/topics/sparse_matrix.md index 6926bc9f34..f0f5c39bd0 100644 --- a/docs/src/topics/sparse_matrix.md +++ b/docs/src/topics/sparse_matrix.md @@ -43,7 +43,7 @@ with linear Lagrange interpolation) this would be reduced to 216 MB. To give an example, in this one-dimensional heat problem (see the [Heat equation](../tutorials/heat_equation.md) tutorial for the weak form) we have 4 nodes - with 3 elements in between. For simplicitly DoF numbers and node numbers are the same + with 3 elements in between. For simplicity DoF numbers and node numbers are the same but this is not true in general since nodes and DoFs can be numbered independently (and in fact are numbered independently in Ferrite). diff --git a/src/FEValues/common_values.jl b/src/FEValues/common_values.jl index a2cd905bbe..402f51cf41 100644 --- a/src/FEValues/common_values.jl +++ b/src/FEValues/common_values.jl @@ -26,7 +26,7 @@ end """ ValuesUpdateFlags(ip_fun::Interpolation; update_gradients = Val(true), update_hessians = Val(false), update_detJdV = Val(true)) -Creates a singelton type for specifying what parts of the AbstractValues should be updated. Note that this is internal +Creates a singleton type for specifying what parts of the AbstractValues should be updated. Note that this is internal API used to get type-stable construction. Keyword arguments in `AbstractValues` constructors are forwarded, and the public API is passing these as `Bool`, while the `ValuesUpdateFlags` method supports both boolean and `Val(::Bool)` keyword args. """ diff --git a/src/L2_projection.jl b/src/L2_projection.jl index 2083a2bce7..15cfdd8a8d 100644 --- a/src/L2_projection.jl +++ b/src/L2_projection.jl @@ -30,7 +30,7 @@ end Initiate an `L2Projector` for projecting quadrature data onto a function space. To define the function space, add interpolations for -differents cell sets with `add!` before `close!`ing the projector, +different cell sets with `add!` before `close!`ing the projector, see the example below. The `L2Projector` acts as the integrated left hand side of the projection equation: diff --git a/src/interpolations.jl b/src/interpolations.jl index 8bf9edcbda..5aaed4fdfb 100644 --- a/src/interpolations.jl +++ b/src/interpolations.jl @@ -1683,7 +1683,7 @@ end get_n_copies(::VectorizedInterpolation{vdim}) where {vdim} = vdim InterpolationInfo(ip::VectorizedInterpolation) = InterpolationInfo(ip.ip, get_n_copies(ip)) -# Error when trying to get dof indicies from vectorized interpolations. +# Error when trying to get dof indices from vectorized interpolations. # Currently, this should only be done for the scalar interpolation. function _entitydof_indices_vectorized_ip_error(f::Symbol) throw(ArgumentError(string(f, " is not implemented for VectorizedInterpolations and should be called on the scalar base interpolation"))) diff --git a/test/test_pointevaluation.jl b/test/test_pointevaluation.jl index f0570c8dd0..65972a8840 100644 --- a/test/test_pointevaluation.jl +++ b/test/test_pointevaluation.jl @@ -3,7 +3,7 @@ using Ferrite, Test function test_pe_scalar_field() # isoparametric approximation mesh = generate_grid(QuadraticQuadrilateral, (3, 3)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) f(x) = x[1] + x[2] @@ -47,7 +47,7 @@ end function test_pe_embedded() mesh = generate_grid(QuadraticQuadrilateral, (3, 3)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) mesh = Grid(mesh.cells, map(x -> Node(Vec((x.x[1], x.x[2], x.x[1] + x.x[2]))), mesh.nodes)) f(x) = x[1] + x[2] @@ -91,7 +91,7 @@ function test_pe_vector_field() ## vector field # isoparametric approximation mesh = generate_grid(QuadraticQuadrilateral, (3, 3)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) f(x) = Vec((x[1], x[2])) nodal_vals = [f(p.x) for p in mesh.nodes] @@ -134,7 +134,7 @@ end function test_pe_superparametric() # superparametric approximation mesh = generate_grid(Quadrilateral, (3, 3)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) f(x) = x ip_f = Lagrange{RefQuadrilateral, 2}() # function interpolation @@ -170,7 +170,7 @@ end function test_pe_dofhandler() mesh = generate_grid(Quadrilateral, (2, 2)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) dof_vals = [1.0, 2.0, 5.0, 4.0, 3.0, 6.0, 8.0, 7.0, 9.0] points = [node.x for node in mesh.nodes] # same as nodes @@ -235,7 +235,7 @@ function test_pe_dofhandler2(; three_dimensional = true) # but not using L2Projector since we want the DofHandler dofs if (three_dimensional) mesh = generate_grid(Hexahedron, (3, 3, 3)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) f_s = x -> 1.0 + x[1] + x[2] + x[1] * x[2] + x[2] * x[3] f_v = x -> Vec{3}((1.0 + x[1] + x[2] + x[1] * x[2], 2.0 - x[1] - x[2] - x[1] * x[2], 4.0 + x[1] - x[2] + x[3] - x[1] * x[3] - x[2] * x[3])) points = [Vec((x, x, x)) for x in range(0; stop = 1, length = 100)] @@ -244,7 +244,7 @@ function test_pe_dofhandler2(; three_dimensional = true) qr = QuadratureRule{RefHexahedron}(3) else mesh = generate_grid(Quadrilateral, (3, 3)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) f_s = x -> 1.0 + x[1] + x[2] + x[1] * x[2] f_v = x -> Vec{2}((1.0 + x[1] + x[2] + x[1] * x[2], 2.0 - x[1] - x[2] - x[1] * x[2])) points = [Vec((x, x)) for x in range(0; stop = 1, length = 100)] @@ -377,7 +377,7 @@ end function test_pe_oneD() # isoparametric approximation mesh = generate_grid(Line, (2,)) - perturbate_standard_grid!(mesh, 1 / 10) + perturb_standard_grid!(mesh, 1 / 10) f(x) = x[1] nodal_vals = [f(p.x) for p in mesh.nodes] diff --git a/test/test_utils.jl b/test/test_utils.jl index 7f2696ffd8..98ff5f53ed 100644 --- a/test/test_utils.jl +++ b/test/test_utils.jl @@ -278,8 +278,8 @@ getfacerefshape(::Tetrahedron, ::Int) = RefTriangle getfacerefshape(::Pyramid, face::Int) = face == 1 ? RefQuadrilateral : RefTriangle getfacerefshape(::Wedge, face::Int) = face ∈ (1, 5) ? RefTriangle : RefQuadrilateral -function perturbate_standard_grid!(grid::Ferrite.AbstractGrid{dim}, strength) where {dim} - function perturbate(x::Vec{dim}) where {dim} +function perturb_standard_grid!(grid::Ferrite.AbstractGrid{dim}, strength) where {dim} + function perturb(x::Vec{dim}) where {dim} for d in 1:dim if x[d] ≈ 1.0 || x[d] ≈ -1.0 return x @@ -287,7 +287,7 @@ function perturbate_standard_grid!(grid::Ferrite.AbstractGrid{dim}, strength) wh end return x + Vec{dim}(0.5 * strength .* (2 .* rand(Vec{dim}) .- 1.0)) end - return transform_coordinates!(grid, perturbate) + return transform_coordinates!(grid, perturb) end ######################################################