TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
brzone.cpp
1#include <fmt/ranges.h>
2#include <triqs/mesh.hpp>
3
4#include <numbers>
5
6int main() {
7 using std::numbers::pi;
8
9 // initialize a mesh on a cubic BZ with a = 2pi and a 2x2x3 k-point grid
10 triqs::mesh::brzone m{triqs::mesh::brillouin_zone{triqs::mesh::bravais_lattice{nda::eye<double>(3) * 2 * pi}}, {2, 2, 3}};
11
12 // loop over all mesh points and print their index, data index and value (k-point)
13 for (int i = 0; auto mp : m) {
14 fmt::println("mesh point #{}: index = {}, data index = {}, value = {::.4f}", i++, mp.index(), mp.data_index(), mp.value());
15 }
16}
A Brillouin zone class.
Brillouin zone mesh type.
Definition brzone.hpp:104
Umbrella header for the TRIQS mesh types.