From 8559e5e948c722a668833a9dbd0c585610afc205 Mon Sep 17 00:00:00 2001 From: Eric Neiva Date: Wed, 20 Mar 2024 18:50:01 +0100 Subject: [PATCH] Fixes signed distance computation in 3D --- src/AlgoimUtils/AlgoimUtils.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AlgoimUtils/AlgoimUtils.jl b/src/AlgoimUtils/AlgoimUtils.jl index c4d36d1..cbe389c 100644 --- a/src/AlgoimUtils/AlgoimUtils.jl +++ b/src/AlgoimUtils/AlgoimUtils.jl @@ -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