NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ get_timestep()

template<typename T >
void cntr::herm_matrix_timestep_view< T >::get_timestep ( int  tstp,
herm_matrix_timestep< T > &  timestep 
)

Get timestep into herm_matrix_timestep

Purpose

Get timestep into herm_matrix_timestep

Parameters
tstp

time step

timestep

The template argument according to which the data should be set

Definition at line 1258 of file cntr_herm_matrix_timestep_view_impl.hpp.

References cntr::herm_matrix_timestep< T >::resize().

1259  {
1260  int len = (2 * (tstp + 1) + ntau_ + 1) * element_size_;
1261  cplx *x;
1262  assert(tstp_ == tstp);
1263  if (timestep.total_size_ < len)
1264  timestep.resize(tstp, ntau_, size1_);
1265  x = timestep.data_;
1266  timestep.tstp_ = tstp;
1267  timestep.ntau_ = ntau_;
1268  timestep.size1_ = size1_;
1269  if (tstp == -1) {
1270  memcpy(x, mat_, sizeof(cplx) * (ntau_ + 1) * element_size_);
1271  } else {
1272  memcpy(x, ret_, sizeof(cplx) * (tstp + 1) * element_size_);
1273  memcpy(x + (tstp + 1) * element_size_, tv_,
1274  sizeof(cplx) * (ntau_ + 1) * element_size_);
1275  memcpy(x + (tstp + 1 + ntau_ + 1) * element_size_, les_,
1276  sizeof(cplx) * (tstp + 1) * element_size_);
1277  }
1278 }
+ Here is the call graph for this function: