NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ vie2_timestep_omp()

template<typename T >
void cntr::vie2_timestep_omp ( int  omp_num_threads,
int  tstp,
herm_matrix< T > &  G,
herm_matrix< T > &  F,
herm_matrix< T > &  Fcc,
herm_matrix< T > &  Q,
beta,
h,
const int  SolveOrder,
const int  matsubara_method 
)

One step VIE solver \((1+F)*G=Q\) for Green's function for given timestep. OpenMP parallelized

Purpose

OpenMP version of 'vie2_timestep'. 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)\), the source term \(Q(t, t^\prime)\), and the integrator class 'I'.

Parameters
omp_num_threads

[int] The number of openMP threads to be used. Set to the number of threads in the current team.

tstp

[int] time step

&G

[herm_matrix<T>] solution

&F

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

&Fcc

[herm_matrix<T>] Complex conjugate of F

&Q

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

beta

[double] inverse temperature

h

[double] time interval

SolveOrder

[int] integrator order

matsubara_method

[const] Solution method on the Matsubara axis with 0: Fourier, 1: steep, 2: fixpoint

Definition at line 2126 of file cntr_vie2_impl.hpp.

References cntr::herm_matrix< T >::nt(), cntr::herm_matrix< T >::ntau(), cntr::herm_matrix< T >::sig(), cntr::herm_matrix< T >::size1(), cntr::herm_matrix< T >::size2(), and vie2_start().

2128  {
2129  int ntau = G.ntau();
2130  int size1 = G.size1();
2131  int n1 = (tstp >= SolveOrder ? tstp : SolveOrder);
2132 
2133  assert(tstp >= 0);
2134  assert(ntau > 0);
2135  assert(SolveOrder > 0 && SolveOrder <= 5);
2136  assert(SolveOrder <= 2 * ntau + 2);
2137  assert(ntau == Fcc.ntau());
2138  assert(ntau == F.ntau());
2139  assert(ntau == Q.ntau());
2140  assert(F.sig()== G.sig());
2141  assert(Fcc.sig()== G.sig());
2142  assert(Q.sig()== G.sig());
2143  assert(F.size1()== size1);
2144  assert(F.size2()== size1);
2145  assert(Fcc.size1()== size1);
2146  assert(Fcc.size2()== size1);
2147  assert(Q.size1()== size1);
2148  assert(Q.size2()== size1);
2149  assert(n1 <= F.nt());
2150  assert(n1 <= Fcc.nt());
2151  assert(n1 <= G.nt());
2152  assert(n1 <= Q.nt());
2153 
2154  if (tstp==-1){
2155  vie2_mat(G, F, Fcc, Q, beta, integration::I<T>(SolveOrder), matsubara_method);
2156  }else if(tstp<=SolveOrder){
2157  cntr::vie2_start(G,F,Fcc,Q,integration::I<T>(tstp),beta,h);
2158  }else{
2159  switch (size1){
2160  case 1:
2161  vie2_timestep_omp_dispatch<T, herm_matrix<T>, 1>(
2162  omp_num_threads, tstp, G, CPLX(1, 0), F, Fcc, NULL, NULL, Q, integration::I<T>(SolveOrder), beta, h);
2163  break;
2164  case 2:
2165  vie2_timestep_omp_dispatch<T, herm_matrix<T>, 2>(
2166  omp_num_threads, tstp, G, CPLX(1, 0), F, Fcc, NULL, NULL, Q, integration::I<T>(SolveOrder), beta, h);
2167  break;
2168  case 3:
2169  vie2_timestep_omp_dispatch<T, herm_matrix<T>, 3>(
2170  omp_num_threads, tstp, G, CPLX(1, 0), F, Fcc, NULL, NULL, Q, integration::I<T>(SolveOrder), beta, h);
2171  break;
2172  case 4:
2173  vie2_timestep_omp_dispatch<T, herm_matrix<T>, 4>(
2174  omp_num_threads, tstp, G, CPLX(1, 0), F, Fcc, NULL, NULL, Q, integration::I<T>(SolveOrder), beta, h);
2175  break;
2176  case 5:
2177  vie2_timestep_omp_dispatch<T, herm_matrix<T>, 5>(
2178  omp_num_threads, tstp, G, CPLX(1, 0), F, Fcc, NULL, NULL, Q, integration::I<T>(SolveOrder), beta, h);
2179  break;
2180  case 8:
2181  vie2_timestep_omp_dispatch<T, herm_matrix<T>, 8>(
2182  omp_num_threads, tstp, G, CPLX(1, 0), F, Fcc, NULL, NULL, Q, integration::I<T>(SolveOrder), beta, h);
2183  break;
2184  }
2185 
2186  }
2187 }
void vie2_start(herm_matrix< T > &G, herm_matrix< T > &F, herm_matrix< T > &Fcc, herm_matrix< T > &Q, T beta, T h, const int SolveOrder=MAX_SOLVE_ORDER)
VIE solver for a Green&#39;s function for the first k timesteps
+ Here is the call graph for this function: