Skip to content

Commit

Permalink
Remove Ferrite.scalarwrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
lijas committed Jul 1, 2024
1 parent 4bf03ce commit a58b49f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ struct IGACellCache{X,G<:Ferrite.AbstractGrid,DH<:Union{Ferrite.AbstractDofHandl
# Pretty useless to store this since you have it already for the reinit! call, but
# needed for the CellIterator(...) workflow since the user doesn't necessarily control
# the loop order in the cell subset.
cellid::Ferrite.ScalarWrapper{Int}
cellid::Base.RefValue{Int}
nodes::Vector{Int}
bezier_cell_data::X
dh::DH
Expand All @@ -20,7 +20,7 @@ function IGACellCache(dh::DofHandler{dim,G}, flags::UpdateFlags=UpdateFlags()) w
n = ndofs_per_cell(dh, 1)
celldofs = zeros(Int, n)

return IGACellCache(flags, grid, Ferrite.ScalarWrapper(-1), nodes, coords, dh, celldofs)
return IGACellCache(flags, grid, Ref(-1), nodes, coords, dh, celldofs)
end

function Ferrite.reinit!(cc::IGACellCache, i::Int)
Expand Down Expand Up @@ -52,12 +52,12 @@ Ferrite.cellid(cc::IGACellCache) = cc.cellid[]
struct IGAFaceCache{CC}
cc::CC # const for julia > 1.8
dofs::Vector{Int} # aliasing cc.dofs
current_faceid::Ferrite.ScalarWrapper{Int}
current_faceid::Base.RefValue{Int}
end

function IGAFaceCache(args...)
cc = IGACellCache(args...)
IGAFaceCache(cc, cc.dofs, Ferrite.ScalarWrapper(0))
IGAFaceCache(cc, cc.dofs, Ref(-1))
end

function Ferrite.reinit!(fc::IGAFaceCache, face::Ferrite.BoundaryIndex)
Expand Down
4 changes: 2 additions & 2 deletions src/splines/bezier_values.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct BezierFacetValues{FV, GM, FQR, dim, T, V_FV<:AbstractVector{FV}, V_GM<:Ab

current_beo::Base.RefValue{BezierExtractionOperator{T}}
current_w::Vector{T}
current_facet::Ferrite.ScalarWrapper{Int}
current_facet::Base.RefValue{Int}
end

Ferrite.shape_value_type(cv::BezierCellValues) = Ferrite.shape_value_type(cv.bezier_values)
Expand Down Expand Up @@ -92,7 +92,7 @@ function BezierFacetValues(::Type{T}, fqr::FacetQuadratureRule, ip_fun::Interpol
fun_values,
deepcopy(fun_values),
deepcopy(fun_values),
geo_mapping, fqr, detJdV, normals, undef_beo, undef_w, Ferrite.ScalarWrapper(-1))
geo_mapping, fqr, detJdV, normals, undef_beo, undef_w, Ref(-1))
end

function BezierFacetValues(qr::FacetQuadratureRule, ip::Interpolation, args...; kwargs...)
Expand Down

0 comments on commit a58b49f

Please sign in to comment.