TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::mesh::Mesh

#include <triqs/mesh/concepts.hpp>

Detailed Description

Concept for a mesh.

Every mesh m of type M

  • is a std::regular type and h5::Storable,
  • has an associated triqs::mesh::MeshPoint type M::mesh_point_t, index type M::index_t and data index type M::data_index_t,
  • is a sized, forward range of mesh points,
  • provides an overload for the subscript operator to access a certain mesh point by data index,
  • provides an overload for the function call operator to access a certain mesh point by index,
  • provides the functions m.to_data_index(index) and m.to_index(data_index) to convert between indices and data indices and
  • provides the function m.is_index_valid(index) to check if an index is valid.
Template Parameters
MMesh type.

Definition at line 85 of file concepts.hpp.

Concept definition

template<typename M>
concept triqs::mesh::Mesh = std::regular<M> and h5::Storable<M> and requires(M const &m) {
typename M::mesh_point_t;
{ *std::begin(m) } -> std::same_as<typename M::mesh_point_t>;
typename M::index_t;
typename M::data_index_t;
} and requires(M const &m, typename M::index_t index, typename M::data_index_t data_index, typename M::mesh_point_t mp) {
{ m.is_index_valid(index) } -> std::same_as<bool>;
{ m.to_data_index(index) } -> std::same_as<typename M::data_index_t>;
{ m.to_index(data_index) } -> std::same_as<typename M::index_t>;
{ m.operator[](data_index) } -> std::same_as<typename M::mesh_point_t>;
{ m.operator()(index) } -> std::same_as<typename M::mesh_point_t>;
{ m.mesh_hash() } -> std::same_as<uint64_t>;
}
Concept for a mesh point.
Definition concepts.hpp:54
Concept for a mesh.
Definition concepts.hpp:85