triqs.mesh.meshes.MeshReFreqLog
- class triqs.mesh.meshes.MeshReFreqLog
Bases:
objectLogarithmic real frequency mesh type.
A logarithmic real frequency mesh is defined by a cutoff frequency \(\varepsilon > 0\), an upper bound \(\omega_{\mathrm{max}} \geq \varepsilon\) and a common ratio \(r > 1\). It contains a symmetric set of \(N\) mesh points around zero, formed by mirroring the positive geometric sequence \(\omega_{\mathrm{max}}, \omega_{\mathrm{max}} / r, \omega_{\mathrm{max}} / r^2, \ldots\) (taken while the sequence stays above \(\varepsilon\)) to the negative axis. The mesh always has an even number of points and does not include zero.
A logarithmic 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_n\) by
\(\omega_n = -\omega_{\mathrm{max}} / r^n\) for \(0 \leq n < N/2\) and
\(\omega_n = \omega_{\mathrm{max}} / r^{N - 1 - n}\) for \(N/2 \leq n \leq N - 1\),
such that the mesh points are sorted in ascending order with \(\omega_0 = -\omega_{\mathrm{max}}\) and \(\omega_{N-1} = \omega_{\mathrm{max}}\).
An arbitrary value \(\omega \in [-\omega_{\mathrm{max}}, \omega_{\mathrm{max}}]\) is mapped to the closest mesh point with index \(n\) by binary search on the sorted mesh points.
Green’s function containers that are based on a logarithmic 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{max}}, \omega_{\mathrm{max}}]\).
Dispatched C++ constructor(s).
[1] () [2] (eps: float, w_max: float, ratio: float)
[1] Default constructor creates an empty mesh.
[2] Construct a logarithmic real frequency mesh.
- Parameters:
- epsfloat
Smallest positive frequency \(\varepsilon > 0\) (cutoff near zero).
- w_maxfloat
Largest frequency \(\omega_{\mathrm{max}} \geq \varepsilon\).
- ratiofloat
Common ratio \(r > 1\) of the geometric sequence.
Attributes
Get the smallest positive frequency \(\varepsilon\).
Get the hash value of the mesh.
Get the vector of frequency point values.
Get the common ratio \(r\) of the geometric sequence.
Get the largest frequency \(\omega_{\mathrm{max}}\).
Methods
__call__(*args, **kwargs)Call self as a function.
Get a copy of a mesh (for Python bindings).
Copy one mesh into another (for Python bindings).
Check if an index \(n\) is valid.
Check if a value \(\omega\) is within the mesh range.
Map an index \(n\) to its corresponding data index \(d(n) = n\).
Map a data index \(d\) to the corresponding index \(n(d) = d\).
Map an index \(n\) to its corresponding value \(\omega_n\).
Get the values of all mesh points in a mesh.