template<Mesh... Ms>
requires (((
n_variables<Ms> == 1) and ...) and (not(std::is_reference_v<Ms> or ...)))
class triqs::mesh::prod< Ms >
Product mesh type for combining multiple meshes.
A product mesh combines various triqs::mesh::Mesh types and satisfies the triqs::mesh::Mesh concept itself. It is defined by the individual meshes in the product and it is iterated over in C-order, i.e. the last mesh in the product is the fastest varying one, while the first mesh is the slowest. In the following, we use \(M = M_1 \times \dots \times M_k \) to denote a product mesh combining the \( k \) meshes \( M_1, \dots, M_k
\).
A product mesh has the following properties:
- The number of meshes in the product is \( k \) and can be queried with triqs::mesh::n_variables.
- Its mesh points are tuples of size \( k \). The i-th element in the tuple is a mesh point \( \in M_i
\).
- Each mesh point is identified by a unique tuple of indices \( \mathbf{n} = (n_1, n_2, \dots, n_k) \), where \( n_i \) is a valid index of \( M_i \).
- The size of the mesh is \( N = N_1 \dots N_k \), where \( N_i \) is the size of \( M_i \).
- An index \( \mathbf{n} \) is mapped to the corresponding data index \( \mathbf{d}(\mathbf{n}) = (d_1(n_1),
\dots, d_k(n_k)) \), where \( d_i \) is a data index of \( M_i \). The inverse map is \( \mathbf{n}(
\mathbf{d}) = (n_1(d_1), \dots, n_k(d_k)) \).
Green's function containers that are based on a product mesh store function values, coefficients, etc. depending on the mesh types of its components. For example, a GF defined on a product mesh consisting of a triqs::mesh::brzone and a triqs::mesh::dlr_imtime mesh stores the function values at the DLR interpolation nodes \( \tau_l \) for every \( \mathbf{k} \)-point. Function evaluation is done in general by calling triqs::mesh::evaluate.
- Template Parameters
-
Definition at line 138 of file prod.hpp.
|
|
| prod ()=default |
| | Default constructor calls the default constructor of all its components.
|
| | prod (Ms const &...ms) |
| | Construct a product mesh with the given meshes \( M_1, \dots, M_k \).
|
| template<typename... U> |
| | prod (std::tuple< U... > const &mt) |
| | Construct a product mesh \( M = M_1 \times \dots \times M_k \) from the given tuple of meshes.
|
|
m_tuple_t & | as_tuple () |
| | Get the underlying tuple of individual meshes, i.e. \( (M_1, \dots, M_k) \).
|
|
m_tuple_t const & | as_tuple () const |
| | Get the underlying tuple of individual meshes, i.e. \( (M_1, \dots, M_k) \).
|
|
auto | begin () const |
| | Get an iterator to the beginning of the mesh.
|
|
auto | cbegin () const |
| | Get a const iterator to the beginning of the mesh.
|
|
auto | cend () const |
| | Get a const iterator to the end of the mesh.
|
|
m_tuple_t & | components () |
| | Get the underlying tuple of individual meshes, i.e. \( (M_1, \dots, M_k) \).
|
| void | deserialize (auto &ar) |
| | Deserialize the mesh from a generic archive.
|
|
auto | end () const |
| | Get an iterator to the end of the mesh.
|
| template<typename... Args> |
| bool | is_index_valid (Args const &...ns) const |
| | Check if the given indices \( n_1, \dots, n_k \) are valid.
|
| template<typename... Args> |
| bool | is_index_valid (index_t const &n) const |
| | Check if given index tuple \( \mathbf{n} = (n_1, \dots, n_k) \) is valid.
|
|
uint64_t | mesh_hash () const |
| | Get the hash value of the mesh.
|
| mesh_point_t | operator() (index_t const &n) const |
| | Function call operator to access a mesh point by its index tuple \( \mathbf{n} \).
|
|
bool | operator== (prod const &m) const |
| | Equal-to comparison operator compares the tuple of meshes in the product.
|
| mesh_point_t | operator[] (data_index_t const &d) const |
| | Subscript operator to access a mesh point by its data index tuple \( \mathbf{d} \).
|
| void | serialize (auto &ar) const |
| | Serialize the mesh to a generic archive.
|
|
long | size () const |
| | Get the size \( N \) of the mesh, i.e. the product of the sizes of its components.
|
|
auto | size_of_components () const |
| | Get the sizes of the components as a std::array, i.e. \( (N_1, \dots, N_k) \).
|
| data_index_t | to_data_index (index_t const &n) const |
| | Map an index tuple \( \mathbf{n} \) to its corresponding data index tuple \( \mathbf{d}(\mathbf{n})
\).
|
| index_t | to_index (data_index_t const &d) const |
| | Map a data index tuple \( \mathbf{d} \) to its corresponding index tuple \( \mathbf{n}(\mathbf{d})
\).
|