Computing diagrams

All diagrammatic computations for self-energies and vertices in the setting discussed here ultimately require the computation of diagrams of one of two types, which we call ‘’bubbles’’ and ‘’loops’’. The former uses an instance of the Bubble class to connect two four-point vertices with a propagator pair, yielding another four-point object. The latter contracts two external fermionic legs of a four-point vertex with a propagator, yielding a two-point object.

Bubbles

template<typename vertexType_result, typename vertexType_left, typename vertexType_right, class Bubble_Object>
void bubble_function(vertexType_result &dgamma, const vertexType_left &vertex1, const vertexType_right &vertex2, const Bubble_Object &Pi, const char channel, const fRG_config &config, const std::array<bool, 3> tobecomputed = {true, true, true})

Function to connect two vertices with a Bubble, i.e. a propagator pair. Graphically in the a channel:

-->--|-----|--->---|-----|-->--
     | Γ_1 |   Π   | Γ_2 |
--<--|-----|---<---|-----|--<--

Template Parameters:
  • vertexType_result – Type of the vertex that results in the bubble computation.

  • vertexType_left – Type of the vertex that enters as the left part of the computation.

  • vertexType_right – Type of the vertex that enters as the right part of the computation.

  • Bubble_Object – Type of the Bubble object to connect the two vertices

Parameters:
  • dgamma – Reference to the vertex that the result of the computation shall be added to.

  • vertex1 – Reference to the left input vertex.

  • vertex2 – Reference to the right input vertex.

  • Pi – Reference to the Bubble.

  • channel – Two-particle channel of the computation. Can be a, p, or t.

  • config – Struct with essential parameters.

  • tobecomputed – Array of three booleans, specifying what diagrammatic classes shall be computed.

template<typename Q, typename vertexType_result, typename vertexType_left, typename vertexType_right>
void bubble_function(vertexType_result &dgamma, const vertexType_left &vertex1, const vertexType_right &vertex2, const Propagator<Q> &G, const Propagator<Q> &S, const char channel, const bool diff, const fRG_config &config, const std::array<bool, 3> tobecomputed = {true, true, true})

Overload of the bubble_function in case no Bubble object has been initialized yet.

Template Parameters:
  • Q – Template parameter specifying the type of the data.

  • vertexType_result – Type of the vertex that results in the bubble computation.

  • vertexType_left – Type of the vertex that enters as the left part of the computation.

  • vertexType_right – Type of the vertex that enters as the right part of the computation.

Parameters:
  • dgamma – Reference to the vertex that the result of the computation shall be added to.

  • vertex1 – Reference to the left input vertex.

  • vertex2 – Reference to the right input vertex.

  • GPropagator to be used for the Bubble.

  • S – Single-scale propagator to be used for the Bubble. Only used if diff=true.

  • channel – Two-particle channel of the computation. Can be a, p, or t.

  • diff – Boolean specifying whether the Bubble is differentiated or not.

  • config – Struct with essential parameters.

  • tobecomputed – Array of three booleans, specifying what diagrammatic classes shall be computed.

template<char channel, typename Q, typename vertexType_result, typename vertexType_left, typename vertexType_right, class Bubble_Object>
class BubbleFunctionCalculator

Class that actually performs the bubble computation. Invoked by the bubble_function.

Template Parameters:
  • channel – Two-particle channel of the computation. Can be a, p, or t.

  • Q – Template parameter specifying the type of the data.

  • vertexType_result – Type of the vertex that results in the bubble computation.

  • vertexType_left – Type of the vertex that enters as the left part of the computation.

  • vertexType_right – Type of the vertex that enters as the right part of the computation.

  • Bubble_Object – Type of the Bubble object to connect the two vertices

template<K_class diag_class, char channel, int spin, typename Q, typename vertexType_left, typename vertexType_right, class Bubble_Object, typename return_type = Q>
class Integrand

Refactoring of the classes Integrand_K1, Integrand_K2, Integrand_K3 into one single class.

Integrand invoked by the BubbleFunctionCalculator class for every combination of external arguments.

Template Parameters:
  • diag_class – Diagrammatic class to be computed (K1, K2, K2’ or K3).

  • channel – Two-particle channel of the computation. Can be a, p, or t.

  • spin – Spin index to be computed.

  • Q – Type of the data.

  • vertexType_left – Type of the vertex that enters as the left part of the computation.

  • vertexType_right – Type of the vertex that enters as the right part of the computation.

  • Bubble_Object – Type of the Bubble object to connect the two vertices.

  • return_type – Type of the data that is produced by the integral. Typically = Q.

Public Functions

