|
| virtual int | getNumBands ()=0 |
| | Returns the total number of phonon branches / electron bands that are available in the interpolator. More...
|
| |
| virtual Particle | getParticle ()=0 |
| | Returns the Particle object to distinguish between electrons and phonons. More...
|
| |
| virtual std::tuple< Eigen::VectorXd, Eigen::MatrixXcd > | diagonalize (Point &point)=0 |
| | Diagonalize the Harmonic Hamiltonian at an arbitrary wavevector. More...
|
| |
| virtual std::tuple< Eigen::VectorXd, Eigen::MatrixXcd > | diagonalizeFromCoordinates (Eigen::Vector3d &k)=0 |
| | Diagonalize the Harmonic Hamiltonian at an arbitrary wavevector. More...
|
| |
| virtual Eigen::Tensor< std::complex< double >, 3 > | diagonalizeVelocity (Point &point)=0 |
| | Computes the velocity operator (if possible, otherwise just its diagonal matrix elements i.e. More...
|
| |
|
virtual Eigen::Tensor< std::complex< double >, 3 > | diagonalizeVelocityFromCoordinates (Eigen::Vector3d &coordinates)=0 |
| |
| virtual FullBandStructure | populate (Points &fullPoints, const bool &withVelocities, const bool &withEigenvectors, const bool isDistributed=false)=0 |
| | Method for the construction of the band structure on a grid of of wavevectors of the Brillouin zone. More...
|
| |
|
virtual std::tuple< DoubleView2D, StridedComplexView3D, ComplexView4D > | kokkosBatchedDiagonalizeWithVelocities (const DoubleView2D &cartesianCoordinates)=0 |
| |
| void | kokkosBatchedTreatDegenerateVelocities (const DoubleView2D &cartesianCoordinates, const DoubleView2D &resultEnergies, ComplexView4D &resultVelocities, const double &threshold) |
| |
|
virtual StridedComplexView3D | kokkosBatchedBuildBlochHamiltonian (const DoubleView2D &cartesianCoordinates)=0 |
| |
|
virtual std::tuple< DoubleView2D, StridedComplexView3D > | kokkosBatchedDiagonalizeFromCoordinates (const DoubleView2D &cartesianCoordinates, const bool withMassScaling=true)=0 |
| |
| virtual int | estimateBatchSize (const bool &withVelocity) |
| | Estimate how many k-points we can compute on the GPU in one batch. More...
|
| |
The subclasses of this base class are the objects responsible for storing the DFT harmonic properties computed on a coarse grid, and containing the methods necessary for interpolating (diagonalizing) such harmonic hamiltonian on a fine grid.
| void HarmonicHamiltonian::kokkosBatchedTreatDegenerateVelocities |
( |
const DoubleView2D & |
cartesianCoordinates, |
|
|
const DoubleView2D & |
resultEnergies, |
|
|
ComplexView4D & |
resultVelocities, |
|
|
const double & |
threshold |
|
) |
| |
The next part is a bit convoluted because it's tricky to do in parallel We want to build N matrices of size iDegxiDeg containing the velocity degenerate blocks. To this aim, we need two functions funcK, funcB. Such that funcK(iMat), funcB(iMat) return the iK and ib index locating the start of the block that will be diagonalized by the iMat-th matrix
We take advantage of an exclusive scan. Say we have a vector 0 0 0 1 0 0 0 0 1; which spans the bloch states, and 1 locates the beginning of a block of size iDeg that we want to diagonalize. The indices locating the "1", i.e. [3, 8], are given by an exclusive scan: 0 0 0 0 1 1 1 1 1 2 So, scan(ik,ib) = iMat. And from this, I can do the inverse mapping.