133 fftw_plan prepare_fft(
int, Tbl*&) ;
134 double* cheb_ini(
const int) ;
137 void cftsinp(
const int* deg,
const int* dimf,
double* ff,
const int* dimc,
157 cout <<
"cftsinp: nt > n2f : nt = " << nt <<
" , n2f = " 163 cout <<
"cftsinp: nt > n2c : nt = " << nt <<
" , n2c = " 169 cout <<
"cftsinp: n1f > n1c : n1f = " << n1f <<
" , n1c = " 175 cout <<
"cftsinp: n3f > n3c : n3f = " << n3f <<
" , n3c = " 187 fftw_plan p = prepare_fft(nm1, pg) ;
191 double* sinp = cheb_ini(nt);
196 int n2n3f = n2f * n3f ;
197 int n2n3c = n2c * n3c ;
205 int borne_phi = ( n1f > 1 ) ? n1f-1 : 1 ;
207 for (j=0; j< borne_phi; j++) {
211 for (k=0; k<n3f; k++) {
213 int i0 = n2n3f * j + k ;
214 double* ff0 = ff + i0 ;
217 double* cf0 = cf + i0 ;
226 for ( i = 1; i < nm1s2 ; i++ ) {
232 int ixsym = n3f * isym ;
234 double fps = 0.5 * ( ff0[ix] + ff0[ixsym] ) * sinp[i] ;
236 double fm = 0.5 * ( ff0[ix] - ff0[ixsym] ) ;
237 g.set(i) = fps + fm ;
238 g.set(isym) = fps - fm ;
241 g.set(0) = 0.5 * ( ff0[0] - ff0[ n3f*nm1 ] ) ;
242 g.set(nm1s2) = ff0[ n3f*nm1s2 ] ;
254 double fac = 2./double(nm1) ;
256 for (i=2; i<nm1; i += 2 ) cf0[n3c*i] = -fac * g(nm1 - i/2);
267 cf0[n3c] = fac * g(0) ;
269 for ( i = 3; i < nt; i += 2 ) {
270 cf0[ n3c*i ] = cf0[ n3c*(i-2) ] + fac * g(i/2) ;