You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a 2D phase field for IGA analysis, this works and plots nicely:
Nx = 60
Ny = 60
@show Nx,Ny
p = 3
q = 3
knotvectorU = KnotVector(collect(Int64,range(0,Nx,length=Nx+1)))
knotvectorV = KnotVector(collect(Int64,range(0,Ny,length=Ny+1)))
# @show knotvectorU
# @show knotvectorV
lenu = length(knotvectorU)
lenv = length(knotvectorV)
@show lenu,lenv
P1 = BSplineSpace{p}(knotvectorU) # B-spline space
P2 = BSplineSpace{q}(knotvectorV) # B-spline space
a = [SVector(i, j, (i-dim(P1)/2)^2+(j-dim(P1)/2)^2 < 100 ? 1 : 0) for i in 1:dim(P1), j in 1:dim(P2)]
# @show a
M = BSplineManifold(a,(P1,P2)) # Define B-spline manifold
# @show M
plot(M)
Now extend this to 3D, which is mathematically possible but difficult to visualize. One could plot a slice through the 3D space, but slicing the BSplineManifold fails. Is there a way to do this?
Nx = 60
Ny = 60
Nz = 60
@show Nx,Ny,Nz
p = 3
q = 3
r = 3
knotvectorU = KnotVector(collect(Int64,range(0,Nx,length=Nx+1)))
knotvectorV = KnotVector(collect(Int64,range(0,Ny,length=Ny+1)))
knotvectorW = KnotVector(collect(Int64,range(0,Nz,length=Nz+1)))
# @show knotvectorU
# @show knotvectorV
# @show knotvectorW
lenu = length(knotvectorU)
lenv = length(knotvectorV)
lenw = length(knotvectorW)
@show lenu,lenv,lenw
P1 = BSplineSpace{p}(knotvectorU) # B-spline space
P2 = BSplineSpace{q}(knotvectorV) # B-spline space
P3 = BSplineSpace{r}(knotvectorW) # B-spline space
a = [SVector(i, j, k ,(i-dim(P1)/2)^2+(j-dim(P2)/2)^2+(k-dim(P3)/2)^2 < 100 ? 1 : 0) for i in 1:dim(P1), j in 1:dim(P2),k in 1:dim(P3)]
#@show a
M = BSplineManifold(a,(P1,P2,P3)) # Define B-spline manifold
@show M[25,:,:,:]
plot(M[25,:,:,:])
The text was updated successfully, but these errors were encountered:
Here's a 2D phase field for IGA analysis, this works and plots nicely:
Now extend this to 3D, which is mathematically possible but difficult to visualize. One could plot a slice through the 3D space, but slicing the BSplineManifold fails. Is there a way to do this?
The text was updated successfully, but these errors were encountered: