Real frequency mesh type.
A real frequency mesh is defined by its size \( N \geq 0 \) and a frequency interval \( [\omega_{\mathrm{min}}, \omega_{\mathrm{max}}] \). It contains \( N \) equally spaced mesh points on the interval \( [\omega_{\mathrm{min}}, \omega_{\mathrm{max}}] \) such that the distance between two consecutive mesh points (step size) is constant.
A real frequency 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 \( \omega \) by the linear function \( \omega(n) = \omega_{\mathrm{min}} + n \cdot \Delta \) such that \( \omega(0) = \omega_{\mathrm{min}} \) and \( \omega(N - 1) = \omega_{\mathrm{max}} \). The step size of the mesh is \( \Delta = \frac{\omega_{\mathrm{max}} - \omega_{\mathrm{min}}}{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 \( \omega \in [\omega_{\mathrm{min}}, \omega_{\mathrm{max}}] \) is mapped to the closest mesh point with index \( n \) by the function \( n(\omega) = \left\lfloor \frac{\omega - \omega_{\mathrm{min}}}{\Delta} + 0.5 \right\rfloor \).
Green's function containers that are based on a real frequency mesh store the function values at the discrete frequency points \( \omega(n) \), i.e. \( f_n = f(\omega(n)) \), and use linear interpolation to evaluate the function at an arbitrary frequency \( \omega \in [\omega_{\mathrm{min}}, \omega_{\mathrm{max}}] \).
Definition at line 72 of file refreq.hpp.
|
| | refreq (double w_min=0.0, double w_max=0.0, long n_w=0) |
| | Construct a real frequency mesh on the interval \( [\omega_{\text{min}}, \omega_{\text{max}}] \) with \( N \geq 0 \) equally spaced mesh points.
|
| | refreq (std::pair< double, double > window, int n_w) |
| | Construct a real frequency mesh on the interval \( [\omega_{\text{min}}, \omega_{\text{max}}] \) with \( N \geq 0 \) equally spaced mesh points.
|
|
double | w_max () const |
| | Get the upper bound of the interval \( \omega_{\text{max}} \), i.e. the value of the last mesh point.
|
|
double | w_min () const |
| | Get the lower bound of the interval \( \omega_{\text{min}} \), i.e. the value of the first mesh point.
|
|
| 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) \).
|
| Public Member Functions inherited from triqs::mesh::tail_fitter_handle |
| tail_fitter & | get_tail_fitter () const |
| | Get the triqs::mesh::tail_fitter object.
|
| tail_fitter & | get_tail_fitter (double tail_fraction, int n_tail_max=tail_fitter::default_n_tail_max, std::optional< int > expansion_order={}) const |
| | Construct a new triqs::mesh::tail_fitter object with the given parameters and return it.
|
| void | set_tail_fit_parameters (double tail_fraction, int n_tail_max=tail_fitter::default_n_tail_max, std::optional< int > expansion_order={}) const |
| | Set the pointer to a new tail-fitter object constructed with the given parameters.
|