treams.lattice

Lattice sums.

Calculates the lattice sums of the forms

\[D_{lm}(k, \boldsymbol k_\parallel, \boldsymbol r, \Lambda_d) = \sideset{}{'}{\sum_{\boldsymbol R \in \Lambda_d}} h_l^{(1)}(k|\boldsymbol r + \boldsymbol R|) Y_{lm} (\theta_{-\boldsymbol r - \boldsymbol R}, \varphi_{-\boldsymbol r - \boldsymbol R}) \mathrm e^{\mathrm i \boldsymbol k_\parallel \boldsymbol R}\]

and

\[D_{m}(k, \boldsymbol k_\parallel, \boldsymbol r, \Lambda_d) = \sideset{}{'}{\sum_{\boldsymbol R \in \Lambda_d}} H_m^{(1)}(k|\boldsymbol r + \boldsymbol R|) \mathrm e^{\mathrm i m \varphi_{-\boldsymbol r - \boldsymbol R}} \mathrm e^{\mathrm i \boldsymbol k_\parallel \boldsymbol R}\]

that arise when translating and summing the spherical and cylindrical solutions of the Helmholtz equation in a periodic arrangement. These sums have a notoriously slow convergence and at least for lattices with a dimension \(d > 1\) it is not advisable to use the direct approach. Fortunately, it is possible to convert them to exponentially convergent series, which are implemented here. For details on the math, see the references below.

The lattice of dimension \(d \leq 3\) (\(d \leq 2\) in the second case) is denoted with \(\Lambda_d\) and consists of all vectors \(\boldsymbol R = \sum_{i=1}^{d} n_i \boldsymbol a_i\) with \(\boldsymbol a_i\) being basis vectors of the lattice and \(n_i \in \mathbb Z\). For \(d = 2\) the lattice is in the z = 0 plane and for \(d = 1\) it is along the z-axis. The vector \(\boldsymbol r\) is arbitrary but for best convergence it should be reduced to the Wigner-Seitz cell of the lattice. The summation excludes the point \(\boldsymbol R + \boldsymbol r = 0\) if it exists, which is indicated by the prime next to the summation sign.

The wave in the lattice is defined by its – possibly complex-valued – wave number \(k\) and the (real) components of the wave vector \(\boldsymbol k_\parallel \in \mathbb R^d\) that are parallel to the lattice.

The expressions include the (spherical) Hankel functions of first kind \(H_m^{(1)}\) (\(h_l^{(1)}\)) and the spherical harmonics \(Y_{lm}\). The angles \(\theta\) and \(\varphi\) are the polar and azimuthal angle, when expressing the points in spherical coordinates. In the first case, the degree is \(l \in \mathbb N_0\) and the order is \(\mathbb Z \ni m \leq l\). In the second case \(m \in \mathbb Z\).

Available functions

Accelerated lattice summations

lsumcw1d(l, k, kpar, a, r, eta)

Fast summation of cylindrical functions on a 1d lattice

lsumcw1d_shift(l, k, kpar, a, r, eta)

Fast summation of cylindrical functions on a 1d lattice with out of lattice shifts

lsumcw2d(l, k, kpar, a, r, eta)

Fast summation of cylindrical functions on a 2d lattice

lsumsw1d(l, k, kpar, a, r, eta)

Fast summation of spherical functions on a 1d lattice

lsumsw1d_shift(l, m, k, kpar, a, r, eta)

Fast summation of spherical functions on a 1d lattice with out of lattice shifts

lsumsw2d(l, m, k, kpar, a, r, eta)

Fast summation of spherical functions on a 2d lattice

lsumsw2d_shift(l, m, k, kpar, a, r, eta)

Fast summation of spherical functions on a 2d lattice with out of lattice shifts

lsumsw3d(l, m, k, kpar, a, r, eta)

Fast summation of spherical functions on a 3d lattice

Direct summations

The functions are almost only here for benchmarking and comparison.

dsumcw1d(l, k, kpar, a, r, i)

Direct summation of cylindrical functions on a 1d lattice

dsumcw1d_shift(l, k, kpar, a, r, i)

Direct summation of cylindrical functions on a 1d lattice with out of lattice shifts

dsumcw2d(l, k, kpar, a, r, i)

Direct summation of cylindrical functions on a 2d lattice

dsumsw1d(l, k, kpar, a, r, i)

Direct summation of spherical functions on a 1d lattice

dsumsw1d_shift(l, m, k, kpar, a, r, i)

Fast summation of spherical functions on a 1d lattice with out of lattice shifts

dsumsw2d(l, m, k, kpar, a, r, i)

Direct summation of spherical functions on a 2d lattice

dsumsw2d_shift(l, m, k, kpar, a, r, i)

Direct summation of spherical functions on a 2d lattice with out of lattice shifts

dsumsw3d(l, m, k, kpar, a, r, i)

Direct summation of spherical functions on a 3d lattice

Miscellaneous functions

area(a)

Calculate the signed volume (area)

cube(d, n)

All integer points in a d-dimensional cube of sidelength 2n

cubeedge(d, n)

All integer points on the surface of a d-dimensional cube of sidelength 2n

diffr_orders_circle(b, rmax)

Diffraction orders in a circle.

reciprocal(a)

Reciprocal vectors in two- and three-dimensional space

volume(a)

Calculate the signed volume (area)

Cython module

cython_lattice

Cython versions of lattice functions.

References