NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ density_matrix() [2/2]

template<typename T >
template<class Matrix >
void cntr::herm_matrix_timestep_view< T >::density_matrix ( int  tstp,
Matrix &  M 
)

Return single particle density matrix as Eigen matrix from herm_matrix_timestep_view.

Purpose

Return single particle density matrix as Eigen matrix from herm_matrix_timestep_view Works for scalar or square-matrix contour objects.

Parameters
tstp

timestep index

M[Matrix]

Eigen matrix representation of the density matrix

Definition at line 2126 of file cntr_herm_matrix_timestep_view_impl.hpp.

2126  {
2127  assert(tstp == tstp_);
2128 
2129  CPLX *x;
2130  if (tstp == -1) {
2131  x = matptr(ntau_);
2132  herm_matrix_READ_ELEMENT M *= (-1.0);
2133  } else {
2134  x = lesptr(tstp);
2135  herm_matrix_READ_ELEMENT M *= CPLX(0.0, 1.0 * sig_);
2136  }
2137 }