Hi,

the code is correct. I have changed the comment to comply with the code. As a reference you can have a look into Emanuel's thesis, p. 138:
http://e-collection.library.ethz.ch/eserv/eth:31103/eth-31103-02.pdf

Best,
Hartmut



Am 29.12.2011 um 00:04 schrieb Kuangshing Chen:

Hi,

The function generate_spline_matrix in fouriertransform.C in the dmft folder shows the comments as follows:

  // A is the matrix whose inverse defines spline_matrix
  //  
  //      6                   6
  //      1  4  1
  //         1  4  1
  // A =        ...
  //
  //                    1  4  1
  //    -2  0              0  2 

However, the following codes,

  dense_matrix A = 4*dt/6.*boost::numeric::ublas::identity_matrix<double>(Np1);
 
  for (int i=1; i<Np1-1; i++) {
    A(i,i-1) = dt/6.;
    A(i,i+1) = dt/6.;
  }
  A(0,0) = 1.;
  A(0, Np1-1) = 1.;
  A(Np1-1, 0) = -2.*dt/6.;
  A(Np1-1, 1) = -1.*dt/6.;
  A(Np1-1, Np1-2) = 1*dt/6.;
  A(Np1-1, Np1-1) = 2*dt/6.;

the red lines will make the matrix looks like

  //      6                   6
  //      1  4  1
  //         1  4  1
  // A =        ...
  //
  //                    1  4  1
  //    -2  -1             1  2 

Is the comment correct or the code correct? Any reference for this algorithm?

Thank you,
Kuang-Shing Chen

--
Hartmut Hafermann

École Polytechnique
Centre de Physique Theorique (CPHT)
91128 Palaiseau Cedex, France

Tel.: +33 1 69 33 42 34
Fax: +33 1 69 33 49 49