Loading...
Searching...
No Matches
band_classification.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * BandClassification — what the classifier decided: at each k-point, which
5 * bands are kept exactly, which compete for the remaining room, and which are
6 * thrown away; and the verdict on the system as a whole.
7 *
8 * Plain data. The rule that produces it is BandClassifier, beside this file;
9 * the subspace iteration and the overlaps' restriction read it.
10 */
11
12#include <cstddef>
13#include <vector>
14
18
19namespace q3 {
20
21/// Every k-point's verdict, and the summary of the whole.
22struct [[nodiscard]] BandClassification {
23 std::vector<KPointBandClassification> kpoints;
25
26 /**
27 * The classification of a window that keeps everything and freezes
28 * nothing: an isolated manifold, where the bands ARE the states. It lets
29 * the gauge, the composition and the localisation run as one code path
30 * whether the subspace was chosen or given.
31 */
32 [[nodiscard]] static BandClassification every_band_kept(int number_of_kpoints,
33 int number_of_bands) {
35 entry.roles.assign(static_cast<std::size_t>(number_of_bands), BandRole::Candidate);
36 for (int band = 0; band < number_of_bands; band++) {
37 entry.kept_bands.push_back(band);
38 }
39 BandClassification classification;
40 classification.kpoints.assign(static_cast<std::size_t>(number_of_kpoints), entry);
41 return classification;
42 }
43};
44
45} // namespace q3
Every k-point's verdict, and the summary of the whole.
static BandClassification every_band_kept(int number_of_kpoints, int number_of_bands)
std::vector< KPointBandClassification > kpoints
BandClassificationSummary summary
std::vector< int > kept_bands
Band indices that survive, frozen first is NOT assumed; ascending.