Skip to content

Commit

Permalink
Fix some typos in variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
KnutAM committed Jan 7, 2025
1 parent ac1d277 commit 6cf5a92
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/FEValues/boundary_integrals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,23 +132,23 @@ end
##################
# Special cases since we don't have cell_to_vertex and vertex_to_cell
# Mapping from to 0D node to 1D line vertex.
function facet_to_element_transformation(::Union{Vec{0, T}, Vec{1, T}}, ::Type{RefLine}, face::Int) where {T}
face == 1 && return Vec{1, T}((-one(T),))
face == 2 && return Vec{1, T}((one(T),))
function facet_to_element_transformation(::Union{Vec{0, T}, Vec{1, T}}, ::Type{RefLine}, facetnr::Int) where {T}
facetnr == 1 && return Vec{1, T}((-one(T),))
facetnr == 2 && return Vec{1, T}((one(T),))
throw(ArgumentError("unknown facet number"))

Check warning on line 138 in src/FEValues/boundary_integrals.jl

View check run for this annotation

Codecov / codecov/patch

src/FEValues/boundary_integrals.jl#L135-L138

Added lines #L135 - L138 were not covered by tests
end

# Mapping from 1D line to point.
function element_to_facet_transformation::Vec{1, T}, ::Type{RefLine}, face::Int) where {T}
function element_to_facet_transformation::Vec{1, T}, ::Type{RefLine}, facetnr::Int) where {T}
x = ξ[1]
face == 1 && return Vec(-x)
face == 2 && return Vec(x)
facetnr == 1 && return Vec(-x)
facetnr == 2 && return Vec(x)
throw(ArgumentError("unknown facet number"))

Check warning on line 146 in src/FEValues/boundary_integrals.jl

View check run for this annotation

Codecov / codecov/patch

src/FEValues/boundary_integrals.jl#L142-L146

Added lines #L142 - L146 were not covered by tests
end

function weighted_normal(::Tensor{2, 1, T}, ::Type{RefLine}, face::Int) where {T}
face == 1 && return Vec{1, T}((-one(T),))
face == 2 && return Vec{1, T}((one(T),))
function weighted_normal(::Tensor{2, 1, T}, ::Type{RefLine}, facetnr::Int) where {T}
facetnr == 1 && return Vec{1, T}((-one(T),))
facetnr == 2 && return Vec{1, T}((one(T),))
throw(ArgumentError("unknown facet number"))

Check warning on line 152 in src/FEValues/boundary_integrals.jl

View check run for this annotation

Codecov / codecov/patch

src/FEValues/boundary_integrals.jl#L149-L152

Added lines #L149 - L152 were not covered by tests
end

Expand All @@ -164,31 +164,31 @@ end
###########################

# Mapping from 1D line to 2D face of a quadrilateral.
function edge_to_cell_transformation::Vec{1, T}, ::Type{RefQuadrilateral}, edge::Int) where {T}
function edge_to_cell_transformation::Vec{1, T}, ::Type{RefQuadrilateral}, edgenr::Int) where {T}
x = ξ[1]
face == 1 && return Vec{2, T}((x, -one(T)))
face == 2 && return Vec{2, T}((one(T), x))
face == 3 && return Vec{2, T}((-x, one(T)))
face == 4 && return Vec{2, T}((-one(T), -x))
edgenr == 1 && return Vec{2, T}((x, -one(T)))
edgenr == 2 && return Vec{2, T}((one(T), x))
edgenr == 3 && return Vec{2, T}((-x, one(T)))
edgenr == 4 && return Vec{2, T}((-one(T), -x))
throw(ArgumentError("unknown edge number"))

Check warning on line 173 in src/FEValues/boundary_integrals.jl

View check run for this annotation

Codecov / codecov/patch

src/FEValues/boundary_integrals.jl#L167-L173

Added lines #L167 - L173 were not covered by tests
end

# Mapping from 2D face of a quadrilateral to 1D line.
function cell_to_edge_transformation::Vec{2, T}, ::Type{RefQuadrilateral}, edge::Int) where {T}
function cell_to_edge_transformation::Vec{2, T}, ::Type{RefQuadrilateral}, edgenr::Int) where {T}
x, y = ξ
face == 1 && return Vec(x)
face == 2 && return Vec(y)
face == 3 && return Vec(-x)
face == 4 && return Vec(-y)
edgenr == 1 && return Vec(x)
edgenr == 2 && return Vec(y)
edgenr == 3 && return Vec(-x)
edgenr == 4 && return Vec(-y)
throw(ArgumentError("unknown edge number"))

Check warning on line 183 in src/FEValues/boundary_integrals.jl

View check run for this annotation

Codecov / codecov/patch

src/FEValues/boundary_integrals.jl#L177-L183

Added lines #L177 - L183 were not covered by tests
end

function weighted_normal(J::Tensor{2, 2}, ::Type{RefQuadrilateral}, face::Int)
function weighted_normal(J::Tensor{2, 2}, ::Type{RefQuadrilateral}, edgenr::Int)
@inbounds begin
face == 1 && return Vec{2}((J[2, 1], -J[1, 1]))
face == 2 && return Vec{2}((J[2, 2], -J[1, 2]))
face == 3 && return Vec{2}((-J[2, 1], J[1, 1]))
face == 4 && return Vec{2}((-J[2, 2], J[1, 2]))
edgenr == 1 && return Vec{2}((J[2, 1], -J[1, 1]))
edgenr == 2 && return Vec{2}((J[2, 2], -J[1, 2]))
edgenr == 3 && return Vec{2}((-J[2, 1], J[1, 1]))
edgenr == 4 && return Vec{2}((-J[2, 2], J[1, 2]))

Check warning on line 191 in src/FEValues/boundary_integrals.jl

View check run for this annotation

Codecov / codecov/patch

src/FEValues/boundary_integrals.jl#L186-L191

Added lines #L186 - L191 were not covered by tests
end
throw(ArgumentError("unknown facet number"))

Check warning on line 193 in src/FEValues/boundary_integrals.jl

View check run for this annotation

Codecov / codecov/patch

src/FEValues/boundary_integrals.jl#L193

Added line #L193 was not covered by tests
end
Expand Down

0 comments on commit 6cf5a92

Please sign in to comment.