: 我再貼一次完整的CODE
: do iz=0,ngrid(3)-1 ; do iy=0,ngrid(2)-1 ; do ix=0,ngrid(1)-1
: xyz(1) = dble(ix)/dble(ngrid(1))
: xyz(2) = dble(iy)/dble(ngrid(2))
: xyz(3) = dble(iz)/dble(ngrid(3))
: atmp = pi2 * (wkiG1*xyz(1) + wkiG2*xyz(2) + wkiG3*xyz(3))
^^(?)這到底是函數還是變數?
: csumout(ix,iy,iz) = sum(coeff(1:nplane)*cdexp(atmp(1:nplane)))/dsqrt(Vol)
(:) ^^