NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ get_ret() [2/4]

template<typename T >
void get_ret ( const int  i,
const int  j,
cdmatrix &  G_ret,
herm_matrix_timestep_view< T > &  G,
herm_matrix_timestep_view< T > &  Gcc 
)

Returns the retarded component of a general contour function at given times.

Purpose

Returns the retarded component \( G^\mathrm{R}(t_i,t_j) \) at given times \( t_i\) and \( t_j\). We assume \(G^\mathrm{R}(t_i,t_j)\) can be analytically continued to \( j > i\), for which the hermitian conjugate \(G^\ddagger\) is used.

Parameters
i

[int] Index of time \( t_i\) .

j

[int] Index of time \( t_j\) .

G_ret

[cdmatrix] The retarded component (returned to an eigen3 matrix).

G

[herm_matrix_timestep_view] Contour function G

Gcc

[herm_matrix_timestep_view] Hermitian conjugate \(G^\ddagger\) of \(G\).

Definition at line 298 of file cntr_getset_herm_matrix_timestep_view_inc.hpp.

299  {
300  assert(i <= G.tstp() && j <= G.tstp());
301  assert(i == G.tstp() || j == G.tstp());
302  assert(i <= Gcc.tstp() && j <= Gcc.tstp());
303  assert(i == Gcc.tstp() || j == Gcc.tstp());
304  assert(G.tstp() == Gcc.tstp());
305  assert(G.ntau() == Gcc.ntau());
306  assert(G.size1() == Gcc.size1());
307  assert(G.size2() == Gcc.size2());
308  assert(G.sig() == Gcc.sig());
309  std::complex<T> *ret;
310  int size1=G.size1(), size2=G.size2();
311 
312  if (G.tstp() == i){
313  ret = G.retptr(j);
314  map_ptr2matrix(size1, size2, ret, G_ret);
315  } else if (G.tstp() == j) {
316  ret = Gcc.retptr(i);
317  map_ptr2matrix(size1, size2, ret, G_ret);
318  G_ret.adjointInPlace();
319  G_ret = -G_ret;
320  }
321 }