TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::lattice::bravais_lattice::point_t

#include <triqs/lattice/bravais_lattice.hpp>

Detailed Description

Lattice point of a Bravais lattice.

A lattice point is defined by an index vector, \( \mathbf{n} = (n_1, \dots, n_d) \), and the Bravais lattice it belongs to.

The corresponding lattice vector, \( \mathbf{R}^{\mathbf{n}} = (R^{\mathbf{n}}_1, \dots, R^{\mathbf{n}}_d) \), can be obtained with

\[ \mathbf{R}^{\mathbf{n}} = \sum_{i=1}^{d} \mathbf{a}_i n_i \; , \]

where \( \{ \mathbf{a}_1, \dots, \mathbf{a}_d \} \) are the basis vectors of the underlying Bravais lattice.

Note
Although the supported dimensions are 1, 2 and 3, the index vectors are always 3-dimensional, i.e. \(\mathbf{n} = (n_1, n_2, n_3) \). Indices \( n_j \) with \( j > d \) are simply ignored when computing the corresponding lattice vector.

Definition at line 97 of file bravais_lattice.hpp.

Inheritance diagram for triqs::lattice::bravais_lattice::point_t:
triqs::mesh::cyclat::mesh_point_t

Public Member Functions

 point_t ()=default
 Default constructor leaves the lattice point uninitialized, i.e. belonging to no Bravais lattice.
 point_t (index_t const &n, bravais_lattice const *bl_ptr)
 Construct a lattice point with a given index vector on the given Bravais lattice.
auto index () const
 Get the index vector \( \mathbf{n} \) of the lattice point.
auto const & lattice () const
 Get the underlying Bravais lattice.
 operator r_t () const
 Conversion to the corresponding lattice vector \( \mathbf{R}^{\mathbf{n}} = \sum_{i=1}^{d} \mathbf{a}_i n_i \).
double operator() (int d) const
 Get the coordinate \( R^{\mathbf{n}}_i \) of the corresponding lattice vector \(\mathbf{R}^{\mathbf{n}} \).
point_t operator+ (point_t const &pt) const
 Add two lattice points \( \mathbf{R}^{\mathbf{n}} \) and \( \mathbf{R}^{\mathbf{m}} \).
point_t operator- () const
 Invert the lattice point \( \mathbf{R}^{\mathbf{n}} \).
point_t operator- (point_t const &pt) const
 Subtract two lattice points \( \mathbf{R}^{\mathbf{n}} \) and \( \mathbf{R}^{\mathbf{m}} \).
double operator[] (int i) const
 Get the coordinate \( R^{\mathbf{n}}_i \) of the corresponding lattice vector \(\mathbf{R}^{\mathbf{n}} \).

Friends

std::ostream & operator<< (std::ostream &sout, point_t const &pt)
 Write a lattice point to a std::ostream.

Constructor & Destructor Documentation

◆ point_t()

triqs::lattice::bravais_lattice::point_t::point_t ( index_t const & n,
bravais_lattice const * bl_ptr )
inline

Construct a lattice point with a given index vector on the given Bravais lattice.

Parameters
nIndex vector \( \mathbf{n} \).
bl_ptrPointer to the Bravais lattice.

Definition at line 108 of file bravais_lattice.hpp.

Member Function Documentation

◆ operator()()

double triqs::lattice::bravais_lattice::point_t::operator() ( int d) const
inline

Get the coordinate \( R^{\mathbf{n}}_i \) of the corresponding lattice vector \(\mathbf{R}^{\mathbf{n}} \).

Deprecated
Use operator[]() instead.

Definition at line 133 of file bravais_lattice.hpp.

◆ operator+()

point_t triqs::lattice::bravais_lattice::point_t::operator+ ( point_t const & pt) const
inlinenodiscard

Add two lattice points \( \mathbf{R}^{\mathbf{n}} \) and \( \mathbf{R}^{\mathbf{m}} \).

Parameters
ptLattice point \( \mathbf{R}^{\mathbf{m}} \) (has to belong to the same Bravais lattice).
Returns
Lattice point corresponding to the lattice vector \( \mathbf{R}^{\mathbf{n}} + \mathbf{R}^{\mathbf{m}} \).

Definition at line 151 of file bravais_lattice.hpp.

◆ operator-() [1/2]

point_t triqs::lattice::bravais_lattice::point_t::operator- ( ) const
inlinenodiscard

Invert the lattice point \( \mathbf{R}^{\mathbf{n}} \).

Returns
Lattice point corresponding to the lattice vector \( -\mathbf{R}^{\mathbf{n}} \).

Definition at line 172 of file bravais_lattice.hpp.

◆ operator-() [2/2]

point_t triqs::lattice::bravais_lattice::point_t::operator- ( point_t const & pt) const
inlinenodiscard

Subtract two lattice points \( \mathbf{R}^{\mathbf{n}} \) and \( \mathbf{R}^{\mathbf{m}} \).

Parameters
ptLattice point \( \mathbf{R}^{\mathbf{m}} \) (has to belong to the same Bravais lattice).
Returns
Lattice point corresponding to the lattice vector \( \mathbf{R}^{\mathbf{n}} - \mathbf{R}^{\mathbf{m}} \).

Definition at line 163 of file bravais_lattice.hpp.

◆ operator[]()

double triqs::lattice::bravais_lattice::point_t::operator[] ( int i) const
inline

Get the coordinate \( R^{\mathbf{n}}_i \) of the corresponding lattice vector \(\mathbf{R}^{\mathbf{n}} \).

Parameters
iDimension index \( i \).
Returns
Lattice vector coordinate \( R^{\mathbf{n}}_i \).

Definition at line 142 of file bravais_lattice.hpp.

◆ operator<<

std::ostream & operator<< ( std::ostream & sout,
point_t const & pt )
friend

Write a lattice point to a std::ostream.

Parameters
soutstd::ostream object.
ptLattice point to be written.
Returns
Reference to std::ostream object.

Definition at line 181 of file bravais_lattice.hpp.


The documentation for this class was generated from the following file: