NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ left_multiply_hermconj()

template<typename T >
void cntr::herm_matrix< T >::left_multiply_hermconj ( int  tstp,
function< T > &  ft,
weight = 1.0 
)

Left-multiplies the herm_matrix with the hermitian conjugate of a contour function.

Purpose

Performs the operation \(C(t,t^\prime) \rightarrow w F^\ddagger(t)C(t,t^\prime)\), where \(C(t,t^\prime)\) is the herm_matrix, \(F(t)\) is a contour function and \(w\) is a real weight. The operation is performed at given time step tstp.

Parameters
tstp

[int] The time step at which \(F^\ddagger(t)\) and \(C(t,t^\prime)\) are multiplied.

ft

[function] The contour function.

weight

[T] The weight as above.

Definition at line 3017 of file cntr_herm_matrix_impl.hpp.

3018  {
3019  int m;
3020  cplx *xtemp, *ftemp, *x0, *f0, *fcc;
3021  xtemp = new cplx[element_size_];
3022  fcc = new cplx[element_size_];
3023  assert(tstp >= -1 && tstp <= nt_ && ft.nt() >= tstp &&
3024  ft.size1() == size1_ && ft.size2() == size2_ &&
3025  "tstp >= -1 && tstp <= nt_ && ft.nt() >= tstp && ft.size1() == size1_ && ft.size2() == size2_");
3026 
3027  f0 = ft.ptr(-1);
3028  element_conj<T, LARGESIZE>(size1_, fcc, f0);
3029  if (tstp == -1) {
3030  x0 = matptr(0);
3031  for (m = 0; m <= ntau_; m++) {
3032  element_mult<T, LARGESIZE>(size1_, xtemp, fcc,
3033  x0 + m * element_size_);
3034  element_smul<T, LARGESIZE>(size1_, xtemp, weight);
3035  element_set<T, LARGESIZE>(size1_, x0 + m * element_size_, xtemp);
3036  }
3037  } else {
3038  ftemp = ft.ptr(tstp);
3039  element_conj<T, LARGESIZE>(size1_, fcc, ftemp);
3040  x0 = retptr(tstp, 0);
3041  for (m = 0; m <= tstp; m++) {
3042  element_mult<T, LARGESIZE>(size1_, xtemp, fcc,
3043  x0 + m * element_size_);
3044  element_smul<T, LARGESIZE>(size1_, xtemp, weight);
3045  element_set<T, LARGESIZE>(size1_, x0 + m * element_size_, xtemp);
3046  }
3047  x0 = tvptr(tstp, 0);
3048  for (m = 0; m <= ntau_; m++) {
3049  element_mult<T, LARGESIZE>(size1_, xtemp, fcc,
3050  x0 + m * element_size_);
3051  element_smul<T, LARGESIZE>(size1_, xtemp, weight);
3052  element_set<T, LARGESIZE>(size1_, x0 + m * element_size_, xtemp);
3053  }
3054  x0 = lesptr(0, tstp);
3055  for (m = 0; m <= tstp; m++) {
3056  element_conj<T, LARGESIZE>(size1_, fcc, ft.ptr(m));
3057  element_mult<T, LARGESIZE>(size1_, xtemp, fcc,
3058  x0 + m * element_size_);
3059  element_smul<T, LARGESIZE>(size1_, xtemp, weight);
3060  element_set<T, LARGESIZE>(size1_, x0 + m * element_size_, xtemp);
3061  }
3062  }
3063  delete[] xtemp;
3064  delete[] fcc;
3065 }
std::complex< T > cplx