NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ herm_matrix() [2/5]

template<typename T >
cntr::herm_matrix< T >::herm_matrix ( int  nt,
int  ntau,
int  size1 = 1,
int  sig = -1 
)

Initializes the herm_matrix class for a square-matrix two-time contour function.

Purpose

Initializes the herm_matrix class for a square-matrix two-time contour function. If nt = 0, memory will be allocated for the Matsubara component only.

Parameters
nt

Number of time steps

ntau

Number of points on Matsubara axis

size1

Matrix rank of the contour function

sig

Set sig = -1 for fermions or sig = +1 for bosons.

Definition at line 62 of file cntr_herm_matrix_impl.hpp.

62  {
63  assert(size1 >= 0 && nt >= -1 && sig * sig == 1 && ntau >= 0);
64  nt_ = nt;
65  ntau_ = ntau;
66  sig_ = sig;
67  size1_ = size1;
68  size2_ = size1;
69  element_size_ = size1 * size1;
70  if (size1 > 0) {
71  mat_ = new cplx[(ntau_ + 1) * element_size_];
72  } else {
73  mat_ = 0;
74  }
75  if (nt >= 0 && size1 > 0) {
76  les_ = new cplx[((nt_ + 1) * (nt_ + 2)) / 2 * element_size_];
77  ret_ = new cplx[((nt_ + 1) * (nt_ + 2)) / 2 * element_size_];
78  tv_ = new cplx[(nt_ + 1) * (ntau_ + 1) * element_size_];
79  } else {
80  les_ = 0;
81  tv_ = 0;
82  ret_ = 0;
83  }
84 }
std::complex< T > cplx