Skip to content

Commit

Permalink
Removed overloaded constructor for FineToCoarseField
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Jan 10, 2024
1 parent 6b14086 commit 34fcdec
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/GridapFixes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,3 @@ function Base.map(::typeof(Gridap.Arrays.testitem),
a1.=zero(Gridap.Arrays.testitem(a1))
(a1,a2)
end

# Required to transfer fine-grid VECTOR-VALUED fields into coarse-grid
function Gridap.Adaptivity.FineToCoarseField(fine_fields::AbstractArray{<:Gridap.Fields.Field},
rrule::Gridap.Adaptivity.RefinementRule,
child_ids::AbstractArray{<:Integer})

grid=Gridap.Adaptivity.get_ref_grid(rrule)
D=num_cell_dims(grid)
x=zero(Point{D,Float64})
ffx=lazy_map(evaluate,fine_fields,Fill([x],length(fine_fields)))
ffx=ffx[1]
fields = Vector{Gridap.Fields.Field}(undef,Gridap.Adaptivity.num_subcells(rrule))
fields = fill!(fields,Gridap.Fields.ConstantField(zero(eltype(ffx))))
for (k,id) in enumerate(child_ids)
fields[id] = fine_fields[k]
end
return Gridap.Adaptivity.FineToCoarseField(fields,rrule)
end

0 comments on commit 34fcdec

Please sign in to comment.