NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ interpolate_CF2()

template<typename T >
void cntr::interpolate_CF2 ( int  tstp,
cntr::function< T > &  H,
cdmatrix &  Hinter,
int  kt,
bool  fixHam = false 

Interpolation for the second order propagator


Interpolates H(t-dt/2) from H(t+dt), H(t), H(t-dt)

where H(t+dt) is obtained from the extrapolation if not yet known H is original function If fixham=true we assume that the hamiltonian is known for all times and there is no extrapolation


timestep at which propagator is calculated


Time dependent Hamiltonian


Interpolated Hamiltonian


Order of integrator used for extrapolation and interpolation


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

Definition at line 648 of file cntr_equilibrium_impl.hpp.

References cntr::function< T >::get_value(), integration::I< double >(), and cntr::function< T >::size1_.

Referenced by propagator_exp().

648  {
649  int size=H.size1_;
650  cdmatrix tmp1(size,size),tmp2(size,size);
651  int ktextrap=(tstp<=kt ? tstp : kt);
652  int n1=(tstp<=kt ? kt : tstp); //Once you are at kt the next point needs to be included
653  // Extrapolate to get H(t + dt)
654  if(!fixHam && tstp>kt){
655  extrapolate_timestep(tstp-1,H,integration::I<double>(ktextrap));
656  }
657  // Interpolate to get H(t + dt/2)
658  H.get_value(tstp-1,tmp1);
659  H.get_value(tstp,tmp2);
661  Hinter=interpolation(n1,(tstp-0.5),H,integration::I<double>(kt)); //ktextrap+1 since we added one more point
662 }
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
template Integrator< double > & I< double >(int k)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: