Loading...
Searching...
No Matches
q3::KPointStencil Class Reference

#include <kpoint_stencil.hpp>

Public Member Functions

const Vector3D & b_vector (int direction) const
 The b-vector of a direction, in whatever units the shells were solved in.
 
const std::vector< Vector3D > & b_vectors () const
 
const std::array< int, 3 > & grid_dimensions () const
 
const IntegerVector3D & grid_step (int direction) const
 
bool has_b_vectors () const
 
bool has_grid_steps () const
 Whether the stencil was built from a grid, so its directions carry integer steps.
 
int neighbor (int kpoint, int direction) const
 The k-point that k + b lands on.
 
int number_of_directions () const
 
int number_of_kpoints () const
 
Real total_weight () const
 
std::optional< int > two_point_axis_direction () const
 
Real weight (int direction) const
 
const std::vector< Real > & weights () const
 

Static Public Member Functions

static KPointStencil from_grid (const std::array< int, 3 > &grid_dimensions, const std::vector< KPointNeighborDirection > &directions)
 From a full grid and its neighbour shells: k + b resolved for every k and every direction.
 
static KPointStencil from_table (std::vector< std::vector< int > > neighbor_table, std::vector< Real > weights, std::vector< Vector3D > b_vectors={})
 

Detailed Description

Definition at line 36 of file kpoint_stencil.hpp.

Member Function Documentation

◆ b_vector()

const Vector3D & q3::KPointStencil::b_vector ( int  direction) const
inline

The b-vector of a direction, in whatever units the shells were solved in.

Definition at line 86 of file kpoint_stencil.hpp.

Referenced by q3::SpreadFunctional::evaluate(), and q3::SpreadFunctional::gradient().

◆ b_vectors()

const std::vector< Vector3D > & q3::KPointStencil::b_vectors ( ) const
inline

Definition at line 90 of file kpoint_stencil.hpp.

◆ from_grid()

static KPointStencil q3::KPointStencil::from_grid ( const std::array< int, 3 > &  grid_dimensions,
const std::vector< KPointNeighborDirection > &  directions 
)
inlinestatic

From a full grid and its neighbour shells: k + b resolved for every k and every direction.

Definition at line 40 of file kpoint_stencil.hpp.

References grid_dimensions().

Referenced by q3::WannierConstructionInputs::WannierConstructionInputs().

◆ from_table()

static KPointStencil q3::KPointStencil::from_table ( std::vector< std::vector< int > >  neighbor_table,
std::vector< Real >  weights,
std::vector< Vector3D >  b_vectors = {} 
)
inlinestatic

From an explicit table – one row of neighbour indices per k-point, one entry per direction – and the weights; b-vectors may be omitted.

Definition at line 49 of file kpoint_stencil.hpp.

◆ grid_dimensions()

const std::array< int, 3 > & q3::KPointStencil::grid_dimensions ( ) const
inline

Definition at line 106 of file kpoint_stencil.hpp.

Referenced by from_grid().

◆ grid_step()

const IntegerVector3D & q3::KPointStencil::grid_step ( int  direction) const
inline

Definition at line 99 of file kpoint_stencil.hpp.

References has_grid_steps().

Referenced by q3::MaximallyLocalizedGaugeChoice::require_supported().

◆ has_b_vectors()

bool q3::KPointStencil::has_b_vectors ( ) const
inline

Definition at line 82 of file kpoint_stencil.hpp.

Referenced by q3::SpreadFunctional::SpreadFunctional().

◆ has_grid_steps()

bool q3::KPointStencil::has_grid_steps ( ) const
inline

Whether the stencil was built from a grid, so its directions carry integer steps.

Definition at line 96 of file kpoint_stencil.hpp.

Referenced by grid_step().

◆ neighbor()

int q3::KPointStencil::neighbor ( int  kpoint,
int  direction 
) const
inline

The k-point that k + b lands on.

Definition at line 63 of file kpoint_stencil.hpp.

Referenced by q3::BlochOverlaps::restricted_to(), and q3::BlochOverlaps::transformed_by().

◆ number_of_directions()

int q3::KPointStencil::number_of_directions ( ) const
inline

◆ number_of_kpoints()

int q3::KPointStencil::number_of_kpoints ( ) const
inline

◆ total_weight()

Real q3::KPointStencil::total_weight ( ) const
inline

Definition at line 74 of file kpoint_stencil.hpp.

References weight().

Referenced by q3::SpreadMinimizer::run().

◆ two_point_axis_direction()

std::optional< int > q3::KPointStencil::two_point_axis_direction ( ) const
inline

The first direction whose step reaches the same k-point as its opposite, if there is one. A Wannier centre is a finite-difference Berry phase, and it needs b and -b to be different k-points. On an axis with two grid points they are the SAME point: k+b and k-b coincide, so the two directions carry one shared overlap block and two opposite b-vectors, and the terms [Im ln M_nn + b . r_n]^2 they contribute cannot both be small whatever r_n is. Omega_D is then bounded away from zero by the mesh rather than by the physics, and the centres along that axis are noise. Only a stencil built from a grid knows its steps; one built from a table has no answer to give.

Definition at line 122 of file kpoint_stencil.hpp.

References q3::KPointNeighborShells::neighbor_kpoint_index(), q3::IntegerVector3D::x, q3::IntegerVector3D::y, and q3::IntegerVector3D::z.

◆ weight()

Real q3::KPointStencil::weight ( int  direction) const
inline

◆ weights()

const std::vector< Real > & q3::KPointStencil::weights ( ) const
inline

Definition at line 71 of file kpoint_stencil.hpp.


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