NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ incr_timestep() [2/4]

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

Adds a herm_matrix_timestep with given weight to the herm_matrix.

Purpose

Performs the operation \(C \rightarrow C + A\), where \(C\) is the herm_matrix, \(A\) is a time slice described by a herm_matrix_timestep. The operation is performed at given time step tstp.

Parameters
tstp

[int] The time step where the herm_matrix is increased.

timestep

[herm_matrix_timestep] The herm_matrix_timestep which is added to the herm_matrix.

Definition at line 2616 of file cntr_herm_matrix_impl.hpp.

2617  {
2618  int i, len;
2619  cplx *x, *x0;
2620  cplx alpha = cplx(1.0, 0.0);
2621  assert(tstp >= -1 && tstp <= nt_ && "tstp >= -1 && tstp <= nt_");
2622  assert(timestep.tstp_ == tstp && timestep.ntau_ == ntau_ && timestep.size1_ == size1_
2623  && "timestep.tstp_ == tstp && timestep.ntau_ == ntau_ && timestep.size1_ == size1_");
2624  if (tstp == -1) {
2625  len = (ntau_ + 1) * element_size_;
2626  x0 = matptr(0);
2627  x = timestep.data_;
2628  HERM_MATRIX_INCR_TSTP
2629  } else {
2630  len = (tstp + 1) * element_size_;
2631  x0 = retptr(tstp, 0);
2632  x = timestep.data_;
2633  HERM_MATRIX_INCR_TSTP
2634  len = (ntau_ + 1) * element_size_;
2635  x0 = tvptr(tstp, 0);
2636  x = timestep.data_ + (tstp + 1) * element_size_;
2637  HERM_MATRIX_INCR_TSTP
2638  len = (tstp + 1) * element_size_;
2639  x0 = lesptr(0, tstp);
2640  x = timestep.data_ + (tstp + 1 + ntau_ + 1) * element_size_;
2641  HERM_MATRIX_INCR_TSTP
2642  }
2643 }
std::complex< T > cplx