TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::gfs::dlr_imfreq

#include <triqs/mesh/dlr_imfreq.hpp>

Detailed Description

Imaginary frequency discrete Lehmann representation (DLR) mesh type.

An imaginary frequency DLR mesh is defined by the inverse temperature \( \beta > 0 \), the particle statistics, a DLR energy cutoff \( \omega_{\text{max}} \), an error tolerance \( \epsilon \) and a boolean flag specifying if the mesh should be symmetric around \( i\omega_n = 0 \) (a symmetric mesh enforces the DLR rank to be even for Fermions and odd for Bosons).

An imaginary frequency DLR mesh has the following properties:

  • Each mesh point is identified by a unique index \( l \in \{0, 1, \ldots, N-1\} \).
  • The size of the mesh \( N \) depends on \( \beta \) and the choice of \( \omega_{\text{max}} \) and \( \epsilon \). It is equal to the DLR rank \( r \) and the number of DLR basis functions \( K(i\omega_n, \omega_l) \).
  • An index \( l \) is mapped to the corresponding data index \( d \) by the identity function \( d(l) = l \) and vice versa.
  • An index \( l \) is mapped to the corresponding value \( i\omega_{n_l} \), where \( i\omega_{n_l} \) is the l-th DLR interpolation node in imaginary frequency space.
Note
The index \( l \), which is used to access a certain mesh point, is different from the Matsubara index \( n_l \) that is stored in the mesh point object. That means, if m is an instance of imaginary-frequency DLR mesh, then m(l).index() != l in general.

Green's function containers that are based on an imaginary frequency DLR mesh store the function values at the discrete frequency points \( i\omega_{n_l} \), i.e. \( f_l = f(i\omega_{n_l}) \). In contrast to DLR and imaginary-frequency meshes, the GF container cannot evaluate the function at an arbitrary Matsubara frequency \( i\omega_n \) (evaluation at arbitrary points is intentionally unsupported).

Definition at line 80 of file dlr_imfreq.hpp.

Classes

class  mesh_point_t
 Mesh point of a triqs::mesh::dlr_imfreq mesh. More...

Public Types

using data_index_t = long
 Data index type.
using index_t = long
 Index type.
using value_t = matsubara_freq
 Value type.

Public Member Functions

 dlr_imfreq ()=default
 Default constructor constructs an empty mesh.
 dlr_imfreq (double beta, statistic_enum statistic, double w_max, double eps, bool symmetrize=true)
 Construct an imaginary frequency DLR mesh with a given energy cutoff \( \omega_{\text{max}} \) and error tolerance \( \epsilon \).
template<nda::AnyOf< dlr_imtime, dlr > M>
 dlr_imfreq (M const &m)
 Construct an imaginary frequency DLR mesh from another DLR type mesh.
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 const & dlr_freq () const
 Get the array of DLR frequencies \( \omega_l \).
auto const & dlr_if () const
 Get the Matsubara frequency DLR operations object (see also cppdlr::imfreq_ops).
auto const & dlr_it () const
 Get the imaginary time DLR operations object (see also cppdlr::imtime_ops).
auto end () const
 Get an iterator to the end of the mesh.
double eps () const noexcept
 Get the DLR error tolerance \( \epsilon \).
bool is_index_valid (long l) const noexcept
 Check if an index \( l \) is valid.
uint64_t mesh_hash () const noexcept
 Get the hash value of the mesh.
auto min_max_frequencies () const noexcept
 Get a pair containing the smallest and largest Matsubara frequency in the mesh.
mesh_point_t operator() (long l) const
 Function call operator to access a mesh point by its index \( l \in \{0, 1, \ldots, N-1\} \).
bool operator== (dlr_imfreq const &m) const
 Equal-to comparison operator compares the hash values.
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\} \).
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 DLR rank \( r \).
statistic_enum statistic () const noexcept
 Get the particle statistics.
bool symmetrize () const noexcept
 Is the mesh symmetric around \( i\omega_n = 0 \)?
long to_data_index (long l) const noexcept
 Map an index \( l \in \{0, 1, \ldots, N-1\} \) to its corresponding data index \( d(l) \).
long to_index (long d) const noexcept
 Map a data index \( d \in \{0, 1, \ldots, N-1\} \) to the corresponding index \( l(d) \).
matsubara_freq to_value (long l) const noexcept
 Map an index \( l \in \{0, 1, \ldots, N-1\} \) to its corresponding Matsubara frequency \( i\omega_{n_l} \).
double w_max () const noexcept
 Get the DLR energy cutoff \( \omega_{\text{max}} = \Lambda / \beta \).

Static Public Member Functions

static std::string hdf5_format ()
 Get the HDF5 format tag.

Friends

void h5_read (h5::group g, std::string const &name, dlr_imfreq &m)
 Read a triqs::mesh::dlr_imfreq mesh from HDF5.
void h5_write (h5::group g, std::string const &name, dlr_imfreq const &m)
 Write a triqs::mesh::dlr_imfreq mesh to HDF5.
std::ostream & operator<< (std::ostream &sout, dlr_imfreq const &m)
 Write a triqs::mesh::dlr_imfreq mesh to a std::ostream.

Constructor & Destructor Documentation

◆ dlr_imfreq() [1/2]

triqs::mesh::dlr_imfreq::dlr_imfreq ( double beta,
statistic_enum statistic,
double w_max,
double eps,
bool symmetrize = true )
inline

