136 #include "proto_f77.h" 140 int* facto_ini(
int ) ;
141 double* trigo_ini(
int ) ;
142 double* cheb_ini(
const int) ;
143 double* chebimp_ini(
const int ) ;
146 void circhebi(
const int* deg,
const int* dimc,
double* cf,
147 const int* dimf,
double* ff)
166 cout <<
"circhebi: nr > n3c : nr = " << nr <<
" , n3c = " 172 cout <<
"circhebi: nr > n3f : nr = " << nr <<
" , n3f = " 178 cout <<
"circhebi: n1c > n1f : n1c = " << n1c <<
" , n1f = " 184 cout <<
"circhebi: n2c > n2f : n2c = " << n2c <<
" , n2f = " 195 int* facto = facto_ini(nm1) ;
196 double* trigo = trigo_ini(nm1) ;
199 double* sinp = cheb_ini(nr);
202 double* x = chebimp_ini(nr);
206 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) ) ;
207 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
217 int n2n3f = n2f * n3f ;
218 int n2n3c = n2c * n3c ;
226 int borne_phi = ( n1c > 1 ) ? n1c-1 : 1 ;
228 for (j=0; j< borne_phi; j++) {
232 for (k=0; k<n2c; k++) {
234 int i0 = n2n3c * j + n3c * k ;
235 double* cf0 = cf + i0 ;
237 i0 = n2n3f * j + n3f * k ;
238 double* ff0 = ff + i0 ;
243 t1[0] = .5 * cf0[0] ;
244 for (i=1; i<nm1; i++) t1[i] = .5 * ( cf0[i] + cf0[i-1] ) ;
245 t1[nm1] = .5 * cf0[nr-2] ;
263 for ( i = 3; i < nr; i += 2 ) {
264 ff0[i] = t1[i] - c1 ;
269 double fmoins0 = nm1s2 * c1 + som ;
275 for ( i = 3; i < nr; i += 2 ) {
276 g[i] = 0.25 * ( ff0[i] - ff0[i-2] ) ;
289 for (i=2; i<nm1; i += 2 ) g[i] = 0.5 * t1[i] ;
296 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
301 for ( i = 1; i < nm1s2 ; i++ ) {
307 int ixsym = nm1 - isym ;
309 double fp = .5 * ( g[i] + g[isym] ) ;
310 double fm = .5 * ( g[i] - g[isym] ) / sinp[i] ;
312 ff0[ix] = ( fp + fm ) / x[ix];
313 ff0[ixsym] = ( fp - fm ) / x[ixsym] ;
318 ff0[nm1] = g[0] + fmoins0 ;
319 ff0[nm1s2] = g[nm1s2] / x[nm1s2] ;