Skip to content

Commit

Permalink
Fix confusing argument names in shape_<x>(::Union{CellValues,FaceValu…
Browse files Browse the repository at this point in the history
…es}, args...) functions (#871)

Positions of `i::Int` and `q_point::Int` were flipped when forwarding to FunctionValues dispatch. 
Doesn't change any behavior.
  • Loading branch information
KnutAM authored Jan 13, 2024
1 parent 2e13288 commit e806ed9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/FEValues/CellValues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ function_difforder(cv::CellValues) = function_difforder(cv.fun_values)
shape_value_type(cv::CellValues) = shape_value_type(cv.fun_values)
shape_gradient_type(cv::CellValues) = shape_gradient_type(cv.fun_values)

@propagate_inbounds shape_value(cv::CellValues, i::Int, q_point::Int) = shape_value(cv.fun_values, i, q_point)
@propagate_inbounds shape_gradient(cv::CellValues, i::Int, q_point::Int) = shape_gradient(cv.fun_values, i, q_point)
@propagate_inbounds shape_symmetric_gradient(cv::CellValues, i::Int, q_point::Int) = shape_symmetric_gradient(cv.fun_values, i, q_point)
@propagate_inbounds shape_value(cv::CellValues, q_point::Int, i::Int) = shape_value(cv.fun_values, q_point, i)
@propagate_inbounds shape_gradient(cv::CellValues, q_point::Int, i::Int) = shape_gradient(cv.fun_values, q_point, i)
@propagate_inbounds shape_symmetric_gradient(cv::CellValues, q_point::Int, i::Int) = shape_symmetric_gradient(cv.fun_values, q_point, i)

# Access quadrature rule values
getnquadpoints(cv::CellValues) = getnquadpoints(cv.qr)
Expand Down
6 changes: 3 additions & 3 deletions src/FEValues/FaceValues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ get_geo_mapping(fv::FaceValues) = @inbounds fv.geo_mapping[getcurrentface(fv)]

get_fun_values(fv::FaceValues) = @inbounds fv.fun_values[getcurrentface(fv)]

@propagate_inbounds shape_value(fv::FaceValues, i::Int, q_point::Int) = shape_value(get_fun_values(fv), i, q_point)
@propagate_inbounds shape_gradient(fv::FaceValues, i::Int, q_point::Int) = shape_gradient(get_fun_values(fv), i, q_point)
@propagate_inbounds shape_symmetric_gradient(fv::FaceValues, i::Int, q_point::Int) = shape_symmetric_gradient(get_fun_values(fv), i, q_point)
@propagate_inbounds shape_value(fv::FaceValues, q_point::Int, i::Int) = shape_value(get_fun_values(fv), q_point, i)
@propagate_inbounds shape_gradient(fv::FaceValues, q_point::Int, i::Int) = shape_gradient(get_fun_values(fv), q_point, i)
@propagate_inbounds shape_symmetric_gradient(fv::FaceValues, q_point::Int, i::Int) = shape_symmetric_gradient(get_fun_values(fv), q_point, i)

"""
getcurrentface(fv::FaceValues)
Expand Down

0 comments on commit e806ed9

Please sign in to comment.