NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ get_timestep() [1/2]

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

Definition at line 2156 of file cntr_herm_matrix_impl.hpp.

Referenced by cntr::Reduce_timestep().

2157  {
2158  int len = (2 * (tstp + 1) + ntau_ + 1) * element_size_;
2159  cplx *x;
2160  assert(tstp >= -1 && tstp <= nt_ && "tstp >= -1 && tstp <= nt_");
2161  if (timestep.total_size_ < len)
2162  timestep.resize(tstp, ntau_, size1_);
2163  x = timestep.data_;
2164  timestep.tstp_ = tstp;
2165  timestep.ntau_ = ntau_;
2166  timestep.size1_ = size1_;
2167  if (tstp == -1) {
2168  memcpy(x, mat_, sizeof(cplx) * (ntau_ + 1) * element_size_);
2169  } else {
2170  memcpy(x, retptr(tstp, 0), sizeof(cplx) * (tstp + 1) * element_size_);
2171  memcpy(x + (tstp + 1) * element_size_, tvptr(tstp, 0),
2172  sizeof(cplx) * (ntau_ + 1) * element_size_);
2173  memcpy(x + (tstp + 1 + ntau_ + 1) * element_size_, lesptr(0, tstp),
2174  sizeof(cplx) * (tstp + 1) * element_size_);
2175  }
2176 }
std::complex< T > cplx
+ Here is the caller graph for this function: