135 fftw_plan back_fft(
int, Tbl*&) ;
136 double* cheb_ini(
const int) ;
137 double* chebimp_ini(
const int ) ;
140 void circhebi(
const int* deg,
const int* dimc,
double* cf,
141 const int* dimf,
double* ff)
159 cout <<
"circhebi: nr > n3c : nr = " << nr <<
" , n3c = " 165 cout <<
"circhebi: nr > n3f : nr = " << nr <<
" , n3f = " 171 cout <<
"circhebi: n1c > n1f : n1c = " << n1c <<
" , n1f = " 177 cout <<
"circhebi: n2c > n2f : n2c = " << n2c <<
" , n2f = " 189 fftw_plan p = back_fft(nm1, pg) ;
191 double* t1 =
new double[nr] ;
194 double* sinp = cheb_ini(nr);
197 double* x = chebimp_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 ;
228 t1[0] = .5 * cf0[0] ;
229 for (i=1; i<nm1; i++) t1[i] = .5 * ( cf0[i] + cf0[i-1] ) ;
230 t1[nm1] = .5 * cf0[nr-2] ;
248 for ( i = 3; i < nr; i += 2 ) {
249 ff0[i] = t1[i] - c1 ;
254 double fmoins0 = nm1s2 * c1 + som ;
259 for ( i = 3; i < nr; i += 2 ) {
260 g.set(nm1-i/2) = 0.25 * ( ff0[i] - ff0[i-2] ) ;
272 for (i=1; i<nm1s2; i++ ) g.set(i) = 0.5 * t1[2*i] ;
273 g.set(nm1s2) = t1[nm1] ;
284 for ( i = 1; i < nm1s2 ; i++ ) {
290 int ixsym = nm1 - isym ;
292 double fp = .5 * ( g(i) + g(isym) ) ;
293 double fm = .5 * ( g(i) - g(isym) ) / sinp[i] ;
295 ff0[ix] = ( fp + fm ) / x[ix];
296 ff0[ixsym] = ( fp - fm ) / x[ixsym] ;
301 ff0[nm1] = g(0) + fmoins0 ;
302 ff0[nm1s2] = g(nm1s2) / x[nm1s2] ;