140 fftw_plan back_fft(
int, Tbl*&) ;
141 double* cheb_ini(
const int) ;
144 void circheb(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
163 cout <<
"circheb: nr > n3c : nr = " << nr <<
" , n3c = " 169 cout <<
"circheb: nr > n3f : nr = " << nr <<
" , n3f = " 175 cout <<
"circheb: n1c > n1f : n1c = " << n1c <<
" , n1f = " 181 cout <<
"circheb: n2c > n2f : n2c = " << n2c <<
" , n2f = " 193 fftw_plan p = back_fft(nm1, pg) ;
197 double* sinp = cheb_ini(nr);
201 int n2n3f = n2f * n3f ;
202 int n2n3c = n2c * n3c ;
210 int borne_phi = ( n1c > 1 ) ? n1c-1 : 1 ;
212 for (j=0; j< borne_phi; j++) {
216 for (k=0; k<n2c; k++) {
218 int i0 = n2n3c * j + n3c * k ;
219 double* cf0 = cf + i0 ;
221 i0 = n2n3f * j + n3f * k ;
222 double* ff0 = ff + i0 ;
240 for ( i = 3; i < nr; i += 2 ) {
241 ff0[i] = cf0[i] - c1 ;
245 double fmoins0 = - nm1s2 * c1 - som ;
250 for ( i = 3; i < nr; i += 2 ) {
251 g.set(nm1-i/2) = -0.25 * ( ff0[i] - ff0[i-2] ) ;
262 for (i=1; i<nm1s2; i ++ ) g.set(i) = 0.5 * cf0[2*i] ;
263 g.set(nm1s2) = cf0[nm1] ;
274 for ( i = 1; i < nm1s2 ; i++ ) {
278 double fp = .5 * ( g(i) + g(isym) ) ;
279 double fm = .5 * ( g(i) - g(isym) ) / sinp[i] ;
282 ff0[isym] = fp - fm ;
286 ff0[0] = g(0) + fmoins0 ;
287 ff0[nm1] = g(0) - fmoins0 ;
288 ff0[nm1s2] = g(nm1s2) ;