129 #include "proto_f77.h" 133 int* facto_ini(
int ) ;
134 double* trigo_ini(
int ) ;
135 double* cheb_ini(
const int) ;
136 double* chebimp_ini(
const int ) ;
139 void citsini(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
158 cout <<
"citsini: nt > n2f : nt = " << nt <<
" , n2f = " 164 cout <<
"citsini: nt > n2c : nt = " << nt <<
" , n2c = " 169 if ( (n1f > 1) && (n1c > n1f) ) {
170 cout <<
"citsini: n1c > n1f : n1c = " << n1c <<
" , n1f = " 176 cout <<
"citsini: n3c > n3f : n3c = " << n3c <<
" , n3f = " 187 int* facto = facto_ini(nm1) ;
188 double* trigo = trigo_ini(nm1) ;
191 double* sinp = cheb_ini(nt);
194 double* sinth = chebimp_ini(nt);
198 double* g = (
double*)( malloc( (nm1+2)*
sizeof(
double) ) ) ;
199 double* t1 = (
double*)( malloc( (nm1+2)*
sizeof(double) ) ) ;
209 int n2n3f = n2f * n3f ;
210 int n2n3c = n2c * n3c ;
219 int borne_phi = n1c-1 ;
220 if (n1f == 1) borne_phi = 1 ;
222 for (j=0; j< borne_phi; j++) {
226 for (k=0; k<n3c; k++) {
228 int i0 = n2n3c * j + k ;
229 double* cf0 = cf + i0 ;
232 double* ff0 = ff + i0 ;
237 t1[0] = .5 * cf0[0] ;
238 for (i=1; i<nm1; i++) {
239 t1[i] = .5 * ( cf0[ n3c*i ] - cf0[ n3c*(i-1) ] ) ;
241 t1[nm1] = -.5 * cf0[ n3c*(nt-2) ] ;
259 for ( i = 3; i < nt; i += 2 ) {
260 ff0[ n3f*i ] = t1[i] - c1 ;
261 som += ff0[ n3f*i ] ;
265 double fmoins0 = nm1s2 * c1 + som ;
271 for ( i = 3; i < nt; i += 2 ) {
272 g[i] = 0.25 * ( ff0[ n3f*i ] - ff0[ n3f*(i-2) ] ) ;
285 for (i=2; i<nm1; i += 2 ) g[i] = 0.5 * t1[i] ;
292 F77_fft991( g, t1, trigo, facto, &inc, &jump, &nm1, &lot, &isign) ;
297 for ( i = 1; i < nm1s2 ; i++ ) {
301 double fp = 0.5 * ( g[i] + g[isym] ) ;
302 double fm = 0.5 * ( g[i] - g[isym] ) / sinp[i] ;
303 ff0[ n3f*i ] = ( fp + fm ) / sinth[i] ;
304 ff0[ n3f*isym ] = ( fp - fm ) / sinth[isym] ;
309 ff0[ n3f*nm1 ] = g[0] - fmoins0 ;
310 ff0[ n3f*nm1s2 ] = g[nm1s2] / sinth[nm1s2];