23char mat_legi_cossinci_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/mat_legi_cossinci.C,v 1.5 2014/10/13 08:53:13 j_novak Exp $" ;
104int loch_mat_legi_cossinci = 0 ;
109double* mat_legi_cossinci(
int np,
int nt) {
112static double* tab[NMAX] ;
113static int nb_dejafait = 0 ;
114static int np_dejafait[NMAX] ;
116static int nt_dejafait[NMAX] ;
119int i, indice, j, j2, m, l ;
125 for ( i=0 ; i < nb_dejafait ; i++ ) {
126 if ( (np_dejafait[i] == np) && (nt_dejafait[i] == nt) ) indice = i ;
132 if ( nb_dejafait >= NMAX ) {
133 cout <<
"mat_legi_cossinci: nb_dejafait >= NMAX : "
134 << nb_dejafait <<
" <-> " << NMAX << endl ;
138 indice = nb_dejafait ;
140 np_dejafait[indice] = np ;
141 nt_dejafait[indice] = nt ;
143 tab[indice] =
new double[(np/2+1)*nt*nt] ;
158 double* yy =
new double[nt2] ;
165 for (m=0; m < np/2+1 ; m++) {
169 double* leg = legendre_norm(m, nt) ;
174 for (l=m/2; l<nt-1; l++) {
178 for (j2=0; j2<nt2; j2++) {
179 yy[j2] = leg[nt2* (ll-m) + j2] ;
184 cftcosi(deg, deg, yy, deg, yy) ;
187 for (j=0; j<nt; j++) {
188 tab[indice][ nt*nt* m + nt*j + l] = yy[j] ;
200 for (l=(m+1)/2; l<nt-1; l++) {
205 for (j2=0; j2<nt2; j2++) {
206 yy[j2] = leg[nt2* (ll-m) + j2] ;
211 cftsinp(deg, deg, yy, deg, yy) ;
214 for (j=0; j<nt-1; j++) {
215 tab[indice][ nt*nt* m + nt*j + l] = yy[j] ;