Skip to content

Commit

Permalink
Make code more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
abussy committed Feb 17, 2025
1 parent ec0e213 commit b7eaf41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ function FFTGrid(fft_size::Tuple{Int, Int, Int}, unit_cell_volume::T,

VT = value_type(T)
fac = 1 ./ VT.(fft_size)
r_vectors_cpu = map(idx -> Vec3{VT}(fac .* (idx.I .- (1, 1, 1))), CartesianIndices(fft_size))
r_vectors_cpu = [Vec3{VT}(fac .* (idx.I .- (1, 1, 1)))
for idx in CartesianIndices(fft_size)]

r_vectors = to_device(arch, r_vectors_cpu)

FFTGrid{T, VT, typeof(Gs), typeof(r_vectors)}(fft_size, opFFT, ipFFT, opBFFT, ipBFFT,
Expand Down

0 comments on commit b7eaf41

Please # to comment.