NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ convolution_timestep_omp() [3/4]

template<typename T >
void cntr::convolution_timestep_omp ( int  omp_num_threads,
int  tstp,
herm_matrix< T > &  C,
herm_matrix< T > &  A,
herm_matrix< T > &  Acc,
herm_matrix< T > &  B,
herm_matrix< T > &  Bcc,
beta,
h,
int  SolveOrder 
)

Returns convolution \(C = A\ast B\) at a given time step

Purpose

Computes contour convolution C=A*B of the objects with class 'herm_matrix' at a given time step 't=nh'. Works for a scalar and square matrices. openMP parallelized version.

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] index of the time step ('t=nh')

C

[herm_matrix] Matrix to which the result of the convolution on Matsubara axis is given

A

[herm_matrix] contour Green's function

Acc

[herm_matrix] hermitian conjugate of A

B

[herm_matrix] contour Green's function

Bcc

[herm_matrix] hermitian conjugate of B

beta

inversed temperature

h

time step interval

SolveOrder

[int] integrator order

Definition at line 5704 of file cntr_convolution_impl.hpp.

5707  {
5708  int ntmin = (tstp == -1 || tstp > SolveOrder ? tstp : SolveOrder);
5709  if (tstp < -1)
5710  return;
5711  int size1 = A.size1();
5712  assert(C.size1()==size1);
5713  assert(B.size1()==size1);
5714  assert(Bcc.size1()==size1);
5715  assert(Acc.size1()==size1);
5716  assert(SolveOrder>=0 && SolveOrder <=5);
5717  assert(C.ntau()>=SolveOrder);
5718  assert(C.nt()>=ntmin);
5719  assert(A.nt()>=ntmin);
5720  assert(Acc.nt()>=ntmin);
5721  assert(B.nt()>=ntmin);
5722  assert(Bcc.nt()>=ntmin);
5723  assert(C.ntau()==A.ntau());
5724  assert(C.ntau()==Acc.ntau());
5725  assert(C.ntau()==B.ntau());
5726  assert(C.ntau()==Bcc.ntau());
5727  C.set_timestep_zero(tstp);
5728 
5729  switch (size1) {
5730  case 1:
5731  incr_convolution_omp<T, herm_matrix<T>, 1>(omp_num_threads, tstp, CPLX(1, 0), C, A,
5732  Acc, NULL, NULL, B, Bcc,
5733  integration::I<T>(SolveOrder), beta, h);
5734  break;
5735  case 2:
5736  incr_convolution_omp<T, herm_matrix<T>, 2>(omp_num_threads, tstp, CPLX(1, 0), C, A,
5737  Acc, NULL, NULL, B, Bcc,
5738  integration::I<T>(SolveOrder), beta, h);
5739  break;
5740  case 3:
5741  incr_convolution_omp<T, herm_matrix<T>, 3>(omp_num_threads, tstp, CPLX(1, 0), C, A,
5742  Acc, NULL, NULL, B, Bcc,
5743  integration::I<T>(SolveOrder), beta, h);
5744  break;
5745  case 4:
5746  incr_convolution_omp<T, herm_matrix<T>, 4>(omp_num_threads, tstp, CPLX(1, 0), C, A,
5747  Acc, NULL, NULL, B, Bcc,
5748  integration::I<T>(SolveOrder), beta, h);
5749  break;
5750  case 5:
5751  incr_convolution_omp<T, herm_matrix<T>, 5>(omp_num_threads, tstp, CPLX(1, 0), C, A,
5752  Acc, NULL, NULL, B, Bcc,
5753  integration::I<T>(SolveOrder), beta, h);
5754  break;
5755  case 6:
5756  incr_convolution_omp<T, herm_matrix<T>, 6>(omp_num_threads, tstp, CPLX(1, 0), C, A,
5757  Acc, NULL, NULL, B, Bcc,
5758  integration::I<T>(SolveOrder), beta, h);
5759  break;
5760  case 8:
5761  incr_convolution_omp<T, herm_matrix<T>, 8>(omp_num_threads, tstp, CPLX(1, 0), C, A,
5762  Acc, NULL, NULL, B, Bcc,
5763  integration::I<T>(SolveOrder), beta, h);
5764  break;
5765  default:
5766  incr_convolution_omp<T, herm_matrix<T>, LARGESIZE>(omp_num_threads, tstp, CPLX(1, 0),
5767  C, A, Acc, NULL, NULL, B, Bcc,
5768  integration::I<T>(SolveOrder), beta, h);
5769  break;
5770  }
5771 }