triqs.mesh.meshes.MeshReFreqPts

class triqs.mesh.meshes.MeshReFreqPts

Bases: object

Real frequency mesh type from arbitrary sorted frequency points.

A real frequency mesh is defined by its size \(N \geq 0\) and a sorted vector of frequency values \(\{\omega_0, \omega_1, \ldots, \omega_{N-1}\}\).

It 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 its corresponding value \(\omega_n\).

  • An arbitrary value \(\omega \in [\omega_0, \omega_{N-1}]\) is mapped to the closest mesh point using binary search.

Green’s function containers that are based on this 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\).


Dispatched C++ constructor(s).

[1] ()

[2] (pts: [float])

[1] Default constructor creates an empty mesh.


[2] Construct a real frequency mesh from a sorted vector of frequency points.


Parameters:
pts[float]

Sorted vector of frequency values.

Attributes

mesh_hash

Get the hash value of the mesh.

points

Get the vector of frequency point values.

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.