|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/mesh/refreq_pts.hpp>
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:
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 \).
Definition at line 68 of file refreq_pts.hpp.
Classes | |
| class | mesh_point_t |
| Mesh point of a triqs::mesh::refreq_pts 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 | |
| refreq_pts ()=default | |
| Default constructor creates an empty mesh. | |
| refreq_pts (std::initializer_list< double > l) | |
| Construct a real frequency mesh from an initializer list of frequency points. | |
| refreq_pts (std::vector< double > pts) | |
| Construct a real frequency mesh from a sorted vector of frequency points. | |
| auto | begin () const |
| Get an iterator to the beginning of the mesh. | |
| 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 | end () const |
| Get an iterator to the end of the mesh. | |
| bool | is_index_valid (index_t n) const noexcept |
| Check if an index \( n \) is valid. | |
| bool | is_value_valid (double w) const noexcept |
| Check if a value \( \omega \) is within the mesh range. | |
| uint64_t | mesh_hash () const noexcept |
| Get the hash value of the mesh. | |
| mesh_point_t | operator() (index_t n) const noexcept |
| Function call operator to access a mesh point by its index. | |
| bool | operator== (refreq_pts const &) const =default |
| Equal-to comparison operator. | |
| mesh_point_t | operator[] (closest_mesh_point_t< double > const &cmp) const noexcept |
| Subscript operator to access the mesh point closest to a given value. | |
| mesh_point_t | operator[] (long d) const noexcept |
| Subscript operator to access a mesh point by its data index. | |
| std::vector< double > const & | points () const noexcept |
| Get the vector of frequency point values. | |
| 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 number of mesh points. | |
| data_index_t | to_data_index (closest_mesh_point_t< double > const &cmp) const noexcept |
| Map a value to the closest mesh point and return its data index. | |
| data_index_t | to_data_index (index_t n) const noexcept |
| Map an index \( n \) to its corresponding data index \( d(n) = n \). | |
| index_t | to_index (closest_mesh_point_t< double > const &cmp) const noexcept |
| Map a value to the closest mesh point and return its index using binary search. | |
| index_t | to_index (data_index_t d) const noexcept |
| Map a data index \( d \) to the corresponding index \( n(d) = d \). | |
| double | to_value (index_t n) const noexcept |
| Map an index \( n \) to its corresponding value \( \omega_n \). | |
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, refreq_pts &m) |
| Read a triqs::mesh::refreq_pts mesh from HDF5. | |
| void | h5_write (h5::group g, std::string const &name, refreq_pts const &m) |
| Write a triqs::mesh::refreq_pts mesh to HDF5. | |
| std::ostream & | operator<< (std::ostream &sout, refreq_pts const &m) |
| Write a triqs::mesh::refreq_pts mesh to a std::ostream. | |
|
inline |
Construct a real frequency mesh from a sorted vector of frequency points.
| pts | Sorted vector of frequency values. |
Definition at line 150 of file refreq_pts.hpp.
|
inline |
Construct a real frequency mesh from an initializer list of frequency points.
| l | Initializer list of frequency values. |
Definition at line 162 of file refreq_pts.hpp.
|
inline |
Deserialize the mesh from a generic archive.
| ar | Archive to deserialize from. |
Definition at line 317 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Check if an index \( n \) is valid.
| n | Index \( n \) to check. |
Definition at line 173 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Check if a value \( \omega \) is within the mesh range.
| w | Value to check. |
Definition at line 181 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Function call operator to access a mesh point by its index.
| n | Index of the mesh point. |
Definition at line 259 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Subscript operator to access the mesh point closest to a given value.
| cmp | triqs::mesh::closest_mesh_point_t containing the value. |
Definition at line 251 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Subscript operator to access a mesh point by its data index.
| d | Data index of the mesh point. |
Definition at line 243 of file refreq_pts.hpp.
|
inline |
Serialize the mesh to a generic archive.
| ar | Archive to serialize to. |
Definition at line 311 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Map a value to the closest mesh point and return its data index.
| cmp | triqs::mesh::closest_mesh_point_t containing the value to map. |
Definition at line 200 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Map an index \( n \) to its corresponding data index \( d(n) = n \).
| n | Index \( n \) to map. |
Definition at line 189 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Map a value to the closest mesh point and return its index using binary search.
| cmp | triqs::mesh::closest_mesh_point_t containing the value to map. |
Definition at line 221 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Map a data index \( d \) to the corresponding index \( n(d) = d \).
| d | Data index \( d \) to map. |
Definition at line 210 of file refreq_pts.hpp.
|
inlinenodiscardnoexcept |
Map an index \( n \) to its corresponding value \( \omega_n \).
| n | Index to map. |
Definition at line 270 of file refreq_pts.hpp.
|
friend |
Read a triqs::mesh::refreq_pts mesh from HDF5.
| g | h5::group to be read from. |
| name | Name of the subgroup. |
| m | Mesh object to be read into. |
Definition at line 342 of file refreq_pts.hpp.
|
friend |
Write a triqs::mesh::refreq_pts mesh to HDF5.
| g | h5::group to be written to. |
| name | Name of the subgroup. |
| m | Mesh object to be written. |
Definition at line 329 of file refreq_pts.hpp.
|
friend |
Write a triqs::mesh::refreq_pts mesh to a std::ostream.
| sout | std::ostream object. |
| m | Mesh to be written. |
Definition at line 303 of file refreq_pts.hpp.