NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ set_timestep() [1/2]

template<typename T >
void cntr::herm_matrix< T >::set_timestep ( int  tstp,
herm_matrix< T > &  g1 
)

Sets all components at time step tstp to the components of a given herm_matrix.

Purpose

Sets all components of the herm_matrix at time step tstp to the components of given herm_matrix. If tstp = -1, only the Matsubara component will be copied.

Parameters
tstp

The time step at which the components are set.

g1

The herm_matrix from which the time step is copied.

Definition at line 2098 of file cntr_herm_matrix_impl.hpp.

Referenced by cntr::green_from_H(), and cntr::Reduce_timestep().

2098  {
2099  assert(tstp >= -1 && tstp <= nt_ && tstp <= g1.nt() && "tstp >= -1 && tstp <= nt_ && tstp <= g1.nt()");
2100  assert(g1.size1() == size1_ && "g1.size1() == size1_");
2101  assert(g1.ntau() == ntau_ && "g1.ntau() == ntau_");
2102  if (tstp == -1) {
2103  memcpy(mat_, g1.mat_, sizeof(cplx) * (ntau_ + 1) * element_size_);
2104  } else {
2105  memcpy(retptr(tstp, 0), g1.retptr(tstp, 0),
2106  sizeof(cplx) * (tstp + 1) * element_size_);
2107  memcpy(tvptr(tstp, 0), g1.tvptr(tstp, 0),
2108  sizeof(cplx) * (ntau_ + 1) * element_size_);
2109  memcpy(lesptr(0, tstp), g1.lesptr(0, tstp),
2110  sizeof(cplx) * (tstp + 1) * element_size_);
2111  }
2112 }
std::complex< T > cplx
+ Here is the caller graph for this function: