pomerol  2.1
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes | Friends
Pomerol::TwoParticleGFContainer Class Reference

Container for instances of TwoParticleGF. More...

#include <TwoParticleGFContainer.hpp>

Inheritance diagram for Pomerol::TwoParticleGFContainer:
Inheritance graph
[legend]
Collaboration diagram for Pomerol::TwoParticleGFContainer:
Collaboration graph
[legend]

Public Member Functions

template<typename... IndexTypes>
 TwoParticleGFContainer (IndexClassification< IndexTypes... > const &IndexInfo, StatesClassification const &S, Hamiltonian const &H, DensityMatrix const &DM, FieldOperatorContainer const &Ops)
 
void prepareAll (std::set< IndexCombination4 > const &Indices={})
 
std::map< IndexCombination4, std::vector< ComplexType > > computeAll (bool clearTerms=false, FreqVec3 const &freqs={}, MPI_Comm const &comm=MPI_COMM_WORLD, bool split=true)
 
- Public Member Functions inherited from Pomerol::IndexContainer4< TwoParticleGF, TwoParticleGFContainer >
 IndexContainer4 (TwoParticleGFContainer const &Source, IndexClassification< IndexTypes... > const &IndexInfo)
 
void fill (std::set< IndexCombination4 > Indices=std::set< IndexCombination4 >())
 
ElementWithPermFreq< TwoParticleGF > & create (IndexCombination4 const &Indices)
 
bool isInContainer (IndexCombination4 const &Indices) const
 
bool isInContainer (ParticleIndex Index1, ParticleIndex Index2, ParticleIndex Index3, ParticleIndex Index4) const
 
ElementWithPermFreq< TwoParticleGF > & operator() (IndexCombination4 const &Indices)
 
ElementWithPermFreq< TwoParticleGF > & operator() (ParticleIndex Index1, ParticleIndex Index2, ParticleIndex Index3, ParticleIndex Index4)
 
- Public Member Functions inherited from Pomerol::Thermal
 Thermal (RealType beta)
 

Data Fields

RealType ReduceResonanceTolerance = 1e-8
 A difference in energies with magnitude below this value is treated as zero. More...
 
RealType CoefficientTolerance = 1e-16
 Minimal magnitude of the coefficient of a term for it to be taken into account. More...
 
RealType MultiTermCoefficientTolerance = 1e-5
 
- Data Fields inherited from Pomerol::Thermal
const RealType beta
 Inverse temperature \(\beta\). More...
 
const ComplexType MatsubaraSpacing
 Spacing between (imaginary) Matsubara frequencies, \(i\pi/\beta\). More...
 

Protected Member Functions

std::shared_ptr< TwoParticleGFcreateElement (IndexCombination4 const &Indices) const
 
- Protected Member Functions inherited from Pomerol::IndexContainer4< TwoParticleGF, TwoParticleGFContainer >
std::set< IndexCombination4enumerateIndices () const
 

Protected Attributes

StatesClassification const & S
 Information about invariant subspaces of the Hamiltonian. More...
 
Hamiltonian const & H
 The Hamiltonian. More...
 
DensityMatrix const & DM
 Many-body density matrix \(\hat\rho\). More...
 
FieldOperatorContainer const & Operators
 A set of creation/annihilation operators \(c^\dagger\)/ \(c\). More...
 
- Protected Attributes inherited from Pomerol::IndexContainer4< TwoParticleGF, TwoParticleGFContainer >
ParticleIndex NumIndices
 Each of the four indices can change in the range [0; NumIndices[. More...
 
TwoParticleGFContainer const & Source
 Stored elements are created by calling Source.createElement(Indices). More...
 
std::map< IndexCombination4, ElementWithPermFreq< TwoParticleGF > > ElementsMap
 Sparse storage for the decorated elements. More...
 
std::map< IndexCombination4, std::shared_ptr< TwoParticleGF > > NonTrivialElements
 Sparse storage for the plain (non-decorated) elements. More...
 

Friends

class IndexContainer4< TwoParticleGF, TwoParticleGFContainer >
 

Detailed Description

Container for instances of TwoParticleGF.

This class stores multiple \((i,j,k,l)\)-elements of a fermionic two-particle Matsubara Green's function

\[ \chi_{ijkl}(\omega_{n_1},\omega_{n_2};\omega_{n_3},\omega_{n_1}+\omega_{n_2}-\omega_{n_3}) = \int_0^\beta Tr[\mathcal{T}_\tau \hat\rho c_i(\tau_1)c_j(\tau_2)c^\dagger_k(\tau_3)c^\dagger_l(0)] e^{i\omega_{n_1}\tau_1+i\omega_{n_2}\tau_2-i\omega_{n_3}\tau_3} d\tau_1 d\tau_2 d\tau_3. \]

Definition at line 51 of file TwoParticleGFContainer.hpp.

Constructor & Destructor Documentation

◆ TwoParticleGFContainer()

template<typename... IndexTypes>
Pomerol::TwoParticleGFContainer::TwoParticleGFContainer ( IndexClassification< IndexTypes... > const &  IndexInfo,
StatesClassification const &  S,
Hamiltonian const &  H,
DensityMatrix const &  DM,
FieldOperatorContainer const &  Ops 
)
inline

Constructor.

Template Parameters
IndexTypesTypes of indices carried by the creation and annihilation operators.
Parameters
[in]IndexInfoMap for fermionic operator index tuples.
[in]SInformation about invariant subspaces of the Hamiltonian.
[in]HThe Hamiltonian.
[in]DMMany-body density matrix \(\hat\rho\).
[in]OpsA set of creation/annihilation operators \(c^\dagger\)/ \(c\).

Definition at line 69 of file TwoParticleGFContainer.hpp.

Member Function Documentation

◆ computeAll()

std::map<IndexCombination4, std::vector<ComplexType> > Pomerol::TwoParticleGFContainer::computeAll ( bool  clearTerms = false,
FreqVec3 const &  freqs = {},
MPI_Comm const &  comm = MPI_COMM_WORLD,
bool  split = true 
)

Compute all prepared elements \(\chi_{ijkl}\).

Parameters
[in]clearTermsIf true, computed TwoParticleGFPart's of all elements will be destroyed immediately after filling the precomputed value cache.
[in]freqsList of frequency triplets \((\omega_{n_1},\omega_{n_2},\omega_{n_3})\) for value pre-computation.
[in]commMPI communicator used to parallelize the computation.
[in]splitEnable MPI parallelization.
Precondition
prepareAll() has been called.

◆ createElement()

std::shared_ptr<TwoParticleGF> Pomerol::TwoParticleGFContainer::createElement ( IndexCombination4 const &  Indices) const
protected

Create a single element \(\chi_{ijkl}\).

Parameters
[in]IndicesIndex combination \((i,j,k,l)\).

◆ prepareAll()

void Pomerol::TwoParticleGFContainer::prepareAll ( std::set< IndexCombination4 > const &  Indices = {})

Prepare a set of elements \(\chi_{ijkl}\).

Parameters
[in]IndicesSet of index combinations of the elements \(\chi_{ijkl}\) to be prepared. An empty set results in creation of elements for all possible index combinations \((i,j,k,l)\).

Friends And Related Function Documentation

◆ IndexContainer4< TwoParticleGF, TwoParticleGFContainer >

Definition at line 99 of file TwoParticleGFContainer.hpp.

Field Documentation

◆ CoefficientTolerance

RealType Pomerol::TwoParticleGFContainer::CoefficientTolerance = 1e-16

Minimal magnitude of the coefficient of a term for it to be taken into account.

Definition at line 56 of file TwoParticleGFContainer.hpp.

◆ DM

DensityMatrix const& Pomerol::TwoParticleGFContainer::DM
protected

Many-body density matrix \(\hat\rho\).

Definition at line 111 of file TwoParticleGFContainer.hpp.

◆ H

Hamiltonian const& Pomerol::TwoParticleGFContainer::H
protected

The Hamiltonian.

Definition at line 109 of file TwoParticleGFContainer.hpp.

◆ MultiTermCoefficientTolerance

RealType Pomerol::TwoParticleGFContainer::MultiTermCoefficientTolerance = 1e-5

Minimal magnitude of the coefficient of a term for it to be taken into account with respect to the amount of terms.

Definition at line 59 of file TwoParticleGFContainer.hpp.

◆ Operators

FieldOperatorContainer const& Pomerol::TwoParticleGFContainer::Operators
protected

A set of creation/annihilation operators \(c^\dagger\)/ \(c\).

Definition at line 113 of file TwoParticleGFContainer.hpp.

◆ ReduceResonanceTolerance

RealType Pomerol::TwoParticleGFContainer::ReduceResonanceTolerance = 1e-8

A difference in energies with magnitude below this value is treated as zero.

Definition at line 54 of file TwoParticleGFContainer.hpp.

◆ S

StatesClassification const& Pomerol::TwoParticleGFContainer::S
protected

Information about invariant subspaces of the Hamiltonian.

Definition at line 106 of file TwoParticleGFContainer.hpp.


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