Imaginary time mesh type.
An imaginary time mesh is defined by its size \( N \geq 0 \), an inverse temperature \( \beta > 0 \) and its particle statistics. It contains \( N \) equally spaced mesh points on the interval \( [0, \beta] \) such that the distance between two consecutive mesh points (step size) is constant.
An imaginary time mesh has the following properties:
- Each mesh point is identified by a unique index \( n \in \{0, 1, \ldots, N-1\} \).
- An index \( n \) is mapped to the corresponding data index \( d \) by the identity function \( d(n) = n \) and vice versa.
- An index \( n \) is mapped to the corresponding value \( \tau \) by the linear function \( \tau(n) = n \cdot \Delta \) such that \( \tau(0) = 0 \) and \( \tau(N-1) = \beta \). The step size of the mesh is \( \Delta = \frac{\beta}{N - 1} \) for \( N > 1 \), otherwise it is undefined. For implementation purposes, we set \( \Delta = 0 \) and \( \Delta^{-1} = 0 \) for \( N = 0 \) and \( \Delta = 0 \) and \( \Delta^{-1} = \infty \) for \( N = 1 \).
- An arbitrary value \( \tau \in [0, \beta] \) is mapped to the closest mesh point with index \( n \) by the function \( n(\tau) = \left\lfloor \frac{\tau}{\Delta} + 0.5 \right\rfloor \).
Green's function containers that are based on an imaginary time mesh store the function values at the discrete time points \( \tau(n) \), i.e. \( f_n = f(\tau(n)) \), and use linear interpolation to evaluate the function at an arbitrary imaginary time \( \tau \in [0, \beta] \).
Definition at line 68 of file imtime.hpp.
|
| | imtime (double beta=1.0, statistic_enum statistic=Fermion, long n_tau=0) |
| | Construct an imaginary time mesh on the interval \( [0, \beta] \) with \( N \geq 0 \) equally spaced mesh points and the given particle statistics.
|
|
double | beta () const noexcept |
| | Get the inverse temperature \( \beta \).
|
| void | deserialize (auto &ar) |
| | Deserialize the mesh from a generic archive.
|
|
bool | operator== (imtime const &) const=default |
| | Equal-to comparison operator compares \( N \), \( \beta \) and the particle statistics.
|
| void | serialize (auto &ar) const |
| | Serialize the mesh to a generic archive.
|
|
statistic_enum | statistic () const noexcept |
| | Get the particle statistics.
|
|
| linear ()=default |
| | Default construct an empty linear mesh of size \( N = 0 \).
|
|
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.
|
|
value_t | delta () const noexcept |
| | Get the step size \( \Delta \) of the mesh, i.e. the distance between two consecutive mesh points.
|
|
value_t | delta_inv () const noexcept |
| | Get the inverse of the step size of the mesh, i.e. \( 1 / \Delta \).
|
| void | deserialize (auto &ar) |
| | Deserialize the mesh from a generic archive.
|
|
auto | end () const |
| | Get an iterator to the end of the mesh.
|
| auto | evaluate (auto const &f, double x) const |
| | Linear interpolation of a function \( f \) defined on a triqs::mesh::detail::linear mesh at a value \(x \in [a, b] \).
|
|
long | first_index () const |
| | Get the first index of the mesh, i.e. \( 0 \).
|
| bool | is_index_valid (index_t n) const noexcept |
| | Check if an index \( n \) is valid.
|
|
long | last_index () const |
| | Get the last index of the mesh, i.e. \( N - 1 \).
|
|
uint64_t | mesh_hash () const noexcept |
| | Get the hash value of the mesh.
|
| mesh_point_t | operator() (index_t n) const noexcept |
| | Function call operator to access a mesh point by its index \( n \in \{0, 1, \ldots, N-1\} \).
|
|
bool | operator== (linear const &rhs) const=default |
| | Equal-to comparison operator compares \( N \) and the interval \( [a, b] \).
|
| mesh_point_t | operator[] (long d) const noexcept |
| | Subscript operator to access a mesh point by its data index \( d \in \{0, 1, \ldots, N-1\} \).
|
| void | serialize (auto &ar) const |
| | Serialize the mesh to a generic archive.
|
|
long | size () const noexcept |
| | Get the size \( N \) of the mesh, i.e. the number of mesh points.
|
| data_index_t | to_data_index (index_t n) const noexcept |
| | Map an index \( n \in \{0, 1, \ldots, N-1\} \) to its corresponding data index \( d(n) \).
|
| index_t | to_index (data_index_t d) const noexcept |
| | Map a data index \( d \in \{0, 1, \ldots, N-1\} \) to the corresponding index \( n(d) \).
|
| value_t | to_value (index_t n) const noexcept |
| | Map an index \( n \in \{0, 1, \ldots, N-1\} \) to its corresponding value \( m(n) \).
|