23char mat_legpi_sini_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/mat_legpi_sini.C,v 1.6 2014/10/13 08:53:14 j_novak Exp $" ;
107int loch_mat_legpi_sini = 0 ;
112double* mat_legpi_sini(
int np,
int nt) {
115static double* tab[NMAX] ;
116static int nb_dejafait = 0 ;
117static int np_dejafait[NMAX] ;
119static int nt_dejafait[NMAX] ;
122int i, indice, j, j2, m, l ;
129 for ( i=0 ; i < nb_dejafait ; i++ ) {
130 if ( (np_dejafait[i] == np) && (nt_dejafait[i] == nt) ) indice = i ;
136 if ( nb_dejafait >= NMAX ) {
137 cout <<
"mat_legpp_cosp: nb_dejafait >= NMAX : "
138 << nb_dejafait <<
" <-> " << NMAX << endl ;
142 indice = nb_dejafait ;
144 np_dejafait[indice] = np ;
145 nt_dejafait[indice] = nt ;
147 tab[indice] =
new double[(np/2+1)*nt*nt];
162 double* yy =
new double[nt2];
169 int m_max = (np == 1) ? 1 : np-1 ;
171 for (m=1; m <= m_max ; m+=2) {
175 double* leg = legendre_norm(m, nt) ;
178 for (l=(m-1)/2; l<nt-1; l++) {
182 for (j2=0; j2<nt2; j2++) {
183 yy[j2] = leg[nt2* (ll-m) + j2] ;
188 cftsini(deg, deg, yy, deg, yy) ;
191 for (j=0; j<nt-1; j++) {
192 tab[indice][ nt*nt* ((m-1)/2) + nt*j + l] = yy[j] ;