NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ herm_matrix_timestep_view() [6/7]

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

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

Purpose

Initializes and copy the herm_matrix_timestep_view class from the herm_matrix_timestep with the same number of time steps nt, number of points on the imaginary branch ntau, matrix rank size1 and bosonic/fermionic symmetry sig. No data, only pointers are copied. First argument tstp is redundant, but present due to the safety [and historical] reason. Works for scalar or square-matrix contour objects

Parameters
tstp

Index of time

g

The herm_matrix_timestep according to which the class should be initialized

check_assert

Flag: true or false. Includes assertions

Definition at line 218 of file cntr_herm_matrix_timestep_view_impl.hpp.

References cntr::herm_matrix_timestep< T >::lesptr(), cntr::herm_matrix_timestep< T >::matptr(), cntr::herm_matrix_timestep< T >::retptr(), and cntr::herm_matrix_timestep< T >::tvptr().

219  {
220  if(check_assert) assert(tstp==g.tstp_);
221 
222  tstp_ = g.tstp_;
223  ntau_ = g.ntau_;
224  size1_ = g.size1_;
225  size2_ = g.size2_;
226  element_size_ = size1_ * size2_;
227  sig_ = g.sig_;
228  if (tstp_ == -1) {
229  mat_ = g.matptr(0);
230  ret_ = 0;
231  les_ = 0;
232  tv_ = 0;
233  } else if (tstp_ >= 0) {
234  mat_ = 0;
235  ret_ = g.retptr(0);
236  les_ = g.lesptr(0);
237  tv_ = g.tvptr(0);
238  }
239 }
+ Here is the call graph for this function: