NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ set_submatrix() [2/2]

template<typename T >
void cntr::herm_matrix< T >::set_submatrix ( int  tstp,
std::vector< int > &  i1,
std::vector< int > &  i2,
herm_matrix< T > &  g,
std::vector< int > &  j1,
std::vector< int > &  j2 
)

Sets a (sub-) matrix of this contour object at a given time step to a (sub-) matrix of a given herm_matrix.

Purpose

Sets the (sub-) matrix of a two-time contour object \(C(t,t')\) \(C(t,t')\) the (sub-) of a given herm_matrix \(g\) according to \( C_{i_1(k) i_2(k)}(t,t') = g_{j_1(k) j_2(k)}(t,t') \) with \(k\) denoting an iterator of a subspace (at a given time step).

Parameters
tstp

Time step tstp.

i1

Vector of row indices of C.

i2

Vector of column indices of C.

g

The herm_matrix from which the (sub-) matrix is copied.

j1

Vector of row indices of g.

j2

Vector of row indices of g.

Definition at line 2522 of file cntr_herm_matrix_impl.hpp.

2523  {
2524  assert(tstp <= nt_);
2525  assert(nt_ == g.nt_);
2526  assert(i1.size()==i2.size() && i1.size()==j1.size() && j1.size()==j2.size());
2527  assert(size1_*size2_==i1.size());
2528  for(int k1=0;k1<i1.size();k1++){
2529  this->set_matrixelement(tstp,i1[k1],i2[k1],g,j1[k1],j2[k1]);
2530  }
2531 }
void set_matrixelement(int tstp, int i1, int i2, herm_matrix_timestep< T > &timestep)
Sets given matrix elements of all components at time step tstp to the components of a given herm_mat...