23char mat_legi_cosi_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/mat_legip_cosi.C,v 1.6 2014/10/13 08:53:13 j_novak Exp $" ;
104int loch_mat_legip_cosi = 0 ;
109double* mat_legip_cosi(
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 ;
126 for ( i=0 ; i < nb_dejafait ; i++ ) {
127 if ( (np_dejafait[i] == np) && (nt_dejafait[i] == nt) ) indice = i ;
133 if ( nb_dejafait >= NMAX ) {
134 cout <<
"mat_legpp_cosp: nb_dejafait >= NMAX : "
135 << nb_dejafait <<
" <-> " << NMAX << endl ;
139 indice = nb_dejafait ;
141 np_dejafait[indice] = np ;
142 nt_dejafait[indice] = nt ;
144 tab[indice] =
new double[(np/2+1)*nt*nt] ;
159 double* yy =
new double[nt2] ;
167 if (np == 1) m_max = 0 ;
169 for (m=0; m <= m_max ; m+=2) {
173 double* leg = legendre_norm(m, nt) ;
175 for (l=m/2; l<nt-1; l++) {
179 for (j2=0; j2<nt2; j2++) {
180 yy[j2] = leg[nt2* (ll-m) + j2] ;
185 cftcosi(deg, deg, yy, deg, yy) ;
188 for (j=0; j<nt; j++) {
189 tab[indice][ nt*nt* m/2 + nt*j + l] = yy[j] ;