123 fftw_plan back_fft(
int, Tbl*&) ;
124 double* cheb_ini(
const int) ;
127 void citcos(
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 ;
221 double c1 = cf0[n3c] ;
225 for ( i = 3; i < nt; i += 2 ) {
226 ff0[ n3f*i ] = cf0[ n3c*i ] - c1 ;
227 som += ff0[ n3f*i ] ;
231 double fmoins0 = nm1s2 * c1 + som ;
236 for ( i = 3; i < nt; i += 2 ) {
237 g.set(nm1-i/2) = 0.25 * ( ff0[ n3f*i ] - ff0[ n3f*(i-2) ] ) ;
249 for (i=1; i<nm1s2; i++ ) g.set(i) = 0.5 * cf0[ n3c*2*i ] ;
250 g.set(nm1s2) = cf0[ n3c*nm1 ] ;
261 for ( i = 1; i < nm1s2 ; i++ ) {
265 double fp = 0.5 * ( g(i) + g(isym) ) ;
266 double fm = 0.5 * ( g(i) - g(isym) ) / sinp[i] ;
267 ff0[ n3f*i ] = fp + fm ;
268 ff0[ n3f*isym ] = fp - fm ;
272 ff0[0] = g(0) + fmoins0 ;
273 ff0[ n3f*nm1 ] = g(0) - fmoins0 ;
274 ff0[ n3f*nm1s2 ] = g(nm1s2) ;