TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
cyclat.cpp
1#include <fmt/ranges.h>
2#include <triqs/mesh.hpp>
3
4int main() {
5 // initialize a mesh on a cubic lattice with a = 0.5 and a 2x2x3 supercell
6 triqs::mesh::cyclat m{triqs::mesh::bravais_lattice{nda::eye<double>(3) * 0.5}, {2, 2, 3}};
7
8 // loop over all mesh points and print their index, data index and value (lattice vector)
9 for (int i = 0; auto mp : m) {
10 fmt::println("mesh point #{}: index = {}, data index = {}, value = {}", i++, mp.index(), mp.data_index(), nda::vector<double>{mp.value()});
11 }
12}
Cyclic lattice mesh type for Bravais lattices with Born-von Karman periodic boundary conditions.
Definition cyclat.hpp:88
Umbrella header for the TRIQS mesh types.