TRIQS/TRIQS
4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
discrete.cpp
1
#include <fmt/base.h>
2
#include <
triqs/mesh.hpp
>
3
4
int
main() {
5
// initialize a discrete mesh with 5 points
6
triqs::mesh::discrete
m{5};
7
8
// loop over all mesh points and print their index and data index
9
for
(
int
i = 0;
auto
mp : m) fmt::println(
"mesh point #{}: index = {}, data index = {}"
, i++, mp.index(), mp.data_index());
10
}
triqs::mesh::discrete
Discrete mesh type.
Definition
discrete.hpp:51
mesh.hpp
Umbrella header for the TRIQS mesh types.
doc
doxygen
examples
discrete.cpp
Generated by
1.15.0