Skip to content

Commit

Permalink
Fixes signed distance computation in 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
ericneiva committed Mar 20, 2024
1 parent a4c55dd commit 8559e5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AlgoimUtils/AlgoimUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ signed_distance(φ::T,x,y) where {T<:Number} = sign(φ)*norm(x-y)

function _compute_signed_distance(
φ::AlgoimCallLevelSetFunction{<:Function,<:Function},
cps::Vector{<:Point},cos::Matrix{<:Point})
cps::Vector{<:Point{N,T}},cos::Array{<:Point{N,T},N}) where {N,T}
_dist(x,y) = signed_distance.φ,x,y)
lazy_map(_dist,cps,cos)
end

function _compute_signed_distance(
φ::AlgoimCallLevelSetFunction{<:CellField,<:CellField},
cps::Vector{<:Point},cos::Matrix{<:Point})
cps::Vector{<:Point{N,T}},cos::Array{<:Point{N,T},N}) where {N,T}
φs = get_free_dof_values.φ)
lazy_map(signed_distance,φs,cps,cos)
end
Expand Down

0 comments on commit 8559e5e

Please sign in to comment.