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
6
int
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
}
triqs::lattice::bravais_lattice
A Bravais lattice class.
Definition
bravais_lattice.hpp:75
triqs::lattice::brillouin_zone
A Brillouin zone class.
Definition
brillouin_zone.hpp:62
triqs::mesh::brzone
Brillouin zone mesh type.
Definition
brzone.hpp:104
mesh.hpp
Umbrella header for the TRIQS mesh types.
doc
doxygen
examples
brzone.cpp
Generated by
1.15.0