diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e84ec918..782e21d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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()' diff --git a/.github/workflows/ci_x86.yml b/.github/workflows/ci_x86.yml index 74fc1627..596d4972 100644 --- a/.github/workflows/ci_x86.yml +++ b/.github/workflows/ci_x86.yml @@ -36,4 +36,6 @@ jobs: ${{ runner.os }}-test- ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 + env: + PYTHON: "" - uses: julia-actions/julia-runtest@v1 diff --git a/Project.toml b/Project.toml index f3553c45..61375cea 100644 --- a/Project.toml +++ b/Project.toml @@ -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" @@ -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" diff --git a/src/LevelSetCutters/LevelSetCutters.jl b/src/LevelSetCutters/LevelSetCutters.jl index f12bf89d..c0bf84e1 100644 --- a/src/LevelSetCutters/LevelSetCutters.jl +++ b/src/LevelSetCutters/LevelSetCutters.jl @@ -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 diff --git a/src/LevelSetCutters/LookupTables.jl b/src/LevelSetCutters/LookupTables.jl index 5a76484a..b2417c5f 100644 --- a/src/LevelSetCutters/LookupTables.jl +++ b/src/LevelSetCutters/LookupTables.jl @@ -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 @@ -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) @@ -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 - diff --git a/test/runtests.jl b/test/runtests.jl index 4ede0432..b7004501 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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 @@ -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