NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ herm_matrix_timestep_view() [4/7]

template<typename T >
cntr::herm_matrix_timestep_view< T >::herm_matrix_timestep_view ( int  tstp,
herm_matrix< T > &  g,
bool  check_assert = true 
)

Initializes the herm_matrix_timestep_view class with the same layout as a given herm_matrix g.

Purpose

Initializes and copy the herm_matrix_timestep_view class from the herm_matrix with the same number of time steps nt, number of points on the imaginary branch ntau, matrix rank size1 and bosonic/fermionic symmetry sig for time slice tstp. No data, only pointers are copied. Works for scalar or square-matrix contour objects

Parameters
tstp

Index of time

g

The herm_matrix according to which the class should be initialized

check_assertFlag: true or false. Includes assertions

Definition at line 305 of file cntr_herm_matrix_timestep_view_impl.hpp.

References cntr::herm_matrix< T >::nt(), cntr::herm_matrix< T >::ntau(), cntr::herm_matrix< T >::sig(), cntr::herm_matrix< T >::size1(), and cntr::herm_matrix< T >::size2().

306  {
307 
308  if(check_assert) assert(tstp>=-1 && tstp <=g.nt());
309  tstp_ = tstp;
310  ntau_ = g.ntau();
311  size1_ = g.size1();
312  size2_ = g.size2();
313  element_size_ = size1_ * size2_;
314  sig_ = g.sig();
315  if (tstp_ == -1) {
316  mat_ = g.matptr(0);
317  ret_ = 0;
318  les_ = 0;
319  tv_ = 0;
320  } else if (tstp_ >= 0) {
321  mat_ = 0;
322  ret_ = g.retptr(tstp_, 0);
323  les_ = g.lesptr(0, tstp_);
324  tv_ = g.tvptr(tstp_, 0);
325  }
326 }
+ Here is the call graph for this function: