130 #include "proto_f77.h" 134 int* facto_ini(
int ) ;
135 double* trigo_ini(
int ) ;
136 double* cheb_ini(
const int) ;
139 void citsin(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
158 cout <<
"citcos: nt > n2f : nt = " << nt <<
" , n2f = " 164 cout <<
"citcos: nt > n2c : nt = " << nt <<
" , n2c = " 169 if ( (n1f > 1) && (n1c > n1f) ) {
170 cout <<
"citcos: n1c > n1f : n1c = " << n1c <<
" , n1f = " 176 cout <<
"citcos: n3c > n3f : n3c = " << n3c <<
" , n3f = " 187 int* facto = facto_ini(nm1) ;
188 double* trigo = trigo_ini(nm1) ;
191 double* sinp = cheb_ini(nt);
195 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) ) ;
196 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
207 int n2n3f = n2f * n3f ;
208 int n2n3c = n2c * n3c ;
216 int borne_phi = n1c-1 ;
217 if (n1f == 1) borne_phi = 1 ;
219 for (j=0; j< borne_phi; j++) {
223 for (k=0; k<n3c; k++) {
225 int i0 = n2n3c * j + k ;
226 double* cf0 = cf + i0 ;
229 double* ff0 = ff + i0 ;
235 for (i=2; i<nm1; i += 2 ) g[i+1] = -0.5 * cf0[ n3c*i ] ;
242 g[0] = .5 * cf0[n3c] ;
243 for ( i = 3; i < nt; i += 2 ) {
244 g[i-1] = .25 * ( cf0[ n3c*i ] - cf0[ n3c*(i-2) ] ) ;
246 g[nm1] = - .5 * cf0[ n3c*(nt-2) ] ;
252 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
257 for ( i = 1; i < nm1s2 ; i++ ) {
261 double fp = 0.5 * ( g[i] + g[isym] ) / sinp[i] ;
262 double fm = 0.5 * ( g[i] - g[isym] ) ;
263 ff0[ n3f*i ] = fp + fm ;
264 ff0[ n3f*isym ] = fp - fm ;
269 ff0[ n3f*nm1 ] = -2*g[0] ;
270 ff0[ n3f*nm1s2 ] = g[nm1s2] ;