NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ set_timestep_zero()

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

Sets all components at time step tstp to zero.

Purpose

Sets all components of the herm_matrix_timestep_view 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. Dummy argument in release mode.

Definition at line 639 of file cntr_herm_matrix_timestep_view_impl.hpp.

639  {
640  assert(tstp == tstp_);
641  assert(tstp >= -1);
642  if (tstp == -1) {
643  memset(matptr(0), 0, sizeof(cplx) * (ntau_ + 1) * element_size_);
644  } else {
645  memset(retptr(0), 0, sizeof(cplx) * (tstp + 1) * element_size_);
646  memset(tvptr(0), 0, sizeof(cplx) * (ntau_ + 1) * element_size_);
647  memset(lesptr(0), 0, sizeof(cplx) * (tstp + 1) * element_size_);
648  }
649 }