NESSi  v1.0.2 The NonEquilibrium Systems Simulation Library

## ◆ herm_matrix() [3/5]

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

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

Purpose

Initializes the herm_matrix class for a general (square or non-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 Number of matrix rows size2 Number of matrix columns sig Set sig = -1 for fermions or sig = +1 for bosons.

Definition at line 111 of file cntr_herm_matrix_impl.hpp.

111  {
112  assert(size1>=0 && size2>=0 && nt>=-1 && sig*sig==1 && ntau>=0);
113  nt_=nt;
114  ntau_=ntau;
115  sig_=sig;
116  size1_=size1;
117  size2_=size2;
118  element_size_=size1*size2;
119  if(size1>0){
120  mat_ = new cplx [(ntau_+1)*element_size_];
121  memset(mat_, 0, sizeof(cplx)*(ntau_+1)*element_size_);
122  }else{
123  mat_=0;
124  }
125  if(nt>=0 && size1>0){
126  les_ = new cplx [((nt_+1)*(nt_+2))/2*element_size_];
127  ret_ = new cplx [((nt_+1)*(nt_+2))/2*element_size_];
128  tv_ = new cplx [(nt_+1)*(ntau_+1)*element_size_];
129  memset(les_, 0, sizeof(cplx)*((nt_+1)*(nt_+2))/2*element_size_);
130  memset(ret_, 0, sizeof(cplx)*((nt_+1)*(nt_+2))/2*element_size_);
131  memset(tv_, 0, sizeof(cplx)*(nt_+1)*(ntau_+1)*element_size_);
132  }else{
133  les_=0;
134  tv_=0;
135  ret_=0;
136  }
137 }
std::complex< T > cplx