Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes signed distance computation in 3D #77

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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
Loading