NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ propagator_exp()

template<typename T >
void cntr::propagator_exp ( int  tstp,
cntr::function< T > &  U,
cntr::function< T > &  H,
double  dt,
int  order,
int  kt,
bool  fixHam = false 
)

Propagator for time-dependent free Hamiltonian

Purpose

Calculate the free propagator at time tstp from time dependent free Hamiltonian using high-order commutator-free exponential time-propagation,

see https://doi.org/10.1016/j.jcp.2011.04.006 for the description. Currently implemented versions are the second order using one exponential CF2:1 (order=2) and fourth order using two exponentials CF4:2 (order=4), see also article for more details.

Parameters
tstp

timestep at which propagator is calculated

U

propagator as an output of the function

H

Time dependent Hamiltonian

dt

time step

order

Order of approximation for commutator-free exponential, currently implemented orders = 2,4

kt

Order of integrator used for extrapolation and interpolation

fixHam

Hamiltonian is known for all times and no extrapolation is needed for the predictor/corrector

Definition at line 745 of file cntr_equilibrium_impl.hpp.

References cntr::function< T >::get_value(), interpolate_CF2(), interpolate_CF4(), cntr::function< T >::nt_, cntr::function< T >::set_value(), and cntr::function< T >::size1_.

745  {
746  int nt=U.nt_;
747  int size=U.size1_;
748  cdmatrix prop(size,size);
749 
750  assert(tstp<=nt);
751  assert(order==2 || order==4);
752  assert(size==H.size1_);
753 
754  if(tstp==-1 || tstp==0){
755  prop.setIdentity();
756  U.set_value(tstp,prop);
757  }else{
758  if(order==2){
759  cdmatrix arg(size,size);
760  // Get H(t+dt/2)-> Extrapolate and interpolate
761  interpolate_CF2(tstp,H,arg,kt,fixHam);
762  arg=arg*std::complex<double>(0.0,-1.0)*dt;
763  U.get_value(tstp-1,prop);
764  prop=arg.exp()*prop;
765  U.set_value(tstp,prop);
766  }else if(order==4){
767  cdmatrix H1(size,size),H2(size,size);
768  cdmatrix arg1(size,size),arg2(size,size);
769  // Get H(t+dt*c1) and H(t+dt*c2) -> Extrapolate and interpolate
770  interpolate_CF4(tstp,H,H1,H2,kt,fixHam);
771  double a1=(3.0-2.0*sqrt(3.0))/12.0;
772  double a2=(3.0+2.0*sqrt(3.0))/12.0;
773  arg1=std::complex<double>(0.0,-1.0)*dt*(a1*H1+a2*H2);
774  arg2=std::complex<double>(0.0,-1.0)*dt*(a2*H1+a1*H2);
775  U.get_value(tstp-1,prop);
776  prop=arg1.exp()*arg2.exp()*prop;
777  U.set_value(tstp,prop);
778  }
779  }
780 }
int size1_
Number of the colums in the Matrix form.
void get_value(int tstp, EigenMatrix &M) const
Get matrix value of this function object at a specific time point
void interpolate_CF2(int tstp, cntr::function< T > &H, cdmatrix &Hinter, int kt, bool fixHam=false)
Interpolation for the second order propagator
int nt_
Maximum number of the time steps.
void interpolate_CF4(int tstp, cntr::function< T > &H, cdmatrix &Hinte1, cdmatrix &Hinte2, int kt, bool fixHam=false)
Interpolation for the forth order propagator
void set_value(int tstp, EigenMatrix &M)
Set matrix value at a specific time point
+ Here is the call graph for this function: