42 using dcomplex = std::complex<double>;
49 using mesh::matsubara_freq;
54 using nda::array_view;
57 using nda::matrix_const_view;
58 using nda::matrix_view;
59 using triqs::arrays::make_shape;
99 template <
typename Mesh,
typename Target>
struct gf_h5_rw;
104 template <auto Positions, Mesh M>
auto filter_mesh(M
const &m) {
105 static_assert(Positions.size() > 0);
106 if constexpr (Positions.size() == 1) {
107 return std::get<Positions[0]>(m);
109 return [&]<
size_t... Is>(std::index_sequence<Is...>) {
110 return mesh::prod{std::get<Positions[Is]>(m)...};
111 }(std::make_index_sequence<Positions.size()>{});
116 template <
size_t L>
constexpr std::array<int, L> compute_position(
auto const &filter) {
117 std::array<int, L> r{};
119 for (
int i = 0; i <
filter.size() and ii < L; ++i) {
121 ii += int(filter[i]);
127 template <Mesh M,
typename... XS>
bool eval_to_zero(M
const &m, XS
const &...xs) {
128 if constexpr (
sizeof...(XS) > 1) {
129 return [&]<std::size_t... Is>(std::index_sequence<Is...>) {
130 return (eval_to_zero(std::get<Is>(m), xs) or ... or
false);
131 }(std::make_index_sequence<
sizeof...(XS)>());
132 }
else if constexpr (
requires { m.eval_to_zero(xs...); }) {
133 return m.eval_to_zero(xs...);
Backward-compatibility umbrella header pulling in the nda array library.
Product mesh type for combining multiple meshes.
Generic factory for constructing objects of a given type.
auto closest_mesh_pt(Ts &&...ts)
Construct a triqs::mesh::closest_mesh_point_t object for a single value or a std::tuple of triqs::mes...
statistic_enum
Enum to specify particle statistics.
static constexpr int n_variables
Constexpr variable that holds the number of meshes in a triqs::mesh::Mesh type ( for non-product mes...
T factory(U &&...x)
Generic factory to construct an object of a given type from an arbitrary parameter pack of arguments.
filter_t< T, Is... > filter(T &&t)
Keep only the elements of a tuple at the given positions.
Provides a struct to represent Matsubara frequencies.
Provides concepts for mesh points and meshes.
Provides various utilities used with Meshes.
Provides a product mesh type.
Default evaluator policy.
gf_evaluator< Mesh > evaluator_t
The evaluator functor associated with the mesh type Mesh.
Default evaluator of a Green's function at arbitrary points of its mesh.
Traits class for reading/writing a Green's function from/to HDF5.