117 #include "proto_f77.h" 121 int* facto_ini(
int ) ;
122 double* trigo_ini(
int ) ;
123 double* cheb_ini(
const int) ;
124 double* chebimp_ini(
const int ) ;
127 void circhebpip(
const int* deg,
const int* dimc,
double* cf,
128 const int* dimf,
double* ff)
147 cout <<
"circhebpip: nr > n3c : nr = " << nr <<
" , n3c = " 153 cout <<
"circhebpip: nr > n3f : nr = " << nr <<
" , n3f = " 159 cout <<
"circhebpip: n1c > n1f : n1c = " << n1c <<
" , n1f = " 165 cout <<
"circhebpip: n2c > n2f : n2c = " << n2c <<
" , n2f = " 176 int* facto = facto_ini(nm1) ;
177 double* trigo = trigo_ini(nm1) ;
180 double* sinp = cheb_ini(nr);
183 double* x = chebimp_ini(nr);
187 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) ) ;
188 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
198 int n2n3f = n2f * n3f ;
199 int n2n3c = n2c * n3c ;
207 int borne_phi = ( n1c > 1 ) ? n1c-1 : 1 ;
209 for (j=0; j< borne_phi; j++) {
216 for (k=0; k<n2c; k+=2) {
218 int i0 = n2n3c * j + n3c * k ;
219 double* cf0 = cf + i0 ;
221 i0 = n2n3f * j + n3f * k ;
222 double* ff0 = ff + i0 ;
236 for ( i = 3; i < nr; i += 2 ) {
237 ff0[i] = cf0[i] - c1 ;
242 double fmoins0 = nm1s2 * c1 + som ;
248 for ( i = 3; i < nr; i += 2 ) {
249 g[i] = 0.25 * ( ff0[i] - ff0[i-2] ) ;
262 for (i=2; i<nm1; i += 2 ) g[i] = 0.5 * cf0[i] ;
269 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
274 for ( i = 1; i < nm1s2 ; i++ ) {
280 int ixsym = nm1 - isym ;
282 double fp = .5 * ( g[i] + g[isym] ) ;
283 double fm = .5 * ( g[i] - g[isym] ) / sinp[i] ;
286 ff0[ixsym] = fp - fm ;
290 ff0[0] = g[0] - fmoins0 ;
291 ff0[nm1] = g[0] + fmoins0 ;
292 ff0[nm1s2] = g[nm1s2] ;
298 for (k=1; k<n2c; k+=2) {
300 int i0 = n2n3c * j + n3c * k ;
301 double* cf0 = cf + i0 ;
303 i0 = n2n3f * j + n3f * k ;
304 double* ff0 = ff + i0 ;
309 t1[0] = .5 * cf0[0] ;
310 for (i=1; i<nm1; i++) t1[i] = .5 * ( cf0[i] + cf0[i-1] ) ;
311 t1[nm1] = .5 * cf0[nr-2] ;
325 for ( i = 3; i < nr; i += 2 ) {
326 ff0[i] = t1[i] - c1 ;
331 double fmoins0 = nm1s2 * c1 + som ;
337 for ( i = 3; i < nr; i += 2 ) {
338 g[i] = 0.25 * ( ff0[i] - ff0[i-2] ) ;
351 for (i=2; i<nm1; i += 2 ) g[i] = 0.5 * t1[i] ;
358 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
363 for ( i = 1; i < nm1s2 ; i++ ) {
369 int ixsym = nm1 - isym ;
371 double fp = .5 * ( g[i] + g[isym] ) ;
372 double fm = .5 * ( g[i] - g[isym] ) / sinp[i] ;
374 ff0[ix] = ( fp + fm ) / x[ix];
375 ff0[ixsym] = ( fp - fm ) / x[ixsym] ;
380 ff0[nm1] = g[0] + fmoins0 ;
381 ff0[nm1s2] = g[nm1s2] / x[nm1s2] ;