123 fftw_plan back_fft(
int, Tbl*&) ;
124 double* cheb_ini(
const int) ;
127 void citsin(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
146 cout <<
"citcos: nt > n2f : nt = " << nt <<
" , n2f = " 152 cout <<
"citcos: nt > n2c : nt = " << nt <<
" , n2c = " 157 if ( (n1f > 1) && (n1c > n1f) ) {
158 cout <<
"citcos: n1c > n1f : n1c = " << n1c <<
" , n1f = " 164 cout <<
"citcos: n3c > n3f : n3c = " << n3c <<
" , n3f = " 176 fftw_plan p = back_fft(nm1, pg) ;
180 double* sinp = cheb_ini(nt);
185 int n2n3f = n2f * n3f ;
186 int n2n3c = n2c * n3c ;
194 int borne_phi = n1c-1 ;
195 if (n1f == 1) borne_phi = 1 ;
197 for (j=0; j< borne_phi; j++) {
201 for (k=0; k<n3c; k++) {
203 int i0 = n2n3c * j + k ;
204 double* cf0 = cf + i0 ;
207 double* ff0 = ff + i0 ;
212 for (i=2; i<nm1; i += 2 ) g.set(nm1-i/2) = -0.5 * cf0[ n3c*i ] ;
217 g.set(0) = .5 * cf0[n3c] ;
218 for ( i = 3; i < nt; i += 2 ) {
219 g.set(i/2) = .25 * ( cf0[ n3c*i ] - cf0[ n3c*(i-2) ] ) ;
221 g.set(nm1s2) = - .5 * cf0[ n3c*(nt-2) ] ;
232 for ( i = 1; i < nm1s2 ; i++ ) {
236 double fp = 0.5 * ( g(i) + g(isym) ) / sinp[i] ;
237 double fm = 0.5 * ( g(i) - g(isym) ) ;
238 ff0[ n3f*i ] = fp + fm ;
239 ff0[ n3f*isym ] = fp - fm ;
244 ff0[ n3f*nm1 ] = -2*g(0) ;
245 ff0[ n3f*nm1s2 ] = g(nm1s2) ;