Skip to content

Commit

Permalink
Merge pull request #33 from DanielVandH/int64
Browse files Browse the repository at this point in the history
Change Int64 -> Int
  • Loading branch information
Kevin-Mattheus-Moerman authored Jul 8, 2024
2 parents 31a805b + fe3cbcd commit 4cea4ac
Show file tree
Hide file tree
Showing 13 changed files with 557 additions and 557 deletions.
2 changes: 1 addition & 1 deletion examples/demo_boundaryfaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if testCase == 1
sampleSize = 10
pointSpacing = 2
boxDim = sampleSize.*[1,1,1] # Dimensionsions for the box in each direction
boxEl = ceil.(Int64,boxDim./pointSpacing) # Number of elements to use in each direction
boxEl = ceil.(Int,boxDim./pointSpacing) # Number of elements to use in each direction
E,V,F,Fb,CFb_type = hexbox(boxDim,boxEl)
elseif testCase == 2
F1,V1 = geosphere(3,1.0)
Expand Down
10 changes: 5 additions & 5 deletions examples/demo_distmarch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ if testCase == 1
V[2 ] = GeometryBasics.Point{3, Float64}( 0.0, -s, 0.0)
V[3 ] = GeometryBasics.Point{3, Float64}( s, 0.0, 0.0)

F = Vector{TriangleFace{Int64}}(undef,1)
F[1 ] = TriangleFace{Int64}(1,2,3)
F = Vector{TriangleFace{Int}}(undef,1)
F[1 ] = TriangleFace{Int}(1,2,3)
# F,V=subtri(F,V,2)
elseif testCase==2
# Bowtie mesh
Expand All @@ -27,9 +27,9 @@ elseif testCase==2
V[4 ] = GeometryBasics.Point{3, Float64}( 2*s, s, 0.0)
V[5 ] = GeometryBasics.Point{3, Float64}( 2*s, -s, 0.0)

F = Vector{TriangleFace{Int64}}(undef,2)
F[1 ] = TriangleFace{Int64}(1,2,3)
F[2 ] = TriangleFace{Int64}(5,4,3)
F = Vector{TriangleFace{Int}}(undef,2)
F[1 ] = TriangleFace{Int}(1,2,3)
F[2 ] = TriangleFace{Int}(5,4,3)
# F,V=subtri(F,V,2)
elseif testCase==3
r = 1.0
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_extrudecurve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ d = 3.0 # Extrusion distance (extent)
n = normalizevector(Vec{3, Float64}(0.0,0.0,1.0)) # Extrusion direction
direction = :positive

# num_steps = ceil(Int64,d/pointSpacing)
# num_steps = ceil(Int,d/pointSpacing)

F1,V1 = extrudecurve(Vc; extent=d, direction=:positive, n=n, close_loop=true,face_type=:quad)
F2,V2 = extrudecurve(Vc; extent=d, direction=:both, n=n, close_loop=true,face_type=:tri_slash)
Expand Down
4 changes: 2 additions & 2 deletions examples/demo_hexbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ domain.
sampleSize = 10
pointSpacing = 2
boxDim = sampleSize.*[1,1,1] # Dimensionsions for the box in each direction
boxEl = ceil.(Int64,boxDim./pointSpacing) # Number of elements to use in each direction
boxEl = ceil.(Int,boxDim./pointSpacing) # Number of elements to use in each direction

E,V,F,Fb,CFb_type = hexbox(boxDim,boxEl)

Expand All @@ -37,7 +37,7 @@ ZE = [v[3] for v in VE]
Z = [v[3] for v in V]
zMax = maximum(Z)
zMin = minimum(Z)
numSlicerSteps = 3*ceil(Int64,(zMax-zMin)/mean(edgelengths(F,V)))
numSlicerSteps = 3*ceil(Int,(zMax-zMin)/mean(edgelengths(F,V)))

stepRange = range(zMin,zMax,numSlicerSteps)
hSlider = Slider(fig[2, 1], range = stepRange, startvalue = mean(stepRange),linewidth=30)
Expand Down
6 changes: 3 additions & 3 deletions examples/demo_mesh_curvature_polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ elseif testCase==3
elseif testCase==4
r = 25
s = r/10
nc = round(Int64,(2*pi*r)/s)
nc = round(Int,(2*pi*r)/s)
d = r*2
Vc = circlepoints(r, nc; dir=:cw)
num_steps = round(Int64,d/s)
num_steps = num_steps + Int64(iseven(num_steps))
num_steps = round(Int,d/s)
num_steps = num_steps + Int(iseven(num_steps))
F, V = extrudecurve(Vc, d; s=1, n=[0.0,0.0,1.0], num_steps=num_steps, close_loop=true, face_type=:quad)
elseif testCase==5 # Merged STL for single object
# Loading a mesh
Expand Down
10 changes: 5 additions & 5 deletions examples/demo_meshgroup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ if testCase == 1
V[2 ] = GeometryBasics.Point{3, Float64}( 0.0, -s, 0.0)
V[3 ] = GeometryBasics.Point{3, Float64}( s, 0.0, 0.0)

