NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ set_timestep_zero()

template<typename T >
void cntr::herm_matrix< T >::set_timestep_zero ( int  tstp)

Sets all components at time step tstp to zero.

Purpose

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

Parameters
tstp

The time step at which the components are set to zero.

Definition at line 2065 of file cntr_herm_matrix_impl.hpp.

2065  {
2066  assert(tstp >= -1 && tstp <= nt_ && "tstp >= -1 && tstp <= nt_");
2067  if (tstp == -1) {
2068  memset(matptr(0), 0, sizeof(cplx) * (ntau_ + 1) * element_size_);
2069  } else {
2070  memset(retptr(tstp, 0), 0, sizeof(cplx) * (tstp + 1) * element_size_);
2071  memset(tvptr(tstp, 0), 0, sizeof(cplx) * (ntau_ + 1) * element_size_);
2072  memset(lesptr(0, tstp), 0, sizeof(cplx) * (tstp + 1) * element_size_);
2073  }
2074 }