TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches

#include <triqs/mesh/dlr_imtime.hpp>

Detailed Description

Imaginary time discrete Lehmann representation (DLR) mesh type.

An imaginary time 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 \( \tau = \beta / 2 \) (a symmetric mesh enforces the DLR rank to be even for Fermions and odd for Bosons).

An imaginary time 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(\tau, \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 \( \tau_l \), where \( \tau_l \) is the l-th DLR interpolation node in imaginary time space.

Green's function containers that are based on an imaginary time DLR mesh store the function values at the discrete time points \( \tau_l \), i.e. \( f_l = f(\tau_l) \). In contrast to DLR and imaginary-time meshes, the GF container cannot evaluate the function at an arbitrary imaginary time \( \tau \in [0, \beta] \) (evaluation at arbitrary points is intentionally unsupported).

Definition at line 75 of file dlr_imtime.hpp.

Classes

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

Public Types

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

Public Member Functions

 dlr_imtime ()=default
 Default constructor constructs an empty mesh.
 dlr_imtime (double beta, statistic_enum statistic, double w_max, double eps, bool symmetrize=true)
 Construct an imaginary time DLR mesh with a given energy cutoff \( \omega_{\text{max}} \) and error tolerance \( \epsilon \).
template<nda::AnyOf< dlr_imfreq, dlr > M>
 dlr_imtime (M const &m)
 Construct an imaginary time 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.
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_imtime 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 \( \tau = \beta / 2 \)?
long to_data_index (closest_mesh_point_t< double > const &cmp) const =delete
 Mapping of a value \( \tau \in [0, \beta] \) to the data index of the closest mesh point is deleted.
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) \).
double to_value (long l) const noexcept
 Map an index \( l \in \{0, 1, \ldots, N-1\} \) to its corresponding value \( \tau_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_imtime &m)
 Read a triqs::mesh::dlr_imtime mesh from HDF5.
void h5_write (h5::group g, std::string const &name, dlr_imtime const &m)
 Write a triqs::mesh::dlr_imtime mesh to HDF5.
std::ostream & operator<< (std::ostream &sout, dlr_imtime const &m)
 Write a triqs::mesh::dlr_imtime mesh to a std::ostream.

Constructor & Destructor Documentation

◆ dlr_imtime() [1/2]

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

Construct an imaginary time 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 imaginary time points symmetrically around \( \tau = \beta / 2 \).

Definition at line 169 of file dlr_imtime.hpp.

◆ dlr_imtime() [2/2]

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

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

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

Definition at line 179 of file dlr_imtime.hpp.

Member Function Documentation

◆ deserialize()

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

Deserialize the mesh from a generic archive.

Parameters
arArchive to deserialize from.

Definition at line 325 of file dlr_imtime.hpp.

◆ is_index_valid()

bool triqs::mesh::dlr_imtime::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 197 of file dlr_imtime.hpp.

◆ operator()()

mesh_point_t triqs::mesh::dlr_imtime::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 index \( l \), data index \( d(l) = l \), hash value of the current mesh and the imaginary time node \( \tau_l \) as its value.

Definition at line 240 of file dlr_imtime.hpp.

◆ operator[]()

mesh_point_t triqs::mesh::dlr_imtime::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 index \( l(d) = d \), data index \( d \), hash value of the current mesh and the imaginary time node \( \tau_l \) as its value.

Definition at line 231 of file dlr_imtime.hpp.

◆ serialize()

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

Serialize the mesh to a generic archive.

Parameters
arArchive to serialize to.

Definition at line 314 of file dlr_imtime.hpp.

◆ to_data_index()

long triqs::mesh::dlr_imtime::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 205 of file dlr_imtime.hpp.

◆ to_index()

long triqs::mesh::dlr_imtime::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 219 of file dlr_imtime.hpp.

◆ to_value()

double triqs::mesh::dlr_imtime::to_value ( long l) const
inlinenodiscardnoexcept

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

Parameters
lIndex \( l \) to map.
Returns
Value of the l-th DLR interpolation node in imaginary time space, i.e. \( \tau_l \) .

Definition at line 248 of file dlr_imtime.hpp.

◆ h5_read

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

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

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

Definition at line 365 of file dlr_imtime.hpp.

◆ h5_write

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

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

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

Definition at line 345 of file dlr_imtime.hpp.

◆ operator<<

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

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

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

Definition at line 304 of file dlr_imtime.hpp.


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