F = Vector{TriangleFace{Int64}}(undef,1)
F[1 ] = TriangleFace{Int64}(1,2,3)
F = Vector{TriangleFace{Int}}(undef,1)
F[1 ] = TriangleFace{Int}(1,2,3)
# F,V=subtri(F,V,2)
elseif testCase==2
s=1.0
Expand All @@ -23,9 +23,9 @@ elseif testCase==2
V[4 ] = GeometryBasics.Point{3, Float64}( 2*s, s, 0.0)
V[5 ] = GeometryBasics.Point{3, Float64}( 2*s, -s, 0.0)

F = Vector{TriangleFace{Int64}}(undef,2)
F[1 ] = TriangleFace{Int64}(1,2,3)
F[2 ] = TriangleFace{Int64}(3,4,5)
F = Vector{TriangleFace{Int}}(undef,2)
F[1 ] = TriangleFace{Int}(1,2,3)
F[2 ] = TriangleFace{Int}(3,4,5)
# F,V=subtri(F,V,2)
elseif testCase==3
r = 1.0
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_sweeploft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ linewidth = 2

if vizCase ==1

CF = round.(Int64,vertex2simplexdata(F,C))
CF = round.(Int,vertex2simplexdata(F,C))

fig = Figure(size = (1600,1600))
ax = Axis3(fig[1, 1],aspect = :data,title="Swept lofting")
Expand Down
4 changes: 2 additions & 2 deletions examples/demo_tet2hex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ domain.
testCase = 1

if testCase == 1
E = [Tet4{Int64}(1,2,3,4),Tet4{Int64}(2,3,4,5),Tet4{Int64}(6,7,8,9)]
E = [Tet4{Int}(1,2,3,4),Tet4{Int}(2,3,4,5),Tet4{Int}(6,7,8,9)]
V = [Point{3,Float64}(-1.0,0.0,0.0),
Point{3,Float64}( 1.0,0.0,0.0),
Point{3,Float64}( 0.0,1.0,0.0),
Expand All @@ -22,7 +22,7 @@ if testCase == 1
Point{3,Float64}( 3.0,0.5,1.0),
]
elseif testCase == 2
E = [hex8{Int64}(1,2,3,4,5,6,7,8)]
E = [hex8{Int}(1,2,3,4,5,6,7,8)]
V = [Point{3,Float64}(0.0,0.0,0.0),
Point{3,Float64}(1.0,0.0,0.0),
Point{3,Float64}(1.0,1.0,0.0),
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_tetgenmesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ ZE = [v[3] for v in VE]
Z = [v[3] for v in V]
zMax = maximum(Z)
zMin = minimum(Z)
numSlicerSteps = 3*ceil(Int64,(zMax-zMin)/mean(edgelengths(F,V)))
numSlicerSteps = 3*ceil(Int,(zMax-zMin)/mean(edgelengths(F,V)))

stepRange = range(zMin,zMax,numSlicerSteps)
hSlider = Slider(fig[2, 1], range = stepRange, startvalue = mean(stepRange),linewidth=30)
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_tetvol.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ ZE = [v[3] for v in VE]
Z = [v[3] for v in V]
zMax = maximum(Z)
zMin = minimum(Z)
numSlicerSteps = 3*ceil(Int64,(zMax-zMin)/mean(edgelengths(F,V)))
numSlicerSteps = 3*ceil(Int,(zMax-zMin)/mean(edgelengths(F,V)))

stepRange = range(zMin,zMax,numSlicerSteps)
hSlider = Slider(fig[2, 1], range = stepRange, startvalue = mean(stepRange),linewidth=30)
Expand Down
6 changes: 3 additions & 3 deletions examples/demo_tri2quad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ connecting the original vertices to new mid-edge and mid-face vertices.
testCase = 3
if testCase == 1 # Single triangle
V = [Point{3,Float64}(0.0,0.0,0.0),Point{3,Float64}(1.0,0.0,0.0),Point{3,Float64}(1.0,1.0,0.0)]
F = [TriangleFace{Int64}(1,2,3)]
F = [TriangleFace{Int}(1,2,3)]
elseif testCase == 2 # Single triangle refined once, so 4 triangles
V = [Point{3,Float64}(0.0,0.0,0.0),Point{3,Float64}(1.0,0.0,0.0),Point{3,Float64}(0.0,1.0,0.0),Point{3,Float64}(1.0,1.0,0.0)]
F = [TriangleFace{Int64}(1,2,3),TriangleFace{Int64}(2,4,3)]
F = [TriangleFace{Int}(1,2,3),TriangleFace{Int}(2,4,3)]
F,V = subtri(F,V,1)
elseif testCase == 3 # tetrahedron
r = 0.5 #radius
Expand All @@ -41,7 +41,7 @@ end

Fq,Vq = tri2quad(F,V; method=:split)
Fr,Vr = tri2quad(F,V; method=:rhombic)
# Fr = [QuadFace{Int64}(f[2],f[3],f[4],f[1]) for f in Fr]
# Fr = [QuadFace{Int}(f[2],f[3],f[4],f[1]) for f in Fr]

## Visualization

Expand Down
Loading

0 comments on commit 4cea4ac

Please sign in to comment.