135 #include "proto_f77.h" 139 int* facto_ini(
int ) ;
140 double* trigo_ini(
int ) ;
141 double* cheb_ini(
const int) ;
144 void circhebp(
const int* deg,
const int* dimc,
double* cf,
145 const int* dimf,
double* ff)
164 cout <<
"circhebp: nr > n3c : nr = " << nr <<
" , n3c = " 170 cout <<
"circhebp: nr > n3f : nr = " << nr <<
" , n3f = " 176 cout <<
"circhebp: n1c > n1f : n1c = " << n1c <<
" , n1f = " 182 cout <<
"circhebp: n2c > n2f : n2c = " << n2c <<
" , n2f = " 193 int* facto = facto_ini(nm1) ;
194 double* trigo = trigo_ini(nm1) ;
197 double* sinp = cheb_ini(nr);
201 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) ) ;
202 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
212 int n2n3f = n2f * n3f ;
213 int n2n3c = n2c * n3c ;
221 int borne_phi = ( n1c > 1 ) ? n1c-1 : 1 ;
223 for (j=0; j< borne_phi; j++) {
227 for (k=0; k<n2c; k++) {
229 int i0 = n2n3c * j + n3c * k ;
230 double* cf0 = cf + i0 ;
232 i0 = n2n3f * j + n3f * k ;
233 double* ff0 = ff + i0 ;
251 for ( i = 3; i < nr; i += 2 ) {
252 ff0[i] = cf0[i] - c1 ;
257 double fmoins0 = nm1s2 * c1 + som ;
263 for ( i = 3; i < nr; i += 2 ) {
264 g[i] = 0.25 * ( ff0[i] - ff0[i-2] ) ;
277 for (i=2; i<nm1; i += 2 ) g[i] = 0.5 * cf0[i] ;
284 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
289 for ( i = 1; i < nm1s2 ; i++ ) {
295 int ixsym = nm1 - isym ;
297 double fp = .5 * ( g[i] + g[isym] ) ;
298 double fm = .5 * ( g[i] - g[isym] ) / sinp[i] ;
301 ff0[ixsym] = fp - fm ;
305 ff0[0] = g[0] - fmoins0 ;
306 ff0[nm1] = g[0] + fmoins0 ;
307 ff0[nm1s2] = g[nm1s2] ;