NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ correlation_energy() [1/2]

template<typename T >
T cntr::correlation_energy ( int  tstp,
herm_matrix< T > &  G,
herm_matrix< T > &  Sigma,
beta,
h,
int  SolveOrder 
)

Returns the result of the correlation energy at a given time-step from the time-diagonal convolution

Purpose

Calculates the correlation energy given by \( -i/2\) Tr \([G*\Sigma]^<\) at a given time step 'tstp'. The objects 'G' and 'Sigma' are of the class type 'herm_matrix'.

Parameters
tstp

[int] time step

G

[herm_matrix] contour Green's function

Sigma

[herm_matrix] self-energy

beta

inversed temperature

h

time interval

SolveOrder

[int] integration order

Definition at line 533 of file cntr_utilities_impl.hpp.

References cntr::herm_matrix< T >::size1().

534  {
535  int size1=G.size1();
536  std::complex<T> trGxSGM;
537  std::complex<T> *GxSGM = new std::complex<T>[size1*size1];
538 
539  convolution_density_matrix<T,herm_matrix<T>>(tstp, GxSGM, Sigma, G, integration::I<T>(SolveOrder), beta, h);
540  trGxSGM = (0.0,0.0);
541  for(int i=0; i< size1; i++){
542  trGxSGM += GxSGM[i*size1 + i];
543  }
544  return 0.5*trGxSGM.real();
545 
546  delete GxSGM;
547 }
+ Here is the call graph for this function: