triqs.mesh.mesh_product.MeshProduct

class triqs.mesh.mesh_product.MeshProduct(*mlist)[source]

Bases: object

Cartesian product of TRIQS meshes.

A MeshProduct of k factor meshes describes the set of k-tuples of mesh points, one factor per mesh. It is the canonical mesh of multi-variable Green’s functions in TRIQS (see triqs.gfs.Gf); iteration yields composite mesh points \((p_1, \ldots, p_k)\) via itertools.product().

Parameters:
*mlistmesh objects

The factor meshes, passed as separate positional arguments (variadic). Each must satisfy the TRIQS mesh interface (iterable over MeshPoint, supports copy, copy_from and to_data_index).

Attributes

components

Tuple of factor meshes that make up the product.

rank

Number of factor meshes (alias for len(self.components)).

Methods

copy()

Return a deep copy of this product mesh.

copy_from(another)

Deep-copy the contents of another into self factor by factor.

size_of_components()

Size of each factor mesh.

to_data_index(index)

Convert a tuple of per-factor indices to a tuple of data indices.