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

Detailed Description

Factory functions that construct Green's function containers.

Convenience factories that build triqs::gfs::gf, triqs::gfs::block_gf and triqs::gfs::block2_gf objects (and their views) from meshes, shapes, block structures or existing Green's functions.

Functions

template<typename V, typename T, typename L>
block2_gf< V, T, L > triqs::gfs::make_block2_gf (int n, int p, gf< V, T, L > const &g)
 Make a triqs::gfs::block2_gf of n x p copies of a Green's function.
template<typename V, typename T, typename L>
block2_gf< V, T, L > triqs::gfs::make_block2_gf (std::vector< std::string > const &block_names1, std::vector< std::string > const &block_names2, std::vector< std::vector< gf< V, T, L > > > vv)
 Make a triqs::gfs::block2_gf from two lists of block names and a matrix of Green's functions.
template<typename Gf>
block2_gf_const_view_of< Gf > triqs::gfs::make_block2_gf_const_view (std::vector< std::string > block_names1, std::vector< std::string > block_names2, std::vector< std::vector< Gf > > &&v)
 Rvalue overload of make_block2_gf_const_view from two lists of block names and a matrix of views.
template<typename Gf>
block2_gf_const_view_of< Gf > triqs::gfs::make_block2_gf_const_view (std::vector< std::string > block_names1, std::vector< std::string > block_names2, std::vector< std::vector< Gf > > &v)
 Make a triqs::gfs::block2_gf_const_view from two lists of block names and a matrix of views.
template<typename Gf>
block2_gf_const_view_of< Gf > triqs::gfs::make_block2_gf_const_view (std::vector< std::vector< Gf > > &&v)
 Rvalue overload of make_block2_gf_const_view from a matrix of views.
template<typename Gf>
block2_gf_const_view_of< Gf > triqs::gfs::make_block2_gf_const_view (std::vector< std::vector< Gf > > &v)
 Make a triqs::gfs::block2_gf_const_view from a matrix of views (block names default to "0", "1", ...).
template<typename Gf>
block2_gf_view_of< Gf > triqs::gfs::make_block2_gf_view (std::vector< std::string > block_names1, std::vector< std::string > block_names2, std::vector< std::vector< Gf > > &&v)
 Rvalue overload of make_block2_gf_view from two lists of block names and a matrix of views.
template<typename Gf>
block2_gf_view_of< Gf > triqs::gfs::make_block2_gf_view (std::vector< std::string > block_names1, std::vector< std::string > block_names2, std::vector< std::vector< Gf > > &v)
 Make a triqs::gfs::block2_gf_view from two lists of block names and a matrix of views.
template<typename Gf>
block2_gf_view_of< Gf > triqs::gfs::make_block2_gf_view (std::vector< std::vector< Gf > > &&v)
 Rvalue overload of make_block2_gf_view from a matrix of views.
template<typename Gf>
block2_gf_view_of< Gf > triqs::gfs::make_block2_gf_view (std::vector< std::vector< Gf > > &v)
 Make a triqs::gfs::block2_gf_view from a matrix of views (block names default to "0", "1", ...).
template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf (int n, gf< V, T, L > const &g)
 Make a triqs::gfs::block_gf of n copies of a Green's function (block names default to "0", "1", ...).
template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf (std::initializer_list< gf< V, T, L > > const &v)
 Make a triqs::gfs::block_gf from an initializer list of Green's functions (block names default to "0", ...).
template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf (std::vector< gf< V, T, L > > v)
 Make a triqs::gfs::block_gf from a vector of Green's functions (block names default to "0", "1", ...).
template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf (std::vector< std::string > b, std::initializer_list< gf< V, T, L > > const &v)
 Make a triqs::gfs::block_gf from block names and an initializer list of Green's functions.
template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf (std::vector< std::string > const &b, gf< V, T, L > const &g)
 Make a triqs::gfs::block_gf from block names and one Green's function copied into every block.
template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf (std::vector< std::string > const &b, std::vector< gf< V, T, L > > v)
 Make a triqs::gfs::block_gf from block names and a vector of Green's functions.
