133 #include "proto_f77.h" 137 int* facto_ini(
int ) ;
138 double* trigo_ini(
int ) ;
139 double* cheb_ini(
const int) ;
140 double* chebimp_ini(
const int ) ;
143 void cftsini(
const int* deg,
const int* dimf,
double* ff,
const int* dimc,
162 cout <<
"cftsini: nt > n2f : nt = " << nt <<
" , n2f = " 168 cout <<
"cftsini: nt > n2c : nt = " << nt <<
" , n2c = " 174 cout <<
"cftsini: n1f > n1c : n1f = " << n1f <<
" , n1c = " 180 cout <<
"cftsini: n3f > n3c : n3f = " << n3f <<
" , n3c = " 191 int* facto = facto_ini(nm1) ;
192 double* trigo = trigo_ini(nm1) ;
195 double* sinp = cheb_ini(nt);
198 double* sinth = chebimp_ini(nt);
202 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) );
203 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
214 int n2n3f = n2f * n3f ;
215 int n2n3c = n2c * n3c ;
223 int borne_phi = ( n1f > 1 ) ? n1f-1 : 1 ;
225 for (j=0; j< borne_phi; j++) {
229 for (k=0; k<n3f; k++) {
231 int i0 = n2n3f * j + k ;
232 double* ff0 = ff + i0 ;
235 double* cf0 = cf + i0 ;
244 for (i=1; i<nt; i++) cf0[n3c*i] = sinth[i] * ff0[n3f*i] ;
252 double fmoins0 = 0.5 * ( cf0[0] - cf0[ n3c*nm1 ] );
256 for ( i = 1; i < nm1s2 ; i++ ) {
262 int ixsym = n3c * isym ;
264 double fp = 0.5 * ( cf0[ix] + cf0[ixsym] ) ;
266 double fms = 0.5 * ( cf0[ix] - cf0[ixsym] ) * sinp[i] ;
271 g[0] = 0.5 * ( cf0[0] + cf0[ n3c*nm1 ] );
272 g[nm1s2] = cf0[ n3c*nm1s2 ];
277 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
286 for (i=2; i<nm1; i += 2 ) cf0[n3c*i] = 2.* g[i] ;
287 cf0[n3c*nm1] = g[nm1] ;
297 for ( i = 3; i < nt; i += 2 ) {
298 cf0[n3c*i] = cf0[n3c*(i-2)] + 4. * g[i] ;
303 double c1 = ( fmoins0 - som ) / nm1s2 ;
307 for ( i = 3; i < nt; i += 2 ) cf0[n3c*i] += c1 ;
313 for (i=1; i<nm1; i++) {
314 cf0[n3c*i] = 2 * cf0[n3c*i] + cf0[n3c*(i-1)] ;