NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ vie2_timestep_sin()

template<typename T >
void cntr::vie2_timestep_sin ( int  n,
herm_matrix< T > &  G,
function< T > &  Gsin,
herm_matrix< T > &  F,
herm_matrix< T > &  Fcc,
function< T > &  Fsin,
herm_matrix< T > &  Q,
function< T > &  Qsin,
beta,
h,
int  SolveOrder 
)

One step VIE solver \((1+F)*G=Q\) for Green's function with instantaneous contributions for given integration order.

Purpose

One solvs the linear equation \((1+F)*G=Q\) for \(G(t, t^\prime)\) with the given input kernel \(F(t, t^\prime)\), its hermitian conjugate \(F^\ddagger(t, t^\prime)\), and the source term \(Q(t, t^\prime)\) for the given integration order 'kt' at a given timestep. The Green's functions \(G(t, t^\prime)\) and \(Q(t, t^\prime)\) have instantaneous contributions.

Parameters
n

[int] time step

&G

[herm_matrix<T>] solution

&Gsin

[function<T>] singular component fo G

&F

[herm_matrix<T>] green's function on left-hand side

&Fcc

[herm_matrix<T>] Complex conjugate of F

&Fsin

[function<T>] singular component fo F

&Q

[herm_matrix<T>] green's function on right-hand side

&Qsin

[function<T>] singular component of Q

beta

[double] inverse temperature

h

[double] time interval

SolveOrder

[int] integration order

Definition at line 1779 of file cntr_vie2_impl.hpp.

References cntr::function< T >::get_value(), cntr::herm_matrix< T >::incr_timestep(), cntr::herm_matrix< T >::nt(), cntr::herm_matrix< T >::ntau(), cntr::function< T >::set_value(), cntr::herm_matrix< T >::sig(), cntr::herm_matrix< T >::size1(), and cntr::herm_matrix< T >::size2().

1779  {
1780 
1781  int n1=(n<=SolveOrder && n>=0 ? 0 : n);
1782  int n2=(n<=SolveOrder && n>=0 ? SolveOrder : n);
1783  int nt=F.nt(),ntau=F.ntau(),size1=F.size1(),sig=F.sig();
1784 
1785  assert(n >= -1);
1786  assert(ntau > 0);
1787  assert(SolveOrder > 0 && SolveOrder <= 5);
1788  assert(SolveOrder <= 2 * ntau + 2);
1789  assert(ntau == Fcc.ntau());
1790  assert(ntau == F.ntau());
1791  assert(ntau == Q.ntau());
1792  assert(F.sig()== G.sig());
1793  assert(Fcc.sig()== G.sig());
1794  assert(Q.sig()== G.sig());
1795  assert(F.size1()== size1);
1796  assert(F.size2()== size1);
1797  assert(Fcc.size1()== size1);
1798  assert(Fcc.size2()== size1);
1799  assert(Q.size1()== size1);
1800  assert(Q.size2()== size1);
1801  assert(n1 <= F.nt());
1802  assert(n1 <= Fcc.nt());
1803  assert(n1 <= G.nt());
1804  assert(n1 <= Q.nt());
1805 
1806  function<T> funFinv(n2,size1);
1807 
1808  cntr::herm_matrix<T> tmpF(nt,ntau,size1,sig),tmpFcc(nt,ntau,size1,sig),tmpF1(nt,ntau,size1,sig),tmpQ(nt,ntau,size1,sig);
1809  cdmatrix cdF,cdFinv,cdQ,cdG;
1810  //Check consistency
1811  assert(G.sig()==F.sig());
1812  assert(G.nt()==F.nt());
1813  assert(G.nt()==Q.nt());
1814 
1815  for(int n=-1;n<=n2;n++){
1816  Fsin.get_value(n,cdF);
1817  Qsin.get_value(n,cdQ);
1818  cdF=cdF+cdmatrix::Identity(size1,size1);
1819  cdFinv=cdF.inverse(); //Expected that these matrices are small
1820  cdG=cdFinv*cdQ;
1821  funFinv.set_value(n,cdFinv);
1822  Gsin.set_value(n,cdG);
1823  }
1824 
1825  tmpF=F;
1826  tmpFcc=Fcc;
1827  tmpQ=Q;
1828 
1829  //Set new F and Q
1830  for(int n=-1;n<=n2;n++){
1831  tmpF.left_multiply(n,funFinv,1.0);
1832  tmpFcc.right_multiply(n,funFinv,1.0);
1833  tmpQ.left_multiply(n,funFinv,1.0);
1834  }
1835  tmpF1=tmpF;
1836 
1837  for(int n=-1;n<=n2;n++){
1838  tmpF1.right_multiply(n,Gsin,1.0);
1839  }
1840  for(int i=-1;i<=n2;i++){
1841  tmpQ.incr_timestep(i,tmpF1,-1.0);
1842  }
1843  vie2_timestep(n,G,tmpF,tmpFcc,tmpQ,integration::I<T>(SolveOrder),beta,h);
1844  }
Class herm_matrix for two-time contour objects with hermitian symmetry.
+ Here is the call graph for this function: