diff --git a/NEWS.md b/NEWS.md index 82c962d..1fef193 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- Compute signed distance FE function in 3D [#77](https://github.com/gridap/GridapEmbedded.jl/pull/77). + ## [0.9.0] - 2024-01-22 ### Added 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