Base class for storing wavevectors in the Brillouin zone. More...
#include <points.h>

Public Member Functions | |
| Points (Crystal &crystalObj_) | |
| Default constructor. | |
| Points (Crystal &crystalObj_, const Eigen::Vector3i &mesh_, const Eigen::Vector3d &offset_=Eigen::Vector3d::Zero()) | |
| Constructor for a Monkhorst-Pack grid of wavevectors. More... | |
| Points (Crystal &crystal_, const Eigen::Tensor< double, 3 > &pathExtrema, const double &delta) | |
| Constructor for points on a path. More... | |
| void | setActiveLayer (const Eigen::VectorXi &filter_) |
| Constructor for Active Points. More... | |
| Points (const Points &obj) | |
| Copy constructor. | |
| Points & | operator= (const Points &obj) |
| Copy assignment operator. | |
| std::tuple< Eigen::Vector3i, Eigen::Vector3d > | getMesh () |
| Returns the details of the Monkhorst-pack mesh of wavevectors. More... | |
| int | getNumPoints () const |
| Returns the number of wavevectors stored in the points class. | |
| Eigen::Vector3d | crystalToCartesian (const Eigen::Vector3d &point) |
| Converts a wavevector from crystal to cartesian coordinates. More... | |
| Eigen::Vector3d | cartesianToCrystal (const Eigen::Vector3d &point) |
| Converts a wavevector from cartesian to crystal coordinates. More... | |
| Eigen::Vector3d | bzToWs (const Eigen::Vector3d &point, const int &basis) |
| Folds a wavevector in crystal coordinates to the Wigner Seitz zone. More... | |
| Eigen::Vector3d | foldToBz (const Eigen::Vector3d &pointCrystal, const int &basis) |
| Crystal & | getCrystal () |
| Returns a reference to the crystal object on which the Points are defined. | |
| Point | getPoint (const int &index) |
| Returns a Point object given its integer index. More... | |
| Eigen::Vector3d | getPointCoordinates (const int &index, const int &basis=crystalCoordinates) |
| Get the coordinates of a wavevector from its index. More... | |
| int | getIndex (const Eigen::Vector3d &point) |
| Get the wavevector index given the crystal coordinates of a wavevector. More... | |
| int | isPointStored (const Eigen::Vector3d &crystalCoordinates_) |
| Like getIndex, get the wavevector index given the crystal coordinates of a wavevector, but returns -1 if point not found. More... | |
| void | setIrreduciblePoints (std::vector< Eigen::MatrixXd > *groupVelocities=nullptr) |
| setIrreduciblePoints analyzes a current set of points to find its irreducible set. More... | |
| std::vector< int > | irrPointsIterator () |
| Returns an iterator on the index of irreducible points. More... | |
| std::vector< int > | parallelIrrPointsIterator () |
| Similar to irrPointsIterator, returns an iterator on the index of irreducible points. More... | |
| int | asIrreducibleIndex (const int &ik) |
| Given an index of an irreducible point in the set [0,numPoints[, returns its index in the set of [0,numIrredPoints[ irreducible wavevectors. More... | |
| int | asReducibleIndex (const int &ik) |
| Given the index of an irreducible point in the set [0,numIrredPoints[, returns its index in the set of [0,numPoints[ reducible wavevectors. More... | |
| std::tuple< int, Eigen::Matrix3d > | getRotationToIrreducible (const Eigen::Vector3d &x, const int &basis=cartesianCoordinates) |
| Given the coordinates of a wavevector, getRotationToIrreducible returns the index of the irreducible point, and the rotation R such that k^irr = R k^red. More... | |
| std::vector< Eigen::Matrix3d > | getRotationsStar (const int &ik) |
| Given the index of an irreducible point in the reducible list, returns the set of rotations that allow to map k^red = R k^irr. More... | |
| std::vector< int > | getReducibleStarFromIrreducible (const int &ik) |
| Given the index of an irreducible point in the reducible list, returns the list of indices of the symmetry equivalent wavevectors. More... | |
Static Public Member Functions | |
| static std::tuple< Eigen::Vector3i, Eigen::Vector3d > | findMesh (const Eigen::Matrix< double, 3, Eigen::Dynamic > &points) |
| Given a list of points, finds the monkhorst-pack mesh. More... | |
Static Public Attributes | |
| static const int | crystalCoordinates = crystalCoordinates_ |
| static const int | cartesianCoordinates = cartesianCoordinates_ |
Protected Member Functions | |
| void | setMesh (const Eigen::Vector3i &mesh_, const Eigen::Vector3d &offset_) |
| Change the crystal object for a different one. More... | |
| void | setupGVectors () |
Protected Attributes | |
| Crystal & | crystalObj |
| Eigen::Vector3i | mesh |
| Eigen::Vector3d | offset |
| int | numPoints = 0 |
| Eigen::MatrixXd | gVectors |
| bool | explicitlyStored = false |
| bool | isPointsListSorted = false |
| Eigen::MatrixXd | pointsList |
| Eigen::VectorXi | filteredToFullIndices |
| std::vector< Eigen::Matrix3d > | rotationMatricesCrystal |
| std::vector< Eigen::Matrix3d > | rotationMatricesCartesian |
| Eigen::VectorXi | mapEquivalenceRotationIndex |
| Eigen::VectorXi | mapIrreducibleToReducibleList |
| Eigen::VectorXi | mapReducibleToIrreducibleList |
| int | numIrrPoints = 0 |
| std::vector< std::vector< int > > | irreducibleStars |
| Eigen::VectorXi | equiv |
The base class mostly refers to a uniform grid sampling the Brillouin zone. Different subclasses will specialize to different kinds of wavevector sets.
| Points::Points | ( | Crystal & | crystalObj_, |
| const Eigen::Vector3i & | mesh_, | ||
| const Eigen::Vector3d & | offset_ = Eigen::Vector3d::Zero() |
||
| ) |
| crystal | the crystal object that defines the Brillouin zone. |
| mesh | grid size of the Monkhorst-pack. |
| offset | the offset of the grid w.r.t. the Gamma point. Offset ranges in values from 0 to 1. 0.5 means half displacement of the grid. |

| Points::Points | ( | Crystal & | crystal_, |
| const Eigen::Tensor< double, 3 > & | pathExtrema, | ||
| const double & | delta | ||
| ) |
| crystal | the crystal object that defines the Brillouin zone. |
| pathExtrema | extrema of segments defining a path of points. PathExtrema has size (numSegments, 2, 3), where the first index spans the segments of the path, 2 is the beginning and the last element of the segment, and 3 is the cartesian coordinates of the extrema. Point coordinates must be in crystal coordinates. Example: if we want a path G->X->L, we have: 2 segments: G->X and X->L pathExtrema(0,0,:) = G. coordinates pathExtrema(0,1,:) = X. coordinates pathExtrema(1,0,:) = X. coordinates pathExtrema(1,1,:) = L. coordinates |
| delta | segments are populated with points, with a distance "delta" between different points in crystal coordinates. |
| int Points::asIrreducibleIndex | ( | const int & | ik | ) |
| ik | index of the irreducible point in the reducible list. |

| int Points::asReducibleIndex | ( | const int & | ik | ) |
| ik | index of the irreducible point in the irreducible list. |

| Eigen::Vector3d Points::bzToWs | ( | const Eigen::Vector3d & | point, |
| const int & | basis | ||
| ) |
| pointCrystal | the coordinates of a wavevector |
| basis | basis (Points::cartesianCoordinates or Points::crystalCoordinates) of input and output wavevector. |


| Eigen::Vector3d Points::cartesianToCrystal | ( | const Eigen::Vector3d & | point | ) |
| point | the input wavevector in cartesian coordinates. |


| Eigen::Vector3d Points::crystalToCartesian | ( | const Eigen::Vector3d & | point | ) |
| point | the input wavevector in crystal coordinates. |


|
static |
| points | a matrix (3,numPoints) of wavevectors in crystal coordinates. |

| int Points::getIndex | ( | const Eigen::Vector3d & | point | ) |
Throws an error if the wavevector is not found in points.
| point | the wavevector in crystal coordinates. |


| std::tuple< Eigen::Vector3i, Eigen::Vector3d > Points::getMesh | ( | ) |

| Point Points::getPoint | ( | const int & | index | ) |
The Point object is used to move around the code the coordinates of the wavevector.
| index | the integer wavevector index ranging in [0,numPoints[ |

| Eigen::Vector3d Points::getPointCoordinates | ( | const int & | index, |
| const int & | basis = crystalCoordinates |
||
| ) |
| index | the index of the desired wavevector. |
| basis | specify the basis to be used for the output coordinates. Either Points::crystalCoordinates or Points::cartesianCoordinates. |


| std::vector< int > Points::getReducibleStarFromIrreducible | ( | const int & | ik | ) |
| ik | index of irreducible point in the reducible list. |

| std::vector< Eigen::Matrix3d > Points::getRotationsStar | ( | const int & | ik | ) |
| ik | index of irreducible point in the reducible list. |

| std::tuple< int, Eigen::Matrix3d > Points::getRotationToIrreducible | ( | const Eigen::Vector3d & | x, |
| const int & | basis = cartesianCoordinates |
||
| ) |
| x | a 3d vector with the coordinates of the wavevector. They can be in crystal or cartesian basis, as specified by basis. |
| basis | either Points::cartesianCoordinates or crystalCoordinates, specifies the basis in which x is specified. |


| std::vector< int > Points::irrPointsIterator | ( | ) |
If setIrreduciblePoints has not been called, it just loops on all points.

| int Points::isPointStored | ( | const Eigen::Vector3d & | crystalCoordinates_ | ) |
| crystalCoordinates_ | a 3d Eigen vector with crystal coordinates of a wavevector. |

| std::vector< int > Points::parallelIrrPointsIterator | ( | ) |
If setIrreduciblePoints has not been called, it just loops on all points. However, the returned list has already been scattered across different MPI processes, so each MPI process has only a subset of irreducible points.
Note that symmetries do introduce some load unbalance. In fact, some irreducible points may have more symmetry-equivalent points than others, and thus may perform more work.


| void Points::setActiveLayer | ( | const Eigen::VectorXi & | filter_ | ) |
| filter | a vector of integers of "filtered" points, i.e. the indices of the wavevectors in parentPoints that we want to keep. |


| void Points::setIrreduciblePoints | ( | std::vector< Eigen::MatrixXd > * | groupVelocities = nullptr | ) |
It also builds the logic for storing all symmetry operations, such as finding which rotation maps an reducible point to its irreducible point and similar symmetry operations.
| groupVelocities | an optional parameter, one can pass the values of the group velocities at all wavevectors. If passed, setIrreduciblePoints will try to find the best set of symmetries acting on wavevector that also transforms the group velocities (i.e. there may sometimes be more than one symmetry mapping v and k to irreducible values). Useful since we want symmetries in the BTE to be the same as group velocities. |


|
protected |
Used as a helper by the symmetrize function in the bandstructure class.
| crystal | the new crystal to swap in |
