Skip to content

Commit

Permalink
Remove some allocations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Ogiermann committed Mar 7, 2023
1 parent 6d357da commit 2f7d8ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/interpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ getnbasefunctions(::DiscontinuousLagrange{dim,shape,order}) where {dim,shape,ord
getnbasefunctions(::DiscontinuousLagrange{dim,shape,0}) where {dim,shape} = 1

# This just moves all dofs into the interior of the element.
celldof_interior_indices(ip::DiscontinuousLagrange{dim,shape,order}) where {dim,shape,order} = (collect(1:getnbasefunctions(ip))...,)
celldof_interior_indices(ip::DiscontinuousLagrange{dim,shape,order}) where {dim,shape,order} = ntuple(i->i, getnbasefunctions(ip))

# Mirror the Lagrange element for now.
function reference_coordinates(ip::DiscontinuousLagrange{dim,shape,order}) where {dim,shape,order}
Expand Down Expand Up @@ -529,7 +529,7 @@ function celldof_interior_indices(ip::Lagrange2Tri345)
order = getorder(ip)
ncellintdofs = (order + 1) * (order + 2) ÷ 2 - 3 * order
totaldofs = getnbasefunctions(ip)
return (collect((totaldofs-ncellintdofs+1):totaldofs)...,)
return ntuple(i->totaldofs-ncellintdofs+i, ncellintdofs)
end

function reference_coordinates(ip::Lagrange2Tri345)
Expand Down

0 comments on commit 2f7d8ee

Please sign in to comment.