NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ resize()

template<typename T >
void cntr::herm_matrix_timestep< T >::resize ( int  tstp,
int  ntau,
int  size1 
)

Resizes herm_matrix_timestep object with respect to the number of points on the Matsubara branch and the matrix size at a given timestep .

Purpose

Resizes herm_matrix_timestep class with respect to number of points on the Matsubara branch ntau and the matrix size size1 at a given timestep tstp. Works for a square matrices.

Parameters
tstp

time steps

ntau

number of points on Matsubara branch

size1

size of the square matrix

Definition at line 275 of file cntr_herm_matrix_timestep_impl.hpp.

Referenced by cntr::herm_matrix_timestep_view< T >::get_timestep(), and cntr::Reduce_timestep().

275  {
276  int len = ((tstp + 1) * 2 + (ntau + 1)) * size1 * size1;
277  assert(ntau >= 0 && tstp >= -1 && size1 >= 0);
278  delete[] data_;
279  if (len == 0)
280  data_ = 0;
281  else {
282  data_ = new cplx[len];
283  }
284  size1_ = size1;
285  size2_ = size1;
286  element_size_ = size1_ * size1_;
287  tstp_ = tstp;
288  ntau_ = ntau;
289  total_size_ = len;
290 }
+ Here is the caller graph for this function: