Skip to content

Commit

Permalink
Replaced TriangulationView by view
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore-nori committed Oct 17, 2022
1 parent b3b867c commit 4b841f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/CellData/DiracDeltas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function DiracDelta(model::DiscreteModel{D}, p::Point{D,T}) where {D,T}
trian = Triangulation(model)
cache = _point_to_cell_cache(KDTreeSearch(),trian)
cell = _point_to_cell!(cache, p)
trianv = TriangulationView(trian,[cell])
trianv = view(trian,[cell])
point = [p]
weight = [one(T)]
pquad = GenericQuadrature(point,weight)
Expand All @@ -114,7 +114,7 @@ function DiracDelta(model::DiscreteModel{D}, pvec::Vector{Point{D,T}}) where {D,
points = map(i->pvec[cell_points[i]], 1:length(cell_ids))
weights_x_cell = collect.(Fill.(one(T),length.(cell_points)))
pquad = map(i -> GenericQuadrature(points[i],weights_x_cell[i]), 1:length(cell_ids))
trianv = TriangulationView(trian,cell_ids)
trianv = view(trian,cell_ids)
pmeas = Measure(CellQuadrature(pquad,points,weights_x_cell,trianv,PhysicalDomain(),PhysicalDomain()))
GenericDiracDelta{0,D,NotGridEntity}(trianv,pmeas)
end
1 change: 0 additions & 1 deletion src/Geometry/Geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export compress_ids
export UnstructuredGridTopology

export Triangulation
export TriangulationView
export get_reffes
export get_cell_coordinates
export get_cell_ref_coordinates
Expand Down

0 comments on commit 4b841f1

Please sign in to comment.