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
4
int
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
}
triqs::lattice::bravais_lattice
A Bravais lattice class.
Definition
bravais_lattice.hpp:75
triqs::mesh::cyclat
Cyclic lattice mesh type for Bravais lattices with Born-von Karman periodic boundary conditions.
Definition
cyclat.hpp:88
mesh.hpp
Umbrella header for the TRIQS mesh types.
doc
doxygen
examples
cyclat.cpp
Generated by
1.15.0