template<typename G0, typename... G>
block_gf_const_view_of< G0 > triqs::gfs::make_block_gf_const_view (G0 &&g0, G &&...g)
 Make a triqs::gfs::block_gf_const_view from a list of Green's function views (block names default to "0", ...).
template<typename Gf>
block_gf_const_view_of< Gf > triqs::gfs::make_block_gf_const_view (std::vector< Gf > &&v)
 Rvalue overload of make_block_gf_const_view from a vector of views.
template<typename Gf>
block_gf_const_view_of< Gf > triqs::gfs::make_block_gf_const_view (std::vector< Gf > &v)
 Make a triqs::gfs::block_gf_const_view from a vector of views (block names default to "0", "1", ...).
template<typename Gf>
block_gf_const_view_of< Gf > triqs::gfs::make_block_gf_const_view (std::vector< std::string > b, std::vector< Gf > &&v)
 Rvalue overload of make_block_gf_const_view from block names and a vector of views.
template<typename Gf>
block_gf_const_view_of< Gf > triqs::gfs::make_block_gf_const_view (std::vector< std::string > b, std::vector< Gf > &v)
 Make a triqs::gfs::block_gf_const_view from block names and a vector of views.
template<typename G0, typename... G>
block_gf_view_of< G0 > triqs::gfs::make_block_gf_view (G0 &&g0, G &&...g)
 Make a triqs::gfs::block_gf_view from a list of Green's function views (block names default to "0", "1", ...).
template<typename Gf>
block_gf_view_of< Gf > triqs::gfs::make_block_gf_view (std::vector< Gf > &&v)
 Rvalue overload of make_block_gf_view from a vector of views.
template<typename Gf>
block_gf_view_of< Gf > triqs::gfs::make_block_gf_view (std::vector< Gf > &v)
 Make a triqs::gfs::block_gf_view from a vector of views (block names default to "0", "1", ...).
template<typename Gf>
block_gf_view_of< Gf > triqs::gfs::make_block_gf_view (std::vector< std::string > b, std::vector< Gf > &&v)
 Rvalue overload of make_block_gf_view from block names and a vector of views.
template<typename Gf>
block_gf_view_of< Gf > triqs::gfs::make_block_gf_view (std::vector< std::string > b, std::vector< Gf > &v)
 Make a triqs::gfs::block_gf_view from block names and a vector of views.
template<typename G>
std::decay_t< G >::regular_type triqs::gfs::make_gf (G &&g)
 Construct a regular Green's function from another Green's function or view.
template<typename Mesh, typename T>
gf< Mesh, typename T::target_t > triqs::gfs::make_gf (Mesh m, T const &t)
 Construct a Green's function from a mesh and a target.

Function Documentation

◆ make_block2_gf() [1/2]

template<typename V, typename T, typename L>
block2_gf< V, T, L > triqs::gfs::make_block2_gf ( int n,
int p,
gf< V, T, L > const & g )

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

Make a triqs::gfs::block2_gf of n x p copies of a Green's function.

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
nNumber of blocks along the first index.
pNumber of blocks along the second index.
gGreen's function to copy into each block.
Returns
The two-index block Green's function.

Definition at line 222 of file factories.hpp.

◆ make_block2_gf() [2/2]

template<typename V, typename T, typename L>
block2_gf< V, T, L > triqs::gfs::make_block2_gf ( std::vector< std::string > const & block_names1,
std::vector< std::string > const & block_names2,
std::vector< std::vector< gf< V, T, L > > > vv )

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

Make a triqs::gfs::block2_gf from two lists of block names and a matrix of Green's functions.