Construct an imaginary frequency DLR mesh with a given energy cutoff \( \omega_{\text{max}} \) and error tolerance \( \epsilon \).

It builds the DLR frequencies \( \omega_l \) from \( \Lambda = \omega_{\text{max}} \beta \) and the error tolerance \( \epsilon \), then constructs the imaginary-time and imaginary-frequency DLR operator tables from them.

Parameters
betaInverse temperature \( \beta > 0 \).
statisticParticle statistics.
w_maxDLR energy cutoff \( \omega_{\text{max}} = \Lambda / \beta \).
epsError tolerance \( \epsilon \).
symmetrizeWhether to choose the Matsubara frequencies symmetrically around \( i\omega_n = 0 \).

Definition at line 174 of file dlr_imfreq.hpp.

◆ dlr_imfreq() [2/2]

template<nda::AnyOf< dlr_imtime, dlr > M>
triqs::mesh::dlr_imfreq::dlr_imfreq ( M const & m)
inlineexplicit

Construct an imaginary frequency DLR mesh from another DLR type mesh.

Template Parameters
Mtriqs::mesh::dlr or triqs::mesh::dlr_imtime type.
Parameters
mOther mesh.

Definition at line 184 of file dlr_imfreq.hpp.

Member Function Documentation

◆ deserialize()

void triqs::mesh::dlr_imfreq::deserialize ( auto & ar)
inline

Deserialize the mesh from a generic archive.

Parameters
arArchive to deserialize from.

Definition at line 334 of file dlr_imfreq.hpp.

◆ is_index_valid()

bool triqs::mesh::dlr_imfreq::is_index_valid ( long l) const
inlinenodiscardnoexcept

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

Parameters
lIndex \( l \) to check.
Returns
True if \( 0 \leq l < N \), false otherwise.

Definition at line 202 of file dlr_imfreq.hpp.

◆ operator()()

mesh_point_t triqs::mesh::dlr_imfreq::operator() ( long l) const
inlinenodiscard

Function call operator to access a mesh point by its index \( l \in \{0, 1, \ldots, N-1\} \).

Parameters
lIndex \( l \) of the mesh point.
Returns
mesh_point_t with the Matsubara index \( n_l \), data index \( d(l) = l \) and same \( \beta \), particle statistics and hash value as the current mesh.

Definition at line 242 of file dlr_imfreq.hpp.

◆ operator[]()

mesh_point_t triqs::mesh::dlr_imfreq::operator[] ( long d) const
inlinenodiscard

Subscript operator to access a mesh point by its data index \( d \in \{0, 1, \ldots, N-1\} \).

Parameters
dData index \( d \) of the mesh point.
Returns
mesh_point_t with the Matsubara index \( n_{l(d)} \), data index \( d \) and same \( \beta \), particle statistics and hash value as the current mesh.

Definition at line 233 of file dlr_imfreq.hpp.

◆ serialize()

void triqs::mesh::dlr_imfreq::serialize ( auto & ar) const
inline

Serialize the mesh to a generic archive.

Parameters
arArchive to serialize to.

Definition at line 323 of file dlr_imfreq.hpp.

◆ to_data_index()

long triqs::mesh::dlr_imfreq::to_data_index ( long l) const
inlinenodiscardnoexcept

Map an index \( l \in \{0, 1, \ldots, N-1\} \) to its corresponding data index \( d(l) \).

Parameters
lIndex \( l \) to map.
Returns
Data index \( d(l) = l \).

Definition at line 210 of file dlr_imfreq.hpp.

◆ to_index()

long triqs::mesh::dlr_imfreq::to_index ( long d) const
inlinenodiscardnoexcept

Map a data index \( d \in \{0, 1, \ldots, N-1\} \) to the corresponding index \( l(d) \).

Parameters
dData index \( d \) to map.
Returns
Index \( l(d) = d \).

Definition at line 221 of file dlr_imfreq.hpp.

◆ to_value()

matsubara_freq triqs::mesh::dlr_imfreq::to_value ( long l) const
inlinenodiscardnoexcept

Map an index \( l \in \{0, 1, \ldots, N-1\} \) to its corresponding Matsubara frequency \( i\omega_{n_l} \).

Parameters
lIndex \( l \) to map.
Returns
Matsubara frequency \( i\omega_{n_l}\).

Definition at line 254 of file dlr_imfreq.hpp.

◆ h5_read

void h5_read ( h5::group g,
std::string const & name,
dlr_imfreq & m )
friend

Read a triqs::mesh::dlr_imfreq mesh from HDF5.

Parameters
gh5::group to be read from.
nameName of the subgroup.
mMesh object to be read into.

Definition at line 374 of file dlr_imfreq.hpp.

◆ h5_write

void h5_write ( h5::group g,
std::string const & name,
dlr_imfreq const & m )
friend

Write a triqs::mesh::dlr_imfreq mesh to HDF5.

Parameters
gh5::group to be written to.
nameName of the subgroup.
mMesh object to be written.

Definition at line 354 of file dlr_imfreq.hpp.

◆ operator<<

std::ostream & operator<< ( std::ostream & sout,
dlr_imfreq const & m )
friend

Write a triqs::mesh::dlr_imfreq mesh to a std::ostream.

Parameters
soutstd::ostream object.
mMesh to be written.
Returns
Reference to std::ostream object.

Definition at line 313 of file dlr_imfreq.hpp.


The documentation for this class was generated from the following file: