Lattices & Grids
These methods implement grids similar to a Bravais lattice, as well as their repetition scheme.
Constructors
Methods
All buildGrid
functions construct a grid with \(n\\_1\times n\\_2\) elements (depending on their basis vectors).
buildGrid
@example grids buildGrid(HexagonalGrid(SVector(0.0, 0.0), 0.5), 8, 6) |> scatter
One can use these as centers for other boundaries.
using LinearAlgebra
using StaticArrays: SVector
import BoundaryWall as BWM
= 9 # number of points per element
N = 1.0
R = LinRange(0, 2pi, N+1)
θ = 180 # incident angle
TH
= 2.0R + R/2 # diameter + constant
STEP = (10,7)
N_CIRCLES = [-(N_CIRCLES[1]-1)*STEP/2:STEP:(N_CIRCLES[1]-1)*STEP/2,-(N_CIRCLES[2]-1)*STEP/2:STEP:(N_CIRCLES[2]-1)*STEP/2]
RANGES =length(RANGES)
N_STEPS = vec([(i, j) for i in RANGES[1], j in RANGES[2]])
CENTERS
# delete some indices
= sort([31,32,33,43,44,45,46,47,48,38,39, 40, 23, 24, 25, 26, 27, 28])
INDICES
deleteat!(CENTERS, INDICES)
= [BWM.createCircle(R, θ, SVector(cen)) for cen in CENTERS]
CIRCLES # ...
One then can proceed to plot such circles. The details can be found in the documentation