 NESSi  v1.0.2 The NonEquilibrium Systems Simulation Library

## ◆ incr_timestep() [1/4]

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

Adds a herm_matrix_timestep with given weight to the herm_matrix.

Purpose

Performs the operation $$C \rightarrow C + \alpha A$$, where $$C$$ is the herm_matrix, $$A$$ is a time slice described by a herm_matrix_timestep and $$\alpha$$ is a complex weight. 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. alpha [complex] The weight in front of timestep.

Definition at line 2567 of file cntr_herm_matrix_impl.hpp.

Referenced by cntr::vie2_timestep_sin(), and cntr::vie2_timestep_sin_omp().

2569  {
2570  int i, len;
2571  cplx *x, *x0;
2572  assert(tstp >= -1 && tstp <= nt_ && "tstp >= -1 && tstp <= nt_");
2573  assert(timestep.tstp_ == tstp && timestep.ntau_ == ntau_ && timestep.size1_ == size1_
2574  && "timestep.tstp_ == tstp && timestep.ntau_ == ntau_ && timestep.size1_ == size1_");
2575  if (tstp == -1) {
2576  len = (ntau_ + 1) * element_size_;
2577  x0 = matptr(0);
2578  x = timestep.data_;
2579  HERM_MATRIX_INCR_TSTP
2580  } else {
2581  len = (tstp + 1) * element_size_;
2582  x0 = retptr(tstp, 0);
2583  x = timestep.data_;
2584  HERM_MATRIX_INCR_TSTP
2585  len = (ntau_ + 1) * element_size_;
2586  x0 = tvptr(tstp, 0);
2587  x = timestep.data_ + (tstp + 1) * element_size_;
2588  HERM_MATRIX_INCR_TSTP
2589  len = (tstp + 1) * element_size_;
2590  x0 = lesptr(0, tstp);
2591  x = timestep.data_ + (tstp + 1 + ntau_ + 1) * element_size_;
2592  HERM_MATRIX_INCR_TSTP
2593  }
2594 }
std::complex< T > cplx Here is the caller graph for this function: