6 #include "exceptions.h"
9 const int crystalCoordinates_ = 0;
10 const int cartesianCoordinates_ = 1;
27 const Eigen::Vector3d &umklappVector = Eigen::Vector3d::Zero());
42 Eigen::Vector3d
getCoordinates(
const int &basis = crystalCoordinates_,
43 const bool &inWignerSeitz =
false)
const;
64 Eigen::Vector3d umklappVector;
86 const Eigen::Vector3d &offset_ = Eigen::Vector3d::Zero());
103 Points(
Crystal &crystal_,
const Eigen::Tensor<double, 3> &pathExtrema,
104 const double &delta);
125 std::tuple<Eigen::Vector3i, Eigen::Vector3d>
getMesh();
149 Eigen::Vector3d
bzToWs(
const Eigen::Vector3d &point,
const int &basis);
151 Eigen::Vector3d foldToBz(
const Eigen::Vector3d &pointCrystal,
161 static std::tuple<Eigen::Vector3i, Eigen::Vector3d>
162 findMesh(
const Eigen::Matrix<double, 3, Eigen::Dynamic> &points);
184 const int &basis = crystalCoordinates);
191 int getIndex(
const Eigen::Vector3d &point);
200 int isPointStored(
const Eigen::Vector3d &crystalCoordinates_);
205 static const int crystalCoordinates;
206 static const int cartesianCoordinates;
274 std::tuple<int, Eigen::Matrix3d>
276 const int &basis = cartesianCoordinates);
302 void setMesh(
const Eigen::Vector3i &mesh_,
const Eigen::Vector3d &offset_);
305 Eigen::Vector3i mesh;
306 Eigen::Vector3d offset;
309 Eigen::MatrixXd gVectors;
312 bool explicitlyStored =
false;
313 bool isPointsListSorted =
false;
314 Eigen::MatrixXd pointsList;
317 Eigen::VectorXi filteredToFullIndices;
319 void setupGVectors();
324 std::vector<Eigen::Matrix3d> rotationMatricesCrystal;
325 std::vector<Eigen::Matrix3d> rotationMatricesCartesian;
329 Eigen::VectorXi mapEquivalenceRotationIndex;
335 Eigen::VectorXi mapIrreducibleToReducibleList;
339 Eigen::VectorXi mapReducibleToIrreducibleList;
340 int numIrrPoints = 0;
345 std::vector<std::vector<int>> irreducibleStars;
349 Eigen::VectorXi equiv;
Object to store the information on the crystal unit cell, such as atomic positions,...
Definition: crystal.h:18
Class used to pass a single wavevector.
Definition: points.h:18
bool hasUmklapp()
checks whether the Point has been constructed with an Umklapp vector
Definition: points.cpp:674
Point operator-(Point &b)
Difference of two wavevectors (this-b).
Definition: points.cpp:693
Eigen::Vector3d getCoordinates(const int &basis=crystalCoordinates_, const bool &inWignerSeitz=false) const
Get the coordinates of the k-point.
Definition: points.cpp:660
Point operator+(Point &b)
Sum of two wavevectors (this + b) The vector is folded in the Wigner Seitz zone with an Umklapp vecto...
Definition: points.cpp:682
int getIndex() const
Get the index of the wavevector in the referenced Points object.
Definition: points.cpp:270
Point & operator=(const Point &that)
copy assignment operator
Definition: points.cpp:651
Point(Points &points_, const int &index_, const Eigen::Vector3d &umklappVector=Eigen::Vector3d::Zero())
Constructor.
Definition: points.cpp:642
Base class for storing wavevectors in the Brillouin zone.
Definition: points.h:73
int asReducibleIndex(const int &ik)
Given the index of an irreducible point in the set [0,numIrredPoints[, returns its index in the set o...
Definition: points.cpp:939
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,...
Definition: points.cpp:930
int isPointStored(const Eigen::Vector3d &crystalCoordinates_)
Like getIndex, get the wavevector index given the crystal coordinates of a wavevector,...
Definition: points.cpp:416
std::vector< int > parallelIrrPointsIterator()
Similar to irrPointsIterator, returns an iterator on the index of irreducible points.
Definition: points.cpp:919
void setIrreduciblePoints(std::vector< Eigen::MatrixXd > *groupVelocities=nullptr)
setIrreduciblePoints analyzes a current set of points to find its irreducible set.
Definition: points.cpp:704
Eigen::Vector3d cartesianToCrystal(const Eigen::Vector3d &point)
Converts a wavevector from cartesian to crystal coordinates.
Definition: points.cpp:473
Crystal & getCrystal()
Returns a reference to the crystal object on which the Points are defined.
Definition: points.cpp:536
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 allo...
Definition: points.cpp:977
int getIndex(const Eigen::Vector3d &point)
Get the wavevector index given the crystal coordinates of a wavevector.
Definition: points.cpp:262
int getNumPoints() const
Returns the number of wavevectors stored in the points class.
Definition: points.cpp:538
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.
Definition: points.cpp:576
Eigen::Vector3d bzToWs(const Eigen::Vector3d &point, const int &basis)
Folds a wavevector in crystal coordinates to the Wigner Seitz zone.
Definition: points.cpp:478
Point getPoint(const int &index)
Returns a Point object given its integer index.
Definition: points.cpp:230
std::vector< int > irrPointsIterator()
Returns an iterator on the index of irreducible points.
Definition: points.cpp:903
void setActiveLayer(const Eigen::VectorXi &filter_)
Constructor for Active Points.
Definition: points.cpp:138
Eigen::Vector3d crystalToCartesian(const Eigen::Vector3d &point)
Converts a wavevector from crystal to cartesian coordinates.
Definition: points.cpp:469
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 sym...
Definition: points.cpp:999
Points & operator=(const Points &obj)
Copy assignment operator.
Definition: points.cpp:207
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 ...
Definition: points.cpp:949
Points(Crystal &crystalObj_)
Default constructor.
Definition: points.cpp:20
Eigen::Vector3d getPointCoordinates(const int &index, const int &basis=crystalCoordinates)
Get the coordinates of a wavevector from its index.
Definition: points.cpp:234
std::tuple< Eigen::Vector3i, Eigen::Vector3d > getMesh()
Returns the details of the Monkhorst-pack mesh of wavevectors.
Definition: points.cpp:571
void setMesh(const Eigen::Vector3i &mesh_, const Eigen::Vector3d &offset_)
Change the crystal object for a different one.
Definition: points.cpp:540