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

Detailed Description

Operations and utilities acting on Green's function containers.

This is a parent group collecting the building blocks of the Green's function module, organised by purpose: construction (GF factories), lazy arithmetic (GF algebra), evaluation and interpolation (GF evaluation), MPI support (GF MPI support), CLEF auto-assignment (CLEF auto-assignment), data reshaping and slicing (GF reshaping and slicing), block mapping (GF block mapping) and symmetry reduction (GF symmetries).

General utilities are placed directly in GF utilities.

Topics

 CLEF auto-assignment
 CLEF integration enabling the g(w_) << expr assignment syntax.
 GF MPI support
 MPI broadcast and reduction of Green's functions.
 GF algebra
 Lazy expression templates and arithmetic operations on Green's functions.
 GF block mapping
 Apply a function block-by-block on block Green's functions.
 GF evaluation
 Evaluation, interpolation and mesh/target introspection of Green's functions.
 GF factories
 Factory functions that construct Green's function containers.
 GF reshaping and slicing
 Reshape, flatten and slice the data of a Green's function.
 GF symmetries
 Symmetry-reduced representation of Green's functions.

Classes

struct  triqs::gfs::is_instantiation_of< TMPLT, T >
 Trait to detect whether a type is an instantiation of a given class template. More...

Typedefs

template<typename G>
using triqs::gfs::block2_gf_const_view_of = block2_gf_const_view<get_mesh_t<G>, get_target_t<G>>
 The triqs::gfs::block2_gf_const_view type matching the mesh and target of G.
template<typename G>
using triqs::gfs::block2_gf_of = block2_gf<get_mesh_t<G>, get_target_t<G>>
 The triqs::gfs::block2_gf type matching the mesh and target of G.
template<typename G>
using triqs::gfs::block2_gf_view_of = block2_gf_view<get_mesh_t<G>, get_target_t<G>>
 The triqs::gfs::block2_gf_view type matching the mesh and target of G.
template<typename G>
using triqs::gfs::block_gf_const_view_of = block_gf_const_view<get_mesh_t<G>, get_target_t<G>>
 The triqs::gfs::block_gf_const_view type matching the mesh and target of G.
template<typename G>
using triqs::gfs::block_gf_of = block_gf<get_mesh_t<G>, get_target_t<G>>
 The triqs::gfs::block_gf type matching the mesh and target of G.
template<typename G>
using triqs::gfs::block_gf_view_of = block_gf_view<get_mesh_t<G>, get_target_t<G>>
 The triqs::gfs::block_gf_view type matching the mesh and target of G.
template<typename G>
using triqs::gfs::get_mesh_t = typename std::decay_t<G>::mesh_t
 The mesh type of a block Green's function type G.
template<typename G>
using triqs::gfs::get_target_t = typename std::decay_t<G>::target_t
 The target type of a block Green's function type G.
template<MemoryGf G>
using triqs::gfs::target_value_t = decltype(std::declval<G>()[std::declval<typename G::mesh_point_t>()])
 The type of value obtained when accessing a Green's function of type G with a mesh point.

Functions

template<int N = 0, typename BG>
requires is_block_gf_v<BG>
auto const & triqs::gfs::get_mesh (BG const &bg)
 Get the mesh of a block Green's function, or its N-th component for a product mesh.
template<int N = 0, MemoryGf G>
auto const & triqs::gfs::get_mesh (G const &g)
 Get the mesh of a Green's function, or its N-th component for a product mesh.

Variables

template<typename, typename = std::void_t<>>
constexpr int triqs::gfs::arity_of = -1
 Block arity of a type: T::arity if present, -1 otherwise.
template<typename G, int n = 0>
constexpr bool triqs::gfs::is_block_gf_v = false
 Trait to check whether a type is a block Green's function.
template<typename G, typename M = void>
constexpr bool triqs::gfs::is_gf_v = false
 Trait to check whether a type models the Green's function concept.
template<template< typename... > class gf, typename T>
constexpr bool triqs::gfs::is_instantiation_of_v = is_instantiation_of<gf, std::decay_t<T>>::value
 Variable template for triqs::gfs::is_instantiation_of, decaying the tested type first.

Typedef Documentation

◆ get_target_t

template<typename G>
using triqs::gfs::get_target_t = typename std::decay_t<G>::target_t

#include <triqs/gfs/block/block_gf.hpp>

The target type of a block Green's function type G.

The target type of a Green's function type G.

Definition at line 169 of file block_gf.hpp.

Function Documentation

◆ get_mesh() [1/2]

template<int N = 0, typename BG>
requires is_block_gf_v<BG>
auto const & triqs::gfs::get_mesh ( BG const & bg)

#include <triqs/gfs/block/block_gf.hpp>

Get the mesh of a block Green's function, or its N-th component for a product mesh.

Assumes a uniform mesh across all blocks: only the 0th block (block (0,0) for a block2_gf) is inspected; the meshes of all other blocks are ignored.

Delegates to the MemoryGf overload triqs::gfs::get_mesh(G const &) for the per-block logic.

Template Parameters
NIndex of the mesh component to return (default 0). Ignored for non-product meshes.
BGThe type of the block Green's function.
Parameters
bgThe block Green's function.
Returns
A const reference to the (N-th component of the) mesh of the 0th block.

Definition at line 158 of file block_gf.hpp.

◆ get_mesh() [2/2]

template<int N = 0, MemoryGf G>
auto const & triqs::gfs::get_mesh ( G const & g)

#include <triqs/gfs/gf/gf.hpp>

Get the mesh of a Green's function, or its N-th component for a product mesh.

Template Parameters
NIndex of the mesh component to return (default 0). Ignored for non-product meshes.
GThe type of the Green's function.
Parameters
gThe Green's function.
Returns
A const reference to the (N-th component of the) mesh.

Definition at line 160 of file gf.hpp.

Variable Documentation

◆ is_block_gf_v

template<typename G, int n = 0>
bool triqs::gfs::is_block_gf_v = false
inlineconstexpr

#include <triqs/gfs/block/block_gf.hpp>

Trait to check whether a type is a block Green's function.

It is true if G is a triqs::gfs::block_gf or triqs::gfs::block2_gf (or a view thereof).

Template Parameters
GType to test.
nOptional arity to require (0 = any, 1 = block_gf, 2 = block2_gf).

Definition at line 119 of file block_gf.hpp.

◆ is_gf_v

template<typename G, typename M = void>
bool triqs::gfs::is_gf_v = false
inlineconstexpr

#include <triqs/gfs/gf/gf.hpp>

Trait to check whether a type models the Green's function concept.

It is true if G (after stripping cvref-qualifiers) is one of triqs::gfs::gf, triqs::gfs::gf_view or triqs::gfs::gf_const_view.

When a second template argument M is supplied, it additionally requires the mesh type of G to be M.

Deprecated
In favour of the triqs::gfs::MemoryGf concept.
Template Parameters
GType to test.
MOptional mesh type to require.

Definition at line 101 of file gf.hpp.

◆ is_instantiation_of_v

template<template< typename... > class gf, typename T>
bool triqs::gfs::is_instantiation_of_v = is_instantiation_of<gf, std::decay_t<T>>::value
inlineconstexpr

#include <triqs/gfs/gf/gf.hpp>

Variable template for triqs::gfs::is_instantiation_of, decaying the tested type first.

Template Parameters
gfClass template to test against.
TType to test (cvref-qualifiers are stripped).

Definition at line 84 of file gf.hpp.