triqs.mesh.meshes.MeshLegendre
- class triqs.mesh.meshes.MeshLegendre
Bases:
objectLegendre mesh type.
A Legendre mesh is defined by the number of Legendre polynomials \(N\) used in the series expansion, an inverse temperature \(\beta > 0\) and its particle statistics.
A Legendre mesh is an index-only mesh (no value attached to each point) and 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.
There is no explicit value associated with a mesh point, i.e. it carries no value at each mesh point.
Green’s function containers that are based on a Legendre mesh store the coefficients \(f_n\) of the generalized Fourier series expansion of a function \(f(\tau)\) in terms of Legendre polynomials, which is defined on the imaginary time axis. To evaluate the function at an arbitrary imaginary time \(\tau \in [0, \beta]\), the GF container sums up the Fourier series to the maximum degree \(N-1\):
\[f(\tau) \approx \sum_{n=0}^{N-1} \frac{\sqrt{2n + 1}}{\beta} f_n P_n(x(\tau)) \; ,\]where \(P_n\) denotes the Legendre polynomial of degree \(n\), \(x(\tau) = 2\tau / \beta - 1\) is a linear map from \([0, \beta]\) to \([-1, 1]\) and
\[f_n = \sqrt{2n + 1} \int_0^\beta d\tau \, f(\tau) P_n(x(\tau)) \; ,\]are the expansion coefficients.
Dispatched C++ constructor(s).
[1] () [2] (beta: float, statistic: Statistic ("Fermion" | "Boson"), max_n: int)
[1] Default constructor constructs an empty mesh.
[2] Construct a mesh of Legendre polynomials with degrees \(n = 0, 1, \ldots, N - 1\) on the interval \([0, \beta]\) and the given particle statistics.
- Parameters:
- betafloat
Inverse temperature \(\beta > 0\).
- statisticStatistic (“Fermion” | “Boson”)
Particle statistics.
- max_nint
Size of the mesh, i.e. the number of Legendre polynomial used in the series expansion.
Attributes
Get the inverse temperature \(\beta\).
Get the hash value of the mesh.
Get the particle statistics.
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.
Map an index \(n \in \{0, 1, \ldots, N-1\}\) to its corresponding data index \(d(n)\).
Map a data index \(d \in \{0, 1, \ldots, N-1\}\) to the corresponding index \(n(d)\).