129 fftw_plan back_fft(
int, Tbl*&) ;
130 double* cheb_ini(
const int) ;
131 double* chebimp_ini(
const int ) ;
134 void citsini(
const int* deg,
const int* dimc,
double* cf,
const int* dimf,
153 cout <<
"citsini: nt > n2f : nt = " << nt <<
" , n2f = " 159 cout <<
"citsini: nt > n2c : nt = " << nt <<
" , n2c = " 164 if ( (n1f > 1) && (n1c > n1f) ) {
165 cout <<
"citsini: n1c > n1f : n1c = " << n1c <<
" , n1f = " 171 cout <<
"citsini: n3c > n3f : n3c = " << n3c <<
" , n3f = " 183 fftw_plan p = back_fft(nm1, pg) ;
185 double* t1 =
new double[nt] ;
188 double* sinp = cheb_ini(nt);
191 double* sinth = chebimp_ini(nt);
195 int n2n3f = n2f * n3f ;
196 int n2n3c = n2c * n3c ;
205 int borne_phi = n1c-1 ;
206 if (n1f == 1) borne_phi = 1 ;
208 for (j=0; j< borne_phi; j++) {
212 for (k=0; k<n3c; k++) {
214 int i0 = n2n3c * j + k ;
215 double* cf0 = cf + i0 ;
218 double* ff0 = ff + i0 ;
223 t1[0] = .5 * cf0[0] ;
224 for (i=1; i<nm1; i++) {
225 t1[i] = .5 * ( cf0[ n3c*i ] - cf0[ n3c*(i-1) ] ) ;
227 t1[nm1] = -.5 * cf0[ n3c*(nt-2) ] ;
245 for ( i = 3; i < nt; i += 2 ) {
246 ff0[ n3f*i ] = t1[i] - c1 ;
247 som += ff0[ n3f*i ] ;
251 double fmoins0 = nm1s2 * c1 + som ;
256 for ( i = 3; i < nt; i += 2 ) {
257 g.set(nm1-i/2) = 0.25 * ( ff0[ n3f*i ] - ff0[ n3f*(i-2) ] ) ;
268 for (i=1; i<nm1s2; i ++ ) g.set(i) = 0.5 * t1[2*i] ;
269 g.set(nm1s2) = t1[nm1] ;
280 for ( i = 1; i < nm1s2 ; i++ ) {
284 double fp = 0.5 * ( g(i) + g(isym) ) ;
285 double fm = 0.5 * ( g(i) - g(isym) ) / sinp[i] ;
286 ff0[ n3f*i ] = ( fp + fm ) / sinth[i] ;
287 ff0[ n3f*isym ] = ( fp - fm ) / sinth[isym] ;
292 ff0[ n3f*nm1 ] = g(0) - fmoins0 ;
293 ff0[ n3f*nm1s2 ] = g(nm1s2) / sinth[nm1s2];