NESSi  v1.0.2 The NonEquilibrium Systems Simulation Library

## ◆ distance_norm2_eigen()

template<typename T >
 T cntr::distance_norm2_eigen ( int tstp, herm_matrix_timestep< T > & g1, herm_matrix< T > & g2 )

Evaluate the Euclidean norm between 'herm_matrix_timestep' and 'herm_matrix' at a given time step.

Purpose

Evaluate the Euclidean norm between 'herm_matrix_timestep' ( $$g_1$$) and 'herm_matrix' ( $$g_2$$) at a given time step 'tstp' using the standard 'norm'-routine. To evaluate the norm, the elements of retarded, lesser and left-mixing components at the time step is used. The norm is not normalized per elements, but it is the summention of all the elements.

Parameters
 tstp time step g1 object of the class 'herm_matrix_timestep' g2 object of the class 'herm_matrix'

Definition at line 1960 of file cntr_utilities_impl.hpp.

1960  {
1961  int size1=g2.size1(),size2=g2.size2(),ntau=g2.ntau();
1962  T err=0.0;
1963
1964  assert(g1.tstp_==tstp && g1.tstp_<=g2.nt());
1965  assert(g1.ntau_==g2.ntau() && g1.size1_==g2.size1() && g1.size2_==g2.size2() );
1966  cdmatrix matg1(size1,size2);
1967  cdmatrix matg2(size1,size2);
1968
1969  if(tstp==-1){
1970  for(int i=0;i<=ntau;i++){
1971  g1.get_mat(i,matg1);
1972  g2.get_mat(i,matg2);
1973  err+=(matg1-matg2).norm();
1974  }
1975  }else{
1976  // Ret
1977  for(int i=0;i<=tstp;i++){
1978  g1.get_ret_tstp_t(i,matg1);
1979  g2.get_ret(tstp,i,matg2);
1980  err+=(matg1-matg2).norm();
1981  }
1982  // tv
1983  for(int i=0;i<=ntau;i++){
1984  g1.get_tv(i,matg1);
1985  g2.get_tv(tstp,i,matg2);
1986  err+=(matg1-matg2).norm();
1987  }
1988  // Les
1989  for(int i=0;i<=tstp;i++){
1990  g1.get_les_t_tstp(i,matg1);
1991  g2.get_les(i,tstp,matg2);
1992  err+=(matg1-matg2).norm();
1993  }
1994  }
1995 }
Here is the call graph for this function: