Skip to content

Commit

Permalink
try runic
Browse files Browse the repository at this point in the history
  • Loading branch information
lijas committed Nov 5, 2024
1 parent 1928658 commit f3c8add
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/Dofs/DofHandler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ function evaluate_at_grid_nodes(dh::DofHandler, u::AbstractVector, fieldname::Sy
end

# Internal method that have the vtk option to allocate the output differently
function _evaluate_at_grid_nodes(dh::DofHandler{sdim}, u::AbstractVector{T}, fieldname::Symbol, ::Val{vtk}=Val(false)) where {T, vtk, sdim}
function _evaluate_at_grid_nodes(dh::DofHandler{sdim}, u::AbstractVector{T}, fieldname::Symbol, ::Val{vtk} = Val(false)) where {T, vtk, sdim}

Check warning on line 933 in src/Dofs/DofHandler.jl

View check run for this annotation

Codecov / codecov/patch

src/Dofs/DofHandler.jl#L933

Added line #L933 was not covered by tests
# Make sure the field exists
fieldname getfieldnames(dh) || error("Field $fieldname not found.")
# Figure out the return type (scalar or vector)
Expand Down Expand Up @@ -966,8 +966,10 @@ function _evaluate_at_grid_nodes(dh::DofHandler{sdim}, u::AbstractVector{T}, fie
end

# Loop over the cells and use shape functions to compute the value
function _evaluate_at_grid_nodes!(data::Union{Vector,Matrix}, sdh::SubDofHandler,
u::AbstractVector{T}, cv::CellValues, drange::UnitRange) where {T}
function _evaluate_at_grid_nodes!(
data::Union{Vector, Matrix}, sdh::SubDofHandler,
u::AbstractVector{T}, cv::CellValues, drange::UnitRange
) where {T}
ue = zeros(T, length(drange))
for cell in CellIterator(sdh)
# Note: We are only using the shape functions: no reinit!(cv, cell) necessary
Expand Down
2 changes: 1 addition & 1 deletion src/interpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ n_dbc_components(ip::Interpolation) = n_components(ip)
Return the type of `shape_value(ip::Interpolation, ξ::Vec, ib::Int)`.
"""
shape_value_type(::Interpolation, ::Type{T}) where {T <: Number}
shape_value_type(::Interpolation, ::Type{T}) where {T <: Number}

shape_value_type(::ScalarInterpolation, ::Type{T}) where {T <: Number} = T
shape_value_type(::VectorInterpolation{vdim}, ::Type{T}) where {vdim, T <: Number} = Vec{vdim, T}

Check warning on line 68 in src/interpolations.jl

View check run for this annotation

Codecov / codecov/patch

src/interpolations.jl#L67-L68

Added lines #L67 - L68 were not covered by tests
Expand Down

0 comments on commit f3c8add

Please sign in to comment.