TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::gfs::sym_grp< F, G >

#include <triqs/gfs/gf_sym_grp.hpp>

Detailed Description

template<typename F, typename G>
requires (is_gf_v<G> && (ScalarGfSymmetry<F, G> || TensorGfSymmetry<F, G>))
class triqs::gfs::sym_grp< F, G >

Symmetry group of a Green's function.

A sym_grp deduces the symmetry classes of the data of a Green's function from a list of symmetries (each modeling ScalarGfSymmetry or TensorGfSymmetry) and exposes methods to reduce the function to its representative data, reconstruct it, initialize it from an init function and symmetrize it. Internally it delegates to an nda::sym_grp operating on the underlying data array.

Template Parameters
FAnything modeling either ScalarGfSymmetry or TensorGfSymmetry with G.
GAnything modeling the gf concept.

Definition at line 147 of file gf_sym_grp.hpp.

Public Member Functions

 sym_grp ()=default
 Default constructor.
 sym_grp (G const &g, std::vector< F > const &sym_list, long const max_length=0)
 Construct the symmetry group of a Green's function from a list of symmetries.
nda::sym_grp< data_sym_func_t, data_t > const & get_data_sym_grp () const
 Accessor for the symmetry group of the data array.
std::vector< value_t > get_representative_data (G const &g) const
 Reduce a Green's function to its representative data using the symmetries.
template<typename H>
requires (ScalarGfInitFunc<H, G> || TensorGfInitFunc<H, G>)
void init (G &g, H const &h, bool parallel=false) const
 Initialize a Green's function using an init function.
template<typename V>
void init_from_representative_data (G &g, V const &vec) const
 Initialize a Green's function from its representative data using the symmetries.
long num_classes () const
 Accessor for the number of symmetry classes.
std::tuple< double, mesh_index_t, target_index_t > symmetrize (G &g) const
 Symmetrize a Green's function in place.

Constructor & Destructor Documentation

◆ sym_grp()

template<typename F, typename G>
triqs::gfs::sym_grp< F, G >::sym_grp ( G const & g,
std::vector< F > const & sym_list,
long const max_length = 0 )
inline

Construct the symmetry group of a Green's function from a list of symmetries.

Parameters
gA Green's function.
sym_listA list of symmetries, each modeling one of the gf symmetry concepts.
max_lengthMaximum recursion depth for out-of-bounds projection (default \( 0 \)).

Definition at line 302 of file gf_sym_grp.hpp.

Member Function Documentation

◆ get_data_sym_grp()

template<typename F, typename G>
nda::sym_grp< data_sym_func_t, data_t > const & triqs::gfs::sym_grp< F, G >::get_data_sym_grp ( ) const
inlinenodiscard

Accessor for the symmetry group of the data array.

Returns
The underlying nda::sym_grp instance operating on the data array.

Definition at line 264 of file gf_sym_grp.hpp.

◆ get_representative_data()

template<typename F, typename G>
std::vector< value_t > triqs::gfs::sym_grp< F, G >::get_representative_data ( G const & g) const
inlinenodiscard

Reduce a Green's function to its representative data using the symmetries.

Parameters
gA Green's function.
Returns
A vector of data values for the representative element of each symmetry class.

Definition at line 279 of file gf_sym_grp.hpp.

◆ init()

template<typename F, typename G>
template<typename H>
requires (ScalarGfInitFunc<H, G> || TensorGfInitFunc<H, G>)
void triqs::gfs::sym_grp< F, G >::init ( G & g,
H const & h,
bool parallel = false ) const
inline

Initialize a Green's function using an init function.

Iterates over all symmetry classes and propagates the result of evaluating the init function on each representative element.

Template Parameters
HAnything modeling either ScalarGfInitFunc or TensorGfInitFunc with G.
Parameters
gThe Green's function to fill in place.
hThe init function to be used.
parallelIf true, evaluate the init function with OpenMP in parallel (default false).

Definition at line 317 of file gf_sym_grp.hpp.

◆ init_from_representative_data()

template<typename F, typename G>
template<typename V>
void triqs::gfs::sym_grp< F, G >::init_from_representative_data ( G & g,
V const & vec ) const
inline

Initialize a Green's function from its representative data using the symmetries.

Template Parameters
VThe type of the data container (vector or vector view).
Parameters
gThe Green's function to fill in place.
vecThe data values for the representative element of each symmetry class.

Definition at line 288 of file gf_sym_grp.hpp.

◆ num_classes()

template<typename F, typename G>
long triqs::gfs::sym_grp< F, G >::num_classes ( ) const
inlinenodiscard

Accessor for the number of symmetry classes.

Returns
The number of deduced symmetry classes.

Definition at line 271 of file gf_sym_grp.hpp.

◆ symmetrize()

template<typename F, typename G>
std::tuple< double, mesh_index_t, target_index_t > triqs::gfs::sym_grp< F, G >::symmetrize ( G & g) const
inline

Symmetrize a Green's function in place.

Enforces the symmetries on g and reports the maximum symmetry violation encountered and the mesh and target index at which it occurs.

Parameters
gThe Green's function to symmetrize in place.
Returns
A tuple of the maximum symmetry violation and the corresponding mesh and target index.

Definition at line 332 of file gf_sym_grp.hpp.


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