Skip to content

eliminating miniqhull dep #64

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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
env:
PYTHON: ""
- run: |
julia --color=yes --project=. --check-bounds=yes --depwarn=error -e '
using Pkg; Pkg.instantiate()'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ jobs:
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
env:
PYTHON: ""
- uses: julia-actions/julia-runtest@v1
5 changes: 2 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ version = "0.8.0"
[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Delaunay = "07eb4e4e-0c6d-46ef-bc4e-83d5e5d860a9"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MiniQhull = "978d7f02-9e05-4691-894f-ae31a51d76ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Expand All @@ -20,8 +20,7 @@ Combinatorics = "1"
FillArrays = "0.10, 0.11"
Gridap = "0.17.13"
LightGraphs = "1.3.3"
MiniQhull = "0.1.0, 0.2, 0.3"
julia = "1.3"
julia = "1.5"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
2 changes: 1 addition & 1 deletion src/LevelSetCutters/LevelSetCutters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using GridapEmbedded.Interfaces: merge_sub_face_data
using GridapEmbedded.Interfaces: compute_inoutcut

using LinearAlgebra
using MiniQhull
using Delaunay

using Gridap.TensorValues
using Gridap.ReferenceFEs
Expand Down
11 changes: 5 additions & 6 deletions src/LevelSetCutters/LookupTables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct LookupTable{D,T}
case_to_subfacet_to_points::Vector{Vector{Vector{Int}}}
case_to_subfacet_to_normal::Vector{Vector{VectorValue{D,T}}}
case_to_subfacet_to_orientation::Vector{Vector{T}}
case_to_point_to_coordinates::Vector{Vector{VectorValue{D,T}}}
case_to_point_to_coordinates::Vector{Vector{VectorValue{D,T}}}
case_to_inoutcut::Vector{Int}
end

Expand Down Expand Up @@ -155,14 +155,14 @@ end

function _delaunay(points::Vector{Point{D,T}}) where {D,T}
n = length(points)
m = zeros(T,D,n)
m = zeros(T,n,D)
for (i,p) in enumerate(points)
for (j,pj) in enumerate(p)
m[j,i] = pj
m[i,j] = pj
end
end
cells = delaunay(m)
[ Vector{Int}(cells[:,k]) for k in 1:size(cells,2)]
cells = delaunay(m).simplices
[ Vector{Int}(cells[k,:]) for k in 1:size(cells,1)]
end

function _ensure_positive_jacobians!(subcell_to_points,point_to_coords,p::Polytope)
Expand Down Expand Up @@ -370,4 +370,3 @@ function _orthogonal_vector(v1::VectorValue{4},v2::VectorValue{4},v3::VectorValu
w4 = (v11*v23*v32 - v11*v22*v33 + v12*v21*v33 - v12*v23*v31 - v13*v21*v32 + v13*v22*v31)
VectorValue(w1,w2,w3,w4)
end

9 changes: 1 addition & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ module RunTests

using Test

using MiniQhull

if MiniQhull.QHULL_WRAPPER_LOADED[]
using Delaunay

@time @testset "CSG" begin include("CSGTests/runtests.jl") end

Expand All @@ -16,9 +14,4 @@ if MiniQhull.QHULL_WRAPPER_LOADED[]

include(joinpath(@__DIR__,"..","examples","runexamples.jl"))

else
@warn "MiniQhull not properly installed. Tests are not executed."

end

end # module