23char cfpcossin_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/FFTW3/cfpcossin.C,v 1.3 2014/10/13 08:53:18 j_novak Exp $" ;
115fftw_plan prepare_fft(
int, Tbl*&) ;
118void cfpcossin(
const int* deg,
const int* dim,
double* cf)
130 cout <<
"cfpcossin: np+2 > n1 : np+2 = " << np+2 <<
" , n1 = "
138 fftw_plan p = prepare_fft(np, pg) ;
143 double fac = 2./double(np) ;
146 for (
int j=0; j<n2; j++) {
147 for (
int k=0; k<n3; k++) {
150 double* debut = cf + index ;
152 for (
int i=0; i<np; i++) {
162 double* psin = g.t + np - 1 ;
163 (*debut) = (*pcos)/double(np) ;
164 debut += n2n3 ; pcos++ ;
167 for (
int i=1; i<np/2; i++){
168 *debut = (*pcos)*fac ;
169 debut += n2n3 ; pcos++ ;
170 *debut = -(*psin)*fac ;
171 debut += n2n3 ; psin-- ;
173 (*debut) = (*pcos)/double(np) ;