40 Real outermost_shell_distance = 0.0;
42 int outermost_shell_size = 0;
44 Real outermost_shell_maximum = 0.0;
46 Real largest_hopping = 0.0;
51 const std::vector<LocalOrbitalLatticeVector>& vectors = hamiltonian.
lattice_vectors();
53 if (vectors.empty() || blocks.size() != vectors.size()) {
54 throw std::runtime_error(
"HamiltonianDecay::measured_on: the Hamiltonian has no "
55 "blocks on its lattice vectors");
57 const std::size_t dimension =
static_cast<std::size_t
>(hamiltonian.
number_of_orbitals());
64 const Real shell_floor =
67 for (std::size_t vector_index = 0; vector_index < vectors.size(); vector_index++) {
70 const bool on_outermost_shell = vector.
cartesian.
norm() >= shell_floor;
71 if (on_outermost_shell) {
74 const std::vector<Complex>& block = blocks[vector_index];
75 for (std::size_t element = 0; element < block.size(); element++) {
77 const bool diagonal = element % dimension == element / dimension;
79 if (!on_site || !diagonal) {
82 if (on_outermost_shell) {
int number_of_orbitals() const
const std::vector< std::vector< Complex > > & hamiltonian_blocks() const
const std::vector< LocalOrbitalLatticeVector > & lattice_vectors() const
Real outermost_shell_distance
|R| of the outermost shell, in the lattice's length unit.
Real largest_hopping
The largest term that varies with k: R away from the origin, or m != n on site.
int outermost_shell_size
How many lattice vectors share that distance (to the registry's shell width).
Real outermost_shell_maximum
The largest Bloch-sum term w_R |H_mn(R)| on that shell, in the Hamiltonian's unit.
Real ratio
outermost_shell_maximum / largest_hopping; zero when there is nothing to divide by.
static HamiltonianDecay measured_on(const LocalOrbitalHamiltonian &hamiltonian)
Integer 3-vector for Miller indices / FFT grid indices.
One lattice vector of the Hamiltonian's real-space domain.
Vector3D cartesian
Cartesian R in whatever length unit the caller used; decay diagnostics only.
IntegerVector3D translation