inline Integrand(const vertexType_left &vertex1_in, const vertexType_right &vertex2_in, const Bubble_Object &Pi_in, int i0_in, int i2_in, const int iw_in, const freqType w_in, const freqType v_in, const freqType vp_in, const int i_in_in, const int i_spin_in, const bool diff_in)

Constructor for asymptotic class Ki:

Parameters:
  • vertex1_in – : left vertex

  • vertex2_in – : right vertex

  • Pi_in – : Bubble object connecting the left and right vertex

  • i0_in – : index specifying the (external) Keldysh component of integrand object; i0_in = [0, .. nK_Ki] where nK_Ki is the number of symmetry-reduced Keldysh components in the result (converted into actual Keldysh index i0 within the constructor)

  • w_in – : external bosonic frequency ω

  • i_in_in – : external index for internal structure

  • ch_in – : diagrammatic channel (‘a’, ‘p’, ‘t’)

  • diff_in – : determines whether to compute differentiated or non-differentiated bubble

auto operator()(freqType vpp) const -> return_type

Call operator:

Parameters:

vpp – : frequency at which to evaluate integrand (to be integrated over)

Returns:

Q : value of the integrand object evaluated at frequency vpp (comp or double)

Loops

template<bool all_spins, bool version = 0, typename Q, typename vertType>
void loop(SelfEnergy<Q> &self, const vertType &fullvertex, const Propagator<Q> &prop)

Loop function for calculating the self energy

Template Parameters:
  • all_spins – sum over spins in loop?

  • version – : 0 –> symmetry_expand vertex in ‘t’ channel and close the loop ABOVE

         ___<___ prop
        /       \
        \       /
         |-----|
         |  Γ  |
    --<--|-----|--<--
    
    1 –> symmetry_expand vertex in ‘a’ channel and close the loop RIGHT
                /---\
    -->--|-----|     |  prop
         |  Γ  |     v
    --<--|-----|     |
                \---/
    

  • Q – : Type of the elements of the vertex, usually comp

Parameters:
  • self – : SelfEnergy<Q> object of which the Retarded and Keldysh components will be updated in the loop

  • fullvertex – Vertex object for the calculation of the loop

  • prop – : Propagator object for the calculation of the loop

  • all_spins – : Whether the calculation of the loop should include all spin components of the vertex

template<typename Q, typename vertType, bool all_spins, bool version>
class LoopCalculator

Unnamed Group

Self-energy loop Class to actually calculate the loop integral for a given external fermionic frequency and internal index. Invoked by the loop function. Note: the vertices in versions 0 and 1 are related by crossing symmetry, hence we expect the results to be identical in both versions

tparam Q:

Type of the data.

tparam vertType:

Type of the vertex used.

tparam all_spins:

Compute all spin contributions?

tparam version:

The self-energy loop can be closed in two different versions:

version 0: close the loop above with propagator G^{3|1} => parametrize vertex in t-channel convention with w=0

version 1: close the loop right with propagator G^{2|1} => parametrize vertex in a-channel convention with w=0
3 -->--|-----|-->-- 1
       |  Γ  |
0 --<--|-----|--<-- 2

template<typename Q, typename vertType, bool all_spins, typename return_type, bool version>
class IntegrandSE

Class for the integrand of the Retarded SelfEnergy Requires a fullvertex (ref), a propagator(ref), an input frequency and an internal structure index

Template Parameters:
  • Q – Type in which the integrand takes values, usually comp Class for the integrand of a loop calculation. Invoked by LoopCalculator.

  • Q – Type of the data.

  • vertType – Type of the vertex to be used.

  • all_spins – Compute all spin components?

  • return_type – Type of the data of the result. Typically = Q.

  • version – Version of the self-energy loop. See documentation for LoopFunctionCalculator.

Public Functions

inline IntegrandSE(const int type_in, const vertType &vertex_in, const Propagator<Q> &prop_in, const int iK_in, const int i_spin_in, const double v_in, const int i_in_in)
Parameters:
  • type_in – determines Keldysh components (always type = 0 for MF) is the element in Sigma matrix to be computed:

    0  1    ___     K  A
    2  3            R  0
    

    For example:

    type = 0 -> Keldysh component

    type = 2 -> Retarded component

  • vertex_in – Reference to the input vertex.

  • prop_in – Reference to the input propagator.

  • iK_in – Keldysh index

  • i_spin_in – spin index

  • v_in – external fermionic frequency index

  • i_in_in – internal index (trivially 0 most of the time)

auto operator()(double vp) const -> return_type

Call operator:

Parameters:

vp – frequency at which to evaluate integrand (to be integrated over)

Returns:

value of the integrand object evaluated at frequency vp