NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ distance_norm2() [5/12]

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

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

Purpose

Evaluate the Euclidean norm between of a herm_matrix_timestep_view \(g_1\) and a herm_matrix ( \(g_2\)) at a given time step (tstp). 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

herm_matrix_timestep_view

g2

herm_matrix

Definition at line 1778 of file cntr_utilities_impl.hpp.

References cntr::herm_matrix< T >::nt(), cntr::herm_matrix_timestep_view< T >::ntau(), cntr::herm_matrix< T >::ntau(), cntr::herm_matrix_timestep_view< T >::size1(), cntr::herm_matrix< T >::size1(), and cntr::herm_matrix_timestep_view< T >::tstp().

1778  {
1779  assert(g1.size1() == g2.size1());
1780  assert(g1.ntau() == g2.ntau());
1781  assert(g1.tstp() == tstp);
1782  assert(g2.nt() >= tstp);
1783  herm_matrix_timestep_view<T> g2_view(tstp, g2);
1784  if (g1.size1() == 1)
1785  return distance_norm2_dispatch<T, 1>(tstp, g1, g2_view);
1786  else
1787  return distance_norm2_dispatch<T, LARGESIZE>(tstp, g1, g2_view);
1788 }
+ Here is the call graph for this function: