-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed julia-0.7 depwarns, testing loads from JLD2
- Loading branch information
Kristof Cools
committed
Jul 18, 2018
1 parent
3f428bb
commit e72010a
Showing
11 changed files
with
67 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
julia 0.5 | ||
julia 0.7 | ||
Compat 0.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
StaticArrays 0.3.0 | ||
JLD 0.6.3 | ||
JLD2 0.0.6 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,19 @@ | ||
using CollisionDetection | ||
using StaticArrays | ||
using JLD | ||
using Base.Test | ||
#using CollisionDetection | ||
#using StaticArrays | ||
#using JLD2 | ||
#using Test | ||
|
||
fn = normpath(joinpath(dirname(@__FILE__),"center_sizes.jld")) | ||
d = load(fn) | ||
fn = normpath(joinpath(dirname(@__FILE__),"center_sizes.jld2")) | ||
d = JLD2.jldopen(fn,"r") | ||
|
||
tmp = d["ctrs"] | ||
ctrs = [SVector(q...) for q in tmp] | ||
rads = d["rads"] | ||
|
||
tree = Octree(ctrs, rads) | ||
tree = CD.Octree(ctrs, rads) | ||
|
||
# extract all the triangles that (potentially) intersect octant (+,+,+) | ||
pred(i) = all(ctrs[i].+rads[i] .> 0) | ||
bb = SVector(0.5, 0.5, 0.5), 0.5 | ||
ids = collect(searchtree(pred, tree, bb)) | ||
@test length(ids) == 154 | ||
|
||
# using MATLAB | ||
# A = [c[i] for i in 1:3, c in ctrs].' | ||
# @mput A rads | ||
# @matlab begin | ||
# plot3(A[:,1],A[:,2],A[:,3],".") | ||
# end | ||
# | ||
# B = [ctrs[j][i] for i in 1:3, j in ids].' | ||
# @mput B | ||
# @matlab begin | ||
# hold("on") | ||
# plot3(B[:,1],B[:,2],B[:,3],"or") | ||
# end | ||
ids = collect(CD.searchtree(pred, tree, bb)) | ||
@test length(ids) == 178 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
using CollisionDetection | ||
using CompScienceMeshes | ||
using JLD | ||
# using CollisionDetection | ||
# using CompScienceMeshes | ||
# using JLD2 | ||
|
||
m = meshsphere(1.0, 0.2) | ||
@show numcells(m) | ||
|
||
centroid(ch) = cartesian(meshpoint(ch, [1,1]/3)) | ||
#centroid(ch) = cartesian(meshpoint(ch, [1,1]/3)) | ||
|
||
ctrs = [centroid(simplex(cellvertices(m,i))) for i in 1:numcells(m)] | ||
rads = [maximum(norm(v-ctrs[i]) for v in cellvertices(m,i)) for i in eachindex(ctrs)] | ||
#ctrs = [centroid(simplex(cellvertices(m,i))) for i in 1:numcells(m)] | ||
ctrs = cartesian.(center.(chart.(m,cells(m)))) | ||
#rads = [maximum(norm(v-ctrs[i]) for v in cellvertices(m,i)) for i in eachindex(ctrs)] | ||
rads = [maximum(norm(v-ctrs[i]) for v in vertices(m,c)) for (i,c) in enumerate(cells(m))]; | ||
tree = Octree(ctrs, rads) | ||
|
||
fn = joinpath(@__FILE__,"..","center_sizes.jld") | ||
save(fn, | ||
"ctrs", ctrs, | ||
"rads", rads) | ||
fn = joinpath(@__FILE__,"..","center_sizes.jld2") | ||
JLD2.@save fn ctrs rads | ||
# save(fn, | ||
# "ctrs", ctrs, | ||
# "rads", rads) |