139 fftw_plan back_fft(
int, Tbl*&) ;
140 double* cheb_ini(
const int) ;
143 void citcosp(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
162 cout <<
"citcosp: nt > n2f : nt = " << nt <<
" , n2f = " 168 cout <<
"citcosp: nt > n2c : nt = " << nt <<
" , n2c = " 173 if ( (n1f > 1) && (n1c > n1f) ) {
174 cout <<
"citcosp: n1c > n1f : n1c = " << n1c <<
" , n1f = " 180 cout <<
"citcosp: n3c > n3f : n3c = " << n3c <<
" , n3f = " 192 fftw_plan p = back_fft(nm1, pg) ;
196 double* sinp = cheb_ini(nt);
201 int n2n3f = n2f * n3f ;
202 int n2n3c = n2c * n3c ;
210 int borne_phi = n1c-1 ;
211 if (n1f == 1) borne_phi = 1 ;
213 for (j=0; j< borne_phi; j++) {
217 for (k=0; k<n3c; k++) {
219 int i0 = n2n3c * j + k ;
220 double* cf0 = cf + i0 ;
223 double* ff0 = ff + i0 ;
237 double c1 = cf0[n3c] ;
241 for ( i = 3; i < nt; i += 2 ) {
242 ff0[ n3f*i ] = cf0[ n3c*i ] - c1 ;
243 som += ff0[ n3f*i ] ;
247 double fmoins0 = nm1s2 * c1 + som ;
252 for ( i = 3; i < nt; i += 2 ) {
253 g.set(nm1-i/2) = 0.25 * ( ff0[ n3f*i ] - ff0[ n3f*(i-2) ] ) ;
265 for (i=1; i<nm1s2; i++ ) g.set(i) = 0.5 * cf0[ n3c*2*i ] ;
266 g.set(nm1s2) = cf0[ n3c*nm1 ] ;
277 for ( i = 1; i < nm1s2 ; i++ ) {
281 double fp = 0.5 * ( g(i) + g(isym) ) ;
282 double fm = 0.5 * ( g(i) - g(isym) ) / sinp[i] ;
283 ff0[ n3f*i ] = fp + fm ;
284 ff0[ n3f*isym ] = fp - fm ;
288 ff0[0] = g(0) + fmoins0 ;
289 ff0[ n3f*nm1 ] = g(0) - fmoins0 ;
290 ff0[ n3f*nm1s2 ] = g(nm1s2) ;