triqs.mesh.meshes.MeshReFreqLog

class triqs.mesh.meshes.MeshReFreqLog

Bases: object

Logarithmic 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

eps

Get the smallest positive frequency \(\varepsilon\).

mesh_hash

Get the hash value of the mesh.

points

Get the vector of frequency point values.

ratio

Get the common ratio \(r\) of the geometric sequence.

w_max

Get the largest frequency \(\omega_{\mathrm{max}}\).

Methods

__call__(*args, **kwargs)

Call self as a function.

copy

Get a copy of a mesh (for Python bindings).

copy_from

Copy one mesh into another (for Python bindings).

is_index_valid

Check if an index \(n\) is valid.

is_value_valid

Check if a value \(\omega\) is within the mesh range.

to_data_index

Map an index \(n\) to its corresponding data index \(d(n) = n\).

to_index

Map a data index \(d\) to the corresponding index \(n(d) = d\).

to_value

Map an index \(n\) to its corresponding value \(\omega_n\).

values

Get the values of all mesh points in a mesh.