135 #include "proto_f77.h" 139 int* facto_ini(
int ) ;
140 double* trigo_ini(
int ) ;
141 double* cheb_ini(
const int) ;
144 void citsinp(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
163 cout <<
"citsinp: nt > n2f : nt = " << nt <<
" , n2f = " 169 cout <<
"citsinp: nt > n2c : nt = " << nt <<
" , n2c = " 174 if ( (n1f > 1) && (n1c > n1f) ) {
175 cout <<
"citsinp: n1c > n1f : n1c = " << n1c <<
" , n1f = " 181 cout <<
"citsinp: n3c > n3f : n3c = " << n3c <<
" , n3f = " 192 int* facto = facto_ini(nm1) ;
193 double* trigo = trigo_ini(nm1) ;
196 double* sinp = cheb_ini(nt);
200 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) ) ;
201 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
212 int n2n3f = n2f * n3f ;
213 int n2n3c = n2c * n3c ;
221 int borne_phi = n1c-1 ;
222 if (n1f == 1) borne_phi = 1 ;
224 for (j=0; j< borne_phi; j++) {
228 for (k=0; k<n3c; k++) {
230 int i0 = n2n3c * j + k ;
231 double* cf0 = cf + i0 ;
234 double* ff0 = ff + i0 ;
258 for (i=2; i<nm1; i += 2 ) g[i+1] = - .5 * cf0[n3c*i] ;
269 g[0] = .5 * cf0[n3c] ;
270 for ( i = 3; i < nt; i += 2 ) {
271 g[i-1] = .25 * ( cf0[ n3c*i ] - cf0[ n3c*(i-2) ] ) ;
273 g[nm1] = - .5 * cf0[ n3c*(nt-2) ] ;
280 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
285 for ( i = 1; i < nm1s2 ; i++ ) {
289 double fp = 0.5 * ( g[i] + g[isym] ) / sinp[i] ;
290 double fm = 0.5 * ( g[i] - g[isym] ) ;
291 ff0[ n3f*i ] = fp + fm ;
292 ff0[ n3f*isym ] = fp - fm ;
297 ff0[ n3f*nm1 ] = -2. * g[0] ;
298 ff0[ n3f*nm1s2 ] = g[nm1s2] ;