 NESSi  v1.0.2 The NonEquilibrium Systems Simulation Library

## ◆ set_submatrix() [1/2]

template<typename T >
 void cntr::herm_matrix< T >::set_submatrix ( 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 all time steps 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 for all times $$t,t'$$.

Parameters
 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 2483 of file cntr_herm_matrix_impl.hpp.

2484  {
2485  assert(nt_ == g.nt_);
2486  assert(i1.size()==i2.size() && i1.size()==j1.size() && j1.size()==j2.size());
2487  assert(size1_*size2_==i1.size());
2488  for(int k1=0;k1<i1.size();k1++){
2489  this->set_matrixelement(i1[k1],i2[k1],g,j1[k1],j2[k1]);
2490  }
2491 }
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...