NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ set_to_data() [2/3]

template<typename T >
void cntr::herm_matrix_timestep_view< T >::set_to_data ( int  tstp,
herm_matrix< T > &  g 
)

Reset the pointers of herm_matrix_timestep_view class to the pointer given by herm_matrix g at timestep tstp.

Purpose

Initializes and reset the herm_matrix_timestep_view class, where data pointer are set to g at timestep tstp. If \( tstp==-1 \) the pointer of data is set to the first element of mat and for \( tstp>-1 \) to the first element of ret. Number of time steps is set to nt, number of points on the imaginary branch to 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 where the pointer of the class members should be reset

Definition at line 1083 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().

1083  {
1084  assert(tstp>=-1 && tstp<=g.nt());
1085  tstp_ = tstp;
1086  ntau_ = g.ntau();
1087  size1_ = g.size1();
1088  size2_ = g.size2();
1089  element_size_ = size1_ * size2_;
1090  sig_ = g.sig();
1091  if (tstp == -1) {
1092  mat_ = g.matptr(0);
1093  ret_ = 0;
1094  les_ = 0;
1095  tv_ = 0;
1096  } else if (tstp >= 0) {
1097  mat_ = 0;
1098  ret_ = g.retptr(tstp, 0);
1099  tv_ = g.tvptr(tstp, 0);
1100  les_ = g.lesptr(0, tstp);
1101  }
1102 }
+ Here is the call graph for this function: