NESSi  v1.0.2 The NonEquilibrium Systems Simulation Library

template<typename T >
 void cntr::herm_matrix< T >::resize_discard ( int nt, int ntau, int size1 )

Discards the herm_matrix object and resize with respect to the number of time points nt, points on the Matsubara branch ntau and the square-matrix size size1.

Purpose

Discard herm_matrix class and then resize with respect to number of time steps nt, points on the Matsubara branch ntau and the maxtix size size1. If nt = 0, real-time components are deallocated (i.e. only the Matsubara component is kept in memory). Internal routine; see top-level interface resize.

Parameters
 nt New number of time steps. ntau New number of points on Matsubara axis size1 New matrix rank of the contour function

Definition at line 313 of file cntr_herm_matrix_impl.hpp.

313  {
314  assert(ntau >= 0 && nt >= -1 && size1 >= 0);
315  delete[] les_;
316  delete[] ret_;
317  delete[] tv_;
318  delete[] mat_;
319  nt_ = nt;
320  ntau_ = ntau;
321  size1_ = size1;
322  size2_ = size1;
323  element_size_ = size1 * size1;
324  if (size1 > 0) {
325  mat_ = new cplx[(ntau_ + 1) * element_size_];
326  } else {
327  mat_ = 0;
328  }
329  if (nt_ >= 0 && size1_ > 0) {
330  les_ = new cplx[((nt_ + 1) * (nt_ + 2)) / 2 * element_size_];
331  ret_ = new cplx[((nt_ + 1) * (nt_ + 2)) / 2 * element_size_];
332  tv_ = new cplx[(nt_ + 1) * (ntau_ + 1) * element_size_];
333  } else {
334  les_ = 0;
335  tv_ = 0;
336  ret_ = 0;
337  }
338 }
std::complex< T > cplx