Imaginary frequency mesh type.
An imaginary frequency mesh is defined by the number of positive frequencies \( N_{i\omega_n} \geq 0 \), the inverse temperature \( \beta > 0 \), its particle statistics and an option (all_frequencies vs positive_frequencies_only).
An imaginary frequency mesh has the following properties:
- Each mesh point is identified by a unique index \( n \in \{ n_{\text{min}}, n_{\text{min}} + 1, \dots, n_{\text{max}} - 1, n_{\text{max}} \} \), where \( n_{\text{max}} = N_{i\omega_n} - 1 \) and
\[ n_{\text{min}} =
\begin{cases}
-N_{i\omega_n} & \text{if fermionic statistics and all frequencies} \\
-N_{i\omega_n} + 1 & \text{if bosonic statistics and all frequencies} \\
0 & \text{if positive frequencies only}
\end{cases}
\; .
\]
- The size of the mesh is \( N = n_{\text{max}} - n_{\text{min}} + 1 \).
- An index \( n \) is mapped to the corresponding data index \( d \) by the function \( d(n) = n - n_{\text{min}} \). The inverse map is \( n(d) = d + n_{\text{min}} \).
- An index \( n \) is mapped to the corresponding value \( i\omega_n \equiv i\omega(n) \) by the function
\[ i\omega_n =
\begin{cases}
i\frac{2n \pi}{\beta} & \text{if fermionic statistics} \\
i\frac{(2n + 1) \pi}{\beta} & \text{if bosonic statistics}
\end{cases}
\; .
\]
Green's function containers that are based on an imaginary frequency mesh store the function values at the discrete frequency points \( i\omega_n \), i.e. \( f_n = f(i\omega(n)) \), and to evaluate the function at a specific Matsubara frequency \( i\omega_n \) with \( n_{\text{min}} \leq n \leq n_{\text{max}} \) the container simply returns the corresponding \( f_n \).
Definition at line 102 of file imfreq.hpp.
|
|
| imfreq ()=default |
| | Default constructor constructs an empty mesh.
|
| | imfreq (double beta, statistic_enum statistic, energy_t w_max, option opt=option::all_frequencies) |
| | Construct an imaginary frequency mesh with a threshold for the largest positive Matsubara frequency on the mesh.
|
| | imfreq (double beta, statistic_enum statistic, long n_iw=1025, option opt=option::all_frequencies) |
| | Construct an imaginary frequency mesh with \( N_{i\omega_n} \geq 0 \) positive Matsubara frequencies.
|
|
auto | begin () const |
| | Get an iterator to the beginning of the mesh.
|
|
double | beta () const noexcept |
| | Get the inverse temperature \( \beta \).
|
|
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.
|
| void | deserialize (auto &ar) |
| | Deserialize the mesh from a generic archive.
|
|
auto | end () const |
| | Get an iterator to the end of the mesh.
|
|
bool | eval_to_zero (index_t n) const |
| | Return true if the given Matsubara index \( n \) is not valid (see is_index_valid()).
|
|
bool | eval_to_zero (matsubara_freq iw) const |
| | Return true if the Matsubara index of the given Matsubara frequency \( i\omega_n \) is not valid.
|
|
bool | eval_to_zero (mesh_point_t mp) const |
| | Return true if the Matsubara index of the given mesh point is not valid (see is_index_valid()).
|
|
long | first_index () const |
| | Get the first Matsubara index, i.e. \( n_{\text{min}} \).
|
|
imfreq | get_positive_freq () const |
| | Get a new mesh with the same \( \beta \), particle statistics and \( N_{i\omega_n} \) but only positive frequencies.
|
| bool | is_index_valid (index_t n) const |
| | Check if a Matsubara index \( n \) is valid.
|
|
long | last_index () const |
| | Get the last Matsubara index, i.e. \( n_{\text{max}} \).
|
|
uint64_t | mesh_hash () const noexcept |
| | Get the hash value of the mesh.
|
|
long | n_iw () const noexcept |
| | Get the number of positive Matsubara frequencies \( N_{i\omega_n} \).
|
| mesh_point_t | operator() (long n) const |
| | Function call operator to access a mesh point by its Matsubara index \( n \in \{ n_{\text{min}}, \dots,
n_{\text{max}} \} \).
|
|
bool | operator== (imfreq const &m) const |
| | Equal-to comparison operator compares \( \beta \), the particle statistics, \( N_{i\omega_n} \) and whether all or only positive frequencies are in the mesh.
|
| mesh_point_t | operator[] (closest_mesh_point_t< value_t > const &cmp) const |
| | Subscript operator to access a mesh point by a Matsubara frequency \( i\omega_n \) contained in a triqs::mesh::closest_mesh_point_t.
|
| mesh_point_t | operator[] (long d) const |
| | Subscript operator to access a mesh point by its data index \( d \in \{0, 1, \ldots, N-1\} \).
|
|
bool | positive_only () const |
| | Is the mesh restricted to positive Matsubara frequencies?
|
| 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 total number of mesh points.
|
|
statistic_enum | statistic () const noexcept |
| | Get the particle statistics.
|
| data_index_t | to_data_index (closest_mesh_point_t< value_t > const &cmp) const |
| | Map a Matsubara frequency \( i\omega_n \) contained in a triqs::mesh::closest_mesh_point_t to its data index \( d(i\omega_n) \).
|
| data_index_t | to_data_index (index_t n) const noexcept |
| | Map a Matsubara index \( n \in \{ n_{\text{min}}, \dots, n_{\text{max}} \} \) to its corresponding data index \( d(n) \).
|
| data_index_t | to_data_index (matsubara_freq const &iw) const noexcept |
| | Map a Matsubara frequency \( i\omega_n \) to its data index \( d(i\omega_n) \).
|
| index_t | to_index (closest_mesh_point_t< value_t > const &cmp) const |
| | Map a Matsubara frequency \( i\omega_n \) contained in a triqs::mesh::closest_mesh_point_t to its Matsubara index \( n(i\omega_n) \).
|
| index_t | to_index (data_index_t d) const |
| | Map a data index \( d \in \{0, 1, \ldots, N-1\} \) to the corresponding Matsubara index \( n(d) \).
|
| matsubara_freq | to_value (index_t n) const |
| | Map a Matsubara index \( n \in \{ n_{\text{min}}, \dots, n_{\text{max}} \} \) to its corresponding Matsubara frequency \( i\omega_n \).
|
|
std::complex< double > | w_max () const |
| | Get the complex value of the largest positive Matsubara frequency in the mesh.
|
| 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.
|