JDFTx  1.7.0
WignerSeitz Class Reference

Wigner-Seitz construction for a 3D lattice (and 2D lattice with orthogonal 3rd direction) More...

#include <WignerSeitz.h>

Public Member Functions

 WignerSeitz (const matrix3<> &R)
 Construct Wigner-Seitz cell given lattice vectors.
 
vector3 reduce (const vector3<> &x) const
 Find the point within the Wigner-Seitz cell equivalent to x (lattice coordinates)
 
vector3< int > reduce (const vector3< int > &iv, const vector3< int > &S, const vector3<> &invS) const
 Find the point within the Wigner-Seitz cell equivalent to iv (mesh coordinates with sample count S)
 
double boundaryDistance (const vector3<> &x, int iDir=-1) const
 
bool onBoundary (const vector3<> &x, int iDir=-1) const
 
double inRadius (int iDir=-1) const
 
double circumRadius (int iDir=-1) const
 
std::vector< vector3< int > > getNeighbours (vector3< bool > isTruncated) const
 Get list of neighbouring lattice vectors (along non-truncated directions) that share faces with origin.
 
void writeWireframePlot (const char *filename) const
 Write a wireframe plot to file (for gnuplot)
 
void writeWireframeDX (const char *filename) const
 Write a wireframe plot for Data Explorer (.dx)
 
void checkGraph () const
 Check if the data structure is valid (all links are reciprocated etc.)
 
void writeGraph (FILE *fp=stdout) const
 Output vertex, edge and face connectivity info:
 

Static Public Member Functions

static bool isOrthogonal (const vector3<> &, const vector3<> &)
 Check whether lattice vectors are orthogonal (within relative tolerance geomRelTol)
 

Static Public Attributes

static const double geomRelTol
 relative tolerance for orthogonality and volume checks
 

Detailed Description

Wigner-Seitz construction for a 3D lattice (and 2D lattice with orthogonal 3rd direction)

Member Function Documentation

◆ boundaryDistance()

double WignerSeitz::boundaryDistance ( const vector3<> &  x,
int  iDir = -1 
) const
inline

Find the smallest distance of a point inside the Wigner-Seitz cell from its surface Returns 0 if the point is outside the Wigner-Seitz cell Ignore direction iDir to obtain 2D behavior, if iDir >= 0

◆ circumRadius()

double WignerSeitz::circumRadius ( int  iDir = -1) const

Radius of smallest sphere centered at origin that contains the Wigner-Seitz cell Ignore direction iDir to obtain 2D behavior, if iDir >= 0

◆ inRadius()

double WignerSeitz::inRadius ( int  iDir = -1) const

Radius of largest sphere centered at origin contained within the Wigner-Seitz cell Ignore direction iDir to obtain 2D behavior, if iDir >= 0

◆ onBoundary()

bool WignerSeitz::onBoundary ( const vector3<> &  x,
int  iDir = -1 
) const
inline

Return true if point is on th eboundray of the Wigner-Seitz cell Ignore direction iDir to obtain 2D behavior, if iDir >= 0


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