The outer and inner vector sizes must match the two block-name lists (throws a triqs::runtime_error otherwise).

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
block_names1Block names along the first index.
block_names2Block names along the second index.
vvBlocks (vector of vectors of Green's functions).
Returns
The two-index block Green's function.

Definition at line 237 of file factories.hpp.

◆ make_block2_gf_const_view() [1/2]

template<typename Gf>
block2_gf_const_view_of< Gf > triqs::gfs::make_block2_gf_const_view ( std::vector< std::string > block_names1,
std::vector< std::string > block_names2,
std::vector< std::vector< Gf > > & v )

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

Make a triqs::gfs::block2_gf_const_view from two lists of block names and a matrix of views.

Template Parameters
GfView type (must be a view).
Parameters
block_names1Block names along the first index.
block_names2Block names along the second index.
vBlocks (vector of vectors of views).
Returns
The two-index block Green's function const view.

Definition at line 326 of file factories.hpp.

◆ make_block2_gf_const_view() [2/2]

template<typename Gf>
block2_gf_const_view_of< Gf > triqs::gfs::make_block2_gf_const_view ( std::vector< std::vector< Gf > > & v)

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

Make a triqs::gfs::block2_gf_const_view from a matrix of views (block names default to "0", "1", ...).

Template Parameters
GfView type (must be a view).
Parameters
vBlocks (vector of vectors of views).
Returns
The two-index block Green's function const view.

Definition at line 303 of file factories.hpp.

◆ make_block2_gf_view() [1/2]

template<typename Gf>
block2_gf_view_of< Gf > triqs::gfs::make_block2_gf_view ( std::vector< std::string > block_names1,
std::vector< std::string > block_names2,
std::vector< std::vector< Gf > > & v )

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

Make a triqs::gfs::block2_gf_view from two lists of block names and a matrix of views.

Template Parameters
GfView type (must be a view).
Parameters
block_names1Block names along the first index.
block_names2Block names along the second index.
vBlocks (vector of vectors of views).
Returns
The two-index block Green's function view.

Definition at line 280 of file factories.hpp.

◆ make_block2_gf_view() [2/2]

template<typename Gf>
block2_gf_view_of< Gf > triqs::gfs::make_block2_gf_view ( std::vector< std::vector< Gf > > & v)

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

Make a triqs::gfs::block2_gf_view from a matrix of views (block names default to "0", "1", ...).

Template Parameters
GfView type (must be a view).
Parameters
vBlocks (vector of vectors of views).
Returns
The two-index block Green's function view.

Definition at line 257 of file factories.hpp.

◆ make_block_gf() [1/6]

template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf ( int n,
gf< V, T, L > const & g )

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

Make a triqs::gfs::block_gf of n copies of a Green's function (block names default to "0", "1", ...).

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
nNumber of blocks.
gGreen's function to copy into each block.
Returns
The block Green's function.

Definition at line 50 of file factories.hpp.

◆ make_block_gf() [2/6]

template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf ( std::initializer_list< gf< V, T, L > > const & v)

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

Make a triqs::gfs::block_gf from an initializer list of Green's functions (block names default to "0", ...).

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
vBlocks (Green's functions).
Returns
The block Green's function.

Definition at line 68 of file factories.hpp.

◆ make_block_gf() [3/6]

template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf ( std::vector< gf< V, T, L > > v)

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

Make a triqs::gfs::block_gf from a vector of Green's functions (block names default to "0", "1", ...).

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
vBlocks (Green's functions).
Returns
The block Green's function.

Definition at line 59 of file factories.hpp.

◆ make_block_gf() [4/6]

template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf ( std::vector< std::string > b,
std::initializer_list< gf< V, T, L > > const & v )

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

Make a triqs::gfs::block_gf from block names and an initializer list of Green's functions.

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
bBlock names.
vBlocks (Green's functions).
Returns
The block Green's function.

Definition at line 103 of file factories.hpp.

◆ make_block_gf() [5/6]

template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf ( std::vector< std::string > const & b,
gf< V, T, L > const & g )

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

Make a triqs::gfs::block_gf from block names and one Green's function copied into every block.

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
bBlock names.
gGreen's function to copy into each block.
Returns
The block Green's function.

Definition at line 78 of file factories.hpp.

◆ make_block_gf() [6/6]

template<typename V, typename T, typename L>
block_gf< V, T, L > triqs::gfs::make_block_gf ( std::vector< std::string > const & b,
std::vector< gf< V, T, L > > v )

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

Make a triqs::gfs::block_gf from block names and a vector of Green's functions.

Template Parameters
VMesh type.
TTarget type.
LLayout type.
Parameters
bBlock names.
vBlocks (Green's functions).
Returns
The block Green's function.

Definition at line 90 of file factories.hpp.

◆ make_block_gf_const_view() [1/3]

template<typename G0, typename... G>
block_gf_const_view_of< G0 > triqs::gfs::make_block_gf_const_view ( G0 && g0,
G &&... g )

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

Make a triqs::gfs::block_gf_const_view from a list of Green's function views (block names default to "0", ...).

Template Parameters
G0Type of the first view.
GTypes of the remaining views.
Parameters
g0First Green's function (view).
gRemaining Green's functions (views).
Returns
The block Green's function const view.

Definition at line 170 of file factories.hpp.

◆ make_block_gf_const_view() [2/3]

template<typename Gf>
block_gf_const_view_of< Gf > triqs::gfs::make_block_gf_const_view ( std::vector< Gf > & v)

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

Make a triqs::gfs::block_gf_const_view from a vector of views (block names default to "0", "1", ...).

Template Parameters
GfView type (must be a view).
Parameters
vVector of Green's function views.
Returns
The block Green's function const view.

Definition at line 181 of file factories.hpp.

◆ make_block_gf_const_view() [3/3]

template<typename Gf>
block_gf_const_view_of< Gf > triqs::gfs::make_block_gf_const_view ( std::vector< std::string > b,
std::vector< Gf > & v )

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

Make a triqs::gfs::block_gf_const_view from block names and a vector of views.

Template Parameters
GfView type (must be a view).
Parameters
bBlock names.
vVector of Green's function views.
Returns
The block Green's function const view.

Definition at line 200 of file factories.hpp.

◆ make_block_gf_view() [1/3]

template<typename G0, typename... G>
block_gf_view_of< G0 > triqs::gfs::make_block_gf_view ( G0 && g0,
G &&... g )

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

Make a triqs::gfs::block_gf_view from a list of Green's function views (block names default to "0", "1", ...).

Template Parameters
G0Type of the first view.
GTypes of the remaining views.
Parameters
g0First Green's function (view).
gRemaining Green's functions (views).
Returns
The block Green's function view.

Definition at line 118 of file factories.hpp.

◆ make_block_gf_view() [2/3]

template<typename Gf>
block_gf_view_of< Gf > triqs::gfs::make_block_gf_view ( std::vector< Gf > & v)

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

Make a triqs::gfs::block_gf_view from a vector of views (block names default to "0", "1", ...).

Template Parameters
GfView type (must be a view).
Parameters
vVector of Green's function views.
Returns
The block Green's function view.

Definition at line 129 of file factories.hpp.

◆ make_block_gf_view() [3/3]

template<typename Gf>
block_gf_view_of< Gf > triqs::gfs::make_block_gf_view ( std::vector< std::string > b,
std::vector< Gf > & v )

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

Make a triqs::gfs::block_gf_view from block names and a vector of views.

Template Parameters
GfView type (must be a view).
Parameters
bBlock names.
vVector of Green's function views.
Returns
The block Green's function view.

Definition at line 148 of file factories.hpp.

◆ make_gf() [1/2]

template<typename G>
std::decay_t< G >::regular_type triqs::gfs::make_gf ( G && g)

#include <triqs/gfs/make_gf.hpp>

Construct a regular Green's function from another Green's function or view.

Returns a copy with the regular (owning) type of the input, materializing the data of a view if necessary.

Template Parameters
GThe type of the input Green's function or view.
Parameters
gThe Green's function or view to copy.
Returns
A regular Green's function holding a copy of the data of g.

Definition at line 61 of file make_gf.hpp.

◆ make_gf() [2/2]

template<typename Mesh, typename T>
gf< Mesh, typename T::target_t > triqs::gfs::make_gf ( Mesh m,
T const & t )

#include <triqs/gfs/make_gf.hpp>

Construct a Green's function from a mesh and a target.

The target type is taken from T::target_t and the target shape from t.shape().

Template Parameters
MeshThe type of the mesh.
TThe type providing the target (e.g. an array determining the target shape and type).
Parameters
mThe mesh of the resulting Green's function.
tAn object whose target_t and shape() define the target of the Green's function.
Returns
A triqs::gfs::gf on the mesh m with the target deduced from t.

Definition at line 50 of file make_gf.hpp.