|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
Reshape, flatten and slice the data of a Green's function.
Utilities that reinterpret the data of a Green's function: flattening the target into a two-dimensional form (triqs::gfs::flatten_gf_2d), slicing the target space, transposing, and forming restricted or reinterpreted views.
Functions | |
| template<int N = 0, nda::MemoryArray A> | |
| auto | triqs::gfs::flatten_2d (A const &v) |
| Flatten an array into two dimensions, keeping one dimension and collapsing the rest. | |
| template<int N = 0, MemoryGf G> | |
| auto | triqs::gfs::flatten_gf_2d (G const &g) |
| Flatten a Green's function into a single-mesh, tensor-valued Green's function. | |
| template<typename Gf> requires (is_gf_v<Gf>) | |
| auto | triqs::gfs::make_const_view (Gf const &g) |
| Make a const view of a Green's function. | |
| template<typename G> requires (is_gf_v<G>) | |
| view_or_type_t< std::decay_t< G > > | triqs::gfs::positive_freq_view (G &&g) |
| Make a view of the positive-frequency part of a Matsubara Green's function. | |
| gf< mesh::imtime > | triqs::gfs::rebinning_tau (gf_const_view< mesh::imtime > const &g, size_t new_n_tau) |
| Rebin an imaginary-time Green's function onto a coarser uniform mesh. | |
| template<typename G, typename... Args> | |
| auto | triqs::gfs::reinterpret_scalar_valued_gf_as_matrix_valued (G &&g) |
| Reinterpret a scalar-valued Green's function as a 1x1 matrix-valued one. | |
| template<template< typename, typename, typename... > typename G, typename T> | |
| auto | triqs::gfs::restricted_view (G< mesh::imfreq, T > const &g, int n_max) |
| Make a const view of a Matsubara Green's function restricted to the first n_max frequency indices. | |
| template<typename G, typename... Args> | |
| auto | triqs::gfs::slice_target (G &&g, Args &&...1) |
| Slice the target of a Green's function, keeping the result matrix- (or tensor-) valued. | |
| template<typename G, typename... Args> | |
| auto | triqs::gfs::slice_target_to_scalar (G &&g, Args &&...1) |
| Slice the target of a matrix-valued Green's function down to a scalar-valued one. | |
| template<typename M> | |
| gf< M, matrix_valued > | triqs::gfs::transpose (gf_view< M, matrix_valued > g) |
| Transpose the target matrix of a matrix-valued Green's function, returning a new Green's function. | |
| template<int N = 0> | |
| void | triqs::gfs::unflatten_2d (nda::MemoryArray auto &&out, nda::MemoryArray auto const &afl) |
| Inverse of triqs::gfs::flatten_2d: scatter a two-dimensional array back into a higher-rank array. | |
| template<int N = 0, MemoryGf Gfl> | |
| void | triqs::gfs::unflatten_gf_2d (MemoryGf auto &g, Gfl const &gfl) |
| Inverse of triqs::gfs::flatten_gf_2d: scatter a flattened Green's function back into a higher-rank one. | |
| auto triqs::gfs::flatten_2d | ( | A const & | v | ) |
#include <triqs/gfs/gf/flatten.hpp>
Flatten an array into two dimensions, keeping one dimension and collapsing the rest.
The result is a two-dimensional array whose first dimension is the \( N \)-th dimension of the input and whose second dimension is the flattening of all other dimensions, kept in their original order.
| N | Index of the dimension to preserve. |
| A | nda::MemoryArray type of the input. |
| v | Input array. |
Definition at line 50 of file flatten.hpp.
| auto triqs::gfs::flatten_gf_2d | ( | G const & | g | ) |
#include <triqs/gfs/gf/flatten.hpp>
Flatten a Green's function into a single-mesh, tensor-valued Green's function.
The result keeps the \( N \)-th mesh of the input Green's function and has a tensor_valued<1> target containing the flattening of all other data dimensions in their original order.
| N | Index of the mesh to keep. |
| G | triqs::gfs::MemoryGf type of the input. |
| g | Input Green's function. |
Definition at line 85 of file flatten.hpp.
| auto triqs::gfs::make_const_view | ( | Gf const & | g | ) |
#include <triqs/gfs/functions/functions2.hpp>
Make a const view of a Green's function.
| Gf | The type of the Green's function. |
| g | The Green's function. |
Definition at line 53 of file functions2.hpp.
| view_or_type_t< std::decay_t< G > > triqs::gfs::positive_freq_view | ( | G && | g | ) |
#include <triqs/gfs/functions/imfreq.hpp>
Make a view of the positive-frequency part of a Matsubara Green's function.
| G | The type of the Green's function (must be an lvalue or a view). |
| g | The Matsubara Green's function. |
Definition at line 90 of file imfreq.hpp.
| gf< mesh::imtime > triqs::gfs::rebinning_tau | ( | gf_const_view< mesh::imtime > const & | g, |
| size_t | new_n_tau ) |
#include <triqs/gfs/functions/imtime.cpp>
Rebin an imaginary-time Green's function onto a coarser uniform mesh.
The new mesh has new_n_tau points covering the same \( [0, \beta] \) interval. Each output point is an average of the input values whose \( \tau \) falls in the corresponding bin.
| g | The imaginary-time Green's function to rebin. |
| new_n_tau | Number of points of the output mesh. |
Definition at line 39 of file imtime.cpp.
| auto triqs::gfs::reinterpret_scalar_valued_gf_as_matrix_valued | ( | G && | g | ) |
#include <triqs/gfs/functions/functions2.hpp>
Reinterpret a scalar-valued Green's function as a 1x1 matrix-valued one.
| G | The type of the (scalar-valued) Green's function. |
| Args | Unused. |
| g | The scalar-valued Green's function. |
Definition at line 254 of file functions2.hpp.
| auto triqs::gfs::restricted_view | ( | G< mesh::imfreq, T > const & | g, |
| int | n_max ) |
#include <triqs/gfs/functions/imfreq.hpp>
Make a const view of a Matsubara Green's function restricted to the first n_max frequency indices.
| G | The Green's function container template. |
| T | The target type of the Green's function. |
| g | The Matsubara Green's function. |
| n_max | Number of (positive) Matsubara indices to keep. |
Definition at line 351 of file imfreq.hpp.
| auto triqs::gfs::slice_target | ( | G && | g, |
| Args &&... | args ) |
#include <triqs/gfs/functions/functions2.hpp>
Slice the target of a Green's function, keeping the result matrix- (or tensor-) valued.
| G | The type of the Green's function. |
| Args | Types of the target slice arguments. |
| g | The Green's function. |
| args | Slice arguments applied to the target indices. |
Definition at line 216 of file functions2.hpp.
| auto triqs::gfs::slice_target_to_scalar | ( | G && | g, |
| Args &&... | args ) |
#include <triqs/gfs/functions/functions2.hpp>
Slice the target of a matrix-valued Green's function down to a scalar-valued one.
| G | The type of the Green's function. |
| Args | Types of the target slice arguments. |
| g | The Green's function. |
| args | Slice arguments selecting a single target element. |
Definition at line 235 of file functions2.hpp.
| gf< M, matrix_valued > triqs::gfs::transpose | ( | gf_view< M, matrix_valued > | g | ) |
#include <triqs/gfs/functions/functions2.hpp>
Transpose the target matrix of a matrix-valued Green's function, returning a new Green's function.
| M | Mesh type. |
| g | The matrix-valued Green's function. |
Definition at line 376 of file functions2.hpp.
| void triqs::gfs::unflatten_2d | ( | nda::MemoryArray auto && | out, |
| nda::MemoryArray auto const & | afl ) |
#include <triqs/gfs/gf/flatten.hpp>
Inverse of triqs::gfs::flatten_2d: scatter a two-dimensional array back into a higher-rank array.
| N | Index of the dimension that was preserved by the flattening. |
| out | Output array, whose shape determines how the flattened data is reshaped (written into). |
| afl | Flattened (two-dimensional) input array. |
Definition at line 65 of file flatten.hpp.
| void triqs::gfs::unflatten_gf_2d | ( | MemoryGf auto & | g, |
| Gfl const & | gfl ) |
#include <triqs/gfs/gf/flatten.hpp>
Inverse of triqs::gfs::flatten_gf_2d: scatter a flattened Green's function back into a higher-rank one.
| N | Index of the mesh that was kept by the flattening. |
| Gfl | triqs::gfs::MemoryGf type of the flattened Green's function (must have a non-product mesh). |
| g | Output Green's function (written into). |
| gfl | Flattened input Green's function. |
Definition at line 100 of file flatten.hpp.