Skip to content
Connor Glosser edited this page Dec 5, 2017 · 18 revisions

AIM::spacetime

Barring future design revisions, the spacetime namespace contains typedefs for "spacetime vectors": arrays indexed by [t][x][y][z].

  • vector is for circulant propagation "vectors" (matrices collapsed to a diagonal representation, thus stored as vectors)
  • vector3d is for electromagnetic quantities having spatial dimensions (indexed by [t][grid_x][grid_y][grid_z][component])

The circulant mirror code (fill_circulant_mirror) will only work on scalars/AIM::spacetime::vectors as these are the only things that need special circulant processing (because they're really matrices). In the prescription for quickly evaluating A.x -> b where A is Toeplitz, A acquires a circulant extension (being a matrix) whereas x is extended with zeroes (thus no mirror is required).

Fourier Transforms

  • spatial_fft_plans() builds forward- and backward-FFTW plans for electromagnetic vector quantities (currents after projection onto the grid, fields after propagation). These can be though of as three "parallel" FFTs of rank three; one transform (of rank equivalent to the spatial dimension of the grid) for each spatial dimension of the vector.
    • The Interaction generates the plans assuming the data are laid out as table[grid_x][grid_y][grid_z][vec_x][vec_y][vec_z]. It is a convenient feature of Eigen that a sizeof(Vector3x) == 3 * sizeof(x) (i.e. the Eigen vector object only contains the vector's elements). This means that vector components of a SpacetimeVector<Eigen::Vector3cd> are contiguous and can be FFTW'd with an easily-deduced stride of 3 between 'adjacent' elements.

Expansions

  • Producing the least-squares expansions uses the q_vector method in both the matrix and rhs determination because we've elected to represent the quantum dots with delta-functions. If, in the future, they become objects with a spatial extent, then the w-matrix will become different and the rhs will require an integral (numeric or analytic).

Grid

  • grid/array coordinate: tuple of integers defining a location in the grid. Starts from (0,0,...,0) at the "bottom left" (extended to n-dimensions). The linear index 0 should map to the 0 array coordinate with row-major ordering (z moves fastest)
  • coordinate: Real, positional, coordinate of a point in continuous 3d space. r=0 should map to a point on the grid, though not necessarily the 0 array coordinate (in the case of shifted/biased points).
Clone this wiki locally