Struct lattice3D

Struct Documentation

struct lattice3D

used to represent the basis of a lattice

The use of a “working lattice” (e.g. Cartesian) is assumed throughout, and all vectors of the lattice object are expressed as integer combinations of this working basis. It is very similar to the basis3D class, except that its basis vectors have integer components

Public Functions

inline lattice3D()
inline lattice3D(vector<vector3D<int64_t>> _e)
lattice3D(vector<int64_t> _e)
void read(istream &fin)

reads the superlattice vectors from a stream and completes the initialization

Parameters:

fin – input stream

void trivial()

Defines a default lattice in dimension D.

void init()

Completes the initialization of the basis.

std::pair<vector3D<int64_t>, vector3D<int64_t>> fold(const vector3D<int64_t> &r)

folds a position in the superlattice : r = R + S R belongs to the superlattice, and S is a remainder that belongs to the original lattice’s unit cell.

Parameters:

r – [in] integer position, in the working basis

Returns:

a pair (R, S) where R is the integer position in the superlattice and S the remainder in the unit cell, both in the working basis

void dual(basis3D &x)

constructs a basis3D, 2PI dual of the basis of the current superlattice

Parameters:

x – reference to the basis to be constructed

vector3D<double> to(vector3D<int64_t> v)

from an integer vector V expressed in the working basis, provides as output its real components in the basis of the current superlattice

Parameters:

V – input vector

vector3D<double> from(vector3D<double> v)

from a vector V expressed in the basis of the current superlattice, provides as output its components in the working basis

Parameters:

V – input vector

Public Members

size_t D

dimension of the lattice (0, 1, 2 or 3)

vector<vector3D<int64_t>> e

Bravais vectors of the lattice (integer)

int64_t vol

Volume of the unit cell (or equivalent measure in dimension D)

matrix<double> M

matrix allowing to express any vector in the integer basis

Friends

friend std::ostream &operator<<(std::ostream &flux, lattice3D &latt)