133 #include "proto_f77.h" 137 int* facto_ini(
int ) ;
138 double* trigo_ini(
int ) ;
139 double* cheb_ini(
const int) ;
142 void cftsinp(
const int* deg,
const int* dimf,
double* ff,
const int* dimc,
162 cout <<
"cftsinp: nt > n2f : nt = " << nt <<
" , n2f = " 168 cout <<
"cftsinp: nt > n2c : nt = " << nt <<
" , n2c = " 174 cout <<
"cftsinp: n1f > n1c : n1f = " << n1f <<
" , n1c = " 180 cout <<
"cftsinp: n3f > n3c : n3f = " << n3f <<
" , n3c = " 191 int* facto = facto_ini(nm1) ;
192 double* trigo = trigo_ini(nm1) ;
195 double* sinp = cheb_ini(nt);
199 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) );
200 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
211 int n2n3f = n2f * n3f ;
212 int n2n3c = n2c * n3c ;
220 int borne_phi = ( n1f > 1 ) ? n1f-1 : 1 ;
222 for (j=0; j< borne_phi; j++) {
226 for (k=0; k<n3f; k++) {
228 int i0 = n2n3f * j + k ;
229 double* ff0 = ff + i0 ;
232 double* cf0 = cf + i0 ;
241 for ( i = 1; i < nm1s2 ; i++ ) {
247 int ixsym = n3f * isym ;
249 double fps = 0.5 * ( ff0[ix] + ff0[ixsym] ) * sinp[i] ;
251 double fm = 0.5 * ( ff0[ix] - ff0[ixsym] ) ;
256 g[0] = 0.5 * ( ff0[0] - ff0[ n3f*nm1 ] ) ;
257 g[nm1s2] = ff0[ n3f*nm1s2 ] ;
262 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
272 for (i=2; i<nm1; i += 2 ) cf0[n3c*i] = -2. * g[i+1] ;
283 cf0[n3c] = 2.* g[0] ;
284 for ( i = 3; i < nt; i += 2 ) {
285 cf0[ n3c*i ] = cf0[ n3c*(i-2) ] + 4. * g[i-1] ;